dattatable 2.9.31 → 2.9.32
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/list.d.ts +3 -0
- package/build/common/list.js +76 -24
- package/build/common/listSecurity.d.ts +2 -0
- package/build/common/listSecurity.js +41 -15
- package/dist/dattatable.js +199 -199
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AuditLog.html +2 -2
- package/docs/classes/CanvasForm.html +2 -2
- package/docs/classes/Comments.html +2 -2
- package/docs/classes/Dashboard.html +4 -4
- package/docs/classes/DataTable.html +3 -3
- package/docs/classes/Documents.html +6 -6
- package/docs/classes/FilterSlideout.html +2 -2
- package/docs/classes/Footer.html +2 -2
- package/docs/classes/Header.html +2 -2
- package/docs/classes/InstallationRequired.html +2 -2
- package/docs/classes/ItemForm.html +4 -4
- package/docs/classes/List.html +7 -4
- package/docs/classes/ListSecurity.html +4 -2
- package/docs/classes/LoadingDialog.html +2 -2
- package/docs/classes/Modal.html +2 -2
- package/docs/classes/Navigation.html +3 -3
- package/docs/classes/Timeout.html +2 -2
- package/docs/enums/ActionButtonTypes.html +2 -2
- package/docs/functions/formatBytes.html +1 -1
- package/docs/functions/formatDateValue.html +1 -1
- package/docs/functions/formatTimeValue.html +1 -1
- package/docs/functions/getFileExt.html +1 -1
- package/docs/functions/waitForTheme.html +1 -1
- package/docs/interfaces/IAuditLogItem.html +2 -2
- package/docs/interfaces/IAuditLogItemCreation.html +2 -2
- package/docs/interfaces/IAuditLogProps.html +2 -2
- package/docs/interfaces/IAuditLogViewProps.html +2 -2
- package/docs/interfaces/ICommentsItem.html +2 -2
- package/docs/interfaces/IDashboardProps.html +2 -2
- package/docs/interfaces/IDataTable.html +2 -2
- package/docs/interfaces/IDataTableProps.html +2 -2
- package/docs/interfaces/IDocumentsProps.html +2 -2
- package/docs/interfaces/IFilterItem.html +2 -2
- package/docs/interfaces/IFilterProps.html +2 -2
- package/docs/interfaces/IFooterProps.html +2 -2
- package/docs/interfaces/IHeaderProps.html +2 -2
- package/docs/interfaces/IInstallProps.html +2 -2
- package/docs/interfaces/IItemFormCreateProps.html +2 -2
- package/docs/interfaces/IItemFormEditProps.html +2 -2
- package/docs/interfaces/IItemFormTab.html +2 -2
- package/docs/interfaces/IItemFormTabInfo.html +2 -2
- package/docs/interfaces/IItemFormViewProps.html +2 -2
- package/docs/interfaces/IListProps.html +2 -2
- package/docs/interfaces/IListSecurity.html +2 -2
- package/docs/interfaces/IListSecurityItem.html +2 -2
- package/docs/interfaces/IShowDialogProps.html +2 -2
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +4 -4
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.Configuration = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
19
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Configuration = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\n// Configuration\r\nexports.Configuration = gd_sprest_bs_1.Helper.SPConfig({\r\n ListCfg: [{\r\n ListInformation: {\r\n BaseTemplate: gd_sprest_bs_1.SPTypes.ListTemplateType.GenericList,\r\n Title: \"Audit Log\",\r\n Hidden: true,\r\n NoCrawl: true\r\n },\r\n TitleFieldIndexed: true,\r\n ContentTypes: [{\r\n Name: \"Item\",\r\n FieldRefs: [\r\n \"Title\",\r\n ]\r\n }],\r\n CustomFields: [\r\n {\r\n name: \"ParentId\",\r\n title: \"Parent Id\",\r\n description: \"The parent identifier linked to this item.\",\r\n type: gd_sprest_bs_1.Helper.SPCfgFieldType.Text,\r\n indexed: true\r\n },\r\n {\r\n name: \"ParentListName\",\r\n title: \"Parent List Name\",\r\n description: \"The list name linked to this item.\",\r\n type: gd_sprest_bs_1.Helper.SPCfgFieldType.Text,\r\n indexed: true\r\n },\r\n {\r\n name: \"LogComment\",\r\n title: \"LogComment\",\r\n description: \"The comment to write to the audit log.\",\r\n type: gd_sprest_bs_1.Helper.SPCfgFieldType.Note,\r\n noteType: gd_sprest_bs_1.SPTypes.FieldNoteType.TextOnly\r\n },\r\n {\r\n name: \"LogData\",\r\n title: \"Log Data\",\r\n description: \"The data to write to the audit log.\",\r\n type: gd_sprest_bs_1.Helper.SPCfgFieldType.Note,\r\n noteType: gd_sprest_bs_1.SPTypes.FieldNoteType.TextOnly\r\n },\r\n {\r\n name: \"LogUser\",\r\n title: \"Log User\",\r\n description: \"The user who is associated with this log entry.\",\r\n type: gd_sprest_bs_1.Helper.SPCfgFieldType.User\r\n }\r\n ]\r\n }]\r\n});\r\n\n\n//# sourceURL=webpack://dattatable/./build/auditLog/cfg.js?");
|
|
20
20
|
|
|
21
21
|
/***/ }),
|
|
22
22
|
|
|
@@ -27,7 +27,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
27
27
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
28
28
|
|
|
29
29
|
"use strict";
|
|
30
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AuditLog = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
30
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AuditLog = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/.pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.min.js\");\r\nvar modal_1 = __webpack_require__(/*! ../common/modal */ \"./build/common/modal.js\");\r\nvar list_1 = __webpack_require__(/*! ../common/list */ \"./build/common/list.js\");\r\nvar loadingDialog_1 = __webpack_require__(/*! ../common/loadingDialog */ \"./build/common/loadingDialog.js\");\r\nvar table_1 = __webpack_require__(/*! ../dashboard/table */ \"./build/dashboard/table.js\");\r\nvar cfg_1 = __webpack_require__(/*! ./cfg */ \"./build/auditLog/cfg.js\");\r\n/**\r\n * Audit Log\r\n */\r\nvar AuditLog = /** @class */ (function () {\r\n // Constructor\r\n function AuditLog(props) {\r\n // Configuration\r\n this._cfg = null;\r\n // List\r\n this._list = null;\r\n // Set the configuration\r\n this._cfg = cfg_1.Configuration;\r\n // Update the list name\r\n var listName = props.listName ? props.listName : this._cfg._configuration.ListCfg[0].ListInformation.Title;\r\n props.listName ? this._cfg._configuration.ListCfg[0].ListInformation.Title = listName : null;\r\n // Create the list component\r\n this._list = new list_1.List({\r\n listName: listName,\r\n webUrl: props.webUrl,\r\n onInitError: props.onInitError,\r\n onInitialized: props.onInitialized,\r\n itemQuery: {\r\n Filter: \"Id eq 0\"\r\n }\r\n });\r\n }\r\n Object.defineProperty(AuditLog.prototype, \"Configuration\", {\r\n get: function () { return this._cfg; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AuditLog.prototype, \"AuditListName\", {\r\n get: function () {\r\n // Return the list name\r\n return this.Configuration._configuration.ListCfg[0].ListInformation.Title;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(AuditLog.prototype, \"List\", {\r\n get: function () { return this._list; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Method to view the audit log information for an item\r\n AuditLog.prototype.displayModal = function (items, viewProps) {\r\n // Clear the modal\r\n modal_1.Modal.clear();\r\n // Set the size\r\n modal_1.Modal.setType(gd_sprest_bs_1.Components.ModalTypes.Large);\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Audit History\");\r\n // Set the properties\r\n var dtProps = {\r\n el: modal_1.Modal.BodyElement,\r\n rows: items,\r\n dtProps: {\r\n dom: 'rt<\"row\"<\"col-sm-4\"l><\"col-sm-4\"i><\"col-sm-4\"p>>',\r\n columnDefs: [\r\n {\r\n \"targets\": [3],\r\n \"orderable\": false,\r\n \"searchable\": false\r\n }\r\n ],\r\n createdRow: function (row, data, index) {\r\n jQuery('td', row).addClass('align-middle');\r\n },\r\n drawCallback: function (settings) {\r\n var api = new jQuery.fn.dataTable.Api(settings);\r\n jQuery(api.context[0].nTable).removeClass('no-footer');\r\n jQuery(api.context[0].nTable).addClass('tbl-footer');\r\n jQuery(api.context[0].nTable).addClass('table-striped');\r\n jQuery(api.context[0].nTableWrapper).find('.dataTables_info').addClass('text-center');\r\n jQuery(api.context[0].nTableWrapper).find('.dataTables_length').addClass('pt-2');\r\n jQuery(api.context[0].nTableWrapper).find('.dataTables_paginate').addClass('pt-03');\r\n },\r\n headerCallback: function (thead, data, start, end, display) {\r\n jQuery('th', thead).addClass('align-middle');\r\n },\r\n // Set the empty text\r\n language: {\r\n emptyTable: \"No logs exist for this item.\"\r\n },\r\n // Order by the 1st column by default; ascending\r\n order: [[0, \"desc\"]]\r\n },\r\n columns: [\r\n {\r\n name: \"Created\",\r\n title: \"Created\",\r\n onRenderCell: viewProps.onTableCellRendering\r\n },\r\n {\r\n name: \"Title\",\r\n title: \"Title\",\r\n onRenderCell: viewProps.onTableCellRendering\r\n },\r\n {\r\n name: \"\",\r\n title: \"User\",\r\n onRenderCell: function (el, col, item) {\r\n // Render the user information\r\n item.LogUser ? el.innerHTML = item.LogUser.Title : null;\r\n // Call the event\r\n viewProps.onTableCellRendering ? viewProps.onTableCellRendering(el, col, item) : null;\r\n }\r\n },\r\n {\r\n name: \"LogComment\",\r\n title: \"Comment\",\r\n onRenderCell: viewProps.onTableCellRendering\r\n }\r\n ]\r\n };\r\n // Call the event\r\n dtProps = viewProps.onTableRendering ? viewProps.onTableRendering(dtProps) : dtProps;\r\n // Render the table\r\n new table_1.DataTable(dtProps);\r\n // Show the modal\r\n modal_1.Modal.show();\r\n };\r\n // Gets data for an associated item, matching the ParentId value\r\n AuditLog.prototype.getItems = function (id, listName, onQuery) {\r\n // Set the odata query\r\n var odata = {\r\n Expand: [\"LogUser\"],\r\n Filter: \"ParentListName eq '\".concat(listName, \"' and ParentId eq '\").concat(id, \"'\"),\r\n OrderBy: [\"Created desc\"],\r\n Select: [\"*\", \"LogUser/EMail\", \"LogUser/Id\", \"LogUser/Title\"]\r\n };\r\n // Call the event\r\n odata = onQuery ? onQuery(odata) : odata;\r\n // Get the list data\r\n return this.List.refresh(odata);\r\n };\r\n // Installs the list\r\n AuditLog.prototype.install = function () {\r\n // Installs the list\r\n return this.Configuration.install();\r\n };\r\n // Logs an item to the audit log\r\n AuditLog.prototype.logItem = function (values) {\r\n // Create the item\r\n return this.List.createItem(values);\r\n };\r\n // Removes the audit log list\r\n AuditLog.prototype.uninstall = function () {\r\n // Remove the audit log list\r\n return this.Configuration.uninstall();\r\n };\r\n // Method to view the audit log by specified id\r\n AuditLog.prototype.viewLog = function (props) {\r\n var _this = this;\r\n // Display a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Loading Audit History\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This will close after the information is loaded...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Load the information\r\n this.getItems(props.id, props.listName, props.onQuery).then(function (items) {\r\n // Display the modal\r\n _this.displayModal(items, props);\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n });\r\n };\r\n return AuditLog;\r\n}());\r\nexports.AuditLog = AuditLog;\r\n\n\n//# sourceURL=webpack://dattatable/./build/auditLog/index.js?");
|
|
31
31
|
|
|
32
32
|
/***/ }),
|
|
33
33
|
|
|
@@ -38,7 +38,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
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.CanvasForm = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
41
|
+
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@10.10.90/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 // Set the default properties\r\n this.setAutoClose(true);\r\n this.setSize(0);\r\n this.setType(gd_sprest_bs_1.Components.OffcanvasTypes.End);\r\n // Ensure the header and body are visible\r\n this._elBody.classList.remove(\"d-none\");\r\n this._elHeader.classList.remove(\"d-none\");\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 size\r\n CanvasForm.setSize = function (size) { this._canvas.setSize(size); };\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?");
|
|
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.Comments = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/index.js\");\r\nvar moment = __webpack_require__(/*! moment */ \"./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js\");\r\nvar canvas_1 = __webpack_require__(/*! ./canvas */ \"./build/common/canvas.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// List Name\r\nvar LIST_NAME = \"Comments\";\r\n/**\r\n * Comments\r\n */\r\nvar Comments = /** @class */ (function () {\r\n function Comments() {\r\n }\r\n Object.defineProperty(Comments, \"CommentsListId\", {\r\n get: function () { return this._commentsListId; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Adds a comment to an item\r\n Comments.add = function (item, comment) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure a comment exists\r\n if (comment) {\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Adding Comment\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This dialog will close after the comment is added.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Add the item\r\n (0, gd_sprest_bs_1.Web)(_this._webUrl).Lists(LIST_NAME).Items().add({\r\n Comment: comment,\r\n Title: _this._listId + \"|\" + item.Id\r\n }).execute(function () {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Configuration\r\n Comments.configuration = function (cfg) {\r\n var commentsCfg = gd_sprest_bs_1.Helper.SPConfig({\r\n ListCfg: [\r\n {\r\n ListInformation: {\r\n Title: LIST_NAME,\r\n BaseTemplate: gd_sprest_bs_1.SPTypes.ListTemplateType.GenericList,\r\n Hidden: true,\r\n NoCrawl: true\r\n },\r\n TitleFieldDisplayName: \"Comment ID\",\r\n TitleFieldIndexed: true,\r\n CustomFields: [\r\n {\r\n name: \"Comment\",\r\n title: \"Comment\",\r\n type: gd_sprest_bs_1.Helper.SPCfgFieldType.Note,\r\n noteType: gd_sprest_bs_1.SPTypes.FieldNoteType.TextOnly\r\n }\r\n ],\r\n ViewInformation: [\r\n {\r\n ViewName: \"All Items\",\r\n ViewQuery: \"Author eq [Me]\",\r\n ViewFields: [\"LinkTitle\", \"Comment\", \"Author\", \"Created\"]\r\n }\r\n ]\r\n }\r\n ]\r\n });\r\n // Append the comments to the configuration if it exists\r\n if (cfg && cfg._configuration.ListCfg && cfg._configuration.ListCfg.length > 0) {\r\n // Append the list configuration\r\n cfg._configuration.ListCfg = cfg._configuration.ListCfg.concat(commentsCfg._configuration.ListCfg);\r\n }\r\n // Return the configuration\r\n return cfg || commentsCfg;\r\n };\r\n // Initialization of the component\r\n Comments.init = function (listName, webUrl) {\r\n var _this = this;\r\n // Save the web url\r\n this._webUrl = webUrl;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the list id\r\n (0, gd_sprest_bs_1.Web)(_this._webUrl).Lists(LIST_NAME).query({\r\n Select: [\"Id\"]\r\n }).execute(function (list) {\r\n // Set the list id\r\n _this._commentsListId = list.Id;\r\n }, reject);\r\n // Load the List Information\r\n (0, gd_sprest_bs_1.Web)(_this._webUrl).Lists(listName).execute(function (list) {\r\n // Set the list id\r\n _this._listId = list.Id;\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Loads the comments for the item\r\n Comments.load = function (item) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure a list id exists\r\n if (_this._listId) {\r\n // Load the comments for this item\r\n (0, gd_sprest_bs_1.Web)(_this._webUrl).Lists(LIST_NAME).Items().query({\r\n Expand: [\"Author\"],\r\n Filter: \"Title eq '\" + _this._listId + \"|\" + item.Id + \"'\",\r\n OrderBy: [\"Created desc\"],\r\n Select: [\"Id\", \"Comment\", \"Created\", \"Title\", \"Author/Id\", \"Author/EMail\", \"Author/Title\"]\r\n }).execute(function (items) {\r\n // Resolve the request\r\n resolve(items.results);\r\n }, reject);\r\n }\r\n else {\r\n // Reject the request\r\n reject(\"The target list doesn't exist. Please initialize the component before using it.\");\r\n }\r\n });\r\n };\r\n // Displays the new comment form\r\n Comments.new = function (item) {\r\n var _this = this;\r\n // Clear the modal dialog\r\n modal_1.Modal.clear();\r\n // Hide the close button\r\n modal_1.Modal.setCloseButtonVisibility(false);\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Add Comment\");\r\n // Create the form\r\n var form = gd_sprest_bs_1.Components.Form({\r\n el: modal_1.Modal.BodyElement,\r\n controls: [{\r\n name: \"comment\",\r\n label: \"Comment\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.TextArea,\r\n rows: 10,\r\n required: true,\r\n errorMessage: \"A value is required\"\r\n }]\r\n });\r\n // Set the footer\r\n gd_sprest_bs_1.Components.TooltipGroup({\r\n el: modal_1.Modal.FooterElement,\r\n tooltips: [\r\n {\r\n content: \"Click to add a comment to the request.\",\r\n btnProps: {\r\n text: \"Add\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSuccess,\r\n onClick: function () {\r\n // Ensure the form is valid\r\n if (form.isValid()) {\r\n // Hide the modal\r\n modal_1.Modal.hide();\r\n // Add the comment\r\n _this.add(item, form.getValues()[\"comment\"]).then(function () {\r\n // View the comments\r\n _this.view(item);\r\n });\r\n }\r\n }\r\n }\r\n },\r\n {\r\n content: \"Closes this dialog and views the comments\",\r\n btnProps: {\r\n text: \"Close\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineDanger,\r\n onClick: function () {\r\n // Hide the modal\r\n modal_1.Modal.hide();\r\n // Show the canvas form\r\n canvas_1.CanvasForm.show();\r\n }\r\n }\r\n }\r\n ]\r\n });\r\n // Show the form\r\n modal_1.Modal.show();\r\n };\r\n // Security configuration\r\n Comments.security = function (cfg, webUrl) {\r\n // Resets the list permissions\r\n var resetPermissions = function () {\r\n return new Promise(function (resolve) {\r\n var list = (0, gd_sprest_bs_1.Web)(webUrl).Lists(LIST_NAME);\r\n // Reset the inheritance\r\n list.resetRoleInheritance().execute();\r\n // Clear the permissions\r\n list.breakRoleInheritance(false, true).execute(resolve, true);\r\n });\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n var list = (0, gd_sprest_bs_1.Web)(webUrl).Lists(LIST_NAME);\r\n // Ensure a configuration exists\r\n if (cfg && cfg.length > 0) {\r\n // Reset the list permissions\r\n resetPermissions().then(function () {\r\n var _loop_1 = function (i) {\r\n var principalId = cfg[i].principalId;\r\n var roleDefId = cfg[i].roleDefId;\r\n // Update the list settings\r\n list.RoleAssignments().addRoleAssignment(principalId, roleDefId).execute(function () {\r\n // Log\r\n console.log(\"[Comments List] The user/group (\" + principalId + \") was added successfully.\");\r\n });\r\n };\r\n // Parse the configuration\r\n for (var i = 0; i < cfg.length; i++) {\r\n _loop_1(i);\r\n }\r\n // Wait for the requests to complete\r\n list.done(resolve);\r\n });\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Displays the comments in a canvas form\r\n Comments.view = function (item) {\r\n var _this = this;\r\n // Display a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Loading Comments\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This dialog will close after the comments are loaded.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Load the items\r\n this.load(item).then(function (comments) {\r\n // Clear the form\r\n canvas_1.CanvasForm.clear();\r\n // Set the header\r\n canvas_1.CanvasForm.setHeader(\"<h5>Comments</h5>\");\r\n // Render a nav\r\n gd_sprest_bs_1.Components.Navbar({\r\n el: canvas_1.CanvasForm.BodyElement,\r\n itemsEnd: [{\r\n text: \"+ Add Comment\",\r\n onClick: function () {\r\n // Hide the form\r\n canvas_1.CanvasForm.hide();\r\n // Display a modal to add the comment\r\n _this.new(item);\r\n }\r\n }]\r\n });\r\n // Parse the comments\r\n for (var i = 0; i < comments.length; i++) {\r\n var comment = comments[i];\r\n // Render a toast\r\n gd_sprest_bs_1.Components.Toast({\r\n el: canvas_1.CanvasForm.BodyElement,\r\n headerText: comment.Author.Title,\r\n mutedText: moment(new Date(comment.Created)).toString(),\r\n body: (comment.Comment || \"\").replace(/\\r?\\n/g, '<br />'),\r\n options: {\r\n animation: true,\r\n autohide: false\r\n }\r\n });\r\n }\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Show the canvas form\r\n canvas_1.CanvasForm.show();\r\n });\r\n };\r\n Comments._listId = null;\r\n Comments._webUrl = null;\r\n // Comment's List Id\r\n Comments._commentsListId = null;\r\n return Comments;\r\n}());\r\nexports.Comments = Comments;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/comments.js?");
|
|
52
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Comments = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\nvar moment = __webpack_require__(/*! moment */ \"./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js\");\r\nvar canvas_1 = __webpack_require__(/*! ./canvas */ \"./build/common/canvas.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// List Name\r\nvar LIST_NAME = \"Comments\";\r\n/**\r\n * Comments\r\n */\r\nvar Comments = /** @class */ (function () {\r\n function Comments() {\r\n }\r\n Object.defineProperty(Comments, \"CommentsListId\", {\r\n get: function () { return this._commentsListId; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Adds a comment to an item\r\n Comments.add = function (item, comment) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure a comment exists\r\n if (comment) {\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Adding Comment\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This dialog will close after the comment is added.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Add the item\r\n (0, gd_sprest_bs_1.Web)(_this._webUrl).Lists(LIST_NAME).Items().add({\r\n Comment: comment,\r\n Title: _this._listId + \"|\" + item.Id\r\n }).execute(function () {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Configuration\r\n Comments.configuration = function (cfg) {\r\n var commentsCfg = gd_sprest_bs_1.Helper.SPConfig({\r\n ListCfg: [\r\n {\r\n ListInformation: {\r\n Title: LIST_NAME,\r\n BaseTemplate: gd_sprest_bs_1.SPTypes.ListTemplateType.GenericList,\r\n Hidden: true,\r\n NoCrawl: true\r\n },\r\n TitleFieldDisplayName: \"Comment ID\",\r\n TitleFieldIndexed: true,\r\n CustomFields: [\r\n {\r\n name: \"Comment\",\r\n title: \"Comment\",\r\n type: gd_sprest_bs_1.Helper.SPCfgFieldType.Note,\r\n noteType: gd_sprest_bs_1.SPTypes.FieldNoteType.TextOnly\r\n }\r\n ],\r\n ViewInformation: [\r\n {\r\n ViewName: \"All Items\",\r\n ViewQuery: \"Author eq [Me]\",\r\n ViewFields: [\"LinkTitle\", \"Comment\", \"Author\", \"Created\"]\r\n }\r\n ]\r\n }\r\n ]\r\n });\r\n // Append the comments to the configuration if it exists\r\n if (cfg && cfg._configuration.ListCfg && cfg._configuration.ListCfg.length > 0) {\r\n // Append the list configuration\r\n cfg._configuration.ListCfg = cfg._configuration.ListCfg.concat(commentsCfg._configuration.ListCfg);\r\n }\r\n // Return the configuration\r\n return cfg || commentsCfg;\r\n };\r\n // Initialization of the component\r\n Comments.init = function (listName, webUrl) {\r\n var _this = this;\r\n // Save the web url\r\n this._webUrl = webUrl;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the list id\r\n (0, gd_sprest_bs_1.Web)(_this._webUrl).Lists(LIST_NAME).query({\r\n Select: [\"Id\"]\r\n }).execute(function (list) {\r\n // Set the list id\r\n _this._commentsListId = list.Id;\r\n }, reject);\r\n // Load the List Information\r\n (0, gd_sprest_bs_1.Web)(_this._webUrl).Lists(listName).execute(function (list) {\r\n // Set the list id\r\n _this._listId = list.Id;\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Loads the comments for the item\r\n Comments.load = function (item) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure a list id exists\r\n if (_this._listId) {\r\n // Load the comments for this item\r\n (0, gd_sprest_bs_1.Web)(_this._webUrl).Lists(LIST_NAME).Items().query({\r\n Expand: [\"Author\"],\r\n Filter: \"Title eq '\" + _this._listId + \"|\" + item.Id + \"'\",\r\n OrderBy: [\"Created desc\"],\r\n Select: [\"Id\", \"Comment\", \"Created\", \"Title\", \"Author/Id\", \"Author/EMail\", \"Author/Title\"]\r\n }).execute(function (items) {\r\n // Resolve the request\r\n resolve(items.results);\r\n }, reject);\r\n }\r\n else {\r\n // Reject the request\r\n reject(\"The target list doesn't exist. Please initialize the component before using it.\");\r\n }\r\n });\r\n };\r\n // Displays the new comment form\r\n Comments.new = function (item) {\r\n var _this = this;\r\n // Clear the modal dialog\r\n modal_1.Modal.clear();\r\n // Hide the close button\r\n modal_1.Modal.setCloseButtonVisibility(false);\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Add Comment\");\r\n // Create the form\r\n var form = gd_sprest_bs_1.Components.Form({\r\n el: modal_1.Modal.BodyElement,\r\n controls: [{\r\n name: \"comment\",\r\n label: \"Comment\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.TextArea,\r\n rows: 10,\r\n required: true,\r\n errorMessage: \"A value is required\"\r\n }]\r\n });\r\n // Set the footer\r\n gd_sprest_bs_1.Components.TooltipGroup({\r\n el: modal_1.Modal.FooterElement,\r\n tooltips: [\r\n {\r\n content: \"Click to add a comment to the request.\",\r\n btnProps: {\r\n text: \"Add\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSuccess,\r\n onClick: function () {\r\n // Ensure the form is valid\r\n if (form.isValid()) {\r\n // Hide the modal\r\n modal_1.Modal.hide();\r\n // Add the comment\r\n _this.add(item, form.getValues()[\"comment\"]).then(function () {\r\n // View the comments\r\n _this.view(item);\r\n });\r\n }\r\n }\r\n }\r\n },\r\n {\r\n content: \"Closes this dialog and views the comments\",\r\n btnProps: {\r\n text: \"Close\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineDanger,\r\n onClick: function () {\r\n // Hide the modal\r\n modal_1.Modal.hide();\r\n // Show the canvas form\r\n canvas_1.CanvasForm.show();\r\n }\r\n }\r\n }\r\n ]\r\n });\r\n // Show the form\r\n modal_1.Modal.show();\r\n };\r\n // Security configuration\r\n Comments.security = function (cfg, webUrl) {\r\n // Resets the list permissions\r\n var resetPermissions = function () {\r\n return new Promise(function (resolve) {\r\n var list = (0, gd_sprest_bs_1.Web)(webUrl).Lists(LIST_NAME);\r\n // Reset the inheritance\r\n list.resetRoleInheritance().execute();\r\n // Clear the permissions\r\n list.breakRoleInheritance(false, true).execute(resolve, true);\r\n });\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n var list = (0, gd_sprest_bs_1.Web)(webUrl).Lists(LIST_NAME);\r\n // Ensure a configuration exists\r\n if (cfg && cfg.length > 0) {\r\n // Reset the list permissions\r\n resetPermissions().then(function () {\r\n var _loop_1 = function (i) {\r\n var principalId = cfg[i].principalId;\r\n var roleDefId = cfg[i].roleDefId;\r\n // Update the list settings\r\n list.RoleAssignments().addRoleAssignment(principalId, roleDefId).execute(function () {\r\n // Log\r\n console.log(\"[Comments List] The user/group (\" + principalId + \") was added successfully.\");\r\n });\r\n };\r\n // Parse the configuration\r\n for (var i = 0; i < cfg.length; i++) {\r\n _loop_1(i);\r\n }\r\n // Wait for the requests to complete\r\n list.done(resolve);\r\n });\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Displays the comments in a canvas form\r\n Comments.view = function (item) {\r\n var _this = this;\r\n // Display a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Loading Comments\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This dialog will close after the comments are loaded.\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Load the items\r\n this.load(item).then(function (comments) {\r\n // Clear the form\r\n canvas_1.CanvasForm.clear();\r\n // Set the header\r\n canvas_1.CanvasForm.setHeader(\"<h5>Comments</h5>\");\r\n // Render a nav\r\n gd_sprest_bs_1.Components.Navbar({\r\n el: canvas_1.CanvasForm.BodyElement,\r\n itemsEnd: [{\r\n text: \"+ Add Comment\",\r\n onClick: function () {\r\n // Hide the form\r\n canvas_1.CanvasForm.hide();\r\n // Display a modal to add the comment\r\n _this.new(item);\r\n }\r\n }]\r\n });\r\n // Parse the comments\r\n for (var i = 0; i < comments.length; i++) {\r\n var comment = comments[i];\r\n // Render a toast\r\n gd_sprest_bs_1.Components.Toast({\r\n el: canvas_1.CanvasForm.BodyElement,\r\n headerText: comment.Author.Title,\r\n mutedText: moment(new Date(comment.Created)).toString(),\r\n body: (comment.Comment || \"\").replace(/\\r?\\n/g, '<br />'),\r\n options: {\r\n animation: true,\r\n autohide: false\r\n }\r\n });\r\n }\r\n // Hide the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Show the canvas form\r\n canvas_1.CanvasForm.show();\r\n });\r\n };\r\n Comments._listId = null;\r\n Comments._webUrl = null;\r\n // Comment's List Id\r\n Comments._commentsListId = null;\r\n return Comments;\r\n}());\r\nexports.Comments = Comments;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/comments.js?");
|
|
53
53
|
|
|
54
54
|
/***/ }),
|
|
55
55
|
|
|
@@ -60,7 +60,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
60
60
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
61
61
|
|
|
62
62
|
"use strict";
|
|
63
|
-
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@10.10.89/node_modules/gd-sprest-bs/build/index.js\");\r\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/.pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.min.js\");\r\nvar moment = __webpack_require__(/*! moment */ \"./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js\");\r\nvar loadingDialog_1 = __webpack_require__(/*! ./loadingDialog */ \"./build/common/loadingDialog.js\");\r\nvar methods_1 = __webpack_require__(/*! ./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/common/itemForm.js\");\r\n/** Icons */\r\nvar fileEarmark_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmark */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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@10.10.89/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-body\";\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/common/documents.js?");
|
|
63
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\nvar jQuery = __webpack_require__(/*! jquery */ \"./node_modules/.pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.min.js\");\r\nvar moment = __webpack_require__(/*! moment */ \"./node_modules/.pnpm/moment@2.29.4/node_modules/moment/moment.js\");\r\nvar loadingDialog_1 = __webpack_require__(/*! ./loadingDialog */ \"./build/common/loadingDialog.js\");\r\nvar methods_1 = __webpack_require__(/*! ./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/common/itemForm.js\");\r\n/** Icons */\r\nvar fileEarmark_1 = __webpack_require__(/*! gd-sprest-bs/build/icons/svgs/fileEarmark */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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@10.10.90/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-body\";\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/common/documents.js?");
|
|
64
64
|
|
|
65
65
|
/***/ }),
|
|
66
66
|
|
|
@@ -82,7 +82,7 @@ eval("\r\n/** Common Components */\r\nvar __createBinding = (this && this.__crea
|
|
|
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.InstallationRequired = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/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, \"CustomActionsExist\", {\r\n get: function () { return this._customActionsExist; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Checks the custom actions\r\n InstallationRequired.checkCustomActions = function (cfg) {\r\n var _this = this;\r\n // Clear the flag\r\n this._customActionsExist = true;\r\n // Method to check the web custom actions\r\n var checkWeb = function () {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Ensure custom actions exist\r\n if (cfg._configuration.CustomActionCfg == null || cfg._configuration.CustomActionCfg.Web == null || cfg._configuration.CustomActionCfg.Web.length == 0) {\r\n // Resolve the request\r\n resolve(null);\r\n return;\r\n }\r\n // Load the web custom actions\r\n var web = (0, gd_sprest_bs_1.Web)();\r\n web.UserCustomActions().execute(function (webCustomActions) {\r\n // Parse the web custom actions\r\n for (var i = 0; i < cfg._configuration.CustomActionCfg.Web.length; i++) {\r\n var customAction = cfg._configuration.CustomActionCfg.Web[i];\r\n var found = false;\r\n // Parse the web custom actions\r\n for (var j = 0; j < webCustomActions.results.length; j++) {\r\n // See if they match\r\n if (customAction.Title == webCustomActions.results[j].Title) {\r\n // Set the flag\r\n found = true;\r\n }\r\n }\r\n // See if it was not found\r\n if (!found) {\r\n // Set the error\r\n _this._report.push(\"Web Custom Action '\" + customAction.Title + \"' is missing.\");\r\n // Set the flag\r\n _this._customActionsExist = false;\r\n }\r\n }\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n });\r\n };\r\n // Method to check the site custom actions\r\n var checkSite = function () {\r\n return new Promise(function (resolve) {\r\n // Ensure custom actions exist\r\n if (cfg._configuration.CustomActionCfg == null || cfg._configuration.CustomActionCfg.Site == null || cfg._configuration.CustomActionCfg.Site.length == 0) {\r\n // Resolve the request\r\n resolve(null);\r\n return;\r\n }\r\n // Load the site custom actions\r\n (0, gd_sprest_bs_1.Site)().UserCustomActions().execute(function (siteCustomActions) {\r\n // Parse the site custom actions\r\n for (var i = 0; i < cfg._configuration.CustomActionCfg.Site.length; i++) {\r\n var customAction = cfg._configuration.CustomActionCfg.Site[i];\r\n var found = false;\r\n // Parse the web custom actions\r\n for (var j = 0; j < siteCustomActions.results.length; j++) {\r\n // See if they match\r\n if (customAction.Title == siteCustomActions.results[j].Title) {\r\n // Set the flag\r\n found = true;\r\n }\r\n }\r\n // See if it was not found\r\n if (!found) {\r\n // Set the error\r\n _this._report.push(\"Site Custom Action '\" + customAction.Title + \"' is missing.\");\r\n // Set the flag\r\n _this._customActionsExist = false;\r\n }\r\n }\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n });\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Check the site & web\r\n Promise.all([\r\n checkSite(),\r\n checkWeb()\r\n ]).then(function () {\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\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 (cfg) {\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 // Ensure lists exist\r\n if (cfg._configuration.ListCfg == null || cfg._configuration.ListCfg.length == 0) {\r\n // Resolve the request\r\n resolve(null);\r\n return;\r\n }\r\n // Parse the lists\r\n gd_sprest_bs_1.Helper.Executor(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 (props) {\r\n var _this = this;\r\n // Save the configuration\r\n this._cfg = props.cfg;\r\n // Clear the report\r\n this._report = [];\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Ensure this is an array\r\n var cfgs = typeof (_this._cfg.length) === \"number\" ? _this._cfg : [_this._cfg];\r\n // Parse the configurations\r\n gd_sprest_bs_1.Helper.Executor(cfgs, function (cfg) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n var numbOfErrors = _this._report.length;\r\n // Check the configuration\r\n Promise.all([\r\n // Check the custom actions\r\n _this.checkCustomActions(cfg),\r\n // Check the lists\r\n _this.checkLists(cfg)\r\n ]).then(function () {\r\n // See if there are errors\r\n if (_this._report.length > numbOfErrors) {\r\n // Execute the event\r\n props.onError ? props.onError(cfg) : null;\r\n }\r\n // Execute the event and see if a promise was returned\r\n var returnVal = props.onCompleted ? props.onCompleted() : null;\r\n if (returnVal && typeof (returnVal[\"then\"]) === \"function\") {\r\n // Wait for the request to complete\r\n returnVal.then(function () {\r\n // Resolve the request\r\n resolve(_this._report.length > 0);\r\n });\r\n }\r\n else {\r\n // Resolve the request\r\n resolve(_this._report.length > 0);\r\n }\r\n });\r\n });\r\n }).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 // Ensure the configuration exists\r\n if (this._cfg == null || this._report == null) {\r\n // Show the error dialog\r\n this.showErrorDialog();\r\n return;\r\n }\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: this._report.length > 0 || (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 // Ensure this is an array\r\n var cfgs = typeof (_this._cfg.length) === \"number\" ? _this._cfg : [_this._cfg];\r\n // Parse the configurations\r\n gd_sprest_bs_1.Helper.Executor(cfgs, function (cfg) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n 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 // Call the event\r\n props.onInstalled ? props.onInstalled(cfg) : null;\r\n // Check the next configuration\r\n resolve(null);\r\n });\r\n });\r\n }).then(function () {\r\n // Close the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Call the event\r\n props.onCompleted ? props.onCompleted() : null;\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.showErrorDialog = function () {\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Not Configured\");\r\n // Set the body\r\n modal_1.Modal.setBody(\"The component has not been configured. The SPConfiguration definition hasn't been initialized.\");\r\n // Show the dialog\r\n modal_1.Modal.show();\r\n };\r\n InstallationRequired._cfg = null;\r\n InstallationRequired._report = null;\r\n // Custom Actions exists\r\n InstallationRequired._customActionsExist = 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?");
|
|
85
|
+
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@10.10.90/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, \"CustomActionsExist\", {\r\n get: function () { return this._customActionsExist; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Checks the custom actions\r\n InstallationRequired.checkCustomActions = function (cfg) {\r\n var _this = this;\r\n // Clear the flag\r\n this._customActionsExist = true;\r\n // Method to check the web custom actions\r\n var checkWeb = function () {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Ensure custom actions exist\r\n if (cfg._configuration.CustomActionCfg == null || cfg._configuration.CustomActionCfg.Web == null || cfg._configuration.CustomActionCfg.Web.length == 0) {\r\n // Resolve the request\r\n resolve(null);\r\n return;\r\n }\r\n // Load the web custom actions\r\n var web = (0, gd_sprest_bs_1.Web)();\r\n web.UserCustomActions().execute(function (webCustomActions) {\r\n // Parse the web custom actions\r\n for (var i = 0; i < cfg._configuration.CustomActionCfg.Web.length; i++) {\r\n var customAction = cfg._configuration.CustomActionCfg.Web[i];\r\n var found = false;\r\n // Parse the web custom actions\r\n for (var j = 0; j < webCustomActions.results.length; j++) {\r\n // See if they match\r\n if (customAction.Title == webCustomActions.results[j].Title) {\r\n // Set the flag\r\n found = true;\r\n }\r\n }\r\n // See if it was not found\r\n if (!found) {\r\n // Set the error\r\n _this._report.push(\"Web Custom Action '\" + customAction.Title + \"' is missing.\");\r\n // Set the flag\r\n _this._customActionsExist = false;\r\n }\r\n }\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n });\r\n };\r\n // Method to check the site custom actions\r\n var checkSite = function () {\r\n return new Promise(function (resolve) {\r\n // Ensure custom actions exist\r\n if (cfg._configuration.CustomActionCfg == null || cfg._configuration.CustomActionCfg.Site == null || cfg._configuration.CustomActionCfg.Site.length == 0) {\r\n // Resolve the request\r\n resolve(null);\r\n return;\r\n }\r\n // Load the site custom actions\r\n (0, gd_sprest_bs_1.Site)().UserCustomActions().execute(function (siteCustomActions) {\r\n // Parse the site custom actions\r\n for (var i = 0; i < cfg._configuration.CustomActionCfg.Site.length; i++) {\r\n var customAction = cfg._configuration.CustomActionCfg.Site[i];\r\n var found = false;\r\n // Parse the web custom actions\r\n for (var j = 0; j < siteCustomActions.results.length; j++) {\r\n // See if they match\r\n if (customAction.Title == siteCustomActions.results[j].Title) {\r\n // Set the flag\r\n found = true;\r\n }\r\n }\r\n // See if it was not found\r\n if (!found) {\r\n // Set the error\r\n _this._report.push(\"Site Custom Action '\" + customAction.Title + \"' is missing.\");\r\n // Set the flag\r\n _this._customActionsExist = false;\r\n }\r\n }\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n });\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Check the site & web\r\n Promise.all([\r\n checkSite(),\r\n checkWeb()\r\n ]).then(function () {\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\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 (cfg) {\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 // Ensure lists exist\r\n if (cfg._configuration.ListCfg == null || cfg._configuration.ListCfg.length == 0) {\r\n // Resolve the request\r\n resolve(null);\r\n return;\r\n }\r\n // Parse the lists\r\n gd_sprest_bs_1.Helper.Executor(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 (props) {\r\n var _this = this;\r\n // Save the configuration\r\n this._cfg = props.cfg;\r\n // Clear the report\r\n this._report = [];\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Ensure this is an array\r\n var cfgs = typeof (_this._cfg.length) === \"number\" ? _this._cfg : [_this._cfg];\r\n // Parse the configurations\r\n gd_sprest_bs_1.Helper.Executor(cfgs, function (cfg) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n var numbOfErrors = _this._report.length;\r\n // Check the configuration\r\n Promise.all([\r\n // Check the custom actions\r\n _this.checkCustomActions(cfg),\r\n // Check the lists\r\n _this.checkLists(cfg)\r\n ]).then(function () {\r\n // See if there are errors\r\n if (_this._report.length > numbOfErrors) {\r\n // Execute the event\r\n props.onError ? props.onError(cfg) : null;\r\n }\r\n // Execute the event and see if a promise was returned\r\n var returnVal = props.onCompleted ? props.onCompleted() : null;\r\n if (returnVal && typeof (returnVal[\"then\"]) === \"function\") {\r\n // Wait for the request to complete\r\n returnVal.then(function () {\r\n // Resolve the request\r\n resolve(_this._report.length > 0);\r\n });\r\n }\r\n else {\r\n // Resolve the request\r\n resolve(_this._report.length > 0);\r\n }\r\n });\r\n });\r\n }).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 // Ensure the configuration exists\r\n if (this._cfg == null || this._report == null) {\r\n // Show the error dialog\r\n this.showErrorDialog();\r\n return;\r\n }\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: this._report.length > 0 || (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 // Ensure this is an array\r\n var cfgs = typeof (_this._cfg.length) === \"number\" ? _this._cfg : [_this._cfg];\r\n // Parse the configurations\r\n gd_sprest_bs_1.Helper.Executor(cfgs, function (cfg) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n 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 // Call the event\r\n props.onInstalled ? props.onInstalled(cfg) : null;\r\n // Check the next configuration\r\n resolve(null);\r\n });\r\n });\r\n }).then(function () {\r\n // Close the dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Call the event\r\n props.onCompleted ? props.onCompleted() : null;\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.showErrorDialog = function () {\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Not Configured\");\r\n // Set the body\r\n modal_1.Modal.setBody(\"The component has not been configured. The SPConfiguration definition hasn't been initialized.\");\r\n // Show the dialog\r\n modal_1.Modal.show();\r\n };\r\n InstallationRequired._cfg = null;\r\n InstallationRequired._report = null;\r\n // Custom Actions exists\r\n InstallationRequired._customActionsExist = 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?");
|
|
86
86
|
|
|
87
87
|
/***/ }),
|
|
88
88
|
|
|
@@ -93,7 +93,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
93
93
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
94
94
|
|
|
95
95
|
"use strict";
|
|
96
|
-
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.ItemForm = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/index.js\");\r\nvar _1 = __webpack_require__(/*! . */ \"./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 ? _1.Modal.setAutoClose(value) : _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._displayForms[0]; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"DisplayForms\", {\r\n get: function () { return this._displayForms; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"EditForm\", {\r\n get: function () { return this._editForms[0]; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"EditForms\", {\r\n get: function () { return this._editForms; },\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, \"Tabs\", {\r\n get: function () { return this._tabs; },\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 // Sets the size of the modal or canvas\r\n ItemForm.setSize = function (value) {\r\n // Set the modal type or offcanvas size\r\n this._useModal ? _1.Modal.setType(value) : _1.CanvasForm.setSize(value);\r\n };\r\n /** Public Methods */\r\n // Closes the item form\r\n ItemForm.close = function () {\r\n this._useModal ? _1.Modal.hide() : _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._info = props.info;\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._onShowForm = props.onShowForm;\r\n this._onValidation = props.onValidation;\r\n this._tabInfo = props.tabInfo;\r\n this._updateEvent = props.onUpdate;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the item\r\n return 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._info = props.info;\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._onShowForm = props.onShowForm;\r\n this._onValidation = props.onValidation;\r\n this._tabInfo = props.tabInfo;\r\n this._updateEvent = props.onUpdate;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the form\r\n return this.load(props.webUrl, props.itemId);\r\n };\r\n // Loads the form information\r\n ItemForm.loadFormInfo = function (props) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Load the form info\r\n gd_sprest_bs_1.Helper.ListForm.create(props).then(function (info) {\r\n // Save the information\r\n _this._info = info;\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\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._info = props.info;\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 this._onShowForm = props.onShowForm;\r\n this._tabInfo = props.tabInfo;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the form\r\n return this.load(props.webUrl, props.itemId);\r\n };\r\n /** Private 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._displayForms = [];\r\n this._editForms = [];\r\n // Show a loading dialog\r\n _1.LoadingDialog.setHeader(\"Loading the Item\");\r\n _1.LoadingDialog.setBody(\"This will close after the form is loaded...\");\r\n _1.LoadingDialog.show();\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Code to run after the data is loaded\r\n var onComplete = function () {\r\n // Render the form\r\n _this.renderForm();\r\n // Resolve the request\r\n resolve(null);\r\n };\r\n // See if the info already exists\r\n if (_this._info) {\r\n // Form information is already loaded\r\n onComplete();\r\n }\r\n else {\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 info\r\n gd_sprest_bs_1.Helper.ListForm.create(listProps).then(function (info) {\r\n // Save the information\r\n _this._info = info;\r\n // Form information is already loaded\r\n onComplete();\r\n }, reject);\r\n }\r\n });\r\n };\r\n // Renders the display form\r\n ItemForm.renderDisplayForm = function (el, tab) {\r\n // Ensure the element exists\r\n el = el || document.createElement(\"div\");\r\n // Set the form properties\r\n var displayAttachments = tab ? tab.fields && tab.fields.indexOf(\"Attachments\") >= 0 : this.FormInfo.attachments != null;\r\n var props = {\r\n el: el,\r\n displayAttachments: displayAttachments,\r\n excludeFields: tab ? tab.excludeFields : null,\r\n includeFields: tab ? tab.fields : null,\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 // Override the form rendered event\r\n var customEvent = props.onFormRendered;\r\n props.onFormRendered = function (listForm) {\r\n /* Remove the bottom margin from the last row of the form */\r\n listForm.el.lastChild.classList.remove(\"mb-3\");\r\n // Call the event if it exists\r\n tab && tab.onFormRendered ? tab.onFormRendered(form) : null;\r\n // Call the custom event if it exists\r\n customEvent ? customEvent(listForm) : null;\r\n };\r\n // Render the display form\r\n var form = gd_sprest_bs_1.Components.ListForm.renderDisplayForm(props);\r\n this._displayForms.push(form);\r\n // Return the form element\r\n return el;\r\n };\r\n // Renders the edit form\r\n ItemForm.renderEditForm = function (el, tab) {\r\n // Ensure the element exists\r\n el = el || document.createElement(\"div\");\r\n // Set the form properties\r\n var displayAttachments = tab ? tab.fields && tab.fields.indexOf(\"Attachments\") >= 0 : this.FormInfo.attachments != null;\r\n var props = {\r\n el: el,\r\n displayAttachments: displayAttachments,\r\n excludeFields: tab ? tab.excludeFields : null,\r\n includeFields: tab ? tab.fields : null,\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 // Override the form rendered event\r\n var customEvent = props.onFormRendered;\r\n props.onFormRendered = function (listForm) {\r\n /* Remove the bottom margin from the last row of the form */\r\n listForm.el.lastChild.classList.remove(\"mb-3\");\r\n // Call the event if it exists\r\n tab && tab.onFormRendered ? tab.onFormRendered(form) : null;\r\n // Call the custom event if it exists\r\n customEvent ? customEvent(listForm) : null;\r\n };\r\n // Render the edit form\r\n var form = gd_sprest_bs_1.Components.ListForm.renderEditForm(props);\r\n this._editForms.push(form);\r\n // Return the form element\r\n return el;\r\n };\r\n // Renders the footer\r\n ItemForm.renderFooter = function () {\r\n var _this = this;\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 ? _1.Modal.setFooter(elButtons) : _1.CanvasForm.BodyElement.appendChild(elButtons);\r\n // See if we are rendering a display form\r\n if (this.IsDisplay) {\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 }\r\n else {\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(); }\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 }\r\n // Call the footer event\r\n this._onSetFooter ? this._onSetFooter(this._useModal ? _1.Modal.FooterElement : elButtons) : null;\r\n };\r\n // Renders the form\r\n ItemForm.renderForm = function () {\r\n // Clear the form\r\n (this._useModal ? _1.Modal : _1.CanvasForm).clear();\r\n // Set the header\r\n (this._useModal ? _1.Modal : _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 ? _1.Modal.HeaderElement : _1.CanvasForm.HeaderElement) : null;\r\n // See if we are rendering tabs\r\n if (this._tabInfo) {\r\n // Render the tabs\r\n this.renderTabs();\r\n }\r\n else {\r\n // Render the form based on the type\r\n var elForm = this.IsDisplay ? this.renderDisplayForm() : this.renderEditForm();\r\n // Update the body\r\n (this._useModal ? _1.Modal : _1.CanvasForm).setBody(elForm);\r\n }\r\n // Render the footer\r\n this.renderFooter();\r\n // Call the event\r\n this._onShowForm ? this._onShowForm(this._useModal ? _1.Modal : _1.CanvasForm) : null;\r\n // Close the dialog\r\n _1.LoadingDialog.hide();\r\n // Show the form\r\n (this._useModal ? _1.Modal : _1.CanvasForm).show();\r\n };\r\n // Generates a tab\r\n ItemForm.renderTabs = function () {\r\n var _this = this;\r\n var tabs = [];\r\n // Parse the tabs to render\r\n for (var i = 0; i < this._tabInfo.tabs.length; i++) {\r\n var tabInfo = this._tabInfo.tabs[i];\r\n // Generate the tab\r\n var tab = {\r\n data: tabInfo,\r\n isActive: i == 0,\r\n tabName: tabInfo.title,\r\n onClick: this._tabInfo.onClick,\r\n onRender: function (el, item) {\r\n var tab = item.data;\r\n // Render the form\r\n _this.IsDisplay ? _this.renderDisplayForm(el, tab) : _this.renderEditForm(el, tab);\r\n // Call the event\r\n tab.onRendered ? tab.onRendered(el, item) : null;\r\n }\r\n };\r\n // Call the rendering event\r\n tab = tabInfo.onRendering ? tabInfo.onRendering(tab) : tab;\r\n if (tab) {\r\n // Append the tab\r\n tabs.push(tab);\r\n }\r\n }\r\n // Render the tabs\r\n this._tabs = gd_sprest_bs_1.Components.ListGroup({\r\n el: this.UseModal ? _1.Modal.BodyElement : _1.CanvasForm.BodyElement,\r\n colWidth: this._tabInfo.isVertical ? 4 : 12,\r\n isTabs: true,\r\n isHorizontal: this._tabInfo.isVertical != true,\r\n items: tabs\r\n });\r\n // Return the tabs element\r\n return this._tabs.el;\r\n };\r\n // Saves the edit form\r\n ItemForm.save = function (form) {\r\n var _this = this;\r\n var values = {};\r\n // Default the form\r\n var forms = form ? [form] : this._editForms;\r\n var defaultForm = forms[0];\r\n // Display a loading dialog\r\n _1.LoadingDialog.setHeader(\"Validation\");\r\n _1.LoadingDialog.setBody(\"Validating the form...\");\r\n _1.LoadingDialog.show();\r\n // Validate the forms\r\n var isValid = true;\r\n var counter = 0;\r\n gd_sprest_bs_1.Helper.Executor(forms, function (form) {\r\n // Update the values\r\n values = __assign(__assign({}, values), form.getValues());\r\n // See if this form has attachments\r\n if (form.hasAttachments()) {\r\n // Set the default form\r\n defaultForm = form;\r\n }\r\n // Validate the form\r\n var tabIsValid = form.isValid();\r\n // See if we are using tabs and an event exists\r\n var tabInfo = _this._tabInfo && _this._tabInfo.tabs[counter];\r\n if (tabInfo && tabInfo.onValidation) {\r\n // Call the event\r\n tabIsValid = tabInfo.onValidation(values);\r\n }\r\n // See if the form is not valid\r\n if (!tabIsValid) {\r\n // Set the flag\r\n isValid = false;\r\n }\r\n // See if tabs exist\r\n if (_this.Tabs) {\r\n // Get the tab\r\n var tab = _this.Tabs.el.querySelectorAll(\".list-group-item\")[counter++];\r\n if (tab) {\r\n // Clear the class name\r\n tab.classList.remove(\"is-valid\");\r\n tab.classList.remove(\"is-invalid\");\r\n // Set the class name\r\n tab.classList.add(tabIsValid ? \"is-valid\" : \"is-invalid\");\r\n }\r\n }\r\n // Set the tab class\r\n }).then(\r\n // Success\r\n function () {\r\n // Call the custom validation event\r\n _this.validate(values, isValid).then(\r\n // Valid\r\n function (isValid) {\r\n // See if the form(s) are valid\r\n if (isValid) {\r\n // Update the loading dialog\r\n _1.LoadingDialog.setHeader(\"Saving the Item\");\r\n _1.LoadingDialog.setBody((_this.IsNew ? \"Creating\" : \"Updating\") + \" the Item\");\r\n // Saves the item\r\n var saveItem_1 = function (values) {\r\n // If values is null then do nothing. This would happen when the\r\n // onSave event wants to cancel the save and do something custom\r\n if (values) {\r\n // Save the item\r\n defaultForm.save(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 ? _1.Modal : _1.CanvasForm).hide();\r\n _1.LoadingDialog.hide();\r\n });\r\n }\r\n };\r\n // Call the save event and ensure values exist\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_1(values);\r\n });\r\n }\r\n else {\r\n // Save the item\r\n saveItem_1(values);\r\n }\r\n }\r\n else {\r\n // Close the dialog\r\n _1.LoadingDialog.hide();\r\n }\r\n }, \r\n // Not Valid\r\n function () {\r\n // Close the dialog\r\n _1.LoadingDialog.hide();\r\n });\r\n });\r\n };\r\n // Validates the form\r\n ItemForm.validate = function (values, isValid) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Call the validation event\r\n var returnVal = _this._onValidation ? _this._onValidation(values, isValid) : null;\r\n // See if it's a promise function\r\n if (returnVal && typeof (returnVal.then) === \"function\") {\r\n // Wait for the promise to complete\r\n returnVal.then(function (returnVal) {\r\n // Resolve the request\r\n isValid = typeof (returnVal) === \"boolean\" ? returnVal : isValid;\r\n isValid ? resolve(isValid) : reject();\r\n });\r\n }\r\n else {\r\n // Update the flag\r\n isValid = typeof (returnVal) === \"boolean\" ? returnVal : isValid;\r\n // Resolve the request\r\n isValid ? resolve(isValid) : 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._onShowForm = null;\r\n ItemForm._onSave = null;\r\n ItemForm._onValidation = null;\r\n ItemForm._tabInfo = null;\r\n ItemForm._updateEvent = null;\r\n // Display Form\r\n ItemForm._displayForms = null;\r\n // Edit Form\r\n ItemForm._editForms = 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 // List Form Tabs\r\n ItemForm._tabs = 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/common/itemForm.js?");
|
|
96
|
+
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.ItemForm = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\nvar _1 = __webpack_require__(/*! . */ \"./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 ? _1.Modal.setAutoClose(value) : _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._displayForms[0]; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"DisplayForms\", {\r\n get: function () { return this._displayForms; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"EditForm\", {\r\n get: function () { return this._editForms[0]; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ItemForm, \"EditForms\", {\r\n get: function () { return this._editForms; },\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, \"Tabs\", {\r\n get: function () { return this._tabs; },\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 // Sets the size of the modal or canvas\r\n ItemForm.setSize = function (value) {\r\n // Set the modal type or offcanvas size\r\n this._useModal ? _1.Modal.setType(value) : _1.CanvasForm.setSize(value);\r\n };\r\n /** Public Methods */\r\n // Closes the item form\r\n ItemForm.close = function () {\r\n this._useModal ? _1.Modal.hide() : _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._info = props.info;\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._onShowForm = props.onShowForm;\r\n this._onValidation = props.onValidation;\r\n this._tabInfo = props.tabInfo;\r\n this._updateEvent = props.onUpdate;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the item\r\n return 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._info = props.info;\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._onShowForm = props.onShowForm;\r\n this._onValidation = props.onValidation;\r\n this._tabInfo = props.tabInfo;\r\n this._updateEvent = props.onUpdate;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the form\r\n return this.load(props.webUrl, props.itemId);\r\n };\r\n // Loads the form information\r\n ItemForm.loadFormInfo = function (props) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Load the form info\r\n gd_sprest_bs_1.Helper.ListForm.create(props).then(function (info) {\r\n // Save the information\r\n _this._info = info;\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\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._info = props.info;\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 this._onShowForm = props.onShowForm;\r\n this._tabInfo = props.tabInfo;\r\n typeof (props.useModal) === \"boolean\" ? this._useModal = props.useModal : false;\r\n // Load the form\r\n return this.load(props.webUrl, props.itemId);\r\n };\r\n /** Private 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._displayForms = [];\r\n this._editForms = [];\r\n // Show a loading dialog\r\n _1.LoadingDialog.setHeader(\"Loading the Item\");\r\n _1.LoadingDialog.setBody(\"This will close after the form is loaded...\");\r\n _1.LoadingDialog.show();\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Code to run after the data is loaded\r\n var onComplete = function () {\r\n // Render the form\r\n _this.renderForm();\r\n // Resolve the request\r\n resolve(null);\r\n };\r\n // See if the info already exists\r\n if (_this._info) {\r\n // Form information is already loaded\r\n onComplete();\r\n }\r\n else {\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 info\r\n gd_sprest_bs_1.Helper.ListForm.create(listProps).then(function (info) {\r\n // Save the information\r\n _this._info = info;\r\n // Form information is already loaded\r\n onComplete();\r\n }, reject);\r\n }\r\n });\r\n };\r\n // Renders the display form\r\n ItemForm.renderDisplayForm = function (el, tab) {\r\n // Ensure the element exists\r\n el = el || document.createElement(\"div\");\r\n // Set the form properties\r\n var displayAttachments = tab ? tab.fields && tab.fields.indexOf(\"Attachments\") >= 0 : this.FormInfo.attachments != null;\r\n var props = {\r\n el: el,\r\n displayAttachments: displayAttachments,\r\n excludeFields: tab ? tab.excludeFields : null,\r\n includeFields: tab ? tab.fields : null,\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 // Override the form rendered event\r\n var customEvent = props.onFormRendered;\r\n props.onFormRendered = function (listForm) {\r\n /* Remove the bottom margin from the last row of the form */\r\n listForm.el.lastChild.classList.remove(\"mb-3\");\r\n // Call the event if it exists\r\n tab && tab.onFormRendered ? tab.onFormRendered(form) : null;\r\n // Call the custom event if it exists\r\n customEvent ? customEvent(listForm) : null;\r\n };\r\n // Render the display form\r\n var form = gd_sprest_bs_1.Components.ListForm.renderDisplayForm(props);\r\n this._displayForms.push(form);\r\n // Return the form element\r\n return el;\r\n };\r\n // Renders the edit form\r\n ItemForm.renderEditForm = function (el, tab) {\r\n // Ensure the element exists\r\n el = el || document.createElement(\"div\");\r\n // Set the form properties\r\n var displayAttachments = tab ? tab.fields && tab.fields.indexOf(\"Attachments\") >= 0 : this.FormInfo.attachments != null;\r\n var props = {\r\n el: el,\r\n displayAttachments: displayAttachments,\r\n excludeFields: tab ? tab.excludeFields : null,\r\n includeFields: tab ? tab.fields : null,\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 // Override the form rendered event\r\n var customEvent = props.onFormRendered;\r\n props.onFormRendered = function (listForm) {\r\n /* Remove the bottom margin from the last row of the form */\r\n listForm.el.lastChild.classList.remove(\"mb-3\");\r\n // Call the event if it exists\r\n tab && tab.onFormRendered ? tab.onFormRendered(form) : null;\r\n // Call the custom event if it exists\r\n customEvent ? customEvent(listForm) : null;\r\n };\r\n // Render the edit form\r\n var form = gd_sprest_bs_1.Components.ListForm.renderEditForm(props);\r\n this._editForms.push(form);\r\n // Return the form element\r\n return el;\r\n };\r\n // Renders the footer\r\n ItemForm.renderFooter = function () {\r\n var _this = this;\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 ? _1.Modal.setFooter(elButtons) : _1.CanvasForm.BodyElement.appendChild(elButtons);\r\n // See if we are rendering a display form\r\n if (this.IsDisplay) {\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 }\r\n else {\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(); }\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 }\r\n // Call the footer event\r\n this._onSetFooter ? this._onSetFooter(this._useModal ? _1.Modal.FooterElement : elButtons) : null;\r\n };\r\n // Renders the form\r\n ItemForm.renderForm = function () {\r\n // Clear the form\r\n (this._useModal ? _1.Modal : _1.CanvasForm).clear();\r\n // Set the header\r\n (this._useModal ? _1.Modal : _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 ? _1.Modal.HeaderElement : _1.CanvasForm.HeaderElement) : null;\r\n // See if we are rendering tabs\r\n if (this._tabInfo) {\r\n // Render the tabs\r\n this.renderTabs();\r\n }\r\n else {\r\n // Render the form based on the type\r\n var elForm = this.IsDisplay ? this.renderDisplayForm() : this.renderEditForm();\r\n // Update the body\r\n (this._useModal ? _1.Modal : _1.CanvasForm).setBody(elForm);\r\n }\r\n // Render the footer\r\n this.renderFooter();\r\n // Call the event\r\n this._onShowForm ? this._onShowForm(this._useModal ? _1.Modal : _1.CanvasForm) : null;\r\n // Close the dialog\r\n _1.LoadingDialog.hide();\r\n // Show the form\r\n (this._useModal ? _1.Modal : _1.CanvasForm).show();\r\n };\r\n // Generates a tab\r\n ItemForm.renderTabs = function () {\r\n var _this = this;\r\n var tabs = [];\r\n // Parse the tabs to render\r\n for (var i = 0; i < this._tabInfo.tabs.length; i++) {\r\n var tabInfo = this._tabInfo.tabs[i];\r\n // Generate the tab\r\n var tab = {\r\n data: tabInfo,\r\n isActive: i == 0,\r\n tabName: tabInfo.title,\r\n onClick: this._tabInfo.onClick,\r\n onRender: function (el, item) {\r\n var tab = item.data;\r\n // Render the form\r\n _this.IsDisplay ? _this.renderDisplayForm(el, tab) : _this.renderEditForm(el, tab);\r\n // Call the event\r\n tab.onRendered ? tab.onRendered(el, item) : null;\r\n }\r\n };\r\n // Call the rendering event\r\n tab = tabInfo.onRendering ? tabInfo.onRendering(tab) : tab;\r\n if (tab) {\r\n // Append the tab\r\n tabs.push(tab);\r\n }\r\n }\r\n // Render the tabs\r\n this._tabs = gd_sprest_bs_1.Components.ListGroup({\r\n el: this.UseModal ? _1.Modal.BodyElement : _1.CanvasForm.BodyElement,\r\n colWidth: this._tabInfo.isVertical ? 4 : 12,\r\n isTabs: true,\r\n isHorizontal: this._tabInfo.isVertical != true,\r\n items: tabs\r\n });\r\n // Return the tabs element\r\n return this._tabs.el;\r\n };\r\n // Saves the edit form\r\n ItemForm.save = function (form) {\r\n var _this = this;\r\n var values = {};\r\n // Default the form\r\n var forms = form ? [form] : this._editForms;\r\n var defaultForm = forms[0];\r\n // Display a loading dialog\r\n _1.LoadingDialog.setHeader(\"Validation\");\r\n _1.LoadingDialog.setBody(\"Validating the form...\");\r\n _1.LoadingDialog.show();\r\n // Validate the forms\r\n var isValid = true;\r\n var counter = 0;\r\n gd_sprest_bs_1.Helper.Executor(forms, function (form) {\r\n // Update the values\r\n values = __assign(__assign({}, values), form.getValues());\r\n // See if this form has attachments\r\n if (form.hasAttachments()) {\r\n // Set the default form\r\n defaultForm = form;\r\n }\r\n // Validate the form\r\n var tabIsValid = form.isValid();\r\n // See if we are using tabs and an event exists\r\n var tabInfo = _this._tabInfo && _this._tabInfo.tabs[counter];\r\n if (tabInfo && tabInfo.onValidation) {\r\n // Call the event\r\n tabIsValid = tabInfo.onValidation(values);\r\n }\r\n // See if the form is not valid\r\n if (!tabIsValid) {\r\n // Set the flag\r\n isValid = false;\r\n }\r\n // See if tabs exist\r\n if (_this.Tabs) {\r\n // Get the tab\r\n var tab = _this.Tabs.el.querySelectorAll(\".list-group-item\")[counter++];\r\n if (tab) {\r\n // Clear the class name\r\n tab.classList.remove(\"is-valid\");\r\n tab.classList.remove(\"is-invalid\");\r\n // Set the class name\r\n tab.classList.add(tabIsValid ? \"is-valid\" : \"is-invalid\");\r\n }\r\n }\r\n // Set the tab class\r\n }).then(\r\n // Success\r\n function () {\r\n // Call the custom validation event\r\n _this.validate(values, isValid).then(\r\n // Valid\r\n function (isValid) {\r\n // See if the form(s) are valid\r\n if (isValid) {\r\n // Update the loading dialog\r\n _1.LoadingDialog.setHeader(\"Saving the Item\");\r\n _1.LoadingDialog.setBody((_this.IsNew ? \"Creating\" : \"Updating\") + \" the Item\");\r\n // Saves the item\r\n var saveItem_1 = function (values) {\r\n // If values is null then do nothing. This would happen when the\r\n // onSave event wants to cancel the save and do something custom\r\n if (values) {\r\n // Save the item\r\n defaultForm.save(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 ? _1.Modal : _1.CanvasForm).hide();\r\n _1.LoadingDialog.hide();\r\n });\r\n }\r\n };\r\n // Call the save event and ensure values exist\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_1(values);\r\n });\r\n }\r\n else {\r\n // Save the item\r\n saveItem_1(values);\r\n }\r\n }\r\n else {\r\n // Close the dialog\r\n _1.LoadingDialog.hide();\r\n }\r\n }, \r\n // Not Valid\r\n function () {\r\n // Close the dialog\r\n _1.LoadingDialog.hide();\r\n });\r\n });\r\n };\r\n // Validates the form\r\n ItemForm.validate = function (values, isValid) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Call the validation event\r\n var returnVal = _this._onValidation ? _this._onValidation(values, isValid) : null;\r\n // See if it's a promise function\r\n if (returnVal && typeof (returnVal.then) === \"function\") {\r\n // Wait for the promise to complete\r\n returnVal.then(function (returnVal) {\r\n // Resolve the request\r\n isValid = typeof (returnVal) === \"boolean\" ? returnVal : isValid;\r\n isValid ? resolve(isValid) : reject();\r\n });\r\n }\r\n else {\r\n // Update the flag\r\n isValid = typeof (returnVal) === \"boolean\" ? returnVal : isValid;\r\n // Resolve the request\r\n isValid ? resolve(isValid) : 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._onShowForm = null;\r\n ItemForm._onSave = null;\r\n ItemForm._onValidation = null;\r\n ItemForm._tabInfo = null;\r\n ItemForm._updateEvent = null;\r\n // Display Form\r\n ItemForm._displayForms = null;\r\n // Edit Form\r\n ItemForm._editForms = 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 // List Form Tabs\r\n ItemForm._tabs = 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/common/itemForm.js?");
|
|
97
97
|
|
|
98
98
|
/***/ }),
|
|
99
99
|
|
|
@@ -104,7 +104,7 @@ eval("\r\nvar __assign = (this && this.__assign) || function () {\r\n __assig
|
|
|
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.List = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/index.js\");\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./build/common/index.js\");\r\n/**\r\n * List\r\n */\r\nvar List = /** @class */ (function () {\r\n // Constructor\r\n function List(props) {\r\n var _this = this;\r\n // List Content Types Information\r\n this._listContentTypes = null;\r\n // List Fields Information\r\n this._listFields = null;\r\n // List Information\r\n this._listInfo = null;\r\n // List Url\r\n this._listUrl = null;\r\n // List Views Information\r\n this._listViews = null;\r\n // Items\r\n this._items = null;\r\n // List Name\r\n this._listName = null;\r\n // OData query\r\n this._odata = null;\r\n // View name\r\n this._viewName = null;\r\n // View Xml\r\n this._viewXml = null;\r\n // Web Url\r\n this._webUrl = null;\r\n /** Private Properties */\r\n // Error event when loading the items fail\r\n this._onInitError = null;\r\n // Event triggered when the component is initialized\r\n this._onInitialized = null;\r\n // Items loaded event\r\n this._onItemsLoaded = null;\r\n // Error event when loading a form\r\n this._onLoadFormError = null;\r\n // Refresh event when refreshing the items\r\n this._onRefreshItems = null;\r\n // Event triggered when the form is reset\r\n this._onResetForm = null;\r\n // Save the properties\r\n this._listName = props.listName;\r\n this._odata = props.itemQuery;\r\n this._onInitError = props.onInitError;\r\n this._onInitialized = props.onInitialized;\r\n this._onItemsLoaded = props.onItemsLoaded;\r\n this._onLoadFormError = props.onLoadFormError;\r\n this._onRefreshItems = props.onRefreshItems;\r\n this._onResetForm = props.onResetForm;\r\n this._viewName = props.viewName;\r\n this._webUrl = props.webUrl || gd_sprest_bs_1.ContextInfo.webServerRelativeUrl;\r\n // Load the list information\r\n this.init().then(function () {\r\n // Load the items\r\n _this.loadItems().then(function () {\r\n // Call the event\r\n _this._onInitialized ? _this._onInitialized() : null;\r\n // Call the items loaded event\r\n _this._onItemsLoaded ? _this._onItemsLoaded(_this.Items) : null;\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 // Call the init error event\r\n _this._onInitError ? _this._onInitError.apply(_this, args) : null;\r\n });\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 // Call the init error event\r\n _this._onInitError ? _this._onInitError.apply(_this, args) : null;\r\n });\r\n }\r\n Object.defineProperty(List.prototype, \"EditForm\", {\r\n /** Public Properties */\r\n // Reference to the edit form\r\n get: function () { return common_1.ItemForm.EditForm; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"EditForms\", {\r\n // Reference to the edit forms, if tabs are used\r\n get: function () { return common_1.ItemForm.EditForms; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListContentTypes\", {\r\n get: function () { return this._listContentTypes; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListFields\", {\r\n get: function () { return this._listFields; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListInfo\", {\r\n get: function () { return this._listInfo; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListUrl\", {\r\n get: function () { return this._listUrl; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListViews\", {\r\n get: function () { return this._listViews; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"Items\", {\r\n get: function () { return this._items; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListName\", {\r\n get: function () { return this._listName; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"OData\", {\r\n get: function () { return this._odata; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ViewForm\", {\r\n // Reference to the display form\r\n get: function () { return common_1.ItemForm.DisplayForm; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ViewForms\", {\r\n // Reference to the display forms, if tabs are used\r\n get: function () { return common_1.ItemForm.DisplayForms; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ViewName\", {\r\n get: function () { return this._viewName; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ViewXml\", {\r\n get: function () { return this._viewXml; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"WebUrl\", {\r\n get: function () { return this._webUrl; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Clears the modal or canvas\r\n List.prototype.clear = function () {\r\n // Clear the modal/form\r\n common_1.ItemForm.UseModal ? common_1.Modal.clear() : common_1.CanvasForm.clear();\r\n // Set the list name\r\n common_1.ItemForm.ListName = this.ListName;\r\n // Call the event\r\n this._onResetForm ? this._onResetForm() : null;\r\n };\r\n // Reference to the create item method\r\n List.prototype.createItem = function (values) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Create the item\r\n _this.ListInfo.Items().add(values).execute(resolve, reject);\r\n });\r\n };\r\n // Displays the new form\r\n List.prototype.newForm = function (props) {\r\n // Clear the modal/canvas\r\n this.clear();\r\n // Display the form\r\n common_1.ItemForm.create(props).then(null, this._onLoadFormError);\r\n };\r\n // Displays the edit form\r\n List.prototype.editForm = function (props) {\r\n // Clear the modal/canvas\r\n this.clear();\r\n // Display the form\r\n common_1.ItemForm.edit(props).then(null, this._onLoadFormError);\r\n };\r\n // Initializes the list component\r\n List.prototype.init = function () {\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.Web)(_this.WebUrl).Lists(_this.ListName);\r\n // Query the list content types\r\n list.execute(function (list) {\r\n // Save the list information\r\n _this._listInfo = list;\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 request\r\n reject.apply(void 0, args);\r\n });\r\n // Get the root folder\r\n list.RootFolder().execute(function (folder) {\r\n // Set the url\r\n _this._listUrl = folder.ServerRelativeUrl;\r\n }, true);\r\n // Query the content types\r\n list.ContentTypes().query({\r\n Expand: [\"FieldLinks\", \"Fields\"]\r\n }).execute(function (cts) {\r\n // Save the content types\r\n _this._listContentTypes = cts.results;\r\n }, true);\r\n // Query the list fields\r\n list.Fields().execute(function (fields) {\r\n // Save the fields\r\n _this._listFields = fields.results;\r\n }, true);\r\n // Query the list views\r\n list.Views().query({\r\n Expand: [\"ViewFields\"]\r\n }).execute(function (views) {\r\n // Save the views\r\n _this._listViews = views.results;\r\n }, true);\r\n // Wait for the requests to complete\r\n list.done(function () {\r\n // See if the view name is specified\r\n if (_this.ViewName) {\r\n // Parse the views\r\n for (var i = 0; i < _this.ListViews.length; i++) {\r\n var view = _this.ListViews[i];\r\n if (view.Title.toLowerCase() == _this.ViewName.toLowerCase()) {\r\n // Set the view xml\r\n _this._viewXml = view.ListViewXml;\r\n }\r\n }\r\n }\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\r\n };\r\n // Loads the items\r\n List.prototype.loadItem = function (itemId, query) {\r\n var _this = this;\r\n if (query === void 0) { query = this.OData; }\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Query the items\r\n (0, gd_sprest_bs_1.Web)(_this.WebUrl).Lists(_this.ListName).Items(itemId).query({\r\n Custom: query ? query.Custom : null,\r\n Expand: query ? query.Expand : null,\r\n Select: query ? query.Select : null\r\n }).execute(function (newItem) {\r\n var itemFound = false;\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 item\r\n if (itemId == item.Id) {\r\n // Replace the item\r\n _this._items[i] = newItem;\r\n // Set the flag and break from the loop\r\n itemFound = true;\r\n break;\r\n }\r\n }\r\n // See if the item wasn't found\r\n if (!itemFound) {\r\n // Append the item\r\n _this._items.push(newItem);\r\n }\r\n // Resolve the request\r\n resolve(newItem);\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 request\r\n reject.apply(void 0, args);\r\n }, true);\r\n });\r\n };\r\n // Loads the items\r\n List.prototype.loadItems = function (query) {\r\n // See if the view xml exists\r\n if (this.ViewXml) {\r\n // Get the items by the view name\r\n return this.loadItemsByView();\r\n }\r\n else {\r\n // Get the items by odata\r\n return this.loadItemsByQuery(query);\r\n }\r\n };\r\n // Loads the items by odata query\r\n List.prototype.loadItemsByQuery = function (query) {\r\n var _this = this;\r\n if (query === void 0) { query = this.OData; }\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the items exist\r\n if (_this._items) {\r\n resolve(_this._items);\r\n return;\r\n }\r\n // Query the items\r\n (0, gd_sprest_bs_1.Web)(_this.WebUrl).Lists(_this.ListName).Items().query(query).execute(function (items) {\r\n // Save the items\r\n _this._items = items.results;\r\n // Resolve the request\r\n resolve(_this._items);\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 request\r\n reject.apply(void 0, args);\r\n }, true);\r\n });\r\n };\r\n // Loads the items by view name\r\n List.prototype.loadItemsByView = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the items already exist\r\n if (_this._items) {\r\n resolve(_this._items);\r\n return;\r\n }\r\n // Query the items\r\n (0, gd_sprest_bs_1.Web)(_this.WebUrl).Lists(_this.ListName).getItems(_this.ViewXml).execute(function (items) {\r\n // Save the items\r\n _this._items = items.results;\r\n // Resolve the request\r\n resolve(_this._items);\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 request\r\n reject.apply(void 0, args);\r\n }, true);\r\n });\r\n };\r\n // Refresh the data\r\n List.prototype.refresh = function (query) {\r\n var _this = this;\r\n if (query === void 0) { query = this.OData; }\r\n // Clear the items\r\n this._items = null;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the data\r\n _this.loadItems(query).then(function (items) {\r\n // Call the event\r\n var callback = _this._onRefreshItems ? _this._onRefreshItems(items) : null;\r\n if (callback && typeof (callback.then) === \"function\") {\r\n // Wait for the request to complete\r\n callback.then(resolve, reject);\r\n }\r\n else {\r\n // Resolve the request\r\n resolve(items);\r\n }\r\n }, reject);\r\n });\r\n };\r\n // Refresh the data\r\n List.prototype.refreshItem = function (itemId, query) {\r\n if (query === void 0) { query = this.OData; }\r\n // Load the item\r\n return this.loadItem(itemId, query);\r\n };\r\n // Updates an item\r\n List.prototype.updateItem = function (itemId, values) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Create the item\r\n _this.ListInfo.Items(itemId).update(values).execute(resolve, reject);\r\n });\r\n };\r\n // Displays the view form\r\n List.prototype.viewForm = function (props) {\r\n // Clear the modal/canvas\r\n this.clear();\r\n // Display the form\r\n common_1.ItemForm.view(props).then(null, this._onLoadFormError);\r\n };\r\n return List;\r\n}());\r\nexports.List = List;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/list.js?");
|
|
107
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.List = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./build/common/index.js\");\r\n/**\r\n * List\r\n */\r\nvar List = /** @class */ (function () {\r\n // Constructor\r\n function List(props) {\r\n var _this = this;\r\n // List Content Types Information\r\n this._listContentTypes = null;\r\n // List Fields Information\r\n this._listFields = null;\r\n // List Information\r\n this._listInfo = null;\r\n // List Url\r\n this._listUrl = null;\r\n // List Views Information\r\n this._listViews = null;\r\n // Items\r\n this._items = null;\r\n // List Name\r\n this._listName = null;\r\n // OData query\r\n this._odata = null;\r\n // View name\r\n this._viewName = null;\r\n // View Xml\r\n this._viewXml = null;\r\n // Web Url\r\n this._webUrl = null;\r\n /** Private Properties */\r\n // Error event when loading the items fail\r\n this._onInitError = null;\r\n // Event triggered when the component is initialized\r\n this._onInitialized = null;\r\n // Items loaded event\r\n this._onItemsLoaded = null;\r\n // Error event when loading a form\r\n this._onLoadFormError = null;\r\n // Refresh event when refreshing the items\r\n this._onRefreshItems = null;\r\n // Event triggered when the form is reset\r\n this._onResetForm = null;\r\n // The request digest value of the target site\r\n this._requestDigest = null;\r\n // Save the properties\r\n this._listName = props.listName;\r\n this._odata = props.itemQuery;\r\n this._onInitError = props.onInitError;\r\n this._onInitialized = props.onInitialized;\r\n this._onItemsLoaded = props.onItemsLoaded;\r\n this._onLoadFormError = props.onLoadFormError;\r\n this._onRefreshItems = props.onRefreshItems;\r\n this._onResetForm = props.onResetForm;\r\n this._viewName = props.viewName;\r\n this._webUrl = props.webUrl || gd_sprest_bs_1.ContextInfo.webServerRelativeUrl;\r\n // Set the context information\r\n this.getContextInfo(props.webUrl).then(function () {\r\n // Load the list information\r\n _this.init().then(function () {\r\n // Load the items\r\n _this.loadItems().then(function () {\r\n // Call the event\r\n _this._onInitialized ? _this._onInitialized() : null;\r\n // Call the items loaded event\r\n _this._onItemsLoaded ? _this._onItemsLoaded(_this.Items) : null;\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 // Call the init error event\r\n _this._onInitError ? _this._onInitError.apply(_this, args) : null;\r\n });\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 // Call the init error event\r\n _this._onInitError ? _this._onInitError.apply(_this, args) : null;\r\n });\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 // Call the init error event\r\n _this._onInitError ? _this._onInitError.apply(_this, args) : null;\r\n });\r\n }\r\n Object.defineProperty(List.prototype, \"EditForm\", {\r\n /** Public Properties */\r\n // Reference to the edit form\r\n get: function () { return common_1.ItemForm.EditForm; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"EditForms\", {\r\n // Reference to the edit forms, if tabs are used\r\n get: function () { return common_1.ItemForm.EditForms; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListContentTypes\", {\r\n get: function () { return this._listContentTypes; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListFields\", {\r\n get: function () { return this._listFields; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListInfo\", {\r\n get: function () { return this._listInfo; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListUrl\", {\r\n get: function () { return this._listUrl; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListViews\", {\r\n get: function () { return this._listViews; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"Items\", {\r\n get: function () { return this._items; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ListName\", {\r\n get: function () { return this._listName; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"OData\", {\r\n get: function () { return this._odata; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ViewForm\", {\r\n // Reference to the display form\r\n get: function () { return common_1.ItemForm.DisplayForm; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ViewForms\", {\r\n // Reference to the display forms, if tabs are used\r\n get: function () { return common_1.ItemForm.DisplayForms; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ViewName\", {\r\n get: function () { return this._viewName; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"ViewXml\", {\r\n get: function () { return this._viewXml; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"WebUrl\", {\r\n get: function () { return this._webUrl; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Clears the modal or canvas\r\n List.prototype.clear = function () {\r\n // Clear the modal/form\r\n common_1.ItemForm.UseModal ? common_1.Modal.clear() : common_1.CanvasForm.clear();\r\n // Set the list name\r\n common_1.ItemForm.ListName = this.ListName;\r\n // Call the event\r\n this._onResetForm ? this._onResetForm() : null;\r\n };\r\n // Reference to the create item method\r\n List.prototype.createItem = function (values) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Create the item\r\n _this.ListInfo.Items().add(values).execute(resolve, reject);\r\n });\r\n };\r\n // Gets the context information of the target site\r\n List.prototype.getContextInfo = function (webUrl) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the web url exists\r\n if (webUrl) {\r\n // Get the context info of the site\r\n gd_sprest_bs_1.ContextInfo.getWeb(webUrl).execute(function (info) {\r\n // Set the context info\r\n _this._requestDigest = info.GetContextWebInformation.FormDigestValue;\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Displays the new form\r\n List.prototype.newForm = function (props) {\r\n // Clear the modal/canvas\r\n this.clear();\r\n // Display the form\r\n common_1.ItemForm.create(props).then(null, this._onLoadFormError);\r\n };\r\n // Displays the edit form\r\n List.prototype.editForm = function (props) {\r\n // Clear the modal/canvas\r\n this.clear();\r\n // Display the form\r\n common_1.ItemForm.edit(props).then(null, this._onLoadFormError);\r\n };\r\n // Initializes the list component\r\n List.prototype.init = function () {\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.Web)(_this.WebUrl, { requestDigest: _this._requestDigest }).Lists(_this.ListName);\r\n // Query the list content types\r\n list.execute(function (list) {\r\n // Save the list information\r\n _this._listInfo = list;\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 request\r\n reject.apply(void 0, args);\r\n });\r\n // Get the root folder\r\n list.RootFolder().execute(function (folder) {\r\n // Set the url\r\n _this._listUrl = folder.ServerRelativeUrl;\r\n }, true);\r\n // Query the content types\r\n list.ContentTypes().query({\r\n Expand: [\"FieldLinks\", \"Fields\"]\r\n }).execute(function (cts) {\r\n // Save the content types\r\n _this._listContentTypes = cts.results;\r\n }, true);\r\n // Query the list fields\r\n list.Fields().execute(function (fields) {\r\n // Save the fields\r\n _this._listFields = fields.results;\r\n }, true);\r\n // Query the list views\r\n list.Views().query({\r\n Expand: [\"ViewFields\"]\r\n }).execute(function (views) {\r\n // Save the views\r\n _this._listViews = views.results;\r\n }, true);\r\n // Wait for the requests to complete\r\n list.done(function () {\r\n // See if the view name is specified\r\n if (_this.ViewName) {\r\n // Parse the views\r\n for (var i = 0; i < _this.ListViews.length; i++) {\r\n var view = _this.ListViews[i];\r\n if (view.Title.toLowerCase() == _this.ViewName.toLowerCase()) {\r\n // Set the view xml\r\n _this._viewXml = view.ListViewXml;\r\n }\r\n }\r\n }\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\r\n };\r\n // Loads the items\r\n List.prototype.loadItem = function (itemId, query) {\r\n var _this = this;\r\n if (query === void 0) { query = this.OData; }\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Query the items\r\n (0, gd_sprest_bs_1.Web)(_this.WebUrl, { requestDigest: _this._requestDigest }).Lists(_this.ListName).Items(itemId).query({\r\n Custom: query ? query.Custom : null,\r\n Expand: query ? query.Expand : null,\r\n Select: query ? query.Select : null\r\n }).execute(function (newItem) {\r\n var itemFound = false;\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 item\r\n if (itemId == item.Id) {\r\n // Replace the item\r\n _this._items[i] = newItem;\r\n // Set the flag and break from the loop\r\n itemFound = true;\r\n break;\r\n }\r\n }\r\n // See if the item wasn't found\r\n if (!itemFound) {\r\n // Append the item\r\n _this._items.push(newItem);\r\n }\r\n // Resolve the request\r\n resolve(newItem);\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 request\r\n reject.apply(void 0, args);\r\n }, true);\r\n });\r\n };\r\n // Loads the items\r\n List.prototype.loadItems = function (query) {\r\n // See if the view xml exists\r\n if (this.ViewXml) {\r\n // Get the items by the view name\r\n return this.loadItemsByView();\r\n }\r\n else {\r\n // Get the items by odata\r\n return this.loadItemsByQuery(query);\r\n }\r\n };\r\n // Loads the items by odata query\r\n List.prototype.loadItemsByQuery = function (query) {\r\n var _this = this;\r\n if (query === void 0) { query = this.OData; }\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the items exist\r\n if (_this._items) {\r\n resolve(_this._items);\r\n return;\r\n }\r\n // Query the items\r\n (0, gd_sprest_bs_1.Web)(_this.WebUrl, { requestDigest: _this._requestDigest }).Lists(_this.ListName).Items().query(query).execute(function (items) {\r\n // Save the items\r\n _this._items = items.results;\r\n // Resolve the request\r\n resolve(_this._items);\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 request\r\n reject.apply(void 0, args);\r\n }, true);\r\n });\r\n };\r\n // Loads the items by view name\r\n List.prototype.loadItemsByView = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the items already exist\r\n if (_this._items) {\r\n resolve(_this._items);\r\n return;\r\n }\r\n // Query the items\r\n (0, gd_sprest_bs_1.Web)(_this.WebUrl, { requestDigest: _this._requestDigest }).Lists(_this.ListName).getItems(_this.ViewXml).execute(function (items) {\r\n // Save the items\r\n _this._items = items.results;\r\n // Resolve the request\r\n resolve(_this._items);\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 request\r\n reject.apply(void 0, args);\r\n }, true);\r\n });\r\n };\r\n // Refresh the data\r\n List.prototype.refresh = function (query) {\r\n var _this = this;\r\n if (query === void 0) { query = this.OData; }\r\n // Clear the items\r\n this._items = null;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Refresh the context information\r\n _this.refreshContextInfo().then(function () {\r\n // Load the data\r\n _this.loadItems(query).then(function (items) {\r\n // Call the event\r\n var callback = _this._onRefreshItems ? _this._onRefreshItems(items) : null;\r\n if (callback && typeof (callback.then) === \"function\") {\r\n // Wait for the request to complete\r\n callback.then(resolve, reject);\r\n }\r\n else {\r\n // Resolve the request\r\n resolve(items);\r\n }\r\n }, reject);\r\n }, reject);\r\n });\r\n };\r\n // Refreshes the context information\r\n List.prototype.refreshContextInfo = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the request digest is set\r\n if (_this._requestDigest) {\r\n // Get the context information\r\n _this.getContextInfo(_this.WebUrl).then(resolve, reject);\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Refresh the data\r\n List.prototype.refreshItem = function (itemId, query) {\r\n if (query === void 0) { query = this.OData; }\r\n // Load the item\r\n return this.loadItem(itemId, query);\r\n };\r\n // Updates an item\r\n List.prototype.updateItem = function (itemId, values) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Create the item\r\n _this.ListInfo.Items(itemId).update(values).execute(resolve, reject);\r\n });\r\n };\r\n // Displays the view form\r\n List.prototype.viewForm = function (props) {\r\n // Clear the modal/canvas\r\n this.clear();\r\n // Display the form\r\n common_1.ItemForm.view(props).then(null, this._onLoadFormError);\r\n };\r\n return List;\r\n}());\r\nexports.List = List;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/list.js?");
|
|
108
108
|
|
|
109
109
|
/***/ }),
|
|
110
110
|
|
|
@@ -115,7 +115,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
115
115
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
116
116
|
|
|
117
117
|
"use strict";
|
|
118
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ListSecurity = exports.ListSecurityDefaultGroups = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/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// List Security Default Groups\r\nexports.ListSecurityDefaultGroups = {\r\n Members: \"member\",\r\n Owners: \"owner\",\r\n Visitors: \"visitor\"\r\n};\r\n/**\r\n * List Security\r\n * This component is used for setting the security group/permissions for a list.\r\n */\r\nvar ListSecurity = /** @class */ (function () {\r\n // Constructor\r\n function ListSecurity(props) {\r\n this._ddlItems = null;\r\n this._permissionTypes = null;\r\n this._props = null;\r\n // Current User\r\n this._currentUser = null;\r\n // Security group information\r\n this._groups = {};\r\n // Security group users\r\n this._groupUsers = {};\r\n // Save the properties\r\n this._props = props;\r\n // Get the current user information\r\n this.loadCurrentUser();\r\n // Get the permission types\r\n this.getPermissionTypes();\r\n // Load the groups\r\n this.loadGroups();\r\n }\r\n Object.defineProperty(ListSecurity.prototype, \"CurrentUser\", {\r\n get: function () { return this._currentUser; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ListSecurity.prototype.getGroup = function (groupName) { return this._groups[groupName.toLowerCase()]; };\r\n ListSecurity.prototype.setGroup = function (key, group) {\r\n // Save the info\r\n this._groups[key] = group;\r\n this._groupUsers[key] = [];\r\n // See if the users exist\r\n if (group.Users) {\r\n // Set the users for this group\r\n this._groupUsers[key] = group.Users.results || [];\r\n }\r\n };\r\n ListSecurity.prototype.getGroupUsers = function (groupName) { return this._groupUsers[groupName.toLowerCase()] || []; };\r\n ListSecurity.prototype.addUser = function (user, groupName) {\r\n // Ensure the group exists\r\n var key = groupName.toLowerCase();\r\n if (this._groupUsers[key]) {\r\n // Add the user to the group\r\n this._groupUsers[key].push(user);\r\n }\r\n };\r\n ListSecurity.prototype.removeUser = function (userId, groupName) {\r\n // Ensure the group exists\r\n var key = groupName.toLowerCase();\r\n if (this._groupUsers[key]) {\r\n // Find the idx of the user\r\n for (var i = 0; i < this._groupUsers[key].length; i++) {\r\n // See if this is the user\r\n var user = this._groupUsers[key][i];\r\n if (user.Id == userId) {\r\n // Remove the user\r\n this._groupUsers[key].splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n // Method to check if the user is w/in a group and add them otherwise\r\n ListSecurity.prototype.addToGroup = function (userId, groupName) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the user is in the group\r\n if (_this.isInGroup(userId, groupName)) {\r\n // Resolve the request\r\n resolve();\r\n return;\r\n }\r\n // Add the user to the group\r\n _this._groups[groupName].Users().addUserById(userId).execute(function (user) {\r\n // Add the user to the group\r\n _this.addUser(user, groupName);\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Configures a list\r\n ListSecurity.prototype.configureList = function (listInfo) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Ensure a permission exists\r\n var permissionId = _this._permissionTypes[listInfo.permission];\r\n if (permissionId > 0) {\r\n // Get the group id\r\n _this.getGroupId(listInfo.groupName).then(\r\n // Exists\r\n function (groupId) {\r\n // Add the group to the list\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).Lists(listInfo.listName).RoleAssignments().addRoleAssignment(groupId, permissionId).execute(resolve, function () {\r\n // Log to the console\r\n console.error(\"[\".concat(listInfo.listName, \"] Error adding the group '\").concat(listInfo.groupName, \"' with permission \").concat(listInfo.permission, \" to the list.\"));\r\n // Resolve the request\r\n resolve();\r\n });\r\n }, \r\n // Error\r\n function () {\r\n // Log to the console\r\n console.error(\"[\".concat(listInfo.listName, \"] Site Group '\").concat(listInfo.groupName, \"' doesn't exist\"));\r\n // Resolve the request\r\n resolve();\r\n });\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Configures the lists\r\n ListSecurity.prototype.configureLists = function (lists) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var counter = 0;\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Configuring Lists\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This will close after the lists are configured...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Reset the lists\r\n _this.resetPermissions(lists).then(function () {\r\n // Parse the lists\r\n gd_sprest_bs_1.Helper.Executor(lists, function (list) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Update the loading dialog\r\n loadingDialog_1.LoadingDialog.setBody(\"Configuring \".concat(++counter, \" of \").concat(lists.length, \" lists...\"));\r\n // Configure the list\r\n _this.configureList(list).then(resolve);\r\n });\r\n }).then(resolve, reject);\r\n });\r\n });\r\n };\r\n // Creates the security groups\r\n ListSecurity.prototype.createGroups = function (createFl) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if we aren't creating the groups\r\n if (!createFl) {\r\n // Resolve the request\r\n resolve();\r\n return;\r\n }\r\n // Update the loading dialog\r\n loadingDialog_1.LoadingDialog.setBody(\"Ensuring the security groups exist...\");\r\n // Parse the group names\r\n var groups = _this._props.groups || [];\r\n gd_sprest_bs_1.Helper.Executor(groups, function (groupInfo) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the group\r\n _this.getGroupId(groupInfo.Title).then(\r\n // Group exists\r\n function () {\r\n // Check the next group\r\n resolve(null);\r\n }, \r\n // Group doesn't exist\r\n function () {\r\n // Update the loading dialog\r\n loadingDialog_1.LoadingDialog.setBody(\"Creating the security group: \".concat(groupInfo.Title));\r\n // Create the properties\r\n var props = {\r\n Title: groupInfo.Title\r\n };\r\n // Call the event if it exists\r\n props = _this._props.onGroupCreating ? _this._props.onGroupCreating(props) : props;\r\n // Create the group\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).SiteGroups().add(props).execute(\r\n // Successfully created the group\r\n function (group) {\r\n // Set the group id\r\n _this.setGroup(groupInfo.Title.toLowerCase(), group);\r\n // Call the event\r\n _this._props.onGroupCreated ? _this._props.onGroupCreated(group) : null;\r\n // Check the next group\r\n resolve(group);\r\n }, \r\n // Error creating the group\r\n function () {\r\n // Log to the console\r\n console.error(\"Site Group '\".concat(groupInfo.Title, \"' was unable to be created.\"));\r\n // Check the next group\r\n resolve(null);\r\n });\r\n });\r\n });\r\n }).then(resolve, reject);\r\n });\r\n };\r\n // Gets the group id\r\n ListSecurity.prototype.getGroupId = function (groupName) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var key = groupName.toLowerCase();\r\n // See if we have already have it\r\n if (_this._groups[key]) {\r\n // Resolve the request\r\n resolve(_this._groups[key].Id);\r\n return;\r\n }\r\n // Get the group information\r\n switch (key) {\r\n // Default owner's group\r\n case exports.ListSecurityDefaultGroups.Owners:\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).AssociatedOwnerGroup().query({\r\n Expand: [\"Users\"]\r\n }).execute(function (group) {\r\n _this.setGroup(key, group);\r\n _this.setGroup(group.Title.toLowerCase(), group);\r\n resolve(group.Id);\r\n }, reject);\r\n break;\r\n // Default member's group\r\n case exports.ListSecurityDefaultGroups.Members:\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).AssociatedMemberGroup().query({\r\n Expand: [\"Users\"]\r\n }).execute(function (group) {\r\n _this.setGroup(key, group);\r\n _this.setGroup(group.Title.toLowerCase(), group);\r\n resolve(group.Id);\r\n }, reject);\r\n break;\r\n // Default visitor's group\r\n case exports.ListSecurityDefaultGroups.Visitors:\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).AssociatedVisitorGroup().query({\r\n Expand: [\"Users\"]\r\n }).execute(function (group) {\r\n _this.setGroup(key, group);\r\n _this.setGroup(group.Title.toLowerCase(), group);\r\n resolve(group.Id);\r\n }, reject);\r\n break;\r\n // Default\r\n default:\r\n // Get the group\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).SiteGroups().getByName(groupName).query({\r\n Expand: [\"Users\"]\r\n }).execute(function (group) {\r\n _this.setGroup(key, group);\r\n resolve(group.Id);\r\n }, reject);\r\n break;\r\n }\r\n });\r\n };\r\n // Get the permission types\r\n ListSecurity.prototype.getPermissionTypes = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the definitions\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl).RoleDefinitions().query({\r\n OrderBy: [\"Name\"]\r\n }).execute(function (roleDefs) {\r\n // Clear the permissions and items\r\n _this._ddlItems = [{ text: \"No Permission\" }];\r\n _this._permissionTypes = {};\r\n // Parse the role definitions\r\n for (var i = 0; i < roleDefs.results.length; i++) {\r\n var roleDef = roleDefs.results[i];\r\n // Add the role and item\r\n var value = roleDef.RoleTypeKind > 0 ? roleDef.RoleTypeKind : roleDef.Name;\r\n _this._permissionTypes[value] = roleDef.Id;\r\n _this._ddlItems.push({\r\n data: roleDef,\r\n text: roleDef.Name,\r\n value: value.toString()\r\n });\r\n }\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\r\n };\r\n // Method to see if a user is w/in a group\r\n ListSecurity.prototype.isInGroup = function (userId, groupName) {\r\n // See if we have the user information\r\n var users = this.getGroupUsers(groupName);\r\n for (var i = 0; i < users.length; i++) {\r\n // See if the user is in this group\r\n if (users[i].Id == userId) {\r\n return true;\r\n }\r\n }\r\n // Not in the group\r\n return false;\r\n };\r\n // Loads the current user\r\n ListSecurity.prototype.loadCurrentUser = function () {\r\n var _this = this;\r\n // Load the current user\r\n (0, gd_sprest_bs_1.Web)(this._props.webUrl).CurrentUser().execute(\r\n // Success\r\n function (user) {\r\n // Set the user\r\n _this._currentUser = user;\r\n }, \r\n // Error\r\n function () {\r\n // Log\r\n console.error(\"Unable to load the current user\");\r\n // Set the information from the context info\r\n _this._currentUser = {\r\n Email: gd_sprest_bs_1.ContextInfo.userEmail,\r\n Id: gd_sprest_bs_1.ContextInfo.userId,\r\n LoginName: gd_sprest_bs_1.ContextInfo.userLoginName,\r\n Title: gd_sprest_bs_1.ContextInfo.userDisplayName,\r\n UserPrincipalName: gd_sprest_bs_1.ContextInfo.userPrincipalName\r\n };\r\n });\r\n };\r\n // Loads the security groups\r\n ListSecurity.prototype.loadGroups = function () {\r\n var _this = this;\r\n var groupNames = [];\r\n // Parse the security groups\r\n var groups = this._props.groups || [];\r\n for (var i = 0; i < groups.length; i++) {\r\n // Add the group name\r\n groupNames.push(groups[i].Title);\r\n }\r\n // Parse the list items\r\n var loadDefaultOwner = false;\r\n var loadDefaultMember = false;\r\n var loadDefaultVisitor = false;\r\n for (var i = 0; i < this._props.listItems.length; i++) {\r\n // See if this item uses a default group name\r\n switch (this._props.listItems[i].groupName) {\r\n // Members Group\r\n case exports.ListSecurityDefaultGroups.Members:\r\n loadDefaultMember = true;\r\n break;\r\n // Owners Group\r\n case exports.ListSecurityDefaultGroups.Owners:\r\n loadDefaultOwner = true;\r\n break;\r\n // Visitors Group\r\n case exports.ListSecurityDefaultGroups.Visitors:\r\n loadDefaultVisitor = true;\r\n break;\r\n }\r\n }\r\n // Append the group names\r\n loadDefaultMember ? groupNames.push(exports.ListSecurityDefaultGroups.Members) : null;\r\n loadDefaultOwner ? groupNames.push(exports.ListSecurityDefaultGroups.Owners) : null;\r\n loadDefaultVisitor ? groupNames.push(exports.ListSecurityDefaultGroups.Visitors) : null;\r\n // Parse the security groups\r\n gd_sprest_bs_1.Helper.Executor(groupNames, function (groupName) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Load the group\r\n _this.getGroupId(groupName).then(resolve, resolve);\r\n });\r\n }).then(function () {\r\n // Call the event\r\n _this._props.onGroupsLoaded ? _this._props.onGroupsLoaded(_this._groups) : null;\r\n });\r\n };\r\n // Method remove a user from a specified group\r\n ListSecurity.prototype.removeFromGroup = function (userId, groupName) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the user is not in the group\r\n if (!_this.isInGroup(userId, groupName)) {\r\n // Resolve the request\r\n resolve();\r\n return;\r\n }\r\n // Remove the user from the group\r\n _this._groups[groupName].Users().removeById(userId).execute(function () {\r\n // Add the user to the group\r\n _this.removeUser(userId, groupName);\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Render the modal\r\n ListSecurity.prototype.renderModal = function (onComplete) {\r\n var _this = this;\r\n // Clear the modal\r\n modal_1.Modal.clear();\r\n // Set the size\r\n modal_1.Modal.setType(gd_sprest_bs_1.Components.ModalTypes.XLarge);\r\n // Set the header\r\n modal_1.Modal.setHeader(\"List Security\");\r\n // Get the default groups\r\n var defaultGroups = {};\r\n defaultGroups[exports.ListSecurityDefaultGroups.Members] = this.getGroup(exports.ListSecurityDefaultGroups.Members);\r\n defaultGroups[exports.ListSecurityDefaultGroups.Owners] = this.getGroup(exports.ListSecurityDefaultGroups.Owners);\r\n defaultGroups[exports.ListSecurityDefaultGroups.Visitors] = this.getGroup(exports.ListSecurityDefaultGroups.Visitors);\r\n // Parse the lists\r\n var rows = [];\r\n for (var i = 0; i < this._props.listItems.length; i++) {\r\n var listItem = this._props.listItems[i];\r\n // Set the group name\r\n var groupName = listItem.groupName;\r\n if (defaultGroups[groupName]) {\r\n // Set the group name\r\n groupName = defaultGroups[groupName].Title;\r\n }\r\n // Add the row\r\n rows.push({\r\n isAutoSized: true,\r\n columns: [\r\n {\r\n control: {\r\n name: \"listName_\" + i,\r\n label: \"List Name\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.Readonly,\r\n value: listItem.listName\r\n }\r\n },\r\n {\r\n control: {\r\n name: \"groupName_\" + i,\r\n label: \"Group Name\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.Readonly,\r\n value: groupName\r\n }\r\n },\r\n {\r\n control: {\r\n name: \"permission_\" + i,\r\n label: \"Permission\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.Dropdown,\r\n items: this._ddlItems,\r\n required: true,\r\n value: listItem.permission\r\n }\r\n }\r\n ]\r\n });\r\n }\r\n // Render the form\r\n var form = gd_sprest_bs_1.Components.Form({\r\n className: \"list-security-form\",\r\n el: modal_1.Modal.BodyElement,\r\n rows: rows\r\n });\r\n // Gets the list names\r\n var getListNames = function () {\r\n var lists = [];\r\n // Get the form values\r\n var tableData = form.getValues();\r\n // Parse the # of rows\r\n for (var i = 0; i < rows.length; i++) {\r\n // Add the list information\r\n lists.push({\r\n groupName: tableData[\"groupName_\" + i],\r\n listName: tableData[\"listName_\" + i],\r\n permission: tableData[\"permission_\" + i].value\r\n });\r\n }\r\n // Return the list names\r\n return lists;\r\n };\r\n // Render the footer\r\n gd_sprest_bs_1.Components.TooltipGroup({\r\n el: modal_1.Modal.FooterElement,\r\n tooltips: [\r\n {\r\n content: \"Configure the list to inherit permissions from the web\",\r\n btnProps: {\r\n text: \"Inherit\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () {\r\n // Reset the list permissions\r\n _this.resetPermissions(getListNames(), false).then(onComplete);\r\n }\r\n }\r\n },\r\n {\r\n content: \"Configure the security for the lists\",\r\n btnProps: {\r\n text: \"Configure\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () {\r\n // Configure the lists\r\n _this.configureLists(getListNames()).then(onComplete);\r\n }\r\n }\r\n },\r\n {\r\n content: \"Close this modal\",\r\n btnProps: {\r\n text: \"Close\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n // Close the modal\r\n modal_1.Modal.hide();\r\n }\r\n }\r\n }\r\n ]\r\n });\r\n // Show the modal\r\n modal_1.Modal.show();\r\n };\r\n // Reset list permissions\r\n ListSecurity.prototype.resetPermissions = function (listItems, breakInheritance) {\r\n var _this = this;\r\n if (breakInheritance === void 0) { breakInheritance = true; }\r\n // Parse the lists\r\n var lists = {};\r\n for (var i = 0; i < listItems.length; i++) {\r\n // Add the list\r\n lists[listItems[i].listName] = true;\r\n }\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Parse the list keys\r\n for (var listName in lists) {\r\n var list = (0, gd_sprest_bs_1.Web)(_this._props.webUrl).Lists(listName);\r\n // Reset the permissions\r\n list.resetRoleInheritance().execute();\r\n // Revert to the default\r\n if (breakInheritance) {\r\n list.breakRoleInheritance(false, true).execute(true);\r\n }\r\n // Wait for the requests to complete\r\n list.done(resolve);\r\n }\r\n });\r\n };\r\n // Shows the modal\r\n ListSecurity.prototype.show = function (createFl, onComplete) {\r\n var _this = this;\r\n if (createFl === void 0) { createFl = true; }\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Loading the Security Information\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Loading the security group information...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Create the groups\r\n this.createGroups(createFl).then(function () {\r\n // Update the loading dialog\r\n loadingDialog_1.LoadingDialog.setBody(\"Waiting for the permission types to be loaded...\");\r\n // Ensure the permissions are loaded\r\n var loopId = setInterval(function () {\r\n // See if the permissions exist\r\n if (_this._ddlItems && _this._permissionTypes) {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Show the modal\r\n _this.renderModal(function () {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Call the event\r\n onComplete ? onComplete() : null;\r\n });\r\n // Stop the loop\r\n clearInterval(loopId);\r\n }\r\n }, 10);\r\n }, function () {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Show an error\r\n modal_1.Modal.setHeader(\"Security Groups\");\r\n modal_1.Modal.setBody(\"Error loading/creating the security groups. Please contact your admin.\");\r\n modal_1.Modal.show();\r\n });\r\n };\r\n return ListSecurity;\r\n}());\r\nexports.ListSecurity = ListSecurity;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/listSecurity.js?");
|
|
118
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ListSecurity = exports.ListSecurityDefaultGroups = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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// List Security Default Groups\r\nexports.ListSecurityDefaultGroups = {\r\n Members: \"member\",\r\n Owners: \"owner\",\r\n Visitors: \"visitor\"\r\n};\r\n/**\r\n * List Security\r\n * This component is used for setting the security group/permissions for a list.\r\n */\r\nvar ListSecurity = /** @class */ (function () {\r\n // Constructor\r\n function ListSecurity(props) {\r\n var _this = this;\r\n this._ddlItems = null;\r\n this._permissionTypes = null;\r\n this._props = null;\r\n this._requestDigest = null;\r\n // Current User\r\n this._currentUser = null;\r\n // Security group information\r\n this._groups = {};\r\n // Security group users\r\n this._groupUsers = {};\r\n // Save the properties\r\n this._props = props;\r\n // Get the context information\r\n this.getContextInfo(this._props.webUrl).then(function () {\r\n // Get the current user information\r\n _this.loadCurrentUser();\r\n // Get the permission types\r\n _this.getPermissionTypes();\r\n // Load the groups\r\n _this.loadGroups();\r\n });\r\n }\r\n Object.defineProperty(ListSecurity.prototype, \"CurrentUser\", {\r\n get: function () { return this._currentUser; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ListSecurity.prototype.getGroup = function (groupName) { return this._groups[groupName.toLowerCase()]; };\r\n ListSecurity.prototype.setGroup = function (key, group) {\r\n // Save the info\r\n this._groups[key] = group;\r\n this._groupUsers[key] = [];\r\n // See if the users exist\r\n if (group.Users) {\r\n // Set the users for this group\r\n this._groupUsers[key] = group.Users.results || [];\r\n }\r\n };\r\n ListSecurity.prototype.getGroupUsers = function (groupName) { return this._groupUsers[groupName.toLowerCase()] || []; };\r\n ListSecurity.prototype.addUser = function (user, groupName) {\r\n // Ensure the group exists\r\n var key = groupName.toLowerCase();\r\n if (this._groupUsers[key]) {\r\n // Add the user to the group\r\n this._groupUsers[key].push(user);\r\n }\r\n };\r\n ListSecurity.prototype.removeUser = function (userId, groupName) {\r\n // Ensure the group exists\r\n var key = groupName.toLowerCase();\r\n if (this._groupUsers[key]) {\r\n // Find the idx of the user\r\n for (var i = 0; i < this._groupUsers[key].length; i++) {\r\n // See if this is the user\r\n var user = this._groupUsers[key][i];\r\n if (user.Id == userId) {\r\n // Remove the user\r\n this._groupUsers[key].splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n // Method to check if the user is w/in a group and add them otherwise\r\n ListSecurity.prototype.addToGroup = function (userId, groupName) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the user is in the group\r\n if (_this.isInGroup(userId, groupName)) {\r\n // Resolve the request\r\n resolve();\r\n return;\r\n }\r\n // Add the user to the group\r\n _this._groups[groupName].Users().addUserById(userId).execute(function (user) {\r\n // Add the user to the group\r\n _this.addUser(user, groupName);\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Configures a list\r\n ListSecurity.prototype.configureList = function (listInfo) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Ensure a permission exists\r\n var permissionId = _this._permissionTypes[listInfo.permission];\r\n if (permissionId > 0) {\r\n // Get the group id\r\n _this.getGroupId(listInfo.groupName).then(\r\n // Exists\r\n function (groupId) {\r\n // Add the group to the list\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl, { requestDigest: _this._requestDigest }).Lists(listInfo.listName).RoleAssignments().addRoleAssignment(groupId, permissionId).execute(resolve, function () {\r\n // Log to the console\r\n console.error(\"[\".concat(listInfo.listName, \"] Error adding the group '\").concat(listInfo.groupName, \"' with permission \").concat(listInfo.permission, \" to the list.\"));\r\n // Resolve the request\r\n resolve();\r\n });\r\n }, \r\n // Error\r\n function () {\r\n // Log to the console\r\n console.error(\"[\".concat(listInfo.listName, \"] Site Group '\").concat(listInfo.groupName, \"' doesn't exist\"));\r\n // Resolve the request\r\n resolve();\r\n });\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Configures the lists\r\n ListSecurity.prototype.configureLists = function (lists) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var counter = 0;\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Configuring Lists\");\r\n loadingDialog_1.LoadingDialog.setBody(\"This will close after the lists are configured...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Reset the lists\r\n _this.resetPermissions(lists).then(function () {\r\n // Parse the lists\r\n gd_sprest_bs_1.Helper.Executor(lists, function (list) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Update the loading dialog\r\n loadingDialog_1.LoadingDialog.setBody(\"Configuring \".concat(++counter, \" of \").concat(lists.length, \" lists...\"));\r\n // Configure the list\r\n _this.configureList(list).then(resolve);\r\n });\r\n }).then(resolve, reject);\r\n });\r\n });\r\n };\r\n // Creates the security groups\r\n ListSecurity.prototype.createGroups = function (createFl) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if we aren't creating the groups\r\n if (!createFl) {\r\n // Resolve the request\r\n resolve();\r\n return;\r\n }\r\n // Update the loading dialog\r\n loadingDialog_1.LoadingDialog.setBody(\"Ensuring the security groups exist...\");\r\n // Parse the group names\r\n var groups = _this._props.groups || [];\r\n gd_sprest_bs_1.Helper.Executor(groups, function (groupInfo) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the group\r\n _this.getGroupId(groupInfo.Title).then(\r\n // Group exists\r\n function () {\r\n // Check the next group\r\n resolve(null);\r\n }, \r\n // Group doesn't exist\r\n function () {\r\n // Update the loading dialog\r\n loadingDialog_1.LoadingDialog.setBody(\"Creating the security group: \".concat(groupInfo.Title));\r\n // Create the properties\r\n var props = {\r\n Title: groupInfo.Title\r\n };\r\n // Call the event if it exists\r\n props = _this._props.onGroupCreating ? _this._props.onGroupCreating(props) : props;\r\n // Create the group\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl, { requestDigest: _this._requestDigest }).SiteGroups().add(props).execute(\r\n // Successfully created the group\r\n function (group) {\r\n // Set the group id\r\n _this.setGroup(groupInfo.Title.toLowerCase(), group);\r\n // Call the event\r\n _this._props.onGroupCreated ? _this._props.onGroupCreated(group) : null;\r\n // Check the next group\r\n resolve(group);\r\n }, \r\n // Error creating the group\r\n function () {\r\n // Log to the console\r\n console.error(\"Site Group '\".concat(groupInfo.Title, \"' was unable to be created.\"));\r\n // Check the next group\r\n resolve(null);\r\n });\r\n });\r\n });\r\n }).then(resolve, reject);\r\n });\r\n };\r\n // Gets the context information of the target site\r\n ListSecurity.prototype.getContextInfo = function (webUrl) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the web url exists\r\n if (webUrl) {\r\n // Get the context info of the site\r\n gd_sprest_bs_1.ContextInfo.getWeb(webUrl).execute(function (info) {\r\n // Set the context info\r\n _this._requestDigest = info.GetContextWebInformation.FormDigestValue;\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Gets the group id\r\n ListSecurity.prototype.getGroupId = function (groupName) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var key = groupName.toLowerCase();\r\n // See if we have already have it\r\n if (_this._groups[key]) {\r\n // Resolve the request\r\n resolve(_this._groups[key].Id);\r\n return;\r\n }\r\n // Get the group information\r\n switch (key) {\r\n // Default owner's group\r\n case exports.ListSecurityDefaultGroups.Owners:\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl, { requestDigest: _this._requestDigest }).AssociatedOwnerGroup().query({\r\n Expand: [\"Users\"]\r\n }).execute(function (group) {\r\n _this.setGroup(key, group);\r\n _this.setGroup(group.Title.toLowerCase(), group);\r\n resolve(group.Id);\r\n }, reject);\r\n break;\r\n // Default member's group\r\n case exports.ListSecurityDefaultGroups.Members:\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl, { requestDigest: _this._requestDigest }).AssociatedMemberGroup().query({\r\n Expand: [\"Users\"]\r\n }).execute(function (group) {\r\n _this.setGroup(key, group);\r\n _this.setGroup(group.Title.toLowerCase(), group);\r\n resolve(group.Id);\r\n }, reject);\r\n break;\r\n // Default visitor's group\r\n case exports.ListSecurityDefaultGroups.Visitors:\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl, { requestDigest: _this._requestDigest }).AssociatedVisitorGroup().query({\r\n Expand: [\"Users\"]\r\n }).execute(function (group) {\r\n _this.setGroup(key, group);\r\n _this.setGroup(group.Title.toLowerCase(), group);\r\n resolve(group.Id);\r\n }, reject);\r\n break;\r\n // Default\r\n default:\r\n // Get the group\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl, { requestDigest: _this._requestDigest }).SiteGroups().getByName(groupName).query({\r\n Expand: [\"Users\"]\r\n }).execute(function (group) {\r\n _this.setGroup(key, group);\r\n resolve(group.Id);\r\n }, reject);\r\n break;\r\n }\r\n });\r\n };\r\n // Get the permission types\r\n ListSecurity.prototype.getPermissionTypes = function () {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the definitions\r\n (0, gd_sprest_bs_1.Web)(_this._props.webUrl, { requestDigest: _this._requestDigest }).RoleDefinitions().query({\r\n OrderBy: [\"Name\"]\r\n }).execute(function (roleDefs) {\r\n // Clear the permissions and items\r\n _this._ddlItems = [{ text: \"No Permission\" }];\r\n _this._permissionTypes = {};\r\n // Parse the role definitions\r\n for (var i = 0; i < roleDefs.results.length; i++) {\r\n var roleDef = roleDefs.results[i];\r\n // Add the role and item\r\n var value = roleDef.RoleTypeKind > 0 ? roleDef.RoleTypeKind : roleDef.Name;\r\n _this._permissionTypes[value] = roleDef.Id;\r\n _this._ddlItems.push({\r\n data: roleDef,\r\n text: roleDef.Name,\r\n value: value.toString()\r\n });\r\n }\r\n // Resolve the request\r\n resolve();\r\n });\r\n });\r\n };\r\n // Method to see if a user is w/in a group\r\n ListSecurity.prototype.isInGroup = function (userId, groupName) {\r\n // See if we have the user information\r\n var users = this.getGroupUsers(groupName);\r\n for (var i = 0; i < users.length; i++) {\r\n // See if the user is in this group\r\n if (users[i].Id == userId) {\r\n return true;\r\n }\r\n }\r\n // Not in the group\r\n return false;\r\n };\r\n // Loads the current user\r\n ListSecurity.prototype.loadCurrentUser = function () {\r\n var _this = this;\r\n // Load the current user\r\n (0, gd_sprest_bs_1.Web)(this._props.webUrl, { requestDigest: this._requestDigest }).CurrentUser().execute(\r\n // Success\r\n function (user) {\r\n // Set the user\r\n _this._currentUser = user;\r\n }, \r\n // Error\r\n function () {\r\n // Log\r\n console.error(\"Unable to load the current user\");\r\n // Set the information from the context info\r\n _this._currentUser = {\r\n Email: gd_sprest_bs_1.ContextInfo.userEmail,\r\n Id: gd_sprest_bs_1.ContextInfo.userId,\r\n LoginName: gd_sprest_bs_1.ContextInfo.userLoginName,\r\n Title: gd_sprest_bs_1.ContextInfo.userDisplayName,\r\n UserPrincipalName: gd_sprest_bs_1.ContextInfo.userPrincipalName\r\n };\r\n });\r\n };\r\n // Loads the security groups\r\n ListSecurity.prototype.loadGroups = function () {\r\n var _this = this;\r\n var groupNames = [];\r\n // Parse the security groups\r\n var groups = this._props.groups || [];\r\n for (var i = 0; i < groups.length; i++) {\r\n // Add the group name\r\n groupNames.push(groups[i].Title);\r\n }\r\n // Parse the list items\r\n var loadDefaultOwner = false;\r\n var loadDefaultMember = false;\r\n var loadDefaultVisitor = false;\r\n for (var i = 0; i < this._props.listItems.length; i++) {\r\n // See if this item uses a default group name\r\n switch (this._props.listItems[i].groupName) {\r\n // Members Group\r\n case exports.ListSecurityDefaultGroups.Members:\r\n loadDefaultMember = true;\r\n break;\r\n // Owners Group\r\n case exports.ListSecurityDefaultGroups.Owners:\r\n loadDefaultOwner = true;\r\n break;\r\n // Visitors Group\r\n case exports.ListSecurityDefaultGroups.Visitors:\r\n loadDefaultVisitor = true;\r\n break;\r\n }\r\n }\r\n // Append the group names\r\n loadDefaultMember ? groupNames.push(exports.ListSecurityDefaultGroups.Members) : null;\r\n loadDefaultOwner ? groupNames.push(exports.ListSecurityDefaultGroups.Owners) : null;\r\n loadDefaultVisitor ? groupNames.push(exports.ListSecurityDefaultGroups.Visitors) : null;\r\n // Parse the security groups\r\n gd_sprest_bs_1.Helper.Executor(groupNames, function (groupName) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Load the group\r\n _this.getGroupId(groupName).then(resolve, resolve);\r\n });\r\n }).then(function () {\r\n // Call the event\r\n _this._props.onGroupsLoaded ? _this._props.onGroupsLoaded(_this._groups) : null;\r\n });\r\n };\r\n // Method remove a user from a specified group\r\n ListSecurity.prototype.removeFromGroup = function (userId, groupName) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the user is not in the group\r\n if (!_this.isInGroup(userId, groupName)) {\r\n // Resolve the request\r\n resolve();\r\n return;\r\n }\r\n // Remove the user from the group\r\n _this._groups[groupName].Users().removeById(userId).execute(function () {\r\n // Add the user to the group\r\n _this.removeUser(userId, groupName);\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Render the modal\r\n ListSecurity.prototype.renderModal = function (onComplete) {\r\n var _this = this;\r\n // Clear the modal\r\n modal_1.Modal.clear();\r\n // Set the size\r\n modal_1.Modal.setType(gd_sprest_bs_1.Components.ModalTypes.XLarge);\r\n // Set the header\r\n modal_1.Modal.setHeader(\"List Security\");\r\n // Get the default groups\r\n var defaultGroups = {};\r\n defaultGroups[exports.ListSecurityDefaultGroups.Members] = this.getGroup(exports.ListSecurityDefaultGroups.Members);\r\n defaultGroups[exports.ListSecurityDefaultGroups.Owners] = this.getGroup(exports.ListSecurityDefaultGroups.Owners);\r\n defaultGroups[exports.ListSecurityDefaultGroups.Visitors] = this.getGroup(exports.ListSecurityDefaultGroups.Visitors);\r\n // Parse the lists\r\n var rows = [];\r\n for (var i = 0; i < this._props.listItems.length; i++) {\r\n var listItem = this._props.listItems[i];\r\n // Set the group name\r\n var groupName = listItem.groupName;\r\n if (defaultGroups[groupName]) {\r\n // Set the group name\r\n groupName = defaultGroups[groupName].Title;\r\n }\r\n // Add the row\r\n rows.push({\r\n isAutoSized: true,\r\n columns: [\r\n {\r\n control: {\r\n name: \"listName_\" + i,\r\n label: \"List Name\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.Readonly,\r\n value: listItem.listName\r\n }\r\n },\r\n {\r\n control: {\r\n name: \"groupName_\" + i,\r\n label: \"Group Name\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.Readonly,\r\n value: groupName\r\n }\r\n },\r\n {\r\n control: {\r\n name: \"permission_\" + i,\r\n label: \"Permission\",\r\n type: gd_sprest_bs_1.Components.FormControlTypes.Dropdown,\r\n items: this._ddlItems,\r\n required: true,\r\n value: listItem.permission\r\n }\r\n }\r\n ]\r\n });\r\n }\r\n // Render the form\r\n var form = gd_sprest_bs_1.Components.Form({\r\n className: \"list-security-form\",\r\n el: modal_1.Modal.BodyElement,\r\n rows: rows\r\n });\r\n // Gets the list names\r\n var getListNames = function () {\r\n var lists = [];\r\n // Get the form values\r\n var tableData = form.getValues();\r\n // Parse the # of rows\r\n for (var i = 0; i < rows.length; i++) {\r\n // Add the list information\r\n lists.push({\r\n groupName: tableData[\"groupName_\" + i],\r\n listName: tableData[\"listName_\" + i],\r\n permission: tableData[\"permission_\" + i].value\r\n });\r\n }\r\n // Return the list names\r\n return lists;\r\n };\r\n // Render the footer\r\n gd_sprest_bs_1.Components.TooltipGroup({\r\n el: modal_1.Modal.FooterElement,\r\n tooltips: [\r\n {\r\n content: \"Configure the list to inherit permissions from the web\",\r\n btnProps: {\r\n text: \"Inherit\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () {\r\n // Reset the list permissions\r\n _this.resetPermissions(getListNames(), false).then(onComplete);\r\n }\r\n }\r\n },\r\n {\r\n content: \"Configure the security for the lists\",\r\n btnProps: {\r\n text: \"Configure\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () {\r\n // Configure the lists\r\n _this.configureLists(getListNames()).then(onComplete);\r\n }\r\n }\r\n },\r\n {\r\n content: \"Close this modal\",\r\n btnProps: {\r\n text: \"Close\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,\r\n onClick: function () {\r\n // Close the modal\r\n modal_1.Modal.hide();\r\n }\r\n }\r\n }\r\n ]\r\n });\r\n // Show the modal\r\n modal_1.Modal.show();\r\n };\r\n // Reset list permissions\r\n ListSecurity.prototype.resetPermissions = function (listItems, breakInheritance) {\r\n var _this = this;\r\n if (breakInheritance === void 0) { breakInheritance = true; }\r\n // Parse the lists\r\n var lists = {};\r\n for (var i = 0; i < listItems.length; i++) {\r\n // Add the list\r\n lists[listItems[i].listName] = true;\r\n }\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Parse the list keys\r\n for (var listName in lists) {\r\n var list = (0, gd_sprest_bs_1.Web)(_this._props.webUrl, { requestDigest: _this._requestDigest }).Lists(listName);\r\n // Reset the permissions\r\n list.resetRoleInheritance().execute();\r\n // Revert to the default\r\n if (breakInheritance) {\r\n list.breakRoleInheritance(false, true).execute(true);\r\n }\r\n // Wait for the requests to complete\r\n list.done(resolve);\r\n }\r\n });\r\n };\r\n // Shows the modal\r\n ListSecurity.prototype.show = function (createFl, onComplete) {\r\n var _this = this;\r\n if (createFl === void 0) { createFl = true; }\r\n // Show a loading dialog\r\n loadingDialog_1.LoadingDialog.setHeader(\"Loading the Security Information\");\r\n loadingDialog_1.LoadingDialog.setBody(\"Loading the security group information...\");\r\n loadingDialog_1.LoadingDialog.show();\r\n // Create the groups\r\n this.createGroups(createFl).then(function () {\r\n // Update the loading dialog\r\n loadingDialog_1.LoadingDialog.setBody(\"Waiting for the permission types to be loaded...\");\r\n // Ensure the permissions are loaded\r\n var loopId = setInterval(function () {\r\n // See if the permissions exist\r\n if (_this._ddlItems && _this._permissionTypes) {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Show the modal\r\n _this.renderModal(function () {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Call the event\r\n onComplete ? onComplete() : null;\r\n });\r\n // Stop the loop\r\n clearInterval(loopId);\r\n }\r\n }, 10);\r\n }, function () {\r\n // Hide the loading dialog\r\n loadingDialog_1.LoadingDialog.hide();\r\n // Show an error\r\n modal_1.Modal.setHeader(\"Security Groups\");\r\n modal_1.Modal.setBody(\"Error loading/creating the security groups. Please contact your admin.\");\r\n modal_1.Modal.show();\r\n });\r\n };\r\n return ListSecurity;\r\n}());\r\nexports.ListSecurity = ListSecurity;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/listSecurity.js?");
|
|
119
119
|
|
|
120
120
|
/***/ }),
|
|
121
121
|
|
|
@@ -126,7 +126,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
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.LoadingDialog = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
129
|
+
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@10.10.90/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 // 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?");
|
|
130
130
|
|
|
131
131
|
/***/ }),
|
|
132
132
|
|
|
@@ -148,7 +148,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
148
148
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
149
149
|
|
|
150
150
|
"use strict";
|
|
151
|
-
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@10.10.
|
|
151
|
+
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@10.10.90/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 // Set the default properties\r\n this.setAutoClose(false);\r\n this.setBackdrop(true);\r\n this.setCloseButtonVisibility(true);\r\n this.setCloseEvent(null);\r\n this.setFocus(false);\r\n this.setIsCentered(true);\r\n this.setKeyboard(true);\r\n this.setScrollable(false);\r\n this.setType(gd_sprest_bs_1.Components.ModalTypes.Large);\r\n // Ensure the header, body and footer are visible\r\n this._elBody.classList.remove(\"d-none\");\r\n this._elFooter.classList.remove(\"d-none\");\r\n this._elHeader.classList.remove(\"d-none\");\r\n };\r\n // Hides the modal\r\n Modal.hide = function () {\r\n // Hide the modal\r\n this._modal.hide();\r\n // Call the close event\r\n this._onCloseEvent ? this._onCloseEvent() : null;\r\n };\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?");
|
|
152
152
|
|
|
153
153
|
/***/ }),
|
|
154
154
|
|
|
@@ -159,7 +159,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
159
159
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
160
160
|
|
|
161
161
|
"use strict";
|
|
162
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Timeout = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
162
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Timeout = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\nvar modal_1 = __webpack_require__(/*! ./modal */ \"./build/common/modal.js\");\r\n/**\r\n * Timeout\r\n */\r\nvar Timeout = /** @class */ (function () {\r\n function Timeout() {\r\n }\r\n // Shows the canvas\r\n Timeout.checkWeb = function () {\r\n var _this = this;\r\n // Query the current web\r\n (0, gd_sprest_bs_1.Web)().query({ Select: [\"Title\"] }).execute(\r\n // Success\r\n function () {\r\n // Log\r\n console.info(\"[Timeout] Successfully able to query the current web.\");\r\n }, \r\n // Error getting the web information\r\n // Display a modal\r\n function () {\r\n // Log\r\n console.error(\"[Timeout] Error getting the current web.\");\r\n // Clear the modal\r\n modal_1.Modal.clear();\r\n // Set the header\r\n modal_1.Modal.setHeader(\"Error Loading Web\");\r\n // Set the body\r\n modal_1.Modal.setBody(\"There was an error getting the current web. Please refresh the page.\");\r\n // Show the modal\r\n modal_1.Modal.show();\r\n // Stop the loop\r\n _this.stop();\r\n });\r\n };\r\n // Set the timeout value\r\n // Default value is 300000ms (5 min)\r\n Timeout.setTimer = function (timeout) {\r\n if (timeout === void 0) { timeout = 300000; }\r\n // Update the value\r\n this._timeout = timeout;\r\n };\r\n // Stops the timeout\r\n Timeout.stop = function () {\r\n // Ensure the loop id exists\r\n if (this._loopId) {\r\n // Stop the loop\r\n clearInterval(this._loopId);\r\n // Clear the loop id\r\n this._loopId = null;\r\n }\r\n };\r\n // Starts the timeout\r\n Timeout.start = function () {\r\n // Ensure it's not running\r\n if (this._loopId > 0) {\r\n return;\r\n }\r\n // Ensure the timer is set\r\n if (this._timeout == null) {\r\n // Set the default timer value\r\n this.setTimer();\r\n }\r\n // Start the interval\r\n this._loopId = setInterval(this.checkWeb, this._timeout);\r\n };\r\n Timeout._loopId = null;\r\n Timeout._timeout = null;\r\n return Timeout;\r\n}());\r\nexports.Timeout = Timeout;\r\n\n\n//# sourceURL=webpack://dattatable/./build/common/timeout.js?");
|
|
163
163
|
|
|
164
164
|
/***/ }),
|
|
165
165
|
|
|
@@ -170,7 +170,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
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.FilterSlideout = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
173
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/filter.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 // Parse the filters\r\n for (var i = 0; i < this._filters.length; i++) {\r\n var fltr = this._filters[i];\r\n // Add the filter\r\n this._items.push(this.generateItem(fltr));\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 // Render a clear button\r\n gd_sprest_bs_1.Components.Tooltip({\r\n el: this._el,\r\n content: \"Reset Filters\",\r\n placement: gd_sprest_bs_1.Components.TooltipPlacements.Left,\r\n btnProps: {\r\n className: \"float-end mt-3 p-1 pe-2\",\r\n iconClassName: \"me-1\",\r\n iconType: filter_1.filter,\r\n iconSize: 24,\r\n isSmall: true,\r\n text: \"Reset\",\r\n type: gd_sprest_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () {\r\n // Clear the filters\r\n _this.clear();\r\n }\r\n }\r\n });\r\n // Add the dark class if theme is inverted\r\n if (gd_sprest_bs_1.ThemeManager.IsInverted) {\r\n this._el.querySelectorAll(\"div.form-check.form-switch input[type=checkbox].form-check-input\").forEach(function (el) {\r\n el.classList.add(\"dark\");\r\n });\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 // Clears the filters\r\n FilterSlideout.prototype.clear = 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 // 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?");
|
|
174
174
|
|
|
175
175
|
/***/ }),
|
|
176
176
|
|
|
@@ -181,7 +181,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
181
181
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
182
182
|
|
|
183
183
|
"use strict";
|
|
184
|
-
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@10.10.
|
|
184
|
+
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@10.10.90/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?");
|
|
185
185
|
|
|
186
186
|
/***/ }),
|
|
187
187
|
|
|
@@ -192,7 +192,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
192
192
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
193
193
|
|
|
194
194
|
"use strict";
|
|
195
|
-
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@10.10.
|
|
195
|
+
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@10.10.90/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?");
|
|
196
196
|
|
|
197
197
|
/***/ }),
|
|
198
198
|
|
|
@@ -203,7 +203,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
203
203
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
204
204
|
|
|
205
205
|
"use strict";
|
|
206
|
-
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@10.10.89/node_modules/gd-sprest-bs/build/index.js\");\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./build/common/index.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 var _this = this;\r\n this._dt = null;\r\n this._filters = null;\r\n this._navigation = 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\" ? common_1.ItemForm.UseModal = props.useModal : null;\r\n // Render the dashboard\r\n this.render();\r\n // Let the object get instaniated before calling the event\r\n setTimeout(function () {\r\n // Call the render event\r\n props.onRendered ? props.onRendered(_this._props.el) : null;\r\n }, 10);\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 == true) && this._props.header == null ? false : true;\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 this._navigation = 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 searchPlaceholder: navProps_1.searchPlaceholder\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 Object.defineProperty(Dashboard.prototype, \"Datatable\", {\r\n /**\r\n * Component References\r\n */\r\n get: function () { return this._dt; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Dashboard.prototype, \"Filters\", {\r\n get: function () { return this._filters; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Dashboard.prototype, \"Navigation\", {\r\n get: function () { return this._navigation; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /**\r\n * Public Interface\r\n */\r\n // Clears the filters\r\n Dashboard.prototype.clearFilter = function () {\r\n // Clear the filters\r\n this._filters.clear();\r\n };\r\n // Filter the table\r\n Dashboard.prototype.filter = function (idx, value, exactMatchFl) {\r\n // Filter the table\r\n // If no value is specified, then we don't want to filter by exact value\r\n exactMatchFl && value ? this._dt.filterExact(idx, value) : this._dt.filter(idx, value);\r\n };\r\n // Filter the table by multiple values\r\n Dashboard.prototype.filterMulti = function (idx, values) {\r\n // Filter the table\r\n this._dt.filterMulti(idx, values);\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 // Returns the current search value\r\n Dashboard.prototype.getSearchValue = function () { return this._navigation ? this._navigation.getSearchValue() : \"\"; };\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 // See if a search value exists\r\n var searchValue = this._navigation ? this._navigation.getSearchValue() : \"\";\r\n if (searchValue) {\r\n // Apply the search value\r\n this.search(searchValue);\r\n }\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?");
|
|
206
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./build/common/index.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 var _this = this;\r\n this._dt = null;\r\n this._filters = null;\r\n this._navigation = 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\" ? common_1.ItemForm.UseModal = props.useModal : null;\r\n // Render the dashboard\r\n this.render();\r\n // Let the object get instaniated before calling the event\r\n setTimeout(function () {\r\n // Call the render event\r\n props.onRendered ? props.onRendered(_this._props.el) : null;\r\n }, 10);\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 == true) && this._props.header == null ? false : true;\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 this._navigation = 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 searchPlaceholder: navProps_1.searchPlaceholder\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 Object.defineProperty(Dashboard.prototype, \"Datatable\", {\r\n /**\r\n * Component References\r\n */\r\n get: function () { return this._dt; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Dashboard.prototype, \"Filters\", {\r\n get: function () { return this._filters; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Dashboard.prototype, \"Navigation\", {\r\n get: function () { return this._navigation; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n /**\r\n * Public Interface\r\n */\r\n // Clears the filters\r\n Dashboard.prototype.clearFilter = function () {\r\n // Clear the filters\r\n this._filters.clear();\r\n };\r\n // Filter the table\r\n Dashboard.prototype.filter = function (idx, value, exactMatchFl) {\r\n // Filter the table\r\n // If no value is specified, then we don't want to filter by exact value\r\n exactMatchFl && value ? this._dt.filterExact(idx, value) : this._dt.filter(idx, value);\r\n };\r\n // Filter the table by multiple values\r\n Dashboard.prototype.filterMulti = function (idx, values) {\r\n // Filter the table\r\n this._dt.filterMulti(idx, values);\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 // Returns the current search value\r\n Dashboard.prototype.getSearchValue = function () { return this._navigation ? this._navigation.getSearchValue() : \"\"; };\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 // See if a search value exists\r\n var searchValue = this._navigation ? this._navigation.getSearchValue() : \"\";\r\n if (searchValue) {\r\n // Apply the search value\r\n this.search(searchValue);\r\n }\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?");
|
|
207
207
|
|
|
208
208
|
/***/ }),
|
|
209
209
|
|
|
@@ -214,7 +214,7 @@ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create
|
|
|
214
214
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
215
215
|
|
|
216
216
|
"use strict";
|
|
217
|
-
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@10.10.
|
|
217
|
+
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@10.10.90/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@10.10.90/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: this._props.searchPlaceholder || \"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 this._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 this._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 ? ttp.el.addEventListener(\"click\", this._props.onShowFilter) : null;\r\n this._props.onFilterRendered ? this._props.onFilterRendered(span) : 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 /**\r\n * Public Interface\r\n */\r\n // Returns the current search value\r\n Navigation.prototype.getSearchValue = function () { return this._nav.getSearchValue(); };\r\n return Navigation;\r\n}());\r\nexports.Navigation = Navigation;\r\n\n\n//# sourceURL=webpack://dattatable/./build/dashboard/navigation.js?");
|
|
218
218
|
|
|
219
219
|
/***/ }),
|
|
220
220
|
|
|
@@ -225,7 +225,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
225
225
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
226
226
|
|
|
227
227
|
"use strict";
|
|
228
|
-
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@10.10.
|
|
228
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\n// DataTables.net\r\nvar $ = __webpack_require__(/*! jquery */ \"./node_modules/.pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.min.js\");\r\n__webpack_require__(/*! datatables.net */ \"./node_modules/.pnpm/datatables.net@1.13.7/node_modules/datatables.net/js/jquery.dataTables.min.js\");\r\n__webpack_require__(/*! datatables.net-bs5 */ \"./node_modules/.pnpm/datatables.net-bs5@1.13.7/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.replace(/[-[/\\]{}()*+?.,\\\\^$#\\s]/g, '\\\\$&'), true, false).draw();\r\n };\r\n // Filters the status\r\n DataTable.prototype.filterExact = function (idx, value) {\r\n if (value === void 0) { value = \"\"; }\r\n // Set the filter\r\n this._datatable.column(idx).search(\"^\" + value.replace(/[-[/\\]{}()*+?.,\\\\^$#\\s]/g, '\\\\$&') + \"$\", true, false).draw();\r\n };\r\n // Filters multiple values against the status\r\n DataTable.prototype.filterMulti = function (idx, values) {\r\n if (values === void 0) { values = []; }\r\n // Parse the values\r\n for (var i = 0; i < values.length; i++) {\r\n // Update the value\r\n values[i] = values[i].replace(/\\|/g, '\\\\$&');\r\n }\r\n // Filter the values\r\n this.filter(idx, values.join('|'));\r\n };\r\n // Method to reload the data\r\n DataTable.prototype.refresh = function (rows) {\r\n if (rows === void 0) { 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?");
|
|
229
229
|
|
|
230
230
|
/***/ }),
|
|
231
231
|
|
|
@@ -268,7 +268,7 @@ eval("(()=>{\"use strict\";var t,a,e,d,r,l,o,i,b,n,s,c,h,p,g={938:(t,a,e)=>{e.d(
|
|
|
268
268
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
269
269
|
|
|
270
270
|
"use strict";
|
|
271
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.waitForTheme = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
271
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.waitForTheme = void 0;\r\nvar gd_sprest_bs_1 = __webpack_require__(/*! gd-sprest-bs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js\");\r\n/** Apply the Current Theme */\r\nvar _themeLoaded = false;\r\ngd_sprest_bs_1.ThemeManager.load(true).then(function () { _themeLoaded = true; });\r\nfunction waitForTheme() {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // See if the flag is set\r\n if (_themeLoaded) {\r\n resolve();\r\n return;\r\n }\r\n // Wait for the theme to be loaded\r\n var counter = 0;\r\n var maxAttempts = 100;\r\n var loopId = setInterval(function () {\r\n // See if the theme was loaded\r\n if (_themeLoaded) {\r\n // Stop the loop\r\n clearInterval(loopId);\r\n // Resolve the request\r\n resolve();\r\n }\r\n // Else, see if we have hit the max attempts\r\n else if (++counter >= maxAttempts) {\r\n // Stop the loop\r\n clearInterval(loopId);\r\n // Resolve the request\r\n resolve();\r\n }\r\n }, 50);\r\n });\r\n}\r\nexports.waitForTheme = waitForTheme;\r\n\n\n//# sourceURL=webpack://dattatable/./build/theme.js?");
|
|
272
272
|
|
|
273
273
|
/***/ }),
|
|
274
274
|
|
|
@@ -1929,662 +1929,662 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
1929
1929
|
|
|
1930
1930
|
/***/ }),
|
|
1931
1931
|
|
|
1932
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1932
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/core.js":
|
|
1933
1933
|
/*!*****************************************************************************************************!*\
|
|
1934
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1934
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/core.js ***!
|
|
1935
1935
|
\*****************************************************************************************************/
|
|
1936
1936
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1937
1937
|
|
|
1938
1938
|
"use strict";
|
|
1939
|
-
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@6.4.8/node_modules/gd-bs/build/index.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1939
|
+
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@6.4.8/node_modules/gd-bs/build/index.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/core.js?");
|
|
1940
1940
|
|
|
1941
1941
|
/***/ }),
|
|
1942
1942
|
|
|
1943
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1943
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/datetime/index.js":
|
|
1944
1944
|
/*!***************************************************************************************************************!*\
|
|
1945
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1945
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/datetime/index.js ***!
|
|
1946
1946
|
\***************************************************************************************************************/
|
|
1947
1947
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1948
1948
|
|
|
1949
1949
|
"use strict";
|
|
1950
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DateTimeControlType = exports.DateTime = void 0;\r\n__webpack_require__(/*! flatpickr */ \"./node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/index.js\");\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/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 isDisabled: props.disabled,\r\n onChange: props.onChange\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 (props.value && 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 // See if we are disabling the component\r\n if (props.disabled) {\r\n // Remove the read-only setting set by the flatpickr\r\n textbox.elTextbox.readOnly = false;\r\n }\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.isDisabled || 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@10.10.
|
|
1950
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DateTimeControlType = exports.DateTime = void 0;\r\n__webpack_require__(/*! flatpickr */ \"./node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/index.js\");\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/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 isDisabled: props.disabled,\r\n onChange: props.onChange\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 (props.value && 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 // See if we are disabling the component\r\n if (props.disabled) {\r\n // Remove the read-only setting set by the flatpickr\r\n textbox.elTextbox.readOnly = false;\r\n }\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.isDisabled || 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@10.10.90/node_modules/gd-sprest-bs/build/components/datetime/index.js?");
|
|
1951
1951
|
|
|
1952
1952
|
/***/ }),
|
|
1953
1953
|
|
|
1954
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1954
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/field/index.js":
|
|
1955
1955
|
/*!************************************************************************************************************!*\
|
|
1956
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1956
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/field/index.js ***!
|
|
1957
1957
|
\************************************************************************************************************/
|
|
1958
1958
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1959
1959
|
|
|
1960
1960
|
"use strict";
|
|
1961
|
-
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar datetime_1 = __webpack_require__(/*! ../datetime */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar peoplePicker_1 = __webpack_require__(/*! ../peoplePicker */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js\");\r\nvar richTextBox_1 = __webpack_require__(/*! ../richTextBox */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/richTextBox/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 // Parse the selected values\r\n for (var i = 0; i < selectedValues.length; i++) {\r\n var existsFl = false;\r\n var selectedValue = selectedValues[i];\r\n // Parse the items\r\n for (var j = 0; j < items.length; j++) {\r\n var itemValue = isCheckbox ? items[j][\"label\"] : items[j][\"value\"];\r\n // See if the value exists\r\n if (selectedValue == itemValue) {\r\n // Set the flag\r\n existsFl = true;\r\n break;\r\n }\r\n }\r\n // Ensure a value exists and see if this was a fill-in choice\r\n if (!existsFl && selectedValue) {\r\n // See if this is a checkbox\r\n if (isCheckbox) {\r\n // Add the item\r\n items.push({\r\n isSelected: true,\r\n label: selectedValue\r\n });\r\n }\r\n else {\r\n // Add the item\r\n items.push({\r\n isSelected: true,\r\n label: selectedValue,\r\n text: selectedValue,\r\n value: selectedValue\r\n });\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 allowFillIn = props.field.FillInChoice;\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 // Add a blank entry if this is a dropdown\r\n if (!displayRadioButtons) {\r\n items = [{\r\n text: \"\",\r\n value: null\r\n }].concat(items);\r\n }\r\n // See if we are allowing custom values\r\n if (allowFillIn) {\r\n // Set the base validation\r\n baseValidation = function (ctrl, result) {\r\n // Update the value\r\n result.value = result.value && typeof (result.value.text) === \"string\" ? result.value.value : result.value;\r\n // See if a fill-in choice exists\r\n var fillInChoice = tbFillIn_1.getValue();\r\n if (fillInChoice) {\r\n // Override the value\r\n result.value = fillInChoice;\r\n }\r\n // See if this control is required\r\n if (ctrl.props.required) {\r\n // Update the flag\r\n result.isValid = result.value ? true : false;\r\n }\r\n // Return the result\r\n return result;\r\n };\r\n // Set the rendered event\r\n var tbFillIn_1 = null;\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Append a textbox\r\n tbFillIn_1 = core_1.Components.InputGroup({\r\n el: formControl.el,\r\n className: \"choice-fill-in\",\r\n placeholder: \"Fill In Choice\"\r\n });\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n }\r\n // Set the items\r\n controlProps.items = items;\r\n // Set the base validation\r\n baseValidation = function (ctrl, result) {\r\n // See if a selected item exists and the field is required\r\n if (result.value && ctrl.props.required) {\r\n // See if this is a dropdown\r\n if (ctrl.props.type == core_1.Components.FormControlTypes.Dropdown) {\r\n var ddlItem = result.value;\r\n // See if the text and value don't exist\r\n if (ddlItem.value || ddlItem.text ? false : true) {\r\n // Set the flag\r\n result.isValid = false;\r\n }\r\n }\r\n // Else, it's a switch\r\n else {\r\n var cbItem = result.value;\r\n // See if a value doesn't exist\r\n if (cbItem.label ? false : true) {\r\n // Set the flag\r\n result.isValid = false;\r\n }\r\n }\r\n }\r\n // Return the result\r\n return result;\r\n };\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 onControlRendering = controlProps.onControlRendering;\r\n controlProps.onControlRendering = function (tbProps) {\r\n // See if the currency exists in the field\r\n var shortName = props.field.TypeShortDescription;\r\n var matches = /\\(([^)]+)\\)/.exec(shortName);\r\n var symbol = matches.length > 0 ? matches[1] : \"$\";\r\n // Set the text\r\n tbProps.prependedLabel = symbol;\r\n // Call the event\r\n onControlRendering ? onControlRendering(tbProps) : null;\r\n // Set the validation event\r\n // Validate the extension\r\n baseValidation = function (ctrl, results) {\r\n // Ensure a value exists\r\n if (results.value) {\r\n // Ensure it's a valid currency value\r\n results.isValid = /(?=.*?\\d)^\\$?(([1-9]\\d{0,2}(,\\d{3})*)|\\d+)?(\\.\\d{1,2})?$/.test(results.value);\r\n results.invalidMessage = \"The currency format is not a valid.\";\r\n }\r\n // Return the results\r\n return results;\r\n };\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 // Image\r\n case gd_sprest_1.SPTypes.FieldType.Image:\r\n var fileInfo_1 = null;\r\n var imageValue_1 = controlProps.value;\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.TextField;\r\n controlProps.placeholder = \"Add an image\";\r\n controlProps.isDisabled = true;\r\n // Update the value\r\n if (controlProps.value) {\r\n // Update the value to only display the file name\r\n try {\r\n var imageProps = JSON.parse(controlProps.value);\r\n controlProps.value = imageProps.fileName;\r\n }\r\n catch (_a) { }\r\n }\r\n // Validate the extension\r\n baseValidation = function (ctrl, results) {\r\n // See if we are uploading a new file\r\n if (fileInfo_1) {\r\n // Ensure it's an image\r\n var info = fileInfo_1.name.split('.');\r\n var fileExt = info[info.length - 1].toLowerCase();\r\n if ([\"tiff\", \"pjp\", \"jfif\", \"bmp\", \"gif\", \"svg\", \"png\", \"xbm\", \"dib\", \"jxl\",\r\n \"jpeg\", \"svgz\", \"jpg\", \"webp\", \"ico\", \"tif\", \"pjpeg\", \"avif\"].indexOf(fileExt) < 0) {\r\n // Set the flag\r\n results.isValid = false;\r\n results.invalidMessage = \"The file must be an image.\";\r\n }\r\n }\r\n // Else, see if a value doesn't exist\r\n else if (results.value == null) {\r\n // Set the flag based on if it's required\r\n results.isValid = ctrl.props.required ? false : results.isValid;\r\n }\r\n // Return the results\r\n return results;\r\n };\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (ctrl) {\r\n // Append the edit button\r\n core_1.Components.Button({\r\n el: ctrl.textbox.el,\r\n type: core_1.Components.ButtonTypes.OutlineSecondary,\r\n text: \"Edit\",\r\n onClick: function () {\r\n // Show a file loader\r\n gd_sprest_1.Helper.ListForm.showFileDialog().then(function (file) {\r\n // Save the file info\r\n fileInfo_1 = file;\r\n fileInfo_1.fieldId = props.field.Id;\r\n fileInfo_1.fieldName = props.field.InternalName;\r\n // Set the value to the file name\r\n ctrl.textbox.setValue(file.name);\r\n });\r\n }\r\n });\r\n // Append the clear button\r\n core_1.Components.Button({\r\n el: ctrl.textbox.el,\r\n type: core_1.Components.ButtonTypes.OutlineSecondary,\r\n text: \"Clear\",\r\n onClick: function () {\r\n // Clear the value\r\n ctrl.textbox.setValue(\"\");\r\n fileInfo_1 = null;\r\n imageValue_1 = null;\r\n }\r\n });\r\n // Call the rendered event\r\n onControlRendered ? onControlRendered(ctrl) : null;\r\n };\r\n // Set the get value event\r\n controlProps.onGetValue = function () {\r\n // Return the file information\r\n return fileInfo_1 || imageValue_1;\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 = props.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 allowFillInMulti = props.field.FillInChoice;\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 // See if we are allowing custom values\r\n if (allowFillInMulti) {\r\n // Set the base validation\r\n baseValidation = function (ctrl, result) {\r\n // See if a fill-in choice exists\r\n var fillInChoice = tbFillIn_2.getValue();\r\n if (fillInChoice) {\r\n // Append the value\r\n result.value.push({\r\n isSelected: true,\r\n label: fillInChoice,\r\n text: fillInChoice,\r\n value: fillInChoice\r\n });\r\n }\r\n // See if this control is required\r\n if (ctrl.props.required) {\r\n // Update the flag\r\n result.isValid = result.value.length ? true : false;\r\n }\r\n // Return the result\r\n return result;\r\n };\r\n // Set the rendered event\r\n var tbFillIn_2 = null;\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Append a textbox\r\n tbFillIn_2 = core_1.Components.InputGroup({\r\n el: formControl.el,\r\n className: \"choice-fill-in\",\r\n placeholder: \"Fill In Choice\"\r\n });\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n }\r\n break;\r\n // Note\r\n case gd_sprest_1.SPTypes.FieldType.Note:\r\n var noteField = props.field;\r\n // See if this is plain text\r\n if (noteField.RichText) {\r\n var rtbProps = controlProps;\r\n var fullToolbar = noteField.SchemaXml.match(/RichTextMode=\"FullHtml\"/i) ? true : false;\r\n // Set the properties\r\n rtbProps.type = richTextBox_1.RichTextBoxControlType;\r\n rtbProps.toolbarType = fullToolbar ? richTextBox_1.RichTextBoxTypes.Full : richTextBox_1.RichTextBoxTypes.Basic;\r\n }\r\n else {\r\n // Set the properties\r\n controlProps.type = core_1.Components.FormControlTypes.TextArea;\r\n controlProps.rows = props.field.NumberOfLines;\r\n }\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 // See if there is a custom value\r\n if (controlProps && controlProps.onGetValue) {\r\n // Update the value\r\n fieldValue.value = controlProps.onGetValue(controlProps);\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 if (ddlValue.value || ddlValue.text) {\r\n // Update the field value\r\n fieldValue.value = ddlValue.value || ddlValue.text;\r\n }\r\n else {\r\n // Blank entry, clear the value\r\n fieldValue.value = null;\r\n }\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 && cbValue.label) {\r\n // Update the field value\r\n fieldValue.value = cbValue.label;\r\n }\r\n }\r\n // Get the fill-in option\r\n var elFillIn = control.el.querySelector(\".choice-fill-in input\");\r\n if (elFillIn && elFillIn.value) {\r\n // Set the value\r\n fieldValue.value = elFillIn.value;\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 // Image\r\n case gd_sprest_1.SPTypes.FieldType.Image:\r\n // Do nothing, there is a custom method in the list form component\r\n // to set this value\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 if (ddlValue && (ddlValue.value || ddlValue.text)) {\r\n // Add the values\r\n fieldValue.value.results.push(ddlValue.value || ddlValue.text);\r\n }\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 cbValue.label ? fieldValue.value.results.push(cbValue.label) : null;\r\n }\r\n }\r\n // Get the fill-in option\r\n var elFillInMulti = control.el.querySelector(\".choice-fill-in input\");\r\n if (elFillInMulti && elFillInMulti.value) {\r\n // Append the value\r\n fieldValue.value.results.push(elFillInMulti.value);\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: control.isValid, value: control.getValue() });\r\n // Validate the current control\r\n var result = controlProps && 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 // See if custom validation exists\r\n if (controlProps.onValidate) {\r\n // Call the custom validation event\r\n var value = controlProps.onGetValue ? controlProps.onGetValue(controlProps) : control ? control.getValue() : null;\r\n var result = controlProps.onValidate(controlProps, { isValid: control ? control.isValid : false, value: value });\r\n // Return the flag\r\n if (typeof (result) === \"boolean\") {\r\n // Return the result\r\n return result;\r\n }\r\n // Return the flag\r\n return result ? result.isValid : false;\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@10.10.89/node_modules/gd-sprest-bs/build/components/field/index.js?");
|
|
1961
|
+
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar datetime_1 = __webpack_require__(/*! ../datetime */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar peoplePicker_1 = __webpack_require__(/*! ../peoplePicker */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js\");\r\nvar richTextBox_1 = __webpack_require__(/*! ../richTextBox */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/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 // Parse the selected values\r\n for (var i = 0; i < selectedValues.length; i++) {\r\n var existsFl = false;\r\n var selectedValue = selectedValues[i];\r\n // Parse the items\r\n for (var j = 0; j < items.length; j++) {\r\n var itemValue = isCheckbox ? items[j][\"label\"] : items[j][\"value\"];\r\n // See if the value exists\r\n if (selectedValue == itemValue) {\r\n // Set the flag\r\n existsFl = true;\r\n break;\r\n }\r\n }\r\n // Ensure a value exists and see if this was a fill-in choice\r\n if (!existsFl && selectedValue) {\r\n // See if this is a checkbox\r\n if (isCheckbox) {\r\n // Add the item\r\n items.push({\r\n isSelected: true,\r\n label: selectedValue\r\n });\r\n }\r\n else {\r\n // Add the item\r\n items.push({\r\n isSelected: true,\r\n label: selectedValue,\r\n text: selectedValue,\r\n value: selectedValue\r\n });\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 allowFillIn = props.field.FillInChoice;\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 // Add a blank entry if this is a dropdown\r\n if (!displayRadioButtons) {\r\n items = [{\r\n text: \"\",\r\n value: null\r\n }].concat(items);\r\n }\r\n // See if we are allowing custom values\r\n if (allowFillIn) {\r\n // Set the base validation\r\n baseValidation = function (ctrl, result) {\r\n // Update the value\r\n result.value = result.value && typeof (result.value.text) === \"string\" ? result.value.value : result.value;\r\n // See if a fill-in choice exists\r\n var fillInChoice = tbFillIn_1.getValue();\r\n if (fillInChoice) {\r\n // Override the value\r\n result.value = fillInChoice;\r\n }\r\n // See if this control is required\r\n if (ctrl.props.required) {\r\n // Update the flag\r\n result.isValid = result.value ? true : false;\r\n }\r\n // Return the result\r\n return result;\r\n };\r\n // Set the rendered event\r\n var tbFillIn_1 = null;\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Append a textbox\r\n tbFillIn_1 = core_1.Components.InputGroup({\r\n el: formControl.el,\r\n className: \"choice-fill-in\",\r\n placeholder: \"Fill In Choice\"\r\n });\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n }\r\n // Set the items\r\n controlProps.items = items;\r\n // Set the base validation\r\n baseValidation = function (ctrl, result) {\r\n // See if a selected item exists and the field is required\r\n if (result.value && ctrl.props.required) {\r\n // See if this is a dropdown\r\n if (ctrl.props.type == core_1.Components.FormControlTypes.Dropdown) {\r\n var ddlItem = result.value;\r\n // See if the text and value don't exist\r\n if (ddlItem.value || ddlItem.text ? false : true) {\r\n // Set the flag\r\n result.isValid = false;\r\n }\r\n }\r\n // Else, it's a switch\r\n else {\r\n var cbItem = result.value;\r\n // See if a value doesn't exist\r\n if (cbItem.label ? false : true) {\r\n // Set the flag\r\n result.isValid = false;\r\n }\r\n }\r\n }\r\n // Return the result\r\n return result;\r\n };\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 onControlRendering = controlProps.onControlRendering;\r\n controlProps.onControlRendering = function (tbProps) {\r\n // See if the currency exists in the field\r\n var shortName = props.field.TypeShortDescription;\r\n var matches = /\\(([^)]+)\\)/.exec(shortName);\r\n var symbol = matches.length > 0 ? matches[1] : \"$\";\r\n // Set the text\r\n tbProps.prependedLabel = symbol;\r\n // Call the event\r\n onControlRendering ? onControlRendering(tbProps) : null;\r\n // Set the validation event\r\n // Validate the extension\r\n baseValidation = function (ctrl, results) {\r\n // Ensure a value exists\r\n if (results.value) {\r\n // Ensure it's a valid currency value\r\n results.isValid = /(?=.*?\\d)^\\$?(([1-9]\\d{0,2}(,\\d{3})*)|\\d+)?(\\.\\d{1,2})?$/.test(results.value);\r\n results.invalidMessage = \"The currency format is not a valid.\";\r\n }\r\n // Return the results\r\n return results;\r\n };\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 // Image\r\n case gd_sprest_1.SPTypes.FieldType.Image:\r\n var fileInfo_1 = null;\r\n var imageValue_1 = controlProps.value;\r\n // Set the type\r\n controlProps.type = core_1.Components.FormControlTypes.TextField;\r\n controlProps.placeholder = \"Add an image\";\r\n controlProps.isDisabled = true;\r\n // Update the value\r\n if (controlProps.value) {\r\n // Update the value to only display the file name\r\n try {\r\n var imageProps = JSON.parse(controlProps.value);\r\n controlProps.value = imageProps.fileName;\r\n }\r\n catch (_a) { }\r\n }\r\n // Validate the extension\r\n baseValidation = function (ctrl, results) {\r\n // See if we are uploading a new file\r\n if (fileInfo_1) {\r\n // Ensure it's an image\r\n var info = fileInfo_1.name.split('.');\r\n var fileExt = info[info.length - 1].toLowerCase();\r\n if ([\"tiff\", \"pjp\", \"jfif\", \"bmp\", \"gif\", \"svg\", \"png\", \"xbm\", \"dib\", \"jxl\",\r\n \"jpeg\", \"svgz\", \"jpg\", \"webp\", \"ico\", \"tif\", \"pjpeg\", \"avif\"].indexOf(fileExt) < 0) {\r\n // Set the flag\r\n results.isValid = false;\r\n results.invalidMessage = \"The file must be an image.\";\r\n }\r\n }\r\n // Else, see if a value doesn't exist\r\n else if (results.value == null) {\r\n // Set the flag based on if it's required\r\n results.isValid = ctrl.props.required ? false : results.isValid;\r\n }\r\n // Return the results\r\n return results;\r\n };\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (ctrl) {\r\n // Append the edit button\r\n core_1.Components.Button({\r\n el: ctrl.textbox.el,\r\n type: core_1.Components.ButtonTypes.OutlineSecondary,\r\n text: \"Edit\",\r\n onClick: function () {\r\n // Show a file loader\r\n gd_sprest_1.Helper.ListForm.showFileDialog().then(function (file) {\r\n // Save the file info\r\n fileInfo_1 = file;\r\n fileInfo_1.fieldId = props.field.Id;\r\n fileInfo_1.fieldName = props.field.InternalName;\r\n // Set the value to the file name\r\n ctrl.textbox.setValue(file.name);\r\n });\r\n }\r\n });\r\n // Append the clear button\r\n core_1.Components.Button({\r\n el: ctrl.textbox.el,\r\n type: core_1.Components.ButtonTypes.OutlineSecondary,\r\n text: \"Clear\",\r\n onClick: function () {\r\n // Clear the value\r\n ctrl.textbox.setValue(\"\");\r\n fileInfo_1 = null;\r\n imageValue_1 = null;\r\n }\r\n });\r\n // Call the rendered event\r\n onControlRendered ? onControlRendered(ctrl) : null;\r\n };\r\n // Set the get value event\r\n controlProps.onGetValue = function () {\r\n // Return the file information\r\n return fileInfo_1 || imageValue_1;\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 = props.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 allowFillInMulti = props.field.FillInChoice;\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 // See if we are allowing custom values\r\n if (allowFillInMulti) {\r\n // Set the base validation\r\n baseValidation = function (ctrl, result) {\r\n // See if a fill-in choice exists\r\n var fillInChoice = tbFillIn_2.getValue();\r\n if (fillInChoice) {\r\n // Append the value\r\n result.value.push({\r\n isSelected: true,\r\n label: fillInChoice,\r\n text: fillInChoice,\r\n value: fillInChoice\r\n });\r\n }\r\n // See if this control is required\r\n if (ctrl.props.required) {\r\n // Update the flag\r\n result.isValid = result.value.length ? true : false;\r\n }\r\n // Return the result\r\n return result;\r\n };\r\n // Set the rendered event\r\n var tbFillIn_2 = null;\r\n onControlRendered = controlProps.onControlRendered;\r\n controlProps.onControlRendered = function (formControl) {\r\n // Append a textbox\r\n tbFillIn_2 = core_1.Components.InputGroup({\r\n el: formControl.el,\r\n className: \"choice-fill-in\",\r\n placeholder: \"Fill In Choice\"\r\n });\r\n // Call the event\r\n onControlRendered ? onControlRendered(formControl) : null;\r\n };\r\n }\r\n break;\r\n // Note\r\n case gd_sprest_1.SPTypes.FieldType.Note:\r\n var noteField = props.field;\r\n // See if this is plain text\r\n if (noteField.RichText) {\r\n var rtbProps = controlProps;\r\n var fullToolbar = noteField.SchemaXml.match(/RichTextMode=\"FullHtml\"/i) ? true : false;\r\n // Set the properties\r\n rtbProps.type = richTextBox_1.RichTextBoxControlType;\r\n rtbProps.toolbarType = fullToolbar ? richTextBox_1.RichTextBoxTypes.Full : richTextBox_1.RichTextBoxTypes.Basic;\r\n }\r\n else {\r\n // Set the properties\r\n controlProps.type = core_1.Components.FormControlTypes.TextArea;\r\n controlProps.rows = props.field.NumberOfLines;\r\n }\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 // See if there is a custom value\r\n if (controlProps && controlProps.onGetValue) {\r\n // Update the value\r\n fieldValue.value = controlProps.onGetValue(controlProps);\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 if (ddlValue.value || ddlValue.text) {\r\n // Update the field value\r\n fieldValue.value = ddlValue.value || ddlValue.text;\r\n }\r\n else {\r\n // Blank entry, clear the value\r\n fieldValue.value = null;\r\n }\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 && cbValue.label) {\r\n // Update the field value\r\n fieldValue.value = cbValue.label;\r\n }\r\n }\r\n // Get the fill-in option\r\n var elFillIn = control.el.querySelector(\".choice-fill-in input\");\r\n if (elFillIn && elFillIn.value) {\r\n // Set the value\r\n fieldValue.value = elFillIn.value;\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 // Image\r\n case gd_sprest_1.SPTypes.FieldType.Image:\r\n // Do nothing, there is a custom method in the list form component\r\n // to set this value\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 if (ddlValue && (ddlValue.value || ddlValue.text)) {\r\n // Add the values\r\n fieldValue.value.results.push(ddlValue.value || ddlValue.text);\r\n }\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 cbValue.label ? fieldValue.value.results.push(cbValue.label) : null;\r\n }\r\n }\r\n // Get the fill-in option\r\n var elFillInMulti = control.el.querySelector(\".choice-fill-in input\");\r\n if (elFillInMulti && elFillInMulti.value) {\r\n // Append the value\r\n fieldValue.value.results.push(elFillInMulti.value);\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: control.isValid, value: control.getValue() });\r\n // Validate the current control\r\n var result = controlProps && 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 // See if custom validation exists\r\n if (controlProps.onValidate) {\r\n // Call the custom validation event\r\n var value = controlProps.onGetValue ? controlProps.onGetValue(controlProps) : control ? control.getValue() : null;\r\n var result = controlProps.onValidate(controlProps, { isValid: control ? control.isValid : false, value: value });\r\n // Return the flag\r\n if (typeof (result) === \"boolean\") {\r\n // Return the result\r\n return result;\r\n }\r\n // Return the flag\r\n return result ? result.isValid : false;\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@10.10.90/node_modules/gd-sprest-bs/build/components/field/index.js?");
|
|
1962
1962
|
|
|
1963
1963
|
/***/ }),
|
|
1964
1964
|
|
|
1965
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1965
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/index.js":
|
|
1966
1966
|
/*!******************************************************************************************************!*\
|
|
1967
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1967
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/index.js ***!
|
|
1968
1968
|
\******************************************************************************************************/
|
|
1969
1969
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1970
1970
|
|
|
1971
1971
|
"use strict";
|
|
1972
|
-
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@10.10.
|
|
1972
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar field_1 = __webpack_require__(/*! ./field */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/field/index.js\");\r\nvar listForm_1 = __webpack_require__(/*! ./listForm */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/listForm/index.js\");\r\nvar listFormDialog_1 = __webpack_require__(/*! ./listFormDialog */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/listFormDialog/index.js\");\r\nvar peoplePicker_1 = __webpack_require__(/*! ./peoplePicker */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js\");\r\nvar richTextBox_1 = __webpack_require__(/*! ./richTextBox */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/index.js\");\r\n// Extend the core components\r\nvar core_1 = __webpack_require__(/*! ./core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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\ncore_1.Components[\"RichTextBox\"] = richTextBox_1.RichTextBox;\r\ncore_1.Components[\"RichTextBoxTypes\"] = richTextBox_1.RichTextBoxTypes;\r\n// Export the components\r\nvar core_2 = __webpack_require__(/*! ./core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/components/index.js?");
|
|
1973
1973
|
|
|
1974
1974
|
/***/ }),
|
|
1975
1975
|
|
|
1976
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1976
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/listFormDialog/index.js":
|
|
1977
1977
|
/*!*********************************************************************************************************************!*\
|
|
1978
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1978
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/listFormDialog/index.js ***!
|
|
1979
1979
|
\*********************************************************************************************************************/
|
|
1980
1980
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1981
1981
|
|
|
1982
1982
|
"use strict";
|
|
1983
|
-
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1983
|
+
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar listForm_1 = __webpack_require__(/*! ../listForm */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/components/listFormDialog/index.js?");
|
|
1984
1984
|
|
|
1985
1985
|
/***/ }),
|
|
1986
1986
|
|
|
1987
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1987
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/listForm/index.js":
|
|
1988
1988
|
/*!***************************************************************************************************************!*\
|
|
1989
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1989
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/listForm/index.js ***!
|
|
1990
1990
|
\***************************************************************************************************************/
|
|
1991
1991
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
1992
1992
|
|
|
1993
1993
|
"use strict";
|
|
1994
|
-
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.ListForm = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar datetime_1 = __webpack_require__(/*! ../datetime */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar field_1 = __webpack_require__(/*! ../field */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/field/index.js\");\r\nvar richTextBox_1 = __webpack_require__(/*! ../richTextBox */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/richTextBox/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 // See if an event exists\r\n if (props.onGetFields) {\r\n // Call the event\r\n fieldNames = props.onGetFields(fieldNames);\r\n }\r\n // Return the field names\r\n return fieldNames;\r\n};\r\n// Method to render the display control\r\nvar renderDisplay = function (fieldName, props) {\r\n var control = null;\r\n var field = props.info.fields[fieldName];\r\n var isRichText = field ? field.RichText : false;\r\n var value = props.info.fieldValuesAsText ? props.info.fieldValuesAsText[fieldName] || \"\" : \"\";\r\n var html = props.info.fieldValuesAsHtml ? props.info.fieldValuesAsHtml[fieldName] || props.info.fieldValuesAsHtml[fieldName.replace(/\\_/g, \"_x005f_\")] || \"\" : \"\";\r\n // Ensure the field exists\r\n if (field == null) {\r\n // See if a value was found\r\n if (value || html) {\r\n // Return a read-only control\r\n return {\r\n data: value || html,\r\n isDisabled: true,\r\n label: fieldName,\r\n name: fieldName,\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: value || html\r\n };\r\n }\r\n // Log\r\n console.warn(\"[List Form] Field '\" + fieldName + \"' does not exist. Check the list or query.\");\r\n return control;\r\n }\r\n // See if we are hiding the field\r\n if (field.SchemaXml.indexOf('ShowInDisplayForm=\"FALSE\"') > 0) {\r\n return control;\r\n }\r\n // See if this is an image field\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Image) {\r\n // Ensure a value exists\r\n if (value) {\r\n // Update the html\r\n try {\r\n var imgInfo = JSON.parse(value);\r\n html = \"<img style='height: 64px; width: 64px;' src='\" + imgInfo.serverRelativeUrl + \"' alt='\" + imgInfo.fileName + \"' />\";\r\n }\r\n catch (_a) { }\r\n }\r\n }\r\n // Else, see if this is a note field\r\n else 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 .replace(/"/g, '\"');\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 control = {\r\n data: html,\r\n description: field.Description,\r\n isDisabled: 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 control.showTime = field.DisplayFormat == gd_sprest_1.SPTypes.DateFormat.DateTime ? true : false;\r\n // Set the type\r\n control.type = datetime_1.DateTimeControlType;\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.Lookup:\r\n // Ensure a value exists\r\n if (html) {\r\n // Create an element to store the html\r\n var elLookup = document.createElement(\"div\");\r\n elLookup.innerHTML = html;\r\n // Update the value to be text\r\n html = elLookup.innerText;\r\n control.data = html;\r\n control.value = html;\r\n }\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.Note:\r\n // See if this is a rich text field\r\n if (isRichText) {\r\n // Set the properties\r\n control.toolbarType = richTextBox_1.RichTextBoxTypes.None;\r\n control.type = richTextBox_1.RichTextBoxControlType;\r\n }\r\n else {\r\n // Set the type\r\n control.type = core_1.Components.FormControlTypes.TextArea;\r\n }\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.URL:\r\n // Set the value\r\n var urlValue = props.info.item[fieldName];\r\n html = urlValue ? urlValue.Url : html;\r\n control.value = html;\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n // Set the type\r\n control.type = field.AllowMultipleValues ? core_1.Components.FormControlTypes.TextArea : control.type;\r\n break;\r\n }\r\n // Detect html\r\n if (/<*>/g.test(html)) {\r\n var isMultiLine = html.indexOf(\"<br />\") >= 0 ? true : false;\r\n // See if it's an image\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Image) {\r\n // Set the rendered event\r\n control.onControlRendered = function (control) {\r\n // Override the html rendered\r\n control.el.innerHTML = html;\r\n };\r\n }\r\n // Else, ensure this isn't a rich text field or multi-line\r\n else if (!isRichText && !isMultiLine) {\r\n // Update the control to be read-only\r\n control.type = core_1.Components.FormControlTypes.Readonly;\r\n // Set the rendered event\r\n control.onControlRendered = function (control) {\r\n // Get the target element\r\n var elTarget = control.el.querySelector(\"input\") || control.el;\r\n // Override the html rendered\r\n elTarget.innerHTML = control.props.data;\r\n };\r\n }\r\n else {\r\n // Update the html break line\r\n html = html.replace(/<br \\/>/g, '\\n');\r\n control.data = html;\r\n control.value = html;\r\n }\r\n }\r\n // Else, detect xml\r\n else if (/<|>|&|"/i.test(html)) {\r\n // Update the value\r\n control.value = html.replace(/</ig, '<')\r\n .replace(/>/ig, '>')\r\n .replace(/&/ig, '&')\r\n .replace(/"/ig, '\"');\r\n }\r\n // Return the control\r\n return control;\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 // Method to generate the attachments row\r\n var generateAttachmentsRow = function () {\r\n // See if we are rendering attachments\r\n var displayAttachments = typeof (props.displayAttachments) === \"boolean\" ? props.displayAttachments : true;\r\n if (props.info.attachments && displayAttachments) {\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 };\r\n // Get the fields to render\r\n var fieldNames = getFieldsToRender(props);\r\n // Parse the fields to render\r\n for (var i = 0; i < fieldNames.length; i++) {\r\n var fieldName = fieldNames[i];\r\n // See if this is the attachment field\r\n if (fieldName == \"Attachments\") {\r\n // Generate the attachments row\r\n generateAttachmentsRow();\r\n continue;\r\n }\r\n // Generate the control\r\n var control = renderDisplay(fieldName, props);\r\n if (control) {\r\n // Update the mapper\r\n mapper[fieldName] = control;\r\n // Add the row\r\n rows.push({\r\n columns: [{ control: control }]\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 getControl: function (fieldName) { return form ? form.getControl(fieldName) : null; }\r\n };\r\n};\r\n// Render the edit form\r\nexports.ListForm.renderEditForm = function (props) {\r\n var customControls = [];\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 // Method to upload the images\r\n var images = [];\r\n var uploadImages = function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n var values = {};\r\n // Ensure we have images\r\n if (images.length == 0) {\r\n // Do nothing\r\n resolve(values);\r\n return;\r\n }\r\n // Get the list folder\r\n gd_sprest_1.Helper.ListFormField.getOrCreateImageFolder(info).then(function (fld) {\r\n // Removes the existing image\r\n var removeExisting = function (value) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Try to get the image info\r\n var imageInfo = null;\r\n try {\r\n imageInfo = JSON.parse(value);\r\n }\r\n catch (_a) { }\r\n // Ensure the info exists\r\n if (imageInfo) {\r\n // See if the file exists\r\n fld.Files(imageInfo.fileName).execute(\r\n // Exists\r\n function (file) {\r\n // Delete the file\r\n file.delete().execute(function () {\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n }, \r\n // Doesn't exist\r\n function () {\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n }\r\n else {\r\n // Resolve the request\r\n resolve(null);\r\n }\r\n });\r\n };\r\n // Validates the list name\r\n var validateFileName = function (fileName) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the file name w/out the extension\r\n var info = fileName.toLowerCase().split('.');\r\n var fileExt = info[info.length - 1];\r\n var fileNameNoExt = \"\";\r\n for (var i = 0; i < info.length - 1; i++) {\r\n fileNameNoExt += info[i];\r\n }\r\n // Get the files with a similar name\r\n fld.Files().query({\r\n Filter: \"startswith(Name, '\" + fileNameNoExt + \"')\",\r\n Top: 5000\r\n }).execute(function (files) {\r\n var isValid = true;\r\n var counter = -1;\r\n var validFileName = null;\r\n // See if no files were found\r\n if (files.results.length == 0) {\r\n // Resolve the request\r\n resolve(fileName);\r\n return;\r\n }\r\n // Loop until it's valid\r\n do {\r\n // Reset the flag and file name\r\n validFileName = fileNameNoExt + (++counter == 0 ? \"\" : counter) + \".\" + fileExt;\r\n isValid = true;\r\n // Parse the files\r\n for (var i = 0; i < files.results.length; i++) {\r\n var file = files.results[i];\r\n // See if there is a match\r\n if (file.Name.toLowerCase() == validFileName) {\r\n // Set the flag\r\n isValid = false;\r\n break;\r\n }\r\n }\r\n } while (!isValid);\r\n // Resolve the request\r\n resolve(validFileName);\r\n });\r\n });\r\n };\r\n // Parse the images\r\n gd_sprest_1.Helper.Executor(images, function (imageInfo) {\r\n // See if this is a file that needs to be uploaded\r\n if (imageInfo.name && imageInfo.data && imageInfo.fieldName) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Remove the existing image\r\n removeExisting(info.item ? info.item[imageInfo.fieldName] : null).then(function () {\r\n // Validate the name\r\n validateFileName(imageInfo.name).then(function (fileName) {\r\n // Upload the file\r\n fld.Files().add(fileName, true, imageInfo.data).execute(function (file) {\r\n // Update the field value\r\n values[imageInfo.fieldName] = JSON.stringify({\r\n fieldId: imageInfo.fieldId,\r\n fieldName: imageInfo.fieldName,\r\n fileName: file.Name,\r\n id: file.UniqueId,\r\n nativeFile: {},\r\n serverRelativeUrl: file.ServerRelativeUrl,\r\n type: \"thumbnail\"\r\n });\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n });\r\n });\r\n });\r\n }\r\n }).then(function () {\r\n // Resolve the request\r\n resolve(values);\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 // Generates the attachments row\r\n var generateAttachmentsRow = function () {\r\n // See if we are rendering attachments\r\n var displayAttachments = typeof (props.displayAttachments) === \"boolean\" ? props.displayAttachments : true;\r\n var attachmentsExist = props.info.item == null ? true : (props.info.attachments ? true : false);\r\n if (attachmentsExist && displayAttachments) {\r\n // Set a default field\r\n // This will help w/ the onControlRendering/ed events to not have a null value for this parameter\r\n props.info.fields[\"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 file-attachment\",\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.file-attachment\");\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 var itemAttachments = props.info.attachments || [];\r\n for (var i = 0; i < itemAttachments.length; i++) {\r\n var attachment = itemAttachments[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 file-attachment\",\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.file-attachment\");\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 };\r\n // Get the fields to render\r\n var fieldNames = getFieldsToRender(props);\r\n // Parse the fields to render\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 // See if this is the attachment field\r\n if (fieldName == \"Attachments\") {\r\n // Generate the attachments row\r\n generateAttachmentsRow();\r\n continue;\r\n }\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 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 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 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 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 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 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 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 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 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 // See if there is a custom event for setting the value\r\n if (props.onSetFieldDefaultValue) {\r\n // Call the event to override the value\r\n value[fieldName] = props.onSetFieldDefaultValue(field, value[fieldName]);\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 lookupFilter: lookupFilter,\r\n value: value[fieldName],\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 // 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 // Get the control display properties\r\n var dispControl = renderDisplay(control.name, props);\r\n if (dispControl) {\r\n // Update the properties\r\n control.data = dispControl.data;\r\n control.label = dispControl.label;\r\n control.showTime = dispControl.showTime;\r\n control.type = dispControl.type;\r\n control.value = dispControl.value;\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 // Clear the image values\r\n images = [];\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 // See if this is an image field\r\n var field = props.info.fields[fieldName];\r\n if (field && field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Image) {\r\n // Add the value if it exists\r\n fieldValue.value ? images.push(fieldValue.value) : null;\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) {\r\n // Append the controls\r\n form.appendControls(controls);\r\n // Wait for the controls to be loaded\r\n setTimeout(function () {\r\n // Parse the new controls\r\n for (var i = 0; i < controls.length; i++) {\r\n var control = controls[i].name ? form.getControl(controls[i].name) : null;\r\n if (control) {\r\n // Append the control\r\n customControls.push(control);\r\n }\r\n }\r\n }, 10);\r\n },\r\n appendRows: function (rows) {\r\n // Append the controls\r\n form.appendRows(rows);\r\n // Wait for the controls to be loaded\r\n setTimeout(function () {\r\n // Parse the rows\r\n for (var i = 0; i < rows.length; i++) {\r\n // Parse the columns\r\n var columns = rows[i].columns;\r\n for (var j = 0; j < columns.length; j++) {\r\n // Get the control\r\n var control = columns[j].control && columns[j].control.name ? form.getControl(columns[j].control.name) : null;\r\n if (control) {\r\n // Append the control\r\n customControls.push(control);\r\n }\r\n }\r\n }\r\n }, 10);\r\n },\r\n el: form.el,\r\n getControl: function (fieldName) {\r\n // See if it's in the mapper\r\n if (mapper[fieldName]) {\r\n // Return the control\r\n return mapper[fieldName].control;\r\n }\r\n // Parse the custom controls\r\n for (var i = 0; i < customControls.length; i++) {\r\n var control = customControls[i];\r\n // See if this is the target control\r\n if (control.props.name == fieldName) {\r\n // Return the control\r\n return control;\r\n }\r\n }\r\n // Not found\r\n return null;\r\n },\r\n getItem: function () { return props.info.item; },\r\n getValues: getValues,\r\n hasAttachments: function () {\r\n // Return if attachments exist\r\n return attachments && (attachments.delete.length > 0 || attachments.new.length > 0);\r\n },\r\n insertControl: function (idx, control) {\r\n // Append the controls\r\n form.insertControl(idx, control);\r\n // Wait for the controls to be loaded\r\n setTimeout(function () {\r\n var newControl = control.name ? form.getControl(control.name) : null;\r\n if (newControl) {\r\n // Append the control\r\n customControls.push(newControl);\r\n }\r\n }, 10);\r\n },\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 // Update the flag\r\n isValid = isValid && controlIsValid;\r\n }\r\n // Parse the custom controls\r\n for (var i = 0; i < customControls.length; i++) {\r\n // Validate the form field and update the status flag\r\n var controlIsValid = customControls[i].isValid;\r\n isValid = isValid && controlIsValid;\r\n }\r\n // Return the flag\r\n return isValid;\r\n },\r\n save: function (customValues) {\r\n if (customValues === void 0) { customValues = {}; }\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 var formValues = getValues();\r\n // Upload the images\r\n uploadImages(props.info).then(function (imageValues) {\r\n // Call the saving event\r\n onSaving(__assign(__assign(__assign({}, formValues), imageValues), customValues)).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 };\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@10.10.89/node_modules/gd-sprest-bs/build/components/listForm/index.js?");
|
|
1994
|
+
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.ListForm = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/core.js\");\r\nvar datetime_1 = __webpack_require__(/*! ../datetime */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/datetime/index.js\");\r\nvar field_1 = __webpack_require__(/*! ../field */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/field/index.js\");\r\nvar richTextBox_1 = __webpack_require__(/*! ../richTextBox */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/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 // See if an event exists\r\n if (props.onGetFields) {\r\n // Call the event\r\n fieldNames = props.onGetFields(fieldNames);\r\n }\r\n // Return the field names\r\n return fieldNames;\r\n};\r\n// Method to render the display control\r\nvar renderDisplay = function (fieldName, props) {\r\n var control = null;\r\n var field = props.info.fields[fieldName];\r\n var isRichText = field ? field.RichText : false;\r\n var value = props.info.fieldValuesAsText ? props.info.fieldValuesAsText[fieldName] || \"\" : \"\";\r\n var html = props.info.fieldValuesAsHtml ? props.info.fieldValuesAsHtml[fieldName] || props.info.fieldValuesAsHtml[fieldName.replace(/\\_/g, \"_x005f_\")] || \"\" : \"\";\r\n // Ensure the field exists\r\n if (field == null) {\r\n // See if a value was found\r\n if (value || html) {\r\n // Return a read-only control\r\n return {\r\n data: value || html,\r\n isDisabled: true,\r\n label: fieldName,\r\n name: fieldName,\r\n type: core_1.Components.FormControlTypes.TextField,\r\n value: value || html\r\n };\r\n }\r\n // Log\r\n console.warn(\"[List Form] Field '\" + fieldName + \"' does not exist. Check the list or query.\");\r\n return control;\r\n }\r\n // See if we are hiding the field\r\n if (field.SchemaXml.indexOf('ShowInDisplayForm=\"FALSE\"') > 0) {\r\n return control;\r\n }\r\n // See if this is an image field\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Image) {\r\n // Ensure a value exists\r\n if (value) {\r\n // Update the html\r\n try {\r\n var imgInfo = JSON.parse(value);\r\n html = \"<img style='height: 64px; width: 64px;' src='\" + imgInfo.serverRelativeUrl + \"' alt='\" + imgInfo.fileName + \"' />\";\r\n }\r\n catch (_a) { }\r\n }\r\n }\r\n // Else, see if this is a note field\r\n else 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 .replace(/"/g, '\"');\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 control = {\r\n data: html,\r\n description: field.Description,\r\n isDisabled: 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 control.showTime = field.DisplayFormat == gd_sprest_1.SPTypes.DateFormat.DateTime ? true : false;\r\n // Set the type\r\n control.type = datetime_1.DateTimeControlType;\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.Lookup:\r\n // Ensure a value exists\r\n if (html) {\r\n // Create an element to store the html\r\n var elLookup = document.createElement(\"div\");\r\n elLookup.innerHTML = html;\r\n // Update the value to be text\r\n html = elLookup.innerText;\r\n control.data = html;\r\n control.value = html;\r\n }\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.Note:\r\n // See if this is a rich text field\r\n if (isRichText) {\r\n // Set the properties\r\n control.toolbarType = richTextBox_1.RichTextBoxTypes.None;\r\n control.type = richTextBox_1.RichTextBoxControlType;\r\n }\r\n else {\r\n // Set the type\r\n control.type = core_1.Components.FormControlTypes.TextArea;\r\n }\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.URL:\r\n // Set the value\r\n var urlValue = props.info.item[fieldName];\r\n html = urlValue ? urlValue.Url : html;\r\n control.value = html;\r\n break;\r\n case gd_sprest_1.SPTypes.FieldType.User:\r\n // Set the type\r\n control.type = field.AllowMultipleValues ? core_1.Components.FormControlTypes.TextArea : control.type;\r\n break;\r\n }\r\n // Detect html\r\n if (/<*>/g.test(html)) {\r\n var isMultiLine = html.indexOf(\"<br />\") >= 0 ? true : false;\r\n // See if it's an image\r\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Image) {\r\n // Set the rendered event\r\n control.onControlRendered = function (control) {\r\n // Override the html rendered\r\n control.el.innerHTML = html;\r\n };\r\n }\r\n // Else, ensure this isn't a rich text field or multi-line\r\n else if (!isRichText && !isMultiLine) {\r\n // Update the control to be read-only\r\n control.type = core_1.Components.FormControlTypes.Readonly;\r\n // Set the rendered event\r\n control.onControlRendered = function (control) {\r\n // Get the target element\r\n var elTarget = control.el.querySelector(\"input\") || control.el;\r\n // Override the html rendered\r\n elTarget.innerHTML = control.props.data;\r\n };\r\n }\r\n else {\r\n // Update the html break line\r\n html = html.replace(/<br \\/>/g, '\\n');\r\n control.data = html;\r\n control.value = html;\r\n }\r\n }\r\n // Else, detect xml\r\n else if (/<|>|&|"/i.test(html)) {\r\n // Update the value\r\n control.value = html.replace(/</ig, '<')\r\n .replace(/>/ig, '>')\r\n .replace(/&/ig, '&')\r\n .replace(/"/ig, '\"');\r\n }\r\n // Return the control\r\n return control;\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 // Method to generate the attachments row\r\n var generateAttachmentsRow = function () {\r\n // See if we are rendering attachments\r\n var displayAttachments = typeof (props.displayAttachments) === \"boolean\" ? props.displayAttachments : true;\r\n if (props.info.attachments && displayAttachments) {\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 };\r\n // Get the fields to render\r\n var fieldNames = getFieldsToRender(props);\r\n // Parse the fields to render\r\n for (var i = 0; i < fieldNames.length; i++) {\r\n var fieldName = fieldNames[i];\r\n // See if this is the attachment field\r\n if (fieldName == \"Attachments\") {\r\n // Generate the attachments row\r\n generateAttachmentsRow();\r\n continue;\r\n }\r\n // Generate the control\r\n var control = renderDisplay(fieldName, props);\r\n if (control) {\r\n // Update the mapper\r\n mapper[fieldName] = control;\r\n // Add the row\r\n rows.push({\r\n columns: [{ control: control }]\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 getControl: function (fieldName) { return form ? form.getControl(fieldName) : null; }\r\n };\r\n};\r\n// Render the edit form\r\nexports.ListForm.renderEditForm = function (props) {\r\n var customControls = [];\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 // Method to upload the images\r\n var images = [];\r\n var uploadImages = function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n var values = {};\r\n // Ensure we have images\r\n if (images.length == 0) {\r\n // Do nothing\r\n resolve(values);\r\n return;\r\n }\r\n // Get the list folder\r\n gd_sprest_1.Helper.ListFormField.getOrCreateImageFolder(info).then(function (fld) {\r\n // Removes the existing image\r\n var removeExisting = function (value) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Try to get the image info\r\n var imageInfo = null;\r\n try {\r\n imageInfo = JSON.parse(value);\r\n }\r\n catch (_a) { }\r\n // Ensure the info exists\r\n if (imageInfo) {\r\n // See if the file exists\r\n fld.Files(imageInfo.fileName).execute(\r\n // Exists\r\n function (file) {\r\n // Delete the file\r\n file.delete().execute(function () {\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n }, \r\n // Doesn't exist\r\n function () {\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n }\r\n else {\r\n // Resolve the request\r\n resolve(null);\r\n }\r\n });\r\n };\r\n // Validates the list name\r\n var validateFileName = function (fileName) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the file name w/out the extension\r\n var info = fileName.toLowerCase().split('.');\r\n var fileExt = info[info.length - 1];\r\n var fileNameNoExt = \"\";\r\n for (var i = 0; i < info.length - 1; i++) {\r\n fileNameNoExt += info[i];\r\n }\r\n // Get the files with a similar name\r\n fld.Files().query({\r\n Filter: \"startswith(Name, '\" + fileNameNoExt + \"')\",\r\n Top: 5000\r\n }).execute(function (files) {\r\n var isValid = true;\r\n var counter = -1;\r\n var validFileName = null;\r\n // See if no files were found\r\n if (files.results.length == 0) {\r\n // Resolve the request\r\n resolve(fileName);\r\n return;\r\n }\r\n // Loop until it's valid\r\n do {\r\n // Reset the flag and file name\r\n validFileName = fileNameNoExt + (++counter == 0 ? \"\" : counter) + \".\" + fileExt;\r\n isValid = true;\r\n // Parse the files\r\n for (var i = 0; i < files.results.length; i++) {\r\n var file = files.results[i];\r\n // See if there is a match\r\n if (file.Name.toLowerCase() == validFileName) {\r\n // Set the flag\r\n isValid = false;\r\n break;\r\n }\r\n }\r\n } while (!isValid);\r\n // Resolve the request\r\n resolve(validFileName);\r\n });\r\n });\r\n };\r\n // Parse the images\r\n gd_sprest_1.Helper.Executor(images, function (imageInfo) {\r\n // See if this is a file that needs to be uploaded\r\n if (imageInfo.name && imageInfo.data && imageInfo.fieldName) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Remove the existing image\r\n removeExisting(info.item ? info.item[imageInfo.fieldName] : null).then(function () {\r\n // Validate the name\r\n validateFileName(imageInfo.name).then(function (fileName) {\r\n // Upload the file\r\n fld.Files().add(fileName, true, imageInfo.data).execute(function (file) {\r\n // Update the field value\r\n values[imageInfo.fieldName] = JSON.stringify({\r\n fieldId: imageInfo.fieldId,\r\n fieldName: imageInfo.fieldName,\r\n fileName: file.Name,\r\n id: file.UniqueId,\r\n nativeFile: {},\r\n serverRelativeUrl: file.ServerRelativeUrl,\r\n type: \"thumbnail\"\r\n });\r\n // Resolve the request\r\n resolve(null);\r\n });\r\n });\r\n });\r\n });\r\n }\r\n }).then(function () {\r\n // Resolve the request\r\n resolve(values);\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 // Generates the attachments row\r\n var generateAttachmentsRow = function () {\r\n // See if we are rendering attachments\r\n var displayAttachments = typeof (props.displayAttachments) === \"boolean\" ? props.displayAttachments : true;\r\n var attachmentsExist = props.info.item == null ? true : (props.info.attachments ? true : false);\r\n if (attachmentsExist && displayAttachments) {\r\n // Set a default field\r\n // This will help w/ the onControlRendering/ed events to not have a null value for this parameter\r\n props.info.fields[\"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 file-attachment\",\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.file-attachment\");\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 var itemAttachments = props.info.attachments || [];\r\n for (var i = 0; i < itemAttachments.length; i++) {\r\n var attachment = itemAttachments[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 file-attachment\",\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.file-attachment\");\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 };\r\n // Get the fields to render\r\n var fieldNames = getFieldsToRender(props);\r\n // Parse the fields to render\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 // See if this is the attachment field\r\n if (fieldName == \"Attachments\") {\r\n // Generate the attachments row\r\n generateAttachmentsRow();\r\n continue;\r\n }\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 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 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 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 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 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 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 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 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 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 // See if there is a custom event for setting the value\r\n if (props.onSetFieldDefaultValue) {\r\n // Call the event to override the value\r\n value[fieldName] = props.onSetFieldDefaultValue(field, value[fieldName]);\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 lookupFilter: lookupFilter,\r\n value: value[fieldName],\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 // 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 // Get the control display properties\r\n var dispControl = renderDisplay(control.name, props);\r\n if (dispControl) {\r\n // Update the properties\r\n control.data = dispControl.data;\r\n control.label = dispControl.label;\r\n control.showTime = dispControl.showTime;\r\n control.type = dispControl.type;\r\n control.value = dispControl.value;\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 // Clear the image values\r\n images = [];\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 // See if this is an image field\r\n var field = props.info.fields[fieldName];\r\n if (field && field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Image) {\r\n // Add the value if it exists\r\n fieldValue.value ? images.push(fieldValue.value) : null;\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) {\r\n // Append the controls\r\n form.appendControls(controls);\r\n // Wait for the controls to be loaded\r\n setTimeout(function () {\r\n // Parse the new controls\r\n for (var i = 0; i < controls.length; i++) {\r\n var control = controls[i].name ? form.getControl(controls[i].name) : null;\r\n if (control) {\r\n // Append the control\r\n customControls.push(control);\r\n }\r\n }\r\n }, 10);\r\n },\r\n appendRows: function (rows) {\r\n // Append the controls\r\n form.appendRows(rows);\r\n // Wait for the controls to be loaded\r\n setTimeout(function () {\r\n // Parse the rows\r\n for (var i = 0; i < rows.length; i++) {\r\n // Parse the columns\r\n var columns = rows[i].columns;\r\n for (var j = 0; j < columns.length; j++) {\r\n // Get the control\r\n var control = columns[j].control && columns[j].control.name ? form.getControl(columns[j].control.name) : null;\r\n if (control) {\r\n // Append the control\r\n customControls.push(control);\r\n }\r\n }\r\n }\r\n }, 10);\r\n },\r\n el: form.el,\r\n getControl: function (fieldName) {\r\n // See if it's in the mapper\r\n if (mapper[fieldName]) {\r\n // Return the control\r\n return mapper[fieldName].control;\r\n }\r\n // Parse the custom controls\r\n for (var i = 0; i < customControls.length; i++) {\r\n var control = customControls[i];\r\n // See if this is the target control\r\n if (control.props.name == fieldName) {\r\n // Return the control\r\n return control;\r\n }\r\n }\r\n // Not found\r\n return null;\r\n },\r\n getItem: function () { return props.info.item; },\r\n getValues: getValues,\r\n hasAttachments: function () {\r\n // Return if attachments exist\r\n return attachments && (attachments.delete.length > 0 || attachments.new.length > 0);\r\n },\r\n insertControl: function (idx, control) {\r\n // Append the controls\r\n form.insertControl(idx, control);\r\n // Wait for the controls to be loaded\r\n setTimeout(function () {\r\n var newControl = control.name ? form.getControl(control.name) : null;\r\n if (newControl) {\r\n // Append the control\r\n customControls.push(newControl);\r\n }\r\n }, 10);\r\n },\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 // Update the flag\r\n isValid = isValid && controlIsValid;\r\n }\r\n // Parse the custom controls\r\n for (var i = 0; i < customControls.length; i++) {\r\n // Validate the form field and update the status flag\r\n var controlIsValid = customControls[i].isValid;\r\n isValid = isValid && controlIsValid;\r\n }\r\n // Return the flag\r\n return isValid;\r\n },\r\n save: function (customValues) {\r\n if (customValues === void 0) { customValues = {}; }\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 var formValues = getValues();\r\n // Upload the images\r\n uploadImages(props.info).then(function (imageValues) {\r\n // Call the saving event\r\n onSaving(__assign(__assign(__assign({}, formValues), imageValues), customValues)).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 };\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@10.10.90/node_modules/gd-sprest-bs/build/components/listForm/index.js?");
|
|
1995
1995
|
|
|
1996
1996
|
/***/ }),
|
|
1997
1997
|
|
|
1998
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
1998
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js":
|
|
1999
1999
|
/*!*******************************************************************************************************************!*\
|
|
2000
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2000
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js ***!
|
|
2001
2001
|
\*******************************************************************************************************************/
|
|
2002
2002
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2003
2003
|
|
|
2004
2004
|
"use strict";
|
|
2005
|
-
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/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 _minCharSearch = props.minCharSearch > 0 ? props.minCharSearch : 3;\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 disabled or read only\r\n if (props.disabled || 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 if (parseInt(user) > 0) {\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 else if (typeof (user) === \"string\") {\r\n // Find the user by email\r\n (0, gd_sprest_1.Web)().ensureUser(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 >= _minCharSearch) {\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 >= _minCharSearch ? 'Searching for \"' + _filterText + '\"' : \"Search requires \".concat(_minCharSearch, \"+ characters\"),\r\n '</h6>'].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.disabled || 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 assignTo: props.assignTo,\r\n className: props.className,\r\n disabled: props.isDisabled,\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 onChange: props.onChange,\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@10.10.89/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js?");
|
|
2005
|
+
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar core_1 = __webpack_require__(/*! ../core */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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 _minCharSearch = props.minCharSearch > 0 ? props.minCharSearch : 3;\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 disabled or read only\r\n if (props.disabled || 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 if (parseInt(user) > 0) {\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 else if (typeof (user) === \"string\") {\r\n // Find the user by email\r\n (0, gd_sprest_1.Web)().ensureUser(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 >= _minCharSearch) {\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 >= _minCharSearch ? 'Searching for \"' + _filterText + '\"' : \"Search requires \".concat(_minCharSearch, \"+ characters\"),\r\n '</h6>'].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.disabled || 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 hideOnClick: false,\r\n maxWidth: \"none\",\r\n trigger: \"focus\"\r\n }\r\n });\r\n // Set the content\r\n _menu.setContent(elMenu);\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 assignTo: props.assignTo,\r\n className: props.className,\r\n disabled: props.isDisabled,\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 onChange: props.onChange,\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@10.10.90/node_modules/gd-sprest-bs/build/components/peoplePicker/index.js?");
|
|
2006
2006
|
|
|
2007
2007
|
/***/ }),
|
|
2008
2008
|
|
|
2009
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2009
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/index.js":
|
|
2010
2010
|
/*!******************************************************************************************************************!*\
|
|
2011
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2011
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/index.js ***!
|
|
2012
2012
|
\******************************************************************************************************************/
|
|
2013
2013
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2014
2014
|
|
|
2015
2015
|
"use strict";
|
|
2016
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.RichTextBoxControlType = exports.RichTextBox = exports.RichTextBoxTypes = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar Quill = __webpack_require__(/*! quill */ \"./node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js\");\r\nvar Toolbars = __webpack_require__(/*! ./toolbar */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2016
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.RichTextBoxControlType = exports.RichTextBox = exports.RichTextBoxTypes = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar Quill = __webpack_require__(/*! quill */ \"./node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js\");\r\nvar Toolbars = __webpack_require__(/*! ./toolbar */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/toolbar.js\");\r\n/**\r\n * Toolbar Types\r\n */\r\nvar RichTextBoxTypes;\r\n(function (RichTextBoxTypes) {\r\n RichTextBoxTypes[RichTextBoxTypes[\"None\"] = 0] = \"None\";\r\n RichTextBoxTypes[RichTextBoxTypes[\"Basic\"] = 1] = \"Basic\";\r\n RichTextBoxTypes[RichTextBoxTypes[\"Full\"] = 2] = \"Full\";\r\n})(RichTextBoxTypes = exports.RichTextBoxTypes || (exports.RichTextBoxTypes = {}));\r\n/**\r\n * Rich TextBox\r\n */\r\nvar RichTextBox = function (props) {\r\n // Create the editor element\r\n var elRichTextBox = document.createElement(\"div\");\r\n elRichTextBox.classList.add(\"rich-textbox\");\r\n // Create the toolbar element\r\n var elToolbar = document.createElement(\"div\");\r\n elToolbar.classList.add(\"toolbar-container\");\r\n props.disabled ? null : elToolbar.classList.add(\"form-control\");\r\n elRichTextBox.appendChild(elToolbar);\r\n // Create the editor element\r\n var elEditor = document.createElement(\"div\");\r\n elEditor.classList.add(\"editor-container\");\r\n props.disabled ? elEditor.classList.add(\"rounded\") : elEditor.classList.add(\"form-control\");\r\n elRichTextBox.appendChild(elEditor);\r\n // Get the options and default the values\r\n var options = props.options || {};\r\n options.modules = options.modules || {};\r\n options.placeholder ? options.placeholder = props.placeholder : null;\r\n options.readOnly == null && typeof (props.disabled) === \"boolean\" ? options.readOnly = props.disabled : null;\r\n options.theme = options.theme == null ? \"snow\" : options.theme;\r\n // See if are setting the default toolbar options\r\n var showToolbar = true;\r\n if (options.modules.toolbar == null) {\r\n // Set the toolbar options\r\n switch (props.toolbarType) {\r\n // None\r\n case RichTextBoxTypes.None:\r\n elToolbar.innerHTML = \"\";\r\n showToolbar = false;\r\n break;\r\n // Basic\r\n case RichTextBoxTypes.Basic:\r\n elToolbar.innerHTML = Toolbars.BasicToolbar;\r\n break;\r\n // Default - Full\r\n default:\r\n elToolbar.innerHTML = Toolbars.FullToolbar;\r\n break;\r\n }\r\n // Set the toolbar\r\n options.modules.toolbar = elToolbar;\r\n }\r\n else {\r\n // Set the toolbar container\r\n options.modules.toolbar.container = elToolbar;\r\n }\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.appendChild(elRichTextBox);\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 // Apply the plugin\r\n var quillObj = new Quill(elEditor, options);\r\n // See if we are hiding the toolbar\r\n if (!showToolbar) {\r\n // Remove the snow class\r\n elToolbar.classList.remove(\"ql-snow\");\r\n }\r\n // Create the object\r\n var obj = {\r\n el: elRichTextBox,\r\n elContents: quillObj.root,\r\n quillObj: quillObj,\r\n getHtml: function () { return obj.getText() ? quillObj.root.innerHTML : \"\"; },\r\n getText: function () { return quillObj.getText().trim(); },\r\n setHtml: function (value) { quillObj.root.innerHTML = value || \"\"; }\r\n };\r\n // Set the value\r\n props.value ? obj.setHtml(props.value) : null;\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.RichTextBox = RichTextBox;\r\n// Customize the form control\r\nexports.RichTextBoxControlType = 102;\r\ngd_bs_1.Components.FormControlTypes[\"RichTextBox\"] = exports.RichTextBoxControlType;\r\ngd_bs_1.Components.CustomControls.registerType(exports.RichTextBoxControlType, function (props) {\r\n var rtb = 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 rtb = (0, exports.RichTextBox)({\r\n className: props.className,\r\n disabled: props.isDisabled || props.isReadonly,\r\n el: ctrl.el,\r\n options: props.options,\r\n rows: props.rows,\r\n toolbarType: props.toolbarType,\r\n placeholder: props.placeholder,\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 //rtb.el.querySelector(\"input\").setAttribute(\"aria-labelledby\", elLabel.id);\r\n }\r\n // Set the control\r\n ctrl.setControl(rtb);\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 rtb ? rtb.getHtml() : ctrl.value;\r\n };\r\n});\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/index.js?");
|
|
2017
2017
|
|
|
2018
2018
|
/***/ }),
|
|
2019
2019
|
|
|
2020
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2020
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/toolbar.js":
|
|
2021
2021
|
/*!********************************************************************************************************************!*\
|
|
2022
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2022
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/toolbar.js ***!
|
|
2023
2023
|
\********************************************************************************************************************/
|
|
2024
2024
|
/***/ ((__unused_webpack_module, exports) => {
|
|
2025
2025
|
|
|
2026
2026
|
"use strict";
|
|
2027
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FullToolbar = exports.BasicToolbar = void 0;\r\n// Basic Toolbar\r\nexports.BasicToolbar = \"\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-bold\\\"></button>\\n <button class=\\\"ql-italic\\\"></button>\\n <button class=\\\"ql-underline\\\"></button>\\n <button class=\\\"ql-strike\\\"></button>\\n <button class=\\\"ql-link\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-list\\\" value=\\\"ordered\\\"></button>\\n <button class=\\\"ql-list\\\" value=\\\"bullet\\\"></button>\\n <button class=\\\"ql-indent\\\" value=\\\"-1\\\"></button>\\n <button class=\\\"ql-indent\\\" value=\\\"+1\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-direction\\\" value=\\\"rtl\\\"></button>\\n <select class=\\\"ql-align\\\"></select>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-clean\\\"></button>\\n</span>\";\r\n// Full Toolbar\r\nexports.FullToolbar = \"\\n<span class=\\\"ql-formats\\\">\\n <select class=\\\"ql-font\\\"></select>\\n <select class=\\\"ql-size\\\"></select>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-bold\\\"></button>\\n <button class=\\\"ql-italic\\\"></button>\\n <button class=\\\"ql-underline\\\"></button>\\n <button class=\\\"ql-strike\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <select class=\\\"ql-color\\\"></select>\\n <select class=\\\"ql-background\\\"></select>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-script\\\" value=\\\"sub\\\"></button>\\n <button class=\\\"ql-script\\\" value=\\\"super\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <select class=\\\"ql-header\\\"></select>\\n <button class=\\\"ql-blockquote\\\"></button>\\n <button class=\\\"ql-code-block\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-list\\\" value=\\\"ordered\\\"></button>\\n <button class=\\\"ql-list\\\" value=\\\"bullet\\\"></button>\\n <button class=\\\"ql-indent\\\" value=\\\"-1\\\"></button>\\n <button class=\\\"ql-indent\\\" value=\\\"+1\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-direction\\\" value=\\\"rtl\\\"></button>\\n <select class=\\\"ql-align\\\"></select>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-link\\\"></button>\\n <button class=\\\"ql-image\\\"></button>\\n <button class=\\\"ql-video\\\"></button>\\n <button class=\\\"ql-formula\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-clean\\\"></button>\\n</span>\";\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2027
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FullToolbar = exports.BasicToolbar = void 0;\r\n// Basic Toolbar\r\nexports.BasicToolbar = \"\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-bold\\\"></button>\\n <button class=\\\"ql-italic\\\"></button>\\n <button class=\\\"ql-underline\\\"></button>\\n <button class=\\\"ql-strike\\\"></button>\\n <button class=\\\"ql-link\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-list\\\" value=\\\"ordered\\\"></button>\\n <button class=\\\"ql-list\\\" value=\\\"bullet\\\"></button>\\n <button class=\\\"ql-indent\\\" value=\\\"-1\\\"></button>\\n <button class=\\\"ql-indent\\\" value=\\\"+1\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-direction\\\" value=\\\"rtl\\\"></button>\\n <select class=\\\"ql-align\\\"></select>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-clean\\\"></button>\\n</span>\";\r\n// Full Toolbar\r\nexports.FullToolbar = \"\\n<span class=\\\"ql-formats\\\">\\n <select class=\\\"ql-font\\\"></select>\\n <select class=\\\"ql-size\\\"></select>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-bold\\\"></button>\\n <button class=\\\"ql-italic\\\"></button>\\n <button class=\\\"ql-underline\\\"></button>\\n <button class=\\\"ql-strike\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <select class=\\\"ql-color\\\"></select>\\n <select class=\\\"ql-background\\\"></select>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-script\\\" value=\\\"sub\\\"></button>\\n <button class=\\\"ql-script\\\" value=\\\"super\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <select class=\\\"ql-header\\\"></select>\\n <button class=\\\"ql-blockquote\\\"></button>\\n <button class=\\\"ql-code-block\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-list\\\" value=\\\"ordered\\\"></button>\\n <button class=\\\"ql-list\\\" value=\\\"bullet\\\"></button>\\n <button class=\\\"ql-indent\\\" value=\\\"-1\\\"></button>\\n <button class=\\\"ql-indent\\\" value=\\\"+1\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-direction\\\" value=\\\"rtl\\\"></button>\\n <select class=\\\"ql-align\\\"></select>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-link\\\"></button>\\n <button class=\\\"ql-image\\\"></button>\\n <button class=\\\"ql-video\\\"></button>\\n <button class=\\\"ql-formula\\\"></button>\\n</span>\\n<span class=\\\"ql-formats\\\">\\n <button class=\\\"ql-clean\\\"></button>\\n</span>\";\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/richTextBox/toolbar.js?");
|
|
2028
2028
|
|
|
2029
2029
|
/***/ }),
|
|
2030
2030
|
|
|
2031
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2031
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/generate.js":
|
|
2032
2032
|
/*!****************************************************************************************************!*\
|
|
2033
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2033
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/generate.js ***!
|
|
2034
2034
|
\****************************************************************************************************/
|
|
2035
2035
|
/***/ ((__unused_webpack_module, exports) => {
|
|
2036
2036
|
|
|
2037
2037
|
"use strict";
|
|
2038
|
-
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 // Make this icon invisible to the screen reader\r\n icon.setAttribute(\"aria-hidden\", \"true\");\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@10.10.
|
|
2038
|
+
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 // Make this icon invisible to the screen reader\r\n icon.setAttribute(\"aria-hidden\", \"true\");\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@10.10.90/node_modules/gd-sprest-bs/build/icons/generate.js?");
|
|
2039
2039
|
|
|
2040
2040
|
/***/ }),
|
|
2041
2041
|
|
|
2042
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2042
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmark.js":
|
|
2043
2043
|
/*!************************************************************************************************************!*\
|
|
2044
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2044
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmark.js ***!
|
|
2045
2045
|
\************************************************************************************************************/
|
|
2046
2046
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2047
2047
|
|
|
2048
2048
|
"use strict";
|
|
2049
|
-
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@10.10.
|
|
2049
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmark.js?");
|
|
2050
2050
|
|
|
2051
2051
|
/***/ }),
|
|
2052
2052
|
|
|
2053
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2053
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown.js":
|
|
2054
2054
|
/*!*********************************************************************************************************************!*\
|
|
2055
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2055
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown.js ***!
|
|
2056
2056
|
\*********************************************************************************************************************/
|
|
2057
2057
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2058
2058
|
|
|
2059
2059
|
"use strict";
|
|
2060
|
-
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@10.10.
|
|
2060
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowDown.js?");
|
|
2061
2061
|
|
|
2062
2062
|
/***/ }),
|
|
2063
2063
|
|
|
2064
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2064
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp.js":
|
|
2065
2065
|
/*!*******************************************************************************************************************!*\
|
|
2066
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2066
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp.js ***!
|
|
2067
2067
|
\*******************************************************************************************************************/
|
|
2068
2068
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2069
2069
|
|
|
2070
2070
|
"use strict";
|
|
2071
|
-
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@10.10.
|
|
2071
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkArrowUp.js?");
|
|
2072
2072
|
|
|
2073
2073
|
/***/ }),
|
|
2074
2074
|
|
|
2075
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2075
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph.js":
|
|
2076
2076
|
/*!********************************************************************************************************************!*\
|
|
2077
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2077
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph.js ***!
|
|
2078
2078
|
\********************************************************************************************************************/
|
|
2079
2079
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2080
2080
|
|
|
2081
2081
|
"use strict";
|
|
2082
|
-
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@10.10.
|
|
2082
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBarGraph.js?");
|
|
2083
2083
|
|
|
2084
2084
|
/***/ }),
|
|
2085
2085
|
|
|
2086
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2086
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBinary.js":
|
|
2087
2087
|
/*!******************************************************************************************************************!*\
|
|
2088
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2088
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBinary.js ***!
|
|
2089
2089
|
\******************************************************************************************************************/
|
|
2090
2090
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2091
2091
|
|
|
2092
2092
|
"use strict";
|
|
2093
|
-
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@10.10.
|
|
2093
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkBinary.js?");
|
|
2094
2094
|
|
|
2095
2095
|
/***/ }),
|
|
2096
2096
|
|
|
2097
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2097
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkCode.js":
|
|
2098
2098
|
/*!****************************************************************************************************************!*\
|
|
2099
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2099
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkCode.js ***!
|
|
2100
2100
|
\****************************************************************************************************************/
|
|
2101
2101
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2102
2102
|
|
|
2103
2103
|
"use strict";
|
|
2104
|
-
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@10.10.
|
|
2104
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkCode.js?");
|
|
2105
2105
|
|
|
2106
2106
|
/***/ }),
|
|
2107
2107
|
|
|
2108
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2108
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkExcel.js":
|
|
2109
2109
|
/*!*****************************************************************************************************************!*\
|
|
2110
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2110
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkExcel.js ***!
|
|
2111
2111
|
\*****************************************************************************************************************/
|
|
2112
2112
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2113
2113
|
|
|
2114
2114
|
"use strict";
|
|
2115
|
-
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@10.10.
|
|
2115
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkExcel.js?");
|
|
2116
2116
|
|
|
2117
2117
|
/***/ }),
|
|
2118
2118
|
|
|
2119
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2119
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkImage.js":
|
|
2120
2120
|
/*!*****************************************************************************************************************!*\
|
|
2121
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2121
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkImage.js ***!
|
|
2122
2122
|
\*****************************************************************************************************************/
|
|
2123
2123
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2124
2124
|
|
|
2125
2125
|
"use strict";
|
|
2126
|
-
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@10.10.
|
|
2126
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkImage.js?");
|
|
2127
2127
|
|
|
2128
2128
|
/***/ }),
|
|
2129
2129
|
|
|
2130
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2130
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkMusic.js":
|
|
2131
2131
|
/*!*****************************************************************************************************************!*\
|
|
2132
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2132
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkMusic.js ***!
|
|
2133
2133
|
\*****************************************************************************************************************/
|
|
2134
2134
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2135
2135
|
|
|
2136
2136
|
"use strict";
|
|
2137
|
-
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@10.10.
|
|
2137
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkMusic.js?");
|
|
2138
2138
|
|
|
2139
2139
|
/***/ }),
|
|
2140
2140
|
|
|
2141
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2141
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPdf.js":
|
|
2142
2142
|
/*!***************************************************************************************************************!*\
|
|
2143
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2143
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPdf.js ***!
|
|
2144
2144
|
\***************************************************************************************************************/
|
|
2145
2145
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2146
2146
|
|
|
2147
2147
|
"use strict";
|
|
2148
|
-
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@10.10.
|
|
2148
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPdf.js?");
|
|
2149
2149
|
|
|
2150
2150
|
/***/ }),
|
|
2151
2151
|
|
|
2152
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2152
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlay.js":
|
|
2153
2153
|
/*!****************************************************************************************************************!*\
|
|
2154
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2154
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlay.js ***!
|
|
2155
2155
|
\****************************************************************************************************************/
|
|
2156
2156
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2157
2157
|
|
|
2158
2158
|
"use strict";
|
|
2159
|
-
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@10.10.
|
|
2159
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlay.js?");
|
|
2160
2160
|
|
|
2161
2161
|
/***/ }),
|
|
2162
2162
|
|
|
2163
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2163
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlus.js":
|
|
2164
2164
|
/*!****************************************************************************************************************!*\
|
|
2165
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2165
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlus.js ***!
|
|
2166
2166
|
\****************************************************************************************************************/
|
|
2167
2167
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2168
2168
|
|
|
2169
2169
|
"use strict";
|
|
2170
|
-
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@10.10.
|
|
2170
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPlus.js?");
|
|
2171
2171
|
|
|
2172
2172
|
/***/ }),
|
|
2173
2173
|
|
|
2174
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2174
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPpt.js":
|
|
2175
2175
|
/*!***************************************************************************************************************!*\
|
|
2176
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2176
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPpt.js ***!
|
|
2177
2177
|
\***************************************************************************************************************/
|
|
2178
2178
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2179
2179
|
|
|
2180
2180
|
"use strict";
|
|
2181
|
-
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@10.10.
|
|
2181
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkPpt.js?");
|
|
2182
2182
|
|
|
2183
2183
|
/***/ }),
|
|
2184
2184
|
|
|
2185
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2185
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext.js":
|
|
2186
2186
|
/*!********************************************************************************************************************!*\
|
|
2187
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2187
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext.js ***!
|
|
2188
2188
|
\********************************************************************************************************************/
|
|
2189
2189
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2190
2190
|
|
|
2191
2191
|
"use strict";
|
|
2192
|
-
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@10.10.
|
|
2192
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkRichtext.js?");
|
|
2193
2193
|
|
|
2194
2194
|
/***/ }),
|
|
2195
2195
|
|
|
2196
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2196
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet.js":
|
|
2197
2197
|
/*!***********************************************************************************************************************!*\
|
|
2198
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2198
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet.js ***!
|
|
2199
2199
|
\***********************************************************************************************************************/
|
|
2200
2200
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2201
2201
|
|
|
2202
2202
|
"use strict";
|
|
2203
|
-
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@10.10.
|
|
2203
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkSpreadsheet.js?");
|
|
2204
2204
|
|
|
2205
2205
|
/***/ }),
|
|
2206
2206
|
|
|
2207
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2207
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkText.js":
|
|
2208
2208
|
/*!****************************************************************************************************************!*\
|
|
2209
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2209
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkText.js ***!
|
|
2210
2210
|
\****************************************************************************************************************/
|
|
2211
2211
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2212
2212
|
|
|
2213
2213
|
"use strict";
|
|
2214
|
-
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@10.10.
|
|
2214
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkText.js?");
|
|
2215
2215
|
|
|
2216
2216
|
/***/ }),
|
|
2217
2217
|
|
|
2218
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2218
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkWord.js":
|
|
2219
2219
|
/*!****************************************************************************************************************!*\
|
|
2220
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2220
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkWord.js ***!
|
|
2221
2221
|
\****************************************************************************************************************/
|
|
2222
2222
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2223
2223
|
|
|
2224
2224
|
"use strict";
|
|
2225
|
-
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@10.10.
|
|
2225
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkWord.js?");
|
|
2226
2226
|
|
|
2227
2227
|
/***/ }),
|
|
2228
2228
|
|
|
2229
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2229
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkZip.js":
|
|
2230
2230
|
/*!***************************************************************************************************************!*\
|
|
2231
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2231
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkZip.js ***!
|
|
2232
2232
|
\***************************************************************************************************************/
|
|
2233
2233
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2234
2234
|
|
|
2235
2235
|
"use strict";
|
|
2236
|
-
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@10.10.
|
|
2236
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/fileEarmarkZip.js?");
|
|
2237
2237
|
|
|
2238
2238
|
/***/ }),
|
|
2239
2239
|
|
|
2240
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2240
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/filter.js":
|
|
2241
2241
|
/*!*******************************************************************************************************!*\
|
|
2242
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2242
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/filter.js ***!
|
|
2243
2243
|
\*******************************************************************************************************/
|
|
2244
2244
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2245
2245
|
|
|
2246
2246
|
"use strict";
|
|
2247
|
-
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@10.10.
|
|
2247
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/filter.js?");
|
|
2248
2248
|
|
|
2249
2249
|
/***/ }),
|
|
2250
2250
|
|
|
2251
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2251
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/filterSquare.js":
|
|
2252
2252
|
/*!*************************************************************************************************************!*\
|
|
2253
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2253
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/filterSquare.js ***!
|
|
2254
2254
|
\*************************************************************************************************************/
|
|
2255
2255
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2256
2256
|
|
|
2257
2257
|
"use strict";
|
|
2258
|
-
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@10.10.
|
|
2258
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/filterSquare.js?");
|
|
2259
2259
|
|
|
2260
2260
|
/***/ }),
|
|
2261
2261
|
|
|
2262
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2262
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/front.js":
|
|
2263
2263
|
/*!******************************************************************************************************!*\
|
|
2264
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2264
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/front.js ***!
|
|
2265
2265
|
\******************************************************************************************************/
|
|
2266
2266
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2267
2267
|
|
|
2268
2268
|
"use strict";
|
|
2269
|
-
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@10.10.
|
|
2269
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/front.js?");
|
|
2270
2270
|
|
|
2271
2271
|
/***/ }),
|
|
2272
2272
|
|
|
2273
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2273
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/inputCursorText.js":
|
|
2274
2274
|
/*!****************************************************************************************************************!*\
|
|
2275
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2275
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/inputCursorText.js ***!
|
|
2276
2276
|
\****************************************************************************************************************/
|
|
2277
2277
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2278
2278
|
|
|
2279
2279
|
"use strict";
|
|
2280
|
-
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@10.10.
|
|
2280
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/inputCursorText.js?");
|
|
2281
2281
|
|
|
2282
2282
|
/***/ }),
|
|
2283
2283
|
|
|
2284
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2284
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/layoutTextSidebar.js":
|
|
2285
2285
|
/*!******************************************************************************************************************!*\
|
|
2286
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2286
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/layoutTextSidebar.js ***!
|
|
2287
2287
|
\******************************************************************************************************************/
|
|
2288
2288
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2289
2289
|
|
|
2290
2290
|
"use strict";
|
|
2291
|
-
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@10.10.
|
|
2291
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/layoutTextSidebar.js?");
|
|
2292
2292
|
|
|
2293
2293
|
/***/ }),
|
|
2294
2294
|
|
|
2295
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2295
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/x.js":
|
|
2296
2296
|
/*!**************************************************************************************************!*\
|
|
2297
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2297
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/x.js ***!
|
|
2298
2298
|
\**************************************************************************************************/
|
|
2299
2299
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2300
2300
|
|
|
2301
2301
|
"use strict";
|
|
2302
|
-
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@10.10.
|
|
2302
|
+
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@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/icons/svgs/x.js?");
|
|
2303
2303
|
|
|
2304
2304
|
/***/ }),
|
|
2305
2305
|
|
|
2306
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2306
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js":
|
|
2307
2307
|
/*!*******************************************************************************************!*\
|
|
2308
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2308
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/index.js ***!
|
|
2309
2309
|
\*******************************************************************************************/
|
|
2310
2310
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2311
2311
|
|
|
2312
2312
|
"use strict";
|
|
2313
|
-
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 = exports.ThemeManager = void 0;\r\n// The SharePoint library\r\n__exportStar(__webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.
|
|
2313
|
+
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 = exports.ThemeManager = void 0;\r\n// The SharePoint library\r\n__exportStar(__webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.90/node_modules/gd-sprest-bs/build/components/index.js\");\r\n__exportStar(__webpack_require__(/*! ./components */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/index.js\"), exports);\r\n// Theme Manager\r\nvar themeManager_1 = __webpack_require__(/*! ./themeManager */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/themeManager/index.js\");\r\nObject.defineProperty(exports, \"ThemeManager\", ({ enumerable: true, get: function () { return themeManager_1.ThemeManager; } }));\r\n// WebParts\r\nvar WebParts = __webpack_require__(/*! ./webparts */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/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.ThemeManager = themeManager_1.ThemeManager;\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@10.10.90/node_modules/gd-sprest-bs/build/index.js?");
|
|
2314
2314
|
|
|
2315
2315
|
/***/ }),
|
|
2316
2316
|
|
|
2317
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2317
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/styles.js":
|
|
2318
2318
|
/*!********************************************************************************************!*\
|
|
2319
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2319
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/styles.js ***!
|
|
2320
2320
|
\********************************************************************************************/
|
|
2321
2321
|
/***/ (() => {
|
|
2322
2322
|
|
|
2323
|
-
eval("!function(){\"use strict\";var n={450:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o)()(i());r.push([n.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)}}',\"\"]),l.Z=r},893:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o)()(i());r.push([n.id,\"/*!\\n * Quill Editor v1.3.7\\n * https://quilljs.com/\\n * Copyright (c) 2014, Jason Chen\\n * Copyright (c) 2013, salesforce.com\\n */\\n.ql-container {\\n box-sizing: border-box;\\n font-family: Helvetica, Arial, sans-serif;\\n font-size: 13px;\\n height: 100%;\\n margin: 0px;\\n position: relative;\\n}\\n.ql-container.ql-disabled .ql-tooltip {\\n visibility: hidden;\\n}\\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\\n pointer-events: none;\\n}\\n.ql-clipboard {\\n left: -100000px;\\n height: 1px;\\n overflow-y: hidden;\\n position: absolute;\\n top: 50%;\\n}\\n.ql-clipboard p {\\n margin: 0;\\n padding: 0;\\n}\\n.ql-editor {\\n box-sizing: border-box;\\n line-height: 1.42;\\n height: 100%;\\n outline: none;\\n overflow-y: auto;\\n padding: 12px 15px;\\n tab-size: 4;\\n -moz-tab-size: 4;\\n text-align: left;\\n white-space: pre-wrap;\\n word-wrap: break-word;\\n}\\n.ql-editor > * {\\n cursor: text;\\n}\\n.ql-editor p,\\n.ql-editor ol,\\n.ql-editor ul,\\n.ql-editor pre,\\n.ql-editor blockquote,\\n.ql-editor h1,\\n.ql-editor h2,\\n.ql-editor h3,\\n.ql-editor h4,\\n.ql-editor h5,\\n.ql-editor h6 {\\n margin: 0;\\n padding: 0;\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol,\\n.ql-editor ul {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol > li,\\n.ql-editor ul > li {\\n list-style-type: none;\\n}\\n.ql-editor ul > li::before {\\n content: '\\\\2022';\\n}\\n.ql-editor ul[data-checked=true],\\n.ql-editor ul[data-checked=false] {\\n pointer-events: none;\\n}\\n.ql-editor ul[data-checked=true] > li *,\\n.ql-editor ul[data-checked=false] > li * {\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before,\\n.ql-editor ul[data-checked=false] > li::before {\\n color: #777;\\n cursor: pointer;\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before {\\n content: '\\\\2611';\\n}\\n.ql-editor ul[data-checked=false] > li::before {\\n content: '\\\\2610';\\n}\\n.ql-editor li::before {\\n display: inline-block;\\n white-space: nowrap;\\n width: 1.2em;\\n}\\n.ql-editor li:not(.ql-direction-rtl)::before {\\n margin-left: -1.5em;\\n margin-right: 0.3em;\\n text-align: right;\\n}\\n.ql-editor li.ql-direction-rtl::before {\\n margin-left: 0.3em;\\n margin-right: -1.5em;\\n}\\n.ql-editor ol li:not(.ql-direction-rtl),\\n.ql-editor ul li:not(.ql-direction-rtl) {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol li.ql-direction-rtl,\\n.ql-editor ul li.ql-direction-rtl {\\n padding-right: 1.5em;\\n}\\n.ql-editor ol li {\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n counter-increment: list-0;\\n}\\n.ql-editor ol li:before {\\n content: counter(list-0, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-increment: list-1;\\n}\\n.ql-editor ol li.ql-indent-1:before {\\n content: counter(list-1, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-increment: list-2;\\n}\\n.ql-editor ol li.ql-indent-2:before {\\n content: counter(list-2, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-increment: list-3;\\n}\\n.ql-editor ol li.ql-indent-3:before {\\n content: counter(list-3, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-increment: list-4;\\n}\\n.ql-editor ol li.ql-indent-4:before {\\n content: counter(list-4, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-reset: list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-increment: list-5;\\n}\\n.ql-editor ol li.ql-indent-5:before {\\n content: counter(list-5, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-reset: list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-increment: list-6;\\n}\\n.ql-editor ol li.ql-indent-6:before {\\n content: counter(list-6, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-reset: list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-increment: list-7;\\n}\\n.ql-editor ol li.ql-indent-7:before {\\n content: counter(list-7, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-reset: list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-increment: list-8;\\n}\\n.ql-editor ol li.ql-indent-8:before {\\n content: counter(list-8, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-reset: list-9;\\n}\\n.ql-editor ol li.ql-indent-9 {\\n counter-increment: list-9;\\n}\\n.ql-editor ol li.ql-indent-9:before {\\n content: counter(list-9, decimal) '. ';\\n}\\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 3em;\\n}\\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 4.5em;\\n}\\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 3em;\\n}\\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 4.5em;\\n}\\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 6em;\\n}\\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 7.5em;\\n}\\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 6em;\\n}\\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 7.5em;\\n}\\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 9em;\\n}\\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 10.5em;\\n}\\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 9em;\\n}\\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 10.5em;\\n}\\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 12em;\\n}\\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 13.5em;\\n}\\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 12em;\\n}\\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 13.5em;\\n}\\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 15em;\\n}\\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 16.5em;\\n}\\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 15em;\\n}\\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 16.5em;\\n}\\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 18em;\\n}\\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 19.5em;\\n}\\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 18em;\\n}\\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 19.5em;\\n}\\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 21em;\\n}\\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 22.5em;\\n}\\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 21em;\\n}\\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 22.5em;\\n}\\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 24em;\\n}\\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 25.5em;\\n}\\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 24em;\\n}\\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 25.5em;\\n}\\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 27em;\\n}\\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 28.5em;\\n}\\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 27em;\\n}\\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 28.5em;\\n}\\n.ql-editor .ql-video {\\n display: block;\\n max-width: 100%;\\n}\\n.ql-editor .ql-video.ql-align-center {\\n margin: 0 auto;\\n}\\n.ql-editor .ql-video.ql-align-right {\\n margin: 0 0 0 auto;\\n}\\n.ql-editor .ql-bg-black {\\n background-color: #000;\\n}\\n.ql-editor .ql-bg-red {\\n background-color: #e60000;\\n}\\n.ql-editor .ql-bg-orange {\\n background-color: #f90;\\n}\\n.ql-editor .ql-bg-yellow {\\n background-color: #ff0;\\n}\\n.ql-editor .ql-bg-green {\\n background-color: #008a00;\\n}\\n.ql-editor .ql-bg-blue {\\n background-color: #06c;\\n}\\n.ql-editor .ql-bg-purple {\\n background-color: #93f;\\n}\\n.ql-editor .ql-color-white {\\n color: #fff;\\n}\\n.ql-editor .ql-color-red {\\n color: #e60000;\\n}\\n.ql-editor .ql-color-orange {\\n color: #f90;\\n}\\n.ql-editor .ql-color-yellow {\\n color: #ff0;\\n}\\n.ql-editor .ql-color-green {\\n color: #008a00;\\n}\\n.ql-editor .ql-color-blue {\\n color: #06c;\\n}\\n.ql-editor .ql-color-purple {\\n color: #93f;\\n}\\n.ql-editor .ql-font-serif {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-editor .ql-font-monospace {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-editor .ql-size-small {\\n font-size: 0.75em;\\n}\\n.ql-editor .ql-size-large {\\n font-size: 1.5em;\\n}\\n.ql-editor .ql-size-huge {\\n font-size: 2.5em;\\n}\\n.ql-editor .ql-direction-rtl {\\n direction: rtl;\\n text-align: inherit;\\n}\\n.ql-editor .ql-align-center {\\n text-align: center;\\n}\\n.ql-editor .ql-align-justify {\\n text-align: justify;\\n}\\n.ql-editor .ql-align-right {\\n text-align: right;\\n}\\n.ql-editor.ql-blank::before {\\n color: rgba(0,0,0,0.6);\\n content: attr(data-placeholder);\\n font-style: italic;\\n left: 15px;\\n pointer-events: none;\\n position: absolute;\\n right: 15px;\\n}\\n.ql-bubble.ql-toolbar:after,\\n.ql-bubble .ql-toolbar:after {\\n clear: both;\\n content: '';\\n display: table;\\n}\\n.ql-bubble.ql-toolbar button,\\n.ql-bubble .ql-toolbar button {\\n background: none;\\n border: none;\\n cursor: pointer;\\n display: inline-block;\\n float: left;\\n height: 24px;\\n padding: 3px 5px;\\n width: 28px;\\n}\\n.ql-bubble.ql-toolbar button svg,\\n.ql-bubble .ql-toolbar button svg {\\n float: left;\\n height: 100%;\\n}\\n.ql-bubble.ql-toolbar button:active:hover,\\n.ql-bubble .ql-toolbar button:active:hover {\\n outline: none;\\n}\\n.ql-bubble.ql-toolbar input.ql-image[type=file],\\n.ql-bubble .ql-toolbar input.ql-image[type=file] {\\n display: none;\\n}\\n.ql-bubble.ql-toolbar button:hover,\\n.ql-bubble .ql-toolbar button:hover,\\n.ql-bubble.ql-toolbar button:focus,\\n.ql-bubble .ql-toolbar button:focus,\\n.ql-bubble.ql-toolbar button.ql-active,\\n.ql-bubble .ql-toolbar button.ql-active,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected {\\n color: #fff;\\n}\\n.ql-bubble.ql-toolbar button:hover .ql-fill,\\n.ql-bubble .ql-toolbar button:hover .ql-fill,\\n.ql-bubble.ql-toolbar button:focus .ql-fill,\\n.ql-bubble .ql-toolbar button:focus .ql-fill,\\n.ql-bubble.ql-toolbar button.ql-active .ql-fill,\\n.ql-bubble .ql-toolbar button.ql-active .ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\\n.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\\n fill: #fff;\\n}\\n.ql-bubble.ql-toolbar button:hover .ql-stroke,\\n.ql-bubble .ql-toolbar button:hover .ql-stroke,\\n.ql-bubble.ql-toolbar button:focus .ql-stroke,\\n.ql-bubble .ql-toolbar button:focus .ql-stroke,\\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke,\\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\\n.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,\\n.ql-bubble .ql-toolbar button:hover .ql-stroke-miter,\\n.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,\\n.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,\\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,\\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\\n stroke: #fff;\\n}\\n@media (pointer: coarse) {\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active),\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) {\\n color: #ccc;\\n }\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\\n fill: #ccc;\\n }\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\\n stroke: #ccc;\\n }\\n}\\n.ql-bubble {\\n box-sizing: border-box;\\n}\\n.ql-bubble * {\\n box-sizing: border-box;\\n}\\n.ql-bubble .ql-hidden {\\n display: none;\\n}\\n.ql-bubble .ql-out-bottom,\\n.ql-bubble .ql-out-top {\\n visibility: hidden;\\n}\\n.ql-bubble .ql-tooltip {\\n position: absolute;\\n transform: translateY(10px);\\n}\\n.ql-bubble .ql-tooltip a {\\n cursor: pointer;\\n text-decoration: none;\\n}\\n.ql-bubble .ql-tooltip.ql-flip {\\n transform: translateY(-10px);\\n}\\n.ql-bubble .ql-formats {\\n display: inline-block;\\n vertical-align: middle;\\n}\\n.ql-bubble .ql-formats:after {\\n clear: both;\\n content: '';\\n display: table;\\n}\\n.ql-bubble .ql-stroke {\\n fill: none;\\n stroke: #ccc;\\n stroke-linecap: round;\\n stroke-linejoin: round;\\n stroke-width: 2;\\n}\\n.ql-bubble .ql-stroke-miter {\\n fill: none;\\n stroke: #ccc;\\n stroke-miterlimit: 10;\\n stroke-width: 2;\\n}\\n.ql-bubble .ql-fill,\\n.ql-bubble .ql-stroke.ql-fill {\\n fill: #ccc;\\n}\\n.ql-bubble .ql-empty {\\n fill: none;\\n}\\n.ql-bubble .ql-even {\\n fill-rule: evenodd;\\n}\\n.ql-bubble .ql-thin,\\n.ql-bubble .ql-stroke.ql-thin {\\n stroke-width: 1;\\n}\\n.ql-bubble .ql-transparent {\\n opacity: 0.4;\\n}\\n.ql-bubble .ql-direction svg:last-child {\\n display: none;\\n}\\n.ql-bubble .ql-direction.ql-active svg:last-child {\\n display: inline;\\n}\\n.ql-bubble .ql-direction.ql-active svg:first-child {\\n display: none;\\n}\\n.ql-bubble .ql-editor h1 {\\n font-size: 2em;\\n}\\n.ql-bubble .ql-editor h2 {\\n font-size: 1.5em;\\n}\\n.ql-bubble .ql-editor h3 {\\n font-size: 1.17em;\\n}\\n.ql-bubble .ql-editor h4 {\\n font-size: 1em;\\n}\\n.ql-bubble .ql-editor h5 {\\n font-size: 0.83em;\\n}\\n.ql-bubble .ql-editor h6 {\\n font-size: 0.67em;\\n}\\n.ql-bubble .ql-editor a {\\n text-decoration: underline;\\n}\\n.ql-bubble .ql-editor blockquote {\\n border-left: 4px solid #ccc;\\n margin-bottom: 5px;\\n margin-top: 5px;\\n padding-left: 16px;\\n}\\n.ql-bubble .ql-editor code,\\n.ql-bubble .ql-editor pre {\\n background-color: #f0f0f0;\\n border-radius: 3px;\\n}\\n.ql-bubble .ql-editor pre {\\n white-space: pre-wrap;\\n margin-bottom: 5px;\\n margin-top: 5px;\\n padding: 5px 10px;\\n}\\n.ql-bubble .ql-editor code {\\n font-size: 85%;\\n padding: 2px 4px;\\n}\\n.ql-bubble .ql-editor pre.ql-syntax {\\n background-color: #23241f;\\n color: #f8f8f2;\\n overflow: visible;\\n}\\n.ql-bubble .ql-editor img {\\n max-width: 100%;\\n}\\n.ql-bubble .ql-picker {\\n color: #ccc;\\n display: inline-block;\\n float: left;\\n font-size: 14px;\\n font-weight: 500;\\n height: 24px;\\n position: relative;\\n vertical-align: middle;\\n}\\n.ql-bubble .ql-picker-label {\\n cursor: pointer;\\n display: inline-block;\\n height: 100%;\\n padding-left: 8px;\\n padding-right: 2px;\\n position: relative;\\n width: 100%;\\n}\\n.ql-bubble .ql-picker-label::before {\\n display: inline-block;\\n line-height: 22px;\\n}\\n.ql-bubble .ql-picker-options {\\n background-color: #444;\\n display: none;\\n min-width: 100%;\\n padding: 4px 8px;\\n position: absolute;\\n white-space: nowrap;\\n}\\n.ql-bubble .ql-picker-options .ql-picker-item {\\n cursor: pointer;\\n display: block;\\n padding-bottom: 5px;\\n padding-top: 5px;\\n}\\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label {\\n color: #777;\\n z-index: 2;\\n}\\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill {\\n fill: #777;\\n}\\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\\n stroke: #777;\\n}\\n.ql-bubble .ql-picker.ql-expanded .ql-picker-options {\\n display: block;\\n margin-top: -1px;\\n top: 100%;\\n z-index: 1;\\n}\\n.ql-bubble .ql-color-picker,\\n.ql-bubble .ql-icon-picker {\\n width: 28px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-label,\\n.ql-bubble .ql-icon-picker .ql-picker-label {\\n padding: 2px 4px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-label svg,\\n.ql-bubble .ql-icon-picker .ql-picker-label svg {\\n right: 4px;\\n}\\n.ql-bubble .ql-icon-picker .ql-picker-options {\\n padding: 4px 0px;\\n}\\n.ql-bubble .ql-icon-picker .ql-picker-item {\\n height: 24px;\\n width: 24px;\\n padding: 2px 4px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-options {\\n padding: 3px 5px;\\n width: 152px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-item {\\n border: 1px solid transparent;\\n float: left;\\n height: 16px;\\n margin: 2px;\\n padding: 0px;\\n width: 16px;\\n}\\n.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\\n position: absolute;\\n margin-top: -9px;\\n right: 0;\\n top: 50%;\\n width: 18px;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {\\n content: attr(data-label);\\n}\\n.ql-bubble .ql-picker.ql-header {\\n width: 98px;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item::before {\\n content: 'Normal';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"1\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"1\\\"]::before {\\n content: 'Heading 1';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"2\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"2\\\"]::before {\\n content: 'Heading 2';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"3\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"3\\\"]::before {\\n content: 'Heading 3';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"4\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"4\\\"]::before {\\n content: 'Heading 4';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"5\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"5\\\"]::before {\\n content: 'Heading 5';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"6\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"6\\\"]::before {\\n content: 'Heading 6';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"1\\\"]::before {\\n font-size: 2em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"2\\\"]::before {\\n font-size: 1.5em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"3\\\"]::before {\\n font-size: 1.17em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"4\\\"]::before {\\n font-size: 1em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"5\\\"]::before {\\n font-size: 0.83em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"6\\\"]::before {\\n font-size: 0.67em;\\n}\\n.ql-bubble .ql-picker.ql-font {\\n width: 108px;\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-label::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-item::before {\\n content: 'Sans Serif';\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\\n content: 'Serif';\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\\n content: 'Monospace';\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-bubble .ql-picker.ql-size {\\n width: 98px;\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-label::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item::before {\\n content: 'Normal';\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\\n content: 'Small';\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\\n content: 'Large';\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\\n content: 'Huge';\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\\n font-size: 10px;\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\\n font-size: 18px;\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\\n font-size: 32px;\\n}\\n.ql-bubble .ql-color-picker.ql-background .ql-picker-item {\\n background-color: #fff;\\n}\\n.ql-bubble .ql-color-picker.ql-color .ql-picker-item {\\n background-color: #000;\\n}\\n.ql-bubble .ql-toolbar .ql-formats {\\n margin: 8px 12px 8px 0px;\\n}\\n.ql-bubble .ql-toolbar .ql-formats:first-child {\\n margin-left: 12px;\\n}\\n.ql-bubble .ql-color-picker svg {\\n margin: 1px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,\\n.ql-bubble .ql-color-picker .ql-picker-item:hover {\\n border-color: #fff;\\n}\\n.ql-bubble .ql-tooltip {\\n background-color: #444;\\n border-radius: 25px;\\n color: #fff;\\n}\\n.ql-bubble .ql-tooltip-arrow {\\n border-left: 6px solid transparent;\\n border-right: 6px solid transparent;\\n content: \\\" \\\";\\n display: block;\\n left: 50%;\\n margin-left: -6px;\\n position: absolute;\\n}\\n.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow {\\n border-bottom: 6px solid #444;\\n top: -6px;\\n}\\n.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow {\\n border-top: 6px solid #444;\\n bottom: -6px;\\n}\\n.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor {\\n display: block;\\n}\\n.ql-bubble .ql-tooltip.ql-editing .ql-formats {\\n visibility: hidden;\\n}\\n.ql-bubble .ql-tooltip-editor {\\n display: none;\\n}\\n.ql-bubble .ql-tooltip-editor input[type=text] {\\n background: transparent;\\n border: none;\\n color: #fff;\\n font-size: 13px;\\n height: 100%;\\n outline: none;\\n padding: 10px 20px;\\n position: absolute;\\n width: 100%;\\n}\\n.ql-bubble .ql-tooltip-editor a {\\n top: 10px;\\n position: absolute;\\n right: 20px;\\n}\\n.ql-bubble .ql-tooltip-editor a:before {\\n color: #ccc;\\n content: \\\"\\\\D7\\\";\\n font-size: 16px;\\n font-weight: bold;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a {\\n position: relative;\\n white-space: nowrap;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a::before {\\n background-color: #444;\\n border-radius: 15px;\\n top: -5px;\\n font-size: 12px;\\n color: #fff;\\n content: attr(href);\\n font-weight: normal;\\n overflow: hidden;\\n padding: 5px 15px;\\n text-decoration: none;\\n z-index: 1;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a::after {\\n border-top: 6px solid #444;\\n border-left: 6px solid transparent;\\n border-right: 6px solid transparent;\\n top: 0;\\n content: \\\" \\\";\\n height: 0;\\n width: 0;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a::before,\\n.ql-container.ql-bubble:not(.ql-disabled) a::after {\\n left: 0;\\n margin-left: 50%;\\n position: absolute;\\n transform: translate(-50%, -100%);\\n transition: visibility 0s ease 200ms;\\n visibility: hidden;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a:hover::before,\\n.ql-container.ql-bubble:not(.ql-disabled) a:hover::after {\\n visibility: visible;\\n}\\n\",\"\"]),l.Z=r},126:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o)()(i());r.push([n.id,\"/*!\\n * Quill Editor v1.3.7\\n * https://quilljs.com/\\n * Copyright (c) 2014, Jason Chen\\n * Copyright (c) 2013, salesforce.com\\n */\\n.ql-container {\\n box-sizing: border-box;\\n font-family: Helvetica, Arial, sans-serif;\\n font-size: 13px;\\n height: 100%;\\n margin: 0px;\\n position: relative;\\n}\\n.ql-container.ql-disabled .ql-tooltip {\\n visibility: hidden;\\n}\\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\\n pointer-events: none;\\n}\\n.ql-clipboard {\\n left: -100000px;\\n height: 1px;\\n overflow-y: hidden;\\n position: absolute;\\n top: 50%;\\n}\\n.ql-clipboard p {\\n margin: 0;\\n padding: 0;\\n}\\n.ql-editor {\\n box-sizing: border-box;\\n line-height: 1.42;\\n height: 100%;\\n outline: none;\\n overflow-y: auto;\\n padding: 12px 15px;\\n tab-size: 4;\\n -moz-tab-size: 4;\\n text-align: left;\\n white-space: pre-wrap;\\n word-wrap: break-word;\\n}\\n.ql-editor > * {\\n cursor: text;\\n}\\n.ql-editor p,\\n.ql-editor ol,\\n.ql-editor ul,\\n.ql-editor pre,\\n.ql-editor blockquote,\\n.ql-editor h1,\\n.ql-editor h2,\\n.ql-editor h3,\\n.ql-editor h4,\\n.ql-editor h5,\\n.ql-editor h6 {\\n margin: 0;\\n padding: 0;\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol,\\n.ql-editor ul {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol > li,\\n.ql-editor ul > li {\\n list-style-type: none;\\n}\\n.ql-editor ul > li::before {\\n content: '\\\\2022';\\n}\\n.ql-editor ul[data-checked=true],\\n.ql-editor ul[data-checked=false] {\\n pointer-events: none;\\n}\\n.ql-editor ul[data-checked=true] > li *,\\n.ql-editor ul[data-checked=false] > li * {\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before,\\n.ql-editor ul[data-checked=false] > li::before {\\n color: #777;\\n cursor: pointer;\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before {\\n content: '\\\\2611';\\n}\\n.ql-editor ul[data-checked=false] > li::before {\\n content: '\\\\2610';\\n}\\n.ql-editor li::before {\\n display: inline-block;\\n white-space: nowrap;\\n width: 1.2em;\\n}\\n.ql-editor li:not(.ql-direction-rtl)::before {\\n margin-left: -1.5em;\\n margin-right: 0.3em;\\n text-align: right;\\n}\\n.ql-editor li.ql-direction-rtl::before {\\n margin-left: 0.3em;\\n margin-right: -1.5em;\\n}\\n.ql-editor ol li:not(.ql-direction-rtl),\\n.ql-editor ul li:not(.ql-direction-rtl) {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol li.ql-direction-rtl,\\n.ql-editor ul li.ql-direction-rtl {\\n padding-right: 1.5em;\\n}\\n.ql-editor ol li {\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n counter-increment: list-0;\\n}\\n.ql-editor ol li:before {\\n content: counter(list-0, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-increment: list-1;\\n}\\n.ql-editor ol li.ql-indent-1:before {\\n content: counter(list-1, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-increment: list-2;\\n}\\n.ql-editor ol li.ql-indent-2:before {\\n content: counter(list-2, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-increment: list-3;\\n}\\n.ql-editor ol li.ql-indent-3:before {\\n content: counter(list-3, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-increment: list-4;\\n}\\n.ql-editor ol li.ql-indent-4:before {\\n content: counter(list-4, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-reset: list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-increment: list-5;\\n}\\n.ql-editor ol li.ql-indent-5:before {\\n content: counter(list-5, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-reset: list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-increment: list-6;\\n}\\n.ql-editor ol li.ql-indent-6:before {\\n content: counter(list-6, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-reset: list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-increment: list-7;\\n}\\n.ql-editor ol li.ql-indent-7:before {\\n content: counter(list-7, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-reset: list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-increment: list-8;\\n}\\n.ql-editor ol li.ql-indent-8:before {\\n content: counter(list-8, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-reset: list-9;\\n}\\n.ql-editor ol li.ql-indent-9 {\\n counter-increment: list-9;\\n}\\n.ql-editor ol li.ql-indent-9:before {\\n content: counter(list-9, decimal) '. ';\\n}\\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 3em;\\n}\\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 4.5em;\\n}\\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 3em;\\n}\\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 4.5em;\\n}\\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 6em;\\n}\\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 7.5em;\\n}\\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 6em;\\n}\\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 7.5em;\\n}\\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 9em;\\n}\\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 10.5em;\\n}\\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 9em;\\n}\\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 10.5em;\\n}\\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 12em;\\n}\\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 13.5em;\\n}\\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 12em;\\n}\\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 13.5em;\\n}\\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 15em;\\n}\\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 16.5em;\\n}\\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 15em;\\n}\\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 16.5em;\\n}\\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 18em;\\n}\\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 19.5em;\\n}\\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 18em;\\n}\\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 19.5em;\\n}\\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 21em;\\n}\\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 22.5em;\\n}\\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 21em;\\n}\\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 22.5em;\\n}\\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 24em;\\n}\\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 25.5em;\\n}\\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 24em;\\n}\\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 25.5em;\\n}\\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 27em;\\n}\\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 28.5em;\\n}\\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 27em;\\n}\\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 28.5em;\\n}\\n.ql-editor .ql-video {\\n display: block;\\n max-width: 100%;\\n}\\n.ql-editor .ql-video.ql-align-center {\\n margin: 0 auto;\\n}\\n.ql-editor .ql-video.ql-align-right {\\n margin: 0 0 0 auto;\\n}\\n.ql-editor .ql-bg-black {\\n background-color: #000;\\n}\\n.ql-editor .ql-bg-red {\\n background-color: #e60000;\\n}\\n.ql-editor .ql-bg-orange {\\n background-color: #f90;\\n}\\n.ql-editor .ql-bg-yellow {\\n background-color: #ff0;\\n}\\n.ql-editor .ql-bg-green {\\n background-color: #008a00;\\n}\\n.ql-editor .ql-bg-blue {\\n background-color: #06c;\\n}\\n.ql-editor .ql-bg-purple {\\n background-color: #93f;\\n}\\n.ql-editor .ql-color-white {\\n color: #fff;\\n}\\n.ql-editor .ql-color-red {\\n color: #e60000;\\n}\\n.ql-editor .ql-color-orange {\\n color: #f90;\\n}\\n.ql-editor .ql-color-yellow {\\n color: #ff0;\\n}\\n.ql-editor .ql-color-green {\\n color: #008a00;\\n}\\n.ql-editor .ql-color-blue {\\n color: #06c;\\n}\\n.ql-editor .ql-color-purple {\\n color: #93f;\\n}\\n.ql-editor .ql-font-serif {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-editor .ql-font-monospace {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-editor .ql-size-small {\\n font-size: 0.75em;\\n}\\n.ql-editor .ql-size-large {\\n font-size: 1.5em;\\n}\\n.ql-editor .ql-size-huge {\\n font-size: 2.5em;\\n}\\n.ql-editor .ql-direction-rtl {\\n direction: rtl;\\n text-align: inherit;\\n}\\n.ql-editor .ql-align-center {\\n text-align: center;\\n}\\n.ql-editor .ql-align-justify {\\n text-align: justify;\\n}\\n.ql-editor .ql-align-right {\\n text-align: right;\\n}\\n.ql-editor.ql-blank::before {\\n color: rgba(0,0,0,0.6);\\n content: attr(data-placeholder);\\n font-style: italic;\\n left: 15px;\\n pointer-events: none;\\n position: absolute;\\n right: 15px;\\n}\\n\",\"\"]),l.Z=r},467:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o)()(i());r.push([n.id,\"/*!\\n * Quill Editor v1.3.7\\n * https://quilljs.com/\\n * Copyright (c) 2014, Jason Chen\\n * Copyright (c) 2013, salesforce.com\\n */\\n.ql-container {\\n box-sizing: border-box;\\n font-family: Helvetica, Arial, sans-serif;\\n font-size: 13px;\\n height: 100%;\\n margin: 0px;\\n position: relative;\\n}\\n.ql-container.ql-disabled .ql-tooltip {\\n visibility: hidden;\\n}\\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\\n pointer-events: none;\\n}\\n.ql-clipboard {\\n left: -100000px;\\n height: 1px;\\n overflow-y: hidden;\\n position: absolute;\\n top: 50%;\\n}\\n.ql-clipboard p {\\n margin: 0;\\n padding: 0;\\n}\\n.ql-editor {\\n box-sizing: border-box;\\n line-height: 1.42;\\n height: 100%;\\n outline: none;\\n overflow-y: auto;\\n padding: 12px 15px;\\n tab-size: 4;\\n -moz-tab-size: 4;\\n text-align: left;\\n white-space: pre-wrap;\\n word-wrap: break-word;\\n}\\n.ql-editor > * {\\n cursor: text;\\n}\\n.ql-editor p,\\n.ql-editor ol,\\n.ql-editor ul,\\n.ql-editor pre,\\n.ql-editor blockquote,\\n.ql-editor h1,\\n.ql-editor h2,\\n.ql-editor h3,\\n.ql-editor h4,\\n.ql-editor h5,\\n.ql-editor h6 {\\n margin: 0;\\n padding: 0;\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol,\\n.ql-editor ul {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol > li,\\n.ql-editor ul > li {\\n list-style-type: none;\\n}\\n.ql-editor ul > li::before {\\n content: '\\\\2022';\\n}\\n.ql-editor ul[data-checked=true],\\n.ql-editor ul[data-checked=false] {\\n pointer-events: none;\\n}\\n.ql-editor ul[data-checked=true] > li *,\\n.ql-editor ul[data-checked=false] > li * {\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before,\\n.ql-editor ul[data-checked=false] > li::before {\\n color: #777;\\n cursor: pointer;\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before {\\n content: '\\\\2611';\\n}\\n.ql-editor ul[data-checked=false] > li::before {\\n content: '\\\\2610';\\n}\\n.ql-editor li::before {\\n display: inline-block;\\n white-space: nowrap;\\n width: 1.2em;\\n}\\n.ql-editor li:not(.ql-direction-rtl)::before {\\n margin-left: -1.5em;\\n margin-right: 0.3em;\\n text-align: right;\\n}\\n.ql-editor li.ql-direction-rtl::before {\\n margin-left: 0.3em;\\n margin-right: -1.5em;\\n}\\n.ql-editor ol li:not(.ql-direction-rtl),\\n.ql-editor ul li:not(.ql-direction-rtl) {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol li.ql-direction-rtl,\\n.ql-editor ul li.ql-direction-rtl {\\n padding-right: 1.5em;\\n}\\n.ql-editor ol li {\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n counter-increment: list-0;\\n}\\n.ql-editor ol li:before {\\n content: counter(list-0, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-increment: list-1;\\n}\\n.ql-editor ol li.ql-indent-1:before {\\n content: counter(list-1, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-increment: list-2;\\n}\\n.ql-editor ol li.ql-indent-2:before {\\n content: counter(list-2, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-increment: list-3;\\n}\\n.ql-editor ol li.ql-indent-3:before {\\n content: counter(list-3, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-increment: list-4;\\n}\\n.ql-editor ol li.ql-indent-4:before {\\n content: counter(list-4, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-reset: list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-increment: list-5;\\n}\\n.ql-editor ol li.ql-indent-5:before {\\n content: counter(list-5, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-reset: list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-increment: list-6;\\n}\\n.ql-editor ol li.ql-indent-6:before {\\n content: counter(list-6, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-reset: list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-increment: list-7;\\n}\\n.ql-editor ol li.ql-indent-7:before {\\n content: counter(list-7, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-reset: list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-increment: list-8;\\n}\\n.ql-editor ol li.ql-indent-8:before {\\n content: counter(list-8, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-reset: list-9;\\n}\\n.ql-editor ol li.ql-indent-9 {\\n counter-increment: list-9;\\n}\\n.ql-editor ol li.ql-indent-9:before {\\n content: counter(list-9, decimal) '. ';\\n}\\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 3em;\\n}\\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 4.5em;\\n}\\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 3em;\\n}\\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 4.5em;\\n}\\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 6em;\\n}\\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 7.5em;\\n}\\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 6em;\\n}\\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 7.5em;\\n}\\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 9em;\\n}\\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 10.5em;\\n}\\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 9em;\\n}\\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 10.5em;\\n}\\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 12em;\\n}\\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 13.5em;\\n}\\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 12em;\\n}\\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 13.5em;\\n}\\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 15em;\\n}\\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 16.5em;\\n}\\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 15em;\\n}\\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 16.5em;\\n}\\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 18em;\\n}\\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 19.5em;\\n}\\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 18em;\\n}\\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 19.5em;\\n}\\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 21em;\\n}\\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 22.5em;\\n}\\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 21em;\\n}\\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 22.5em;\\n}\\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 24em;\\n}\\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 25.5em;\\n}\\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 24em;\\n}\\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 25.5em;\\n}\\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 27em;\\n}\\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 28.5em;\\n}\\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 27em;\\n}\\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 28.5em;\\n}\\n.ql-editor .ql-video {\\n display: block;\\n max-width: 100%;\\n}\\n.ql-editor .ql-video.ql-align-center {\\n margin: 0 auto;\\n}\\n.ql-editor .ql-video.ql-align-right {\\n margin: 0 0 0 auto;\\n}\\n.ql-editor .ql-bg-black {\\n background-color: #000;\\n}\\n.ql-editor .ql-bg-red {\\n background-color: #e60000;\\n}\\n.ql-editor .ql-bg-orange {\\n background-color: #f90;\\n}\\n.ql-editor .ql-bg-yellow {\\n background-color: #ff0;\\n}\\n.ql-editor .ql-bg-green {\\n background-color: #008a00;\\n}\\n.ql-editor .ql-bg-blue {\\n background-color: #06c;\\n}\\n.ql-editor .ql-bg-purple {\\n background-color: #93f;\\n}\\n.ql-editor .ql-color-white {\\n color: #fff;\\n}\\n.ql-editor .ql-color-red {\\n color: #e60000;\\n}\\n.ql-editor .ql-color-orange {\\n color: #f90;\\n}\\n.ql-editor .ql-color-yellow {\\n color: #ff0;\\n}\\n.ql-editor .ql-color-green {\\n color: #008a00;\\n}\\n.ql-editor .ql-color-blue {\\n color: #06c;\\n}\\n.ql-editor .ql-color-purple {\\n color: #93f;\\n}\\n.ql-editor .ql-font-serif {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-editor .ql-font-monospace {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-editor .ql-size-small {\\n font-size: 0.75em;\\n}\\n.ql-editor .ql-size-large {\\n font-size: 1.5em;\\n}\\n.ql-editor .ql-size-huge {\\n font-size: 2.5em;\\n}\\n.ql-editor .ql-direction-rtl {\\n direction: rtl;\\n text-align: inherit;\\n}\\n.ql-editor .ql-align-center {\\n text-align: center;\\n}\\n.ql-editor .ql-align-justify {\\n text-align: justify;\\n}\\n.ql-editor .ql-align-right {\\n text-align: right;\\n}\\n.ql-editor.ql-blank::before {\\n color: rgba(0,0,0,0.6);\\n content: attr(data-placeholder);\\n font-style: italic;\\n left: 15px;\\n pointer-events: none;\\n position: absolute;\\n right: 15px;\\n}\\n.ql-snow.ql-toolbar:after,\\n.ql-snow .ql-toolbar:after {\\n clear: both;\\n content: '';\\n display: table;\\n}\\n.ql-snow.ql-toolbar button,\\n.ql-snow .ql-toolbar button {\\n background: none;\\n border: none;\\n cursor: pointer;\\n display: inline-block;\\n float: left;\\n height: 24px;\\n padding: 3px 5px;\\n width: 28px;\\n}\\n.ql-snow.ql-toolbar button svg,\\n.ql-snow .ql-toolbar button svg {\\n float: left;\\n height: 100%;\\n}\\n.ql-snow.ql-toolbar button:active:hover,\\n.ql-snow .ql-toolbar button:active:hover {\\n outline: none;\\n}\\n.ql-snow.ql-toolbar input.ql-image[type=file],\\n.ql-snow .ql-toolbar input.ql-image[type=file] {\\n display: none;\\n}\\n.ql-snow.ql-toolbar button:hover,\\n.ql-snow .ql-toolbar button:hover,\\n.ql-snow.ql-toolbar button:focus,\\n.ql-snow .ql-toolbar button:focus,\\n.ql-snow.ql-toolbar button.ql-active,\\n.ql-snow .ql-toolbar button.ql-active,\\n.ql-snow.ql-toolbar .ql-picker-label:hover,\\n.ql-snow .ql-toolbar .ql-picker-label:hover,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active,\\n.ql-snow.ql-toolbar .ql-picker-item:hover,\\n.ql-snow .ql-toolbar .ql-picker-item:hover,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected {\\n color: #06c;\\n}\\n.ql-snow.ql-toolbar button:hover .ql-fill,\\n.ql-snow .ql-toolbar button:hover .ql-fill,\\n.ql-snow.ql-toolbar button:focus .ql-fill,\\n.ql-snow .ql-toolbar button:focus .ql-fill,\\n.ql-snow.ql-toolbar button.ql-active .ql-fill,\\n.ql-snow .ql-toolbar button.ql-active .ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\\n.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\\n fill: #06c;\\n}\\n.ql-snow.ql-toolbar button:hover .ql-stroke,\\n.ql-snow .ql-toolbar button:hover .ql-stroke,\\n.ql-snow.ql-toolbar button:focus .ql-stroke,\\n.ql-snow .ql-toolbar button:focus .ql-stroke,\\n.ql-snow.ql-toolbar button.ql-active .ql-stroke,\\n.ql-snow .ql-toolbar button.ql-active .ql-stroke,\\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,\\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,\\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\\n.ql-snow.ql-toolbar button:hover .ql-stroke-miter,\\n.ql-snow .ql-toolbar button:hover .ql-stroke-miter,\\n.ql-snow.ql-toolbar button:focus .ql-stroke-miter,\\n.ql-snow .ql-toolbar button:focus .ql-stroke-miter,\\n.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,\\n.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,\\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\\n stroke: #06c;\\n}\\n@media (pointer: coarse) {\\n .ql-snow.ql-toolbar button:hover:not(.ql-active),\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) {\\n color: #444;\\n }\\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,\\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\\n fill: #444;\\n }\\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\\n stroke: #444;\\n }\\n}\\n.ql-snow {\\n box-sizing: border-box;\\n}\\n.ql-snow * {\\n box-sizing: border-box;\\n}\\n.ql-snow .ql-hidden {\\n display: none;\\n}\\n.ql-snow .ql-out-bottom,\\n.ql-snow .ql-out-top {\\n visibility: hidden;\\n}\\n.ql-snow .ql-tooltip {\\n position: absolute;\\n transform: translateY(10px);\\n}\\n.ql-snow .ql-tooltip a {\\n cursor: pointer;\\n text-decoration: none;\\n}\\n.ql-snow .ql-tooltip.ql-flip {\\n transform: translateY(-10px);\\n}\\n.ql-snow .ql-formats {\\n display: inline-block;\\n vertical-align: middle;\\n}\\n.ql-snow .ql-formats:after {\\n clear: both;\\n content: '';\\n display: table;\\n}\\n.ql-snow .ql-stroke {\\n fill: none;\\n stroke: #444;\\n stroke-linecap: round;\\n stroke-linejoin: round;\\n stroke-width: 2;\\n}\\n.ql-snow .ql-stroke-miter {\\n fill: none;\\n stroke: #444;\\n stroke-miterlimit: 10;\\n stroke-width: 2;\\n}\\n.ql-snow .ql-fill,\\n.ql-snow .ql-stroke.ql-fill {\\n fill: #444;\\n}\\n.ql-snow .ql-empty {\\n fill: none;\\n}\\n.ql-snow .ql-even {\\n fill-rule: evenodd;\\n}\\n.ql-snow .ql-thin,\\n.ql-snow .ql-stroke.ql-thin {\\n stroke-width: 1;\\n}\\n.ql-snow .ql-transparent {\\n opacity: 0.4;\\n}\\n.ql-snow .ql-direction svg:last-child {\\n display: none;\\n}\\n.ql-snow .ql-direction.ql-active svg:last-child {\\n display: inline;\\n}\\n.ql-snow .ql-direction.ql-active svg:first-child {\\n display: none;\\n}\\n.ql-snow .ql-editor h1 {\\n font-size: 2em;\\n}\\n.ql-snow .ql-editor h2 {\\n font-size: 1.5em;\\n}\\n.ql-snow .ql-editor h3 {\\n font-size: 1.17em;\\n}\\n.ql-snow .ql-editor h4 {\\n font-size: 1em;\\n}\\n.ql-snow .ql-editor h5 {\\n font-size: 0.83em;\\n}\\n.ql-snow .ql-editor h6 {\\n font-size: 0.67em;\\n}\\n.ql-snow .ql-editor a {\\n text-decoration: underline;\\n}\\n.ql-snow .ql-editor blockquote {\\n border-left: 4px solid #ccc;\\n margin-bottom: 5px;\\n margin-top: 5px;\\n padding-left: 16px;\\n}\\n.ql-snow .ql-editor code,\\n.ql-snow .ql-editor pre {\\n background-color: #f0f0f0;\\n border-radius: 3px;\\n}\\n.ql-snow .ql-editor pre {\\n white-space: pre-wrap;\\n margin-bottom: 5px;\\n margin-top: 5px;\\n padding: 5px 10px;\\n}\\n.ql-snow .ql-editor code {\\n font-size: 85%;\\n padding: 2px 4px;\\n}\\n.ql-snow .ql-editor pre.ql-syntax {\\n background-color: #23241f;\\n color: #f8f8f2;\\n overflow: visible;\\n}\\n.ql-snow .ql-editor img {\\n max-width: 100%;\\n}\\n.ql-snow .ql-picker {\\n color: #444;\\n display: inline-block;\\n float: left;\\n font-size: 14px;\\n font-weight: 500;\\n height: 24px;\\n position: relative;\\n vertical-align: middle;\\n}\\n.ql-snow .ql-picker-label {\\n cursor: pointer;\\n display: inline-block;\\n height: 100%;\\n padding-left: 8px;\\n padding-right: 2px;\\n position: relative;\\n width: 100%;\\n}\\n.ql-snow .ql-picker-label::before {\\n display: inline-block;\\n line-height: 22px;\\n}\\n.ql-snow .ql-picker-options {\\n background-color: #fff;\\n display: none;\\n min-width: 100%;\\n padding: 4px 8px;\\n position: absolute;\\n white-space: nowrap;\\n}\\n.ql-snow .ql-picker-options .ql-picker-item {\\n cursor: pointer;\\n display: block;\\n padding-bottom: 5px;\\n padding-top: 5px;\\n}\\n.ql-snow .ql-picker.ql-expanded .ql-picker-label {\\n color: #ccc;\\n z-index: 2;\\n}\\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {\\n fill: #ccc;\\n}\\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\\n stroke: #ccc;\\n}\\n.ql-snow .ql-picker.ql-expanded .ql-picker-options {\\n display: block;\\n margin-top: -1px;\\n top: 100%;\\n z-index: 1;\\n}\\n.ql-snow .ql-color-picker,\\n.ql-snow .ql-icon-picker {\\n width: 28px;\\n}\\n.ql-snow .ql-color-picker .ql-picker-label,\\n.ql-snow .ql-icon-picker .ql-picker-label {\\n padding: 2px 4px;\\n}\\n.ql-snow .ql-color-picker .ql-picker-label svg,\\n.ql-snow .ql-icon-picker .ql-picker-label svg {\\n right: 4px;\\n}\\n.ql-snow .ql-icon-picker .ql-picker-options {\\n padding: 4px 0px;\\n}\\n.ql-snow .ql-icon-picker .ql-picker-item {\\n height: 24px;\\n width: 24px;\\n padding: 2px 4px;\\n}\\n.ql-snow .ql-color-picker .ql-picker-options {\\n padding: 3px 5px;\\n width: 152px;\\n}\\n.ql-snow .ql-color-picker .ql-picker-item {\\n border: 1px solid transparent;\\n float: left;\\n height: 16px;\\n margin: 2px;\\n padding: 0px;\\n width: 16px;\\n}\\n.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\\n position: absolute;\\n margin-top: -9px;\\n right: 0;\\n top: 50%;\\n width: 18px;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {\\n content: attr(data-label);\\n}\\n.ql-snow .ql-picker.ql-header {\\n width: 98px;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item::before {\\n content: 'Normal';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"1\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"1\\\"]::before {\\n content: 'Heading 1';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"2\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"2\\\"]::before {\\n content: 'Heading 2';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"3\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"3\\\"]::before {\\n content: 'Heading 3';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"4\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"4\\\"]::before {\\n content: 'Heading 4';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"5\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"5\\\"]::before {\\n content: 'Heading 5';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"6\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"6\\\"]::before {\\n content: 'Heading 6';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"1\\\"]::before {\\n font-size: 2em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"2\\\"]::before {\\n font-size: 1.5em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"3\\\"]::before {\\n font-size: 1.17em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"4\\\"]::before {\\n font-size: 1em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"5\\\"]::before {\\n font-size: 0.83em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"6\\\"]::before {\\n font-size: 0.67em;\\n}\\n.ql-snow .ql-picker.ql-font {\\n width: 108px;\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-label::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-item::before {\\n content: 'Sans Serif';\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\\n content: 'Serif';\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\\n content: 'Monospace';\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-snow .ql-picker.ql-size {\\n width: 98px;\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-label::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item::before {\\n content: 'Normal';\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\\n content: 'Small';\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\\n content: 'Large';\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\\n content: 'Huge';\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\\n font-size: 10px;\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\\n font-size: 18px;\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\\n font-size: 32px;\\n}\\n.ql-snow .ql-color-picker.ql-background .ql-picker-item {\\n background-color: #fff;\\n}\\n.ql-snow .ql-color-picker.ql-color .ql-picker-item {\\n background-color: #000;\\n}\\n.ql-toolbar.ql-snow {\\n border: 1px solid #ccc;\\n box-sizing: border-box;\\n font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;\\n padding: 8px;\\n}\\n.ql-toolbar.ql-snow .ql-formats {\\n margin-right: 15px;\\n}\\n.ql-toolbar.ql-snow .ql-picker-label {\\n border: 1px solid transparent;\\n}\\n.ql-toolbar.ql-snow .ql-picker-options {\\n border: 1px solid transparent;\\n box-shadow: rgba(0,0,0,0.2) 0 2px 8px;\\n}\\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {\\n border-color: #ccc;\\n}\\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {\\n border-color: #ccc;\\n}\\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,\\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {\\n border-color: #000;\\n}\\n.ql-toolbar.ql-snow + .ql-container.ql-snow {\\n border-top: 0px;\\n}\\n.ql-snow .ql-tooltip {\\n background-color: #fff;\\n border: 1px solid #ccc;\\n box-shadow: 0px 0px 5px #ddd;\\n color: #444;\\n padding: 5px 12px;\\n white-space: nowrap;\\n}\\n.ql-snow .ql-tooltip::before {\\n content: \\\"Visit URL:\\\";\\n line-height: 26px;\\n margin-right: 8px;\\n}\\n.ql-snow .ql-tooltip input[type=text] {\\n display: none;\\n border: 1px solid #ccc;\\n font-size: 13px;\\n height: 26px;\\n margin: 0px;\\n padding: 3px 5px;\\n width: 170px;\\n}\\n.ql-snow .ql-tooltip a.ql-preview {\\n display: inline-block;\\n max-width: 200px;\\n overflow-x: hidden;\\n text-overflow: ellipsis;\\n vertical-align: top;\\n}\\n.ql-snow .ql-tooltip a.ql-action::after {\\n border-right: 1px solid #ccc;\\n content: 'Edit';\\n margin-left: 16px;\\n padding-right: 8px;\\n}\\n.ql-snow .ql-tooltip a.ql-remove::before {\\n content: 'Remove';\\n margin-left: 8px;\\n}\\n.ql-snow .ql-tooltip a {\\n line-height: 26px;\\n}\\n.ql-snow .ql-tooltip.ql-editing a.ql-preview,\\n.ql-snow .ql-tooltip.ql-editing a.ql-remove {\\n display: none;\\n}\\n.ql-snow .ql-tooltip.ql-editing input[type=text] {\\n display: inline-block;\\n}\\n.ql-snow .ql-tooltip.ql-editing a.ql-action::after {\\n border-right: 0px;\\n content: 'Save';\\n padding-right: 0px;\\n}\\n.ql-snow .ql-tooltip[data-mode=link]::before {\\n content: \\\"Enter link:\\\";\\n}\\n.ql-snow .ql-tooltip[data-mode=formula]::before {\\n content: \\\"Enter formula:\\\";\\n}\\n.ql-snow .ql-tooltip[data-mode=video]::before {\\n content: \\\"Enter video:\\\";\\n}\\n.ql-snow a {\\n color: #06c;\\n}\\n.ql-container.ql-snow {\\n border: 1px solid #ccc;\\n}\\n\",\"\"]),l.Z=r},870:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o),a=e(450),q=e(126),d=e(893),c=e(467),b=e(189),p=e.n(b),s=new URL(e(648),e.b),f=new URL(e(300),e.b),u=new URL(e(897),e.b),g=new URL(e(867),e.b),k=r()(i());k.i(a.Z),k.i(q.Z),k.i(d.Z),k.i(c.Z);var h=p()(s),m=p()(f),w=p()(u),x=p()(g);k.push([n.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 .flatpickr-input:not([disabled]){background-color:var(--sp-white, #ffffff);background-image:url(\"+h+\");background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 16px}.date-time .flatpickr-input[readonly]{color:var(--sp-neutral-dark, #201f1e);background-color:var(--sp-white, #ffffff);border-color:var(--sp-info-icon, #605e5c)}.date-time .flatpickr-input[readonly]:hover{border-color:var(--sp-theme-light, #c7e0f4)}.date-time .flatpickr-input[readonly]:focus{border-color:var(--sp-theme-secondary, #2b88d8);box-shadow:0 0 0 .25rem color-mix(in srgb, var(--sp-theme-tertiary, #71afe5), transparent 65%);color:var(--sp-primary-text, #333333)}.date-time .flatpickr-input:not([disabled]).is-invalid{background-image:url(\"+h+\"),url(\"+m+\");background-position:right .75rem center,center right 2.25rem;background-size:16px 16px,calc(.75em + .375rem) calc(.75em + .375rem);border-color:var(--sp-error-icon, #a80000)}.date-time .flatpickr-input:not([disabled]).is-valid{background-image:url(\"+h+\"),url(\"+w+\");background-position:right .75rem center,center right 2.25rem;background-size:16px 16px,calc(.75em + .375rem) calc(.75em + .375rem);border-color:var(--sp-success-icon, #107c10)}.date-time .flatpickr-input:not([disabled]).is-invalid:hover{border-color:var(--sp-error-icon, #a80000)}.date-time .flatpickr-input:not([disabled]).is-valid:hover{border-color:var(--sp-success-icon, #107c10)}.date-time .flatpickr-input:not([disabled]).is-invalid:focus{border-color:var(--sp-error-icon, #a80000);box-shadow:0 0 0 .25rem color-mix(in srgb, var(--sp-error-icon, #a80000), transparent 25%)}.date-time .flatpickr-input:not([disabled]).is-valid:focus{border-color:var(--sp-success-icon, #107c10);box-shadow:0 0 0 .25rem color-mix(in srgb, var(--sp-success-icon, #107c10), transparent 25%)}.flatpickr-day.selected{background-color:var(--sp-theme-primary, #0078d4);border-color:var(--sp-theme-primary, #0078d4)}.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{background-color:var(--sp-white, #ffffff) !important;color:var(--sp-black, #000000);margin-bottom:.15rem;padding-top:.1rem;text-decoration:none}.people-picker input.form-control{background-color:var(--sp-white, #ffffff);background-image:url(\"+x+\");background-repeat:no-repeat;background-position:right .65rem center;background-size:20px 20px;border-bottom-right-radius:.375rem !important;border-top-right-radius:.375rem !important}.people-picker input.form-control.is-invalid{background-image:url(\"+x+\"),url(\"+m+\");background-position:right .65rem center,center right 2.25rem;background-size:20px 20px,calc(.75em + .375rem) calc(.75em + .375rem)}.people-picker input.form-control.is-valid{background-image:url(\"+x+\"),url(\"+w+\");background-position:right .65rem center,center right 2.25rem;background-size:20px 20px,calc(.75em + .375rem) calc(.75em + .375rem)}.rich-textbox .ql-formats>button{min-width:auto}.rich-textbox .ql-container.ql-snow,.rich-textbox .ql-toolbar.ql-snow{border-color:var(--sp-info-icon, #605e5c)}.rich-textbox .ql-container.ql-disabled{background-color:var(--sp-theme-lighter-alt, #eff6fc);border-color:var(--sp-neutral-light, #edebe9);color:var(--sp-neutral-tertiary, #a19f9d);opacity:1}\",\"\"]),l.Z=k},196:function(n){n.exports=function(n){var l=[];return l.toString=function(){return this.map((function(l){var e=\"\",t=void 0!==l[5];return l[4]&&(e+=\"@supports (\".concat(l[4],\") {\")),l[2]&&(e+=\"@media \".concat(l[2],\" {\")),t&&(e+=\"@layer\".concat(l[5].length>0?\" \".concat(l[5]):\"\",\" {\")),e+=n(l),t&&(e+=\"}\"),l[2]&&(e+=\"}\"),l[4]&&(e+=\"}\"),e})).join(\"\")},l.i=function(n,e,t,i,o){\"string\"==typeof n&&(n=[[null,n,void 0]]);var r={};if(t)for(var a=0;a<this.length;a++){var q=this[a][0];null!=q&&(r[q]=!0)}for(var d=0;d<n.length;d++){var c=[].concat(n[d]);t&&r[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]=\"@layer\".concat(c[5].length>0?\" \".concat(c[5]):\"\",\" {\").concat(c[1],\"}\")),c[5]=o),e&&(c[2]?(c[1]=\"@media \".concat(c[2],\" {\").concat(c[1],\"}\"),c[2]=e):c[2]=e),i&&(c[4]?(c[1]=\"@supports (\".concat(c[4],\") {\").concat(c[1],\"}\"),c[4]=i):c[4]=\"\".concat(i)),l.push(c))}},l}},189:function(n){n.exports=function(n,l){return l||(l={}),n?(n=String(n.__esModule?n.default:n),/^['\"].*['\"]$/.test(n)&&(n=n.slice(1,-1)),l.hash&&(n+=l.hash),/[\"'() \\t\\n]|(%20)/.test(n)||l.needQuotes?'\"'.concat(n.replace(/\"/g,'\\\\\"').replace(/\\n/g,\"\\\\n\"),'\"'):n):n}},650:function(n){n.exports=function(n){return n[1]}},62:function(n){var l=[];function e(n){for(var e=-1,t=0;t<l.length;t++)if(l[t].identifier===n){e=t;break}return e}function t(n,t){for(var o={},r=[],a=0;a<n.length;a++){var q=n[a],d=t.base?q[0]+t.base:q[0],c=o[d]||0,b=\"\".concat(d,\" \").concat(c);o[d]=c+1;var p=e(b),s={css:q[1],media:q[2],sourceMap:q[3],supports:q[4],layer:q[5]};if(-1!==p)l[p].references++,l[p].updater(s);else{var f=i(s,t);t.byIndex=a,l.splice(a,0,{identifier:b,updater:f,references:1})}r.push(b)}return r}function i(n,l){var e=l.domAPI(l);e.update(n);return function(l){if(l){if(l.css===n.css&&l.media===n.media&&l.sourceMap===n.sourceMap&&l.supports===n.supports&&l.layer===n.layer)return;e.update(n=l)}else e.remove()}}n.exports=function(n,i){var o=t(n=n||[],i=i||{});return function(n){n=n||[];for(var r=0;r<o.length;r++){var a=e(o[r]);l[a].references--}for(var q=t(n,i),d=0;d<o.length;d++){var c=e(o[d]);0===l[c].references&&(l[c].updater(),l.splice(c,1))}o=q}}},566:function(n){var l={};n.exports=function(n,e){var t=function(n){if(void 0===l[n]){var e=document.querySelector(n);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(n){e=null}l[n]=e}return l[n]}(n);if(!t)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");t.appendChild(e)}},911:function(n){n.exports=function(n){var l=document.createElement(\"style\");return n.setAttributes(l,n.attributes),n.insert(l,n.options),l}},107:function(n,l,e){n.exports=function(n){var l=e.nc;l&&n.setAttribute(\"nonce\",l)}},552:function(n){n.exports=function(n){if(\"undefined\"==typeof document)return{update:function(){},remove:function(){}};var l=n.insertStyleElement(n);return{update:function(e){!function(n,l,e){var t=\"\";e.supports&&(t+=\"@supports (\".concat(e.supports,\") {\")),e.media&&(t+=\"@media \".concat(e.media,\" {\"));var i=void 0!==e.layer;i&&(t+=\"@layer\".concat(e.layer.length>0?\" \".concat(e.layer):\"\",\" {\")),t+=e.css,i&&(t+=\"}\"),e.media&&(t+=\"}\"),e.supports&&(t+=\"}\");var o=e.sourceMap;o&&\"undefined\"!=typeof btoa&&(t+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o)))),\" */\")),l.styleTagTransform(t,n,l.options)}(l,n,e)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(l)}}}},227:function(n){n.exports=function(n,l){if(l.styleSheet)l.styleSheet.cssText=n;else{for(;l.firstChild;)l.removeChild(l.firstChild);l.appendChild(document.createTextNode(n))}}},300:function(n){n.exports=\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23a80000%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23a80000%27 stroke=%27none%27/%3e%3c/svg%3e\"},897:function(n){n.exports=\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23107c10%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e\"},648:function(n){n.exports=\"data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%271em%27 height=%271em%27 fill=%27%23605e5c%27 class=%27bi bi-calendar%27 viewBox=%270 0 16 16%27><path d=%27M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z%27/></svg>\"},867:function(n){n.exports=\"data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%271em%27 height=%271em%27 fill=%27%23605e5c%27 class=%27bi bi-person-fill%27 viewBox=%270 0 16 16%27><path d=%27M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z%27/></svg>\"}},l={};function e(t){var i=l[t];if(void 0!==i)return i.exports;var o=l[t]={id:t,exports:{}};return n[t](o,o.exports,e),o.exports}e.m=n,e.n=function(n){var l=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(l,{a:l}),l},e.d=function(n,l){for(var t in l)e.o(l,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:l[t]})},e.o=function(n,l){return Object.prototype.hasOwnProperty.call(n,l)},e.b=document.baseURI||self.location.href,e.nc=void 0,function(){var n=e(62),l=e.n(n),t=e(552),i=e.n(t),o=e(566),r=e.n(o),a=e(107),q=e.n(a),d=e(911),c=e.n(d),b=e(227),p=e.n(b),s=e(870),f={};f.styleTagTransform=p(),f.setAttributes=q(),f.insert=r().bind(null,\"head\"),f.domAPI=i(),f.insertStyleElement=c();l()(s.Z,f),s.Z&&s.Z.locals&&s.Z.locals}()}();\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/styles.js?");
|
|
2323
|
+
eval("!function(){\"use strict\";var n={450:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o)()(i());r.push([n.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)}}',\"\"]),l.Z=r},893:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o)()(i());r.push([n.id,\"/*!\\n * Quill Editor v1.3.7\\n * https://quilljs.com/\\n * Copyright (c) 2014, Jason Chen\\n * Copyright (c) 2013, salesforce.com\\n */\\n.ql-container {\\n box-sizing: border-box;\\n font-family: Helvetica, Arial, sans-serif;\\n font-size: 13px;\\n height: 100%;\\n margin: 0px;\\n position: relative;\\n}\\n.ql-container.ql-disabled .ql-tooltip {\\n visibility: hidden;\\n}\\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\\n pointer-events: none;\\n}\\n.ql-clipboard {\\n left: -100000px;\\n height: 1px;\\n overflow-y: hidden;\\n position: absolute;\\n top: 50%;\\n}\\n.ql-clipboard p {\\n margin: 0;\\n padding: 0;\\n}\\n.ql-editor {\\n box-sizing: border-box;\\n line-height: 1.42;\\n height: 100%;\\n outline: none;\\n overflow-y: auto;\\n padding: 12px 15px;\\n tab-size: 4;\\n -moz-tab-size: 4;\\n text-align: left;\\n white-space: pre-wrap;\\n word-wrap: break-word;\\n}\\n.ql-editor > * {\\n cursor: text;\\n}\\n.ql-editor p,\\n.ql-editor ol,\\n.ql-editor ul,\\n.ql-editor pre,\\n.ql-editor blockquote,\\n.ql-editor h1,\\n.ql-editor h2,\\n.ql-editor h3,\\n.ql-editor h4,\\n.ql-editor h5,\\n.ql-editor h6 {\\n margin: 0;\\n padding: 0;\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol,\\n.ql-editor ul {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol > li,\\n.ql-editor ul > li {\\n list-style-type: none;\\n}\\n.ql-editor ul > li::before {\\n content: '\\\\2022';\\n}\\n.ql-editor ul[data-checked=true],\\n.ql-editor ul[data-checked=false] {\\n pointer-events: none;\\n}\\n.ql-editor ul[data-checked=true] > li *,\\n.ql-editor ul[data-checked=false] > li * {\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before,\\n.ql-editor ul[data-checked=false] > li::before {\\n color: #777;\\n cursor: pointer;\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before {\\n content: '\\\\2611';\\n}\\n.ql-editor ul[data-checked=false] > li::before {\\n content: '\\\\2610';\\n}\\n.ql-editor li::before {\\n display: inline-block;\\n white-space: nowrap;\\n width: 1.2em;\\n}\\n.ql-editor li:not(.ql-direction-rtl)::before {\\n margin-left: -1.5em;\\n margin-right: 0.3em;\\n text-align: right;\\n}\\n.ql-editor li.ql-direction-rtl::before {\\n margin-left: 0.3em;\\n margin-right: -1.5em;\\n}\\n.ql-editor ol li:not(.ql-direction-rtl),\\n.ql-editor ul li:not(.ql-direction-rtl) {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol li.ql-direction-rtl,\\n.ql-editor ul li.ql-direction-rtl {\\n padding-right: 1.5em;\\n}\\n.ql-editor ol li {\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n counter-increment: list-0;\\n}\\n.ql-editor ol li:before {\\n content: counter(list-0, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-increment: list-1;\\n}\\n.ql-editor ol li.ql-indent-1:before {\\n content: counter(list-1, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-increment: list-2;\\n}\\n.ql-editor ol li.ql-indent-2:before {\\n content: counter(list-2, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-increment: list-3;\\n}\\n.ql-editor ol li.ql-indent-3:before {\\n content: counter(list-3, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-increment: list-4;\\n}\\n.ql-editor ol li.ql-indent-4:before {\\n content: counter(list-4, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-reset: list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-increment: list-5;\\n}\\n.ql-editor ol li.ql-indent-5:before {\\n content: counter(list-5, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-reset: list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-increment: list-6;\\n}\\n.ql-editor ol li.ql-indent-6:before {\\n content: counter(list-6, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-reset: list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-increment: list-7;\\n}\\n.ql-editor ol li.ql-indent-7:before {\\n content: counter(list-7, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-reset: list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-increment: list-8;\\n}\\n.ql-editor ol li.ql-indent-8:before {\\n content: counter(list-8, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-reset: list-9;\\n}\\n.ql-editor ol li.ql-indent-9 {\\n counter-increment: list-9;\\n}\\n.ql-editor ol li.ql-indent-9:before {\\n content: counter(list-9, decimal) '. ';\\n}\\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 3em;\\n}\\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 4.5em;\\n}\\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 3em;\\n}\\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 4.5em;\\n}\\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 6em;\\n}\\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 7.5em;\\n}\\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 6em;\\n}\\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 7.5em;\\n}\\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 9em;\\n}\\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 10.5em;\\n}\\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 9em;\\n}\\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 10.5em;\\n}\\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 12em;\\n}\\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 13.5em;\\n}\\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 12em;\\n}\\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 13.5em;\\n}\\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 15em;\\n}\\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 16.5em;\\n}\\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 15em;\\n}\\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 16.5em;\\n}\\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 18em;\\n}\\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 19.5em;\\n}\\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 18em;\\n}\\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 19.5em;\\n}\\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 21em;\\n}\\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 22.5em;\\n}\\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 21em;\\n}\\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 22.5em;\\n}\\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 24em;\\n}\\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 25.5em;\\n}\\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 24em;\\n}\\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 25.5em;\\n}\\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 27em;\\n}\\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 28.5em;\\n}\\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 27em;\\n}\\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 28.5em;\\n}\\n.ql-editor .ql-video {\\n display: block;\\n max-width: 100%;\\n}\\n.ql-editor .ql-video.ql-align-center {\\n margin: 0 auto;\\n}\\n.ql-editor .ql-video.ql-align-right {\\n margin: 0 0 0 auto;\\n}\\n.ql-editor .ql-bg-black {\\n background-color: #000;\\n}\\n.ql-editor .ql-bg-red {\\n background-color: #e60000;\\n}\\n.ql-editor .ql-bg-orange {\\n background-color: #f90;\\n}\\n.ql-editor .ql-bg-yellow {\\n background-color: #ff0;\\n}\\n.ql-editor .ql-bg-green {\\n background-color: #008a00;\\n}\\n.ql-editor .ql-bg-blue {\\n background-color: #06c;\\n}\\n.ql-editor .ql-bg-purple {\\n background-color: #93f;\\n}\\n.ql-editor .ql-color-white {\\n color: #fff;\\n}\\n.ql-editor .ql-color-red {\\n color: #e60000;\\n}\\n.ql-editor .ql-color-orange {\\n color: #f90;\\n}\\n.ql-editor .ql-color-yellow {\\n color: #ff0;\\n}\\n.ql-editor .ql-color-green {\\n color: #008a00;\\n}\\n.ql-editor .ql-color-blue {\\n color: #06c;\\n}\\n.ql-editor .ql-color-purple {\\n color: #93f;\\n}\\n.ql-editor .ql-font-serif {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-editor .ql-font-monospace {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-editor .ql-size-small {\\n font-size: 0.75em;\\n}\\n.ql-editor .ql-size-large {\\n font-size: 1.5em;\\n}\\n.ql-editor .ql-size-huge {\\n font-size: 2.5em;\\n}\\n.ql-editor .ql-direction-rtl {\\n direction: rtl;\\n text-align: inherit;\\n}\\n.ql-editor .ql-align-center {\\n text-align: center;\\n}\\n.ql-editor .ql-align-justify {\\n text-align: justify;\\n}\\n.ql-editor .ql-align-right {\\n text-align: right;\\n}\\n.ql-editor.ql-blank::before {\\n color: rgba(0,0,0,0.6);\\n content: attr(data-placeholder);\\n font-style: italic;\\n left: 15px;\\n pointer-events: none;\\n position: absolute;\\n right: 15px;\\n}\\n.ql-bubble.ql-toolbar:after,\\n.ql-bubble .ql-toolbar:after {\\n clear: both;\\n content: '';\\n display: table;\\n}\\n.ql-bubble.ql-toolbar button,\\n.ql-bubble .ql-toolbar button {\\n background: none;\\n border: none;\\n cursor: pointer;\\n display: inline-block;\\n float: left;\\n height: 24px;\\n padding: 3px 5px;\\n width: 28px;\\n}\\n.ql-bubble.ql-toolbar button svg,\\n.ql-bubble .ql-toolbar button svg {\\n float: left;\\n height: 100%;\\n}\\n.ql-bubble.ql-toolbar button:active:hover,\\n.ql-bubble .ql-toolbar button:active:hover {\\n outline: none;\\n}\\n.ql-bubble.ql-toolbar input.ql-image[type=file],\\n.ql-bubble .ql-toolbar input.ql-image[type=file] {\\n display: none;\\n}\\n.ql-bubble.ql-toolbar button:hover,\\n.ql-bubble .ql-toolbar button:hover,\\n.ql-bubble.ql-toolbar button:focus,\\n.ql-bubble .ql-toolbar button:focus,\\n.ql-bubble.ql-toolbar button.ql-active,\\n.ql-bubble .ql-toolbar button.ql-active,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected {\\n color: #fff;\\n}\\n.ql-bubble.ql-toolbar button:hover .ql-fill,\\n.ql-bubble .ql-toolbar button:hover .ql-fill,\\n.ql-bubble.ql-toolbar button:focus .ql-fill,\\n.ql-bubble .ql-toolbar button:focus .ql-fill,\\n.ql-bubble.ql-toolbar button.ql-active .ql-fill,\\n.ql-bubble .ql-toolbar button.ql-active .ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\\n.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\\n fill: #fff;\\n}\\n.ql-bubble.ql-toolbar button:hover .ql-stroke,\\n.ql-bubble .ql-toolbar button:hover .ql-stroke,\\n.ql-bubble.ql-toolbar button:focus .ql-stroke,\\n.ql-bubble .ql-toolbar button:focus .ql-stroke,\\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke,\\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\\n.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,\\n.ql-bubble .ql-toolbar button:hover .ql-stroke-miter,\\n.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,\\n.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,\\n.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,\\n.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,\\n.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\\n.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\\n.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\\n.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\\n.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\\n.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\\n.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\\n.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\\n stroke: #fff;\\n}\\n@media (pointer: coarse) {\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active),\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) {\\n color: #ccc;\\n }\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\\n fill: #ccc;\\n }\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\\n .ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\\n .ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\\n stroke: #ccc;\\n }\\n}\\n.ql-bubble {\\n box-sizing: border-box;\\n}\\n.ql-bubble * {\\n box-sizing: border-box;\\n}\\n.ql-bubble .ql-hidden {\\n display: none;\\n}\\n.ql-bubble .ql-out-bottom,\\n.ql-bubble .ql-out-top {\\n visibility: hidden;\\n}\\n.ql-bubble .ql-tooltip {\\n position: absolute;\\n transform: translateY(10px);\\n}\\n.ql-bubble .ql-tooltip a {\\n cursor: pointer;\\n text-decoration: none;\\n}\\n.ql-bubble .ql-tooltip.ql-flip {\\n transform: translateY(-10px);\\n}\\n.ql-bubble .ql-formats {\\n display: inline-block;\\n vertical-align: middle;\\n}\\n.ql-bubble .ql-formats:after {\\n clear: both;\\n content: '';\\n display: table;\\n}\\n.ql-bubble .ql-stroke {\\n fill: none;\\n stroke: #ccc;\\n stroke-linecap: round;\\n stroke-linejoin: round;\\n stroke-width: 2;\\n}\\n.ql-bubble .ql-stroke-miter {\\n fill: none;\\n stroke: #ccc;\\n stroke-miterlimit: 10;\\n stroke-width: 2;\\n}\\n.ql-bubble .ql-fill,\\n.ql-bubble .ql-stroke.ql-fill {\\n fill: #ccc;\\n}\\n.ql-bubble .ql-empty {\\n fill: none;\\n}\\n.ql-bubble .ql-even {\\n fill-rule: evenodd;\\n}\\n.ql-bubble .ql-thin,\\n.ql-bubble .ql-stroke.ql-thin {\\n stroke-width: 1;\\n}\\n.ql-bubble .ql-transparent {\\n opacity: 0.4;\\n}\\n.ql-bubble .ql-direction svg:last-child {\\n display: none;\\n}\\n.ql-bubble .ql-direction.ql-active svg:last-child {\\n display: inline;\\n}\\n.ql-bubble .ql-direction.ql-active svg:first-child {\\n display: none;\\n}\\n.ql-bubble .ql-editor h1 {\\n font-size: 2em;\\n}\\n.ql-bubble .ql-editor h2 {\\n font-size: 1.5em;\\n}\\n.ql-bubble .ql-editor h3 {\\n font-size: 1.17em;\\n}\\n.ql-bubble .ql-editor h4 {\\n font-size: 1em;\\n}\\n.ql-bubble .ql-editor h5 {\\n font-size: 0.83em;\\n}\\n.ql-bubble .ql-editor h6 {\\n font-size: 0.67em;\\n}\\n.ql-bubble .ql-editor a {\\n text-decoration: underline;\\n}\\n.ql-bubble .ql-editor blockquote {\\n border-left: 4px solid #ccc;\\n margin-bottom: 5px;\\n margin-top: 5px;\\n padding-left: 16px;\\n}\\n.ql-bubble .ql-editor code,\\n.ql-bubble .ql-editor pre {\\n background-color: #f0f0f0;\\n border-radius: 3px;\\n}\\n.ql-bubble .ql-editor pre {\\n white-space: pre-wrap;\\n margin-bottom: 5px;\\n margin-top: 5px;\\n padding: 5px 10px;\\n}\\n.ql-bubble .ql-editor code {\\n font-size: 85%;\\n padding: 2px 4px;\\n}\\n.ql-bubble .ql-editor pre.ql-syntax {\\n background-color: #23241f;\\n color: #f8f8f2;\\n overflow: visible;\\n}\\n.ql-bubble .ql-editor img {\\n max-width: 100%;\\n}\\n.ql-bubble .ql-picker {\\n color: #ccc;\\n display: inline-block;\\n float: left;\\n font-size: 14px;\\n font-weight: 500;\\n height: 24px;\\n position: relative;\\n vertical-align: middle;\\n}\\n.ql-bubble .ql-picker-label {\\n cursor: pointer;\\n display: inline-block;\\n height: 100%;\\n padding-left: 8px;\\n padding-right: 2px;\\n position: relative;\\n width: 100%;\\n}\\n.ql-bubble .ql-picker-label::before {\\n display: inline-block;\\n line-height: 22px;\\n}\\n.ql-bubble .ql-picker-options {\\n background-color: #444;\\n display: none;\\n min-width: 100%;\\n padding: 4px 8px;\\n position: absolute;\\n white-space: nowrap;\\n}\\n.ql-bubble .ql-picker-options .ql-picker-item {\\n cursor: pointer;\\n display: block;\\n padding-bottom: 5px;\\n padding-top: 5px;\\n}\\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label {\\n color: #777;\\n z-index: 2;\\n}\\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill {\\n fill: #777;\\n}\\n.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\\n stroke: #777;\\n}\\n.ql-bubble .ql-picker.ql-expanded .ql-picker-options {\\n display: block;\\n margin-top: -1px;\\n top: 100%;\\n z-index: 1;\\n}\\n.ql-bubble .ql-color-picker,\\n.ql-bubble .ql-icon-picker {\\n width: 28px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-label,\\n.ql-bubble .ql-icon-picker .ql-picker-label {\\n padding: 2px 4px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-label svg,\\n.ql-bubble .ql-icon-picker .ql-picker-label svg {\\n right: 4px;\\n}\\n.ql-bubble .ql-icon-picker .ql-picker-options {\\n padding: 4px 0px;\\n}\\n.ql-bubble .ql-icon-picker .ql-picker-item {\\n height: 24px;\\n width: 24px;\\n padding: 2px 4px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-options {\\n padding: 3px 5px;\\n width: 152px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-item {\\n border: 1px solid transparent;\\n float: left;\\n height: 16px;\\n margin: 2px;\\n padding: 0px;\\n width: 16px;\\n}\\n.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\\n position: absolute;\\n margin-top: -9px;\\n right: 0;\\n top: 50%;\\n width: 18px;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {\\n content: attr(data-label);\\n}\\n.ql-bubble .ql-picker.ql-header {\\n width: 98px;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item::before {\\n content: 'Normal';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"1\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"1\\\"]::before {\\n content: 'Heading 1';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"2\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"2\\\"]::before {\\n content: 'Heading 2';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"3\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"3\\\"]::before {\\n content: 'Heading 3';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"4\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"4\\\"]::before {\\n content: 'Heading 4';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"5\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"5\\\"]::before {\\n content: 'Heading 5';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\\\"6\\\"]::before,\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"6\\\"]::before {\\n content: 'Heading 6';\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"1\\\"]::before {\\n font-size: 2em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"2\\\"]::before {\\n font-size: 1.5em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"3\\\"]::before {\\n font-size: 1.17em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"4\\\"]::before {\\n font-size: 1em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"5\\\"]::before {\\n font-size: 0.83em;\\n}\\n.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\\\"6\\\"]::before {\\n font-size: 0.67em;\\n}\\n.ql-bubble .ql-picker.ql-font {\\n width: 108px;\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-label::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-item::before {\\n content: 'Sans Serif';\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\\n content: 'Serif';\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\\n content: 'Monospace';\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-bubble .ql-picker.ql-size {\\n width: 98px;\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-label::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item::before {\\n content: 'Normal';\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\\n content: 'Small';\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\\n content: 'Large';\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\\n content: 'Huge';\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\\n font-size: 10px;\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\\n font-size: 18px;\\n}\\n.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\\n font-size: 32px;\\n}\\n.ql-bubble .ql-color-picker.ql-background .ql-picker-item {\\n background-color: #fff;\\n}\\n.ql-bubble .ql-color-picker.ql-color .ql-picker-item {\\n background-color: #000;\\n}\\n.ql-bubble .ql-toolbar .ql-formats {\\n margin: 8px 12px 8px 0px;\\n}\\n.ql-bubble .ql-toolbar .ql-formats:first-child {\\n margin-left: 12px;\\n}\\n.ql-bubble .ql-color-picker svg {\\n margin: 1px;\\n}\\n.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,\\n.ql-bubble .ql-color-picker .ql-picker-item:hover {\\n border-color: #fff;\\n}\\n.ql-bubble .ql-tooltip {\\n background-color: #444;\\n border-radius: 25px;\\n color: #fff;\\n}\\n.ql-bubble .ql-tooltip-arrow {\\n border-left: 6px solid transparent;\\n border-right: 6px solid transparent;\\n content: \\\" \\\";\\n display: block;\\n left: 50%;\\n margin-left: -6px;\\n position: absolute;\\n}\\n.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow {\\n border-bottom: 6px solid #444;\\n top: -6px;\\n}\\n.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow {\\n border-top: 6px solid #444;\\n bottom: -6px;\\n}\\n.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor {\\n display: block;\\n}\\n.ql-bubble .ql-tooltip.ql-editing .ql-formats {\\n visibility: hidden;\\n}\\n.ql-bubble .ql-tooltip-editor {\\n display: none;\\n}\\n.ql-bubble .ql-tooltip-editor input[type=text] {\\n background: transparent;\\n border: none;\\n color: #fff;\\n font-size: 13px;\\n height: 100%;\\n outline: none;\\n padding: 10px 20px;\\n position: absolute;\\n width: 100%;\\n}\\n.ql-bubble .ql-tooltip-editor a {\\n top: 10px;\\n position: absolute;\\n right: 20px;\\n}\\n.ql-bubble .ql-tooltip-editor a:before {\\n color: #ccc;\\n content: \\\"\\\\D7\\\";\\n font-size: 16px;\\n font-weight: bold;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a {\\n position: relative;\\n white-space: nowrap;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a::before {\\n background-color: #444;\\n border-radius: 15px;\\n top: -5px;\\n font-size: 12px;\\n color: #fff;\\n content: attr(href);\\n font-weight: normal;\\n overflow: hidden;\\n padding: 5px 15px;\\n text-decoration: none;\\n z-index: 1;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a::after {\\n border-top: 6px solid #444;\\n border-left: 6px solid transparent;\\n border-right: 6px solid transparent;\\n top: 0;\\n content: \\\" \\\";\\n height: 0;\\n width: 0;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a::before,\\n.ql-container.ql-bubble:not(.ql-disabled) a::after {\\n left: 0;\\n margin-left: 50%;\\n position: absolute;\\n transform: translate(-50%, -100%);\\n transition: visibility 0s ease 200ms;\\n visibility: hidden;\\n}\\n.ql-container.ql-bubble:not(.ql-disabled) a:hover::before,\\n.ql-container.ql-bubble:not(.ql-disabled) a:hover::after {\\n visibility: visible;\\n}\\n\",\"\"]),l.Z=r},126:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o)()(i());r.push([n.id,\"/*!\\n * Quill Editor v1.3.7\\n * https://quilljs.com/\\n * Copyright (c) 2014, Jason Chen\\n * Copyright (c) 2013, salesforce.com\\n */\\n.ql-container {\\n box-sizing: border-box;\\n font-family: Helvetica, Arial, sans-serif;\\n font-size: 13px;\\n height: 100%;\\n margin: 0px;\\n position: relative;\\n}\\n.ql-container.ql-disabled .ql-tooltip {\\n visibility: hidden;\\n}\\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\\n pointer-events: none;\\n}\\n.ql-clipboard {\\n left: -100000px;\\n height: 1px;\\n overflow-y: hidden;\\n position: absolute;\\n top: 50%;\\n}\\n.ql-clipboard p {\\n margin: 0;\\n padding: 0;\\n}\\n.ql-editor {\\n box-sizing: border-box;\\n line-height: 1.42;\\n height: 100%;\\n outline: none;\\n overflow-y: auto;\\n padding: 12px 15px;\\n tab-size: 4;\\n -moz-tab-size: 4;\\n text-align: left;\\n white-space: pre-wrap;\\n word-wrap: break-word;\\n}\\n.ql-editor > * {\\n cursor: text;\\n}\\n.ql-editor p,\\n.ql-editor ol,\\n.ql-editor ul,\\n.ql-editor pre,\\n.ql-editor blockquote,\\n.ql-editor h1,\\n.ql-editor h2,\\n.ql-editor h3,\\n.ql-editor h4,\\n.ql-editor h5,\\n.ql-editor h6 {\\n margin: 0;\\n padding: 0;\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol,\\n.ql-editor ul {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol > li,\\n.ql-editor ul > li {\\n list-style-type: none;\\n}\\n.ql-editor ul > li::before {\\n content: '\\\\2022';\\n}\\n.ql-editor ul[data-checked=true],\\n.ql-editor ul[data-checked=false] {\\n pointer-events: none;\\n}\\n.ql-editor ul[data-checked=true] > li *,\\n.ql-editor ul[data-checked=false] > li * {\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before,\\n.ql-editor ul[data-checked=false] > li::before {\\n color: #777;\\n cursor: pointer;\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before {\\n content: '\\\\2611';\\n}\\n.ql-editor ul[data-checked=false] > li::before {\\n content: '\\\\2610';\\n}\\n.ql-editor li::before {\\n display: inline-block;\\n white-space: nowrap;\\n width: 1.2em;\\n}\\n.ql-editor li:not(.ql-direction-rtl)::before {\\n margin-left: -1.5em;\\n margin-right: 0.3em;\\n text-align: right;\\n}\\n.ql-editor li.ql-direction-rtl::before {\\n margin-left: 0.3em;\\n margin-right: -1.5em;\\n}\\n.ql-editor ol li:not(.ql-direction-rtl),\\n.ql-editor ul li:not(.ql-direction-rtl) {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol li.ql-direction-rtl,\\n.ql-editor ul li.ql-direction-rtl {\\n padding-right: 1.5em;\\n}\\n.ql-editor ol li {\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n counter-increment: list-0;\\n}\\n.ql-editor ol li:before {\\n content: counter(list-0, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-increment: list-1;\\n}\\n.ql-editor ol li.ql-indent-1:before {\\n content: counter(list-1, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-increment: list-2;\\n}\\n.ql-editor ol li.ql-indent-2:before {\\n content: counter(list-2, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-increment: list-3;\\n}\\n.ql-editor ol li.ql-indent-3:before {\\n content: counter(list-3, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-increment: list-4;\\n}\\n.ql-editor ol li.ql-indent-4:before {\\n content: counter(list-4, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-reset: list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-increment: list-5;\\n}\\n.ql-editor ol li.ql-indent-5:before {\\n content: counter(list-5, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-reset: list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-increment: list-6;\\n}\\n.ql-editor ol li.ql-indent-6:before {\\n content: counter(list-6, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-reset: list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-increment: list-7;\\n}\\n.ql-editor ol li.ql-indent-7:before {\\n content: counter(list-7, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-reset: list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-increment: list-8;\\n}\\n.ql-editor ol li.ql-indent-8:before {\\n content: counter(list-8, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-reset: list-9;\\n}\\n.ql-editor ol li.ql-indent-9 {\\n counter-increment: list-9;\\n}\\n.ql-editor ol li.ql-indent-9:before {\\n content: counter(list-9, decimal) '. ';\\n}\\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 3em;\\n}\\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 4.5em;\\n}\\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 3em;\\n}\\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 4.5em;\\n}\\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 6em;\\n}\\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 7.5em;\\n}\\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 6em;\\n}\\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 7.5em;\\n}\\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 9em;\\n}\\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 10.5em;\\n}\\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 9em;\\n}\\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 10.5em;\\n}\\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 12em;\\n}\\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 13.5em;\\n}\\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 12em;\\n}\\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 13.5em;\\n}\\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 15em;\\n}\\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 16.5em;\\n}\\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 15em;\\n}\\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 16.5em;\\n}\\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 18em;\\n}\\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 19.5em;\\n}\\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 18em;\\n}\\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 19.5em;\\n}\\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 21em;\\n}\\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 22.5em;\\n}\\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 21em;\\n}\\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 22.5em;\\n}\\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 24em;\\n}\\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 25.5em;\\n}\\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 24em;\\n}\\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 25.5em;\\n}\\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 27em;\\n}\\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 28.5em;\\n}\\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 27em;\\n}\\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 28.5em;\\n}\\n.ql-editor .ql-video {\\n display: block;\\n max-width: 100%;\\n}\\n.ql-editor .ql-video.ql-align-center {\\n margin: 0 auto;\\n}\\n.ql-editor .ql-video.ql-align-right {\\n margin: 0 0 0 auto;\\n}\\n.ql-editor .ql-bg-black {\\n background-color: #000;\\n}\\n.ql-editor .ql-bg-red {\\n background-color: #e60000;\\n}\\n.ql-editor .ql-bg-orange {\\n background-color: #f90;\\n}\\n.ql-editor .ql-bg-yellow {\\n background-color: #ff0;\\n}\\n.ql-editor .ql-bg-green {\\n background-color: #008a00;\\n}\\n.ql-editor .ql-bg-blue {\\n background-color: #06c;\\n}\\n.ql-editor .ql-bg-purple {\\n background-color: #93f;\\n}\\n.ql-editor .ql-color-white {\\n color: #fff;\\n}\\n.ql-editor .ql-color-red {\\n color: #e60000;\\n}\\n.ql-editor .ql-color-orange {\\n color: #f90;\\n}\\n.ql-editor .ql-color-yellow {\\n color: #ff0;\\n}\\n.ql-editor .ql-color-green {\\n color: #008a00;\\n}\\n.ql-editor .ql-color-blue {\\n color: #06c;\\n}\\n.ql-editor .ql-color-purple {\\n color: #93f;\\n}\\n.ql-editor .ql-font-serif {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-editor .ql-font-monospace {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-editor .ql-size-small {\\n font-size: 0.75em;\\n}\\n.ql-editor .ql-size-large {\\n font-size: 1.5em;\\n}\\n.ql-editor .ql-size-huge {\\n font-size: 2.5em;\\n}\\n.ql-editor .ql-direction-rtl {\\n direction: rtl;\\n text-align: inherit;\\n}\\n.ql-editor .ql-align-center {\\n text-align: center;\\n}\\n.ql-editor .ql-align-justify {\\n text-align: justify;\\n}\\n.ql-editor .ql-align-right {\\n text-align: right;\\n}\\n.ql-editor.ql-blank::before {\\n color: rgba(0,0,0,0.6);\\n content: attr(data-placeholder);\\n font-style: italic;\\n left: 15px;\\n pointer-events: none;\\n position: absolute;\\n right: 15px;\\n}\\n\",\"\"]),l.Z=r},467:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o)()(i());r.push([n.id,\"/*!\\n * Quill Editor v1.3.7\\n * https://quilljs.com/\\n * Copyright (c) 2014, Jason Chen\\n * Copyright (c) 2013, salesforce.com\\n */\\n.ql-container {\\n box-sizing: border-box;\\n font-family: Helvetica, Arial, sans-serif;\\n font-size: 13px;\\n height: 100%;\\n margin: 0px;\\n position: relative;\\n}\\n.ql-container.ql-disabled .ql-tooltip {\\n visibility: hidden;\\n}\\n.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {\\n pointer-events: none;\\n}\\n.ql-clipboard {\\n left: -100000px;\\n height: 1px;\\n overflow-y: hidden;\\n position: absolute;\\n top: 50%;\\n}\\n.ql-clipboard p {\\n margin: 0;\\n padding: 0;\\n}\\n.ql-editor {\\n box-sizing: border-box;\\n line-height: 1.42;\\n height: 100%;\\n outline: none;\\n overflow-y: auto;\\n padding: 12px 15px;\\n tab-size: 4;\\n -moz-tab-size: 4;\\n text-align: left;\\n white-space: pre-wrap;\\n word-wrap: break-word;\\n}\\n.ql-editor > * {\\n cursor: text;\\n}\\n.ql-editor p,\\n.ql-editor ol,\\n.ql-editor ul,\\n.ql-editor pre,\\n.ql-editor blockquote,\\n.ql-editor h1,\\n.ql-editor h2,\\n.ql-editor h3,\\n.ql-editor h4,\\n.ql-editor h5,\\n.ql-editor h6 {\\n margin: 0;\\n padding: 0;\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol,\\n.ql-editor ul {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol > li,\\n.ql-editor ul > li {\\n list-style-type: none;\\n}\\n.ql-editor ul > li::before {\\n content: '\\\\2022';\\n}\\n.ql-editor ul[data-checked=true],\\n.ql-editor ul[data-checked=false] {\\n pointer-events: none;\\n}\\n.ql-editor ul[data-checked=true] > li *,\\n.ql-editor ul[data-checked=false] > li * {\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before,\\n.ql-editor ul[data-checked=false] > li::before {\\n color: #777;\\n cursor: pointer;\\n pointer-events: all;\\n}\\n.ql-editor ul[data-checked=true] > li::before {\\n content: '\\\\2611';\\n}\\n.ql-editor ul[data-checked=false] > li::before {\\n content: '\\\\2610';\\n}\\n.ql-editor li::before {\\n display: inline-block;\\n white-space: nowrap;\\n width: 1.2em;\\n}\\n.ql-editor li:not(.ql-direction-rtl)::before {\\n margin-left: -1.5em;\\n margin-right: 0.3em;\\n text-align: right;\\n}\\n.ql-editor li.ql-direction-rtl::before {\\n margin-left: 0.3em;\\n margin-right: -1.5em;\\n}\\n.ql-editor ol li:not(.ql-direction-rtl),\\n.ql-editor ul li:not(.ql-direction-rtl) {\\n padding-left: 1.5em;\\n}\\n.ql-editor ol li.ql-direction-rtl,\\n.ql-editor ul li.ql-direction-rtl {\\n padding-right: 1.5em;\\n}\\n.ql-editor ol li {\\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n counter-increment: list-0;\\n}\\n.ql-editor ol li:before {\\n content: counter(list-0, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-increment: list-1;\\n}\\n.ql-editor ol li.ql-indent-1:before {\\n content: counter(list-1, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-1 {\\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-increment: list-2;\\n}\\n.ql-editor ol li.ql-indent-2:before {\\n content: counter(list-2, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-2 {\\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-increment: list-3;\\n}\\n.ql-editor ol li.ql-indent-3:before {\\n content: counter(list-3, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-3 {\\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-increment: list-4;\\n}\\n.ql-editor ol li.ql-indent-4:before {\\n content: counter(list-4, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-4 {\\n counter-reset: list-5 list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-increment: list-5;\\n}\\n.ql-editor ol li.ql-indent-5:before {\\n content: counter(list-5, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-5 {\\n counter-reset: list-6 list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-increment: list-6;\\n}\\n.ql-editor ol li.ql-indent-6:before {\\n content: counter(list-6, decimal) '. ';\\n}\\n.ql-editor ol li.ql-indent-6 {\\n counter-reset: list-7 list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-increment: list-7;\\n}\\n.ql-editor ol li.ql-indent-7:before {\\n content: counter(list-7, lower-alpha) '. ';\\n}\\n.ql-editor ol li.ql-indent-7 {\\n counter-reset: list-8 list-9;\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-increment: list-8;\\n}\\n.ql-editor ol li.ql-indent-8:before {\\n content: counter(list-8, lower-roman) '. ';\\n}\\n.ql-editor ol li.ql-indent-8 {\\n counter-reset: list-9;\\n}\\n.ql-editor ol li.ql-indent-9 {\\n counter-increment: list-9;\\n}\\n.ql-editor ol li.ql-indent-9:before {\\n content: counter(list-9, decimal) '. ';\\n}\\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 3em;\\n}\\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\\n padding-left: 4.5em;\\n}\\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 3em;\\n}\\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\\n padding-right: 4.5em;\\n}\\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 6em;\\n}\\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\\n padding-left: 7.5em;\\n}\\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 6em;\\n}\\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\\n padding-right: 7.5em;\\n}\\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 9em;\\n}\\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\\n padding-left: 10.5em;\\n}\\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 9em;\\n}\\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\\n padding-right: 10.5em;\\n}\\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 12em;\\n}\\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\\n padding-left: 13.5em;\\n}\\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 12em;\\n}\\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\\n padding-right: 13.5em;\\n}\\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 15em;\\n}\\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\\n padding-left: 16.5em;\\n}\\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 15em;\\n}\\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\\n padding-right: 16.5em;\\n}\\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 18em;\\n}\\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\\n padding-left: 19.5em;\\n}\\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 18em;\\n}\\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\\n padding-right: 19.5em;\\n}\\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 21em;\\n}\\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\\n padding-left: 22.5em;\\n}\\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 21em;\\n}\\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\\n padding-right: 22.5em;\\n}\\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 24em;\\n}\\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\\n padding-left: 25.5em;\\n}\\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 24em;\\n}\\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\\n padding-right: 25.5em;\\n}\\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 27em;\\n}\\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\\n padding-left: 28.5em;\\n}\\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 27em;\\n}\\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\\n padding-right: 28.5em;\\n}\\n.ql-editor .ql-video {\\n display: block;\\n max-width: 100%;\\n}\\n.ql-editor .ql-video.ql-align-center {\\n margin: 0 auto;\\n}\\n.ql-editor .ql-video.ql-align-right {\\n margin: 0 0 0 auto;\\n}\\n.ql-editor .ql-bg-black {\\n background-color: #000;\\n}\\n.ql-editor .ql-bg-red {\\n background-color: #e60000;\\n}\\n.ql-editor .ql-bg-orange {\\n background-color: #f90;\\n}\\n.ql-editor .ql-bg-yellow {\\n background-color: #ff0;\\n}\\n.ql-editor .ql-bg-green {\\n background-color: #008a00;\\n}\\n.ql-editor .ql-bg-blue {\\n background-color: #06c;\\n}\\n.ql-editor .ql-bg-purple {\\n background-color: #93f;\\n}\\n.ql-editor .ql-color-white {\\n color: #fff;\\n}\\n.ql-editor .ql-color-red {\\n color: #e60000;\\n}\\n.ql-editor .ql-color-orange {\\n color: #f90;\\n}\\n.ql-editor .ql-color-yellow {\\n color: #ff0;\\n}\\n.ql-editor .ql-color-green {\\n color: #008a00;\\n}\\n.ql-editor .ql-color-blue {\\n color: #06c;\\n}\\n.ql-editor .ql-color-purple {\\n color: #93f;\\n}\\n.ql-editor .ql-font-serif {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-editor .ql-font-monospace {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-editor .ql-size-small {\\n font-size: 0.75em;\\n}\\n.ql-editor .ql-size-large {\\n font-size: 1.5em;\\n}\\n.ql-editor .ql-size-huge {\\n font-size: 2.5em;\\n}\\n.ql-editor .ql-direction-rtl {\\n direction: rtl;\\n text-align: inherit;\\n}\\n.ql-editor .ql-align-center {\\n text-align: center;\\n}\\n.ql-editor .ql-align-justify {\\n text-align: justify;\\n}\\n.ql-editor .ql-align-right {\\n text-align: right;\\n}\\n.ql-editor.ql-blank::before {\\n color: rgba(0,0,0,0.6);\\n content: attr(data-placeholder);\\n font-style: italic;\\n left: 15px;\\n pointer-events: none;\\n position: absolute;\\n right: 15px;\\n}\\n.ql-snow.ql-toolbar:after,\\n.ql-snow .ql-toolbar:after {\\n clear: both;\\n content: '';\\n display: table;\\n}\\n.ql-snow.ql-toolbar button,\\n.ql-snow .ql-toolbar button {\\n background: none;\\n border: none;\\n cursor: pointer;\\n display: inline-block;\\n float: left;\\n height: 24px;\\n padding: 3px 5px;\\n width: 28px;\\n}\\n.ql-snow.ql-toolbar button svg,\\n.ql-snow .ql-toolbar button svg {\\n float: left;\\n height: 100%;\\n}\\n.ql-snow.ql-toolbar button:active:hover,\\n.ql-snow .ql-toolbar button:active:hover {\\n outline: none;\\n}\\n.ql-snow.ql-toolbar input.ql-image[type=file],\\n.ql-snow .ql-toolbar input.ql-image[type=file] {\\n display: none;\\n}\\n.ql-snow.ql-toolbar button:hover,\\n.ql-snow .ql-toolbar button:hover,\\n.ql-snow.ql-toolbar button:focus,\\n.ql-snow .ql-toolbar button:focus,\\n.ql-snow.ql-toolbar button.ql-active,\\n.ql-snow .ql-toolbar button.ql-active,\\n.ql-snow.ql-toolbar .ql-picker-label:hover,\\n.ql-snow .ql-toolbar .ql-picker-label:hover,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active,\\n.ql-snow.ql-toolbar .ql-picker-item:hover,\\n.ql-snow .ql-toolbar .ql-picker-item:hover,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected {\\n color: #06c;\\n}\\n.ql-snow.ql-toolbar button:hover .ql-fill,\\n.ql-snow .ql-toolbar button:hover .ql-fill,\\n.ql-snow.ql-toolbar button:focus .ql-fill,\\n.ql-snow .ql-toolbar button:focus .ql-fill,\\n.ql-snow.ql-toolbar button.ql-active .ql-fill,\\n.ql-snow .ql-toolbar button.ql-active .ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\\n.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\\n fill: #06c;\\n}\\n.ql-snow.ql-toolbar button:hover .ql-stroke,\\n.ql-snow .ql-toolbar button:hover .ql-stroke,\\n.ql-snow.ql-toolbar button:focus .ql-stroke,\\n.ql-snow .ql-toolbar button:focus .ql-stroke,\\n.ql-snow.ql-toolbar button.ql-active .ql-stroke,\\n.ql-snow .ql-toolbar button.ql-active .ql-stroke,\\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,\\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,\\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\\n.ql-snow.ql-toolbar button:hover .ql-stroke-miter,\\n.ql-snow .ql-toolbar button:hover .ql-stroke-miter,\\n.ql-snow.ql-toolbar button:focus .ql-stroke-miter,\\n.ql-snow .ql-toolbar button:focus .ql-stroke-miter,\\n.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,\\n.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,\\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\\n stroke: #06c;\\n}\\n@media (pointer: coarse) {\\n .ql-snow.ql-toolbar button:hover:not(.ql-active),\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) {\\n color: #444;\\n }\\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,\\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\\n fill: #444;\\n }\\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\\n stroke: #444;\\n }\\n}\\n.ql-snow {\\n box-sizing: border-box;\\n}\\n.ql-snow * {\\n box-sizing: border-box;\\n}\\n.ql-snow .ql-hidden {\\n display: none;\\n}\\n.ql-snow .ql-out-bottom,\\n.ql-snow .ql-out-top {\\n visibility: hidden;\\n}\\n.ql-snow .ql-tooltip {\\n position: absolute;\\n transform: translateY(10px);\\n}\\n.ql-snow .ql-tooltip a {\\n cursor: pointer;\\n text-decoration: none;\\n}\\n.ql-snow .ql-tooltip.ql-flip {\\n transform: translateY(-10px);\\n}\\n.ql-snow .ql-formats {\\n display: inline-block;\\n vertical-align: middle;\\n}\\n.ql-snow .ql-formats:after {\\n clear: both;\\n content: '';\\n display: table;\\n}\\n.ql-snow .ql-stroke {\\n fill: none;\\n stroke: #444;\\n stroke-linecap: round;\\n stroke-linejoin: round;\\n stroke-width: 2;\\n}\\n.ql-snow .ql-stroke-miter {\\n fill: none;\\n stroke: #444;\\n stroke-miterlimit: 10;\\n stroke-width: 2;\\n}\\n.ql-snow .ql-fill,\\n.ql-snow .ql-stroke.ql-fill {\\n fill: #444;\\n}\\n.ql-snow .ql-empty {\\n fill: none;\\n}\\n.ql-snow .ql-even {\\n fill-rule: evenodd;\\n}\\n.ql-snow .ql-thin,\\n.ql-snow .ql-stroke.ql-thin {\\n stroke-width: 1;\\n}\\n.ql-snow .ql-transparent {\\n opacity: 0.4;\\n}\\n.ql-snow .ql-direction svg:last-child {\\n display: none;\\n}\\n.ql-snow .ql-direction.ql-active svg:last-child {\\n display: inline;\\n}\\n.ql-snow .ql-direction.ql-active svg:first-child {\\n display: none;\\n}\\n.ql-snow .ql-editor h1 {\\n font-size: 2em;\\n}\\n.ql-snow .ql-editor h2 {\\n font-size: 1.5em;\\n}\\n.ql-snow .ql-editor h3 {\\n font-size: 1.17em;\\n}\\n.ql-snow .ql-editor h4 {\\n font-size: 1em;\\n}\\n.ql-snow .ql-editor h5 {\\n font-size: 0.83em;\\n}\\n.ql-snow .ql-editor h6 {\\n font-size: 0.67em;\\n}\\n.ql-snow .ql-editor a {\\n text-decoration: underline;\\n}\\n.ql-snow .ql-editor blockquote {\\n border-left: 4px solid #ccc;\\n margin-bottom: 5px;\\n margin-top: 5px;\\n padding-left: 16px;\\n}\\n.ql-snow .ql-editor code,\\n.ql-snow .ql-editor pre {\\n background-color: #f0f0f0;\\n border-radius: 3px;\\n}\\n.ql-snow .ql-editor pre {\\n white-space: pre-wrap;\\n margin-bottom: 5px;\\n margin-top: 5px;\\n padding: 5px 10px;\\n}\\n.ql-snow .ql-editor code {\\n font-size: 85%;\\n padding: 2px 4px;\\n}\\n.ql-snow .ql-editor pre.ql-syntax {\\n background-color: #23241f;\\n color: #f8f8f2;\\n overflow: visible;\\n}\\n.ql-snow .ql-editor img {\\n max-width: 100%;\\n}\\n.ql-snow .ql-picker {\\n color: #444;\\n display: inline-block;\\n float: left;\\n font-size: 14px;\\n font-weight: 500;\\n height: 24px;\\n position: relative;\\n vertical-align: middle;\\n}\\n.ql-snow .ql-picker-label {\\n cursor: pointer;\\n display: inline-block;\\n height: 100%;\\n padding-left: 8px;\\n padding-right: 2px;\\n position: relative;\\n width: 100%;\\n}\\n.ql-snow .ql-picker-label::before {\\n display: inline-block;\\n line-height: 22px;\\n}\\n.ql-snow .ql-picker-options {\\n background-color: #fff;\\n display: none;\\n min-width: 100%;\\n padding: 4px 8px;\\n position: absolute;\\n white-space: nowrap;\\n}\\n.ql-snow .ql-picker-options .ql-picker-item {\\n cursor: pointer;\\n display: block;\\n padding-bottom: 5px;\\n padding-top: 5px;\\n}\\n.ql-snow .ql-picker.ql-expanded .ql-picker-label {\\n color: #ccc;\\n z-index: 2;\\n}\\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {\\n fill: #ccc;\\n}\\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\\n stroke: #ccc;\\n}\\n.ql-snow .ql-picker.ql-expanded .ql-picker-options {\\n display: block;\\n margin-top: -1px;\\n top: 100%;\\n z-index: 1;\\n}\\n.ql-snow .ql-color-picker,\\n.ql-snow .ql-icon-picker {\\n width: 28px;\\n}\\n.ql-snow .ql-color-picker .ql-picker-label,\\n.ql-snow .ql-icon-picker .ql-picker-label {\\n padding: 2px 4px;\\n}\\n.ql-snow .ql-color-picker .ql-picker-label svg,\\n.ql-snow .ql-icon-picker .ql-picker-label svg {\\n right: 4px;\\n}\\n.ql-snow .ql-icon-picker .ql-picker-options {\\n padding: 4px 0px;\\n}\\n.ql-snow .ql-icon-picker .ql-picker-item {\\n height: 24px;\\n width: 24px;\\n padding: 2px 4px;\\n}\\n.ql-snow .ql-color-picker .ql-picker-options {\\n padding: 3px 5px;\\n width: 152px;\\n}\\n.ql-snow .ql-color-picker .ql-picker-item {\\n border: 1px solid transparent;\\n float: left;\\n height: 16px;\\n margin: 2px;\\n padding: 0px;\\n width: 16px;\\n}\\n.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\\n position: absolute;\\n margin-top: -9px;\\n right: 0;\\n top: 50%;\\n width: 18px;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {\\n content: attr(data-label);\\n}\\n.ql-snow .ql-picker.ql-header {\\n width: 98px;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item::before {\\n content: 'Normal';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"1\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"1\\\"]::before {\\n content: 'Heading 1';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"2\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"2\\\"]::before {\\n content: 'Heading 2';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"3\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"3\\\"]::before {\\n content: 'Heading 3';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"4\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"4\\\"]::before {\\n content: 'Heading 4';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"5\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"5\\\"]::before {\\n content: 'Heading 5';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value=\\\"6\\\"]::before,\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"6\\\"]::before {\\n content: 'Heading 6';\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"1\\\"]::before {\\n font-size: 2em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"2\\\"]::before {\\n font-size: 1.5em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"3\\\"]::before {\\n font-size: 1.17em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"4\\\"]::before {\\n font-size: 1em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"5\\\"]::before {\\n font-size: 0.83em;\\n}\\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value=\\\"6\\\"]::before {\\n font-size: 0.67em;\\n}\\n.ql-snow .ql-picker.ql-font {\\n width: 108px;\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-label::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-item::before {\\n content: 'Sans Serif';\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\\n content: 'Serif';\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\\n content: 'Monospace';\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\\n font-family: Georgia, Times New Roman, serif;\\n}\\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\\n font-family: Monaco, Courier New, monospace;\\n}\\n.ql-snow .ql-picker.ql-size {\\n width: 98px;\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-label::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item::before {\\n content: 'Normal';\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\\n content: 'Small';\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\\n content: 'Large';\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\\n content: 'Huge';\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\\n font-size: 10px;\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\\n font-size: 18px;\\n}\\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\\n font-size: 32px;\\n}\\n.ql-snow .ql-color-picker.ql-background .ql-picker-item {\\n background-color: #fff;\\n}\\n.ql-snow .ql-color-picker.ql-color .ql-picker-item {\\n background-color: #000;\\n}\\n.ql-toolbar.ql-snow {\\n border: 1px solid #ccc;\\n box-sizing: border-box;\\n font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;\\n padding: 8px;\\n}\\n.ql-toolbar.ql-snow .ql-formats {\\n margin-right: 15px;\\n}\\n.ql-toolbar.ql-snow .ql-picker-label {\\n border: 1px solid transparent;\\n}\\n.ql-toolbar.ql-snow .ql-picker-options {\\n border: 1px solid transparent;\\n box-shadow: rgba(0,0,0,0.2) 0 2px 8px;\\n}\\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {\\n border-color: #ccc;\\n}\\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {\\n border-color: #ccc;\\n}\\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,\\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {\\n border-color: #000;\\n}\\n.ql-toolbar.ql-snow + .ql-container.ql-snow {\\n border-top: 0px;\\n}\\n.ql-snow .ql-tooltip {\\n background-color: #fff;\\n border: 1px solid #ccc;\\n box-shadow: 0px 0px 5px #ddd;\\n color: #444;\\n padding: 5px 12px;\\n white-space: nowrap;\\n}\\n.ql-snow .ql-tooltip::before {\\n content: \\\"Visit URL:\\\";\\n line-height: 26px;\\n margin-right: 8px;\\n}\\n.ql-snow .ql-tooltip input[type=text] {\\n display: none;\\n border: 1px solid #ccc;\\n font-size: 13px;\\n height: 26px;\\n margin: 0px;\\n padding: 3px 5px;\\n width: 170px;\\n}\\n.ql-snow .ql-tooltip a.ql-preview {\\n display: inline-block;\\n max-width: 200px;\\n overflow-x: hidden;\\n text-overflow: ellipsis;\\n vertical-align: top;\\n}\\n.ql-snow .ql-tooltip a.ql-action::after {\\n border-right: 1px solid #ccc;\\n content: 'Edit';\\n margin-left: 16px;\\n padding-right: 8px;\\n}\\n.ql-snow .ql-tooltip a.ql-remove::before {\\n content: 'Remove';\\n margin-left: 8px;\\n}\\n.ql-snow .ql-tooltip a {\\n line-height: 26px;\\n}\\n.ql-snow .ql-tooltip.ql-editing a.ql-preview,\\n.ql-snow .ql-tooltip.ql-editing a.ql-remove {\\n display: none;\\n}\\n.ql-snow .ql-tooltip.ql-editing input[type=text] {\\n display: inline-block;\\n}\\n.ql-snow .ql-tooltip.ql-editing a.ql-action::after {\\n border-right: 0px;\\n content: 'Save';\\n padding-right: 0px;\\n}\\n.ql-snow .ql-tooltip[data-mode=link]::before {\\n content: \\\"Enter link:\\\";\\n}\\n.ql-snow .ql-tooltip[data-mode=formula]::before {\\n content: \\\"Enter formula:\\\";\\n}\\n.ql-snow .ql-tooltip[data-mode=video]::before {\\n content: \\\"Enter video:\\\";\\n}\\n.ql-snow a {\\n color: #06c;\\n}\\n.ql-container.ql-snow {\\n border: 1px solid #ccc;\\n}\\n\",\"\"]),l.Z=r},870:function(n,l,e){var t=e(650),i=e.n(t),o=e(196),r=e.n(o),a=e(450),q=e(126),d=e(893),c=e(467),b=e(189),p=e.n(b),s=new URL(e(648),e.b),f=new URL(e(300),e.b),u=new URL(e(897),e.b),g=new URL(e(867),e.b),k=r()(i());k.i(a.Z),k.i(q.Z),k.i(d.Z),k.i(c.Z);var h=p()(s),m=p()(f),w=p()(u),x=p()(g);k.push([n.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 .flatpickr-input:not([disabled]){background-color:var(--sp-white, #ffffff);background-image:url(\"+h+\");background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 16px}.date-time .flatpickr-input[readonly]{color:var(--sp-neutral-dark, #201f1e);background-color:var(--sp-white, #ffffff);border-color:var(--sp-info-icon, #605e5c)}.date-time .flatpickr-input[readonly]:hover{border-color:var(--sp-theme-light, #c7e0f4)}.date-time .flatpickr-input[readonly]:focus{border-color:var(--sp-theme-secondary, #2b88d8);box-shadow:0 0 0 .25rem color-mix(in srgb, var(--sp-theme-tertiary, #71afe5), transparent 65%);color:var(--sp-primary-text, #333333)}.date-time .flatpickr-input:not([disabled]).is-invalid{background-image:url(\"+h+\"),url(\"+m+\");background-position:right .75rem center,center right 2.25rem;background-size:16px 16px,calc(.75em + .375rem) calc(.75em + .375rem);border-color:var(--sp-error-icon, #a80000)}.date-time .flatpickr-input:not([disabled]).is-valid{background-image:url(\"+h+\"),url(\"+w+\");background-position:right .75rem center,center right 2.25rem;background-size:16px 16px,calc(.75em + .375rem) calc(.75em + .375rem);border-color:var(--sp-success-icon, #107c10)}.date-time .flatpickr-input:not([disabled]).is-invalid:hover{border-color:var(--sp-error-icon, #a80000)}.date-time .flatpickr-input:not([disabled]).is-valid:hover{border-color:var(--sp-success-icon, #107c10)}.date-time .flatpickr-input:not([disabled]).is-invalid:focus{border-color:var(--sp-error-icon, #a80000);box-shadow:0 0 0 .25rem color-mix(in srgb, var(--sp-error-icon, #a80000), transparent 25%)}.date-time .flatpickr-input:not([disabled]).is-valid:focus{border-color:var(--sp-success-icon, #107c10);box-shadow:0 0 0 .25rem color-mix(in srgb, var(--sp-success-icon, #107c10), transparent 25%)}.flatpickr-day.selected{background-color:var(--sp-theme-primary, #0078d4);border-color:var(--sp-theme-primary, #0078d4)}.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{background-color:var(--sp-white, #ffffff) !important;color:var(--sp-black, #000000);margin-bottom:.15rem;padding-top:.1rem;text-decoration:none}.people-picker input.form-control{background-color:var(--sp-white, #ffffff);background-image:url(\"+x+\");background-repeat:no-repeat;background-position:right .65rem center;background-size:20px 20px;border-bottom-right-radius:.375rem !important;border-top-right-radius:.375rem !important}.people-picker input.form-control.is-invalid{background-image:url(\"+x+\"),url(\"+m+\");background-position:right .65rem center,center right 2.25rem;background-size:20px 20px,calc(.75em + .375rem) calc(.75em + .375rem)}.people-picker input.form-control.is-valid{background-image:url(\"+x+\"),url(\"+w+\");background-position:right .65rem center,center right 2.25rem;background-size:20px 20px,calc(.75em + .375rem) calc(.75em + .375rem)}.rich-textbox .ql-formats>button{min-width:auto}.rich-textbox .ql-container.ql-snow,.rich-textbox .ql-toolbar.ql-snow{border-color:var(--sp-info-icon, #605e5c)}.rich-textbox .ql-container.ql-disabled{background-color:var(--sp-theme-lighter-alt, #eff6fc);border-color:var(--sp-neutral-light, #edebe9);color:var(--sp-neutral-tertiary, #a19f9d);opacity:1}\",\"\"]),l.Z=k},196:function(n){n.exports=function(n){var l=[];return l.toString=function(){return this.map((function(l){var e=\"\",t=void 0!==l[5];return l[4]&&(e+=\"@supports (\".concat(l[4],\") {\")),l[2]&&(e+=\"@media \".concat(l[2],\" {\")),t&&(e+=\"@layer\".concat(l[5].length>0?\" \".concat(l[5]):\"\",\" {\")),e+=n(l),t&&(e+=\"}\"),l[2]&&(e+=\"}\"),l[4]&&(e+=\"}\"),e})).join(\"\")},l.i=function(n,e,t,i,o){\"string\"==typeof n&&(n=[[null,n,void 0]]);var r={};if(t)for(var a=0;a<this.length;a++){var q=this[a][0];null!=q&&(r[q]=!0)}for(var d=0;d<n.length;d++){var c=[].concat(n[d]);t&&r[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]=\"@layer\".concat(c[5].length>0?\" \".concat(c[5]):\"\",\" {\").concat(c[1],\"}\")),c[5]=o),e&&(c[2]?(c[1]=\"@media \".concat(c[2],\" {\").concat(c[1],\"}\"),c[2]=e):c[2]=e),i&&(c[4]?(c[1]=\"@supports (\".concat(c[4],\") {\").concat(c[1],\"}\"),c[4]=i):c[4]=\"\".concat(i)),l.push(c))}},l}},189:function(n){n.exports=function(n,l){return l||(l={}),n?(n=String(n.__esModule?n.default:n),/^['\"].*['\"]$/.test(n)&&(n=n.slice(1,-1)),l.hash&&(n+=l.hash),/[\"'() \\t\\n]|(%20)/.test(n)||l.needQuotes?'\"'.concat(n.replace(/\"/g,'\\\\\"').replace(/\\n/g,\"\\\\n\"),'\"'):n):n}},650:function(n){n.exports=function(n){return n[1]}},62:function(n){var l=[];function e(n){for(var e=-1,t=0;t<l.length;t++)if(l[t].identifier===n){e=t;break}return e}function t(n,t){for(var o={},r=[],a=0;a<n.length;a++){var q=n[a],d=t.base?q[0]+t.base:q[0],c=o[d]||0,b=\"\".concat(d,\" \").concat(c);o[d]=c+1;var p=e(b),s={css:q[1],media:q[2],sourceMap:q[3],supports:q[4],layer:q[5]};if(-1!==p)l[p].references++,l[p].updater(s);else{var f=i(s,t);t.byIndex=a,l.splice(a,0,{identifier:b,updater:f,references:1})}r.push(b)}return r}function i(n,l){var e=l.domAPI(l);e.update(n);return function(l){if(l){if(l.css===n.css&&l.media===n.media&&l.sourceMap===n.sourceMap&&l.supports===n.supports&&l.layer===n.layer)return;e.update(n=l)}else e.remove()}}n.exports=function(n,i){var o=t(n=n||[],i=i||{});return function(n){n=n||[];for(var r=0;r<o.length;r++){var a=e(o[r]);l[a].references--}for(var q=t(n,i),d=0;d<o.length;d++){var c=e(o[d]);0===l[c].references&&(l[c].updater(),l.splice(c,1))}o=q}}},566:function(n){var l={};n.exports=function(n,e){var t=function(n){if(void 0===l[n]){var e=document.querySelector(n);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(n){e=null}l[n]=e}return l[n]}(n);if(!t)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");t.appendChild(e)}},911:function(n){n.exports=function(n){var l=document.createElement(\"style\");return n.setAttributes(l,n.attributes),n.insert(l,n.options),l}},107:function(n,l,e){n.exports=function(n){var l=e.nc;l&&n.setAttribute(\"nonce\",l)}},552:function(n){n.exports=function(n){if(\"undefined\"==typeof document)return{update:function(){},remove:function(){}};var l=n.insertStyleElement(n);return{update:function(e){!function(n,l,e){var t=\"\";e.supports&&(t+=\"@supports (\".concat(e.supports,\") {\")),e.media&&(t+=\"@media \".concat(e.media,\" {\"));var i=void 0!==e.layer;i&&(t+=\"@layer\".concat(e.layer.length>0?\" \".concat(e.layer):\"\",\" {\")),t+=e.css,i&&(t+=\"}\"),e.media&&(t+=\"}\"),e.supports&&(t+=\"}\");var o=e.sourceMap;o&&\"undefined\"!=typeof btoa&&(t+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o)))),\" */\")),l.styleTagTransform(t,n,l.options)}(l,n,e)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(l)}}}},227:function(n){n.exports=function(n,l){if(l.styleSheet)l.styleSheet.cssText=n;else{for(;l.firstChild;)l.removeChild(l.firstChild);l.appendChild(document.createTextNode(n))}}},300:function(n){n.exports=\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23a80000%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23a80000%27 stroke=%27none%27/%3e%3c/svg%3e\"},897:function(n){n.exports=\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23107c10%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z%27/%3e%3c/svg%3e\"},648:function(n){n.exports=\"data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%271em%27 height=%271em%27 fill=%27%23605e5c%27 class=%27bi bi-calendar%27 viewBox=%270 0 16 16%27><path d=%27M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z%27/></svg>\"},867:function(n){n.exports=\"data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%271em%27 height=%271em%27 fill=%27%23605e5c%27 class=%27bi bi-person-fill%27 viewBox=%270 0 16 16%27><path d=%27M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z%27/></svg>\"}},l={};function e(t){var i=l[t];if(void 0!==i)return i.exports;var o=l[t]={id:t,exports:{}};return n[t](o,o.exports,e),o.exports}e.m=n,e.n=function(n){var l=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(l,{a:l}),l},e.d=function(n,l){for(var t in l)e.o(l,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:l[t]})},e.o=function(n,l){return Object.prototype.hasOwnProperty.call(n,l)},e.b=document.baseURI||self.location.href,e.nc=void 0,function(){var n=e(62),l=e.n(n),t=e(552),i=e.n(t),o=e(566),r=e.n(o),a=e(107),q=e.n(a),d=e(911),c=e.n(d),b=e(227),p=e.n(b),s=e(870),f={};f.styleTagTransform=p(),f.setAttributes=q(),f.insert=r().bind(null,\"head\"),f.domAPI=i(),f.insertStyleElement=c();l()(s.Z,f),s.Z&&s.Z.locals&&s.Z.locals}()}();\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/styles.js?");
|
|
2324
2324
|
|
|
2325
2325
|
/***/ }),
|
|
2326
2326
|
|
|
2327
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2327
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/themeManager/defaultValues.js":
|
|
2328
2328
|
/*!****************************************************************************************************************!*\
|
|
2329
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2329
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/themeManager/defaultValues.js ***!
|
|
2330
2330
|
\****************************************************************************************************************/
|
|
2331
2331
|
/***/ ((__unused_webpack_module, exports) => {
|
|
2332
2332
|
|
|
2333
2333
|
"use strict";
|
|
2334
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DefaultClassic = exports.DefaultModern = void 0;\r\n// Default modern theme key/value (variable name/key for theme information)\r\nexports.DefaultModern = {\r\n \"--sp-accent\": \"accent\",\r\n \"--sp-black\": \"black\",\r\n \"--sp-blocking-icon\": \"blockingIcon\",\r\n \"--sp-blue\": \"blue\",\r\n \"--sp-blue-light\": \"blueLight\",\r\n \"--sp-error-background\": \"errorBackground\",\r\n \"--sp-error-icon\": \"errorIcon\",\r\n \"--sp-green\": \"green\",\r\n \"--sp-green-dark\": \"greenDark\",\r\n \"--sp-green-light\": \"greenLight\",\r\n \"--sp-info-background\": \"infoBackground\",\r\n \"--sp-info-icon\": \"infoIcon\",\r\n \"--sp-magenta-light\": \"magentaLight\",\r\n \"--sp-neutral-dark\": \"neutralDark\",\r\n \"--sp-neutral-light\": \"neutralLight\",\r\n \"--sp-neutral-lighter\": \"neutralLighter\",\r\n \"--sp-neutral-lighter-alt\": \"neutralLighterAlt\",\r\n \"--sp-neutral-primary\": \"neutralPrimary\",\r\n \"--sp-neutral-primary-alt\": \"neutralPrimaryAlt\",\r\n \"--sp-neutral-secondary\": \"neutralSecondary\",\r\n \"--sp-neutral-secondary-alt\": \"neutralSecondaryAlt\",\r\n \"--sp-neutral-tertiary\": \"neutralTertiary\",\r\n \"--sp-neutral-tertiary-alt\": \"neutralTertiaryAlt\",\r\n \"--sp-neutral-quaternary\": \"neutralQuaternary\",\r\n \"--sp-neutral-quaternary-alt\": \"neutralQuaternaryAlt\",\r\n \"--sp-orange\": \"orange\",\r\n \"--sp-primary-button-text\": \"primaryButtonText\",\r\n \"--sp-primary-text\": \"primaryText\",\r\n \"--sp-purple\": \"purple\",\r\n \"--sp-purple-dark\": \"purpleDark\",\r\n \"--sp-purple-light\": \"purpleLight\",\r\n \"--sp-red\": \"red\",\r\n \"--sp-red-dark\": \"redDark\",\r\n \"--sp-severe-warning-background\": \"severeWarningBackground\",\r\n \"--sp-severe-warning-icon\": \"severeWarningIcon\",\r\n \"--sp-success-background\": \"successBackground\",\r\n \"--sp-success-icon\": \"successIcon\",\r\n \"--sp-teal\": \"teal\",\r\n \"--sp-theme-dark\": \"themeDark\",\r\n \"--sp-theme-darker\": \"themeDarker\",\r\n \"--sp-theme-dark-alt\": \"themeDarkAlt\",\r\n \"--sp-theme-light\": \"themeLight\",\r\n \"--sp-theme-lighter\": \"themeLighter\",\r\n \"--sp-theme-lighter-alt\": \"themeLighterAlt\",\r\n \"--sp-theme-primary\": \"themePrimary\",\r\n \"--sp-theme-secondary\": \"themeSecondary\",\r\n \"--sp-theme-tertiary\": \"themeTertiary\",\r\n \"--sp-warning-background\": \"warningBackground\",\r\n \"--sp-warning-highlight\": \"warningHighlight\",\r\n \"--sp-white\": \"white\",\r\n \"--sp-yellow\": \"yellow\",\r\n \"--sp-yellow-dark\": \"yellowDark\"\r\n};\r\n// Default classic theme key/value (variable name/key for theme information)\r\nexports.DefaultClassic = {\r\n \"--sp-accent\": \"accentButtonBackground\",\r\n \"--sp-black\": \"bodyTextChecked\",\r\n \"--sp-blocking-icon\": \"blockingIcon\",\r\n \"--sp-blue\": \"blue\",\r\n \"--sp-blue-light\": \"blueLight\",\r\n \"--sp-error-background\": \"errorBackground\",\r\n \"--sp-error-icon\": \"errorIcon\",\r\n \"--sp-green\": \"green\",\r\n \"--sp-green-dark\": \"greenDark\",\r\n \"--sp-green-light\": \"greenLight\",\r\n \"--sp-info-background\": \"infoBackground\",\r\n \"--sp-info-icon\": \"infoIcon\",\r\n \"--sp-magenta-light\": \"magentaLight\",\r\n \"--sp-neutral-dark\": \"StrongBodyText\",\r\n \"--sp-neutral-light\": \"DisabledLines\",\r\n \"--sp-neutral-lighter\": \"DialogBorder\",\r\n \"--sp-neutral-lighter-alt\": \"DisabledBackground\",\r\n \"--sp-neutral-primary\": \"ButtonText\",\r\n \"--sp-neutral-primary-alt\": \"neutralPrimaryAlt\",\r\n \"--sp-neutral-secondary\": \"SubtleEmphasisText\",\r\n \"--sp-neutral-secondary-alt\": \"SubtleBodyText\",\r\n \"--sp-neutral-tertiary\": \"DisabledText\",\r\n \"--sp-neutral-tertiary-alt\": \"SubtleLines\",\r\n \"--sp-neutral-quaternary\": \"disabledSubtext\",\r\n \"--sp-neutral-quaternary-alt\": \"listItemBackgroundCheckedHovered\",\r\n \"--sp-orange\": \"orange\",\r\n \"--sp-primary-button-text\": \"TileText\",\r\n \"--sp-primary-text\": \"BodyText\",\r\n \"--sp-purple\": \"purple\",\r\n \"--sp-purple-dark\": \"purpleDark\",\r\n \"--sp-purple-light\": \"purpleLight\",\r\n \"--sp-red\": \"red\",\r\n \"--sp-red-dark\": \"redDark\",\r\n \"--sp-severe-warning-background\": \"severeWarningBackground\",\r\n \"--sp-severe-warning-icon\": \"severeWarningIcon\",\r\n \"--sp-success-background\": \"successBackground\",\r\n \"--sp-success-icon\": \"successIcon\",\r\n \"--sp-teal\": \"teal\",\r\n \"--sp-theme-dark\": \"EmphasisBorder\",\r\n \"--sp-theme-darker\": \"EmphasisHoverBorder\",\r\n \"--sp-theme-dark-alt\": \"primaryButtonBackgroundHovered\",\r\n \"--sp-theme-light\": \"StrongLines\",\r\n \"--sp-theme-lighter\": \"ButtonHoverBackground\",\r\n \"--sp-theme-lighter-alt\": \"themeLighterAlt\",\r\n \"--sp-theme-primary\": \"AccentText\",\r\n \"--sp-theme-secondary\": \"AccentLines\",\r\n \"--sp-theme-tertiary\": \"SuiteBarHoverBackground\",\r\n \"--sp-warning-background\": \"warningBackground\",\r\n \"--sp-warning-highlight\": \"warningHighlight\",\r\n \"--sp-white\": \"EmphasisText\",\r\n \"--sp-yellow\": \"yellow\",\r\n \"--sp-yellow-dark\": \"yellowDark\"\r\n};\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2334
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DefaultClassic = exports.DefaultModern = void 0;\r\n// Default modern theme key/value (variable name/key for theme information)\r\nexports.DefaultModern = {\r\n \"--sp-accent\": \"accent\",\r\n \"--sp-black\": \"black\",\r\n \"--sp-blocking-icon\": \"blockingIcon\",\r\n \"--sp-blue\": \"blue\",\r\n \"--sp-blue-light\": \"blueLight\",\r\n \"--sp-error-background\": \"errorBackground\",\r\n \"--sp-error-icon\": \"errorIcon\",\r\n \"--sp-green\": \"green\",\r\n \"--sp-green-dark\": \"greenDark\",\r\n \"--sp-green-light\": \"greenLight\",\r\n \"--sp-info-background\": \"infoBackground\",\r\n \"--sp-info-icon\": \"infoIcon\",\r\n \"--sp-magenta-light\": \"magentaLight\",\r\n \"--sp-neutral-dark\": \"neutralDark\",\r\n \"--sp-neutral-light\": \"neutralLight\",\r\n \"--sp-neutral-lighter\": \"neutralLighter\",\r\n \"--sp-neutral-lighter-alt\": \"neutralLighterAlt\",\r\n \"--sp-neutral-primary\": \"neutralPrimary\",\r\n \"--sp-neutral-primary-alt\": \"neutralPrimaryAlt\",\r\n \"--sp-neutral-secondary\": \"neutralSecondary\",\r\n \"--sp-neutral-secondary-alt\": \"neutralSecondaryAlt\",\r\n \"--sp-neutral-tertiary\": \"neutralTertiary\",\r\n \"--sp-neutral-tertiary-alt\": \"neutralTertiaryAlt\",\r\n \"--sp-neutral-quaternary\": \"neutralQuaternary\",\r\n \"--sp-neutral-quaternary-alt\": \"neutralQuaternaryAlt\",\r\n \"--sp-orange\": \"orange\",\r\n \"--sp-primary-button-text\": \"primaryButtonText\",\r\n \"--sp-primary-text\": \"primaryText\",\r\n \"--sp-purple\": \"purple\",\r\n \"--sp-purple-dark\": \"purpleDark\",\r\n \"--sp-purple-light\": \"purpleLight\",\r\n \"--sp-red\": \"red\",\r\n \"--sp-red-dark\": \"redDark\",\r\n \"--sp-severe-warning-background\": \"severeWarningBackground\",\r\n \"--sp-severe-warning-icon\": \"severeWarningIcon\",\r\n \"--sp-success-background\": \"successBackground\",\r\n \"--sp-success-icon\": \"successIcon\",\r\n \"--sp-teal\": \"teal\",\r\n \"--sp-theme-dark\": \"themeDark\",\r\n \"--sp-theme-darker\": \"themeDarker\",\r\n \"--sp-theme-dark-alt\": \"themeDarkAlt\",\r\n \"--sp-theme-light\": \"themeLight\",\r\n \"--sp-theme-lighter\": \"themeLighter\",\r\n \"--sp-theme-lighter-alt\": \"themeLighterAlt\",\r\n \"--sp-theme-primary\": \"themePrimary\",\r\n \"--sp-theme-secondary\": \"themeSecondary\",\r\n \"--sp-theme-tertiary\": \"themeTertiary\",\r\n \"--sp-warning-background\": \"warningBackground\",\r\n \"--sp-warning-highlight\": \"warningHighlight\",\r\n \"--sp-white\": \"white\",\r\n \"--sp-yellow\": \"yellow\",\r\n \"--sp-yellow-dark\": \"yellowDark\"\r\n};\r\n// Default classic theme key/value (variable name/key for theme information)\r\nexports.DefaultClassic = {\r\n \"--sp-accent\": \"accentButtonBackground\",\r\n \"--sp-black\": \"bodyTextChecked\",\r\n \"--sp-blocking-icon\": \"blockingIcon\",\r\n \"--sp-blue\": \"blue\",\r\n \"--sp-blue-light\": \"blueLight\",\r\n \"--sp-error-background\": \"errorBackground\",\r\n \"--sp-error-icon\": \"errorIcon\",\r\n \"--sp-green\": \"green\",\r\n \"--sp-green-dark\": \"greenDark\",\r\n \"--sp-green-light\": \"greenLight\",\r\n \"--sp-info-background\": \"infoBackground\",\r\n \"--sp-info-icon\": \"infoIcon\",\r\n \"--sp-magenta-light\": \"magentaLight\",\r\n \"--sp-neutral-dark\": \"StrongBodyText\",\r\n \"--sp-neutral-light\": \"DisabledLines\",\r\n \"--sp-neutral-lighter\": \"DialogBorder\",\r\n \"--sp-neutral-lighter-alt\": \"DisabledBackground\",\r\n \"--sp-neutral-primary\": \"ButtonText\",\r\n \"--sp-neutral-primary-alt\": \"neutralPrimaryAlt\",\r\n \"--sp-neutral-secondary\": \"SubtleEmphasisText\",\r\n \"--sp-neutral-secondary-alt\": \"SubtleBodyText\",\r\n \"--sp-neutral-tertiary\": \"DisabledText\",\r\n \"--sp-neutral-tertiary-alt\": \"SubtleLines\",\r\n \"--sp-neutral-quaternary\": \"disabledSubtext\",\r\n \"--sp-neutral-quaternary-alt\": \"listItemBackgroundCheckedHovered\",\r\n \"--sp-orange\": \"orange\",\r\n \"--sp-primary-button-text\": \"TileText\",\r\n \"--sp-primary-text\": \"BodyText\",\r\n \"--sp-purple\": \"purple\",\r\n \"--sp-purple-dark\": \"purpleDark\",\r\n \"--sp-purple-light\": \"purpleLight\",\r\n \"--sp-red\": \"red\",\r\n \"--sp-red-dark\": \"redDark\",\r\n \"--sp-severe-warning-background\": \"severeWarningBackground\",\r\n \"--sp-severe-warning-icon\": \"severeWarningIcon\",\r\n \"--sp-success-background\": \"successBackground\",\r\n \"--sp-success-icon\": \"successIcon\",\r\n \"--sp-teal\": \"teal\",\r\n \"--sp-theme-dark\": \"EmphasisBorder\",\r\n \"--sp-theme-darker\": \"EmphasisHoverBorder\",\r\n \"--sp-theme-dark-alt\": \"primaryButtonBackgroundHovered\",\r\n \"--sp-theme-light\": \"StrongLines\",\r\n \"--sp-theme-lighter\": \"ButtonHoverBackground\",\r\n \"--sp-theme-lighter-alt\": \"themeLighterAlt\",\r\n \"--sp-theme-primary\": \"AccentText\",\r\n \"--sp-theme-secondary\": \"AccentLines\",\r\n \"--sp-theme-tertiary\": \"SuiteBarHoverBackground\",\r\n \"--sp-warning-background\": \"warningBackground\",\r\n \"--sp-warning-highlight\": \"warningHighlight\",\r\n \"--sp-white\": \"EmphasisText\",\r\n \"--sp-yellow\": \"yellow\",\r\n \"--sp-yellow-dark\": \"yellowDark\"\r\n};\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/themeManager/defaultValues.js?");
|
|
2335
2335
|
|
|
2336
2336
|
/***/ }),
|
|
2337
2337
|
|
|
2338
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2338
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/themeManager/index.js":
|
|
2339
2339
|
/*!********************************************************************************************************!*\
|
|
2340
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2340
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/themeManager/index.js ***!
|
|
2341
2341
|
\********************************************************************************************************/
|
|
2342
2342
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2343
2343
|
|
|
2344
2344
|
"use strict";
|
|
2345
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ThemeManager = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar defaultValues_1 = __webpack_require__(/*! ./defaultValues */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2345
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ThemeManager = void 0;\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar defaultValues_1 = __webpack_require__(/*! ./defaultValues */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/themeManager/defaultValues.js\");\r\n/**\r\n * Theme manager for the components\r\n */\r\nvar ThemeManager = /** @class */ (function () {\r\n function ThemeManager() {\r\n }\r\n Object.defineProperty(ThemeManager, \"ClassicThemeInfo\", {\r\n get: function () { return this._classicThemeInfo; },\r\n set: function (value) { this._classicThemeInfo = value; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThemeManager, \"CurrentTheme\", {\r\n get: function () { return this._currentTheme; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThemeManager, \"ModernThemeInfo\", {\r\n get: function () { return this._modernThemeInfo; },\r\n set: function (value) { this._modernThemeInfo = value; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ThemeManager, \"IsInverted\", {\r\n // Determines if the theme is currently inverted\r\n get: function () {\r\n // See if the properties exists\r\n if (typeof (this.CurrentTheme.isInverted) === \"boolean\") {\r\n return this.CurrentTheme.isInverted;\r\n }\r\n // Determine based on the white color\r\n var whiteValue = this.CurrentTheme.palette ? this.CurrentTheme.palette[\"white\"] : this.CurrentTheme[\"white\"];\r\n if (typeof (whiteValue) === \"string\") {\r\n return whiteValue.toLowerCase() == \"#ffffff\" ? false : true;\r\n }\r\n // Return false by default\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Loads the modern theme, or the classic theme if it's not found\r\n ThemeManager.load = function (updateTheme) {\r\n var _this = this;\r\n if (updateTheme === void 0) { updateTheme = true; }\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the current theme\r\n gd_sprest_1.Helper.getCurrentTheme().then(function (themeInfo) {\r\n // Set the current theme\r\n _this._currentTheme = themeInfo;\r\n // See if we are applying the classic theme\r\n updateTheme ? _this.update() : null;\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Sets the current theme\r\n ThemeManager.setCurrentTheme = function (value, updateTheme) {\r\n if (updateTheme === void 0) { updateTheme = true; }\r\n // Set the theme\r\n this._currentTheme = value;\r\n // Update the theme\r\n updateTheme ? this.update() : null;\r\n };\r\n // Updates the theme variables\r\n ThemeManager.update = function (themeInfo) {\r\n if (themeInfo === void 0) { themeInfo = {}; }\r\n var root = document.querySelector(':root');\r\n // Get the theme information\r\n var palette = themeInfo.palette || this.CurrentTheme.palette || {};\r\n var semanticColors = themeInfo.semanticColors || this.CurrentTheme.semanticColors || {};\r\n // Parse the modern theme values\r\n for (var key in this.ModernThemeInfo) {\r\n // Set the value\r\n var value = palette[this.ModernThemeInfo[key]] || palette[this.ClassicThemeInfo[key]] ||\r\n semanticColors[this.ModernThemeInfo[key]] || semanticColors[this.ClassicThemeInfo[key]] ||\r\n themeInfo[this.ModernThemeInfo[key]] || this.CurrentTheme[this.ModernThemeInfo[key]] ||\r\n themeInfo[this.ClassicThemeInfo[key]] || this.CurrentTheme[this.ClassicThemeInfo[key]];\r\n // See if a value exists\r\n if (value) {\r\n // Set the variable\r\n root.style.setProperty(key, value);\r\n }\r\n }\r\n };\r\n // Classic Theme Information\r\n ThemeManager._classicThemeInfo = defaultValues_1.DefaultClassic;\r\n /**\r\n * Current Theme\r\n * Loads the modern theme from the DOM or the classic from the site collection.\r\n */\r\n ThemeManager._currentTheme = {};\r\n // Modern Theme Information\r\n ThemeManager._modernThemeInfo = defaultValues_1.DefaultModern;\r\n return ThemeManager;\r\n}());\r\nexports.ThemeManager = ThemeManager;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/themeManager/index.js?");
|
|
2346
2346
|
|
|
2347
2347
|
/***/ }),
|
|
2348
2348
|
|
|
2349
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2349
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/helper.js":
|
|
2350
2350
|
/*!**********************************************************************************************************!*\
|
|
2351
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2351
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/helper.js ***!
|
|
2352
2352
|
\**********************************************************************************************************/
|
|
2353
2353
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2354
2354
|
|
|
2355
2355
|
"use strict";
|
|
2356
|
-
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.
|
|
2356
|
+
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/helper.js?");
|
|
2357
2357
|
|
|
2358
2358
|
/***/ }),
|
|
2359
2359
|
|
|
2360
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2360
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/index.js":
|
|
2361
2361
|
/*!*********************************************************************************************************!*\
|
|
2362
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2362
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/index.js ***!
|
|
2363
2363
|
\*********************************************************************************************************/
|
|
2364
2364
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2365
2365
|
|
|
2366
2366
|
"use strict";
|
|
2367
|
-
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@10.10.
|
|
2367
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/helper.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wp */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpSPFx */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wpSPFx.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/index.js?");
|
|
2368
2368
|
|
|
2369
2369
|
/***/ }),
|
|
2370
2370
|
|
|
2371
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2371
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wp.js":
|
|
2372
2372
|
/*!******************************************************************************************************!*\
|
|
2373
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2373
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wp.js ***!
|
|
2374
2374
|
\******************************************************************************************************/
|
|
2375
2375
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2376
2376
|
|
|
2377
2377
|
"use strict";
|
|
2378
|
-
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/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 = _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 // Get the webpart information\r\n _wp = getWebPartInfo();\r\n if (_wp) {\r\n // Render the component\r\n render();\r\n }\r\n else {\r\n // Add a load event\r\n window.addEventListener(\"load\", function () {\r\n // Render the component\r\n render();\r\n });\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@10.10.89/node_modules/gd-sprest-bs/build/webparts/base/wp.js?");
|
|
2378
|
+
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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 = _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 // Get the webpart information\r\n _wp = getWebPartInfo();\r\n if (_wp) {\r\n // Render the component\r\n render();\r\n }\r\n else {\r\n // Add a load event\r\n window.addEventListener(\"load\", function () {\r\n // Render the component\r\n render();\r\n });\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@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wp.js?");
|
|
2379
2379
|
|
|
2380
2380
|
/***/ }),
|
|
2381
2381
|
|
|
2382
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2382
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js":
|
|
2383
2383
|
/*!*********************************************************************************************************!*\
|
|
2384
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2384
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js ***!
|
|
2385
2385
|
\*********************************************************************************************************/
|
|
2386
2386
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2387
2387
|
|
|
2388
2388
|
"use strict";
|
|
2389
|
-
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar helper_1 = __webpack_require__(/*! ./helper */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2389
|
+
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar helper_1 = __webpack_require__(/*! ./helper */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wpCfg.js?");
|
|
2390
2390
|
|
|
2391
2391
|
/***/ }),
|
|
2392
2392
|
|
|
2393
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2393
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wpSPFx.js":
|
|
2394
2394
|
/*!**********************************************************************************************************!*\
|
|
2395
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2395
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wpSPFx.js ***!
|
|
2396
2396
|
\**********************************************************************************************************/
|
|
2397
2397
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2398
2398
|
|
|
2399
2399
|
"use strict";
|
|
2400
|
-
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.SPFxWebPart = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * SPFx WebPart Base Class\r\n */\r\nvar _SPFxWebPart = /** @class */ (function () {\r\n /** The configuration modal. */\r\n // Constructor\r\n function _SPFxWebPart(props) {\r\n var _this = this;\r\n this._props = null;\r\n /** The webpart configuration */\r\n this._cfg = null;\r\n /** The configuration form. */\r\n this._form = null;\r\n /** The configuration modal. */\r\n this._modal = null;\r\n /** Is in display mode */\r\n this._isDisplay = null;\r\n /** Is in edit mode */\r\n this._isEdit = null;\r\n // Save the properties\r\n this._props = props;\r\n // Ensure the spfx object was set\r\n if (this._props.spfx == null) {\r\n // Error\r\n console.error(\"[gd-sprest-bs] The spfx property wasn't set.\");\r\n return;\r\n }\r\n // Set the page context\r\n gd_sprest_1.ContextInfo.setPageContext(this._props.spfx.context.pageContext);\r\n // Set the configuration\r\n this.Configuration = this._props.spfx.properties.configuration;\r\n // See if this is the workbench\r\n if (window.location.pathname.indexOf(\"workbench.aspx\") > 0) {\r\n // Set both flags to render edit/display\r\n this._isDisplay = true;\r\n this._isEdit = true;\r\n }\r\n else {\r\n // See if this is a classic page\r\n if (gd_sprest_1.Helper.SP.Ribbon.exists) {\r\n // Set the flag\r\n this._isEdit = gd_sprest_1.Helper.WebPart.isEditMode();\r\n }\r\n else {\r\n // Set the flag\r\n this._isEdit = this._props.spfx.displayMode == gd_sprest_1.SPTypes.DisplayMode.Edit;\r\n }\r\n // Set the flag\r\n this._isDisplay = !this._isEdit;\r\n }\r\n // Run the render method in another thread\r\n setTimeout(function () {\r\n // See if we are in edit mode\r\n if (_this._isEdit) {\r\n // Render the configuration button\r\n _this.renderEdit();\r\n }\r\n // See if we are in display mode\r\n if (_this.IsDisplay) {\r\n // Render the webpart\r\n _this.render();\r\n }\r\n }, 10);\r\n }\r\n Object.defineProperty(_SPFxWebPart.prototype, \"Configuration\", {\r\n get: function () { return this._cfg; },\r\n set: function (value) {\r\n // Clear the value\r\n this._cfg = {};\r\n // Ensure a value exists\r\n if (value) {\r\n // Try to parse the value\r\n try {\r\n this._cfg = JSON.parse(value);\r\n }\r\n catch (_a) { }\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ;\r\n Object.defineProperty(_SPFxWebPart.prototype, \"Form\", {\r\n get: function () { return this._form; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(_SPFxWebPart.prototype, \"Modal\", {\r\n get: function () { return this._modal; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(_SPFxWebPart.prototype, \"IsDisplay\", {\r\n get: function () { return this._isDisplay; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(_SPFxWebPart.prototype, \"IsEdit\", {\r\n get: function () { return this._isEdit; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Method to render the webpart\r\n _SPFxWebPart.prototype.render = function () {\r\n // Get the webpart element\r\n var elWP = this._props.spfx.domElement.querySelector(\".webpart\");\r\n if (elWP == null) {\r\n // Create the element\r\n elWP = document.createElement(\"div\");\r\n elWP.classList.add(\"webpart\");\r\n this._props.spfx.domElement.appendChild(elWP);\r\n }\r\n else {\r\n // Clear the element\r\n while (elWP.firstChild) {\r\n elWP.removeChild(elWP.firstChild);\r\n }\r\n }\r\n // Call the render event\r\n this._props.render ? this._props.render(elWP, this.Configuration) : null;\r\n };\r\n // Method to render the edit interface\r\n _SPFxWebPart.prototype.renderEdit = function () {\r\n var _this = this;\r\n // Get the webpart element\r\n var elWPConfig = this._props.spfx.domElement.querySelector(\".webpart-cfg\");\r\n if (elWPConfig == null) {\r\n // Create the element\r\n elWPConfig = document.createElement(\"div\");\r\n elWPConfig.classList.add(\"webpart-cfg\");\r\n this._props.spfx.domElement.appendChild(elWPConfig);\r\n }\r\n else {\r\n // Do nothing\r\n return;\r\n }\r\n // Set the webpart properties pane to trigger the modal from displaying\r\n var propertyPageConfig = this._props.spfx.getPropertyPaneConfiguration;\r\n this._props.spfx.getPropertyPaneConfiguration = function () {\r\n // Get the original configuration\r\n var config = propertyPageConfig ? propertyPageConfig() : null;\r\n // Update the configuration w/ a button\r\n config = config || {};\r\n config.pages = config.pages || [];\r\n config.pages.push({\r\n header: {\r\n description: \"Configuration\"\r\n },\r\n groups: [\r\n {\r\n groupFields: [{\r\n targetProperty: \"configuration\",\r\n type: gd_sprest_1.SPTypes.PropertyPaneType.Button,\r\n properties: {\r\n text: \"Configuration\",\r\n onClick: function () {\r\n // Show the modal\r\n _this.showEditModal();\r\n }\r\n }\r\n }]\r\n }\r\n ]\r\n });\r\n // Call the configuration\r\n return config;\r\n };\r\n // Render the edit button\r\n gd_bs_1.Components.Button({\r\n el: elWPConfig,\r\n text: \"Edit\",\r\n onClick: function () {\r\n // Show the edit modal\r\n _this.showEditModal();\r\n }\r\n });\r\n // Create the modal props\r\n var modalProps = {\r\n el: elWPConfig,\r\n onClose: function () {\r\n // Hide the property pane to cause the webpart to re-render\r\n _this._props.spfx.context.propertyPane.close();\r\n },\r\n onRenderBody: function (el) {\r\n // Create the form properties\r\n var formProps = { el: el, value: _this._cfg };\r\n // Call the rendering event\r\n formProps = _this._props.onConfigFormRendering ? _this._props.onConfigFormRendering(formProps, _this._cfg) : formProps;\r\n // Render the form\r\n _this._form = gd_bs_1.Components.Form(formProps);\r\n // Call the rendered event\r\n _this._props.onConfigFormRendered ? _this._props.onConfigFormRendered(_this._form, _this._cfg) : null;\r\n },\r\n onRenderFooter: function (el) {\r\n // Render the footer buttons\r\n var footerProps = {\r\n el: el,\r\n tooltips: [\r\n {\r\n content: \"Click to save the webpart configuration.\",\r\n btnProps: {\r\n text: \"Save\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineSuccess,\r\n onClick: function () {\r\n // Ensure the form is valid\r\n if (_this._form.isValid()) {\r\n var cfg = _this._form.getValues();\r\n // Call the saving event\r\n cfg = _this._props.onConfigSaving ? _this._props.onConfigSaving(cfg) : cfg;\r\n // Try to convert the form values\r\n var wpCfg = null;\r\n try {\r\n wpCfg = JSON.stringify(cfg);\r\n }\r\n catch (_a) { }\r\n // Save the configuration\r\n _this._props.spfx.properties.configuration = wpCfg;\r\n // Update the configuration property\r\n _this.Configuration = wpCfg;\r\n // Call the saved event\r\n _this._props.onConfigSaved ? _this._props.onConfigSaved(cfg) : null;\r\n // See if we are in display mode and the property pane is closed\r\n if (_this.IsDisplay && !_this._props.spfx.context.propertyPane.isPropertyPaneOpen()) {\r\n // Render the display webpart\r\n _this.render();\r\n }\r\n // Close the modal\r\n _this._modal.hide();\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n // Call the event\r\n footerProps = _this._props.onConfigFormFooterRendering ? _this._props.onConfigFormFooterRendering(footerProps, _this._cfg) : footerProps;\r\n // Render the footer\r\n gd_bs_1.Components.TooltipGroup(footerProps);\r\n }\r\n };\r\n // Call the rendering event\r\n var onRender = null;\r\n var newProps = this._props.onModalRendering ? this._props.onModalRendering(modalProps) : null;\r\n if (newProps) {\r\n onRender = newProps.onRenderBody;\r\n }\r\n // Render the modal\r\n this._modal = gd_bs_1.Components.Modal(__assign(__assign({}, newProps), modalProps));\r\n // Call the rendered event\r\n this._props.onModalRendered ? this._props.onModalRendered(this._modal) : null;\r\n // Call the renderEdit event\r\n this._props.renderEdit ? this._props.renderEdit(elWPConfig, this.Configuration) : null;\r\n };\r\n // Shows the modal\r\n _SPFxWebPart.prototype.showEditModal = function () {\r\n // Show the modal\r\n this._modal ? this._modal.show() : null;\r\n // Call the event\r\n this._props.onConfigFormDisplaying ? this._props.onConfigFormDisplaying(this.Configuration) : null;\r\n };\r\n return _SPFxWebPart;\r\n}());\r\nvar SPFxWebPart = function (props) { return new _SPFxWebPart(props); };\r\nexports.SPFxWebPart = SPFxWebPart;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/webparts/base/wpSPFx.js?");
|
|
2400
|
+
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.SPFxWebPart = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * SPFx WebPart Base Class\r\n */\r\nvar _SPFxWebPart = /** @class */ (function () {\r\n /** The configuration modal. */\r\n // Constructor\r\n function _SPFxWebPart(props) {\r\n var _this = this;\r\n this._props = null;\r\n /** The webpart configuration */\r\n this._cfg = null;\r\n /** The configuration form. */\r\n this._form = null;\r\n /** The configuration modal. */\r\n this._modal = null;\r\n /** Is in display mode */\r\n this._isDisplay = null;\r\n /** Is in edit mode */\r\n this._isEdit = null;\r\n // Save the properties\r\n this._props = props;\r\n // Ensure the spfx object was set\r\n if (this._props.spfx == null) {\r\n // Error\r\n console.error(\"[gd-sprest-bs] The spfx property wasn't set.\");\r\n return;\r\n }\r\n // Set the page context\r\n gd_sprest_1.ContextInfo.setPageContext(this._props.spfx.context.pageContext);\r\n // Set the configuration\r\n this.Configuration = this._props.spfx.properties.configuration;\r\n // See if this is the workbench\r\n if (window.location.pathname.indexOf(\"workbench.aspx\") > 0) {\r\n // Set both flags to render edit/display\r\n this._isDisplay = true;\r\n this._isEdit = true;\r\n }\r\n else {\r\n // See if this is a classic page\r\n if (gd_sprest_1.Helper.SP.Ribbon.exists) {\r\n // Set the flag\r\n this._isEdit = gd_sprest_1.Helper.WebPart.isEditMode();\r\n }\r\n else {\r\n // Set the flag\r\n this._isEdit = this._props.spfx.displayMode == gd_sprest_1.SPTypes.DisplayMode.Edit;\r\n }\r\n // Set the flag\r\n this._isDisplay = !this._isEdit;\r\n }\r\n // Run the render method in another thread\r\n setTimeout(function () {\r\n // See if we are in edit mode\r\n if (_this._isEdit) {\r\n // Render the configuration button\r\n _this.renderEdit();\r\n }\r\n // See if we are in display mode\r\n if (_this.IsDisplay) {\r\n // Render the webpart\r\n _this.render();\r\n }\r\n }, 10);\r\n }\r\n Object.defineProperty(_SPFxWebPart.prototype, \"Configuration\", {\r\n get: function () { return this._cfg; },\r\n set: function (value) {\r\n // Clear the value\r\n this._cfg = {};\r\n // Ensure a value exists\r\n if (value) {\r\n // Try to parse the value\r\n try {\r\n this._cfg = JSON.parse(value);\r\n }\r\n catch (_a) { }\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n ;\r\n Object.defineProperty(_SPFxWebPart.prototype, \"Form\", {\r\n get: function () { return this._form; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(_SPFxWebPart.prototype, \"Modal\", {\r\n get: function () { return this._modal; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(_SPFxWebPart.prototype, \"IsDisplay\", {\r\n get: function () { return this._isDisplay; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(_SPFxWebPart.prototype, \"IsEdit\", {\r\n get: function () { return this._isEdit; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Method to render the webpart\r\n _SPFxWebPart.prototype.render = function () {\r\n // Get the webpart element\r\n var elWP = this._props.spfx.domElement.querySelector(\".webpart\");\r\n if (elWP == null) {\r\n // Create the element\r\n elWP = document.createElement(\"div\");\r\n elWP.classList.add(\"webpart\");\r\n this._props.spfx.domElement.appendChild(elWP);\r\n }\r\n else {\r\n // Clear the element\r\n while (elWP.firstChild) {\r\n elWP.removeChild(elWP.firstChild);\r\n }\r\n }\r\n // Call the render event\r\n this._props.render ? this._props.render(elWP, this.Configuration) : null;\r\n };\r\n // Method to render the edit interface\r\n _SPFxWebPart.prototype.renderEdit = function () {\r\n var _this = this;\r\n // Get the webpart element\r\n var elWPConfig = this._props.spfx.domElement.querySelector(\".webpart-cfg\");\r\n if (elWPConfig == null) {\r\n // Create the element\r\n elWPConfig = document.createElement(\"div\");\r\n elWPConfig.classList.add(\"webpart-cfg\");\r\n this._props.spfx.domElement.appendChild(elWPConfig);\r\n }\r\n else {\r\n // Do nothing\r\n return;\r\n }\r\n // Set the webpart properties pane to trigger the modal from displaying\r\n var propertyPageConfig = this._props.spfx.getPropertyPaneConfiguration;\r\n this._props.spfx.getPropertyPaneConfiguration = function () {\r\n // Get the original configuration\r\n var config = propertyPageConfig ? propertyPageConfig() : null;\r\n // Update the configuration w/ a button\r\n config = config || {};\r\n config.pages = config.pages || [];\r\n config.pages.push({\r\n header: {\r\n description: \"Configuration\"\r\n },\r\n groups: [\r\n {\r\n groupFields: [{\r\n targetProperty: \"configuration\",\r\n type: gd_sprest_1.SPTypes.PropertyPaneType.Button,\r\n properties: {\r\n text: \"Configuration\",\r\n onClick: function () {\r\n // Show the modal\r\n _this.showEditModal();\r\n }\r\n }\r\n }]\r\n }\r\n ]\r\n });\r\n // Call the configuration\r\n return config;\r\n };\r\n // Render the edit button\r\n gd_bs_1.Components.Button({\r\n el: elWPConfig,\r\n text: \"Edit\",\r\n onClick: function () {\r\n // Show the edit modal\r\n _this.showEditModal();\r\n }\r\n });\r\n // Create the modal props\r\n var modalProps = {\r\n el: elWPConfig,\r\n onClose: function () {\r\n // Hide the property pane to cause the webpart to re-render\r\n _this._props.spfx.context.propertyPane.close();\r\n },\r\n onRenderBody: function (el) {\r\n // Create the form properties\r\n var formProps = { el: el, value: _this._cfg };\r\n // Call the rendering event\r\n formProps = _this._props.onConfigFormRendering ? _this._props.onConfigFormRendering(formProps, _this._cfg) : formProps;\r\n // Render the form\r\n _this._form = gd_bs_1.Components.Form(formProps);\r\n // Call the rendered event\r\n _this._props.onConfigFormRendered ? _this._props.onConfigFormRendered(_this._form, _this._cfg) : null;\r\n },\r\n onRenderFooter: function (el) {\r\n // Render the footer buttons\r\n var footerProps = {\r\n el: el,\r\n tooltips: [\r\n {\r\n content: \"Click to save the webpart configuration.\",\r\n btnProps: {\r\n text: \"Save\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineSuccess,\r\n onClick: function () {\r\n // Ensure the form is valid\r\n if (_this._form.isValid()) {\r\n var cfg = _this._form.getValues();\r\n // Call the saving event\r\n cfg = _this._props.onConfigSaving ? _this._props.onConfigSaving(cfg) : cfg;\r\n // Try to convert the form values\r\n var wpCfg = null;\r\n try {\r\n wpCfg = JSON.stringify(cfg);\r\n }\r\n catch (_a) { }\r\n // Save the configuration\r\n _this._props.spfx.properties.configuration = wpCfg;\r\n // Update the configuration property\r\n _this.Configuration = wpCfg;\r\n // Call the saved event\r\n _this._props.onConfigSaved ? _this._props.onConfigSaved(cfg) : null;\r\n // See if we are in display mode and the property pane is closed\r\n if (_this.IsDisplay && !_this._props.spfx.context.propertyPane.isPropertyPaneOpen()) {\r\n // Render the display webpart\r\n _this.render();\r\n }\r\n // Close the modal\r\n _this._modal.hide();\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n // Call the event\r\n footerProps = _this._props.onConfigFormFooterRendering ? _this._props.onConfigFormFooterRendering(footerProps, _this._cfg) : footerProps;\r\n // Render the footer\r\n gd_bs_1.Components.TooltipGroup(footerProps);\r\n }\r\n };\r\n // Call the rendering event\r\n var onRender = null;\r\n var newProps = this._props.onModalRendering ? this._props.onModalRendering(modalProps) : null;\r\n if (newProps) {\r\n onRender = newProps.onRenderBody;\r\n }\r\n // Render the modal\r\n this._modal = gd_bs_1.Components.Modal(__assign(__assign({}, newProps), modalProps));\r\n // Call the rendered event\r\n this._props.onModalRendered ? this._props.onModalRendered(this._modal) : null;\r\n // Call the renderEdit event\r\n this._props.renderEdit ? this._props.renderEdit(elWPConfig, this.Configuration) : null;\r\n };\r\n // Shows the modal\r\n _SPFxWebPart.prototype.showEditModal = function () {\r\n // Show the modal\r\n this._modal ? this._modal.show() : null;\r\n // Call the event\r\n this._props.onConfigFormDisplaying ? this._props.onConfigFormDisplaying(this.Configuration) : null;\r\n };\r\n return _SPFxWebPart;\r\n}());\r\nvar SPFxWebPart = function (props) { return new _SPFxWebPart(props); };\r\nexports.SPFxWebPart = SPFxWebPart;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wpSPFx.js?");
|
|
2401
2401
|
|
|
2402
2402
|
/***/ }),
|
|
2403
2403
|
|
|
2404
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2404
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/index.js":
|
|
2405
2405
|
/*!****************************************************************************************************!*\
|
|
2406
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2406
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/index.js ***!
|
|
2407
2407
|
\****************************************************************************************************/
|
|
2408
2408
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2409
2409
|
|
|
2410
2410
|
"use strict";
|
|
2411
|
-
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@10.10.
|
|
2411
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./list */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./listFields */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./search */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./tabs */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/tabs/index.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./taxonomy */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/index.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/index.js?");
|
|
2412
2412
|
|
|
2413
2413
|
/***/ }),
|
|
2414
2414
|
|
|
2415
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2415
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/index.js":
|
|
2416
2416
|
/*!***************************************************************************************************************!*\
|
|
2417
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2417
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/index.js ***!
|
|
2418
2418
|
\***************************************************************************************************************/
|
|
2419
2419
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2420
2420
|
|
|
2421
2421
|
"use strict";
|
|
2422
|
-
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@10.10.
|
|
2422
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/index.js?");
|
|
2423
2423
|
|
|
2424
2424
|
/***/ }),
|
|
2425
2425
|
|
|
2426
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2426
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/wp.js":
|
|
2427
2427
|
/*!************************************************************************************************************!*\
|
|
2428
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2428
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/wp.js ***!
|
|
2429
2429
|
\************************************************************************************************************/
|
|
2430
2430
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2431
2431
|
|
|
2432
2432
|
"use strict";
|
|
2433
|
-
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@10.10.
|
|
2433
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/index.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/wp.js?");
|
|
2434
2434
|
|
|
2435
2435
|
/***/ }),
|
|
2436
2436
|
|
|
2437
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2437
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js":
|
|
2438
2438
|
/*!***************************************************************************************************************!*\
|
|
2439
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2439
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js ***!
|
|
2440
2440
|
\***************************************************************************************************************/
|
|
2441
2441
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2442
2442
|
|
|
2443
2443
|
"use strict";
|
|
2444
|
-
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar x_1 = __webpack_require__(/*! ../../icons/svgs/x */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/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@10.10.89/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js?");
|
|
2444
|
+
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar x_1 = __webpack_require__(/*! ../../icons/svgs/x */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/listFields/wpCfg.js?");
|
|
2445
2445
|
|
|
2446
2446
|
/***/ }),
|
|
2447
2447
|
|
|
2448
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2448
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/index.js":
|
|
2449
2449
|
/*!*********************************************************************************************************!*\
|
|
2450
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2450
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/index.js ***!
|
|
2451
2451
|
\*********************************************************************************************************/
|
|
2452
2452
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2453
2453
|
|
|
2454
2454
|
"use strict";
|
|
2455
|
-
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@10.10.
|
|
2455
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpSPFx */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFx.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpSPFxForm */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFxForm.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/index.js?");
|
|
2456
2456
|
|
|
2457
2457
|
/***/ }),
|
|
2458
2458
|
|
|
2459
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2459
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wp.js":
|
|
2460
2460
|
/*!******************************************************************************************************!*\
|
|
2461
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2461
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wp.js ***!
|
|
2462
2462
|
\******************************************************************************************************/
|
|
2463
2463
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2464
2464
|
|
|
2465
2465
|
"use strict";
|
|
2466
|
-
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2466
|
+
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wp.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wp.js?");
|
|
2467
2467
|
|
|
2468
2468
|
/***/ }),
|
|
2469
2469
|
|
|
2470
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2470
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js":
|
|
2471
2471
|
/*!*********************************************************************************************************!*\
|
|
2472
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2472
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js ***!
|
|
2473
2473
|
\*********************************************************************************************************/
|
|
2474
2474
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2475
2475
|
|
|
2476
2476
|
"use strict";
|
|
2477
|
-
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.
|
|
2477
|
+
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpCfg.js?");
|
|
2478
2478
|
|
|
2479
2479
|
/***/ }),
|
|
2480
2480
|
|
|
2481
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2481
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFx.js":
|
|
2482
2482
|
/*!**********************************************************************************************************!*\
|
|
2483
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2483
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFx.js ***!
|
|
2484
2484
|
\**********************************************************************************************************/
|
|
2485
2485
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2486
2486
|
|
|
2487
2487
|
"use strict";
|
|
2488
|
-
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.SPFxListWebPart = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2488
|
+
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.SPFxListWebPart = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/index.js\");\r\n/**\r\n * SPFx List WebPart\r\n */\r\nvar SPFxListWebPart = function (wpProps) {\r\n var _ddl = null;\r\n var _loadFl = false;\r\n // Load the lists\r\n var loadLists = function (listId) {\r\n // Disable the dropdown\r\n _ddl.disable();\r\n // Get the web url\r\n var webUrl = wp.Form.getValues()[\"WebUrl\"];\r\n // Load the lists\r\n (0, gd_sprest_1.Web)(webUrl).Lists().query({\r\n OrderBy: [\"Title\"]\r\n }).execute(function (items) {\r\n var lists = [];\r\n // Set the flag\r\n _loadFl = true;\r\n // Parse the lists\r\n for (var i = 0; i < items.results.length; i++) {\r\n var list = items.results[i];\r\n // Add the item\r\n lists.push({\r\n data: list,\r\n text: list.Title,\r\n value: list.Id,\r\n isSelected: listId == list.Id\r\n });\r\n }\r\n // Set the dropdown\r\n _ddl.setItems(lists);\r\n // Enable the dropdown\r\n _ddl.enable();\r\n });\r\n };\r\n // Define the properties\r\n var baseProps = {\r\n // Set the form properties\r\n onConfigFormRendering: function (props) {\r\n // Set the controls\r\n props.controls = [\r\n {\r\n name: \"WebUrl\",\r\n label: \"Web Url\",\r\n type: gd_bs_1.Components.FormControlTypes.TextField,\r\n description: \"The relative url to the site containing the target list.\",\r\n value: wp.Configuration ? wp.Configuration.WebUrl : null\r\n },\r\n {\r\n name: \"List\",\r\n label: \"List\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n required: true,\r\n value: wp.Configuration ? wp.Configuration.ListId : null,\r\n onControlRendered: function (ctrl) {\r\n // Set the dropdown\r\n _ddl = ctrl.dropdown;\r\n }\r\n }\r\n ];\r\n // Call the base event\r\n props = wpProps.onConfigFormRendering ? wpProps.onConfigFormRendering(props) : props;\r\n // Return the properties\r\n return props;\r\n },\r\n // Footer rendering event\r\n onConfigFormFooterRendering: function (props) {\r\n // Add a load lists button\r\n props.tooltips.push({\r\n content: \"Loads the lists.\",\r\n btnProps: {\r\n text: \"Load Lists\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n onClick: function () { loadLists(); }\r\n }\r\n });\r\n // Call the base event\r\n props = wpProps.onConfigFormFooterRendering ? wpProps.onConfigFormFooterRendering(props) : props;\r\n // Return the properties\r\n return props;\r\n },\r\n // Modal displaying event\r\n onConfigFormDisplaying: function () {\r\n // See if the lists haven't been loaded\r\n if (_loadFl == false) {\r\n // Load the lists\r\n loadLists(wp.Configuration ? wp.Configuration.ListId : null);\r\n }\r\n // Call the base event\r\n wpProps.onConfigFormDisplaying ? wpProps.onConfigFormDisplaying() : null;\r\n },\r\n // The configuration saving event\r\n onConfigSaving: function (cfg) {\r\n // Get the form values\r\n var values = wp.Form.getValues();\r\n // Set the configuration\r\n var listItem = values[\"List\"];\r\n cfg = {\r\n ListId: listItem ? listItem.value : null,\r\n ListName: listItem ? listItem.text : null,\r\n WebUrl: values[\"WebUrl\"]\r\n };\r\n // Call the base event\r\n cfg = wpProps.onConfigSaving ? wpProps.onConfigSaving(cfg) : cfg;\r\n // Return the configuration\r\n return cfg;\r\n },\r\n // The render items event\r\n renderItems: function (el, cfg) {\r\n // See if a render event exists\r\n if (wpProps.renderItems == null) {\r\n return;\r\n }\r\n // Set the list\r\n var list = (0, gd_sprest_1.Web)(cfg.WebUrl).Lists().getById(cfg.ListId);\r\n // Ensure the list exists\r\n if (cfg.ListId) {\r\n // See if we are doing a caml query\r\n if (wpProps.onListItemCAMLQuery) {\r\n // Set the CAML query\r\n var camlQuery = wpProps.onListItemCAMLQuery(cfg, \"\");\r\n // Get the list items\r\n list.getItemsByQuery(camlQuery).execute(\r\n // Success\r\n function (items) {\r\n // Call the event\r\n wpProps.renderItems(el, cfg, items.results);\r\n }, function (err) {\r\n // Call the event\r\n wpProps.renderItems(el, cfg, []);\r\n });\r\n }\r\n else {\r\n // Set the ODATA query\r\n var odata = wpProps.onListItemODataQuery ? wpProps.onListItemODataQuery(cfg, {}) : null;\r\n // See if we are making an ODATA query\r\n if (odata) {\r\n // Get the list items\r\n list.Items().query(odata).execute(\r\n // Success\r\n function (items) {\r\n // Call the event\r\n wpProps.renderItems(el, cfg, items.results);\r\n }, \r\n // Error\r\n function (err) {\r\n // Call the event\r\n wpProps.renderItems(el, cfg, []);\r\n });\r\n }\r\n else {\r\n // Get the list items\r\n list.Items().execute(\r\n // Success\r\n function (items) {\r\n // Call the event\r\n wpProps.renderItems(el, cfg, items.results);\r\n }, \r\n // Error\r\n function (err) {\r\n // Call the event\r\n wpProps.renderItems(el, cfg, []);\r\n });\r\n }\r\n }\r\n }\r\n }\r\n };\r\n // Return the webpart\r\n var wp = (0, base_1.SPFxWebPart)(__assign(__assign({}, wpProps), baseProps));\r\n return wp;\r\n};\r\nexports.SPFxListWebPart = SPFxListWebPart;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFx.js?");
|
|
2489
2489
|
|
|
2490
2490
|
/***/ }),
|
|
2491
2491
|
|
|
2492
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2492
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFxForm.js":
|
|
2493
2493
|
/*!**************************************************************************************************************!*\
|
|
2494
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2494
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFxForm.js ***!
|
|
2495
2495
|
\**************************************************************************************************************/
|
|
2496
2496
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2497
2497
|
|
|
2498
2498
|
"use strict";
|
|
2499
|
-
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.SPFxListFormWebPart = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar listForm_1 = __webpack_require__(/*! ../../components/listForm */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/components/listForm/index.js\");\r\nvar wpSPFx_1 = __webpack_require__(/*! ./wpSPFx */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/webparts/list/wpSPFx.js\");\r\n/**\r\n * List Form WebPart\r\n */\r\nvar SPFxListFormWebPart = function (wpProps) {\r\n // See if we have already rendered the form\r\n if (wpProps.spfx.domElement.querySelector(\"form\")) {\r\n return;\r\n }\r\n // Set the base properties\r\n var baseProps = {\r\n render: function (el, cfg) {\r\n // Set the list form properties\r\n var listProps = {\r\n itemId: wpProps.spfx.context.itemId,\r\n listName: wpProps.spfx.context.list.title\r\n };\r\n // Call the get list information event\r\n listProps = wpProps.onGetListInfo ? wpProps.onGetListInfo(listProps) : listProps;\r\n // Load the list information\r\n gd_sprest_1.Helper.ListForm.create(listProps).then(function (info) {\r\n // See if this is the display form\r\n var isDisplay = wpProps.spfx.displayMode == gd_sprest_1.SPTypes.FormDisplayMode.Display;\r\n if (isDisplay) {\r\n // Set the display form properties\r\n var dispProps = {\r\n el: wpProps.spfx.domElement,\r\n info: info,\r\n rowClassName: \"mb-3\"\r\n };\r\n // Call the rendering event\r\n dispProps = wpProps.onDisplayFormRendering ? wpProps.onDisplayFormRendering(dispProps) : dispProps;\r\n // Render the display form\r\n wp.DisplayForm = listForm_1.ListForm.renderDisplayForm(dispProps);\r\n // Call the rendered event\r\n wpProps.onDisplayFormRendered ? wpProps.onDisplayFormRendered(wp.DisplayForm) : null;\r\n }\r\n else {\r\n // Render the edit form\r\n var editProps = {\r\n el: wpProps.spfx.domElement,\r\n info: info,\r\n controlMode: info.item ? gd_sprest_1.SPTypes.ControlMode.Edit : gd_sprest_1.SPTypes.ControlMode.New,\r\n rowClassName: \"mb-3\"\r\n };\r\n // Call the rendering event\r\n editProps = wpProps.onEditFormRendering ? wpProps.onEditFormRendering(editProps) : editProps;\r\n // Render the edit form\r\n wp.EditForm = listForm_1.ListForm.renderEditForm(editProps);\r\n // Call the rendered event\r\n wpProps.onEditFormRendered ? wpProps.onEditFormRendered(wp.EditForm) : null;\r\n }\r\n // Render the footer\r\n var elFooter = document.createElement(\"div\");\r\n elFooter.classList.add(\"footer\");\r\n wpProps.spfx.domElement.appendChild(elFooter);\r\n // Set the footer properties\r\n var btnSave = null;\r\n var footerProps = isDisplay ? {\r\n el: elFooter,\r\n tooltips: [\r\n {\r\n content: \"Closes the form.\",\r\n btnProps: {\r\n text: \"Close\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineDark,\r\n onClick: function () {\r\n // Call the close event\r\n wpProps.spfx.formClosed();\r\n }\r\n }\r\n }\r\n ]\r\n } : {\r\n el: elFooter,\r\n tooltips: [\r\n {\r\n content: \"Saves the item.\",\r\n btnProps: {\r\n text: info.item ? \"Update\" : \"Save\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n assignTo: function (btn) { btnSave = btn; },\r\n onClick: function () {\r\n // Ensure the form is valid\r\n if (wp.EditForm.isValid()) {\r\n var values = wp.EditForm.getValues();\r\n // Disable the button\r\n btnSave.disable();\r\n // Call the saving event\r\n values = wpProps.onSaving ? wpProps.onSaving(values) : values;\r\n // Save the item\r\n wp.EditForm.save(values).then(\r\n // Success\r\n function (item) {\r\n // Call the saved event\r\n wpProps.onSaved ? wpProps.onSaved(item) : null;\r\n // Enable the button\r\n btnSave.enable();\r\n // Call the save event\r\n wpProps.spfx.formSaved();\r\n }, \r\n // Error\r\n function (err) {\r\n // TODO\r\n });\r\n }\r\n }\r\n }\r\n },\r\n {\r\n content: \"Cancels the request.\",\r\n btnProps: {\r\n text: \"Cancel\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineDanger,\r\n onClick: function () {\r\n // Call the close event\r\n wpProps.spfx.formClosed();\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n // Call the rendering method\r\n footerProps = wpProps.onEditFooterRendering ? wpProps.onEditFooterRendering(footerProps) : footerProps;\r\n if (footerProps) {\r\n // Render the footer\r\n gd_bs_1.Components.TooltipGroup(footerProps);\r\n }\r\n });\r\n },\r\n renderEdit: function (el) {\r\n var elBody = null;\r\n var elFooter = null;\r\n // Render a modal\r\n var modal = gd_bs_1.Components.Modal({\r\n el: el,\r\n title: \"List Form Configuration (\" + wp.Configuration.ListName + \")\",\r\n onRenderBody: function (el) { elBody = el; },\r\n onRenderFooter: function (el) { elFooter = el; }\r\n });\r\n // Render the configure list button\r\n gd_bs_1.Components.Button({\r\n el: el,\r\n text: \"Configure List\",\r\n onClick: function () {\r\n // Clear the body\r\n while (elBody.firstChild) {\r\n elBody.removeChild(elBody.firstChild);\r\n }\r\n // Clear the footer\r\n while (elFooter.firstChild) {\r\n elFooter.removeChild(elFooter.firstChild);\r\n }\r\n // Ensure a list has been selected\r\n if (wp.Configuration.ListId) {\r\n // Show a loading message\r\n gd_bs_1.Components.Alert({\r\n el: elBody,\r\n type: gd_bs_1.Components.AlertTypes.Primary,\r\n content: \"Loading the list data...\"\r\n });\r\n // Get the content types\r\n (0, gd_sprest_1.Web)(wp.Configuration.WebUrl).Lists().getById(wp.Configuration.ListId).ContentTypes().execute(function (cts) {\r\n var items = [];\r\n // Clear the body\r\n while (elBody.firstChild) {\r\n elBody.removeChild(elBody.firstChild);\r\n }\r\n // Parse the content types\r\n for (var i = 0; i < cts.results.length; i++) {\r\n var ct = cts.results[i];\r\n // Add the item\r\n items.push({\r\n data: ct,\r\n text: ct.Name,\r\n value: ct.Id.StringValue\r\n });\r\n }\r\n // Render a form\r\n var form = gd_bs_1.Components.Form({\r\n el: elBody,\r\n controls: [\r\n {\r\n name: \"ContentType\",\r\n label: \"Content Type\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n items: items,\r\n required: true\r\n },\r\n {\r\n name: \"ComponentId\",\r\n label: \"Component ID\",\r\n type: gd_bs_1.Components.FormControlTypes.TextField,\r\n required: true,\r\n value: wpProps.componentId\r\n },\r\n {\r\n name: \"ComponentProps\",\r\n label: \"Component Properties\",\r\n type: gd_bs_1.Components.FormControlTypes.TextArea,\r\n value: wpProps.componentProps\r\n }\r\n ]\r\n });\r\n // Render the footer\r\n gd_bs_1.Components.TooltipGroup({\r\n el: elFooter,\r\n tooltips: [\r\n {\r\n content: \"Clears the list forms and reverts back to the default forms.\",\r\n btnProps: {\r\n text: \"Clear Custom Forms\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineDanger,\r\n onClick: function () {\r\n // Ensure an item is selected\r\n if (form.isValid()) {\r\n var values = form.getValues();\r\n var item = values[\"ContentType\"];\r\n // Clear the form component properties\r\n (0, gd_sprest_1.Web)(wp.Configuration.WebUrl).Lists().getById(wp.Configuration.ListId).ContentTypes(item.value).update({\r\n DisplayFormClientSideComponentId: \"\",\r\n DisplayFormClientSideComponentProperties: \"\",\r\n EditFormClientSideComponentId: \"\",\r\n EditFormClientSideComponentProperties: \"\",\r\n NewFormClientSideComponentId: \"\",\r\n NewFormClientSideComponentProperties: \"\"\r\n }).execute(function () {\r\n // Close the modal\r\n modal.hide();\r\n });\r\n }\r\n }\r\n }\r\n },\r\n {\r\n content: \"Applies the custom list forms to the selected list.\",\r\n btnProps: {\r\n text: \"Apply Custom Forms\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineSuccess,\r\n onClick: function () {\r\n // Ensure an item is selected\r\n if (form.isValid()) {\r\n var values = form.getValues();\r\n var item = values[\"ContentType\"];\r\n // Set the form component properties\r\n (0, gd_sprest_1.Web)(wp.Configuration.WebUrl).Lists().getById(wp.Configuration.ListId).ContentTypes(item.value).update({\r\n DisplayFormClientSideComponentId: values[\"ComponentId\"],\r\n DisplayFormClientSideComponentProperties: values[\"ComponentProps\"],\r\n EditFormClientSideComponentId: values[\"ComponentId\"],\r\n EditFormClientSideComponentProperties: values[\"ComponentProps\"],\r\n NewFormClientSideComponentId: values[\"ComponentId\"],\r\n NewFormClientSideComponentProperties: values[\"ComponentProps\"]\r\n }).execute(function () {\r\n // Close the modal\r\n modal.hide();\r\n });\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n });\r\n });\r\n // Display the modal\r\n modal.show();\r\n }\r\n else {\r\n // Render an error\r\n gd_bs_1.Components.Alert({\r\n el: elBody,\r\n type: gd_bs_1.Components.AlertTypes.Danger,\r\n content: \"Edit the webpart and select a list to apply the solution to.\"\r\n });\r\n // Display the modal\r\n modal.show();\r\n }\r\n }\r\n });\r\n }\r\n };\r\n // Return the webpart\r\n var wp = (0, wpSPFx_1.SPFxListWebPart)(__assign(__assign({}, wpProps), baseProps));\r\n return wp;\r\n};\r\nexports.SPFxListFormWebPart = SPFxListFormWebPart;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.89/node_modules/gd-sprest-bs/build/webparts/list/wpSPFxForm.js?");
|
|
2499
|
+
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.SPFxListFormWebPart = void 0;\r\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/gd-bs@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar listForm_1 = __webpack_require__(/*! ../../components/listForm */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/components/listForm/index.js\");\r\nvar wpSPFx_1 = __webpack_require__(/*! ./wpSPFx */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFx.js\");\r\n/**\r\n * List Form WebPart\r\n */\r\nvar SPFxListFormWebPart = function (wpProps) {\r\n // See if we have already rendered the form\r\n if (wpProps.spfx.domElement.querySelector(\"form\")) {\r\n return;\r\n }\r\n // Set the base properties\r\n var baseProps = {\r\n render: function (el, cfg) {\r\n // Set the list form properties\r\n var listProps = {\r\n itemId: wpProps.spfx.context.itemId,\r\n listName: wpProps.spfx.context.list.title\r\n };\r\n // Call the get list information event\r\n listProps = wpProps.onGetListInfo ? wpProps.onGetListInfo(listProps) : listProps;\r\n // Load the list information\r\n gd_sprest_1.Helper.ListForm.create(listProps).then(function (info) {\r\n // See if this is the display form\r\n var isDisplay = wpProps.spfx.displayMode == gd_sprest_1.SPTypes.FormDisplayMode.Display;\r\n if (isDisplay) {\r\n // Set the display form properties\r\n var dispProps = {\r\n el: wpProps.spfx.domElement,\r\n info: info,\r\n rowClassName: \"mb-3\"\r\n };\r\n // Call the rendering event\r\n dispProps = wpProps.onDisplayFormRendering ? wpProps.onDisplayFormRendering(dispProps) : dispProps;\r\n // Render the display form\r\n wp.DisplayForm = listForm_1.ListForm.renderDisplayForm(dispProps);\r\n // Call the rendered event\r\n wpProps.onDisplayFormRendered ? wpProps.onDisplayFormRendered(wp.DisplayForm) : null;\r\n }\r\n else {\r\n // Render the edit form\r\n var editProps = {\r\n el: wpProps.spfx.domElement,\r\n info: info,\r\n controlMode: info.item ? gd_sprest_1.SPTypes.ControlMode.Edit : gd_sprest_1.SPTypes.ControlMode.New,\r\n rowClassName: \"mb-3\"\r\n };\r\n // Call the rendering event\r\n editProps = wpProps.onEditFormRendering ? wpProps.onEditFormRendering(editProps) : editProps;\r\n // Render the edit form\r\n wp.EditForm = listForm_1.ListForm.renderEditForm(editProps);\r\n // Call the rendered event\r\n wpProps.onEditFormRendered ? wpProps.onEditFormRendered(wp.EditForm) : null;\r\n }\r\n // Render the footer\r\n var elFooter = document.createElement(\"div\");\r\n elFooter.classList.add(\"footer\");\r\n wpProps.spfx.domElement.appendChild(elFooter);\r\n // Set the footer properties\r\n var btnSave = null;\r\n var footerProps = isDisplay ? {\r\n el: elFooter,\r\n tooltips: [\r\n {\r\n content: \"Closes the form.\",\r\n btnProps: {\r\n text: \"Close\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineDark,\r\n onClick: function () {\r\n // Call the close event\r\n wpProps.spfx.formClosed();\r\n }\r\n }\r\n }\r\n ]\r\n } : {\r\n el: elFooter,\r\n tooltips: [\r\n {\r\n content: \"Saves the item.\",\r\n btnProps: {\r\n text: info.item ? \"Update\" : \"Save\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlinePrimary,\r\n assignTo: function (btn) { btnSave = btn; },\r\n onClick: function () {\r\n // Ensure the form is valid\r\n if (wp.EditForm.isValid()) {\r\n var values = wp.EditForm.getValues();\r\n // Disable the button\r\n btnSave.disable();\r\n // Call the saving event\r\n values = wpProps.onSaving ? wpProps.onSaving(values) : values;\r\n // Save the item\r\n wp.EditForm.save(values).then(\r\n // Success\r\n function (item) {\r\n // Call the saved event\r\n wpProps.onSaved ? wpProps.onSaved(item) : null;\r\n // Enable the button\r\n btnSave.enable();\r\n // Call the save event\r\n wpProps.spfx.formSaved();\r\n }, \r\n // Error\r\n function (err) {\r\n // TODO\r\n });\r\n }\r\n }\r\n }\r\n },\r\n {\r\n content: \"Cancels the request.\",\r\n btnProps: {\r\n text: \"Cancel\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineDanger,\r\n onClick: function () {\r\n // Call the close event\r\n wpProps.spfx.formClosed();\r\n }\r\n }\r\n }\r\n ]\r\n };\r\n // Call the rendering method\r\n footerProps = wpProps.onEditFooterRendering ? wpProps.onEditFooterRendering(footerProps) : footerProps;\r\n if (footerProps) {\r\n // Render the footer\r\n gd_bs_1.Components.TooltipGroup(footerProps);\r\n }\r\n });\r\n },\r\n renderEdit: function (el) {\r\n var elBody = null;\r\n var elFooter = null;\r\n // Render a modal\r\n var modal = gd_bs_1.Components.Modal({\r\n el: el,\r\n title: \"List Form Configuration (\" + wp.Configuration.ListName + \")\",\r\n onRenderBody: function (el) { elBody = el; },\r\n onRenderFooter: function (el) { elFooter = el; }\r\n });\r\n // Render the configure list button\r\n gd_bs_1.Components.Button({\r\n el: el,\r\n text: \"Configure List\",\r\n onClick: function () {\r\n // Clear the body\r\n while (elBody.firstChild) {\r\n elBody.removeChild(elBody.firstChild);\r\n }\r\n // Clear the footer\r\n while (elFooter.firstChild) {\r\n elFooter.removeChild(elFooter.firstChild);\r\n }\r\n // Ensure a list has been selected\r\n if (wp.Configuration.ListId) {\r\n // Show a loading message\r\n gd_bs_1.Components.Alert({\r\n el: elBody,\r\n type: gd_bs_1.Components.AlertTypes.Primary,\r\n content: \"Loading the list data...\"\r\n });\r\n // Get the content types\r\n (0, gd_sprest_1.Web)(wp.Configuration.WebUrl).Lists().getById(wp.Configuration.ListId).ContentTypes().execute(function (cts) {\r\n var items = [];\r\n // Clear the body\r\n while (elBody.firstChild) {\r\n elBody.removeChild(elBody.firstChild);\r\n }\r\n // Parse the content types\r\n for (var i = 0; i < cts.results.length; i++) {\r\n var ct = cts.results[i];\r\n // Add the item\r\n items.push({\r\n data: ct,\r\n text: ct.Name,\r\n value: ct.Id.StringValue\r\n });\r\n }\r\n // Render a form\r\n var form = gd_bs_1.Components.Form({\r\n el: elBody,\r\n controls: [\r\n {\r\n name: \"ContentType\",\r\n label: \"Content Type\",\r\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\r\n items: items,\r\n required: true\r\n },\r\n {\r\n name: \"ComponentId\",\r\n label: \"Component ID\",\r\n type: gd_bs_1.Components.FormControlTypes.TextField,\r\n required: true,\r\n value: wpProps.componentId\r\n },\r\n {\r\n name: \"ComponentProps\",\r\n label: \"Component Properties\",\r\n type: gd_bs_1.Components.FormControlTypes.TextArea,\r\n value: wpProps.componentProps\r\n }\r\n ]\r\n });\r\n // Render the footer\r\n gd_bs_1.Components.TooltipGroup({\r\n el: elFooter,\r\n tooltips: [\r\n {\r\n content: \"Clears the list forms and reverts back to the default forms.\",\r\n btnProps: {\r\n text: \"Clear Custom Forms\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineDanger,\r\n onClick: function () {\r\n // Ensure an item is selected\r\n if (form.isValid()) {\r\n var values = form.getValues();\r\n var item = values[\"ContentType\"];\r\n // Clear the form component properties\r\n (0, gd_sprest_1.Web)(wp.Configuration.WebUrl).Lists().getById(wp.Configuration.ListId).ContentTypes(item.value).update({\r\n DisplayFormClientSideComponentId: \"\",\r\n DisplayFormClientSideComponentProperties: \"\",\r\n EditFormClientSideComponentId: \"\",\r\n EditFormClientSideComponentProperties: \"\",\r\n NewFormClientSideComponentId: \"\",\r\n NewFormClientSideComponentProperties: \"\"\r\n }).execute(function () {\r\n // Close the modal\r\n modal.hide();\r\n });\r\n }\r\n }\r\n }\r\n },\r\n {\r\n content: \"Applies the custom list forms to the selected list.\",\r\n btnProps: {\r\n text: \"Apply Custom Forms\",\r\n type: gd_bs_1.Components.ButtonTypes.OutlineSuccess,\r\n onClick: function () {\r\n // Ensure an item is selected\r\n if (form.isValid()) {\r\n var values = form.getValues();\r\n var item = values[\"ContentType\"];\r\n // Set the form component properties\r\n (0, gd_sprest_1.Web)(wp.Configuration.WebUrl).Lists().getById(wp.Configuration.ListId).ContentTypes(item.value).update({\r\n DisplayFormClientSideComponentId: values[\"ComponentId\"],\r\n DisplayFormClientSideComponentProperties: values[\"ComponentProps\"],\r\n EditFormClientSideComponentId: values[\"ComponentId\"],\r\n EditFormClientSideComponentProperties: values[\"ComponentProps\"],\r\n NewFormClientSideComponentId: values[\"ComponentId\"],\r\n NewFormClientSideComponentProperties: values[\"ComponentProps\"]\r\n }).execute(function () {\r\n // Close the modal\r\n modal.hide();\r\n });\r\n }\r\n }\r\n }\r\n }\r\n ]\r\n });\r\n });\r\n // Display the modal\r\n modal.show();\r\n }\r\n else {\r\n // Render an error\r\n gd_bs_1.Components.Alert({\r\n el: elBody,\r\n type: gd_bs_1.Components.AlertTypes.Danger,\r\n content: \"Edit the webpart and select a list to apply the solution to.\"\r\n });\r\n // Display the modal\r\n modal.show();\r\n }\r\n }\r\n });\r\n }\r\n };\r\n // Return the webpart\r\n var wp = (0, wpSPFx_1.SPFxListWebPart)(__assign(__assign({}, wpProps), baseProps));\r\n return wp;\r\n};\r\nexports.SPFxListFormWebPart = SPFxListFormWebPart;\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wpSPFxForm.js?");
|
|
2500
2500
|
|
|
2501
2501
|
/***/ }),
|
|
2502
2502
|
|
|
2503
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2503
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/index.js":
|
|
2504
2504
|
/*!***********************************************************************************************************!*\
|
|
2505
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2505
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/index.js ***!
|
|
2506
2506
|
\***********************************************************************************************************/
|
|
2507
2507
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2508
2508
|
|
|
2509
2509
|
"use strict";
|
|
2510
|
-
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@10.10.
|
|
2510
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/index.js?");
|
|
2511
2511
|
|
|
2512
2512
|
/***/ }),
|
|
2513
2513
|
|
|
2514
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2514
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/wp.js":
|
|
2515
2515
|
/*!********************************************************************************************************!*\
|
|
2516
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2516
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/wp.js ***!
|
|
2517
2517
|
\********************************************************************************************************/
|
|
2518
2518
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2519
2519
|
|
|
2520
2520
|
"use strict";
|
|
2521
|
-
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@10.10.
|
|
2521
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/list/wp.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/wp.js?");
|
|
2522
2522
|
|
|
2523
2523
|
/***/ }),
|
|
2524
2524
|
|
|
2525
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2525
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js":
|
|
2526
2526
|
/*!***********************************************************************************************************!*\
|
|
2527
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2527
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js ***!
|
|
2528
2528
|
\***********************************************************************************************************/
|
|
2529
2529
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2530
2530
|
|
|
2531
2531
|
"use strict";
|
|
2532
|
-
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.
|
|
2532
|
+
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/search/wpCfg.js?");
|
|
2533
2533
|
|
|
2534
2534
|
/***/ }),
|
|
2535
2535
|
|
|
2536
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2536
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/tabs/index.js":
|
|
2537
2537
|
/*!*********************************************************************************************************!*\
|
|
2538
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2538
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/tabs/index.js ***!
|
|
2539
2539
|
\*********************************************************************************************************/
|
|
2540
2540
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2541
2541
|
|
|
2542
2542
|
"use strict";
|
|
2543
|
-
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@10.10.
|
|
2543
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/tabs/index.js?");
|
|
2544
2544
|
|
|
2545
2545
|
/***/ }),
|
|
2546
2546
|
|
|
2547
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2547
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js":
|
|
2548
2548
|
/*!******************************************************************************************************!*\
|
|
2549
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2549
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js ***!
|
|
2550
2550
|
\******************************************************************************************************/
|
|
2551
2551
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2552
2552
|
|
|
2553
2553
|
"use strict";
|
|
2554
|
-
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.89/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@10.10.89/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js?");
|
|
2554
|
+
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/tabs/wp.js?");
|
|
2555
2555
|
|
|
2556
2556
|
/***/ }),
|
|
2557
2557
|
|
|
2558
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2558
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/index.js":
|
|
2559
2559
|
/*!*************************************************************************************************************!*\
|
|
2560
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2560
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/index.js ***!
|
|
2561
2561
|
\*************************************************************************************************************/
|
|
2562
2562
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2563
2563
|
|
|
2564
2564
|
"use strict";
|
|
2565
|
-
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@10.10.
|
|
2565
|
+
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@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/wp.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js\"), exports);\r\n\n\n//# sourceURL=webpack://dattatable/./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/index.js?");
|
|
2566
2566
|
|
|
2567
2567
|
/***/ }),
|
|
2568
2568
|
|
|
2569
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2569
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/wp.js":
|
|
2570
2570
|
/*!**********************************************************************************************************!*\
|
|
2571
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2571
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/wp.js ***!
|
|
2572
2572
|
\**********************************************************************************************************/
|
|
2573
2573
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2574
2574
|
|
|
2575
2575
|
"use strict";
|
|
2576
|
-
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2576
|
+
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@7.7.7/node_modules/gd-sprest/build/index.js\");\r\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/base/wp.js\");\r\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./node_modules/.pnpm/gd-sprest-bs@10.10.90/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/wp.js?");
|
|
2577
2577
|
|
|
2578
2578
|
/***/ }),
|
|
2579
2579
|
|
|
2580
|
-
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2580
|
+
/***/ "./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js":
|
|
2581
2581
|
/*!*************************************************************************************************************!*\
|
|
2582
|
-
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.
|
|
2582
|
+
!*** ./node_modules/.pnpm/gd-sprest-bs@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js ***!
|
|
2583
2583
|
\*************************************************************************************************************/
|
|
2584
2584
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2585
2585
|
|
|
2586
2586
|
"use strict";
|
|
2587
|
-
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.89/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js?");
|
|
2587
|
+
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@6.4.8/node_modules/gd-bs/build/index.js\");\r\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/gd-sprest@7.7.7/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@10.10.90/node_modules/gd-sprest-bs/build/webparts/taxonomy/wpCfg.js?");
|
|
2588
2588
|
|
|
2589
2589
|
/***/ }),
|
|
2590
2590
|
|