@sankhyalabs/ezui 5.11.0-dev.1 → 5.11.0-dev.10
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/README.md +8 -10
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +11 -3
- package/dist/cjs/ez-form-view.cjs.entry.js +42 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -1
- package/dist/cjs/ez-grid.cjs.entry.js +87 -38
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -1
- package/dist/cjs/ez-search.cjs.entry.js +3 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +30 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-card-item/ez-card-item.css +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +47 -3
- package/dist/collection/components/ez-form/ez-form.js +20 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +23 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +4 -1
- package/dist/collection/components/ez-form-view/structure/index.js +34 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.js +11 -39
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +50 -8
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +78 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +21 -1
- package/dist/collection/components/ez-search/ez-search.js +39 -1
- package/dist/collection/utils/form/DataBinder.js +1 -1
- package/dist/custom-elements/index.js +184 -58
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +11 -3
- package/dist/esm/ez-form-view.entry.js +42 -1
- package/dist/esm/ez-form.entry.js +2 -1
- package/dist/esm/ez-grid.entry.js +88 -39
- package/dist/esm/ez-multi-selection-list.entry.js +3 -1
- package/dist/esm/ez-search.entry.js +3 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +30 -7
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-061f4d73.entry.js +1 -0
- package/dist/ezui/p-25562cf8.entry.js +1 -0
- package/dist/ezui/p-3078d25c.entry.js +1 -0
- package/dist/ezui/{p-68352e41.entry.js → p-47afb974.entry.js} +1 -1
- package/dist/ezui/p-5e55a42b.entry.js +1 -0
- package/dist/ezui/p-7526f2b6.entry.js +1 -0
- package/dist/ezui/{p-fd54b5b4.entry.js → p-964e5571.entry.js} +2 -2
- package/dist/ezui/p-df93558d.entry.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +9 -0
- package/dist/types/components/ez-form/ez-form.d.ts +5 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +5 -0
- package/dist/types/components/ez-form-view/structure/index.d.ts +15 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +3 -5
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +16 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +8 -0
- package/dist/types/components.d.ts +51 -0
- package/package.json +7 -9
- package/dist/ezui/p-2a0e1679.entry.js +0 -1
- package/dist/ezui/p-4535da17.entry.js +0 -1
- package/dist/ezui/p-4c8b029b.entry.js +0 -1
- package/dist/ezui/p-4e31b69b.entry.js +0 -1
- package/dist/ezui/p-90fa4cb3.entry.js +0 -1
- package/dist/ezui/p-9f41b414.entry.js +0 -1
|
@@ -14,6 +14,7 @@ export class EzMuiltiSelectionList {
|
|
|
14
14
|
this.dataSource = undefined;
|
|
15
15
|
this.useOptions = false;
|
|
16
16
|
this.options = undefined;
|
|
17
|
+
this.isTextSearch = false;
|
|
17
18
|
this.filteredOptions = undefined;
|
|
18
19
|
this.displayOptions = undefined;
|
|
19
20
|
this.viewScenario = undefined;
|
|
@@ -96,6 +97,7 @@ export class EzMuiltiSelectionList {
|
|
|
96
97
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
|
|
97
98
|
}
|
|
98
99
|
this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
|
|
100
|
+
this.searchInput.value = "";
|
|
99
101
|
}
|
|
100
102
|
handleRemoveItemFromOptions(item) {
|
|
101
103
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
|
|
@@ -159,7 +161,7 @@ export class EzMuiltiSelectionList {
|
|
|
159
161
|
return scenarios[view];
|
|
160
162
|
}
|
|
161
163
|
render() {
|
|
162
|
-
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this) })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
164
|
+
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this), isTextSearch: this.isTextSearch })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
163
165
|
}
|
|
164
166
|
static get is() { return "ez-multi-selection-list"; }
|
|
165
167
|
static get encapsulation() { return "scoped"; }
|
|
@@ -249,6 +251,24 @@ export class EzMuiltiSelectionList {
|
|
|
249
251
|
"tags": [],
|
|
250
252
|
"text": "Op\u00E7\u00F5es de filtros a serem exibidas na listagem."
|
|
251
253
|
}
|
|
254
|
+
},
|
|
255
|
+
"isTextSearch": {
|
|
256
|
+
"type": "boolean",
|
|
257
|
+
"mutable": false,
|
|
258
|
+
"complexType": {
|
|
259
|
+
"original": "boolean",
|
|
260
|
+
"resolved": "boolean",
|
|
261
|
+
"references": {}
|
|
262
|
+
},
|
|
263
|
+
"required": false,
|
|
264
|
+
"optional": false,
|
|
265
|
+
"docs": {
|
|
266
|
+
"tags": [],
|
|
267
|
+
"text": "Informa se a pesquisa \u00E9 do tipo texto."
|
|
268
|
+
},
|
|
269
|
+
"attribute": "is-text-search",
|
|
270
|
+
"reflect": false,
|
|
271
|
+
"defaultValue": "false"
|
|
252
272
|
}
|
|
253
273
|
};
|
|
254
274
|
}
|
|
@@ -13,7 +13,9 @@ export class EzSearch {
|
|
|
13
13
|
this.suppressEmptyOption = false;
|
|
14
14
|
this.mode = "regular";
|
|
15
15
|
this.canShowError = true;
|
|
16
|
+
this.hideErrorOnFocusOut = true;
|
|
16
17
|
this.listOptionsPosition = undefined;
|
|
18
|
+
this.isTextSearch = false;
|
|
17
19
|
}
|
|
18
20
|
observeErrorMessage() {
|
|
19
21
|
if (this._comboElement) {
|
|
@@ -71,7 +73,7 @@ export class EzSearch {
|
|
|
71
73
|
}
|
|
72
74
|
render() {
|
|
73
75
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
74
|
-
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError, listOptionsPosition: this.listOptionsPosition }));
|
|
76
|
+
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, hideErrorOnFocusOut: this.hideErrorOnFocusOut, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError, listOptionsPosition: this.listOptionsPosition, isTextSearch: this.isTextSearch }));
|
|
75
77
|
}
|
|
76
78
|
;
|
|
77
79
|
static get is() { return "ez-search"; }
|
|
@@ -282,6 +284,24 @@ export class EzSearch {
|
|
|
282
284
|
"reflect": true,
|
|
283
285
|
"defaultValue": "true"
|
|
284
286
|
},
|
|
287
|
+
"hideErrorOnFocusOut": {
|
|
288
|
+
"type": "boolean",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "boolean",
|
|
292
|
+
"resolved": "boolean",
|
|
293
|
+
"references": {}
|
|
294
|
+
},
|
|
295
|
+
"required": false,
|
|
296
|
+
"optional": false,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": "Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente."
|
|
300
|
+
},
|
|
301
|
+
"attribute": "hide-error-on-focus-out",
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"defaultValue": "true"
|
|
304
|
+
},
|
|
285
305
|
"listOptionsPosition": {
|
|
286
306
|
"type": "unknown",
|
|
287
307
|
"mutable": false,
|
|
@@ -301,6 +321,24 @@ export class EzSearch {
|
|
|
301
321
|
"tags": [],
|
|
302
322
|
"text": "Define um posicionamento fixo para a lista de op\u00E7\u00F5es do CheckBox."
|
|
303
323
|
}
|
|
324
|
+
},
|
|
325
|
+
"isTextSearch": {
|
|
326
|
+
"type": "boolean",
|
|
327
|
+
"mutable": false,
|
|
328
|
+
"complexType": {
|
|
329
|
+
"original": "boolean",
|
|
330
|
+
"resolved": "boolean",
|
|
331
|
+
"references": {}
|
|
332
|
+
},
|
|
333
|
+
"required": false,
|
|
334
|
+
"optional": false,
|
|
335
|
+
"docs": {
|
|
336
|
+
"tags": [],
|
|
337
|
+
"text": "Informa se a pesquisa \u00E9 do tipo texto."
|
|
338
|
+
},
|
|
339
|
+
"attribute": "is-text-search",
|
|
340
|
+
"reflect": false,
|
|
341
|
+
"defaultValue": "false"
|
|
304
342
|
}
|
|
305
343
|
};
|
|
306
344
|
}
|
|
@@ -163,7 +163,7 @@ export default class DataBinder {
|
|
|
163
163
|
this._dataUnit.addRecord();
|
|
164
164
|
}
|
|
165
165
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
166
|
-
this._dataUnit.setFieldValue(fieldName, newValue);
|
|
166
|
+
this._dataUnit.setFieldValue(fieldName, newValue, [this.getCurrentRecordId()]);
|
|
167
167
|
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
168
168
|
const bind = this._fields.get(fieldName);
|
|
169
169
|
if (bind) {
|
|
@@ -681,7 +681,7 @@ class DataBinder {
|
|
|
681
681
|
this._dataUnit.addRecord();
|
|
682
682
|
}
|
|
683
683
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
684
|
-
this._dataUnit.setFieldValue(fieldName, newValue);
|
|
684
|
+
this._dataUnit.setFieldValue(fieldName, newValue, [this.getCurrentRecordId()]);
|
|
685
685
|
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
686
686
|
const bind = this._fields.get(fieldName);
|
|
687
687
|
if (bind) {
|
|
@@ -1750,7 +1750,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
|
|
|
1750
1750
|
static get style() { return ezCalendarCss; }
|
|
1751
1751
|
};
|
|
1752
1752
|
|
|
1753
|
-
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
1753
|
+
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
1754
1754
|
|
|
1755
1755
|
const EzCardItem$1 = class extends HTMLElement$1 {
|
|
1756
1756
|
constructor() {
|
|
@@ -2155,7 +2155,9 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2155
2155
|
this.suppressEmptyOption = false;
|
|
2156
2156
|
this.canShowError = true;
|
|
2157
2157
|
this.mode = "regular";
|
|
2158
|
+
this.hideErrorOnFocusOut = true;
|
|
2158
2159
|
this.listOptionsPosition = undefined;
|
|
2160
|
+
this.isTextSearch = false;
|
|
2159
2161
|
}
|
|
2160
2162
|
observeErrorMessage() {
|
|
2161
2163
|
var _a;
|
|
@@ -2478,7 +2480,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2478
2480
|
this._visibleOptions = [];
|
|
2479
2481
|
this.clearSource();
|
|
2480
2482
|
}
|
|
2481
|
-
this.setFocus();
|
|
2482
2483
|
}
|
|
2483
2484
|
loadOptions(mode, argument = "") {
|
|
2484
2485
|
this._criteria = argument;
|
|
@@ -2663,6 +2664,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2663
2664
|
handlerIconClick() {
|
|
2664
2665
|
this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
|
|
2665
2666
|
}
|
|
2667
|
+
buildNumberArgument(argument) {
|
|
2668
|
+
if (this.isTextSearch) {
|
|
2669
|
+
return NaN;
|
|
2670
|
+
}
|
|
2671
|
+
return Number(argument || undefined);
|
|
2672
|
+
}
|
|
2666
2673
|
onTextInputChangeHandler(event) {
|
|
2667
2674
|
var _a;
|
|
2668
2675
|
this.clearDeboucingTimeout();
|
|
@@ -2673,7 +2680,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2673
2680
|
return;
|
|
2674
2681
|
}
|
|
2675
2682
|
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
2676
|
-
const argumentNumber =
|
|
2683
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
2677
2684
|
if (!this._criteria) {
|
|
2678
2685
|
this._textInput.value = event.data || argument;
|
|
2679
2686
|
}
|
|
@@ -2760,7 +2767,8 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2760
2767
|
//event.stopPropagation();
|
|
2761
2768
|
}
|
|
2762
2769
|
onTextInputFocusOutHandler() {
|
|
2763
|
-
this.
|
|
2770
|
+
if (this.hideErrorOnFocusOut)
|
|
2771
|
+
this.cancelPreselection();
|
|
2764
2772
|
}
|
|
2765
2773
|
canShowListOptions() {
|
|
2766
2774
|
return !this._showLoading && this._visibleOptions.length > 0;
|
|
@@ -4447,6 +4455,7 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4447
4455
|
super();
|
|
4448
4456
|
this.__registerHost();
|
|
4449
4457
|
this.ezReady = createEvent(this, "ezReady", 7);
|
|
4458
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
4450
4459
|
this.onDataUnitAction = (action) => {
|
|
4451
4460
|
if (action.type === Action.METADATA_LOADED) {
|
|
4452
4461
|
this.processMetadata();
|
|
@@ -4633,9 +4642,47 @@ uiBuilders$1.set(UserInterface.LONGTEXT, buildTextArea);
|
|
|
4633
4642
|
const fieldBuilder = (field) => {
|
|
4634
4643
|
const builder = uiBuilders$1.get(field.userInterface) || buildTextInput$1;
|
|
4635
4644
|
const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
|
|
4636
|
-
|
|
4645
|
+
const builtElement = builder(Object.assign(Object.assign({}, field), { label }));
|
|
4646
|
+
//@ts-ignore
|
|
4647
|
+
builtElement.$attrs$['data-form-item'] = field.name;
|
|
4648
|
+
return builtElement;
|
|
4637
4649
|
};
|
|
4638
4650
|
|
|
4651
|
+
class FormItem {
|
|
4652
|
+
constructor(elem) {
|
|
4653
|
+
this.elem = elem;
|
|
4654
|
+
}
|
|
4655
|
+
addRightElement(el) {
|
|
4656
|
+
this.removeRightElement();
|
|
4657
|
+
el.classList.add('ez-padding-left--small');
|
|
4658
|
+
el.setAttribute('data-custom-item', 'true');
|
|
4659
|
+
this.elem.classList.add('ez-col--nowrap');
|
|
4660
|
+
this.elem.appendChild(el);
|
|
4661
|
+
}
|
|
4662
|
+
removeRightElement() {
|
|
4663
|
+
Array.from(this.elem.querySelectorAll('[data-custom-item="true"]')).forEach(item => item.remove());
|
|
4664
|
+
}
|
|
4665
|
+
get fieldName() {
|
|
4666
|
+
return this.elem.getAttribute('data-form-item');
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4669
|
+
class FormItems {
|
|
4670
|
+
constructor(items, formId) {
|
|
4671
|
+
this.items = new Map();
|
|
4672
|
+
this.formId = formId;
|
|
4673
|
+
items.forEach(item => {
|
|
4674
|
+
const formItem = new FormItem(item);
|
|
4675
|
+
this.items.set(formItem.fieldName, formItem);
|
|
4676
|
+
});
|
|
4677
|
+
}
|
|
4678
|
+
getItem(name) {
|
|
4679
|
+
return this.items.get(name);
|
|
4680
|
+
}
|
|
4681
|
+
get formName() {
|
|
4682
|
+
return this.formId;
|
|
4683
|
+
}
|
|
4684
|
+
}
|
|
4685
|
+
|
|
4639
4686
|
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
|
|
4640
4687
|
|
|
4641
4688
|
const EzFormView$1 = class extends HTMLElement$1 {
|
|
@@ -4643,6 +4690,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4643
4690
|
super();
|
|
4644
4691
|
this.__registerHost();
|
|
4645
4692
|
this.ezContentReady = createEvent(this, "ezContentReady", 7);
|
|
4693
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
4646
4694
|
this.fields = undefined;
|
|
4647
4695
|
}
|
|
4648
4696
|
async showUp() {
|
|
@@ -4668,6 +4716,8 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4668
4716
|
}
|
|
4669
4717
|
componentDidRender() {
|
|
4670
4718
|
this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
|
|
4719
|
+
const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
|
|
4720
|
+
this.formItemsReady.emit(formItems);
|
|
4671
4721
|
}
|
|
4672
4722
|
render() {
|
|
4673
4723
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
@@ -123654,7 +123704,7 @@ class EzGridCustomHeader {
|
|
|
123654
123704
|
onClickFilter() {
|
|
123655
123705
|
var _a;
|
|
123656
123706
|
const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
|
|
123657
|
-
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px
|
|
123707
|
+
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
|
|
123658
123708
|
}
|
|
123659
123709
|
configSortIcon() {
|
|
123660
123710
|
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
@@ -124896,7 +124946,7 @@ class AgGridController {
|
|
|
124896
124946
|
tooltip: tooltip,
|
|
124897
124947
|
isSortable: propSortable,
|
|
124898
124948
|
hasFilter: () => this.hasFilterColumn(source.name),
|
|
124899
|
-
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name) }),
|
|
124949
|
+
showColumnFilter: (leftPosition, fromIcon) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon }),
|
|
124900
124950
|
},
|
|
124901
124951
|
valueFormatter: params => {
|
|
124902
124952
|
if (params.value == undefined) {
|
|
@@ -125119,6 +125169,84 @@ function getElementID(sufix) {
|
|
|
125119
125169
|
};
|
|
125120
125170
|
}
|
|
125121
125171
|
|
|
125172
|
+
class InMemoryFilterColumnDataSource {
|
|
125173
|
+
constructor(dataUnit) {
|
|
125174
|
+
var _a;
|
|
125175
|
+
this.onDataUnitAction = (action) => {
|
|
125176
|
+
if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
|
|
125177
|
+
this.originalRecords = this.dataUnit.records;
|
|
125178
|
+
}
|
|
125179
|
+
};
|
|
125180
|
+
this.dataUnit = dataUnit;
|
|
125181
|
+
this.originalRecords = (_a = this.dataUnit.records) !== null && _a !== void 0 ? _a : [];
|
|
125182
|
+
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
125183
|
+
}
|
|
125184
|
+
fetchData(filterTerm, fieldName) {
|
|
125185
|
+
return new Promise(resolve => {
|
|
125186
|
+
const filteredRecords = this.originalRecords.filter(record => this.includesSearchTerm(record, fieldName, filterTerm));
|
|
125187
|
+
const options = filteredRecords.map(item => this.buildFieldOption(item, fieldName));
|
|
125188
|
+
resolve(this.removeDuplicatedOptions(options));
|
|
125189
|
+
});
|
|
125190
|
+
}
|
|
125191
|
+
buildFieldOption(item, fieldName) {
|
|
125192
|
+
return {
|
|
125193
|
+
value: this.buildValue(item, fieldName),
|
|
125194
|
+
label: this.formatLabel(fieldName, item[fieldName]),
|
|
125195
|
+
check: true,
|
|
125196
|
+
};
|
|
125197
|
+
}
|
|
125198
|
+
buildValue(item, fieldName) {
|
|
125199
|
+
var _a;
|
|
125200
|
+
let value = item[fieldName];
|
|
125201
|
+
if (((_a = this.dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType) === DataType.OBJECT) {
|
|
125202
|
+
value = value.value;
|
|
125203
|
+
}
|
|
125204
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
125205
|
+
}
|
|
125206
|
+
removeDuplicatedOptions(options) {
|
|
125207
|
+
const noDuplicatedOptions = [];
|
|
125208
|
+
options.forEach(option => {
|
|
125209
|
+
if (!noDuplicatedOptions.find(({ label }) => label === option.label)) {
|
|
125210
|
+
noDuplicatedOptions.push(option);
|
|
125211
|
+
}
|
|
125212
|
+
});
|
|
125213
|
+
return noDuplicatedOptions;
|
|
125214
|
+
}
|
|
125215
|
+
includesSearchTerm(record, fieldName, filterTerm) {
|
|
125216
|
+
let label = this.buildLabel(fieldName, record[fieldName]);
|
|
125217
|
+
return label.toLowerCase().includes(filterTerm.toLowerCase());
|
|
125218
|
+
}
|
|
125219
|
+
buildLabel(fieldName, value) {
|
|
125220
|
+
var _a;
|
|
125221
|
+
const { dataType } = this.dataUnit.getField(fieldName);
|
|
125222
|
+
if (dataType === DataType.NUMBER) {
|
|
125223
|
+
return value === null || value === void 0 ? void 0 : value.toString().replace('.', ',');
|
|
125224
|
+
}
|
|
125225
|
+
if (dataType === DataType.DATE) {
|
|
125226
|
+
return (typeof value === 'object')
|
|
125227
|
+
? (_a = DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString()
|
|
125228
|
+
: value === null || value === void 0 ? void 0 : value.toString();
|
|
125229
|
+
}
|
|
125230
|
+
if (dataType === DataType.OBJECT) {
|
|
125231
|
+
return `${value === null || value === void 0 ? void 0 : value.value} - ${value === null || value === void 0 ? void 0 : value.label}`;
|
|
125232
|
+
}
|
|
125233
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
125234
|
+
}
|
|
125235
|
+
formatLabel(fieldName, value) {
|
|
125236
|
+
var _a, _b;
|
|
125237
|
+
const { userInterface, dataType } = this.dataUnit.getField(fieldName);
|
|
125238
|
+
if (dataType === DataType.DATE) {
|
|
125239
|
+
return (typeof value === 'object')
|
|
125240
|
+
? DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))
|
|
125241
|
+
: value === null || value === void 0 ? void 0 : value.toString();
|
|
125242
|
+
}
|
|
125243
|
+
if (dataType === DataType.NUMBER && userInterface !== UserInterface.DECIMALNUMBER) {
|
|
125244
|
+
return (_a = parseInt(this.dataUnit.getFormattedValue(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString();
|
|
125245
|
+
}
|
|
125246
|
+
return (_b = this.dataUnit.getFormattedValue(fieldName, value)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
125247
|
+
}
|
|
125248
|
+
}
|
|
125249
|
+
|
|
125122
125250
|
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF);z-index:var(--more-visible, 2)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s;z-index:var(--ez-grid__selection-counter--z-index)}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}";
|
|
125123
125251
|
|
|
125124
125252
|
const windowInstace$1 = window;
|
|
@@ -125133,18 +125261,13 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125133
125261
|
this.componentReady = createEvent(this, "componentReady", 7);
|
|
125134
125262
|
this._gridController = new AgGridController(false);
|
|
125135
125263
|
this._messageFilterAppliedSuccess = 'Filtro de coluna aplicado com sucesso!';
|
|
125136
|
-
this.onDataUnitAction = (action) => {
|
|
125137
|
-
if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
|
|
125138
|
-
this._originalRecords = this.dataUnit.records;
|
|
125139
|
-
}
|
|
125140
|
-
};
|
|
125141
125264
|
this._paginationInfo = undefined;
|
|
125142
125265
|
this._paginationChangedByKeyboard = true;
|
|
125143
125266
|
this._showSelectionCounter = false;
|
|
125144
125267
|
this._isAllSelection = false;
|
|
125145
125268
|
this._currentPageSelected = undefined;
|
|
125146
125269
|
this._selectionCount = undefined;
|
|
125147
|
-
this.
|
|
125270
|
+
this._hasLeftButtons = false;
|
|
125148
125271
|
this.multipleSelection = undefined;
|
|
125149
125272
|
this.config = undefined;
|
|
125150
125273
|
this.selectionToastConfig = undefined;
|
|
@@ -125414,44 +125537,20 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125414
125537
|
});
|
|
125415
125538
|
}
|
|
125416
125539
|
componentWillLoad() {
|
|
125540
|
+
this._hasLeftButtons = !!this._element.querySelector('[slot="leftButtons"]');
|
|
125417
125541
|
if (!this.dataUnit.name.includes("InMemoryDataUnit"))
|
|
125418
125542
|
return;
|
|
125419
|
-
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
125420
125543
|
}
|
|
125421
125544
|
getDataSource() {
|
|
125422
|
-
|
|
125423
|
-
|
|
125424
|
-
buildDefaultDataSource() {
|
|
125425
|
-
var _a, _b;
|
|
125426
|
-
if (this._originalRecords.length === 0) {
|
|
125427
|
-
this._originalRecords = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : [];
|
|
125428
|
-
}
|
|
125429
|
-
return {
|
|
125430
|
-
fetchData: (filterTerm, fieldName) => {
|
|
125431
|
-
return new Promise(resolve => {
|
|
125432
|
-
const filteredRecords = this._originalRecords.filter(record => {
|
|
125433
|
-
var _a, _b;
|
|
125434
|
-
const label = typeof record[fieldName] === "object" ? `${(_a = record[fieldName]) === null || _a === void 0 ? void 0 : _a.value} - ${(_b = record[fieldName]) === null || _b === void 0 ? void 0 : _b.label}` : record[fieldName];
|
|
125435
|
-
return label === null || label === void 0 ? void 0 : label.toString().toLowerCase().includes(filterTerm.toLowerCase());
|
|
125436
|
-
});
|
|
125437
|
-
const options = filteredRecords.map(item => {
|
|
125438
|
-
return { value: item[fieldName].toString(), label: this.formatLabel(fieldName, item[fieldName]), check: true };
|
|
125439
|
-
});
|
|
125440
|
-
resolve(options);
|
|
125441
|
-
});
|
|
125442
|
-
}
|
|
125443
|
-
};
|
|
125545
|
+
var _a;
|
|
125546
|
+
return (_a = this.columnfilterDataSource) !== null && _a !== void 0 ? _a : new InMemoryFilterColumnDataSource(this.dataUnit);
|
|
125444
125547
|
}
|
|
125445
|
-
|
|
125446
|
-
|
|
125447
|
-
if (userInterface === UserInterface.DATETIME) {
|
|
125448
|
-
return DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value));
|
|
125449
|
-
}
|
|
125450
|
-
return String(this.dataUnit.getFormattedValue(fieldName, value));
|
|
125548
|
+
hideHeader() {
|
|
125549
|
+
return (!!this._element.getAttribute("no-header") && !this._paginationInfo);
|
|
125451
125550
|
}
|
|
125452
125551
|
render() {
|
|
125453
125552
|
var _a;
|
|
125454
|
-
return (h(Host,
|
|
125553
|
+
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter
|
|
125455
125554
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
125456
125555
|
` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
|
|
125457
125556
|
}
|
|
@@ -126319,6 +126418,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126319
126418
|
this.dataSource = undefined;
|
|
126320
126419
|
this.useOptions = false;
|
|
126321
126420
|
this.options = undefined;
|
|
126421
|
+
this.isTextSearch = false;
|
|
126322
126422
|
this.filteredOptions = undefined;
|
|
126323
126423
|
this.displayOptions = undefined;
|
|
126324
126424
|
this.viewScenario = undefined;
|
|
@@ -126401,6 +126501,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126401
126501
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
|
|
126402
126502
|
}
|
|
126403
126503
|
this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
|
|
126504
|
+
this.searchInput.value = "";
|
|
126404
126505
|
}
|
|
126405
126506
|
handleRemoveItemFromOptions(item) {
|
|
126406
126507
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
|
|
@@ -126464,7 +126565,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126464
126565
|
return scenarios[view];
|
|
126465
126566
|
}
|
|
126466
126567
|
render() {
|
|
126467
|
-
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this) })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
126568
|
+
return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this), isTextSearch: this.isTextSearch })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
|
|
126468
126569
|
}
|
|
126469
126570
|
static get watchers() { return {
|
|
126470
126571
|
"useOptions": ["onChangeUseOptions"],
|
|
@@ -127109,7 +127210,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127109
127210
|
this.suppressEmptyOption = false;
|
|
127110
127211
|
this.mode = "regular";
|
|
127111
127212
|
this.canShowError = true;
|
|
127213
|
+
this.hideErrorOnFocusOut = true;
|
|
127112
127214
|
this.listOptionsPosition = undefined;
|
|
127215
|
+
this.isTextSearch = false;
|
|
127113
127216
|
}
|
|
127114
127217
|
observeErrorMessage() {
|
|
127115
127218
|
if (this._comboElement) {
|
|
@@ -127167,7 +127270,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127167
127270
|
}
|
|
127168
127271
|
render() {
|
|
127169
127272
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
127170
|
-
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError, listOptionsPosition: this.listOptionsPosition }));
|
|
127273
|
+
return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, hideErrorOnFocusOut: this.hideErrorOnFocusOut, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError, listOptionsPosition: this.listOptionsPosition, isTextSearch: this.isTextSearch }));
|
|
127171
127274
|
}
|
|
127172
127275
|
;
|
|
127173
127276
|
get _elem() { return this; }
|
|
@@ -129304,19 +129407,23 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129304
129407
|
super();
|
|
129305
129408
|
this.__registerHost();
|
|
129306
129409
|
this.applyFilterColumnOptions = createEvent(this, "applyFilterColumnOptions", 7);
|
|
129307
|
-
this.TOP_POSITION = '
|
|
129410
|
+
this.TOP_POSITION = '65';
|
|
129308
129411
|
this.TOP_POSITION_HEADER_HIDDEN = '18';
|
|
129412
|
+
this.TOP_POSITION_NO_TASKBAR = '32';
|
|
129413
|
+
this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
|
|
129309
129414
|
this.DEFAULT_HEIGHT = 430;
|
|
129310
129415
|
this.opened = true;
|
|
129311
129416
|
this.columnName = undefined;
|
|
129312
129417
|
this.columnLabel = undefined;
|
|
129313
129418
|
this.gridHeaderHidden = false;
|
|
129419
|
+
this.noHeaderTaskBar = false;
|
|
129314
129420
|
this.dataSource = undefined;
|
|
129315
129421
|
this.dataUnit = undefined;
|
|
129316
129422
|
this.options = undefined;
|
|
129317
129423
|
this.selectedItems = undefined;
|
|
129318
129424
|
this.fieldDescriptor = undefined;
|
|
129319
129425
|
this.useOptions = false;
|
|
129426
|
+
this.isTextSearch = false;
|
|
129320
129427
|
}
|
|
129321
129428
|
async hide() {
|
|
129322
129429
|
await this.ezPopoverElement.hide();
|
|
@@ -129330,26 +129437,45 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129330
129437
|
if (this.canShow(configs)) {
|
|
129331
129438
|
await this.hide();
|
|
129332
129439
|
this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
|
|
129440
|
+
this.buildIsTextSearch();
|
|
129333
129441
|
this.setOptions(configs.filteredOptions);
|
|
129334
129442
|
this.columnName = configs.columnName;
|
|
129335
129443
|
this.columnLabel = configs.columnLabel;
|
|
129336
|
-
await this.ezPopoverElement.show(this.calcTopPosition(), configs
|
|
129444
|
+
await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
|
|
129445
|
+
}
|
|
129446
|
+
}
|
|
129447
|
+
calculateLeftPosition(configs) {
|
|
129448
|
+
if (!configs.fromIcon) {
|
|
129449
|
+
return configs.leftPosition;
|
|
129337
129450
|
}
|
|
129451
|
+
const difference = this.ezPopoverElement.getBoundingClientRect().left;
|
|
129452
|
+
const leftReference = parseInt(configs.leftPosition.replace('px', ''));
|
|
129453
|
+
const leftResolved = (leftReference + 16) - difference;
|
|
129454
|
+
return `${(leftResolved > 0 ? leftResolved : 0)}px`;
|
|
129455
|
+
}
|
|
129456
|
+
buildIsTextSearch() {
|
|
129457
|
+
var _a, _b;
|
|
129458
|
+
const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
|
|
129459
|
+
this.isTextSearch = !(userInterface === UserInterface.DECIMALNUMBER || userInterface === UserInterface.INTEGERNUMBER);
|
|
129338
129460
|
}
|
|
129339
129461
|
calcTopPosition() {
|
|
129340
|
-
const referencePosition = this.
|
|
129341
|
-
? this.TOP_POSITION_HEADER_HIDDEN
|
|
129342
|
-
: this.TOP_POSITION.replace('px', '');
|
|
129462
|
+
const referencePosition = this.buildReferenceTopPosition();
|
|
129343
129463
|
const totalPopoverHeight = parseInt(referencePosition) + this.DEFAULT_HEIGHT;
|
|
129344
129464
|
const popoverPosition = Math.round(this.ezPopoverElement.getBoundingClientRect().top);
|
|
129345
129465
|
const popoverBottomPosition = popoverPosition + totalPopoverHeight;
|
|
129346
129466
|
const windowHeight = window.innerHeight;
|
|
129347
129467
|
if (windowHeight > popoverBottomPosition) {
|
|
129348
|
-
return referencePosition
|
|
129468
|
+
return `${referencePosition}px`;
|
|
129349
129469
|
}
|
|
129350
129470
|
const differenceBetween = windowHeight - popoverBottomPosition;
|
|
129351
129471
|
return `${differenceBetween}px`;
|
|
129352
129472
|
}
|
|
129473
|
+
buildReferenceTopPosition() {
|
|
129474
|
+
if (this.noHeaderTaskBar) {
|
|
129475
|
+
return this.gridHeaderHidden ? this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN : this.TOP_POSITION_NO_TASKBAR;
|
|
129476
|
+
}
|
|
129477
|
+
return this.gridHeaderHidden ? this.TOP_POSITION_HEADER_HIDDEN : this.TOP_POSITION;
|
|
129478
|
+
}
|
|
129353
129479
|
async clearConfigs() {
|
|
129354
129480
|
var _a;
|
|
129355
129481
|
await ((_a = this.ezMultiSelectionList) === null || _a === void 0 ? void 0 : _a.clearFilteredOptions());
|
|
@@ -129407,7 +129533,7 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129407
129533
|
}
|
|
129408
129534
|
}
|
|
129409
129535
|
render() {
|
|
129410
|
-
return (h("ez-popover", { class: 'filter-column__popover', "overlay-type": 'none', ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: 'filter-column' }, h("header", { class: 'filter-column__header' }, h("span", { class: 'ez-text ez-text--medium filter-column__header-title' }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: 'icon', "icon-name": 'close', class: 'ez-button--tertiary', onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail) }), h("footer", { class: 'filter-column__footer' }, h("ez-button", { label: 'Aplicar', class: 'ez-button--primary', onClick: this.submit.bind(this) })))));
|
|
129536
|
+
return (h("ez-popover", { class: 'filter-column__popover', "overlay-type": 'none', ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: 'filter-column' }, h("header", { class: 'filter-column__header' }, h("span", { class: 'ez-text ez-text--medium filter-column__header-title' }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: 'icon', "icon-name": 'close', class: 'ez-button--tertiary', onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail), isTextSearch: this.isTextSearch }), h("footer", { class: 'filter-column__footer' }, h("ez-button", { label: 'Aplicar', class: 'ez-button--primary', onClick: this.submit.bind(this) })))));
|
|
129411
129537
|
}
|
|
129412
129538
|
static get style() { return filterColumnCss; }
|
|
129413
129539
|
};
|
|
@@ -129437,7 +129563,7 @@ const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-ite
|
|
|
129437
129563
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
129438
129564
|
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"]}]);
|
|
129439
129565
|
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]}]);
|
|
129440
|
-
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"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],"listOptionsPosition":[16],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
129566
|
+
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"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"]]]);
|
|
129441
129567
|
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"]}]);
|
|
129442
129568
|
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"]}]);
|
|
129443
129569
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040]}]);
|
|
@@ -129446,20 +129572,20 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
|
|
|
129446
129572
|
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"]}]);
|
|
129447
129573
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
|
|
129448
129574
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16]}]);
|
|
129449
|
-
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"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"
|
|
129575
|
+
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"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
129450
129576
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
129451
129577
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
129452
129578
|
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]}]);
|
|
129453
129579
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
129454
129580
|
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]}]);
|
|
129455
129581
|
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"]}]);
|
|
129456
|
-
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[16],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
129582
|
+
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[16],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
129457
129583
|
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]}]);
|
|
129458
129584
|
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"]}]);
|
|
129459
129585
|
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"]}]);
|
|
129460
129586
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
129461
129587
|
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"]]]);
|
|
129462
|
-
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"],"listOptionsPosition":[16]}]);
|
|
129588
|
+
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"]}]);
|
|
129463
129589
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
129464
129590
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
129465
129591
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
@@ -129471,7 +129597,7 @@ const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"messa
|
|
|
129471
129597
|
const EzTree = /*@__PURE__*/proxyCustomElement(EzTree$1, [1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32]},[[2,"keydown","onKeyDownListener"]]]);
|
|
129472
129598
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040]}]);
|
|
129473
129599
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
129474
|
-
const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32]}]);
|
|
129600
|
+
const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32]}]);
|
|
129475
129601
|
const MultiSelectionBoxMessage = /*@__PURE__*/proxyCustomElement(MultiSelectionBoxMessage$1, [0,"multi-selection-box-message",{"message":[1]}]);
|
|
129476
129602
|
const defineCustomElements = (opts) => {
|
|
129477
129603
|
if (typeof customElements !== 'undefined') {
|