dattatable 2.6.3 → 2.6.5

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 (49) hide show
  1. package/build/common/itemForm.d.ts +1 -0
  2. package/build/common/itemForm.js +10 -2
  3. package/dist/dattatable.js +439 -439
  4. package/dist/dattatable.min.js +1 -1
  5. package/docs/assets/search.js +1 -1
  6. package/docs/classes/AuditLog.html +13 -13
  7. package/docs/classes/CanvasForm.html +17 -17
  8. package/docs/classes/Comments.html +12 -12
  9. package/docs/classes/Dashboard.html +17 -17
  10. package/docs/classes/DataTable.html +11 -11
  11. package/docs/classes/Documents.html +45 -45
  12. package/docs/classes/FilterSlideout.html +14 -14
  13. package/docs/classes/Footer.html +4 -4
  14. package/docs/classes/Header.html +4 -4
  15. package/docs/classes/InstallationRequired.html +12 -12
  16. package/docs/classes/ItemForm.html +47 -47
  17. package/docs/classes/List.html +40 -40
  18. package/docs/classes/LoadingDialog.html +12 -12
  19. package/docs/classes/Modal.html +26 -26
  20. package/docs/classes/Navigation.html +6 -6
  21. package/docs/enums/ActionButtonTypes.html +6 -6
  22. package/docs/functions/formatBytes.html +1 -1
  23. package/docs/functions/formatDateValue.html +1 -1
  24. package/docs/functions/formatTimeValue.html +1 -1
  25. package/docs/functions/getFileExt.html +1 -1
  26. package/docs/interfaces/IAuditLogItem.html +9 -9
  27. package/docs/interfaces/IAuditLogItemCreation.html +7 -7
  28. package/docs/interfaces/IAuditLogProps.html +5 -5
  29. package/docs/interfaces/IAuditLogViewProps.html +6 -6
  30. package/docs/interfaces/ICommentsItem.html +6 -6
  31. package/docs/interfaces/IDashboardProps.html +14 -14
  32. package/docs/interfaces/IDataTable.html +7 -7
  33. package/docs/interfaces/IDataTableProps.html +6 -6
  34. package/docs/interfaces/IDocumentsProps.html +25 -25
  35. package/docs/interfaces/IFilterItem.html +5 -5
  36. package/docs/interfaces/IFilterProps.html +4 -4
  37. package/docs/interfaces/IFooterProps.html +6 -6
  38. package/docs/interfaces/IHeaderProps.html +5 -5
  39. package/docs/interfaces/IInstallProps.html +4 -4
  40. package/docs/interfaces/IItemFormCreateProps.html +14 -14
  41. package/docs/interfaces/IItemFormEditProps.html +15 -15
  42. package/docs/interfaces/IItemFormTab.html +29 -7
  43. package/docs/interfaces/IItemFormTabInfo.html +3 -3
  44. package/docs/interfaces/IItemFormViewProps.html +12 -12
  45. package/docs/interfaces/IListProps.html +9 -9
  46. package/docs/interfaces/IShowDialogProps.html +7 -7
  47. package/docs/variables/DattaTable.html +1 -1
  48. package/package.json +2 -2
  49. package/pnpm-lock.yaml +3230 -3230
@@ -8,6 +8,7 @@ export interface IItemFormTab {
8
8
  onFormRendered?: (form?: Components.IListFormDisplay | Components.IListFormEdit) => void;
9
9
  onRendered?: (el?: HTMLElement, item?: Components.IListGroupItem) => void;
10
10
  onRendering?: (item?: Components.IListGroupItem) => object;
11
+ onValidation?: (isValid?: boolean, values?: any) => boolean;
11
12
  }
12
13
  /** Tab Information */
13
14
  export interface IItemFormTabInfo {
@@ -396,8 +396,16 @@ var ItemForm = /** @class */ (function () {
396
396
  gd_sprest_bs_1.Helper.Executor(forms, function (form) {
397
397
  // Update the values
398
398
  values = __assign(__assign({}, values), form.getValues());
399
+ // Validate the form
400
+ var tabIsValid = form.isValid();
401
+ // See if we are using tabs and an event exists
402
+ var tabInfo = _this._tabInfo && _this._tabInfo.tabs[counter];
403
+ if (tabInfo && tabInfo.onValidation) {
404
+ // Call the event
405
+ tabIsValid = tabInfo.onValidation(tabIsValid, values);
406
+ }
399
407
  // See if the form is not valid
400
- if (!form.isValid()) {
408
+ if (!tabIsValid) {
401
409
  // Set the flag
402
410
  isValid = false;
403
411
  }
@@ -410,7 +418,7 @@ var ItemForm = /** @class */ (function () {
410
418
  tab.classList.remove("is-valid");
411
419
  tab.classList.remove("is-invalid");
412
420
  // Set the class name
413
- tab.classList.add(isValid ? "is-valid" : "is-invalid");
421
+ tab.classList.add(tabIsValid ? "is-valid" : "is-invalid");
414
422
  }
415
423
  }
416
424
  // Set the tab class