@sankhyalabs/ezui 5.11.0 → 5.12.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/cjs/{ApplicationUtils-2e444734.js → ApplicationUtils-88d75775.js} +7 -6
  2. package/dist/cjs/{RecordValidationProcessor-edd23705.js → RecordValidationProcessor-059f2d03.js} +1 -1
  3. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-combo-box.cjs.entry.js +9 -3
  7. package/dist/cjs/ez-form-view.cjs.entry.js +42 -1
  8. package/dist/cjs/ez-form.cjs.entry.js +3 -2
  9. package/dist/cjs/ez-grid.cjs.entry.js +90 -41
  10. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -1
  11. package/dist/cjs/ez-search.cjs.entry.js +2 -1
  12. package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  14. package/dist/cjs/ezui.cjs.js +1 -1
  15. package/dist/cjs/filter-column.cjs.entry.js +30 -7
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/collection/components/ez-card-item/ez-card-item.css +1 -0
  18. package/dist/collection/components/ez-combo-box/ez-combo-box.js +26 -2
  19. package/dist/collection/components/ez-form/ez-form.js +20 -0
  20. package/dist/collection/components/ez-form-view/ez-form-view.js +23 -0
  21. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +4 -1
  22. package/dist/collection/components/ez-form-view/structure/index.js +34 -0
  23. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
  24. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
  25. package/dist/collection/components/ez-grid/ez-grid.css +1 -1
  26. package/dist/collection/components/ez-grid/ez-grid.js +11 -39
  27. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +50 -8
  28. package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +78 -0
  29. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +21 -1
  30. package/dist/collection/components/ez-search/ez-search.js +20 -1
  31. package/dist/collection/utils/ApplicationUtils.js +7 -6
  32. package/dist/custom-elements/index.js +187 -63
  33. package/dist/esm/{ApplicationUtils-d9a34a16.js → ApplicationUtils-ae588c9c.js} +7 -6
  34. package/dist/esm/{RecordValidationProcessor-abc814af.js → RecordValidationProcessor-0c6f41a1.js} +1 -1
  35. package/dist/esm/ez-actions-button.entry.js +1 -1
  36. package/dist/esm/ez-card-item.entry.js +1 -1
  37. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  38. package/dist/esm/ez-combo-box.entry.js +9 -3
  39. package/dist/esm/ez-form-view.entry.js +42 -1
  40. package/dist/esm/ez-form.entry.js +3 -2
  41. package/dist/esm/ez-grid.entry.js +91 -42
  42. package/dist/esm/ez-multi-selection-list.entry.js +3 -1
  43. package/dist/esm/ez-search.entry.js +2 -1
  44. package/dist/esm/ez-text-edit.entry.js +1 -1
  45. package/dist/esm/ez-upload.entry.js +1 -1
  46. package/dist/esm/ezui.js +1 -1
  47. package/dist/esm/filter-column.entry.js +30 -7
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/ezui/ezui.esm.js +1 -1
  50. package/dist/ezui/p-061f4d73.entry.js +1 -0
  51. package/dist/ezui/p-3078d25c.entry.js +1 -0
  52. package/dist/ezui/{p-37673563.entry.js → p-3e00263f.entry.js} +1 -1
  53. package/dist/ezui/{p-68352e41.entry.js → p-47afb974.entry.js} +1 -1
  54. package/dist/ezui/p-5e55a42b.entry.js +1 -0
  55. package/dist/ezui/p-6fbe368e.entry.js +1 -0
  56. package/dist/ezui/p-7526f2b6.entry.js +1 -0
  57. package/dist/ezui/{p-86a2036d.js → p-7bcb062d.js} +1 -1
  58. package/dist/ezui/{p-fd54b5b4.entry.js → p-833bb237.entry.js} +2 -2
  59. package/dist/ezui/{p-ff82b176.entry.js → p-bc4e0389.entry.js} +1 -1
  60. package/dist/ezui/{p-8bd3903b.entry.js → p-c6c645b0.entry.js} +1 -1
  61. package/dist/ezui/p-ca9aa20c.js +1 -0
  62. package/dist/ezui/{p-9f41b414.entry.js → p-f7127e0f.entry.js} +1 -1
  63. package/dist/ezui/{p-a5e09759.entry.js → p-f9fd8446.entry.js} +1 -1
  64. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +5 -0
  65. package/dist/types/components/ez-form/ez-form.d.ts +5 -0
  66. package/dist/types/components/ez-form-view/ez-form-view.d.ts +5 -0
  67. package/dist/types/components/ez-form-view/structure/index.d.ts +15 -0
  68. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  69. package/dist/types/components/ez-grid/ez-grid.d.ts +3 -5
  70. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
  71. package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +16 -0
  72. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
  73. package/dist/types/components/ez-search/ez-search.d.ts +4 -0
  74. package/dist/types/components.d.ts +35 -0
  75. package/package.json +1 -1
  76. package/dist/ezui/p-2a0e1679.entry.js +0 -1
  77. package/dist/ezui/p-411f3579.entry.js +0 -1
  78. package/dist/ezui/p-4c8b029b.entry.js +0 -1
  79. package/dist/ezui/p-4e31b69b.entry.js +0 -1
  80. package/dist/ezui/p-5a1d8bf8.entry.js +0 -1
  81. package/dist/ezui/p-f15ec3bb.js +0 -1
