dattatable 1.9.1 → 1.9.4

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 (39) hide show
  1. package/build/common/installRequired.d.ts +1 -0
  2. package/build/common/installRequired.js +14 -0
  3. package/build/dashboard/navigation.js +4 -15
  4. package/build/itemForm.d.ts +3 -3
  5. package/dist/dattatable.js +424 -424
  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/Comments.html +1 -1
  10. package/docs/classes/Dashboard.html +2 -2
  11. package/docs/classes/DataTable.html +2 -2
  12. package/docs/classes/Documents.html +5 -5
  13. package/docs/classes/FilterSlideout.html +1 -1
  14. package/docs/classes/Footer.html +1 -1
  15. package/docs/classes/Header.html +1 -1
  16. package/docs/classes/InstallationRequired.html +1 -1
  17. package/docs/classes/ItemForm.html +3 -3
  18. package/docs/classes/LoadingDialog.html +1 -1
  19. package/docs/classes/Modal.html +1 -1
  20. package/docs/classes/Navigation.html +1 -1
  21. package/docs/enums/ActionButtonTypes.html +1 -1
  22. package/docs/interfaces/ICommentsItem.html +1 -1
  23. package/docs/interfaces/IDashboardProps.html +1 -1
  24. package/docs/interfaces/IDataTable.html +1 -1
  25. package/docs/interfaces/IDataTableProps.html +1 -1
  26. package/docs/interfaces/IDocumentsProps.html +1 -1
  27. package/docs/interfaces/IFilterItem.html +1 -1
  28. package/docs/interfaces/IFilterProps.html +1 -1
  29. package/docs/interfaces/IFooterProps.html +1 -1
  30. package/docs/interfaces/IHeaderProps.html +1 -1
  31. package/docs/interfaces/IItemFormCreateProps.html +1 -1
  32. package/docs/interfaces/IItemFormEditProps.html +1 -1
  33. package/docs/interfaces/IItemFormTab.html +1 -1
  34. package/docs/interfaces/IItemFormTabInfo.html +1 -1
  35. package/docs/interfaces/IItemFormViewProps.html +1 -1
  36. package/docs/interfaces/IShowDialogProps.html +1 -1
  37. package/docs/modules.html +1 -1
  38. package/package.json +2 -2
  39. package/pnpm-lock.yaml +10 -10
@@ -20,4 +20,5 @@ export declare class InstallationRequired {
20
20
  private static checkLists;
21
21
  static requiresInstall(cfg: Helper.ISPConfig): PromiseLike<boolean>;
22
22
  static showDialog(props?: IShowDialogProps): void;
23
+ private static showErrorDialog;
23
24
  }
