dattatable 1.7.6 → 1.7.9

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 (41) hide show
  1. package/build/common/canvas.js +3 -0
  2. package/build/common/modal.js +10 -0
  3. package/build/dashboard/table.d.ts +1 -1
  4. package/build/dashboard/table.js +1 -0
  5. package/build/itemForm.d.ts +28 -3
  6. package/build/itemForm.js +284 -151
  7. package/build/styles.js +1 -1
  8. package/dist/dattatable.js +663 -663
  9. package/dist/dattatable.min.js +1 -1
  10. package/docs/assets/search.js +1 -1
  11. package/docs/classes/CanvasForm.html +1 -1
  12. package/docs/classes/Dashboard.html +2 -2
  13. package/docs/classes/DataTable.html +2 -2
  14. package/docs/classes/Documents.html +5 -5
  15. package/docs/classes/FilterSlideout.html +1 -1
  16. package/docs/classes/Footer.html +1 -1
  17. package/docs/classes/Header.html +1 -1
  18. package/docs/classes/InstallationRequired.html +1 -1
  19. package/docs/classes/ItemForm.html +4 -4
  20. package/docs/classes/LoadingDialog.html +1 -1
  21. package/docs/classes/Modal.html +1 -1
  22. package/docs/classes/Navigation.html +1 -1
  23. package/docs/enums/ActionButtonTypes.html +1 -1
  24. package/docs/index.html +3 -2
  25. package/docs/interfaces/IDashboardProps.html +1 -1
  26. package/docs/interfaces/IDataTable.html +1 -1
  27. package/docs/interfaces/IDataTableProps.html +1 -1
  28. package/docs/interfaces/IDocumentsProps.html +1 -1
  29. package/docs/interfaces/IFilterItem.html +1 -1
  30. package/docs/interfaces/IFilterProps.html +1 -1
  31. package/docs/interfaces/IFooterProps.html +1 -1
  32. package/docs/interfaces/IHeaderProps.html +1 -1
  33. package/docs/interfaces/IItemFormCreateProps.html +1 -1
  34. package/docs/interfaces/IItemFormEditProps.html +1 -1
  35. package/docs/interfaces/IItemFormTab.html +3 -0
  36. package/docs/interfaces/IItemFormTabInfo.html +3 -0
  37. package/docs/interfaces/IItemFormViewProps.html +1 -1
  38. package/docs/interfaces/IShowDialogProps.html +1 -1
  39. package/docs/modules.html +1 -1
  40. package/package.json +4 -4
  41. package/pnpm-lock.yaml +94 -72