@@ -82,12 +82,13 @@ class ApplicationUtils {
82
82
  options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
83
83
  }
84
84
  return new Promise(resolve => {
85
- let dialog = document.querySelector("ez-dialog");
86
- if (!dialog) {
87
- dialog = document.createElement("ez-dialog");
88
- window.document.body.appendChild(dialog);
89
- }
90
- dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger, options.beforeClose).then(ok => resolve(ok));
85
+ let dialog = document.createElement("ez-dialog");
86
+ window.document.body.appendChild(dialog);
87
+ dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger, options.beforeClose)
88
+ .then(ok => {
89
+ dialog.remove();
90
+ return resolve(ok);
91
+ });
91
92
  });
92
93
  }
93
94
  static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
@@ -1750,7 +1751,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
1750
1751
  static get style() { return ezCalendarCss; }
1751
1752
  };
1752
1753
 
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)}";
1754
+ 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
1755
 
1755
1756
  const EzCardItem$1 = class extends HTMLElement$1 {
1756
1757
  constructor() {
@@ -2157,6 +2158,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2157
2158
  this.mode = "regular";
2158
2159
  this.hideErrorOnFocusOut = true;
2159
2160
  this.listOptionsPosition = undefined;
2161
+ this.isTextSearch = false;
2160
2162
  }
2161
2163
  observeErrorMessage() {
2162
2164
  var _a;
@@ -2479,7 +2481,6 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2479
2481
  this._visibleOptions = [];
2480
2482
  this.clearSource();
2481
2483
  }
2482
- this.setFocus();
2483
2484
  }
