dattatable 2.10.26 → 2.10.27

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 (59) hide show
  1. package/build/dashboard/table.js +38 -0
  2. package/dist/dattatable.js +1 -1
  3. package/dist/dattatable.min.js +1 -1
  4. package/docs/classes/Accordion.html +2 -2
  5. package/docs/classes/AuditLog.html +2 -2
  6. package/docs/classes/CanvasForm.html +2 -2
  7. package/docs/classes/Comments.html +2 -2
  8. package/docs/classes/Dashboard.html +4 -4
  9. package/docs/classes/DataTable.html +3 -3
  10. package/docs/classes/Documents.html +6 -6
  11. package/docs/classes/FilterSlideout.html +2 -2
  12. package/docs/classes/Footer.html +2 -2
  13. package/docs/classes/Header.html +2 -2
  14. package/docs/classes/InstallationRequired.html +2 -2
  15. package/docs/classes/ItemForm.html +4 -4
  16. package/docs/classes/List.html +4 -4
  17. package/docs/classes/ListSecurity.html +2 -2
  18. package/docs/classes/LoadingDialog.html +2 -2
  19. package/docs/classes/Modal.html +2 -2
  20. package/docs/classes/Navigation.html +3 -3
  21. package/docs/classes/Tiles.html +2 -2
  22. package/docs/classes/Timeout.html +2 -2
  23. package/docs/enums/ActionButtonTypes.html +2 -2
  24. package/docs/functions/formatBytes.html +1 -1
  25. package/docs/functions/formatDateValue.html +1 -1
  26. package/docs/functions/formatTimeValue.html +1 -1
  27. package/docs/functions/getContextInfo.html +1 -1
  28. package/docs/functions/getFileExt.html +1 -1
  29. package/docs/functions/waitForTheme.html +1 -1
  30. package/docs/interfaces/IAccordion.html +2 -2
  31. package/docs/interfaces/IAccordionProps.html +2 -2
  32. package/docs/interfaces/IAuditLogItem.html +2 -2
  33. package/docs/interfaces/IAuditLogItemCreation.html +2 -2
  34. package/docs/interfaces/IAuditLogProps.html +2 -2
  35. package/docs/interfaces/IAuditLogViewProps.html +2 -2
  36. package/docs/interfaces/ICommentsItem.html +2 -2
  37. package/docs/interfaces/IDashboardProps.html +2 -2
  38. package/docs/interfaces/IDataTable.html +2 -2
  39. package/docs/interfaces/IDataTableProps.html +2 -2
  40. package/docs/interfaces/IDocumentsProps.html +2 -2
  41. package/docs/interfaces/IFilterItem.html +2 -2
  42. package/docs/interfaces/IFilterProps.html +2 -2
  43. package/docs/interfaces/IFooterProps.html +2 -2
  44. package/docs/interfaces/IHeaderProps.html +2 -2
  45. package/docs/interfaces/IInstallProps.html +2 -2
  46. package/docs/interfaces/IItemFormCreateProps.html +2 -2
  47. package/docs/interfaces/IItemFormEditProps.html +2 -2
  48. package/docs/interfaces/IItemFormTab.html +2 -2
  49. package/docs/interfaces/IItemFormTabInfo.html +2 -2
  50. package/docs/interfaces/IItemFormViewProps.html +2 -2
  51. package/docs/interfaces/IListProps.html +2 -2
  52. package/docs/interfaces/IListSecurity.html +2 -2
  53. package/docs/interfaces/IListSecurityItem.html +2 -2
  54. package/docs/interfaces/IShowDialogProps.html +2 -2
  55. package/docs/interfaces/ITiles.html +2 -2
  56. package/docs/interfaces/ITilesProps.html +2 -2
  57. package/docs/variables/DattaTable.html +1 -1
  58. package/docs/variables/ListSecurityDefaultGroups.html +1 -1
  59. package/package.json +1 -1
@@ -16,6 +16,44 @@ var DataTable = /** @class */ (function () {
16
16
  this._props = null;
17
17
  // Save the properties
18
18
  this._props = props;
19
+ // Set the default properties
20
+ this._props.dtProps = this._props.dtProps || {
21
+ drawCallback: function (settings) {
22
+ var api = new $.fn.dataTable.Api(settings);
23
+ // Styling option for striped rows
24
+ $(api.context[0].nTable).addClass('table-striped');
25
+ // Align the text to be centered
26
+ $(api.context[0].nTableWrapper).find('.dt-info').parent().removeClass('col-md d-md-flex justify-content-between align-items-center');
27
+ $(api.context[0].nTableWrapper).find('.dt-info').addClass('text-center');
28
+ // Remove the label spacing to align with paging
29
+ $(api.context[0].nTableWrapper).find('.dt-length label').addClass('d-none');
30
+ // Push paging to the end
31
+ $(api.context[0].nTableWrapper).find('.dt-paging').addClass('d-flex justify-content-end mx-0 px-0');
32
+ // Add spacing for the footer
33
+ $(api.context[0].nTableWrapper).find('.row:last-child').addClass('mb-1');
34
+ },
35
+ language: {
36
+ lengthMenu: "_MENU_",
37
+ paginate: {
38
+ first: "First",
39
+ last: "Last",
40
+ next: "Next",
41
+ previous: "Previous"
42
+ }
43
+ },
44
+ layout: {
45
+ top: null,
46
+ topStart: null,
47
+ topEnd: null,
48
+ bottom: "info",
49
+ bottomStart: "pageLength",
50
+ bottomEnd: {
51
+ paging: {
52
+ type: "full_numbers"
53
+ }
54
+ }
55
+ }
56
+ };
19
57
  // Render the table
20
58
  this.refresh(props.rows);
21
59
  }
@@ -236,7 +236,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
236
236
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
237
237
 
238
238
  "use strict";
239
- 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.11.70/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.1.2/node_modules/datatables.net/js/dataTables.min.js\");\r\n__webpack_require__(/*! datatables.net-bs5 */ \"./node_modules/.pnpm/datatables.net-bs5@2.1.2/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 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 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?");
239
+ 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.11.70/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.1.2/node_modules/datatables.net/js/dataTables.min.js\");\r\n__webpack_require__(/*! datatables.net-bs5 */ \"./node_modules/.pnpm/datatables.net-bs5@2.1.2/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 // 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 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?");
240
240
 
241
241
  /***/ }),
242
242