dattatable 2.10.15 → 2.10.16
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/canvas.js +5 -1
- package/build/common/modal.js +5 -1
- package/dist/dattatable.js +2 -2
- package/dist/dattatable.min.js +1 -1
- package/docs/classes/Accordion.html +2 -2
- 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 +4 -4
- package/docs/classes/ListSecurity.html +2 -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/Tiles.html +2 -2
- 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/getContextInfo.html +1 -1
- package/docs/functions/getFileExt.html +1 -1
- package/docs/functions/waitForTheme.html +1 -1
- package/docs/interfaces/IAccordion.html +2 -2
- package/docs/interfaces/IAccordionProps.html +2 -2
- 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/interfaces/ITiles.html +2 -2
- package/docs/interfaces/ITilesProps.html +2 -2
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +1 -1
package/build/common/canvas.js
CHANGED
|
@@ -86,7 +86,11 @@ var CanvasForm = /** @class */ (function () {
|
|
|
86
86
|
// Sets the auto close flag
|
|
87
87
|
CanvasForm.setAutoClose = function (value) { this._canvas.setAutoClose(value); };
|
|
88
88
|
// Sets the close event
|
|
89
|
-
CanvasForm.setCloseEvent = function (event) {
|
|
89
|
+
CanvasForm.setCloseEvent = function (event) {
|
|
90
|
+
var _this = this;
|
|
91
|
+
// Set the event in its own thread
|
|
92
|
+
setTimeout(function () { _this._onCloseEvent = event; }, 10);
|
|
93
|
+
};
|
|
90
94
|
// Sets the body
|
|
91
95
|
CanvasForm.setBody = function (content) {
|
|
92
96
|
// Clear the body
|
package/build/common/modal.js
CHANGED
|
@@ -129,7 +129,11 @@ var Modal = /** @class */ (function () {
|
|
|
129
129
|
// Sets the close button visibility
|
|
130
130
|
Modal.setCloseButtonVisibility = function (showFl) { this._modal.setCloseButtonVisibility(showFl); };
|
|
131
131
|
// Sets the close event
|
|
132
|
-
Modal.setCloseEvent = function (event) {
|
|
132
|
+
Modal.setCloseEvent = function (event) {
|
|
133
|
+
var _this = this;
|
|
134
|
+
// Set the event in its own thread
|
|
135
|
+
setTimeout(function () { _this._onCloseEvent = event; }, 10);
|
|
136
|
+
};
|
|
133
137
|
// Sets the flag to hide the empty footer
|
|
134
138
|
Modal.setHideEmptyFooter = function (value) { this._hideEmptyFooter = value; };
|
|
135
139
|
// Sets the flag to hide the empty header
|
package/dist/dattatable.js
CHANGED
|
@@ -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.11.57/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.setCloseEvent(null);\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 () {\r\n this._canvas.hide();\r\n // Call the close event\r\n this._onCloseEvent ? this._onCloseEvent() : null;\r\n };\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 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 CanvasForm.setAutoClose = function (value) { this._canvas.setAutoClose(value); };\r\n // Sets the close event\r\n CanvasForm.setCloseEvent = function (event) { this._onCloseEvent = event; };\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 CanvasForm._onCloseEvent = 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?");
|
|
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.11.57/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.setCloseEvent(null);\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 () {\r\n this._canvas.hide();\r\n // Call the close event\r\n this._onCloseEvent ? this._onCloseEvent() : null;\r\n };\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 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 CanvasForm.setAutoClose = function (value) { this._canvas.setAutoClose(value); };\r\n // Sets the close event\r\n CanvasForm.setCloseEvent = function (event) {\r\n var _this = this;\r\n // Set the event in its own thread\r\n setTimeout(function () { _this._onCloseEvent = event; }, 10);\r\n };\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 CanvasForm._onCloseEvent = 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
|
|
|
@@ -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.11.57/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 Object.defineProperty(Modal, \"HideEmptyFooter\", {\r\n get: function () { return this._hideEmptyFooter; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Modal, \"HideEmptyHeader\", {\r\n get: function () { return this._hideEmptyHeader; },\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.setHideEmptyFooter(true);\r\n this.setHideEmptyHeader(false);\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 modal\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 flag to hide the empty footer\r\n Modal.setHideEmptyFooter = function (value) { this._hideEmptyFooter = value; };\r\n // Sets the flag to hide the empty header\r\n Modal.setHideEmptyHeader = function (value) { this._hideEmptyHeader = value; };\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 () {\r\n // See if we are hiding the header\r\n if (this.HideEmptyHeader && this.HeaderElement.innerText.trim().length == 0) {\r\n // Hide the header\r\n this.HeaderElement.classList.add(\"d-none\");\r\n }\r\n // See if we are hiding the footer\r\n if (this.HideEmptyFooter && this.FooterElement.innerText.trim().length == 0) {\r\n // Hide the footer\r\n this.FooterElement.classList.add(\"d-none\");\r\n }\r\n // Show the modal\r\n this._modal.show();\r\n };\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 // Hides the footer if it's empty\r\n Modal._hideEmptyFooter = true;\r\n // Hides the header if it's empty\r\n Modal._hideEmptyHeader = false;\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?");
|
|
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.11.57/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 Object.defineProperty(Modal, \"HideEmptyFooter\", {\r\n get: function () { return this._hideEmptyFooter; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Modal, \"HideEmptyHeader\", {\r\n get: function () { return this._hideEmptyHeader; },\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.setHideEmptyFooter(true);\r\n this.setHideEmptyHeader(false);\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 modal\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) {\r\n var _this = this;\r\n // Set the event in its own thread\r\n setTimeout(function () { _this._onCloseEvent = event; }, 10);\r\n };\r\n // Sets the flag to hide the empty footer\r\n Modal.setHideEmptyFooter = function (value) { this._hideEmptyFooter = value; };\r\n // Sets the flag to hide the empty header\r\n Modal.setHideEmptyHeader = function (value) { this._hideEmptyHeader = value; };\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 () {\r\n // See if we are hiding the header\r\n if (this.HideEmptyHeader && this.HeaderElement.innerText.trim().length == 0) {\r\n // Hide the header\r\n this.HeaderElement.classList.add(\"d-none\");\r\n }\r\n // See if we are hiding the footer\r\n if (this.HideEmptyFooter && this.FooterElement.innerText.trim().length == 0) {\r\n // Hide the footer\r\n this.FooterElement.classList.add(\"d-none\");\r\n }\r\n // Show the modal\r\n this._modal.show();\r\n };\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 // Hides the footer if it's empty\r\n Modal._hideEmptyFooter = true;\r\n // Hides the header if it's empty\r\n Modal._hideEmptyHeader = false;\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
|
|