2484
2485
  loadOptions(mode, argument = "") {
2485
2486
  this._criteria = argument;
@@ -2664,6 +2665,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2664
2665
  handlerIconClick() {
2665
2666
  this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
2666
2667
  }
2668
+ buildNumberArgument(argument) {
2669
+ if (this.isTextSearch) {
2670
+ return NaN;
2671
+ }
2672
+ return Number(argument || undefined);
2673
+ }
2667
2674
  onTextInputChangeHandler(event) {
2668
2675
  var _a;
2669
2676
  this.clearDeboucingTimeout();
@@ -2674,7 +2681,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2674
2681
  return;
2675
2682
  }
2676
2683
  const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
2677
- const argumentNumber = Number(argument || undefined);
2684
+ const argumentNumber = this.buildNumberArgument(argument);
2678
2685
  if (!this._criteria) {
2679
2686
  this._textInput.value = event.data || argument;
2680
2687
  }
@@ -4449,6 +4456,7 @@ const EzForm$1 = class extends HTMLElement$1 {
4449
4456
  super();
4450
4457
  this.__registerHost();
4451
4458
  this.ezReady = createEvent(this, "ezReady", 7);
4459
+ this.formItemsReady = createEvent(this, "formItemsReady", 7);
4452
4460
  this.onDataUnitAction = (action) => {
4453
4461
  if (action.type === Action.METADATA_LOADED) {
4454
4462
  this.processMetadata();
@@ -4635,9 +4643,47 @@ uiBuilders$1.set(UserInterface.LONGTEXT, buildTextArea);
4635
4643
  const fieldBuilder = (field) => {
4636
4644
  const builder = uiBuilders$1.get(field.userInterface) || buildTextInput$1;
4637
4645
  const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
4638
- return builder(Object.assign(Object.assign({}, field), { label }));
4646
+ const builtElement = builder(Object.assign(Object.assign({}, field), { label }));
4647
+ //@ts-ignore
4648
+ builtElement.$attrs$['data-form-item'] = field.name;
4649
+ return builtElement;
4639
4650
  };
4640
4651
 
4652
+ class FormItem {
4653
+ constructor(elem) {
4654
+ this.elem = elem;
4655
+ }
4656
+ addRightElement(el) {
4657
+ this.removeRightElement();
4658
+ el.classList.add('ez-padding-left--small');
4659
+ el.setAttribute('data-custom-item', 'true');
4660
+ this.elem.classList.add('ez-col--nowrap');
4661
+ this.elem.appendChild(el);
4662
+ }
4663
+ removeRightElement() {
4664
+ Array.from(this.elem.querySelectorAll('[data-custom-item="true"]')).forEach(item => item.remove());
4665
+ }
4666
+ get fieldName() {
4667
+ return this.elem.getAttribute('data-form-item');
4668
+ }
4669
+ }
4670
+ class FormItems {
4671
+ constructor(items, formId) {
4672
+ this.items = new Map();
4673
+ this.formId = formId;
4674
+ items.forEach(item => {
4675
+ const formItem = new FormItem(item);
4676
+ this.items.set(formItem.fieldName, formItem);
4677
+ });
4678
+ }
4679
+ getItem(name) {
4680
+ return this.items.get(name);
4681
+ }
4682
+ get formName() {
4683
+ return this.formId;
4684
+ }
4685
+ }
4686
+
4641
4687
  const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
4642
4688
 
4643
4689
  const EzFormView$1 = class extends HTMLElement$1 {
@@ -4645,6 +4691,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
4645
4691
  super();
4646
4692
  this.__registerHost();
4647
4693
  this.ezContentReady = createEvent(this, "ezContentReady", 7);
4694
+ this.formItemsReady = createEvent(this, "formItemsReady", 7);
4648
4695
  this.fields = undefined;
4649
4696
  }
4650
4697
  async showUp() {
@@ -4670,6 +4717,8 @@ const EzFormView$1 = class extends HTMLElement$1 {
4670
4717
  }
4671
4718
  componentDidRender() {
4672
4719
  this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
4720
+ const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
4721
+ this.formItemsReady.emit(formItems);
4673
4722
  }
4674
4723
  render() {
4675
4724
  ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
@@ -123656,7 +123705,7 @@ class EzGridCustomHeader {
123656
123705
  onClickFilter() {
123657
123706
  var _a;
123658
123707
  const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
123659
- this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`);
123708
+ this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
123660
123709
  }
123661
123710
  configSortIcon() {
123662
123711
  this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
@@ -124898,7 +124947,7 @@ class AgGridController {
124898
124947
  tooltip: tooltip,
124899
124948
  isSortable: propSortable,
124900
124949
  hasFilter: () => this.hasFilterColumn(source.name),
124901
- showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name) }),
124950
+ showColumnFilter: (leftPosition, fromIcon) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon }),
124902
124951
  },
124903
124952
  valueFormatter: params => {
124904
124953
  if (params.value == undefined) {
@@ -125121,7 +125170,85 @@ function getElementID(sufix) {
125121
125170
  };
125122
125171
  }
125123
125172
 
125124
- 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}";
125173
+ class InMemoryFilterColumnDataSource {
125174
+ constructor(dataUnit) {
125175
+ var _a;
125176
+ this.onDataUnitAction = (action) => {
125177
+ if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
125178
+ this.originalRecords = this.dataUnit.records;
125179
+ }
125180
+ };
125181
+ this.dataUnit = dataUnit;
125182
+ this.originalRecords = (_a = this.dataUnit.records) !== null && _a !== void 0 ? _a : [];
125183
+ this.dataUnit.subscribe(this.onDataUnitAction);
125184
+ }
125185
+ fetchData(filterTerm, fieldName) {
125186
+ return new Promise(resolve => {
125187
+ const filteredRecords = this.originalRecords.filter(record => this.includesSearchTerm(record, fieldName, filterTerm));
125188
+ const options = filteredRecords.map(item => this.buildFieldOption(item, fieldName));
125189
+ resolve(this.removeDuplicatedOptions(options));
125190
+ });
125191
+ }
125192
+ buildFieldOption(item, fieldName) {
125193
+ return {
125194
+ value: this.buildValue(item, fieldName),
125195
+ label: this.formatLabel(fieldName, item[fieldName]),
125196
+ check: true,
125197
+ };
125198
+ }
125199
+ buildValue(item, fieldName) {
125200
+ var _a;
125201
+ let value = item[fieldName];
125202
+ if (((_a = this.dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType) === DataType.OBJECT) {
125203
+ value = value.value;
125204
+ }
125205
+ return value === null || value === void 0 ? void 0 : value.toString();
125206
+ }
125207
+ removeDuplicatedOptions(options) {
125208
+ const noDuplicatedOptions = [];
125209
+ options.forEach(option => {
125210
+ if (!noDuplicatedOptions.find(({ label }) => label === option.label)) {
125211
+ noDuplicatedOptions.push(option);
125212
+ }
125213
+ });
125214
+ return noDuplicatedOptions;
125215
+ }
125216
+ includesSearchTerm(record, fieldName, filterTerm) {
125217
+ let label = this.buildLabel(fieldName, record[fieldName]);
125218
+ return label.toLowerCase().includes(filterTerm.toLowerCase());
125219
+ }
125220
+ buildLabel(fieldName, value) {
125221
+ var _a;
125222
+ const { dataType } = this.dataUnit.getField(fieldName);
125223
+ if (dataType === DataType.NUMBER) {
125224
+ return value === null || value === void 0 ? void 0 : value.toString().replace('.', ',');
125225
+ }
125226
+ if (dataType === DataType.DATE) {
125227
+ return (typeof value === 'object')
125228
+ ? (_a = DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString()
125229
+ : value === null || value === void 0 ? void 0 : value.toString();
125230
+ }
125231
+ if (dataType === DataType.OBJECT) {
125232
+ return `${value === null || value === void 0 ? void 0 : value.value} - ${value === null || value === void 0 ? void 0 : value.label}`;
125233
+ }
125234
+ return value === null || value === void 0 ? void 0 : value.toString();
125235
+ }
125236
+ formatLabel(fieldName, value) {
125237
+ var _a, _b;
125238
+ const { userInterface, dataType } = this.dataUnit.getField(fieldName);
125239
+ if (dataType === DataType.DATE) {
125240
+ return (typeof value === 'object')
125241
+ ? DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))
125242
+ : value === null || value === void 0 ? void 0 : value.toString();
125243
+ }
125244
+ if (dataType === DataType.NUMBER && userInterface !== UserInterface.DECIMALNUMBER) {
125245
+ return (_a = parseInt(this.dataUnit.getFormattedValue(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString();
125246
+ }
125247
+ return (_b = this.dataUnit.getFormattedValue(fieldName, value)) === null || _b === void 0 ? void 0 : _b.toString();
125248
+ }
125249
+ }
125250
+
125251
+ 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(--visible, 1)}.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
125252
 
125126
125253
  const windowInstace$1 = window;
125127
125254
  const EzGrid$1 = class extends HTMLElement$1 {
@@ -125135,18 +125262,13 @@ const EzGrid$1 = class extends HTMLElement$1 {
125135
125262
  this.componentReady = createEvent(this, "componentReady", 7);
125136
125263
  this._gridController = new AgGridController(false);
125137
125264
  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
125265
  this._paginationInfo = undefined;
125144
125266
  this._paginationChangedByKeyboard = true;
125145
125267
  this._showSelectionCounter = false;
125146
125268
  this._isAllSelection = false;
125147
125269
  this._currentPageSelected = undefined;
125148
125270
  this._selectionCount = undefined;
125149
- this._originalRecords = [];
125271
+ this._hasLeftButtons = false;
125150
125272
  this.multipleSelection = undefined;
125151
125273
  this.config = undefined;
125152
125274
  this.selectionToastConfig = undefined;
@@ -125416,44 +125538,20 @@ const EzGrid$1 = class extends HTMLElement$1 {
125416
125538
  });
125417
125539
  }
125418
125540
  componentWillLoad() {
125541
+ this._hasLeftButtons = !!this._element.querySelector('[slot="leftButtons"]');
125419
125542
  if (!this.dataUnit.name.includes("InMemoryDataUnit"))
125420
125543
  return;
125421
- this.dataUnit.subscribe(this.onDataUnitAction);
125422
125544
  }
125423
125545
  getDataSource() {
125424
- return this.columnfilterDataSource ? this.columnfilterDataSource : this.buildDefaultDataSource();
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
- };
125546
+ var _a;
125547
+ return (_a = this.columnfilterDataSource) !== null && _a !== void 0 ? _a : new InMemoryFilterColumnDataSource(this.dataUnit);
125446
125548
  }
125447
- formatLabel(fieldName, value) {
125448
- const { userInterface } = this.dataUnit.getField(fieldName);
125449
- if (userInterface === UserInterface.DATETIME) {
125450
- return DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value));
125451
- }
125452
- return String(this.dataUnit.getFormattedValue(fieldName, value));
125549
+ hideHeader() {
125550
+ return (!!this._element.getAttribute("no-header") && !this._paginationInfo);
125453
125551
  }
125454
125552
  render() {
125455
125553
  var _a;
125456
- return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: !!this._element.getAttribute("no-header"), 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
125554
+ 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
125555
  ${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
125458
125556
  ` }, 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
125557
  }
@@ -126321,6 +126419,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
126321
126419
  this.dataSource = undefined;
126322
126420
  this.useOptions = false;
126323
126421
  this.options = undefined;
126422
+ this.isTextSearch = false;
126324
126423
  this.filteredOptions = undefined;
126325
126424
  this.displayOptions = undefined;
126326
126425
  this.viewScenario = undefined;
@@ -126403,6 +126502,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
126403
126502
  this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
126404
126503
  }
126405
126504
  this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
126505
+ this.searchInput.value = "";
126406
126506
  }
126407
126507
  handleRemoveItemFromOptions(item) {
126408
126508
  this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
@@ -126466,7 +126566,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
126466
126566
  return scenarios[view];
126467
126567
  }
126468
126568
  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)))));
