@sankhyalabs/ezui 5.22.0-dev.2 → 5.22.0-dev.21
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/dist/cjs/{RecordValidationProcessor-4c893e04.js → RecordValidationProcessor-10846595.js} +7 -1
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +31 -4
- package/dist/cjs/ez-form-view.cjs.entry.js +3 -2
- package/dist/cjs/ez-form.cjs.entry.js +7 -3
- package/dist/cjs/ez-grid.cjs.entry.js +264 -20
- package/dist/cjs/ez-modal-container.cjs.entry.js +2 -1
- package/dist/cjs/ez-modal.cjs.entry.js +7 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +9 -2
- package/dist/cjs/ez-search.cjs.entry.js +6 -3
- package/dist/cjs/ez-tabselector.cjs.entry.js +8 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +45 -5
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +3 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +106 -8
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +83 -5
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +58 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +8 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +1 -0
- package/dist/collection/components/ez-grid/ez-grid.js +45 -0
- package/dist/collection/components/ez-modal/ez-modal.js +25 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +20 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
- package/dist/collection/components/ez-popup/ez-popup.css +5 -1
- package/dist/collection/components/ez-popup/ez-popup.js +26 -1
- package/dist/collection/components/ez-search/ez-search.js +24 -3
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +34 -2
- package/dist/collection/utils/form/DataBinder.js +7 -3
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
- package/dist/custom-elements/index.js +349 -44
- package/dist/esm/{RecordValidationProcessor-b00b8b77.js → RecordValidationProcessor-9c6cc267.js} +7 -1
- package/dist/esm/ez-custom-form-input_2.entry.js +32 -5
- package/dist/esm/ez-form-view.entry.js +3 -2
- package/dist/esm/ez-form.entry.js +8 -4
- package/dist/esm/ez-grid.entry.js +264 -20
- package/dist/esm/ez-modal-container.entry.js +2 -1
- package/dist/esm/ez-modal.entry.js +7 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +9 -2
- package/dist/esm/ez-search.entry.js +6 -3
- package/dist/esm/ez-tabselector.entry.js +8 -2
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-08061683.entry.js +1 -0
- package/dist/ezui/p-34b6916c.entry.js +1 -0
- package/dist/ezui/p-42533ea4.entry.js +1 -0
- package/dist/ezui/p-4d64a3e4.entry.js +1 -0
- package/dist/ezui/{p-816cece6.entry.js → p-a9156fef.entry.js} +2 -2
- package/dist/ezui/p-c0d9c4f8.entry.js +1 -0
- package/dist/ezui/p-c36b7c56.entry.js +1 -0
- package/dist/ezui/p-cdc472cc.entry.js +1 -0
- package/dist/ezui/p-e26f12dd.entry.js +1 -0
- package/dist/ezui/p-f42855b9.js +1 -0
- package/dist/ezui/p-f9e551de.entry.js +1 -0
- package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +32 -4
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +19 -3
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +18 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +13 -2
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +9 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +5 -0
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +6 -0
- package/dist/types/components/ez-search/ez-search.d.ts +4 -0
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +2 -1
- package/dist/types/components.d.ts +49 -0
- package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
- package/dist/types/utils/form/DataBinder.d.ts +2 -0
- package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ezui/p-04f24913.js +0 -1
- package/dist/ezui/p-12ae1104.entry.js +0 -1
- package/dist/ezui/p-2dcb50d4.entry.js +0 -1
- package/dist/ezui/p-30775e7f.entry.js +0 -1
- package/dist/ezui/p-4d5235f1.entry.js +0 -1
- package/dist/ezui/p-5056284a.entry.js +0 -1
- package/dist/ezui/p-784fe207.entry.js +0 -1
- package/dist/ezui/p-9ab22a07.entry.js +0 -1
- package/dist/ezui/p-d9401ea0.entry.js +0 -1
- package/dist/ezui/p-f3c526cc.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { UserInterface, DateUtils as DateUtils$1, Action, ApplicationContext, WaitingChangeException, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils,
|
|
3
|
+
import { UserInterface, DateUtils as DateUtils$1, Action, StringUtils as StringUtils$1, ApplicationContext, WaitingChangeException, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, HTMLBuilder, TimeFormatter, DataUnit, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
|
|
4
4
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
5
5
|
|
|
6
6
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
@@ -513,7 +513,7 @@ class RecordValidationProcessor {
|
|
|
513
513
|
this._validationSource = validationSource;
|
|
514
514
|
this._validator = validator;
|
|
515
515
|
}
|
|
516
|
-
validate() {
|
|
516
|
+
validate(isSaving = true) {
|
|
517
517
|
return new Promise((accept, reject) => {
|
|
518
518
|
const records = this._dataUnit.getModifiedRecords();
|
|
519
519
|
for (let i = 0; i < records.length; i++) {
|
|
@@ -530,6 +530,11 @@ class RecordValidationProcessor {
|
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
if (invalidResults.length > 0) {
|
|
533
|
+
if (!isSaving && invalidResults[0].invalidFields.length > 0) {
|
|
534
|
+
this._validationSource.markAsInvalid(invalidResults[0].invalidFields[0], record.__record__id__);
|
|
535
|
+
reject();
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
533
538
|
this.processValidationResult(invalidResults, record.__record__id__);
|
|
534
539
|
reject();
|
|
535
540
|
break;
|
|
@@ -561,6 +566,7 @@ class RecordValidationProcessor {
|
|
|
561
566
|
processValidationResult(validationResult, recordId) {
|
|
562
567
|
validationResult.forEach(invalidResult => {
|
|
563
568
|
const invalidFields = invalidResult.invalidFields;
|
|
569
|
+
this._dataUnit.savingCanceled(invalidFields, recordId);
|
|
564
570
|
if (invalidFields) {
|
|
565
571
|
invalidFields.forEach(field => {
|
|
566
572
|
this.markAsInvalid(field, recordId);
|
|
@@ -611,6 +617,7 @@ class DataBinder {
|
|
|
611
617
|
break;
|
|
612
618
|
}
|
|
613
619
|
};
|
|
620
|
+
this._uuid = StringUtils$1.generateUUID();
|
|
614
621
|
this._fields = new Map();
|
|
615
622
|
this._dataUnit = dataUnit;
|
|
616
623
|
this.applyDefaultValues();
|
|
@@ -618,6 +625,9 @@ class DataBinder {
|
|
|
618
625
|
this._dataUnit.addInterceptor(this);
|
|
619
626
|
this.setContextDataBinder(dataUnit);
|
|
620
627
|
}
|
|
628
|
+
get dataBinderId() {
|
|
629
|
+
return this._uuid;
|
|
630
|
+
}
|
|
621
631
|
setContextDataBinder(dataUnit) {
|
|
622
632
|
const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
|
|
623
633
|
const dataBinders = [...(dataBindersByDataUnit.get(dataUnit.dataUnitId) || []), this];
|
|
@@ -646,13 +656,13 @@ class DataBinder {
|
|
|
646
656
|
this._recordValidatorProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
647
657
|
getRequiredFields: () => this._formMetadata.getRequiredFields(),
|
|
648
658
|
markAsInvalid: field => this.markInvalid(field),
|
|
649
|
-
getMessageForField: field => this.getErrorMessage(field)
|
|
659
|
+
getMessageForField: field => this.getErrorMessage(field),
|
|
650
660
|
}, recordsValidator);
|
|
651
661
|
}
|
|
652
662
|
disconnectDataUnit() {
|
|
653
663
|
const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
|
|
654
664
|
const dataBinders = dataBindersByDataUnit.get(this._dataUnit.dataUnitId);
|
|
655
|
-
const dataBindersFiltered = dataBinders.filter((dataBinder) =>
|
|
665
|
+
const dataBindersFiltered = dataBinders.filter((dataBinder) => dataBinder.dataBinderId !== this.dataBinderId);
|
|
656
666
|
dataBindersByDataUnit.set(this._dataUnit.dataUnitId, dataBindersFiltered);
|
|
657
667
|
ApplicationContext.setContextValue("__DATABINDER_BY_DATAUNIT__", dataBindersByDataUnit);
|
|
658
668
|
}
|
|
@@ -3419,6 +3429,27 @@ const EzCustomFormInput$1 = class extends HTMLElement$1 {
|
|
|
3419
3429
|
var _a, _b;
|
|
3420
3430
|
return ((_b = (_a = this.gui) === null || _a === void 0 ? void 0 : _a["isInvalid"]) === null || _b === void 0 ? void 0 : _b.call(_a)) || false;
|
|
3421
3431
|
}
|
|
3432
|
+
watchValue() {
|
|
3433
|
+
this.handleValue(this.gui);
|
|
3434
|
+
}
|
|
3435
|
+
watchCustomEditor() {
|
|
3436
|
+
this.getContent();
|
|
3437
|
+
}
|
|
3438
|
+
watchFormViewField(newValue, oldValue) {
|
|
3439
|
+
if (!ObjectUtils$1.equals(newValue, oldValue))
|
|
3440
|
+
this.getContent();
|
|
3441
|
+
}
|
|
3442
|
+
watchDetailContext() {
|
|
3443
|
+
this.getContent();
|
|
3444
|
+
}
|
|
3445
|
+
watchBuilderFallback() {
|
|
3446
|
+
this.getContent();
|
|
3447
|
+
}
|
|
3448
|
+
watchSelectedRecord(newValue, oldValue) {
|
|
3449
|
+
if (newValue['__record__id__'] !== oldValue['__record__id__']) {
|
|
3450
|
+
this.getContent();
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3422
3453
|
getContent() {
|
|
3423
3454
|
var _a, _b;
|
|
3424
3455
|
const fieldProps = new Map();
|
|
@@ -3458,9 +3489,7 @@ const EzCustomFormInput$1 = class extends HTMLElement$1 {
|
|
|
3458
3489
|
if (typeof gui === 'string') {
|
|
3459
3490
|
gui = HTMLBuilder.parseElement(gui);
|
|
3460
3491
|
}
|
|
3461
|
-
|
|
3462
|
-
gui.setAttribute('value', typeof this.value === 'object' ? this.value.value : this.value);
|
|
3463
|
-
}
|
|
3492
|
+
gui.setAttribute('value', this.value);
|
|
3464
3493
|
this.gui = h("div", { key: StringUtils$1.generateUUID(), ref: el => el && el.appendChild(gui) });
|
|
3465
3494
|
}
|
|
3466
3495
|
setValue(value) {
|
|
@@ -3476,12 +3505,20 @@ const EzCustomFormInput$1 = class extends HTMLElement$1 {
|
|
|
3476
3505
|
child.$attrs$.value = this.value;
|
|
3477
3506
|
});
|
|
3478
3507
|
}
|
|
3479
|
-
|
|
3508
|
+
componentWillLoad() {
|
|
3480
3509
|
this.getContent();
|
|
3481
3510
|
}
|
|
3482
3511
|
render() {
|
|
3483
3512
|
return (h(Host, null, this.gui));
|
|
3484
3513
|
}
|
|
3514
|
+
static get watchers() { return {
|
|
3515
|
+
"value": ["watchValue"],
|
|
3516
|
+
"customEditor": ["watchCustomEditor"],
|
|
3517
|
+
"formViewField": ["watchFormViewField"],
|
|
3518
|
+
"detailContext": ["watchDetailContext"],
|
|
3519
|
+
"builderFallback": ["watchBuilderFallback"],
|
|
3520
|
+
"selectedRecord": ["watchSelectedRecord"]
|
|
3521
|
+
}; }
|
|
3485
3522
|
};
|
|
3486
3523
|
|
|
3487
3524
|
const ezDateInputCss = ":host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"15px\"><path d=\"M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z\"/></svg>')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}";
|
|
@@ -5411,9 +5448,10 @@ function buildNumeric$1(fieldName, fieldLabel, readOnly, precision, prettyPrecis
|
|
|
5411
5448
|
h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
|
|
5412
5449
|
}
|
|
5413
5450
|
|
|
5414
|
-
const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
|
|
5451
|
+
const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader, props }) => {
|
|
5452
|
+
var _a;
|
|
5415
5453
|
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
|
|
5416
|
-
h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
|
|
5454
|
+
h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader, ignoreLimitCharsToSearch: (_a = props.ignoreLimitCharsToSearch) !== null && _a !== void 0 ? _a : false })));
|
|
5417
5455
|
};
|
|
5418
5456
|
|
|
5419
5457
|
const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError }) => {
|
|
@@ -124424,6 +124462,73 @@ class DataSourceInterceptor {
|
|
|
124424
124462
|
}
|
|
124425
124463
|
|
|
124426
124464
|
class DataSource {
|
|
124465
|
+
handleSavingCanceled(action) {
|
|
124466
|
+
var _a, _b, _c, _d;
|
|
124467
|
+
if (!((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fields) || !((_b = action.payload) === null || _b === void 0 ? void 0 : _b.recordId))
|
|
124468
|
+
return;
|
|
124469
|
+
this._controller.savingCanceled((_c = action.payload) === null || _c === void 0 ? void 0 : _c.fields, (_d = action.payload) === null || _d === void 0 ? void 0 : _d.recordId);
|
|
124470
|
+
}
|
|
124471
|
+
handleDataChanged(action) {
|
|
124472
|
+
var _a, _b;
|
|
124473
|
+
if (!this._options.enableGridInsert) {
|
|
124474
|
+
this.handleRefresh(action);
|
|
124475
|
+
return;
|
|
124476
|
+
}
|
|
124477
|
+
this.updateGridRowNodes((_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : []);
|
|
124478
|
+
}
|
|
124479
|
+
/**
|
|
124480
|
+
* Nesse ponto, o registro já se encontra atualizado no DU,
|
|
124481
|
+
* basta então passar seu valor para que a garde possa atualizar sua linha.
|
|
124482
|
+
*/
|
|
124483
|
+
updateGridRowNodes(recordIDList) {
|
|
124484
|
+
const recordsToUpdate = recordIDList === null || recordIDList === void 0 ? void 0 : recordIDList.map(id => this.getRecordById(id));
|
|
124485
|
+
this._controller.updateRows(recordsToUpdate);
|
|
124486
|
+
}
|
|
124487
|
+
getRecordById(recordId) {
|
|
124488
|
+
return this._dataUnit.records.find(record => record['__record__id__'] === recordId);
|
|
124489
|
+
}
|
|
124490
|
+
/**
|
|
124491
|
+
* Em caso de necessidade de reload (isWaitingToReload), eh preciso chamar o dataUnit.gotoPage, pois ele aplica tambem a ordenacao dos registros,
|
|
124492
|
+
* enquanto que o _controller.refresh apenas recarrega os dados na ordem que atua.
|
|
124493
|
+
*/
|
|
124494
|
+
handleRefreshOrReload(action) {
|
|
124495
|
+
if (this._dataUnit.isWaitingToReload()) {
|
|
124496
|
+
this.handleReload();
|
|
124497
|
+
return;
|
|
124498
|
+
}
|
|
124499
|
+
this.handleRefresh(action);
|
|
124500
|
+
}
|
|
124501
|
+
handleReload() {
|
|
124502
|
+
this._dataUnit.setWaitingToReload(false);
|
|
124503
|
+
this._dataUnit.gotoPage(0);
|
|
124504
|
+
}
|
|
124505
|
+
handleRefresh(action) {
|
|
124506
|
+
if (this.isSilentChange(action)) {
|
|
124507
|
+
return;
|
|
124508
|
+
}
|
|
124509
|
+
this._controller.refresh(action.type === Action.DATA_SAVED);
|
|
124510
|
+
}
|
|
124511
|
+
handleRecordsAdded() {
|
|
124512
|
+
if (this._options.enableGridInsert) {
|
|
124513
|
+
this._controller.refresh();
|
|
124514
|
+
this.focusOnNewRecord();
|
|
124515
|
+
}
|
|
124516
|
+
}
|
|
124517
|
+
focusOnNewRecord() {
|
|
124518
|
+
/**
|
|
124519
|
+
* O SetTimeout eh utilizado pois é preciso aguardar que o novo registro seja renderizado na grade.
|
|
124520
|
+
* Tentamos utilizar a api da grade para adicionar um event listener, porém na versão que utilizamos, não existe
|
|
124521
|
+
* algo que resolva nosso cenário.
|
|
124522
|
+
*
|
|
124523
|
+
* Sugiro no futuro utilizar algo como o applyServerSideTransaction, porém será preciso lidar com os handlers
|
|
124524
|
+
* e callbacks implementados no AgGridController e GridEditionManager.
|
|
124525
|
+
*/
|
|
124526
|
+
setTimeout(() => {
|
|
124527
|
+
var _a;
|
|
124528
|
+
const newRowIndex = ((_a = this._dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) - 1;
|
|
124529
|
+
this._controller.startEditionOnRowByIndex(newRowIndex);
|
|
124530
|
+
}, 500);
|
|
124531
|
+
}
|
|
124427
124532
|
updateLoadedRecords(action) {
|
|
124428
124533
|
const records = action.payload;
|
|
124429
124534
|
if ((records === null || records === void 0 ? void 0 : records.length) > 0) {
|
|
@@ -124475,15 +124580,20 @@ class DataSource {
|
|
|
124475
124580
|
this._options.onPaginationUpdate(this._dataUnit.getPaginationInfo());
|
|
124476
124581
|
}
|
|
124477
124582
|
break;
|
|
124478
|
-
case Action.
|
|
124583
|
+
case Action.RECORDS_ADDED:
|
|
124584
|
+
this.handleRecordsAdded();
|
|
124585
|
+
break;
|
|
124479
124586
|
case Action.DATA_SAVED:
|
|
124480
124587
|
case Action.EDITION_CANCELED:
|
|
124588
|
+
this._controller.clearInvalidCells(action.type);
|
|
124589
|
+
this.handleRefreshOrReload(action);
|
|
124590
|
+
break;
|
|
124481
124591
|
case Action.DATA_CHANGED:
|
|
124482
124592
|
case Action.DATA_RESOLVED:
|
|
124483
|
-
|
|
124484
|
-
|
|
124485
|
-
|
|
124486
|
-
this.
|
|
124593
|
+
this.handleDataChanged(action);
|
|
124594
|
+
break;
|
|
124595
|
+
case Action.RECORDS_REMOVED:
|
|
124596
|
+
this.handleRefresh(action);
|
|
124487
124597
|
break;
|
|
124488
124598
|
case Action.SELECTION_CHANGED:
|
|
124489
124599
|
case Action.NEXT_SELECTED:
|
|
@@ -124493,6 +124603,9 @@ class DataSource {
|
|
|
124493
124603
|
case Action.RECORD_LOADED:
|
|
124494
124604
|
this.updateLoadedRecords(action);
|
|
124495
124605
|
break;
|
|
124606
|
+
case Action.SAVING_CANCELED:
|
|
124607
|
+
this.handleSavingCanceled(action);
|
|
124608
|
+
break;
|
|
124496
124609
|
}
|
|
124497
124610
|
};
|
|
124498
124611
|
this._dataUnit = dataUnit;
|
|
@@ -124514,6 +124627,9 @@ class DataSource {
|
|
|
124514
124627
|
setAutoFocus(autoFocus) {
|
|
124515
124628
|
this._options.autoFocus = autoFocus;
|
|
124516
124629
|
}
|
|
124630
|
+
setEnableGridInsert(enable) {
|
|
124631
|
+
this._options.enableGridInsert = enable;
|
|
124632
|
+
}
|
|
124517
124633
|
getRows(params) {
|
|
124518
124634
|
if (this.needReload(params)) {
|
|
124519
124635
|
this._lastLoadingParams = params;
|
|
@@ -124976,6 +125092,7 @@ const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
|
|
|
124976
125092
|
/>`);
|
|
124977
125093
|
const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
124978
125094
|
ezSearch.optionLoader = (argument) => loader(argument, name, dataUnit);
|
|
125095
|
+
ezSearch.fromGrid = true;
|
|
124979
125096
|
ezSearch.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
124980
125097
|
ezSearch.valueGetter = () => ezSearch.getValueAsync();
|
|
124981
125098
|
return ezSearch;
|
|
@@ -125041,6 +125158,8 @@ class EzGridCustomCellEditor extends EzCellEditor {
|
|
|
125041
125158
|
this._defaultGui = this.getDefaultGui();
|
|
125042
125159
|
const fieldMetadata = super.getFieldMetadata();
|
|
125043
125160
|
this._params = {
|
|
125161
|
+
cellPossition: getViewPortHeight(params.eGridCell),
|
|
125162
|
+
eGridCell: params.eGridCell,
|
|
125044
125163
|
value: params.value,
|
|
125045
125164
|
charPress: params.charPress,
|
|
125046
125165
|
currentEditor: this._defaultGui,
|
|
@@ -125078,12 +125197,17 @@ class EzGridCustomCellEditor extends EzCellEditor {
|
|
|
125078
125197
|
const element = HTMLBuilder.parseElement(editorElement);
|
|
125079
125198
|
return element;
|
|
125080
125199
|
}
|
|
125200
|
+
this._customGui = editorElement;
|
|
125081
125201
|
return editorElement;
|
|
125082
125202
|
}
|
|
125083
125203
|
setValue(value) {
|
|
125084
125204
|
this._value = value;
|
|
125085
125205
|
}
|
|
125086
125206
|
getValue() {
|
|
125207
|
+
if (this._customGui.getValue)
|
|
125208
|
+
return this._customGui.getValue();
|
|
125209
|
+
if (this._customGui.hasAttribute('value'))
|
|
125210
|
+
return this._customGui.value;
|
|
125087
125211
|
return this._value;
|
|
125088
125212
|
}
|
|
125089
125213
|
}
|
|
@@ -125167,15 +125291,16 @@ class EzGridCustomCellRender extends EzCellRender {
|
|
|
125167
125291
|
}
|
|
125168
125292
|
|
|
125169
125293
|
class GridEditionManager {
|
|
125170
|
-
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders) {
|
|
125294
|
+
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert) {
|
|
125171
125295
|
this._dataUnit = dataUnit;
|
|
125172
125296
|
this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
125173
125297
|
getRequiredFields: () => this.getRequiredFields(),
|
|
125174
|
-
markAsInvalid: () => { },
|
|
125175
|
-
getMessageForField: () => null
|
|
125298
|
+
markAsInvalid: (invalidField, recordId) => { this.setInvalidCell(invalidField, recordId); },
|
|
125299
|
+
getMessageForField: () => null,
|
|
125176
125300
|
}, recordsValidator);
|
|
125177
125301
|
this._useEnterLikeTab = useEnterLikeTab;
|
|
125178
125302
|
this._editionIsDisabled = editionIsDisabled;
|
|
125303
|
+
this._enableContinuousInsert = enableContinuousInsert;
|
|
125179
125304
|
this._customEditors = customEditors;
|
|
125180
125305
|
this._customRenders = customRenders;
|
|
125181
125306
|
}
|
|
@@ -125190,27 +125315,49 @@ class GridEditionManager {
|
|
|
125190
125315
|
};
|
|
125191
125316
|
return options;
|
|
125192
125317
|
}
|
|
125318
|
+
canContinuousInsert() {
|
|
125319
|
+
var _a;
|
|
125320
|
+
return this._enableContinuousInsert && (this._dataUnit.records.length - 1) === ((_a = this._lastCellEdited) === null || _a === void 0 ? void 0 : _a.rowIndex);
|
|
125321
|
+
}
|
|
125193
125322
|
proceedAutoSave() {
|
|
125194
125323
|
if (!this._dataUnit.isDirty()) {
|
|
125195
125324
|
this.saveSuccess();
|
|
125196
125325
|
return;
|
|
125197
125326
|
}
|
|
125198
|
-
if (!this._isGridEdition) {
|
|
125327
|
+
if (!this._isGridEdition || this._dataUnit.hasNewRecord()) {
|
|
125199
125328
|
return;
|
|
125200
125329
|
}
|
|
125201
125330
|
const currentRercord = this._dataUnit.getSelectedRecord();
|
|
125202
125331
|
if (currentRercord == undefined) {
|
|
125203
125332
|
return;
|
|
125204
125333
|
}
|
|
125334
|
+
this._invalidCell = undefined;
|
|
125205
125335
|
this._recordValidationProcessor
|
|
125206
|
-
.validate()
|
|
125336
|
+
.validate(true)
|
|
125207
125337
|
.then(() => {
|
|
125208
125338
|
this._dataUnit.saveData()
|
|
125209
|
-
.then(() =>
|
|
125339
|
+
.then(() => {
|
|
125340
|
+
if (this.canContinuousInsert()) {
|
|
125341
|
+
this._dataUnit.addRecord();
|
|
125342
|
+
}
|
|
125343
|
+
else {
|
|
125344
|
+
this.saveSuccess();
|
|
125345
|
+
}
|
|
125346
|
+
})
|
|
125210
125347
|
.catch(reason => this.saveFail(reason));
|
|
125211
125348
|
})
|
|
125212
125349
|
.catch(reason => this.saveFail(reason));
|
|
125213
125350
|
}
|
|
125351
|
+
async recordValidate() {
|
|
125352
|
+
if (!this._dataUnit.isDirty())
|
|
125353
|
+
return;
|
|
125354
|
+
try {
|
|
125355
|
+
this._invalidCell = undefined;
|
|
125356
|
+
await this._recordValidationProcessor.validate(false);
|
|
125357
|
+
}
|
|
125358
|
+
catch (error) { }
|
|
125359
|
+
this._gridOptions.api.refreshCells({ force: true });
|
|
125360
|
+
}
|
|
125214
125361
|
navigateByEnterKey(keyboardEvent) {
|
|
125215
125362
|
const backwards = keyboardEvent.shiftKey;
|
|
125216
125363
|
if (this._useEnterLikeTab) {
|
|
@@ -125419,6 +125566,34 @@ class GridEditionManager {
|
|
|
125419
125566
|
setCellRenders(customRenders) {
|
|
125420
125567
|
this._customRenders = customRenders;
|
|
125421
125568
|
}
|
|
125569
|
+
setInvalidCell(invalidCell, recordId) {
|
|
125570
|
+
this._invalidCell = { field: invalidCell, recordId };
|
|
125571
|
+
}
|
|
125572
|
+
getInvalidCell() {
|
|
125573
|
+
return this._invalidCell;
|
|
125574
|
+
}
|
|
125575
|
+
clearInvalidCells(action) {
|
|
125576
|
+
this._invalidCell = undefined;
|
|
125577
|
+
if (action === Action.EDITION_CANCELED) {
|
|
125578
|
+
this._isGridEdition = false;
|
|
125579
|
+
}
|
|
125580
|
+
else if (action === Action.DATA_SAVED && this.canContinuousInsert()) {
|
|
125581
|
+
this._dataUnit.addRecord();
|
|
125582
|
+
}
|
|
125583
|
+
}
|
|
125584
|
+
setEnableContinuousInsert(enable) {
|
|
125585
|
+
this._enableContinuousInsert = enable;
|
|
125586
|
+
}
|
|
125587
|
+
hasInvalidField(fieldName, recordId) {
|
|
125588
|
+
if (!this.hasInvalidCell())
|
|
125589
|
+
return false;
|
|
125590
|
+
return this._invalidCell.field.name === fieldName && this._invalidCell.recordId === recordId;
|
|
125591
|
+
}
|
|
125592
|
+
hasInvalidCell() {
|
|
125593
|
+
if (!this._invalidCell || !this._invalidCell.field || !this._invalidCell.recordId)
|
|
125594
|
+
return false;
|
|
125595
|
+
return true;
|
|
125596
|
+
}
|
|
125422
125597
|
}
|
|
125423
125598
|
class TargetEdition {
|
|
125424
125599
|
constructor(rowIndex, column, backwards) {
|
|
@@ -125462,6 +125637,8 @@ class AgGridController {
|
|
|
125462
125637
|
this._filteredColumns = new Map();
|
|
125463
125638
|
this._filterColumnleftPosition = 0;
|
|
125464
125639
|
this._customFormatters = new Map();
|
|
125640
|
+
this._gridShowDom = false;
|
|
125641
|
+
this.peddingExecutionsOnGridShow = [];
|
|
125465
125642
|
this._enterprise = enterprise;
|
|
125466
125643
|
}
|
|
125467
125644
|
getGridConfig() {
|
|
@@ -125547,7 +125724,7 @@ class AgGridController {
|
|
|
125547
125724
|
this._doubleClickCallBack = options.onDoubleClick;
|
|
125548
125725
|
this._multipleSelection = options.allowMultipleSelection;
|
|
125549
125726
|
this._dataUnit = options.dataUnit;
|
|
125550
|
-
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders);
|
|
125727
|
+
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert);
|
|
125551
125728
|
this._statusResolver = options.statusResolver;
|
|
125552
125729
|
if (this._dataUnit) {
|
|
125553
125730
|
this._dataUnit.sortingProvider = this;
|
|
@@ -125567,6 +125744,9 @@ class AgGridController {
|
|
|
125567
125744
|
defaultColDef: {
|
|
125568
125745
|
headerClass: 'ez-grid__cell-header',
|
|
125569
125746
|
cellClass: 'ez-grid__cell-body',
|
|
125747
|
+
cellClassRules: {
|
|
125748
|
+
'invalidValue': (params) => this._editionManager.hasInvalidField(params.colDef.field, params.data["__record__id__"]),
|
|
125749
|
+
},
|
|
125570
125750
|
cellStyle: {
|
|
125571
125751
|
height: '100%'
|
|
125572
125752
|
}
|
|
@@ -125597,10 +125777,6 @@ class AgGridController {
|
|
|
125597
125777
|
else {
|
|
125598
125778
|
this._grid = new Grid$1(container, this._gridOptions);
|
|
125599
125779
|
}
|
|
125600
|
-
container.addEventListener('focusout', (event) => {
|
|
125601
|
-
if (!container.contains(event.relatedTarget))
|
|
125602
|
-
this._gridOptions.api.clearFocusedCell();
|
|
125603
|
-
});
|
|
125604
125780
|
const selection = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo();
|
|
125605
125781
|
if (selection === null || selection === void 0 ? void 0 : selection.isAllRecords()) {
|
|
125606
125782
|
this.selectAll(true);
|
|
@@ -125610,6 +125786,23 @@ class AgGridController {
|
|
|
125610
125786
|
}
|
|
125611
125787
|
this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
|
|
125612
125788
|
this._customFormatters = options.customFormatters;
|
|
125789
|
+
const observerCallback = (entries) => {
|
|
125790
|
+
entries.forEach(entry => {
|
|
125791
|
+
if (entry.isIntersecting) {
|
|
125792
|
+
this._gridShowDom = true;
|
|
125793
|
+
this.peddingExecutionsOnGridShow.forEach(func => func());
|
|
125794
|
+
this.peddingExecutionsOnGridShow = [];
|
|
125795
|
+
}
|
|
125796
|
+
else {
|
|
125797
|
+
this._gridShowDom = false;
|
|
125798
|
+
}
|
|
125799
|
+
});
|
|
125800
|
+
};
|
|
125801
|
+
this.observer = new IntersectionObserver(observerCallback, {
|
|
125802
|
+
root: null,
|
|
125803
|
+
threshold: 0.1
|
|
125804
|
+
});
|
|
125805
|
+
this.observer.observe(container);
|
|
125613
125806
|
}
|
|
125614
125807
|
}
|
|
125615
125808
|
processFormatterCellCallback(params) {
|
|
@@ -125800,10 +125993,16 @@ class AgGridController {
|
|
|
125800
125993
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
125801
125994
|
}
|
|
125802
125995
|
}
|
|
125803
|
-
updateRows() {
|
|
125996
|
+
updateRows(rows) {
|
|
125804
125997
|
if (this._grid === undefined) {
|
|
125805
125998
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
125806
125999
|
}
|
|
126000
|
+
rows === null || rows === void 0 ? void 0 : rows.forEach(row => this.updateRowData(row));
|
|
126001
|
+
}
|
|
126002
|
+
updateRowData(row) {
|
|
126003
|
+
const node = this._gridOptions.api.getRowNode(row[this._idAttribName]);
|
|
126004
|
+
node.setData(Object.assign({}, row));
|
|
126005
|
+
this._editionManager.recordValidate();
|
|
125807
126006
|
}
|
|
125808
126007
|
selectAll(quietly = false) {
|
|
125809
126008
|
try {
|
|
@@ -125886,14 +126085,42 @@ class AgGridController {
|
|
|
125886
126085
|
});
|
|
125887
126086
|
r.setData(data);
|
|
125888
126087
|
});
|
|
126088
|
+
this._gridOptions.api.refreshCells({ force: true });
|
|
126089
|
+
const invalidCell = this._editionManager.getInvalidCell();
|
|
126090
|
+
if (invalidCell) {
|
|
126091
|
+
const rowNode = this._gridOptions.api.getRowNode(invalidCell.recordId);
|
|
126092
|
+
if (rowNode && invalidCell.field) {
|
|
126093
|
+
this.startEdition(rowNode.rowIndex, this._gridOptions.columnApi.getColumn(invalidCell.field.name));
|
|
126094
|
+
}
|
|
126095
|
+
}
|
|
125889
126096
|
}
|
|
125890
126097
|
}
|
|
125891
|
-
|
|
126098
|
+
savingCanceled(fields, recordId) {
|
|
126099
|
+
const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
126100
|
+
const rowIndex = this._gridOptions.api.getRowNode(recordId).rowIndex;
|
|
126101
|
+
const columnFocus = displayedColumns.find(column => this.isColumnEditable(rowIndex, column) && fields.find(field => field.name === column.getColId()));
|
|
126102
|
+
this.focusByCollAndRow(columnFocus, rowIndex);
|
|
126103
|
+
this.startEdition(rowIndex, columnFocus);
|
|
126104
|
+
}
|
|
126105
|
+
refresh(scrollToSelectedRow = false) {
|
|
125892
126106
|
if (this._grid === undefined) {
|
|
125893
126107
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
125894
126108
|
}
|
|
125895
126109
|
this._gridOptions.api.refreshServerSide({ purge: true });
|
|
125896
126110
|
this._options.onRefresh();
|
|
126111
|
+
if (scrollToSelectedRow)
|
|
126112
|
+
this.scrollToSelectedRow();
|
|
126113
|
+
}
|
|
126114
|
+
scrollToSelectedRow() {
|
|
126115
|
+
const rowNode = this._gridOptions.api.getSelectedNodes();
|
|
126116
|
+
if (!rowNode || rowNode.length === 0)
|
|
126117
|
+
return;
|
|
126118
|
+
if (this._gridShowDom) {
|
|
126119
|
+
this._gridOptions.api.ensureNodeVisible(rowNode[0]);
|
|
126120
|
+
}
|
|
126121
|
+
else {
|
|
126122
|
+
this.peddingExecutionsOnGridShow.push(() => this._gridOptions.api.ensureNodeVisible(rowNode[0]));
|
|
126123
|
+
}
|
|
125897
126124
|
}
|
|
125898
126125
|
focusOnGridContainer() {
|
|
125899
126126
|
this._container.setAttribute('tabindex', '-1');
|
|
@@ -125912,6 +126139,14 @@ class AgGridController {
|
|
|
125912
126139
|
var _a;
|
|
125913
126140
|
(_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setAutoFocus(autoFocus);
|
|
125914
126141
|
}
|
|
126142
|
+
setEnableGridInsert(enable) {
|
|
126143
|
+
var _a;
|
|
126144
|
+
(_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setEnableGridInsert(enable);
|
|
126145
|
+
}
|
|
126146
|
+
setEnableContinuousInsert(enable) {
|
|
126147
|
+
var _a;
|
|
126148
|
+
(_a = this._editionManager) === null || _a === void 0 ? void 0 : _a.setEnableContinuousInsert(enable);
|
|
126149
|
+
}
|
|
125915
126150
|
setFocusFirstRow() {
|
|
125916
126151
|
const firstRow = this._gridOptions.api.getDisplayedRowAtIndex(0);
|
|
125917
126152
|
if (firstRow) {
|
|
@@ -125927,9 +126162,38 @@ class AgGridController {
|
|
|
125927
126162
|
this.setFocusOnRow(lastRow.rowIndex);
|
|
125928
126163
|
}
|
|
125929
126164
|
}
|
|
126165
|
+
startEditionOnRowByIndex(rowIndex) {
|
|
126166
|
+
const firstCol = this.getFirstEditableColl(rowIndex);
|
|
126167
|
+
this.focusByCollAndRow(firstCol, rowIndex);
|
|
126168
|
+
this.startEdition(rowIndex, firstCol);
|
|
126169
|
+
}
|
|
126170
|
+
startEdition(rowIndex, firstCol) {
|
|
126171
|
+
this._gridOptions.api.clearRangeSelection();
|
|
126172
|
+
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstCol] });
|
|
126173
|
+
this._gridOptions.api.setFocusedCell(rowIndex, firstCol);
|
|
126174
|
+
this._gridOptions.api.startEditingCell({ rowIndex, colKey: firstCol });
|
|
126175
|
+
const cellEditor = this._gridOptions.api.getCellEditorInstances()[0];
|
|
126176
|
+
if (cellEditor) {
|
|
126177
|
+
cellEditor.focusIn();
|
|
126178
|
+
}
|
|
126179
|
+
}
|
|
126180
|
+
getFirstEditableColl(rowIndex) {
|
|
126181
|
+
const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
126182
|
+
return displayedColumns.find(column => this.isColumnEditable(rowIndex, column));
|
|
126183
|
+
}
|
|
126184
|
+
isColumnEditable(rowIndex, column) {
|
|
126185
|
+
if (column.getColDef().headerName === '' || rowIndex === -1)
|
|
126186
|
+
return false;
|
|
126187
|
+
const rowId = this._dataUnit.records[rowIndex][this._idAttribName];
|
|
126188
|
+
const rowNode = this._gridOptions.api.getRowNode(rowId);
|
|
126189
|
+
return column.isCellEditable(rowNode);
|
|
126190
|
+
}
|
|
125930
126191
|
setFocusOnRow(rowIndex) {
|
|
125931
126192
|
let displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
125932
|
-
let
|
|
126193
|
+
let firstColl = displayedColumns.find(column => column.getColDef().headerName !== '');
|
|
126194
|
+
this.focusByCollAndRow(firstColl, rowIndex);
|
|
126195
|
+
}
|
|
126196
|
+
focusByCollAndRow(firstCell, rowIndex) {
|
|
125933
126197
|
this._gridOptions.api.ensureColumnVisible(firstCell);
|
|
125934
126198
|
this._gridOptions.api.ensureIndexVisible(rowIndex);
|
|
125935
126199
|
this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
|
|
@@ -126309,6 +126573,15 @@ class AgGridController {
|
|
|
126309
126573
|
this._editionManager.setCellRenders(customRenders);
|
|
126310
126574
|
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
|
|
126311
126575
|
}
|
|
126576
|
+
clearInvalidCells(action) {
|
|
126577
|
+
if (!this._editionManager)
|
|
126578
|
+
return;
|
|
126579
|
+
this._editionManager.clearInvalidCells(action);
|
|
126580
|
+
this._gridOptions.api.refreshCells({ force: true });
|
|
126581
|
+
}
|
|
126582
|
+
destroy() {
|
|
126583
|
+
this.observer.disconnect();
|
|
126584
|
+
}
|
|
126312
126585
|
}
|
|
126313
126586
|
|
|
126314
126587
|
function enableSelectAll(total) {
|
|
@@ -126556,6 +126829,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
126556
126829
|
this.recordsValidator = undefined;
|
|
126557
126830
|
this.canEdit = true;
|
|
126558
126831
|
this.autoFocus = true;
|
|
126832
|
+
this.enableGridInsert = false;
|
|
126833
|
+
this.enableContinuousInsert = true;
|
|
126559
126834
|
}
|
|
126560
126835
|
/**
|
|
126561
126836
|
* Aplica a definição de colunas.
|
|
@@ -126882,6 +127157,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
126882
127157
|
editionIsDisabled: () => !this.canEdit,
|
|
126883
127158
|
customFormatters: this._customFormatters,
|
|
126884
127159
|
autoFocus: this.autoFocus,
|
|
127160
|
+
enableGridInsert: this.enableGridInsert,
|
|
127161
|
+
enableContinuousInsert: this.enableContinuousInsert,
|
|
126885
127162
|
onRefresh: () => {
|
|
126886
127163
|
if (this.dataUnit) {
|
|
126887
127164
|
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
@@ -126974,6 +127251,11 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
126974
127251
|
}
|
|
126975
127252
|
componentDidUpdate() {
|
|
126976
127253
|
this._gridController.setAutoFocus(this.autoFocus);
|
|
127254
|
+
this._gridController.setEnableGridInsert(this.enableGridInsert);
|
|
127255
|
+
this._gridController.setEnableContinuousInsert(this.enableContinuousInsert);
|
|
127256
|
+
if (this.dataUnit) {
|
|
127257
|
+
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
127258
|
+
}
|
|
126977
127259
|
}
|
|
126978
127260
|
getDataSource() {
|
|
126979
127261
|
var _a;
|
|
@@ -127742,6 +128024,7 @@ const EzModal$1 = class extends HTMLElement$1 {
|
|
|
127742
128024
|
this.opened = true;
|
|
127743
128025
|
this.closeEsc = false;
|
|
127744
128026
|
this.closeOutsideClick = false;
|
|
128027
|
+
this.closeOutsideLeave = false;
|
|
127745
128028
|
this.scrim = "medium";
|
|
127746
128029
|
}
|
|
127747
128030
|
observeOpened() {
|
|
@@ -127773,6 +128056,11 @@ const EzModal$1 = class extends HTMLElement$1 {
|
|
|
127773
128056
|
this.closeModal();
|
|
127774
128057
|
}
|
|
127775
128058
|
}
|
|
128059
|
+
onMouseLeaveHandler() {
|
|
128060
|
+
if (this.closeOutsideLeave) {
|
|
128061
|
+
this.closeModal();
|
|
128062
|
+
}
|
|
128063
|
+
}
|
|
127776
128064
|
render() {
|
|
127777
128065
|
const positionSufix = this.align === "left" ? "left" : "right";
|
|
127778
128066
|
const regularVerticalPaddingClass = this.heightMode === "regular" ? 'modal__vertical-padding' : '';
|
|
@@ -127780,7 +128068,7 @@ const EzModal$1 = class extends HTMLElement$1 {
|
|
|
127780
128068
|
const scrimType = `modal__screen-${this.scrim}`;
|
|
127781
128069
|
return (h(Host, null, this.opened
|
|
127782
128070
|
?
|
|
127783
|
-
h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt), tabIndex: -1 }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
|
|
128071
|
+
h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt), tabIndex: -1 }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { onMouseLeave: () => this.onMouseLeaveHandler(), class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
|
|
127784
128072
|
:
|
|
127785
128073
|
undefined));
|
|
127786
128074
|
}
|
|
@@ -127822,6 +128110,7 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
127822
128110
|
this.okButtonLabel = undefined;
|
|
127823
128111
|
this.cancelButtonStatus = undefined;
|
|
127824
128112
|
this.okButtonStatus = undefined;
|
|
128113
|
+
this.showCloseButton = true;
|
|
127825
128114
|
}
|
|
127826
128115
|
async handleEzModalAction(event) {
|
|
127827
128116
|
var _a;
|
|
@@ -127858,7 +128147,7 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
|
|
|
127858
128147
|
this._closeButton.focus();
|
|
127859
128148
|
}
|
|
127860
128149
|
render() {
|
|
127861
|
-
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", { ref: ref => this._modalRef = ref, tabIndex: -1, class: "ez-modal-container__header-container" }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--large" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
|
|
128150
|
+
return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", { ref: ref => this._modalRef = ref, tabIndex: -1, class: "ez-modal-container__header-container" }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--large" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), (this.showCloseButton && h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" })))))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
|
|
127862
128151
|
}
|
|
127863
128152
|
get _element() { return this; }
|
|
127864
128153
|
static get style() { return ezModalContainerCss; }
|
|
@@ -127965,7 +128254,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
127965
128254
|
}
|
|
127966
128255
|
async searchWithDataSource(searchArgument, fieldName) {
|
|
127967
128256
|
const { argument, mode } = searchArgument;
|
|
127968
|
-
if (mode !== 'PRELOAD') {
|
|
128257
|
+
if (mode !== 'PRELOAD' && fieldName) {
|
|
127969
128258
|
return this.dataSource.fetchData(argument, fieldName);
|
|
127970
128259
|
}
|
|
127971
128260
|
}
|
|
@@ -128376,7 +128665,7 @@ const EzPopover$1 = class extends HTMLElement$1 {
|
|
|
128376
128665
|
static get style() { return ezPopoverCss; }
|
|
128377
128666
|
};
|
|
128378
128667
|
|
|
128379
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
128668
|
+
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
128380
128669
|
|
|
128381
128670
|
const EzPopup$1 = class extends HTMLElement$1 {
|
|
128382
128671
|
constructor() {
|
|
@@ -128398,6 +128687,7 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
128398
128687
|
this.useHeader = true;
|
|
128399
128688
|
this.heightMode = "full";
|
|
128400
128689
|
this.ezTitle = undefined;
|
|
128690
|
+
this.enabledScroll = false;
|
|
128401
128691
|
}
|
|
128402
128692
|
observeConfig() {
|
|
128403
128693
|
this.manageOverflow();
|
|
@@ -128435,11 +128725,17 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
128435
128725
|
getGridSize() {
|
|
128436
128726
|
return this._sizeClasses[this.size] || this._sizeClasses["medium"];
|
|
128437
128727
|
}
|
|
128728
|
+
handlePopupHeight() {
|
|
128729
|
+
return this.heightMode === 'auto' ? 'popup__container--auto' : '';
|
|
128730
|
+
}
|
|
128731
|
+
handlePopupOverflowY() {
|
|
128732
|
+
return this.enabledScroll ? 'popup__overflow-y--auto' : '';
|
|
128733
|
+
}
|
|
128438
128734
|
componentDidRender() {
|
|
128439
128735
|
this.manageOverlay();
|
|
128440
128736
|
}
|
|
128441
128737
|
render() {
|
|
128442
|
-
return (h(Host, null, this.opened ? (h("div", { class: "overlay", ref: ref => this._popupRef = ref, tabIndex: -1 }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class:
|
|
128738
|
+
return (h(Host, null, this.opened ? (h("div", { class: "overlay", ref: ref => this._popupRef = ref, tabIndex: -1 }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class: `popup__container ${(this.handlePopupHeight())} ${this.handlePopupOverflowY()}` }, h("div", { class: "popup__content" }, h("div", { class: "popup__header " + (this.useHeader ? "popup__header--padding" : "") }, this.useHeader &&
|
|
128443
128739
|
h(Fragment, null, !!this.ezTitle && h("div", { class: "popup__title" }, this.ezTitle), h("button", { class: this.ezTitle ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezClosePopup.emit(); } }))), h("div", { class: "popup__expandable-content" }, h("slot", null))))))) : undefined));
|
|
128444
128740
|
}
|
|
128445
128741
|
get _element() { return this; }
|
|
@@ -128720,6 +129016,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
128720
129016
|
this.ignoreLimitCharsToSearch = false;
|
|
128721
129017
|
this.options = undefined;
|
|
128722
129018
|
this.suppressSearch = false;
|
|
129019
|
+
this.fromGrid = false;
|
|
128723
129020
|
}
|
|
128724
129021
|
observeErrorMessage() {
|
|
128725
129022
|
var _a;
|
|
@@ -128752,6 +129049,8 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
128752
129049
|
}
|
|
128753
129050
|
}
|
|
128754
129051
|
observeOptions(newOptions, oldOptions) {
|
|
129052
|
+
if (!newOptions.length && this.fromGrid)
|
|
129053
|
+
return;
|
|
128755
129054
|
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
128756
129055
|
return;
|
|
128757
129056
|
this.loadOptions(SearchMode.PRELOAD);
|
|
@@ -128875,7 +129174,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
128875
129174
|
if (currentValue == undefined) {
|
|
128876
129175
|
return;
|
|
128877
129176
|
}
|
|
128878
|
-
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : `${currentValue.value} - ${currentValue.label}
|
|
129177
|
+
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
|
|
128879
129178
|
text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
128880
129179
|
return text;
|
|
128881
129180
|
}
|
|
@@ -129272,7 +129571,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129272
129571
|
if (argument) {
|
|
129273
129572
|
this._showLoading = false;
|
|
129274
129573
|
this.clearSource();
|
|
129275
|
-
if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
129574
|
+
if (this.ignoreLimitCharsToSearch || !isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
|
|
129276
129575
|
this._showLoading = true;
|
|
129277
129576
|
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
129278
129577
|
this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
@@ -129344,7 +129643,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129344
129643
|
render() {
|
|
129345
129644
|
var _a;
|
|
129346
129645
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
129347
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "search" })), ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
|
|
129646
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "search" })), (((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value) || this.fromGrid)
|
|
129348
129647
|
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
129349
129648
|
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
129350
129649
|
&& this._visibleOptions.length === 0
|
|
@@ -130619,11 +130918,17 @@ const EzTabselector$1 = class extends HTMLElement$1 {
|
|
|
130619
130918
|
this.processesTabs();
|
|
130620
130919
|
}
|
|
130621
130920
|
}
|
|
130622
|
-
|
|
130921
|
+
async goToTab(tabIndex, silent = false) {
|
|
130922
|
+
const tab = this._processedTabs.find(tab => tab.index === tabIndex);
|
|
130923
|
+
this.handleTabClick(tab, !silent);
|
|
130924
|
+
}
|
|
130925
|
+
handleTabClick(tab, emitChange = true) {
|
|
130623
130926
|
this.selectedIndex = tab.index;
|
|
130624
130927
|
this._focusedIndex = undefined;
|
|
130625
130928
|
this.selectedTab = tab.tabKey;
|
|
130626
|
-
|
|
130929
|
+
if (emitChange) {
|
|
130930
|
+
this.ezChange.emit(tab);
|
|
130931
|
+
}
|
|
130627
130932
|
this.setFocusedBtn(false, tab.index);
|
|
130628
130933
|
}
|
|
130629
130934
|
componentWillLoad() {
|
|
@@ -132799,20 +133104,20 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
|
|
|
132799
133104
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"]}]);
|
|
132800
133105
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"_fieldsProps":[32]}]);
|
|
132801
133106
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"_customEditors":[32]}]);
|
|
132802
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
133107
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
132803
133108
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
132804
133109
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
132805
133110
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
132806
133111
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
132807
|
-
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]);
|
|
132808
|
-
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]},[[4,"ezCloseModal","handleEzModalAction"]]]);
|
|
133112
|
+
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"closeOutsideLeave":[4,"close-outside-leave"],"scrim":[1]}]);
|
|
133113
|
+
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"],"showCloseButton":[4,"show-close-button"]},[[4,"ezCloseModal","handleEzModalAction"]]]);
|
|
132809
133114
|
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
132810
133115
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"_value":[32]}]);
|
|
132811
133116
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
|
|
132812
|
-
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]);
|
|
133117
|
+
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"],"enabledScroll":[4,"enabled-scroll"]}]);
|
|
132813
133118
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
132814
133119
|
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
132815
|
-
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133120
|
+
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"fromGrid":[4,"from-grid"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
132816
133121
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
132817
133122
|
const EzSidebarNavigator = /*@__PURE__*/proxyCustomElement(EzSidebarNavigator$1, [1,"ez-sidebar-navigator",{"type":[1],"mode":[1025],"size":[1],"isResponsive":[4,"is-responsive"],"titleMenu":[1,"title-menu"],"showCollapseMenu":[4,"show-collapse-menu"],"showFixedButton":[4,"show-fixed-button"],"open":[32]}]);
|
|
132818
133123
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|