dattatable 2.11.38 → 2.11.40

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.
Files changed (71) hide show
  1. package/build/dashboard/index.d.ts +1 -1
  2. package/build/dashboard/index.js +2 -2
  3. package/build/dashboard/table.d.ts +2 -0
  4. package/build/dashboard/table.js +11 -0
  5. package/dist/dattatable.js +2 -2
  6. package/dist/dattatable.min.js +1 -1
  7. package/docs/assets/search.js +1 -1
  8. package/docs/classes/Accordion.html +2 -2
  9. package/docs/classes/AuditLog.html +2 -2
  10. package/docs/classes/CanvasForm.html +2 -2
  11. package/docs/classes/Comments.html +2 -2
  12. package/docs/classes/Dashboard.html +4 -4
  13. package/docs/classes/DataTable.html +4 -3
  14. package/docs/classes/Documents.html +6 -6
  15. package/docs/classes/FilterSlideout.html +2 -2
  16. package/docs/classes/Footer.html +2 -2
  17. package/docs/classes/Header.html +2 -2
  18. package/docs/classes/InstallationRequired.html +2 -2
  19. package/docs/classes/ItemForm.html +4 -4
  20. package/docs/classes/List.html +4 -4
  21. package/docs/classes/ListConfig.html +2 -2
  22. package/docs/classes/ListSecurity.html +2 -2
  23. package/docs/classes/LoadingDialog.html +2 -2
  24. package/docs/classes/Modal.html +2 -2
  25. package/docs/classes/Navigation.html +3 -3
  26. package/docs/classes/Tiles.html +2 -2
  27. package/docs/classes/Timeout.html +2 -2
  28. package/docs/enums/ActionButtonTypes.html +2 -2
  29. package/docs/functions/formatBytes.html +1 -1
  30. package/docs/functions/formatDateValue.html +1 -1
  31. package/docs/functions/formatTimeValue.html +1 -1
  32. package/docs/functions/getContextInfo.html +1 -1
  33. package/docs/functions/getFileExt.html +1 -1
  34. package/docs/functions/waitForTheme.html +1 -1
  35. package/docs/interfaces/IAccordion.html +2 -2
  36. package/docs/interfaces/IAccordionProps.html +2 -2
  37. package/docs/interfaces/IAuditLogItem.html +2 -2
  38. package/docs/interfaces/IAuditLogItemCreation.html +2 -2
  39. package/docs/interfaces/IAuditLogProps.html +2 -2
  40. package/docs/interfaces/IAuditLogViewProps.html +2 -2
  41. package/docs/interfaces/ICommentsItem.html +2 -2
  42. package/docs/interfaces/ICreateLookupData.html +2 -2
  43. package/docs/interfaces/IDashboardProps.html +2 -2
  44. package/docs/interfaces/IDataTable.html +3 -2
  45. package/docs/interfaces/IDataTableProps.html +2 -2
  46. package/docs/interfaces/IDocumentsProps.html +2 -2
  47. package/docs/interfaces/IFilterItem.html +2 -2
  48. package/docs/interfaces/IFilterProps.html +2 -2
  49. package/docs/interfaces/IFooterProps.html +2 -2
  50. package/docs/interfaces/IGenerateLookupDataProps.html +2 -2
  51. package/docs/interfaces/IHeaderProps.html +2 -2
  52. package/docs/interfaces/IInstallProps.html +2 -2
  53. package/docs/interfaces/IItemFormCreateProps.html +2 -2
  54. package/docs/interfaces/IItemFormEditProps.html +2 -2
  55. package/docs/interfaces/IItemFormSaveProps.html +2 -2
  56. package/docs/interfaces/IItemFormTab.html +2 -2
  57. package/docs/interfaces/IItemFormTabInfo.html +2 -2
  58. package/docs/interfaces/IItemFormViewProps.html +2 -2
  59. package/docs/interfaces/IListConfig.html +2 -2
  60. package/docs/interfaces/IListConfigProps.html +2 -2
  61. package/docs/interfaces/IListProps.html +2 -2
  62. package/docs/interfaces/IListSecurity.html +2 -2
  63. package/docs/interfaces/IListSecurityItem.html +2 -2
  64. package/docs/interfaces/ILookupData.html +2 -2
  65. package/docs/interfaces/IShowDialogProps.html +2 -2
  66. package/docs/interfaces/ITiles.html +2 -2
  67. package/docs/interfaces/ITilesProps.html +2 -2
  68. package/docs/interfaces/IValidateLookupsProps.html +2 -2
  69. package/docs/variables/DattaTable.html +1 -1
  70. package/docs/variables/ListSecurityDefaultGroups.html +1 -1
  71. package/package.json +1 -1