@@ -199,6 +199,12 @@ var InstallationRequired = /** @class */ (function () {
199
199
  if (props === void 0) { props = {}; }
200
200
  // Clear the modal
201
201
  modal_1.Modal.clear();
202
+ // Ensure the configuration exists
203
+ if (this._cfg == null || this._report == null) {
204
+ // Show the error dialog
205
+ this.showErrorDialog();
206
+ return;
207
+ }
202
208
  // Set the header
203
209
  modal_1.Modal.setHeader("Installation Required");
204
210
  // Set the body
@@ -274,6 +280,14 @@ var InstallationRequired = /** @class */ (function () {
274
280
  // Show the modal
275
281
  modal_1.Modal.show();
276
282
  };
283
+ InstallationRequired.showErrorDialog = function () {
284
+ // Set the header
285
+ modal_1.Modal.setHeader("Not Configured");
286
+ // Set the body
287
+ modal_1.Modal.setBody("The component has not been configured. The SPConfiguration definition hasn't been initialized.");
288
+ // Show the dialog
289
+ modal_1.Modal.show();
290
+ };
277
291
  InstallationRequired._cfg = null;
278
292
  InstallationRequired._report = null;
279
293
  // Custom Actions exists
@@ -19,7 +19,6 @@ var Navigation = /** @class */ (function () {
19
19
  }
20
20
  // Renders the component
21
21
  Navigation.prototype.render = function () {
22
- var _this = this;
23
22
  // Define the default props
24
23
  var props = {
25
24
  el: this._props.el,
@@ -36,22 +35,9 @@ var Navigation = /** @class */ (function () {
36
35
  };
37
36
  // Call the rendering event
38
37
  this._props.onRendering ? this._props.onRendering(props) : null;
39
- // Set the onRendered event
40
- var onRendered = this._props.onRendered;
41
- this._props.onRendered = function (el) {
42
- // See if we are showing the filter
43
- if (_this._props.hideFilter != true) {
44
- // Call the event
45
- _this._props.onShowFilter && ttp ? ttp.el.addEventListener("click", _this._props.onShowFilter) : null;
46
- _this._props.onFilterRendered ? _this._props.onFilterRendered(el) : null;
47
- }
48
- // Call the custom onRendered event
49
- onRendered ? onRendered(el) : null;
50
- };
51
38
  // Render a navbar
52
39
  var nav = gd_sprest_bs_1.Components.Navbar(props);
53
40
  // See if we are showing the filter
54
- var ttp = null;
55
41
  if (this._props.hideFilter != true) {
56
42
  // Render the filter icon
57
43
  // Create a span to wrap the icon in
@@ -59,7 +45,7 @@ var Navigation = /** @class */ (function () {
59
45
  span.className = "bg-white d-inline-flex filter-icon ms-2 rounded";
60
46
  nav.el.firstElementChild.appendChild(span);
61
47
  // Render a tooltip
62
- ttp = gd_sprest_bs_1.Components.Tooltip({
48
+ var ttp = gd_sprest_bs_1.Components.Tooltip({
63
49
  el: span,
64
50
  content: "Filters",
65
51
  type: gd_sprest_bs_1.Components.TooltipTypes.Secondary,
@@ -70,6 +56,9 @@ var Navigation = /** @class */ (function () {
70
56
  type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary
71
57
  },
72
58
  });
59
+ // Call the event
60
+ this._props.onShowFilter && ttp ? ttp.el.addEventListener("click", this._props.onShowFilter) : null;
61
+ this._props.onFilterRendered ? this._props.onFilterRendered(span) : null;
73
62
  }
74
63
  // Call the event
75
64
  this._props.onSearchRendered ? this._props.onSearchRendered(this._props.el.querySelector("input[type='search']")) : null;
@@ -4,7 +4,7 @@ export interface IItemFormTab {
4
4
  title: string;
5
5
  fields: string[];
6
6
  onRendered?: (el?: HTMLElement, item?: Components.IListGroupItem) => void;
7
- onRendering?: (item?: Components.IListGroupItem) => any;
7
+ onRendering?: (item?: Components.IListGroupItem) => object;
8
8
  }
9
9
  /** Tab Information */
10
10
  export interface IItemFormTabInfo {
@@ -17,7 +17,7 @@ export interface IItemFormCreateProps {
17
17
  onCreateEditForm?: (props: Components.IListFormEditProps) => Components.IListFormEditProps;
18
18
  onFormButtonsRendering?: (buttons: Components.IButtonProps[]) => Components.IButtonProps[];
19
19
  onGetListInfo?: (props: Helper.IListFormProps) => Helper.IListFormProps;
20
- onSave?: (values: any) => any | PromiseLike<any>;
20
+ onSave?: (values: any) => object | PromiseLike<object>;
21
21
  onSetFooter?: (el: HTMLElement) => void;
22
22
  onSetHeader?: (el: HTMLElement) => void;
23
23
  onUpdate?: (item?: any) => void;
@@ -33,7 +33,7 @@ export interface IItemFormEditProps {
33
33
  onCreateEditForm?: (props: Components.IListFormEditProps) => Components.IListFormEditProps;
34
34
  onFormButtonsRendering?: (buttons: Components.IButtonProps[]) => Components.IButtonProps[];
35
35
  onGetListInfo?: (props: Helper.IListFormProps) => Helper.IListFormProps;
36
- onSave?: (values: any) => any | PromiseLike<any>;
36
+ onSave?: (values: any) => object | PromiseLike<object>;
37
37
  onSetFooter?: (el: HTMLElement) => void;
38
38
  onSetHeader?: (el: HTMLElement) => void;
39
39
  onUpdate?: (item?: any) => void;