dattatable 2.6.5 → 2.6.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.
- package/build/common/itemForm.d.ts +3 -3
- package/build/common/itemForm.js +4 -4
- package/dist/dattatable.js +304 -304
- package/dist/dattatable.min.js +1 -1
- package/docs/classes/AuditLog.html +13 -13
- package/docs/classes/CanvasForm.html +17 -17
- package/docs/classes/Comments.html +12 -12
- package/docs/classes/Dashboard.html +17 -17
- package/docs/classes/DataTable.html +11 -11
- package/docs/classes/Documents.html +45 -45
- package/docs/classes/FilterSlideout.html +14 -14
- package/docs/classes/Footer.html +4 -4
- package/docs/classes/Header.html +4 -4
- package/docs/classes/InstallationRequired.html +12 -12
- package/docs/classes/ItemForm.html +52 -50
- package/docs/classes/List.html +40 -40
- package/docs/classes/LoadingDialog.html +12 -12
- package/docs/classes/Modal.html +26 -26
- package/docs/classes/Navigation.html +6 -6
- package/docs/enums/ActionButtonTypes.html +6 -6
- package/docs/functions/formatBytes.html +1 -1
- package/docs/functions/formatDateValue.html +1 -1
- package/docs/functions/formatTimeValue.html +1 -1
- package/docs/functions/getFileExt.html +1 -1
- package/docs/interfaces/IAuditLogItem.html +9 -9
- package/docs/interfaces/IAuditLogItemCreation.html +7 -7
- package/docs/interfaces/IAuditLogProps.html +5 -5
- package/docs/interfaces/IAuditLogViewProps.html +6 -6
- package/docs/interfaces/ICommentsItem.html +6 -6
- package/docs/interfaces/IDashboardProps.html +14 -14
- package/docs/interfaces/IDataTable.html +7 -7
- package/docs/interfaces/IDataTableProps.html +6 -6
- package/docs/interfaces/IDocumentsProps.html +25 -25
- package/docs/interfaces/IFilterItem.html +5 -5
- package/docs/interfaces/IFilterProps.html +4 -4
- package/docs/interfaces/IFooterProps.html +6 -6
- package/docs/interfaces/IHeaderProps.html +5 -5
- package/docs/interfaces/IInstallProps.html +4 -4
- package/docs/interfaces/IItemFormCreateProps.html +19 -17
- package/docs/interfaces/IItemFormEditProps.html +20 -18
- package/docs/interfaces/IItemFormTab.html +10 -12
- package/docs/interfaces/IItemFormTabInfo.html +3 -3
- package/docs/interfaces/IItemFormViewProps.html +12 -12
- package/docs/interfaces/IListProps.html +9 -9
- package/docs/interfaces/IShowDialogProps.html +7 -7
- package/docs/variables/DattaTable.html +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +4 -4
|
@@ -8,7 +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?: (
|
|
11
|
+
onValidation?: (values?: any) => boolean;
|
|
12
12
|
}
|
|
13
13
|
/** Tab Information */
|
|
14
14
|
export interface IItemFormTabInfo {
|
|
@@ -26,7 +26,7 @@ export interface IItemFormCreateProps {
|
|
|
26
26
|
onSetHeader?: (el: HTMLElement) => void;
|
|
27
27
|
onShowForm?: (form?: CanvasForm | Modal) => void;
|
|
28
28
|
onUpdate?: (item?: any) => void;
|
|
29
|
-
onValidation?: (values?: any) => boolean | PromiseLike<boolean>;
|
|
29
|
+
onValidation?: (values?: any, isValid?: boolean) => boolean | PromiseLike<boolean>;
|
|
30
30
|
tabInfo?: IItemFormTabInfo;
|
|
31
31
|
useModal?: boolean;
|
|
32
32
|
webUrl?: string;
|
|
@@ -43,7 +43,7 @@ export interface IItemFormEditProps {
|
|
|
43
43
|
onSetHeader?: (el: HTMLElement) => void;
|
|
44
44
|
onShowForm?: (form?: CanvasForm | Modal) => void;
|
|
45
45
|
onUpdate?: (item?: any) => void;
|
|
46
|
-
onValidation?: (values?: any) => boolean | PromiseLike<boolean>;
|
|
46
|
+
onValidation?: (values?: any, isValid?: boolean) => boolean | PromiseLike<boolean>;
|
|
47
47
|
tabInfo?: IItemFormTabInfo;
|
|
48
48
|
useModal?: boolean;
|
|
49
49
|
webUrl?: string;
|
package/build/common/itemForm.js
CHANGED
|
@@ -214,7 +214,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
214
214
|
// Ensure the element exists
|
|
215
215
|
el = el || document.createElement("div");
|
|
216
216
|
// Set the form properties
|
|
217
|
-
var displayAttachments = tab ? tab.fields && tab.fields.indexOf("Attachments") >= 0 :
|
|
217
|
+
var displayAttachments = tab ? tab.fields && tab.fields.indexOf("Attachments") >= 0 : this.FormInfo.attachments != null;
|
|
218
218
|
var props = {
|
|
219
219
|
el: el,
|
|
220
220
|
displayAttachments: displayAttachments,
|
|
@@ -246,7 +246,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
246
246
|
// Ensure the element exists
|
|
247
247
|
el = el || document.createElement("div");
|
|
248
248
|
// Set the form properties
|
|
249
|
-
var displayAttachments = tab ? tab.fields && tab.fields.indexOf("Attachments") >= 0 :
|
|
249
|
+
var displayAttachments = tab ? tab.fields && tab.fields.indexOf("Attachments") >= 0 : this.FormInfo.attachments != null;
|
|
250
250
|
var props = {
|
|
251
251
|
el: el,
|
|
252
252
|
displayAttachments: displayAttachments,
|
|
@@ -402,7 +402,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
402
402
|
var tabInfo = _this._tabInfo && _this._tabInfo.tabs[counter];
|
|
403
403
|
if (tabInfo && tabInfo.onValidation) {
|
|
404
404
|
// Call the event
|
|
405
|
-
tabIsValid = tabInfo.onValidation(
|
|
405
|
+
tabIsValid = tabInfo.onValidation(values);
|
|
406
406
|
}
|
|
407
407
|
// See if the form is not valid
|
|
408
408
|
if (!tabIsValid) {
|
|
@@ -482,7 +482,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
482
482
|
// Return a promise
|
|
483
483
|
return new Promise(function (resolve, reject) {
|
|
484
484
|
// Call the validation event
|
|
485
|
-
var returnVal = _this._onValidation ? _this._onValidation(values) : null;
|
|
485
|
+
var returnVal = _this._onValidation ? _this._onValidation(values, isValid) : null;
|
|
486
486
|
// See if it's a promise function
|
|
487
487
|
if (returnVal && typeof (returnVal.then) === "function") {
|
|
488
488
|
// Wait for the promise to complete
|