@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-72892.1 → 0.0.0-bugfix-dev-KB-73818.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-combo-box.cjs.entry.js +8 -0
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +3 -1
- package/dist/cjs/ez-date-input.cjs.entry.js +3 -0
- package/dist/cjs/ez-grid.cjs.entry.js +125 -60
- package/dist/cjs/ez-search.cjs.entry.js +21 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +26 -0
- package/dist/collection/components/ez-date-input/ez-date-input.js +3 -0
- package/dist/collection/components/ez-date-input/test/ez-date-input.test.js +15 -0
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +3 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +64 -34
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +24 -8
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +32 -24
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +8 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +1 -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 +2 -1
- package/dist/collection/components/ez-search/ez-search.css +7 -3
- package/dist/collection/components/ez-search/ez-search.js +38 -0
- package/dist/custom-elements/index.js +162 -64
- package/dist/esm/ez-combo-box.entry.js +8 -0
- package/dist/esm/ez-custom-form-input_2.entry.js +3 -1
- package/dist/esm/ez-date-input.entry.js +3 -0
- package/dist/esm/ez-grid.entry.js +125 -60
- package/dist/esm/ez-search.entry.js +21 -1
- 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-583e6dab.entry.js +1 -0
- package/dist/ezui/{p-75669111.entry.js → p-c3c3d640.entry.js} +1 -1
- package/dist/ezui/p-e530d7e9.entry.js +1 -0
- package/dist/ezui/p-e9649c10.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +5 -0
- package/dist/types/components/ez-date-input/test/ez-date-input.test.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +15 -3
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +9 -2
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +11 -8
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +1 -0
- package/dist/types/components/ez-search/ez-search.d.ts +7 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/ezui/p-4c799a1b.entry.js +0 -1
- package/dist/ezui/p-7922142b.entry.js +0 -1
- package/dist/ezui/p-bae4e180.entry.js +0 -1
|
@@ -27,6 +27,7 @@ export class EzSearch {
|
|
|
27
27
|
this.showSelectedValue = true;
|
|
28
28
|
this.showOptionValue = true;
|
|
29
29
|
this.suppressEmptyOption = false;
|
|
30
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
30
31
|
this.mode = "regular";
|
|
31
32
|
this.canShowError = true;
|
|
32
33
|
this.hideErrorOnFocusOut = true;
|
|
@@ -201,6 +202,9 @@ export class EzSearch {
|
|
|
201
202
|
getText() {
|
|
202
203
|
const currentValue = this.getSelectedOption(this._currentValue);
|
|
203
204
|
const text = this.getFormattedText(currentValue);
|
|
205
|
+
return this.replaceQuotes(text);
|
|
206
|
+
}
|
|
207
|
+
replaceQuotes(text) {
|
|
204
208
|
if (text == undefined) {
|
|
205
209
|
return;
|
|
206
210
|
}
|
|
@@ -489,6 +493,15 @@ export class EzSearch {
|
|
|
489
493
|
}
|
|
490
494
|
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
491
495
|
this.value = this._currentValue;
|
|
496
|
+
this.setTextInputValue();
|
|
497
|
+
}
|
|
498
|
+
setTextInputValue() {
|
|
499
|
+
if (this._textInput && (this._textInput.value === null || this._textInput.value === undefined)) {
|
|
500
|
+
if (this.value === undefined || this.value === null)
|
|
501
|
+
return;
|
|
502
|
+
const textValue = (typeof this.value === 'string') ? this.value : this.getFormattedText(this.value);
|
|
503
|
+
this._textInput.value = this.replaceQuotes(textValue);
|
|
504
|
+
}
|
|
492
505
|
}
|
|
493
506
|
loadOptionValue(argument) {
|
|
494
507
|
var _a;
|
|
@@ -637,6 +650,7 @@ export class EzSearch {
|
|
|
637
650
|
event.stopPropagation();
|
|
638
651
|
break;
|
|
639
652
|
case "Enter":
|
|
653
|
+
this.handleEventPropagation(event);
|
|
640
654
|
this.selectCurrentOption();
|
|
641
655
|
break;
|
|
642
656
|
case "Escape":
|
|
@@ -653,6 +667,12 @@ export class EzSearch {
|
|
|
653
667
|
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
654
668
|
//event.stopPropagation();
|
|
655
669
|
}
|
|
670
|
+
//O evento deve ter sua propagação interrompida, apenas se a lista de opções estiver sendo exibida.
|
|
671
|
+
handleEventPropagation(event) {
|
|
672
|
+
if (this._listContainer.hasChildNodes() && this.stopPropagateEnterKeyEvent) {
|
|
673
|
+
event.stopPropagation();
|
|
674
|
+
}
|
|
675
|
+
}
|
|
656
676
|
onTextInputFocusOutHandler() {
|
|
657
677
|
if (this.hideErrorOnFocusOut)
|
|
658
678
|
this.cancelPreselection();
|
|
@@ -839,6 +859,24 @@ export class EzSearch {
|
|
|
839
859
|
"reflect": false,
|
|
840
860
|
"defaultValue": "false"
|
|
841
861
|
},
|
|
862
|
+
"stopPropagateEnterKeyEvent": {
|
|
863
|
+
"type": "boolean",
|
|
864
|
+
"mutable": false,
|
|
865
|
+
"complexType": {
|
|
866
|
+
"original": "boolean",
|
|
867
|
+
"resolved": "boolean",
|
|
868
|
+
"references": {}
|
|
869
|
+
},
|
|
870
|
+
"required": false,
|
|
871
|
+
"optional": false,
|
|
872
|
+
"docs": {
|
|
873
|
+
"tags": [],
|
|
874
|
+
"text": "Se true, ineterrompe a propaga\u00E7\u00E3o do evento de KeyDown da tecla enter"
|
|
875
|
+
},
|
|
876
|
+
"attribute": "stop-propagate-enter-key-event",
|
|
877
|
+
"reflect": false,
|
|
878
|
+
"defaultValue": "false"
|
|
879
|
+
},
|
|
842
880
|
"mode": {
|
|
843
881
|
"type": "string",
|
|
844
882
|
"mutable": false,
|
|
@@ -2903,6 +2903,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2903
2903
|
this.suppressSearch = false;
|
|
2904
2904
|
this.optionLoader = undefined;
|
|
2905
2905
|
this.suppressEmptyOption = false;
|
|
2906
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
2906
2907
|
this.canShowError = true;
|
|
2907
2908
|
this.mode = "regular";
|
|
2908
2909
|
this.hideErrorOnFocusOut = true;
|
|
@@ -3365,6 +3366,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3365
3366
|
event.stopPropagation();
|
|
3366
3367
|
break;
|
|
3367
3368
|
case "Enter":
|
|
3369
|
+
this.handleEventPropagation(event);
|
|
3368
3370
|
this.selectCurrentOption();
|
|
3369
3371
|
break;
|
|
3370
3372
|
case "Escape":
|
|
@@ -3380,6 +3382,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3380
3382
|
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
3381
3383
|
//event.stopPropagation();
|
|
3382
3384
|
}
|
|
3385
|
+
//O evento deve ter sua propagação interrompida, apenas se a lista de opções estiver sendo exibida.
|
|
3386
|
+
handleEventPropagation(event) {
|
|
3387
|
+
if (this._listContainer.hasChildNodes() && this.stopPropagateEnterKeyEvent) {
|
|
3388
|
+
event.stopPropagation();
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
3383
3391
|
onTextInputFocusOutHandler() {
|
|
3384
3392
|
if (this.hideErrorOnFocusOut)
|
|
3385
3393
|
this.cancelPreselection();
|
|
@@ -3461,7 +3469,9 @@ const EzCustomFormInput$1 = class extends HTMLElement$1 {
|
|
|
3461
3469
|
this.getContent();
|
|
3462
3470
|
}
|
|
3463
3471
|
watchSelectedRecord(newValue, oldValue) {
|
|
3464
|
-
|
|
3472
|
+
const newRecordId = newValue === null || newValue === void 0 ? void 0 : newValue['__record__id__'];
|
|
3473
|
+
const oldRecordId = oldValue === null || oldValue === void 0 ? void 0 : oldValue['__record__id__'];
|
|
3474
|
+
if (newRecordId !== oldRecordId) {
|
|
3465
3475
|
this.getContent();
|
|
3466
3476
|
}
|
|
3467
3477
|
}
|
|
@@ -3624,6 +3634,9 @@ const EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
3624
3634
|
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
3625
3635
|
this.value = newValueValidated;
|
|
3626
3636
|
}
|
|
3637
|
+
else {
|
|
3638
|
+
this._changePending = false;
|
|
3639
|
+
}
|
|
3627
3640
|
}
|
|
3628
3641
|
showCalendar() {
|
|
3629
3642
|
this.handleBlur();
|
|
@@ -124477,6 +124490,17 @@ class DataSourceInterceptor {
|
|
|
124477
124490
|
}
|
|
124478
124491
|
|
|
124479
124492
|
class DataSource {
|
|
124493
|
+
handleDataSaved(action) {
|
|
124494
|
+
this._controller.clearInvalidCells();
|
|
124495
|
+
this.handleRefreshOrReload(action);
|
|
124496
|
+
this._controller.processContinuousInsert();
|
|
124497
|
+
}
|
|
124498
|
+
handleEditionCanceled(action) {
|
|
124499
|
+
if (this._options.enableGridInsert) {
|
|
124500
|
+
this._controller.processEditionCanceled();
|
|
124501
|
+
}
|
|
124502
|
+
this.handleRefreshOrReload(action);
|
|
124503
|
+
}
|
|
124480
124504
|
handleSavingCanceled(action) {
|
|
124481
124505
|
var _a, _b, _c, _d;
|
|
124482
124506
|
if (!((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fields) || !((_b = action.payload) === null || _b === void 0 ? void 0 : _b.recordId))
|
|
@@ -124484,12 +124508,17 @@ class DataSource {
|
|
|
124484
124508
|
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);
|
|
124485
124509
|
}
|
|
124486
124510
|
handleDataChanged(action) {
|
|
124487
|
-
var _a, _b;
|
|
124488
124511
|
if (!this._options.enableGridInsert) {
|
|
124489
124512
|
this.handleRefresh(action);
|
|
124490
124513
|
return;
|
|
124491
124514
|
}
|
|
124492
|
-
this.updateGridRowNodes((
|
|
124515
|
+
this.updateGridRowNodes(this.createRecordIdList(action));
|
|
124516
|
+
}
|
|
124517
|
+
createRecordIdList(action) {
|
|
124518
|
+
var _a, _b;
|
|
124519
|
+
if ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.records)
|
|
124520
|
+
return (_b = action.payload) === null || _b === void 0 ? void 0 : _b.records;
|
|
124521
|
+
return this._dataUnit.getSelectedRecord() ? [this._dataUnit.getSelectedRecord().__record__id__] : [];
|
|
124493
124522
|
}
|
|
124494
124523
|
/**
|
|
124495
124524
|
* Nesse ponto, o registro já se encontra atualizado no DU,
|
|
@@ -124539,10 +124568,8 @@ class DataSource {
|
|
|
124539
124568
|
* e callbacks implementados no AgGridController e GridEditionManager.
|
|
124540
124569
|
*/
|
|
124541
124570
|
setTimeout(() => {
|
|
124542
|
-
|
|
124543
|
-
|
|
124544
|
-
this._controller.startEditionOnRowByIndex(newRowIndex);
|
|
124545
|
-
}, 500);
|
|
124571
|
+
this._controller.startEditionOnLastRow();
|
|
124572
|
+
}, 1000);
|
|
124546
124573
|
}
|
|
124547
124574
|
updateLoadedRecords(action) {
|
|
124548
124575
|
const records = action.payload;
|
|
@@ -124596,12 +124623,14 @@ class DataSource {
|
|
|
124596
124623
|
}
|
|
124597
124624
|
break;
|
|
124598
124625
|
case Action.RECORDS_ADDED:
|
|
124626
|
+
case Action.RECORDS_COPIED:
|
|
124599
124627
|
this.handleRecordsAdded();
|
|
124600
124628
|
break;
|
|
124601
124629
|
case Action.DATA_SAVED:
|
|
124630
|
+
this.handleDataSaved(action);
|
|
124631
|
+
break;
|
|
124602
124632
|
case Action.EDITION_CANCELED:
|
|
124603
|
-
this.
|
|
124604
|
-
this.handleRefreshOrReload(action);
|
|
124633
|
+
this.handleEditionCanceled(action);
|
|
124605
124634
|
break;
|
|
124606
124635
|
case Action.DATA_CHANGED:
|
|
124607
124636
|
case Action.DATA_RESOLVED:
|
|
@@ -125078,6 +125107,7 @@ const buildComboBox = ({ required, props, eGridCell }) => {
|
|
|
125078
125107
|
mode="slim"
|
|
125079
125108
|
/>`);
|
|
125080
125109
|
combo.options = options;
|
|
125110
|
+
combo.stopPropagateEnterKeyEvent = true;
|
|
125081
125111
|
combo.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
125082
125112
|
return combo;
|
|
125083
125113
|
};
|
|
@@ -125110,6 +125140,7 @@ const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
|
|
|
125110
125140
|
ezSearch.ensureClearButtonVisible = true;
|
|
125111
125141
|
ezSearch.suppressPreLoad = true;
|
|
125112
125142
|
ezSearch.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
125143
|
+
ezSearch.stopPropagateEnterKeyEvent = true;
|
|
125113
125144
|
ezSearch.valueGetter = () => ezSearch.getValueAsync();
|
|
125114
125145
|
return ezSearch;
|
|
125115
125146
|
};
|
|
@@ -125153,6 +125184,14 @@ class EzCellEditor {
|
|
|
125153
125184
|
getValue() {
|
|
125154
125185
|
return this._gui.valueGetter != undefined ? this._gui.valueGetter() : this._gui.value;
|
|
125155
125186
|
}
|
|
125187
|
+
setGuiValue(value) {
|
|
125188
|
+
if (this._gui.valueSetter != undefined) {
|
|
125189
|
+
this._gui.valueSetter(value);
|
|
125190
|
+
}
|
|
125191
|
+
else {
|
|
125192
|
+
this._gui.value = value;
|
|
125193
|
+
}
|
|
125194
|
+
}
|
|
125156
125195
|
isPopup() {
|
|
125157
125196
|
return this._gui.isPopUp;
|
|
125158
125197
|
}
|
|
@@ -125308,7 +125347,7 @@ class EzGridCustomCellRender extends EzCellRender {
|
|
|
125308
125347
|
}
|
|
125309
125348
|
|
|
125310
125349
|
class GridEditionManager {
|
|
125311
|
-
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert) {
|
|
125350
|
+
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert) {
|
|
125312
125351
|
this._dataUnit = dataUnit;
|
|
125313
125352
|
this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
125314
125353
|
getRequiredFields: () => this.getRequiredFields(),
|
|
@@ -125318,6 +125357,7 @@ class GridEditionManager {
|
|
|
125318
125357
|
this._useEnterLikeTab = useEnterLikeTab;
|
|
125319
125358
|
this._editionIsDisabled = editionIsDisabled;
|
|
125320
125359
|
this._enableContinuousInsert = enableContinuousInsert;
|
|
125360
|
+
this._enableGridInsert = enableGridInsert;
|
|
125321
125361
|
this._customEditors = customEditors;
|
|
125322
125362
|
this._customRenders = customRenders;
|
|
125323
125363
|
}
|
|
@@ -125332,6 +125372,16 @@ class GridEditionManager {
|
|
|
125332
125372
|
};
|
|
125333
125373
|
return options;
|
|
125334
125374
|
}
|
|
125375
|
+
updateCurrentEditorGuiValue(updatedRowValue) {
|
|
125376
|
+
const editorInstances = this._gridOptions.api.getCellEditorInstances();
|
|
125377
|
+
if (!editorInstances || !editorInstances.length)
|
|
125378
|
+
return;
|
|
125379
|
+
const currentEditor = editorInstances[0];
|
|
125380
|
+
const fieldMetadata = currentEditor.getFieldMetadata();
|
|
125381
|
+
const fieldName = fieldMetadata.name;
|
|
125382
|
+
const value = updatedRowValue[fieldName];
|
|
125383
|
+
currentEditor.setGuiValue(value);
|
|
125384
|
+
}
|
|
125335
125385
|
canContinuousInsert() {
|
|
125336
125386
|
var _a;
|
|
125337
125387
|
return this._enableContinuousInsert && (this._dataUnit.records.length - 1) === ((_a = this._lastCellEdited) === null || _a === void 0 ? void 0 : _a.rowIndex);
|
|
@@ -125341,7 +125391,7 @@ class GridEditionManager {
|
|
|
125341
125391
|
this.saveSuccess();
|
|
125342
125392
|
return;
|
|
125343
125393
|
}
|
|
125344
|
-
if (!this._isGridEdition
|
|
125394
|
+
if (!this._isGridEdition) {
|
|
125345
125395
|
return;
|
|
125346
125396
|
}
|
|
125347
125397
|
const currentRercord = this._dataUnit.getSelectedRecord();
|
|
@@ -125353,14 +125403,7 @@ class GridEditionManager {
|
|
|
125353
125403
|
.validate(true)
|
|
125354
125404
|
.then(() => {
|
|
125355
125405
|
this._dataUnit.saveData()
|
|
125356
|
-
.then(() =>
|
|
125357
|
-
if (this.canContinuousInsert()) {
|
|
125358
|
-
this._dataUnit.addRecord();
|
|
125359
|
-
}
|
|
125360
|
-
else {
|
|
125361
|
-
this.saveSuccess();
|
|
125362
|
-
}
|
|
125363
|
-
})
|
|
125406
|
+
.then(() => this.saveSuccess())
|
|
125364
125407
|
.catch(reason => this.saveFail(reason));
|
|
125365
125408
|
})
|
|
125366
125409
|
.catch(reason => this.saveFail(reason));
|
|
@@ -125458,11 +125501,12 @@ class GridEditionManager {
|
|
|
125458
125501
|
}
|
|
125459
125502
|
}
|
|
125460
125503
|
focusOnCell(cell) {
|
|
125504
|
+
var _a;
|
|
125461
125505
|
if (cell == undefined) {
|
|
125462
125506
|
return;
|
|
125463
125507
|
}
|
|
125464
125508
|
const { rowIndex, column } = cell;
|
|
125465
|
-
this._gridOptions.api.getDisplayedRowAtIndex(rowIndex).setSelected(true, true);
|
|
125509
|
+
(_a = this._gridOptions.api.getDisplayedRowAtIndex(rowIndex)) === null || _a === void 0 ? void 0 : _a.setSelected(true, true);
|
|
125466
125510
|
this._gridOptions.api.clearRangeSelection();
|
|
125467
125511
|
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [column] });
|
|
125468
125512
|
this._gridOptions.api.startEditingCell({ colKey: column.getColId(), rowIndex });
|
|
@@ -125502,9 +125546,10 @@ class GridEditionManager {
|
|
|
125502
125546
|
}
|
|
125503
125547
|
}
|
|
125504
125548
|
else {
|
|
125549
|
+
const actualRowIndex = rowIndex;
|
|
125505
125550
|
rowIndex = rowIndex + 1;
|
|
125506
125551
|
if (rowIndex >= this._dataUnit.records.length) {
|
|
125507
|
-
rowIndex = 0;
|
|
125552
|
+
rowIndex = !this._enableGridInsert ? 0 : actualRowIndex;
|
|
125508
125553
|
}
|
|
125509
125554
|
}
|
|
125510
125555
|
this._targetEditionCell = new TargetEdition(rowIndex, column, true);
|
|
@@ -125573,7 +125618,7 @@ class GridEditionManager {
|
|
|
125573
125618
|
event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: value }));
|
|
125574
125619
|
}
|
|
125575
125620
|
this._isGridEdition = true;
|
|
125576
|
-
this._dataUnit.setFieldValue(fieldName, value, [event.data.__record__id__]);
|
|
125621
|
+
this._dataUnit.setFieldValue(fieldName, value, [event.data.__record__id__], { suppressCreateNewRecord: true });
|
|
125577
125622
|
this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
|
|
125578
125623
|
}
|
|
125579
125624
|
}
|
|
@@ -125589,14 +125634,16 @@ class GridEditionManager {
|
|
|
125589
125634
|
getInvalidCell() {
|
|
125590
125635
|
return this._invalidCell;
|
|
125591
125636
|
}
|
|
125592
|
-
|
|
125637
|
+
processContinuousInsert() {
|
|
125638
|
+
if (!this.canContinuousInsert())
|
|
125639
|
+
return;
|
|
125640
|
+
this._dataUnit.addRecord();
|
|
125641
|
+
}
|
|
125642
|
+
clearInvalidCells(stopEdition) {
|
|
125593
125643
|
this._invalidCell = undefined;
|
|
125594
|
-
if (
|
|
125644
|
+
if (stopEdition) {
|
|
125595
125645
|
this._isGridEdition = false;
|
|
125596
125646
|
}
|
|
125597
|
-
else if (action === Action.DATA_SAVED && this.canContinuousInsert()) {
|
|
125598
|
-
this._dataUnit.addRecord();
|
|
125599
|
-
}
|
|
125600
125647
|
}
|
|
125601
125648
|
setEnableContinuousInsert(enable) {
|
|
125602
125649
|
this._enableContinuousInsert = enable;
|
|
@@ -125741,7 +125788,7 @@ class AgGridController {
|
|
|
125741
125788
|
this._doubleClickCallBack = options.onDoubleClick;
|
|
125742
125789
|
this._multipleSelection = options.allowMultipleSelection;
|
|
125743
125790
|
this._dataUnit = options.dataUnit;
|
|
125744
|
-
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert);
|
|
125791
|
+
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert, options.enableGridInsert);
|
|
125745
125792
|
this._statusResolver = options.statusResolver;
|
|
125746
125793
|
if (this._dataUnit) {
|
|
125747
125794
|
this._dataUnit.sortingProvider = this;
|
|
@@ -126019,6 +126066,7 @@ class AgGridController {
|
|
|
126019
126066
|
updateRowData(row) {
|
|
126020
126067
|
const node = this._gridOptions.api.getRowNode(row[this._idAttribName]);
|
|
126021
126068
|
node.setData(Object.assign({}, row));
|
|
126069
|
+
this._editionManager.updateCurrentEditorGuiValue(row);
|
|
126022
126070
|
this._editionManager.recordValidate();
|
|
126023
126071
|
}
|
|
126024
126072
|
selectAll(quietly = false) {
|
|
@@ -126180,10 +126228,20 @@ class AgGridController {
|
|
|
126180
126228
|
}
|
|
126181
126229
|
}
|
|
126182
126230
|
startEditionOnRowByIndex(rowIndex) {
|
|
126231
|
+
this._dataUnit.setSelectionByIndex([rowIndex]);
|
|
126183
126232
|
const firstCol = this.getFirstEditableColl(rowIndex);
|
|
126233
|
+
if (!firstCol)
|
|
126234
|
+
return;
|
|
126184
126235
|
this.focusByCollAndRow(firstCol, rowIndex);
|
|
126185
126236
|
this.startEdition(rowIndex, firstCol);
|
|
126186
126237
|
}
|
|
126238
|
+
startEditionOnLastRow() {
|
|
126239
|
+
var _a;
|
|
126240
|
+
if (this._gridShowDom) {
|
|
126241
|
+
const newRowIndex = ((_a = this._dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) - 1;
|
|
126242
|
+
this.startEditionOnRowByIndex(newRowIndex);
|
|
126243
|
+
}
|
|
126244
|
+
}
|
|
126187
126245
|
startEdition(rowIndex, firstCol) {
|
|
126188
126246
|
this._gridOptions.api.clearRangeSelection();
|
|
126189
126247
|
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstCol] });
|
|
@@ -126195,8 +126253,13 @@ class AgGridController {
|
|
|
126195
126253
|
}
|
|
126196
126254
|
}
|
|
126197
126255
|
getFirstEditableColl(rowIndex) {
|
|
126198
|
-
|
|
126199
|
-
|
|
126256
|
+
try {
|
|
126257
|
+
const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
126258
|
+
return displayedColumns.find(column => this.isColumnEditable(rowIndex, column));
|
|
126259
|
+
}
|
|
126260
|
+
catch (e) {
|
|
126261
|
+
console.warn(e);
|
|
126262
|
+
}
|
|
126200
126263
|
}
|
|
126201
126264
|
isColumnEditable(rowIndex, column) {
|
|
126202
126265
|
if (column.getColDef().headerName === '' || rowIndex === -1)
|
|
@@ -126532,36 +126595,41 @@ class AgGridController {
|
|
|
126532
126595
|
return false;
|
|
126533
126596
|
}
|
|
126534
126597
|
onSelectionChange(event) {
|
|
126535
|
-
if (this._selectionChangeCallback)
|
|
126536
|
-
|
|
126537
|
-
|
|
126538
|
-
|
|
126539
|
-
|
|
126540
|
-
|
|
126541
|
-
|
|
126542
|
-
|
|
126543
|
-
|
|
126544
|
-
|
|
126545
|
-
|
|
126546
|
-
}
|
|
126547
|
-
else {
|
|
126548
|
-
this._dataUnit.updatePageSelection(this._gridOptions.api.getSelectedRows().map((r) => r.__record__id__)).then(selectionInfo => {
|
|
126549
|
-
this._selectionChangeCallback({
|
|
126550
|
-
selection: selectionInfo.records,
|
|
126551
|
-
selectionHeaderStatus: this.getSelectionHeaderStatus(),
|
|
126552
|
-
});
|
|
126553
|
-
});
|
|
126554
|
-
}
|
|
126555
|
-
}
|
|
126556
|
-
else {
|
|
126557
|
-
this._selectionChangeCallback({
|
|
126558
|
-
selection: this._gridOptions.api.getSelectedRows(),
|
|
126559
|
-
selectionHeaderStatus: this.getSelectionHeaderStatus(),
|
|
126560
|
-
});
|
|
126561
|
-
}
|
|
126562
|
-
}, 0);
|
|
126598
|
+
if (!this._selectionChangeCallback)
|
|
126599
|
+
return;
|
|
126600
|
+
clearTimeout(this._selectionChangeDeboucing);
|
|
126601
|
+
this._selectionChangeDeboucing = window.setTimeout(() => {
|
|
126602
|
+
this.handleExecuteProceedAutosave();
|
|
126603
|
+
this.processBuildSelectionChangeCallback(event);
|
|
126604
|
+
}, 0);
|
|
126605
|
+
}
|
|
126606
|
+
handleExecuteProceedAutosave() {
|
|
126607
|
+
if (this._gridShowDom) {
|
|
126608
|
+
this._editionManager.proceedAutoSave();
|
|
126563
126609
|
}
|
|
126564
126610
|
}
|
|
126611
|
+
processBuildSelectionChangeCallback(event) {
|
|
126612
|
+
if (this._dataUnit) {
|
|
126613
|
+
this.handleBuildSelectionChangeWithDU(event.context.selectionChangeQuietly);
|
|
126614
|
+
return;
|
|
126615
|
+
}
|
|
126616
|
+
this.buildSelectionChangeCallback(this._gridOptions.api.getSelectedRows());
|
|
126617
|
+
}
|
|
126618
|
+
handleBuildSelectionChangeWithDU(quietly) {
|
|
126619
|
+
if (quietly) {
|
|
126620
|
+
this.buildSelectionChangeCallback(this._dataUnit.records);
|
|
126621
|
+
return;
|
|
126622
|
+
}
|
|
126623
|
+
this._dataUnit.updatePageSelection(this._gridOptions.api.getSelectedRows()
|
|
126624
|
+
.map((r) => r.__record__id__))
|
|
126625
|
+
.then(selectionInfo => this.buildSelectionChangeCallback(selectionInfo.records));
|
|
126626
|
+
}
|
|
126627
|
+
buildSelectionChangeCallback(records) {
|
|
126628
|
+
this._selectionChangeCallback({
|
|
126629
|
+
selection: records,
|
|
126630
|
+
selectionHeaderStatus: this.getSelectionHeaderStatus(),
|
|
126631
|
+
});
|
|
126632
|
+
}
|
|
126565
126633
|
onRowDoubleClick(evt) {
|
|
126566
126634
|
if (this._doubleClickCallBack) {
|
|
126567
126635
|
this._doubleClickCallBack(evt.data);
|
|
@@ -126572,6 +126640,12 @@ class AgGridController {
|
|
|
126572
126640
|
host[attribute] = value;
|
|
126573
126641
|
}
|
|
126574
126642
|
}
|
|
126643
|
+
processEditionCanceled() {
|
|
126644
|
+
this.clearInvalidCells(true);
|
|
126645
|
+
if (this._gridShowDom) {
|
|
126646
|
+
this._dataUnit.clearSelection();
|
|
126647
|
+
}
|
|
126648
|
+
}
|
|
126575
126649
|
setCellEditors(customEditors) {
|
|
126576
126650
|
var _a;
|
|
126577
126651
|
if (!this._editionManager) {
|
|
@@ -126590,12 +126664,15 @@ class AgGridController {
|
|
|
126590
126664
|
this._editionManager.setCellRenders(customRenders);
|
|
126591
126665
|
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
|
|
126592
126666
|
}
|
|
126593
|
-
clearInvalidCells(
|
|
126667
|
+
clearInvalidCells(stopEdition) {
|
|
126594
126668
|
if (!this._editionManager)
|
|
126595
126669
|
return;
|
|
126596
|
-
this._editionManager.clearInvalidCells(
|
|
126670
|
+
this._editionManager.clearInvalidCells(stopEdition);
|
|
126597
126671
|
this._gridOptions.api.refreshCells({ force: true });
|
|
126598
126672
|
}
|
|
126673
|
+
processContinuousInsert() {
|
|
126674
|
+
this._editionManager.processContinuousInsert();
|
|
126675
|
+
}
|
|
126599
126676
|
destroy() {
|
|
126600
126677
|
this.observer.disconnect();
|
|
126601
126678
|
}
|
|
@@ -127234,7 +127311,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
127234
127311
|
return this._getActualPageLabel() + this._getRemainingPageLabel();
|
|
127235
127312
|
}
|
|
127236
127313
|
_initHeaderOverflowWatcher() {
|
|
127237
|
-
|
|
127314
|
+
if (this._refPaginationControl)
|
|
127315
|
+
this._headerOverflowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
|
|
127238
127316
|
}
|
|
127239
127317
|
buildOverFlowWatcherParams() {
|
|
127240
127318
|
return {
|
|
@@ -129016,7 +129094,7 @@ class ScrollCtrl {
|
|
|
129016
129094
|
}
|
|
129017
129095
|
}
|
|
129018
129096
|
|
|
129019
|
-
const ezSearchCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:
|
|
129097
|
+
const ezSearchCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);--ez-search__dropdown--max-height:350px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:var(--ez-search__dropdown--max-height);min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--2xs, 8px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}";
|
|
129020
129098
|
|
|
129021
129099
|
const EzSearch$1 = class extends HTMLElement$1 {
|
|
129022
129100
|
constructor() {
|
|
@@ -129046,6 +129124,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129046
129124
|
this.showSelectedValue = true;
|
|
129047
129125
|
this.showOptionValue = true;
|
|
129048
129126
|
this.suppressEmptyOption = false;
|
|
129127
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
129049
129128
|
this.mode = "regular";
|
|
129050
129129
|
this.canShowError = true;
|
|
129051
129130
|
this.hideErrorOnFocusOut = true;
|
|
@@ -129220,6 +129299,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129220
129299
|
getText() {
|
|
129221
129300
|
const currentValue = this.getSelectedOption(this._currentValue);
|
|
129222
129301
|
const text = this.getFormattedText(currentValue);
|
|
129302
|
+
return this.replaceQuotes(text);
|
|
129303
|
+
}
|
|
129304
|
+
replaceQuotes(text) {
|
|
129223
129305
|
if (text == undefined) {
|
|
129224
129306
|
return;
|
|
129225
129307
|
}
|
|
@@ -129508,6 +129590,15 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129508
129590
|
}
|
|
129509
129591
|
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
129510
129592
|
this.value = this._currentValue;
|
|
129593
|
+
this.setTextInputValue();
|
|
129594
|
+
}
|
|
129595
|
+
setTextInputValue() {
|
|
129596
|
+
if (this._textInput && (this._textInput.value === null || this._textInput.value === undefined)) {
|
|
129597
|
+
if (this.value === undefined || this.value === null)
|
|
129598
|
+
return;
|
|
129599
|
+
const textValue = (typeof this.value === 'string') ? this.value : this.getFormattedText(this.value);
|
|
129600
|
+
this._textInput.value = this.replaceQuotes(textValue);
|
|
129601
|
+
}
|
|
129511
129602
|
}
|
|
129512
129603
|
loadOptionValue(argument) {
|
|
129513
129604
|
var _a;
|
|
@@ -129656,6 +129747,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129656
129747
|
event.stopPropagation();
|
|
129657
129748
|
break;
|
|
129658
129749
|
case "Enter":
|
|
129750
|
+
this.handleEventPropagation(event);
|
|
129659
129751
|
this.selectCurrentOption();
|
|
129660
129752
|
break;
|
|
129661
129753
|
case "Escape":
|
|
@@ -129672,6 +129764,12 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129672
129764
|
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
129673
129765
|
//event.stopPropagation();
|
|
129674
129766
|
}
|
|
129767
|
+
//O evento deve ter sua propagação interrompida, apenas se a lista de opções estiver sendo exibida.
|
|
129768
|
+
handleEventPropagation(event) {
|
|
129769
|
+
if (this._listContainer.hasChildNodes() && this.stopPropagateEnterKeyEvent) {
|
|
129770
|
+
event.stopPropagation();
|
|
129771
|
+
}
|
|
129772
|
+
}
|
|
129675
129773
|
onTextInputFocusOutHandler() {
|
|
129676
129774
|
if (this.hideErrorOnFocusOut)
|
|
129677
129775
|
this.cancelPreselection();
|
|
@@ -133133,7 +133231,7 @@ const EzChart = /*@__PURE__*/proxyCustomElement(EzChart$1, [1,"ez-chart",{"type"
|
|
|
133133
133231
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
133134
133232
|
const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"]}]);
|
|
133135
133233
|
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32]}]);
|
|
133136
|
-
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133234
|
+
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133137
133235
|
const EzCustomFormInput = /*@__PURE__*/proxyCustomElement(EzCustomFormInput$1, [2,"ez-custom-form-input",{"customEditor":[16],"formViewField":[16],"value":[1032],"detailContext":[1,"detail-context"],"builderFallback":[16],"selectedRecord":[16],"gui":[32]}]);
|
|
133138
133236
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
133139
133237
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
@@ -133156,7 +133254,7 @@ const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{
|
|
|
133156
133254
|
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"]}]);
|
|
133157
133255
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
133158
133256
|
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"]]]);
|
|
133159
|
-
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"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133257
|
+
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"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"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"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133160
133258
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
133161
133259
|
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]}]);
|
|
133162
133260
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
@@ -34,6 +34,7 @@ const EzComboBox = class {
|
|
|
34
34
|
this.suppressSearch = false;
|
|
35
35
|
this.optionLoader = undefined;
|
|
36
36
|
this.suppressEmptyOption = false;
|
|
37
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
37
38
|
this.canShowError = true;
|
|
38
39
|
this.mode = "regular";
|
|
39
40
|
this.hideErrorOnFocusOut = true;
|
|
@@ -496,6 +497,7 @@ const EzComboBox = class {
|
|
|
496
497
|
event.stopPropagation();
|
|
497
498
|
break;
|
|
498
499
|
case "Enter":
|
|
500
|
+
this.handleEventPropagation(event);
|
|
499
501
|
this.selectCurrentOption();
|
|
500
502
|
break;
|
|
501
503
|
case "Escape":
|
|
@@ -511,6 +513,12 @@ const EzComboBox = class {
|
|
|
511
513
|
//e o contexto pode reagir (fechar um popup por exemplo).
|
|
512
514
|
//event.stopPropagation();
|
|
513
515
|
}
|
|
516
|
+
//O evento deve ter sua propagação interrompida, apenas se a lista de opções estiver sendo exibida.
|
|
517
|
+
handleEventPropagation(event) {
|
|
518
|
+
if (this._listContainer.hasChildNodes() && this.stopPropagateEnterKeyEvent) {
|
|
519
|
+
event.stopPropagation();
|
|
520
|
+
}
|
|
521
|
+
}
|
|
514
522
|
onTextInputFocusOutHandler() {
|
|
515
523
|
if (this.hideErrorOnFocusOut)
|
|
516
524
|
this.cancelPreselection();
|
|
@@ -54,7 +54,9 @@ const EzCustomFormInput = class {
|
|
|
54
54
|
this.getContent();
|
|
55
55
|
}
|
|
56
56
|
watchSelectedRecord(newValue, oldValue) {
|
|
57
|
-
|
|
57
|
+
const newRecordId = newValue === null || newValue === void 0 ? void 0 : newValue['__record__id__'];
|
|
58
|
+
const oldRecordId = oldValue === null || oldValue === void 0 ? void 0 : oldValue['__record__id__'];
|
|
59
|
+
if (newRecordId !== oldRecordId) {
|
|
58
60
|
this.getContent();
|
|
59
61
|
}
|
|
60
62
|
}
|
|
@@ -88,6 +88,9 @@ const EzDateInput = class {
|
|
|
88
88
|
if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
|
|
89
89
|
this.value = newValueValidated;
|
|
90
90
|
}
|
|
91
|
+
else {
|
|
92
|
+
this._changePending = false;
|
|
93
|
+
}
|
|
91
94
|
}
|
|
92
95
|
showCalendar() {
|
|
93
96
|
this.handleBlur();
|