126569
+ 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
126570
  }
126471
126571
  static get watchers() { return {
126472
126572
  "useOptions": ["onChangeUseOptions"],
@@ -127113,6 +127213,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
127113
127213
  this.canShowError = true;
127114
127214
  this.hideErrorOnFocusOut = true;
127115
127215
  this.listOptionsPosition = undefined;
127216
+ this.isTextSearch = false;
127116
127217
  }
127117
127218
  observeErrorMessage() {
127118
127219
  if (this._comboElement) {
@@ -127170,7 +127271,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
127170
127271
  }
127171
127272
  render() {
127172
127273
  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 }));
127274
+ 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
127275
  }
127175
127276
  ;
127176
127277
  get _elem() { return this; }
@@ -129307,19 +129408,23 @@ const FilterColumn$1 = class extends HTMLElement$1 {
129307
129408
  super();
129308
129409
  this.__registerHost();
129309
129410
  this.applyFilterColumnOptions = createEvent(this, "applyFilterColumnOptions", 7);
129310
- this.TOP_POSITION = '65px';
129411
+ this.TOP_POSITION = '65';
129311
129412
  this.TOP_POSITION_HEADER_HIDDEN = '18';
129413
+ this.TOP_POSITION_NO_TASKBAR = '32';
129414
+ this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
129312
129415
  this.DEFAULT_HEIGHT = 430;
129313
129416
  this.opened = true;
129314
129417
  this.columnName = undefined;
129315
129418
  this.columnLabel = undefined;
129316
129419
  this.gridHeaderHidden = false;
129420
+ this.noHeaderTaskBar = false;
129317
129421
  this.dataSource = undefined;
129318
129422
  this.dataUnit = undefined;
129319
129423
  this.options = undefined;
129320
129424
  this.selectedItems = undefined;
129321
129425
  this.fieldDescriptor = undefined;
129322
129426
  this.useOptions = false;
129427
+ this.isTextSearch = false;
129323
129428
  }
