dattatable 1.4.3 → 1.4.7

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 (36) hide show
  1. package/build/common/installRequired.d.ts +8 -2
  2. package/build/common/installRequired.js +7 -2
  3. package/build/dashboard/index.d.ts +2 -0
  4. package/build/dashboard/navigation.js +3 -2
  5. package/dist/dattatable.js +417 -417
  6. package/dist/dattatable.min.js +1 -1
  7. package/docs/assets/search.js +1 -1
  8. package/docs/classes/CanvasForm.html +1 -1
  9. package/docs/classes/Dashboard.html +2 -2
  10. package/docs/classes/DataTable.html +2 -2
  11. package/docs/classes/Documents.html +5 -5
  12. package/docs/classes/FilterSlideout.html +1 -1
  13. package/docs/classes/Footer.html +1 -1
  14. package/docs/classes/Header.html +1 -1
  15. package/docs/classes/InstallationRequired.html +1 -1
  16. package/docs/classes/ItemForm.html +3 -3
  17. package/docs/classes/LoadingDialog.html +1 -1
  18. package/docs/classes/Modal.html +1 -1
  19. package/docs/classes/Navigation.html +1 -1
  20. package/docs/enums/ActionButtonTypes.html +1 -1
  21. package/docs/index.html +1 -1
  22. package/docs/interfaces/IDashboardProps.html +1 -1
  23. package/docs/interfaces/IDataTable.html +1 -1
  24. package/docs/interfaces/IDataTableProps.html +1 -1
  25. package/docs/interfaces/IDocumentsProps.html +1 -1
  26. package/docs/interfaces/IFilterItem.html +1 -1
  27. package/docs/interfaces/IFilterProps.html +1 -1
  28. package/docs/interfaces/IFooterProps.html +1 -1
  29. package/docs/interfaces/IHeaderProps.html +1 -1
  30. package/docs/interfaces/IItemFormCreateProps.html +1 -1
  31. package/docs/interfaces/IItemFormEditProps.html +1 -1
  32. package/docs/interfaces/IItemFormViewProps.html +1 -1
  33. package/docs/interfaces/IShowDialogProps.html +1 -0
  34. package/docs/modules.html +1 -1
  35. package/package.json +2 -2
  36. package/pnpm-lock.yaml +7 -7
@@ -1,4 +1,10 @@
1
- import { Helper } from "gd-sprest-bs";
1
+ import { Components, Helper } from "gd-sprest-bs";
2
+ export interface IShowDialogProps {
3
+ errors?: Components.IListGroupItem[];
4
+ onHeaderRendered?(el: HTMLElement): any;
5
+ onBodyRendered?(el: HTMLElement): any;
6
+ onFooterRendered?(el: HTMLElement): any;
7
+ }
2
8
  /**
3
9
  * Installation Required
4
10
  * Checks the SharePoint configuration file to see if an install is required.
@@ -8,5 +14,5 @@ export declare class InstallationRequired {
8
14
  private static _report;
9
15
  private static checkLists;
10
16
  static requiresInstall(cfg: Helper.ISPConfig): PromiseLike<boolean>;
11
- static showDialog(): void;
17
+ static showDialog(props?: IShowDialogProps): void;
12
18
  }
@@ -78,8 +78,9 @@ var InstallationRequired = /** @class */ (function () {
78
78
  });
79
79
  });
80
80
  };
81
- InstallationRequired.showDialog = function () {
81
+ InstallationRequired.showDialog = function (props) {
82
82
  var _this = this;
83
+ if (props === void 0) { props = {}; }
83
84
  // Set the header
84
85
  modal_1.Modal.setHeader("Installation Required");
85
86
  // Set the body
@@ -90,7 +91,7 @@ var InstallationRequired = /** @class */ (function () {
90
91
  },
91
92
  {
92
93
  onRender: function (el) {
93
- var items = [];
94
+ var items = props.errors || [];
94
95
  // Parse the report
95
96
  for (var i = 0; i < _this._report.length; i++) {
96
97
  // Add the item
@@ -150,6 +151,10 @@ var InstallationRequired = /** @class */ (function () {
150
151
  }
151
152
  }
152
153
  }).el);
154
+ // Call the events
155
+ props.onHeaderRendered ? props.onHeaderRendered(modal_1.Modal.HeaderElement) : null;
156
+ props.onBodyRendered ? props.onBodyRendered(modal_1.Modal.BodyElement) : null;
157
+ props.onFooterRendered ? props.onFooterRendered(modal_1.Modal.FooterElement) : null;
153
158
  // Show the modal
154
159
  modal_1.Modal.show();
155
160
  };
@@ -48,6 +48,8 @@ export interface IDashboardProps {
48
48
  onFilterRendered?: (el: HTMLElement) => void;
49
49
  onRendering?: (props: Components.INavbarProps) => void;
50
50
  onRendered?: (el?: HTMLElement) => void;
51
+ onSearchRendered?: (el: HTMLElement) => void;
52
+ onShowFilter?: () => void;
51
53
  };
52
54
  table?: {
53
55
  columns: Components.ITableColumn[];
@@ -56,11 +56,12 @@ var Navigation = /** @class */ (function () {
56
56
  type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary
57
57
  },
58
58
  });
59
- // Call the events
60
- this._props.onSearchRendered ? this._props.onSearchRendered(this._props.el.querySelector("input[type='search']")) : null;
59
+ // Call the event
61
60
  this._props.onShowFilter ? ttp.el.addEventListener("click", this._props.onShowFilter) : null;
62
61
  this._props.onFilterRendered ? this._props.onFilterRendered(this._props.el) : null;
63
62
  }
63
+ // Call the event
64
+ this._props.onSearchRendered ? this._props.onSearchRendered(this._props.el.querySelector("input[type='search']")) : null;
64
65
  };
65
66
  return Navigation;
66
67
  }());