dattatable 2.9.48 → 2.9.50

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 (64) hide show
  1. package/build/dashboard/index.d.ts +3 -0
  2. package/build/dashboard/index.js +1 -7
  3. package/build/dashboard/tiles.d.ts +3 -0
  4. package/build/dashboard/tiles.js +8 -1
  5. package/dist/dattatable.js +457 -457
  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 +3 -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/ListSecurity.html +2 -2
  22. package/docs/classes/LoadingDialog.html +2 -2
  23. package/docs/classes/Modal.html +2 -2
  24. package/docs/classes/Navigation.html +3 -3
  25. package/docs/classes/Tiles.html +2 -2
  26. package/docs/classes/Timeout.html +2 -2
  27. package/docs/enums/ActionButtonTypes.html +2 -2
  28. package/docs/functions/formatBytes.html +1 -1
  29. package/docs/functions/formatDateValue.html +1 -1
  30. package/docs/functions/formatTimeValue.html +1 -1
  31. package/docs/functions/getContextInfo.html +1 -1
  32. package/docs/functions/getFileExt.html +1 -1
  33. package/docs/functions/waitForTheme.html +1 -1
  34. package/docs/interfaces/IAccordion.html +2 -2
  35. package/docs/interfaces/IAccordionProps.html +2 -2
  36. package/docs/interfaces/IAuditLogItem.html +2 -2
  37. package/docs/interfaces/IAuditLogItemCreation.html +2 -2
  38. package/docs/interfaces/IAuditLogProps.html +2 -2
  39. package/docs/interfaces/IAuditLogViewProps.html +2 -2
  40. package/docs/interfaces/ICommentsItem.html +2 -2
  41. package/docs/interfaces/IDashboardProps.html +2 -2
  42. package/docs/interfaces/IDataTable.html +2 -2
  43. package/docs/interfaces/IDataTableProps.html +2 -2
  44. package/docs/interfaces/IDocumentsProps.html +2 -2
  45. package/docs/interfaces/IFilterItem.html +2 -2
  46. package/docs/interfaces/IFilterProps.html +2 -2
  47. package/docs/interfaces/IFooterProps.html +2 -2
  48. package/docs/interfaces/IHeaderProps.html +2 -2
  49. package/docs/interfaces/IInstallProps.html +2 -2
  50. package/docs/interfaces/IItemFormCreateProps.html +2 -2
  51. package/docs/interfaces/IItemFormEditProps.html +2 -2
  52. package/docs/interfaces/IItemFormTab.html +2 -2
  53. package/docs/interfaces/IItemFormTabInfo.html +2 -2
  54. package/docs/interfaces/IItemFormViewProps.html +2 -2
  55. package/docs/interfaces/IListProps.html +2 -2
  56. package/docs/interfaces/IListSecurity.html +2 -2
  57. package/docs/interfaces/IListSecurityItem.html +2 -2
  58. package/docs/interfaces/IShowDialogProps.html +2 -2
  59. package/docs/interfaces/ITiles.html +2 -2
  60. package/docs/interfaces/ITilesProps.html +5 -2
  61. package/docs/variables/DattaTable.html +1 -1
  62. package/docs/variables/ListSecurityDefaultGroups.html +1 -1
  63. package/package.json +54 -54
  64. package/pnpm-lock.yaml +7 -7
@@ -75,7 +75,10 @@ export interface IDashboardProps {
75
75
  bodyField?: string;
76
76
  filterField?: string;
77
77
  items: any[];
78
+ onBodyRender?: (el?: HTMLElement, item?: any) => void;
78
79
  onCardRender?: (el?: HTMLElement, item?: any) => void;
80
+ onSubTitleRender?: (el?: HTMLElement, item?: any) => void;
81
+ onTitleRender?: (el?: HTMLElement, item?: any) => void;
79
82
  paginationLimit?: number;
80
83
  subTitleField?: string;
81
84
  titleField?: string;
@@ -274,13 +274,7 @@ var Dashboard = /** @class */ (function () {
274
274
  }
275
275
  else {
276
276
  // Render the data table
277
- this._dt = new table_1.DataTable({
278
- columns: this._props.table ? this._props.table.columns : null,
279
- dtProps: this._props.table ? this._props.table.dtProps : null,
280
- el: this._props.el.querySelector("#datatable"),
281
- onRendered: this._props.table ? this._props.table.onRendered : null,
282
- rows: this._props.table ? this._props.table.rows : null
283
- });
277
+ this._dt = new table_1.DataTable(__assign({ el: this._props.el.querySelector("#datatable") }, this._props.table));
284
278
  }
285
279
  // See if we are hiding the footer
286
280
  if (this._props.hideFooter) {
@@ -7,7 +7,10 @@ export interface ITilesProps {
7
7
  el: HTMLElement;
8
8
  filterField?: string;
9
9
  items: any[];
10
+ onBodyRender?: (el?: HTMLElement, item?: any) => void;
10
11
  onCardRender?: (el?: HTMLElement, item?: any) => void;
12
+ onSubTitleRender?: (el?: HTMLElement, item?: any) => void;
13
+ onTitleRender?: (el?: HTMLElement, item?: any) => void;
11
14
  paginationLimit?: number;
12
15
  subTitleField?: string;
13
16
  titleField?: string;
@@ -40,6 +40,7 @@ var Tiles = /** @class */ (function () {
40
40
  };
41
41
  // Renders the tiles
42
42
  Tiles.prototype.renderTiles = function () {
43
+ var _this = this;
43
44
  // Parse the items
44
45
  var cards = [];
45
46
  for (var i = 0; i < this._props.items.length; i++) {
@@ -67,7 +68,13 @@ var Tiles = /** @class */ (function () {
67
68
  data: filters,
68
69
  subTitle: item[this._props.subTitleField] || "",
69
70
  title: item[this._props.titleField || "Title"] || "",
70
- onRender: this._props.onCardRender
71
+ onRender: function (el) {
72
+ // Call the events
73
+ _this._props.onBodyRender ? _this._props.onBodyRender(el.querySelector(".card-text")) : null;
74
+ _this._props.onCardRender ? _this._props.onCardRender(el.querySelector(".card-body")) : null;
75
+ _this._props.onSubTitleRender ? _this._props.onSubTitleRender(el.querySelector(".card-subtitle")) : null;
76
+ _this._props.onTitleRender ? _this._props.onTitleRender(el.querySelector(".card-title")) : null;
77
+ }
71
78
  }]
72
79
  });
73
80
  }