129324
129429
  async hide() {
129325
129430
  await this.ezPopoverElement.hide();
@@ -129333,26 +129438,45 @@ const FilterColumn$1 = class extends HTMLElement$1 {
129333
129438
  if (this.canShow(configs)) {
129334
129439
  await this.hide();
129335
129440
  this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
129441
+ this.buildIsTextSearch();
129336
129442
  this.setOptions(configs.filteredOptions);
129337
129443
  this.columnName = configs.columnName;
129338
129444
  this.columnLabel = configs.columnLabel;
129339
- await this.ezPopoverElement.show(this.calcTopPosition(), configs.leftPosition);
129445
+ await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
129446
+ }
129447
+ }
129448
+ calculateLeftPosition(configs) {
129449
+ if (!configs.fromIcon) {
129450
+ return configs.leftPosition;
129340
129451
  }
129452
+ const difference = this.ezPopoverElement.getBoundingClientRect().left;
129453
+ const leftReference = parseInt(configs.leftPosition.replace('px', ''));
129454
+ const leftResolved = (leftReference + 16) - difference;
129455
+ return `${(leftResolved > 0 ? leftResolved : 0)}px`;
129456
+ }
129457
+ buildIsTextSearch() {
129458
+ var _a, _b;
129459
+ const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
129460
+ this.isTextSearch = !(userInterface === UserInterface.DECIMALNUMBER || userInterface === UserInterface.INTEGERNUMBER);
129341
129461
  }
129342
129462
  calcTopPosition() {
129343
- const referencePosition = this.gridHeaderHidden
129344
- ? this.TOP_POSITION_HEADER_HIDDEN
129345
- : this.TOP_POSITION.replace('px', '');
129463
+ const referencePosition = this.buildReferenceTopPosition();
129346
129464
  const totalPopoverHeight = parseInt(referencePosition) + this.DEFAULT_HEIGHT;
129347
129465
  const popoverPosition = Math.round(this.ezPopoverElement.getBoundingClientRect().top);
129348
129466
  const popoverBottomPosition = popoverPosition + totalPopoverHeight;
129349
129467
  const windowHeight = window.innerHeight;
129350
129468
  if (windowHeight > popoverBottomPosition) {
129351
- return referencePosition;
129469
+ return `${referencePosition}px`;
129352
129470
  }
129353
129471
  const differenceBetween = windowHeight - popoverBottomPosition;
129354
129472
  return `${differenceBetween}px`;
129355
129473
  }
129474
+ buildReferenceTopPosition() {
129475
+ if (this.noHeaderTaskBar) {
129476
+ return this.gridHeaderHidden ? this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN : this.TOP_POSITION_NO_TASKBAR;
129477
+ }
129478
+ return this.gridHeaderHidden ? this.TOP_POSITION_HEADER_HIDDEN : this.TOP_POSITION;
129479
+ }
129356
129480
  async clearConfigs() {
129357
129481
  var _a;
129358
129482
  await ((_a = this.ezMultiSelectionList) === null || _a === void 0 ? void 0 : _a.clearFilteredOptions());
@@ -129410,7 +129534,7 @@ const FilterColumn$1 = class extends HTMLElement$1 {
129410
129534
  }
129411
129535
  }
129412
129536
  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) })))));
