dattatable 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/installRequired.d.ts +2 -0
- package/build/common/installRequired.js +11 -0
- package/dist/dattatable.js +171 -171
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/CanvasForm.html +1 -1
- package/docs/classes/Dashboard.html +2 -2
- package/docs/classes/DataTable.html +2 -2
- package/docs/classes/Documents.html +5 -5
- package/docs/classes/FilterSlideout.html +1 -1
- package/docs/classes/Footer.html +1 -1
- package/docs/classes/Header.html +1 -1
- package/docs/classes/InstallationRequired.html +1 -1
- package/docs/classes/ItemForm.html +3 -3
- package/docs/classes/LoadingDialog.html +1 -1
- package/docs/classes/Modal.html +1 -1
- package/docs/classes/Navigation.html +1 -1
- package/docs/enums/ActionButtonTypes.html +1 -1
- package/docs/interfaces/IDashboardProps.html +1 -1
- package/docs/interfaces/IDataTable.html +1 -1
- package/docs/interfaces/IDataTableProps.html +1 -1
- package/docs/interfaces/IDocumentsProps.html +1 -1
- package/docs/interfaces/IFilterItem.html +1 -1
- package/docs/interfaces/IFilterProps.html +1 -1
- package/docs/interfaces/IFooterProps.html +1 -1
- package/docs/interfaces/IHeaderProps.html +1 -1
- package/docs/interfaces/IItemFormCreateProps.html +1 -1
- package/docs/interfaces/IItemFormEditProps.html +1 -1
- package/docs/interfaces/IItemFormViewProps.html +1 -1
- package/docs/interfaces/IShowDialogProps.html +1 -1
- package/docs/modules.html +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +10 -10
package/dist/dattatable.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
17
17
|
|
|
18
18
|
"use strict";
|
|
19
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CanvasForm = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
19
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CanvasForm = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\n/**\r\n * Canvas Form\r\n */\r\nvar CanvasForm = /** @class */ (function () {\r\n // Constructor\r\n function CanvasForm() {\r\n // Render the canvas\r\n CanvasForm.render();\r\n }\r\n Object.defineProperty(CanvasForm, \"BodyElement\", {\r\n get: function () { return this._elBody; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(CanvasForm, \"HeaderElement\", {\r\n get: function () { return this._elHeader; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Clears the canvas form\r\n CanvasForm.clear = function () {\r\n // Clear the header and body\r\n this.setHeader(\"\");\r\n this.setBody(\"\");\r\n };\r\n Object.defineProperty(CanvasForm, \"el\", {\r\n // Element\r\n get: function () { return this._canvas.el; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Hides the canvas\r\n CanvasForm.hide = function () { this._canvas.hide(); };\r\n // Renders the canvas\r\n CanvasForm.render = function () {\r\n var _this = this;\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.id = \"core-canvas\";\r\n // Ensure the body exists\r\n if (document.body) {\r\n // Append the element\r\n document.body.appendChild(el);\r\n }\r\n else {\r\n // Create an event\r\n window.addEventListener(\"load\", function () {\r\n // Append the element\r\n document.body.appendChild(el);\r\n });\r\n }\r\n // Render the canvas\r\n this._canvas = gd_sprest_bs_1.Components.Offcanvas({\r\n el: el,\r\n options: {\r\n autoClose: true,\r\n backdrop: true,\r\n focus: true,\r\n keyboard: true,\r\n scroll: true\r\n },\r\n onRenderBody: function (el) { _this._elBody = el; },\r\n onRenderHeader: function (el) { _this._elHeader = el; }\r\n });\r\n };\r\n // Sets the auto close flag\r\n CanvasForm.setAutoClose = function (value) { this._canvas.setAutoClose(value); };\r\n // Sets the body\r\n CanvasForm.setBody = function (content) {\r\n // Clear the body\r\n while (this._elBody.firstChild) {\r\n this._elBody.removeChild(this._elBody.firstChild);\r\n }\r\n // See if content exists\r\n if (content) {\r\n // See if this is text\r\n if (typeof (content) == \"string\") {\r\n // Set the html\r\n this._elBody.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n this._elBody.appendChild(content);\r\n }\r\n }\r\n };\r\n // Sets the header\r\n CanvasForm.setHeader = function (content) {\r\n // Clear the body\r\n while (this._elHeader.firstChild) {\r\n this._elHeader.removeChild(this._elHeader.firstChild);\r\n }\r\n // See if content exists\r\n if (content) {\r\n // See if this is text\r\n if (typeof (content) == \"string\") {\r\n // Set the html\r\n this._elHeader.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n this._elHeader.appendChild(content);\r\n }\r\n }\r\n };\r\n // Sets the modal type\r\n CanvasForm.setType = function (type) { this._canvas.setType(type); };\r\n // Shows the canvas\r\n CanvasForm.show = function () { this._canvas.show(); };\r\n CanvasForm._canvas = null;\r\n // Modal Body\r\n CanvasForm._elBody = null;\r\n // Modal Header\r\n CanvasForm._elHeader = null;\r\n return CanvasForm;\r\n}());\r\nexports.CanvasForm = CanvasForm;\r\n// Create an instance of the canvas form\r\nnew CanvasForm();\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/canvas.js?");
|
|
20
20
|
|
|
21
21
|
/***/ }),
|
|
22
22
|
|
|
@@ -38,7 +38,7 @@ eval("\r\n/** Common Components */\r\nvar __createBinding = (this && this.__crea
|
|
|
38
38
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
39
39
|
|
|
40
40
|
"use strict";
|
|
41
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.InstallationRequired = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
41
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.InstallationRequired = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\nvar loadingDialog_1 = __webpack_require__(/*! ./loadingDialog */ \"./build/common/loadingDialog.js\");\r\nvar modal_1 = __webpack_require__(/*! ./modal */ \"./build/common/modal.js\");\r\n/**\r\n * Installation Required\r\n * Checks the SharePoint configuration file to see if an install is required.\r\n */\r\nvar InstallationRequired = /** @class */ (function () {\r\n function InstallationRequired() {\r\n }\r\n Object.defineProperty(InstallationRequired, \"ListsExist\", {\r\n get: function () { return this._listsExist; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Checks the lists\r\n InstallationRequired.checkLists = function () {\r\n var _this = this;\r\n // Clear the flag\r\n this._listsExist = true;\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Parse the lists\r\n gd_sprest_bs_1.Helper.Executor(_this._cfg._configuration.ListCfg, function (listCfg) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the list\r\n (0, gd_sprest_bs_1.Web)().Lists(listCfg.ListInformation.Title).query({\r\n Expand: [\"Fields\"]\r\n }).execute(\r\n // Success\r\n function (list) {\r\n // Parse the custom fields\r\n gd_sprest_bs_1.Helper.Executor(listCfg.CustomFields, function (cfg) {\r\n var exists = false;\r\n // Parse the list fields\r\n for (var i = 0; i < list.Fields.results.length; i++) {\r\n // See if the field exists\r\n if (list.Fields.results[i].InternalName == cfg.name) {\r\n // Set the flag\r\n exists = true;\r\n break;\r\n }\r\n }\r\n // See if the field doesn't exist\r\n if (!exists) {\r\n // Field doesn't exist\r\n _this._report.push(\"List '\" + listCfg.ListInformation.Title + \"' is missing a field: \" + cfg.name);\r\n }\r\n }).then(function () {\r\n // Resolve the promise\r\n resolve(null);\r\n });\r\n }, \r\n // Error\r\n function () {\r\n // List doesn't exist\r\n _this._report.push(\"List '\" + listCfg.ListInformation.Title + \"' does not exist\");\r\n // Set the flag\r\n _this._listsExist = false;\r\n // Resolve the promise\r\n resolve(null);\r\n });\r\n });\r\n }).then(function () {\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\r\n };\r\n // Checks the configuration to see if an installation is required\r\n InstallationRequired.requiresInstall = function (cfg) {\r\n var _this = this;\r\n // Save the configuration\r\n this._cfg = cfg;\r\n // Clear the report\r\n this._report = [];\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Check the lists\r\n _this.checkLists().then(function () {\r\n // Resolve the request\r\n resolve(_this._report.length > 0);\r\n });\r\n });\r\n };\r\n InstallationRequired.showDialog = function (props) {\r\n var _this = this;\r\n if (props === void 0) { props = {}; }\r\n // Clear the modal\r\n modal_1.Modal.clear();\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Installation Required\");\r\n // Set the body\r\n modal_1.Modal.setBody(gd_sprest_bs_1.Components.Card({\r\n body: [\r\n {\r\n text: props.errors && props.errors.length > 0 ?\r\n \"An installation is required. The following were missing in your environment:\" :\r\n \"No errors were detected.\"\r\n },\r\n {\r\n onRender: function (el) {\r\n var items = props.errors || [];\r\n // Parse the report\r\n for (var i = 0; i < _this._report.length; i++) {\r\n // Add the item\r\n items.push({ content: _this._report[i] });\r\n }\r\n // Render a list\r\n gd_sprest_bs_1.Components.ListGroup({\r\n el: el,\r\n items: items\r\n });\r\n }\r\n }\r\n ]\r\n }).el);\r\n // Render the install button\r\n var btnInstall = null;\r\n gd_sprest_bs_1.Components.Tooltip({\r\n el: modal_1.Modal.FooterElement,\r\n content: \"Installs the SharePoint Assets\",\r\n btnProps: {\r\n assignTo: function (btn) { btnInstall = btn; },\r\n text: \"Install\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSuccess,\r\n onClick: function () {\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Installing the Solution\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This will close after the assets are installed.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n _this._cfg.install().then(function () {\r\n // Hide the button\r\n btnInstall.hide();\r\n // Show the refresh button\r\n btnRefresh.show();\r\n // Close the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n });\r\n }\r\n }\r\n });\r\n // Render the refresh button\r\n var btnRefresh = null;\r\n gd_sprest_bs_1.Components.Tooltip({\r\n el: modal_1.Modal.FooterElement,\r\n content: \"Refresh the Page\",\r\n btnProps: {\r\n assignTo: function (btn) { btnRefresh = btn; },\r\n className: \"d-none\",\r\n text: \"Refresh\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () {\r\n // Refresh the page\r\n window.location.reload();\r\n }\r\n }\r\n });\r\n // Call the events\r\n props.onHeaderRendered ? props.onHeaderRendered(modal_1.Modal.HeaderElement) : null;\r\n props.onBodyRendered ? props.onBodyRendered(modal_1.Modal.BodyElement) : null;\r\n props.onFooterRendered ? props.onFooterRendered(modal_1.Modal.FooterElement) : null;\r\n // Show the modal\r\n modal_1.Modal.show();\r\n };\r\n InstallationRequired._cfg = null;\r\n InstallationRequired._report = null;\r\n // Lists exists\r\n InstallationRequired._listsExist = null;\r\n return InstallationRequired;\r\n}());\r\nexports.InstallationRequired = InstallationRequired;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/installRequired.js?");
|
|
42
42
|
|
|
43
43
|
/***/ }),
|
|
44
44
|
|
|
@@ -49,7 +49,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
49
49
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
50
50
|
|
|
51
51
|
"use strict";
|
|
52
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LoadingDialog = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
52
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LoadingDialog = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\n/**\r\n * Loading Dialog\r\n */\r\nvar LoadingDialog = /** @class */ (function () {\r\n // Constructor\r\n function LoadingDialog() {\r\n // Render the canvas\r\n LoadingDialog.render();\r\n }\r\n Object.defineProperty(LoadingDialog, \"el\", {\r\n // Element\r\n get: function () { return this._el; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Hides the canvas\r\n LoadingDialog.hide = function () {\r\n // Update the display\r\n this._el.style.display = \"none\";\r\n this._elBackdrop.style.display = \"none\";\r\n };\r\n // Renders the canvas\r\n LoadingDialog.render = function () {\r\n var _this = this;\r\n // Create the backdrop element\r\n this._elBackdrop = document.createElement(\"div\");\r\n this._elBackdrop.id = \"loading-dialog-backdrop\";\r\n this._elBackdrop.style.display = \"none\";\r\n // Create the loading dialog element\r\n this._el = document.createElement(\"div\");\r\n this._el.id = \"loading-dialog\";\r\n this._el.classList.add(\"bs\");\r\n this._el.style.display = \"none\";\r\n this._el.innerHTML = \"<div></div>\";\r\n // Ensure the body exists\r\n if (document.body) {\r\n // Append the elements\r\n document.body.appendChild(this._elBackdrop);\r\n document.body.appendChild(this._el);\r\n }\r\n else {\r\n // Create an event\r\n window.addEventListener(\"load\", function () {\r\n // Append the elements\r\n document.body.appendChild(_this._elBackdrop);\r\n document.body.appendChild(_this._el);\r\n });\r\n }\r\n // Update the main element\r\n var elMain = this._el.firstChild;\r\n elMain.classList.add(\"d-flex\");\r\n elMain.classList.add(\"flex-column\");\r\n elMain.classList.add(\"mw-fit\");\r\n // Append the header\r\n this._elHeader = document.createElement(\"div\");\r\n this._elHeader.classList.add(\"fs-4\");\r\n this._elHeader.classList.add(\"p-2\");\r\n elMain.appendChild(this._elHeader);\r\n // Render a spinner\r\n gd_sprest_bs_1.Components.Spinner({\r\n el: elMain,\r\n type: gd_sprest_bs_1.Components.SpinnerTypes.Primary\r\n });\r\n // Append the body\r\n this._elBody = document.createElement(\"div\");\r\n this._elBody.classList.add(\"fs-6\");\r\n this._elBody.classList.add(\"p-2\");\r\n elMain.appendChild(this._elBody);\r\n };\r\n // Sets the body\r\n LoadingDialog.setBody = function (content) {\r\n // Clear the body\r\n while (this._elBody.firstChild) {\r\n this._elBody.removeChild(this._elBody.firstChild);\r\n }\r\n // See if content exists\r\n if (content) {\r\n // See if this is text\r\n if (typeof (content) == \"string\") {\r\n // Set the html\r\n this._elBody.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n this._elBody.appendChild(content);\r\n }\r\n }\r\n };\r\n // Sets the header\r\n LoadingDialog.setHeader = function (content) {\r\n // Clear the body\r\n while (this._elHeader.firstChild) {\r\n this._elHeader.removeChild(this._elHeader.firstChild);\r\n }\r\n // See if content exists\r\n if (content) {\r\n // See if this is text\r\n if (typeof (content) == \"string\") {\r\n // Set the html\r\n this._elHeader.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n this._elHeader.appendChild(content);\r\n }\r\n }\r\n };\r\n // Shows the canvas\r\n LoadingDialog.show = function () {\r\n // Update the display\r\n this._el.style.display = \"\";\r\n this._elBackdrop.style.display = \"\";\r\n };\r\n LoadingDialog._el = null;\r\n LoadingDialog._elBody = null;\r\n LoadingDialog._elBackdrop = null;\r\n LoadingDialog._elHeader = null;\r\n return LoadingDialog;\r\n}());\r\nexports.LoadingDialog = LoadingDialog;\r\n// Create an instance of the loading dialog\r\nnew LoadingDialog();\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/loadingDialog.js?");
|
|
53
53
|
|
|
54
54
|
/***/ }),
|
|
55
55
|
|
|
@@ -71,7 +71,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
71
71
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
72
72
|
|
|
73
73
|
"use strict";
|
|
74
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Modal = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
74
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Modal = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\n/**\r\n * Modal\r\n */\r\nvar Modal = /** @class */ (function () {\r\n // Constructor\r\n function Modal() {\r\n // Render the canvas\r\n Modal.render();\r\n }\r\n Object.defineProperty(Modal, \"BodyElement\", {\r\n get: function () { return this._elBody; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Modal, \"FooterElement\", {\r\n get: function () { return this._elFooter; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Modal, \"HeaderElement\", {\r\n get: function () { return this._elHeader; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Clears the canvas form\r\n Modal.clear = function () {\r\n // Clear the header, body and footer\r\n this.setHeader(\"\");\r\n this.setBody(\"\");\r\n this.setFooter(\"\");\r\n };\r\n // Hides the modal\r\n Modal.hide = function () { this._modal.hide(); };\r\n // Renders the canvas\r\n Modal.render = function () {\r\n var _this = this;\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.id = \"core-modal\";\r\n // Ensure the body exists\r\n if (document.body) {\r\n // Append the element\r\n document.body.appendChild(el);\r\n }\r\n else {\r\n // Create an event\r\n window.addEventListener(\"load\", function () {\r\n // Append the element\r\n document.body.appendChild(el);\r\n });\r\n }\r\n // Render the canvas\r\n this._modal = gd_sprest_bs_1.Components.Modal({\r\n el: el,\r\n type: gd_sprest_bs_1.Components.ModalTypes.Large,\r\n options: {\r\n autoClose: false,\r\n backdrop: true,\r\n centered: true,\r\n keyboard: true\r\n },\r\n onRenderBody: function (el) { _this._elBody = el; },\r\n onRenderFooter: function (el) { _this._elFooter = el; },\r\n onRenderHeader: function (el) { _this._elHeader = el.querySelector(\".modal-title\"); ; },\r\n onClose: function () {\r\n // Call the close event\r\n _this._onCloseEvent ? _this._onCloseEvent() : null;\r\n }\r\n });\r\n };\r\n // Sets the auto close flag\r\n Modal.setAutoClose = function (value) { this._modal.setAutoClose(value); };\r\n // Sets the backdrop option\r\n Modal.setBackdrop = function (value) { this._modal.setBackdrop(value); };\r\n // Sets the body\r\n Modal.setBody = function (content) {\r\n // Clear the body\r\n while (this._elBody.firstChild) {\r\n this._elBody.removeChild(this._elBody.firstChild);\r\n }\r\n // See if content exists\r\n if (content) {\r\n // See if this is text\r\n if (typeof (content) == \"string\") {\r\n // Set the html\r\n this._elBody.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n this._elBody.appendChild(content);\r\n }\r\n }\r\n };\r\n // Sets the close button visibility\r\n Modal.setCloseButtonVisibility = function (showFl) { this._modal.setCloseButtonVisibility(showFl); };\r\n // Sets the close event\r\n Modal.setCloseEvent = function (event) { this._onCloseEvent = event; };\r\n // Sets the focus option\r\n Modal.setFocus = function (value) { this._modal.setFocus(value); };\r\n // Sets the footer\r\n Modal.setFooter = function (content) {\r\n // Clear the body\r\n while (this._elFooter.firstChild) {\r\n this._elFooter.removeChild(this._elFooter.firstChild);\r\n }\r\n // See if content exists\r\n if (content) {\r\n // See if this is text\r\n if (typeof (content) == \"string\") {\r\n // Set the html\r\n this._elFooter.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n this._elFooter.appendChild(content);\r\n }\r\n }\r\n };\r\n // Sets the header\r\n Modal.setHeader = function (content) {\r\n // Clear the body\r\n while (this._elHeader.firstChild) {\r\n this._elHeader.removeChild(this._elHeader.firstChild);\r\n }\r\n // See if content exists\r\n if (content) {\r\n // See if this is text\r\n if (typeof (content) == \"string\") {\r\n // Set the html\r\n this._elHeader.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n this._elHeader.appendChild(content);\r\n }\r\n }\r\n };\r\n // Sets the center option\r\n Modal.setIsCentered = function (value) { this._modal.setIsCentered(value); };\r\n // Sets the keyboard option\r\n Modal.setKeyboard = function (value) { this._modal.setKeyboard(value); };\r\n // Sets the scrollable option\r\n Modal.setScrollable = function (value) { this._modal.setScrollable(value); };\r\n // Sets the modal type\r\n Modal.setType = function (type) { this._modal.setType(type); };\r\n // Shows the modal\r\n Modal.show = function () { this._modal.show(); };\r\n Modal._modal = null;\r\n Modal._onCloseEvent = null;\r\n // Modal Body\r\n Modal._elBody = null;\r\n // Modal Footer\r\n Modal._elFooter = null;\r\n // Modal Header\r\n Modal._elHeader = null;\r\n return Modal;\r\n}());\r\nexports.Modal = Modal;\r\n// Create an instance of the modal\r\nnew Modal();\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/modal.js?");
|
|
75
75
|
|
|
76
76
|
/***/ }),
|
|
77
77
|
|
|
@@ -82,7 +82,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
82
82
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
83
83
|
|
|
84
84
|
"use strict";
|
|
85
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FilterSlideout = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
85
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FilterSlideout = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\nvar canvas_1 = __webpack_require__(/*! ../common/canvas */ \"./build/common/canvas.js\");\r\n/**\r\n * Filter Slideout\r\n */\r\nvar FilterSlideout = /** @class */ (function () {\r\n function FilterSlideout(props) {\r\n this._cbs = null;\r\n this._el = null;\r\n this._filters = null;\r\n this._items = null;\r\n // Save the properties\r\n this._filters = props.filters || [];\r\n this._onClear = props.onClear;\r\n // Initialize the variables\r\n this._cbs = [];\r\n this._items = [];\r\n // Generate the items\r\n this.generateFilters();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(this._el) : null;\r\n }\r\n // Generates the filters\r\n FilterSlideout.prototype.generateFilters = function () {\r\n var _this = this;\r\n // Create the filters element\r\n this._el = document.createElement(\"div\");\r\n // Render a clear button\r\n gd_sprest_bs_1.Components.Button({\r\n el: this._el,\r\n className: \"mb-3\",\r\n text: \"Clear Filters\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineDanger,\r\n onClick: function () {\r\n // Parse the filters\r\n for (var i = 0; i < _this._cbs.length; i++) {\r\n // Clear the filter\r\n _this._cbs[i].setValue(\"\");\r\n }\r\n // Execute the event\r\n _this._onClear ? _this._onClear() : null;\r\n }\r\n });\r\n // Parse the filters\r\n for (var i = 0; i < this._filters.length; i++) {\r\n var filter = this._filters[i];\r\n // Add the filter\r\n this._items.push(this.generateItem(filter));\r\n }\r\n // Default the first filter to be displayed\r\n this._items.length > 0 ? this._items[0].showFl = true : null;\r\n // Render an accordion\r\n gd_sprest_bs_1.Components.Accordion({\r\n el: this._el,\r\n items: this._items\r\n });\r\n };\r\n // Generates the navigation dropdown items\r\n FilterSlideout.prototype.generateItem = function (filter) {\r\n var _this = this;\r\n // Create the item\r\n var item = {\r\n header: filter.header,\r\n onRender: function (el) {\r\n // Render the checkbox group\r\n _this._cbs.push(gd_sprest_bs_1.Components.CheckboxGroup({\r\n el: el,\r\n items: filter.items,\r\n multi: filter.multi,\r\n type: gd_sprest_bs_1.Components.CheckboxGroupTypes.Switch,\r\n onChange: function (value) {\r\n // See if this is a single item\r\n if (filter.multi) {\r\n var values = [];\r\n // Parse the items\r\n var items = (value || []);\r\n for (var i = 0; i < items.length; i++) {\r\n // Append the value\r\n values.push(items[i].label);\r\n }\r\n // Execute the event\r\n filter.onFilter ? filter.onFilter(values) : null;\r\n }\r\n else {\r\n var item_1 = value;\r\n // Execute the event\r\n filter.onFilter ? filter.onFilter(item_1 ? item_1.label : \"\") : null;\r\n }\r\n }\r\n }));\r\n }\r\n };\r\n // Return the item\r\n return item;\r\n };\r\n // Gets a checkbox group by its name\r\n FilterSlideout.prototype.getFilter = function (key) {\r\n // Parse the items\r\n for (var i = 0; i < this._items.length; i++) {\r\n var item = this._items[i];\r\n // See if this is the target\r\n if (item.header == key) {\r\n // Return the checkbox\r\n return this._cbs[i];\r\n }\r\n }\r\n // Not found\r\n return null;\r\n };\r\n // Sets a checkbox group filter\r\n FilterSlideout.prototype.setFilterValue = function (key, value) {\r\n // Get the filter\r\n var filter = this.getFilter(key);\r\n if (filter) {\r\n // Set the value\r\n filter.setValue(value);\r\n }\r\n };\r\n // Hides the filter\r\n FilterSlideout.prototype.hide = function () { canvas_1.CanvasForm.hide(); };\r\n // Shows the filters\r\n FilterSlideout.prototype.show = function () {\r\n // Set the header and body\r\n canvas_1.CanvasForm.setHeader('<h5 class=\"m-0\">Filters</h5>');\r\n canvas_1.CanvasForm.setBody(this._el || \"<p>Loading the Filters...</p>\");\r\n // Show the filters\r\n canvas_1.CanvasForm.show();\r\n };\r\n return FilterSlideout;\r\n}());\r\nexports.FilterSlideout = FilterSlideout;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/filter.js?");
|
|
86
86
|
|
|
87
87
|
/***/ }),
|
|
88
88
|
|
|
@@ -93,7 +93,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
93
93
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
94
94
|
|
|
95
95
|
"use strict";
|
|
96
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Footer = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
96
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Footer = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\n/**\r\n * Footer\r\n */\r\nvar Footer = /** @class */ (function () {\r\n // Constructor\r\n function Footer(props) {\r\n this._props = null;\r\n // Save the properties\r\n this._props = props;\r\n // Render the footer\r\n this.render();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(this._props.el) : null;\r\n }\r\n // Renders the component\r\n Footer.prototype.render = function () {\r\n // Define the default props\r\n var props = {\r\n el: this._props.el,\r\n items: this._props.items,\r\n itemsEnd: this._props.itemsEnd\r\n };\r\n // Call the rendering event\r\n this._props.onRendering ? this._props.onRendering(props) : null;\r\n // Render a navbar\r\n gd_sprest_bs_1.Components.Navbar(props);\r\n };\r\n return Footer;\r\n}());\r\nexports.Footer = Footer;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/footer.js?");
|
|
97
97
|
|
|
98
98
|
/***/ }),
|
|
99
99
|
|
|
@@ -104,7 +104,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
104
104
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
105
105
|
|
|
106
106
|
"use strict";
|
|
107
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Header = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
107
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Header = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\n/**\r\n * Header\r\n */\r\nvar Header = /** @class */ (function () {\r\n // Constructor\r\n function Header(props) {\r\n this._props = null;\r\n // Save the properties\r\n this._props = props;\r\n // Render the header\r\n this.render();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(this._props.el) : null;\r\n }\r\n // Renders the component\r\n Header.prototype.render = function () {\r\n // Define the default props\r\n var props = {\r\n el: this._props.el,\r\n className: \"header\",\r\n lead: this._props.title\r\n };\r\n // Call the rendering event\r\n this._props.onRendering ? this._props.onRendering(props) : null;\r\n // Render a jumbotron\r\n gd_sprest_bs_1.Components.Jumbotron(props);\r\n };\r\n return Header;\r\n}());\r\nexports.Header = Header;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/header.js?");
|
|
108
108
|
|
|
109
109
|
/***/ }),
|
|
110
110
|
|
|
@@ -115,7 +115,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
115
115
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
116
116
|
|
|
117
117
|
"use strict";
|
|
118
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Dashboard = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/index.js\");\r\nvar itemForm_1 = __webpack_require__(/*! ../itemForm */ \"./build/itemForm.js\");\r\nvar filter_1 = __webpack_require__(/*! ./filter */ \"./build/dashboard/filter.js\");\r\nvar footer_1 = __webpack_require__(/*! ./footer */ \"./build/dashboard/footer.js\");\r\nvar header_1 = __webpack_require__(/*! ./header */ \"./build/dashboard/header.js\");\r\nvar navigation_1 = __webpack_require__(/*! ./navigation */ \"./build/dashboard/navigation.js\");\r\nvar table_1 = __webpack_require__(/*! ./table */ \"./build/dashboard/table.js\");\r\n// Export the components\r\n__exportStar(__webpack_require__(/*! ./filter */ \"./build/dashboard/filter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./footer */ \"./build/dashboard/footer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./header */ \"./build/dashboard/header.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./navigation */ \"./build/dashboard/navigation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./table */ \"./build/dashboard/table.js\"), exports);\r\n/**\r\n * Dashboard\r\n */\r\nvar Dashboard = /** @class */ (function () {\r\n // Constructor\r\n function Dashboard(props) {\r\n this._dt = null;\r\n this._filters = null;\r\n this._props = null;\r\n // Set the properties\r\n this._props = props;\r\n // Set the flag\r\n typeof (props.useModal) === \"boolean\" ? itemForm_1.ItemForm.UseModal = props.useModal : null;\r\n // Render the dashboard\r\n this.render();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(this._props.el) : null;\r\n }\r\n // Renders the component\r\n Dashboard.prototype.render = function () {\r\n var _this = this;\r\n // Create the filters\r\n this._filters = new filter_1.FilterSlideout({\r\n filters: this._props.filters ? this._props.filters.items : [],\r\n onClear: this._props.filters ? this._props.filters.onClear : null,\r\n onRendered: this._props.filters ? this._props.filters.onRendered : null\r\n });\r\n // Render the template\r\n var elTemplate = document.createElement(\"div\");\r\n elTemplate.classList.add(\"dashboard\");\r\n elTemplate.innerHTML = \"\\n <div class=\\\"row\\\">\\n <div id=\\\"navigation\\\" class=\\\"col\\\"></div>\\n </div>\\n <div class=\\\"row\\\">\\n <div id=\\\"header\\\" class=\\\"col mx-75\\\"></div>\\n </div>\\n <div class=\\\"row\\\">\\n <div id=\\\"sub-navigation\\\" class=\\\"col\\\"></div>\\n </div>\\n <div class=\\\"row\\\">\\n <div id=\\\"datatable\\\" class=\\\"col\\\"></div>\\n </div>\\n <div class=\\\"row\\\">\\n <div id=\\\"footer\\\" class=\\\"col\\\"></div>\\n </div>\".trim();\r\n this._props.el.appendChild(elTemplate);\r\n // Set/Default the visibility flags\r\n var headerIsVisible = this._props.hideHeader != null && !this._props.hideHeader;\r\n var navIsVisible = this._props.hideNavigation ? false : true;\r\n var subNavIsVisible = (this._props.hideSubNavigation == null || this._props.hideSubNavigation == true) && this._props.subNavigation == null ? false : true;\r\n // See if we are hiding the navigation\r\n if (!navIsVisible) {\r\n // Hide the element\r\n this._props.el.querySelector(\"#navigation\").classList.add(\"d-none\");\r\n }\r\n else {\r\n // Render the navigation\r\n var navProps_1 = this._props.navigation || {};\r\n new navigation_1.Navigation({\r\n el: this._props.el.querySelector(\"#navigation\"),\r\n hideFilter: navProps_1.showFilter != null ? !navProps_1.showFilter : false,\r\n hideSearch: navProps_1.showSearch != null ? !navProps_1.showSearch : false,\r\n items: navProps_1.items,\r\n itemsEnd: navProps_1.itemsEnd,\r\n title: navProps_1.title,\r\n onFilterRendered: navProps_1.onFilterRendered,\r\n onRendering: function (props) {\r\n // Set the default classname\r\n props.className = props.className || (\"bg-sharepoint rounded\" + (headerIsVisible || subNavIsVisible ? \"-top\" : \"\"));\r\n // Set the default type\r\n props.type = typeof (props.type) === \"number\" ? props.type : gd_sprest_bs_1.Components.NavbarTypes.Dark;\r\n // Call the rendering event if it exists\r\n navProps_1.onRendering ? navProps_1.onRendering(props) : null;\r\n },\r\n onRendered: navProps_1.onRendered,\r\n onSearch: function (value) {\r\n // Search the data table\r\n _this._dt.search(value);\r\n },\r\n onSearchRendered: navProps_1.onSearchRendered,\r\n onShowFilter: function () {\r\n // Show the filter\r\n _this._filters.show();\r\n // Call the event\r\n navProps_1.onShowFilter ? navProps_1.onShowFilter() : null;\r\n },\r\n });\r\n }\r\n // See if we are hiding the header\r\n if (!headerIsVisible) {\r\n // Hide the element\r\n this._props.el.querySelector(\"#header\").classList.add(\"d-none\");\r\n }\r\n else {\r\n var elHeader = this._props.el.querySelector(\"#header\");\r\n // Render the header\r\n var header = this._props.header || {};\r\n new header_1.Header({\r\n el: elHeader,\r\n onRendering: this._props.header ? this._props.header.onRendering : null,\r\n onRendered: this._props.header ? this._props.header.onRendered : null,\r\n title: header.title\r\n });\r\n // See if the sub-nav is not visible\r\n if (!navIsVisible && !subNavIsVisible) {\r\n // Set the class name\r\n elHeader.classList.add(\"rounded\");\r\n }\r\n else if (navIsVisible && !subNavIsVisible) {\r\n // Set the class name\r\n elHeader.classList.add(\"rounded-bottom\");\r\n }\r\n else if (!navIsVisible && subNavIsVisible) {\r\n // Set the class name\r\n elHeader.classList.add(\"rounded-top\");\r\n }\r\n }\r\n // See if we are hiding the sub-navigation\r\n if (!subNavIsVisible) {\r\n // Hide the element\r\n this._props.el.querySelector(\"#sub-navigation\").classList.add(\"d-none\");\r\n }\r\n else {\r\n // Render the navigation\r\n var navProps_2 = this._props.subNavigation || {};\r\n new navigation_1.Navigation({\r\n el: this._props.el.querySelector(\"#sub-navigation\"),\r\n hideFilter: navProps_2.showFilter != null ? !navProps_2.showFilter : true,\r\n hideSearch: navProps_2.showSearch != null ? !navProps_2.showSearch : true,\r\n items: navProps_2.items,\r\n itemsEnd: navProps_2.itemsEnd,\r\n title: navProps_2.title,\r\n onFilterRendered: navProps_2.onFilterRendered,\r\n onRendering: function (props) {\r\n // Set the default classname\r\n props.className = props.className || (\"rounded\" + (!headerIsVisible && !navIsVisible ? \"\" : \"-bottom\"));\r\n props.className = \"sub-nav \" + props.className;\r\n // Set the default type\r\n props.type = typeof (props.type) === \"number\" ? props.type : gd_sprest_bs_1.Components.NavbarTypes.Light;\r\n // Call the rendering event if it exists\r\n navProps_2.onRendering ? navProps_2.onRendering(props) : null;\r\n },\r\n onRendered: navProps_2.onRendered,\r\n onSearch: function (value) {\r\n // Search the data table\r\n _this._dt.search(value);\r\n },\r\n onShowFilter: function () {\r\n // Show the filter\r\n _this._filters.show();\r\n },\r\n });\r\n }\r\n // Render the data table\r\n this._dt = new table_1.DataTable({\r\n columns: this._props.table ? this._props.table.columns : null,\r\n dtProps: this._props.table ? this._props.table.dtProps : null,\r\n el: this._props.el.querySelector(\"#datatable\"),\r\n onRendered: this._props.table ? this._props.table.onRendered : null,\r\n rows: this._props.table ? this._props.table.rows : null\r\n });\r\n // See if we are hiding the footer\r\n if (this._props.hideFooter) {\r\n // Hide the element\r\n this._props.el.querySelector(\"#footer\").classList.add(\"d-none\");\r\n }\r\n else {\r\n // Render the footer\r\n var footer = this._props.footer || {};\r\n new footer_1.Footer({\r\n el: this._props.el.querySelector(\"#footer\"),\r\n items: footer.items,\r\n itemsEnd: footer.itemsEnd,\r\n onRendering: footer.onRendering,\r\n onRendered: footer.onRendered\r\n });\r\n }\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n // Filter the table\r\n Dashboard.prototype.filter = function (idx, value) {\r\n // Filter the table\r\n this._dt.filter(idx, value);\r\n };\r\n // Returns a filter checkbox group by its key\r\n Dashboard.prototype.getFilter = function (key) { return this._filters.getFilter(key); };\r\n // Hides the filter\r\n Dashboard.prototype.hideFilter = function () { this._filters.hide(); };\r\n // Refresh the table\r\n Dashboard.prototype.refresh = function (rows) {\r\n // Refresh the table\r\n this._dt.refresh(rows);\r\n };\r\n // Search the table\r\n Dashboard.prototype.search = function (value) {\r\n // Search the table\r\n this._dt.search(value);\r\n };\r\n // Sets a filter checkbox group value\r\n Dashboard.prototype.setFilterValue = function (key, value) { return this._filters.setFilterValue(key, value); };\r\n // Shows the filter\r\n Dashboard.prototype.showFilter = function () { this._filters.show(); };\r\n return Dashboard;\r\n}());\r\nexports.Dashboard = Dashboard;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/index.js?");
|
|
118
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Dashboard = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\nvar itemForm_1 = __webpack_require__(/*! ../itemForm */ \"./build/itemForm.js\");\r\nvar filter_1 = __webpack_require__(/*! ./filter */ \"./build/dashboard/filter.js\");\r\nvar footer_1 = __webpack_require__(/*! ./footer */ \"./build/dashboard/footer.js\");\r\nvar header_1 = __webpack_require__(/*! ./header */ \"./build/dashboard/header.js\");\r\nvar navigation_1 = __webpack_require__(/*! ./navigation */ \"./build/dashboard/navigation.js\");\r\nvar table_1 = __webpack_require__(/*! ./table */ \"./build/dashboard/table.js\");\r\n// Export the components\r\n__exportStar(__webpack_require__(/*! ./filter */ \"./build/dashboard/filter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./footer */ \"./build/dashboard/footer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./header */ \"./build/dashboard/header.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./navigation */ \"./build/dashboard/navigation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./table */ \"./build/dashboard/table.js\"), exports);\r\n/**\r\n * Dashboard\r\n */\r\nvar Dashboard = /** @class */ (function () {\r\n // Constructor\r\n function Dashboard(props) {\r\n this._dt = null;\r\n this._filters = null;\r\n this._props = null;\r\n // Set the properties\r\n this._props = props;\r\n // Set the flag\r\n typeof (props.useModal) === \"boolean\" ? itemForm_1.ItemForm.UseModal = props.useModal : null;\r\n // Render the dashboard\r\n this.render();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(this._props.el) : null;\r\n }\r\n // Renders the component\r\n Dashboard.prototype.render = function () {\r\n var _this = this;\r\n // Create the filters\r\n this._filters = new filter_1.FilterSlideout({\r\n filters: this._props.filters ? this._props.filters.items : [],\r\n onClear: this._props.filters ? this._props.filters.onClear : null,\r\n onRendered: this._props.filters ? this._props.filters.onRendered : null\r\n });\r\n // Render the template\r\n var elTemplate = document.createElement(\"div\");\r\n elTemplate.classList.add(\"dashboard\");\r\n elTemplate.innerHTML = \"\\n <div class=\\\"row\\\">\\n <div id=\\\"navigation\\\" class=\\\"col\\\"></div>\\n </div>\\n <div class=\\\"row\\\">\\n <div id=\\\"header\\\" class=\\\"col mx-75\\\"></div>\\n </div>\\n <div class=\\\"row\\\">\\n <div id=\\\"sub-navigation\\\" class=\\\"col\\\"></div>\\n </div>\\n <div class=\\\"row\\\">\\n <div id=\\\"datatable\\\" class=\\\"col\\\"></div>\\n </div>\\n <div class=\\\"row\\\">\\n <div id=\\\"footer\\\" class=\\\"col\\\"></div>\\n </div>\".trim();\r\n this._props.el.appendChild(elTemplate);\r\n // Set/Default the visibility flags\r\n var headerIsVisible = this._props.hideHeader != null && !this._props.hideHeader;\r\n var navIsVisible = this._props.hideNavigation ? false : true;\r\n var subNavIsVisible = (this._props.hideSubNavigation == null || this._props.hideSubNavigation == true) && this._props.subNavigation == null ? false : true;\r\n // See if we are hiding the navigation\r\n if (!navIsVisible) {\r\n // Hide the element\r\n this._props.el.querySelector(\"#navigation\").classList.add(\"d-none\");\r\n }\r\n else {\r\n // Render the navigation\r\n var navProps_1 = this._props.navigation || {};\r\n new navigation_1.Navigation({\r\n el: this._props.el.querySelector(\"#navigation\"),\r\n hideFilter: navProps_1.showFilter != null ? !navProps_1.showFilter : false,\r\n hideSearch: navProps_1.showSearch != null ? !navProps_1.showSearch : false,\r\n items: navProps_1.items,\r\n itemsEnd: navProps_1.itemsEnd,\r\n title: navProps_1.title,\r\n onFilterRendered: navProps_1.onFilterRendered,\r\n onRendering: function (props) {\r\n // Set the default classname\r\n props.className = props.className || (\"bg-sharepoint rounded\" + (headerIsVisible || subNavIsVisible ? \"-top\" : \"\"));\r\n // Set the default type\r\n props.type = typeof (props.type) === \"number\" ? props.type : gd_sprest_bs_1.Components.NavbarTypes.Dark;\r\n // Call the rendering event if it exists\r\n navProps_1.onRendering ? navProps_1.onRendering(props) : null;\r\n },\r\n onRendered: navProps_1.onRendered,\r\n onSearch: function (value) {\r\n // Search the data table\r\n _this._dt.search(value);\r\n },\r\n onSearchRendered: navProps_1.onSearchRendered,\r\n onShowFilter: function () {\r\n // Show the filter\r\n _this._filters.show();\r\n // Call the event\r\n navProps_1.onShowFilter ? navProps_1.onShowFilter() : null;\r\n },\r\n });\r\n }\r\n // See if we are hiding the header\r\n if (!headerIsVisible) {\r\n // Hide the element\r\n this._props.el.querySelector(\"#header\").classList.add(\"d-none\");\r\n }\r\n else {\r\n var elHeader = this._props.el.querySelector(\"#header\");\r\n // Render the header\r\n var header = this._props.header || {};\r\n new header_1.Header({\r\n el: elHeader,\r\n onRendering: this._props.header ? this._props.header.onRendering : null,\r\n onRendered: this._props.header ? this._props.header.onRendered : null,\r\n title: header.title\r\n });\r\n // See if the sub-nav is not visible\r\n if (!navIsVisible && !subNavIsVisible) {\r\n // Set the class name\r\n elHeader.classList.add(\"rounded\");\r\n }\r\n else if (navIsVisible && !subNavIsVisible) {\r\n // Set the class name\r\n elHeader.classList.add(\"rounded-bottom\");\r\n }\r\n else if (!navIsVisible && subNavIsVisible) {\r\n // Set the class name\r\n elHeader.classList.add(\"rounded-top\");\r\n }\r\n }\r\n // See if we are hiding the sub-navigation\r\n if (!subNavIsVisible) {\r\n // Hide the element\r\n this._props.el.querySelector(\"#sub-navigation\").classList.add(\"d-none\");\r\n }\r\n else {\r\n // Render the navigation\r\n var navProps_2 = this._props.subNavigation || {};\r\n new navigation_1.Navigation({\r\n el: this._props.el.querySelector(\"#sub-navigation\"),\r\n hideFilter: navProps_2.showFilter != null ? !navProps_2.showFilter : true,\r\n hideSearch: navProps_2.showSearch != null ? !navProps_2.showSearch : true,\r\n items: navProps_2.items,\r\n itemsEnd: navProps_2.itemsEnd,\r\n title: navProps_2.title,\r\n onFilterRendered: navProps_2.onFilterRendered,\r\n onRendering: function (props) {\r\n // Set the default classname\r\n props.className = props.className || (\"rounded\" + (!headerIsVisible && !navIsVisible ? \"\" : \"-bottom\"));\r\n props.className = \"sub-nav \" + props.className;\r\n // Set the default type\r\n props.type = typeof (props.type) === \"number\" ? props.type : gd_sprest_bs_1.Components.NavbarTypes.Light;\r\n // Call the rendering event if it exists\r\n navProps_2.onRendering ? navProps_2.onRendering(props) : null;\r\n },\r\n onRendered: navProps_2.onRendered,\r\n onSearch: function (value) {\r\n // Search the data table\r\n _this._dt.search(value);\r\n },\r\n onShowFilter: function () {\r\n // Show the filter\r\n _this._filters.show();\r\n },\r\n });\r\n }\r\n // Render the data table\r\n this._dt = new table_1.DataTable({\r\n columns: this._props.table ? this._props.table.columns : null,\r\n dtProps: this._props.table ? this._props.table.dtProps : null,\r\n el: this._props.el.querySelector(\"#datatable\"),\r\n onRendered: this._props.table ? this._props.table.onRendered : null,\r\n rows: this._props.table ? this._props.table.rows : null\r\n });\r\n // See if we are hiding the footer\r\n if (this._props.hideFooter) {\r\n // Hide the element\r\n this._props.el.querySelector(\"#footer\").classList.add(\"d-none\");\r\n }\r\n else {\r\n // Render the footer\r\n var footer = this._props.footer || {};\r\n new footer_1.Footer({\r\n el: this._props.el.querySelector(\"#footer\"),\r\n items: footer.items,\r\n itemsEnd: footer.itemsEnd,\r\n onRendering: footer.onRendering,\r\n onRendered: footer.onRendered\r\n });\r\n }\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n // Filter the table\r\n Dashboard.prototype.filter = function (idx, value) {\r\n // Filter the table\r\n this._dt.filter(idx, value);\r\n };\r\n // Returns a filter checkbox group by its key\r\n Dashboard.prototype.getFilter = function (key) { return this._filters.getFilter(key); };\r\n // Hides the filter\r\n Dashboard.prototype.hideFilter = function () { this._filters.hide(); };\r\n // Refresh the table\r\n Dashboard.prototype.refresh = function (rows) {\r\n // Refresh the table\r\n this._dt.refresh(rows);\r\n };\r\n // Search the table\r\n Dashboard.prototype.search = function (value) {\r\n // Search the table\r\n this._dt.search(value);\r\n };\r\n // Sets a filter checkbox group value\r\n Dashboard.prototype.setFilterValue = function (key, value) { return this._filters.setFilterValue(key, value); };\r\n // Shows the filter\r\n Dashboard.prototype.showFilter = function () { this._filters.show(); };\r\n return Dashboard;\r\n}());\r\nexports.Dashboard = Dashboard;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/index.js?");
|
|
119
119
|
|
|
120
120
|
/***/ }),
|
|
121
121
|
|
|
@@ -126,7 +126,7 @@ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create
|
|
|
126
126
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
127
127
|
|
|
128
128
|
"use strict";
|
|
129
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Navigation = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
129
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Navigation = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\nvar filter_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/filter */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/filter.js\");\r\n/**\r\n * Navigation\r\n */\r\nvar Navigation = /** @class */ (function () {\r\n // Constructor\r\n function Navigation(props) {\r\n this._props = null;\r\n // Save the properties\r\n this._props = props;\r\n // Render the navigation\r\n this.render();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(this._props.el) : null;\r\n }\r\n // Renders the component\r\n Navigation.prototype.render = function () {\r\n // Define the default props\r\n var props = {\r\n el: this._props.el,\r\n brand: this._props.title,\r\n enableSearch: this._props.hideSearch != null ? !this._props.hideSearch : null,\r\n items: this._props.items,\r\n itemsEnd: this._props.itemsEnd,\r\n searchBox: {\r\n hideButton: true,\r\n onChange: this._props.onSearch,\r\n onSearch: this._props.onSearch,\r\n placeholder: \"Search this app\",\r\n }\r\n };\r\n // Call the rendering event\r\n this._props.onRendering ? this._props.onRendering(props) : null;\r\n // Render a navbar\r\n var nav = gd_sprest_bs_1.Components.Navbar(props);\r\n // See if we are showing the filter\r\n if (this._props.hideFilter != true) {\r\n // Render the filter icon\r\n // Create a span to wrap the icon in\r\n var span = document.createElement(\"span\");\r\n span.className = \"bg-white d-inline-flex filter-icon ms-2 rounded\";\r\n nav.el.firstElementChild.appendChild(span);\r\n // Render a tooltip\r\n var ttp = gd_sprest_bs_1.Components.Tooltip({\r\n el: span,\r\n content: \"Filters\",\r\n type: gd_sprest_bs_1.Components.TooltipTypes.Secondary,\r\n btnProps: {\r\n // Render the filter button\r\n iconType: filter_1.filter,\r\n iconSize: 28,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary\r\n },\r\n });\r\n // Call the event\r\n this._props.onShowFilter ? ttp.el.addEventListener(\"click\", this._props.onShowFilter) : null;\r\n this._props.onFilterRendered ? this._props.onFilterRendered(this._props.el) : null;\r\n }\r\n // Call the event\r\n this._props.onSearchRendered ? this._props.onSearchRendered(this._props.el.querySelector(\"input[type='search']\")) : null;\r\n };\r\n return Navigation;\r\n}());\r\nexports.Navigation = Navigation;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/navigation.js?");
|
|
130
130
|
|
|
131
131
|
/***/ }),
|
|
132
132
|
|
|
@@ -137,7 +137,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
137
137
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
138
138
|
|
|
139
139
|
"use strict";
|
|
140
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DataTable = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
140
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DataTable = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\n// DataTables.net\r\nvar $ = __webpack_require__(/*! jquery */ \"./node_modules/.pnpm/jquery@3.6.0/node_modules/jquery/dist/jquery.min.js\");\r\n__webpack_require__(/*! datatables.net */ \"./node_modules/.pnpm/datatables.net@1.11.5/node_modules/datatables.net/js/jquery.dataTables.min.js\");\r\n__webpack_require__(/*! datatables.net-bs5 */ \"./node_modules/.pnpm/datatables.net-bs5@1.11.5/node_modules/datatables.net-bs5/js/dataTables.bootstrap5.min.js\");\r\n/**\r\n * Data Table\r\n */\r\nvar DataTable = /** @class */ (function () {\r\n // Constructor\r\n function DataTable(props) {\r\n this._datatable = null;\r\n this._props = null;\r\n // Save the properties\r\n this._props = props;\r\n // Render the table\r\n this.refresh(props.rows);\r\n }\r\n // Applies the datatables.net plugin\r\n DataTable.prototype.applyPlugin = function (table) {\r\n // Render the datatable\r\n this._datatable = $(table.el).DataTable(this._props.dtProps);\r\n // Call the render event\r\n this._props.onRendered ? this._props.onRendered(this._props.el, this._datatable) : null;\r\n };\r\n Object.defineProperty(DataTable.prototype, \"datatable\", {\r\n /** Public Interface */\r\n // Datatables.net object\r\n get: function () { return this._datatable; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataTable.prototype, \"el\", {\r\n // The data table element\r\n get: function () { return this._props.el; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Filters the status\r\n DataTable.prototype.filter = function (idx, value) {\r\n if (value === void 0) { value = \"\"; }\r\n // Set the filter\r\n this._datatable.column(idx).search(value, true, false).draw();\r\n };\r\n // Method to reload the data\r\n DataTable.prototype.refresh = function (rows) {\r\n // See if the datatable exists\r\n if (this._datatable != null) {\r\n // Clear the datatable\r\n this._datatable.clear();\r\n this._datatable.destroy();\r\n this._datatable = null;\r\n }\r\n // Clear the datatable element\r\n while (this._props.el.firstChild) {\r\n this._props.el.removeChild(this._props.el.firstChild);\r\n }\r\n // Render the data table\r\n var table = gd_sprest_bs_1.Components.Table({\r\n el: this._props.el,\r\n rows: rows,\r\n columns: this._props.columns\r\n });\r\n // Apply the plugin\r\n this.applyPlugin(table);\r\n };\r\n // Searches the datatable\r\n DataTable.prototype.search = function (value) {\r\n if (value === void 0) { value = \"\"; }\r\n // Search the table\r\n this._datatable.search(value).draw();\r\n };\r\n return DataTable;\r\n}());\r\nexports.DataTable = DataTable;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/table.js?");
|
|
141
141
|
|
|
142
142
|
/***/ }),
|
|
143
143
|
|
|
@@ -148,7 +148,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
148
148
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
149
149
|
|
|
150
150
|
"use strict";
|
|
151
|
-
eval("\r\nvar __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Documents = exports.ActionButtonTypes = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/index.js\");\r\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/.pnpm/jquery@3.6.0/node_modules/jquery/dist/jquery.min.js\");\r\nvar moment = __webpack_require__(/*! moment */ \"./node_modules/.pnpm/moment@2.29.1/node_modules/moment/moment.js\");\r\nvar loadingDialog_1 = __webpack_require__(/*! ./common/loadingDialog */ \"./build/common/loadingDialog.js\");\r\nvar methods_1 = __webpack_require__(/*! ./common/methods */ \"./build/common/methods.js\");\r\nvar table_1 = __webpack_require__(/*! ./dashboard/table */ \"./build/dashboard/table.js\");\r\nvar itemForm_1 = __webpack_require__(/*! ./itemForm */ \"./build/itemForm.js\");\r\n/** Icons */\r\nvar fileEarmark_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmark */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmark.js\");\r\nvar fileEarmarkArrowDown_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown.js\");\r\nvar fileEarmarkArrowUp_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp.js\");\r\nvar fileEarmarkBarGraph_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph.js\");\r\nvar fileEarmarkBinary_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkBinary */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBinary.js\");\r\nvar fileEarmarkCode_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkCode */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkCode.js\");\r\nvar fileEarmarkExcel_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkExcel */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkExcel.js\");\r\nvar fileEarmarkImage_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkImage */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkImage.js\");\r\nvar fileEarmarkMusic_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkMusic */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkMusic.js\");\r\nvar fileEarmarkPdf_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkPdf */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPdf.js\");\r\nvar fileEarmarkPlus_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkPlus */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlus.js\");\r\nvar fileEarmarkPpt_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkPpt */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPpt.js\");\r\nvar fileEarmarkPlay_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkPlay */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlay.js\");\r\nvar fileEarmarkRichtext_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext.js\");\r\nvar fileEarmarkSpreadsheet_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet.js\");\r\nvar fileEarmarkText_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkText */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkText.js\");\r\nvar fileEarmarkWord_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkWord */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkWord.js\");\r\nvar fileEarmarkZip_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkZip */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkZip.js\");\r\nvar filterSquare_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/filterSquare */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/filterSquare.js\");\r\nvar front_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/front */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/front.js\");\r\nvar inputCursorText_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/inputCursorText */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/inputCursorText.js\");\r\nvar layoutTextSidebar_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/layoutTextSidebar */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/layoutTextSidebar.js\");\r\nvar x_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/x */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/x.js\");\r\n/** Action Button Types */\r\nvar ActionButtonTypes;\r\n(function (ActionButtonTypes) {\r\n ActionButtonTypes[ActionButtonTypes[\"Delete\"] = 1] = \"Delete\";\r\n ActionButtonTypes[ActionButtonTypes[\"Download\"] = 2] = \"Download\";\r\n ActionButtonTypes[ActionButtonTypes[\"Edit\"] = 3] = \"Edit\";\r\n ActionButtonTypes[ActionButtonTypes[\"Properties\"] = 4] = \"Properties\";\r\n ActionButtonTypes[ActionButtonTypes[\"View\"] = 5] = \"View\";\r\n})(ActionButtonTypes = exports.ActionButtonTypes || (exports.ActionButtonTypes = {}));\r\n/**\r\n * Documents\r\n * Renders a data table containing the contents of a document library.\r\n */\r\nvar Documents = /** @class */ (function () {\r\n // Constructor\r\n function Documents(props) {\r\n this._el = null;\r\n this._props = null;\r\n this._tblProps = null;\r\n /** The list item attachments */\r\n this._attachments = null;\r\n /** The data table */\r\n this._dt = null;\r\n // Can delete documents\r\n this._canDelete = true;\r\n // Can edit documents\r\n this._canEdit = true;\r\n // Can view documents\r\n this._canView = true;\r\n // The navigation component\r\n this._navbar = null;\r\n // The root folder of the library\r\n this._rootFolder = null;\r\n // The template files\r\n this._templatesFiles = null;\r\n // The template folders\r\n this._templateFolders = null;\r\n // Save the properties\r\n this._props = props;\r\n // Default the permissions\r\n this._canDelete = typeof (this._props.canDelete) === \"boolean\" ? this._props.canDelete : true;\r\n this._canEdit = typeof (this._props.canEdit) === \"boolean\" ? this._props.canEdit : true;\r\n this._canView = typeof (this._props.canView) === \"boolean\" ? this._props.canView : true;\r\n // Create the element\r\n this._el = document.createElement(\"div\");\r\n this._props.el ? this._props.el.appendChild(this._el) : null;\r\n // Generate the table properties\r\n this.generateTableProps();\r\n // Render the component\r\n this.render();\r\n }\r\n Object.defineProperty(Documents.prototype, \"Attachments\", {\r\n get: function () { return this._attachments; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"DataTable\", {\r\n get: function () { return this._dt; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"CanDelete\", {\r\n get: function () { return this._canDelete; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"CanEdit\", {\r\n get: function () { return this._canEdit; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"CanView\", {\r\n get: function () { return this._canView; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"Files\", {\r\n // The files\r\n get: function () {\r\n // Default the files to the root folder\r\n var files = this.RootFolder.Files.results;\r\n // Parse the folders\r\n var formsFl = false;\r\n for (var i = 0; i < this.RootFolder.Folders.results.length; i++) {\r\n var folder = this.RootFolder.Folders.results[i];\r\n // Skip the internal forms folder\r\n if (!formsFl && folder.Name == \"Forms\") {\r\n // Set the flag and skip this folder\r\n formsFl = true;\r\n continue;\r\n }\r\n // Append files\r\n files = files.concat(folder.Files.results);\r\n }\r\n // Return the files\r\n return files;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"IsAttachment\", {\r\n // Type of object we are dealing with\r\n get: function () { return this._props.itemId > 0; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"IsDocSet\", {\r\n get: function () { return this._props.docSetId > 0; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"Navigation\", {\r\n get: function () { return this._navbar; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"NavigationElement\", {\r\n // The navigation element\r\n get: function () { return this.Navigation.el; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"RootFolder\", {\r\n get: function () { return this._rootFolder; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"TableElement\", {\r\n // The table element\r\n get: function () { return this.DataTable.el; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"TemplateFiles\", {\r\n get: function () { return this._templatesFiles; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"TemplateFolders\", {\r\n get: function () { return this._templateFolders; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /**\r\n * Copies a file to a folder to the library\r\n * @param item The dropdown item containing the file/folder to copy.\r\n */\r\n Documents.prototype.copyFile = function (item) {\r\n var _this = this;\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Initializing the Transfer\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Copying the file(s) to the workspace...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // See if this is a folder\r\n if (item.data.Files) {\r\n // Parse the files\r\n var folder = item.data;\r\n gd_sprest_bs_1.Helper.Executor(folder.Files.results, function (file) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the file contents\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFileByServerRelativeUrl(file.ServerRelativeUrl).content().execute(function (data) {\r\n // Copy the file\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(file.Name, true, data).execute(resolve, resolve);\r\n });\r\n });\r\n }).then(function () {\r\n // Close the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Refresh the page\r\n _this.refresh();\r\n });\r\n }\r\n else {\r\n // Copy the file\r\n var file_1 = item.data;\r\n file_1.content().execute(function (data) {\r\n // Copy the file\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(file_1.Name, true, data).execute(function () {\r\n // Close the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Refresh the page\r\n _this.refresh();\r\n });\r\n });\r\n }\r\n };\r\n // Generates the table columns\r\n Documents.prototype.generateColumns = function () {\r\n // See if the columns were provided\r\n if (this._props.table && this._props.table.columns) {\r\n return this._props.table.columns;\r\n }\r\n // See if we are dealing w/ attachments\r\n if (this.IsAttachment) {\r\n // Return the default columns\r\n return [\r\n {\r\n name: \"Type\",\r\n title: \"Type\"\r\n },\r\n {\r\n name: \"FileName\",\r\n title: \"Name\"\r\n },\r\n {\r\n className: \"text-end text-nowrap\",\r\n name: \"Actions\",\r\n title: \"\"\r\n }\r\n ];\r\n }\r\n // Return the default columns\r\n return [\r\n {\r\n name: \"Type\",\r\n title: \"Type\",\r\n },\r\n {\r\n name: \"Name\",\r\n title: \"Name\"\r\n },\r\n {\r\n name: \"Title\",\r\n title: \"Description\"\r\n },\r\n {\r\n name: \"FileSize\",\r\n title: \"File Size\"\r\n },\r\n {\r\n name: \"Created\",\r\n title: \"Created\"\r\n },\r\n {\r\n name: \"Author\",\r\n title: \"Created By\"\r\n },\r\n {\r\n name: \"Modified\",\r\n title: \"Modified\"\r\n },\r\n {\r\n name: \"ModifiedBy\",\r\n title: \"Modified By\"\r\n },\r\n {\r\n className: \"text-end text-nowrap\",\r\n name: \"Actions\",\r\n title: \"\"\r\n }\r\n ];\r\n };\r\n // Generates the template files/folders dropdown items\r\n Documents.prototype.generateItems = function () {\r\n var _this = this;\r\n var items = [];\r\n // Parse the template folders\r\n for (var i = 0; i < this.TemplateFolders.length; i++) {\r\n var folder = this.TemplateFolders[i];\r\n // Skip the internal forms folder\r\n if (folder.Name == \"Forms\") {\r\n continue;\r\n }\r\n // Add a dropdown item\r\n items.push({\r\n text: folder.Name,\r\n data: folder,\r\n value: folder.ServerRelativeUrl,\r\n onClick: function (item) { _this.copyFile(item); }\r\n });\r\n }\r\n // Parse the template files\r\n for (var i = 0; i < this.TemplateFiles.length; i++) {\r\n var file = this.TemplateFiles[i];\r\n // Add a dropdown item\r\n items.push({\r\n text: file.Name,\r\n data: file,\r\n value: file.ServerRelativeUrl,\r\n onClick: function (item) { _this.copyFile(item); }\r\n });\r\n }\r\n // Return the dropdown items\r\n return items.sort(function (a, b) {\r\n if (a.text < b.text) {\r\n return -1;\r\n }\r\n if (a.text > b.text) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n };\r\n // Generates the table properties\r\n Documents.prototype.generateTableProps = function () {\r\n var _this = this;\r\n // Default the indexes for the type and action buttons\r\n var idxActions = this.IsAttachment ? 2 : 8;\r\n // See if custom columns are defined\r\n if (this._props.table && this._props.table.columns) {\r\n // Clear the indexes\r\n idxActions = -1;\r\n // Parse the columns\r\n for (var i = 0; i < this._props.table.columns.length; i++) {\r\n // Update the index based on the value\r\n switch (this._props.table.columns[i].name) {\r\n // Actions\r\n case \"Actions\":\r\n idxActions = i;\r\n break;\r\n }\r\n }\r\n }\r\n // See if the column definitions are not defined\r\n var columnDefs = this._props.table ? this._props.table.dtProps : null;\r\n if (columnDefs == null) {\r\n columnDefs = [];\r\n // Add the default options for the Actions and Type\r\n idxActions >= 0 ? columnDefs.push({ targets: idxActions, orderable: false, searchable: false }) : null;\r\n }\r\n // Create the table properties\r\n this._tblProps = {\r\n el: null,\r\n dtProps: this._props.table && this._props.table.dtProps ? this._props.table.dtProps : {\r\n dom: 'rt<\"row\"<\"col-sm-4\"l><\"col-sm-4\"i><\"col-sm-4\"p>>',\r\n columnDefs: columnDefs,\r\n createdRow: function (row, data, index) {\r\n jQuery('td', row).addClass('align-middle');\r\n },\r\n // Add some classes to the dataTable elements\r\n drawCallback: function (settings) {\r\n var api = new jQuery.fn.dataTable.Api(settings);\r\n var div = api.table().container();\r\n var table = api.table().node();\r\n div.querySelector(\".dataTables_info\").classList.add(\"text-center\");\r\n div.querySelector(\".dataTables_length\").classList.add(\"pt-2\");\r\n div.querySelector(\".dataTables_paginate\").classList.add(\"pt-03\");\r\n table.classList.remove(\"no-footer\");\r\n table.classList.add(\"tbl-footer\");\r\n table.classList.add(\"table-striped\");\r\n },\r\n headerCallback: function (thead, data, start, end, display) {\r\n jQuery('th', thead).addClass('align-middle');\r\n },\r\n // Order by the 1st column by default; ascending\r\n order: [[1, \"asc\"]]\r\n },\r\n columns: this.generateColumns()\r\n };\r\n // Parse the columns\r\n gd_sprest_bs_1.Helper.Executor(this._tblProps.columns, function (col) {\r\n var customEvent = col.onRenderCell;\r\n // See if this is the type column\r\n if (col.name == \"Type\") {\r\n // Set the event to render an icon\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the file\r\n _this.renderFileIcon(el, _this.getFileName(file));\r\n // Set the filter/sort value\r\n el.setAttribute(\"data-filter\", (0, methods_1.getFileExt)(_this.getFileName(file)));\r\n el.setAttribute(\"data-sort\", (0, methods_1.getFileExt)(_this.getFileName(file)));\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n // Else, see if this is the file size\r\n else if (col.name == \"FileSize\") {\r\n // Set the event to render the size\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the file size value\r\n el.innerHTML = (0, methods_1.formatBytes)(file.Length);\r\n // Set the sort value\r\n el.setAttribute(\"data-sort\", file.Length.toString());\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n // Else, see if this is a date/time field\r\n else if (col.name == \"Created\" || col.name == \"Modified\") {\r\n // Set the event to render the size\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the date/time value\r\n var value = col.name == \"Created\" ? file.TimeCreated : file.TimeLastModified;\r\n el.innerHTML = (0, methods_1.formatTimeValue)(value);\r\n // Set the date/time filter/sort values\r\n el.setAttribute(\"data-filter\", moment(value).format(\"dddd MMMM DD YYYY\"));\r\n el.setAttribute(\"data-sort\", value);\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n // Else, see if this is a user field\r\n else if (col.name == \"Author\" || col.name == \"ModifiedBy\") {\r\n // Set the event to render the size\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the Person field Title\r\n el.innerHTML = (file[col.name] ? file[col.name][\"Title\"] : null) || \"\";\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n // Else, see if this is the \"actions\" buttons\r\n else if (col.name == \"Actions\") {\r\n // Set the event to render the size\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the action buttons\r\n _this.renderActionButtons(el, file);\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n _this._props.onActionsRendered ? _this._props.onActionsRendered(el, col, file) : null;\r\n };\r\n }\r\n else {\r\n // Set the default render event\r\n col.onRenderCell = function (el, col, file) {\r\n // Set the value\r\n el.innerHTML = file[col.name] ||\r\n (file.ListItemAllFields && file.ListItemAllFields.FieldValuesAsText[col.name]) || \"\";\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n });\r\n };\r\n // Gets the file name\r\n Documents.prototype.getFileName = function (file) {\r\n // Return the file name\r\n return file.Name || file.FileName;\r\n };\r\n // Determines if the document can be viewed in office online servers\r\n Documents.isWopi = function (filename) {\r\n switch ((0, methods_1.getFileExt)(filename)) {\r\n // Excel\r\n case \"csv\":\r\n case \"doc\":\r\n case \"docx\":\r\n case \"dot\":\r\n case \"dotx\":\r\n case \"pot\":\r\n case \"potx\":\r\n case \"pps\":\r\n case \"ppsx\":\r\n case \"ppt\":\r\n case \"pptx\":\r\n case \"xls\":\r\n case \"xlsx\":\r\n case \"xlt\":\r\n case \"xltx\":\r\n return true;\r\n // Default\r\n default: {\r\n return false;\r\n }\r\n }\r\n };\r\n // Loads the data\r\n Documents.prototype.load = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var web = (0, gd_sprest_bs_1.Web)(_this._props.webUrl);\r\n // Clear the properties\r\n _this._rootFolder = null;\r\n _this._templateFolders = null;\r\n _this._templatesFiles = null;\r\n // See if the templates library was set\r\n if (_this._props.templatesUrl) {\r\n // Load the files and folders\r\n web.getFolderByServerRelativeUrl(_this._props.templatesUrl).query({\r\n Expand: [\"Folders/Files\", \"Files\"]\r\n }).execute(\r\n // Templates folder exists\r\n function (folder) {\r\n // Set the template files\r\n _this._templatesFiles = folder.Files.results;\r\n // Set the template folders\r\n _this._templateFolders = folder.Folders.results;\r\n }, \r\n // Error loading the templates folder\r\n function () {\r\n // Log\r\n console.error(\"[Dattatable] Document's template folder failed to be loaded.\", _this._props.templatesUrl);\r\n });\r\n }\r\n // Set the query\r\n var query = _this._props.query || {};\r\n query.Expand = (query.Expand ? query.Expand : []).concat([\r\n \"Folders/Files\", \"Folders/Files/Author\",\r\n \"Folders/Files/ListItemAllFields\", \"Folders/Files/ListItemAllFields/FieldValuesAsText\",\r\n \"Folders/Files/ModifiedBy\", \"Files\", \"Files/Author\", \"Files/ListItemAllFields\",\r\n \"Files/ListItemAllFields/FieldValuesAsText\", \"Files/ModifiedBy\"\r\n ]);\r\n // See if we are targeting a document set folder\r\n if (_this.IsDocSet) {\r\n web.Lists(_this._props.listName).Items(_this._props.docSetId).Folder().query(query).execute(function (folder) {\r\n // Set the root folder\r\n _this._rootFolder = folder;\r\n }, reject);\r\n }\r\n // Else, see if we are targeting list item attachments\r\n else if (_this.IsAttachment) {\r\n web.Lists(_this._props.listName).Items(_this._props.itemId).AttachmentFiles().execute(function (attachments) {\r\n // Set the attachments\r\n _this._attachments = attachments.results;\r\n }, reject);\r\n }\r\n // Else, it's a library\r\n else {\r\n // Load library information\r\n web.Lists(_this._props.listName).RootFolder().query(query).execute(function (folder) {\r\n // Set the root folder\r\n _this._rootFolder = folder;\r\n }, reject);\r\n }\r\n // Wait for the requests to complete\r\n web.done(function () {\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\r\n };\r\n // Renders the component\r\n Documents.prototype.render = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the data\r\n _this.load().then(function () {\r\n // Render the navigation\r\n _this.renderNavigation();\r\n // Render the table\r\n _this.renderTable();\r\n // Call the render event\r\n _this._props.onRendered ? _this._props.onRendered(_this._el) : null;\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Renders the file actions\r\n Documents.prototype.renderActionButtons = function (el, file) {\r\n // Create a span to wrap the icons in\r\n var span = document.createElement(\"span\");\r\n span.className = \"bg-white d-inline-flex ms-2 rounded\";\r\n var spanEdit = span.cloneNode();\r\n var spanProps = span.cloneNode();\r\n var spanDownload = span.cloneNode();\r\n var spanDel = span.cloneNode();\r\n spanDel.classList.add(\"me-1\");\r\n // Add the icons\r\n el.appendChild(span);\r\n el.appendChild(spanEdit);\r\n this.IsAttachment ? null : el.appendChild(spanProps);\r\n el.appendChild(spanDownload);\r\n el.appendChild(spanDel);\r\n // Render the buttons\r\n span.appendChild(this.generateButton(ActionButtonTypes.View, file));\r\n spanEdit.appendChild(this.generateButton(ActionButtonTypes.Edit, file));\r\n this.IsAttachment ? null : spanProps.appendChild(this.generateButton(ActionButtonTypes.Properties, file));\r\n spanDownload.appendChild(this.generateButton(ActionButtonTypes.Download, file));\r\n spanDel.appendChild(this.generateButton(ActionButtonTypes.Delete, file));\r\n };\r\n Documents.prototype.generateButton = function (btnType, file) {\r\n var _this = this;\r\n var isWopi = Documents.isWopi(this.getFileName(file));\r\n // Render the button based on the type\r\n switch (btnType) {\r\n case ActionButtonTypes.Delete:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"Delete\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1 btn-actions-delete\",\r\n iconType: x_1.x,\r\n iconSize: 24,\r\n isDisabled: !this.CanDelete,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n if (_this.CanDelete) {\r\n // Confirm we want to delete the item\r\n if (confirm(\"Are you sure you want to delete this document?\")) {\r\n // Display a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Deleting Document\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Deleting Document: \" + _this.getFileName(file) + \". This will close afterwards.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Delete the document\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFileByServerRelativeUrl(file.ServerRelativeUrl).delete().execute(\r\n // Success\r\n function () {\r\n // close dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Refresh the page \r\n _this.refresh();\r\n }, \r\n // Error\r\n function (err) {\r\n // TODO\r\n });\r\n }\r\n }\r\n }\r\n },\r\n }).el;\r\n case ActionButtonTypes.Download:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"Download\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1 btn-actions-download\",\r\n iconType: fileEarmarkArrowDown_1.fileEarmarkArrowDown,\r\n iconSize: 24,\r\n isDisabled: !this.CanView,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n if (_this.CanView) {\r\n window.open(gd_sprest_bs_1.ContextInfo.webServerRelativeUrl + \"/_layouts/15/download.aspx?SourceUrl=\" + file.ServerRelativeUrl, \"_blank\");\r\n }\r\n }\r\n },\r\n }).el;\r\n case ActionButtonTypes.Edit:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"Edit\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1 btn-actions-edit\",\r\n iconType: inputCursorText_1.inputCursorText,\r\n iconSize: 24,\r\n isDisabled: (!isWopi || !this.CanEdit),\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n if (isWopi && _this.CanEdit) {\r\n // Open the file in a new tab\r\n window.open(gd_sprest_bs_1.ContextInfo.webServerRelativeUrl + \"/_layouts/15/WopiFrame.aspx?sourcedoc=\" + file.ServerRelativeUrl + \"&action=edit\");\r\n }\r\n }\r\n },\r\n }).el;\r\n case ActionButtonTypes.Properties:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"Properties\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1 btn-actions-properties\",\r\n iconType: layoutTextSidebar_1.layoutTextSidebar,\r\n iconSize: 24,\r\n isDisabled: !this.CanEdit && !this.CanView,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n // Set the item form properties\r\n itemForm_1.ItemForm.ListName = _this._props.listName;\r\n itemForm_1.ItemForm.UseModal = false;\r\n // Ensure the user can edit the item\r\n if (_this.CanEdit) {\r\n // Define the properties\r\n var editProps = __assign(__assign({}, (_this._props.onItemFormEditing || {})), {\r\n // Set the item id\r\n itemId: file.ListItemAllFields[\"Id\"],\r\n // Set the edit form properties\r\n onCreateEditForm: function (props) {\r\n // Set the rendering event\r\n props.onControlRendering = function (ctrl, field) {\r\n if (field.InternalName == \"FileLeafRef\") {\r\n // Validate the name of the file\r\n ctrl.onValidate = function (ctrl, results) {\r\n var _a;\r\n // Ensure the value is less than 128 characters\r\n if (((_a = results.value) === null || _a === void 0 ? void 0 : _a.length) > 128) {\r\n // Return an error message\r\n results.invalidMessage = \"The file name must be less than 128 characters.\";\r\n results.isValid = false;\r\n }\r\n // Return the results\r\n return results;\r\n };\r\n }\r\n else if (field.InternalName == \"Title\") {\r\n // Update the label of the Title field\r\n ctrl.label = \"Description\";\r\n }\r\n };\r\n // See if a custom event exists\r\n if (_this._props.onItemFormEditing && _this._props.onItemFormEditing.onCreateEditForm) {\r\n // Return the properties\r\n return _this._props.onItemFormEditing.onCreateEditForm(props);\r\n }\r\n // Return the properties\r\n return props;\r\n },\r\n // Update the footer\r\n onSetFooter: function (el) {\r\n var updateBtn = el.querySelector('[role=\"group\"]').firstChild;\r\n updateBtn.classList.remove(\"btn-outline-primary\");\r\n updateBtn.classList.add(\"btn-primary\");\r\n // See if a custom event exists\r\n if (_this._props.onItemFormEditing && _this._props.onItemFormEditing.onSetFooter) {\r\n // Execute the event\r\n _this._props.onItemFormEditing.onSetFooter(el);\r\n }\r\n },\r\n // Update the header\r\n onSetHeader: function (el) {\r\n // Update the header\r\n el.querySelector(\"h5\").innerHTML = \"Properties\";\r\n // See if a custom event exists\r\n if (_this._props.onItemFormEditing && _this._props.onItemFormEditing.onSetHeader) {\r\n // Execute the event\r\n _this._props.onItemFormEditing.onSetHeader(el);\r\n }\r\n },\r\n // Refresh the view when updates occur\r\n onUpdate: function (item) {\r\n // See if a custom event exists\r\n if (_this._props.onItemFormEditing && _this._props.onItemFormEditing.onUpdate) {\r\n // Execute the event\r\n _this._props.onItemFormEditing.onUpdate(item);\r\n }\r\n else {\r\n // Refresh the data table\r\n _this.refresh();\r\n }\r\n }\r\n });\r\n // Show the edit form\r\n itemForm_1.ItemForm.edit(editProps);\r\n }\r\n else {\r\n // View the form\r\n itemForm_1.ItemForm.view(__assign(__assign({}, (_this._props.onItemFormViewing || {})), {\r\n itemId: file.ListItemAllFields[\"Id\"],\r\n // Set the view form properties\r\n onCreateViewForm: function (props) {\r\n // Set the rendering event\r\n props.onControlRendering = function (ctrl, field) {\r\n if (field.InternalName == \"Title\") {\r\n // Update the label of the Title field\r\n ctrl.label = \"Description\";\r\n }\r\n };\r\n // See if a custom event exists\r\n if (_this._props.onItemFormViewing && _this._props.onItemFormViewing.onCreateViewForm) {\r\n // Return the properties\r\n return _this._props.onItemFormViewing.onCreateViewForm(props);\r\n }\r\n // Return the properties\r\n return props;\r\n }\r\n }));\r\n }\r\n }\r\n }\r\n }).el;\r\n case ActionButtonTypes.View:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"View\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"img-flip-x p-1 btn-actions-view\",\r\n iconType: front_1.front,\r\n iconSize: 24,\r\n isDisabled: !this.CanView,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n if (_this.CanView) {\r\n // Open the file in a new tab\r\n window.open(isWopi ? gd_sprest_bs_1.ContextInfo.webServerRelativeUrl + \"/_layouts/15/WopiFrame.aspx?sourcedoc=\" + file.ServerRelativeUrl + \"&action=view\" : file.ServerRelativeUrl, \"_blank\");\r\n }\r\n }\r\n },\r\n }).el;\r\n }\r\n };\r\n // Renders the file icon\r\n Documents.prototype.renderFileIcon = function (el, fileName) {\r\n // Render the icon wrapper\r\n var span = document.createElement(\"span\");\r\n span.className = \"text-muted\";\r\n el.appendChild(span);\r\n // Render the icon\r\n var size = 28;\r\n switch ((0, methods_1.getFileExt)(fileName)) {\r\n // Power BI\r\n case \"pbix\":\r\n span.appendChild((0, fileEarmarkBarGraph_1.fileEarmarkBarGraph)(size));\r\n span.title = \"Power BI Report\";\r\n break;\r\n // Binary\r\n case \"bin\":\r\n case \"blg\":\r\n case \"dat\":\r\n case \"dmg\":\r\n case \"dmp\":\r\n case \"log\":\r\n case \"pbi\":\r\n span.appendChild((0, fileEarmarkBinary_1.fileEarmarkBinary)(size));\r\n span.title = \"Binary File\";\r\n break;\r\n // Code\r\n case \"app\":\r\n case \"asp\":\r\n case \"aspx\":\r\n case \"css\":\r\n case \"hta\":\r\n case \"htm\":\r\n case \"html\":\r\n case \"js\":\r\n case \"json\":\r\n case \"mht\":\r\n case \"mhtml\":\r\n case \"scss\":\r\n case \"sppkg\":\r\n case \"wsp\":\r\n case \"xml\":\r\n case \"yaml\":\r\n span.appendChild((0, fileEarmarkCode_1.fileEarmarkCode)(size));\r\n span.title = \"Code\";\r\n break;\r\n // Excel\r\n case \"csv\":\r\n case \"ods\":\r\n case \"xls\":\r\n case \"xlsx\":\r\n case \"xlt\":\r\n case \"xltx\":\r\n span.appendChild((0, fileEarmarkExcel_1.fileEarmarkExcel)(size));\r\n span.title = \"Excel Spreadsheet\";\r\n break;\r\n // Image\r\n case \"ai\":\r\n case \"bmp\":\r\n case \"eps\":\r\n case \"gif\":\r\n case \"heic\":\r\n case \"heif\":\r\n case \"jpe\":\r\n case \"jpeg\":\r\n case \"jpg\":\r\n case \"png\":\r\n case \"psd\":\r\n case \"svg\":\r\n case \"tif\":\r\n case \"tiff\":\r\n case \"webp\":\r\n span.appendChild((0, fileEarmarkImage_1.fileEarmarkImage)(size));\r\n span.title = \"Image\";\r\n break;\r\n // Audio\r\n case \"aac\":\r\n case \"aiff\":\r\n case \"alac\":\r\n case \"flac\":\r\n case \"m4a\":\r\n case \"m4p\":\r\n case \"mka\":\r\n case \"mp3\":\r\n case \"mp4a\":\r\n case \"wav\":\r\n case \"wma\":\r\n span.appendChild((0, fileEarmarkMusic_1.fileEarmarkMusic)(size));\r\n span.title = \"Audio File\";\r\n break;\r\n // PDF\r\n case \"pdf\":\r\n span.appendChild((0, fileEarmarkPdf_1.fileEarmarkPdf)(size));\r\n span.title = \"Adobe PDF\";\r\n break;\r\n // PowerPoint\r\n case \"odp\":\r\n case \"pot\":\r\n case \"potx\":\r\n case \"pps\":\r\n case \"ppsx\":\r\n case \"ppt\":\r\n case \"pptx\":\r\n span.appendChild((0, fileEarmarkPpt_1.fileEarmarkPpt)(size));\r\n span.title = \"PowerPoint Presentation\";\r\n break;\r\n // Media\r\n case \"avi\":\r\n case \"flv\":\r\n case \"m2ts\":\r\n case \"mkv\":\r\n case \"mov\":\r\n case \"m4p\":\r\n case \"m4v\":\r\n case \"mp4\":\r\n case \"mpe\":\r\n case \"mpeg\":\r\n case \"mpg\":\r\n case \"mpv\":\r\n case \"qt\":\r\n case \"ts\":\r\n case \"vob\":\r\n case \"webm\":\r\n case \"wmv\":\r\n span.appendChild((0, fileEarmarkPlay_1.fileEarmarkPlay)(size));\r\n span.title = \"Media File\";\r\n break;\r\n // Rich Text\r\n case \"rtf\":\r\n span.appendChild((0, fileEarmarkRichtext_1.fileEarmarkRichtext)(size));\r\n span.title = \"Rich Text\";\r\n break;\r\n // Database\r\n case \"ldf\":\r\n case \"mdb\":\r\n case \"mdf\":\r\n span.appendChild((0, fileEarmarkSpreadsheet_1.fileEarmarkSpreadsheet)(size));\r\n span.title = \"Database\";\r\n break;\r\n // Text\r\n case \"md\":\r\n case \"text\":\r\n case \"txt\":\r\n span.appendChild((0, fileEarmarkText_1.fileEarmarkText)(size));\r\n span.title = \"Text\";\r\n break;\r\n // Word\r\n case \"doc\":\r\n case \"docx\":\r\n case \"dot\":\r\n case \"dotx\":\r\n case \"odt\":\r\n case \"wpd\":\r\n span.appendChild((0, fileEarmarkWord_1.fileEarmarkWord)(size));\r\n span.title = \"Word Document\";\r\n break;\r\n // Compressed\r\n case \"7z\":\r\n case \"cab\":\r\n case \"gz\":\r\n case \"iso\":\r\n case \"rar\":\r\n case \"tgz\":\r\n case \"zip\":\r\n span.appendChild((0, fileEarmarkZip_1.fileEarmarkZip)(size));\r\n span.title = \"Compressed Folder\";\r\n break;\r\n // Default\r\n default: {\r\n span.appendChild((0, fileEarmark_1.fileEarmark)(size));\r\n span.title = \"File\";\r\n }\r\n }\r\n };\r\n // Renders the navigation\r\n Documents.prototype.renderNavigation = function () {\r\n var _this = this;\r\n var itemsEnd = [];\r\n // See if templates exist\r\n if (this.TemplateFiles && this.TemplateFolders) {\r\n // Add the item\r\n itemsEnd.push({\r\n text: \"Templates\",\r\n className: \"btn btn-sm btn-outline-secondary\",\r\n classNameItem: \"bg-white\",\r\n iconClassName: \"btn-icon-sm\",\r\n iconSize: 20,\r\n iconType: fileEarmarkPlus_1.fileEarmarkPlus,\r\n isButton: true,\r\n items: this.generateItems()\r\n });\r\n }\r\n // Add the upload button\r\n itemsEnd.push({\r\n text: \"Upload\",\r\n onRender: function (el, item) {\r\n // Clear the existing button\r\n el.innerHTML = \"\";\r\n // Create a span to wrap the icon in\r\n var span = document.createElement(\"span\");\r\n span.className = \"bg-white d-inline-flex ms-2 rounded\";\r\n el.appendChild(span);\r\n // Render a tooltip\r\n gd_sprest_bs_1.Components.Tooltip({\r\n el: span,\r\n content: item.text,\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1\",\r\n iconType: fileEarmarkArrowUp_1.fileEarmarkArrowUp,\r\n iconSize: 24,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n // Show the file upload dialog\r\n gd_sprest_bs_1.Helper.ListForm.showFileDialog().then(function (fileInfo) {\r\n // Code to run after the event\r\n var onCompleted = function (fileInfo) {\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Uploading File\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Saving the file you selected. Please wait...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Upload the file\r\n _this.uploadFile(fileInfo).then(\r\n // Success\r\n function (file) {\r\n // Call the event\r\n _this._props.onFileAdded ? _this._props.onFileAdded(file) : null;\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Refresh the page\r\n _this.refresh();\r\n }, \r\n // Error\r\n function () {\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n });\r\n };\r\n // Call the file adding event\r\n var returnVal = _this._props.onFileAdding ? _this._props.onFileAdding(fileInfo) : null;\r\n if (typeof (returnVal) === \"boolean\") {\r\n // Add the file\r\n returnVal ? onCompleted(fileInfo) : null;\r\n }\r\n // Else, see if it doesn't exist\r\n else if (returnVal == null) {\r\n // Add the file\r\n onCompleted(fileInfo);\r\n }\r\n else if (returnVal.then) {\r\n // Wait for the event to complete\r\n returnVal.then(function (addFile) {\r\n // Add the file\r\n addFile ? onCompleted(fileInfo) : null;\r\n });\r\n }\r\n });\r\n }\r\n },\r\n });\r\n }\r\n });\r\n // Set the default properties\r\n var navProps = {\r\n el: this._el,\r\n brand: \"Documents\",\r\n itemsEnd: itemsEnd,\r\n searchBox: this._props.enableSearch ? {\r\n hideButton: true,\r\n onChange: function (value) {\r\n // Search the data table\r\n _this._dt.search(value);\r\n },\r\n onSearch: function (value) {\r\n // Search the data table\r\n _this._dt.search(value);\r\n }\r\n } : null\r\n };\r\n // Call the rendering event\r\n this._props.onNavigationRendering ? this._props.onNavigationRendering(navProps) : null;\r\n // Create the navbar\r\n this._navbar = gd_sprest_bs_1.Components.Navbar(navProps);\r\n /* Fix the padding on the left & right of the nav */\r\n this._navbar.el.querySelector(\"div.container-fluid\").classList.add(\"ps-75\");\r\n this._navbar.el.querySelector(\"div.container-fluid\").classList.add(\"pe-2\");\r\n // See if we are showing the filter\r\n if (this._props.onShowFilter) {\r\n // Render the filter icon\r\n var icon = document.createElement(\"div\");\r\n icon.classList.add(\"filter-icon\");\r\n icon.classList.add(\"nav-link\");\r\n icon.classList.add(\"text-dark\");\r\n icon.style.cursor = \"pointer\";\r\n icon.appendChild((0, filterSquare_1.filterSquare)());\r\n this._props.onShowFilter ? icon.addEventListener(\"click\", this._props.onShowFilter) : null;\r\n this._navbar.el.firstElementChild.appendChild(icon);\r\n // Call the render event\r\n this._props.onFilterRendered ? this._props.onFilterRendered(icon) : null;\r\n }\r\n // Call the render events\r\n this._props.onSearchRendered ? this._props.onSearchRendered(this._navbar.el.querySelector(\"input[type='search']\")) : null;\r\n this._props.onNavigationRendered ? this._props.onNavigationRendered(this.Navigation) : null;\r\n };\r\n // Renders the datatable with the file information\r\n Documents.prototype.renderTable = function () {\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n this._el.appendChild(el);\r\n this._tblProps.el = el;\r\n // Set the data\r\n this._tblProps.rows = this.Attachments || this.Files;\r\n // Call the rendering event\r\n this._props.table && this._props.table.onRendering ? this._props.table.onRendering(this._tblProps) : null;\r\n // Render the table\r\n this._dt = new table_1.DataTable(this._tblProps);\r\n // Call the rendered event\r\n this._tblProps.onRendered ? this._tblProps.onRendered(el, this._dt.datatable) : null;\r\n };\r\n // Uploads a file\r\n Documents.prototype.uploadFile = function (fileInfo) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var list = (0, gd_sprest_bs_1.List)(_this._props.listName);\r\n // See if this is an attachment\r\n if (_this.IsAttachment) {\r\n // Upload the attachment\r\n list.Items(_this._props.itemId).AttachmentFiles().add(fileInfo.name, fileInfo.data).execute(resolve, reject);\r\n }\r\n else {\r\n // Upload the file to the objective folder\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(fileInfo.name, true, fileInfo.data).execute(resolve, reject);\r\n }\r\n });\r\n };\r\n /** Public Methods */\r\n // Generates an action button\r\n Documents.prototype.generateActionButton = function (btnType, file) {\r\n // Return the button\r\n return this.generateButton(btnType, file);\r\n };\r\n // Refreshes the documents\r\n Documents.prototype.refresh = function () {\r\n var _this = this;\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Reloading Workspace\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Reloading the workspace data. This will close afterwards.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Clear the element\r\n while (this._el.firstChild) {\r\n this._el.removeChild(this._el.firstChild);\r\n }\r\n // Render the component\r\n this.render().then(function () {\r\n // Call the event\r\n _this._props.onRefresh ? _this._props.onRefresh() : null;\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n });\r\n };\r\n // Searches the data table\r\n Documents.prototype.search = function (value) {\r\n // Search the table data\r\n this._dt.search(value);\r\n };\r\n return Documents;\r\n}());\r\nexports.Documents = Documents;\r\n\n\n//# sourceURL=webpack://dattatable/./build/documents.js?");
|
|
151
|
+
eval("\r\nvar __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Documents = exports.ActionButtonTypes = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/.pnpm/jquery@3.6.0/node_modules/jquery/dist/jquery.min.js\");\r\nvar moment = __webpack_require__(/*! moment */ \"./node_modules/.pnpm/moment@2.29.1/node_modules/moment/moment.js\");\r\nvar loadingDialog_1 = __webpack_require__(/*! ./common/loadingDialog */ \"./build/common/loadingDialog.js\");\r\nvar methods_1 = __webpack_require__(/*! ./common/methods */ \"./build/common/methods.js\");\r\nvar table_1 = __webpack_require__(/*! ./dashboard/table */ \"./build/dashboard/table.js\");\r\nvar itemForm_1 = __webpack_require__(/*! ./itemForm */ \"./build/itemForm.js\");\r\n/** Icons */\r\nvar fileEarmark_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmark */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmark.js\");\r\nvar fileEarmarkArrowDown_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown.js\");\r\nvar fileEarmarkArrowUp_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp.js\");\r\nvar fileEarmarkBarGraph_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph.js\");\r\nvar fileEarmarkBinary_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkBinary */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBinary.js\");\r\nvar fileEarmarkCode_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkCode */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkCode.js\");\r\nvar fileEarmarkExcel_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkExcel */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkExcel.js\");\r\nvar fileEarmarkImage_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkImage */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkImage.js\");\r\nvar fileEarmarkMusic_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkMusic */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkMusic.js\");\r\nvar fileEarmarkPdf_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkPdf */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPdf.js\");\r\nvar fileEarmarkPlus_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkPlus */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlus.js\");\r\nvar fileEarmarkPpt_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkPpt */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPpt.js\");\r\nvar fileEarmarkPlay_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkPlay */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlay.js\");\r\nvar fileEarmarkRichtext_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext.js\");\r\nvar fileEarmarkSpreadsheet_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet.js\");\r\nvar fileEarmarkText_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkText */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkText.js\");\r\nvar fileEarmarkWord_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkWord */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkWord.js\");\r\nvar fileEarmarkZip_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmarkZip */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkZip.js\");\r\nvar filterSquare_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/filterSquare */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/filterSquare.js\");\r\nvar front_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/front */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/front.js\");\r\nvar inputCursorText_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/inputCursorText */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/inputCursorText.js\");\r\nvar layoutTextSidebar_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/layoutTextSidebar */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/layoutTextSidebar.js\");\r\nvar x_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/x */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/x.js\");\r\n/** Action Button Types */\r\nvar ActionButtonTypes;\r\n(function (ActionButtonTypes) {\r\n ActionButtonTypes[ActionButtonTypes[\"Delete\"] = 1] = \"Delete\";\r\n ActionButtonTypes[ActionButtonTypes[\"Download\"] = 2] = \"Download\";\r\n ActionButtonTypes[ActionButtonTypes[\"Edit\"] = 3] = \"Edit\";\r\n ActionButtonTypes[ActionButtonTypes[\"Properties\"] = 4] = \"Properties\";\r\n ActionButtonTypes[ActionButtonTypes[\"View\"] = 5] = \"View\";\r\n})(ActionButtonTypes = exports.ActionButtonTypes || (exports.ActionButtonTypes = {}));\r\n/**\r\n * Documents\r\n * Renders a data table containing the contents of a document library.\r\n */\r\nvar Documents = /** @class */ (function () {\r\n // Constructor\r\n function Documents(props) {\r\n this._el = null;\r\n this._props = null;\r\n this._tblProps = null;\r\n /** The list item attachments */\r\n this._attachments = null;\r\n /** The data table */\r\n this._dt = null;\r\n // Can delete documents\r\n this._canDelete = true;\r\n // Can edit documents\r\n this._canEdit = true;\r\n // Can view documents\r\n this._canView = true;\r\n // The navigation component\r\n this._navbar = null;\r\n // The root folder of the library\r\n this._rootFolder = null;\r\n // The template files\r\n this._templatesFiles = null;\r\n // The template folders\r\n this._templateFolders = null;\r\n // Save the properties\r\n this._props = props;\r\n // Default the permissions\r\n this._canDelete = typeof (this._props.canDelete) === \"boolean\" ? this._props.canDelete : true;\r\n this._canEdit = typeof (this._props.canEdit) === \"boolean\" ? this._props.canEdit : true;\r\n this._canView = typeof (this._props.canView) === \"boolean\" ? this._props.canView : true;\r\n // Create the element\r\n this._el = document.createElement(\"div\");\r\n this._props.el ? this._props.el.appendChild(this._el) : null;\r\n // Generate the table properties\r\n this.generateTableProps();\r\n // Render the component\r\n this.render();\r\n }\r\n Object.defineProperty(Documents.prototype, \"Attachments\", {\r\n get: function () { return this._attachments; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"DataTable\", {\r\n get: function () { return this._dt; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"CanDelete\", {\r\n get: function () { return this._canDelete; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"CanEdit\", {\r\n get: function () { return this._canEdit; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"CanView\", {\r\n get: function () { return this._canView; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"Files\", {\r\n // The files\r\n get: function () {\r\n // Default the files to the root folder\r\n var files = this.RootFolder.Files.results;\r\n // Parse the folders\r\n var formsFl = false;\r\n for (var i = 0; i < this.RootFolder.Folders.results.length; i++) {\r\n var folder = this.RootFolder.Folders.results[i];\r\n // Skip the internal forms folder\r\n if (!formsFl && folder.Name == \"Forms\") {\r\n // Set the flag and skip this folder\r\n formsFl = true;\r\n continue;\r\n }\r\n // Append files\r\n files = files.concat(folder.Files.results);\r\n }\r\n // Return the files\r\n return files;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"IsAttachment\", {\r\n // Type of object we are dealing with\r\n get: function () { return this._props.itemId > 0; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"IsDocSet\", {\r\n get: function () { return this._props.docSetId > 0; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"Navigation\", {\r\n get: function () { return this._navbar; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"NavigationElement\", {\r\n // The navigation element\r\n get: function () { return this.Navigation.el; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"RootFolder\", {\r\n get: function () { return this._rootFolder; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"TableElement\", {\r\n // The table element\r\n get: function () { return this.DataTable.el; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"TemplateFiles\", {\r\n get: function () { return this._templatesFiles; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Documents.prototype, \"TemplateFolders\", {\r\n get: function () { return this._templateFolders; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /**\r\n * Copies a file to a folder to the library\r\n * @param item The dropdown item containing the file/folder to copy.\r\n */\r\n Documents.prototype.copyFile = function (item) {\r\n var _this = this;\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Initializing the Transfer\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Copying the file(s) to the workspace...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // See if this is a folder\r\n if (item.data.Files) {\r\n // Parse the files\r\n var folder = item.data;\r\n gd_sprest_bs_1.Helper.Executor(folder.Files.results, function (file) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the file contents\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFileByServerRelativeUrl(file.ServerRelativeUrl).content().execute(function (data) {\r\n // Copy the file\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(file.Name, true, data).execute(resolve, resolve);\r\n });\r\n });\r\n }).then(function () {\r\n // Close the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Refresh the page\r\n _this.refresh();\r\n });\r\n }\r\n else {\r\n // Copy the file\r\n var file_1 = item.data;\r\n file_1.content().execute(function (data) {\r\n // Copy the file\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(file_1.Name, true, data).execute(function () {\r\n // Close the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Refresh the page\r\n _this.refresh();\r\n });\r\n });\r\n }\r\n };\r\n // Generates the table columns\r\n Documents.prototype.generateColumns = function () {\r\n // See if the columns were provided\r\n if (this._props.table && this._props.table.columns) {\r\n return this._props.table.columns;\r\n }\r\n // See if we are dealing w/ attachments\r\n if (this.IsAttachment) {\r\n // Return the default columns\r\n return [\r\n {\r\n name: \"Type\",\r\n title: \"Type\"\r\n },\r\n {\r\n name: \"FileName\",\r\n title: \"Name\"\r\n },\r\n {\r\n className: \"text-end text-nowrap\",\r\n name: \"Actions\",\r\n title: \"\"\r\n }\r\n ];\r\n }\r\n // Return the default columns\r\n return [\r\n {\r\n name: \"Type\",\r\n title: \"Type\",\r\n },\r\n {\r\n name: \"Name\",\r\n title: \"Name\"\r\n },\r\n {\r\n name: \"Title\",\r\n title: \"Description\"\r\n },\r\n {\r\n name: \"FileSize\",\r\n title: \"File Size\"\r\n },\r\n {\r\n name: \"Created\",\r\n title: \"Created\"\r\n },\r\n {\r\n name: \"Author\",\r\n title: \"Created By\"\r\n },\r\n {\r\n name: \"Modified\",\r\n title: \"Modified\"\r\n },\r\n {\r\n name: \"ModifiedBy\",\r\n title: \"Modified By\"\r\n },\r\n {\r\n className: \"text-end text-nowrap\",\r\n name: \"Actions\",\r\n title: \"\"\r\n }\r\n ];\r\n };\r\n // Generates the template files/folders dropdown items\r\n Documents.prototype.generateItems = function () {\r\n var _this = this;\r\n var items = [];\r\n // Parse the template folders\r\n for (var i = 0; i < this.TemplateFolders.length; i++) {\r\n var folder = this.TemplateFolders[i];\r\n // Skip the internal forms folder\r\n if (folder.Name == \"Forms\") {\r\n continue;\r\n }\r\n // Add a dropdown item\r\n items.push({\r\n text: folder.Name,\r\n data: folder,\r\n value: folder.ServerRelativeUrl,\r\n onClick: function (item) { _this.copyFile(item); }\r\n });\r\n }\r\n // Parse the template files\r\n for (var i = 0; i < this.TemplateFiles.length; i++) {\r\n var file = this.TemplateFiles[i];\r\n // Add a dropdown item\r\n items.push({\r\n text: file.Name,\r\n data: file,\r\n value: file.ServerRelativeUrl,\r\n onClick: function (item) { _this.copyFile(item); }\r\n });\r\n }\r\n // Return the dropdown items\r\n return items.sort(function (a, b) {\r\n if (a.text < b.text) {\r\n return -1;\r\n }\r\n if (a.text > b.text) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n };\r\n // Generates the table properties\r\n Documents.prototype.generateTableProps = function () {\r\n var _this = this;\r\n // Default the indexes for the type and action buttons\r\n var idxActions = this.IsAttachment ? 2 : 8;\r\n // See if custom columns are defined\r\n if (this._props.table && this._props.table.columns) {\r\n // Clear the indexes\r\n idxActions = -1;\r\n // Parse the columns\r\n for (var i = 0; i < this._props.table.columns.length; i++) {\r\n // Update the index based on the value\r\n switch (this._props.table.columns[i].name) {\r\n // Actions\r\n case \"Actions\":\r\n idxActions = i;\r\n break;\r\n }\r\n }\r\n }\r\n // See if the column definitions are not defined\r\n var columnDefs = this._props.table ? this._props.table.dtProps : null;\r\n if (columnDefs == null) {\r\n columnDefs = [];\r\n // Add the default options for the Actions and Type\r\n idxActions >= 0 ? columnDefs.push({ targets: idxActions, orderable: false, searchable: false }) : null;\r\n }\r\n // Create the table properties\r\n this._tblProps = {\r\n el: null,\r\n dtProps: this._props.table && this._props.table.dtProps ? this._props.table.dtProps : {\r\n dom: 'rt<\"row\"<\"col-sm-4\"l><\"col-sm-4\"i><\"col-sm-4\"p>>',\r\n columnDefs: columnDefs,\r\n createdRow: function (row, data, index) {\r\n jQuery('td', row).addClass('align-middle');\r\n },\r\n // Add some classes to the dataTable elements\r\n drawCallback: function (settings) {\r\n var api = new jQuery.fn.dataTable.Api(settings);\r\n var div = api.table().container();\r\n var table = api.table().node();\r\n div.querySelector(\".dataTables_info\").classList.add(\"text-center\");\r\n div.querySelector(\".dataTables_length\").classList.add(\"pt-2\");\r\n div.querySelector(\".dataTables_paginate\").classList.add(\"pt-03\");\r\n table.classList.remove(\"no-footer\");\r\n table.classList.add(\"tbl-footer\");\r\n table.classList.add(\"table-striped\");\r\n },\r\n headerCallback: function (thead, data, start, end, display) {\r\n jQuery('th', thead).addClass('align-middle');\r\n },\r\n // Order by the 1st column by default; ascending\r\n order: [[1, \"asc\"]]\r\n },\r\n columns: this.generateColumns()\r\n };\r\n // Parse the columns\r\n gd_sprest_bs_1.Helper.Executor(this._tblProps.columns, function (col) {\r\n var customEvent = col.onRenderCell;\r\n // See if this is the type column\r\n if (col.name == \"Type\") {\r\n // Set the event to render an icon\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the file\r\n _this.renderFileIcon(el, _this.getFileName(file));\r\n // Set the filter/sort value\r\n el.setAttribute(\"data-filter\", (0, methods_1.getFileExt)(_this.getFileName(file)));\r\n el.setAttribute(\"data-sort\", (0, methods_1.getFileExt)(_this.getFileName(file)));\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n // Else, see if this is the file size\r\n else if (col.name == \"FileSize\") {\r\n // Set the event to render the size\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the file size value\r\n el.innerHTML = (0, methods_1.formatBytes)(file.Length);\r\n // Set the sort value\r\n el.setAttribute(\"data-sort\", file.Length.toString());\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n // Else, see if this is a date/time field\r\n else if (col.name == \"Created\" || col.name == \"Modified\") {\r\n // Set the event to render the size\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the date/time value\r\n var value = col.name == \"Created\" ? file.TimeCreated : file.TimeLastModified;\r\n el.innerHTML = (0, methods_1.formatTimeValue)(value);\r\n // Set the date/time filter/sort values\r\n el.setAttribute(\"data-filter\", moment(value).format(\"dddd MMMM DD YYYY\"));\r\n el.setAttribute(\"data-sort\", value);\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n // Else, see if this is a user field\r\n else if (col.name == \"Author\" || col.name == \"ModifiedBy\") {\r\n // Set the event to render the size\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the Person field Title\r\n el.innerHTML = (file[col.name] ? file[col.name][\"Title\"] : null) || \"\";\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n // Else, see if this is the \"actions\" buttons\r\n else if (col.name == \"Actions\") {\r\n // Set the event to render the size\r\n col.onRenderCell = function (el, col, file) {\r\n // Render the action buttons\r\n _this.renderActionButtons(el, file);\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n _this._props.onActionsRendered ? _this._props.onActionsRendered(el, col, file) : null;\r\n };\r\n }\r\n else {\r\n // Set the default render event\r\n col.onRenderCell = function (el, col, file) {\r\n // Set the value\r\n el.innerHTML = file[col.name] ||\r\n (file.ListItemAllFields && file.ListItemAllFields.FieldValuesAsText[col.name]) || \"\";\r\n // Call the custom event\r\n customEvent ? customEvent(el, col, file) : null;\r\n };\r\n }\r\n });\r\n };\r\n // Gets the file name\r\n Documents.prototype.getFileName = function (file) {\r\n // Return the file name\r\n return file.Name || file.FileName;\r\n };\r\n // Determines if the document can be viewed in office online servers\r\n Documents.isWopi = function (filename) {\r\n switch ((0, methods_1.getFileExt)(filename)) {\r\n // Excel\r\n case \"csv\":\r\n case \"doc\":\r\n case \"docx\":\r\n case \"dot\":\r\n case \"dotx\":\r\n case \"pot\":\r\n case \"potx\":\r\n case \"pps\":\r\n case \"ppsx\":\r\n case \"ppt\":\r\n case \"pptx\":\r\n case \"xls\":\r\n case \"xlsx\":\r\n case \"xlt\":\r\n case \"xltx\":\r\n return true;\r\n // Default\r\n default: {\r\n return false;\r\n }\r\n }\r\n };\r\n // Loads the data\r\n Documents.prototype.load = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var web = (0, gd_sprest_bs_1.Web)(_this._props.webUrl);\r\n // Clear the properties\r\n _this._rootFolder = null;\r\n _this._templateFolders = null;\r\n _this._templatesFiles = null;\r\n // See if the templates library was set\r\n if (_this._props.templatesUrl) {\r\n // Load the files and folders\r\n web.getFolderByServerRelativeUrl(_this._props.templatesUrl).query({\r\n Expand: [\"Folders/Files\", \"Files\"]\r\n }).execute(\r\n // Templates folder exists\r\n function (folder) {\r\n // Set the template files\r\n _this._templatesFiles = folder.Files.results;\r\n // Set the template folders\r\n _this._templateFolders = folder.Folders.results;\r\n }, \r\n // Error loading the templates folder\r\n function () {\r\n // Log\r\n console.error(\"[Dattatable] Document's template folder failed to be loaded.\", _this._props.templatesUrl);\r\n });\r\n }\r\n // Set the query\r\n var query = _this._props.query || {};\r\n query.Expand = (query.Expand ? query.Expand : []).concat([\r\n \"Folders/Files\", \"Folders/Files/Author\",\r\n \"Folders/Files/ListItemAllFields\", \"Folders/Files/ListItemAllFields/FieldValuesAsText\",\r\n \"Folders/Files/ModifiedBy\", \"Files\", \"Files/Author\", \"Files/ListItemAllFields\",\r\n \"Files/ListItemAllFields/FieldValuesAsText\", \"Files/ModifiedBy\"\r\n ]);\r\n // See if we are targeting a document set folder\r\n if (_this.IsDocSet) {\r\n web.Lists(_this._props.listName).Items(_this._props.docSetId).Folder().query(query).execute(function (folder) {\r\n // Set the root folder\r\n _this._rootFolder = folder;\r\n }, reject);\r\n }\r\n // Else, see if we are targeting list item attachments\r\n else if (_this.IsAttachment) {\r\n web.Lists(_this._props.listName).Items(_this._props.itemId).AttachmentFiles().execute(function (attachments) {\r\n // Set the attachments\r\n _this._attachments = attachments.results;\r\n }, reject);\r\n }\r\n // Else, it's a library\r\n else {\r\n // Load library information\r\n web.Lists(_this._props.listName).RootFolder().query(query).execute(function (folder) {\r\n // Set the root folder\r\n _this._rootFolder = folder;\r\n }, reject);\r\n }\r\n // Wait for the requests to complete\r\n web.done(function () {\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\r\n };\r\n // Renders the component\r\n Documents.prototype.render = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the data\r\n _this.load().then(function () {\r\n // Render the navigation\r\n _this.renderNavigation();\r\n // Render the table\r\n _this.renderTable();\r\n // Call the render event\r\n _this._props.onRendered ? _this._props.onRendered(_this._el) : null;\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Renders the file actions\r\n Documents.prototype.renderActionButtons = function (el, file) {\r\n // Create a span to wrap the icons in\r\n var span = document.createElement(\"span\");\r\n span.className = \"bg-white d-inline-flex ms-2 rounded\";\r\n var spanEdit = span.cloneNode();\r\n var spanProps = span.cloneNode();\r\n var spanDownload = span.cloneNode();\r\n var spanDel = span.cloneNode();\r\n spanDel.classList.add(\"me-1\");\r\n // Add the icons\r\n el.appendChild(span);\r\n el.appendChild(spanEdit);\r\n this.IsAttachment ? null : el.appendChild(spanProps);\r\n el.appendChild(spanDownload);\r\n el.appendChild(spanDel);\r\n // Render the buttons\r\n span.appendChild(this.generateButton(ActionButtonTypes.View, file));\r\n spanEdit.appendChild(this.generateButton(ActionButtonTypes.Edit, file));\r\n this.IsAttachment ? null : spanProps.appendChild(this.generateButton(ActionButtonTypes.Properties, file));\r\n spanDownload.appendChild(this.generateButton(ActionButtonTypes.Download, file));\r\n spanDel.appendChild(this.generateButton(ActionButtonTypes.Delete, file));\r\n };\r\n Documents.prototype.generateButton = function (btnType, file) {\r\n var _this = this;\r\n var isWopi = Documents.isWopi(this.getFileName(file));\r\n // Render the button based on the type\r\n switch (btnType) {\r\n case ActionButtonTypes.Delete:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"Delete\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1 btn-actions-delete\",\r\n iconType: x_1.x,\r\n iconSize: 24,\r\n isDisabled: !this.CanDelete,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n if (_this.CanDelete) {\r\n // Confirm we want to delete the item\r\n if (confirm(\"Are you sure you want to delete this document?\")) {\r\n // Display a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Deleting Document\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Deleting Document: \" + _this.getFileName(file) + \". This will close afterwards.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Delete the document\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFileByServerRelativeUrl(file.ServerRelativeUrl).delete().execute(\r\n // Success\r\n function () {\r\n // close dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Refresh the page \r\n _this.refresh();\r\n }, \r\n // Error\r\n function (err) {\r\n // TODO\r\n });\r\n }\r\n }\r\n }\r\n },\r\n }).el;\r\n case ActionButtonTypes.Download:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"Download\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1 btn-actions-download\",\r\n iconType: fileEarmarkArrowDown_1.fileEarmarkArrowDown,\r\n iconSize: 24,\r\n isDisabled: !this.CanView,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n if (_this.CanView) {\r\n window.open(gd_sprest_bs_1.ContextInfo.webServerRelativeUrl + \"/_layouts/15/download.aspx?SourceUrl=\" + file.ServerRelativeUrl, \"_blank\");\r\n }\r\n }\r\n },\r\n }).el;\r\n case ActionButtonTypes.Edit:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"Edit\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1 btn-actions-edit\",\r\n iconType: inputCursorText_1.inputCursorText,\r\n iconSize: 24,\r\n isDisabled: (!isWopi || !this.CanEdit),\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n if (isWopi && _this.CanEdit) {\r\n // Open the file in a new tab\r\n window.open(gd_sprest_bs_1.ContextInfo.webServerRelativeUrl + \"/_layouts/15/WopiFrame.aspx?sourcedoc=\" + file.ServerRelativeUrl + \"&action=edit\");\r\n }\r\n }\r\n },\r\n }).el;\r\n case ActionButtonTypes.Properties:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"Properties\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1 btn-actions-properties\",\r\n iconType: layoutTextSidebar_1.layoutTextSidebar,\r\n iconSize: 24,\r\n isDisabled: !this.CanEdit && !this.CanView,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n // Set the item form properties\r\n itemForm_1.ItemForm.ListName = _this._props.listName;\r\n itemForm_1.ItemForm.UseModal = false;\r\n // Ensure the user can edit the item\r\n if (_this.CanEdit) {\r\n // Define the properties\r\n var editProps = __assign(__assign({}, (_this._props.onItemFormEditing || {})), {\r\n // Set the item id\r\n itemId: file.ListItemAllFields[\"Id\"],\r\n // Set the edit form properties\r\n onCreateEditForm: function (props) {\r\n // Set the rendering event\r\n props.onControlRendering = function (ctrl, field) {\r\n if (field.InternalName == \"FileLeafRef\") {\r\n // Validate the name of the file\r\n ctrl.onValidate = function (ctrl, results) {\r\n var _a;\r\n // Ensure the value is less than 128 characters\r\n if (((_a = results.value) === null || _a === void 0 ? void 0 : _a.length) > 128) {\r\n // Return an error message\r\n results.invalidMessage = \"The file name must be less than 128 characters.\";\r\n results.isValid = false;\r\n }\r\n // Return the results\r\n return results;\r\n };\r\n }\r\n else if (field.InternalName == \"Title\") {\r\n // Update the label of the Title field\r\n ctrl.label = \"Description\";\r\n }\r\n };\r\n // See if a custom event exists\r\n if (_this._props.onItemFormEditing && _this._props.onItemFormEditing.onCreateEditForm) {\r\n // Return the properties\r\n return _this._props.onItemFormEditing.onCreateEditForm(props);\r\n }\r\n // Return the properties\r\n return props;\r\n },\r\n // Update the footer\r\n onSetFooter: function (el) {\r\n var updateBtn = el.querySelector('[role=\"group\"]').firstChild;\r\n updateBtn.classList.remove(\"btn-outline-primary\");\r\n updateBtn.classList.add(\"btn-primary\");\r\n // See if a custom event exists\r\n if (_this._props.onItemFormEditing && _this._props.onItemFormEditing.onSetFooter) {\r\n // Execute the event\r\n _this._props.onItemFormEditing.onSetFooter(el);\r\n }\r\n },\r\n // Update the header\r\n onSetHeader: function (el) {\r\n // Update the header\r\n el.querySelector(\"h5\").innerHTML = \"Properties\";\r\n // See if a custom event exists\r\n if (_this._props.onItemFormEditing && _this._props.onItemFormEditing.onSetHeader) {\r\n // Execute the event\r\n _this._props.onItemFormEditing.onSetHeader(el);\r\n }\r\n },\r\n // Refresh the view when updates occur\r\n onUpdate: function (item) {\r\n // See if a custom event exists\r\n if (_this._props.onItemFormEditing && _this._props.onItemFormEditing.onUpdate) {\r\n // Execute the event\r\n _this._props.onItemFormEditing.onUpdate(item);\r\n }\r\n else {\r\n // Refresh the data table\r\n _this.refresh();\r\n }\r\n }\r\n });\r\n // Show the edit form\r\n itemForm_1.ItemForm.edit(editProps);\r\n }\r\n else {\r\n // View the form\r\n itemForm_1.ItemForm.view(__assign(__assign({}, (_this._props.onItemFormViewing || {})), {\r\n itemId: file.ListItemAllFields[\"Id\"],\r\n // Set the view form properties\r\n onCreateViewForm: function (props) {\r\n // Set the rendering event\r\n props.onControlRendering = function (ctrl, field) {\r\n if (field.InternalName == \"Title\") {\r\n // Update the label of the Title field\r\n ctrl.label = \"Description\";\r\n }\r\n };\r\n // See if a custom event exists\r\n if (_this._props.onItemFormViewing && _this._props.onItemFormViewing.onCreateViewForm) {\r\n // Return the properties\r\n return _this._props.onItemFormViewing.onCreateViewForm(props);\r\n }\r\n // Return the properties\r\n return props;\r\n }\r\n }));\r\n }\r\n }\r\n }\r\n }).el;\r\n case ActionButtonTypes.View:\r\n return gd_sprest_bs_1.Components.Tooltip({\r\n content: \"View\",\r\n btnProps: {\r\n // Render the icon button\r\n className: \"img-flip-x p-1 btn-actions-view\",\r\n iconType: front_1.front,\r\n iconSize: 24,\r\n isDisabled: !this.CanView,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n if (_this.CanView) {\r\n // Open the file in a new tab\r\n window.open(isWopi ? gd_sprest_bs_1.ContextInfo.webServerRelativeUrl + \"/_layouts/15/WopiFrame.aspx?sourcedoc=\" + file.ServerRelativeUrl + \"&action=view\" : file.ServerRelativeUrl, \"_blank\");\r\n }\r\n }\r\n },\r\n }).el;\r\n }\r\n };\r\n // Renders the file icon\r\n Documents.prototype.renderFileIcon = function (el, fileName) {\r\n // Render the icon wrapper\r\n var span = document.createElement(\"span\");\r\n span.className = \"text-muted\";\r\n el.appendChild(span);\r\n // Render the icon\r\n var size = 28;\r\n switch ((0, methods_1.getFileExt)(fileName)) {\r\n // Power BI\r\n case \"pbix\":\r\n span.appendChild((0, fileEarmarkBarGraph_1.fileEarmarkBarGraph)(size));\r\n span.title = \"Power BI Report\";\r\n break;\r\n // Binary\r\n case \"bin\":\r\n case \"blg\":\r\n case \"dat\":\r\n case \"dmg\":\r\n case \"dmp\":\r\n case \"log\":\r\n case \"pbi\":\r\n span.appendChild((0, fileEarmarkBinary_1.fileEarmarkBinary)(size));\r\n span.title = \"Binary File\";\r\n break;\r\n // Code\r\n case \"app\":\r\n case \"asp\":\r\n case \"aspx\":\r\n case \"css\":\r\n case \"hta\":\r\n case \"htm\":\r\n case \"html\":\r\n case \"js\":\r\n case \"json\":\r\n case \"mht\":\r\n case \"mhtml\":\r\n case \"scss\":\r\n case \"sppkg\":\r\n case \"wsp\":\r\n case \"xml\":\r\n case \"yaml\":\r\n span.appendChild((0, fileEarmarkCode_1.fileEarmarkCode)(size));\r\n span.title = \"Code\";\r\n break;\r\n // Excel\r\n case \"csv\":\r\n case \"ods\":\r\n case \"xls\":\r\n case \"xlsx\":\r\n case \"xlt\":\r\n case \"xltx\":\r\n span.appendChild((0, fileEarmarkExcel_1.fileEarmarkExcel)(size));\r\n span.title = \"Excel Spreadsheet\";\r\n break;\r\n // Image\r\n case \"ai\":\r\n case \"bmp\":\r\n case \"eps\":\r\n case \"gif\":\r\n case \"heic\":\r\n case \"heif\":\r\n case \"jpe\":\r\n case \"jpeg\":\r\n case \"jpg\":\r\n case \"png\":\r\n case \"psd\":\r\n case \"svg\":\r\n case \"tif\":\r\n case \"tiff\":\r\n case \"webp\":\r\n span.appendChild((0, fileEarmarkImage_1.fileEarmarkImage)(size));\r\n span.title = \"Image\";\r\n break;\r\n // Audio\r\n case \"aac\":\r\n case \"aiff\":\r\n case \"alac\":\r\n case \"flac\":\r\n case \"m4a\":\r\n case \"m4p\":\r\n case \"mka\":\r\n case \"mp3\":\r\n case \"mp4a\":\r\n case \"wav\":\r\n case \"wma\":\r\n span.appendChild((0, fileEarmarkMusic_1.fileEarmarkMusic)(size));\r\n span.title = \"Audio File\";\r\n break;\r\n // PDF\r\n case \"pdf\":\r\n span.appendChild((0, fileEarmarkPdf_1.fileEarmarkPdf)(size));\r\n span.title = \"Adobe PDF\";\r\n break;\r\n // PowerPoint\r\n case \"odp\":\r\n case \"pot\":\r\n case \"potx\":\r\n case \"pps\":\r\n case \"ppsx\":\r\n case \"ppt\":\r\n case \"pptx\":\r\n span.appendChild((0, fileEarmarkPpt_1.fileEarmarkPpt)(size));\r\n span.title = \"PowerPoint Presentation\";\r\n break;\r\n // Media\r\n case \"avi\":\r\n case \"flv\":\r\n case \"m2ts\":\r\n case \"mkv\":\r\n case \"mov\":\r\n case \"m4p\":\r\n case \"m4v\":\r\n case \"mp4\":\r\n case \"mpe\":\r\n case \"mpeg\":\r\n case \"mpg\":\r\n case \"mpv\":\r\n case \"qt\":\r\n case \"ts\":\r\n case \"vob\":\r\n case \"webm\":\r\n case \"wmv\":\r\n span.appendChild((0, fileEarmarkPlay_1.fileEarmarkPlay)(size));\r\n span.title = \"Media File\";\r\n break;\r\n // Rich Text\r\n case \"rtf\":\r\n span.appendChild((0, fileEarmarkRichtext_1.fileEarmarkRichtext)(size));\r\n span.title = \"Rich Text\";\r\n break;\r\n // Database\r\n case \"ldf\":\r\n case \"mdb\":\r\n case \"mdf\":\r\n span.appendChild((0, fileEarmarkSpreadsheet_1.fileEarmarkSpreadsheet)(size));\r\n span.title = \"Database\";\r\n break;\r\n // Text\r\n case \"md\":\r\n case \"text\":\r\n case \"txt\":\r\n span.appendChild((0, fileEarmarkText_1.fileEarmarkText)(size));\r\n span.title = \"Text\";\r\n break;\r\n // Word\r\n case \"doc\":\r\n case \"docx\":\r\n case \"dot\":\r\n case \"dotx\":\r\n case \"odt\":\r\n case \"wpd\":\r\n span.appendChild((0, fileEarmarkWord_1.fileEarmarkWord)(size));\r\n span.title = \"Word Document\";\r\n break;\r\n // Compressed\r\n case \"7z\":\r\n case \"cab\":\r\n case \"gz\":\r\n case \"iso\":\r\n case \"rar\":\r\n case \"tgz\":\r\n case \"zip\":\r\n span.appendChild((0, fileEarmarkZip_1.fileEarmarkZip)(size));\r\n span.title = \"Compressed Folder\";\r\n break;\r\n // Default\r\n default: {\r\n span.appendChild((0, fileEarmark_1.fileEarmark)(size));\r\n span.title = \"File\";\r\n }\r\n }\r\n };\r\n // Renders the navigation\r\n Documents.prototype.renderNavigation = function () {\r\n var _this = this;\r\n var itemsEnd = [];\r\n // See if templates exist\r\n if (this.TemplateFiles && this.TemplateFolders) {\r\n // Add the item\r\n itemsEnd.push({\r\n text: \"Templates\",\r\n className: \"btn btn-sm btn-outline-secondary\",\r\n classNameItem: \"bg-white\",\r\n iconClassName: \"btn-icon-sm\",\r\n iconSize: 20,\r\n iconType: fileEarmarkPlus_1.fileEarmarkPlus,\r\n isButton: true,\r\n items: this.generateItems()\r\n });\r\n }\r\n // Add the upload button\r\n itemsEnd.push({\r\n text: \"Upload\",\r\n onRender: function (el, item) {\r\n // Clear the existing button\r\n el.innerHTML = \"\";\r\n // Create a span to wrap the icon in\r\n var span = document.createElement(\"span\");\r\n span.className = \"bg-white d-inline-flex ms-2 rounded\";\r\n el.appendChild(span);\r\n // Render a tooltip\r\n gd_sprest_bs_1.Components.Tooltip({\r\n el: span,\r\n content: item.text,\r\n btnProps: {\r\n // Render the icon button\r\n className: \"p-1\",\r\n iconType: fileEarmarkArrowUp_1.fileEarmarkArrowUp,\r\n iconSize: 24,\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n // Show the file upload dialog\r\n gd_sprest_bs_1.Helper.ListForm.showFileDialog().then(function (fileInfo) {\r\n // Code to run after the event\r\n var onCompleted = function (fileInfo) {\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Uploading File\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Saving the file you selected. Please wait...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Upload the file\r\n _this.uploadFile(fileInfo).then(\r\n // Success\r\n function (file) {\r\n // Call the event\r\n _this._props.onFileAdded ? _this._props.onFileAdded(file) : null;\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Refresh the page\r\n _this.refresh();\r\n }, \r\n // Error\r\n function () {\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n });\r\n };\r\n // Call the file adding event\r\n var returnVal = _this._props.onFileAdding ? _this._props.onFileAdding(fileInfo) : null;\r\n if (typeof (returnVal) === \"boolean\") {\r\n // Add the file\r\n returnVal ? onCompleted(fileInfo) : null;\r\n }\r\n // Else, see if it doesn't exist\r\n else if (returnVal == null) {\r\n // Add the file\r\n onCompleted(fileInfo);\r\n }\r\n else if (returnVal.then) {\r\n // Wait for the event to complete\r\n returnVal.then(function (addFile) {\r\n // Add the file\r\n addFile ? onCompleted(fileInfo) : null;\r\n });\r\n }\r\n });\r\n }\r\n },\r\n });\r\n }\r\n });\r\n // Set the default properties\r\n var navProps = {\r\n el: this._el,\r\n brand: \"Documents\",\r\n itemsEnd: itemsEnd,\r\n searchBox: this._props.enableSearch ? {\r\n hideButton: true,\r\n onChange: function (value) {\r\n // Search the data table\r\n _this._dt.search(value);\r\n },\r\n onSearch: function (value) {\r\n // Search the data table\r\n _this._dt.search(value);\r\n }\r\n } : null\r\n };\r\n // Call the rendering event\r\n this._props.onNavigationRendering ? this._props.onNavigationRendering(navProps) : null;\r\n // Create the navbar\r\n this._navbar = gd_sprest_bs_1.Components.Navbar(navProps);\r\n /* Fix the padding on the left & right of the nav */\r\n this._navbar.el.querySelector(\"div.container-fluid\").classList.add(\"ps-75\");\r\n this._navbar.el.querySelector(\"div.container-fluid\").classList.add(\"pe-2\");\r\n // See if we are showing the filter\r\n if (this._props.onShowFilter) {\r\n // Render the filter icon\r\n var icon = document.createElement(\"div\");\r\n icon.classList.add(\"filter-icon\");\r\n icon.classList.add(\"nav-link\");\r\n icon.classList.add(\"text-dark\");\r\n icon.style.cursor = \"pointer\";\r\n icon.appendChild((0, filterSquare_1.filterSquare)());\r\n this._props.onShowFilter ? icon.addEventListener(\"click\", this._props.onShowFilter) : null;\r\n this._navbar.el.firstElementChild.appendChild(icon);\r\n // Call the render event\r\n this._props.onFilterRendered ? this._props.onFilterRendered(icon) : null;\r\n }\r\n // Call the render events\r\n this._props.onSearchRendered ? this._props.onSearchRendered(this._navbar.el.querySelector(\"input[type='search']\")) : null;\r\n this._props.onNavigationRendered ? this._props.onNavigationRendered(this.Navigation) : null;\r\n };\r\n // Renders the datatable with the file information\r\n Documents.prototype.renderTable = function () {\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n this._el.appendChild(el);\r\n this._tblProps.el = el;\r\n // Set the data\r\n this._tblProps.rows = this.Attachments || this.Files;\r\n // Call the rendering event\r\n this._props.table && this._props.table.onRendering ? this._props.table.onRendering(this._tblProps) : null;\r\n // Render the table\r\n this._dt = new table_1.DataTable(this._tblProps);\r\n // Call the rendered event\r\n this._tblProps.onRendered ? this._tblProps.onRendered(el, this._dt.datatable) : null;\r\n };\r\n // Uploads a file\r\n Documents.prototype.uploadFile = function (fileInfo) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var list = (0, gd_sprest_bs_1.List)(_this._props.listName);\r\n // See if this is an attachment\r\n if (_this.IsAttachment) {\r\n // Upload the attachment\r\n list.Items(_this._props.itemId).AttachmentFiles().add(fileInfo.name, fileInfo.data).execute(resolve, reject);\r\n }\r\n else {\r\n // Upload the file to the objective folder\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).getFolderByServerRelativeUrl(_this._rootFolder.ServerRelativeUrl).Files().add(fileInfo.name, true, fileInfo.data).execute(resolve, reject);\r\n }\r\n });\r\n };\r\n /** Public Methods */\r\n // Generates an action button\r\n Documents.prototype.generateActionButton = function (btnType, file) {\r\n // Return the button\r\n return this.generateButton(btnType, file);\r\n };\r\n // Refreshes the documents\r\n Documents.prototype.refresh = function () {\r\n var _this = this;\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Reloading Workspace\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Reloading the workspace data. This will close afterwards.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Clear the element\r\n while (this._el.firstChild) {\r\n this._el.removeChild(this._el.firstChild);\r\n }\r\n // Render the component\r\n this.render().then(function () {\r\n // Call the event\r\n _this._props.onRefresh ? _this._props.onRefresh() : null;\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n });\r\n };\r\n // Searches the data table\r\n Documents.prototype.search = function (value) {\r\n // Search the table data\r\n this._dt.search(value);\r\n };\r\n return Documents;\r\n}());\r\nexports.Documents = Documents;\r\n\n\n//# sourceURL=webpack://dattatable/./build/documents.js?");
|
|
152
152
|
|
|
153
153
|
/***/ }),
|
|
154
154
|
|
|
@@ -170,7 +170,7 @@ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create
|
|
|
170
170
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
171
171
|
|
|
172
172
|
"use strict";
|
|
173
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ItemForm = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/index.js\");\r\nvar common_1 = __webpack_require__(/*! ./common */ \"./build/common/index.js\");\r\n/**\r\n * Item Form\r\n */\r\nvar ItemForm = /** @class */ (function () {\r\n function ItemForm() {\r\n }\r\n Object.defineProperty(ItemForm, \"AutoClose\", {\r\n // Auto Close Flag\r\n set: function (value) {\r\n // Update the flag\r\n this.UseModal ? common_1.Modal.setAutoClose(value) : common_1.CanvasForm.setAutoClose(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"DisplayForm\", {\r\n get: function () { return this._displayForm; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"EditForm\", {\r\n get: function () { return this._editForm; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"FormInfo\", {\r\n get: function () { return this._info; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"IsDisplay\", {\r\n get: function () { return this._controlMode == gd_sprest_bs_1.SPTypes.ControlMode.Display; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"IsEdit\", {\r\n get: function () { return this._controlMode == gd_sprest_bs_1.SPTypes.ControlMode.Edit; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"IsNew\", {\r\n get: function () { return this._controlMode == gd_sprest_bs_1.SPTypes.ControlMode.New; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"ListName\", {\r\n get: function () { return this._listName; },\r\n set: function (value) { this._listName = value; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"UseModal\", {\r\n get: function () { return this._useModal; },\r\n set: function (value) { this._useModal = value; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /** Public Methods */\r\n // Closes the item form\r\n ItemForm.close = function () {\r\n this._useModal ? common_1.Modal.hide() : common_1.CanvasForm.hide();\r\n };\r\n // Creates a new task\r\n ItemForm.create = function (props) {\r\n if (props === void 0) { props = {}; }\r\n // Set the properties\r\n this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.New;\r\n this._onCreateEditForm = props.onCreateEditForm;\r\n this._onFormButtonsRendering = props.onFormButtonsRendering;\r\n this._onGetListInfo = props.onGetListInfo;\r\n this._onSave = props.onSave;\r\n this._onSetFooter = props.onSetFooter;\r\n this._onSetHeader = props.onSetHeader;\r\n this._onValidation = props.onValidation;\r\n this._updateEvent = props.onUpdate;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the item\r\n this.load(props.webUrl);\r\n };\r\n // Edits a task\r\n ItemForm.edit = function (props) {\r\n // Set the properties\r\n this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.Edit;\r\n this._onCreateEditForm = props.onCreateEditForm;\r\n this._onFormButtonsRendering = props.onFormButtonsRendering;\r\n this._onGetListInfo = props.onGetListInfo;\r\n this._onSave = props.onSave;\r\n this._onSetFooter = props.onSetFooter;\r\n this._onSetHeader = props.onSetHeader;\r\n this._onValidation = props.onValidation;\r\n this._updateEvent = props.onUpdate;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the form\r\n this.load(props.webUrl, props.itemId);\r\n };\r\n // Views the task\r\n ItemForm.view = function (props) {\r\n // Set the properties\r\n this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.Display;\r\n this._onCreateViewForm = props.onCreateViewForm;\r\n this._onFormButtonsRendering = props.onFormButtonsRendering;\r\n this._onGetListInfo = props.onGetListInfo;\r\n this._onSetFooter = props.onSetFooter;\r\n this._onSetHeader = props.onSetHeader;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the form\r\n this.load(props.webUrl, props.itemId);\r\n };\r\n /** private static Methods */\r\n // Load the form information\r\n ItemForm.load = function (webUrl, itemId) {\r\n var _this = this;\r\n // Clear the forms\r\n this._displayForm = null;\r\n this._editForm = null;\r\n // Show a loading dialog\r\n common_1.LoadingDialog.setHeader(\"Loading the Item\");\r\n common_1.LoadingDialog.setBody(\"This will close after the form is loaded...\");\r\n common_1.LoadingDialog.show();\r\n // Set the list form properties\r\n var listProps = {\r\n listName: this.ListName,\r\n itemId: itemId,\r\n webUrl: webUrl\r\n };\r\n // Call the event\r\n listProps = this._onGetListInfo ? this._onGetListInfo(listProps) : listProps;\r\n // Load the form information\r\n gd_sprest_bs_1.Helper.ListForm.create(listProps).then(function (info) {\r\n // Save the form information\r\n _this._info = info;\r\n // Set the header\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).setHeader('<h5 class=\"m-0\">' + (_this._info.item ? _this._info.item.Title : \"Create Item\") + '</h5>');\r\n // Call the header event\r\n _this._onSetHeader ? _this._onSetHeader(_this._useModal ? common_1.Modal.HeaderElement : common_1.CanvasForm.HeaderElement) : null;\r\n // Render the form based on the type\r\n if (_this.IsDisplay) {\r\n var el = document.createElement(\"div\");\r\n var props = {\r\n el: el,\r\n info: _this._info,\r\n rowClassName: \"mb-3\"\r\n };\r\n // Call the event if it exists\r\n props = _this._onCreateViewForm ? _this._onCreateViewForm(props) : props;\r\n // Render the display form\r\n _this._displayForm = gd_sprest_bs_1.Components.ListForm.renderDisplayForm(props);\r\n /* Remove the bottom margin from the last row of the form */\r\n _this._displayForm.el.lastChild.classList.remove(\"mb-3\");\r\n // Render the form buttons\r\n var elButtons = document.createElement(\"div\");\r\n el.appendChild(elButtons);\r\n // Add styling if not using a modal\r\n if (!_this._useModal) {\r\n elButtons.classList.add(\"float-end\");\r\n elButtons.style.padding = \"1rem 0\";\r\n }\r\n // Append the create/update button\r\n _this._useModal ? common_1.Modal.setFooter(elButtons) : el.appendChild(elButtons);\r\n // Call the item form button rendering event\r\n var formButtons = [];\r\n formButtons = _this._onFormButtonsRendering ? _this._onFormButtonsRendering(formButtons) : formButtons;\r\n // Render the form buttons\r\n formButtons && formButtons.length > 0 ? gd_sprest_bs_1.Components.ButtonGroup({\r\n el: elButtons,\r\n buttons: formButtons\r\n }) : null;\r\n // Call the footer event\r\n _this._onSetFooter ? _this._onSetFooter(_this._useModal ? common_1.Modal.FooterElement : elButtons) : null;\r\n // Update the body\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).setBody(el);\r\n }\r\n else {\r\n var el = document.createElement(\"div\");\r\n var props = {\r\n el: el,\r\n info: _this._info,\r\n rowClassName: \"mb-3\",\r\n controlMode: _this.IsNew ? gd_sprest_bs_1.SPTypes.ControlMode.New : gd_sprest_bs_1.SPTypes.ControlMode.Edit\r\n };\r\n // Call the event if it exists\r\n props = _this._onCreateEditForm ? _this._onCreateEditForm(props) : props;\r\n // Render the edit form\r\n _this._editForm = gd_sprest_bs_1.Components.ListForm.renderEditForm(props);\r\n /* Remove the bottom margin from the last row of the form */\r\n _this._editForm.el.lastChild.classList.remove(\"mb-3\");\r\n // Render the form buttons\r\n var elButtons = document.createElement(\"div\");\r\n // Add styling if not using a modal\r\n if (!_this._useModal) {\r\n elButtons.classList.add(\"float-end\");\r\n elButtons.style.padding = \"1rem 0\";\r\n }\r\n // Append the create/update button\r\n _this._useModal ? common_1.Modal.setFooter(elButtons) : el.appendChild(elButtons);\r\n // Call the item form button rendering event\r\n var formButtons = [{\r\n text: _this.IsNew ? \"Create\" : \"Update\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () { _this.save(_this._editForm); }\r\n }];\r\n formButtons = _this._onFormButtonsRendering ? _this._onFormButtonsRendering(formButtons) : formButtons;\r\n // Render the form buttons\r\n formButtons && formButtons.length > 0 ? gd_sprest_bs_1.Components.ButtonGroup({\r\n el: elButtons,\r\n buttons: formButtons\r\n }) : null;\r\n // Call the footer event\r\n _this._onSetFooter ? _this._onSetFooter(_this._useModal ? common_1.Modal.FooterElement : elButtons) : null;\r\n // Update the body\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).setBody(el);\r\n }\r\n // Close the dialog\r\n common_1.LoadingDialog.hide();\r\n // Show the form\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).show();\r\n });\r\n };\r\n // Saves the edit form\r\n ItemForm.save = function (form) {\r\n var _this = this;\r\n if (form === void 0) { form = this._editForm; }\r\n // Validate the form\r\n this.validate(form).then(\r\n // Success\r\n function () {\r\n // Display a loading dialog\r\n common_1.LoadingDialog.setHeader(\"Saving the Item\");\r\n common_1.LoadingDialog.setBody((_this.IsNew ? \"Creating\" : \"Updating\") + \" the Item\");\r\n common_1.LoadingDialog.show();\r\n // Saves the item\r\n var saveItem = function (values) {\r\n // Save the item\r\n gd_sprest_bs_1.Components.ListForm.saveItem(_this._info, values).then(function (item) {\r\n // Call the update event\r\n _this._updateEvent ? _this._updateEvent(item) : null;\r\n // Close the dialogs\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).hide();\r\n common_1.LoadingDialog.hide();\r\n });\r\n };\r\n // Call the save event\r\n var values = form.getValues();\r\n values = _this._onSave ? _this._onSave(values) : values;\r\n // See if the onSave event returned a promise\r\n if (values && typeof (values.then) === \"function\") {\r\n // Wait for the promise to complete\r\n values.then(function (values) {\r\n // Save the item\r\n saveItem(values);\r\n });\r\n }\r\n else {\r\n // Save the item\r\n saveItem(values);\r\n }\r\n }, \r\n // Error\r\n function () {\r\n // Do Nothing\r\n });\r\n };\r\n // Validates the form\r\n ItemForm.validate = function (form) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var isValid = form.isValid();\r\n // Display a loading dialog\r\n common_1.LoadingDialog.setHeader(\"Validation\");\r\n common_1.LoadingDialog.setBody(\"Validating the form...\");\r\n common_1.LoadingDialog.show();\r\n // Ensure it's valid\r\n if (!isValid) {\r\n // Close the dialog\r\n common_1.LoadingDialog.hide();\r\n // Reject the request\r\n reject();\r\n return;\r\n }\r\n // Call the validation event\r\n var returnVal = _this._onValidation ? _this._onValidation(form.getValues()) : null;\r\n if (returnVal && typeof (returnVal.then) === \"function\") {\r\n // Wait for the promise to complete\r\n returnVal.then(function (isValid) {\r\n // Close the dialog\r\n common_1.LoadingDialog.hide();\r\n // Resolve the request\r\n isValid ? resolve() : reject();\r\n });\r\n }\r\n else {\r\n if (typeof (returnVal) === \"boolean\") {\r\n // Update the flag\r\n isValid = returnVal;\r\n }\r\n // Close the dialog\r\n common_1.LoadingDialog.hide();\r\n // Resolve the request\r\n isValid ? resolve() : reject();\r\n }\r\n });\r\n };\r\n ItemForm._onCreateEditForm = null;\r\n ItemForm._onCreateViewForm = null;\r\n ItemForm._onFormButtonsRendering = null;\r\n ItemForm._onGetListInfo = null;\r\n ItemForm._onSetFooter = null;\r\n ItemForm._onSetHeader = null;\r\n ItemForm._onSave = null;\r\n ItemForm._onValidation = null;\r\n ItemForm._updateEvent = null;\r\n // Display Form\r\n ItemForm._displayForm = null;\r\n // Edit Form\r\n ItemForm._editForm = null;\r\n // Form Information\r\n ItemForm._info = null;\r\n // Form Modes\r\n ItemForm._controlMode = null;\r\n // List name\r\n ItemForm._listName = null;\r\n // Flag to use a modal or canvas (default)\r\n ItemForm._useModal = false;\r\n return ItemForm;\r\n}());\r\nexports.ItemForm = ItemForm;\r\n\n\n//# sourceURL=webpack://dattatable/./build/itemForm.js?");
|
|
173
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ItemForm = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js\");\r\nvar common_1 = __webpack_require__(/*! ./common */ \"./build/common/index.js\");\r\n/**\r\n * Item Form\r\n */\r\nvar ItemForm = /** @class */ (function () {\r\n function ItemForm() {\r\n }\r\n Object.defineProperty(ItemForm, \"AutoClose\", {\r\n // Auto Close Flag\r\n set: function (value) {\r\n // Update the flag\r\n this.UseModal ? common_1.Modal.setAutoClose(value) : common_1.CanvasForm.setAutoClose(value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"DisplayForm\", {\r\n get: function () { return this._displayForm; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"EditForm\", {\r\n get: function () { return this._editForm; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"FormInfo\", {\r\n get: function () { return this._info; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"IsDisplay\", {\r\n get: function () { return this._controlMode == gd_sprest_bs_1.SPTypes.ControlMode.Display; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"IsEdit\", {\r\n get: function () { return this._controlMode == gd_sprest_bs_1.SPTypes.ControlMode.Edit; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"IsNew\", {\r\n get: function () { return this._controlMode == gd_sprest_bs_1.SPTypes.ControlMode.New; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"ListName\", {\r\n get: function () { return this._listName; },\r\n set: function (value) { this._listName = value; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"UseModal\", {\r\n get: function () { return this._useModal; },\r\n set: function (value) { this._useModal = value; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /** Public Methods */\r\n // Closes the item form\r\n ItemForm.close = function () {\r\n this._useModal ? common_1.Modal.hide() : common_1.CanvasForm.hide();\r\n };\r\n // Creates a new task\r\n ItemForm.create = function (props) {\r\n if (props === void 0) { props = {}; }\r\n // Set the properties\r\n this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.New;\r\n this._onCreateEditForm = props.onCreateEditForm;\r\n this._onFormButtonsRendering = props.onFormButtonsRendering;\r\n this._onGetListInfo = props.onGetListInfo;\r\n this._onSave = props.onSave;\r\n this._onSetFooter = props.onSetFooter;\r\n this._onSetHeader = props.onSetHeader;\r\n this._onValidation = props.onValidation;\r\n this._updateEvent = props.onUpdate;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the item\r\n this.load(props.webUrl);\r\n };\r\n // Edits a task\r\n ItemForm.edit = function (props) {\r\n // Set the properties\r\n this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.Edit;\r\n this._onCreateEditForm = props.onCreateEditForm;\r\n this._onFormButtonsRendering = props.onFormButtonsRendering;\r\n this._onGetListInfo = props.onGetListInfo;\r\n this._onSave = props.onSave;\r\n this._onSetFooter = props.onSetFooter;\r\n this._onSetHeader = props.onSetHeader;\r\n this._onValidation = props.onValidation;\r\n this._updateEvent = props.onUpdate;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the form\r\n this.load(props.webUrl, props.itemId);\r\n };\r\n // Views the task\r\n ItemForm.view = function (props) {\r\n // Set the properties\r\n this._controlMode = gd_sprest_bs_1.SPTypes.ControlMode.Display;\r\n this._onCreateViewForm = props.onCreateViewForm;\r\n this._onFormButtonsRendering = props.onFormButtonsRendering;\r\n this._onGetListInfo = props.onGetListInfo;\r\n this._onSetFooter = props.onSetFooter;\r\n this._onSetHeader = props.onSetHeader;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the form\r\n this.load(props.webUrl, props.itemId);\r\n };\r\n /** private static Methods */\r\n // Load the form information\r\n ItemForm.load = function (webUrl, itemId) {\r\n var _this = this;\r\n // Clear the forms\r\n this._displayForm = null;\r\n this._editForm = null;\r\n // Show a loading dialog\r\n common_1.LoadingDialog.setHeader(\"Loading the Item\");\r\n common_1.LoadingDialog.setBody(\"This will close after the form is loaded...\");\r\n common_1.LoadingDialog.show();\r\n // Set the list form properties\r\n var listProps = {\r\n listName: this.ListName,\r\n itemId: itemId,\r\n webUrl: webUrl\r\n };\r\n // Call the event\r\n listProps = this._onGetListInfo ? this._onGetListInfo(listProps) : listProps;\r\n // Load the form information\r\n gd_sprest_bs_1.Helper.ListForm.create(listProps).then(function (info) {\r\n // Save the form information\r\n _this._info = info;\r\n // Set the header\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).setHeader('<h5 class=\"m-0\">' + (_this._info.item ? _this._info.item.Title : \"Create Item\") + '</h5>');\r\n // Call the header event\r\n _this._onSetHeader ? _this._onSetHeader(_this._useModal ? common_1.Modal.HeaderElement : common_1.CanvasForm.HeaderElement) : null;\r\n // Render the form based on the type\r\n if (_this.IsDisplay) {\r\n var el = document.createElement(\"div\");\r\n var props = {\r\n el: el,\r\n info: _this._info,\r\n rowClassName: \"mb-3\"\r\n };\r\n // Call the event if it exists\r\n props = _this._onCreateViewForm ? _this._onCreateViewForm(props) : props;\r\n // Render the display form\r\n _this._displayForm = gd_sprest_bs_1.Components.ListForm.renderDisplayForm(props);\r\n /* Remove the bottom margin from the last row of the form */\r\n _this._displayForm.el.lastChild.classList.remove(\"mb-3\");\r\n // Render the form buttons\r\n var elButtons = document.createElement(\"div\");\r\n el.appendChild(elButtons);\r\n // Add styling if not using a modal\r\n if (!_this._useModal) {\r\n elButtons.classList.add(\"float-end\");\r\n elButtons.style.padding = \"1rem 0\";\r\n }\r\n // Append the create/update button\r\n _this._useModal ? common_1.Modal.setFooter(elButtons) : el.appendChild(elButtons);\r\n // Call the item form button rendering event\r\n var formButtons = [];\r\n formButtons = _this._onFormButtonsRendering ? _this._onFormButtonsRendering(formButtons) : formButtons;\r\n // Render the form buttons\r\n formButtons && formButtons.length > 0 ? gd_sprest_bs_1.Components.ButtonGroup({\r\n el: elButtons,\r\n buttons: formButtons\r\n }) : null;\r\n // Call the footer event\r\n _this._onSetFooter ? _this._onSetFooter(_this._useModal ? common_1.Modal.FooterElement : elButtons) : null;\r\n // Update the body\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).setBody(el);\r\n }\r\n else {\r\n var el = document.createElement(\"div\");\r\n var props = {\r\n el: el,\r\n info: _this._info,\r\n rowClassName: \"mb-3\",\r\n controlMode: _this.IsNew ? gd_sprest_bs_1.SPTypes.ControlMode.New : gd_sprest_bs_1.SPTypes.ControlMode.Edit\r\n };\r\n // Call the event if it exists\r\n props = _this._onCreateEditForm ? _this._onCreateEditForm(props) : props;\r\n // Render the edit form\r\n _this._editForm = gd_sprest_bs_1.Components.ListForm.renderEditForm(props);\r\n /* Remove the bottom margin from the last row of the form */\r\n _this._editForm.el.lastChild.classList.remove(\"mb-3\");\r\n // Render the form buttons\r\n var elButtons = document.createElement(\"div\");\r\n // Add styling if not using a modal\r\n if (!_this._useModal) {\r\n elButtons.classList.add(\"float-end\");\r\n elButtons.style.padding = \"1rem 0\";\r\n }\r\n // Append the create/update button\r\n _this._useModal ? common_1.Modal.setFooter(elButtons) : el.appendChild(elButtons);\r\n // Call the item form button rendering event\r\n var formButtons = [{\r\n text: _this.IsNew ? \"Create\" : \"Update\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () { _this.save(_this._editForm); }\r\n }];\r\n formButtons = _this._onFormButtonsRendering ? _this._onFormButtonsRendering(formButtons) : formButtons;\r\n // Render the form buttons\r\n formButtons && formButtons.length > 0 ? gd_sprest_bs_1.Components.ButtonGroup({\r\n el: elButtons,\r\n buttons: formButtons\r\n }) : null;\r\n // Call the footer event\r\n _this._onSetFooter ? _this._onSetFooter(_this._useModal ? common_1.Modal.FooterElement : elButtons) : null;\r\n // Update the body\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).setBody(el);\r\n }\r\n // Close the dialog\r\n common_1.LoadingDialog.hide();\r\n // Show the form\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).show();\r\n });\r\n };\r\n // Saves the edit form\r\n ItemForm.save = function (form) {\r\n var _this = this;\r\n if (form === void 0) { form = this._editForm; }\r\n // Validate the form\r\n this.validate(form).then(\r\n // Success\r\n function () {\r\n // Display a loading dialog\r\n common_1.LoadingDialog.setHeader(\"Saving the Item\");\r\n common_1.LoadingDialog.setBody((_this.IsNew ? \"Creating\" : \"Updating\") + \" the Item\");\r\n common_1.LoadingDialog.show();\r\n // Saves the item\r\n var saveItem = function (values) {\r\n // Save the item\r\n gd_sprest_bs_1.Components.ListForm.saveItem(_this._info, values).then(function (item) {\r\n // Call the update event\r\n _this._updateEvent ? _this._updateEvent(item) : null;\r\n // Close the dialogs\r\n (_this._useModal ? common_1.Modal : common_1.CanvasForm).hide();\r\n common_1.LoadingDialog.hide();\r\n });\r\n };\r\n // Call the save event\r\n var values = form.getValues();\r\n values = _this._onSave ? _this._onSave(values) : values;\r\n // See if the onSave event returned a promise\r\n if (values && typeof (values.then) === \"function\") {\r\n // Wait for the promise to complete\r\n values.then(function (values) {\r\n // Save the item\r\n saveItem(values);\r\n });\r\n }\r\n else {\r\n // Save the item\r\n saveItem(values);\r\n }\r\n }, \r\n // Error\r\n function () {\r\n // Do Nothing\r\n });\r\n };\r\n // Validates the form\r\n ItemForm.validate = function (form) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var isValid = form.isValid();\r\n // Display a loading dialog\r\n common_1.LoadingDialog.setHeader(\"Validation\");\r\n common_1.LoadingDialog.setBody(\"Validating the form...\");\r\n common_1.LoadingDialog.show();\r\n // Ensure it's valid\r\n if (!isValid) {\r\n // Close the dialog\r\n common_1.LoadingDialog.hide();\r\n // Reject the request\r\n reject();\r\n return;\r\n }\r\n // Call the validation event\r\n var returnVal = _this._onValidation ? _this._onValidation(form.getValues()) : null;\r\n if (returnVal && typeof (returnVal.then) === \"function\") {\r\n // Wait for the promise to complete\r\n returnVal.then(function (isValid) {\r\n // Close the dialog\r\n common_1.LoadingDialog.hide();\r\n // Resolve the request\r\n isValid ? resolve() : reject();\r\n });\r\n }\r\n else {\r\n if (typeof (returnVal) === \"boolean\") {\r\n // Update the flag\r\n isValid = returnVal;\r\n }\r\n // Close the dialog\r\n common_1.LoadingDialog.hide();\r\n // Resolve the request\r\n isValid ? resolve() : reject();\r\n }\r\n });\r\n };\r\n ItemForm._onCreateEditForm = null;\r\n ItemForm._onCreateViewForm = null;\r\n ItemForm._onFormButtonsRendering = null;\r\n ItemForm._onGetListInfo = null;\r\n ItemForm._onSetFooter = null;\r\n ItemForm._onSetHeader = null;\r\n ItemForm._onSave = null;\r\n ItemForm._onValidation = null;\r\n ItemForm._updateEvent = null;\r\n // Display Form\r\n ItemForm._displayForm = null;\r\n // Edit Form\r\n ItemForm._editForm = null;\r\n // Form Information\r\n ItemForm._info = null;\r\n // Form Modes\r\n ItemForm._controlMode = null;\r\n // List name\r\n ItemForm._listName = null;\r\n // Flag to use a modal or canvas (default)\r\n ItemForm._useModal = false;\r\n return ItemForm;\r\n}());\r\nexports.ItemForm = ItemForm;\r\n\n\n//# sourceURL=webpack://dattatable/./build/itemForm.js?");
|
|
174
174
|
|
|
175
175
|
/***/ }),
|
|
176
176
|
|
|
@@ -1763,585 +1763,585 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
1763
1763
|
|
|
1764
1764
|
/***/ }),
|
|
1765
1765
|
|
|
1766
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1766
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js":
|
|
1767
1767
|
/*!**************************************************************************************************!*\
|
|
1768
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1768
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js ***!
|
|
1769
1769
|
\**************************************************************************************************/
|
|
1770
1770
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1771
1771
|
|
|
1772
1772
|
"use strict";
|
|
1773
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1773
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js?");
|
|
1774
1774
|
|
|
1775
1775
|
/***/ }),
|
|
1776
1776
|
|
|
1777
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1777
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/datetime/index.js":
|
|
1778
1778
|
/*!************************************************************************************************************!*\
|
|
1779
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1779
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/datetime/index.js ***!
|
|
1780
1780
|
\************************************************************************************************************/
|
|
1781
1781
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1782
1782
|
|
|
1783
1783
|
"use strict";
|
|
1784
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DateTimeControlType = exports.DateTime = void 0;\r\n__webpack_require__(/*! flatpickr/dist/flatpickr.min.js */ \"./node_modules/.pnpm/flatpickr@4.6.10/node_modules/flatpickr/dist/flatpickr.min.js\");\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\n/**\r\n * Date/Time\r\n */\r\nvar DateTime = function (props) {\r\n // Create the date/time element\r\n var elDateTime = document.createElement(\"div\");\r\n elDateTime.className = \"date-time\";\r\n // Create the textbox\r\n var textbox = gd_bs_1.Components.InputGroup({\r\n el: elDateTime,\r\n label: props.label\r\n });\r\n // See if we are disabling the textbox\r\n if (props.disabled) {\r\n // Disable the input element\r\n textbox.el.querySelector(\"input\").disabled = true;\r\n }\r\n // Get the options and default the values\r\n var options = props.options || {};\r\n options.enableTime = props.showTime;\r\n options.dateFormat = options.dateFormat || (\"m-d-Y\" + (props.showTime ? \" H:i K\" : \"\"));\r\n // See if the value is a string\r\n if (typeof (props.value) === \"string\") {\r\n options.defaultDate = new Date(props.value);\r\n }\r\n else {\r\n // Set the value\r\n options.defaultDate = props.value;\r\n }\r\n // Apply the plugin\r\n var datetime = flatpickr(textbox.el.querySelector(\"input\"), options);\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.appendChild(elDateTime);\r\n // See if we are rendering it to an element\r\n if (props.el) {\r\n // Ensure the parent element exists\r\n if (props.el.parentElement && props.el.parentElement.classList) {\r\n // Set the bootstrap class\r\n props.el.parentElement.classList.contains(\"bs\") ? null : props.el.parentElement.classList.add(\"bs\");\r\n }\r\n // Append the elements\r\n while (el.children.length > 0) {\r\n props.el.appendChild(el.children[0]);\r\n }\r\n // Update the element\r\n el = props.el;\r\n }\r\n else {\r\n // Set the bootstrap class\r\n el.classList.add(\"bs\");\r\n }\r\n // Create the object\r\n var obj = {\r\n el: elDateTime,\r\n flatpickrObj: datetime,\r\n getDate: function () { return datetime.selectedDates[0]; },\r\n getValue: function () { return textbox.getValue(); },\r\n setValue: function (dt, dtFormat) {\r\n // Default the format\r\n dtFormat = dtFormat || (props.options ? props.options.dateFormat : null);\r\n // Set the date/time\r\n datetime.setDate(dt, true, dtFormat);\r\n }\r\n };\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(obj) : null;\r\n // Return the object\r\n return obj;\r\n};\r\nexports.DateTime = DateTime;\r\n// Customize the form control\r\nexports.DateTimeControlType = 100;\r\ngd_bs_1.Components.FormControlTypes[\"DateTime\"] = exports.DateTimeControlType;\r\ngd_bs_1.Components.CustomControls.registerType(exports.DateTimeControlType, function (props) {\r\n var dt = null;\r\n // Set the created method\r\n var onRendered = props.onControlRendered;\r\n props.onControlRendered = function (ctrl) {\r\n // Render a date/time\r\n dt = (0, exports.DateTime)({\r\n className: props.className,\r\n disabled: props.isReadonly,\r\n el: ctrl.el,\r\n options: props.options,\r\n showTime: props.showTime,\r\n value: props.value\r\n });\r\n // See if the label exists\r\n var elLabel = ctrl[\"_elLabel\"];\r\n if (elLabel) {\r\n // Set the id and aria properties\r\n elLabel ? elLabel.id = (props.id || props.name) + \"_label\" : null;\r\n dt.el.querySelector(\"input\").setAttribute(\"aria-labelledby\", elLabel.id);\r\n }\r\n // Set the control\r\n ctrl.setControl(dt);\r\n // Call the custom render event\r\n onRendered ? onRendered(ctrl) : null;\r\n };\r\n var onValidate = props.onValidate;\r\n props.onValidate = function (ctrl, result) {\r\n // See if the field is required\r\n if (ctrl.required) {\r\n // Get the date field elements\r\n var elDateElements = dt.el.querySelectorAll(\".form-control\");\r\n for (var i = 0; i < elDateElements.length; i++) {\r\n // Get the visible input element\r\n var elDateElement = elDateElements[i];\r\n if (elDateElement.type != \"hidden\") {\r\n // See if the value exists\r\n if (result.value) {\r\n // Update the classes\r\n elDateElement.classList.remove(\"is-invalid\");\r\n elDateElement.classList.add(\"is-valid\");\r\n }\r\n else {\r\n // Update the classes\r\n elDateElement.classList.remove(\"is-valid\");\r\n elDateElement.classList.add(\"is-invalid\");\r\n }\r\n }\r\n }\r\n }\r\n // Call the onvalidate event\r\n var returnVal = onValidate ? onValidate(ctrl, result) : null;\r\n // Return the result\r\n return returnVal || result;\r\n };\r\n // Register a people picker\r\n props.onGetValue = function (ctrl) {\r\n // Return the value\r\n return dt ? dt.getDate() : ctrl.value;\r\n };\r\n});\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1784
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DateTimeControlType = exports.DateTime = void 0;\r\n__webpack_require__(/*! flatpickr/dist/flatpickr.min.js */ \"./node_modules/.pnpm/flatpickr@4.6.10/node_modules/flatpickr/dist/flatpickr.min.js\");\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\n/**\r\n * Date/Time\r\n */\r\nvar DateTime = function (props) {\r\n // Create the date/time element\r\n var elDateTime = document.createElement(\"div\");\r\n elDateTime.className = \"date-time\";\r\n // Create the textbox\r\n var textbox = gd_bs_1.Components.InputGroup({\r\n el: elDateTime,\r\n label: props.label\r\n });\r\n // See if we are disabling the textbox\r\n if (props.disabled) {\r\n // Disable the input element\r\n textbox.el.querySelector(\"input\").disabled = true;\r\n }\r\n // Get the options and default the values\r\n var options = props.options || {};\r\n options.enableTime = props.showTime;\r\n options.dateFormat = options.dateFormat || (\"m-d-Y\" + (props.showTime ? \" H:i K\" : \"\"));\r\n // See if the value is a string\r\n if (typeof (props.value) === \"string\") {\r\n options.defaultDate = new Date(props.value);\r\n }\r\n else {\r\n // Set the value\r\n options.defaultDate = props.value;\r\n }\r\n // Apply the plugin\r\n var datetime = flatpickr(textbox.el.querySelector(\"input\"), options);\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.appendChild(elDateTime);\r\n // See if we are rendering it to an element\r\n if (props.el) {\r\n // Ensure the parent element exists\r\n if (props.el.parentElement && props.el.parentElement.classList) {\r\n // Set the bootstrap class\r\n props.el.parentElement.classList.contains(\"bs\") ? null : props.el.parentElement.classList.add(\"bs\");\r\n }\r\n // Append the elements\r\n while (el.children.length > 0) {\r\n props.el.appendChild(el.children[0]);\r\n }\r\n // Update the element\r\n el = props.el;\r\n }\r\n else {\r\n // Set the bootstrap class\r\n el.classList.add(\"bs\");\r\n }\r\n // Create the object\r\n var obj = {\r\n el: elDateTime,\r\n flatpickrObj: datetime,\r\n getDate: function () { return datetime.selectedDates[0]; },\r\n getValue: function () { return textbox.getValue(); },\r\n setValue: function (dt, dtFormat) {\r\n // Default the format\r\n dtFormat = dtFormat || (props.options ? props.options.dateFormat : null);\r\n // Set the date/time\r\n datetime.setDate(dt, true, dtFormat);\r\n }\r\n };\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(obj) : null;\r\n // Return the object\r\n return obj;\r\n};\r\nexports.DateTime = DateTime;\r\n// Customize the form control\r\nexports.DateTimeControlType = 100;\r\ngd_bs_1.Components.FormControlTypes[\"DateTime\"] = exports.DateTimeControlType;\r\ngd_bs_1.Components.CustomControls.registerType(exports.DateTimeControlType, function (props) {\r\n var dt = null;\r\n // Set the created method\r\n var onRendered = props.onControlRendered;\r\n props.onControlRendered = function (ctrl) {\r\n // Render a date/time\r\n dt = (0, exports.DateTime)({\r\n className: props.className,\r\n disabled: props.isReadonly,\r\n el: ctrl.el,\r\n options: props.options,\r\n showTime: props.showTime,\r\n value: props.value\r\n });\r\n // See if the label exists\r\n var elLabel = ctrl[\"_elLabel\"];\r\n if (elLabel) {\r\n // Set the id and aria properties\r\n elLabel ? elLabel.id = (props.id || props.name) + \"_label\" : null;\r\n dt.el.querySelector(\"input\").setAttribute(\"aria-labelledby\", elLabel.id);\r\n }\r\n // Set the control\r\n ctrl.setControl(dt);\r\n // Call the custom render event\r\n onRendered ? onRendered(ctrl) : null;\r\n };\r\n var onValidate = props.onValidate;\r\n props.onValidate = function (ctrl, result) {\r\n // See if the field is required\r\n if (ctrl.required) {\r\n // Get the date field elements\r\n var elDateElements = dt.el.querySelectorAll(\".form-control\");\r\n for (var i = 0; i < elDateElements.length; i++) {\r\n // Get the visible input element\r\n var elDateElement = elDateElements[i];\r\n if (elDateElement.type != \"hidden\") {\r\n // See if the value exists\r\n if (result.value) {\r\n // Update the classes\r\n elDateElement.classList.remove(\"is-invalid\");\r\n elDateElement.classList.add(\"is-valid\");\r\n }\r\n else {\r\n // Update the classes\r\n elDateElement.classList.remove(\"is-valid\");\r\n elDateElement.classList.add(\"is-invalid\");\r\n }\r\n }\r\n }\r\n }\r\n // Call the onvalidate event\r\n var returnVal = onValidate ? onValidate(ctrl, result) : null;\r\n // Return the result\r\n return returnVal || result;\r\n };\r\n // Register a people picker\r\n props.onGetValue = function (ctrl) {\r\n // Return the value\r\n return dt ? dt.getDate() : ctrl.value;\r\n };\r\n});\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/datetime/index.js?");
|
|
1785
1785
|
|
|
1786
1786
|
/***/ }),
|
|
1787
1787
|
|
|
1788
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1788
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/field/index.js":
|
|
1789
1789
|
/*!*********************************************************************************************************!*\
|
|
1790
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1790
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/field/index.js ***!
|
|
1791
1791
|
\*********************************************************************************************************/
|
|
1792
1792
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1793
1793
|
|
|
1794
1794
|
"use strict";
|
|
1795
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Field = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar datetime_1 = __webpack_require__(/*! ../datetime */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar peoplePicker_1 = __webpack_require__(/*! ../peoplePicker */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js\");\r\n/**\r\n * Field\r\n */\r\nvar Field = function (props) {\r\n var control;\r\n var lookupFieldInfo = null;\r\n var mmsFieldInfo = null;\r\n // Method to get the choice options\r\n var getChoiceItems = function (isCheckbox, field, selectedValues) {\r\n var items = [];\r\n // Update the selected values\r\n selectedValues = selectedValues && selectedValues.results ? selectedValues.results : [selectedValues];\r\n // Parse the choices\r\n for (var i = 0; i < field.Choices.results.length; i++) {\r\n var choice = field.Choices.results[i];\r\n var isSelected = false;\r\n // Determine if this choice is selected\r\n for (var j = 0; j < selectedValues.length; j++) {\r\n // See if this choice is selected\r\n if (choice == selectedValues[j]) {\r\n // Set the flag and break from the loop\r\n isSelected = true;\r\n break;\r\n }\r\n }\r\n // See if this is a checkbox\r\n if (isCheckbox) {\r\n // Add the item\r\n items.push({\r\n isSelected: isSelected,\r\n label: choice\r\n });\r\n }\r\n else {\r\n // Add the item\r\n items.push({\r\n isSelected: isSelected,\r\n label: choice,\r\n text: choice,\r\n value: choice\r\n });\r\n }\r\n }\r\n // See if this is a dropdown and no selected values exists, and this is a required field\r\n if (!isCheckbox && items.length > 0 && selectedValues.length == 0 && field.Required) {\r\n // Select the first item\r\n items[0].isSelected = true;\r\n }\r\n // Return the items\r\n return items;\r\n };\r\n // Method to get the file extension\r\n var getFileExtension = function (fileName) {\r\n if (fileName === void 0) { fileName = \"\"; }\r\n var extension = fileName.split('.');\r\n return extension[extension.length - 1].toLowerCase();\r\n };\r\n // Method to generate the lookup dropdown items\r\n var getLookupItems = function (field, lookupItems, selectedValues) {\r\n var items = [];\r\n // Update the selected values\r\n selectedValues = selectedValues && selectedValues.results ? selectedValues.results : [selectedValues];\r\n // Parse the lookup items\r\n for (var i = 0; i < lookupItems.length; i++) {\r\n var item = lookupItems[i];\r\n var isSelected = false;\r\n // Determine if this lookup is selected\r\n for (var j = 0; j < selectedValues.length; j++) {\r\n var id = selectedValues[j] && selectedValues[j].Id ? selectedValues[j].Id : selectedValues[j];\r\n // See if this choice is selected\r\n if (item.Id == id) {\r\n // Set the flag and break from the loop\r\n isSelected = true;\r\n break;\r\n }\r\n }\r\n // Add the item\r\n items.push({\r\n data: item,\r\n isSelected: isSelected,\r\n text: item[field.LookupField],\r\n value: item.Id.toString()\r\n });\r\n }\r\n // See if no selected values exists, and this is a required field\r\n if (items.length > 0 && selectedValues.length == 0 && field.Required) {\r\n // Select the first item\r\n items[0].isSelected = true;\r\n }\r\n // Return the items\r\n return items;\r\n };\r\n // Method to get the mms dropdown items\r\n var getMMSItems = function (term, selectedValues, isRoot) {\r\n if (selectedValues === void 0) { selectedValues = []; }\r\n if (isRoot === void 0) { isRoot = true; }\r\n var items = [];\r\n // See if information exists\r\n if (term.info && !isRoot) {\r\n var isSelected = false;\r\n // Parse the selected values\r\n for (var i = 0; i < selectedValues.length; i++) {\r\n // See if this item is selected\r\n if (selectedValues[i] == term.info.id) {\r\n isSelected = true;\r\n break;\r\n }\r\n }\r\n // Add the heading\r\n items.push({\r\n data: term,\r\n isSelected: isSelected,\r\n text: term.info.name,\r\n value: term.info.id\r\n });\r\n }\r\n // Parse the terms\r\n for (var termName in term) {\r\n var child = term[termName];\r\n // Skip the info and parent properties\r\n if (termName == \"info\" || termName == \"parent\") {\r\n continue;\r\n }\r\n // Get the child items\r\n var childItems = getMMSItems(child, selectedValues, false);\r\n // Add the item\r\n items = items.concat(childItems);\r\n }\r\n // See if no selected values exists, and this is a required field\r\n if (items.length > 0 && selectedValues.length == 0 && isRequired) {\r\n // Select the first item\r\n items[0].isSelected = true;\r\n }\r\n // Return the items\r\n return items;\r\n };\r\n // Set the properties based on the field link\r\n var fieldLink = props.listInfo.fieldLinks ? props.listInfo.fieldLinks[props.field.InternalName] : null;\r\n var isReadonly = fieldLink && typeof (fieldLink.ReadOnly) === \"boolean\" ? fieldLink.ReadOnly : props.field.ReadOnlyField;\r\n var isRequired = fieldLink && typeof (fieldLink.Required) === \"boolean\" ? fieldLink.Required : props.field.Required;\r\n // See if this is an internal field\r\n if (props.field.CanBeDeleted == false) {\r\n // Override the property based on the field property\r\n isReadonly = isReadonly || props.field.ReadOnlyField;\r\n }\r\n // Set the default properties for the control\r\n var controlProps = {\r\n description: props.field.Description,\r\n errorMessage: props.errorMessage,\r\n id: props.field.InternalName,\r\n isReadonly: isReadonly,\r\n label: (isRequired ? \"* \" : \"\") + props.field.Title,\r\n name: props.field.InternalName,\r\n onControlRendering: function (control) {\r\n // Execute the event\r\n return props.onControlRendering ? props.onControlRendering(control, props.field) : null;\r\n },\r\n onControlRendered: function (formControl) {\r\n // Save the control\r\n control = formControl;\r\n // Execute the event\r\n return props.onControlRendered ? props.onControlRendered(control, props.field) : null;\r\n },\r\n required: isRequired,\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: props.value\r\n };\r\n // Define a base validation method\r\n var baseValidation = null;\r\n // See if this is a new form, a default value exists and no value has been defined\r\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New && props.field.DefaultValue && props.value == null) {\r\n // Set the default value\r\n controlProps.value = props.field.DefaultValue;\r\n }\r\n // Set the type\r\n var onControlRendered = null;\r\n var onControlRendering = null;\r\n switch (props.field.FieldTypeKind) {\r\n // Boolean\r\n case gd_sprest_1.SPTypes.FieldType.Boolean:\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.Checkbox;\r\n // Create the item\r\n controlProps.items = [{ label: controlProps.label }];\r\n // Clear the label\r\n controlProps.label = \"\";\r\n break;\r\n // Choice\r\n case gd_sprest_1.SPTypes.FieldType.Choice:\r\n var displayRadioButtons = props.field.SchemaXml.indexOf('Format=\"RadioButtons\"') > 0 ? true : false;\r\n // See if we are displaying radio buttons\r\n if (displayRadioButtons) {\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.Switch;\r\n }\r\n else {\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.Dropdown;\r\n }\r\n // Get the items\r\n var items = getChoiceItems(displayRadioButtons, props.field, props.value);\r\n // See if this is not a required field\r\n if (!isRequired) {\r\n // Add a blank entry\r\n items = [{\r\n text: \"\",\r\n value: null\r\n }].concat(items);\r\n }\r\n // Set the items\r\n controlProps.items = items;\r\n break;\r\n // Currency Field\r\n case gd_sprest_1.SPTypes.FieldType.Currency:\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.TextField;\r\n // Set the rendered event\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Save the control\r\n control = formControl;\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n break;\r\n // Date/Time\r\n case gd_sprest_1.SPTypes.FieldType.DateTime:\r\n // Set the time flag\r\n var showTime = props.field.DisplayFormat == gd_sprest_1.SPTypes.DateFormat.DateTime;\r\n controlProps.showTime = showTime;\r\n // Set the type\r\n controlProps.type = datetime_1.DateTimeControlType;\r\n // See if there is a formula and this is a new form\r\n var dtValue = (props.field.DefaultFormula || props.field.DefaultValue || \"\").toLowerCase();\r\n if (dtValue && props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\r\n var idx = dtValue.indexOf(\"today\");\r\n // See if the date is a formula\r\n if (idx >= 0) {\r\n var dtNow = new Date(Date.now());\r\n // See if we are adding days\r\n var daysIdx = dtValue.indexOf(\"+\", idx);\r\n if (daysIdx > 0) {\r\n // Get the number of days to add\r\n var days = parseInt(dtValue.substr(daysIdx + 1));\r\n if (days > 0) {\r\n // Add the days\r\n dtNow.setDate(dtNow.getDate() + days);\r\n }\r\n }\r\n // See if we are subtracting days\r\n daysIdx = dtValue.indexOf(\"-\", idx);\r\n if (daysIdx > 0) {\r\n // Get the number of days to add\r\n var days = parseInt(dtValue.substr(daysIdx + 1));\r\n if (days > 0) {\r\n // Add the days\r\n dtNow.setDate(dtNow.getDate() - days);\r\n }\r\n }\r\n // Set the value\r\n controlProps.value = dtNow;\r\n }\r\n else {\r\n // Set the value\r\n controlProps.value = new Date(dtValue);\r\n }\r\n }\r\n break;\r\n // Lookup\r\n case gd_sprest_1.SPTypes.FieldType.Lookup:\r\n // Default the lookup field props will determine the default type\r\n controlProps.type = props.field.AllowMultipleValues ? core_1.Components.FormControlTypes.MultiDropdown : core_1.Components.FormControlTypes.Dropdown;\r\n // See if this field is readonly and a value exists\r\n if (isReadonly) {\r\n // Update the value\r\n controlProps.type = core_1.Components.FormControlTypes.Readonly;\r\n // Ensure a value exists\r\n if (props.value) {\r\n // Set the rendered event\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Set the class name\r\n control.el.classList.add(\"form-control\");\r\n control.el.style.backgroundColor = \"#e9ecef\";\r\n // Override the html rendered\r\n control.el.innerHTML = props.listInfo.fieldValuesAsHtml[props.field.InternalName];\r\n };\r\n }\r\n }\r\n else {\r\n // Set the rendering event\r\n onControlRendering = controlProps.onControlRendering;\r\n controlProps.onControlRendering = function (newProps) {\r\n // Update the control properties\r\n controlProps = newProps;\r\n // Display a loading message\r\n controlProps.loadingMessage = \"Loading the Lookup Data\";\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the field information\r\n gd_sprest_1.Helper.ListFormField.create({\r\n field: props.field,\r\n listName: props.listInfo.list.Title,\r\n name: props.field.InternalName,\r\n webUrl: props.listInfo.webUrl\r\n }).then(\r\n // Success\r\n function (fieldInfo) {\r\n // Save the field information\r\n lookupFieldInfo = fieldInfo;\r\n // Set the lookup filter\r\n lookupFieldInfo.lookupFilter = controlProps.lookupFilter;\r\n // Update the multi property\r\n controlProps.multi = lookupFieldInfo.multi;\r\n // Get the drop down information\r\n gd_sprest_1.Helper.ListFormField.loadLookupData(lookupFieldInfo, 500).then(\r\n // Success\r\n function (items) {\r\n // Get the dropdown items\r\n var ddlItems = getLookupItems(props.field, items, props.value);\r\n // See if this is not a required field and not a multi-select\r\n if (!isRequired && !lookupFieldInfo.multi) {\r\n // Add a blank entry\r\n ddlItems = [{\r\n text: \"\",\r\n value: null\r\n }].concat(ddlItems);\r\n }\r\n // Set the items\r\n controlProps.items = ddlItems;\r\n // Clear the element\r\n controlProps.el ? controlProps.el.innerHTML = \"\" : null;\r\n // Clear the value, since the getLookupItems method takes care of this for us\r\n controlProps.value = null;\r\n // Call the event\r\n var returnVal = onControlRendering ? onControlRendering(controlProps) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (props) {\r\n // Resolve the promise\r\n resolve(props || controlProps);\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve(controlProps);\r\n }\r\n }, \r\n // Error\r\n function (msg) {\r\n // Set the error message\r\n var errorMessage = \"Error loading the lookup field values for '\" + props.field.InternalName + \"'.\";\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: errorMessage,\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(errorMessage) : null;\r\n });\r\n }, \r\n // Error\r\n function (msg) {\r\n // Set the error message\r\n var errorMessage = \"Error loading the field information for field '\" + props.field.InternalName + \"'.\";\r\n // Display an error message\r\n controlProps.el.innerHTML = \"\";\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: \"Error loading the lookup field information.\",\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(errorMessage) : null;\r\n // Reject the request\r\n reject(msg);\r\n });\r\n });\r\n };\r\n }\r\n break;\r\n // Multi-Choice\r\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\r\n var isChoice = props.field.SchemaXml.indexOf('Format=\"RadioButtons\"') > 0 ? true : false;\r\n // Set the type\r\n controlProps.type = isChoice ? core_1.Components.FormControlTypes.MultiSwitch : core_1.Components.FormControlTypes.MultiDropdown;\r\n // Update the value\r\n controlProps.value = (props.value ? props.value.results : null) || props.value;\r\n // Set the items\r\n controlProps.items = getChoiceItems(isChoice, props.field, props.value);\r\n break;\r\n // Note\r\n case gd_sprest_1.SPTypes.FieldType.Note:\r\n // Set the properties\r\n controlProps.type = core_1.Components.FormControlTypes.TextArea;\r\n controlProps.rows = props.field.NumberOfLines;\r\n break;\r\n // Number Field\r\n case gd_sprest_1.SPTypes.FieldType.Number:\r\n var numberField_1 = props.field;\r\n var numberProps = controlProps;\r\n // Set the default value\r\n numberProps.value = numberProps.value == null ? numberField_1.DefaultValue : numberProps.value;\r\n // See if this is a percentage\r\n var isPercent = numberField_1.ShowAsPercentage;\r\n if (isPercent == null) {\r\n // Set the value from the schema (2013 environments)\r\n isPercent = numberField_1.SchemaXml.toLowerCase().indexOf('percentage=\"true\"') > 0;\r\n }\r\n if (isPercent) {\r\n // Set the type\r\n numberProps.type = core_1.Components.FormControlTypes.Range;\r\n // Default the max\r\n numberProps.max = numberField_1.MaximumValue == 1 || numberField_1.MaximumValue == Number.MAX_VALUE ? 100 : numberField_1.MaximumValue;\r\n // Set the min value\r\n numberProps.min = numberField_1.MinimumValue == -1.7976931348623157e+308 ? 0 : numberField_1.MinimumValue;\r\n // Set the value\r\n numberProps.value = numberProps.value == null || numberProps.value == Number.MIN_VALUE ? 0 : numberProps.value;\r\n numberProps.value = numberProps.value * (numberProps.max == 100 && numberProps.value < 1 ? 100 : 1);\r\n }\r\n // Else, see if the min/max values are defined\r\n else if ((typeof (numberField_1.MaximumValue) == \"number\" && numberField_1.MaximumValue != Number.MAX_VALUE) && (typeof (numberField_1.MinimumValue) == \"number\" && numberField_1.MinimumValue != Number.MIN_VALUE)) {\r\n // Update the properties to display a range\r\n numberProps.type = core_1.Components.FormControlTypes.Range;\r\n numberProps.max = numberField_1.MaximumValue;\r\n numberProps.min = numberField_1.MinimumValue;\r\n numberProps.value = typeof (numberProps.value) == \"number\" ? numberProps.value : numberProps.min;\r\n // Set validation\r\n if (numberField_1.MinimumValue || numberField_1.MaximumValue) {\r\n // Add validation\r\n baseValidation = function (control, result) {\r\n // Ensure the value is a number\r\n if (/^[0-9]*$/.test(result.value) == false) {\r\n // Update the validation and return it\r\n result.isValid = false;\r\n result.invalidMessage = \"The value must be a number.\";\r\n return result;\r\n }\r\n // Validate the min value\r\n if (numberField_1.MinimumValue && result.value < numberField_1.MinimumValue) {\r\n // Update the validation and return it\r\n result.isValid = false;\r\n result.invalidMessage = \"The value must be greater than or equal to \" + numberField_1.MinimumValue;\r\n return result;\r\n }\r\n // Validate the max value\r\n if (numberField_1.MaximumValue && result.value > numberField_1.MaximumValue) {\r\n // Update the validation and return it\r\n result.isValid = false;\r\n result.invalidMessage = \"The value must be less than or equal to \" + numberField_1.MaximumValue;\r\n return result;\r\n }\r\n // Valid\r\n result.isValid = true;\r\n // Return the result\r\n return result;\r\n };\r\n }\r\n }\r\n else {\r\n // Set the type\r\n numberProps.type = core_1.Components.FormControlTypes.TextField;\r\n }\r\n break;\r\n // URL\r\n case gd_sprest_1.SPTypes.FieldType.URL:\r\n var desc_1 = null;\r\n var url_1 = null;\r\n var value_1 = props.value;\r\n // See if a value exists\r\n if (props.value) {\r\n // Update the value\r\n controlProps.value = props.value.Url;\r\n }\r\n // Set the render event\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Save the control\r\n control = formControl;\r\n // Clear the element\r\n control.el.innerHTML = \"\";\r\n // See if we are rendering the description\r\n var showDesc = controlProps.showDescription;\r\n showDesc = typeof (showDesc) === \"boolean\" ? showDesc : true;\r\n if (showDesc) {\r\n // Render the description\r\n desc_1 = core_1.Components.FormControl({\r\n className: \"mb-1\",\r\n el: control.el,\r\n placeholder: \"Description\",\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: value_1 ? value_1.Description : null\r\n });\r\n }\r\n // Render the url\r\n url_1 = core_1.Components.FormControl({\r\n el: control.el,\r\n placeholder: \"Url\",\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: value_1 ? value_1.Url : null\r\n });\r\n // Set the get value event\r\n control.props.onGetValue = function () {\r\n // Return the value\r\n return {\r\n Description: desc_1 ? desc_1.getValue() : url_1.getValue(),\r\n Url: url_1.getValue()\r\n };\r\n };\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n // Set the validate event\r\n baseValidation = function (control, result) {\r\n var descValid, urlValid = false;\r\n // Get the form control elements\r\n var elFormControl = control.el.querySelectorAll(\".form-control\");\r\n // See if both the description and url are displayed\r\n var elDesc = null;\r\n var elUrl = null;\r\n if (elFormControl.length > 1) {\r\n // Set the elements\r\n elDesc = elFormControl[0];\r\n elUrl = elFormControl[1];\r\n }\r\n else {\r\n // Set the elements\r\n elUrl = elFormControl[0];\r\n // Set the flag\r\n descValid = true;\r\n }\r\n // See if the description exists\r\n if (elDesc) {\r\n // Clear the classes\r\n elDesc.classList.remove(\"is-invalid\");\r\n elDesc.classList.remove(\"is-valid\");\r\n // Set the flag\r\n descValid = control.props.required ? (desc_1.getValue() ? true : false) : true;\r\n // Set the class\r\n elDesc.classList.add(descValid ? \"is-valid\" : \"is-invalid\");\r\n }\r\n // See if the url exists\r\n if (elUrl) {\r\n // Clear the classes\r\n elUrl.classList.remove(\"is-invalid\");\r\n elUrl.classList.remove(\"is-valid\");\r\n // Set the flag\r\n urlValid = control.props.required ? (url_1.getValue() ? true : false) : true;\r\n // Set the class\r\n elUrl.classList.add(urlValid ? \"is-valid\" : \"is-invalid\");\r\n }\r\n // Set the validation falg\r\n result.isValid = descValid && urlValid;\r\n // Return the result\r\n return result;\r\n };\r\n break;\r\n // User\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n // Set the type\r\n controlProps.type = isReadonly ? core_1.Components.FormControlTypes.Readonly : peoplePicker_1.PeoplePickerControlType;\r\n // Set the flag to allow multiple selections\r\n controlProps.multi = props.field.AllowMultipleValues;\r\n // Set the rendered event\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Save the control\r\n control = formControl;\r\n // See if this field is readonly and a value exists\r\n if (props.value && isReadonly) {\r\n // Set the class name\r\n control.el.classList.add(\"form-control\");\r\n control.el.style.backgroundColor = \"#e9ecef\";\r\n // Override the html rendered\r\n control.el.innerHTML = props.listInfo.fieldValuesAsHtml[props.field.InternalName];\r\n }\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n break;\r\n }\r\n // See if this is the document name field\r\n if (props.field.InternalName == \"FileLeafRef\") {\r\n // Set base validation\r\n baseValidation = function (control, result) {\r\n var value = result.value;\r\n // Ensure the value exists\r\n result.isValid = value ? true : false;\r\n if (result.isValid) {\r\n // See if it ends w/ a .\r\n if (value[value.length - 1] == '.') {\r\n // Update the validation\r\n result.isValid = false;\r\n result.invalidMessage = \"The value cannot end with a '.' character.\";\r\n }\r\n // Else, see if it contains invalid characters\r\n else if (/[~\"\\#\\%\\&\\*\\:\\<\\>\\?\\/\\\\\\{\\|\\}\"]/.test(value) || value.indexOf('\\\\') >= 0) {\r\n // Update the validation\r\n result.isValid = false;\r\n result.invalidMessage = \"The value cannot contain the following characters: ~ \\\" # % & * : < > ? / \\\\ { | }\";\r\n }\r\n // Else, see if we are changing the extension\r\n else if (control.props.value) {\r\n // Get the file extensions\r\n var origExtension = getFileExtension(control.props.value);\r\n var newExtension = getFileExtension(value);\r\n // Update the validation\r\n result.isValid = origExtension == newExtension;\r\n result.invalidMessage = \"The file extension cannot be changed. It must end with '.\" + origExtension + \"'\";\r\n }\r\n }\r\n // Return the validation result\r\n return result;\r\n };\r\n }\r\n // See if this is a taxonomy field\r\n if (/^TaxonomyFieldType/.test(props.field.TypeAsString)) {\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.Dropdown;\r\n // Set a render event\r\n onControlRendering = controlProps.onControlRendering;\r\n controlProps.onControlRendering = function (newProps) {\r\n // Update the control properties\r\n controlProps = newProps;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Display a loading message\r\n controlProps.loadingMessage = \"Loading the MMS Data\";\r\n // Load the field information\r\n gd_sprest_1.Helper.ListFormField.create({\r\n field: props.field,\r\n listName: props.listInfo.list.Title,\r\n name: props.field.InternalName,\r\n webUrl: props.listInfo.webUrl\r\n }).then(\r\n // Success\r\n function (fieldInfo) {\r\n // Save the field information\r\n mmsFieldInfo = fieldInfo;\r\n // Set the type\r\n controlProps.type = mmsFieldInfo.multi ? core_1.Components.FormControlTypes.MultiDropdown : core_1.Components.FormControlTypes.Dropdown;\r\n // Load the value field\r\n gd_sprest_1.Helper.ListFormField.loadMMSValueField(mmsFieldInfo).then(\r\n // Success\r\n function (valueField) {\r\n // Set the value field\r\n mmsFieldInfo.valueField = valueField;\r\n // See if this is a new form\r\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\r\n var fieldValue = [];\r\n // Get the default values\r\n var values = (props.field.DefaultValue || \"\").split(\";#\");\r\n for (var i = 0; i < values.length; i++) {\r\n var value = values[i].split(\"|\");\r\n if (value.length == 2) {\r\n // Add the term id\r\n fieldValue.push(value[1]);\r\n }\r\n }\r\n // Update the field value\r\n controlProps.value = fieldValue;\r\n }\r\n else {\r\n var fieldValue = props.value;\r\n // Get the field value\r\n var values = fieldValue && fieldValue.results ? fieldValue.results : [fieldValue];\r\n // Clear the field values\r\n fieldValue = [];\r\n // Parse the values\r\n for (var i = 0; i < values.length; i++) {\r\n // Ensure the value exists\r\n if (values[i] && values[i].TermGuid) {\r\n // Add the value\r\n fieldValue.push(values[i].TermGuid);\r\n }\r\n }\r\n // Update the field value\r\n controlProps.value = fieldValue;\r\n }\r\n // Load the terms\r\n gd_sprest_1.Helper.ListFormField.loadMMSData(mmsFieldInfo).then(\r\n // Success\r\n function (terms) {\r\n // Get the items\r\n var items = getMMSItems(gd_sprest_1.Helper.Taxonomy.toObject(terms), controlProps.value);\r\n // See if this is not a required field and not a multi-select\r\n if (!isRequired && !mmsFieldInfo.multi) {\r\n // Add a blank entry\r\n items = [{\r\n text: \"\",\r\n value: null\r\n }].concat(items);\r\n }\r\n // Set the items\r\n controlProps.items = items;\r\n // Clear the element\r\n controlProps.el ? controlProps.el.innerHTML = \"\" : null;\r\n // Call the event\r\n var returnVal = onControlRendering ? onControlRendering(controlProps) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (props) {\r\n // Resolve the promise\r\n resolve(props || controlProps);\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve(controlProps);\r\n }\r\n }, \r\n // Error\r\n function (msg) {\r\n // Set the error message\r\n var errorMessage = \"Error loading the mms terms for '\" + props.field.InternalName + \"'.\";\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: errorMessage,\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(errorMessage) : null;\r\n });\r\n }, \r\n // Error\r\n function (msg) {\r\n // Set the error message\r\n var errorMessage = \"Error loading the mms value field for '\" + props.field.InternalName + \"'.\";\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: errorMessage,\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(errorMessage) : null;\r\n // Reject the request\r\n reject(msg);\r\n });\r\n }, function (msg) {\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: msg,\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(msg) : null;\r\n });\r\n });\r\n };\r\n }\r\n // Create the field\r\n var field = {\r\n control: control,\r\n controlProps: controlProps,\r\n getValue: function () {\r\n var fieldValue = {\r\n name: props.field.InternalName,\r\n value: control ? control.getValue() : null\r\n };\r\n // Update the field name/value, based on the type\r\n switch (props.field.FieldTypeKind) {\r\n // Boolean\r\n case gd_sprest_1.SPTypes.FieldType.Boolean:\r\n // Update the value\r\n fieldValue.value = fieldValue.value ? true : false;\r\n break;\r\n // Choice\r\n case gd_sprest_1.SPTypes.FieldType.Choice:\r\n // See if this is a dropdown\r\n if (controlProps.type == core_1.Components.FormControlTypes.Dropdown) {\r\n // See if there is a value\r\n var ddlValue = fieldValue.value;\r\n if (ddlValue) {\r\n // Update the field value\r\n fieldValue.value = ddlValue.value || ddlValue.text;\r\n }\r\n }\r\n else {\r\n // See if there is a value\r\n var cbValue = fieldValue.value;\r\n if (cbValue) {\r\n // Update the field value\r\n fieldValue.value = cbValue.label;\r\n }\r\n }\r\n break;\r\n // Number Field\r\n case gd_sprest_1.SPTypes.FieldType.Currency:\r\n // Ensure a value exists, otherwise null\r\n fieldValue.value = fieldValue.value || null;\r\n break;\r\n // Date/Time\r\n case gd_sprest_1.SPTypes.FieldType.DateTime:\r\n // Ensure a value exists, otherwise null\r\n fieldValue.value = fieldValue.value ? fieldValue.value.toISOString() : null;\r\n break;\r\n // Lookup\r\n case gd_sprest_1.SPTypes.FieldType.Lookup:\r\n // Append 'Id' to the field name\r\n fieldValue.name += fieldValue.name.lastIndexOf(\"Id\") == fieldValue.name.length - 2 ? \"\" : \"Id\";\r\n // See if this is a multi-value field\r\n if (lookupFieldInfo.multi) {\r\n var values_1 = fieldValue.value || [];\r\n fieldValue.value = { results: [] };\r\n // Parse the values\r\n for (var j = 0; j < values_1.length; j++) {\r\n // Add the value\r\n fieldValue.value.results.push(values_1[j].value || values_1[j].text);\r\n }\r\n }\r\n else {\r\n // Update the field value\r\n fieldValue.value = fieldValue.value ? fieldValue.value.value || fieldValue.value.text : null;\r\n // Ensure a value exists, otherwise null\r\n fieldValue.value = fieldValue.value || null;\r\n }\r\n break;\r\n // Multi-Choice\r\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\r\n var values = fieldValue.value || [];\r\n fieldValue.value = { results: [] };\r\n // Parse the values\r\n for (var j = 0; j < values.length; j++) {\r\n // See if this is a dropdown\r\n if (controlProps.type == core_1.Components.FormControlTypes.MultiDropdown) {\r\n // See if there is a value\r\n var ddlValue = values[j];\r\n // Add the values\r\n fieldValue.value.results.push(ddlValue.value || ddlValue.text);\r\n }\r\n else {\r\n // See if there is a value\r\n var cbValue = values[j];\r\n // Add the values\r\n fieldValue.value.results.push(cbValue.label);\r\n }\r\n }\r\n break;\r\n // Number Field\r\n case gd_sprest_1.SPTypes.FieldType.Number:\r\n var numberField = props.field;\r\n // Ensure a field value exists\r\n if (fieldValue.value) {\r\n // See if this is a percentage\r\n if (numberField.ShowAsPercentage) {\r\n // Update the value\r\n fieldValue.value = fieldValue.value / 100;\r\n }\r\n }\r\n else {\r\n // Ensure the value is null\r\n fieldValue.value = null;\r\n }\r\n break;\r\n // URL\r\n case gd_sprest_1.SPTypes.FieldType.URL:\r\n // See if the field value exists\r\n if (fieldValue.value && fieldValue.value.Url) {\r\n // Set the url, and validate the format\r\n var url = fieldValue.value.Url;\r\n if (url && /^http/.test(url.toLowerCase()) == false) {\r\n // Update the url, otherwise the request will fail\r\n url = \"https://\" + url;\r\n }\r\n // Add the metadata\r\n fieldValue.value = {\r\n __metadata: { type: \"SP.FieldUrlValue\" },\r\n Description: fieldValue.value.Description || \"\",\r\n Url: url\r\n };\r\n }\r\n else {\r\n // Ensure the value is null\r\n fieldValue.value = null;\r\n }\r\n break;\r\n // User\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n // Append 'Id' to the field name\r\n fieldValue.name += fieldValue.name.lastIndexOf(\"Id\") == fieldValue.name.length - 2 ? \"\" : \"Id\";\r\n // See if this is a multi-value field\r\n if (props.field.AllowMultipleValues) {\r\n var values_2 = fieldValue.value || [];\r\n // Default the value\r\n fieldValue.value = { results: [] };\r\n // Parse the options\r\n for (var j = 0; j < values_2.length; j++) {\r\n var userValue = values_2[j];\r\n // Add the field value\r\n userValue.Id ? fieldValue.value.results.push(userValue.Id) : null;\r\n }\r\n }\r\n else {\r\n var userValue = fieldValue.value ? fieldValue.value[0] : null;\r\n // Set the field value\r\n fieldValue.value = userValue && userValue.Id ? userValue.Id : null;\r\n }\r\n break;\r\n // MMS\r\n default:\r\n // See if this is a MMS field\r\n if (mmsFieldInfo) {\r\n // Update the field name to the value field\r\n fieldValue.name = mmsFieldInfo ? mmsFieldInfo.valueField.InternalName : fieldValue.name + \"_0\";\r\n // See if this is a multi field\r\n if (mmsFieldInfo.multi) {\r\n // Parse the field values\r\n var fieldValues = fieldValue.value || [];\r\n fieldValue.value = [];\r\n for (var j = 0; j < fieldValues.length; j++) {\r\n var termInfo = fieldValues[j];\r\n // Add the field value\r\n fieldValue.value.push(-1 + \";#\" + termInfo.text + \"|\" + termInfo.value);\r\n }\r\n // Set the field value\r\n fieldValue.value = fieldValue.value.join(\";#\");\r\n }\r\n else {\r\n // Set the value\r\n fieldValue.value = fieldValue.value && fieldValue.value.value ? -1 + \";#\" + fieldValue.value.text + \"|\" + fieldValue.value.value : \"\";\r\n }\r\n }\r\n break;\r\n }\r\n // Return the field value\r\n return fieldValue;\r\n },\r\n isValid: function () {\r\n // See if there is base validation\r\n if (baseValidation) {\r\n // Validate the field\r\n var baseResult = baseValidation(control, { isValid: false, value: control.getValue() });\r\n // Validate the current control\r\n var result = controlProps.onValidate ? controlProps.onValidate(controlProps, baseResult) : baseResult;\r\n // Return the flag\r\n if (typeof (result) === \"boolean\") {\r\n // Update the validation\r\n baseResult.isValid = result;\r\n control.updateValidation(control.el, baseResult);\r\n // Return the result\r\n return result;\r\n }\r\n // Update the validation\r\n control.updateValidation(control.el, result);\r\n // Return the flag\r\n return result.isValid;\r\n }\r\n // Validate the control\r\n return control ? control.isValid : false;\r\n }\r\n };\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(field) : null;\r\n // Return the field\r\n return field;\r\n};\r\nexports.Field = Field;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/field/index.js?");
|
|
1795
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Field = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar datetime_1 = __webpack_require__(/*! ../datetime */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar peoplePicker_1 = __webpack_require__(/*! ../peoplePicker */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js\");\r\n/**\r\n * Field\r\n */\r\nvar Field = function (props) {\r\n var control;\r\n var lookupFieldInfo = null;\r\n var mmsFieldInfo = null;\r\n // Method to get the choice options\r\n var getChoiceItems = function (isCheckbox, field, selectedValues) {\r\n var items = [];\r\n // Update the selected values\r\n selectedValues = selectedValues && selectedValues.results ? selectedValues.results : [selectedValues];\r\n // Parse the choices\r\n for (var i = 0; i < field.Choices.results.length; i++) {\r\n var choice = field.Choices.results[i];\r\n var isSelected = false;\r\n // Determine if this choice is selected\r\n for (var j = 0; j < selectedValues.length; j++) {\r\n // See if this choice is selected\r\n if (choice == selectedValues[j]) {\r\n // Set the flag and break from the loop\r\n isSelected = true;\r\n break;\r\n }\r\n }\r\n // See if this is a checkbox\r\n if (isCheckbox) {\r\n // Add the item\r\n items.push({\r\n isSelected: isSelected,\r\n label: choice\r\n });\r\n }\r\n else {\r\n // Add the item\r\n items.push({\r\n isSelected: isSelected,\r\n label: choice,\r\n text: choice,\r\n value: choice\r\n });\r\n }\r\n }\r\n // See if this is a dropdown and no selected values exists, and this is a required field\r\n if (!isCheckbox && items.length > 0 && selectedValues.length == 0 && field.Required) {\r\n // Select the first item\r\n items[0].isSelected = true;\r\n }\r\n // Return the items\r\n return items;\r\n };\r\n // Method to get the file extension\r\n var getFileExtension = function (fileName) {\r\n if (fileName === void 0) { fileName = \"\"; }\r\n var extension = fileName.split('.');\r\n return extension[extension.length - 1].toLowerCase();\r\n };\r\n // Method to generate the lookup dropdown items\r\n var getLookupItems = function (field, lookupItems, selectedValues) {\r\n var items = [];\r\n // Update the selected values\r\n selectedValues = selectedValues && selectedValues.results ? selectedValues.results : [selectedValues];\r\n // Parse the lookup items\r\n for (var i = 0; i < lookupItems.length; i++) {\r\n var item = lookupItems[i];\r\n var isSelected = false;\r\n // Determine if this lookup is selected\r\n for (var j = 0; j < selectedValues.length; j++) {\r\n var id = selectedValues[j] && selectedValues[j].Id ? selectedValues[j].Id : selectedValues[j];\r\n // See if this choice is selected\r\n if (item.Id == id) {\r\n // Set the flag and break from the loop\r\n isSelected = true;\r\n break;\r\n }\r\n }\r\n // Add the item\r\n items.push({\r\n data: item,\r\n isSelected: isSelected,\r\n text: item[field.LookupField],\r\n value: item.Id.toString()\r\n });\r\n }\r\n // See if no selected values exists, and this is a required field\r\n if (items.length > 0 && selectedValues.length == 0 && field.Required) {\r\n // Select the first item\r\n items[0].isSelected = true;\r\n }\r\n // Return the items\r\n return items;\r\n };\r\n // Method to get the mms dropdown items\r\n var getMMSItems = function (term, selectedValues, isRoot) {\r\n if (selectedValues === void 0) { selectedValues = []; }\r\n if (isRoot === void 0) { isRoot = true; }\r\n var items = [];\r\n // See if information exists\r\n if (term.info && !isRoot) {\r\n var isSelected = false;\r\n // Parse the selected values\r\n for (var i = 0; i < selectedValues.length; i++) {\r\n // See if this item is selected\r\n if (selectedValues[i] == term.info.id) {\r\n isSelected = true;\r\n break;\r\n }\r\n }\r\n // Add the heading\r\n items.push({\r\n data: term,\r\n isSelected: isSelected,\r\n text: term.info.name,\r\n value: term.info.id\r\n });\r\n }\r\n // Parse the terms\r\n for (var termName in term) {\r\n var child = term[termName];\r\n // Skip the info and parent properties\r\n if (termName == \"info\" || termName == \"parent\") {\r\n continue;\r\n }\r\n // Get the child items\r\n var childItems = getMMSItems(child, selectedValues, false);\r\n // Add the item\r\n items = items.concat(childItems);\r\n }\r\n // See if no selected values exists, and this is a required field\r\n if (items.length > 0 && selectedValues.length == 0 && isRequired) {\r\n // Select the first item\r\n items[0].isSelected = true;\r\n }\r\n // Return the items\r\n return items;\r\n };\r\n // Set the properties based on the field link\r\n var fieldLink = props.listInfo.fieldLinks ? props.listInfo.fieldLinks[props.field.InternalName] : null;\r\n var isReadonly = fieldLink && typeof (fieldLink.ReadOnly) === \"boolean\" ? fieldLink.ReadOnly : props.field.ReadOnlyField;\r\n var isRequired = fieldLink && typeof (fieldLink.Required) === \"boolean\" ? fieldLink.Required : props.field.Required;\r\n // See if this is an internal field\r\n if (props.field.CanBeDeleted == false) {\r\n // Override the property based on the field property\r\n isReadonly = isReadonly || props.field.ReadOnlyField;\r\n }\r\n // Set the default properties for the control\r\n var controlProps = {\r\n description: props.field.Description,\r\n errorMessage: props.errorMessage,\r\n id: props.field.InternalName,\r\n isReadonly: isReadonly,\r\n label: (isRequired ? \"* \" : \"\") + props.field.Title,\r\n name: props.field.InternalName,\r\n onControlRendering: function (control) {\r\n // Execute the event\r\n return props.onControlRendering ? props.onControlRendering(control, props.field) : null;\r\n },\r\n onControlRendered: function (formControl) {\r\n // Save the control\r\n control = formControl;\r\n // Execute the event\r\n return props.onControlRendered ? props.onControlRendered(control, props.field) : null;\r\n },\r\n required: isRequired,\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: props.value\r\n };\r\n // Define a base validation method\r\n var baseValidation = null;\r\n // See if this is a new form, a default value exists and no value has been defined\r\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New && props.field.DefaultValue && props.value == null) {\r\n // Set the default value\r\n controlProps.value = props.field.DefaultValue;\r\n }\r\n // Set the type\r\n var onControlRendered = null;\r\n var onControlRendering = null;\r\n switch (props.field.FieldTypeKind) {\r\n // Boolean\r\n case gd_sprest_1.SPTypes.FieldType.Boolean:\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.Checkbox;\r\n // Create the item\r\n controlProps.items = [{ label: controlProps.label }];\r\n // Clear the label\r\n controlProps.label = \"\";\r\n break;\r\n // Choice\r\n case gd_sprest_1.SPTypes.FieldType.Choice:\r\n var displayRadioButtons = props.field.SchemaXml.indexOf('Format=\"RadioButtons\"') > 0 ? true : false;\r\n // See if we are displaying radio buttons\r\n if (displayRadioButtons) {\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.Switch;\r\n }\r\n else {\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.Dropdown;\r\n }\r\n // Get the items\r\n var items = getChoiceItems(displayRadioButtons, props.field, props.value);\r\n // See if this is not a required field\r\n if (!isRequired) {\r\n // Add a blank entry\r\n items = [{\r\n text: \"\",\r\n value: null\r\n }].concat(items);\r\n }\r\n // Set the items\r\n controlProps.items = items;\r\n break;\r\n // Currency Field\r\n case gd_sprest_1.SPTypes.FieldType.Currency:\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.TextField;\r\n // Set the rendered event\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Save the control\r\n control = formControl;\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n break;\r\n // Date/Time\r\n case gd_sprest_1.SPTypes.FieldType.DateTime:\r\n // Set the time flag\r\n var showTime = props.field.DisplayFormat == gd_sprest_1.SPTypes.DateFormat.DateTime;\r\n controlProps.showTime = showTime;\r\n // Set the type\r\n controlProps.type = datetime_1.DateTimeControlType;\r\n // See if there is a formula and this is a new form\r\n var dtValue = (props.field.DefaultFormula || props.field.DefaultValue || \"\").toLowerCase();\r\n if (dtValue && props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\r\n var idx = dtValue.indexOf(\"today\");\r\n // See if the date is a formula\r\n if (idx >= 0) {\r\n var dtNow = new Date(Date.now());\r\n // See if we are adding days\r\n var daysIdx = dtValue.indexOf(\"+\", idx);\r\n if (daysIdx > 0) {\r\n // Get the number of days to add\r\n var days = parseInt(dtValue.substr(daysIdx + 1));\r\n if (days > 0) {\r\n // Add the days\r\n dtNow.setDate(dtNow.getDate() + days);\r\n }\r\n }\r\n // See if we are subtracting days\r\n daysIdx = dtValue.indexOf(\"-\", idx);\r\n if (daysIdx > 0) {\r\n // Get the number of days to add\r\n var days = parseInt(dtValue.substr(daysIdx + 1));\r\n if (days > 0) {\r\n // Add the days\r\n dtNow.setDate(dtNow.getDate() - days);\r\n }\r\n }\r\n // Set the value\r\n controlProps.value = dtNow;\r\n }\r\n else {\r\n // Set the value\r\n controlProps.value = new Date(dtValue);\r\n }\r\n }\r\n break;\r\n // Lookup\r\n case gd_sprest_1.SPTypes.FieldType.Lookup:\r\n // Default the lookup field props will determine the default type\r\n controlProps.type = props.field.AllowMultipleValues ? core_1.Components.FormControlTypes.MultiDropdown : core_1.Components.FormControlTypes.Dropdown;\r\n // See if this field is readonly and a value exists\r\n if (isReadonly) {\r\n // Update the value\r\n controlProps.type = core_1.Components.FormControlTypes.Readonly;\r\n // Ensure a value exists\r\n if (props.value) {\r\n // Set the rendered event\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Set the class name\r\n control.el.classList.add(\"form-control\");\r\n control.el.style.backgroundColor = \"#e9ecef\";\r\n // Override the html rendered\r\n control.el.innerHTML = props.listInfo.fieldValuesAsHtml[props.field.InternalName];\r\n };\r\n }\r\n }\r\n else {\r\n // Set the rendering event\r\n onControlRendering = controlProps.onControlRendering;\r\n controlProps.onControlRendering = function (newProps) {\r\n // Update the control properties\r\n controlProps = newProps;\r\n // Display a loading message\r\n controlProps.loadingMessage = \"Loading the Lookup Data\";\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the field information\r\n gd_sprest_1.Helper.ListFormField.create({\r\n field: props.field,\r\n listName: props.listInfo.list.Title,\r\n name: props.field.InternalName,\r\n webUrl: props.listInfo.webUrl\r\n }).then(\r\n // Success\r\n function (fieldInfo) {\r\n // Save the field information\r\n lookupFieldInfo = fieldInfo;\r\n // Set the lookup filter\r\n lookupFieldInfo.lookupFilter = controlProps.lookupFilter;\r\n // Update the multi property\r\n controlProps.multi = lookupFieldInfo.multi;\r\n // Get the drop down information\r\n gd_sprest_1.Helper.ListFormField.loadLookupData(lookupFieldInfo, 500).then(\r\n // Success\r\n function (items) {\r\n // Get the dropdown items\r\n var ddlItems = getLookupItems(props.field, items, props.value);\r\n // See if this is not a required field and not a multi-select\r\n if (!isRequired && !lookupFieldInfo.multi) {\r\n // Add a blank entry\r\n ddlItems = [{\r\n text: \"\",\r\n value: null\r\n }].concat(ddlItems);\r\n }\r\n // Set the items\r\n controlProps.items = ddlItems;\r\n // Clear the element\r\n controlProps.el ? controlProps.el.innerHTML = \"\" : null;\r\n // Clear the value, since the getLookupItems method takes care of this for us\r\n controlProps.value = null;\r\n // Call the event\r\n var returnVal = onControlRendering ? onControlRendering(controlProps) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (props) {\r\n // Resolve the promise\r\n resolve(props || controlProps);\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve(controlProps);\r\n }\r\n }, \r\n // Error\r\n function (msg) {\r\n // Set the error message\r\n var errorMessage = \"Error loading the lookup field values for '\" + props.field.InternalName + \"'.\";\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: errorMessage,\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(errorMessage) : null;\r\n });\r\n }, \r\n // Error\r\n function (msg) {\r\n // Set the error message\r\n var errorMessage = \"Error loading the field information for field '\" + props.field.InternalName + \"'.\";\r\n // Display an error message\r\n controlProps.el.innerHTML = \"\";\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: \"Error loading the lookup field information.\",\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(errorMessage) : null;\r\n // Reject the request\r\n reject(msg);\r\n });\r\n });\r\n };\r\n }\r\n break;\r\n // Multi-Choice\r\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\r\n var isChoice = props.field.SchemaXml.indexOf('Format=\"RadioButtons\"') > 0 ? true : false;\r\n // Set the type\r\n controlProps.type = isChoice ? core_1.Components.FormControlTypes.MultiSwitch : core_1.Components.FormControlTypes.MultiDropdown;\r\n // Update the value\r\n controlProps.value = (props.value ? props.value.results : null) || props.value;\r\n // Set the items\r\n controlProps.items = getChoiceItems(isChoice, props.field, props.value);\r\n break;\r\n // Note\r\n case gd_sprest_1.SPTypes.FieldType.Note:\r\n // Set the properties\r\n controlProps.type = core_1.Components.FormControlTypes.TextArea;\r\n controlProps.rows = props.field.NumberOfLines;\r\n break;\r\n // Number Field\r\n case gd_sprest_1.SPTypes.FieldType.Number:\r\n var numberField_1 = props.field;\r\n var numberProps = controlProps;\r\n // Set the default value\r\n numberProps.value = numberProps.value == null ? numberField_1.DefaultValue : numberProps.value;\r\n // See if this is a percentage\r\n var isPercent = numberField_1.ShowAsPercentage;\r\n if (isPercent == null) {\r\n // Set the value from the schema (2013 environments)\r\n isPercent = numberField_1.SchemaXml.toLowerCase().indexOf('percentage=\"true\"') > 0;\r\n }\r\n if (isPercent) {\r\n // Set the type\r\n numberProps.type = core_1.Components.FormControlTypes.Range;\r\n // Default the max\r\n numberProps.max = numberField_1.MaximumValue == 1 || numberField_1.MaximumValue == Number.MAX_VALUE ? 100 : numberField_1.MaximumValue;\r\n // Set the min value\r\n numberProps.min = numberField_1.MinimumValue == -1.7976931348623157e+308 ? 0 : numberField_1.MinimumValue;\r\n // Set the value\r\n numberProps.value = numberProps.value == null || numberProps.value == Number.MIN_VALUE ? 0 : numberProps.value;\r\n numberProps.value = numberProps.value * (numberProps.max == 100 && numberProps.value < 1 ? 100 : 1);\r\n }\r\n // Else, see if the min/max values are defined\r\n else if ((typeof (numberField_1.MaximumValue) == \"number\" && numberField_1.MaximumValue != Number.MAX_VALUE) && (typeof (numberField_1.MinimumValue) == \"number\" && numberField_1.MinimumValue != Number.MIN_VALUE)) {\r\n // Update the properties to display a range\r\n numberProps.type = core_1.Components.FormControlTypes.Range;\r\n numberProps.max = numberField_1.MaximumValue;\r\n numberProps.min = numberField_1.MinimumValue;\r\n numberProps.value = typeof (numberProps.value) == \"number\" ? numberProps.value : numberProps.min;\r\n // Set validation\r\n if (numberField_1.MinimumValue || numberField_1.MaximumValue) {\r\n // Add validation\r\n baseValidation = function (control, result) {\r\n // Ensure the value is a number\r\n if (/^[0-9]*$/.test(result.value) == false) {\r\n // Update the validation and return it\r\n result.isValid = false;\r\n result.invalidMessage = \"The value must be a number.\";\r\n return result;\r\n }\r\n // Validate the min value\r\n if (numberField_1.MinimumValue && result.value < numberField_1.MinimumValue) {\r\n // Update the validation and return it\r\n result.isValid = false;\r\n result.invalidMessage = \"The value must be greater than or equal to \" + numberField_1.MinimumValue;\r\n return result;\r\n }\r\n // Validate the max value\r\n if (numberField_1.MaximumValue && result.value > numberField_1.MaximumValue) {\r\n // Update the validation and return it\r\n result.isValid = false;\r\n result.invalidMessage = \"The value must be less than or equal to \" + numberField_1.MaximumValue;\r\n return result;\r\n }\r\n // Valid\r\n result.isValid = true;\r\n // Return the result\r\n return result;\r\n };\r\n }\r\n }\r\n else {\r\n // Set the type\r\n numberProps.type = core_1.Components.FormControlTypes.TextField;\r\n }\r\n break;\r\n // URL\r\n case gd_sprest_1.SPTypes.FieldType.URL:\r\n var desc_1 = null;\r\n var url_1 = null;\r\n var value_1 = props.value;\r\n // See if a value exists\r\n if (props.value) {\r\n // Update the value\r\n controlProps.value = props.value.Url;\r\n }\r\n // Set the render event\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Save the control\r\n control = formControl;\r\n // Clear the element\r\n control.el.innerHTML = \"\";\r\n // See if we are rendering the description\r\n var showDesc = controlProps.showDescription;\r\n showDesc = typeof (showDesc) === \"boolean\" ? showDesc : true;\r\n if (showDesc) {\r\n // Render the description\r\n desc_1 = core_1.Components.FormControl({\r\n className: \"mb-1\",\r\n el: control.el,\r\n placeholder: \"Description\",\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: value_1 ? value_1.Description : null\r\n });\r\n }\r\n // Render the url\r\n url_1 = core_1.Components.FormControl({\r\n el: control.el,\r\n placeholder: \"Url\",\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: value_1 ? value_1.Url : null\r\n });\r\n // Set the get value event\r\n control.props.onGetValue = function () {\r\n // Return the value\r\n return {\r\n Description: desc_1 ? desc_1.getValue() : url_1.getValue(),\r\n Url: url_1.getValue()\r\n };\r\n };\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n // Set the validate event\r\n baseValidation = function (control, result) {\r\n var descValid, urlValid = false;\r\n // Get the form control elements\r\n var elFormControl = control.el.querySelectorAll(\".form-control\");\r\n // See if both the description and url are displayed\r\n var elDesc = null;\r\n var elUrl = null;\r\n if (elFormControl.length > 1) {\r\n // Set the elements\r\n elDesc = elFormControl[0];\r\n elUrl = elFormControl[1];\r\n }\r\n else {\r\n // Set the elements\r\n elUrl = elFormControl[0];\r\n // Set the flag\r\n descValid = true;\r\n }\r\n // See if the description exists\r\n if (elDesc) {\r\n // Clear the classes\r\n elDesc.classList.remove(\"is-invalid\");\r\n elDesc.classList.remove(\"is-valid\");\r\n // Set the flag\r\n descValid = control.props.required ? (desc_1.getValue() ? true : false) : true;\r\n // Set the class\r\n elDesc.classList.add(descValid ? \"is-valid\" : \"is-invalid\");\r\n }\r\n // See if the url exists\r\n if (elUrl) {\r\n // Clear the classes\r\n elUrl.classList.remove(\"is-invalid\");\r\n elUrl.classList.remove(\"is-valid\");\r\n // Set the flag\r\n urlValid = control.props.required ? (url_1.getValue() ? true : false) : true;\r\n // Set the class\r\n elUrl.classList.add(urlValid ? \"is-valid\" : \"is-invalid\");\r\n }\r\n // Set the validation falg\r\n result.isValid = descValid && urlValid;\r\n // Return the result\r\n return result;\r\n };\r\n break;\r\n // User\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n // Set the type\r\n controlProps.type = isReadonly ? core_1.Components.FormControlTypes.Readonly : peoplePicker_1.PeoplePickerControlType;\r\n // Update the properties, based on the field settings\r\n controlProps.allowGroups = props.field.SelectionGroup == gd_sprest_1.SPTypes.FieldUserSelectionType.PeopleAndGroups;\r\n controlProps.groupId = props.field.SelectionGroup;\r\n controlProps.multi = props.field.AllowMultipleValues;\r\n // Set the rendered event\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Save the control\r\n control = formControl;\r\n // See if this field is readonly and a value exists\r\n if (props.value && isReadonly) {\r\n // Set the class name\r\n control.el.classList.add(\"form-control\");\r\n control.el.style.backgroundColor = \"#e9ecef\";\r\n // Override the html rendered\r\n control.el.innerHTML = props.listInfo.fieldValuesAsHtml[props.field.InternalName];\r\n }\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n break;\r\n }\r\n // See if this is the document name field\r\n if (props.field.InternalName == \"FileLeafRef\") {\r\n // Set base validation\r\n baseValidation = function (control, result) {\r\n var value = result.value;\r\n // Ensure the value exists\r\n result.isValid = value ? true : false;\r\n if (result.isValid) {\r\n // See if it ends w/ a .\r\n if (value[value.length - 1] == '.') {\r\n // Update the validation\r\n result.isValid = false;\r\n result.invalidMessage = \"The value cannot end with a '.' character.\";\r\n }\r\n // Else, see if it contains invalid characters\r\n else if (/[~\"\\#\\%\\&\\*\\:\\<\\>\\?\\/\\\\\\{\\|\\}\"]/.test(value) || value.indexOf('\\\\') >= 0) {\r\n // Update the validation\r\n result.isValid = false;\r\n result.invalidMessage = \"The value cannot contain the following characters: ~ \\\" # % & * : < > ? / \\\\ { | }\";\r\n }\r\n // Else, see if we are changing the extension\r\n else if (control.props.value) {\r\n // Get the file extensions\r\n var origExtension = getFileExtension(control.props.value);\r\n var newExtension = getFileExtension(value);\r\n // Update the validation\r\n result.isValid = origExtension == newExtension;\r\n result.invalidMessage = \"The file extension cannot be changed. It must end with '.\" + origExtension + \"'\";\r\n }\r\n }\r\n // Return the validation result\r\n return result;\r\n };\r\n }\r\n // See if this is a taxonomy field\r\n if (/^TaxonomyFieldType/.test(props.field.TypeAsString)) {\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.Dropdown;\r\n // Set a render event\r\n onControlRendering = controlProps.onControlRendering;\r\n controlProps.onControlRendering = function (newProps) {\r\n // Update the control properties\r\n controlProps = newProps;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Display a loading message\r\n controlProps.loadingMessage = \"Loading the MMS Data\";\r\n // Load the field information\r\n gd_sprest_1.Helper.ListFormField.create({\r\n field: props.field,\r\n listName: props.listInfo.list.Title,\r\n name: props.field.InternalName,\r\n webUrl: props.listInfo.webUrl\r\n }).then(\r\n // Success\r\n function (fieldInfo) {\r\n // Save the field information\r\n mmsFieldInfo = fieldInfo;\r\n // Set the type\r\n controlProps.type = mmsFieldInfo.multi ? core_1.Components.FormControlTypes.MultiDropdown : core_1.Components.FormControlTypes.Dropdown;\r\n // Load the value field\r\n gd_sprest_1.Helper.ListFormField.loadMMSValueField(mmsFieldInfo).then(\r\n // Success\r\n function (valueField) {\r\n // Set the value field\r\n mmsFieldInfo.valueField = valueField;\r\n // See if this is a new form\r\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\r\n var fieldValue = [];\r\n // Get the default values\r\n var values = (props.field.DefaultValue || \"\").split(\";#\");\r\n for (var i = 0; i < values.length; i++) {\r\n var value = values[i].split(\"|\");\r\n if (value.length == 2) {\r\n // Add the term id\r\n fieldValue.push(value[1]);\r\n }\r\n }\r\n // Update the field value\r\n controlProps.value = fieldValue;\r\n }\r\n else {\r\n var fieldValue = props.value;\r\n // Get the field value\r\n var values = fieldValue && fieldValue.results ? fieldValue.results : [fieldValue];\r\n // Clear the field values\r\n fieldValue = [];\r\n // Parse the values\r\n for (var i = 0; i < values.length; i++) {\r\n // Ensure the value exists\r\n if (values[i] && values[i].TermGuid) {\r\n // Add the value\r\n fieldValue.push(values[i].TermGuid);\r\n }\r\n }\r\n // Update the field value\r\n controlProps.value = fieldValue;\r\n }\r\n // Load the terms\r\n gd_sprest_1.Helper.ListFormField.loadMMSData(mmsFieldInfo).then(\r\n // Success\r\n function (terms) {\r\n // Get the items\r\n var items = getMMSItems(gd_sprest_1.Helper.Taxonomy.toObject(terms), controlProps.value);\r\n // See if this is not a required field and not a multi-select\r\n if (!isRequired && !mmsFieldInfo.multi) {\r\n // Add a blank entry\r\n items = [{\r\n text: \"\",\r\n value: null\r\n }].concat(items);\r\n }\r\n // Set the items\r\n controlProps.items = items;\r\n // Clear the element\r\n controlProps.el ? controlProps.el.innerHTML = \"\" : null;\r\n // Call the event\r\n var returnVal = onControlRendering ? onControlRendering(controlProps) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (props) {\r\n // Resolve the promise\r\n resolve(props || controlProps);\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve(controlProps);\r\n }\r\n }, \r\n // Error\r\n function (msg) {\r\n // Set the error message\r\n var errorMessage = \"Error loading the mms terms for '\" + props.field.InternalName + \"'.\";\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: errorMessage,\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(errorMessage) : null;\r\n });\r\n }, \r\n // Error\r\n function (msg) {\r\n // Set the error message\r\n var errorMessage = \"Error loading the mms value field for '\" + props.field.InternalName + \"'.\";\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: errorMessage,\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(errorMessage) : null;\r\n // Reject the request\r\n reject(msg);\r\n });\r\n }, function (msg) {\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: controlProps.el,\r\n content: msg,\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n // Call the error event\r\n props.onError ? props.onError(msg) : null;\r\n });\r\n });\r\n };\r\n }\r\n // Create the field\r\n var field = {\r\n control: control,\r\n controlProps: controlProps,\r\n getValue: function () {\r\n var fieldValue = {\r\n name: props.field.InternalName,\r\n value: control ? control.getValue() : null\r\n };\r\n // Update the field name/value, based on the type\r\n switch (props.field.FieldTypeKind) {\r\n // Boolean\r\n case gd_sprest_1.SPTypes.FieldType.Boolean:\r\n // Update the value\r\n fieldValue.value = fieldValue.value ? true : false;\r\n break;\r\n // Choice\r\n case gd_sprest_1.SPTypes.FieldType.Choice:\r\n // See if this is a dropdown\r\n if (controlProps.type == core_1.Components.FormControlTypes.Dropdown) {\r\n // See if there is a value\r\n var ddlValue = fieldValue.value;\r\n if (ddlValue) {\r\n // Update the field value\r\n fieldValue.value = ddlValue.value || ddlValue.text;\r\n }\r\n }\r\n else {\r\n // See if there is a value\r\n var cbValue = fieldValue.value;\r\n if (cbValue) {\r\n // Update the field value\r\n fieldValue.value = cbValue.label;\r\n }\r\n }\r\n break;\r\n // Number Field\r\n case gd_sprest_1.SPTypes.FieldType.Currency:\r\n // Ensure a value exists, otherwise null\r\n fieldValue.value = fieldValue.value || null;\r\n break;\r\n // Date/Time\r\n case gd_sprest_1.SPTypes.FieldType.DateTime:\r\n // Ensure a value exists, otherwise null\r\n fieldValue.value = fieldValue.value ? fieldValue.value.toISOString() : null;\r\n break;\r\n // Lookup\r\n case gd_sprest_1.SPTypes.FieldType.Lookup:\r\n // Append 'Id' to the field name\r\n fieldValue.name += fieldValue.name.lastIndexOf(\"Id\") == fieldValue.name.length - 2 ? \"\" : \"Id\";\r\n // See if this is a multi-value field\r\n if (lookupFieldInfo.multi) {\r\n var values_1 = fieldValue.value || [];\r\n fieldValue.value = { results: [] };\r\n // Parse the values\r\n for (var j = 0; j < values_1.length; j++) {\r\n // Add the value\r\n fieldValue.value.results.push(values_1[j].value || values_1[j].text);\r\n }\r\n }\r\n else {\r\n // Update the field value\r\n fieldValue.value = fieldValue.value ? fieldValue.value.value || fieldValue.value.text : null;\r\n // Ensure a value exists, otherwise null\r\n fieldValue.value = fieldValue.value || null;\r\n }\r\n break;\r\n // Multi-Choice\r\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\r\n var values = fieldValue.value || [];\r\n fieldValue.value = { results: [] };\r\n // Parse the values\r\n for (var j = 0; j < values.length; j++) {\r\n // See if this is a dropdown\r\n if (controlProps.type == core_1.Components.FormControlTypes.MultiDropdown) {\r\n // See if there is a value\r\n var ddlValue = values[j];\r\n // Add the values\r\n fieldValue.value.results.push(ddlValue.value || ddlValue.text);\r\n }\r\n else {\r\n // See if there is a value\r\n var cbValue = values[j];\r\n // Add the values\r\n fieldValue.value.results.push(cbValue.label);\r\n }\r\n }\r\n break;\r\n // Number Field\r\n case gd_sprest_1.SPTypes.FieldType.Number:\r\n var numberField = props.field;\r\n // Ensure a field value exists\r\n if (fieldValue.value) {\r\n // See if this is a percentage\r\n if (numberField.ShowAsPercentage) {\r\n // Update the value\r\n fieldValue.value = fieldValue.value / 100;\r\n }\r\n }\r\n else {\r\n // Ensure the value is null\r\n fieldValue.value = null;\r\n }\r\n break;\r\n // URL\r\n case gd_sprest_1.SPTypes.FieldType.URL:\r\n // See if the field value exists\r\n if (fieldValue.value && fieldValue.value.Url) {\r\n // Set the url, and validate the format\r\n var url = fieldValue.value.Url;\r\n if (url && /^http/.test(url.toLowerCase()) == false) {\r\n // Update the url, otherwise the request will fail\r\n url = \"https://\" + url;\r\n }\r\n // Add the metadata\r\n fieldValue.value = {\r\n __metadata: { type: \"SP.FieldUrlValue\" },\r\n Description: fieldValue.value.Description || \"\",\r\n Url: url\r\n };\r\n }\r\n else {\r\n // Ensure the value is null\r\n fieldValue.value = null;\r\n }\r\n break;\r\n // User\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n // Append 'Id' to the field name\r\n fieldValue.name += fieldValue.name.lastIndexOf(\"Id\") == fieldValue.name.length - 2 ? \"\" : \"Id\";\r\n // See if this is a multi-value field\r\n if (props.field.AllowMultipleValues) {\r\n var values_2 = fieldValue.value || [];\r\n // Default the value\r\n fieldValue.value = { results: [] };\r\n // Parse the options\r\n for (var j = 0; j < values_2.length; j++) {\r\n var userValue = values_2[j];\r\n // Add the field value\r\n userValue.Id ? fieldValue.value.results.push(userValue.Id) : null;\r\n }\r\n }\r\n else {\r\n var userValue = fieldValue.value ? fieldValue.value[0] : null;\r\n // Set the field value\r\n fieldValue.value = userValue && userValue.Id ? userValue.Id : null;\r\n }\r\n break;\r\n // MMS\r\n default:\r\n // See if this is a MMS field\r\n if (mmsFieldInfo) {\r\n // Update the field name to the value field\r\n fieldValue.name = mmsFieldInfo ? mmsFieldInfo.valueField.InternalName : fieldValue.name + \"_0\";\r\n // See if this is a multi field\r\n if (mmsFieldInfo.multi) {\r\n // Parse the field values\r\n var fieldValues = fieldValue.value || [];\r\n fieldValue.value = [];\r\n for (var j = 0; j < fieldValues.length; j++) {\r\n var termInfo = fieldValues[j];\r\n // Add the field value\r\n fieldValue.value.push(-1 + \";#\" + termInfo.text + \"|\" + termInfo.value);\r\n }\r\n // Set the field value\r\n fieldValue.value = fieldValue.value.join(\";#\");\r\n }\r\n else {\r\n // Set the value\r\n fieldValue.value = fieldValue.value && fieldValue.value.value ? -1 + \";#\" + fieldValue.value.text + \"|\" + fieldValue.value.value : \"\";\r\n }\r\n }\r\n break;\r\n }\r\n // Return the field value\r\n return fieldValue;\r\n },\r\n isValid: function () {\r\n // See if there is base validation\r\n if (baseValidation) {\r\n // Validate the field\r\n var baseResult = baseValidation(control, { isValid: false, value: control.getValue() });\r\n // Validate the current control\r\n var result = controlProps.onValidate ? controlProps.onValidate(controlProps, baseResult) : baseResult;\r\n // Return the flag\r\n if (typeof (result) === \"boolean\") {\r\n // Update the validation\r\n baseResult.isValid = result;\r\n control.updateValidation(control.el, baseResult);\r\n // Return the result\r\n return result;\r\n }\r\n // Update the validation\r\n control.updateValidation(control.el, result);\r\n // Return the flag\r\n return result.isValid;\r\n }\r\n // Validate the control\r\n return control ? control.isValid : false;\r\n }\r\n };\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(field) : null;\r\n // Return the field\r\n return field;\r\n};\r\nexports.Field = Field;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/field/index.js?");
|
|
1796
1796
|
|
|
1797
1797
|
/***/ }),
|
|
1798
1798
|
|
|
1799
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1799
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/index.js":
|
|
1800
1800
|
/*!***************************************************************************************************!*\
|
|
1801
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1801
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/index.js ***!
|
|
1802
1802
|
\***************************************************************************************************/
|
|
1803
1803
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1804
1804
|
|
|
1805
1805
|
"use strict";
|
|
1806
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Components = void 0;\r\nvar datetime_1 = __webpack_require__(/*! ./datetime */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1806
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Components = void 0;\r\nvar datetime_1 = __webpack_require__(/*! ./datetime */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar field_1 = __webpack_require__(/*! ./field */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/field/index.js\");\r\nvar listForm_1 = __webpack_require__(/*! ./listForm */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listForm/index.js\");\r\nvar listFormDialog_1 = __webpack_require__(/*! ./listFormDialog */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listFormDialog/index.js\");\r\nvar peoplePicker_1 = __webpack_require__(/*! ./peoplePicker */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js\");\r\n// Extend the core components\r\nvar core_1 = __webpack_require__(/*! ./core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js\");\r\ncore_1.Components[\"DateTime\"] = datetime_1.DateTime;\r\ncore_1.Components[\"Field\"] = field_1.Field;\r\ncore_1.Components[\"ListForm\"] = listForm_1.ListForm;\r\ncore_1.Components[\"ListFormDialog\"] = listFormDialog_1.ListFormDialog;\r\ncore_1.Components[\"PeoplePicker\"] = peoplePicker_1.PeoplePicker;\r\n// Export the components\r\nvar core_2 = __webpack_require__(/*! ./core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js\");\r\nObject.defineProperty(exports, \"Components\", ({ enumerable: true, get: function () { return core_2.Components; } }));\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/index.js?");
|
|
1807
1807
|
|
|
1808
1808
|
/***/ }),
|
|
1809
1809
|
|
|
1810
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1810
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listFormDialog/index.js":
|
|
1811
1811
|
/*!******************************************************************************************************************!*\
|
|
1812
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1812
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listFormDialog/index.js ***!
|
|
1813
1813
|
\******************************************************************************************************************/
|
|
1814
1814
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1815
1815
|
|
|
1816
1816
|
"use strict";
|
|
1817
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ListFormDialog = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1817
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ListFormDialog = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar listForm_1 = __webpack_require__(/*! ../listForm */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listForm/index.js\");\r\n/**\r\n * List Form Dialog\r\n */\r\nvar ListFormDialog = function (props) {\r\n var form = null;\r\n var modalProps = props.modalProps || {};\r\n // Method to save the form\r\n var saveForm = function () {\r\n // Hide the form\r\n form.el.classList.add(\"d-none\");\r\n // Hide the footer\r\n elFooter.classList.add(\"d-none\");\r\n // Add a progress\r\n var progress = core_1.Components.Progress({\r\n el: form.el.parentElement,\r\n isAnimated: true,\r\n isStriped: true,\r\n size: 100\r\n }).el;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure the form is valid\r\n if (!form.isValid()) {\r\n // Remove the progress\r\n form.el.parentElement.removeChild(progress);\r\n // Show the form\r\n form.el.classList.remove(\"d-none\");\r\n // Show the footer\r\n elFooter.classList.remove(\"d-none\");\r\n // Reject the promise\r\n reject(\"Form is invalid\");\r\n // Return\r\n return;\r\n }\r\n // Save the form\r\n form.save().then(function (item) {\r\n // Remove the progress\r\n form.el.parentElement.removeChild(progress);\r\n // Show the form\r\n form.el.classList.remove(\"d-none\");\r\n // Show the footer\r\n elFooter.classList.remove(\"d-none\");\r\n // Call the save event\r\n props.onSaved ? props.onSaved(item) : null;\r\n // Resolve the promise\r\n resolve(item);\r\n }, reject);\r\n });\r\n };\r\n // Update the properties\r\n modalProps.el = modalProps.el || props.el;\r\n modalProps.title = modalProps.title || props.listName;\r\n modalProps.body = core_1.Components.Progress({\r\n isAnimated: true,\r\n isStriped: true,\r\n label: \"Loading the Form...\",\r\n size: 100\r\n }).el.outerHTML;\r\n // Set the on render event\r\n modalProps.onRenderBody = function (el) {\r\n // Create an instance of the list form\r\n listForm_1.ListForm.create({\r\n excludeFields: props.excludeFields,\r\n fields: props.fields,\r\n item: props.item,\r\n itemId: props.itemId,\r\n listName: props.listName,\r\n loadAttachments: props.loadAttachments,\r\n query: props.query,\r\n webUrl: props.webUrl\r\n }).then(\r\n // Success\r\n function (info) {\r\n // Clear the modal body\r\n el.innerHTML = \"\";\r\n // Ensure the item exists, otherwise default to the new form\r\n var controlMode = props.item || props.itemId > 0 ? props.controlMode : gd_sprest_1.SPTypes.ControlMode.New;\r\n // Check the control mode\r\n switch (controlMode) {\r\n // Edit Form\r\n case gd_sprest_1.SPTypes.ControlMode.Edit:\r\n case gd_sprest_1.SPTypes.ControlMode.New:\r\n // Render the list form\r\n form = listForm_1.ListForm.renderEditForm({\r\n controlMode: props.controlMode,\r\n el: el,\r\n onControlRendered: props.onControlRendered,\r\n onControlRendering: props.onControlRendering,\r\n onSaving: props.onSaving,\r\n info: info,\r\n template: props.template\r\n });\r\n break;\r\n // Default - Display Form\r\n default:\r\n // Render the list form\r\n listForm_1.ListForm.renderDisplayForm({\r\n el: el,\r\n info: info,\r\n onControlRendered: props.onControlRendered,\r\n onControlRendering: props.onControlRendering,\r\n template: props.template\r\n });\r\n break;\r\n }\r\n // Display the actions\r\n elFooter.classList.remove(\"d-none\");\r\n }, \r\n // Error\r\n function () {\r\n // Log the error\r\n console.error(\"Error loading the list form information.\");\r\n // Clear the modal\r\n el.innerHTML = \"\";\r\n // Display an error message\r\n core_1.Components.Alert({\r\n el: el,\r\n content: \"Error loading the list form information.\",\r\n type: core_1.Components.AlertTypes.Danger\r\n });\r\n });\r\n };\r\n // Set the render footer event\r\n modalProps.onRenderFooter = function (el) {\r\n // Parse the actions\r\n var actions = props.actions || null;\r\n if (actions == null) {\r\n // Default the actions based on the control mode\r\n switch (props.controlMode) {\r\n // Edit\r\n case (gd_sprest_1.SPTypes.ControlMode.Edit):\r\n // Set the actions\r\n actions = {\r\n spacing: 3,\r\n items: [\r\n {\r\n buttons: [{ text: \"Close\", onClick: function () { dialog.hide(); } }]\r\n },\r\n {\r\n buttons: [{ text: \"Update\", onClick: saveForm }]\r\n }\r\n ]\r\n };\r\n break;\r\n // New\r\n case (gd_sprest_1.SPTypes.ControlMode.New):\r\n // Set the actions\r\n actions = {\r\n spacing: 3,\r\n items: [\r\n {\r\n buttons: [{ text: \"Close\", onClick: function () { dialog.hide(); } }]\r\n },\r\n {\r\n buttons: [{ text: \"Save\", onClick: saveForm }]\r\n }\r\n ]\r\n };\r\n break;\r\n // Default - Display\r\n default:\r\n actions = {\r\n spacing: 3,\r\n items: [\r\n {\r\n buttons: [{ text: \"Close\", onClick: function () { dialog.hide(); } }]\r\n }\r\n ]\r\n };\r\n break;\r\n }\r\n }\r\n // Set the element\r\n actions.el = el;\r\n // Render the toolbar\r\n core_1.Components.Toolbar(actions);\r\n };\r\n // Create the dialog\r\n var dialog = core_1.Components.Modal(modalProps);\r\n // Hide the actions\r\n var elFooter = dialog.el.querySelector(\".modal-footer\");\r\n elFooter.classList.add(\"d-none\");\r\n // Add the class name\r\n dialog.el.classList.add(\"listformdialog\");\r\n // Set the save method\r\n form == null ? null : dialog.saveForm = saveForm;\r\n // See if we are displaying it by default\r\n if (props.visible) {\r\n // Display the dialog\r\n dialog.show();\r\n }\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(dialog) : null;\r\n // Return the dialog\r\n return dialog;\r\n};\r\nexports.ListFormDialog = ListFormDialog;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listFormDialog/index.js?");
|
|
1818
1818
|
|
|
1819
1819
|
/***/ }),
|
|
1820
1820
|
|
|
1821
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1821
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listForm/index.js":
|
|
1822
1822
|
/*!************************************************************************************************************!*\
|
|
1823
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1823
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listForm/index.js ***!
|
|
1824
1824
|
\************************************************************************************************************/
|
|
1825
1825
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1826
1826
|
|
|
1827
1827
|
"use strict";
|
|
1828
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ListForm = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar datetime_1 = __webpack_require__(/*! ../datetime */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar field_1 = __webpack_require__(/*! ../field */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/field/index.js\");\r\n// Extend the list form\r\nexports.ListForm = gd_sprest_1.Helper.ListForm;\r\n// Method to get the fields to render\r\nvar getFieldsToRender = function (props) {\r\n var fieldNames = [];\r\n // See if the \"include\" fields property is defined\r\n if (props.includeFields) {\r\n // Set the field names\r\n fieldNames = props.includeFields;\r\n }\r\n else {\r\n // Parse the fields\r\n for (var fieldName in props.info.fields) {\r\n // See if the \"exclude\" property is set\r\n if (props.excludeFields) {\r\n var renderFl = true;\r\n // Parse the fields\r\n for (var i = 0; i < props.excludeFields.length; i++) {\r\n // See if we are excluding this field\r\n if (props.excludeFields[i] == fieldName) {\r\n // Set the flag\r\n renderFl = false;\r\n break;\r\n }\r\n }\r\n // Skip this field, if we are not rendering it\r\n if (!renderFl) {\r\n continue;\r\n }\r\n }\r\n // Add the field name\r\n fieldNames.push(fieldName);\r\n }\r\n }\r\n // Return the field names\r\n return fieldNames;\r\n};\r\n// Method to render a display form for an item\r\nexports.ListForm.renderDisplayForm = function (props) {\r\n var form = null;\r\n // Render a loading message\r\n var progress = core_1.Components.Progress({\r\n el: props.el,\r\n isAnimated: true,\r\n isStriped: true,\r\n label: \"Loading the Form\",\r\n size: 100\r\n });\r\n var mapper = {};\r\n var rows = [];\r\n // See if we are rendering attachments\r\n if (props.info.attachments) {\r\n // Render the attachments\r\n rows.push({\r\n columns: [{\r\n control: {\r\n id: \"ListFormAttachments\",\r\n label: \"Attachments\",\r\n name: \"Attachments\",\r\n onControlRendered: function (control) {\r\n var items = [];\r\n // Parse the attachments\r\n for (var i = 0; i < props.info.attachments.length; i++) {\r\n var attachment = props.info.attachments[i];\r\n // Add the item\r\n items.push({\r\n buttons: [{\r\n className: \"me-1\",\r\n href: attachment.ServerRelativeUrl,\r\n isSmall: true,\r\n text: attachment.FileName\r\n }]\r\n });\r\n }\r\n // Render a toolbar\r\n core_1.Components.Toolbar({\r\n el: control.el,\r\n items: items\r\n });\r\n }\r\n }\r\n }]\r\n });\r\n }\r\n // Parse the fields to render\r\n var fieldNames = getFieldsToRender(props);\r\n for (var i = 0; i < fieldNames.length; i++) {\r\n var fieldName = fieldNames[i];\r\n var field = props.info.fields[fieldName];\r\n var value = props.info.fieldValuesAsText[fieldName] || \"\";\r\n var html = props.info.fieldValuesAsHtml[fieldName] || props.info.fieldValuesAsHtml[fieldName.replace(/\\_/g, \"_x005f_\")] || \"\";\r\n // Ensure the field exists\r\n if (field == null) {\r\n // Log\r\n console.error(\"[List Form] Field '\" + fieldName + \"' does not exist. Check the list or query.\");\r\n continue;\r\n }\r\n // See if we are hiding the field\r\n if (field.SchemaXml.indexOf('ShowInDisplayForm=\"FALSE\"') > 0) {\r\n continue;\r\n }\r\n // See if this is a note field\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Note) {\r\n // Update the html\r\n html = html.replace(/\\r?\\n/g, '<br />');\r\n }\r\n // Else, see if this is a user field\r\n else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User) {\r\n // See if this is a multi-user selection\r\n if (field.AllowMultipleValues) {\r\n var userNames = [];\r\n // Parse the users\r\n var users = (props.info.item[fieldName] ? props.info.item[fieldName].results : null) || [];\r\n for (var j = 0; j < users.length; j++) {\r\n // Append the user name\r\n userNames.push(users[j].Title);\r\n }\r\n // Set the html value\r\n html = userNames.join('<br />\\n');\r\n }\r\n else {\r\n // Extract the text only for single selections\r\n var elUser = document.createElement(\"div\");\r\n elUser.innerHTML = html;\r\n html = elUser.innerText;\r\n }\r\n }\r\n // Else, see if this is a choice field\r\n else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Choice || field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.MultiChoice) {\r\n // Update the html\r\n html = value;\r\n }\r\n // Set the control\r\n mapper[fieldName] = {\r\n data: html,\r\n description: field.Description,\r\n isReadonly: true,\r\n label: field.Title,\r\n name: field.InternalName,\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: html\r\n };\r\n // Update the type, based on the field\r\n switch (field.FieldTypeKind) {\r\n case gd_sprest_1.SPTypes.FieldType.DateTime:\r\n // Set the time flag\r\n mapper[fieldName].showTime = field.DisplayFormat == gd_sprest_1.SPTypes.DateFormat.DateTime ? true : false;\r\n // Set the type\r\n mapper[fieldName].type = datetime_1.DateTimeControlType;\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.Note:\r\n // Set the type\r\n mapper[fieldName].type = core_1.Components.FormControlTypes.TextArea;\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n // Set the type\r\n mapper[fieldName].type = field.AllowMultipleValues ? core_1.Components.FormControlTypes.TextArea : mapper[fieldName].type;\r\n break;\r\n }\r\n // Detect html\r\n if (/<*>/g.test(html)) {\r\n // Update the control to be read-only\r\n mapper[fieldName].type = core_1.Components.FormControlTypes.Readonly;\r\n // Set the rendered event\r\n mapper[fieldName].onControlRendered = function (control) {\r\n // Set the class name\r\n control.el.classList.add(\"form-control\");\r\n control.el.style.backgroundColor = \"#e9ecef\";\r\n // Override the html rendered\r\n control.el.innerHTML = control.props.data;\r\n };\r\n }\r\n // Else, detect xml\r\n else if (/</g.test(html)) {\r\n // Update the value\r\n mapper[fieldName].value = html.replace(/</g, '<')\r\n .replace(/>/g, '>')\r\n .replace(/&/g, '&')\r\n .replace(/"/g, '\"');\r\n }\r\n // Add the row\r\n rows.push({\r\n columns: [{\r\n control: mapper[fieldName]\r\n }]\r\n });\r\n }\r\n // See if there is a template\r\n if (props.template) {\r\n var updateControl = function (refControl) {\r\n // Get the control from the mapper\r\n var control = refControl ? mapper[refControl.name] : null;\r\n // Ensure the controls exists\r\n if (control && refControl) {\r\n // Parse the control keys\r\n for (var key in control) {\r\n // Skip if a value is already defined\r\n if (refControl[key]) {\r\n continue;\r\n }\r\n // Update the property\r\n refControl[key] = control[key];\r\n }\r\n }\r\n };\r\n // Parse the template\r\n for (var i = 0; i < props.template.length; i++) {\r\n var row = props.template[i];\r\n // Parse the columns if there are columns\r\n var columns = row.columns || [];\r\n for (var j = 0; j < columns.length; j++) {\r\n var column = columns[j];\r\n // Update the control\r\n updateControl(column.control);\r\n }\r\n }\r\n }\r\n // Remove the progress bar\r\n progress.el.parentElement ? progress.el.parentElement.removeChild(progress.el) : null;\r\n // Counter for each control\r\n var ctrlCounter = 0;\r\n // Render the form\r\n form = core_1.Components.Form({\r\n el: props.el,\r\n className: props.className,\r\n groupClassName: props.groupClassName,\r\n rowClassName: props.rowClassName,\r\n onControlRendered: function (control) {\r\n // See if all of the controls have been rendered\r\n if (++ctrlCounter == rows.length) {\r\n // See if an event exists\r\n if (props.onFormRendered) {\r\n // Execute the form rendered event in another thread\r\n setTimeout(function () { props.onFormRendered(form); }, 10);\r\n }\r\n }\r\n // Return the control rendered event\r\n return props.onControlRendered ? props.onControlRendered(control, props.info.fields[control.props.name]) : null;\r\n },\r\n onControlRendering: function (control) { return props.onControlRendering ? props.onControlRendering(control, props.info.fields[control.name]) : null; },\r\n rows: props.template || rows\r\n });\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(form) : null;\r\n // Return the form informaiton\r\n return {\r\n get el() { return form ? form.el : null; }\r\n };\r\n};\r\n// Render the edit form\r\nexports.ListForm.renderEditForm = function (props) {\r\n var mapper = {};\r\n var rows = [];\r\n var value = {};\r\n var attachments = {\r\n delete: [],\r\n new: []\r\n };\r\n // Method to add a refresh alert\r\n var addRefreshLink = function () {\r\n // Ensure the link doesn't already exist\r\n if (props.el.querySelector(\".refresh-btn\")) {\r\n return;\r\n }\r\n // Create the refresh button\r\n var alert = core_1.Components.ButtonGroup({\r\n className: \"refresh-btn\",\r\n buttonType: core_1.Components.ButtonTypes.Danger,\r\n buttons: [\r\n {\r\n text: \"Refresh Form\",\r\n onClick: function () {\r\n // Clear the element and reload the form\r\n props.el.innerHTML = \"\";\r\n // Render the form\r\n exports.ListForm.renderEditForm(props);\r\n }\r\n },\r\n {\r\n text: \"Refresh Page\",\r\n onClick: function () {\r\n // Refresh the page\r\n document.location.href = document.location.href;\r\n }\r\n }\r\n ]\r\n });\r\n // Add the element at the top\r\n props.el.insertBefore(alert.el, props.el.children[0]);\r\n };\r\n // Method to remove the attachments\r\n var removeAttachments = function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure attachments exists\r\n if (attachments.delete.length == 0) {\r\n resolve();\r\n return;\r\n }\r\n // Get the web\r\n props.info.list.ParentWeb().execute(function (web) {\r\n // Parse the attachments\r\n gd_sprest_1.Helper.Executor(attachments.delete, function (attachment) {\r\n // Get the attachment file\r\n web.getFileByServerRelativeUrl(attachment.ServerRelativeUrl).delete().execute();\r\n // Parse the attachments\r\n for (var i = 0; i < props.info.attachments.length; i++) {\r\n // See if this is the target attachment\r\n if (props.info.attachments[i].ServerRelativeUrl == attachment.ServerRelativeUrl) {\r\n // Remove this item\r\n props.info.attachments.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }).then(function () {\r\n // Wait for the files to be deleted\r\n web.done(function () {\r\n // Clear the attachments\r\n attachments.delete = [];\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n });\r\n });\r\n };\r\n // Method to save the attachments\r\n var saveAttachments = function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure attachments exists\r\n if (attachments.new.length == 0) {\r\n resolve();\r\n return;\r\n }\r\n // Parse the attachments\r\n gd_sprest_1.Helper.Executor(attachments.new, function (attachment) {\r\n // Get the item's attachments\r\n props.info.list.Items(info.item.Id).AttachmentFiles()\r\n // Add the file\r\n .add(attachment.name, attachment.data)\r\n // Execute the request\r\n .execute(function (attachment) {\r\n // Ensure attachments exist\r\n info.attachments = info.attachments || [];\r\n // Append the attachment\r\n info.attachments.push(attachment);\r\n });\r\n }).then(function () {\r\n // Wait for the files to upload\r\n props.info.list.done(function () {\r\n // Clear the attachments\r\n attachments.new = [];\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n });\r\n };\r\n // Render a loading message\r\n var progress = core_1.Components.Progress({\r\n el: props.el,\r\n isAnimated: true,\r\n isStriped: true,\r\n label: \"Loading the Form\",\r\n size: 100\r\n });\r\n // See if we are rendering attachments\r\n if (props.info.attachments) {\r\n // Render the attachments\r\n rows.push({\r\n columns: [{\r\n control: {\r\n id: \"ListFormAttachments\",\r\n label: \"Attachments\",\r\n name: \"Attachments\",\r\n onControlRendered: function (control) {\r\n // Render a toolbar\r\n var toolbar = core_1.Components.Toolbar({\r\n el: control.el,\r\n items: [{\r\n buttons: [{\r\n className: \"upload-btn me-1\",\r\n isSmall: true,\r\n text: \"Upload\",\r\n type: core_1.Components.ButtonTypes.Secondary,\r\n onClick: function (btn, ev) {\r\n var elUpload = ev.currentTarget;\r\n // Display an upload dialog\r\n gd_sprest_1.Helper.ListForm.showFileDialog().then(function (fileInfo) {\r\n // Get the buttons and remove any duplicates\r\n var buttons = elUpload.parentElement.querySelectorAll(\".btn\");\r\n for (var i = 0; i < buttons.length; i++) {\r\n var button = buttons[i];\r\n // See if this is the associated button\r\n if (button.innerText.replace(/X$/, '') == fileInfo.name) {\r\n // Get the badge\r\n var badge = button.querySelector(\".badge\");\r\n if (badge) {\r\n // Remove the button\r\n badge.click();\r\n }\r\n break;\r\n }\r\n }\r\n // Save the file information\r\n attachments.new.push(fileInfo);\r\n // Append the attachment\r\n elUpload.parentElement.appendChild(core_1.Components.Popover({\r\n isDismissible: true,\r\n type: core_1.Components.PopoverPlacements.Bottom,\r\n btnProps: {\r\n className: \"me-1\",\r\n isSmall: true,\r\n text: fileInfo.name\r\n },\r\n options: {\r\n content: core_1.Components.Button({\r\n data: fileInfo,\r\n isSmall: true,\r\n text: \"Remove\",\r\n type: core_1.Components.ButtonTypes.Danger,\r\n onClick: function (btn, ev) {\r\n var fileName = btn.data.name;\r\n // Parse the array\r\n for (var i = 0; i < attachments.new.length; i++) {\r\n // See if this is the target attachment\r\n if (attachments.new[i].name == fileName) {\r\n // Remove this attachment\r\n attachments.new.splice(i, 1);\r\n break;\r\n }\r\n }\r\n // Get the files\r\n var files = btnGroup.querySelectorAll(\".btn[data-toggle='popover']\");\r\n for (var i = 0; i < files.length; i++) {\r\n var file = files[i];\r\n // See if this is the target button\r\n if (file.innerText == fileName) {\r\n // Remove this popover\r\n file.parentElement.removeChild(file);\r\n break;\r\n }\r\n }\r\n }\r\n }).el\r\n }\r\n }).el);\r\n });\r\n }\r\n }]\r\n }]\r\n });\r\n // Get the button group\r\n var btnGroup = toolbar.el.querySelector(\".btn-group\");\r\n if (btnGroup) {\r\n // Parse the attachments\r\n for (var i = 0; i < props.info.attachments.length; i++) {\r\n var attachment = props.info.attachments[i];\r\n // Add the attachment\r\n btnGroup.appendChild(core_1.Components.Popover({\r\n isDismissible: true,\r\n type: core_1.Components.PopoverPlacements.Bottom,\r\n btnProps: {\r\n className: \"me-1\",\r\n isSmall: true,\r\n text: attachment.FileName,\r\n },\r\n options: {\r\n content: core_1.Components.Button({\r\n data: attachment,\r\n isSmall: true,\r\n text: \"Remove\",\r\n type: core_1.Components.ButtonTypes.Danger,\r\n onClick: function (btn, ev) {\r\n var attachment = btn.data;\r\n // Add this file for deletion\r\n attachments.delete.push(attachment);\r\n // Get the files\r\n var files = btnGroup.querySelectorAll(\".btn[data-toggle='popover']\");\r\n for (var i_1 = 0; i_1 < files.length; i_1++) {\r\n var file = files[i_1];\r\n // See if this is the target button\r\n if (file.innerText == attachment.FileName) {\r\n // Remove this popover\r\n file.parentElement.removeChild(file);\r\n break;\r\n }\r\n }\r\n }\r\n }).el\r\n }\r\n }).el);\r\n }\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n }\r\n // Parse the fields to render\r\n var fieldNames = getFieldsToRender(props);\r\n var _loop_1 = function (i) {\r\n var fieldName = fieldNames[i];\r\n var field = props.info.fields[fieldName];\r\n // Ensure the field exists\r\n if (field == null) {\r\n // Log\r\n console.error(\"[List Form] Field '\" + fieldName + \"' does not exist. Check the list or query.\");\r\n return \"continue\";\r\n }\r\n // See if the item exists\r\n value[fieldName] = null;\r\n if (props.info.item) {\r\n // Set the value\r\n value[fieldName] = props.info.item[fieldName];\r\n // See if this is a lookup or user field\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Lookup || field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User) {\r\n // Update the value\r\n value[fieldName] = value[fieldName + \"Id\"] || (value[fieldName] ? value[fieldName].Id : null) || value[fieldName];\r\n }\r\n // See if this is a file leaf ref\r\n if (fieldName == \"FileLeafRef\") {\r\n // Update the value\r\n value[fieldName] = value[fieldName] || props.info.item.Title;\r\n }\r\n }\r\n // Determine the control mode\r\n var controlMode = props.controlMode || (props.info.item ? gd_sprest_1.SPTypes.ControlMode.Edit : gd_sprest_1.SPTypes.ControlMode.New);\r\n // See if this is an edit form and we are hiding this field\r\n if (controlMode == gd_sprest_1.SPTypes.ControlMode.Edit && field.SchemaXml.indexOf('ShowInEditForm=\"FALSE\"') > 0) {\r\n return \"continue\";\r\n }\r\n // See if this is a new form and we are hiding this field\r\n if (controlMode == gd_sprest_1.SPTypes.ControlMode.New && field.SchemaXml.indexOf('ShowInNewForm=\"FALSE\"') > 0) {\r\n return \"continue\";\r\n }\r\n // See if thi sis a new form and this is an associated lookup field\r\n if (controlMode == gd_sprest_1.SPTypes.ControlMode.New && field.IsDependentLookup) {\r\n return \"continue\";\r\n }\r\n // See if this is a display form and we are hiding this field\r\n if (controlMode == gd_sprest_1.SPTypes.ControlMode.Display && field.SchemaXml.indexOf('ShowInDisplayForm=\"FALSE\"') > 0) {\r\n return \"continue\";\r\n }\r\n // See if this is a read-only field\r\n if (field.ReadOnlyField) {\r\n // Do not render in the new form\r\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\r\n return \"continue\";\r\n }\r\n }\r\n // Do not render a hidden taxonomy field\r\n if (field.Hidden && field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Note && /_0$/.test(field.Title)) {\r\n return \"continue\";\r\n }\r\n // See if this is an invalid field type\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Invalid) {\r\n // Ensure it's not a taxonomy field\r\n if (!/^TaxonomyFieldType/.test(field.TypeAsString)) {\r\n return \"continue\";\r\n }\r\n }\r\n // Else, see if this is a calculated column\r\n else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Calculated) {\r\n // Do not render in the new/edit forms\r\n if (props.controlMode != gd_sprest_1.SPTypes.ControlMode.Display) {\r\n return \"continue\";\r\n }\r\n }\r\n // See if this is a lookup field\r\n var lookupFilter = null;\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Lookup) {\r\n // Call the filter event\r\n lookupFilter = props.onFilterLookupField ? props.onFilterLookupField(field) : null;\r\n }\r\n // Create the control\r\n var fieldControl = (0, field_1.Field)({\r\n controlMode: props.controlMode,\r\n field: field,\r\n listInfo: props.info,\r\n value: value[fieldName],\r\n onControlRendering: function (control, field) {\r\n // Set the lookup field filter\r\n lookupFilter ? control.lookupFilter = lookupFilter : null;\r\n },\r\n onControlRendered: function (control, field) {\r\n // Update the mapper\r\n mapper[field.InternalName].control = control;\r\n },\r\n onValidate: props.onValidate,\r\n onError: function (msg) {\r\n // Add the refresh link\r\n addRefreshLink();\r\n // Call the event\r\n props.onError ? props.onError(msg) : null;\r\n }\r\n });\r\n // Update the mapper\r\n mapper[fieldName] = fieldControl;\r\n // Add the row\r\n rows.push({\r\n columns: [{\r\n control: fieldControl.controlProps\r\n }]\r\n });\r\n };\r\n for (var i = 0; i < fieldNames.length; i++) {\r\n _loop_1(i);\r\n }\r\n // See if there is a template\r\n if (props.template) {\r\n var updateControl = function (refControl) {\r\n // Get the control from the mapper\r\n var control = refControl && mapper[refControl.name] ? mapper[refControl.name].controlProps : null;\r\n // Ensure the controls exists\r\n if (control && refControl) {\r\n // Parse the control keys\r\n for (var key in control) {\r\n // Skip if a value is already defined\r\n if (refControl[key]) {\r\n continue;\r\n }\r\n // Update the property\r\n refControl[key] = control[key];\r\n }\r\n }\r\n };\r\n // Parse the template\r\n for (var i = 0; i < props.template.length; i++) {\r\n var row = props.template[i];\r\n // Parse the columns if there are columns\r\n var columns = row.columns || [];\r\n for (var j = 0; j < columns.length; j++) {\r\n var column = columns[j];\r\n // Update the control\r\n updateControl(column.control);\r\n }\r\n }\r\n }\r\n // Remove the progress bar\r\n progress.el.parentElement ? progress.el.parentElement.removeChild(progress.el) : null;\r\n // Counter for each control\r\n var ctrlCounter = 0;\r\n // Render the form\r\n var form = core_1.Components.Form({\r\n el: props.el,\r\n className: props.className,\r\n groupClassName: props.groupClassName,\r\n rowClassName: props.rowClassName,\r\n onControlRendered: function (control) {\r\n // See if all of the controls have been rendered\r\n if (++ctrlCounter == rows.length) {\r\n // See if an event exists\r\n if (props.onFormRendered) {\r\n // Execute the form rendered event in another thread\r\n setTimeout(function () { props.onFormRendered(form); }, 10);\r\n }\r\n }\r\n // Return the event\r\n return props.onControlRendered ? props.onControlRendered(control, props.info.fields[control.props.name]) : null;\r\n },\r\n onControlRendering: function (control) {\r\n var updateReadOnly = function (control) {\r\n // See if this control is readonly\r\n if (control.isReadonly) {\r\n var html_1 = (props.info.fieldValuesAsHtml && props.info.fieldValuesAsHtml[field.InternalName]) || \"\";\r\n // See if this is a checkbox and the label is not set\r\n if (control.type == core_1.Components.FormControlTypes.Checkbox && (control.label || \"\").length == 0) {\r\n // Update the label\r\n var item = control.items[0];\r\n control.label = item ? item.label : control.label;\r\n }\r\n // Update the control properties\r\n control.type = core_1.Components.FormControlTypes.Readonly;\r\n // Detect html\r\n if (/<*>/g.test(html_1)) {\r\n // Update the control properties\r\n control.data = html_1;\r\n }\r\n // Set the rendered event\r\n control.onControlRendered = function (control) {\r\n // Set the class name\r\n control.el.classList.add(\"form-control\");\r\n control.el.style.backgroundColor = \"#e9ecef\";\r\n // Override the html rendered\r\n control.el.innerHTML = html_1 || control.props.value;\r\n };\r\n // See if this is a user field\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User) {\r\n // See if this is a multi-user selection\r\n if (field.AllowMultipleValues) {\r\n var userNames = [];\r\n // Parse the users\r\n var users = (props.info.item[field.InternalName] ? props.info.item[field.InternalName].results : null) || [];\r\n for (var j = 0; j < users.length; j++) {\r\n // Append the user name\r\n userNames.push(users[j].Title);\r\n }\r\n // Set the html value\r\n html_1 = userNames.join('<br />\\n');\r\n }\r\n else {\r\n // Extract the text only for single selections\r\n var elUser = document.createElement(\"div\");\r\n elUser.innerHTML = html_1;\r\n html_1 = elUser.innerText;\r\n }\r\n }\r\n }\r\n };\r\n // Execute the rendering event\r\n var field = props.info.fields[control.name];\r\n var returnVal = props.onControlRendering ? props.onControlRendering(control, field) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the event to complete\r\n returnVal.then(function (ctrlProps) {\r\n // Update the properties\r\n updateReadOnly(ctrlProps || control);\r\n });\r\n }\r\n else {\r\n // Update the properties\r\n updateReadOnly(control);\r\n }\r\n },\r\n rows: props.template || rows,\r\n value: value\r\n });\r\n // Method to get the values\r\n var getValues = function () {\r\n var values = {};\r\n // See if the content type was set\r\n if (props.info.contentType) {\r\n // Set the content type id\r\n values[\"ContentTypeId\"] = props.info.contentType.Id.StringValue;\r\n }\r\n // Parse the fields\r\n for (var fieldName in props.info.fields) {\r\n // Get the form field and skip readonly fields\r\n var formField = mapper[fieldName];\r\n if (formField == null || formField.controlProps.isReadonly) {\r\n continue;\r\n }\r\n // Get the field value\r\n var fieldValue = formField.getValue();\r\n // Set the item value\r\n values[fieldValue.name] = fieldValue.value;\r\n // See if this is the file leaf ref\r\n if (fieldValue.name == \"FileLeafRef\") {\r\n // Update the 'Title'\r\n values[\"Title\"] = values[\"Title\"] || values[fieldValue.name];\r\n }\r\n }\r\n // Return the form values\r\n return values;\r\n };\r\n // Create the form object\r\n var formObj = {\r\n appendControls: function (controls) { form.appendControls(controls); },\r\n appendRows: function (rows) { form.appendRows(rows); },\r\n el: form.el,\r\n getControl: function (fieldName) { return mapper[fieldName] ? mapper[fieldName].control : null; },\r\n getItem: function () { return props.info.item; },\r\n getValues: getValues,\r\n isValid: function () {\r\n var isValid = true;\r\n // Parse the fields\r\n for (var fieldName in props.info.fields) {\r\n // Skip readonly fields\r\n var formField = mapper[fieldName];\r\n if (formField == null || formField.controlProps.isReadonly) {\r\n continue;\r\n }\r\n // Validate the form field and update the status flag\r\n var controlIsValid = formField.isValid();\r\n isValid = isValid && controlIsValid;\r\n }\r\n // Return the flag\r\n return isValid;\r\n },\r\n save: function () {\r\n var onSaving = function (values) {\r\n return new Promise(function (resolve) {\r\n // See if a save event exists\r\n var returnVal = props.onSaving ? props.onSaving(values) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (newValues) {\r\n // Resolve the promise\r\n resolve(newValues || values);\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve(values);\r\n }\r\n });\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Call the saving event\r\n onSaving(getValues()).then(function (values) {\r\n // Update the item\r\n exports.ListForm.saveItem(props.info, values).then(function (info) {\r\n // Remove the attachments\r\n removeAttachments(info).then(function () {\r\n // Save the attachments\r\n saveAttachments(info).then(function () {\r\n // Update the info\r\n props.info = info;\r\n // Resolve the promise\r\n resolve(props.info.item);\r\n });\r\n });\r\n }, reject);\r\n });\r\n });\r\n }\r\n };\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(formObj) : null;\r\n // Return the form\r\n return formObj;\r\n};\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/listForm/index.js?");
|
|
1828
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ListForm = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar datetime_1 = __webpack_require__(/*! ../datetime */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar field_1 = __webpack_require__(/*! ../field */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/field/index.js\");\r\n// Extend the list form\r\nexports.ListForm = gd_sprest_1.Helper.ListForm;\r\n// Method to get the fields to render\r\nvar getFieldsToRender = function (props) {\r\n var fieldNames = [];\r\n // See if the \"include\" fields property is defined\r\n if (props.includeFields) {\r\n // Set the field names\r\n fieldNames = props.includeFields;\r\n }\r\n else {\r\n // Parse the fields\r\n for (var fieldName in props.info.fields) {\r\n // See if the \"exclude\" property is set\r\n if (props.excludeFields) {\r\n var renderFl = true;\r\n // Parse the fields\r\n for (var i = 0; i < props.excludeFields.length; i++) {\r\n // See if we are excluding this field\r\n if (props.excludeFields[i] == fieldName) {\r\n // Set the flag\r\n renderFl = false;\r\n break;\r\n }\r\n }\r\n // Skip this field, if we are not rendering it\r\n if (!renderFl) {\r\n continue;\r\n }\r\n }\r\n // Add the field name\r\n fieldNames.push(fieldName);\r\n }\r\n }\r\n // Return the field names\r\n return fieldNames;\r\n};\r\n// Method to render a display form for an item\r\nexports.ListForm.renderDisplayForm = function (props) {\r\n var form = null;\r\n // Render a loading message\r\n var progress = core_1.Components.Progress({\r\n el: props.el,\r\n isAnimated: true,\r\n isStriped: true,\r\n label: \"Loading the Form\",\r\n size: 100\r\n });\r\n var mapper = {};\r\n var rows = [];\r\n // See if we are rendering attachments\r\n if (props.info.attachments) {\r\n // Render the attachments\r\n rows.push({\r\n columns: [{\r\n control: {\r\n id: \"ListFormAttachments\",\r\n label: \"Attachments\",\r\n name: \"Attachments\",\r\n onControlRendered: function (control) {\r\n var items = [];\r\n // Parse the attachments\r\n for (var i = 0; i < props.info.attachments.length; i++) {\r\n var attachment = props.info.attachments[i];\r\n // Add the item\r\n items.push({\r\n buttons: [{\r\n className: \"me-1\",\r\n href: attachment.ServerRelativeUrl,\r\n isSmall: true,\r\n text: attachment.FileName\r\n }]\r\n });\r\n }\r\n // Render a toolbar\r\n core_1.Components.Toolbar({\r\n el: control.el,\r\n items: items\r\n });\r\n }\r\n }\r\n }]\r\n });\r\n }\r\n // Parse the fields to render\r\n var fieldNames = getFieldsToRender(props);\r\n for (var i = 0; i < fieldNames.length; i++) {\r\n var fieldName = fieldNames[i];\r\n var field = props.info.fields[fieldName];\r\n var value = props.info.fieldValuesAsText[fieldName] || \"\";\r\n var html = props.info.fieldValuesAsHtml[fieldName] || props.info.fieldValuesAsHtml[fieldName.replace(/\\_/g, \"_x005f_\")] || \"\";\r\n // Ensure the field exists\r\n if (field == null) {\r\n // Log\r\n console.error(\"[List Form] Field '\" + fieldName + \"' does not exist. Check the list or query.\");\r\n continue;\r\n }\r\n // See if we are hiding the field\r\n if (field.SchemaXml.indexOf('ShowInDisplayForm=\"FALSE\"') > 0) {\r\n continue;\r\n }\r\n // See if this is a note field\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Note) {\r\n // Update the html\r\n html = html.replace(/\\r?\\n/g, '<br />');\r\n }\r\n // Else, see if this is a user field\r\n else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User) {\r\n // See if this is a multi-user selection\r\n if (field.AllowMultipleValues) {\r\n var userNames = [];\r\n // Parse the users\r\n var users = (props.info.item[fieldName] ? props.info.item[fieldName].results : null) || [];\r\n for (var j = 0; j < users.length; j++) {\r\n // Append the user name\r\n userNames.push(users[j].Title);\r\n }\r\n // Set the html value\r\n html = userNames.join('<br />\\n');\r\n }\r\n else {\r\n // Extract the text only for single selections\r\n var elUser = document.createElement(\"div\");\r\n elUser.innerHTML = html;\r\n html = elUser.innerText;\r\n }\r\n }\r\n // Else, see if this is a choice field\r\n else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Choice || field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.MultiChoice) {\r\n // Update the html\r\n html = value;\r\n }\r\n // Set the control\r\n mapper[fieldName] = {\r\n data: html,\r\n description: field.Description,\r\n isReadonly: true,\r\n label: field.Title,\r\n name: field.InternalName,\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: html\r\n };\r\n // Update the type, based on the field\r\n switch (field.FieldTypeKind) {\r\n case gd_sprest_1.SPTypes.FieldType.DateTime:\r\n // Set the time flag\r\n mapper[fieldName].showTime = field.DisplayFormat == gd_sprest_1.SPTypes.DateFormat.DateTime ? true : false;\r\n // Set the type\r\n mapper[fieldName].type = datetime_1.DateTimeControlType;\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.Note:\r\n // Set the type\r\n mapper[fieldName].type = core_1.Components.FormControlTypes.TextArea;\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n // Set the type\r\n mapper[fieldName].type = field.AllowMultipleValues ? core_1.Components.FormControlTypes.TextArea : mapper[fieldName].type;\r\n break;\r\n }\r\n // Detect html\r\n if (/<*>/g.test(html)) {\r\n // Update the control to be read-only\r\n mapper[fieldName].type = core_1.Components.FormControlTypes.Readonly;\r\n // Set the rendered event\r\n mapper[fieldName].onControlRendered = function (control) {\r\n // Set the class name\r\n control.el.classList.add(\"form-control\");\r\n control.el.style.backgroundColor = \"#e9ecef\";\r\n // Override the html rendered\r\n control.el.innerHTML = control.props.data;\r\n };\r\n }\r\n // Else, detect xml\r\n else if (/</g.test(html)) {\r\n // Update the value\r\n mapper[fieldName].value = html.replace(/</g, '<')\r\n .replace(/>/g, '>')\r\n .replace(/&/g, '&')\r\n .replace(/"/g, '\"');\r\n }\r\n // Add the row\r\n rows.push({\r\n columns: [{\r\n control: mapper[fieldName]\r\n }]\r\n });\r\n }\r\n // See if there is a template\r\n if (props.template) {\r\n var updateControl = function (refControl) {\r\n // Get the control from the mapper\r\n var control = refControl ? mapper[refControl.name] : null;\r\n // Ensure the controls exists\r\n if (control && refControl) {\r\n // Parse the control keys\r\n for (var key in control) {\r\n // Skip if a value is already defined\r\n if (refControl[key]) {\r\n continue;\r\n }\r\n // Update the property\r\n refControl[key] = control[key];\r\n }\r\n }\r\n };\r\n // Parse the template\r\n for (var i = 0; i < props.template.length; i++) {\r\n var row = props.template[i];\r\n // Parse the columns if there are columns\r\n var columns = row.columns || [];\r\n for (var j = 0; j < columns.length; j++) {\r\n var column = columns[j];\r\n // Update the control\r\n updateControl(column.control);\r\n }\r\n }\r\n }\r\n // Remove the progress bar\r\n progress.el.parentElement ? progress.el.parentElement.removeChild(progress.el) : null;\r\n // Counter for each control\r\n var ctrlCounter = 0;\r\n // Render the form\r\n form = core_1.Components.Form({\r\n el: props.el,\r\n className: props.className,\r\n groupClassName: props.groupClassName,\r\n rowClassName: props.rowClassName,\r\n onControlRendered: function (control) {\r\n // See if all of the controls have been rendered\r\n if (++ctrlCounter == rows.length) {\r\n // See if an event exists\r\n if (props.onFormRendered) {\r\n // Execute the form rendered event in another thread\r\n setTimeout(function () { props.onFormRendered(form); }, 10);\r\n }\r\n }\r\n // Return the control rendered event\r\n return props.onControlRendered ? props.onControlRendered(control, props.info.fields[control.props.name]) : null;\r\n },\r\n onControlRendering: function (control) { return props.onControlRendering ? props.onControlRendering(control, props.info.fields[control.name]) : null; },\r\n rows: props.template || rows\r\n });\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(form) : null;\r\n // Return the form informaiton\r\n return {\r\n get el() { return form ? form.el : null; }\r\n };\r\n};\r\n// Render the edit form\r\nexports.ListForm.renderEditForm = function (props) {\r\n var mapper = {};\r\n var rows = [];\r\n var value = {};\r\n var attachments = {\r\n delete: [],\r\n new: []\r\n };\r\n // Method to add a refresh alert\r\n var addRefreshLink = function () {\r\n // Ensure the link doesn't already exist\r\n if (props.el.querySelector(\".refresh-btn\")) {\r\n return;\r\n }\r\n // Create the refresh button\r\n var alert = core_1.Components.ButtonGroup({\r\n className: \"refresh-btn\",\r\n buttonType: core_1.Components.ButtonTypes.Danger,\r\n buttons: [\r\n {\r\n text: \"Refresh Form\",\r\n onClick: function () {\r\n // Clear the element and reload the form\r\n props.el.innerHTML = \"\";\r\n // Render the form\r\n exports.ListForm.renderEditForm(props);\r\n }\r\n },\r\n {\r\n text: \"Refresh Page\",\r\n onClick: function () {\r\n // Refresh the page\r\n document.location.href = document.location.href;\r\n }\r\n }\r\n ]\r\n });\r\n // Add the element at the top\r\n props.el.insertBefore(alert.el, props.el.children[0]);\r\n };\r\n // Method to remove the attachments\r\n var removeAttachments = function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure attachments exists\r\n if (attachments.delete.length == 0) {\r\n resolve();\r\n return;\r\n }\r\n // Get the web\r\n props.info.list.ParentWeb().execute(function (web) {\r\n // Parse the attachments\r\n gd_sprest_1.Helper.Executor(attachments.delete, function (attachment) {\r\n // Get the attachment file\r\n web.getFileByServerRelativeUrl(attachment.ServerRelativeUrl).delete().execute();\r\n // Parse the attachments\r\n for (var i = 0; i < props.info.attachments.length; i++) {\r\n // See if this is the target attachment\r\n if (props.info.attachments[i].ServerRelativeUrl == attachment.ServerRelativeUrl) {\r\n // Remove this item\r\n props.info.attachments.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }).then(function () {\r\n // Wait for the files to be deleted\r\n web.done(function () {\r\n // Clear the attachments\r\n attachments.delete = [];\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n });\r\n });\r\n };\r\n // Method to save the attachments\r\n var saveAttachments = function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure attachments exists\r\n if (attachments.new.length == 0) {\r\n resolve();\r\n return;\r\n }\r\n // Parse the attachments\r\n gd_sprest_1.Helper.Executor(attachments.new, function (attachment) {\r\n // Get the item's attachments\r\n props.info.list.Items(info.item.Id).AttachmentFiles()\r\n // Add the file\r\n .add(attachment.name, attachment.data)\r\n // Execute the request\r\n .execute(function (attachment) {\r\n // Ensure attachments exist\r\n info.attachments = info.attachments || [];\r\n // Append the attachment\r\n info.attachments.push(attachment);\r\n });\r\n }).then(function () {\r\n // Wait for the files to upload\r\n props.info.list.done(function () {\r\n // Clear the attachments\r\n attachments.new = [];\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n });\r\n };\r\n // Render a loading message\r\n var progress = core_1.Components.Progress({\r\n el: props.el,\r\n isAnimated: true,\r\n isStriped: true,\r\n label: \"Loading the Form\",\r\n size: 100\r\n });\r\n // See if we are rendering attachments\r\n if (props.info.attachments) {\r\n // Render the attachments\r\n rows.push({\r\n columns: [{\r\n control: {\r\n id: \"ListFormAttachments\",\r\n label: \"Attachments\",\r\n name: \"Attachments\",\r\n onControlRendered: function (control) {\r\n // Render a toolbar\r\n var toolbar = core_1.Components.Toolbar({\r\n el: control.el,\r\n items: [{\r\n buttons: [{\r\n className: \"upload-btn me-1\",\r\n isSmall: true,\r\n text: \"Upload\",\r\n type: core_1.Components.ButtonTypes.Secondary,\r\n onClick: function (btn, ev) {\r\n var elUpload = ev.currentTarget;\r\n // Display an upload dialog\r\n gd_sprest_1.Helper.ListForm.showFileDialog().then(function (fileInfo) {\r\n // Get the buttons and remove any duplicates\r\n var buttons = elUpload.parentElement.querySelectorAll(\".btn\");\r\n for (var i = 0; i < buttons.length; i++) {\r\n var button = buttons[i];\r\n // See if this is the associated button\r\n if (button.innerText.replace(/X$/, '') == fileInfo.name) {\r\n // Get the badge\r\n var badge = button.querySelector(\".badge\");\r\n if (badge) {\r\n // Remove the button\r\n badge.click();\r\n }\r\n break;\r\n }\r\n }\r\n // Save the file information\r\n attachments.new.push(fileInfo);\r\n // Append the attachment\r\n elUpload.parentElement.appendChild(core_1.Components.Popover({\r\n isDismissible: true,\r\n type: core_1.Components.PopoverPlacements.Bottom,\r\n btnProps: {\r\n className: \"me-1\",\r\n isSmall: true,\r\n text: fileInfo.name\r\n },\r\n options: {\r\n content: core_1.Components.Button({\r\n data: fileInfo,\r\n isSmall: true,\r\n text: \"Remove\",\r\n type: core_1.Components.ButtonTypes.Danger,\r\n onClick: function (btn, ev) {\r\n var fileName = btn.data.name;\r\n // Parse the array\r\n for (var i = 0; i < attachments.new.length; i++) {\r\n // See if this is the target attachment\r\n if (attachments.new[i].name == fileName) {\r\n // Remove this attachment\r\n attachments.new.splice(i, 1);\r\n break;\r\n }\r\n }\r\n // Get the files\r\n var files = btnGroup.querySelectorAll(\".btn[data-toggle='popover']\");\r\n for (var i = 0; i < files.length; i++) {\r\n var file = files[i];\r\n // See if this is the target button\r\n if (file.innerText == fileName) {\r\n // Remove this popover\r\n file.parentElement.removeChild(file);\r\n break;\r\n }\r\n }\r\n }\r\n }).el\r\n }\r\n }).el);\r\n });\r\n }\r\n }]\r\n }]\r\n });\r\n // Get the button group\r\n var btnGroup = toolbar.el.querySelector(\".btn-group\");\r\n if (btnGroup) {\r\n // Parse the attachments\r\n for (var i = 0; i < props.info.attachments.length; i++) {\r\n var attachment = props.info.attachments[i];\r\n // Add the attachment\r\n btnGroup.appendChild(core_1.Components.Popover({\r\n isDismissible: true,\r\n type: core_1.Components.PopoverPlacements.Bottom,\r\n btnProps: {\r\n className: \"me-1\",\r\n isSmall: true,\r\n text: attachment.FileName,\r\n },\r\n options: {\r\n content: core_1.Components.Button({\r\n data: attachment,\r\n isSmall: true,\r\n text: \"Remove\",\r\n type: core_1.Components.ButtonTypes.Danger,\r\n onClick: function (btn, ev) {\r\n var attachment = btn.data;\r\n // Add this file for deletion\r\n attachments.delete.push(attachment);\r\n // Get the files\r\n var files = btnGroup.querySelectorAll(\".btn[data-toggle='popover']\");\r\n for (var i_1 = 0; i_1 < files.length; i_1++) {\r\n var file = files[i_1];\r\n // See if this is the target button\r\n if (file.innerText == attachment.FileName) {\r\n // Remove this popover\r\n file.parentElement.removeChild(file);\r\n break;\r\n }\r\n }\r\n }\r\n }).el\r\n }\r\n }).el);\r\n }\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n }\r\n // Parse the fields to render\r\n var fieldNames = getFieldsToRender(props);\r\n var _loop_1 = function (i) {\r\n var fieldName = fieldNames[i];\r\n var field = props.info.fields[fieldName];\r\n // Ensure the field exists\r\n if (field == null) {\r\n // Log\r\n console.error(\"[List Form] Field '\" + fieldName + \"' does not exist. Check the list or query.\");\r\n return \"continue\";\r\n }\r\n // See if the item exists\r\n value[fieldName] = null;\r\n if (props.info.item) {\r\n // Set the value\r\n value[fieldName] = props.info.item[fieldName];\r\n // See if this is a lookup or user field\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Lookup || field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User) {\r\n // Update the value\r\n value[fieldName] = value[fieldName + \"Id\"] || (value[fieldName] ? value[fieldName].Id : null) || value[fieldName];\r\n }\r\n // See if this is a file leaf ref\r\n if (fieldName == \"FileLeafRef\") {\r\n // Update the value\r\n value[fieldName] = value[fieldName] || props.info.item.Title;\r\n }\r\n }\r\n // Determine the control mode\r\n var controlMode = props.controlMode || (props.info.item ? gd_sprest_1.SPTypes.ControlMode.Edit : gd_sprest_1.SPTypes.ControlMode.New);\r\n // See if this is an edit form and we are hiding this field\r\n if (controlMode == gd_sprest_1.SPTypes.ControlMode.Edit && field.SchemaXml.indexOf('ShowInEditForm=\"FALSE\"') > 0) {\r\n return \"continue\";\r\n }\r\n // See if this is a new form and we are hiding this field\r\n if (controlMode == gd_sprest_1.SPTypes.ControlMode.New && field.SchemaXml.indexOf('ShowInNewForm=\"FALSE\"') > 0) {\r\n return \"continue\";\r\n }\r\n // See if thi sis a new form and this is an associated lookup field\r\n if (controlMode == gd_sprest_1.SPTypes.ControlMode.New && field.IsDependentLookup) {\r\n return \"continue\";\r\n }\r\n // See if this is a display form and we are hiding this field\r\n if (controlMode == gd_sprest_1.SPTypes.ControlMode.Display && field.SchemaXml.indexOf('ShowInDisplayForm=\"FALSE\"') > 0) {\r\n return \"continue\";\r\n }\r\n // See if this is a read-only field\r\n if (field.ReadOnlyField) {\r\n // Do not render in the new form\r\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\r\n return \"continue\";\r\n }\r\n }\r\n // Do not render a hidden taxonomy field\r\n if (field.Hidden && field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Note && /_0$/.test(field.Title)) {\r\n return \"continue\";\r\n }\r\n // See if this is an invalid field type\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Invalid) {\r\n // Ensure it's not a taxonomy field\r\n if (!/^TaxonomyFieldType/.test(field.TypeAsString)) {\r\n return \"continue\";\r\n }\r\n }\r\n // Else, see if this is a calculated column\r\n else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Calculated) {\r\n // Do not render in the new/edit forms\r\n if (props.controlMode != gd_sprest_1.SPTypes.ControlMode.Display) {\r\n return \"continue\";\r\n }\r\n }\r\n // See if this is a lookup field\r\n var lookupFilter = null;\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Lookup) {\r\n // Call the filter event\r\n lookupFilter = props.onFilterLookupField ? props.onFilterLookupField(field) : null;\r\n }\r\n // Create the control\r\n var fieldControl = (0, field_1.Field)({\r\n controlMode: props.controlMode,\r\n field: field,\r\n listInfo: props.info,\r\n value: value[fieldName],\r\n onControlRendering: function (control, field) {\r\n // Set the lookup field filter\r\n lookupFilter ? control.lookupFilter = lookupFilter : null;\r\n },\r\n onControlRendered: function (control, field) {\r\n // Update the mapper\r\n mapper[field.InternalName].control = control;\r\n },\r\n onValidate: props.onValidate,\r\n onError: function (msg) {\r\n // Add the refresh link\r\n addRefreshLink();\r\n // Call the event\r\n props.onError ? props.onError(msg) : null;\r\n }\r\n });\r\n // Update the mapper\r\n mapper[fieldName] = fieldControl;\r\n // Add the row\r\n rows.push({\r\n columns: [{\r\n control: fieldControl.controlProps\r\n }]\r\n });\r\n };\r\n for (var i = 0; i < fieldNames.length; i++) {\r\n _loop_1(i);\r\n }\r\n // See if there is a template\r\n if (props.template) {\r\n var updateControl = function (refControl) {\r\n // Get the control from the mapper\r\n var control = refControl && mapper[refControl.name] ? mapper[refControl.name].controlProps : null;\r\n // Ensure the controls exists\r\n if (control && refControl) {\r\n // Parse the control keys\r\n for (var key in control) {\r\n // Skip if a value is already defined\r\n if (refControl[key]) {\r\n continue;\r\n }\r\n // Update the property\r\n refControl[key] = control[key];\r\n }\r\n }\r\n };\r\n // Parse the template\r\n for (var i = 0; i < props.template.length; i++) {\r\n var row = props.template[i];\r\n // Parse the columns if there are columns\r\n var columns = row.columns || [];\r\n for (var j = 0; j < columns.length; j++) {\r\n var column = columns[j];\r\n // Update the control\r\n updateControl(column.control);\r\n }\r\n }\r\n }\r\n // Remove the progress bar\r\n progress.el.parentElement ? progress.el.parentElement.removeChild(progress.el) : null;\r\n // Counter for each control\r\n var ctrlCounter = 0;\r\n // Render the form\r\n var form = core_1.Components.Form({\r\n el: props.el,\r\n className: props.className,\r\n groupClassName: props.groupClassName,\r\n rowClassName: props.rowClassName,\r\n onControlRendered: function (control) {\r\n // See if all of the controls have been rendered\r\n if (++ctrlCounter == rows.length) {\r\n // See if an event exists\r\n if (props.onFormRendered) {\r\n // Execute the form rendered event in another thread\r\n setTimeout(function () { props.onFormRendered(form); }, 10);\r\n }\r\n }\r\n // Return the event\r\n return props.onControlRendered ? props.onControlRendered(control, props.info.fields[control.props.name]) : null;\r\n },\r\n onControlRendering: function (control) {\r\n var updateReadOnly = function (control) {\r\n // See if this control is readonly\r\n if (control.isReadonly) {\r\n var html_1 = (props.info.fieldValuesAsHtml && props.info.fieldValuesAsHtml[field.InternalName]) || \"\";\r\n // See if this is a checkbox and the label is not set\r\n if (control.type == core_1.Components.FormControlTypes.Checkbox && (control.label || \"\").length == 0) {\r\n // Update the label\r\n var item = control.items[0];\r\n control.label = item ? item.label : control.label;\r\n }\r\n // Update the control properties\r\n control.type = core_1.Components.FormControlTypes.Readonly;\r\n // Detect html\r\n if (/<*>/g.test(html_1)) {\r\n // Update the control properties\r\n control.data = html_1;\r\n }\r\n // Set the rendered event\r\n control.onControlRendered = function (control) {\r\n // Set the class name\r\n control.el.classList.add(\"form-control\");\r\n control.el.style.backgroundColor = \"#e9ecef\";\r\n // Override the html rendered\r\n control.el.innerHTML = html_1 || control.props.value;\r\n };\r\n // See if this is a user field\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User) {\r\n // See if this is a multi-user selection\r\n if (field.AllowMultipleValues) {\r\n var userNames = [];\r\n // Parse the users\r\n var users = (props.info.item[field.InternalName] ? props.info.item[field.InternalName].results : null) || [];\r\n for (var j = 0; j < users.length; j++) {\r\n // Append the user name\r\n userNames.push(users[j].Title);\r\n }\r\n // Set the html value\r\n html_1 = userNames.join('<br />\\n');\r\n }\r\n else {\r\n // Extract the text only for single selections\r\n var elUser = document.createElement(\"div\");\r\n elUser.innerHTML = html_1;\r\n html_1 = elUser.innerText;\r\n }\r\n }\r\n }\r\n };\r\n // Execute the rendering event\r\n var field = props.info.fields[control.name];\r\n var returnVal = props.onControlRendering ? props.onControlRendering(control, field) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the event to complete\r\n returnVal.then(function (ctrlProps) {\r\n // Update the properties\r\n updateReadOnly(ctrlProps || control);\r\n });\r\n }\r\n else {\r\n // Update the properties\r\n updateReadOnly(control);\r\n }\r\n },\r\n rows: props.template || rows,\r\n value: value\r\n });\r\n // Method to get the values\r\n var getValues = function () {\r\n var values = {};\r\n // See if the content type was set\r\n if (props.info.contentType) {\r\n // Set the content type id\r\n values[\"ContentTypeId\"] = props.info.contentType.Id.StringValue;\r\n }\r\n // Parse the fields\r\n for (var fieldName in props.info.fields) {\r\n // Get the form field and skip readonly fields\r\n var formField = mapper[fieldName];\r\n if (formField == null || formField.controlProps.isReadonly) {\r\n continue;\r\n }\r\n // Get the field value\r\n var fieldValue = formField.getValue();\r\n // Set the item value\r\n values[fieldValue.name] = fieldValue.value;\r\n // See if this is the file leaf ref\r\n if (fieldValue.name == \"FileLeafRef\") {\r\n // Update the 'Title'\r\n values[\"Title\"] = values[\"Title\"] || values[fieldValue.name];\r\n }\r\n }\r\n // Return the form values\r\n return values;\r\n };\r\n // Create the form object\r\n var formObj = {\r\n appendControls: function (controls) { form.appendControls(controls); },\r\n appendRows: function (rows) { form.appendRows(rows); },\r\n el: form.el,\r\n getControl: function (fieldName) { return mapper[fieldName] ? mapper[fieldName].control : null; },\r\n getItem: function () { return props.info.item; },\r\n getValues: getValues,\r\n isValid: function () {\r\n var isValid = true;\r\n // Parse the fields\r\n for (var fieldName in props.info.fields) {\r\n // Skip readonly fields\r\n var formField = mapper[fieldName];\r\n if (formField == null || formField.controlProps.isReadonly) {\r\n continue;\r\n }\r\n // Validate the form field and update the status flag\r\n var controlIsValid = formField.isValid();\r\n isValid = isValid && controlIsValid;\r\n }\r\n // Return the flag\r\n return isValid;\r\n },\r\n save: function () {\r\n var onSaving = function (values) {\r\n return new Promise(function (resolve) {\r\n // See if a save event exists\r\n var returnVal = props.onSaving ? props.onSaving(values) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (newValues) {\r\n // Resolve the promise\r\n resolve(newValues || values);\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve(values);\r\n }\r\n });\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Call the saving event\r\n onSaving(getValues()).then(function (values) {\r\n // Update the item\r\n exports.ListForm.saveItem(props.info, values).then(function (info) {\r\n // Remove the attachments\r\n removeAttachments(info).then(function () {\r\n // Save the attachments\r\n saveAttachments(info).then(function () {\r\n // Update the info\r\n props.info = info;\r\n // Resolve the promise\r\n resolve(props.info.item);\r\n });\r\n });\r\n }, reject);\r\n });\r\n });\r\n }\r\n };\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(formObj) : null;\r\n // Return the form\r\n return formObj;\r\n};\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/listForm/index.js?");
|
|
1829
1829
|
|
|
1830
1830
|
/***/ }),
|
|
1831
1831
|
|
|
1832
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1832
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js":
|
|
1833
1833
|
/*!****************************************************************************************************************!*\
|
|
1834
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1834
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js ***!
|
|
1835
1835
|
\****************************************************************************************************************/
|
|
1836
1836
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1837
1837
|
|
|
1838
1838
|
"use strict";
|
|
1839
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PeoplePickerControlType = exports.PeoplePicker = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/core.js\");\r\n/**\r\n * People Picker\r\n */\r\nvar PeoplePicker = function (props) {\r\n var _filterText = null;\r\n var _menu = null;\r\n var _users = [];\r\n // Method to add a user\r\n var addUser = function (userInfo) {\r\n var user = typeof (userInfo) === \"string\" ? JSON.parse(userInfo) : userInfo;\r\n // Adds the button\r\n var addButton = function (userInfo) {\r\n // See if the picker is read only\r\n if (props.readOnly) {\r\n // Render a tooltip\r\n var tooltip = core_1.Components.Tooltip({\r\n el: elSelectedUsers,\r\n content: [\r\n '<div class=\"text-white text-wrap text-break\">',\r\n '<small>' + (userInfo[\"Email\"] || userInfo[\"UserPrincipalName\"]) + '</small>',\r\n '<br />',\r\n '<small>' + userInfo.LoginName + '</small>',\r\n '</div>'\r\n ].join('\\n'),\r\n placement: core_1.Components.TooltipPlacements.Top,\r\n type: core_1.Components.TooltipTypes.Primary,\r\n btnProps: {\r\n className: \"me-1 mb-1\",\r\n isSmall: true,\r\n text: userInfo.Title,\r\n type: core_1.Components.ButtonTypes.Primary\r\n }\r\n });\r\n }\r\n else {\r\n // Render a tooltip\r\n var tooltip_1 = core_1.Components.Tooltip({\r\n el: elSelectedUsers,\r\n content: [\r\n '<div class=\"text-white text-wrap text-break\">',\r\n '<small>' + (userInfo[\"Email\"] || userInfo[\"UserPrincipalName\"]) + '</small>',\r\n '<br />',\r\n '<small>' + userInfo.LoginName + '</small>',\r\n '</div>'\r\n ].join('\\n'),\r\n placement: core_1.Components.TooltipPlacements.Top,\r\n type: core_1.Components.TooltipTypes.Primary,\r\n btnProps: {\r\n data: userInfo,\r\n className: \"me-1 mb-1\",\r\n isSmall: true,\r\n text: userInfo.Title,\r\n type: core_1.Components.ButtonTypes.Primary,\r\n badge: {\r\n className: \"people-picker-x ms-2\",\r\n content: \"×\",\r\n isPill: true,\r\n type: core_1.Components.BadgeTypes.Light,\r\n onClick: function () {\r\n // Remove the button\r\n elSelectedUsers.removeChild(tooltip_1.button.el);\r\n // Call the event\r\n props.onChange ? props.onChange(obj.getValue()) : null;\r\n }\r\n }\r\n }\r\n });\r\n // Set the data attribute\r\n tooltip_1.button.el.setAttribute(\"data-user\", JSON.stringify(userInfo.stringify()));\r\n }\r\n // Call the event\r\n props.onChange ? props.onChange(obj.getValue()) : null;\r\n };\r\n // See if we are allowing multiple users\r\n var allowMultple = typeof (props.multi) == \"boolean\" ? props.multi : false;\r\n if (!allowMultple) {\r\n // Remove existing users\r\n while (elSelectedUsers.firstChild) {\r\n elSelectedUsers.removeChild(elSelectedUsers.firstChild);\r\n }\r\n }\r\n // Ensure this is a user object\r\n if (user.EntityData) {\r\n // Ensure the group or user id is set\r\n if (user.EntityData.SPGroupID) {\r\n // Find the user by id\r\n (0, gd_sprest_1.Web)().SiteGroups(parseInt(user.EntityData.SPGroupID)).execute(function (group) {\r\n // Add the button\r\n addButton(group);\r\n });\r\n }\r\n else if (user.EntityData.SPUserID) {\r\n // Find the user by id\r\n (0, gd_sprest_1.Web)().getUserById(parseInt(user.EntityData.SPUserID)).execute(function (userInfo) {\r\n // Add the button\r\n addButton(userInfo);\r\n });\r\n }\r\n else {\r\n // Find the user\r\n (0, gd_sprest_1.Web)().ensureUser(user.Key).execute(function (userInfo) {\r\n // Add the button\r\n addButton(userInfo);\r\n }, addButton);\r\n }\r\n }\r\n else {\r\n // Find the user by id\r\n (0, gd_sprest_1.Web)().getUserById(user).execute(function (userInfo) {\r\n // Add the button\r\n addButton(userInfo);\r\n });\r\n }\r\n };\r\n // Method to search for the users\r\n var searchUsers = function (el, searchText, searchAll, spGroupId) {\r\n if (searchAll === void 0) { searchAll = true; }\r\n // Ensure 3 characters exist\r\n if (_filterText.length > 2) {\r\n // Search for the user\r\n (0, gd_sprest_1.PeoplePicker)().clientPeoplePickerSearchUser({\r\n MaximumEntitySuggestions: props.maxResults || 25,\r\n PrincipalSource: searchAll ? gd_sprest_1.SPTypes.PrincipalSources.All : gd_sprest_1.SPTypes.PrincipalSources.UserInfoList,\r\n PrincipalType: props.allowGroups ? gd_sprest_1.SPTypes.PrincipalTypes.All : gd_sprest_1.SPTypes.PrincipalTypes.User,\r\n QueryString: _filterText,\r\n SharePointGroupID: spGroupId\r\n }).execute(function (search) {\r\n // Ensure the search text matches\r\n if (_filterText != searchText) {\r\n return;\r\n }\r\n // Clear the users results\r\n _users = [];\r\n // Set the menu header\r\n el.innerHTML = '<h6 class=\"dropdown-header\">Search Results for \"' + searchText + '\"</h6>';\r\n el.innerHTML += '<div class=\"dropdown-divider\"></div>';\r\n // See if no users were found\r\n if (search.ClientPeoplePickerSearchUser.length == 0) {\r\n // Add a message\r\n el.innerHTML += '<h6 class=\"dropdown-header\">No results were found...</h6>';\r\n }\r\n else {\r\n // Parse the users\r\n for (var i = 0; i < search.ClientPeoplePickerSearchUser.length; i++) {\r\n var exists = false;\r\n var user = search.ClientPeoplePickerSearchUser[i];\r\n // Save the user\r\n _users.push(user);\r\n // Parse the selected users\r\n for (var j = 0; j < elSelectedUsers.children.length; j++) {\r\n var userInfo = JSON.parse(elSelectedUsers.children[j].getAttribute(\"data-user\"));\r\n // See if this user is already selected\r\n if (exists = user.Key == userInfo.Key) {\r\n break;\r\n }\r\n }\r\n // Ensure the user isn't already selected\r\n if (exists) {\r\n continue;\r\n }\r\n // Create the item\r\n var elItem = document.createElement(\"a\");\r\n elItem.className = \"dropdown-item\";\r\n elItem.href = \"#\";\r\n elItem.innerHTML = user.DisplayText;\r\n elItem.setAttribute(\"data-user\", JSON.stringify(user));\r\n el.appendChild(elItem);\r\n // Create a tooltip for this item\r\n core_1.Components.Tooltip({\r\n target: elItem,\r\n content: [\r\n '<div class=\"text-white text-wrap text-break\">',\r\n '<small>' + user.EntityData.Email + '</small>',\r\n '<br />',\r\n '<small>' + user.Key + '</small>',\r\n '</div>'\r\n ].join('\\n'),\r\n placement: core_1.Components.TooltipPlacements.Left,\r\n type: core_1.Components.TooltipTypes.Primary\r\n });\r\n // Set the click event\r\n elItem.addEventListener(\"click\", function (ev) {\r\n var userInfo = ev.currentTarget.getAttribute(\"data-user\");\r\n // Add the user\r\n addUser(userInfo);\r\n // Hide the menu\r\n _menu.hide();\r\n // Clear the search text\r\n elTextbox.querySelector(\"input\").value = \"\";\r\n });\r\n }\r\n }\r\n // Refresh the popover\r\n _menu.hide();\r\n _menu.show();\r\n });\r\n }\r\n };\r\n // Method to set the value\r\n var setValue = function (selectedUsers) {\r\n if (selectedUsers === void 0) { selectedUsers = []; }\r\n // Clear the selected users\r\n elSelectedUsers.innerHTML = \"\";\r\n // Parse the selected users\r\n for (var i = 0; i < selectedUsers.length; i++) {\r\n // Add the user\r\n addUser(selectedUsers[i]);\r\n }\r\n };\r\n // Create the people picker\r\n var elPeoplePicker = document.createElement(\"div\");\r\n elPeoplePicker.className = \"people-picker\";\r\n // Create the menu\r\n var elMenu = document.createElement(\"div\");\r\n elMenu.className = \"dropdown-menu border-0 mw-fit\";\r\n elMenu.innerHTML = '<h6 class=\"dropdown-header\">Search requires 3+ characters</h6>';\r\n // Add the selected users\r\n var elSelectedUsers = document.createElement(\"div\");\r\n elSelectedUsers.style.position = \"relative\";\r\n elPeoplePicker.appendChild(elSelectedUsers);\r\n // Create the textbox\r\n var elTextbox = core_1.Components.InputGroup({\r\n placeholder: props.placeholder == null ? \"Search\" : props.placeholder,\r\n onChange: function (searchText) {\r\n var currentHTML = elMenu.innerHTML;\r\n // See if a value exists\r\n if (searchText) {\r\n // Set the filter text\r\n _filterText = searchText;\r\n // Set the header\r\n elMenu.innerHTML = ['<h6 class=\"dropdown-header\">',\r\n _filterText.length > 2 ? 'Searching for \"' + _filterText + '\"' : 'Search requires 3+ characters',\r\n '</h6>'\r\n ].join('\\n');\r\n // Wait 500ms before searching\r\n setTimeout(function () {\r\n // Ensure the filters match\r\n if (searchText == _filterText) {\r\n // Search for the users\r\n searchUsers(elMenu, searchText, props.searchLocal ? false : true, props.groupId);\r\n }\r\n }, 500);\r\n }\r\n else {\r\n // Set the header\r\n elMenu.innerHTML = '<h6 class=\"dropdown-header\">Search requires 3+ characters</h6>';\r\n }\r\n // See if a refresh is required\r\n if (currentHTML != elMenu.innerHTML) {\r\n // Refresh the popover\r\n _menu.hide();\r\n _menu.show();\r\n }\r\n }\r\n }).el;\r\n props.readOnly ? elTextbox.classList.add(\"d-none\") : null;\r\n elPeoplePicker.appendChild(elTextbox);\r\n // Create the popover menu\r\n _menu = core_1.Components.Popover({\r\n target: elTextbox.querySelector(\"input\"),\r\n placement: core_1.Components.PopoverPlacements.BottomStart,\r\n options: {\r\n content: elMenu,\r\n hideOnClick: false,\r\n maxWidth: \"none\",\r\n trigger: \"focus\"\r\n }\r\n });\r\n // Set the value and ensure it's a \r\n var value = props.value || [];\r\n if (typeof (props.value) != \"object\") {\r\n // Set the default selected users\r\n setValue([value]);\r\n }\r\n else {\r\n // See if this is a user object\r\n var userValue = value;\r\n if (userValue.EntityData) {\r\n // Set the value\r\n value = userValue.EntityData.SPGroupID || userValue.EntityData.SPUserID;\r\n // Set the default selected users\r\n setValue([value]);\r\n }\r\n // Else, see if the results exist\r\n else if (value.results) {\r\n var userIds = [];\r\n // Parse the results\r\n for (var i = 0; i < value.results.length; i++) {\r\n // Add the user id\r\n userIds.push(value.results[i].Id);\r\n }\r\n // Set the default selected users\r\n setValue(userIds);\r\n }\r\n else {\r\n // Set the default selected users\r\n setValue(value);\r\n }\r\n }\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.appendChild(elPeoplePicker);\r\n // See if we are rendering it to an element\r\n if (props.el) {\r\n // Ensure the parent element exists\r\n if (props.el.parentElement && props.el.parentElement.classList) {\r\n // Set the bootstrap class\r\n props.el.parentElement.classList.contains(\"bs\") ? null : props.el.parentElement.classList.add(\"bs\");\r\n }\r\n // Append the elements\r\n while (el.children.length > 0) {\r\n props.el.appendChild(el.children[0]);\r\n }\r\n // Update the element\r\n el = props.el;\r\n }\r\n else {\r\n // Set the bootstrap class\r\n el.classList.add(\"bs\");\r\n }\r\n // Create the object\r\n var obj = {\r\n el: elPeoplePicker,\r\n getValue: function () {\r\n var selectedUsers = [];\r\n // Parse the selected users\r\n for (var i = 0; i < elSelectedUsers.children.length; i++) {\r\n var userInfo = JSON.parse(elSelectedUsers.children[i].getAttribute(\"data-user\"));\r\n var user = gd_sprest_1.Helper.parse(userInfo);\r\n // Add this user\r\n selectedUsers.push(user);\r\n }\r\n // Return the value\r\n return selectedUsers;\r\n },\r\n setValue: setValue\r\n };\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(obj) : null;\r\n // Return the people picker object\r\n return obj;\r\n};\r\nexports.PeoplePicker = PeoplePicker;\r\n// Extend the form controls\r\nexports.PeoplePickerControlType = 101;\r\ncore_1.Components.FormControlTypes[\"PeoplePicker\"] = exports.PeoplePickerControlType;\r\ncore_1.Components.CustomControls.registerType(exports.PeoplePickerControlType, function (props) {\r\n var picker = null;\r\n // Set the created method\r\n var onRendered = props.onControlRendered;\r\n props.onControlRendered = function (ctrl) {\r\n // Render a people picker\r\n picker = (0, exports.PeoplePicker)({\r\n allowGroups: props.allowGroups,\r\n className: props.className,\r\n el: ctrl.el,\r\n groupId: props.groupId,\r\n label: props.label,\r\n maxResults: props.maxResults,\r\n multi: props.multi,\r\n placeholder: props.placeholder,\r\n readOnly: props.isReadonly,\r\n searchLocal: props.searchLocal,\r\n value: props.value\r\n });\r\n // See if the label exists\r\n var elLabel = ctrl[\"_elLabel\"];\r\n if (elLabel) {\r\n // Set the id and aria properties\r\n elLabel ? elLabel.id = (props.id || props.name) + \"_label\" : null;\r\n picker.el.querySelector(\"input\").setAttribute(\"aria-labelledby\", elLabel.id);\r\n }\r\n // Set the control\r\n ctrl.setControl(picker);\r\n // Call the custom render event\r\n onRendered ? onRendered(ctrl) : null;\r\n };\r\n // Register a people picker\r\n props.onGetValue = function (ctrl) {\r\n // Return the value\r\n return picker ? picker.getValue() : ctrl.value;\r\n };\r\n});\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js?");
|
|
1839
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PeoplePickerControlType = exports.PeoplePicker = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/core.js\");\r\n/**\r\n * People Picker\r\n */\r\nvar PeoplePicker = function (props) {\r\n var _filterText = null;\r\n var _menu = null;\r\n var _users = [];\r\n // Method to add a user\r\n var addUser = function (userInfo) {\r\n var user = typeof (userInfo) === \"string\" ? JSON.parse(userInfo) : userInfo;\r\n // Adds the button\r\n var addButton = function (userInfo) {\r\n // See if the picker is read only\r\n if (props.readOnly) {\r\n // Render a tooltip\r\n var tooltip = core_1.Components.Tooltip({\r\n el: elSelectedUsers,\r\n content: [\r\n '<div class=\"text-white text-wrap text-break\">',\r\n '<small>' + (userInfo[\"Email\"] || userInfo[\"UserPrincipalName\"]) + '</small>',\r\n '<br />',\r\n '<small>' + userInfo.LoginName + '</small>',\r\n '</div>'\r\n ].join('\\n'),\r\n placement: core_1.Components.TooltipPlacements.Top,\r\n type: core_1.Components.TooltipTypes.Primary,\r\n btnProps: {\r\n className: \"me-1 mb-1\",\r\n isSmall: true,\r\n text: userInfo.Title,\r\n type: core_1.Components.ButtonTypes.Primary\r\n }\r\n });\r\n }\r\n else {\r\n // Render a tooltip\r\n var tooltip_1 = core_1.Components.Tooltip({\r\n el: elSelectedUsers,\r\n content: [\r\n '<div class=\"text-white text-wrap text-break\">',\r\n '<small>' + (userInfo[\"Email\"] || userInfo[\"UserPrincipalName\"]) + '</small>',\r\n '<br />',\r\n '<small>' + userInfo.LoginName + '</small>',\r\n '</div>'\r\n ].join('\\n'),\r\n placement: core_1.Components.TooltipPlacements.Top,\r\n type: core_1.Components.TooltipTypes.Primary,\r\n btnProps: {\r\n data: userInfo,\r\n className: \"me-1 mb-1\",\r\n isSmall: true,\r\n text: userInfo.Title,\r\n type: core_1.Components.ButtonTypes.Primary,\r\n badge: {\r\n className: \"people-picker-x ms-2\",\r\n content: \"×\",\r\n isPill: true,\r\n type: core_1.Components.BadgeTypes.Light,\r\n onClick: function () {\r\n // Remove the button\r\n elSelectedUsers.removeChild(tooltip_1.button.el);\r\n // Call the event\r\n props.onChange ? props.onChange(obj.getValue()) : null;\r\n }\r\n }\r\n }\r\n });\r\n // Set the data attribute\r\n tooltip_1.button.el.setAttribute(\"data-user\", JSON.stringify(userInfo.stringify()));\r\n }\r\n // Call the event\r\n props.onChange ? props.onChange(obj.getValue()) : null;\r\n };\r\n // See if we are allowing multiple users\r\n var allowMultple = typeof (props.multi) == \"boolean\" ? props.multi : false;\r\n if (!allowMultple) {\r\n // Remove existing users\r\n while (elSelectedUsers.firstChild) {\r\n elSelectedUsers.removeChild(elSelectedUsers.firstChild);\r\n }\r\n }\r\n // Ensure this is a user object\r\n if (user.EntityData) {\r\n // Ensure the group or user id is set\r\n if (user.EntityData.SPGroupID) {\r\n // Find the user by id\r\n (0, gd_sprest_1.Web)().SiteGroups(parseInt(user.EntityData.SPGroupID)).execute(function (group) {\r\n // Add the button\r\n addButton(group);\r\n });\r\n }\r\n else if (user.EntityData.SPUserID) {\r\n // Find the user by id\r\n (0, gd_sprest_1.Web)().getUserById(parseInt(user.EntityData.SPUserID)).execute(function (userInfo) {\r\n // Add the button\r\n addButton(userInfo);\r\n });\r\n }\r\n else {\r\n // Find the user\r\n (0, gd_sprest_1.Web)().ensureUser(user.Key).execute(function (userInfo) {\r\n // Add the button\r\n addButton(userInfo);\r\n }, addButton);\r\n }\r\n }\r\n else {\r\n // Find the user by id\r\n (0, gd_sprest_1.Web)().getUserById(user).execute(function (userInfo) {\r\n // Add the button\r\n addButton(userInfo);\r\n });\r\n }\r\n };\r\n // Method to search for the users\r\n var searchUsers = function (el, searchText, searchAll, spGroupId) {\r\n if (searchAll === void 0) { searchAll = true; }\r\n // Ensure 3 characters exist\r\n if (_filterText.length > 2) {\r\n // Search for the user\r\n (0, gd_sprest_1.PeoplePicker)().clientPeoplePickerSearchUser({\r\n MaximumEntitySuggestions: props.maxResults || 25,\r\n PrincipalSource: searchAll ? gd_sprest_1.SPTypes.PrincipalSources.All : gd_sprest_1.SPTypes.PrincipalSources.UserInfoList,\r\n PrincipalType: props.allowGroups ? gd_sprest_1.SPTypes.PrincipalTypes.All : gd_sprest_1.SPTypes.PrincipalTypes.User,\r\n QueryString: _filterText,\r\n SharePointGroupID: spGroupId\r\n }).execute(function (search) {\r\n // Ensure the search text matches\r\n if (_filterText != searchText) {\r\n return;\r\n }\r\n // Clear the users results\r\n _users = [];\r\n // Set the menu header\r\n el.innerHTML = '<h6 class=\"dropdown-header\">Search Results for \"' + searchText + '\"</h6>';\r\n el.innerHTML += '<div class=\"dropdown-divider\"></div>';\r\n // See if no users were found\r\n if (search.ClientPeoplePickerSearchUser.length == 0) {\r\n // Add a message\r\n el.innerHTML += '<h6 class=\"dropdown-header\">No results were found...</h6>';\r\n }\r\n else {\r\n // Parse the users\r\n for (var i = 0; i < search.ClientPeoplePickerSearchUser.length; i++) {\r\n var exists = false;\r\n var user = search.ClientPeoplePickerSearchUser[i];\r\n // Save the user\r\n _users.push(user);\r\n // Parse the selected users\r\n for (var j = 0; j < elSelectedUsers.children.length; j++) {\r\n var userInfo = JSON.parse(elSelectedUsers.children[j].getAttribute(\"data-user\"));\r\n // See if this user is already selected\r\n if (exists = user.Key == userInfo.Key) {\r\n break;\r\n }\r\n }\r\n // Ensure the user isn't already selected\r\n if (exists) {\r\n continue;\r\n }\r\n // Create the item\r\n var elItem = document.createElement(\"a\");\r\n elItem.className = \"dropdown-item\";\r\n elItem.href = \"#\";\r\n elItem.innerHTML = user.DisplayText;\r\n elItem.setAttribute(\"data-user\", JSON.stringify(user));\r\n el.appendChild(elItem);\r\n // Create a tooltip for this item\r\n core_1.Components.Tooltip({\r\n target: elItem,\r\n content: [\r\n '<div class=\"text-white text-wrap text-break\">',\r\n '<small>' + user.EntityData.Email + '</small>',\r\n '<br />',\r\n '<small>' + user.Key + '</small>',\r\n '</div>'\r\n ].join('\\n'),\r\n placement: core_1.Components.TooltipPlacements.Left,\r\n type: core_1.Components.TooltipTypes.Primary\r\n });\r\n // Set the click event\r\n elItem.addEventListener(\"click\", function (ev) {\r\n var userInfo = ev.currentTarget.getAttribute(\"data-user\");\r\n // Add the user\r\n addUser(userInfo);\r\n // Hide the menu\r\n _menu.hide();\r\n // Clear the search text\r\n elTextbox.querySelector(\"input\").value = \"\";\r\n });\r\n }\r\n }\r\n // Refresh the popover\r\n _menu.hide();\r\n _menu.show();\r\n });\r\n }\r\n };\r\n // Method to set the value\r\n var setValue = function (selectedUsers) {\r\n if (selectedUsers === void 0) { selectedUsers = []; }\r\n // Clear the selected users\r\n elSelectedUsers.innerHTML = \"\";\r\n // Parse the selected users\r\n for (var i = 0; i < selectedUsers.length; i++) {\r\n // Add the user\r\n addUser(selectedUsers[i]);\r\n }\r\n };\r\n // Create the people picker\r\n var elPeoplePicker = document.createElement(\"div\");\r\n elPeoplePicker.className = \"people-picker\";\r\n // Create the menu\r\n var elMenu = document.createElement(\"div\");\r\n elMenu.className = \"dropdown-menu border-0 mw-fit\";\r\n elMenu.innerHTML = '<h6 class=\"dropdown-header\">Search requires 3+ characters</h6>';\r\n // Add the selected users\r\n var elSelectedUsers = document.createElement(\"div\");\r\n elSelectedUsers.style.position = \"relative\";\r\n elPeoplePicker.appendChild(elSelectedUsers);\r\n // Create the textbox\r\n var elTextbox = core_1.Components.InputGroup({\r\n placeholder: props.placeholder == null ? \"Search\" : props.placeholder,\r\n onChange: function (searchText) {\r\n var currentHTML = elMenu.innerHTML;\r\n // See if a value exists\r\n if (searchText) {\r\n // Set the filter text\r\n _filterText = searchText;\r\n // Set the header\r\n elMenu.innerHTML = ['<h6 class=\"dropdown-header\">',\r\n _filterText.length > 2 ? 'Searching for \"' + _filterText + '\"' : 'Search requires 3+ characters',\r\n '</h6>'\r\n ].join('\\n');\r\n // Wait 500ms before searching\r\n setTimeout(function () {\r\n // Ensure the filters match\r\n if (searchText == _filterText) {\r\n // Search for the users\r\n searchUsers(elMenu, searchText, props.searchLocal ? false : true, props.groupId);\r\n }\r\n }, 500);\r\n }\r\n else {\r\n // Set the header\r\n elMenu.innerHTML = '<h6 class=\"dropdown-header\">Search requires 3+ characters</h6>';\r\n }\r\n // See if a refresh is required\r\n if (currentHTML != elMenu.innerHTML) {\r\n // Refresh the popover\r\n _menu.hide();\r\n _menu.show();\r\n }\r\n }\r\n }).el;\r\n props.readOnly ? elTextbox.classList.add(\"d-none\") : null;\r\n elPeoplePicker.appendChild(elTextbox);\r\n // Create the popover menu\r\n _menu = core_1.Components.Popover({\r\n target: elTextbox.querySelector(\"input\"),\r\n placement: core_1.Components.PopoverPlacements.BottomStart,\r\n options: {\r\n content: elMenu,\r\n hideOnClick: false,\r\n maxWidth: \"none\",\r\n trigger: \"focus\"\r\n }\r\n });\r\n // Set the value and ensure it's a \r\n var value = props.value || [];\r\n if (typeof (props.value) != \"object\") {\r\n // Set the default selected users\r\n setValue([value]);\r\n }\r\n else {\r\n // See if this is a user object\r\n var userValue = value;\r\n if (userValue.EntityData) {\r\n // Set the value\r\n value = userValue.EntityData.SPGroupID || userValue.EntityData.SPUserID;\r\n // Set the default selected users\r\n setValue([value]);\r\n }\r\n // Else, see if the results exist\r\n else if (value.results) {\r\n var userIds = [];\r\n // Parse the results\r\n for (var i = 0; i < value.results.length; i++) {\r\n // Add the user id\r\n userIds.push(value.results[i].Id);\r\n }\r\n // Set the default selected users\r\n setValue(userIds);\r\n }\r\n else {\r\n // Set the default selected users\r\n setValue(value);\r\n }\r\n }\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.appendChild(elPeoplePicker);\r\n // See if we are rendering it to an element\r\n if (props.el) {\r\n // Ensure the parent element exists\r\n if (props.el.parentElement && props.el.parentElement.classList) {\r\n // Set the bootstrap class\r\n props.el.parentElement.classList.contains(\"bs\") ? null : props.el.parentElement.classList.add(\"bs\");\r\n }\r\n // Append the elements\r\n while (el.children.length > 0) {\r\n props.el.appendChild(el.children[0]);\r\n }\r\n // Update the element\r\n el = props.el;\r\n }\r\n else {\r\n // Set the bootstrap class\r\n el.classList.add(\"bs\");\r\n }\r\n // Create the object\r\n var obj = {\r\n el: elPeoplePicker,\r\n getValue: function () {\r\n var selectedUsers = [];\r\n // Parse the selected users\r\n for (var i = 0; i < elSelectedUsers.children.length; i++) {\r\n var userInfo = JSON.parse(elSelectedUsers.children[i].getAttribute(\"data-user\"));\r\n var user = gd_sprest_1.Helper.parse(userInfo);\r\n // Add this user\r\n selectedUsers.push(user);\r\n }\r\n // Return the value\r\n return selectedUsers;\r\n },\r\n setValue: setValue\r\n };\r\n // Execute the assign to event\r\n props.assignTo ? props.assignTo(obj) : null;\r\n // Return the people picker object\r\n return obj;\r\n};\r\nexports.PeoplePicker = PeoplePicker;\r\n// Extend the form controls\r\nexports.PeoplePickerControlType = 101;\r\ncore_1.Components.FormControlTypes[\"PeoplePicker\"] = exports.PeoplePickerControlType;\r\ncore_1.Components.CustomControls.registerType(exports.PeoplePickerControlType, function (props) {\r\n var picker = null;\r\n // Set the created method\r\n var onRendered = props.onControlRendered;\r\n props.onControlRendered = function (ctrl) {\r\n // Render a people picker\r\n picker = (0, exports.PeoplePicker)({\r\n allowGroups: props.allowGroups,\r\n className: props.className,\r\n el: ctrl.el,\r\n groupId: props.groupId,\r\n label: props.label,\r\n maxResults: props.maxResults,\r\n multi: props.multi,\r\n placeholder: props.placeholder,\r\n readOnly: props.isReadonly,\r\n searchLocal: props.searchLocal,\r\n value: props.value\r\n });\r\n // See if the label exists\r\n var elLabel = ctrl[\"_elLabel\"];\r\n if (elLabel) {\r\n // Set the id and aria properties\r\n elLabel ? elLabel.id = (props.id || props.name) + \"_label\" : null;\r\n picker.el.querySelector(\"input\").setAttribute(\"aria-labelledby\", elLabel.id);\r\n }\r\n // Set the control\r\n ctrl.setControl(picker);\r\n // Call the custom render event\r\n onRendered ? onRendered(ctrl) : null;\r\n };\r\n // Register a people picker\r\n props.onGetValue = function (ctrl) {\r\n // Return the value\r\n return picker ? picker.getValue() : ctrl.value;\r\n };\r\n});\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js?");
|
|
1840
1840
|
|
|
1841
1841
|
/***/ }),
|
|
1842
1842
|
|
|
1843
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1843
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js":
|
|
1844
1844
|
/*!*************************************************************************************************!*\
|
|
1845
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1845
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js ***!
|
|
1846
1846
|
\*************************************************************************************************/
|
|
1847
1847
|
/***/ ((__unused_webpack_module, exports) => {
|
|
1848
1848
|
|
|
1849
1849
|
"use strict";
|
|
1850
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.generateIcon = void 0;\r\n// Generates the html for an icon\r\nvar generateIcon = function (svg, height, width, className) {\r\n if (height === void 0) { height = 32; }\r\n if (width === void 0) { width = 32; }\r\n // Get the icon element\r\n var elDiv = document.createElement(\"div\");\r\n elDiv.innerHTML = svg;\r\n var icon = elDiv.firstChild;\r\n if (icon) {\r\n // See if a class name exists\r\n if (className) {\r\n // Parse the class names\r\n var classNames = className.split(' ');\r\n for (var i = 0; i < classNames.length; i++) {\r\n // Add the class name\r\n icon.classList.add(classNames[i]);\r\n }\r\n }\r\n // Set the height/width\r\n icon.setAttribute(\"height\", (height ? height : 32).toString());\r\n icon.setAttribute(\"width\", (width ? width : 32).toString());\r\n // Update the styling\r\n icon.style.pointerEvents = \"none\";\r\n // Support for IE\r\n icon.setAttribute(\"focusable\", \"false\");\r\n }\r\n // Return the icon\r\n return icon;\r\n};\r\nexports.generateIcon = generateIcon;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1850
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.generateIcon = void 0;\r\n// Generates the html for an icon\r\nvar generateIcon = function (svg, height, width, className) {\r\n if (height === void 0) { height = 32; }\r\n if (width === void 0) { width = 32; }\r\n // Get the icon element\r\n var elDiv = document.createElement(\"div\");\r\n elDiv.innerHTML = svg;\r\n var icon = elDiv.firstChild;\r\n if (icon) {\r\n // See if a class name exists\r\n if (className) {\r\n // Parse the class names\r\n var classNames = className.split(' ');\r\n for (var i = 0; i < classNames.length; i++) {\r\n // Add the class name\r\n icon.classList.add(classNames[i]);\r\n }\r\n }\r\n // Set the height/width\r\n icon.setAttribute(\"height\", (height ? height : 32).toString());\r\n icon.setAttribute(\"width\", (width ? width : 32).toString());\r\n // Update the styling\r\n icon.style.pointerEvents = \"none\";\r\n // Support for IE\r\n icon.setAttribute(\"focusable\", \"false\");\r\n }\r\n // Return the icon\r\n return icon;\r\n};\r\nexports.generateIcon = generateIcon;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js?");
|
|
1851
1851
|
|
|
1852
1852
|
/***/ }),
|
|
1853
1853
|
|
|
1854
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1854
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmark.js":
|
|
1855
1855
|
/*!*********************************************************************************************************!*\
|
|
1856
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1856
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmark.js ***!
|
|
1857
1857
|
\*********************************************************************************************************/
|
|
1858
1858
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1859
1859
|
|
|
1860
1860
|
"use strict";
|
|
1861
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmark = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1861
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmark = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmark(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark' viewBox='0 0 16 16'> <path d='M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmark = fileEarmark;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmark.js?");
|
|
1862
1862
|
|
|
1863
1863
|
/***/ }),
|
|
1864
1864
|
|
|
1865
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1865
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown.js":
|
|
1866
1866
|
/*!******************************************************************************************************************!*\
|
|
1867
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1867
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown.js ***!
|
|
1868
1868
|
\******************************************************************************************************************/
|
|
1869
1869
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1870
1870
|
|
|
1871
1871
|
"use strict";
|
|
1872
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkArrowDown = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1872
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkArrowDown = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkArrowDown(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-arrow-down' viewBox='0 0 16 16'> <path d='M8.5 6.5a.5.5 0 0 0-1 0v3.793L6.354 9.146a.5.5 0 1 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0-.708-.708L8.5 10.293V6.5z'/> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkArrowDown = fileEarmarkArrowDown;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown.js?");
|
|
1873
1873
|
|
|
1874
1874
|
/***/ }),
|
|
1875
1875
|
|
|
1876
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1876
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp.js":
|
|
1877
1877
|
/*!****************************************************************************************************************!*\
|
|
1878
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1878
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp.js ***!
|
|
1879
1879
|
\****************************************************************************************************************/
|
|
1880
1880
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1881
1881
|
|
|
1882
1882
|
"use strict";
|
|
1883
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkArrowUp = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1883
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkArrowUp = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkArrowUp(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-arrow-up' viewBox='0 0 16 16'> <path d='M8.5 11.5a.5.5 0 0 1-1 0V7.707L6.354 8.854a.5.5 0 1 1-.708-.708l2-2a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 7.707V11.5z'/> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkArrowUp = fileEarmarkArrowUp;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp.js?");
|
|
1884
1884
|
|
|
1885
1885
|
/***/ }),
|
|
1886
1886
|
|
|
1887
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1887
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph.js":
|
|
1888
1888
|
/*!*****************************************************************************************************************!*\
|
|
1889
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1889
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph.js ***!
|
|
1890
1890
|
\*****************************************************************************************************************/
|
|
1891
1891
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1892
1892
|
|
|
1893
1893
|
"use strict";
|
|
1894
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkBarGraph = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1894
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkBarGraph = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkBarGraph(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-bar-graph' viewBox='0 0 16 16'> <path d='M10 13.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v6zm-2.5.5a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-1zm-3 0a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-1z'/> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkBarGraph = fileEarmarkBarGraph;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph.js?");
|
|
1895
1895
|
|
|
1896
1896
|
/***/ }),
|
|
1897
1897
|
|
|
1898
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1898
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBinary.js":
|
|
1899
1899
|
/*!***************************************************************************************************************!*\
|
|
1900
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1900
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBinary.js ***!
|
|
1901
1901
|
\***************************************************************************************************************/
|
|
1902
1902
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1903
1903
|
|
|
1904
1904
|
"use strict";
|
|
1905
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkBinary = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1905
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkBinary = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkBinary(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-binary' viewBox='0 0 16 16'> <path d='M7.05 11.885c0 1.415-.548 2.206-1.524 2.206C4.548 14.09 4 13.3 4 11.885c0-1.412.548-2.203 1.526-2.203.976 0 1.524.79 1.524 2.203zm-1.524-1.612c-.542 0-.832.563-.832 1.612 0 .088.003.173.006.252l1.559-1.143c-.126-.474-.375-.72-.733-.72zm-.732 2.508c.126.472.372.718.732.718.54 0 .83-.563.83-1.614 0-.085-.003-.17-.006-.25l-1.556 1.146zm6.061.624V14h-3v-.595h1.181V10.5h-.05l-1.136.747v-.688l1.19-.786h.69v3.633h1.125z'/> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkBinary = fileEarmarkBinary;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBinary.js?");
|
|
1906
1906
|
|
|
1907
1907
|
/***/ }),
|
|
1908
1908
|
|
|
1909
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1909
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkCode.js":
|
|
1910
1910
|
/*!*************************************************************************************************************!*\
|
|
1911
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1911
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkCode.js ***!
|
|
1912
1912
|
\*************************************************************************************************************/
|
|
1913
1913
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1914
1914
|
|
|
1915
1915
|
"use strict";
|
|
1916
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkCode = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1916
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkCode = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkCode(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-code' viewBox='0 0 16 16'> <path d='M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z'/> <path d='M8.646 6.646a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L10.293 9 8.646 7.354a.5.5 0 0 1 0-.708zm-1.292 0a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708L5.707 9l1.647-1.646a.5.5 0 0 0 0-.708z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkCode = fileEarmarkCode;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkCode.js?");
|
|
1917
1917
|
|
|
1918
1918
|
/***/ }),
|
|
1919
1919
|
|
|
1920
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1920
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkExcel.js":
|
|
1921
1921
|
/*!**************************************************************************************************************!*\
|
|
1922
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1922
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkExcel.js ***!
|
|
1923
1923
|
\**************************************************************************************************************/
|
|
1924
1924
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1925
1925
|
|
|
1926
1926
|
"use strict";
|
|
1927
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkExcel = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1927
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkExcel = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkExcel(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-excel' viewBox='0 0 16 16'> <path d='M5.884 6.68a.5.5 0 1 0-.768.64L7.349 10l-2.233 2.68a.5.5 0 0 0 .768.64L8 10.781l2.116 2.54a.5.5 0 0 0 .768-.641L8.651 10l2.233-2.68a.5.5 0 0 0-.768-.64L8 9.219l-2.116-2.54z'/> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkExcel = fileEarmarkExcel;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkExcel.js?");
|
|
1928
1928
|
|
|
1929
1929
|
/***/ }),
|
|
1930
1930
|
|
|
1931
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1931
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkImage.js":
|
|
1932
1932
|
/*!**************************************************************************************************************!*\
|
|
1933
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1933
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkImage.js ***!
|
|
1934
1934
|
\**************************************************************************************************************/
|
|
1935
1935
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1936
1936
|
|
|
1937
1937
|
"use strict";
|
|
1938
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkImage = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1938
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkImage = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkImage(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-image' viewBox='0 0 16 16'> <path d='M6.502 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z'/> <path d='M14 14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5V14zM4 1a1 1 0 0 0-1 1v10l2.224-2.224a.5.5 0 0 1 .61-.075L8 11l2.157-3.02a.5.5 0 0 1 .76-.063L13 10V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkImage = fileEarmarkImage;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkImage.js?");
|
|
1939
1939
|
|
|
1940
1940
|
/***/ }),
|
|
1941
1941
|
|
|
1942
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1942
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkMusic.js":
|
|
1943
1943
|
/*!**************************************************************************************************************!*\
|
|
1944
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1944
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkMusic.js ***!
|
|
1945
1945
|
\**************************************************************************************************************/
|
|
1946
1946
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1947
1947
|
|
|
1948
1948
|
"use strict";
|
|
1949
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkMusic = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1949
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkMusic = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkMusic(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-music' viewBox='0 0 16 16'> <path d='M11 6.64a1 1 0 0 0-1.243-.97l-1 .25A1 1 0 0 0 8 6.89v4.306A2.572 2.572 0 0 0 7 11c-.5 0-.974.134-1.338.377-.36.24-.662.628-.662 1.123s.301.883.662 1.123c.364.243.839.377 1.338.377.5 0 .974-.134 1.338-.377.36-.24.662-.628.662-1.123V8.89l2-.5V6.64z'/> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkMusic = fileEarmarkMusic;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkMusic.js?");
|
|
1950
1950
|
|
|
1951
1951
|
/***/ }),
|
|
1952
1952
|
|
|
1953
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1953
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPdf.js":
|
|
1954
1954
|
/*!************************************************************************************************************!*\
|
|
1955
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1955
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPdf.js ***!
|
|
1956
1956
|
\************************************************************************************************************/
|
|
1957
1957
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1958
1958
|
|
|
1959
1959
|
"use strict";
|
|
1960
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkPdf = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1960
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkPdf = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkPdf(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-pdf' viewBox='0 0 16 16'> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> <path d='M4.603 14.087a.81.81 0 0 1-.438-.42c-.195-.388-.13-.776.08-1.102.198-.307.526-.568.897-.787a7.68 7.68 0 0 1 1.482-.645 19.697 19.697 0 0 0 1.062-2.227 7.269 7.269 0 0 1-.43-1.295c-.086-.4-.119-.796-.046-1.136.075-.354.274-.672.65-.823.192-.077.4-.12.602-.077a.7.7 0 0 1 .477.365c.088.164.12.356.127.538.007.188-.012.396-.047.614-.084.51-.27 1.134-.52 1.794a10.954 10.954 0 0 0 .98 1.686 5.753 5.753 0 0 1 1.334.05c.364.066.734.195.96.465.12.144.193.32.2.518.007.192-.047.382-.138.563a1.04 1.04 0 0 1-.354.416.856.856 0 0 1-.51.138c-.331-.014-.654-.196-.933-.417a5.712 5.712 0 0 1-.911-.95 11.651 11.651 0 0 0-1.997.406 11.307 11.307 0 0 1-1.02 1.51c-.292.35-.609.656-.927.787a.793.793 0 0 1-.58.029zm1.379-1.901c-.166.076-.32.156-.459.238-.328.194-.541.383-.647.547-.094.145-.096.25-.04.361.01.022.02.036.026.044a.266.266 0 0 0 .035-.012c.137-.056.355-.235.635-.572a8.18 8.18 0 0 0 .45-.606zm1.64-1.33a12.71 12.71 0 0 1 1.01-.193 11.744 11.744 0 0 1-.51-.858 20.801 20.801 0 0 1-.5 1.05zm2.446.45c.15.163.296.3.435.41.24.19.407.253.498.256a.107.107 0 0 0 .07-.015.307.307 0 0 0 .094-.125.436.436 0 0 0 .059-.2.095.095 0 0 0-.026-.063c-.052-.062-.2-.152-.518-.209a3.876 3.876 0 0 0-.612-.053zM8.078 7.8a6.7 6.7 0 0 0 .2-.828c.031-.188.043-.343.038-.465a.613.613 0 0 0-.032-.198.517.517 0 0 0-.145.04c-.087.035-.158.106-.196.283-.04.192-.03.469.046.822.024.111.054.227.09.346z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkPdf = fileEarmarkPdf;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPdf.js?");
|
|
1961
1961
|
|
|
1962
1962
|
/***/ }),
|
|
1963
1963
|
|
|
1964
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1964
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlay.js":
|
|
1965
1965
|
/*!*************************************************************************************************************!*\
|
|
1966
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1966
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlay.js ***!
|
|
1967
1967
|
\*************************************************************************************************************/
|
|
1968
1968
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1969
1969
|
|
|
1970
1970
|
"use strict";
|
|
1971
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkPlay = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1971
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkPlay = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkPlay(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-play' viewBox='0 0 16 16'> <path d='M6 6.883v4.234a.5.5 0 0 0 .757.429l3.528-2.117a.5.5 0 0 0 0-.858L6.757 6.454a.5.5 0 0 0-.757.43z'/> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkPlay = fileEarmarkPlay;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlay.js?");
|
|
1972
1972
|
|
|
1973
1973
|
/***/ }),
|
|
1974
1974
|
|
|
1975
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1975
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlus.js":
|
|
1976
1976
|
/*!*************************************************************************************************************!*\
|
|
1977
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1977
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlus.js ***!
|
|
1978
1978
|
\*************************************************************************************************************/
|
|
1979
1979
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1980
1980
|
|
|
1981
1981
|
"use strict";
|
|
1982
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkPlus = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1982
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkPlus = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkPlus(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-plus' viewBox='0 0 16 16'> <path d='M8 6.5a.5.5 0 0 1 .5.5v1.5H10a.5.5 0 0 1 0 1H8.5V11a.5.5 0 0 1-1 0V9.5H6a.5.5 0 0 1 0-1h1.5V7a.5.5 0 0 1 .5-.5z'/> <path d='M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkPlus = fileEarmarkPlus;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlus.js?");
|
|
1983
1983
|
|
|
1984
1984
|
/***/ }),
|
|
1985
1985
|
|
|
1986
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1986
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPpt.js":
|
|
1987
1987
|
/*!************************************************************************************************************!*\
|
|
1988
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1988
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPpt.js ***!
|
|
1989
1989
|
\************************************************************************************************************/
|
|
1990
1990
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1991
1991
|
|
|
1992
1992
|
"use strict";
|
|
1993
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkPpt = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1993
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkPpt = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkPpt(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-ppt' viewBox='0 0 16 16'> <path d='M7 5.5a1 1 0 0 0-1 1V13a.5.5 0 0 0 1 0v-2h1.188a2.75 2.75 0 0 0 0-5.5H7zM8.188 10H7V6.5h1.188a1.75 1.75 0 1 1 0 3.5z'/> <path d='M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkPpt = fileEarmarkPpt;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPpt.js?");
|
|
1994
1994
|
|
|
1995
1995
|
/***/ }),
|
|
1996
1996
|
|
|
1997
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1997
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext.js":
|
|
1998
1998
|
/*!*****************************************************************************************************************!*\
|
|
1999
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
1999
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext.js ***!
|
|
2000
2000
|
\*****************************************************************************************************************/
|
|
2001
2001
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2002
2002
|
|
|
2003
2003
|
"use strict";
|
|
2004
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkRichtext = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2004
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkRichtext = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkRichtext(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-richtext' viewBox='0 0 16 16'> <path d='M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z'/> <path d='M4.5 12.5A.5.5 0 0 1 5 12h3a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm0-2A.5.5 0 0 1 5 10h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm1.639-3.708 1.33.886 1.854-1.855a.25.25 0 0 1 .289-.047l1.888.974V8.5a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8s1.54-1.274 1.639-1.208zM6.25 6a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkRichtext = fileEarmarkRichtext;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext.js?");
|
|
2005
2005
|
|
|
2006
2006
|
/***/ }),
|
|
2007
2007
|
|
|
2008
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2008
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet.js":
|
|
2009
2009
|
/*!********************************************************************************************************************!*\
|
|
2010
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2010
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet.js ***!
|
|
2011
2011
|
\********************************************************************************************************************/
|
|
2012
2012
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2013
2013
|
|
|
2014
2014
|
"use strict";
|
|
2015
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkSpreadsheet = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2015
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkSpreadsheet = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkSpreadsheet(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-spreadsheet' viewBox='0 0 16 16'> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V9H3V2a1 1 0 0 1 1-1h5.5v2zM3 12v-2h2v2H3zm0 1h2v2H4a1 1 0 0 1-1-1v-1zm3 2v-2h3v2H6zm4 0v-2h3v1a1 1 0 0 1-1 1h-2zm3-3h-3v-2h3v2zm-7 0v-2h3v2H6z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkSpreadsheet = fileEarmarkSpreadsheet;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet.js?");
|
|
2016
2016
|
|
|
2017
2017
|
/***/ }),
|
|
2018
2018
|
|
|
2019
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2019
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkText.js":
|
|
2020
2020
|
/*!*************************************************************************************************************!*\
|
|
2021
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2021
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkText.js ***!
|
|
2022
2022
|
\*************************************************************************************************************/
|
|
2023
2023
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2024
2024
|
|
|
2025
2025
|
"use strict";
|
|
2026
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkText = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2026
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkText = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkText(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-text' viewBox='0 0 16 16'> <path d='M5.5 7a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM5 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm0 2a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z'/> <path d='M9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5L9.5 0zm0 1v2A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkText = fileEarmarkText;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkText.js?");
|
|
2027
2027
|
|
|
2028
2028
|
/***/ }),
|
|
2029
2029
|
|
|
2030
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2030
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkWord.js":
|
|
2031
2031
|
/*!*************************************************************************************************************!*\
|
|
2032
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2032
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkWord.js ***!
|
|
2033
2033
|
\*************************************************************************************************************/
|
|
2034
2034
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2035
2035
|
|
|
2036
2036
|
"use strict";
|
|
2037
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkWord = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2037
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkWord = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkWord(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-word' viewBox='0 0 16 16'> <path d='M5.485 6.879a.5.5 0 1 0-.97.242l1.5 6a.5.5 0 0 0 .967.01L8 9.402l1.018 3.73a.5.5 0 0 0 .967-.01l1.5-6a.5.5 0 0 0-.97-.242l-1.036 4.144-.997-3.655a.5.5 0 0 0-.964 0l-.997 3.655L5.485 6.88z'/> <path d='M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkWord = fileEarmarkWord;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkWord.js?");
|
|
2038
2038
|
|
|
2039
2039
|
/***/ }),
|
|
2040
2040
|
|
|
2041
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2041
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkZip.js":
|
|
2042
2042
|
/*!************************************************************************************************************!*\
|
|
2043
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2043
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkZip.js ***!
|
|
2044
2044
|
\************************************************************************************************************/
|
|
2045
2045
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2046
2046
|
|
|
2047
2047
|
"use strict";
|
|
2048
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkZip = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2048
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.fileEarmarkZip = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction fileEarmarkZip(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-file-earmark-zip' viewBox='0 0 16 16'> <path d='M5 7.5a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v.938l.4 1.599a1 1 0 0 1-.416 1.074l-.93.62a1 1 0 0 1-1.11 0l-.929-.62a1 1 0 0 1-.415-1.074L5 8.438V7.5zm2 0H6v.938a1 1 0 0 1-.03.243l-.4 1.598.93.62.929-.62-.4-1.598A1 1 0 0 1 7 8.438V7.5z'/> <path d='M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1h-2v1h-1v1h1v1h-1v1h1v1H6V5H5V4h1V3H5V2h1V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z'/> </svg>\", height, width, className);\r\n}\r\nexports.fileEarmarkZip = fileEarmarkZip;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkZip.js?");
|
|
2049
2049
|
|
|
2050
2050
|
/***/ }),
|
|
2051
2051
|
|
|
2052
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2052
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/filter.js":
|
|
2053
2053
|
/*!****************************************************************************************************!*\
|
|
2054
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2054
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/filter.js ***!
|
|
2055
2055
|
\****************************************************************************************************/
|
|
2056
2056
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2057
2057
|
|
|
2058
2058
|
"use strict";
|
|
2059
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.filter = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2059
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.filter = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction filter(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-filter' viewBox='0 0 16 16'> <path d='M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z'/> </svg>\", height, width, className);\r\n}\r\nexports.filter = filter;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/filter.js?");
|
|
2060
2060
|
|
|
2061
2061
|
/***/ }),
|
|
2062
2062
|
|
|
2063
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2063
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/filterSquare.js":
|
|
2064
2064
|
/*!**********************************************************************************************************!*\
|
|
2065
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2065
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/filterSquare.js ***!
|
|
2066
2066
|
\**********************************************************************************************************/
|
|
2067
2067
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2068
2068
|
|
|
2069
2069
|
"use strict";
|
|
2070
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.filterSquare = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2070
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.filterSquare = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction filterSquare(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-filter-square' viewBox='0 0 16 16'> <path d='M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z'/> <path d='M6 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z'/> </svg>\", height, width, className);\r\n}\r\nexports.filterSquare = filterSquare;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/filterSquare.js?");
|
|
2071
2071
|
|
|
2072
2072
|
/***/ }),
|
|
2073
2073
|
|
|
2074
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2074
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/front.js":
|
|
2075
2075
|
/*!***************************************************************************************************!*\
|
|
2076
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2076
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/front.js ***!
|
|
2077
2077
|
\***************************************************************************************************/
|
|
2078
2078
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2079
2079
|
|
|
2080
2080
|
"use strict";
|
|
2081
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.front = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2081
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.front = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction front(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-front' viewBox='0 0 16 16'> <path d='M0 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-2H2a2 2 0 0 1-2-2V2zm5 10v2a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2v5a2 2 0 0 1-2 2H5z'/> </svg>\", height, width, className);\r\n}\r\nexports.front = front;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/front.js?");
|
|
2082
2082
|
|
|
2083
2083
|
/***/ }),
|
|
2084
2084
|
|
|
2085
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2085
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/inputCursorText.js":
|
|
2086
2086
|
/*!*************************************************************************************************************!*\
|
|
2087
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2087
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/inputCursorText.js ***!
|
|
2088
2088
|
\*************************************************************************************************************/
|
|
2089
2089
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2090
2090
|
|
|
2091
2091
|
"use strict";
|
|
2092
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.inputCursorText = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2092
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.inputCursorText = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction inputCursorText(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-input-cursor-text' viewBox='0 0 16 16'> <path fill-rule='evenodd' d='M5 2a.5.5 0 0 1 .5-.5c.862 0 1.573.287 2.06.566.174.099.321.198.44.286.119-.088.266-.187.44-.286A4.165 4.165 0 0 1 10.5 1.5a.5.5 0 0 1 0 1c-.638 0-1.177.213-1.564.434a3.49 3.49 0 0 0-.436.294V7.5H9a.5.5 0 0 1 0 1h-.5v4.272c.1.08.248.187.436.294.387.221.926.434 1.564.434a.5.5 0 0 1 0 1 4.165 4.165 0 0 1-2.06-.566A4.561 4.561 0 0 1 8 13.65a4.561 4.561 0 0 1-.44.285 4.165 4.165 0 0 1-2.06.566.5.5 0 0 1 0-1c.638 0 1.177-.213 1.564-.434.188-.107.335-.214.436-.294V8.5H7a.5.5 0 0 1 0-1h.5V3.228a3.49 3.49 0 0 0-.436-.294A3.166 3.166 0 0 0 5.5 2.5.5.5 0 0 1 5 2z'/> <path d='M10 5h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4v1h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4v1zM6 5V4H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h4v-1H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h4z'/> </svg>\", height, width, className);\r\n}\r\nexports.inputCursorText = inputCursorText;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/inputCursorText.js?");
|
|
2093
2093
|
|
|
2094
2094
|
/***/ }),
|
|
2095
2095
|
|
|
2096
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2096
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/layoutTextSidebar.js":
|
|
2097
2097
|
/*!***************************************************************************************************************!*\
|
|
2098
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2098
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/layoutTextSidebar.js ***!
|
|
2099
2099
|
\***************************************************************************************************************/
|
|
2100
2100
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2101
2101
|
|
|
2102
2102
|
"use strict";
|
|
2103
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.layoutTextSidebar = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2103
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.layoutTextSidebar = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction layoutTextSidebar(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-layout-text-sidebar' viewBox='0 0 16 16'> <path d='M3.5 3a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zm0 3a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5zM3 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm.5 2.5a.5.5 0 0 0 0 1h5a.5.5 0 0 0 0-1h-5z'/> <path d='M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm12-1v14h2a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1h-2zm-1 0H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h9V1z'/> </svg>\", height, width, className);\r\n}\r\nexports.layoutTextSidebar = layoutTextSidebar;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/layoutTextSidebar.js?");
|
|
2104
2104
|
|
|
2105
2105
|
/***/ }),
|
|
2106
2106
|
|
|
2107
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2107
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/x.js":
|
|
2108
2108
|
/*!***********************************************************************************************!*\
|
|
2109
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2109
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/x.js ***!
|
|
2110
2110
|
\***********************************************************************************************/
|
|
2111
2111
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2112
2112
|
|
|
2113
2113
|
"use strict";
|
|
2114
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.x = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2114
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.x = void 0;\r\nvar generate_1 = __webpack_require__(/*! ../generate */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/generate.js\");\r\nfunction x(height, width, className) {\r\n return (0, generate_1.generateIcon)(\"<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-x' viewBox='0 0 16 16'> <path d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/> </svg>\", height, width, className);\r\n}\r\nexports.x = x;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/x.js?");
|
|
2115
2115
|
|
|
2116
2116
|
/***/ }),
|
|
2117
2117
|
|
|
2118
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2118
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js":
|
|
2119
2119
|
/*!****************************************************************************************!*\
|
|
2120
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2120
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js ***!
|
|
2121
2121
|
\****************************************************************************************/
|
|
2122
2122
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2123
2123
|
|
|
2124
2124
|
"use strict";
|
|
2125
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WebParts = void 0;\r\n// The SharePoint library\r\n__exportStar(__webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\"), exports);\r\n// SharePoint bootstrap components/webparts\r\nvar components_1 = __webpack_require__(/*! ./components */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2125
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WebParts = void 0;\r\n// The SharePoint library\r\n__exportStar(__webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\"), exports);\r\n// SharePoint bootstrap components/webparts\r\nvar components_1 = __webpack_require__(/*! ./components */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/index.js\");\r\n__exportStar(__webpack_require__(/*! ./components */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/components/index.js\"), exports);\r\n// WebParts\r\nvar WebParts = __webpack_require__(/*! ./webparts */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/index.js\");\r\nexports.WebParts = WebParts;\r\n// Styling\r\n__webpack_require__(/*! ./styles */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/styles.js\");\r\n// Ensure the global variable exists\r\nvar $REST = window && window[\"$REST\"];\r\nif ($REST) {\r\n // Update the $REST global variable\r\n $REST.Components = components_1.Components;\r\n $REST.WebParts = WebParts;\r\n}\r\n// Ensure the SP library exists\r\nif (window[\"SP\"] && window[\"SP\"].SOD) {\r\n // This can fail if MDS is enabled\r\n try {\r\n // Notify waiting scripts\r\n window[\"SP\"] ? window[\"SP\"].SOD.notifyScriptLoadedAndExecuteWaitingJobs(\"gd-sprest-bs\") : null;\r\n window[\"SP\"] ? window[\"SP\"].SOD.notifyScriptLoadedAndExecuteWaitingJobs(\"gd-sprest-bs.js\") : null;\r\n }\r\n catch (_a) { }\r\n}\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/index.js?");
|
|
2126
2126
|
|
|
2127
2127
|
/***/ }),
|
|
2128
2128
|
|
|
2129
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2129
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/styles.js":
|
|
2130
2130
|
/*!*****************************************************************************************!*\
|
|
2131
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2131
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/styles.js ***!
|
|
2132
2132
|
\*****************************************************************************************/
|
|
2133
2133
|
/***/ (() => {
|
|
2134
2134
|
|
|
2135
|
-
eval("!function(){\"use strict\";var e,t,r,a,n,i,o,p,l,c,d,s,f,b,k={272:function(e,t,r){var a=r(383),n=r.n(a),i=r(446),o=r.n(i)()(n());o.push([e.id,'.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\\'\\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*\\n /*rtl:begin:ignore*/left:0/*\\n /*rtl:end:ignore*/}/*\\n /*rtl:begin:ignore*/\\n/*\\n /*rtl:end:ignore*/\\n.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{/*\\n /*rtl:begin:ignore*/right:0/*\\n /*rtl:end:ignore*/}/*\\n /*rtl:begin:ignore*/\\n/*\\n /*rtl:end:ignore*/\\n.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:\"\";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:\"\";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}',\"\"]),t.Z=o},163:function(e,t,r){var a=r(383),n=r.n(a),i=r(446),o=r.n(i),p=r(272),l=o()(n());l.i(p.Z),l.push([e.id,\".wp-tabs .nav>.nav-item{cursor:pointer}.wp-tabs>.is-hidden,.wp-tabs .ms-rte-wpbox.is-hidden{left:-1000vw;position:absolute;overflow:hidden}.wp-tabs{border-spacing:0px}.wp-tabs .ms-webpart-chrome-title{display:none}.wp-tabs .wp-tab{margin-bottom:0px;margin-top:0px;padding-bottom:0px;padding-top:0px}.wp-tabs .wp-tab .ms-PartSpacingVertical{display:none}.date-time .form-control.input:read-only{color:#495057}.listformdialog .modal-dialog{max-width:60vw}.listformdialog .modal-dialog .modal-body{max-height:75vh;overflow-y:auto}#calendarFields.dropdown-menu{display:block;max-height:250px;position:relative;overflow-y:auto}#selectedFields.dropdown-menu{border:none;display:block;position:relative}.badge.people-picker-x{color:black;margin-bottom:0.15rem;padding-top:0.1rem;text-decoration:none}\\n\",\"\"]),t.Z=l},446:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=\"\",a=void 0!==t[5];return t[4]&&(r+=\"@supports (\".concat(t[4],\") {\")),t[2]&&(r+=\"@media \".concat(t[2],\" {\")),a&&(r+=\"@layer\".concat(t[5].length>0?\" \".concat(t[5]):\"\",\" {\")),r+=e(t),a&&(r+=\"}\"),t[2]&&(r+=\"}\"),t[4]&&(r+=\"}\"),r})).join(\"\")},t.i=function(e,r,a,n,i){\"string\"==typeof e&&(e=[[null,e,void 0]]);var o={};if(a)for(var p=0;p<this.length;p++){var l=this[p][0];null!=l&&(o[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);a&&o[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]=\"@layer\".concat(d[5].length>0?\" \".concat(d[5]):\"\",\" {\").concat(d[1],\"}\")),d[5]=i),r&&(d[2]?(d[1]=\"@media \".concat(d[2],\" {\").concat(d[1],\"}\"),d[2]=r):d[2]=r),n&&(d[4]?(d[1]=\"@supports (\".concat(d[4],\") {\").concat(d[1],\"}\"),d[4]=n):d[4]=\"\".concat(n)),t.push(d))}},t}},383:function(e){e.exports=function(e){return e[1]}},465:function(e){var t=[];function r(e){for(var r=-1,a=0;a<t.length;a++)if(t[a].identifier===e){r=a;break}return r}function a(e,a){for(var i={},o=[],p=0;p<e.length;p++){var l=e[p],c=a.base?l[0]+a.base:l[0],d=i[c]||0,s=\"\".concat(c,\" \").concat(d);i[c]=d+1;var f=r(s),b={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)t[f].references++,t[f].updater(b);else{var k=n(b,a);a.byIndex=p,t.splice(p,0,{identifier:s,updater:k,references:1})}o.push(s)}return o}function n(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,n){var i=a(e=e||[],n=n||{});return function(e){e=e||[];for(var o=0;o<i.length;o++){var p=r(i[o]);t[p].references--}for(var l=a(e,n),c=0;c<i.length;c++){var d=r(i[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=l}}},732:function(e){var t={};e.exports=function(e,r){var a=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!a)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");a.appendChild(r)}},689:function(e){e.exports=function(e){var t=document.createElement(\"style\");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},323:function(e,t,r){e.exports=function(e){var t=r.nc;t&&e.setAttribute(\"nonce\",t)}},629:function(e){e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var a=\"\";r.supports&&(a+=\"@supports (\".concat(r.supports,\") {\")),r.media&&(a+=\"@media \".concat(r.media,\" {\"));var n=void 0!==r.layer;n&&(a+=\"@layer\".concat(r.layer.length>0?\" \".concat(r.layer):\"\",\" {\")),a+=r.css,n&&(a+=\"}\"),r.media&&(a+=\"}\"),r.supports&&(a+=\"}\");var i=r.sourceMap;i&&\"undefined\"!=typeof btoa&&(a+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i)))),\" */\")),t.styleTagTransform(a,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},138:function(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var r=h[e]={id:e,exports:{}};return k[e](r,r.exports,u),r.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e=u(465),t=u.n(e),r=u(629),a=u.n(r),n=u(732),i=u.n(n),o=u(323),p=u.n(o),l=u(689),c=u.n(l),d=u(138),s=u.n(d),f=u(163),(b={}).styleTagTransform=s(),b.setAttributes=p(),b.insert=i().bind(null,\"head\"),b.domAPI=a(),b.insertStyleElement=c(),t()(f.Z,b),f.Z&&f.Z.locals&&f.Z.locals}();\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/styles.js?");
|
|
2135
|
+
eval("!function(){\"use strict\";var e,t,r,a,n,i,o,p,l,c,d,s,f,b,k={272:function(e,t,r){var a=r(383),n=r.n(a),i=r(446),o=r.n(i)()(n());o.push([e.id,'.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\\'\\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*\\n /*rtl:begin:ignore*/left:0/*\\n /*rtl:end:ignore*/}/*\\n /*rtl:begin:ignore*/\\n/*\\n /*rtl:end:ignore*/\\n.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{/*\\n /*rtl:begin:ignore*/right:0/*\\n /*rtl:end:ignore*/}/*\\n /*rtl:begin:ignore*/\\n/*\\n /*rtl:end:ignore*/\\n.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:\"\";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:\"\";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}',\"\"]),t.Z=o},163:function(e,t,r){var a=r(383),n=r.n(a),i=r(446),o=r.n(i),p=r(272),l=o()(n());l.i(p.Z),l.push([e.id,\".wp-tabs .nav>.nav-item{cursor:pointer}.wp-tabs>.is-hidden,.wp-tabs .ms-rte-wpbox.is-hidden{left:-1000vw;position:absolute;overflow:hidden}.wp-tabs{border-spacing:0px}.wp-tabs .ms-webpart-chrome-title{display:none}.wp-tabs .wp-tab{margin-bottom:0px;margin-top:0px;padding-bottom:0px;padding-top:0px}.wp-tabs .wp-tab .ms-PartSpacingVertical{display:none}.date-time .form-control.input:read-only{color:#495057}.listformdialog .modal-dialog{max-width:60vw}.listformdialog .modal-dialog .modal-body{max-height:75vh;overflow-y:auto}#calendarFields.dropdown-menu{display:block;max-height:250px;position:relative;overflow-y:auto}#selectedFields.dropdown-menu{border:none;display:block;position:relative}.badge.people-picker-x{color:black;margin-bottom:0.15rem;padding-top:0.1rem;text-decoration:none}\\n\",\"\"]),t.Z=l},446:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=\"\",a=void 0!==t[5];return t[4]&&(r+=\"@supports (\".concat(t[4],\") {\")),t[2]&&(r+=\"@media \".concat(t[2],\" {\")),a&&(r+=\"@layer\".concat(t[5].length>0?\" \".concat(t[5]):\"\",\" {\")),r+=e(t),a&&(r+=\"}\"),t[2]&&(r+=\"}\"),t[4]&&(r+=\"}\"),r})).join(\"\")},t.i=function(e,r,a,n,i){\"string\"==typeof e&&(e=[[null,e,void 0]]);var o={};if(a)for(var p=0;p<this.length;p++){var l=this[p][0];null!=l&&(o[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);a&&o[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]=\"@layer\".concat(d[5].length>0?\" \".concat(d[5]):\"\",\" {\").concat(d[1],\"}\")),d[5]=i),r&&(d[2]?(d[1]=\"@media \".concat(d[2],\" {\").concat(d[1],\"}\"),d[2]=r):d[2]=r),n&&(d[4]?(d[1]=\"@supports (\".concat(d[4],\") {\").concat(d[1],\"}\"),d[4]=n):d[4]=\"\".concat(n)),t.push(d))}},t}},383:function(e){e.exports=function(e){return e[1]}},465:function(e){var t=[];function r(e){for(var r=-1,a=0;a<t.length;a++)if(t[a].identifier===e){r=a;break}return r}function a(e,a){for(var i={},o=[],p=0;p<e.length;p++){var l=e[p],c=a.base?l[0]+a.base:l[0],d=i[c]||0,s=\"\".concat(c,\" \").concat(d);i[c]=d+1;var f=r(s),b={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)t[f].references++,t[f].updater(b);else{var k=n(b,a);a.byIndex=p,t.splice(p,0,{identifier:s,updater:k,references:1})}o.push(s)}return o}function n(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,n){var i=a(e=e||[],n=n||{});return function(e){e=e||[];for(var o=0;o<i.length;o++){var p=r(i[o]);t[p].references--}for(var l=a(e,n),c=0;c<i.length;c++){var d=r(i[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=l}}},732:function(e){var t={};e.exports=function(e,r){var a=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!a)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");a.appendChild(r)}},689:function(e){e.exports=function(e){var t=document.createElement(\"style\");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},323:function(e,t,r){e.exports=function(e){var t=r.nc;t&&e.setAttribute(\"nonce\",t)}},629:function(e){e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var a=\"\";r.supports&&(a+=\"@supports (\".concat(r.supports,\") {\")),r.media&&(a+=\"@media \".concat(r.media,\" {\"));var n=void 0!==r.layer;n&&(a+=\"@layer\".concat(r.layer.length>0?\" \".concat(r.layer):\"\",\" {\")),a+=r.css,n&&(a+=\"}\"),r.media&&(a+=\"}\"),r.supports&&(a+=\"}\");var i=r.sourceMap;i&&\"undefined\"!=typeof btoa&&(a+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i)))),\" */\")),t.styleTagTransform(a,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},138:function(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var r=h[e]={id:e,exports:{}};return k[e](r,r.exports,u),r.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e=u(465),t=u.n(e),r=u(629),a=u.n(r),n=u(732),i=u.n(n),o=u(323),p=u.n(o),l=u(689),c=u.n(l),d=u(138),s=u.n(d),f=u(163),(b={}).styleTagTransform=s(),b.setAttributes=p(),b.insert=i().bind(null,\"head\"),b.domAPI=a(),b.insertStyleElement=c(),t()(f.Z,b),f.Z&&f.Z.locals&&f.Z.locals}();\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/styles.js?");
|
|
2136
2136
|
|
|
2137
2137
|
/***/ }),
|
|
2138
2138
|
|
|
2139
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2139
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/helper.js":
|
|
2140
2140
|
/*!*******************************************************************************************************!*\
|
|
2141
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2141
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/helper.js ***!
|
|
2142
2142
|
\*******************************************************************************************************/
|
|
2143
2143
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2144
2144
|
|
|
2145
2145
|
"use strict";
|
|
2146
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Helper = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * Helper Methods\r\n */\r\nexports.Helper = {\r\n // Method to get the webpart\r\n getWebPart: function (wpId) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the current context\r\n var context = SP.ClientContext.get_current();\r\n // Get the webpart from the current page\r\n var page = context.get_web().getFileByServerRelativeUrl(gd_sprest_1.ContextInfo.serverRequestPath);\r\n var wpMgr = page.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared);\r\n var wpDef = wpMgr.get_webParts().getById(wpId);\r\n var wp = wpDef.get_webPart();\r\n context.load(wp, \"Properties\");\r\n // Execute the request\r\n context.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Resolve the promise\r\n resolve({\r\n Context: context,\r\n Properties: wp.get_properties(),\r\n WebPart: wp,\r\n WebPartDefinition: wpDef\r\n });\r\n }, \r\n // Error\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1] ? args[1].get_message() : \"\");\r\n });\r\n });\r\n },\r\n // Method to get the webpart id for a specified element\r\n getWebPartId: function (el) {\r\n // Loop until we find the webpart id\r\n while (el) {\r\n // See if this element contains the webpart id\r\n var wpId = el.getAttribute(\"webpartid\");\r\n if (wpId) {\r\n // Return the webpart id\r\n return wpId;\r\n }\r\n // Check the parent\r\n el = el.parentElement;\r\n }\r\n // Unable to detect\r\n return \"\";\r\n },\r\n // Method to render the edit form\r\n renderEditForm: function (el, wpCfg, formControls) {\r\n if (formControls === void 0) { formControls = []; }\r\n var rows = [];\r\n // Parse the controls\r\n for (var i = 0; i < formControls.length; i++) {\r\n // Add the control\r\n rows.push({ columns: [{ control: formControls[i] }] });\r\n }\r\n // Render the form\r\n return gd_bs_1.Components.Form({\r\n el: el,\r\n rows: rows,\r\n value: wpCfg\r\n });\r\n },\r\n // Method to save the webpart configuration\r\n saveConfiguration: function (wpId, cfgId, wpCfg) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Update the webpart content elements\r\n if (exports.Helper.updateWebPartContentElements(wpId, cfgId, wpCfg)) {\r\n // Wiki page detected, resolve the promise and do nothing\r\n resolve();\r\n return;\r\n }\r\n // Get the target webpart\r\n exports.Helper.getWebPart(wpId).then(function (wpInfo) {\r\n // Get the content\r\n var content = wpInfo && wpInfo.Properties.get_fieldValues()[\"Content\"];\r\n if (content) {\r\n // Create an element so we can update the configuration\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = content;\r\n // Get the configuration element and update it\r\n var elCfg = el.querySelector(\"#\" + cfgId);\r\n elCfg ? elCfg.innerText = JSON.stringify(wpCfg) : null;\r\n // Update the webpart\r\n wpInfo.Properties.set_item(\"Content\", el.innerHTML);\r\n wpInfo.WebPartDefinition.saveWebPartChanges();\r\n wpInfo.Context.load(wpInfo.WebPartDefinition);\r\n // Execute the request\r\n wpInfo.Context.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Disable the edit page warning\r\n if (SP && SP.Ribbon && SP.Ribbon.PageState && SP.Ribbon.PageState.PageStateHandler) {\r\n SP.Ribbon.PageState.PageStateHandler.ignoreNextUnload = true;\r\n }\r\n // Refresh the page\r\n window.location.href = window.location.pathname + \"?DisplayMode=Design\";\r\n // Resolve the promise\r\n resolve();\r\n }, \r\n // Error\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var message = args[1].get_message();\r\n // Log\r\n console.error(\"[gd-sprest] Error saving the configuration. \" + message);\r\n // Reject the promise\r\n reject(message);\r\n });\r\n }\r\n });\r\n });\r\n },\r\n // Method to update the configuration element\r\n updateConfigurationInElement: function (cfgId, elTarget, wpCfg) {\r\n // Create an element so we can update the configuration\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = elTarget.value;\r\n // Get the configuration element and update it\r\n var cfg = el.querySelector(\"#\" + cfgId);\r\n cfg ? cfg.innerText = JSON.stringify(wpCfg) : null;\r\n // Update the value\r\n elTarget.value = el.innerHTML;\r\n },\r\n // Method to update the webpart content elements\r\n updateWebPartContentElements: function (wpId, cfgId, wpCfg) {\r\n // Get the webpart element\r\n var elWebPart = document.querySelector(\"div[webpartid='\" + wpId + \"']\");\r\n if (elWebPart) {\r\n var wpContent = null;\r\n var wpPageContent = null;\r\n // Get the associated webpart id\r\n var wpId2 = elWebPart.getAttribute(\"webpartid2\");\r\n // Update the configuration\r\n var elCfg = elWebPart.querySelector(\"#\" + cfgId);\r\n elCfg ? elCfg.innerText = JSON.stringify(wpCfg) : null;\r\n // Parse the hidden elements on the page\r\n var hiddenElements = document.querySelectorAll(\"input[type='hidden']\");\r\n for (var i = 0; i < hiddenElements.length; i++) {\r\n var elHidden = hiddenElements[i];\r\n // See if we have found the webpart content and page content hidden elements\r\n if (wpContent && wpPageContent) {\r\n continue;\r\n }\r\n // See if this is a hidden webpart content element\r\n if (elHidden.name && elHidden.name.indexOf(\"scriptcontent\") == elHidden.name.length - 13) {\r\n // See if it's for this webpart\r\n if (elHidden.name.indexOf(wpId2) == 0) {\r\n // Set the webpart content element\r\n wpContent = elHidden;\r\n // Update the configuration in the webpart content element\r\n exports.Helper.updateConfigurationInElement(cfgId, wpContent, wpCfg);\r\n }\r\n // Continue the loop\r\n continue;\r\n }\r\n // Create an element and set the inner html to the value\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = elHidden.value;\r\n // See if this is a hidden field element\r\n if (el.querySelector(\"#\" + cfgId)) {\r\n // Set the webpart page content\r\n wpPageContent = elHidden;\r\n // Update the configuration in the webpart content element\r\n exports.Helper.updateConfigurationInElement(cfgId, wpPageContent, wpCfg);\r\n // Continue the loop\r\n continue;\r\n }\r\n }\r\n // Return true, if the page content exists\r\n return wpPageContent != null;\r\n }\r\n // Webpart is not in a content field\r\n return false;\r\n }\r\n};\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2146
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Helper = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * Helper Methods\r\n */\r\nexports.Helper = {\r\n // Method to get the webpart\r\n getWebPart: function (wpId) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the current context\r\n var context = SP.ClientContext.get_current();\r\n // Get the webpart from the current page\r\n var page = context.get_web().getFileByServerRelativeUrl(gd_sprest_1.ContextInfo.serverRequestPath);\r\n var wpMgr = page.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared);\r\n var wpDef = wpMgr.get_webParts().getById(wpId);\r\n var wp = wpDef.get_webPart();\r\n context.load(wp, \"Properties\");\r\n // Execute the request\r\n context.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Resolve the promise\r\n resolve({\r\n Context: context,\r\n Properties: wp.get_properties(),\r\n WebPart: wp,\r\n WebPartDefinition: wpDef\r\n });\r\n }, \r\n // Error\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1] ? args[1].get_message() : \"\");\r\n });\r\n });\r\n },\r\n // Method to get the webpart id for a specified element\r\n getWebPartId: function (el) {\r\n // Loop until we find the webpart id\r\n while (el) {\r\n // See if this element contains the webpart id\r\n var wpId = el.getAttribute(\"webpartid\");\r\n if (wpId) {\r\n // Return the webpart id\r\n return wpId;\r\n }\r\n // Check the parent\r\n el = el.parentElement;\r\n }\r\n // Unable to detect\r\n return \"\";\r\n },\r\n // Method to render the edit form\r\n renderEditForm: function (el, wpCfg, formControls) {\r\n if (formControls === void 0) { formControls = []; }\r\n var rows = [];\r\n // Parse the controls\r\n for (var i = 0; i < formControls.length; i++) {\r\n // Add the control\r\n rows.push({ columns: [{ control: formControls[i] }] });\r\n }\r\n // Render the form\r\n return gd_bs_1.Components.Form({\r\n el: el,\r\n rows: rows,\r\n value: wpCfg\r\n });\r\n },\r\n // Method to save the webpart configuration\r\n saveConfiguration: function (wpId, cfgId, wpCfg) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Update the webpart content elements\r\n if (exports.Helper.updateWebPartContentElements(wpId, cfgId, wpCfg)) {\r\n // Wiki page detected, resolve the promise and do nothing\r\n resolve();\r\n return;\r\n }\r\n // Get the target webpart\r\n exports.Helper.getWebPart(wpId).then(function (wpInfo) {\r\n // Get the content\r\n var content = wpInfo && wpInfo.Properties.get_fieldValues()[\"Content\"];\r\n if (content) {\r\n // Create an element so we can update the configuration\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = content;\r\n // Get the configuration element and update it\r\n var elCfg = el.querySelector(\"#\" + cfgId);\r\n elCfg ? elCfg.innerText = JSON.stringify(wpCfg) : null;\r\n // Update the webpart\r\n wpInfo.Properties.set_item(\"Content\", el.innerHTML);\r\n wpInfo.WebPartDefinition.saveWebPartChanges();\r\n wpInfo.Context.load(wpInfo.WebPartDefinition);\r\n // Execute the request\r\n wpInfo.Context.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Disable the edit page warning\r\n if (SP && SP.Ribbon && SP.Ribbon.PageState && SP.Ribbon.PageState.PageStateHandler) {\r\n SP.Ribbon.PageState.PageStateHandler.ignoreNextUnload = true;\r\n }\r\n // Refresh the page\r\n window.location.href = window.location.pathname + \"?DisplayMode=Design\";\r\n // Resolve the promise\r\n resolve();\r\n }, \r\n // Error\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var message = args[1].get_message();\r\n // Log\r\n console.error(\"[gd-sprest] Error saving the configuration. \" + message);\r\n // Reject the promise\r\n reject(message);\r\n });\r\n }\r\n });\r\n });\r\n },\r\n // Method to update the configuration element\r\n updateConfigurationInElement: function (cfgId, elTarget, wpCfg) {\r\n // Create an element so we can update the configuration\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = elTarget.value;\r\n // Get the configuration element and update it\r\n var cfg = el.querySelector(\"#\" + cfgId);\r\n cfg ? cfg.innerText = JSON.stringify(wpCfg) : null;\r\n // Update the value\r\n elTarget.value = el.innerHTML;\r\n },\r\n // Method to update the webpart content elements\r\n updateWebPartContentElements: function (wpId, cfgId, wpCfg) {\r\n // Get the webpart element\r\n var elWebPart = document.querySelector(\"div[webpartid='\" + wpId + \"']\");\r\n if (elWebPart) {\r\n var wpContent = null;\r\n var wpPageContent = null;\r\n // Get the associated webpart id\r\n var wpId2 = elWebPart.getAttribute(\"webpartid2\");\r\n // Update the configuration\r\n var elCfg = elWebPart.querySelector(\"#\" + cfgId);\r\n elCfg ? elCfg.innerText = JSON.stringify(wpCfg) : null;\r\n // Parse the hidden elements on the page\r\n var hiddenElements = document.querySelectorAll(\"input[type='hidden']\");\r\n for (var i = 0; i < hiddenElements.length; i++) {\r\n var elHidden = hiddenElements[i];\r\n // See if we have found the webpart content and page content hidden elements\r\n if (wpContent && wpPageContent) {\r\n continue;\r\n }\r\n // See if this is a hidden webpart content element\r\n if (elHidden.name && elHidden.name.indexOf(\"scriptcontent\") == elHidden.name.length - 13) {\r\n // See if it's for this webpart\r\n if (elHidden.name.indexOf(wpId2) == 0) {\r\n // Set the webpart content element\r\n wpContent = elHidden;\r\n // Update the configuration in the webpart content element\r\n exports.Helper.updateConfigurationInElement(cfgId, wpContent, wpCfg);\r\n }\r\n // Continue the loop\r\n continue;\r\n }\r\n // Create an element and set the inner html to the value\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = elHidden.value;\r\n // See if this is a hidden field element\r\n if (el.querySelector(\"#\" + cfgId)) {\r\n // Set the webpart page content\r\n wpPageContent = elHidden;\r\n // Update the configuration in the webpart content element\r\n exports.Helper.updateConfigurationInElement(cfgId, wpPageContent, wpCfg);\r\n // Continue the loop\r\n continue;\r\n }\r\n }\r\n // Return true, if the page content exists\r\n return wpPageContent != null;\r\n }\r\n // Webpart is not in a content field\r\n return false;\r\n }\r\n};\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/helper.js?");
|
|
2147
2147
|
|
|
2148
2148
|
/***/ }),
|
|
2149
2149
|
|
|
2150
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2150
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/index.js":
|
|
2151
2151
|
/*!******************************************************************************************************!*\
|
|
2152
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2152
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/index.js ***!
|
|
2153
2153
|
\******************************************************************************************************/
|
|
2154
2154
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2155
2155
|
|
|
2156
2156
|
"use strict";
|
|
2157
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./helper */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2157
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./helper */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/helper.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/index.js?");
|
|
2158
2158
|
|
|
2159
2159
|
/***/ }),
|
|
2160
2160
|
|
|
2161
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2161
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wp.js":
|
|
2162
2162
|
/*!***************************************************************************************************!*\
|
|
2163
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2163
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wp.js ***!
|
|
2164
2164
|
\***************************************************************************************************/
|
|
2165
2165
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2166
2166
|
|
|
2167
2167
|
"use strict";
|
|
2168
|
-
eval("\r\nvar __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WebPart = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js\");\r\n/**\r\n * Web Part\r\n */\r\nvar WebPart = function (props) {\r\n var _cfg = {};\r\n var _wp = null;\r\n /**\r\n * Method to add the help link to a script part editor.\r\n * @wpId - The webpart id.\r\n */\r\n var addHelpLink = function () {\r\n // Ensure the help properties exist\r\n if (props.helpProps) {\r\n // Get the webpart's \"Snippet\"\r\n var link = document.querySelector(\"div[webpartid='\" + _wp.wpId + \"'] a[title='Edit Snippet']\");\r\n if (link) {\r\n // Create the help link\r\n var helpLink = document.createElement(\"a\");\r\n helpLink.href = props.helpProps.url || \"#\";\r\n helpLink.style.paddingLeft = \"10px\";\r\n helpLink.setAttribute(\"role\", \"button\");\r\n helpLink.title = props.helpProps.title || \"Help\";\r\n helpLink.innerHTML = \"<span class='ms-metadata'>\" + helpLink.title + \"</span>\";\r\n helpLink.target = \"_blank\";\r\n // Append the link\r\n link.parentElement.appendChild(helpLink);\r\n }\r\n }\r\n };\r\n /**\r\n * Method to get the webpart id for a specified element\r\n * @param el - The target element.\r\n */\r\n var getWebPartId = function (el) {\r\n // Loop until we find the webpart id\r\n while (el) {\r\n // See if this element contains the webpart id\r\n var wpId = el.getAttribute(\"webpartid\");\r\n if (wpId) {\r\n // Return the webpart id\r\n return wpId;\r\n }\r\n // Check the parent\r\n el = el.parentElement;\r\n }\r\n // Unable to detect\r\n return \"\";\r\n };\r\n /**\r\n * Method to get the webpart information\r\n */\r\n var getWebPartInfo = function () {\r\n var targetInfo = {\r\n cfg: null,\r\n el: null,\r\n wpId: null\r\n };\r\n // Ensure the element id exists\r\n if (props.elementId) {\r\n // Get the webpart elements\r\n var elements = document.querySelectorAll(\"#\" + props.elementId);\r\n for (var i = 0; i < elements.length; i++) {\r\n var elWebPart = elements[i];\r\n // See if we have already configured this element\r\n if (elWebPart.getAttribute(\"data-isConfigured\")) {\r\n continue;\r\n }\r\n // Get the webpart id\r\n var wpId = getWebPartId(elWebPart);\r\n if (wpId) {\r\n // See if the configuration element exists\r\n var elCfg = elWebPart.parentElement.querySelector(\"#\" + props.cfgElementId);\r\n if (elCfg) {\r\n try {\r\n // Parse the configuration\r\n var data = elCfg.innerText.trim();\r\n var cfg = data.length > 0 ? JSON.parse(data) : null;\r\n // See if the webaprt id exists\r\n if (cfg && cfg.WebPartId) {\r\n // See if it's for this webpart\r\n if (cfg.WebPartId == wpId) {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: cfg,\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n else {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: __assign(__assign({}, (cfg || {})), { WebPartId: wpId }),\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n catch (ex) {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: {\r\n WebPartId: wpId\r\n },\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n // Log\r\n console.log(\"[bs-webpart] Error parsing the configuration for the webpart element '\" + props.cfgElementId + \"'.\");\r\n }\r\n // Break from the loop\r\n break;\r\n }\r\n else {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: {\r\n WebPartId: wpId\r\n },\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n // Ensure elements were found\r\n if (elements.length == 0) {\r\n // Log\r\n console.log(\"[bs-webpart] Error - Unable to find the webpart element with id '\" + props.elementId + \"'.\");\r\n }\r\n }\r\n else {\r\n // Log\r\n console.log(\"[bs-webpart] The target element id is not defined.\");\r\n }\r\n // Ensure the target element exists\r\n if (targetInfo.el) {\r\n // Set the configuration flag\r\n targetInfo.el.setAttribute(\"data-isConfigured\", \"true\");\r\n }\r\n // Return the target information\r\n return targetInfo;\r\n };\r\n /**\r\n * Method to render the webpart\r\n */\r\n var render = function () {\r\n // Get the webpart information\r\n _wp = getWebPartInfo();\r\n if (_wp == null || _wp.el == null) {\r\n // Log\r\n console.log(\"[bs-webpart] The target webpart element '\" + props.elementId + \"' was not found.\");\r\n return;\r\n }\r\n // Set the configuration\r\n _cfg = _wp.cfg;\r\n // Get the webpart element\r\n var elWebPart = _wp.wpId ? document.querySelector(\"div[webpartid='\" + _wp.wpId + \"']\") : null;\r\n if (elWebPart) {\r\n // Add the default bootstrap class name\r\n elWebPart.className += \" bs \" + (props.wpClassName || \"\");\r\n }\r\n // See if a class name exists\r\n if (props.className && _wp.el.className.indexOf(props.className) < 0) {\r\n // Set the class name\r\n _wp.el.className += \" \" + props.className;\r\n }\r\n // See if the page is being edited\r\n var returnVal = null;\r\n if (gd_sprest_1.Helper.WebPart.isEditMode()) {\r\n // Add the help link\r\n addHelpLink();\r\n // Add the edit class name\r\n _wp.el.classList.add(\"is-edit\");\r\n // Call the render event\r\n if (props.onRenderEdit) {\r\n // Execute the render edit event\r\n returnVal = props.onRenderEdit(_wp);\r\n }\r\n // See if we are displaying the default edit form\r\n else if (props.editForm) {\r\n // Display the edit form\r\n (0, wpCfg_1.WPCfg)(_cfg, _wp, props);\r\n }\r\n }\r\n else {\r\n // See if the configuration is defined, but has no value\r\n if (_wp.cfg || (props.cfgElementId || \"\").length == 0) {\r\n // Execute the render edit event\r\n returnVal = props.onRenderDisplay(_wp);\r\n }\r\n else {\r\n // Render a message\r\n _wp.el.innerHTML = '<h3>Please edit the page and configure the webpart.</h3>';\r\n }\r\n }\r\n // See if a promise was returned\r\n if (returnVal && returnVal.then) {\r\n // Wait for the request to complete\r\n returnVal.then(function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Execute the post render event\r\n props.onPostRender ? props.onPostRender(_wp) : null;\r\n });\r\n }\r\n else {\r\n // Execute the post render event\r\n props.onPostRender ? props.onPostRender(_wp) : null;\r\n }\r\n };\r\n // Add a load event\r\n window.addEventListener(\"load\", function () {\r\n // Render the component\r\n render();\r\n });\r\n // Return the webpart\r\n return {\r\n cfg: _cfg,\r\n info: _wp\r\n };\r\n};\r\nexports.WebPart = WebPart;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/webparts/base/wp.js?");
|
|
2168
|
+
eval("\r\nvar __assign = (this && this.__assign) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WebPart = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js\");\r\n/**\r\n * Web Part\r\n */\r\nvar WebPart = function (props) {\r\n var _cfg = {};\r\n var _wp = null;\r\n /**\r\n * Method to add the help link to a script part editor.\r\n * @wpId - The webpart id.\r\n */\r\n var addHelpLink = function () {\r\n // Ensure the help properties exist\r\n if (props.helpProps) {\r\n // Get the webpart's \"Snippet\"\r\n var link = document.querySelector(\"div[webpartid='\" + _wp.wpId + \"'] a[title='Edit Snippet']\");\r\n if (link) {\r\n // Create the help link\r\n var helpLink = document.createElement(\"a\");\r\n helpLink.href = props.helpProps.url || \"#\";\r\n helpLink.style.paddingLeft = \"10px\";\r\n helpLink.setAttribute(\"role\", \"button\");\r\n helpLink.title = props.helpProps.title || \"Help\";\r\n helpLink.innerHTML = \"<span class='ms-metadata'>\" + helpLink.title + \"</span>\";\r\n helpLink.target = \"_blank\";\r\n // Append the link\r\n link.parentElement.appendChild(helpLink);\r\n }\r\n }\r\n };\r\n /**\r\n * Method to get the webpart id for a specified element\r\n * @param el - The target element.\r\n */\r\n var getWebPartId = function (el) {\r\n // Loop until we find the webpart id\r\n while (el) {\r\n // See if this element contains the webpart id\r\n var wpId = el.getAttribute(\"webpartid\");\r\n if (wpId) {\r\n // Return the webpart id\r\n return wpId;\r\n }\r\n // Check the parent\r\n el = el.parentElement;\r\n }\r\n // Unable to detect\r\n return \"\";\r\n };\r\n /**\r\n * Method to get the webpart information\r\n */\r\n var getWebPartInfo = function () {\r\n var targetInfo = {\r\n cfg: null,\r\n el: null,\r\n wpId: null\r\n };\r\n // Ensure the element id exists\r\n if (props.elementId) {\r\n // Get the webpart elements\r\n var elements = document.querySelectorAll(\"#\" + props.elementId);\r\n for (var i = 0; i < elements.length; i++) {\r\n var elWebPart = elements[i];\r\n // See if we have already configured this element\r\n if (elWebPart.getAttribute(\"data-isConfigured\")) {\r\n continue;\r\n }\r\n // Get the webpart id\r\n var wpId = getWebPartId(elWebPart);\r\n if (wpId) {\r\n // See if the configuration element exists\r\n var elCfg = elWebPart.parentElement.querySelector(\"#\" + props.cfgElementId);\r\n if (elCfg) {\r\n try {\r\n // Parse the configuration\r\n var data = elCfg.innerText.trim();\r\n var cfg = data.length > 0 ? JSON.parse(data) : null;\r\n // See if the webaprt id exists\r\n if (cfg && cfg.WebPartId) {\r\n // See if it's for this webpart\r\n if (cfg.WebPartId == wpId) {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: cfg,\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n else {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: __assign(__assign({}, (cfg || {})), { WebPartId: wpId }),\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n catch (ex) {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: {\r\n WebPartId: wpId\r\n },\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n // Log\r\n console.log(\"[bs-webpart] Error parsing the configuration for the webpart element '\" + props.cfgElementId + \"'.\");\r\n }\r\n // Break from the loop\r\n break;\r\n }\r\n else {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: {\r\n WebPartId: wpId\r\n },\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n // Ensure elements were found\r\n if (elements.length == 0) {\r\n // Log\r\n console.log(\"[bs-webpart] Error - Unable to find the webpart element with id '\" + props.elementId + \"'.\");\r\n }\r\n }\r\n else {\r\n // Log\r\n console.log(\"[bs-webpart] The target element id is not defined.\");\r\n }\r\n // Ensure the target element exists\r\n if (targetInfo.el) {\r\n // Set the configuration flag\r\n targetInfo.el.setAttribute(\"data-isConfigured\", \"true\");\r\n }\r\n // Return the target information\r\n return targetInfo;\r\n };\r\n /**\r\n * Method to render the webpart\r\n */\r\n var render = function () {\r\n // Get the webpart information\r\n _wp = getWebPartInfo();\r\n if (_wp == null || _wp.el == null) {\r\n // Log\r\n console.log(\"[bs-webpart] The target webpart element '\" + props.elementId + \"' was not found.\");\r\n return;\r\n }\r\n // Set the configuration\r\n _cfg = _wp.cfg;\r\n // Get the webpart element\r\n var elWebPart = _wp.wpId ? document.querySelector(\"div[webpartid='\" + _wp.wpId + \"']\") : null;\r\n if (elWebPart) {\r\n // Add the default bootstrap class name\r\n elWebPart.className += \" bs \" + (props.wpClassName || \"\");\r\n }\r\n // See if a class name exists\r\n if (props.className && _wp.el.className.indexOf(props.className) < 0) {\r\n // Set the class name\r\n _wp.el.className += \" \" + props.className;\r\n }\r\n // See if the page is being edited\r\n var returnVal = null;\r\n if (gd_sprest_1.Helper.WebPart.isEditMode()) {\r\n // Add the help link\r\n addHelpLink();\r\n // Add the edit class name\r\n _wp.el.classList.add(\"is-edit\");\r\n // Call the render event\r\n if (props.onRenderEdit) {\r\n // Execute the render edit event\r\n returnVal = props.onRenderEdit(_wp);\r\n }\r\n // See if we are displaying the default edit form\r\n else if (props.editForm) {\r\n // Display the edit form\r\n (0, wpCfg_1.WPCfg)(_cfg, _wp, props);\r\n }\r\n }\r\n else {\r\n // See if the configuration is defined, but has no value\r\n if (_wp.cfg || (props.cfgElementId || \"\").length == 0) {\r\n // Execute the render edit event\r\n returnVal = props.onRenderDisplay(_wp);\r\n }\r\n else {\r\n // Render a message\r\n _wp.el.innerHTML = '<h3>Please edit the page and configure the webpart.</h3>';\r\n }\r\n }\r\n // See if a promise was returned\r\n if (returnVal && returnVal.then) {\r\n // Wait for the request to complete\r\n returnVal.then(function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Execute the post render event\r\n props.onPostRender ? props.onPostRender(_wp) : null;\r\n });\r\n }\r\n else {\r\n // Execute the post render event\r\n props.onPostRender ? props.onPostRender(_wp) : null;\r\n }\r\n };\r\n // Add a load event\r\n window.addEventListener(\"load\", function () {\r\n // Render the component\r\n render();\r\n });\r\n // Return the webpart\r\n return {\r\n cfg: _cfg,\r\n info: _wp\r\n };\r\n};\r\nexports.WebPart = WebPart;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wp.js?");
|
|
2169
2169
|
|
|
2170
2170
|
/***/ }),
|
|
2171
2171
|
|
|
2172
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2172
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js":
|
|
2173
2173
|
/*!******************************************************************************************************!*\
|
|
2174
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2174
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js ***!
|
|
2175
2175
|
\******************************************************************************************************/
|
|
2176
2176
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2177
2177
|
|
|
2178
2178
|
"use strict";
|
|
2179
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPCfg = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar helper_1 = __webpack_require__(/*! ./helper */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2179
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPCfg = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar helper_1 = __webpack_require__(/*! ./helper */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/helper.js\");\r\n/**\r\n * WebPart Configuration\r\n */\r\nvar WPCfg = function (cfg, wp, props) {\r\n var _editForm = props.editForm || {};\r\n // Method to detect if the wiki page is being edited\r\n var isWikiPageInEdit = function () {\r\n var wikiPageMode = null;\r\n // Get the form\r\n var form = document.forms[MSOWebPartPageFormName];\r\n if (form) {\r\n // Get the wiki page mode\r\n wikiPageMode = form._wikiPageMode ? form._wikiPageMode.value : null;\r\n }\r\n // Determine if this wiki page is being edited\r\n return wikiPageMode == \"Edit\";\r\n };\r\n // The default render method when the page is edited\r\n var render = function () {\r\n var form = null;\r\n // Ensure we need to render this\r\n if (_editForm == null) {\r\n return;\r\n }\r\n // Render the template\r\n wp.el.innerHTML = [\r\n '<div></div>',\r\n '<div></div>'\r\n ].join('\\n');\r\n // Render the button to toggle the modal\r\n gd_bs_1.Components.Button({\r\n el: wp.el.children[0],\r\n text: \"Configure WebPart\",\r\n type: gd_bs_1.Components.ButtonTypes.Secondary,\r\n onClick: function () { modal.show(); }\r\n });\r\n // Render the modal\r\n var modal = gd_bs_1.Components.Modal({\r\n el: wp.el.children[1],\r\n id: (wp.cfg.WebPartId || \"\") + \"_modal\",\r\n options: { centered: true },\r\n title: \"Configuration Panel\",\r\n type: gd_bs_1.Components.ModalTypes.Large,\r\n onRenderBody: function (el) {\r\n var formControls = null;\r\n // Set the class name\r\n el.classList.add(\"wp-cfg-form\");\r\n // See if the render form event exists\r\n if (_editForm.onRenderForm) {\r\n // Call the event\r\n formControls = _editForm.onRenderForm(wp) || [];\r\n }\r\n // See if there is a promise\r\n if (formControls.then) {\r\n // Wait for the promise to be resolved\r\n formControls.then(function (formControls) {\r\n // Render the edit form\r\n form = helper_1.Helper.renderEditForm(el, wp.cfg, formControls);\r\n });\r\n }\r\n // Else, render the edit form\r\n else {\r\n form = helper_1.Helper.renderEditForm(el, wp.cfg, formControls);\r\n }\r\n // Call the render form event\r\n props.onRenderForm ? props.onRenderForm(form, wp) : null;\r\n },\r\n onRenderFooter: function (el) {\r\n var actionButtons = [];\r\n // See if this is a wiki page\r\n var disableSaveButton = isWikiPageInEdit();\r\n if (disableSaveButton) {\r\n // Get the webpart manager key name\r\n var elWPMgrKeyName = document.getElementById(\"MSOSPWebPartManager_OldSelectedStorageKeyName\");\r\n // Set the flag\r\n disableSaveButton = elWPMgrKeyName == null || elWPMgrKeyName.value.indexOf(cfg.WebPartId) < 0;\r\n if (disableSaveButton) {\r\n // Show a message\r\n el.innerHTML = \"<label>You must edit the webpart in order to save changes.</label>\";\r\n return;\r\n }\r\n }\r\n // See if we are adding the save button\r\n if (_editForm.showSaveButton != false) {\r\n // Add the save button\r\n actionButtons.push({\r\n isDisabled: disableSaveButton,\r\n text: \"Save\",\r\n onClick: function (ev) {\r\n // Validate the form\r\n if (form.isValid()) {\r\n // Call the save event and set the configuration\r\n var cfg_1 = _editForm.onSave ? _editForm.onSave(wp.cfg, form) : null;\r\n cfg_1 = cfg_1 ? cfg_1 : wp.cfg;\r\n // Save the configuration\r\n helper_1.Helper.saveConfiguration(wp.wpId, props.cfgElementId, cfg_1).then(function () {\r\n // Close the modal\r\n modal.toggle();\r\n });\r\n }\r\n }\r\n });\r\n }\r\n // See if custom actions exist\r\n if (_editForm.actions) {\r\n // Add the buttons\r\n actionButtons = actionButtons.concat(_editForm.actions);\r\n }\r\n // Render the menu buttons\r\n gd_bs_1.Components.ButtonGroup({\r\n buttons: actionButtons,\r\n buttonType: gd_bs_1.Components.ButtonTypes.Secondary,\r\n el: el,\r\n isSmall: true\r\n });\r\n }\r\n });\r\n };\r\n // Render the webpart configuration\r\n render();\r\n};\r\nexports.WPCfg = WPCfg;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js?");
|
|
2180
2180
|
|
|
2181
2181
|
/***/ }),
|
|
2182
2182
|
|
|
2183
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2183
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/index.js":
|
|
2184
2184
|
/*!*************************************************************************************************!*\
|
|
2185
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2185
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/index.js ***!
|
|
2186
2186
|
\*************************************************************************************************/
|
|
2187
2187
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2188
2188
|
|
|
2189
2189
|
"use strict";
|
|
2190
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./base */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2190
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./base */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./list */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./listFields */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./search */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./tabs */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/tabs/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./taxonomy */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/index.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/index.js?");
|
|
2191
2191
|
|
|
2192
2192
|
/***/ }),
|
|
2193
2193
|
|
|
2194
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2194
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/index.js":
|
|
2195
2195
|
/*!************************************************************************************************************!*\
|
|
2196
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2196
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/index.js ***!
|
|
2197
2197
|
\************************************************************************************************************/
|
|
2198
2198
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2199
2199
|
|
|
2200
2200
|
"use strict";
|
|
2201
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2201
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/index.js?");
|
|
2202
2202
|
|
|
2203
2203
|
/***/ }),
|
|
2204
2204
|
|
|
2205
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2205
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wp.js":
|
|
2206
2206
|
/*!*********************************************************************************************************!*\
|
|
2207
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2207
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wp.js ***!
|
|
2208
2208
|
\*********************************************************************************************************/
|
|
2209
2209
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2210
2210
|
|
|
2211
2211
|
"use strict";
|
|
2212
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPListFields = void 0;\r\nvar list_1 = __webpack_require__(/*! ../list */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2212
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPListFields = void 0;\r\nvar list_1 = __webpack_require__(/*! ../list */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/index.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js\");\r\n/**\r\n * List Fields WebPart\r\n */\r\nvar WPListFields = function (props) {\r\n // Set the edit form\r\n props ? props.editForm = (0, wpCfg_1.WPListFieldsEditForm)(props.editForm) : null;\r\n // Create the webpart and return it\r\n return (0, list_1.WPList)(props);\r\n};\r\nexports.WPListFields = WPListFields;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wp.js?");
|
|
2213
2213
|
|
|
2214
2214
|
/***/ }),
|
|
2215
2215
|
|
|
2216
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2216
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js":
|
|
2217
2217
|
/*!************************************************************************************************************!*\
|
|
2218
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2218
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js ***!
|
|
2219
2219
|
\************************************************************************************************************/
|
|
2220
2220
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2221
2221
|
|
|
2222
2222
|
"use strict";
|
|
2223
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPListFieldsEditForm = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar x_1 = __webpack_require__(/*! ../../icons/svgs/x */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/icons/svgs/x.js\");\r\n/**\r\n * List Fields WebPart Edit Form\r\n */\r\nvar WPListFieldsEditForm = function (props) {\r\n if (props === void 0) { props = {}; }\r\n var _ddlFields = null;\r\n var _ddlSelectedFields = null;\r\n var _selectedFields = null;\r\n var _tbFilter = null;\r\n var _wpInfo = null;\r\n // Adds a selected field\r\n var addField = function (field) {\r\n // Add the selected field\r\n _selectedFields.push({\r\n text: field.text,\r\n value: field.value,\r\n onRender: (function (el) {\r\n // Set the styling\r\n el.classList.add(\"d-flex\");\r\n el.classList.add(\"justify-content-between\");\r\n // Append an icon to remove the field\r\n el.appendChild((0, x_1.x)(16, 16));\r\n // Set the click event\r\n el.addEventListener(\"click\", function () {\r\n // Remove this field\r\n removeField(field);\r\n });\r\n // Clear the filter\r\n _tbFilter.setValue(\"\");\r\n })\r\n });\r\n // Render the fields\r\n _ddlSelectedFields.setItems(_selectedFields);\r\n };\r\n // Filters the fields dropdown items\r\n var filterFields = function (filter) {\r\n // Parse the items\r\n var items = _ddlFields.el.querySelectorAll(\".dropdown-item\");\r\n for (var i = 0; i < items.length; i++) {\r\n var item = items[i];\r\n var field = (item.innerText || \"\").toLowerCase();\r\n // See if the field contains this value\r\n if (filter == \"\" || field.indexOf(filter) >= 0) {\r\n // Show this element\r\n item.classList.remove(\"d-none\");\r\n }\r\n else {\r\n // Hide this element\r\n item.classList.add(\"d-none\");\r\n }\r\n }\r\n };\r\n // Gets the selected field values\r\n var getSelectedFields = function () {\r\n var fields = [];\r\n // Get the selected fields\r\n for (var i = 0; i < _selectedFields.length; i++) {\r\n var field = _selectedFields[i];\r\n // Ensure this is a field\r\n if (field.text && field.value) {\r\n // Save the field\r\n fields.push({\r\n Name: field.value,\r\n Title: field.text\r\n });\r\n }\r\n }\r\n // Return the fields\r\n return fields;\r\n };\r\n // Removes a selected field\r\n var removeField = function (field) {\r\n // Parse the selected fields\r\n for (var i = 0; i < _selectedFields.length; i++) {\r\n var selectedField = _selectedFields[i];\r\n // See if this is the target field\r\n if (selectedField.value == field.value) {\r\n // Remove this field\r\n _selectedFields.splice(i, 1);\r\n // Render the items\r\n _ddlSelectedFields.setItems(_selectedFields);\r\n // Stop the loop\r\n break;\r\n }\r\n }\r\n };\r\n // Renders the fields control\r\n var renderFields = function (el, fields) {\r\n var filter = \"\";\r\n // Create the dropdown menu\r\n _ddlFields = gd_bs_1.Components.Dropdown({\r\n id: \"calendarFields\",\r\n menuOnly: true,\r\n onChange: function (item) {\r\n // Close the popover\r\n popover.hide();\r\n // Clear the filter\r\n filterFields(\"\");\r\n // Add the selected field\r\n addField(item);\r\n }\r\n });\r\n // Render the textfield\r\n _tbFilter = gd_bs_1.Components.InputGroup({\r\n el: el,\r\n placeholder: \"Select a Field...\",\r\n onChange: function (value) {\r\n // Set the filter\r\n filter = value;\r\n // Wait for the user to stop typing\r\n setTimeout(function () {\r\n // Ensure the value hasn't changed\r\n if (value != filter) {\r\n return;\r\n }\r\n // Filter the fields\r\n filterFields(filter.toLowerCase());\r\n // Display the popover\r\n popover.show();\r\n }, 250);\r\n }\r\n });\r\n // Render the selected fields\r\n _ddlSelectedFields = gd_bs_1.Components.Dropdown({\r\n el: el,\r\n id: \"selectedFields\",\r\n menuOnly: true\r\n });\r\n // Add a click event to display the popover\r\n _tbFilter.el.addEventListener(\"click\", function () {\r\n // Display the popover\r\n popover.show();\r\n });\r\n // Create a popover\r\n var popover = gd_bs_1.Components.Popover({\r\n el: el,\r\n target: _tbFilter.el,\r\n type: gd_bs_1.Components.PopoverPlacements.Auto,\r\n options: {\r\n trigger: \"click\",\r\n content: _ddlFields.el\r\n }\r\n });\r\n };\r\n // Updates the fields\r\n var setItems = function (fields, selectedFields) {\r\n if (selectedFields === void 0) { selectedFields = []; }\r\n // Update the dropdown\r\n _ddlFields.setItems(fields);\r\n // Parse the selected fields\r\n for (var i = 0; i < selectedFields.length; i++) {\r\n var fieldInfo = selectedFields[i];\r\n // Parse the fields\r\n for (var j = 0; j < fields.length; j++) {\r\n var field = fields[j];\r\n // See if this is the target field\r\n if (field.value == fieldInfo.Name) {\r\n // Add this field\r\n addField(field);\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n // Updates the fields dropdown in the edit panel\r\n var updateFieldsDDL = function (list, selectedFields) {\r\n if (selectedFields === void 0) { selectedFields = []; }\r\n var items = [];\r\n // Clear the dropdown\r\n setItems([{\r\n isHeader: true,\r\n text: list ? \"Loading the Fields\" : \"Select a List\"\r\n }]);\r\n // Ensure the list exists\r\n if (list) {\r\n // Get the fields\r\n list.Fields().query({ OrderBy: [\"Title\"] }).execute(function (fields) {\r\n // Parse the fields\r\n for (var i = 0; i < fields.results.length; i++) {\r\n var field = fields.results[i];\r\n // Skip the title fields\r\n if (field.InternalName == \"LinkTitle\" || field.InternalName == \"LinkTitleNoMenu\") {\r\n continue;\r\n }\r\n // Skip hidden fields\r\n if (field.Hidden) {\r\n continue;\r\n }\r\n // Set the dropdown value\r\n items.push({\r\n text: field.Title,\r\n value: field.InternalName\r\n });\r\n }\r\n // Update the dropdown values\r\n setItems(items, selectedFields);\r\n });\r\n }\r\n };\r\n // Return the edit panel\r\n return {\r\n actions: props.actions,\r\n showSaveButton: props.showSaveButton,\r\n onListChanged: function (wpInfo, list) {\r\n // Update the fields dropdown\r\n updateFieldsDDL(list);\r\n },\r\n onRenderForm: function (wpInfo, list) {\r\n // Save the webpart information\r\n _wpInfo = wpInfo;\r\n // Clear the selected fields\r\n _selectedFields = [];\r\n // Set the default control\r\n var controls = [\r\n {\r\n name: \"Fields\",\r\n label: \"Fields\",\r\n onControlRendered: function (ctrl) {\r\n // Render the fields control\r\n renderFields(ctrl.el, wpInfo.cfg.Fields);\r\n // Update the fields dropdown\r\n updateFieldsDDL(list, wpInfo.cfg.Fields);\r\n }\r\n }\r\n ];\r\n // Call the render form event\r\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo, list) : null;\r\n if (returnVal) {\r\n // See if this is a promise\r\n if (returnVal.then) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (formControls) {\r\n if (formControls === void 0) { formControls = []; }\r\n // Add the form controls\r\n controls = controls.concat(formControls);\r\n // Resolve the promise\r\n resolve(controls);\r\n });\r\n });\r\n }\r\n // Add the form controls\r\n controls = controls.concat(returnVal);\r\n }\r\n // Return the custom properties\r\n return controls;\r\n },\r\n onSave: function (cfg, form) {\r\n // Update the configuration\r\n cfg.Fields = getSelectedFields();\r\n // Return the configuration\r\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\r\n }\r\n };\r\n};\r\nexports.WPListFieldsEditForm = WPListFieldsEditForm;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js?");
|
|
2223
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPListFieldsEditForm = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar x_1 = __webpack_require__(/*! ../../icons/svgs/x */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/icons/svgs/x.js\");\r\n/**\r\n * List Fields WebPart Edit Form\r\n */\r\nvar WPListFieldsEditForm = function (props) {\r\n if (props === void 0) { props = {}; }\r\n var _ddlFields = null;\r\n var _ddlSelectedFields = null;\r\n var _selectedFields = null;\r\n var _tbFilter = null;\r\n var _wpInfo = null;\r\n // Adds a selected field\r\n var addField = function (field) {\r\n // Add the selected field\r\n _selectedFields.push({\r\n text: field.text,\r\n value: field.value,\r\n onRender: (function (el) {\r\n // Set the styling\r\n el.classList.add(\"d-flex\");\r\n el.classList.add(\"justify-content-between\");\r\n // Append an icon to remove the field\r\n el.appendChild((0, x_1.x)(16, 16));\r\n // Set the click event\r\n el.addEventListener(\"click\", function () {\r\n // Remove this field\r\n removeField(field);\r\n });\r\n // Clear the filter\r\n _tbFilter.setValue(\"\");\r\n })\r\n });\r\n // Render the fields\r\n _ddlSelectedFields.setItems(_selectedFields);\r\n };\r\n // Filters the fields dropdown items\r\n var filterFields = function (filter) {\r\n // Parse the items\r\n var items = _ddlFields.el.querySelectorAll(\".dropdown-item\");\r\n for (var i = 0; i < items.length; i++) {\r\n var item = items[i];\r\n var field = (item.innerText || \"\").toLowerCase();\r\n // See if the field contains this value\r\n if (filter == \"\" || field.indexOf(filter) >= 0) {\r\n // Show this element\r\n item.classList.remove(\"d-none\");\r\n }\r\n else {\r\n // Hide this element\r\n item.classList.add(\"d-none\");\r\n }\r\n }\r\n };\r\n // Gets the selected field values\r\n var getSelectedFields = function () {\r\n var fields = [];\r\n // Get the selected fields\r\n for (var i = 0; i < _selectedFields.length; i++) {\r\n var field = _selectedFields[i];\r\n // Ensure this is a field\r\n if (field.text && field.value) {\r\n // Save the field\r\n fields.push({\r\n Name: field.value,\r\n Title: field.text\r\n });\r\n }\r\n }\r\n // Return the fields\r\n return fields;\r\n };\r\n // Removes a selected field\r\n var removeField = function (field) {\r\n // Parse the selected fields\r\n for (var i = 0; i < _selectedFields.length; i++) {\r\n var selectedField = _selectedFields[i];\r\n // See if this is the target field\r\n if (selectedField.value == field.value) {\r\n // Remove this field\r\n _selectedFields.splice(i, 1);\r\n // Render the items\r\n _ddlSelectedFields.setItems(_selectedFields);\r\n // Stop the loop\r\n break;\r\n }\r\n }\r\n };\r\n // Renders the fields control\r\n var renderFields = function (el, fields) {\r\n var filter = \"\";\r\n // Create the dropdown menu\r\n _ddlFields = gd_bs_1.Components.Dropdown({\r\n id: \"calendarFields\",\r\n menuOnly: true,\r\n onChange: function (item) {\r\n // Close the popover\r\n popover.hide();\r\n // Clear the filter\r\n filterFields(\"\");\r\n // Add the selected field\r\n addField(item);\r\n }\r\n });\r\n // Render the textfield\r\n _tbFilter = gd_bs_1.Components.InputGroup({\r\n el: el,\r\n placeholder: \"Select a Field...\",\r\n onChange: function (value) {\r\n // Set the filter\r\n filter = value;\r\n // Wait for the user to stop typing\r\n setTimeout(function () {\r\n // Ensure the value hasn't changed\r\n if (value != filter) {\r\n return;\r\n }\r\n // Filter the fields\r\n filterFields(filter.toLowerCase());\r\n // Display the popover\r\n popover.show();\r\n }, 250);\r\n }\r\n });\r\n // Render the selected fields\r\n _ddlSelectedFields = gd_bs_1.Components.Dropdown({\r\n el: el,\r\n id: \"selectedFields\",\r\n menuOnly: true\r\n });\r\n // Add a click event to display the popover\r\n _tbFilter.el.addEventListener(\"click\", function () {\r\n // Display the popover\r\n popover.show();\r\n });\r\n // Create a popover\r\n var popover = gd_bs_1.Components.Popover({\r\n el: el,\r\n target: _tbFilter.el,\r\n type: gd_bs_1.Components.PopoverPlacements.Auto,\r\n options: {\r\n trigger: \"click\",\r\n content: _ddlFields.el\r\n }\r\n });\r\n };\r\n // Updates the fields\r\n var setItems = function (fields, selectedFields) {\r\n if (selectedFields === void 0) { selectedFields = []; }\r\n // Update the dropdown\r\n _ddlFields.setItems(fields);\r\n // Parse the selected fields\r\n for (var i = 0; i < selectedFields.length; i++) {\r\n var fieldInfo = selectedFields[i];\r\n // Parse the fields\r\n for (var j = 0; j < fields.length; j++) {\r\n var field = fields[j];\r\n // See if this is the target field\r\n if (field.value == fieldInfo.Name) {\r\n // Add this field\r\n addField(field);\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n // Updates the fields dropdown in the edit panel\r\n var updateFieldsDDL = function (list, selectedFields) {\r\n if (selectedFields === void 0) { selectedFields = []; }\r\n var items = [];\r\n // Clear the dropdown\r\n setItems([{\r\n isHeader: true,\r\n text: list ? \"Loading the Fields\" : \"Select a List\"\r\n }]);\r\n // Ensure the list exists\r\n if (list) {\r\n // Get the fields\r\n list.Fields().query({ OrderBy: [\"Title\"] }).execute(function (fields) {\r\n // Parse the fields\r\n for (var i = 0; i < fields.results.length; i++) {\r\n var field = fields.results[i];\r\n // Skip the title fields\r\n if (field.InternalName == \"LinkTitle\" || field.InternalName == \"LinkTitleNoMenu\") {\r\n continue;\r\n }\r\n // Skip hidden fields\r\n if (field.Hidden) {\r\n continue;\r\n }\r\n // Set the dropdown value\r\n items.push({\r\n text: field.Title,\r\n value: field.InternalName\r\n });\r\n }\r\n // Update the dropdown values\r\n setItems(items, selectedFields);\r\n });\r\n }\r\n };\r\n // Return the edit panel\r\n return {\r\n actions: props.actions,\r\n showSaveButton: props.showSaveButton,\r\n onListChanged: function (wpInfo, list) {\r\n // Update the fields dropdown\r\n updateFieldsDDL(list);\r\n },\r\n onRenderForm: function (wpInfo, list) {\r\n // Save the webpart information\r\n _wpInfo = wpInfo;\r\n // Clear the selected fields\r\n _selectedFields = [];\r\n // Set the default control\r\n var controls = [\r\n {\r\n name: \"Fields\",\r\n label: \"Fields\",\r\n onControlRendered: function (ctrl) {\r\n // Render the fields control\r\n renderFields(ctrl.el, wpInfo.cfg.Fields);\r\n // Update the fields dropdown\r\n updateFieldsDDL(list, wpInfo.cfg.Fields);\r\n }\r\n }\r\n ];\r\n // Call the render form event\r\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo, list) : null;\r\n if (returnVal) {\r\n // See if this is a promise\r\n if (returnVal.then) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (formControls) {\r\n if (formControls === void 0) { formControls = []; }\r\n // Add the form controls\r\n controls = controls.concat(formControls);\r\n // Resolve the promise\r\n resolve(controls);\r\n });\r\n });\r\n }\r\n // Add the form controls\r\n controls = controls.concat(returnVal);\r\n }\r\n // Return the custom properties\r\n return controls;\r\n },\r\n onSave: function (cfg, form) {\r\n // Update the configuration\r\n cfg.Fields = getSelectedFields();\r\n // Return the configuration\r\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\r\n }\r\n };\r\n};\r\nexports.WPListFieldsEditForm = WPListFieldsEditForm;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js?");
|
|
2224
2224
|
|
|
2225
2225
|
/***/ }),
|
|
2226
2226
|
|
|
2227
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2227
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/index.js":
|
|
2228
2228
|
/*!******************************************************************************************************!*\
|
|
2229
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2229
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/index.js ***!
|
|
2230
2230
|
\******************************************************************************************************/
|
|
2231
2231
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2232
2232
|
|
|
2233
2233
|
"use strict";
|
|
2234
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2234
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/index.js?");
|
|
2235
2235
|
|
|
2236
2236
|
/***/ }),
|
|
2237
2237
|
|
|
2238
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2238
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wp.js":
|
|
2239
2239
|
/*!***************************************************************************************************!*\
|
|
2240
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2240
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wp.js ***!
|
|
2241
2241
|
\***************************************************************************************************/
|
|
2242
2242
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2243
2243
|
|
|
2244
2244
|
"use strict";
|
|
2245
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPList = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2245
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPList = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wp.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js\");\r\n/**\r\n * List WebPart\r\n */\r\nvar WPList = function (props) {\r\n var _wpInfo = null;\r\n // Method to load the items using a CAML query\r\n var loadCAML = function (caml) {\r\n if (caml === void 0) { caml = \"\"; }\r\n // Call the load caml query event\r\n caml = (props.onExecutingCAMLQuery ? props.onExecutingCAMLQuery(_wpInfo, caml) : null) || caml;\r\n // See if we are targeting a different web\r\n var webUrl = _wpInfo.cfg.WebUrl;\r\n if (webUrl) {\r\n // Get the context information for the destination web\r\n // Note - Since we are using a POST request, this would be required for cross-site collection requests\r\n gd_sprest_1.ContextInfo.getWeb(webUrl).execute(function (contextInfo) {\r\n // Get the web\r\n (0, gd_sprest_1.Web)(webUrl, { requestDigest: contextInfo.GetContextWebInformation.FormDigestValue })\r\n // Get the list\r\n .Lists(_wpInfo.cfg.ListName)\r\n // Query the items\r\n .getItemsByQuery(caml)\r\n // Execute the request\r\n .execute(function (items) {\r\n // Render the items\r\n props.onRenderItems ? props.onRenderItems(_wpInfo, items.results) : null;\r\n });\r\n });\r\n }\r\n else {\r\n // Get the web\r\n (0, gd_sprest_1.Web)(webUrl)\r\n // Get the list\r\n .Lists(_wpInfo.cfg.ListName)\r\n // Query the items\r\n .getItemsByQuery(caml)\r\n // Execute the request\r\n .execute(function (items) {\r\n // Render the items\r\n props.onRenderItems ? props.onRenderItems(_wpInfo, items.results) : null;\r\n });\r\n }\r\n };\r\n // Method to load the items using an ODATA query\r\n var loadODATA = function (query) {\r\n if (query === void 0) { query = {}; }\r\n // Call the load caml query event\r\n query = (props.onExecutingODATAQuery ? props.onExecutingODATAQuery(_wpInfo, query) : null) || query;\r\n // Get the web\r\n (0, gd_sprest_1.Web)(_wpInfo.cfg.WebUrl)\r\n // Get the list\r\n .Lists(_wpInfo.cfg.ListName)\r\n // Get the items\r\n .Items()\r\n // Query the list\r\n .query(query)\r\n // Execute the request\r\n .execute(function (items) {\r\n // Render the items\r\n props.onRenderItems ? props.onRenderItems(_wpInfo, items.results) : null;\r\n });\r\n };\r\n // Create the webpart and return it\r\n return (0, wp_1.WebPart)({\r\n cfgElementId: props.cfgElementId,\r\n className: props.className,\r\n editForm: (0, wpCfg_1.WPListEditForm)(props.editForm),\r\n elementId: props.elementId,\r\n wpClassName: props.wpClassName,\r\n onRenderDisplay: function (wpInfo) {\r\n // Save the information\r\n _wpInfo = wpInfo;\r\n // Call the render event\r\n props.onRenderDisplay ? props.onRenderDisplay(_wpInfo) : null;\r\n // See if there is a render items event and a list is defined\r\n if (props.onRenderItems && _wpInfo.cfg.ListName) {\r\n // See if we are using the CAML query\r\n if (props.camlQuery || props.onExecutingCAMLQuery) {\r\n loadCAML(props.camlQuery);\r\n }\r\n // Else, load using the ODATA query\r\n else {\r\n loadODATA(props.odataQuery);\r\n }\r\n }\r\n },\r\n });\r\n};\r\nexports.WPList = WPList;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wp.js?");
|
|
2246
2246
|
|
|
2247
2247
|
/***/ }),
|
|
2248
2248
|
|
|
2249
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2249
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js":
|
|
2250
2250
|
/*!******************************************************************************************************!*\
|
|
2251
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2251
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js ***!
|
|
2252
2252
|
\******************************************************************************************************/
|
|
2253
2253
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2254
2254
|
|
|
2255
2255
|
"use strict";
|
|
2256
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPListEditForm = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * List WebPart Edit Form\r\n */\r\nvar WPListEditForm = function (props) {\r\n if (props === void 0) { props = {}; }\r\n var _ddlList = null;\r\n var _lists = null;\r\n var _loadingMessage = null;\r\n var _wpInfo = null;\r\n // Method to load the lists\r\n var loadLists = function (webUrl) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Set the query\r\n var query = props.listQuery || {};\r\n // Get the web\r\n (0, gd_sprest_1.Web)(webUrl)\r\n // Get the lists\r\n .Lists()\r\n // Include the fields\r\n .query(query)\r\n // Execute the request\r\n .execute(function (lists) {\r\n var items = [{\r\n text: \"\",\r\n value: \"\"\r\n }];\r\n // Call the list loaded event\r\n _lists = (props.onListsLoaded ? props.onListsLoaded(_wpInfo, lists.results) : null) || lists.results;\r\n // Parse the lists\r\n for (var i = 0; i < _lists.length; i++) {\r\n var list = _lists[i];\r\n // Add the item\r\n items.push({\r\n text: list.Title,\r\n value: list.Title\r\n });\r\n }\r\n // Resolve the promise\r\n resolve(items);\r\n }, reject);\r\n });\r\n };\r\n // Method to render the form controls\r\n var renderFormControls = function (items, webUrl) {\r\n var controls = [];\r\n // Add the web url\r\n controls.push({\r\n label: \"Relative Web Url:\",\r\n description: \"The web containing the list. If blank, the current web is used.\",\r\n name: \"WebUrl\",\r\n type: gd_bs_1.Components.FormControlTypes.TextField,\r\n value: webUrl,\r\n onChange: function (value) {\r\n // Update the configuration\r\n _wpInfo.cfg.WebUrl = value;\r\n }\r\n });\r\n // Add the dropdown\r\n controls.push({\r\n label: \"List:\",\r\n name: \"ListName\",\r\n items: items,\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n value: _wpInfo && _wpInfo.cfg ? _wpInfo.cfg.ListName : null,\r\n onControlRendered: function (control) {\r\n // Save a reference to the dropdown list\r\n _ddlList = control.dropdown;\r\n },\r\n onChange: function (item) {\r\n if (item) {\r\n // See if this is a blank item\r\n if (item.text == \"\") {\r\n // Call the change event\r\n props.onListChanged ? props.onListChanged(_wpInfo) : null;\r\n return;\r\n }\r\n // Parse the list\r\n for (var i = 0; i < _lists.length; i++) {\r\n var list = _lists[i];\r\n // See if this is the target list\r\n if (list.Title == item.text) {\r\n // Update the configuration\r\n _wpInfo.cfg.ListName = item.value;\r\n // Call the change event\r\n props.onListChanged ? props.onListChanged(_wpInfo, list) : null;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n // Return the controls\r\n return controls;\r\n };\r\n // Create the form action buttons\r\n var actionButtons = [\r\n {\r\n text: \"Refresh\",\r\n onClick: function () {\r\n // Clear the dropdown\r\n _ddlList.setItems([{ isHeader: true, text: \"Loading the Lists\", isSelected: true }]);\r\n // Load the lists\r\n loadLists(_wpInfo.cfg.WebUrl).then(function (items) {\r\n // Set the dropdown items\r\n _ddlList.setItems(items);\r\n });\r\n }\r\n }\r\n ];\r\n // See if custom actions exist\r\n if (props.actions) {\r\n // Add the custom commands\r\n actionButtons = actionButtons.concat(props.actions);\r\n }\r\n // Return the edit panel\r\n return {\r\n actions: actionButtons,\r\n showSaveButton: props.showSaveButton,\r\n onRenderForm: function (wpInfo) {\r\n // Save the webpart information\r\n _wpInfo = wpInfo;\r\n // Render a loading message\r\n _loadingMessage = gd_bs_1.Components.Progress({\r\n el: _wpInfo.el,\r\n isAnimated: true,\r\n isStriped: true,\r\n label: \"Loading the List Information\",\r\n size: 100\r\n }).el;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the lists\r\n loadLists(_wpInfo && _wpInfo.cfg ? _wpInfo.cfg.WebUrl : \"\").then(function (items) {\r\n // Render the form controls\r\n var controls = renderFormControls(items);\r\n // Parse the lists\r\n var selectedList = null;\r\n for (var i = 0; i < _lists.length; i++) {\r\n var list = _lists[i];\r\n // See if this is the selected list\r\n if (list.Title == _wpInfo.cfg.ListName) {\r\n // Select this list\r\n selectedList = list;\r\n }\r\n }\r\n // Call the render form event\r\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo, selectedList) : null;\r\n if (returnVal) {\r\n // See if this is a promise\r\n if (returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (formControls) {\r\n if (formControls === void 0) { formControls = []; }\r\n // Add the form controls\r\n controls = controls.concat(formControls);\r\n // Resolve the promise\r\n resolve(controls);\r\n });\r\n }\r\n // Else, see if the form controls exist\r\n else if (returnVal.length > 0) {\r\n // Add the form controls\r\n controls = controls.concat(returnVal);\r\n // Resolve the promise\r\n resolve(controls);\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(controls);\r\n }\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(controls);\r\n }\r\n // Remove the loading message\r\n _wpInfo.el.removeChild(_loadingMessage);\r\n });\r\n });\r\n },\r\n onSave: function (cfg, form) {\r\n // Update the configuration\r\n cfg.ListName = _wpInfo.cfg.ListName;\r\n cfg.WebUrl = _wpInfo.cfg.WebUrl;\r\n // Return the configuration\r\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\r\n }\r\n };\r\n};\r\nexports.WPListEditForm = WPListEditForm;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2256
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPListEditForm = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * List WebPart Edit Form\r\n */\r\nvar WPListEditForm = function (props) {\r\n if (props === void 0) { props = {}; }\r\n var _ddlList = null;\r\n var _lists = null;\r\n var _loadingMessage = null;\r\n var _wpInfo = null;\r\n // Method to load the lists\r\n var loadLists = function (webUrl) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Set the query\r\n var query = props.listQuery || {};\r\n // Get the web\r\n (0, gd_sprest_1.Web)(webUrl)\r\n // Get the lists\r\n .Lists()\r\n // Include the fields\r\n .query(query)\r\n // Execute the request\r\n .execute(function (lists) {\r\n var items = [{\r\n text: \"\",\r\n value: \"\"\r\n }];\r\n // Call the list loaded event\r\n _lists = (props.onListsLoaded ? props.onListsLoaded(_wpInfo, lists.results) : null) || lists.results;\r\n // Parse the lists\r\n for (var i = 0; i < _lists.length; i++) {\r\n var list = _lists[i];\r\n // Add the item\r\n items.push({\r\n text: list.Title,\r\n value: list.Title\r\n });\r\n }\r\n // Resolve the promise\r\n resolve(items);\r\n }, reject);\r\n });\r\n };\r\n // Method to render the form controls\r\n var renderFormControls = function (items, webUrl) {\r\n var controls = [];\r\n // Add the web url\r\n controls.push({\r\n label: \"Relative Web Url:\",\r\n description: \"The web containing the list. If blank, the current web is used.\",\r\n name: \"WebUrl\",\r\n type: gd_bs_1.Components.FormControlTypes.TextField,\r\n value: webUrl,\r\n onChange: function (value) {\r\n // Update the configuration\r\n _wpInfo.cfg.WebUrl = value;\r\n }\r\n });\r\n // Add the dropdown\r\n controls.push({\r\n label: \"List:\",\r\n name: \"ListName\",\r\n items: items,\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n value: _wpInfo && _wpInfo.cfg ? _wpInfo.cfg.ListName : null,\r\n onControlRendered: function (control) {\r\n // Save a reference to the dropdown list\r\n _ddlList = control.dropdown;\r\n },\r\n onChange: function (item) {\r\n if (item) {\r\n // See if this is a blank item\r\n if (item.text == \"\") {\r\n // Call the change event\r\n props.onListChanged ? props.onListChanged(_wpInfo) : null;\r\n return;\r\n }\r\n // Parse the list\r\n for (var i = 0; i < _lists.length; i++) {\r\n var list = _lists[i];\r\n // See if this is the target list\r\n if (list.Title == item.text) {\r\n // Update the configuration\r\n _wpInfo.cfg.ListName = item.value;\r\n // Call the change event\r\n props.onListChanged ? props.onListChanged(_wpInfo, list) : null;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n // Return the controls\r\n return controls;\r\n };\r\n // Create the form action buttons\r\n var actionButtons = [\r\n {\r\n text: \"Refresh\",\r\n onClick: function () {\r\n // Clear the dropdown\r\n _ddlList.setItems([{ isHeader: true, text: \"Loading the Lists\", isSelected: true }]);\r\n // Load the lists\r\n loadLists(_wpInfo.cfg.WebUrl).then(function (items) {\r\n // Set the dropdown items\r\n _ddlList.setItems(items);\r\n });\r\n }\r\n }\r\n ];\r\n // See if custom actions exist\r\n if (props.actions) {\r\n // Add the custom commands\r\n actionButtons = actionButtons.concat(props.actions);\r\n }\r\n // Return the edit panel\r\n return {\r\n actions: actionButtons,\r\n showSaveButton: props.showSaveButton,\r\n onRenderForm: function (wpInfo) {\r\n // Save the webpart information\r\n _wpInfo = wpInfo;\r\n // Render a loading message\r\n _loadingMessage = gd_bs_1.Components.Progress({\r\n el: _wpInfo.el,\r\n isAnimated: true,\r\n isStriped: true,\r\n label: \"Loading the List Information\",\r\n size: 100\r\n }).el;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the lists\r\n loadLists(_wpInfo && _wpInfo.cfg ? _wpInfo.cfg.WebUrl : \"\").then(function (items) {\r\n // Render the form controls\r\n var controls = renderFormControls(items);\r\n // Parse the lists\r\n var selectedList = null;\r\n for (var i = 0; i < _lists.length; i++) {\r\n var list = _lists[i];\r\n // See if this is the selected list\r\n if (list.Title == _wpInfo.cfg.ListName) {\r\n // Select this list\r\n selectedList = list;\r\n }\r\n }\r\n // Call the render form event\r\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo, selectedList) : null;\r\n if (returnVal) {\r\n // See if this is a promise\r\n if (returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (formControls) {\r\n if (formControls === void 0) { formControls = []; }\r\n // Add the form controls\r\n controls = controls.concat(formControls);\r\n // Resolve the promise\r\n resolve(controls);\r\n });\r\n }\r\n // Else, see if the form controls exist\r\n else if (returnVal.length > 0) {\r\n // Add the form controls\r\n controls = controls.concat(returnVal);\r\n // Resolve the promise\r\n resolve(controls);\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(controls);\r\n }\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(controls);\r\n }\r\n // Remove the loading message\r\n _wpInfo.el.removeChild(_loadingMessage);\r\n });\r\n });\r\n },\r\n onSave: function (cfg, form) {\r\n // Update the configuration\r\n cfg.ListName = _wpInfo.cfg.ListName;\r\n cfg.WebUrl = _wpInfo.cfg.WebUrl;\r\n // Return the configuration\r\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\r\n }\r\n };\r\n};\r\nexports.WPListEditForm = WPListEditForm;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js?");
|
|
2257
2257
|
|
|
2258
2258
|
/***/ }),
|
|
2259
2259
|
|
|
2260
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2260
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/index.js":
|
|
2261
2261
|
/*!********************************************************************************************************!*\
|
|
2262
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2262
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/index.js ***!
|
|
2263
2263
|
\********************************************************************************************************/
|
|
2264
2264
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2265
2265
|
|
|
2266
2266
|
"use strict";
|
|
2267
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2267
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/index.js?");
|
|
2268
2268
|
|
|
2269
2269
|
/***/ }),
|
|
2270
2270
|
|
|
2271
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2271
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wp.js":
|
|
2272
2272
|
/*!*****************************************************************************************************!*\
|
|
2273
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2273
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wp.js ***!
|
|
2274
2274
|
\*****************************************************************************************************/
|
|
2275
2275
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2276
2276
|
|
|
2277
2277
|
"use strict";
|
|
2278
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPSearch = void 0;\r\nvar wp_1 = __webpack_require__(/*! ../list/wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2278
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPSearch = void 0;\r\nvar wp_1 = __webpack_require__(/*! ../list/wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/list/wp.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js\");\r\n/**\r\n * Search WebPart\r\n */\r\nvar WPSearch = function (props) {\r\n var _items = [];\r\n var _wpInfo;\r\n // Create the webpart and return it\r\n var _wp = (0, wp_1.WPList)({\r\n camlQuery: props.camlQuery,\r\n cfgElementId: props.cfgElementId,\r\n className: props.className,\r\n editForm: (0, wpCfg_1.WPSearchEditForm)(props.editForm),\r\n elementId: props.elementId,\r\n helpProps: props.helpProps,\r\n odataQuery: props.odataQuery,\r\n wpClassName: props.wpClassName,\r\n onExecutingODATAQuery: function (wpInfo, query) {\r\n // Default the query\r\n query = (props.onExecutingODATAQuery ? props.onExecutingODATAQuery(wpInfo, query) : query) || {};\r\n query.Expand = query.Expand || [];\r\n query.Select = query.Select || [\"*\"];\r\n // Ensure the configuration exists\r\n if (wpInfo.cfg) {\r\n var hasTaxonomyField = false;\r\n // Parse the fields\r\n var fields = (wpInfo.cfg.Fields || []).concat(props.searchFields || []);\r\n for (var i = 0; i < fields.length; i++) {\r\n var field = fields[i];\r\n // Add the field, based on the type\r\n switch (field.type) {\r\n // Lookup\r\n case \"Lookup\":\r\n case \"LookupMulti\":\r\n // Add the field\r\n query.Expand.push(field.name);\r\n query.Select.push(field.name + \"/Title\");\r\n break;\r\n // Taxonomy\r\n case \"TaxonomyFieldType\":\r\n case \"TaxonomyFieldTypeMulti\":\r\n // Set the flag\r\n hasTaxonomyField = true;\r\n // Add the field\r\n query.Select.push(field.name);\r\n break;\r\n // User\r\n case \"User\":\r\n // Add the field\r\n query.Expand.push(field.name);\r\n query.Select.push(field.name + \"/Title\");\r\n break;\r\n // Default\r\n default:\r\n query.Select.push(field.name);\r\n break;\r\n }\r\n }\r\n // See if there is a taxonomy field\r\n if (hasTaxonomyField) {\r\n // Get the taxonomy field values\r\n query.Expand.push(\"TaxCatchAll\");\r\n query.Select.push(\"TaxCatchAll/ID\", \"TaxCatchAll/Term\");\r\n }\r\n }\r\n // Return the query\r\n return query;\r\n },\r\n onRenderItems: function (wpInfo, items) {\r\n // Save the wpinfo and items\r\n _wpInfo = wpInfo;\r\n _items = items;\r\n // Call the custom event\r\n props.onRenderItems ? props.onRenderItems(wpInfo, items) : null;\r\n }\r\n });\r\n // Set the filter method\r\n _wp.filterItems = function (filterText) {\r\n var results = [];\r\n // Ensure the filter exists\r\n if (filterText && filterText.length > 0) {\r\n // Update the filter\r\n filterText = filterText.toLowerCase();\r\n var fields = ((_wpInfo.cfg ? _wpInfo.cfg.Fields : null) || []).concat(props.searchFields || []);\r\n // Parse the items\r\n for (var i = 0; i < _items.length; i++) {\r\n var item = _items[i];\r\n var addToResults = false;\r\n // Set the taxonomy mapper\r\n var mapper = item[\"TaxCatchAll\"];\r\n mapper = (mapper ? mapper.results : null) || [];\r\n // Parse the fields\r\n for (var j = 0; j < fields.length; j++) {\r\n var field = fields[j];\r\n // Get the field value(s)\r\n var fieldValues = item[field.name];\r\n if (fieldValues) {\r\n fieldValues = fieldValues.results ? fieldValues.results : [fieldValues];\r\n // Parse the field values\r\n for (var k = 0; k < fieldValues.length; k++) {\r\n var fieldValue = fieldValues[k];\r\n // Ensure the field value exists\r\n if (fieldValue) {\r\n // Update the value, based on the type\r\n switch (field.type) {\r\n // Lookup\r\n case \"Lookup\":\r\n case \"LookupMulti\":\r\n // Set the value\r\n fieldValue = fieldValue.Title;\r\n break;\r\n // Taxonomy\r\n case \"TaxonomyFieldType\":\r\n case \"TaxonomyFieldTypeMulti\":\r\n // Parse the mapper\r\n for (var i_1 = 0; i_1 < mapper.length; i_1++) {\r\n // See if this is the target id\r\n if (mapper[i_1].ID == fieldValue.WssId) {\r\n // Set the value\r\n fieldValue = mapper[i_1].Term;\r\n }\r\n }\r\n break;\r\n // URL\r\n case \"URL\":\r\n // Set the value\r\n fieldValue = fieldValue.Description;\r\n break;\r\n // User\r\n case \"User\":\r\n // Set the value\r\n fieldValue = fieldValue.Title;\r\n break;\r\n }\r\n // See if the item contains the filter\r\n if (fieldValue && fieldValue.toLowerCase().indexOf(filterText) >= 0) {\r\n // Set the flag\r\n addToResults = true;\r\n break;\r\n }\r\n }\r\n }\r\n // See if we are adding this item to the results\r\n if (addToResults) {\r\n // Add the item\r\n results.push(item);\r\n // Break from the loop\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // Copy the items\r\n results = _items;\r\n }\r\n // Return the results\r\n return results;\r\n };\r\n // Return the webpart\r\n return _wp;\r\n};\r\nexports.WPSearch = WPSearch;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wp.js?");
|
|
2279
2279
|
|
|
2280
2280
|
/***/ }),
|
|
2281
2281
|
|
|
2282
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2282
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js":
|
|
2283
2283
|
/*!********************************************************************************************************!*\
|
|
2284
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2284
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js ***!
|
|
2285
2285
|
\********************************************************************************************************/
|
|
2286
2286
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2287
2287
|
|
|
2288
2288
|
"use strict";
|
|
2289
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPSearchEditForm = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * Search WebPart Edit Form\r\n */\r\nvar WPSearchEditForm = function (props) {\r\n if (props === void 0) { props = {}; }\r\n var _wpInfo = null;\r\n // Method to render the fields\r\n var loadFields = function (list) {\r\n var formControls = [];\r\n var items = [];\r\n // Ensure the list exists\r\n if (list == null) {\r\n return formControls;\r\n }\r\n // Parse the fields\r\n var fields = (list.Fields ? list.Fields.results : null) || [];\r\n for (var i = 0; i < fields.length; i++) {\r\n var addField = false;\r\n var field = fields[i];\r\n // Add the field, based on the type\r\n switch (field.FieldTypeKind) {\r\n // Searchable Fields\r\n case gd_sprest_1.SPTypes.FieldType.Choice:\r\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\r\n case gd_sprest_1.SPTypes.FieldType.Lookup:\r\n case gd_sprest_1.SPTypes.FieldType.Text:\r\n case gd_sprest_1.SPTypes.FieldType.URL:\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n addField = true;\r\n break;\r\n default:\r\n // Allow managed metadata fields\r\n addField = /^TaxonomyFieldType/.test(field.TypeAsString);\r\n break;\r\n }\r\n // See if we are adding the field\r\n if (addField) {\r\n items.push({\r\n data: field.TypeAsString,\r\n text: field.Title + \" [\" + field.InternalName + \"]\",\r\n value: field.InternalName\r\n });\r\n }\r\n }\r\n // Sort the options\r\n items = items.sort(function (a, b) {\r\n if (a.text < b.text) {\r\n return -1;\r\n }\r\n if (a.text > b.text) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n // See if fields exist\r\n var value = [];\r\n if (_wpInfo.cfg && _wpInfo.cfg.Fields) {\r\n // Parse the fields\r\n for (var i = 0; i < _wpInfo.cfg.Fields.length; i++) {\r\n // Add the field\r\n value.push(_wpInfo.cfg.Fields[i].name);\r\n }\r\n }\r\n // Add the form dropdown\r\n formControls.push({\r\n label: \"Filter Field(s):\",\r\n items: items,\r\n type: gd_bs_1.Components.FormControlTypes.MultiDropdown,\r\n onChange: function (items) {\r\n // Clear the fields\r\n _wpInfo.cfg.Fields = [];\r\n // Parse the options\r\n for (var i = 0; i < items.length; i++) {\r\n var item = items[i];\r\n // Add the field\r\n _wpInfo.cfg.Fields.push({\r\n name: item.value,\r\n type: item.data\r\n });\r\n }\r\n }\r\n });\r\n // Return the form controls\r\n return formControls;\r\n };\r\n // Set the list query\r\n var listQuery = props.listQuery || {};\r\n listQuery.Expand = listQuery.Expand || [];\r\n listQuery.Expand.push(\"Fields\");\r\n // Return the edit panel\r\n return {\r\n actions: props.actions,\r\n listQuery: listQuery,\r\n onListsLoaded: props.onListsLoaded,\r\n onRenderForm: function (wpInfo, list) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Save the webpart information\r\n _wpInfo = wpInfo;\r\n // Load the fields\r\n var formControls = loadFields(list);\r\n // Call the render form event\r\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo) : null;\r\n if (returnVal) {\r\n // See if this is a promise\r\n if (returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (controls) {\r\n if (controls === void 0) { controls = []; }\r\n // Add the form controls\r\n formControls = formControls.concat(controls);\r\n // Resolve the promise\r\n resolve(formControls);\r\n });\r\n }\r\n // Else, see if the form controls exist\r\n else if (returnVal.length > 0) {\r\n // Add the form controls\r\n formControls = formControls.concat(returnVal);\r\n // Resolve the promise\r\n resolve(formControls);\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(formControls);\r\n }\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(formControls);\r\n }\r\n });\r\n },\r\n showSaveButton: props.showSaveButton,\r\n onListChanged: function (wpInfo, list) {\r\n // Render the fields\r\n return loadFields(list);\r\n },\r\n onSave: function (cfg, form) {\r\n // Update the configuration\r\n cfg.Fields = _wpInfo.cfg.Fields || [];\r\n // Return the configuration\r\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\r\n }\r\n };\r\n};\r\nexports.WPSearchEditForm = WPSearchEditForm;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2289
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPSearchEditForm = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * Search WebPart Edit Form\r\n */\r\nvar WPSearchEditForm = function (props) {\r\n if (props === void 0) { props = {}; }\r\n var _wpInfo = null;\r\n // Method to render the fields\r\n var loadFields = function (list) {\r\n var formControls = [];\r\n var items = [];\r\n // Ensure the list exists\r\n if (list == null) {\r\n return formControls;\r\n }\r\n // Parse the fields\r\n var fields = (list.Fields ? list.Fields.results : null) || [];\r\n for (var i = 0; i < fields.length; i++) {\r\n var addField = false;\r\n var field = fields[i];\r\n // Add the field, based on the type\r\n switch (field.FieldTypeKind) {\r\n // Searchable Fields\r\n case gd_sprest_1.SPTypes.FieldType.Choice:\r\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\r\n case gd_sprest_1.SPTypes.FieldType.Lookup:\r\n case gd_sprest_1.SPTypes.FieldType.Text:\r\n case gd_sprest_1.SPTypes.FieldType.URL:\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n addField = true;\r\n break;\r\n default:\r\n // Allow managed metadata fields\r\n addField = /^TaxonomyFieldType/.test(field.TypeAsString);\r\n break;\r\n }\r\n // See if we are adding the field\r\n if (addField) {\r\n items.push({\r\n data: field.TypeAsString,\r\n text: field.Title + \" [\" + field.InternalName + \"]\",\r\n value: field.InternalName\r\n });\r\n }\r\n }\r\n // Sort the options\r\n items = items.sort(function (a, b) {\r\n if (a.text < b.text) {\r\n return -1;\r\n }\r\n if (a.text > b.text) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n // See if fields exist\r\n var value = [];\r\n if (_wpInfo.cfg && _wpInfo.cfg.Fields) {\r\n // Parse the fields\r\n for (var i = 0; i < _wpInfo.cfg.Fields.length; i++) {\r\n // Add the field\r\n value.push(_wpInfo.cfg.Fields[i].name);\r\n }\r\n }\r\n // Add the form dropdown\r\n formControls.push({\r\n label: \"Filter Field(s):\",\r\n items: items,\r\n type: gd_bs_1.Components.FormControlTypes.MultiDropdown,\r\n onChange: function (items) {\r\n // Clear the fields\r\n _wpInfo.cfg.Fields = [];\r\n // Parse the options\r\n for (var i = 0; i < items.length; i++) {\r\n var item = items[i];\r\n // Add the field\r\n _wpInfo.cfg.Fields.push({\r\n name: item.value,\r\n type: item.data\r\n });\r\n }\r\n }\r\n });\r\n // Return the form controls\r\n return formControls;\r\n };\r\n // Set the list query\r\n var listQuery = props.listQuery || {};\r\n listQuery.Expand = listQuery.Expand || [];\r\n listQuery.Expand.push(\"Fields\");\r\n // Return the edit panel\r\n return {\r\n actions: props.actions,\r\n listQuery: listQuery,\r\n onListsLoaded: props.onListsLoaded,\r\n onRenderForm: function (wpInfo, list) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Save the webpart information\r\n _wpInfo = wpInfo;\r\n // Load the fields\r\n var formControls = loadFields(list);\r\n // Call the render form event\r\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo) : null;\r\n if (returnVal) {\r\n // See if this is a promise\r\n if (returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (controls) {\r\n if (controls === void 0) { controls = []; }\r\n // Add the form controls\r\n formControls = formControls.concat(controls);\r\n // Resolve the promise\r\n resolve(formControls);\r\n });\r\n }\r\n // Else, see if the form controls exist\r\n else if (returnVal.length > 0) {\r\n // Add the form controls\r\n formControls = formControls.concat(returnVal);\r\n // Resolve the promise\r\n resolve(formControls);\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(formControls);\r\n }\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(formControls);\r\n }\r\n });\r\n },\r\n showSaveButton: props.showSaveButton,\r\n onListChanged: function (wpInfo, list) {\r\n // Render the fields\r\n return loadFields(list);\r\n },\r\n onSave: function (cfg, form) {\r\n // Update the configuration\r\n cfg.Fields = _wpInfo.cfg.Fields || [];\r\n // Return the configuration\r\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\r\n }\r\n };\r\n};\r\nexports.WPSearchEditForm = WPSearchEditForm;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js?");
|
|
2290
2290
|
|
|
2291
2291
|
/***/ }),
|
|
2292
2292
|
|
|
2293
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2293
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/tabs/index.js":
|
|
2294
2294
|
/*!******************************************************************************************************!*\
|
|
2295
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2295
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/tabs/index.js ***!
|
|
2296
2296
|
\******************************************************************************************************/
|
|
2297
2297
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2298
2298
|
|
|
2299
2299
|
"use strict";
|
|
2300
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2300
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/tabs/index.js?");
|
|
2301
2301
|
|
|
2302
2302
|
/***/ }),
|
|
2303
2303
|
|
|
2304
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2304
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js":
|
|
2305
2305
|
/*!***************************************************************************************************!*\
|
|
2306
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2306
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js ***!
|
|
2307
2307
|
\***************************************************************************************************/
|
|
2308
2308
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2309
2309
|
|
|
2310
2310
|
"use strict";
|
|
2311
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPTabs = exports.WPTabTypes = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/webparts/base/index.js\");\r\n/**\r\n * Web Part Tab Types\r\n */\r\nvar WPTabTypes;\r\n(function (WPTabTypes) {\r\n WPTabTypes[WPTabTypes[\"Pillars\"] = 1] = \"Pillars\";\r\n WPTabTypes[WPTabTypes[\"Tabs\"] = 2] = \"Tabs\";\r\n})(WPTabTypes = exports.WPTabTypes || (exports.WPTabTypes = {}));\r\n/**\r\n * Web Part Tabs\r\n */\r\nvar WPTabs = function (props) {\r\n var _elWebPart = null;\r\n var _isContentZone = false;\r\n var _nav = null;\r\n // Method to get the webparts\r\n var getWebParts = function (wpInfo) {\r\n var wps = [];\r\n // Get the webpart element and zone\r\n var elWebPart = document.querySelector(\"div[webpartid='\" + wpInfo.cfg.WebPartId + \"']\");\r\n var elWebPartZone = elWebPart ? getWebPartZone(elWebPart) : null;\r\n if (elWebPart && elWebPartZone) {\r\n // Add a class name to the webpart zone\r\n elWebPartZone.className += \" wp-tabs\";\r\n // Remove the empty elements\r\n removeEmptyElements(elWebPartZone);\r\n // Parse the webparts in this zone\r\n var webparts = elWebPartZone.querySelectorAll(\".ms-webpartzone-cell[id^='MSOZoneCell_WebPart']\");\r\n for (var i = 0; i < webparts.length; i++) {\r\n var webpart = webparts[i];\r\n // See if it's this webpart\r\n if (webpart.querySelector(\"div[webpartid='\" + wpInfo.cfg.WebPartId + \"']\")) {\r\n // Save a reference\r\n _elWebPart = webpart;\r\n // Set the class\r\n _elWebPart.className += \" wp-tab\";\r\n // Skip this webpart\r\n continue;\r\n }\r\n // Skip hidden webparts\r\n var wpTitle = (webpart.querySelector(\".ms-webpart-titleText\") || {}).innerText || \"\";\r\n var isHidden = webpart.firstElementChild && webpart.firstElementChild.classList.contains(\"ms-hide\");\r\n isHidden = isHidden || /^\\(Hidden\\)/.test(wpTitle);\r\n if (isHidden) {\r\n continue;\r\n }\r\n // See if this is within a content zone\r\n if (_isContentZone) {\r\n // Get the parent webpart box\r\n while (webpart.parentNode) {\r\n // See if this is the webpart box element\r\n if (webpart.classList.contains(\"ms-rte-wpbox\")) {\r\n // Find the div containing the webpart id\r\n var wpElement = webpart.querySelector(\"div[webpartid*='-']\");\r\n if (wpElement) {\r\n // Set the webpart id attribute\r\n webpart.setAttribute(\"wpid\", wpElement.getAttribute(\"webpartid\"));\r\n }\r\n // Add this webpart and break from the loop\r\n wps.push(webpart);\r\n break;\r\n }\r\n // Check the parent element\r\n webpart = webpart.parentNode;\r\n }\r\n }\r\n else {\r\n // Add the webpart\r\n wps.push(webpart);\r\n }\r\n }\r\n }\r\n // Return the webparts\r\n return wps;\r\n };\r\n // Method to get the webpart zone\r\n var getWebPartZone = function (el) {\r\n // Ensure the element exists\r\n if (el && el.classList) {\r\n // See if this is the webpart zone element\r\n if (el.classList.contains(\"ms-webpart-zone\")) {\r\n // Return it\r\n return el;\r\n }\r\n // See if this is the inner page zone\r\n if (el.classList.contains(\"ms-rte-layoutszone-inner\") || el.classList.contains(\"ms-rtestate-field\")) {\r\n // Set the flag\r\n _isContentZone = true;\r\n // Return it\r\n return el;\r\n }\r\n // Check the parent element\r\n return getWebPartZone(el.parentNode);\r\n }\r\n // Return nothing\r\n return null;\r\n };\r\n // Method to remove empty paragraph or new lines for webparts w/in content zones\r\n var removeEmptyElements = function (elWebPartZone) {\r\n var elChildren = [];\r\n // See if this webpart is within a layout zone or rich html field\r\n if (elWebPartZone.className.indexOf(\"ms-rte-layoutszone-inner\") >= 0 ||\r\n elWebPartZone.className.indexOf(\"ms-rtestate-field\") >= 0) {\r\n // Set the children elements\r\n elChildren = elWebPartZone.children;\r\n }\r\n // Parse the children elements\r\n for (var i = 0; i < elChildren.length; i++) {\r\n var elChild = elWebPartZone.children[i];\r\n // See if the last element is a new line\r\n var elBreakLine = elChild.children[elChild.children.length - 1];\r\n if (elBreakLine && elBreakLine.nodeName == \"BR\") {\r\n // Remove the element\r\n elChild.removeChild(elBreakLine);\r\n }\r\n // See if this is an empty paragraph tag\r\n if (elChild.nodeName == \"P\") {\r\n var removeElement = false;\r\n var content = elChild.innerHTML.trim();\r\n // See if this is an empty element\r\n if (content.length == 0) {\r\n // Set the flag\r\n removeElement = true;\r\n }\r\n // Else, see if this is a line break\r\n else if (content.length == 1 && content.charCodeAt(0) == 8203) {\r\n // Set the flag\r\n removeElement = true;\r\n }\r\n // Remove the element\r\n removeElement ? elWebPartZone.removeChild(elChild) : null;\r\n }\r\n }\r\n };\r\n // Method to update the visibility of the webparts\r\n var updateWebParts = function (tab, ev) {\r\n var selectedTabId = 0;\r\n // See if the tab exists\r\n if (tab) {\r\n // Parse the webparts\r\n for (var i = 0; i < _webparts.length; i++) {\r\n // Get the webpart\r\n var wpTitle = _webparts[i].querySelector(\".ms-webpart-titleText\");\r\n if (wpTitle && wpTitle.innerText == tab.title) {\r\n // Update the selected tab id\r\n selectedTabId = i;\r\n break;\r\n }\r\n }\r\n }\r\n // Else, default the selected tab to the first visible webpart\r\n else {\r\n // Parse the webparts\r\n for (selectedTabId = 0; selectedTabId < _webparts.length; selectedTabId++) {\r\n // Break if this webpart has a title\r\n if (_webparts[selectedTabId].querySelector(\".ms-webpart-titleText\")) {\r\n break;\r\n }\r\n }\r\n }\r\n // Parse the webparts\r\n for (var i = 0; i < _webparts.length; i++) {\r\n var wp_1 = _webparts[i];\r\n // Determine the query selector\r\n var selector = wp_1.id ? \"#\" + wp_1.id : \".ms-rte-wpbox[wpid='\" + wp_1.getAttribute(\"wpid\") + \"']\";\r\n // Get the webpart\r\n var webpart = document.querySelector(selector);\r\n if (webpart) {\r\n // See if we are displaying this webpart\r\n if (i == selectedTabId) {\r\n // Display the webpart\r\n webpart.className = webpart.className.replace(\" is-hidden\", \"\");\r\n // See if this tab contains a calendar webpart\r\n if (webpart.querySelector(\".ms-acal-rootdiv\")) {\r\n var ev_1 = null;\r\n // Create the resize event\r\n try {\r\n ev_1 = new Event(\"resize\");\r\n }\r\n // This will fail for IE\r\n catch (e) {\r\n // Create the event\r\n ev_1 = document.createEvent(\"Event\");\r\n ev_1.initEvent(\"resize\", true, false);\r\n }\r\n finally {\r\n // Call the window resize event to fix the events\r\n ev_1 ? window.dispatchEvent(ev_1) : null;\r\n }\r\n }\r\n // Call the click if it exists\r\n props.onClick ? props.onClick(webpart) : null;\r\n }\r\n // Ensure the webpart is hidden\r\n else if (webpart.classList.contains(\"is-hidden\") == false) {\r\n // Hide the webpart\r\n webpart.classList.add(\"is-hidden\");\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Main\r\n */\r\n var _webparts = [];\r\n // Return the webpart\r\n var wp = (0, base_1.WebPart)({\r\n className: props.className,\r\n cfgElementId: props.cfgElementId,\r\n editForm: props.editForm,\r\n elementId: props.elementId,\r\n helpProps: props.helpProps,\r\n onPostRender: props.onPostRender,\r\n onRenderEdit: props.onRenderEdit,\r\n wpClassName: [\"wp-tabs-main\", props.wpClassName || \"\"].join(' ').trim(),\r\n onRenderDisplay: function (wpInfo) {\r\n // Set the webparts\r\n _webparts = getWebParts(wpInfo);\r\n // Parse the webparts\r\n var items = [];\r\n for (var i = 0; i < _webparts.length; i++) {\r\n // Ensure a title exists\r\n var wpTitle = _webparts[i].querySelector(\".ms-webpart-titleText\");\r\n if (wpTitle) {\r\n // Add the tab\r\n items.push({\r\n isActive: i == 0,\r\n title: wpTitle.innerText,\r\n onClick: updateWebParts\r\n });\r\n }\r\n }\r\n // Render the navigation\r\n _nav = gd_bs_1.Components.Nav({\r\n className: props.className,\r\n el: wpInfo.el,\r\n isPills: props.type == WPTabTypes.Pillars,\r\n isTabs: true,\r\n items: items\r\n });\r\n // Update the webparts\r\n updateWebParts();\r\n // See if a custom event exists\r\n props.onRenderDisplay ? props.onRenderDisplay(wpInfo) : null;\r\n }\r\n });\r\n // Add the custom methods\r\n wp.getNav = function () { return _nav; };\r\n wp.getTabs = function () { return _webparts; };\r\n // Return the webpart\r\n return wp;\r\n};\r\nexports.WPTabs = WPTabs;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js?");
|
|
2311
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPTabs = exports.WPTabTypes = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/index.js\");\r\n/**\r\n * Web Part Tab Types\r\n */\r\nvar WPTabTypes;\r\n(function (WPTabTypes) {\r\n WPTabTypes[WPTabTypes[\"Pillars\"] = 1] = \"Pillars\";\r\n WPTabTypes[WPTabTypes[\"Tabs\"] = 2] = \"Tabs\";\r\n})(WPTabTypes = exports.WPTabTypes || (exports.WPTabTypes = {}));\r\n/**\r\n * Web Part Tabs\r\n */\r\nvar WPTabs = function (props) {\r\n var _elWebPart = null;\r\n var _isContentZone = false;\r\n var _nav = null;\r\n // Method to get the webparts\r\n var getWebParts = function (wpInfo) {\r\n var wps = [];\r\n // Get the webpart element and zone\r\n var elWebPart = document.querySelector(\"div[webpartid='\" + wpInfo.cfg.WebPartId + \"']\");\r\n var elWebPartZone = elWebPart ? getWebPartZone(elWebPart) : null;\r\n if (elWebPart && elWebPartZone) {\r\n // Add a class name to the webpart zone\r\n elWebPartZone.className += \" wp-tabs\";\r\n // Remove the empty elements\r\n removeEmptyElements(elWebPartZone);\r\n // Parse the webparts in this zone\r\n var webparts = elWebPartZone.querySelectorAll(\".ms-webpartzone-cell[id^='MSOZoneCell_WebPart']\");\r\n for (var i = 0; i < webparts.length; i++) {\r\n var webpart = webparts[i];\r\n // See if it's this webpart\r\n if (webpart.querySelector(\"div[webpartid='\" + wpInfo.cfg.WebPartId + \"']\")) {\r\n // Save a reference\r\n _elWebPart = webpart;\r\n // Set the class\r\n _elWebPart.className += \" wp-tab\";\r\n // Skip this webpart\r\n continue;\r\n }\r\n // Skip hidden webparts\r\n var wpTitle = (webpart.querySelector(\".ms-webpart-titleText\") || {}).innerText || \"\";\r\n var isHidden = webpart.firstElementChild && webpart.firstElementChild.classList.contains(\"ms-hide\");\r\n isHidden = isHidden || /^\\(Hidden\\)/.test(wpTitle);\r\n if (isHidden) {\r\n continue;\r\n }\r\n // See if this is within a content zone\r\n if (_isContentZone) {\r\n // Get the parent webpart box\r\n while (webpart.parentNode) {\r\n // See if this is the webpart box element\r\n if (webpart.classList.contains(\"ms-rte-wpbox\")) {\r\n // Find the div containing the webpart id\r\n var wpElement = webpart.querySelector(\"div[webpartid*='-']\");\r\n if (wpElement) {\r\n // Set the webpart id attribute\r\n webpart.setAttribute(\"wpid\", wpElement.getAttribute(\"webpartid\"));\r\n }\r\n // Add this webpart and break from the loop\r\n wps.push(webpart);\r\n break;\r\n }\r\n // Check the parent element\r\n webpart = webpart.parentNode;\r\n }\r\n }\r\n else {\r\n // Add the webpart\r\n wps.push(webpart);\r\n }\r\n }\r\n }\r\n // Return the webparts\r\n return wps;\r\n };\r\n // Method to get the webpart zone\r\n var getWebPartZone = function (el) {\r\n // Ensure the element exists\r\n if (el && el.classList) {\r\n // See if this is the webpart zone element\r\n if (el.classList.contains(\"ms-webpart-zone\")) {\r\n // Return it\r\n return el;\r\n }\r\n // See if this is the inner page zone\r\n if (el.classList.contains(\"ms-rte-layoutszone-inner\") || el.classList.contains(\"ms-rtestate-field\")) {\r\n // Set the flag\r\n _isContentZone = true;\r\n // Return it\r\n return el;\r\n }\r\n // Check the parent element\r\n return getWebPartZone(el.parentNode);\r\n }\r\n // Return nothing\r\n return null;\r\n };\r\n // Method to remove empty paragraph or new lines for webparts w/in content zones\r\n var removeEmptyElements = function (elWebPartZone) {\r\n var elChildren = [];\r\n // See if this webpart is within a layout zone or rich html field\r\n if (elWebPartZone.className.indexOf(\"ms-rte-layoutszone-inner\") >= 0 ||\r\n elWebPartZone.className.indexOf(\"ms-rtestate-field\") >= 0) {\r\n // Set the children elements\r\n elChildren = elWebPartZone.children;\r\n }\r\n // Parse the children elements\r\n for (var i = 0; i < elChildren.length; i++) {\r\n var elChild = elWebPartZone.children[i];\r\n // See if the last element is a new line\r\n var elBreakLine = elChild.children[elChild.children.length - 1];\r\n if (elBreakLine && elBreakLine.nodeName == \"BR\") {\r\n // Remove the element\r\n elChild.removeChild(elBreakLine);\r\n }\r\n // See if this is an empty paragraph tag\r\n if (elChild.nodeName == \"P\") {\r\n var removeElement = false;\r\n var content = elChild.innerHTML.trim();\r\n // See if this is an empty element\r\n if (content.length == 0) {\r\n // Set the flag\r\n removeElement = true;\r\n }\r\n // Else, see if this is a line break\r\n else if (content.length == 1 && content.charCodeAt(0) == 8203) {\r\n // Set the flag\r\n removeElement = true;\r\n }\r\n // Remove the element\r\n removeElement ? elWebPartZone.removeChild(elChild) : null;\r\n }\r\n }\r\n };\r\n // Method to update the visibility of the webparts\r\n var updateWebParts = function (tab, ev) {\r\n var selectedTabId = 0;\r\n // See if the tab exists\r\n if (tab) {\r\n // Parse the webparts\r\n for (var i = 0; i < _webparts.length; i++) {\r\n // Get the webpart\r\n var wpTitle = _webparts[i].querySelector(\".ms-webpart-titleText\");\r\n if (wpTitle && wpTitle.innerText == tab.title) {\r\n // Update the selected tab id\r\n selectedTabId = i;\r\n break;\r\n }\r\n }\r\n }\r\n // Else, default the selected tab to the first visible webpart\r\n else {\r\n // Parse the webparts\r\n for (selectedTabId = 0; selectedTabId < _webparts.length; selectedTabId++) {\r\n // Break if this webpart has a title\r\n if (_webparts[selectedTabId].querySelector(\".ms-webpart-titleText\")) {\r\n break;\r\n }\r\n }\r\n }\r\n // Parse the webparts\r\n for (var i = 0; i < _webparts.length; i++) {\r\n var wp_1 = _webparts[i];\r\n // Determine the query selector\r\n var selector = wp_1.id ? \"#\" + wp_1.id : \".ms-rte-wpbox[wpid='\" + wp_1.getAttribute(\"wpid\") + \"']\";\r\n // Get the webpart\r\n var webpart = document.querySelector(selector);\r\n if (webpart) {\r\n // See if we are displaying this webpart\r\n if (i == selectedTabId) {\r\n // Display the webpart\r\n webpart.className = webpart.className.replace(\" is-hidden\", \"\");\r\n // See if this tab contains a calendar webpart\r\n if (webpart.querySelector(\".ms-acal-rootdiv\")) {\r\n var ev_1 = null;\r\n // Create the resize event\r\n try {\r\n ev_1 = new Event(\"resize\");\r\n }\r\n // This will fail for IE\r\n catch (e) {\r\n // Create the event\r\n ev_1 = document.createEvent(\"Event\");\r\n ev_1.initEvent(\"resize\", true, false);\r\n }\r\n finally {\r\n // Call the window resize event to fix the events\r\n ev_1 ? window.dispatchEvent(ev_1) : null;\r\n }\r\n }\r\n // Call the click if it exists\r\n props.onClick ? props.onClick(webpart) : null;\r\n }\r\n // Ensure the webpart is hidden\r\n else if (webpart.classList.contains(\"is-hidden\") == false) {\r\n // Hide the webpart\r\n webpart.classList.add(\"is-hidden\");\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Main\r\n */\r\n var _webparts = [];\r\n // Return the webpart\r\n var wp = (0, base_1.WebPart)({\r\n className: props.className,\r\n cfgElementId: props.cfgElementId,\r\n editForm: props.editForm,\r\n elementId: props.elementId,\r\n helpProps: props.helpProps,\r\n onPostRender: props.onPostRender,\r\n onRenderEdit: props.onRenderEdit,\r\n wpClassName: [\"wp-tabs-main\", props.wpClassName || \"\"].join(' ').trim(),\r\n onRenderDisplay: function (wpInfo) {\r\n // Set the webparts\r\n _webparts = getWebParts(wpInfo);\r\n // Parse the webparts\r\n var items = [];\r\n for (var i = 0; i < _webparts.length; i++) {\r\n // Ensure a title exists\r\n var wpTitle = _webparts[i].querySelector(\".ms-webpart-titleText\");\r\n if (wpTitle) {\r\n // Add the tab\r\n items.push({\r\n isActive: i == 0,\r\n title: wpTitle.innerText,\r\n onClick: updateWebParts\r\n });\r\n }\r\n }\r\n // Render the navigation\r\n _nav = gd_bs_1.Components.Nav({\r\n className: props.className,\r\n el: wpInfo.el,\r\n isPills: props.type == WPTabTypes.Pillars,\r\n isTabs: true,\r\n items: items\r\n });\r\n // Update the webparts\r\n updateWebParts();\r\n // See if a custom event exists\r\n props.onRenderDisplay ? props.onRenderDisplay(wpInfo) : null;\r\n }\r\n });\r\n // Add the custom methods\r\n wp.getNav = function () { return _nav; };\r\n wp.getTabs = function () { return _webparts; };\r\n // Return the webpart\r\n return wp;\r\n};\r\nexports.WPTabs = WPTabs;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js?");
|
|
2312
2312
|
|
|
2313
2313
|
/***/ }),
|
|
2314
2314
|
|
|
2315
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2315
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/index.js":
|
|
2316
2316
|
/*!**********************************************************************************************************!*\
|
|
2317
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2317
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/index.js ***!
|
|
2318
2318
|
\**********************************************************************************************************/
|
|
2319
2319
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2320
2320
|
|
|
2321
2321
|
"use strict";
|
|
2322
|
-
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2322
|
+
eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/index.js?");
|
|
2323
2323
|
|
|
2324
2324
|
/***/ }),
|
|
2325
2325
|
|
|
2326
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2326
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wp.js":
|
|
2327
2327
|
/*!*******************************************************************************************************!*\
|
|
2328
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2328
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wp.js ***!
|
|
2329
2329
|
\*******************************************************************************************************/
|
|
2330
2330
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2331
2331
|
|
|
2332
2332
|
"use strict";
|
|
2333
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPTaxonomy = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2333
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPTaxonomy = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/base/wp.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js\");\r\n/**\r\n * Taxonomy WebPart\r\n */\r\nvar WPTaxonomy = function (props) {\r\n // Create an instance of the webpart\r\n (0, wp_1.WebPart)({\r\n cfgElementId: props.cfgElementId,\r\n className: props.className,\r\n editForm: (0, wpCfg_1.WPTaxonomyEditForm)(props.editForm || {}),\r\n elementId: props.elementId,\r\n helpProps: props.helpProps,\r\n onPostRender: props.onPostRender,\r\n onRenderEdit: props.onRenderEdit,\r\n wpClassName: props.wpClassName,\r\n onRenderDisplay: function (wpInfo) {\r\n // See if the render term sets event exists\r\n if (props.onRenderTermSets && wpInfo.cfg.TermGroupName) {\r\n // Load the term group information\r\n gd_sprest_1.Helper.Taxonomy.getTermSets(wpInfo.cfg.TermGroupName).then(function (termSets) {\r\n // Call the render event\r\n props.onRenderTermSets(wpInfo, termSets);\r\n });\r\n }\r\n // See if the term group and term set names exist\r\n if (wpInfo.cfg.TermGroupName && wpInfo.cfg.TermSetName) {\r\n // See if the render term set events exists\r\n if (props.onRenderTermSet || props.onRenderTermSetTerms) {\r\n // Load the term set information\r\n gd_sprest_1.Helper.Taxonomy.getTermSetByGroupName(wpInfo.cfg.TermSetName, wpInfo.cfg.TermGroupName).then(function (termSet) {\r\n // Call the term set render event\r\n props.onRenderTermSet ? props.onRenderTermSet(wpInfo, termSet) : null;\r\n // See if we are rendering term set terms\r\n if (props.onRenderTermSetTerms) {\r\n // See if a term set id exists\r\n if (wpInfo.cfg.TermSetTermId) {\r\n // Load the term set terms\r\n var term = gd_sprest_1.Helper.Taxonomy.findById(termSet, wpInfo.cfg.TermSetTermId);\r\n // Call the term set terms render event\r\n props.onRenderTermSetTerms(wpInfo, term ? gd_sprest_1.Helper.Taxonomy.toArray(term) : []);\r\n }\r\n else {\r\n // Call the term set terms render event\r\n props.onRenderTermSetTerms(wpInfo, gd_sprest_1.Helper.Taxonomy.toArray(termSet));\r\n }\r\n }\r\n });\r\n }\r\n }\r\n }\r\n });\r\n};\r\nexports.WPTaxonomy = WPTaxonomy;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wp.js?");
|
|
2334
2334
|
|
|
2335
2335
|
/***/ }),
|
|
2336
2336
|
|
|
2337
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2337
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js":
|
|
2338
2338
|
/*!**********************************************************************************************************!*\
|
|
2339
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.
|
|
2339
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js ***!
|
|
2340
2340
|
\**********************************************************************************************************/
|
|
2341
2341
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2342
2342
|
|
|
2343
2343
|
"use strict";
|
|
2344
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPTaxonomyEditForm = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * Taxonomy WebPart Edit Form\r\n */\r\nvar WPTaxonomyEditForm = function (props) {\r\n if (props === void 0) { props = {}; }\r\n var _ddlTermSet;\r\n var _ddlTerm;\r\n var _termGroupItems = [];\r\n var _termSetItems = [];\r\n var _termSetTermsItems = [];\r\n var _wpInfo = null;\r\n // Method to generate the form controls\r\n var generateFormControls = function () {\r\n var formControls = [];\r\n // Add the term groups dropdown\r\n formControls.push({\r\n label: \"Select the Term Group:\",\r\n items: _termGroupItems,\r\n name: \"TermGroupId\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n value: _wpInfo.cfg.TermGroupId,\r\n onChange: function (option) {\r\n // Clear the dropdowns\r\n _termSetItems = [];\r\n _termSetTermsItems = [];\r\n _ddlTermSet.setItems([]);\r\n _ddlTerm ? _ddlTerm.setItems([]) : null;\r\n // Update the configuration\r\n _wpInfo.cfg.TermGroupId = option ? option.value : \"\";\r\n _wpInfo.cfg.TermGroupName = option ? option.text : \"\";\r\n _wpInfo.cfg.TermSetId = \"\";\r\n _wpInfo.cfg.TermSetName = \"\";\r\n _wpInfo.cfg.TermSetTermId = \"\";\r\n _wpInfo.cfg.TermSetTermName = \"\";\r\n // Call the change event\r\n props.onTermGroupChanged ? props.onTermGroupChanged(_wpInfo, { id: _wpInfo.cfg.TermGroupId, name: _wpInfo.cfg.TermGroupName }) : null;\r\n // Load the term sets\r\n loadTermSets().then(function () {\r\n // Render the child dropdowns\r\n _ddlTermSet.setItems(_termSetItems);\r\n });\r\n }\r\n });\r\n // Add the term sets dropdown\r\n formControls.push({\r\n label: \"Select a Term Set:\",\r\n items: _termSetItems,\r\n name: \"TermSetId\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n value: _wpInfo.cfg.TermSetId,\r\n onControlRendered: function (control) {\r\n // Save a reference to the dropdown\r\n _ddlTermSet = control.dropdown;\r\n },\r\n onChange: function (option) {\r\n // Clear the dropdown\r\n _termSetTermsItems = [];\r\n _ddlTerm ? _ddlTerm.setItems([]) : null;\r\n // Update the configuration\r\n _wpInfo.cfg.TermSetId = option ? option.value : \"\";\r\n _wpInfo.cfg.TermSetName = option ? option.text : \"\";\r\n _wpInfo.cfg.TermSetTermId = \"\";\r\n _wpInfo.cfg.TermSetTermName = \"\";\r\n // Call the change event\r\n props.onTermSetChanged ? props.onTermSetChanged(_wpInfo, { id: _wpInfo.cfg.TermSetId, name: _wpInfo.cfg.TermSetName }) : null;\r\n // See if we are loading the terms\r\n if (props.showTermSetTerms) {\r\n // Load the term set terms\r\n loadTermSetTerms().then(function () {\r\n // Render the child dropdowns\r\n _ddlTerm.setItems(_termSetTermsItems);\r\n });\r\n }\r\n }\r\n });\r\n // Ensure we are rendering the term set terms\r\n if (props.showTermSetTerms) {\r\n // Add the term set terms dropdown\r\n formControls.push({\r\n label: \"Select a Term Set Term:\",\r\n items: _termSetTermsItems,\r\n name: \"TermSetTermId\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n value: _wpInfo.cfg.TermSetTermId,\r\n onControlRendered: function (control) {\r\n // Save a reference to the dropdown\r\n _ddlTerm = control.dropdown;\r\n },\r\n onChange: function (option) {\r\n // Update the configuration\r\n _wpInfo.cfg.TermSetTermId = option ? option.value : \"\";\r\n _wpInfo.cfg.TermSetTermName = option ? option.text : \"\";\r\n // Call the change event\r\n props.onTermSetTermChanged ? props.onTermSetTermChanged(_wpInfo, { id: _wpInfo.cfg.TermSetTermId, name: _wpInfo.cfg.TermSetTermName }) : null;\r\n }\r\n });\r\n }\r\n // Return the form controls\r\n return formControls;\r\n };\r\n // Method to load the term groups\r\n var loadTermGroups = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the term groups\r\n gd_sprest_1.Helper.Taxonomy.getTermGroups().then(function (groups) {\r\n _termGroupItems = [{\r\n text: \"\",\r\n value: \"\"\r\n }];\r\n // Parse the groups\r\n for (var i = 0; i < groups.length; i++) {\r\n // Add the item\r\n _termGroupItems.push({\r\n text: groups[i].name,\r\n value: groups[i].id\r\n });\r\n }\r\n // Load the term sets\r\n loadTermSets().then(function () {\r\n // Execute the term groups loaded event\r\n _termGroupItems = props.onTermGroupsLoaded ? props.onTermGroupsLoaded(_wpInfo, _termGroupItems) : _termGroupItems;\r\n // Resolve the promise\r\n resolve(generateFormControls());\r\n });\r\n });\r\n });\r\n };\r\n // Method to load the term sets\r\n var loadTermSets = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if a term group exists\r\n if (_wpInfo.cfg.TermGroupName) {\r\n // Load the term sets\r\n gd_sprest_1.Helper.Taxonomy.getTermSets(_wpInfo.cfg.TermGroupName).then(function (termSets) {\r\n _termSetItems = [{\r\n text: \"\",\r\n value: \"\"\r\n }];\r\n // Parse the term sets\r\n for (var i = 0; i < termSets.length; i++) {\r\n // Add the item\r\n _termSetItems.push({\r\n text: termSets[i].name,\r\n value: termSets[i].id\r\n });\r\n }\r\n // Load the term set terms and resolve the promise\r\n loadTermSetTerms().then(function () {\r\n // Execute the term sets loaded event\r\n _termSetItems = props.onTermSetsLoaded ? props.onTermSetsLoaded(_wpInfo, _termSetItems) : _termSetItems;\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Method to load the term set terms\r\n var loadTermSetTerms = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure we are displaying term set terms and a term set is selected\r\n if (props.showTermSetTerms && _wpInfo.cfg.TermSetId) {\r\n // Load the term set terms\r\n gd_sprest_1.Helper.Taxonomy.getTermSetByGroupName(_wpInfo.cfg.TermSetName, _wpInfo.cfg.TermGroupName).then(function (termSet) {\r\n _termSetTermsItems = [{\r\n text: \"\",\r\n value: \"\"\r\n }];\r\n // Get the term set terms\r\n var terms = gd_sprest_1.Helper.Taxonomy.toArray(termSet).sort(function (a, b) {\r\n if (a.name < b.name) {\r\n return -1;\r\n }\r\n if (a.name > b.name) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n // Parse the term set terms\r\n for (var i = 0; i < terms.length; i++) {\r\n // Add the item\r\n _termSetTermsItems.push({\r\n text: terms[i].name,\r\n value: terms[i].id\r\n });\r\n }\r\n // Execute the term sets loaded event\r\n _termSetTermsItems = props.onTermSetTermsLoaded ? props.onTermSetTermsLoaded(_wpInfo, _termSetTermsItems) : _termSetTermsItems;\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Return the edit panel\r\n return {\r\n actions: props.actions,\r\n onRenderForm: function (wpInfo) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Save the webpart information\r\n _wpInfo = wpInfo;\r\n // Load the term groups\r\n loadTermGroups().then(function (formControls) {\r\n // Call the render form event\r\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo) : null;\r\n if (returnVal) {\r\n // See if this is a promise\r\n if (returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (controls) {\r\n if (controls === void 0) { controls = []; }\r\n // Add the form controls\r\n formControls = formControls.concat(controls);\r\n // Resolve the promise\r\n resolve(formControls);\r\n });\r\n }\r\n // Else, see if the form controls exist\r\n else if (returnVal.length > 0) {\r\n // Add the form controls\r\n formControls = formControls.concat(returnVal);\r\n // Resolve the promise\r\n resolve(formControls);\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(formControls);\r\n }\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(formControls);\r\n }\r\n });\r\n });\r\n },\r\n onSave: function (cfg, form) {\r\n // Update the configuration\r\n cfg.TermGroupId = _wpInfo.cfg.TermGroupId;\r\n cfg.TermGroupName = _wpInfo.cfg.TermGroupName;\r\n cfg.TermSetId = _wpInfo.cfg.TermSetId;\r\n cfg.TermSetName = _wpInfo.cfg.TermSetName;\r\n cfg.TermSetTermId = _wpInfo.cfg.TermSetTermId;\r\n cfg.TermSetTermName = _wpInfo.cfg.TermSetTermName;\r\n // Return the configuration\r\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\r\n }\r\n };\r\n};\r\nexports.WPTaxonomyEditForm = WPTaxonomyEditForm;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.4/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js?");
|
|
2344
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WPTaxonomyEditForm = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@5.3.9/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@6.8.6/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * Taxonomy WebPart Edit Form\r\n */\r\nvar WPTaxonomyEditForm = function (props) {\r\n if (props === void 0) { props = {}; }\r\n var _ddlTermSet;\r\n var _ddlTerm;\r\n var _termGroupItems = [];\r\n var _termSetItems = [];\r\n var _termSetTermsItems = [];\r\n var _wpInfo = null;\r\n // Method to generate the form controls\r\n var generateFormControls = function () {\r\n var formControls = [];\r\n // Add the term groups dropdown\r\n formControls.push({\r\n label: \"Select the Term Group:\",\r\n items: _termGroupItems,\r\n name: \"TermGroupId\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n value: _wpInfo.cfg.TermGroupId,\r\n onChange: function (option) {\r\n // Clear the dropdowns\r\n _termSetItems = [];\r\n _termSetTermsItems = [];\r\n _ddlTermSet.setItems([]);\r\n _ddlTerm ? _ddlTerm.setItems([]) : null;\r\n // Update the configuration\r\n _wpInfo.cfg.TermGroupId = option ? option.value : \"\";\r\n _wpInfo.cfg.TermGroupName = option ? option.text : \"\";\r\n _wpInfo.cfg.TermSetId = \"\";\r\n _wpInfo.cfg.TermSetName = \"\";\r\n _wpInfo.cfg.TermSetTermId = \"\";\r\n _wpInfo.cfg.TermSetTermName = \"\";\r\n // Call the change event\r\n props.onTermGroupChanged ? props.onTermGroupChanged(_wpInfo, { id: _wpInfo.cfg.TermGroupId, name: _wpInfo.cfg.TermGroupName }) : null;\r\n // Load the term sets\r\n loadTermSets().then(function () {\r\n // Render the child dropdowns\r\n _ddlTermSet.setItems(_termSetItems);\r\n });\r\n }\r\n });\r\n // Add the term sets dropdown\r\n formControls.push({\r\n label: \"Select a Term Set:\",\r\n items: _termSetItems,\r\n name: \"TermSetId\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n value: _wpInfo.cfg.TermSetId,\r\n onControlRendered: function (control) {\r\n // Save a reference to the dropdown\r\n _ddlTermSet = control.dropdown;\r\n },\r\n onChange: function (option) {\r\n // Clear the dropdown\r\n _termSetTermsItems = [];\r\n _ddlTerm ? _ddlTerm.setItems([]) : null;\r\n // Update the configuration\r\n _wpInfo.cfg.TermSetId = option ? option.value : \"\";\r\n _wpInfo.cfg.TermSetName = option ? option.text : \"\";\r\n _wpInfo.cfg.TermSetTermId = \"\";\r\n _wpInfo.cfg.TermSetTermName = \"\";\r\n // Call the change event\r\n props.onTermSetChanged ? props.onTermSetChanged(_wpInfo, { id: _wpInfo.cfg.TermSetId, name: _wpInfo.cfg.TermSetName }) : null;\r\n // See if we are loading the terms\r\n if (props.showTermSetTerms) {\r\n // Load the term set terms\r\n loadTermSetTerms().then(function () {\r\n // Render the child dropdowns\r\n _ddlTerm.setItems(_termSetTermsItems);\r\n });\r\n }\r\n }\r\n });\r\n // Ensure we are rendering the term set terms\r\n if (props.showTermSetTerms) {\r\n // Add the term set terms dropdown\r\n formControls.push({\r\n label: \"Select a Term Set Term:\",\r\n items: _termSetTermsItems,\r\n name: \"TermSetTermId\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n value: _wpInfo.cfg.TermSetTermId,\r\n onControlRendered: function (control) {\r\n // Save a reference to the dropdown\r\n _ddlTerm = control.dropdown;\r\n },\r\n onChange: function (option) {\r\n // Update the configuration\r\n _wpInfo.cfg.TermSetTermId = option ? option.value : \"\";\r\n _wpInfo.cfg.TermSetTermName = option ? option.text : \"\";\r\n // Call the change event\r\n props.onTermSetTermChanged ? props.onTermSetTermChanged(_wpInfo, { id: _wpInfo.cfg.TermSetTermId, name: _wpInfo.cfg.TermSetTermName }) : null;\r\n }\r\n });\r\n }\r\n // Return the form controls\r\n return formControls;\r\n };\r\n // Method to load the term groups\r\n var loadTermGroups = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the term groups\r\n gd_sprest_1.Helper.Taxonomy.getTermGroups().then(function (groups) {\r\n _termGroupItems = [{\r\n text: \"\",\r\n value: \"\"\r\n }];\r\n // Parse the groups\r\n for (var i = 0; i < groups.length; i++) {\r\n // Add the item\r\n _termGroupItems.push({\r\n text: groups[i].name,\r\n value: groups[i].id\r\n });\r\n }\r\n // Load the term sets\r\n loadTermSets().then(function () {\r\n // Execute the term groups loaded event\r\n _termGroupItems = props.onTermGroupsLoaded ? props.onTermGroupsLoaded(_wpInfo, _termGroupItems) : _termGroupItems;\r\n // Resolve the promise\r\n resolve(generateFormControls());\r\n });\r\n });\r\n });\r\n };\r\n // Method to load the term sets\r\n var loadTermSets = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if a term group exists\r\n if (_wpInfo.cfg.TermGroupName) {\r\n // Load the term sets\r\n gd_sprest_1.Helper.Taxonomy.getTermSets(_wpInfo.cfg.TermGroupName).then(function (termSets) {\r\n _termSetItems = [{\r\n text: \"\",\r\n value: \"\"\r\n }];\r\n // Parse the term sets\r\n for (var i = 0; i < termSets.length; i++) {\r\n // Add the item\r\n _termSetItems.push({\r\n text: termSets[i].name,\r\n value: termSets[i].id\r\n });\r\n }\r\n // Load the term set terms and resolve the promise\r\n loadTermSetTerms().then(function () {\r\n // Execute the term sets loaded event\r\n _termSetItems = props.onTermSetsLoaded ? props.onTermSetsLoaded(_wpInfo, _termSetItems) : _termSetItems;\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Method to load the term set terms\r\n var loadTermSetTerms = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure we are displaying term set terms and a term set is selected\r\n if (props.showTermSetTerms && _wpInfo.cfg.TermSetId) {\r\n // Load the term set terms\r\n gd_sprest_1.Helper.Taxonomy.getTermSetByGroupName(_wpInfo.cfg.TermSetName, _wpInfo.cfg.TermGroupName).then(function (termSet) {\r\n _termSetTermsItems = [{\r\n text: \"\",\r\n value: \"\"\r\n }];\r\n // Get the term set terms\r\n var terms = gd_sprest_1.Helper.Taxonomy.toArray(termSet).sort(function (a, b) {\r\n if (a.name < b.name) {\r\n return -1;\r\n }\r\n if (a.name > b.name) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n // Parse the term set terms\r\n for (var i = 0; i < terms.length; i++) {\r\n // Add the item\r\n _termSetTermsItems.push({\r\n text: terms[i].name,\r\n value: terms[i].id\r\n });\r\n }\r\n // Execute the term sets loaded event\r\n _termSetTermsItems = props.onTermSetTermsLoaded ? props.onTermSetTermsLoaded(_wpInfo, _termSetTermsItems) : _termSetTermsItems;\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Return the edit panel\r\n return {\r\n actions: props.actions,\r\n onRenderForm: function (wpInfo) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Save the webpart information\r\n _wpInfo = wpInfo;\r\n // Load the term groups\r\n loadTermGroups().then(function (formControls) {\r\n // Call the render form event\r\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo) : null;\r\n if (returnVal) {\r\n // See if this is a promise\r\n if (returnVal.then) {\r\n // Wait for the promise to complete\r\n returnVal.then(function (controls) {\r\n if (controls === void 0) { controls = []; }\r\n // Add the form controls\r\n formControls = formControls.concat(controls);\r\n // Resolve the promise\r\n resolve(formControls);\r\n });\r\n }\r\n // Else, see if the form controls exist\r\n else if (returnVal.length > 0) {\r\n // Add the form controls\r\n formControls = formControls.concat(returnVal);\r\n // Resolve the promise\r\n resolve(formControls);\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(formControls);\r\n }\r\n }\r\n // Else, resolve the promise\r\n else {\r\n resolve(formControls);\r\n }\r\n });\r\n });\r\n },\r\n onSave: function (cfg, form) {\r\n // Update the configuration\r\n cfg.TermGroupId = _wpInfo.cfg.TermGroupId;\r\n cfg.TermGroupName = _wpInfo.cfg.TermGroupName;\r\n cfg.TermSetId = _wpInfo.cfg.TermSetId;\r\n cfg.TermSetName = _wpInfo.cfg.TermSetName;\r\n cfg.TermSetTermId = _wpInfo.cfg.TermSetTermId;\r\n cfg.TermSetTermName = _wpInfo.cfg.TermSetTermName;\r\n // Return the configuration\r\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\r\n }\r\n };\r\n};\r\nexports.WPTaxonomyEditForm = WPTaxonomyEditForm;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@9.2.5/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js?");
|
|
2345
2345
|
|
|
2346
2346
|
/***/ }),
|
|
2347
2347
|
|