@sankhyalabs/ezui 5.11.0-dev.4 → 5.11.0-dev.6
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 -2
- package/dist/cjs/ez-form-view.cjs.entry.js +37 -1
- package/dist/cjs/ez-form.cjs.entry.js +1 -0
- 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 +2 -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-combo-box/ez-combo-box.js +26 -2
- 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 +29 -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 +20 -1
- package/dist/custom-elements/index.js +173 -55
- package/dist/esm/ez-combo-box.entry.js +8 -2
- package/dist/esm/ez-form-view.entry.js +37 -1
- package/dist/esm/ez-form.entry.js +1 -0
- 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 +2 -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-5e55a42b.entry.js +1 -0
- package/dist/ezui/{p-9f41b414.entry.js → p-6ab2f7c2.entry.js} +1 -1
- package/dist/ezui/p-7526f2b6.entry.js +1 -0
- package/dist/ezui/p-8fdff9cd.entry.js +1 -0
- package/dist/ezui/{p-fd54b5b4.entry.js → p-964e5571.entry.js} +2 -2
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +5 -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 +14 -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 +4 -0
- package/dist/types/components.d.ts +35 -0
- package/package.json +1 -1
- package/dist/ezui/p-2a0e1679.entry.js +0 -1
- package/dist/ezui/p-411f3579.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-5a1d8bf8.entry.js +0 -1
|
@@ -2157,6 +2157,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2157
2157
|
this.mode = "regular";
|
|
2158
2158
|
this.hideErrorOnFocusOut = true;
|
|
2159
2159
|
this.listOptionsPosition = undefined;
|
|
2160
|
+
this.isTextSearch = false;
|
|
2160
2161
|
}
|
|
2161
2162
|
observeErrorMessage() {
|
|
2162
2163
|
var _a;
|
|
@@ -2479,7 +2480,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2479
2480
|
this._visibleOptions = [];
|
|
2480
2481
|
this.clearSource();
|
|
2481
2482
|
}
|
|
2482
|
-
this.setFocus();
|
|
2483
2483
|
}
|
|
2484
2484
|
loadOptions(mode, argument = "") {
|
|
2485
2485
|
this._criteria = argument;
|
|
@@ -2664,6 +2664,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2664
2664
|
handlerIconClick() {
|
|
2665
2665
|
this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
|
|
2666
2666
|
}
|
|
2667
|
+
buildNumberArgument(argument) {
|
|
2668
|
+
if (this.isTextSearch) {
|
|
2669
|
+
return NaN;
|
|
2670
|
+
}
|
|
2671
|
+
return Number(argument || undefined);
|
|
2672
|
+
}
|
|
2667
2673
|
onTextInputChangeHandler(event) {
|
|
2668
2674
|
var _a;
|
|
2669
2675
|
this.clearDeboucingTimeout();
|
|
@@ -2674,7 +2680,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2674
2680
|
return;
|
|
2675
2681
|
}
|
|
2676
2682
|
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
2677
|
-
const argumentNumber =
|
|
2683
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
2678
2684
|
if (!this._criteria) {
|
|
2679
2685
|
this._textInput.value = event.data || argument;
|
|
2680
2686
|
}
|
|
@@ -4449,6 +4455,7 @@ const EzForm$1 = class extends HTMLElement$1 {
|
|
|
4449
4455
|
super();
|
|
4450
4456
|
this.__registerHost();
|
|
4451
4457
|
this.ezReady = createEvent(this, "ezReady", 7);
|
|
4458
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
4452
4459
|
this.onDataUnitAction = (action) => {
|
|
4453
4460
|
if (action.type === Action.METADATA_LOADED) {
|
|
4454
4461
|
this.processMetadata();
|
|
@@ -4635,9 +4642,42 @@ uiBuilders$1.set(UserInterface.LONGTEXT, buildTextArea);
|
|
|
4635
4642
|
const fieldBuilder = (field) => {
|
|
4636
4643
|
const builder = uiBuilders$1.get(field.userInterface) || buildTextInput$1;
|
|
4637
4644
|
const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
|
|
4638
|
-
|
|
4645
|
+
const builtElement = builder(Object.assign(Object.assign({}, field), { label }));
|
|
4646
|
+
//@ts-ignore
|
|
4647
|
+
builtElement.$attrs$['data-form-item'] = field.name;
|
|
4648
|
+
return builtElement;
|
|
4639
4649
|
};
|
|
4640
4650
|
|
|
4651
|
+
class FormItem {
|
|
4652
|
+
constructor(elem) {
|
|
4653
|
+
this.elem = elem;
|
|
4654
|
+
}
|
|
4655
|
+
addRightElement(el) {
|
|
4656
|
+
el.classList.add('ez-padding-left--small');
|
|
4657
|
+
this.elem.classList.add('ez-col--nowrap');
|
|
4658
|
+
this.elem.appendChild(el);
|
|
4659
|
+
}
|
|
4660
|
+
get fieldName() {
|
|
4661
|
+
return this.elem.getAttribute('data-form-item');
|
|
4662
|
+
}
|
|
4663
|
+
}
|
|
4664
|
+
class FormItems {
|
|
4665
|
+
constructor(items, formId) {
|
|
4666
|
+
this.items = new Map();
|
|
4667
|
+
this.formId = formId;
|
|
4668
|
+
items.forEach(item => {
|
|
4669
|
+
const formItem = new FormItem(item);
|
|
4670
|
+
this.items.set(formItem.fieldName, formItem);
|
|
4671
|
+
});
|
|
4672
|
+
}
|
|
4673
|
+
getItem(name) {
|
|
4674
|
+
return this.items.get(name);
|
|
4675
|
+
}
|
|
4676
|
+
get formName() {
|
|
4677
|
+
return this.formId;
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
|
|
4641
4681
|
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
|
|
4642
4682
|
|
|
4643
4683
|
const EzFormView$1 = class extends HTMLElement$1 {
|
|
@@ -4645,6 +4685,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4645
4685
|
super();
|
|
4646
4686
|
this.__registerHost();
|
|
4647
4687
|
this.ezContentReady = createEvent(this, "ezContentReady", 7);
|
|
4688
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
4648
4689
|
this.fields = undefined;
|
|
4649
4690
|
}
|
|
4650
4691
|
async showUp() {
|
|
@@ -4670,6 +4711,8 @@ const EzFormView$1 = class extends HTMLElement$1 {
|
|
|
4670
4711
|
}
|
|
4671
4712
|
componentDidRender() {
|
|
4672
4713
|
this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
|
|
4714
|
+
const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
|
|
4715
|
+
this.formItemsReady.emit(formItems);
|
|
4673
4716
|
}
|
|
4674
4717
|
render() {
|
|
4675
4718
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
@@ -123656,7 +123699,7 @@ class EzGridCustomHeader {
|
|
|
123656
123699
|
onClickFilter() {
|
|
123657
123700
|
var _a;
|
|
123658
123701
|
const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
|
|
123659
|
-
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px
|
|
123702
|
+
this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
|
|
123660
123703
|
}
|
|
123661
123704
|
configSortIcon() {
|
|
123662
123705
|
this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
|
|
@@ -124898,7 +124941,7 @@ class AgGridController {
|
|
|
124898
124941
|
tooltip: tooltip,
|
|
124899
124942
|
isSortable: propSortable,
|
|
124900
124943
|
hasFilter: () => this.hasFilterColumn(source.name),
|
|
124901
|
-
showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name) }),
|
|
124944
|
+
showColumnFilter: (leftPosition, fromIcon) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon }),
|
|
124902
124945
|
},
|
|
124903
124946
|
valueFormatter: params => {
|
|
124904
124947
|
if (params.value == undefined) {
|
|
@@ -125121,6 +125164,84 @@ function getElementID(sufix) {
|
|
|
125121
125164
|
};
|
|
125122
125165
|
}
|
|
125123
125166
|
|
|
125167
|
+
class InMemoryFilterColumnDataSource {
|
|
125168
|
+
constructor(dataUnit) {
|
|
125169
|
+
var _a;
|
|
125170
|
+
this.onDataUnitAction = (action) => {
|
|
125171
|
+
if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
|
|
125172
|
+
this.originalRecords = this.dataUnit.records;
|
|
125173
|
+
}
|
|
125174
|
+
};
|
|
125175
|
+
this.dataUnit = dataUnit;
|
|
125176
|
+
this.originalRecords = (_a = this.dataUnit.records) !== null && _a !== void 0 ? _a : [];
|
|
125177
|
+
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
125178
|
+
}
|
|
125179
|
+
fetchData(filterTerm, fieldName) {
|
|
125180
|
+
return new Promise(resolve => {
|
|
125181
|
+
const filteredRecords = this.originalRecords.filter(record => this.includesSearchTerm(record, fieldName, filterTerm));
|
|
125182
|
+
const options = filteredRecords.map(item => this.buildFieldOption(item, fieldName));
|
|
125183
|
+
resolve(this.removeDuplicatedOptions(options));
|
|
125184
|
+
});
|
|
125185
|
+
}
|
|
125186
|
+
buildFieldOption(item, fieldName) {
|
|
125187
|
+
return {
|
|
125188
|
+
value: this.buildValue(item, fieldName),
|
|
125189
|
+
label: this.formatLabel(fieldName, item[fieldName]),
|
|
125190
|
+
check: true,
|
|
125191
|
+
};
|
|
125192
|
+
}
|
|
125193
|
+
buildValue(item, fieldName) {
|
|
125194
|
+
var _a;
|
|
125195
|
+
let value = item[fieldName];
|
|
125196
|
+
if (((_a = this.dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType) === DataType.OBJECT) {
|
|
125197
|
+
value = value.value;
|
|
125198
|
+
}
|
|
125199
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
125200
|
+
}
|
|
125201
|
+
removeDuplicatedOptions(options) {
|
|
125202
|
+
const noDuplicatedOptions = [];
|
|
125203
|
+
options.forEach(option => {
|
|
125204
|
+
if (!noDuplicatedOptions.find(({ label }) => label === option.label)) {
|
|
125205
|
+
noDuplicatedOptions.push(option);
|
|
125206
|
+
}
|
|
125207
|
+
});
|
|
125208
|
+
return noDuplicatedOptions;
|
|
125209
|
+
}
|
|
125210
|
+
includesSearchTerm(record, fieldName, filterTerm) {
|
|
125211
|
+
let label = this.buildLabel(fieldName, record[fieldName]);
|
|
125212
|
+
return label.toLowerCase().includes(filterTerm.toLowerCase());
|
|
125213
|
+
}
|
|
125214
|
+
buildLabel(fieldName, value) {
|
|
125215
|
+
var _a;
|
|
125216
|
+
const { dataType } = this.dataUnit.getField(fieldName);
|
|
125217
|
+
if (dataType === DataType.NUMBER) {
|
|
125218
|
+
return value === null || value === void 0 ? void 0 : value.toString().replace('.', ',');
|
|
125219
|
+
}
|
|
125220
|
+
if (dataType === DataType.DATE) {
|
|
125221
|
+
return (typeof value === 'object')
|
|
125222
|
+
? (_a = DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString()
|
|
125223
|
+
: value === null || value === void 0 ? void 0 : value.toString();
|
|
125224
|
+
}
|
|
125225
|
+
if (dataType === DataType.OBJECT) {
|
|
125226
|
+
return `${value === null || value === void 0 ? void 0 : value.value} - ${value === null || value === void 0 ? void 0 : value.label}`;
|
|
125227
|
+
}
|
|
125228
|
+
return value === null || value === void 0 ? void 0 : value.toString();
|
|
125229
|
+
}
|
|
125230
|
+
formatLabel(fieldName, value) {
|
|
125231
|
+
var _a, _b;
|
|
125232
|
+
const { userInterface, dataType } = this.dataUnit.getField(fieldName);
|
|
125233
|
+
if (dataType === DataType.DATE) {
|
|
125234
|
+
return (typeof value === 'object')
|
|
125235
|
+
? DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))
|
|
125236
|
+
: value === null || value === void 0 ? void 0 : value.toString();
|
|
125237
|
+
}
|
|
125238
|
+
if (dataType === DataType.NUMBER && userInterface !== UserInterface.DECIMALNUMBER) {
|
|
125239
|
+
return (_a = parseInt(this.dataUnit.getFormattedValue(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString();
|
|
125240
|
+
}
|
|
125241
|
+
return (_b = this.dataUnit.getFormattedValue(fieldName, value)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
125242
|
+
}
|
|
125243
|
+
}
|
|
125244
|
+
|
|
125124
125245
|
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}";
|
|
125125
125246
|
|
|
125126
125247
|
const windowInstace$1 = window;
|
|
@@ -125135,18 +125256,13 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125135
125256
|
this.componentReady = createEvent(this, "componentReady", 7);
|
|
125136
125257
|
this._gridController = new AgGridController(false);
|
|
125137
125258
|
this._messageFilterAppliedSuccess = 'Filtro de coluna aplicado com sucesso!';
|
|
125138
|
-
this.onDataUnitAction = (action) => {
|
|
125139
|
-
if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
|
|
125140
|
-
this._originalRecords = this.dataUnit.records;
|
|
125141
|
-
}
|
|
125142
|
-
};
|
|
125143
125259
|
this._paginationInfo = undefined;
|
|
125144
125260
|
this._paginationChangedByKeyboard = true;
|
|
125145
125261
|
this._showSelectionCounter = false;
|
|
125146
125262
|
this._isAllSelection = false;
|
|
125147
125263
|
this._currentPageSelected = undefined;
|
|
125148
125264
|
this._selectionCount = undefined;
|
|
125149
|
-
this.
|
|
125265
|
+
this._hasLeftButtons = false;
|
|
125150
125266
|
this.multipleSelection = undefined;
|
|
125151
125267
|
this.config = undefined;
|
|
125152
125268
|
this.selectionToastConfig = undefined;
|
|
@@ -125416,44 +125532,20 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
125416
125532
|
});
|
|
125417
125533
|
}
|
|
125418
125534
|
componentWillLoad() {
|
|
125535
|
+
this._hasLeftButtons = !!this._element.querySelector('[slot="leftButtons"]');
|
|
125419
125536
|
if (!this.dataUnit.name.includes("InMemoryDataUnit"))
|
|
125420
125537
|
return;
|
|
125421
|
-
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
125422
125538
|
}
|
|
125423
125539
|
getDataSource() {
|
|
125424
|
-
|
|
125425
|
-
|
|
125426
|
-
buildDefaultDataSource() {
|
|
125427
|
-
var _a, _b;
|
|
125428
|
-
if (this._originalRecords.length === 0) {
|
|
125429
|
-
this._originalRecords = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : [];
|
|
125430
|
-
}
|
|
125431
|
-
return {
|
|
125432
|
-
fetchData: (filterTerm, fieldName) => {
|
|
125433
|
-
return new Promise(resolve => {
|
|
125434
|
-
const filteredRecords = this._originalRecords.filter(record => {
|
|
125435
|
-
var _a, _b;
|
|
125436
|
-
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];
|
|
125437
|
-
return label === null || label === void 0 ? void 0 : label.toString().toLowerCase().includes(filterTerm.toLowerCase());
|
|
125438
|
-
});
|
|
125439
|
-
const options = filteredRecords.map(item => {
|
|
125440
|
-
return { value: item[fieldName].toString(), label: this.formatLabel(fieldName, item[fieldName]), check: true };
|
|
125441
|
-
});
|
|
125442
|
-
resolve(options);
|
|
125443
|
-
});
|
|
125444
|
-
}
|
|
125445
|
-
};
|
|
125540
|
+
var _a;
|
|
125541
|
+
return (_a = this.columnfilterDataSource) !== null && _a !== void 0 ? _a : new InMemoryFilterColumnDataSource(this.dataUnit);
|
|
125446
125542
|
}
|
|
125447
|
-
|
|
125448
|
-
|
|
125449
|
-
if (userInterface === UserInterface.DATETIME) {
|
|
125450
|
-
return DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value));
|
|
125451
|
-
}
|
|
125452
|
-
return String(this.dataUnit.getFormattedValue(fieldName, value));
|
|
125543
|
+
hideHeader() {
|
|
125544
|
+
return (!!this._element.getAttribute("no-header") && !this._paginationInfo);
|
|
125453
125545
|
}
|
|
125454
125546
|
render() {
|
|
125455
125547
|
var _a;
|
|
125456
|
-
return (h(Host,
|
|
125548
|
+
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
|
|
125457
125549
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
125458
125550
|
` }, 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" }))));
|
|
125459
125551
|
}
|
|
@@ -126321,6 +126413,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126321
126413
|
this.dataSource = undefined;
|
|
126322
126414
|
this.useOptions = false;
|
|
126323
126415
|
this.options = undefined;
|
|
126416
|
+
this.isTextSearch = false;
|
|
126324
126417
|
this.filteredOptions = undefined;
|
|
126325
126418
|
this.displayOptions = undefined;
|
|
126326
126419
|
this.viewScenario = undefined;
|
|
@@ -126403,6 +126496,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126403
126496
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
|
|
126404
126497
|
}
|
|
126405
126498
|
this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
|
|
126499
|
+
this.searchInput.value = "";
|
|
126406
126500
|
}
|
|
126407
126501
|
handleRemoveItemFromOptions(item) {
|
|
126408
126502
|
this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
|
|
@@ -126466,7 +126560,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126466
126560
|
return scenarios[view];
|
|
126467
126561
|
}
|
|
126468
126562
|
render() {
|
|
126469
|
-
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)))));
|
|
126563
|
+
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)))));
|
|
126470
126564
|
}
|
|
126471
126565
|
static get watchers() { return {
|
|
126472
126566
|
"useOptions": ["onChangeUseOptions"],
|
|
@@ -127113,6 +127207,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127113
127207
|
this.canShowError = true;
|
|
127114
127208
|
this.hideErrorOnFocusOut = true;
|
|
127115
127209
|
this.listOptionsPosition = undefined;
|
|
127210
|
+
this.isTextSearch = false;
|
|
127116
127211
|
}
|
|
127117
127212
|
observeErrorMessage() {
|
|
127118
127213
|
if (this._comboElement) {
|
|
@@ -127170,7 +127265,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
127170
127265
|
}
|
|
127171
127266
|
render() {
|
|
127172
127267
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
127173
|
-
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 }));
|
|
127268
|
+
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 }));
|
|
127174
127269
|
}
|
|
127175
127270
|
;
|
|
127176
127271
|
get _elem() { return this; }
|
|
@@ -129307,19 +129402,23 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129307
129402
|
super();
|
|
129308
129403
|
this.__registerHost();
|
|
129309
129404
|
this.applyFilterColumnOptions = createEvent(this, "applyFilterColumnOptions", 7);
|
|
129310
|
-
this.TOP_POSITION = '
|
|
129405
|
+
this.TOP_POSITION = '65';
|
|
129311
129406
|
this.TOP_POSITION_HEADER_HIDDEN = '18';
|
|
129407
|
+
this.TOP_POSITION_NO_TASKBAR = '32';
|
|
129408
|
+
this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
|
|
129312
129409
|
this.DEFAULT_HEIGHT = 430;
|
|
129313
129410
|
this.opened = true;
|
|
129314
129411
|
this.columnName = undefined;
|
|
129315
129412
|
this.columnLabel = undefined;
|
|
129316
129413
|
this.gridHeaderHidden = false;
|
|
129414
|
+
this.noHeaderTaskBar = false;
|
|
129317
129415
|
this.dataSource = undefined;
|
|
129318
129416
|
this.dataUnit = undefined;
|
|
129319
129417
|
this.options = undefined;
|
|
129320
129418
|
this.selectedItems = undefined;
|
|
129321
129419
|
this.fieldDescriptor = undefined;
|
|
129322
129420
|
this.useOptions = false;
|
|
129421
|
+
this.isTextSearch = false;
|
|
129323
129422
|
}
|
|
129324
129423
|
async hide() {
|
|
129325
129424
|
await this.ezPopoverElement.hide();
|
|
@@ -129333,26 +129432,45 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129333
129432
|
if (this.canShow(configs)) {
|
|
129334
129433
|
await this.hide();
|
|
129335
129434
|
this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
|
|
129435
|
+
this.buildIsTextSearch();
|
|
129336
129436
|
this.setOptions(configs.filteredOptions);
|
|
129337
129437
|
this.columnName = configs.columnName;
|
|
129338
129438
|
this.columnLabel = configs.columnLabel;
|
|
129339
|
-
await this.ezPopoverElement.show(this.calcTopPosition(), configs
|
|
129439
|
+
await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
|
|
129440
|
+
}
|
|
129441
|
+
}
|
|
129442
|
+
calculateLeftPosition(configs) {
|
|
129443
|
+
if (!configs.fromIcon) {
|
|
129444
|
+
return configs.leftPosition;
|
|
129340
129445
|
}
|
|
129446
|
+
const difference = this.ezPopoverElement.getBoundingClientRect().left;
|
|
129447
|
+
const leftReference = parseInt(configs.leftPosition.replace('px', ''));
|
|
129448
|
+
const leftResolved = (leftReference + 16) - difference;
|
|
129449
|
+
return `${(leftResolved > 0 ? leftResolved : 0)}px`;
|
|
129450
|
+
}
|
|
129451
|
+
buildIsTextSearch() {
|
|
129452
|
+
var _a, _b;
|
|
129453
|
+
const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
|
|
129454
|
+
this.isTextSearch = !(userInterface === UserInterface.DECIMALNUMBER || userInterface === UserInterface.INTEGERNUMBER);
|
|
129341
129455
|
}
|
|
129342
129456
|
calcTopPosition() {
|
|
129343
|
-
const referencePosition = this.
|
|
129344
|
-
? this.TOP_POSITION_HEADER_HIDDEN
|
|
129345
|
-
: this.TOP_POSITION.replace('px', '');
|
|
129457
|
+
const referencePosition = this.buildReferenceTopPosition();
|
|
129346
129458
|
const totalPopoverHeight = parseInt(referencePosition) + this.DEFAULT_HEIGHT;
|
|
129347
129459
|
const popoverPosition = Math.round(this.ezPopoverElement.getBoundingClientRect().top);
|
|
129348
129460
|
const popoverBottomPosition = popoverPosition + totalPopoverHeight;
|
|
129349
129461
|
const windowHeight = window.innerHeight;
|
|
129350
129462
|
if (windowHeight > popoverBottomPosition) {
|
|
129351
|
-
return referencePosition
|
|
129463
|
+
return `${referencePosition}px`;
|
|
129352
129464
|
}
|
|
129353
129465
|
const differenceBetween = windowHeight - popoverBottomPosition;
|
|
129354
129466
|
return `${differenceBetween}px`;
|
|
129355
129467
|
}
|
|
129468
|
+
buildReferenceTopPosition() {
|
|
129469
|
+
if (this.noHeaderTaskBar) {
|
|
129470
|
+
return this.gridHeaderHidden ? this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN : this.TOP_POSITION_NO_TASKBAR;
|
|
129471
|
+
}
|
|
129472
|
+
return this.gridHeaderHidden ? this.TOP_POSITION_HEADER_HIDDEN : this.TOP_POSITION;
|
|
129473
|
+
}
|
|
129356
129474
|
async clearConfigs() {
|
|
129357
129475
|
var _a;
|
|
129358
129476
|
await ((_a = this.ezMultiSelectionList) === null || _a === void 0 ? void 0 : _a.clearFilteredOptions());
|
|
@@ -129410,7 +129528,7 @@ const FilterColumn$1 = class extends HTMLElement$1 {
|
|
|
129410
129528
|
}
|
|
129411
129529
|
}
|
|
129412
129530
|
render() {
|
|
129413
|
-
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) })))));
|
|
129531
|
+
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) })))));
|
|
129414
129532
|
}
|
|
129415
129533
|
static get style() { return filterColumnCss; }
|
|
129416
129534
|
};
|
|
@@ -129440,7 +129558,7 @@ const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-ite
|
|
|
129440
129558
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
129441
129559
|
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"]}]);
|
|
129442
129560
|
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]}]);
|
|
129443
|
-
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],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
129561
|
+
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"]]]);
|
|
129444
129562
|
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"]}]);
|
|
129445
129563
|
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"]}]);
|
|
129446
129564
|
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]}]);
|
|
@@ -129449,20 +129567,20 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
|
|
|
129449
129567
|
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"]}]);
|
|
129450
129568
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
|
|
129451
129569
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16]}]);
|
|
129452
|
-
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],"
|
|
129570
|
+
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"]]]);
|
|
129453
129571
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
129454
129572
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
129455
129573
|
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]}]);
|
|
129456
129574
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
129457
129575
|
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]}]);
|
|
129458
129576
|
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"]}]);
|
|
129459
|
-
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]}]);
|
|
129577
|
+
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]}]);
|
|
129460
129578
|
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]}]);
|
|
129461
129579
|
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"]}]);
|
|
129462
129580
|
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"]}]);
|
|
129463
129581
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
129464
129582
|
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"]]]);
|
|
129465
|
-
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]}]);
|
|
129583
|
+
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"]}]);
|
|
129466
129584
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
129467
129585
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
129468
129586
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
@@ -129474,7 +129592,7 @@ const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"messa
|
|
|
129474
129592
|
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"]]]);
|
|
129475
129593
|
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]}]);
|
|
129476
129594
|
const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
|
|
129477
|
-
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]}]);
|
|
129595
|
+
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]}]);
|
|
129478
129596
|
const MultiSelectionBoxMessage = /*@__PURE__*/proxyCustomElement(MultiSelectionBoxMessage$1, [0,"multi-selection-box-message",{"message":[1]}]);
|
|
129479
129597
|
const defineCustomElements = (opts) => {
|
|
129480
129598
|
if (typeof customElements !== 'undefined') {
|
|
@@ -40,6 +40,7 @@ const EzComboBox = class {
|
|
|
40
40
|
this.mode = "regular";
|
|
41
41
|
this.hideErrorOnFocusOut = true;
|
|
42
42
|
this.listOptionsPosition = undefined;
|
|
43
|
+
this.isTextSearch = false;
|
|
43
44
|
}
|
|
44
45
|
observeErrorMessage() {
|
|
45
46
|
var _a;
|
|
@@ -362,7 +363,6 @@ const EzComboBox = class {
|
|
|
362
363
|
this._visibleOptions = [];
|
|
363
364
|
this.clearSource();
|
|
364
365
|
}
|
|
365
|
-
this.setFocus();
|
|
366
366
|
}
|
|
367
367
|
loadOptions(mode, argument = "") {
|
|
368
368
|
this._criteria = argument;
|
|
@@ -547,6 +547,12 @@ const EzComboBox = class {
|
|
|
547
547
|
handlerIconClick() {
|
|
548
548
|
this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
|
|
549
549
|
}
|
|
550
|
+
buildNumberArgument(argument) {
|
|
551
|
+
if (this.isTextSearch) {
|
|
552
|
+
return NaN;
|
|
553
|
+
}
|
|
554
|
+
return Number(argument || undefined);
|
|
555
|
+
}
|
|
550
556
|
onTextInputChangeHandler(event) {
|
|
551
557
|
var _a;
|
|
552
558
|
this.clearDeboucingTimeout();
|
|
@@ -557,7 +563,7 @@ const EzComboBox = class {
|
|
|
557
563
|
return;
|
|
558
564
|
}
|
|
559
565
|
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
560
|
-
const argumentNumber =
|
|
566
|
+
const argumentNumber = this.buildNumberArgument(argument);
|
|
561
567
|
if (!this._criteria) {
|
|
562
568
|
this._textInput.value = event.data || argument;
|
|
563
569
|
}
|
|
@@ -95,15 +95,49 @@ uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
|
|
|
95
95
|
const fieldBuilder = (field) => {
|
|
96
96
|
const builder = uiBuilders.get(field.userInterface) || buildTextInput;
|
|
97
97
|
const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
|
|
98
|
-
|
|
98
|
+
const builtElement = builder(Object.assign(Object.assign({}, field), { label }));
|
|
99
|
+
//@ts-ignore
|
|
100
|
+
builtElement.$attrs$['data-form-item'] = field.name;
|
|
101
|
+
return builtElement;
|
|
99
102
|
};
|
|
100
103
|
|
|
104
|
+
class FormItem {
|
|
105
|
+
constructor(elem) {
|
|
106
|
+
this.elem = elem;
|
|
107
|
+
}
|
|
108
|
+
addRightElement(el) {
|
|
109
|
+
el.classList.add('ez-padding-left--small');
|
|
110
|
+
this.elem.classList.add('ez-col--nowrap');
|
|
111
|
+
this.elem.appendChild(el);
|
|
112
|
+
}
|
|
113
|
+
get fieldName() {
|
|
114
|
+
return this.elem.getAttribute('data-form-item');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
class FormItems {
|
|
118
|
+
constructor(items, formId) {
|
|
119
|
+
this.items = new Map();
|
|
120
|
+
this.formId = formId;
|
|
121
|
+
items.forEach(item => {
|
|
122
|
+
const formItem = new FormItem(item);
|
|
123
|
+
this.items.set(formItem.fieldName, formItem);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
getItem(name) {
|
|
127
|
+
return this.items.get(name);
|
|
128
|
+
}
|
|
129
|
+
get formName() {
|
|
130
|
+
return this.formId;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
101
134
|
const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
|
|
102
135
|
|
|
103
136
|
const EzFormView = class {
|
|
104
137
|
constructor(hostRef) {
|
|
105
138
|
registerInstance(this, hostRef);
|
|
106
139
|
this.ezContentReady = createEvent(this, "ezContentReady", 7);
|
|
140
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
107
141
|
this.fields = undefined;
|
|
108
142
|
}
|
|
109
143
|
async showUp() {
|
|
@@ -129,6 +163,8 @@ const EzFormView = class {
|
|
|
129
163
|
}
|
|
130
164
|
componentDidRender() {
|
|
131
165
|
this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
|
|
166
|
+
const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
|
|
167
|
+
this.formItemsReady.emit(formItems);
|
|
132
168
|
}
|
|
133
169
|
render() {
|
|
134
170
|
ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
|
|
@@ -831,6 +831,7 @@ const EzForm = class {
|
|
|
831
831
|
constructor(hostRef) {
|
|
832
832
|
registerInstance(this, hostRef);
|
|
833
833
|
this.ezReady = createEvent(this, "ezReady", 7);
|
|
834
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
834
835
|
this.onDataUnitAction = (action) => {
|
|
835
836
|
if (action.type === Action.METADATA_LOADED) {
|
|
836
837
|
this.processMetadata();
|