define("6baae7a7-af13-40d3-9567-f3bca9986248_0.0.1", ["@microsoft/sp-property-pane","WorldClockWebPartWebPartStrings","ControlStrings","@microsoft/sp-core-library","@microsoft/sp-webpart-base","react","react-dom","@microsoft/sp-http"], function(__WEBPACK_EXTERNAL_MODULE__26ea__, __WEBPACK_EXTERNAL_MODULE_CYkI__, __WEBPACK_EXTERNAL_MODULE_Sgrz__, __WEBPACK_EXTERNAL_MODULE_UWqr__, __WEBPACK_EXTERNAL_MODULE_br4S__, __WEBPACK_EXTERNAL_MODULE_cDcd__, __WEBPACK_EXTERNAL_MODULE_faye__, __WEBPACK_EXTERNAL_MODULE_vlQI__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "Mcpa"); /******/ }) /************************************************************************/ /******/ ({ /***/ "++vo": /*!*************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-controls-react/node_modules/@uifabric/styling/lib/styles/GeneralStyles.js ***! \*************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This file mimics styles and mixins from _General.Mixins.scss Object.defineProperty(exports, "__esModule", { value: true }); exports.normalize = { boxShadow: 'none', margin: 0, padding: 0, boxSizing: 'border-box' }; exports.noWrap = { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', }; //# sourceMappingURL=GeneralStyles.js.map /***/ }), /***/ "+0bo": /*!*************************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-controls-react/node_modules/office-ui-fabric-react/lib/components/Layer/Layer.base.js ***! \*************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(/*! tslib */ "jONu"); /* tslint:disable:no-unused-variable */ var React = __webpack_require__(/*! react */ "cDcd"); var ReactDOM = __webpack_require__(/*! react-dom */ "faye"); /* tslint:enable:no-unused-variable */ var Fabric_1 = __webpack_require__(/*! ../../Fabric */ "OdP1"); var Utilities_1 = __webpack_require__(/*! ../../Utilities */ "f/6L"); var _layersByHostId = {}; var _defaultHostSelector; var getClassNames = Utilities_1.classNamesFunction(); var LayerBase = /** @class */ (function (_super) { tslib_1.__extends(LayerBase, _super); function LayerBase(props) { var _this = _super.call(this, props) || this; _this._rootElement = Utilities_1.createRef(); _this._warnDeprecations({ onLayerMounted: 'onLayerDidMount' }); if (_this.props.hostId) { if (!_layersByHostId[_this.props.hostId]) { _layersByHostId[_this.props.hostId] = []; } _layersByHostId[_this.props.hostId].push(_this); } return _this; } /** * Used for notifying applicable Layers that a host is available/unavailable and to re-evaluate Layers that * care about the specific host. */ LayerBase.notifyHostChanged = function (id) { if (_layersByHostId[id]) { _layersByHostId[id].forEach(function (layer) { return layer.forceUpdate(); }); } }; /** * Sets the default target selector to use when determining the host in which * Layered content will be injected into. If not provided, an element will be * created at the end of the document body. * * Passing in a falsey value will clear the default target and reset back to * using a created element at the end of document body. */ LayerBase.setDefaultTarget = function (selector) { _defaultHostSelector = selector; }; LayerBase.prototype.componentDidMount = function () { this.componentDidUpdate(); }; LayerBase.prototype.componentWillUnmount = function () { var _this = this; this._removeLayerElement(); if (this.props.hostId) { _layersByHostId[this.props.hostId] = _layersByHostId[this.props.hostId].filter(function (layer) { return layer !== _this; }); if (!_layersByHostId[this.props.hostId].length) { delete _layersByHostId[this.props.hostId]; } } }; LayerBase.prototype.componentDidUpdate = function () { var _this = this; var host = this._getHost(); var _a = this.props, className = _a.className, getStyles = _a.getStyles, theme = _a.theme; var classNames = getClassNames(getStyles, { theme: theme, className: className, isNotHost: !this.props.hostId }); if (host !== this._host) { this._removeLayerElement(); } if (host) { this._host = host; if (!this._layerElement) { var rootElement = this._rootElement.current; var doc = Utilities_1.getDocument(rootElement); if (!doc || !rootElement) { return; } this._layerElement = doc.createElement('div'); this._layerElement.className = classNames.root; host.appendChild(this._layerElement); Utilities_1.setVirtualParent(this._layerElement, rootElement); } // Using this 'unstable' method allows us to retain the React context across the layer projection. ReactDOM.unstable_renderSubtreeIntoContainer(this, (React.createElement(Fabric_1.Fabric, { className: classNames.content }, this.props.children)), this._layerElement, function () { if (!_this._hasMounted) { _this._hasMounted = true; // TODO: @deprecated cleanup required. if (_this.props.onLayerMounted) { _this.props.onLayerMounted(); } _this.props.onLayerDidMount(); } }); } }; LayerBase.prototype.render = function () { return (React.createElement("span", { className: 'ms-Layer', ref: this._rootElement })); }; LayerBase.prototype._removeLayerElement = function () { if (this._layerElement) { this.props.onLayerWillUnmount(); ReactDOM.unmountComponentAtNode(this._layerElement); var parentNode = this._layerElement.parentNode; if (parentNode) { parentNode.removeChild(this._layerElement); } this._layerElement = undefined; this._hasMounted = false; } }; LayerBase.prototype._getHost = function () { var hostId = this.props.hostId; var doc = Utilities_1.getDocument(this._rootElement.current); if (!doc) { return undefined; } if (hostId) { return doc.getElementById(hostId); } else { return _defaultHostSelector ? doc.querySelector(_defaultHostSelector) : doc.body; } }; LayerBase.defaultProps = { onLayerDidMount: function () { return undefined; }, onLayerWillUnmount: function () { return undefined; } }; LayerBase = tslib_1.__decorate([ Utilities_1.customizable('Layer', ['theme', 'hostId']) ], LayerBase); return LayerBase; }(Utilities_1.BaseComponent)); exports.LayerBase = LayerBase; //# sourceMappingURL=Layer.base.js.map /***/ }), /***/ "+3CY": /*!************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/moment/locale/en-nz.js ***! \************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration //! locale : English (New Zealand) [en-nz] //! author : Luke McGregor : https://github.com/lukemcgregor ;(function (global, factory) { true ? factory(__webpack_require__(/*! ../moment */ "AdnS")) : undefined }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var enNz = moment.defineLocale('en-nz', { months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( '_' ), monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( '_' ), weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat: { LT: 'h:mm A', LTS: 'h:mm:ss A', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY h:mm A', LLLL: 'dddd, D MMMM YYYY h:mm A', }, calendar: { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L', }, relativeTime: { future: 'in %s', past: '%s ago', s: 'a few seconds', ss: '%d seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years', }, dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal: function (number) { var b = number % 10, output = ~~((number % 100) / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; return number + output; }, week: { dow: 1, // Monday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, }); return enNz; }))); /***/ }), /***/ "+9TD": /*!************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/moment/locale/en-ca.js ***! \************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration //! locale : English (Canada) [en-ca] //! author : Jonathan Abourbih : https://github.com/jonbca ;(function (global, factory) { true ? factory(__webpack_require__(/*! ../moment */ "AdnS")) : undefined }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var enCa = moment.defineLocale('en-ca', { months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( '_' ), monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( '_' ), weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), longDateFormat: { LT: 'h:mm A', LTS: 'h:mm:ss A', L: 'YYYY-MM-DD', LL: 'MMMM D, YYYY', LLL: 'MMMM D, YYYY h:mm A', LLLL: 'dddd, MMMM D, YYYY h:mm A', }, calendar: { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L', }, relativeTime: { future: 'in %s', past: '%s ago', s: 'a few seconds', ss: '%d seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years', }, dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, ordinal: function (number) { var b = number % 10, output = ~~((number % 100) / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; return number + output; }, }); return enCa; }))); /***/ }), /***/ "+ANm": /*!*******************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-property-controls/node_modules/@uifabric/styling/lib/utilities/buildClassMap.js ***! \*******************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var MergeStyles_1 = __webpack_require__(/*! ../MergeStyles */ "eaRs"); /** * Builds a class names object from a given map. * * @param styles - Map of unprocessed styles. * @returns Map of property name to class name. */ function buildClassMap(styles) { var classes = {}; var _loop_1 = function (styleName) { if (styles.hasOwnProperty(styleName)) { var className_1; Object.defineProperty(classes, styleName, { get: function () { if (className_1 === undefined) { // tslint:disable-next-line:no-any className_1 = MergeStyles_1.mergeStyles(styles[styleName]).toString(); } return className_1; }, enumerable: true, configurable: true }); } }; for (var styleName in styles) { _loop_1(styleName); } return classes; } exports.buildClassMap = buildClassMap; //# sourceMappingURL=buildClassMap.js.map /***/ }), /***/ "+G6Q": /*!******************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/sp/site-groups/index.js ***! \******************************************************************************************************************************/ /*! exports provided: SiteGroup, SiteGroups */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _web__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./web */ "T4E/"); /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types */ "eopt"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SiteGroup", function() { return _types__WEBPACK_IMPORTED_MODULE_1__["SiteGroup"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SiteGroups", function() { return _types__WEBPACK_IMPORTED_MODULE_1__["SiteGroups"]; }); //# sourceMappingURL=index.js.map /***/ }), /***/ "+Or4": /*!***********************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/sp/operations.js ***! \***********************************************************************************************************************/ /*! exports provided: registerCustomRequestClientFactory, spGet, spPost, spDelete, spPatch, spPostDelete, spPostDeleteETag */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerCustomRequestClientFactory", function() { return registerCustomRequestClientFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spGet", function() { return spGet; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spPost", function() { return spPost; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spDelete", function() { return spDelete; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spPatch", function() { return spPatch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spPostDelete", function() { return spPostDelete; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spPostDeleteETag", function() { return spPostDeleteETag; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "RBFL"); /* harmony import */ var _pnp_odata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @pnp/odata */ "b60l"); /* harmony import */ var _sphttpclient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sphttpclient */ "0hlV"); /* harmony import */ var _pnp_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @pnp/common */ "12fc"); /* harmony import */ var _utils_toabsoluteurl__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/toabsoluteurl */ "mR4J"); function registerCustomRequestClientFactory(requestClientFactory) { factory = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_3__["isFunc"])(requestClientFactory) ? requestClientFactory : function () { return new _sphttpclient__WEBPACK_IMPORTED_MODULE_2__["SPHttpClient"](); }; } var factory = function () { return new _sphttpclient__WEBPACK_IMPORTED_MODULE_2__["SPHttpClient"](); }; var send = function (method) { var operation = Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["defaultPipelineBinder"])(factory)(method); return function (o, options) { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var data, batchDependency, url; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: data = Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["cloneQueryableData"])(o.data); batchDependency = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_3__["objectDefinedNotNull"])(data.batch) ? data.batch.addDependency() : function () { return; }; return [4 /*yield*/, Object(_utils_toabsoluteurl__WEBPACK_IMPORTED_MODULE_4__["toAbsoluteUrl"])(o.toUrlAndQuery())]; case 1: url = _a.sent(); Object(_pnp_common__WEBPACK_IMPORTED_MODULE_3__["mergeOptions"])(data.options, options); return [2 /*return*/, operation(Object.assign({}, data, { batchDependency: batchDependency, url: url, }))]; } }); }); }; }; var spGet = function (o, options) { // Fix for #304 - when we clone objects we in some cases then execute a get request // in these cases the caching settings were getting dropped from the request // this tracks if the object from which this was cloned was caching and applies that to an immediate get request // does not affect objects cloned from this as we are using different fields to track the settings so it won't // be triggered if (o.data.cloneParentWasCaching) { o.usingCaching(o.data.cloneParentCacheOptions); } // if we are forcing caching set that in the data here if (o._forceCaching) { o.data.useCaching = true; } return send("GET")(o, options); }; var spPost = function (o, options) { return send("POST")(o, options); }; var spDelete = function (o, options) { return send("DELETE")(o, options); }; var spPatch = function (o, options) { return send("PATCH")(o, options); }; var spPostDelete = function (o, options) { var opts = Object.assign(Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["headers"])({ "X-HTTP-Method": "DELETE" }), options); return spPost(o, opts); }; var spPostDeleteETag = function (o, options, eTag) { if (eTag === void 0) { eTag = "*"; } var opts = Object.assign(Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["headers"])({ "X-HTTP-Method": "DELETE", "IF-Match": eTag }), options); return spPost(o, opts); }; //# sourceMappingURL=operations.js.map /***/ }), /***/ "+SoF": /*!*************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/odata/queryable.js ***! \*************************************************************************************************************************/ /*! exports provided: cloneQueryableData, Queryable */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneQueryableData", function() { return cloneQueryableData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Queryable", function() { return Queryable; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "cs61"); /* harmony import */ var _pnp_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @pnp/common */ "12fc"); /* harmony import */ var _parsers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parsers */ "gAlj"); function cloneQueryableData(source) { var body; // this handles bodies that cannot be JSON encoded (Blob, etc) // Note however, even bodies that can be serialized will not be cloned. if (source.options && source.options.body) { body = source.options.body; source.options.body = "-"; } var s = JSON.stringify(source, function (key, value) { switch (key) { case "query": return JSON.stringify(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(value)); case "batch": return "-"; case "batchDependency": return "-"; case "cachingOptions": return "-"; case "clientFactory": return "-"; case "parser": return "-"; default: return value; } }, 0); var parsed = JSON.parse(s, function (key, value) { switch (key) { case "query": return new Map(JSON.parse(value)); case "batch": return source.batch; case "batchDependency": return source.batchDependency; case "cachingOptions": return source.cachingOptions; case "clientFactory": return source.clientFactory; case "parser": return source.parser; default: return value; } }); if (body) { parsed.options.body = body; source.options.body = body; } return parsed; } var Queryable = /** @class */ (function () { function Queryable(dataSeed) { if (dataSeed === void 0) { dataSeed = {}; } this._data = Object.assign({}, { cloneParentWasCaching: false, options: {}, parentUrl: "", parser: new _parsers__WEBPACK_IMPORTED_MODULE_2__["ODataParser"](), query: new Map(), url: "", useCaching: false, }, cloneQueryableData(dataSeed)); } Object.defineProperty(Queryable.prototype, "data", { get: function () { return this._data; }, set: function (value) { this._data = Object.assign({}, this.data, cloneQueryableData(value)); }, enumerable: false, configurable: true }); /** * Gets the current url * */ Queryable.prototype.toUrl = function () { return this.data.url; }; /** * Directly concatenates the supplied string to the current url, not normalizing "/" chars * * @param pathPart The string to concatenate to the url */ Queryable.prototype.concat = function (pathPart) { this.data.url += pathPart; return this; }; Object.defineProperty(Queryable.prototype, "query", { /** * Provides access to the query builder for this url * */ get: function () { return this.data.query; }, enumerable: false, configurable: true }); /** * Sets custom options for current object and all derived objects accessible via chaining * * @param options custom options */ Queryable.prototype.configure = function (options) { Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__["mergeOptions"])(this.data.options, options); return this; }; /** * Configures this instance from the configure options of the supplied instance * * @param o Instance from which options should be taken */ Queryable.prototype.configureFrom = function (o) { Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__["mergeOptions"])(this.data.options, o.data.options); return this; }; /** * Enables caching for this request * * @param options Defines the options used when caching this request */ Queryable.prototype.usingCaching = function (options) { if (!_pnp_common__WEBPACK_IMPORTED_MODULE_1__["RuntimeConfig"].globalCacheDisable) { this.data.useCaching = true; if (options !== undefined) { this.data.cachingOptions = options; } } return this; }; Queryable.prototype.usingParser = function (parser) { this.data.parser = parser; return this; }; /** * Allows you to set a request specific processing pipeline * * @param pipeline The set of methods, in order, to execute a given request */ Queryable.prototype.withPipeline = function (pipeline) { this.data.pipes = pipeline.slice(0); return this; }; /** * Appends the given string and normalizes "/" chars * * @param pathPart The string to append */ Queryable.prototype.append = function (pathPart) { this.data.url = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__["combine"])(this.data.url, pathPart); }; /** * Adds this query to the supplied batch * * @example * ``` * * let b = pnp.sp.createBatch(); * pnp.sp.web.inBatch(b).get().then(...); * b.execute().then(...) * ``` */ Queryable.prototype.inBatch = function (batch) { if (this.hasBatch) { throw Error("This query is already part of a batch."); } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__["objectDefinedNotNull"])(batch)) { batch.track(this); } return this; }; /** * Blocks a batch call from occuring, MUST be cleared by calling the returned function */ Queryable.prototype.addBatchDependency = function () { if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__["objectDefinedNotNull"])(this.data.batch)) { return this.data.batch.addDependency(); } return function () { return null; }; }; Object.defineProperty(Queryable.prototype, "hasBatch", { /** * Indicates if the current query has a batch associated * */ get: function () { return Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__["objectDefinedNotNull"])(this.data.batch); }, enumerable: false, configurable: true }); Object.defineProperty(Queryable.prototype, "batch", { /** * The batch currently associated with this query or null * */ get: function () { return this.hasBatch ? this.data.batch : null; }, enumerable: false, configurable: true }); Object.defineProperty(Queryable.prototype, "parentUrl", { /** * Gets the parent url used when creating this instance * */ get: function () { return this.data.parentUrl; }, enumerable: false, configurable: true }); /** * Clones this instance's data to target * * @param target Instance to which data is written * @param settings [Optional] Settings controlling how clone is applied */ Queryable.prototype.cloneTo = function (target, settings) { if (settings === void 0) { settings = {}; } // default values for settings settings = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__["assign"])({ includeBatch: true, includeQuery: false, }, settings); target.data = Object.assign({}, cloneQueryableData(this.data), { batch: null, cloneParentCacheOptions: null, cloneParentWasCaching: false, }, cloneQueryableData(target.data)); target.configureFrom(this); if (settings.includeBatch) { target.inBatch(this.batch); } if (settings.includeQuery && this.query.size > 0) { this.query.forEach(function (v, k) { return target.query.set(k, v); }); } if (this.data.useCaching) { target.data.cloneParentWasCaching = true; target.data.cloneParentCacheOptions = this.data.cachingOptions; } return target; }; return Queryable; }()); //# sourceMappingURL=queryable.js.map /***/ }), /***/ "+V/r": /*!***********************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/sp/forms/list.js ***! \***********************************************************************************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _pnp_odata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @pnp/odata */ "b60l"); /* harmony import */ var _lists_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lists/types */ "e0rz"); /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./types */ "DVPC"); Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_0__["addProp"])(_lists_types__WEBPACK_IMPORTED_MODULE_1__["_List"], "forms", _types__WEBPACK_IMPORTED_MODULE_2__["Forms"], "forms"); //# sourceMappingURL=list.js.map /***/ }), /***/ "+W/t": /*!*******************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-property-controls/node_modules/@uifabric/utilities/lib/resources.js ***! \*******************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _baseUrl = ''; /** Sets the current base url used for fetching images. */ function getResourceUrl(url) { return _baseUrl + url; } exports.getResourceUrl = getResourceUrl; /** Gets the current base url used for fetching images. */ function setBaseUrl(baseUrl) { _baseUrl = baseUrl; } exports.setBaseUrl = setBaseUrl; //# sourceMappingURL=resources.js.map /***/ }), /***/ "+Y0g": /*!************************************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-controls-react/node_modules/office-ui-fabric-react/lib/components/Callout/CalloutContent.base.js ***! \************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(/*! tslib */ "jONu"); var React = __webpack_require__(/*! react */ "cDcd"); var Utilities_1 = __webpack_require__(/*! ../../Utilities */ "f/6L"); var positioning_1 = __webpack_require__(/*! ../../utilities/positioning */ "hqUP"); var Popup_1 = __webpack_require__(/*! ../../Popup */ "zEPN"); var Utilities_2 = __webpack_require__(/*! ../../Utilities */ "f/6L"); var Styling_1 = __webpack_require__(/*! ../../Styling */ "cjZ2"); var ANIMATIONS = (_a = {}, _a[positioning_1.RectangleEdge.top] = Styling_1.AnimationClassNames.slideUpIn10, _a[positioning_1.RectangleEdge.bottom] = Styling_1.AnimationClassNames.slideDownIn10, _a[positioning_1.RectangleEdge.left] = Styling_1.AnimationClassNames.slideLeftIn10, _a[positioning_1.RectangleEdge.right] = Styling_1.AnimationClassNames.slideRightIn10, _a); var getClassNames = Utilities_2.classNamesFunction(); var BORDER_WIDTH = 1; var BEAK_ORIGIN_POSITION = { top: 0, left: 0 }; // Microsoft Edge will overwrite inline styles if there is an animation pertaining to that style. // To help ensure that edge will respect the offscreen style opacity // filter needs to be added as an additional way to set opacity. var OFF_SCREEN_STYLE = { opacity: 0, filter: 'opacity(0)' }; var CalloutContentBase = /** @class */ (function (_super) { tslib_1.__extends(CalloutContentBase, _super); function CalloutContentBase(props) { var _this = _super.call(this, props) || this; _this._hostElement = Utilities_1.createRef(); _this._calloutElement = Utilities_1.createRef(); _this._hasListeners = false; _this.dismiss = function (ev) { var onDismiss = _this.props.onDismiss; if (onDismiss) { onDismiss(ev); } }; _this._setInitialFocus = function () { if (_this.props.setInitialFocus && !_this._didSetInitialFocus && _this.state.positions && _this._calloutElement.current) { _this._didSetInitialFocus = true; _this._async.requestAnimationFrame(function () { return Utilities_1.focusFirstChild(_this._calloutElement.current); }); } }; _this._onComponentDidMount = function () { _this._addListeners(); if (_this.props.onLayerMounted) { _this.props.onLayerMounted(); } _this._updateAsyncPosition(); _this._setHeightOffsetEveryFrame(); }; _this._warnDeprecations({ 'beakStyle': 'beakWidth' }); _this._didSetInitialFocus = false; _this.state = { positions: undefined, slideDirectionalClassName: undefined, // @TODO it looks like this is not even being used anymore. calloutElementRect: undefined, heightOffset: 0 }; _this._positionAttempts = 0; return _this; } CalloutContentBase.prototype.componentDidUpdate = function () { this._setInitialFocus(); if (!this.props.hidden) { if (!this._hasListeners) { this._addListeners(); } this._updateAsyncPosition(); } else { if (this._hasListeners) { this._removeListeners(); } } }; CalloutContentBase.prototype.componentWillMount = function () { this._setTargetWindowAndElement(this._getTarget()); }; CalloutContentBase.prototype.componentWillUpdate = function (newProps) { // If the target element changed, find the new one. If we are tracking target with class name, always find element because we do not know if fabric has rendered a new element and disposed the old element. var newTarget = this._getTarget(newProps); var oldTarget = this._getTarget(); if (newTarget !== oldTarget || typeof (newTarget) === 'string' || newTarget instanceof String) { this._maxHeight = undefined; this._setTargetWindowAndElement(newTarget); } if (newProps.gapSpace !== this.props.gapSpace || this.props.beakWidth !== newProps.beakWidth) { this._maxHeight = undefined; } if (newProps.finalHeight !== this.props.finalHeight) { this._setHeightOffsetEveryFrame(); } // if the callout becomes hidden, then remove any positions that were placed on it. if (newProps.hidden && newProps.hidden !== this.props.hidden) { this.setState({ positions: undefined }); } }; CalloutContentBase.prototype.componentDidMount = function () { if (!this.props.hidden) { this._onComponentDidMount(); } }; CalloutContentBase.prototype.render = function () { // If there is no target window then we are likely in server side rendering and we should not render anything. if (!this._targetWindow) { return null; } var target = this.props.target; var _a = this.props, getStyles = _a.getStyles, style = _a.style, role = _a.role, ariaLabel = _a.ariaLabel, ariaDescribedBy = _a.ariaDescribedBy, ariaLabelledBy = _a.ariaLabelledBy, className = _a.className, isBeakVisible = _a.isBeakVisible, beakStyle = _a.beakStyle, children = _a.children, beakWidth = _a.beakWidth, calloutWidth = _a.calloutWidth, finalHeight = _a.finalHeight, backgroundColor = _a.backgroundColor, calloutMaxHeight = _a.calloutMaxHeight, onScroll = _a.onScroll; target = this._getTarget(); var positions = this.state.positions; var getContentMaxHeight = this._getMaxHeight() ? this._getMaxHeight() + this.state.heightOffset : undefined; var contentMaxHeight = calloutMaxHeight && getContentMaxHeight && (calloutMaxHeight < getContentMaxHeight) ? calloutMaxHeight : getContentMaxHeight; var overflowYHidden = !!finalHeight; var beakVisible = isBeakVisible && (!!target); this._classNames = getClassNames(getStyles, { theme: this.props.theme, className: className, overflowYHidden: overflowYHidden, calloutWidth: calloutWidth, positions: positions, beakWidth: beakWidth, backgroundColor: backgroundColor, beakStyle: beakStyle }); var overflowStyle = tslib_1.__assign({}, style, { maxHeight: contentMaxHeight }, (overflowYHidden && { overflowY: 'hidden' })); var visibilityStyle = this.props.hidden ? { visibility: 'hidden' } : undefined; // React.CSSProperties does not understand IRawStyle, so the inline animations will need to be cast as any for now. var content = (React.createElement("div", { ref: this._hostElement, className: this._classNames.container, style: visibilityStyle }, React.createElement("div", { className: Utilities_1.css(this._classNames.root, positions && positions.targetEdge && ANIMATIONS[positions.targetEdge]), style: positions ? positions.elementPosition : OFF_SCREEN_STYLE, tabIndex: -1, // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus ref: this._calloutElement }, beakVisible && (React.createElement("div", { className: this._classNames.beak, style: this._getBeakPosition() })), beakVisible && (React.createElement("div", { className: this._classNames.beakCurtain })), !this.props.hidden && React.createElement(Popup_1.Popup, { role: role, ariaLabel: ariaLabel, ariaDescribedBy: ariaDescribedBy, ariaLabelledBy: ariaLabelledBy, className: this._classNames.calloutMain, onDismiss: this.dismiss, onScroll: onScroll, shouldRestoreFocus: true, style: overflowStyle }, children)))); return content; }; CalloutContentBase.prototype._dismissOnScroll = function (ev) { var preventDismissOnScroll = this.props.preventDismissOnScroll; if (this.state.positions && !preventDismissOnScroll) { this._dismissOnLostFocus(ev); } }; CalloutContentBase.prototype._dismissOnLostFocus = function (ev) { var target = ev.target; var clickedOutsideCallout = this._hostElement.current && !Utilities_1.elementContains(this._hostElement.current, target); if ((!this._target && clickedOutsideCallout) || ev.target !== this._targetWindow && clickedOutsideCallout && (this._target.stopPropagation || (!this._target || (target !== this._target && !Utilities_1.elementContains(this._target, target))))) { this.dismiss(ev); } }; CalloutContentBase.prototype._addListeners = function () { var _this = this; // This is added so the callout will dismiss when the window is scrolled // but not when something inside the callout is scrolled. The delay seems // to be required to avoid React firing an async focus event in IE from // the target changing focus quickly prior to rendering the callout. this._async.setTimeout(function () { _this._events.on(_this._targetWindow, 'scroll', _this._dismissOnScroll, true); _this._events.on(_this._targetWindow, 'resize', _this.dismiss, true); _this._events.on(_this._targetWindow.document.body, 'focus', _this._dismissOnLostFocus, true); _this._events.on(_this._targetWindow.document.body, 'click', _this._dismissOnLostFocus, true); _this._hasListeners = true; }, 0); }; CalloutContentBase.prototype._removeListeners = function () { this._events.off(this._targetWindow, 'scroll', this._dismissOnScroll, true); this._events.off(this._targetWindow, 'resize', this.dismiss, true); this._events.off(this._targetWindow.document.body, 'focus', this._dismissOnLostFocus, true); this._events.off(this._targetWindow.document.body, 'click', this._dismissOnLostFocus, true); this._hasListeners = false; }; CalloutContentBase.prototype._updateAsyncPosition = function () { var _this = this; this._async.requestAnimationFrame(function () { return _this._updatePosition(); }); }; CalloutContentBase.prototype._getBeakPosition = function () { var positions = this.state.positions; var beakPostionStyle = tslib_1.__assign({}, (positions && positions.beakPosition ? positions.beakPosition.elementPosition : null)); if (!beakPostionStyle.top && !beakPostionStyle.bottom && !beakPostionStyle.left && !beakPostionStyle.right) { beakPostionStyle.left = BEAK_ORIGIN_POSITION.left; beakPostionStyle.top = BEAK_ORIGIN_POSITION.top; } return beakPostionStyle; }; CalloutContentBase.prototype._updatePosition = function () { var positions = this.state.positions; var hostElement = this._hostElement.current; var calloutElement = this._calloutElement.current; if (hostElement && calloutElement) { var currentProps = void 0; currentProps = Utilities_1.assign(currentProps, this.props); currentProps.bounds = this._getBounds(); currentProps.target = this._target; var newPositions = positioning_1.positionCallout(currentProps, hostElement, calloutElement, positions); // Set the new position only when the positions are not exists or one of the new callout positions are different. // The position should not change if the position is within 2 decimal places. if ((!positions && newPositions) || (positions && newPositions && !this._arePositionsEqual(positions, newPositions) && this._positionAttempts < 5)) { // We should not reposition the callout more than a few times, if it is then the content is likely resizing // and we should stop trying to reposition to prevent a stack overflow. this._positionAttempts++; this.setState({ positions: newPositions }); } else { this._positionAttempts = 0; if (this.props.onPositioned) { this.props.onPositioned(this.state.positions); } } } }; CalloutContentBase.prototype._getBounds = function () { if (!this._bounds) { var currentBounds = this.props.bounds; if (!currentBounds) { currentBounds = { top: 0 + this.props.minPagePadding, left: 0 + this.props.minPagePadding, right: this._targetWindow.innerWidth - this.props.minPagePadding, bottom: this._targetWindow.innerHeight - this.props.minPagePadding, width: this._targetWindow.innerWidth - this.props.minPagePadding * 2, height: this._targetWindow.innerHeight - this.props.minPagePadding * 2 }; } this._bounds = currentBounds; } return this._bounds; }; // Max height should remain as synchronous as possible, which is why it is not done using set state. // It needs to be synchronous since it will impact the ultimate position of the callout. CalloutContentBase.prototype._getMaxHeight = function () { var _this = this; if (!this._maxHeight) { if (this.props.directionalHintFixed && this._target) { var beakWidth = this.props.isBeakVisible ? this.props.beakWidth : 0; var gapSpace = this.props.gapSpace ? this.props.gapSpace : 0; // Since the callout cannot measure it's border size it must be taken into account here. Otherwise it will // overlap with the target. var totalGap_1 = gapSpace + beakWidth + BORDER_WIDTH * 2; this._async.requestAnimationFrame(function () { if (_this._target) { _this._maxHeight = positioning_1.getMaxHeight(_this._target, _this.props.directionalHint, totalGap_1, _this._getBounds(), _this.props.coverTarget); _this.forceUpdate(); } }); } else { this._maxHeight = this._getBounds().height - BORDER_WIDTH * 2; } } return this._maxHeight; }; CalloutContentBase.prototype._arePositionsEqual = function (positions, newPosition) { return this._comparePositions(positions.elementPosition, newPosition.elementPosition) && this._comparePositions(positions.beakPosition.elementPosition, newPosition.beakPosition.elementPosition); }; CalloutContentBase.prototype._comparePositions = function (oldPositions, newPositions) { for (var key in newPositions) { // This needs to be checked here and below because there is a linting error if for in does not immediately have an if statement if (newPositions.hasOwnProperty(key)) { var oldPositionEdge = oldPositions[key]; var newPositionEdge = newPositions[key]; if (oldPositionEdge !== undefined && newPositionEdge !== undefined) { if (oldPositionEdge.toFixed(2) !== newPositionEdge.toFixed(2)) { return false; } } else { return false; } } } return true; }; CalloutContentBase.prototype._setTargetWindowAndElement = function (target) { if (target) { if (typeof target === 'string') { var currentDoc = Utilities_1.getDocument(); this._target = currentDoc ? currentDoc.querySelector(target) : null; this._targetWindow = Utilities_1.getWindow(); } else if (target.stopPropagation) { this._targetWindow = Utilities_1.getWindow(target.toElement); this._target = target; } else if (target.getBoundingClientRect) { var targetElement = target; this._targetWindow = Utilities_1.getWindow(targetElement); this._target = target; // HTMLImgElements can have x and y values. The check for it being a point must go last. } else { this._targetWindow = Utilities_1.getWindow(); this._target = target; } } else { this._targetWindow = Utilities_1.getWindow(); } }; CalloutContentBase.prototype._setHeightOffsetEveryFrame = function () { var _this = this; if (this._calloutElement.current && this.props.finalHeight) { this._setHeightOffsetTimer = this._async.requestAnimationFrame(function () { var calloutMainElem = _this._calloutElement.current && _this._calloutElement.current.lastChild; if (!calloutMainElem) { return; } var cardScrollHeight = calloutMainElem.scrollHeight; var cardCurrHeight = calloutMainElem.offsetHeight; var scrollDiff = cardScrollHeight - cardCurrHeight; _this.setState({ heightOffset: _this.state.heightOffset + scrollDiff }); if (calloutMainElem.offsetHeight < _this.props.finalHeight) { _this._setHeightOffsetEveryFrame(); } else { _this._async.cancelAnimationFrame(_this._setHeightOffsetTimer); } }); } }; CalloutContentBase.prototype._getTarget = function (props) { if (props === void 0) { props = this.props; } var useTargetPoint = props.useTargetPoint, targetPoint = props.targetPoint, target = props.target; return useTargetPoint ? targetPoint : target; }; CalloutContentBase.defaultProps = { preventDismissOnScroll: false, isBeakVisible: true, beakWidth: 16, gapSpace: 0, minPagePadding: 8, directionalHint: 7 /* bottomAutoEdge */ }; CalloutContentBase = tslib_1.__decorate([ Utilities_1.customizable('CalloutContent', ['theme']) ], CalloutContentBase); return CalloutContentBase; }(Utilities_1.BaseComponent)); exports.CalloutContentBase = CalloutContentBase; var _a; //# sourceMappingURL=CalloutContent.base.js.map /***/ }), /***/ "+cut": /*!**************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-controls-react/node_modules/@uifabric/utilities/lib/Context.js ***! \**************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(/*! tslib */ "jONu"); var React = __webpack_require__(/*! react */ "cDcd"); function provideContext(contextTypes, mapPropsToContext) { var Provider = /** @class */ (function (_super) { tslib_1.__extends(Provider, _super); function Provider() { return _super !== null && _super.apply(this, arguments) || this; } Provider.prototype.getChildContext = function () { return mapPropsToContext(this.props); }; Provider.prototype.render = function () { return React.Children.only(this.props.children); }; Provider.childContextTypes = contextTypes; return Provider; }(React.Component)); return Provider; } exports.provideContext = provideContext; //# sourceMappingURL=Context.js.map /***/ }), /***/ "+kAZ": /*!***********************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/sp/clientside-pages/types.js ***! \***********************************************************************************************************************************/ /*! exports provided: PromotedState, _ClientsidePage, ClientsidePageFromFile, CreateClientsidePage, CanvasSection, CanvasColumn, ColumnControl, ClientsideText, ClientsideWebpart */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PromotedState", function() { return PromotedState; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_ClientsidePage", function() { return _ClientsidePage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientsidePageFromFile", function() { return ClientsidePageFromFile; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateClientsidePage", function() { return CreateClientsidePage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CanvasSection", function() { return CanvasSection; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CanvasColumn", function() { return CanvasColumn; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnControl", function() { return ColumnControl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientsideText", function() { return ClientsideText; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientsideWebpart", function() { return ClientsideWebpart; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "RBFL"); /* harmony import */ var _pnp_odata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @pnp/odata */ "b60l"); /* harmony import */ var _pnp_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @pnp/common */ "12fc"); /* harmony import */ var _items_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../items/types */ "y6uR"); /* harmony import */ var _sharepointqueryable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../sharepointqueryable */ "iBxB"); /* harmony import */ var _utils_metadata__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/metadata */ "aU3A"); /* harmony import */ var _lists_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lists/types */ "e0rz"); /* harmony import */ var _odata__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../odata */ "uobq"); /* harmony import */ var _webs_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../webs/types */ "p6JM"); /* harmony import */ var _utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/extractweburl */ "+xxz"); /* harmony import */ var _sites_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../sites/types */ "uTlU"); /* harmony import */ var _operations__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../operations */ "+Or4"); /* harmony import */ var _funcs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./funcs */ "NwbB"); /* harmony import */ var _files_web__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../files/web */ "vhuq"); /* harmony import */ var _comments_item__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../comments/item */ "tqEt"); /* harmony import */ var _telemetry__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../telemetry */ "/FDx"); /** * Page promotion state */ var PromotedState; (function (PromotedState) { /** * Regular client side page */ PromotedState[PromotedState["NotPromoted"] = 0] = "NotPromoted"; /** * Page that will be promoted as news article after publishing */ PromotedState[PromotedState["PromoteOnPublish"] = 1] = "PromoteOnPublish"; /** * Page that is promoted as news article */ PromotedState[PromotedState["Promoted"] = 2] = "Promoted"; })(PromotedState || (PromotedState = {})); function initFrom(o, url) { return ClientsidePage(Object(_utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__["extractWebUrl"])(o.toUrl()), url).configureFrom(o); } /** * Represents the data and methods associated with client side "modern" pages */ var _ClientsidePage = /** @class */ (function (_super) { Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(_ClientsidePage, _super); /** * PLEASE DON'T USE THIS CONSTRUCTOR DIRECTLY, thank you 🐇 */ function _ClientsidePage(baseUrl, path, json, noInit, sections, commentsDisabled) { if (noInit === void 0) { noInit = false; } if (sections === void 0) { sections = []; } if (commentsDisabled === void 0) { commentsDisabled = false; } var _this = _super.call(this, baseUrl, path) || this; _this.json = json; _this.sections = sections; _this.commentsDisabled = commentsDisabled; _this._bannerImageDirty = false; _this._bannerImageThumbnailUrlDirty = false; // ensure we have a good url to build on for the pages api if (typeof baseUrl === "string") { _this.data.parentUrl = ""; _this.data.url = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["combine"])(Object(_utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__["extractWebUrl"])(baseUrl), path); } else { _this.assign(initFrom(baseUrl, null), path); } // set a default page settings slice _this._pageSettings = { controlType: 0, pageSettingsSlice: { isDefaultDescription: true, isDefaultThumbnail: true } }; // set a default layout part _this._layoutPart = _ClientsidePage.getDefaultLayoutPart(); if (typeof json !== "undefined" && !noInit) { _this.fromJSON(json); } return _this; } _ClientsidePage.getDefaultLayoutPart = function () { return { dataVersion: "1.4", description: "Title Region Description", id: "cbe7b0a9-3504-44dd-a3a3-0e5cacd07788", instanceId: "cbe7b0a9-3504-44dd-a3a3-0e5cacd07788", properties: { authorByline: [], authors: [], layoutType: "FullWidthImage", showPublishDate: false, showTopicHeader: false, textAlignment: "Left", title: "", topicHeader: "", }, reservedHeight: 280, serverProcessedContent: { htmlStrings: {}, searchablePlainTexts: {}, imageSources: {}, links: {} }, title: "Title area", }; }; Object.defineProperty(_ClientsidePage.prototype, "pageLayout", { get: function () { return this.json.PageLayoutType; }, set: function (value) { this.json.PageLayoutType = value; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "bannerImageUrl", { get: function () { return this.json.BannerImageUrl; }, set: function (value) { this.setBannerImage(value); }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "thumbnailUrl", { get: function () { return this._pageSettings.pageSettingsSlice.isDefaultThumbnail ? this.json.BannerImageUrl : this.json.BannerThumbnailUrl; }, set: function (value) { this.json.BannerThumbnailUrl = value; this._bannerImageThumbnailUrlDirty = true; this._pageSettings.pageSettingsSlice.isDefaultThumbnail = false; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "topicHeader", { get: function () { return Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["objectDefinedNotNull"])(this.json.TopicHeader) ? this.json.TopicHeader : ""; }, set: function (value) { this.json.TopicHeader = value; this._layoutPart.properties.topicHeader = value; if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["stringIsNullOrEmpty"])(value)) { this.showTopicHeader = false; } }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "title", { get: function () { return this._layoutPart.properties.title; }, set: function (value) { this.json.Title = value; this._layoutPart.properties.title = value; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "reservedHeight", { get: function () { return this._layoutPart.reservedHeight; }, set: function (value) { this._layoutPart.reservedHeight = value; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "description", { get: function () { return this.json.Description; }, set: function (value) { if (!Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["stringIsNullOrEmpty"])(value) && value.length > 255) { throw Error("Modern Page description is limited to 255 chars."); } this.json.Description = value; if (!Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(this._pageSettings, "htmlAttributes")) { this._pageSettings.htmlAttributes = []; } if (this._pageSettings.htmlAttributes.indexOf("modifiedDescription") < 0) { this._pageSettings.htmlAttributes.push("modifiedDescription"); } this._pageSettings.pageSettingsSlice.isDefaultDescription = false; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "layoutType", { get: function () { return this._layoutPart.properties.layoutType; }, set: function (value) { this._layoutPart.properties.layoutType = value; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "headerTextAlignment", { get: function () { return this._layoutPart.properties.textAlignment; }, set: function (value) { this._layoutPart.properties.textAlignment = value; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "showTopicHeader", { get: function () { return this._layoutPart.properties.showTopicHeader; }, set: function (value) { this._layoutPart.properties.showTopicHeader = value; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "showPublishDate", { get: function () { return this._layoutPart.properties.showPublishDate; }, set: function (value) { this._layoutPart.properties.showPublishDate = value; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "hasVerticalSection", { get: function () { return this.sections.findIndex(function (s) { return s.layoutIndex === 2; }) > -1; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "authorByLine", { get: function () { if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["isArray"])(this.json.AuthorByline) && this.json.AuthorByline.length > 0) { return this.json.AuthorByline[0]; } return null; }, enumerable: false, configurable: true }); Object.defineProperty(_ClientsidePage.prototype, "verticalSection", { get: function () { if (this.hasVerticalSection) { return this.addVerticalSection(); } return null; }, enumerable: false, configurable: true }); /** * Add a section to this page */ _ClientsidePage.prototype.addSection = function () { var section = new CanvasSection(this, Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["getNextOrder"])(this.sections), 1); this.sections.push(section); return section; }; /** * Add a section to this page */ _ClientsidePage.prototype.addVerticalSection = function () { // we can only have one vertical section so we find it if it exists var sectionIndex = this.sections.findIndex(function (s) { return s.layoutIndex === 2; }); if (sectionIndex > -1) { return this.sections[sectionIndex]; } var section = new CanvasSection(this, Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["getNextOrder"])(this.sections), 2); this.sections.push(section); return section; }; /** * Loads this instance from the appropriate JSON data * * @param pageData JSON data to load (replaces any existing data) */ _ClientsidePage.prototype.fromJSON = function (pageData) { this.json = pageData; var canvasControls = JSON.parse(pageData.CanvasContent1); var layouts = JSON.parse(pageData.LayoutWebpartsContent); if (layouts && layouts.length > 0) { this._layoutPart = layouts[0]; } this.setControls(canvasControls); return this; }; /** * Loads this page's content from the server */ _ClientsidePage.prototype.load = function () { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var item, pageData; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.getItem("Id", "CommentsDisabled")]; case 1: item = _a.sent(); return [4 /*yield*/, Object(_sharepointqueryable__WEBPACK_IMPORTED_MODULE_4__["SharePointQueryable"])(this, "_api/sitepages/pages(" + item.Id + ")")()]; case 2: pageData = _a.sent(); this.commentsDisabled = item.CommentsDisabled; return [2 /*return*/, this.fromJSON(pageData)]; } }); }); }; /** * Persists the content changes (sections, columns, and controls) [does not work with batching] * * @param publish If true the page is published, if false the changes are persisted to SharePoint but not published [Default: true] */ _ClientsidePage.prototype.save = function (publish) { if (publish === void 0) { publish = true; } return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var origImgUrl, site, web, imgFile, siteId_1, webId_1, imgId_1, listId_1, webUrl_1, batch, f, saveBody, bannerImageUrlValue, updater, r; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: if (this.json.Id === null) { throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create"); } if (!this._bannerImageDirty) return [3 /*break*/, 2]; origImgUrl = this.json.BannerImageUrl; if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["isUrlAbsolute"])(origImgUrl)) { // do our best to make this a server relative url by removing the x.sharepoint.com part origImgUrl = origImgUrl.replace(/^https?:\/\/[a-z0-9\.]*?\.[a-z]{2,3}\//i, "/"); } site = Object(_sites_types__WEBPACK_IMPORTED_MODULE_10__["Site"])(Object(_utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__["extractWebUrl"])(this.toUrl())); web = Object(_webs_types__WEBPACK_IMPORTED_MODULE_8__["Web"])(Object(_utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__["extractWebUrl"])(this.toUrl())); imgFile = web.getFileByServerRelativePath(origImgUrl.replace(/%20/ig, " ")); siteId_1 = ""; webId_1 = ""; imgId_1 = ""; listId_1 = ""; webUrl_1 = ""; batch = web.createBatch(); site.select("Id", "Url").inBatch(batch)().then(function (r1) { return siteId_1 = r1.Id; }); web.select("Id", "Url").inBatch(batch)().then(function (r2) { webId_1 = r2.Id; webUrl_1 = r2.Url; }); imgFile.listItemAllFields.select("UniqueId", "ParentList/Id").expand("ParentList").inBatch(batch)() .then(function (r3) { imgId_1 = r3.UniqueId; listId_1 = r3.ParentList.Id; }); // we know the .then calls above will run before execute resolves, ensuring the vars are set return [4 /*yield*/, batch.execute()]; case 1: // we know the .then calls above will run before execute resolves, ensuring the vars are set _a.sent(); f = Object(_sharepointqueryable__WEBPACK_IMPORTED_MODULE_4__["SharePointQueryable"])(webUrl_1, "_layouts/15/getpreview.ashx"); f.query.set("guidSite", "" + siteId_1); f.query.set("guidWeb", "" + webId_1); f.query.set("guidFile", "" + imgId_1); this.bannerImageUrl = f.toUrlAndQuery(); if (!Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["objectDefinedNotNull"])(this._layoutPart.serverProcessedContent)) { this._layoutPart.serverProcessedContent = {}; } this._layoutPart.serverProcessedContent.imageSources = { imageSource: origImgUrl }; if (!Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["objectDefinedNotNull"])(this._layoutPart.serverProcessedContent.customMetadata)) { this._layoutPart.serverProcessedContent.customMetadata = {}; } this._layoutPart.serverProcessedContent.customMetadata.imageSource = { listId: listId_1, siteId: siteId_1, uniqueId: imgId_1, webId: webId_1, }; this._layoutPart.properties.webId = webId_1; this._layoutPart.properties.siteId = siteId_1; this._layoutPart.properties.listId = listId_1; this._layoutPart.properties.uniqueId = imgId_1; _a.label = 2; case 2: if (!!this.json.IsPageCheckedOutToCurrentUser) return [3 /*break*/, 4]; return [4 /*yield*/, Object(_operations__WEBPACK_IMPORTED_MODULE_11__["spPost"])(initFrom(this, "_api/sitepages/pages(" + this.json.Id + ")/checkoutpage"))]; case 3: _a.sent(); _a.label = 4; case 4: saveBody = Object.assign(Object(_utils_metadata__WEBPACK_IMPORTED_MODULE_5__["metadata"])("SP.Publishing.SitePage"), { AuthorByline: this.json.AuthorByline || [], CanvasContent1: this.getCanvasContent1(), Description: this.description, LayoutWebpartsContent: this.getLayoutWebpartsContent(), Title: this.title, TopicHeader: this.topicHeader, }); if (this._bannerImageDirty || this._bannerImageThumbnailUrlDirty) { bannerImageUrlValue = this._bannerImageThumbnailUrlDirty ? this.thumbnailUrl : this.bannerImageUrl; saveBody = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["assign"])(saveBody, { BannerImageUrl: bannerImageUrlValue, }); } updater = initFrom(this, "_api/sitepages/pages(" + this.json.Id + ")/savepage"); return [4 /*yield*/, Object(_operations__WEBPACK_IMPORTED_MODULE_11__["spPost"])(updater, Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["headers"])({ "if-match": "*" }, Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["body"])(saveBody)))]; case 5: _a.sent(); r = true; if (!publish) return [3 /*break*/, 7]; return [4 /*yield*/, Object(_operations__WEBPACK_IMPORTED_MODULE_11__["spPost"])(initFrom(this, "_api/sitepages/pages(" + this.json.Id + ")/publish"))]; case 6: r = _a.sent(); if (r) { this.json.IsPageCheckedOutToCurrentUser = false; } _a.label = 7; case 7: this._bannerImageDirty = false; this._bannerImageThumbnailUrlDirty = false; return [2 /*return*/, r]; } }); }); }; /** * Discards the checkout of this page */ _ClientsidePage.prototype.discardPageCheckout = function () { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var d; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: if (this.json.Id === null) { throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create"); } return [4 /*yield*/, Object(_operations__WEBPACK_IMPORTED_MODULE_11__["spPost"])(initFrom(this, "_api/sitepages/pages(" + this.json.Id + ")/discardPage"), Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["body"])(Object(_utils_metadata__WEBPACK_IMPORTED_MODULE_5__["metadata"])("SP.Publishing.SitePage")))]; case 1: d = _a.sent(); this.fromJSON(d); return [2 /*return*/]; } }); }); }; /** * Promotes this page as a news item */ _ClientsidePage.prototype.promoteToNews = function () { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { return [2 /*return*/, this.promoteNewsImpl("promoteToNews")]; }); }); }; // API is currently broken on server side // public async demoteFromNews(): Promise { // return this.promoteNewsImpl("demoteFromNews"); // } /** * Finds a control by the specified instance id * * @param id Instance id of the control to find */ _ClientsidePage.prototype.findControlById = function (id) { return this.findControl(function (c) { return c.id === id; }); }; /** * Finds a control within this page's control tree using the supplied predicate * * @param predicate Takes a control and returns true or false, if true that control is returned by findControl */ _ClientsidePage.prototype.findControl = function (predicate) { // check all sections for (var i = 0; i < this.sections.length; i++) { // check all columns for (var j = 0; j < this.sections[i].columns.length; j++) { // check all controls for (var k = 0; k < this.sections[i].columns[j].controls.length; k++) { // check to see if the predicate likes this control if (predicate(this.sections[i].columns[j].controls[k])) { return this.sections[i].columns[j].controls[k]; } } } } // we found nothing so give nothing back return null; }; /** * Creates a copy of this page * * @param web The web where we will create the copy * @param pageName The file name of the new page * @param title The title of the new page * @param publish If true the page will be published */ _ClientsidePage.prototype.copy = function (web, pageName, title, publish, promotedState) { if (publish === void 0) { publish = true; } return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var page, url, makeGuid, guidSite, guidWeb, guidFile, site, id, openWeb, file, props; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, CreateClientsidePage(web, pageName, title, this.pageLayout, promotedState)]; case 1: page = _a.sent(); // we know the method is on the class - but it is protected so not part of the interface page.setControls(this.getControls()); if (!!Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["stringIsNullOrEmpty"])(this.json.BannerImageUrl)) return [3 /*break*/, 5]; url = new URL(this.json.BannerImageUrl); makeGuid = function (s) { return s.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/g, "$1-$2-$3-$4-$5"); }; if (!(url.searchParams.has("guidSite") && url.searchParams.has("guidWeb") && url.searchParams.has("guidFile"))) return [3 /*break*/, 5]; guidSite = makeGuid(url.searchParams.get("guidSite")); guidWeb = makeGuid(url.searchParams.get("guidWeb")); guidFile = makeGuid(url.searchParams.get("guidFile")); site = Object(_sites_types__WEBPACK_IMPORTED_MODULE_10__["Site"])(Object(_utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__["extractWebUrl"])(this.toUrl())); return [4 /*yield*/, site.select("Id")()]; case 2: id = _a.sent(); if (!(id.Id === guidSite)) return [3 /*break*/, 5]; return [4 /*yield*/, site.openWebById(guidWeb)]; case 3: openWeb = _a.sent(); return [4 /*yield*/, openWeb.web.getFileById(guidFile).select("ServerRelativeUrl")()]; case 4: file = _a.sent(); props = {}; if (this._layoutPart.properties) { if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(this._layoutPart.properties, "translateX")) { props.translateX = this._layoutPart.properties.translateX; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(this._layoutPart.properties, "translateY")) { props.translateY = this._layoutPart.properties.translateY; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(this._layoutPart.properties, "imageSourceType")) { props.imageSourceType = this._layoutPart.properties.imageSourceType; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(this._layoutPart.properties, "altText")) { props.altText = this._layoutPart.properties.altText; } } page.setBannerImage(file.ServerRelativeUrl, props); _a.label = 5; case 5: return [4 /*yield*/, page.save(publish)]; case 6: _a.sent(); return [2 /*return*/, page]; } }); }); }; /** * Sets the modern page banner image * * @param url Url of the image to display * @param altText Alt text to describe the image * @param bannerProps Additional properties to control display of the banner */ _ClientsidePage.prototype.setBannerImage = function (url, props) { this.json.BannerImageUrl = url; this._bannerImageDirty = true; /* setting the banner image resets the thumbnail image (matching UI functionality) but if the thumbnail is dirty they are likely trying to set them both to different values, so we allow that here. Also allows the banner image to be updated safely with the calculated one in save() */ if (!this._bannerImageThumbnailUrlDirty) { this.thumbnailUrl = url; this._pageSettings.pageSettingsSlice.isDefaultThumbnail = true; } // this seems to always be true, so default this._layoutPart.properties.imageSourceType = 2; if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["objectDefinedNotNull"])(props)) { if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(props, "translateX")) { this._layoutPart.properties.translateX = props.translateX; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(props, "translateY")) { this._layoutPart.properties.translateY = props.translateY; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(props, "imageSourceType")) { this._layoutPart.properties.imageSourceType = props.imageSourceType; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(props, "altText")) { this._layoutPart.properties.altText = props.altText; } } }; /** * Sets the authors for this page from the supplied list of user integer ids * * @param authorId The integer id of the user to set as the author */ _ClientsidePage.prototype.setAuthorById = function (authorId) { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var userLoginData; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, Object(_sharepointqueryable__WEBPACK_IMPORTED_MODULE_4__["SharePointQueryableCollection"])(Object(_utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__["extractWebUrl"])(this.toUrl()), "/_api/web/siteusers") .configureFrom(this) .filter("Id eq " + authorId) .select("LoginName")()]; case 1: userLoginData = _a.sent(); if (userLoginData.length < 1) { throw Error("Could not find user with id " + authorId + "."); } return [2 /*return*/, this.setAuthorByLoginName(userLoginData[0].LoginName)]; } }); }); }; /** * Sets the authors for this page from the supplied list of user integer ids * * @param authorLoginName The login name of the user (ex: i:0#.f|membership|name@tenant.com) */ _ClientsidePage.prototype.setAuthorByLoginName = function (authorLoginName) { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var userLoginData; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, Object(_sharepointqueryable__WEBPACK_IMPORTED_MODULE_4__["SharePointQueryableCollection"])(Object(_utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__["extractWebUrl"])(this.toUrl()), "/_api/web/siteusers") .configureFrom(this) .filter("LoginName eq '" + encodeURIComponent(authorLoginName) + "'") .select("UserPrincipalName", "Title")()]; case 1: userLoginData = _a.sent(); if (userLoginData.length < 1) { throw Error("Could not find user with login name '" + authorLoginName + "'."); } this.json.AuthorByline = [authorLoginName]; this._layoutPart.properties.authorByline = [authorLoginName]; this._layoutPart.properties.authors = [{ id: authorLoginName, name: userLoginData[0].Title, role: "", upn: userLoginData[0].UserPrincipalName, }]; return [2 /*return*/]; } }); }); }; /** * Gets the list item associated with this clientside page * * @param selects Specific set of fields to include when getting the item */ _ClientsidePage.prototype.getItem = function () { var selects = []; for (var _i = 0; _i < arguments.length; _i++) { selects[_i] = arguments[_i]; } return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var initer, listData, item, itemData; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: initer = initFrom(this, "/_api/lists/EnsureClientRenderedSitePagesLibrary").select("EnableModeration", "EnableMinorVersions", "Id"); return [4 /*yield*/, Object(_operations__WEBPACK_IMPORTED_MODULE_11__["spPost"])(initer)]; case 1: listData = _a.sent(); item = (Object(_lists_types__WEBPACK_IMPORTED_MODULE_6__["List"])(listData["odata.id"])).configureFrom(this).items.getById(this.json.Id); return [4 /*yield*/, item.select.apply(item, selects)()]; case 2: itemData = _a.sent(); return [2 /*return*/, Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["assign"])((Object(_items_types__WEBPACK_IMPORTED_MODULE_3__["Item"])(Object(_odata__WEBPACK_IMPORTED_MODULE_7__["odataUrlFrom"])(itemData))).configureFrom(this), itemData)]; } }); }); }; /** * Extends this queryable from the provided parent * * @param parent Parent queryable from which we will derive a base url * @param path Additional path */ _ClientsidePage.prototype.assign = function (parent, path) { this.data.parentUrl = parent.data.url; this.data.url = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["combine"])(this.data.parentUrl, path || ""); this.configureFrom(parent); }; _ClientsidePage.prototype.getCanvasContent1 = function () { return JSON.stringify(this.getControls()); }; _ClientsidePage.prototype.getLayoutWebpartsContent = function () { if (this._layoutPart) { return JSON.stringify([this._layoutPart]); } else { return JSON.stringify(null); } }; _ClientsidePage.prototype.setControls = function (controls) { // reset the sections this.sections = []; if (controls && controls.length) { for (var i = 0; i < controls.length; i++) { // if no control type is present this is a column which we give type 0 to let us process it var controlType = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(controls[i], "controlType") ? controls[i].controlType : 0; switch (controlType) { case 0: // empty canvas column or page settings if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(controls[i], "pageSettingsSlice")) { this._pageSettings = controls[i]; } else { // we have an empty column this.mergeColumnToTree(new CanvasColumn(controls[i])); } break; case 3: var part = new ClientsideWebpart(controls[i]); this.mergePartToTree(part, part.data.position); break; case 4: var textData = controls[i]; var text = new ClientsideText(textData.innerHTML, textData); this.mergePartToTree(text, text.data.position); break; } } Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["reindex"])(this.sections); } }; _ClientsidePage.prototype.getControls = function () { var _this = this; // reindex things Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["reindex"])(this.sections); // rollup the control changes var canvasData = []; this.sections.forEach(function (section) { section.columns.forEach(function (column) { if (column.controls.length < 1) { // empty column canvasData.push({ displayMode: column.data.displayMode, emphasis: _this.getEmphasisObj(section.emphasis), position: column.data.position, }); } else { column.controls.forEach(function (control) { control.data.emphasis = _this.getEmphasisObj(section.emphasis); canvasData.push(control.data); }); } }); }); canvasData.push(this._pageSettings); return canvasData; }; _ClientsidePage.prototype.getEmphasisObj = function (value) { if (value < 1 || value > 3) { return {}; } return { zoneEmphasis: value }; }; _ClientsidePage.prototype.promoteNewsImpl = function (method) { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { var lastPubData; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: if (this.json.Id === null) { throw Error("The id for this page is null."); } if (!Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["stringIsNullOrEmpty"])(this.json.VersionInfo.LastVersionCreatedBy)) return [3 /*break*/, 2]; lastPubData = new Date(this.json.VersionInfo.LastVersionCreated); if (!(lastPubData.getFullYear() < 2000)) return [3 /*break*/, 2]; return [4 /*yield*/, this.save(true)]; case 1: _a.sent(); _a.label = 2; case 2: return [4 /*yield*/, Object(_operations__WEBPACK_IMPORTED_MODULE_11__["spPost"])(initFrom(this, "_api/sitepages/pages(" + this.json.Id + ")/" + method), Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["body"])(Object(_utils_metadata__WEBPACK_IMPORTED_MODULE_5__["metadata"])("SP.Publishing.SitePage")))]; case 3: return [2 /*return*/, _a.sent()]; } }); }); }; /** * Merges the control into the tree of sections and columns for this page * * @param control The control to merge */ _ClientsidePage.prototype.mergePartToTree = function (control, positionData) { var _a, _b, _c; var column = null; var sectionFactor = 12; var sectionIndex = 0; var zoneIndex = 0; var layoutIndex = 1; // handle case where we don't have position data (shouldn't happen?) if (positionData) { if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(positionData, "zoneIndex")) { zoneIndex = positionData.zoneIndex; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(positionData, "sectionIndex")) { sectionIndex = positionData.sectionIndex; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(positionData, "sectionFactor")) { sectionFactor = positionData.sectionFactor; } if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(positionData, "layoutIndex")) { layoutIndex = positionData.layoutIndex; } } var zoneEmphasis = (_c = (_b = (_a = control.data) === null || _a === void 0 ? void 0 : _a.emphasis) === null || _b === void 0 ? void 0 : _b.zoneEmphasis) !== null && _c !== void 0 ? _c : 0; var section = this.getOrCreateSection(zoneIndex, layoutIndex, zoneEmphasis); var columns = section.columns.filter(function (c) { return c.order === sectionIndex; }); if (columns.length < 1) { column = section.addColumn(sectionFactor, layoutIndex); } else { column = columns[0]; } control.column = column; column.addControl(control); }; /** * Merges the supplied column into the tree * * @param column Column to merge * @param position The position data for the column */ _ClientsidePage.prototype.mergeColumnToTree = function (column) { var _a, _b; var order = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(column.data, "position") && Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(column.data.position, "zoneIndex") ? column.data.position.zoneIndex : 0; var layoutIndex = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(column.data, "position") && Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["hOP"])(column.data.position, "layoutIndex") ? column.data.position.layoutIndex : 1; var section = this.getOrCreateSection(order, layoutIndex, ((_b = (_a = column.data) === null || _a === void 0 ? void 0 : _a.emphasis) === null || _b === void 0 ? void 0 : _b.zoneEmphasis) || 0); column.section = section; section.columns.push(column); }; /** * Handle the logic to get or create a section based on the supplied order and layoutIndex * * @param order Section order * @param layoutIndex Layout Index (1 === normal, 2 === vertical section) * @param emphasis The section emphasis */ _ClientsidePage.prototype.getOrCreateSection = function (order, layoutIndex, emphasis) { var section = null; var sections = this.sections.filter(function (s) { return s.order === order && s.layoutIndex === layoutIndex; }); if (sections.length < 1) { section = layoutIndex === 2 ? this.addVerticalSection() : this.addSection(); section.order = order; section.emphasis = emphasis; } else { section = sections[0]; } return section; }; Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ Object(_telemetry__WEBPACK_IMPORTED_MODULE_15__["tag"])("csp.load") ], _ClientsidePage.prototype, "load", null); Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ Object(_telemetry__WEBPACK_IMPORTED_MODULE_15__["tag"])("csp.save") ], _ClientsidePage.prototype, "save", null); Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ Object(_telemetry__WEBPACK_IMPORTED_MODULE_15__["tag"])("csp.discardPageCheckout") ], _ClientsidePage.prototype, "discardPageCheckout", null); Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ Object(_telemetry__WEBPACK_IMPORTED_MODULE_15__["tag"])("csp.promoteToNews") ], _ClientsidePage.prototype, "promoteToNews", null); Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ Object(_telemetry__WEBPACK_IMPORTED_MODULE_15__["tag"])("csp.copy") ], _ClientsidePage.prototype, "copy", null); Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([ Object(_telemetry__WEBPACK_IMPORTED_MODULE_15__["tag"])("csp.getItem") ], _ClientsidePage.prototype, "getItem", null); return _ClientsidePage; }(_sharepointqueryable__WEBPACK_IMPORTED_MODULE_4__["_SharePointQueryable"])); /** * Invokable factory for IClientSidePage instances */ var ClientsidePage = function (baseUrl, path, json, noInit, sections, commentsDisabled) { if (noInit === void 0) { noInit = false; } if (sections === void 0) { sections = []; } if (commentsDisabled === void 0) { commentsDisabled = false; } return Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["invokableFactory"])(_ClientsidePage)(baseUrl, path, json, noInit, sections, commentsDisabled); }; /** * Loads a client side page from the supplied IFile instance * * @param file Source IFile instance */ var ClientsidePageFromFile = function (file) { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(void 0, void 0, void 0, function () { var item, page; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, file.getItem()]; case 1: item = _a.sent(); page = ClientsidePage(Object(_utils_extractweburl__WEBPACK_IMPORTED_MODULE_9__["extractWebUrl"])(file.toUrl()), "", { Id: item.Id }, true); return [2 /*return*/, page.configureFrom(file).load()]; } }); }); }; /** * Creates a new client side page * * @param web The web or list * @param pageName The name of the page (filename) * @param title The page's title * @param PageLayoutType Layout to use when creating the page */ var CreateClientsidePage = function (web, pageName, title, PageLayoutType, promotedState) { if (PageLayoutType === void 0) { PageLayoutType = "Article"; } if (promotedState === void 0) { promotedState = 0; } return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(void 0, void 0, void 0, function () { var pageInitData, newPage; return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { switch (_a.label) { case 0: // patched because previously we used the full page name with the .aspx at the end // this allows folk's existing code to work after the re-write to the new API pageName = pageName.replace(/\.aspx$/i, ""); return [4 /*yield*/, Object(_operations__WEBPACK_IMPORTED_MODULE_11__["spPost"])(initFrom(web, "_api/sitepages/pages"), Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_1__["body"])(Object.assign(Object(_utils_metadata__WEBPACK_IMPORTED_MODULE_5__["metadata"])("SP.Publishing.SitePage"), { PageLayoutType: PageLayoutType, PromotedState: promotedState, })))]; case 1: pageInitData = _a.sent(); newPage = ClientsidePage(web, "", pageInitData); newPage.title = pageName; return [4 /*yield*/, newPage.save(false)]; case 2: _a.sent(); newPage.title = title; return [2 /*return*/, newPage]; } }); }); }; var CanvasSection = /** @class */ (function () { function CanvasSection(page, order, layoutIndex, columns, _emphasis) { if (columns === void 0) { columns = []; } if (_emphasis === void 0) { _emphasis = 0; } this.page = page; this.columns = columns; this._emphasis = _emphasis; this._memId = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["getGUID"])(); this._order = order; this._layoutIndex = layoutIndex; } Object.defineProperty(CanvasSection.prototype, "order", { get: function () { return this._order; }, set: function (value) { this._order = value; for (var i = 0; i < this.columns.length; i++) { this.columns[i].data.position.zoneIndex = value; } }, enumerable: false, configurable: true }); Object.defineProperty(CanvasSection.prototype, "layoutIndex", { get: function () { return this._layoutIndex; }, set: function (value) { this._layoutIndex = value; for (var i = 0; i < this.columns.length; i++) { this.columns[i].data.position.layoutIndex = value; } }, enumerable: false, configurable: true }); Object.defineProperty(CanvasSection.prototype, "defaultColumn", { /** * Default column (this.columns[0]) for this section */ get: function () { if (this.columns.length < 1) { this.addColumn(12); } return this.columns[0]; }, enumerable: false, configurable: true }); /** * Adds a new column to this section */ CanvasSection.prototype.addColumn = function (factor, layoutIndex) { if (layoutIndex === void 0) { layoutIndex = this.layoutIndex; } var column = new CanvasColumn(); column.section = this; column.data.position.zoneIndex = this.order; column.data.position.layoutIndex = layoutIndex; column.data.position.sectionFactor = factor; column.order = Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["getNextOrder"])(this.columns); this.columns.push(column); return column; }; /** * Adds a control to the default column for this section * * @param control Control to add to the default column */ CanvasSection.prototype.addControl = function (control) { this.defaultColumn.addControl(control); return this; }; Object.defineProperty(CanvasSection.prototype, "emphasis", { get: function () { return this._emphasis; }, set: function (value) { this._emphasis = value; }, enumerable: false, configurable: true }); /** * Removes this section and all contained columns and controls from the collection */ CanvasSection.prototype.remove = function () { var _this = this; this.page.sections = this.page.sections.filter(function (section) { return section._memId !== _this._memId; }); Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["reindex"])(this.page.sections); }; return CanvasSection; }()); var CanvasColumn = /** @class */ (function () { function CanvasColumn(json, controls) { if (json === void 0) { json = JSON.parse(JSON.stringify(CanvasColumn.Default)); } if (controls === void 0) { controls = []; } this.json = json; this.controls = controls; this._section = null; this._memId = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["getGUID"])(); } Object.defineProperty(CanvasColumn.prototype, "data", { get: function () { return this.json; }, enumerable: false, configurable: true }); Object.defineProperty(CanvasColumn.prototype, "section", { get: function () { return this._section; }, set: function (section) { this._section = section; }, enumerable: false, configurable: true }); Object.defineProperty(CanvasColumn.prototype, "order", { get: function () { return this.data.position.sectionIndex; }, set: function (value) { this.data.position.sectionIndex = value; for (var i = 0; i < this.controls.length; i++) { this.controls[i].data.position.zoneIndex = this.data.position.zoneIndex; this.controls[i].data.position.layoutIndex = this.data.position.layoutIndex; this.controls[i].data.position.sectionIndex = value; } }, enumerable: false, configurable: true }); Object.defineProperty(CanvasColumn.prototype, "factor", { get: function () { return this.data.position.sectionFactor; }, set: function (value) { this.data.position.sectionFactor = value; }, enumerable: false, configurable: true }); CanvasColumn.prototype.addControl = function (control) { control.column = this; this.controls.push(control); return this; }; CanvasColumn.prototype.getControl = function (index) { return this.controls[index]; }; CanvasColumn.prototype.remove = function () { var _this = this; this.section.columns = this.section.columns.filter(function (column) { return column._memId !== _this._memId; }); Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["reindex"])(this.section.columns); }; CanvasColumn.Default = { controlType: 0, displayMode: 2, emphasis: {}, position: { layoutIndex: 1, sectionFactor: 12, sectionIndex: 1, zoneIndex: 1, }, }; return CanvasColumn; }()); var ColumnControl = /** @class */ (function () { function ColumnControl(json) { this.json = json; } Object.defineProperty(ColumnControl.prototype, "id", { get: function () { return this.json.id; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnControl.prototype, "data", { get: function () { return this.json; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnControl.prototype, "column", { get: function () { return this._column; }, set: function (value) { this._column = value; this.onColumnChange(this._column); }, enumerable: false, configurable: true }); ColumnControl.prototype.remove = function () { var _this = this; this.column.controls = this.column.controls.filter(function (control) { return control.id !== _this.id; }); Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["reindex"])(this.column.controls); }; ColumnControl.prototype.setData = function (data) { this.json = data; }; return ColumnControl; }()); var ClientsideText = /** @class */ (function (_super) { Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClientsideText, _super); function ClientsideText(text, json) { if (json === void 0) { json = JSON.parse(JSON.stringify(ClientsideText.Default)); } var _this = this; if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["stringIsNullOrEmpty"])(json.id)) { json.id = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["getGUID"])(); json.anchorComponentId = json.id; } _this = _super.call(this, json) || this; _this.text = text; return _this; } Object.defineProperty(ClientsideText.prototype, "text", { get: function () { return this.data.innerHTML; }, set: function (value) { if (!value.startsWith("

")) { value = "

" + value + "

"; } this.data.innerHTML = value; }, enumerable: false, configurable: true }); Object.defineProperty(ClientsideText.prototype, "order", { get: function () { return this.data.position.controlIndex; }, set: function (value) { this.data.position.controlIndex = value; }, enumerable: false, configurable: true }); ClientsideText.prototype.onColumnChange = function (col) { this.data.position.sectionFactor = col.factor; this.data.position.controlIndex = Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["getNextOrder"])(col.controls); this.data.position.zoneIndex = col.data.position.zoneIndex; this.data.position.sectionIndex = col.order; this.data.position.layoutIndex = col.data.position.layoutIndex; }; ClientsideText.Default = { addedFromPersistedData: false, anchorComponentId: "", controlType: 4, displayMode: 2, editorType: "CKEditor", emphasis: {}, id: "", innerHTML: "", position: { controlIndex: 1, layoutIndex: 1, sectionFactor: 12, sectionIndex: 1, zoneIndex: 1, }, }; return ClientsideText; }(ColumnControl)); var ClientsideWebpart = /** @class */ (function (_super) { Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ClientsideWebpart, _super); function ClientsideWebpart(json) { if (json === void 0) { json = JSON.parse(JSON.stringify(ClientsideWebpart.Default)); } return _super.call(this, json) || this; } ClientsideWebpart.fromComponentDef = function (definition) { var part = new ClientsideWebpart(); part.import(definition); return part; }; Object.defineProperty(ClientsideWebpart.prototype, "title", { get: function () { return this.data.webPartData.title; }, set: function (value) { this.data.webPartData.title = value; }, enumerable: false, configurable: true }); Object.defineProperty(ClientsideWebpart.prototype, "description", { get: function () { return this.data.webPartData.description; }, set: function (value) { this.data.webPartData.description = value; }, enumerable: false, configurable: true }); Object.defineProperty(ClientsideWebpart.prototype, "order", { get: function () { return this.data.position.controlIndex; }, set: function (value) { this.data.position.controlIndex = value; }, enumerable: false, configurable: true }); Object.defineProperty(ClientsideWebpart.prototype, "height", { get: function () { return this.data.reservedHeight; }, set: function (value) { this.data.reservedHeight = value; }, enumerable: false, configurable: true }); Object.defineProperty(ClientsideWebpart.prototype, "width", { get: function () { return this.data.reservedWidth; }, set: function (value) { this.data.reservedWidth = value; }, enumerable: false, configurable: true }); Object.defineProperty(ClientsideWebpart.prototype, "dataVersion", { get: function () { return this.data.webPartData.dataVersion; }, set: function (value) { this.data.webPartData.dataVersion = value; }, enumerable: false, configurable: true }); ClientsideWebpart.prototype.setProperties = function (properties) { this.data.webPartData.properties = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["assign"])(this.data.webPartData.properties, properties); return this; }; ClientsideWebpart.prototype.getProperties = function () { return this.data.webPartData.properties; }; ClientsideWebpart.prototype.onColumnChange = function (col) { this.data.position.sectionFactor = col.factor; this.data.position.controlIndex = Object(_funcs__WEBPACK_IMPORTED_MODULE_12__["getNextOrder"])(col.controls); this.data.position.zoneIndex = col.data.position.zoneIndex; this.data.position.sectionIndex = col.data.position.sectionIndex; this.data.position.layoutIndex = col.data.position.layoutIndex; }; ClientsideWebpart.prototype.import = function (component) { var id = Object(_pnp_common__WEBPACK_IMPORTED_MODULE_2__["getGUID"])(); var componendId = component.Id.replace(/^\{|\}$/g, "").toLowerCase(); var manifest = JSON.parse(component.Manifest); var preconfiguredEntries = manifest.preconfiguredEntries[0]; this.setData(Object.assign({}, this.data, { id: id, webPartData: { dataVersion: "1.0", description: preconfiguredEntries.description.default, id: componendId, instanceId: id, properties: preconfiguredEntries.properties, title: preconfiguredEntries.title.default, }, webPartId: componendId, })); }; ClientsideWebpart.Default = { addedFromPersistedData: false, controlType: 3, displayMode: 2, emphasis: {}, id: null, position: { controlIndex: 1, layoutIndex: 1, sectionFactor: 12, sectionIndex: 1, zoneIndex: 1, }, reservedHeight: 500, reservedWidth: 500, webPartData: null, webPartId: null, }; return ClientsideWebpart; }(ColumnControl)); //# sourceMappingURL=types.js.map /***/ }), /***/ "+p1r": /*!******************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-controls-react/node_modules/@uifabric/styling/lib/styles/hiddenContentStyle.js ***! \******************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hiddenContentStyle = { position: 'absolute', width: 1, height: 1, margin: -1, padding: 0, border: 0, overflow: 'hidden' }; //# sourceMappingURL=hiddenContentStyle.js.map /***/ }), /***/ "+qqh": /*!*********************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/moment/locale/ku.js ***! \*********************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration //! locale : Kurdish [ku] //! author : Shahram Mebashar : https://github.com/ShahramMebashar ;(function (global, factory) { true ? factory(__webpack_require__(/*! ../moment */ "AdnS")) : undefined }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var symbolMap = { 1: '١', 2: '٢', 3: '٣', 4: '٤', 5: '٥', 6: '٦', 7: '٧', 8: '٨', 9: '٩', 0: '٠', }, numberMap = { '١': '1', '٢': '2', '٣': '3', '٤': '4', '٥': '5', '٦': '6', '٧': '7', '٨': '8', '٩': '9', '٠': '0', }, months = [ 'کانونی دووەم', 'شوبات', 'ئازار', 'نیسان', 'ئایار', 'حوزەیران', 'تەمموز', 'ئاب', 'ئەیلوول', 'تشرینی یەكەم', 'تشرینی دووەم', 'كانونی یەکەم', ]; var ku = moment.defineLocale('ku', { months: months, monthsShort: months, weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split( '_' ), weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split( '_' ), weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'), weekdaysParseExact: true, longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY HH:mm', LLLL: 'dddd, D MMMM YYYY HH:mm', }, meridiemParse: /ئێواره‌|به‌یانی/, isPM: function (input) { return /ئێواره‌/.test(input); }, meridiem: function (hour, minute, isLower) { if (hour < 12) { return 'به‌یانی'; } else { return 'ئێواره‌'; } }, calendar: { sameDay: '[ئه‌مرۆ كاتژمێر] LT', nextDay: '[به‌یانی كاتژمێر] LT', nextWeek: 'dddd [كاتژمێر] LT', lastDay: '[دوێنێ كاتژمێر] LT', lastWeek: 'dddd [كاتژمێر] LT', sameElse: 'L', }, relativeTime: { future: 'له‌ %s', past: '%s', s: 'چه‌ند چركه‌یه‌ك', ss: 'چركه‌ %d', m: 'یه‌ك خوله‌ك', mm: '%d خوله‌ك', h: 'یه‌ك كاتژمێر', hh: '%d كاتژمێر', d: 'یه‌ك ڕۆژ', dd: '%d ڕۆژ', M: 'یه‌ك مانگ', MM: '%d مانگ', y: 'یه‌ك ساڵ', yy: '%d ساڵ', }, preparse: function (string) { return string .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { return numberMap[match]; }) .replace(/،/g, ','); }, postformat: function (string) { return string .replace(/\d/g, function (match) { return symbolMap[match]; }) .replace(/,/g, '،'); }, week: { dow: 6, // Saturday is the first day of the week. doy: 12, // The week that contains Jan 12th is the first week of the year. }, }); return ku; }))); /***/ }), /***/ "+u5p": /*!*********************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-controls-react/node_modules/@uifabric/merge-styles/lib/transforms/provideUnits.js ***! \*********************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var NON_PIXEL_NUMBER_PROPS = [ 'column-count', 'font-weight', 'flex-basis', 'flex', 'flex-grow', 'flex-shrink', 'fill-opacity', 'opacity', 'order', 'z-index', 'zoom' ]; function provideUnits(rulePairs, index) { var name = rulePairs[index]; var value = rulePairs[index + 1]; if (typeof value === 'number') { var unit = (NON_PIXEL_NUMBER_PROPS.indexOf(name) === -1) ? 'px' : ''; rulePairs[index + 1] = "" + value + unit; } } exports.provideUnits = provideUnits; //# sourceMappingURL=provideUnits.js.map /***/ }), /***/ "+xxz": /*!********************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/sp/utils/extractweburl.js ***! \********************************************************************************************************************************/ /*! exports provided: extractWebUrl */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractWebUrl", function() { return extractWebUrl; }); /* harmony import */ var _pnp_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @pnp/common */ "12fc"); function extractWebUrl(candidateUrl) { if (Object(_pnp_common__WEBPACK_IMPORTED_MODULE_0__["stringIsNullOrEmpty"])(candidateUrl)) { return ""; } var index = candidateUrl.indexOf("_api/"); if (index < 0) { index = candidateUrl.indexOf("_vti_bin/"); } if (index > -1) { return candidateUrl.substr(0, index); } // if all else fails just give them what they gave us back return candidateUrl; } //# sourceMappingURL=extractweburl.js.map /***/ }), /***/ "+yB5": /*!*******************************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-property-controls/node_modules/@uifabric/styling/lib/styles/PulsingBeaconAnimationStyles.js ***! \*******************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(/*! tslib */ "pL+6"); var index_1 = __webpack_require__(/*! @uifabric/merge-styles/lib/index */ "qK96"); var DEFAULT_DURATION = '14s'; var DEFAULT_DELAY = '2s'; var DEFAULT_ITERATION_COUNT = '1'; function _continuousPulseStepOne(beaconColorOne, innerDimension) { return { borderColor: beaconColorOne, borderWidth: '0px', width: innerDimension, height: innerDimension }; } function _continuousPulseStepTwo(borderWidth) { return { opacity: 1, borderWidth: borderWidth }; } function _continuousPulseStepThree() { return { opacity: 1 }; } function _continuousPulseStepFour(beaconColorTwo, outerDimension) { return { borderWidth: '0', width: outerDimension, height: outerDimension, opacity: 0, borderColor: beaconColorTwo }; } function _continuousPulseStepFive(beaconColorOne, innerDimension) { return tslib_1.__assign({}, _continuousPulseStepOne(beaconColorOne, innerDimension), { opacity: 0 }); } function _continuousPulseAnimationDouble(beaconColorOne, beaconColorTwo, innerDimension, outerDimension, borderWidth) { return index_1.keyframes({ '0%': _continuousPulseStepOne(beaconColorOne, innerDimension), '1.42%': _continuousPulseStepTwo(borderWidth), '3.57%': _continuousPulseStepThree(), '7.14%': _continuousPulseStepFour(beaconColorTwo, outerDimension), '8%': _continuousPulseStepFive(beaconColorOne, innerDimension), '29.99%': _continuousPulseStepFive(beaconColorOne, innerDimension), '30%': _continuousPulseStepOne(beaconColorOne, innerDimension), '31.42%': _continuousPulseStepTwo(borderWidth), '33.57%': _continuousPulseStepThree(), '37.14%': _continuousPulseStepFour(beaconColorTwo, outerDimension), '38%': _continuousPulseStepFive(beaconColorOne, innerDimension), '79.42%': _continuousPulseStepFive(beaconColorOne, innerDimension), '79.43': _continuousPulseStepOne(beaconColorOne, innerDimension), '81.85': _continuousPulseStepTwo(borderWidth), '83.42': _continuousPulseStepThree(), '87%': _continuousPulseStepFour(beaconColorTwo, outerDimension), '100%': {} }); } function _continuousPulseAnimationSingle(beaconColorOne, beaconColorTwo, innerDimension, outerDimension, borderWidth) { return index_1.keyframes({ '0%': _continuousPulseStepOne(beaconColorOne, innerDimension), '14.2%': _continuousPulseStepTwo(borderWidth), '35.7%': _continuousPulseStepThree(), '71.4%': _continuousPulseStepFour(beaconColorTwo, outerDimension), '100%': {} }); } function _createDefaultAnimation(animationName) { return { animationName: animationName, animationIterationCount: DEFAULT_ITERATION_COUNT, animationDuration: DEFAULT_DURATION, animationDelay: DEFAULT_DELAY }; } exports.PulsingBeaconAnimationStyles = { continuousPulseAnimationDouble: _continuousPulseAnimationDouble, continuousPulseAnimationSingle: _continuousPulseAnimationSingle, createDefaultAnimation: _createDefaultAnimation, }; //# sourceMappingURL=PulsingBeaconAnimationStyles.js.map /***/ }), /***/ "/6YK": /*!***********************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-property-controls/node_modules/office-ui-fabric-react/lib/components/Panel/Panel.js ***! \***********************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(/*! tslib */ "pL+6"); var React = __webpack_require__(/*! react */ "cDcd"); var Utilities_1 = __webpack_require__(/*! ../../Utilities */ "95fW"); var index_1 = __webpack_require__(/*! ../FocusTrapZone/index */ "mzJR"); var Panel_types_1 = __webpack_require__(/*! ./Panel.types */ "kPDu"); var Layer_1 = __webpack_require__(/*! ../Layer/Layer */ "f0xO"); var Overlay_1 = __webpack_require__(/*! ../../Overlay */ "EWmA"); var Popup_1 = __webpack_require__(/*! ../../Popup */ "YGxc"); var Button_1 = __webpack_require__(/*! ../../Button */ "iEYH"); var Styling_1 = __webpack_require__(/*! ../../Styling */ "so4G"); var stylesImport = __webpack_require__(/*! ./Panel.scss */ "GLHW"); var styles = stylesImport; var theme = Styling_1.getTheme(); var Panel = /** @class */ (function (_super) { tslib_1.__extends(Panel, _super); function Panel(props) { var _this = _super.call(this, props) || this; _this._panel = Utilities_1.createRef(); _this._content = Utilities_1.createRef(); _this.dismiss = function () { if (_this.state.isOpen) { _this.setState({ isOpen: false, isAnimating: true }, function () { _this._async.setTimeout(_this._onTransitionComplete, 200); }); if (_this.props.onDismiss) { _this.props.onDismiss(); } } }; _this._onRenderNavigation = function (props) { var closeButtonAriaLabel = props.closeButtonAriaLabel, hasCloseButton = props.hasCloseButton; if (hasCloseButton) { return (React.createElement("div", { className: Utilities_1.css('ms-Panel-navigation', styles.navigation) }, React.createElement(Button_1.IconButton, { styles: { root: { height: 'auto', width: '44px', color: theme.palette.neutralSecondary, fontSize: Styling_1.IconFontSizes.large, }, rootHovered: { color: theme.palette.neutralPrimary } }, className: Utilities_1.css('ms-Panel-closeButton ms-PanelAction-close'), onClick: _this._onPanelClick, ariaLabel: closeButtonAriaLabel, "data-is-visible": true, iconProps: { iconName: 'Cancel' } }))); } return null; }; _this._onRenderHeader = function (props, defaultRender, headerTextId) { var headerText = props.headerText, _a = props.headerClassName, headerClassName = _a === void 0 ? '' : _a; if (headerText) { return (React.createElement("div", { className: Utilities_1.css('ms-Panel-header', styles.header) }, React.createElement("p", { className: Utilities_1.css('ms-Panel-headerText', styles.headerText, headerClassName), id: headerTextId, role: 'heading' }, headerText))); } return null; }; _this._onRenderBody = function (props) { var contentClass = Utilities_1.css('ms-Panel-content', styles.content, props.isFooterAtBottom && styles.contentGrow); return (React.createElement("div", { ref: _this._content, className: contentClass, "data-is-scrollable": true }, props.children)); }; _this._onRenderFooter = function (props) { var isFooterSticky = _this.state.isFooterSticky; var _a = _this.props.onRenderFooterContent, onRenderFooterContent = _a === void 0 ? null : _a; if (onRenderFooterContent) { return (React.createElement("div", { className: Utilities_1.css('ms-Panel-footer', styles.footer, isFooterSticky && styles.footerIsSticky) }, React.createElement("div", { className: Utilities_1.css('ms-Panel-footerInner', styles.footerInner) }, onRenderFooterContent()))); } return null; }; _this._onPanelClick = function () { _this.dismiss(); }; _this._onTransitionComplete = function () { _this.setState({ isAnimating: false }); if (!_this.state.isOpen && _this.props.onDismissed) { _this.props.onDismissed(); } }; _this._warnDeprecations({ 'ignoreExternalFocusing': 'focusTrapZoneProps', 'forceFocusInsideTrap': 'focusTrapZoneProps', 'firstFocusableSelector': 'focusTrapZoneProps' }); _this.state = { isFooterSticky: false, isOpen: false, isAnimating: false, id: Utilities_1.getId('Panel') }; return _this; } Panel.prototype.componentDidMount = function () { this._events.on(window, 'resize', this._updateFooterPosition); if (this._shouldListenForOuterClick(this.props)) { this._events.on(document.body, 'click', this._dismissOnOuterClick, true); } if (this.props.isOpen) { this.open(); } }; Panel.prototype.componentDidUpdate = function (previousProps) { var shouldListenOnOuterClick = this._shouldListenForOuterClick(this.props); var previousShouldListenOnOuterClick = this._shouldListenForOuterClick(previousProps); if (shouldListenOnOuterClick && !previousShouldListenOnOuterClick) { this._events.on(document.body, 'click', this._dismissOnOuterClick, true); } else if (!shouldListenOnOuterClick && previousShouldListenOnOuterClick) { this._events.off(document.body, 'click', this._dismissOnOuterClick, true); } }; Panel.prototype.componentWillReceiveProps = function (newProps) { if (newProps.isOpen !== this.state.isOpen) { if (newProps.isOpen) { this.open(); } else { this.dismiss(); } } }; Panel.prototype.render = function () { var _a = this.props, _b = _a.className, className = _b === void 0 ? '' : _b, elementToFocusOnDismiss = _a.elementToFocusOnDismiss, firstFocusableSelector = _a.firstFocusableSelector, focusTrapZoneProps = _a.focusTrapZoneProps, forceFocusInsideTrap = _a.forceFocusInsideTrap, hasCloseButton = _a.hasCloseButton, headerText = _a.headerText, ignoreExternalFocusing = _a.ignoreExternalFocusing, isBlocking = _a.isBlocking, isLightDismiss = _a.isLightDismiss, isHiddenOnDismiss = _a.isHiddenOnDismiss, layerProps = _a.layerProps, type = _a.type, customWidth = _a.customWidth, _c = _a.onLightDismissClick, onLightDismissClick = _c === void 0 ? this._onPanelClick : _c, _d = _a.onRenderNavigation, onRenderNavigation = _d === void 0 ? this._onRenderNavigation : _d, _e = _a.onRenderHeader, onRenderHeader = _e === void 0 ? this._onRenderHeader : _e, _f = _a.onRenderBody, onRenderBody = _f === void 0 ? this._onRenderBody : _f, _g = _a.onRenderFooter, onRenderFooter = _g === void 0 ? this._onRenderFooter : _g; var _h = this.state, isOpen = _h.isOpen, isAnimating = _h.isAnimating, id = _h.id; var isLeft = type === Panel_types_1.PanelType.smallFixedNear ? true : false; var isRTL = Utilities_1.getRTL(); var isOnRightSide = isRTL ? isLeft : !isLeft; var headerTextId = headerText && id + '-headerText'; var customWidthStyles = (type === Panel_types_1.PanelType.custom) ? { width: customWidth } : {}; var nativeProps = Utilities_1.getNativeProps(this.props, Utilities_1.divProperties); if (!isOpen && !isAnimating && !isHiddenOnDismiss) { return null; } var overlay; if (isBlocking && isOpen) { overlay = (React.createElement(Overlay_1.Overlay, { className: Utilities_1.css(styles.overlay, isOpen && isAnimating && Styling_1.AnimationClassNames.fadeIn200, !isOpen && isAnimating && Styling_1.AnimationClassNames.fadeOut200), isDarkThemed: false, onClick: isLightDismiss ? onLightDismissClick : undefined })); } var header = onRenderHeader(this.props, this._onRenderHeader, headerTextId); return (React.createElement(Layer_1.Layer, tslib_1.__assign({}, layerProps), React.createElement(Popup_1.Popup, { role: 'dialog', ariaLabelledBy: header ? headerTextId : undefined, onDismiss: this.dismiss, className: Utilities_1.css(!isOpen && !isAnimating && isHiddenOnDismiss && styles.hiddenPanel) }, React.createElement("div", tslib_1.__assign({}, nativeProps, { ref: this._panel, className: Utilities_1.css('ms-Panel', styles.root, className, // because the RTL animations are not being used, we need to set a class isOpen && ('is-open ' + styles.rootIsOpen), type === Panel_types_1.PanelType.smallFluid && ('ms-Panel--smFluid ' + styles.rootIsSmallFluid), type === Panel_types_1.PanelType.smallFixedNear && ('ms-Panel--smLeft ' + styles.rootIsSmallLeft), type === Panel_types_1.PanelType.smallFixedFar && ('ms-Panel--sm ' + styles.rootIsSmall), type === Panel_types_1.PanelType.medium && ('ms-Panel--md ' + styles.rootIsMedium), (type === Panel_types_1.PanelType.large || type === Panel_types_1.PanelType.largeFixed) && ('ms-Panel--lg ' + styles.rootIsLarge), type === Panel_types_1.PanelType.largeFixed && ('ms-Panel--fixed ' + styles.rootIsFixed), type === Panel_types_1.PanelType.extraLarge && ('ms-Panel--xl ' + styles.rootIsXLarge), type === Panel_types_1.PanelType.custom && ('ms-Panel--custom ' + styles.rootIsCustom), hasCloseButton && ('ms-Panel--hasCloseButton ' + styles.rootHasCloseButton), !isOpen && !isAnimating && isHiddenOnDismiss && styles.hiddenPanel) }), overlay, React.createElement(index_1.FocusTrapZone, tslib_1.__assign({ ignoreExternalFocusing: ignoreExternalFocusing, forceFocusInsideTrap: isHiddenOnDismiss && !isOpen ? false : forceFocusInsideTrap, firstFocusableSelector: firstFocusableSelector, isClickableOutsideFocusTrap: true }, focusTrapZoneProps, { className: Utilities_1.css('ms-Panel-main', styles.main, isOpen && isAnimating && !isOnRightSide && Styling_1.AnimationClassNames.slideRightIn40, isOpen && isAnimating && isOnRightSide && Styling_1.AnimationClassNames.slideLeftIn40, !isOpen && isAnimating && !isOnRightSide && Styling_1.AnimationClassNames.slideLeftOut40, !isOpen && isAnimating && isOnRightSide && Styling_1.AnimationClassNames.slideRightOut40, focusTrapZoneProps ? focusTrapZoneProps.className : undefined), style: customWidthStyles, elementToFocusOnDismiss: elementToFocusOnDismiss }), React.createElement("div", { className: Utilities_1.css('ms-Panel-commands'), "data-is-visible": true }, onRenderNavigation(this.props, this._onRenderNavigation)), React.createElement("div", { className: Utilities_1.css('ms-Panel-contentInner', styles.contentInner) }, header, onRenderBody(this.props, this._onRenderBody), onRenderFooter(this.props, this._onRenderFooter))))))); }; Panel.prototype.open = function () { var _this = this; if (!this.state.isOpen) { this.setState({ isOpen: true, isAnimating: true }, function () { _this._async.setTimeout(_this._onTransitionComplete, 200); }); } }; Panel.prototype._shouldListenForOuterClick = function (props) { return !!props.isBlocking && !!props.isOpen; }; Panel.prototype._updateFooterPosition = function () { var _content = this._content.current; if (_content) { var height = _content.clientHeight; var innerHeight_1 = _content.scrollHeight; this.setState({ isFooterSticky: height < innerHeight_1 ? true : false }); } }; Panel.prototype._dismissOnOuterClick = function (ev) { var panel = this._panel.current; if (this.state.isOpen && panel) { if (!Utilities_1.elementContains(panel, ev.target)) { if (this.props.onOuterClick) { this.props.onOuterClick(); ev.preventDefault(); } else { this.dismiss(); } } } }; Panel.defaultProps = { isHiddenOnDismiss: false, isOpen: false, isBlocking: true, hasCloseButton: true, type: Panel_types_1.PanelType.smallFixedFar, }; return Panel; }(Utilities_1.BaseComponent)); exports.Panel = Panel; //# sourceMappingURL=Panel.js.map /***/ }), /***/ "/Aqh": /*!*********************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/sp/clientside-pages/web.js ***! \*********************************************************************************************************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _webs_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../webs/types */ "p6JM"); /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types */ "+kAZ"); /* harmony import */ var _sharepointqueryable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../sharepointqueryable */ "iBxB"); _webs_types__WEBPACK_IMPORTED_MODULE_0__["_Web"].prototype.getClientsideWebParts = function () { return this.clone(_sharepointqueryable__WEBPACK_IMPORTED_MODULE_2__["SharePointQueryableCollection"], "GetClientSideWebParts")(); }; _webs_types__WEBPACK_IMPORTED_MODULE_0__["_Web"].prototype.addClientsidePage = function (pageName, title, layout, promotedState) { if (title === void 0) { title = pageName.replace(/\.[^/.]+$/, ""); } return Object(_types__WEBPACK_IMPORTED_MODULE_1__["CreateClientsidePage"])(this, pageName, title, layout, promotedState); }; _webs_types__WEBPACK_IMPORTED_MODULE_0__["_Web"].prototype.loadClientsidePage = function (path) { return Object(_types__WEBPACK_IMPORTED_MODULE_1__["ClientsidePageFromFile"])(this.getFileByServerRelativePath(path)); }; //# sourceMappingURL=web.js.map /***/ }), /***/ "/Dpc": /*!**************************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-property-controls/node_modules/office-ui-fabric-react/lib/components/Dropdown/index.js ***! \**************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = __webpack_require__(/*! tslib */ "pL+6"); tslib_1.__exportStar(__webpack_require__(/*! ./Dropdown */ "M9Lh"), exports); tslib_1.__exportStar(__webpack_require__(/*! ./Dropdown.types */ "9igm"), exports); //# sourceMappingURL=index.js.map /***/ }), /***/ "/FDx": /*!**********************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/sp/telemetry.js ***! \**********************************************************************************************************************/ /*! exports provided: tag */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tag", function() { return tag; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "RBFL"); /* harmony import */ var _pnp_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @pnp/common */ "12fc"); /* harmony import */ var _pnp_odata__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @pnp/odata */ "b60l"); /** * Includes this method name in the X-ClientService-ClientTag used to record pnpjs usage * * @param name Method name, displayed in the */ function tag(name) { return function (target, key, descriptor) { if (descriptor === undefined) { descriptor = Object.getOwnPropertyDescriptor(target, key); } var originalMethod = descriptor.value; descriptor.value = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function () { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__generator"])(this, function (_a) { this.configure(Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_2__["headers"])({ "X-PnPjs-Tracking": name })); return [2 /*return*/, originalMethod.apply(this, args)]; }); }); }; return descriptor; }; } tag.getClientTag = function (h, deleteFromCollection) { if (deleteFromCollection === void 0) { deleteFromCollection = true; } if (h.has("X-PnPjs-Tracking")) { var methodName = h.get("X-PnPjs-Tracking"); if (deleteFromCollection) { h.delete("X-PnPjs-Tracking"); } if (!Object(_pnp_common__WEBPACK_IMPORTED_MODULE_1__["stringIsNullOrEmpty"])(methodName)) { return methodName; } } return ""; }; tag.configure = function (o, name) { return o.configure(Object(_pnp_odata__WEBPACK_IMPORTED_MODULE_2__["headers"])({ "X-PnPjs-Tracking": name })); }; tag.isTagged = function (o) { return o.data.options.headers && o.data.options.headers["X-PnPjs-Tracking"]; }; //# sourceMappingURL=telemetry.js.map /***/ }), /***/ "/HJ3": /*!*********************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-property-controls/node_modules/office-ui-fabric-react/lib/components/Icon/Icon.js ***! \*********************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Utilities_1 = __webpack_require__(/*! ../../Utilities */ "95fW"); var Icon_base_1 = __webpack_require__(/*! ./Icon.base */ "K2nB"); var Icon_styles_1 = __webpack_require__(/*! ./Icon.styles */ "yDuq"); /** * Icons are used for rendering an individual's avatar, presence and details. * They are used within the PeoplePicker components. */ exports.Icon = Utilities_1.styled(Icon_base_1.IconBase, Icon_styles_1.getStyles); //# sourceMappingURL=Icon.js.map /***/ }), /***/ "/Hu+": /*!*************************************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-controls-react/node_modules/office-ui-fabric-react/lib/components/Button/BaseButton.classNames.js ***! \*************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Utilities_1 = __webpack_require__(/*! ../../Utilities */ "f/6L"); var Styling_1 = __webpack_require__(/*! ../../Styling */ "cjZ2"); exports.getBaseButtonClassNames = Utilities_1.memoizeFunction(function (styles, className, variantClassName, iconClassName, menuIconClassName, disabled, checked, expanded, isSplit) { var isExpanded = expanded && !isSplit; return Styling_1.mergeStyleSets({ root: [ 'ms-Button', styles.root, className, variantClassName, checked && [ 'is-checked', styles.rootChecked ], isExpanded && [ 'is-expanded', styles.rootExpanded, { selectors: { ':hover .ms-Button-icon': styles.iconExpandedHovered, ':hover .ms-Button-menuIcon': styles.rootExpandedHovered, ':hover': styles.rootExpandedHovered } } ], disabled && [ 'is-disabled', styles.rootDisabled ], !disabled && !isExpanded && !checked && { selectors: { ':hover': styles.rootHovered, ':hover .ms-Button-icon': styles.iconHovered, ':hover .ms-Button-description': styles.descriptionHovered, ':hover .ms-Button-menuIcon': styles.menuIconHovered, ':focus': styles.rootFocused, ':active': styles.rootPressed, ':active .ms-Button-icon': styles.iconPressed, ':active .ms-Button-description': styles.descriptionPressed, ':active .ms-Button-menuIcon': styles.menuIconPressed } }, disabled && checked && [ styles.rootCheckedDisabled ], !disabled && checked && { selectors: { ':hover': styles.rootCheckedHovered, ':active': styles.rootCheckedPressed } } ], flexContainer: [ 'ms-Button-flexContainer', styles.flexContainer ], textContainer: [ 'ms-Button-textContainer', styles.textContainer ], icon: [ 'ms-Button-icon', iconClassName, styles.icon, isExpanded && styles.iconExpanded, checked && styles.iconChecked, disabled && styles.iconDisabled, ], label: [ 'ms-Button-label', styles.label, checked && styles.labelChecked, disabled && styles.labelDisabled, ], menuIcon: [ 'ms-Button-menuIcon', menuIconClassName, styles.menuIcon, checked && styles.menuIconChecked, disabled && styles.menuIconDisabled, !disabled && !isExpanded && !checked && { selectors: { ':hover': styles.menuIconHovered, ':active': styles.menuIconPressed, }, }, isExpanded && [ 'is-expanded', styles.menuIconExpanded, { selectors: { ':hover': styles.menuIconExpandedHovered, }, }, ] ], description: [ 'ms-Button-description', styles.description, checked && styles.descriptionChecked, disabled && styles.descriptionDisabled ], screenReaderText: [ 'ms-Button-screenReaderText', styles.screenReaderText ] }); }); //# sourceMappingURL=BaseButton.classNames.js.map /***/ }), /***/ "/LjX": /*!************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/moment/locale/es-mx.js ***! \************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration //! locale : Spanish (Mexico) [es-mx] //! author : JC Franco : https://github.com/jcfranco ;(function (global, factory) { true ? factory(__webpack_require__(/*! ../moment */ "AdnS")) : undefined }(this, (function (moment) { 'use strict'; //! moment.js locale configuration var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( '_' ), monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), monthsParse = [ /^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i, ], monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; var esMx = moment.defineLocale('es-mx', { months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( '_' ), monthsShort: function (m, format) { if (!m) { return monthsShortDot; } else if (/-MMM-/.test(format)) { return monthsShort[m.month()]; } else { return monthsShortDot[m.month()]; } }, monthsRegex: monthsRegex, monthsShortRegex: monthsRegex, monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, monthsParse: monthsParse, longMonthsParse: monthsParse, shortMonthsParse: monthsParse, weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), weekdaysParseExact: true, longDateFormat: { LT: 'H:mm', LTS: 'H:mm:ss', L: 'DD/MM/YYYY', LL: 'D [de] MMMM [de] YYYY', LLL: 'D [de] MMMM [de] YYYY H:mm', LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', }, calendar: { sameDay: function () { return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, nextDay: function () { return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, nextWeek: function () { return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, lastDay: function () { return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; }, lastWeek: function () { return ( '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT' ); }, sameElse: 'L', }, relativeTime: { future: 'en %s', past: 'hace %s', s: 'unos segundos', ss: '%d segundos', m: 'un minuto', mm: '%d minutos', h: 'una hora', hh: '%d horas', d: 'un día', dd: '%d días', w: 'una semana', ww: '%d semanas', M: 'un mes', MM: '%d meses', y: 'un año', yy: '%d años', }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal: '%dº', week: { dow: 0, // Sunday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, invalidDate: 'Fecha inválida', }); return esMx; }))); /***/ }), /***/ "/VN/": /*!***************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-property-controls/node_modules/@uifabric/utilities/lib/array.js ***! \***************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Helper to find the index of an item within an array, using a callback to * determine the match. * * @public * @param array - Array to search. * @param cb - Callback which returns true on matches. */ function findIndex(array, cb) { var index = -1; for (var i = 0; array && i < array.length; i++) { if (cb(array[i], i)) { index = i; break; } } return index; } exports.findIndex = findIndex; /** * Helper to find the first item within an array that satisfies the callback. * @param array - Array to search * @param cb - Callback which returns true on matches */ function find(array, cb) { var index = findIndex(array, cb); if (index < 0) { return undefined; } return array[index]; } exports.find = find; /** * Creates an array of a given size and helper method to populate. * * @public * @param size - Size of array. * @param getItem - Callback to populate given cell index. */ function createArray(size, getItem) { var array = []; for (var i = 0; i < size; i++) { array.push(getItem(i)); } return array; } exports.createArray = createArray; /** * Convert the given array to a matrix with columnCount number * of columns. * * @public * @param items - The array to convert * @param columnCount - The number of columns for the resulting matrix * @returns {any[][]} - A matrix of items */ function toMatrix(items, columnCount) { return items.reduce(function (rows, currentValue, index) { if (index % columnCount === 0) { rows.push([currentValue]); } else { rows[rows.length - 1].push(currentValue); } return rows; }, []); } exports.toMatrix = toMatrix; /** * Given an array, it returns a new array that does not contain the item at the given index. * @param array - The array to operate on * @param index - The index of the element to remove */ function removeIndex(array, index) { return array.filter(function (_, i) { return index !== i; }); } exports.removeIndex = removeIndex; /** * Given an array, this function returns a new array where the element at a given index has been replaced. * @param array - The array to operate on * @param newElement - The element that will be placed in the new array * @param index - The index of the element that should be replaced */ function replaceElement(array, newElement, index) { var copy = array.slice(); copy[index] = newElement; return copy; } exports.replaceElement = replaceElement; /** * Given an array, this function returns a new array where an element has been inserted at the given index. * @param array - The array to operate on * @param index - The index where an element should be inserted * @param itemToAdd - The element to insert */ function addElementAtIndex(array, index, itemToAdd) { var copy = array.slice(); copy.splice(index, 0, itemToAdd); return copy; } exports.addElementAtIndex = addElementAtIndex; /** * Given an array where each element is of type T or T[], flatten it into an array of T * @param array - The array where each element can optionally also be an array */ function flatten(array) { var result = []; array.forEach(function (item) { return (result = result.concat(item)); }); return result; } exports.flatten = flatten; /** * Returns a boolean indicating if the two given arrays are equal in length and values. * * @param array1 - First array to compare * @param array2 - Second array to compare * @returns {boolean} True if the arrays are the same length and have the same values in the same positions, false otherwise. */ function arraysEqual(array1, array2) { if (array1.length !== array2.length) { return false; } for (var i = 0; i < array1.length; i++) { if (array1[i] !== array2[i]) { return false; } } return true; } exports.arraysEqual = arraysEqual; //# sourceMappingURL=array.js.map /***/ }), /***/ "/Zh+": /*!****************************************************************************************************************************************************************************************************!*\ !*** c:/users/hugoa/onedrive/github/sp-dev-fx-webparts/samples/react-world-clocks/node_modules/@pnp/spfx-controls-react/node_modules/office-ui-fabric-react/lib/components/Button/Button.types.js ***! \****************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var ElementType; (function (ElementType) { /**