@@ -26,6 +26,9 @@ var CanvasForm = /** @class */ (function () {
26
26
  // Clear the header and body
27
27
  this.setHeader("");
28
28
  this.setBody("");
29
+ // Set the default properties
30
+ this.setAutoClose(true);
31
+ this.setType(gd_sprest_bs_1.Components.OffcanvasTypes.End);
29
32
  };
30
33
  Object.defineProperty(CanvasForm, "el", {
31
34
  // Element
@@ -32,6 +32,16 @@ var Modal = /** @class */ (function () {
32
32
  this.setHeader("");
33
33
  this.setBody("");
34
34
  this.setFooter("");
35
+ // Set the default properties
36
+ this.setAutoClose(false);
37
+ this.setBackdrop(true);
38
+ this.setCloseButtonVisibility(true);
39
+ this.setCloseEvent(null);
40
+ this.setFocus(false);
41
+ this.setIsCentered(true);
42
+ this.setKeyboard(true);
43
+ this.setScrollable(false);
44
+ this.setType(gd_sprest_bs_1.Components.ModalTypes.Large);
35
45
  };
36
46
  // Hides the modal
37
47
  Modal.hide = function () { this._modal.hide(); };
@@ -33,6 +33,6 @@ export declare class DataTable implements IDataTable {
33
33
  get datatable(): any;
34
34
  get el(): HTMLElement;
35
35
  filter(idx: number, value?: string): void;
36
- refresh(rows: any[]): void;
36
+ refresh(rows?: any[]): void;
37
37
  search(value?: string): void;
38
38
  }
@@ -47,6 +47,7 @@ var DataTable = /** @class */ (function () {
47
47
  };
48
48
  // Method to reload the data
49
49
  DataTable.prototype.refresh = function (rows) {
50
+ if (rows === void 0) { rows = []; }
50
51
  // See if the datatable exists
51
52
  if (this._datatable != null) {
52
53
  // Clear the datatable
@@ -1,6 +1,19 @@
1
1
  import { Components, Helper } from "gd-sprest-bs";
2
+ /** Tab */
3
+ export interface IItemFormTab {
4
+ title: string;
5
+ fields: string[];
6
+ onRendered: (el?: HTMLElement, item?: Components.IListGroupItem) => void;
7
+ onRendering: (item?: Components.IListGroupItem) => any;
8
+ }
9
+ /** Tab Information */
10
+ export interface IItemFormTabInfo {
11
+ isVertical?: boolean;
12
+ tabs: IItemFormTab[];
13
+ }
2
14
  /** Create Item Properties */
3
15
  export interface IItemFormCreateProps {
16
+ info?: Helper.IListFormResult;
4
17
  onCreateEditForm?: (props: Components.IListFormEditProps) => Components.IListFormEditProps;
5
18
  onFormButtonsRendering?: (buttons: Components.IButtonProps[]) => Components.IButtonProps[];
6
19
  onGetListInfo?: (props: Helper.IListFormProps) => Helper.IListFormProps;
@@ -9,11 +22,13 @@ export interface IItemFormCreateProps {
9
22
  onSetHeader?: (el: HTMLElement) => void;
10
23
  onUpdate?: (item?: any) => void;
11
24
  onValidation?: (values?: any) => boolean | PromiseLike<boolean>;
25
+ tabInfo?: IItemFormTabInfo;
12
26
  useModal?: boolean;
13
27
  webUrl?: string;
14
28
  }
15
29
  /** Edit Item Properties */
16
30
  export interface IItemFormEditProps {
31
+ info?: Helper.IListFormResult;
17
32
  itemId: number;
18
33
  onCreateEditForm?: (props: Components.IListFormEditProps) => Components.IListFormEditProps;
19
34
  onFormButtonsRendering?: (buttons: Components.IButtonProps[]) => Components.IButtonProps[];
@@ -23,17 +38,20 @@ export interface IItemFormEditProps {
23
38
  onSetHeader?: (el: HTMLElement) => void;
24
39
  onUpdate?: (item?: any) => void;
25
40
  onValidation?: (values?: any) => boolean | PromiseLike<boolean>;
41
+ tabInfo?: IItemFormTabInfo;
26
42
  useModal?: boolean;
27
43
  webUrl?: string;
28
44
  }
29
45
  /** View Item Properties */
30
46
  export interface IItemFormViewProps {
47
+ info?: Helper.IListFormResult;
31
48
  itemId: number;
32
49
  onCreateViewForm?: (props: Components.IListFormDisplayProps) => Components.IListFormDisplayProps;
33
50
  onFormButtonsRendering?: (buttons: Components.IButtonProps[]) => Components.IButtonProps[];
34
51
  onGetListInfo?: (props: Helper.IListFormProps) => Helper.IListFormProps;
35
52
  onSetFooter?: (el: HTMLElement) => void;
36
53
  onSetHeader?: (el: HTMLElement) => void;
54
+ tabInfo?: IItemFormTabInfo;
37
55
  useModal?: boolean;
38
56
  webUrl?: string;
39
57
  }
@@ -49,11 +67,12 @@ export declare class ItemForm {
49
67
  private static _onSetHeader?;
50
68
  private static _onSave;
51
69
  private static _onValidation;
70
+ private static _tabInfo;
52
71
  private static _updateEvent;
53
72
  static set AutoClose(value: boolean);
54
- private static _displayForm;
73
+ private static _displayForms;
55
74
  static get DisplayForm(): Components.IListFormDisplay;
56
- private static _editForm;
75
+ private static _editForms;
57
76
  static get EditForm(): Components.IListFormEdit;
58
77
  private static _info;
59
78
  static get FormInfo(): Helper.IListFormResult;
@@ -71,9 +90,15 @@ export declare class ItemForm {
71
90
  static close(): void;
72
91
  static create(props?: IItemFormCreateProps): void;
73
92
  static edit(props: IItemFormEditProps): void;
93
+ static loadFormInfo(props: Helper.IListFormProps): PromiseLike<void>;
74
94
  static view(props: IItemFormViewProps): void;
75
- /** private static Methods */
95
+ /** Private Methods */
76
96
  private static load;
97
+ private static renderDisplayForm;
98
+ private static renderEditForm;
99
+ private static renderFooter;
100
+ private static renderForm;
101
+ private static renderTabs;
77
102
  static save(form?: Components.IListFormEdit): void;
78
103
  private static validate;
79
104
  }