dattatable 2.0.0 → 2.0.3

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/canvas.d.ts +2 -1
  2. package/build/common/canvas.js +3 -0
  3. package/build/itemForm.d.ts +3 -0
  4. package/build/itemForm.js +15 -1
  5. package/dist/dattatable.js +1295 -1184
  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 +5 -5
  39. package/pnpm-lock.yaml +638 -524
@@ -15,6 +15,7 @@ export declare class CanvasForm {
15
15
  static setAutoClose(value: boolean): void;
16
16
  static setBody(content: any): void;
17
17
  static setHeader(content: any): void;
18
- static setType(type: any): void;
18
+ static setSize(size: number): void;
19
+ static setType(type: number): void;
19
20
  static show(): void;
20
21
  }
@@ -28,6 +28,7 @@ var CanvasForm = /** @class */ (function () {
28
28
  this.setBody("");
29
29
  // Set the default properties
30
30
  this.setAutoClose(true);
31
+ this.setSize(0);
31
32
  this.setType(gd_sprest_bs_1.Components.OffcanvasTypes.End);
32
33
  };
33
34
  Object.defineProperty(CanvasForm, "el", {
@@ -110,6 +111,8 @@ var CanvasForm = /** @class */ (function () {
110
111
  }
111
112
  }
112
113
  };
114
+ // Sets the modal size
115
+ CanvasForm.setSize = function (size) { this._canvas.setSize(size); };
113
116
  // Sets the modal type
114
117
  CanvasForm.setType = function (type) { this._canvas.setType(type); };
115
118
  // Shows the canvas
@@ -3,6 +3,7 @@ import { Components, Helper } from "gd-sprest-bs";
3
3
  export interface IItemFormTab {
4
4
  title: string;
5
5
  fields: string[];
6
+ onFormRendered?: (form?: Components.IListFormDisplay | Components.IListFormEdit) => void;
6
7
  onRendered?: (el?: HTMLElement, item?: Components.IListGroupItem) => void;
7
8
  onRendering?: (item?: Components.IListGroupItem) => object;
8
9
  }
@@ -72,8 +73,10 @@ export declare class ItemForm {
72
73
  static set AutoClose(value: boolean);
73
74
  private static _displayForms;
74
75
  static get DisplayForm(): Components.IListFormDisplay;
76
+ static get DisplayForms(): Components.IListFormDisplay[];
75
77
  private static _editForms;
76
78
  static get EditForm(): Components.IListFormEdit;
79
+ static get EditForms(): Components.IListFormEdit[];
77
80
  private static _info;
78
81
  static get FormInfo(): Helper.IListFormResult;
79
82
  private static _controlMode;
package/build/itemForm.js CHANGED
@@ -34,11 +34,21 @@ var ItemForm = /** @class */ (function () {
34
34
  enumerable: false,
35
35
  configurable: true
36
36
  });
37
+ Object.defineProperty(ItemForm, "DisplayForms", {
38
+ get: function () { return this._displayForms; },
39
+ enumerable: false,
40
+ configurable: true
41
+ });
37
42
  Object.defineProperty(ItemForm, "EditForm", {
38
43
  get: function () { return this._editForms[0]; },
39
44
  enumerable: false,
40
45
  configurable: true
41
46
  });
47
+ Object.defineProperty(ItemForm, "EditForms", {
48
+ get: function () { return this._editForms; },
49
+ enumerable: false,
50
+ configurable: true
51
+ });
42
52
  Object.defineProperty(ItemForm, "FormInfo", {
43
53
  get: function () { return this._info; },
44
54
  enumerable: false,
@@ -210,6 +220,8 @@ var ItemForm = /** @class */ (function () {
210
220
  // Render the display form
211
221
  var form = gd_sprest_bs_1.Components.ListForm.renderDisplayForm(props);
212
222
  this._displayForms.push(form);
223
+ // Call the event if it exists
224
+ tab && tab.onFormRendered ? tab.onFormRendered(form) : null;
213
225
  // Return the form element
214
226
  return el;
215
227
  };
@@ -234,6 +246,8 @@ var ItemForm = /** @class */ (function () {
234
246
  // Render the edit form
235
247
  var form = gd_sprest_bs_1.Components.ListForm.renderEditForm(props);
236
248
  this._editForms.push(form);
249
+ // Call the event if it exists
250
+ tab && tab.onFormRendered ? tab.onFormRendered(form) : null;
237
251
  // Return the form element
238
252
  return el;
239
253
  };
@@ -376,7 +390,7 @@ var ItemForm = /** @class */ (function () {
376
390
  // Saves the item
377
391
  var saveItem_1 = function (values) {
378
392
  // Save the item
379
- form.save(values).then(function (item) {
393
+ forms[0].save(values).then(function (item) {
380
394
  // Call the update event
381
395
  _this._updateEvent ? _this._updateEvent(item) : null;
382
396
  // Close the dialogs