dattatable 2.10.98 → 2.10.99
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 +45 -0
- package/dist/dattatable.js +314 -314
- 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;
|
|
@@ -538,6 +541,47 @@ 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
|
+
// Try to get the error message
|
|
546
|
+
try {
|
|
547
|
+
var errorMessage = JSON.parse(err.response).error.message.value;
|
|
548
|
+
// See if the page timed out
|
|
549
|
+
if (errorMessage.indexOf("The security validation for this page is invalid") == 0) {
|
|
550
|
+
// Set the loading dialog
|
|
551
|
+
_1.LoadingDialog.setBody("The page timed out, retrying the request...");
|
|
552
|
+
// Get the context
|
|
553
|
+
(0, _1.getContextInfo)(_this._info.webUrl).then(function (requestDigest) {
|
|
554
|
+
// Set the request digest value
|
|
555
|
+
_this._requestDigest = requestDigest;
|
|
556
|
+
// Try to save the item again
|
|
557
|
+
defaultForm.save(values).then(function (item) {
|
|
558
|
+
// Call the update event
|
|
559
|
+
_this._updateEvent ? _this._updateEvent(item) : null;
|
|
560
|
+
// Close the dialogs
|
|
561
|
+
(_this._useModal ? _1.Modal : _1.CanvasForm).hide();
|
|
562
|
+
_1.LoadingDialog.hide();
|
|
563
|
+
}, function (err) {
|
|
564
|
+
// Log
|
|
565
|
+
console.error("[List Form] Unable to save the item after refreshing the context information.");
|
|
566
|
+
// Call the event
|
|
567
|
+
_this._onSaveError ? _this._onSaveError(err) : null;
|
|
568
|
+
});
|
|
569
|
+
}, function () {
|
|
570
|
+
// Log
|
|
571
|
+
console.error("[List Form] Unable to get the context for web.");
|
|
572
|
+
// Call the event
|
|
573
|
+
_this._onSaveError ? _this._onSaveError(err) : null;
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
else {
|
|
577
|
+
// Call the event
|
|
578
|
+
_this._onSaveError ? _this._onSaveError(err) : null;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
catch (_a) {
|
|
582
|
+
// Call the event
|
|
583
|
+
_this._onSaveError ? _this._onSaveError(err) : null;
|
|
584
|
+
}
|
|
541
585
|
});
|
|
542
586
|
}
|
|
543
587
|
};
|
|
@@ -603,6 +647,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
603
647
|
ItemForm._onSetHeader = null;
|
|
604
648
|
ItemForm._onShowForm = null;
|
|
605
649
|
ItemForm._onSave = null;
|
|
650
|
+
ItemForm._onSaveError = null;
|
|
606
651
|
ItemForm._onValidation = null;
|
|
607
652
|
ItemForm._requestDigest = null;
|
|
608
653
|
ItemForm._tabInfo = null;
|