dattatable 2.11.1 → 2.11.2
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 +4 -1
- package/build/common/itemForm.js +30 -27
- package/dist/dattatable.js +836 -836
- package/dist/dattatable.min.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 +4 -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 +2 -2
- package/docs/interfaces/IItemFormEditProps.html +2 -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
|
@@ -132,6 +132,9 @@ export declare class ItemForm {
|
|
|
132
132
|
private static renderFormFooter;
|
|
133
133
|
private static renderForm;
|
|
134
134
|
private static renderTabs;
|
|
135
|
-
static save(
|
|
135
|
+
static save(props?: {
|
|
136
|
+
form?: Components.IListFormEdit;
|
|
137
|
+
bypassValidation?: boolean;
|
|
138
|
+
}): void;
|
|
136
139
|
private static validate;
|
|
137
140
|
}
|
package/build/common/itemForm.js
CHANGED
|
@@ -470,11 +470,12 @@ var ItemForm = /** @class */ (function () {
|
|
|
470
470
|
return this._tabs.el;
|
|
471
471
|
};
|
|
472
472
|
// Saves the edit form
|
|
473
|
-
ItemForm.save = function (
|
|
473
|
+
ItemForm.save = function (props) {
|
|
474
474
|
var _this = this;
|
|
475
|
+
if (props === void 0) { props = {}; }
|
|
475
476
|
var values = {};
|
|
476
477
|
// Default the form
|
|
477
|
-
var forms = form ? [form] : this._editForms;
|
|
478
|
+
var forms = props.form ? [props.form] : this._editForms;
|
|
478
479
|
var defaultForm = forms[0];
|
|
479
480
|
// Display a loading dialog
|
|
480
481
|
_1.LoadingDialog.setHeader("Validation");
|
|
@@ -491,32 +492,34 @@ var ItemForm = /** @class */ (function () {
|
|
|
491
492
|
// Set the default form
|
|
492
493
|
defaultForm = form;
|
|
493
494
|
}
|
|
494
|
-
//
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
//
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
//
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
tab
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
495
|
+
// See if we are bypassing validation
|
|
496
|
+
if (props.bypassValidation == null || props.bypassValidation != true) {
|
|
497
|
+
// Validate the form
|
|
498
|
+
var tabIsValid = form.isValid();
|
|
499
|
+
// See if we are using tabs and an event exists
|
|
500
|
+
var tabInfo = _this._tabInfo && _this._tabInfo.tabs[counter];
|
|
501
|
+
if (tabInfo && tabInfo.onValidation) {
|
|
502
|
+
// Call the event
|
|
503
|
+
tabIsValid = tabInfo.onValidation(values);
|
|
504
|
+
}
|
|
505
|
+
// See if the form is not valid
|
|
506
|
+
if (!tabIsValid) {
|
|
507
|
+
// Set the flag
|
|
508
|
+
isValid = false;
|
|
509
|
+
}
|
|
510
|
+
// See if tabs exist
|
|
511
|
+
if (_this.Tabs) {
|
|
512
|
+
// Get the tab
|
|
513
|
+
var tab = _this.Tabs.el.querySelectorAll(".list-group-item")[counter++];
|
|
514
|
+
if (tab) {
|
|
515
|
+
// Clear the class name
|
|
516
|
+
tab.classList.remove("is-valid");
|
|
517
|
+
tab.classList.remove("is-invalid");
|
|
518
|
+
// Set the class name
|
|
519
|
+
tab.classList.add(tabIsValid ? "is-valid" : "is-invalid");
|
|
520
|
+
}
|
|
517
521
|
}
|
|
518
522
|
}
|
|
519
|
-
// Set the tab class
|
|
520
523
|
}).then(
|
|
521
524
|
// Success
|
|
522
525
|
function () {
|
|
@@ -525,7 +528,7 @@ var ItemForm = /** @class */ (function () {
|
|
|
525
528
|
// Valid
|
|
526
529
|
function (isValid) {
|
|
527
530
|
// See if the form(s) are valid
|
|
528
|
-
if (isValid) {
|
|
531
|
+
if (isValid || props.bypassValidation == true) {
|
|
529
532
|
// Update the loading dialog
|
|
530
533
|
_1.LoadingDialog.setHeader("Saving the Item");
|
|
531
534
|
_1.LoadingDialog.setBody((_this.IsNew ? "Creating" : "Updating") + " the Item");
|