dattatable 2.10.98 → 2.11.0
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 -0
- package/build/common/itemForm.js +37 -1
- package/dist/dattatable.js +581 -581
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Accordion.html +2 -2
- package/docs/classes/AuditLog.html +2 -2
- package/docs/classes/CanvasForm.html +2 -2
- package/docs/classes/Comments.html +2 -2
- package/docs/classes/Dashboard.html +4 -4
- package/docs/classes/DataTable.html +3 -3
- package/docs/classes/Documents.html +6 -6
- package/docs/classes/FilterSlideout.html +2 -2
- package/docs/classes/Footer.html +2 -2
- package/docs/classes/Header.html +2 -2
- package/docs/classes/InstallationRequired.html +2 -2
- package/docs/classes/ItemForm.html +5 -4
- package/docs/classes/List.html +4 -4
- package/docs/classes/ListConfig.html +2 -2
- package/docs/classes/ListSecurity.html +2 -2
- package/docs/classes/LoadingDialog.html +2 -2
- package/docs/classes/Modal.html +2 -2
- package/docs/classes/Navigation.html +3 -3
- package/docs/classes/Tiles.html +2 -2
- package/docs/classes/Timeout.html +2 -2
- package/docs/enums/ActionButtonTypes.html +2 -2
- package/docs/functions/formatBytes.html +1 -1
- package/docs/functions/formatDateValue.html +1 -1
- package/docs/functions/formatTimeValue.html +1 -1
- package/docs/functions/getContextInfo.html +1 -1
- package/docs/functions/getFileExt.html +1 -1
- package/docs/functions/waitForTheme.html +1 -1
- package/docs/interfaces/IAccordion.html +2 -2
- package/docs/interfaces/IAccordionProps.html +2 -2
- package/docs/interfaces/IAuditLogItem.html +2 -2
- package/docs/interfaces/IAuditLogItemCreation.html +2 -2
- package/docs/interfaces/IAuditLogProps.html +2 -2
- package/docs/interfaces/IAuditLogViewProps.html +2 -2
- package/docs/interfaces/ICommentsItem.html +2 -2
- package/docs/interfaces/ICreateLookupData.html +2 -2
- package/docs/interfaces/IDashboardProps.html +2 -2
- package/docs/interfaces/IDataTable.html +2 -2
- package/docs/interfaces/IDataTableProps.html +2 -2
- package/docs/interfaces/IDocumentsProps.html +2 -2
- package/docs/interfaces/IFilterItem.html +2 -2
- package/docs/interfaces/IFilterProps.html +2 -2
- package/docs/interfaces/IFooterProps.html +2 -2
- package/docs/interfaces/IGenerateLookupDataProps.html +2 -2
- package/docs/interfaces/IHeaderProps.html +2 -2
- package/docs/interfaces/IInstallProps.html +2 -2
- package/docs/interfaces/IItemFormCreateProps.html +3 -2
- package/docs/interfaces/IItemFormEditProps.html +3 -2
- package/docs/interfaces/IItemFormTab.html +2 -2
- package/docs/interfaces/IItemFormTabInfo.html +2 -2
- package/docs/interfaces/IItemFormViewProps.html +2 -2
- package/docs/interfaces/IListConfig.html +2 -2
- package/docs/interfaces/IListConfigProps.html +2 -2
- package/docs/interfaces/IListProps.html +2 -2
- package/docs/interfaces/IListSecurity.html +2 -2
- package/docs/interfaces/IListSecurityItem.html +2 -2
- package/docs/interfaces/ILookupData.html +2 -2
- package/docs/interfaces/IShowDialogProps.html +2 -2
- package/docs/interfaces/ITiles.html +2 -2
- package/docs/interfaces/ITilesProps.html +2 -2
- package/docs/interfaces/IValidateLookupsProps.html +2 -2
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +2 -2
|
@@ -27,6 +27,7 @@ export interface IItemFormCreateProps {
|
|
|
27
27
|
onGetListInfo?: (props: Helper.IListFormProps) => Helper.IListFormProps;
|
|
28
28
|
onResetForm?: () => void;
|
|
29
29
|
onSave?: (values: any) => object | PromiseLike<object>;
|
|
30
|
+
onSaveError?: (err: any) => void;
|
|
30
31
|
onSetFooter?: (el: HTMLElement) => void;
|
|
31
32
|
onSetHeader?: (el: HTMLElement) => void;
|
|
32
33
|
onShowForm?: (form?: CanvasForm | Modal) => void;
|
|
@@ -47,6 +48,7 @@ export interface IItemFormEditProps {
|
|
|
47
48
|
onGetListInfo?: (props: Helper.IListFormProps) => Helper.IListFormProps;
|
|
48
49
|
onResetForm?: () => void;
|
|
49
50
|
onSave?: (values: any) => object | PromiseLike<object>;
|
|
51
|
+
onSaveError?: (err: any) => void;
|
|
50
52
|
onSetFooter?: (el: HTMLElement) => void;
|
|
51
53
|
onSetHeader?: (el: HTMLElement) => void;
|
|
52
54
|
onShowForm?: (form?: CanvasForm | Modal) => void;
|
|
@@ -88,6 +90,7 @@ export declare class ItemForm {
|
|
|
88
90
|
private static _onSetHeader?;
|
|
89
91
|
private static _onShowForm?;
|
|
90
92
|
private static _onSave;
|
|
93
|
+
private static _onSaveError;
|
|
91
94
|
private static _onValidation;
|
|
92
95
|
private static _requestDigest;
|
|
93
96
|
private static _tabInfo;
|
package/build/common/itemForm.js
CHANGED
|
@@ -111,6 +111,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
111
111
|
this._onGetListInfo = props.onGetListInfo;
|
|
112
112
|
this._onResetForm = props.onResetForm;
|
|
113
113
|
this._onSave = props.onSave;
|
|
114
|
+
this._onSaveError = props.onSaveError;
|
|
114
115
|
this._onSetFooter = props.onSetFooter;
|
|
115
116
|
this._onSetHeader = props.onSetHeader;
|
|
116
117
|
this._onShowForm = props.onShowForm;
|
|
@@ -135,6 +136,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
135
136
|
this._onGetListInfo = props.onGetListInfo;
|
|
136
137
|
this._onResetForm = props.onResetForm;
|
|
137
138
|
this._onSave = props.onSave;
|
|
139
|
+
this._onSaveError = props.onSaveError;
|
|
138
140
|
this._onSetFooter = props.onSetFooter;
|
|
139
141
|
this._onSetHeader = props.onSetHeader;
|
|
140
142
|
this._onShowForm = props.onShowForm;
|
|
@@ -198,6 +200,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
198
200
|
this._onSetHeader = null;
|
|
199
201
|
this._onShowForm = null;
|
|
200
202
|
this._onSave = null;
|
|
203
|
+
this._onSaveError = null;
|
|
201
204
|
this._onValidation = null;
|
|
202
205
|
this._requestDigest = null;
|
|
203
206
|
this._tabInfo = null;
|
|
@@ -527,7 +530,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
527
530
|
_1.LoadingDialog.setHeader("Saving the Item");
|
|
528
531
|
_1.LoadingDialog.setBody((_this.IsNew ? "Creating" : "Updating") + " the Item");
|
|
529
532
|
// Saves the item
|
|
530
|
-
var saveItem_1 = function (values) {
|
|
533
|
+
var saveItem_1 = function (values, retryFl) {
|
|
531
534
|
// If values is null then do nothing. This would happen when the
|
|
532
535
|
// onSave event wants to cancel the save and do something custom
|
|
533
536
|
if (values) {
|
|
@@ -538,6 +541,38 @@ var ItemForm = /** @class */ (function () {
|
|
|
538
541
|
// Close the dialogs
|
|
539
542
|
(_this._useModal ? _1.Modal : _1.CanvasForm).hide();
|
|
540
543
|
_1.LoadingDialog.hide();
|
|
544
|
+
}, function (err) {
|
|
545
|
+
// See if we have already retried to save the item
|
|
546
|
+
if (retryFl) {
|
|
547
|
+
// Log
|
|
548
|
+
console.error("[List Form] Unable to get the context for web.");
|
|
549
|
+
// Call the event
|
|
550
|
+
_this._onSaveError ? _this._onSaveError(err) : null;
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
// Try to get the error message
|
|
554
|
+
try {
|
|
555
|
+
var errorMessage = JSON.parse(err.response).error.message.value;
|
|
556
|
+
// See if the page timed out
|
|
557
|
+
if (errorMessage.indexOf("The security validation for this page is invalid") == 0) {
|
|
558
|
+
// Set the loading dialog
|
|
559
|
+
_1.LoadingDialog.setBody("The page timed out, retrying the request...");
|
|
560
|
+
// Refresh the request digest
|
|
561
|
+
defaultForm.refreshRequestDigest().then(function () {
|
|
562
|
+
// Try to save the item again
|
|
563
|
+
saveItem_1(values, true);
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
else {
|
|
567
|
+
// Call the event
|
|
568
|
+
_this._onSaveError ? _this._onSaveError(err) : null;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
catch (_a) {
|
|
572
|
+
// Call the event
|
|
573
|
+
_this._onSaveError ? _this._onSaveError(err) : null;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
541
576
|
});
|
|
542
577
|
}
|
|
543
578
|
};
|
|
@@ -603,6 +638,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
603
638
|
ItemForm._onSetHeader = null;
|
|
604
639
|
ItemForm._onShowForm = null;
|
|
605
640
|
ItemForm._onSave = null;
|
|
641
|
+
ItemForm._onSaveError = null;
|
|
606
642
|
ItemForm._onValidation = null;
|
|
607
643
|
ItemForm._requestDigest = null;
|
|
608
644
|
ItemForm._tabInfo = null;
|