129537
+ 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
129538
  }
129415
129539
  static get style() { return filterColumnCss; }
129416
129540
  };
@@ -129440,7 +129564,7 @@ const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-ite
129440
129564
  const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
129441
129565
  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
129566
  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"]]]);
129567
+ 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
129568
  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
129569
  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
129570
  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 +129573,20 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
129449
129573
  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
129574
  const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
129451
129575
  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],"_originalRecords":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
129576
+ 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
129577
  const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
129454
129578
  const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
129455
129579
  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
129580
  const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
129457
129581
  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
129582
  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]}]);
129583
+ 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
129584
  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
129585
  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
129586
  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
129587
  const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
129464
129588
  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]}]);
129589
+ 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
129590
  const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
129467
129591
  const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
129468
129592
  const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
@@ -129474,7 +129598,7 @@ const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"messa
129474
129598
  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
129599
  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
129600
  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]}]);
129601
+ 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
129602
  const MultiSelectionBoxMessage = /*@__PURE__*/proxyCustomElement(MultiSelectionBoxMessage$1, [0,"multi-selection-box-message",{"message":[1]}]);
129479
129603
  const defineCustomElements = (opts) => {
129480
129604
  if (typeof customElements !== 'undefined') {
@@ -71,12 +71,13 @@ class ApplicationUtils {
71
71
  options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
72
72
  }
73
73
  return new Promise(resolve => {
74
- let dialog = document.querySelector("ez-dialog");
75
- if (!dialog) {
76
- dialog = document.createElement("ez-dialog");
77
- window.document.body.appendChild(dialog);
78
- }
79
- dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger, options.beforeClose).then(ok => resolve(ok));
74
+ let dialog = document.createElement("ez-dialog");
75
+ window.document.body.appendChild(dialog);
76
+ dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger, options.beforeClose)
77
+ .then(ok => {
78
+ dialog.remove();
79
+ return resolve(ok);
80
+ });
80
81
  });