@@ -147,7 +147,7 @@ export declare class Dashboard {
147
147
  clearFilter(): void;
148
148
  filter(idx: number, value?: string, exactMatchFl?: boolean): void;
149
149
  filterAccordion(values?: string | string[], useAndOperator?: boolean): void;
150
- filterMulti(idx: number, values?: string[]): void;
150
+ filterMulti(idx: number, values?: string[], exactMatchFl?: boolean): void;
151
151
  filterTiles(values?: string | string[], useAndOperator?: boolean): void;
152
152
  getFilter(key: string): Components.ICheckboxGroup;
153
153
  getSearchValue(): string;
@@ -361,7 +361,7 @@ var Dashboard = /** @class */ (function () {
361
361
  }
362
362
  };
363
363
  // Filter the table by multiple values
364
- Dashboard.prototype.filterMulti = function (idx, values) {
364
+ Dashboard.prototype.filterMulti = function (idx, values, exactMatchFl) {
365
365
  // See if we have an accordion
366
366
  if (this.IsAccordion) {
367
367
  // Filter the accordion
@@ -374,7 +374,7 @@ var Dashboard = /** @class */ (function () {
374
374
  }
375
375
  else {
376
376
  // Filter the table
377
- this._dt.filterMulti(idx, values);
377
+ exactMatchFl && values.length > 0 ? this._dt.filterMultiExact(idx, values) : this._dt.filterMulti(idx, values);
378
378
  }
379
379
  };
380
380
  // Filter the tiles
@@ -10,6 +10,7 @@ export interface IDataTable {
10
10
  filter: (idx: number, value?: string) => void;
11
11
  filterExact: (idx: number, value?: string) => void;
12
12
  filterMulti: (idx: number, values?: string[]) => void;
13
+ filterMultiExact: (idx: number, values?: string[]) => void;
13
14
  onRendering?: (dtProps: any) => any;
14
15
  onRendered?: (el?: HTMLElement, dt?: any) => void;
15
16
  refresh: (rows: any[]) => void;
@@ -42,6 +43,7 @@ export declare class DataTable implements IDataTable {
42
43
  filter(idx: number, value?: string): void;
43
44
  filterExact(idx: number, value?: string): void;
44
45
  filterMulti(idx: number, values?: string[]): void;
46
+ filterMultiExact(idx: number, values?: string[]): void;
45
47
  refresh(rows?: any[]): void;
46
48
  search(value?: string): void;
47
49
  }
@@ -124,6 +124,17 @@ var DataTable = /** @class */ (function () {
124
124
  // Filter the values
125
125
  this.filter(idx, values.join('|'));
126
126
  };
127
+ // Filters multiple values against the status
128
+ DataTable.prototype.filterMultiExact = function (idx, values) {
129
+ if (values === void 0) { values = []; }
130
+ // Parse the values
131
+ for (var i = 0; i < values.length; i++) {
132
+ // Update the value
133
+ values[i] = values[i].replace(/\|/g, '\\$&');
134
+ }
135
+ // Filter the values
136
+ this._datatable.column(idx).search("^(" + values.join('|') + ")$", true, false).draw();
137
+ };
127
138
  // Method to reload the data
128
139
  DataTable.prototype.refresh = function (rows) {
129
140
  if (rows === void 0) { rows = []; }
@@ -225,7 +225,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
225
225
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
226
226
 
227
227
  "use strict";
228
- 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\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.13.85/node_modules/gd-sprest-bs/build/index.js\");\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./build/common/index.js\");\r\nvar accordion_1 = __webpack_require__(/*! ./accordion */ \"./build/dashboard/accordion.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\nvar tiles_1 = __webpack_require__(/*! ./tiles */ \"./build/dashboard/tiles.js\");\r\n// Export the components\r\n__exportStar(__webpack_require__(/*! ./accordion */ \"./build/dashboard/accordion.js\"), exports);\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__exportStar(__webpack_require__(/*! ./tiles */ \"./build/dashboard/tiles.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._accordion = null;\r\n this._dt = null;\r\n this._filters = null;\r\n this._navigation = null;\r\n this._props = null;\r\n this._tiles = 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 // Apply the filters\r\n _this.applyFilters();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(_this._props.el) : null;\r\n }, 10);\r\n }\r\n Object.defineProperty(Dashboard.prototype, \"IsAccordion\", {\r\n // Determines if we are rendering an accordion\r\n get: function () { return this._props.accordion ? true : false; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Dashboard.prototype, \"IsTiles\", {\r\n // Determines if we are rendering tiles\r\n get: function () { return this._props.tiles ? true : false; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Applies the default active filters\r\n Dashboard.prototype.applyFilters = function () {\r\n var _a;\r\n // See if filters exist\r\n if ((_a = this._props.filters) === null || _a === void 0 ? void 0 : _a.items) {\r\n // Parse the filters\r\n for (var i = 0; i < this._props.filters.items.length; i++) {\r\n var applyFilter = false;\r\n var filter = this._props.filters.items[i];\r\n var value = filter.multi ? [] : \"\";\r\n // Parse the items\r\n for (var j = 0; j < (filter === null || filter === void 0 ? void 0 : filter.items.length); j++) {\r\n var item = filter.items[j];\r\n // See if this one is active\r\n if (item.isSelected) {\r\n // Set the flag\r\n applyFilter = true;\r\n // Set the value\r\n filter.multi ? value.push(item.label) : value = item.label;\r\n }\r\n }\r\n // See if we are applying the filter\r\n if (applyFilter) {\r\n // Apply the filter\r\n filter.onFilter(value);\r\n }\r\n }\r\n }\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 className: this._props.filters ? this._props.filters.className : null,\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 onShowFilter: this._props.filters ? this._props.filters.onShowFilter : null,\r\n onFilter: this.IsAccordion || this.IsTiles ? function (value, item) {\r\n var values = typeof (value) === \"string\" ? [value] : value;\r\n // See if this is an accordion\r\n if (_this.IsAccordion) {\r\n // Filter the accordion\r\n _this._accordion.filter(values);\r\n }\r\n else {\r\n // Filter the tiles\r\n _this._tiles.filter(values);\r\n }\r\n } : 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=\\\"\".concat(this.IsAccordion ? \"accordion\" : (this.IsTiles ? \"tiles\" : \"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 = typeof (this._props.hideHeader) === \"boolean\" ? !this._props.hideHeader : (this._props.header == null ? false : true);\r\n var navIsVisible = typeof (this._props.hideNavigation) === \"boolean\" ? !this._props.hideNavigation : true;\r\n var subNavIsVisible = typeof (this._props.hideSubNavigation) === \"boolean\" ? !this._props.hideSubNavigation : (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 className: navProps_1.className,\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 // See if we are rendering an accordion\r\n if (_this.IsAccordion) {\r\n // Search the accordion\r\n _this._accordion.search(value);\r\n }\r\n // Else, see if we are rendering tiles\r\n else if (_this.IsTiles) {\r\n // Search the tiles\r\n _this._tiles.search(value);\r\n }\r\n else {\r\n // Search the data table\r\n _this._dt.search(value);\r\n }\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 className: header.className,\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 var className = (headerIsVisible || navIsVisible ? null : \"sub-nav-border\") +\r\n (navProps_2.className ? \" \" + navProps_2.className : \"\");\r\n new navigation_1.Navigation({\r\n el: this._props.el.querySelector(\"#sub-navigation\"),\r\n className: className,\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 // See if we are rendering an accordion\r\n if (_this.IsAccordion) {\r\n // Search the accordion\r\n _this._accordion.search(value);\r\n }\r\n // Else, see if we are rendering tiles\r\n else if (_this.IsTiles) {\r\n // Search the tiles\r\n _this._tiles.search(value);\r\n }\r\n else {\r\n // Search the data table\r\n _this._dt.search(value);\r\n }\r\n },\r\n onShowFilter: function () {\r\n // Show the filter\r\n _this._filters.show();\r\n },\r\n });\r\n }\r\n // See if we are rendering an accordion\r\n if (this.IsAccordion) {\r\n // Render the accordion\r\n this._accordion = new accordion_1.Accordion(__assign({ el: this._props.el.querySelector(\"#accordion\") }, this._props.accordion));\r\n }\r\n // Else, see if we are rendering tiles\r\n else if (this.IsTiles) {\r\n // Render the tiles\r\n this._tiles = new tiles_1.Tiles(__assign({ el: this._props.el.querySelector(\"#tiles\") }, this._props.tiles));\r\n }\r\n else {\r\n // Render the data table\r\n this._dt = new table_1.DataTable(__assign({ el: this._props.el.querySelector(\"#datatable\") }, this._props.table));\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 className: \"bg-sharepoint rounded-bottom\" + (footer.className ? \" \" + footer.className : \"\"),\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 // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Filter the accordion\r\n this._accordion.filter(value);\r\n }\r\n // Else, see if we are rendering tiles\r\n else if (this.IsTiles) {\r\n // Filter the tiles\r\n this._tiles.filter(value);\r\n }\r\n else {\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 };\r\n // Filter the accordion\r\n Dashboard.prototype.filterAccordion = function (values, useAndOperator) {\r\n if (useAndOperator === void 0) { useAndOperator = false; }\r\n // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Filter the accordion\r\n this._accordion.filter(typeof (values) === \"string\" ? [values] : values, useAndOperator);\r\n }\r\n };\r\n // Filter the table by multiple values\r\n Dashboard.prototype.filterMulti = function (idx, values) {\r\n // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Filter the accordion\r\n this._accordion.filter(values);\r\n }\r\n // Else, see if we have tiles\r\n else if (this.IsTiles) {\r\n // Filter the tiles\r\n this._tiles.filter(values);\r\n }\r\n else {\r\n // Filter the table\r\n this._dt.filterMulti(idx, values);\r\n }\r\n };\r\n // Filter the tiles\r\n Dashboard.prototype.filterTiles = function (values, useAndOperator) {\r\n if (useAndOperator === void 0) { useAndOperator = false; }\r\n // See if we have tiles\r\n if (this.IsTiles) {\r\n // Filter the tiles\r\n this._tiles.filter(typeof (values) === \"string\" ? [values] : values, useAndOperator);\r\n }\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 // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Refresh the table\r\n this._accordion.refresh(rows);\r\n }\r\n // Else, see if we have tiles\r\n else if (this.IsTiles) {\r\n // Refresh the table\r\n this._tiles.refresh(rows);\r\n }\r\n else {\r\n // Refresh the table\r\n this._dt.refresh(rows);\r\n }\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 // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Search the accordion\r\n this._accordion.search(value);\r\n }\r\n // Else, see if we have tiles\r\n else if (this.IsTiles) {\r\n // Search the tiles\r\n this._tiles.search(value);\r\n }\r\n else {\r\n // Search the table\r\n this._dt.search(value);\r\n }\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?");
228
+ 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\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.13.85/node_modules/gd-sprest-bs/build/index.js\");\r\nvar common_1 = __webpack_require__(/*! ../common */ \"./build/common/index.js\");\r\nvar accordion_1 = __webpack_require__(/*! ./accordion */ \"./build/dashboard/accordion.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\nvar tiles_1 = __webpack_require__(/*! ./tiles */ \"./build/dashboard/tiles.js\");\r\n// Export the components\r\n__exportStar(__webpack_require__(/*! ./accordion */ \"./build/dashboard/accordion.js\"), exports);\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__exportStar(__webpack_require__(/*! ./tiles */ \"./build/dashboard/tiles.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._accordion = null;\r\n this._dt = null;\r\n this._filters = null;\r\n this._navigation = null;\r\n this._props = null;\r\n this._tiles = 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 // Apply the filters\r\n _this.applyFilters();\r\n // Call the render event\r\n props.onRendered ? props.onRendered(_this._props.el) : null;\r\n }, 10);\r\n }\r\n Object.defineProperty(Dashboard.prototype, \"IsAccordion\", {\r\n // Determines if we are rendering an accordion\r\n get: function () { return this._props.accordion ? true : false; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(Dashboard.prototype, \"IsTiles\", {\r\n // Determines if we are rendering tiles\r\n get: function () { return this._props.tiles ? true : false; },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n // Applies the default active filters\r\n Dashboard.prototype.applyFilters = function () {\r\n var _a;\r\n // See if filters exist\r\n if ((_a = this._props.filters) === null || _a === void 0 ? void 0 : _a.items) {\r\n // Parse the filters\r\n for (var i = 0; i < this._props.filters.items.length; i++) {\r\n var applyFilter = false;\r\n var filter = this._props.filters.items[i];\r\n var value = filter.multi ? [] : \"\";\r\n // Parse the items\r\n for (var j = 0; j < (filter === null || filter === void 0 ? void 0 : filter.items.length); j++) {\r\n var item = filter.items[j];\r\n // See if this one is active\r\n if (item.isSelected) {\r\n // Set the flag\r\n applyFilter = true;\r\n // Set the value\r\n filter.multi ? value.push(item.label) : value = item.label;\r\n }\r\n }\r\n // See if we are applying the filter\r\n if (applyFilter) {\r\n // Apply the filter\r\n filter.onFilter(value);\r\n }\r\n }\r\n }\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 className: this._props.filters ? this._props.filters.className : null,\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 onShowFilter: this._props.filters ? this._props.filters.onShowFilter : null,\r\n onFilter: this.IsAccordion || this.IsTiles ? function (value, item) {\r\n var values = typeof (value) === \"string\" ? [value] : value;\r\n // See if this is an accordion\r\n if (_this.IsAccordion) {\r\n // Filter the accordion\r\n _this._accordion.filter(values);\r\n }\r\n else {\r\n // Filter the tiles\r\n _this._tiles.filter(values);\r\n }\r\n } : 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=\\\"\".concat(this.IsAccordion ? \"accordion\" : (this.IsTiles ? \"tiles\" : \"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 = typeof (this._props.hideHeader) === \"boolean\" ? !this._props.hideHeader : (this._props.header == null ? false : true);\r\n var navIsVisible = typeof (this._props.hideNavigation) === \"boolean\" ? !this._props.hideNavigation : true;\r\n var subNavIsVisible = typeof (this._props.hideSubNavigation) === \"boolean\" ? !this._props.hideSubNavigation : (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 className: navProps_1.className,\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 // See if we are rendering an accordion\r\n if (_this.IsAccordion) {\r\n // Search the accordion\r\n _this._accordion.search(value);\r\n }\r\n // Else, see if we are rendering tiles\r\n else if (_this.IsTiles) {\r\n // Search the tiles\r\n _this._tiles.search(value);\r\n }\r\n else {\r\n // Search the data table\r\n _this._dt.search(value);\r\n }\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 className: header.className,\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 var className = (headerIsVisible || navIsVisible ? null : \"sub-nav-border\") +\r\n (navProps_2.className ? \" \" + navProps_2.className : \"\");\r\n new navigation_1.Navigation({\r\n el: this._props.el.querySelector(\"#sub-navigation\"),\r\n className: className,\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 // See if we are rendering an accordion\r\n if (_this.IsAccordion) {\r\n // Search the accordion\r\n _this._accordion.search(value);\r\n }\r\n // Else, see if we are rendering tiles\r\n else if (_this.IsTiles) {\r\n // Search the tiles\r\n _this._tiles.search(value);\r\n }\r\n else {\r\n // Search the data table\r\n _this._dt.search(value);\r\n }\r\n },\r\n onShowFilter: function () {\r\n // Show the filter\r\n _this._filters.show();\r\n },\r\n });\r\n }\r\n // See if we are rendering an accordion\r\n if (this.IsAccordion) {\r\n // Render the accordion\r\n this._accordion = new accordion_1.Accordion(__assign({ el: this._props.el.querySelector(\"#accordion\") }, this._props.accordion));\r\n }\r\n // Else, see if we are rendering tiles\r\n else if (this.IsTiles) {\r\n // Render the tiles\r\n this._tiles = new tiles_1.Tiles(__assign({ el: this._props.el.querySelector(\"#tiles\") }, this._props.tiles));\r\n }\r\n else {\r\n // Render the data table\r\n this._dt = new table_1.DataTable(__assign({ el: this._props.el.querySelector(\"#datatable\") }, this._props.table));\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 className: \"bg-sharepoint rounded-bottom\" + (footer.className ? \" \" + footer.className : \"\"),\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 // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Filter the accordion\r\n this._accordion.filter(value);\r\n }\r\n // Else, see if we are rendering tiles\r\n else if (this.IsTiles) {\r\n // Filter the tiles\r\n this._tiles.filter(value);\r\n }\r\n else {\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 };\r\n // Filter the accordion\r\n Dashboard.prototype.filterAccordion = function (values, useAndOperator) {\r\n if (useAndOperator === void 0) { useAndOperator = false; }\r\n // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Filter the accordion\r\n this._accordion.filter(typeof (values) === \"string\" ? [values] : values, useAndOperator);\r\n }\r\n };\r\n // Filter the table by multiple values\r\n Dashboard.prototype.filterMulti = function (idx, values, exactMatchFl) {\r\n // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Filter the accordion\r\n this._accordion.filter(values);\r\n }\r\n // Else, see if we have tiles\r\n else if (this.IsTiles) {\r\n // Filter the tiles\r\n this._tiles.filter(values);\r\n }\r\n else {\r\n // Filter the table\r\n exactMatchFl && values.length > 0 ? this._dt.filterMultiExact(idx, values) : this._dt.filterMulti(idx, values);\r\n }\r\n };\r\n // Filter the tiles\r\n Dashboard.prototype.filterTiles = function (values, useAndOperator) {\r\n if (useAndOperator === void 0) { useAndOperator = false; }\r\n // See if we have tiles\r\n if (this.IsTiles) {\r\n // Filter the tiles\r\n this._tiles.filter(typeof (values) === \"string\" ? [values] : values, useAndOperator);\r\n }\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 // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Refresh the table\r\n this._accordion.refresh(rows);\r\n }\r\n // Else, see if we have tiles\r\n else if (this.IsTiles) {\r\n // Refresh the table\r\n this._tiles.refresh(rows);\r\n }\r\n else {\r\n // Refresh the table\r\n this._dt.refresh(rows);\r\n }\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 // See if we have an accordion\r\n if (this.IsAccordion) {\r\n // Search the accordion\r\n this._accordion.search(value);\r\n }\r\n // Else, see if we have tiles\r\n else if (this.IsTiles) {\r\n // Search the tiles\r\n this._tiles.search(value);\r\n }\r\n else {\r\n // Search the table\r\n this._dt.search(value);\r\n }\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?");
229
229
 
230
230
  /***/ }),
231
231
 
@@ -247,7 +247,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
247
247
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
248
248
 
249
249
  "use strict";
250
- 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.13.85/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@2.2.1/node_modules/datatables.net/js/dataTables.min.js\");\r\n__webpack_require__(/*! datatables.net-bs5 */ \"./node_modules/.pnpm/datatables.net-bs5@2.2.1/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 // Set the default properties\r\n this._props.dtProps = this._props.dtProps || {\r\n drawCallback: function (settings) {\r\n var api = new $.fn.dataTable.Api(settings);\r\n // Styling option for striped rows\r\n $(api.context[0].nTable).addClass('table-striped');\r\n // Align the text to be centered\r\n $(api.context[0].nTableWrapper).find('.dt-info').parent().removeClass('col-md d-md-flex justify-content-between align-items-center');\r\n $(api.context[0].nTableWrapper).find('.dt-info').addClass('text-center');\r\n // Remove the label spacing to align with paging\r\n $(api.context[0].nTableWrapper).find('.dt-length label').addClass('d-none');\r\n // Push paging to the end\r\n $(api.context[0].nTableWrapper).find('.dt-paging').addClass('d-flex justify-content-end mx-0 px-0');\r\n // Add spacing for the footer\r\n $(api.context[0].nTableWrapper).find('.row:last-child').addClass('mb-1');\r\n },\r\n language: {\r\n lengthMenu: \"_MENU_\",\r\n paginate: {\r\n first: \"First\",\r\n last: \"Last\",\r\n next: \"Next\",\r\n previous: \"Previous\"\r\n }\r\n },\r\n layout: {\r\n top: null,\r\n topStart: null,\r\n topEnd: null,\r\n bottom: \"info\",\r\n bottomStart: \"pageLength\",\r\n bottomEnd: {\r\n paging: {\r\n type: \"full_numbers\"\r\n }\r\n }\r\n }\r\n };\r\n // Render the table\r\n this.refresh(props.rows);\r\n }\r\n // Adds a row to the table\r\n DataTable.prototype.addRow = function (row) {\r\n // See if this is an array\r\n if (row && typeof (row.length) === \"number\") {\r\n // Add the row\r\n this._datatable.row.add(row).draw(false);\r\n }\r\n else {\r\n var newRow = [];\r\n // Parse the columns\r\n for (var i = 0; i < this._props.columns.length; i++) {\r\n var column = this._props.columns[i];\r\n // Append the value\r\n newRow.push(row[column.name] || \"\");\r\n }\r\n // Add the row\r\n this._datatable.row.add(newRow).draw(false);\r\n }\r\n };\r\n // Applies the datatables.net plugin\r\n DataTable.prototype.applyPlugin = function (table) {\r\n var _this = this;\r\n // Call the rendering event\r\n this._props.dtProps = this._props.onRendering ? this._props.onRendering(this._props.dtProps) : this._props.dtProps;\r\n // Render the datatable\r\n this._datatable = $(table.el).DataTable(this._props.dtProps);\r\n // Call the rendered event in a separate thread to ensure the dashboard object is created\r\n setTimeout(function () {\r\n _this._props.onRendered ? _this._props.onRendered(_this._props.el, _this._datatable) : null;\r\n }, 50);\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 className: this._props.className,\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?");
250
+ 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.13.85/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@2.2.1/node_modules/datatables.net/js/dataTables.min.js\");\r\n__webpack_require__(/*! datatables.net-bs5 */ \"./node_modules/.pnpm/datatables.net-bs5@2.2.1/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 // Set the default properties\r\n this._props.dtProps = this._props.dtProps || {\r\n drawCallback: function (settings) {\r\n var api = new $.fn.dataTable.Api(settings);\r\n // Styling option for striped rows\r\n $(api.context[0].nTable).addClass('table-striped');\r\n // Align the text to be centered\r\n $(api.context[0].nTableWrapper).find('.dt-info').parent().removeClass('col-md d-md-flex justify-content-between align-items-center');\r\n $(api.context[0].nTableWrapper).find('.dt-info').addClass('text-center');\r\n // Remove the label spacing to align with paging\r\n $(api.context[0].nTableWrapper).find('.dt-length label').addClass('d-none');\r\n // Push paging to the end\r\n $(api.context[0].nTableWrapper).find('.dt-paging').addClass('d-flex justify-content-end mx-0 px-0');\r\n // Add spacing for the footer\r\n $(api.context[0].nTableWrapper).find('.row:last-child').addClass('mb-1');\r\n },\r\n language: {\r\n lengthMenu: \"_MENU_\",\r\n paginate: {\r\n first: \"First\",\r\n last: \"Last\",\r\n next: \"Next\",\r\n previous: \"Previous\"\r\n }\r\n },\r\n layout: {\r\n top: null,\r\n topStart: null,\r\n topEnd: null,\r\n bottom: \"info\",\r\n bottomStart: \"pageLength\",\r\n bottomEnd: {\r\n paging: {\r\n type: \"full_numbers\"\r\n }\r\n }\r\n }\r\n };\r\n // Render the table\r\n this.refresh(props.rows);\r\n }\r\n // Adds a row to the table\r\n DataTable.prototype.addRow = function (row) {\r\n // See if this is an array\r\n if (row && typeof (row.length) === \"number\") {\r\n // Add the row\r\n this._datatable.row.add(row).draw(false);\r\n }\r\n else {\r\n var newRow = [];\r\n // Parse the columns\r\n for (var i = 0; i < this._props.columns.length; i++) {\r\n var column = this._props.columns[i];\r\n // Append the value\r\n newRow.push(row[column.name] || \"\");\r\n }\r\n // Add the row\r\n this._datatable.row.add(newRow).draw(false);\r\n }\r\n };\r\n // Applies the datatables.net plugin\r\n DataTable.prototype.applyPlugin = function (table) {\r\n var _this = this;\r\n // Call the rendering event\r\n this._props.dtProps = this._props.onRendering ? this._props.onRendering(this._props.dtProps) : this._props.dtProps;\r\n // Render the datatable\r\n this._datatable = $(table.el).DataTable(this._props.dtProps);\r\n // Call the rendered event in a separate thread to ensure the dashboard object is created\r\n setTimeout(function () {\r\n _this._props.onRendered ? _this._props.onRendered(_this._props.el, _this._datatable) : null;\r\n }, 50);\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 // Filters multiple values against the status\r\n DataTable.prototype.filterMultiExact = 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._datatable.column(idx).search(\"^(\" + values.join('|') + \")$\", true, false).draw();\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 className: this._props.className,\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?");
251
251
 
252
252
  /***/ }),
253
253