81
82
  }
82
83
  static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
@@ -1,5 +1,5 @@
1
1
  import { UserInterface } from '@sankhyalabs/core';
2
- import { A as ApplicationUtils } from './ApplicationUtils-d9a34a16.js';
2
+ import { A as ApplicationUtils } from './ApplicationUtils-ae588c9c.js';
3
3
 
4
4
  const buildFieldMetadata = (descriptor, config) => {
5
5
  let { name, label, group } = Object.assign({}, config);
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
2
2
  import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
3
- import './ApplicationUtils-d9a34a16.js';
3
+ import './ApplicationUtils-ae588c9c.js';
4
4
  import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
2
2
  import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
 
4
- 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)}";
4
+ 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)}";
5
5
 
6
6
  const EzCardItem = class {
7
7
  constructor(hostRef) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-296b8458.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
- import { A as ApplicationUtils } from './ApplicationUtils-d9a34a16.js';
3
+ import { A as ApplicationUtils } from './ApplicationUtils-ae588c9c.js';
4
4
  import './DialogType-54a62731.js';
5
5
  import './CheckMode-bdb2ec19.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
2
2
  import { ObjectUtils, FloatingManager, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
- import { A as ApplicationUtils } from './ApplicationUtils-d9a34a16.js';
3
+ import { A as ApplicationUtils } from './ApplicationUtils-ae588c9c.js';
4
4
  import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
@@ -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 = Number(argument || undefined);
566
+ const argumentNumber = this.buildNumberArgument(argument);
561
567
  if (!this._criteria) {
562
568
  this._textInput.value = event.data || argument;
563
569
  }