@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-35029.1 → 0.0.0-bugfix-dev-KB-37979.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-date-input.cjs.entry.js +3 -0
  3. package/dist/cjs/ez-date-time-input.cjs.entry.js +3 -0
  4. package/dist/cjs/ez-grid.cjs.entry.js +24 -18
  5. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -10
  6. package/dist/cjs/ez-number-input.cjs.entry.js +3 -0
  7. package/dist/cjs/ez-search.cjs.entry.js +3 -4
  8. package/dist/cjs/ez-split-button.cjs.entry.js +147 -0
  9. package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
  10. package/dist/cjs/ez-split-panel.cjs.entry.js +6 -5
  11. package/dist/cjs/ezui.cjs.js +1 -1
  12. package/dist/cjs/filter-column.cjs.entry.js +16 -5
  13. package/dist/cjs/index-a7b0c73d.js +8 -4
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/collection/collection-manifest.json +1 -0
  16. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -1
  17. package/dist/collection/components/ez-date-input/ez-date-input.js +3 -0
  18. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +3 -0
  19. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +11 -10
  20. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +15 -1
  21. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -3
  22. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +16 -5
  23. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +2 -10
  24. package/dist/collection/components/ez-number-input/ez-number-input.js +3 -0
  25. package/dist/collection/components/ez-search/ez-search.js +3 -4
  26. package/dist/collection/components/ez-split-button/ez-split-button.css +229 -0
  27. package/dist/collection/components/ez-split-button/ez-split-button.js +436 -0
  28. package/dist/collection/components/ez-split-button/test/dropdownItems.js +42 -0
  29. package/dist/collection/components/ez-split-panel/ez-split-panel.css +0 -1
  30. package/dist/collection/components/ez-split-panel/ez-split-panel.js +5 -4
  31. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +7 -3
  32. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +23 -2
  33. package/dist/custom-elements/index.d.ts +6 -0
  34. package/dist/custom-elements/index.js +209 -47
  35. package/dist/esm/ez-combo-box.entry.js +1 -1
  36. package/dist/esm/ez-date-input.entry.js +3 -0
  37. package/dist/esm/ez-date-time-input.entry.js +3 -0
  38. package/dist/esm/ez-grid.entry.js +24 -18
  39. package/dist/esm/ez-multi-selection-list.entry.js +2 -10
  40. package/dist/esm/ez-number-input.entry.js +3 -0
  41. package/dist/esm/ez-search.entry.js +3 -4
  42. package/dist/esm/ez-split-button.entry.js +143 -0
  43. package/dist/esm/ez-split-item.entry.js +4 -3
  44. package/dist/esm/ez-split-panel.entry.js +6 -5
  45. package/dist/esm/ezui.js +1 -1
  46. package/dist/esm/filter-column.entry.js +16 -5
  47. package/dist/esm/index-baa5e267.js +8 -4
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/ezui/ezui.esm.js +1 -1
  50. package/dist/ezui/p-055fd02c.entry.js +1 -0
  51. package/dist/ezui/{p-300bf244.entry.js → p-07cbffce.entry.js} +1 -1
  52. package/dist/ezui/{p-c0f1715f.entry.js → p-18e7870d.entry.js} +1 -1
  53. package/dist/ezui/p-25ed09c6.entry.js +1 -0
  54. package/dist/ezui/p-50186acb.entry.js +1 -0
  55. package/dist/ezui/{p-844ee673.entry.js → p-661f6820.entry.js} +1 -1
  56. package/dist/ezui/p-672dd122.entry.js +1 -0
  57. package/dist/ezui/{p-40f72de4.entry.js → p-784fe207.entry.js} +1 -1
  58. package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
  59. package/dist/ezui/p-baf80b13.entry.js +1 -0
  60. package/dist/ezui/p-e562d05e.entry.js +1 -0
  61. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -0
  62. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  63. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
  64. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  65. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +4 -1
  66. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +0 -1
  67. package/dist/types/components/ez-split-button/ez-split-button.d.ts +89 -0
  68. package/dist/types/components/ez-split-button/test/dropdownItems.d.ts +2 -0
  69. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
  70. package/dist/types/components.d.ts +123 -0
  71. package/package.json +2 -1
  72. package/react/components.d.ts +1 -0
  73. package/react/components.js +1 -0
  74. package/react/components.js.map +1 -1
  75. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +0 -8
  76. package/dist/ezui/p-133fae4a.entry.js +0 -1
  77. package/dist/ezui/p-24d3fede.entry.js +0 -1
  78. package/dist/ezui/p-428a05fe.entry.js +0 -1
  79. package/dist/ezui/p-596634e9.entry.js +0 -1
  80. package/dist/ezui/p-af15c277.entry.js +0 -1
  81. package/dist/ezui/p-cd0499a2.entry.js +0 -1
  82. package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +0 -1
@@ -2716,7 +2716,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2716
2716
  }
2717
2717
  else {
2718
2718
  window.setTimeout(() => {
2719
- this.setInputValue();
2719
+ this.setInputValue(false);
2720
2720
  }, this._deboucingTime);
2721
2721
  }
2722
2722
  this.resetOptions();
@@ -2997,6 +2997,9 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2997
2997
  this._calendar.hide();
2998
2998
  }
2999
2999
  handleBlur() {
3000
+ if (!this._changePending) {
3001
+ return;
3002
+ }
3000
3003
  try {
3001
3004
  const strValue = this._textInput.value;
3002
3005
  const newValue = DateUtils$1.strToDate(strValue);
@@ -3230,6 +3233,9 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
3230
3233
  }
3231
3234
  handleBlur() {
3232
3235
  var _a, _b;
3236
+ if (!this._changePending) {
3237
+ return;
3238
+ }
3233
3239
  try {
3234
3240
  const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
3235
3241
  const newValue = this.getParsedDateTime();
@@ -123706,6 +123712,14 @@ var AllEnterpriseModules = [
123706
123712
  ModuleRegistry.registerModules(AllEnterpriseModules);
123707
123713
 
123708
123714
  class DataSource {
123715
+ updateLoadedRecords(action) {
123716
+ const records = action.payload;
123717
+ if ((records === null || records === void 0 ? void 0 : records.length) > 0) {
123718
+ records.forEach(record => {
123719
+ this._controller.changeValues(record, [record.__record__id__]);
123720
+ });
123721
+ }
123722
+ }
123709
123723
  isSilentChange(action) {
123710
123724
  //TODO: Provisorio p/ não atualizar a grade quando a alteração for apenas de campos transisntes
123711
123725
  var _a, _b;
@@ -123728,6 +123742,9 @@ class DataSource {
123728
123742
  break;
123729
123743
  case Action.LOADING_DATA:
123730
123744
  this._waitingForLoad = true;
123745
+ if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
123746
+ this._controller.clearFilter();
123747
+ }
123731
123748
  this._controller.refresh();
123732
123749
  break;
123733
123750
  case Action.DATA_LOADED:
@@ -123758,6 +123775,9 @@ class DataSource {
123758
123775
  case Action.PREVIOUS_SELECTED:
123759
123776
  this.updateSelection();
123760
123777
  break;
123778
+ case Action.RECORD_LOADED:
123779
+ this.updateLoadedRecords(action);
123780
+ break;
123761
123781
  }
123762
123782
  };
123763
123783
  this._dataUnit = dataUnit;
@@ -123827,15 +123847,6 @@ class DataSource {
123827
123847
  }
123828
123848
  }
123829
123849
 
123830
- function calcFilterColumnLeftPosition(leftReference) {
123831
- const FIX_MARGIN = 60;
123832
- const FILTER_COLUMN_WIDTH = 330;
123833
- const screenWidth = window.innerWidth;
123834
- const maxLeft = screenWidth - (FILTER_COLUMN_WIDTH + FIX_MARGIN);
123835
- const leftInt = leftReference - FIX_MARGIN;
123836
- return leftInt > maxLeft ? maxLeft : leftInt;
123837
- }
123838
-
123839
123850
  class EzGridCustomHeader {
123840
123851
  init(agParams) {
123841
123852
  var _a;
@@ -123872,8 +123883,7 @@ class EzGridCustomHeader {
123872
123883
  }
123873
123884
  onClickFilter() {
123874
123885
  var _a;
123875
- const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
123876
- this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
123886
+ this.params.showColumnFilter((_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left);
123877
123887
  }
123878
123888
  configSortIcon() {
123879
123889
  this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
@@ -124532,6 +124542,10 @@ class AgGridController {
124532
124542
  this._gridOptions.api.refreshHeader();
124533
124543
  this._dataUnit.loadData(undefined, undefined, undefined, EZ_GRID_LOADING_SOURCE);
124534
124544
  }
124545
+ clearFilter() {
124546
+ this._filteredColumns.clear();
124547
+ this._gridOptions.api.refreshHeader();
124548
+ }
124535
124549
  showFilterColumn(configs) {
124536
124550
  var _a;
124537
124551
  (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
@@ -124550,7 +124564,7 @@ class AgGridController {
124550
124564
  this._idAttribName = '__record__id__';
124551
124565
  this._gridConfig = [];
124552
124566
  this._filteredColumns = new Map();
124553
- this._filterColumnleftPosition = '0px';
124567
+ this._filterColumnleftPosition = 0;
124554
124568
  this._enterprise = enterprise;
124555
124569
  }
124556
124570
  getGridConfig() {
@@ -124676,11 +124690,9 @@ class AgGridController {
124676
124690
  this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
124677
124691
  }
124678
124692
  }
124679
- setFilterColumnLeftPosition(params) {
124680
- if (params.type === 'columnMenu') {
124681
- const ePopup = params.ePopup;
124682
- const leftString = ePopup.style.left.replace('px', '');
124683
- this._filterColumnleftPosition = `${calcFilterColumnLeftPosition(parseInt(leftString))}px`;
124693
+ setFilterColumnLeftPosition({ type, ePopup }) {
124694
+ if (type === 'columnMenu') {
124695
+ this._filterColumnleftPosition = ePopup.getBoundingClientRect().left;
124684
124696
  return;
124685
124697
  }
124686
124698
  }
@@ -125120,7 +125132,7 @@ class AgGridController {
125120
125132
  tooltip: tooltip,
125121
125133
  isSortable: propSortable,
125122
125134
  hasFilter: () => this.hasFilterColumn(source.name),
125123
- showColumnFilter: (leftPosition, fromIcon) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon }),
125135
+ showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
125124
125136
  },
125125
125137
  valueFormatter: params => {
125126
125138
  if (params.value == undefined) {
@@ -126830,16 +126842,8 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
126830
126842
  }
126831
126843
  handleChangeSelectedItem(event) {
126832
126844
  const { detail: itemCheckSelected } = event;
126833
- this.filteredOptions = this.filteredOptions.map(item => {
126834
- if (item.label === itemCheckSelected.label) {
126835
- return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
126836
- }
126837
- return item;
126838
- });
126839
- this.clearInputs();
126840
- }
126841
- clearInputs() {
126842
- this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
126845
+ const itemSelected = this.filteredOptions.find(item => item.label === itemCheckSelected.label);
126846
+ itemSelected.check = itemCheckSelected.check;
126843
126847
  }
126844
126848
  buildViewList(hasDelete) {
126845
126849
  return (h(Fragment, null, this.displayOptionToCheckAllItems && (h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
@@ -126989,6 +126993,9 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
126989
126993
  this.ezCancelWaitingChange.emit();
126990
126994
  }
126991
126995
  handleBlur() {
126996
+ if (!this._changePending) {
126997
+ return;
126998
+ }
126992
126999
  try {
126993
127000
  const parsedNumber = this.getParsedNumber();
126994
127001
  if (parsedNumber !== undefined && isNaN(parsedNumber)) {
@@ -127682,10 +127689,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
127682
127689
  if (currentValue == undefined) {
127683
127690
  return;
127684
127691
  }
127685
- if (!this.showSelectedValue || currentValue.value == undefined) {
127686
- return currentValue.label;
127687
- }
127688
- return currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
127692
+ let text = !this.showSelectedValue || currentValue.value == undefined ? currentValue.label : `${currentValue.value} - ${currentValue.label}`;
127693
+ text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
127694
+ return text;
127689
127695
  }
127690
127696
  getText() {
127691
127697
  const currentValue = this.getSelectedOption(this.value);
@@ -128244,7 +128250,148 @@ const EzSkeleton$1 = class extends HTMLElement$1 {
128244
128250
  static get style() { return ezSkeletonCss; }
128245
128251
  };
128246
128252
 
128247
- const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);padding:var(--space--nano);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:-webkit-fill-available}";
128253
+ const ezSplitButtonCss = ":host{--ez-split-button--min-width:24;--ez-split-button--width:'auto';--ez-split-button__medium--height:32px;--ez-split-button__large--height:42px;--ez-split-button__medium-icon--width:40px;--ez-split-button__large-icon--width:44px;--ez-split-button__inline__icon--gap:6px;--ez-split-button__label--padding-top:0px;--ez-split-button__label--padding-bottom:0px;--ez-split-button__right-button--padding-left:8px;--ez-split-button--color:var(--title--primary, #FFF);--ez-split-button--font-size:var(--text--medium, 14px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--text-weight--large);--ez-split-button--background-color:var(--background--medium, #008561);--ez-split-button--border-radius:var(--border--radius-large, 12px);--ez-split-button--border:none;--ez-split-button--justify-content:center;--ez-split-button--hover-color:var(--color--primary-600);--ez-split-button--hover--background-color:var(--background--medium, var(--ez-split-button--background-color));--ez-split-button--disabled-color:var(--text--disable);--ez-split-button--disabled--background-color:var(--color--disable-secondary);--ez-split-button--focus--border:var(--border--medium, 2px) var(--color--primary-300);--ez-split-button--focus--box-shadow:none;--ez-split-button--active-color:var(--color--primary-700);--ez-split-button--active--background-color:var(--background--strong)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-split-button--min-width);width:var(--ez-split-button--width);height:var(--ez-split-button__medium--height);font-family:var(--ez-split-button--font-family);font-size:var(--ez-split-button--font-size);font-weight:var(--ez-split-button--font-weight);padding:var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;border-top-left-radius:var(--ez-split-button--border-radius);border-bottom-left-radius:var(--ez-split-button--border-radius);background-color:var(--ez-split-button--background-color);color:var(--ez-split-button--color);fill:var(--ez-split-button--color);border:var(--ez-split-button--border);justify-content:var(--ez-split-button--justify-content)}label{cursor:pointer}button:active{outline:none;box-shadow:none;background-color:var(--ez-split-button--active--background-color);color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.ez-split-button__left-button:focus,.ez-split-button__right-button:focus{outline:var(--ez-split-button--focus--border);box-shadow:var(--ez-split-button--focus--box-shadow)}.ez-split-button__left-button:hover,.ez-split-button__right-button:hover{outline:none;background-color:var(--ez-split-button--hover--background-color);color:var(--ez-split-button--hover-color);fill:var(--ez-split-button--hover-color);--ez-icon--color:var(--ez-split-button--hover-color)}.ez-split-button__left-button:disabled,.ez-split-button__left-button:disabled label,.ez-split-button__right-button:disabled{background-color:var(--ez-split-button--disabled--background-color);color:var(--ez-split-button--disabled-color);fill:var(--ez-split-button--disabled-color);border:none;--ez-icon--color:var(--ez-split-button--disabled-color);cursor:not-allowed}button.large{height:var(--ez-split-button__large--height)}button.medium{height:var(--ez-split-button__medium--height)}.default label{padding:var(--ez-split-button__label--padding-top) 12px var(--ez-split-button__label--padding-bottom) 20px}.icon-left{gap:var(--ez-split-button__inline__icon--gap)}.icon-left label{padding-right:12px}.icon-left ez-icon{padding-left:20px}.icon-only{padding-left:12px;padding-right:12px}.ez-split-button__right-button{border-top-right-radius:var(--ez-split-button--border-radius);border-bottom-right-radius:var(--ez-split-button--border-radius);border-top-left-radius:0;border-bottom-left-radius:0}.ez-split-button__right-button--medium{min-width:var(--ez-split-button__medium-icon--width)}.ez-split-button__right-button--large{min-width:var(--ez-split-button__large-icon--width)}.ez-split-button__right-button--divider{top:10%;bottom:10%}.ez-split-button__right-button--divider:before{content:\"\";position:absolute;left:0;border-left:1px solid rgba(0, 0, 0, 20%);border-radius:2px;height:75%}.btn-icon--medium{min-width:--ez-split-button__medium-icon--width}.btn-icon--large{min-width:--ez-split-button__large-icon--width}.ez-split-button__right-button-container{position:absolute;left:0;padding-left:var(--ez-split-button__right-button--padding-left)}.label-icon{display:flex;flex-direction:row;align-items:center;color:var(--ez-split-button--color)}.label-icon:active{color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.dropdown{display:flex}.dropdown-content{display:block;position:absolute;background-color:#f1f1f1;min-width:160px;z-index:--ez-elevation--8;border-radius:var(--ez-split-button--border-radius)}.dropdown-content>ez-dropdown{position:relative}";
128254
+
128255
+ const EzSplitButton$1 = class extends HTMLElement$1 {
128256
+ constructor() {
128257
+ super();
128258
+ this.__registerHost();
128259
+ this.__attachShadow();
128260
+ this.buttonClick = createEvent(this, "buttonClick", 7);
128261
+ this.dropdownItemClick = createEvent(this, "dropdownItemClick", 7);
128262
+ this.dropdownSubActionClick = createEvent(this, "dropdownSubActionClick", 7);
128263
+ this.rightDefaultTitle = 'Mais opções';
128264
+ this.show = false;
128265
+ this.enabled = true;
128266
+ this.iconName = undefined;
128267
+ this.image = undefined;
128268
+ this.items = undefined;
128269
+ this.label = undefined;
128270
+ this.leftTitle = undefined;
128271
+ this.rightTitle = 'Mais opções';
128272
+ this.mode = 'default';
128273
+ this.size = 'medium';
128274
+ }
128275
+ /**
128276
+ * Remove o foco de ambos os botões.
128277
+ */
128278
+ async setBlur() {
128279
+ this.leftButton.blur();
128280
+ this.rightButton.blur();
128281
+ }
128282
+ /**
128283
+ * Aplica o foco no botão principal.
128284
+ */
128285
+ async setLeftButtonFocus() {
128286
+ this.leftButton.focus();
128287
+ }
128288
+ /**
128289
+ * Aplica o foco no botão do dropdown.
128290
+ */
128291
+ async setRightButtonFocus() {
128292
+ this.rightButton.focus();
128293
+ }
128294
+ clickListener(evt) {
128295
+ if (!this.enabled) {
128296
+ evt.preventDefault();
128297
+ evt.stopPropagation();
128298
+ evt.stopImmediatePropagation();
128299
+ }
128300
+ }
128301
+ getIconSize(sizeParam = 'medium') {
128302
+ var _a;
128303
+ const sizeList = ['medium', 'large'];
128304
+ const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
128305
+ return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
128306
+ }
128307
+ closeDropdown() {
128308
+ this.show = false;
128309
+ }
128310
+ toggleDropdown() {
128311
+ this.show = !this.show;
128312
+ }
128313
+ handleButtonClick() {
128314
+ this.buttonClick.emit();
128315
+ }
128316
+ handleDropdownItemClick(evt) {
128317
+ this.dropdownItemClick.emit(evt.detail);
128318
+ evt.stopPropagation();
128319
+ this.closeDropdown();
128320
+ }
128321
+ handleDropdownSubActionClick(evt) {
128322
+ this.dropdownSubActionClick.emit(evt.detail);
128323
+ evt.stopPropagation();
128324
+ this.closeDropdown();
128325
+ }
128326
+ /**
128327
+ * Método responsável em posicionar o dropdown na tela.
128328
+ * Faz com que o dropdown se ajuste automaticamente ao espaco na tela
128329
+ */
128330
+ positionDropdown() {
128331
+ const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
128332
+ const rightButtonRect = _rightButton.getBoundingClientRect();
128333
+ const dropdownParentRect = _dropdownParent.getBoundingClientRect();
128334
+ const spaceBelow = window.innerHeight - rightButtonRect.bottom;
128335
+ const spaceAbove = rightButtonRect.top;
128336
+ const spaceRight = window.innerWidth - rightButtonRect.right;
128337
+ const spaceLeft = rightButtonRect.left;
128338
+ const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
128339
+ const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
128340
+ let top = `${rightButtonRect.bottom + window.scrollY}px`;
128341
+ let left = `${rightButtonRect.left + window.scrollX}px`;
128342
+ let bottom = 'auto';
128343
+ if (hasSpaceBelow) {
128344
+ bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
128345
+ top = 'auto';
128346
+ _dropdownParent.style.maxHeight = `${spaceAbove}px`;
128347
+ }
128348
+ if (hasSpaceRight) {
128349
+ left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
128350
+ }
128351
+ _dropdownParent.style.top = top;
128352
+ _dropdownParent.style.bottom = bottom;
128353
+ _dropdownParent.style.left = left;
128354
+ }
128355
+ setEvents() {
128356
+ window.removeEventListener('scroll', this.positionDropdown.bind(this));
128357
+ window.addEventListener('scroll', this.positionDropdown.bind(this));
128358
+ }
128359
+ componentWillLoad() {
128360
+ this.setEvents();
128361
+ }
128362
+ componentDidLoad() {
128363
+ if (this._element)
128364
+ ElementIDUtils.addIDInfo(this._element);
128365
+ if (this.leftButton) {
128366
+ const dataInfo = { id: 'embedded' };
128367
+ ElementIDUtils.addIDInfo(this.leftButton, 'left-button', dataInfo);
128368
+ }
128369
+ if (this.rightButton) {
128370
+ const dataInfo = { id: 'embedded' };
128371
+ ElementIDUtils.addIDInfo(this.rightButton, 'right-button', dataInfo);
128372
+ }
128373
+ this.positionDropdown();
128374
+ }
128375
+ componentDidUpdate() {
128376
+ this.positionDropdown();
128377
+ }
128378
+ render() {
128379
+ const hasIconButton = this.shouldShowIconOnLeftButton();
128380
+ const hasLabelButton = this.shouldShowLabelOnLeftButton();
128381
+ const iconSize = this.getIconSize();
128382
+ return (h("div", { class: "label-icon" }, h("button", { class: `ez-split-button__left-button ${iconSize} ${this.mode}`, title: this.leftTitle || this.label, type: "button", disabled: !this.enabled, onClick: () => { this.handleButtonClick(); }, ref: el => (this.leftButton = el) }, hasIconButton && h("ez-icon", { href: this.image, iconName: this.iconName, size: iconSize }), hasLabelButton && h("label", { title: this.leftTitle || this.label }, this.label)), h("div", { class: "dropdown" }, h("button", { class: `ez-split-button__right-button ${iconSize} ez-split-button__right-button--${iconSize} ez-split-button__right-button--divider`, title: this.rightTitle || this.rightDefaultTitle, type: "button", disabled: !this.enabled, onClick: () => { this.toggleDropdown(); }, ref: el => (this.rightButton = el) }, h("ez-icon", { class: `ez-split-button__right-button-container ` + (iconSize ? `btn-icon--${iconSize}` : ''), iconName: 'chevron-down', size: iconSize })), h("div", { class: `dropdown-content dropdown-content--${this.size}`, ref: (ref) => (this.dropdownParent = ref) }, this.show && (h("ez-dropdown", { items: this.items, onClick: evt => { evt.stopPropagation(); }, onEzOutsideClick: () => { this.closeDropdown(); }, onEzClick: evt => { this.handleDropdownItemClick(evt); }, onEzSubActionClick: evt => { this.handleDropdownSubActionClick(evt); } }))))));
128383
+ }
128384
+ shouldShowLabelOnLeftButton() {
128385
+ return ['icon-left', 'default'].includes(this.mode);
128386
+ }
128387
+ shouldShowIconOnLeftButton() {
128388
+ return ['icon-left', 'icon-only'].includes(this.mode);
128389
+ }
128390
+ get _element() { return this; }
128391
+ static get style() { return ezSplitButtonCss; }
128392
+ };
128393
+
128394
+ const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}";
128248
128395
 
128249
128396
  const SplitItem = class extends HTMLElement$1 {
128250
128397
  constructor() {
@@ -128253,6 +128400,7 @@ const SplitItem = class extends HTMLElement$1 {
128253
128400
  this.label = undefined;
128254
128401
  this.enableExpand = true;
128255
128402
  this._expanded = false;
128403
+ this.size = undefined;
128256
128404
  }
128257
128405
  /**
128258
128406
  * Alterna a visibilidade do painel.
@@ -128261,7 +128409,7 @@ const SplitItem = class extends HTMLElement$1 {
128261
128409
  this._expanded = !this._expanded;
128262
128410
  }
128263
128411
  render() {
128264
- return (h("div", { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
128412
+ return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
128265
128413
  }
128266
128414
  static get style() { return ezSplitItemCss; }
128267
128415
  };
@@ -128943,7 +129091,7 @@ Grid.prototype.destroy = function destroy (immediate) {
128943
129091
 
128944
129092
  function index (options) { return new Grid(options); }
128945
129093
 
128946
- const ezSplitPanelCss = ":host{height:100%}.ez-split-gutter{cursor:grab;background-color:transparent}";
129094
+ const ezSplitPanelCss = ".ez-split-gutter{cursor:grab;background-color:transparent}";
128947
129095
 
128948
129096
  const SplitPanel = class extends HTMLElement$1 {
128949
129097
  constructor() {
@@ -129017,16 +129165,17 @@ const SplitPanel = class extends HTMLElement$1 {
129017
129165
  }
129018
129166
  getGridTemplate() {
129019
129167
  let template = '';
129020
- this._items.forEach((_col, index) => {
129168
+ this._items.forEach((col, index) => {
129169
+ const size = col.size || '1fr';
129021
129170
  if (index === this._items.length - 1) {
129022
- template += ` 1fr`;
129171
+ template += ` ${size}`;
129023
129172
  return;
129024
129173
  }
129025
129174
  if (index === 0) {
129026
- template += `1fr 5px`;
129175
+ template += `${size} 5px`;
129027
129176
  return;
129028
129177
  }
129029
- template += ` 1fr 5px`;
129178
+ template += ` ${size} 5px`;
129030
129179
  });
129031
129180
  return template;
129032
129181
  }
@@ -131085,6 +131234,8 @@ const FilterColumn$1 = class extends HTMLElement$1 {
131085
131234
  this.TOP_POSITION_NO_TASKBAR = '32';
131086
131235
  this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
131087
131236
  this.DEFAULT_HEIGHT = 430;
131237
+ this.FIX_MARGIN = 60;
131238
+ this.FILTER_COLUMN_WIDTH = 330;
131088
131239
  this.opened = true;
131089
131240
  this.columnName = undefined;
131090
131241
  this.columnLabel = undefined;
@@ -131117,15 +131268,24 @@ const FilterColumn$1 = class extends HTMLElement$1 {
131117
131268
  await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
131118
131269
  }
131119
131270
  }
131120
- calculateLeftPosition(configs) {
131121
- if (!configs.fromIcon) {
131122
- return configs.leftPosition;
131271
+ calculateLeftPosition({ leftPosition, fromIcon }) {
131272
+ const leftPositionCalculated = this.calcFilterColumnLeftPosition(leftPosition);
131273
+ if (!fromIcon) {
131274
+ return `${leftPositionCalculated}px`;
131123
131275
  }
131124
131276
  const difference = this.ezPopoverElement.getBoundingClientRect().left;
131125
- const leftReference = parseInt(configs.leftPosition.replace('px', ''));
131126
- const leftResolved = (leftReference + 16) - difference;
131277
+ const leftResolved = (leftPositionCalculated + 16) - difference;
131127
131278
  return `${(leftResolved > 0 ? leftResolved : 0)}px`;
131128
131279
  }
131280
+ calcFilterColumnLeftPosition(leftReference) {
131281
+ var _a, _b;
131282
+ const gridReference = this.ezPopoverElement.closest("ez-grid");
131283
+ const gridLimit = (_a = gridReference.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.right;
131284
+ const popoverDiff = (_b = this.ezPopoverElement.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.left;
131285
+ const maxLeft = gridLimit - (this.FILTER_COLUMN_WIDTH + popoverDiff);
131286
+ const leftInt = leftReference - (this.FIX_MARGIN + popoverDiff);
131287
+ return leftInt > maxLeft ? maxLeft : leftInt;
131288
+ }
131129
131289
  buildIsTextSearch() {
131130
131290
  var _a, _b;
131131
131291
  const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
@@ -131274,7 +131434,8 @@ const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller
131274
131434
  const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
131275
131435
  const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
131276
131436
  const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
131277
- const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"_expanded":[32]}]);
131437
+ const EzSplitButton = /*@__PURE__*/proxyCustomElement(EzSplitButton$1, [1,"ez-split-button",{"enabled":[516],"iconName":[513,"icon-name"],"image":[513],"items":[16],"label":[513],"leftTitle":[513,"left-title"],"rightTitle":[513,"right-title"],"mode":[513],"size":[513],"show":[32]},[[2,"click","clickListener"]]]);
131438
+ const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"_expanded":[32]}]);
131278
131439
  const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"]}]);
131279
131440
  const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
131280
131441
  const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"]}]);
@@ -131327,6 +131488,7 @@ const defineCustomElements = (opts) => {
131327
131488
  EzSearch,
131328
131489
  EzSidebarButton,
131329
131490
  EzSkeleton,
131491
+ EzSplitButton,
131330
131492
  EzSplitItem,
131331
131493
  EzSplitPanel,
131332
131494
  EzTabselector,
@@ -131348,4 +131510,4 @@ const defineCustomElements = (opts) => {
131348
131510
  }
131349
131511
  };
131350
131512
 
131351
- export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
131513
+ export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitButton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
@@ -366,7 +366,7 @@ const EzComboBox = class {
366
366
  }
367
367
  else {
368
368
  window.setTimeout(() => {
369
- this.setInputValue();
369
+ this.setInputValue(false);
370
370
  }, this._deboucingTime);
371
371
  }
372
372
  this.resetOptions();
@@ -107,6 +107,9 @@ const EzDateInput = class {
107
107
  this._calendar.hide();
108
108
  }
109
109
  handleBlur() {
110
+ if (!this._changePending) {
111
+ return;
112
+ }
110
113
  try {
111
114
  const strValue = this._textInput.value;
112
115
  const newValue = DateUtils.strToDate(strValue);
@@ -159,6 +159,9 @@ const EzDateTimeInput = class {
159
159
  }
160
160
  handleBlur() {
161
161
  var _a, _b;
162
+ if (!this._changePending) {
163
+ return;
164
+ }
162
165
  try {
163
166
  const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
164
167
  const newValue = this.getParsedDateTime();
@@ -118828,6 +118828,14 @@ var AllEnterpriseModules = [
118828
118828
  ModuleRegistry.registerModules(AllEnterpriseModules);
118829
118829
 
118830
118830
  class DataSource {
118831
+ updateLoadedRecords(action) {
118832
+ const records = action.payload;
118833
+ if ((records === null || records === void 0 ? void 0 : records.length) > 0) {
118834
+ records.forEach(record => {
118835
+ this._controller.changeValues(record, [record.__record__id__]);
118836
+ });
118837
+ }
118838
+ }
118831
118839
  isSilentChange(action) {
118832
118840
  //TODO: Provisorio p/ não atualizar a grade quando a alteração for apenas de campos transisntes
118833
118841
  var _a, _b;
@@ -118850,6 +118858,9 @@ class DataSource {
118850
118858
  break;
118851
118859
  case Action.LOADING_DATA:
118852
118860
  this._waitingForLoad = true;
118861
+ if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
118862
+ this._controller.clearFilter();
118863
+ }
118853
118864
  this._controller.refresh();
118854
118865
  break;
118855
118866
  case Action.DATA_LOADED:
@@ -118880,6 +118891,9 @@ class DataSource {
118880
118891
  case Action.PREVIOUS_SELECTED:
118881
118892
  this.updateSelection();
118882
118893
  break;
118894
+ case Action.RECORD_LOADED:
118895
+ this.updateLoadedRecords(action);
118896
+ break;
118883
118897
  }
118884
118898
  };
118885
118899
  this._dataUnit = dataUnit;
@@ -118949,15 +118963,6 @@ class DataSource {
118949
118963
  }
118950
118964
  }
118951
118965
 
118952
- function calcFilterColumnLeftPosition(leftReference) {
118953
- const FIX_MARGIN = 60;
118954
- const FILTER_COLUMN_WIDTH = 330;
118955
- const screenWidth = window.innerWidth;
118956
- const maxLeft = screenWidth - (FILTER_COLUMN_WIDTH + FIX_MARGIN);
118957
- const leftInt = leftReference - FIX_MARGIN;
118958
- return leftInt > maxLeft ? maxLeft : leftInt;
118959
- }
118960
-
118961
118966
  class EzGridCustomHeader {
118962
118967
  init(agParams) {
118963
118968
  var _a;
@@ -118994,8 +118999,7 @@ class EzGridCustomHeader {
118994
118999
  }
118995
119000
  onClickFilter() {
118996
119001
  var _a;
118997
- const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
118998
- this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
119002
+ this.params.showColumnFilter((_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left);
118999
119003
  }
119000
119004
  configSortIcon() {
119001
119005
  this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
@@ -119654,6 +119658,10 @@ class AgGridController {
119654
119658
  this._gridOptions.api.refreshHeader();
119655
119659
  this._dataUnit.loadData(undefined, undefined, undefined, EZ_GRID_LOADING_SOURCE);
119656
119660
  }
119661
+ clearFilter() {
119662
+ this._filteredColumns.clear();
119663
+ this._gridOptions.api.refreshHeader();
119664
+ }
119657
119665
  showFilterColumn(configs) {
119658
119666
  var _a;
119659
119667
  (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
@@ -119672,7 +119680,7 @@ class AgGridController {
119672
119680
  this._idAttribName = '__record__id__';
119673
119681
  this._gridConfig = [];
119674
119682
  this._filteredColumns = new Map();
119675
- this._filterColumnleftPosition = '0px';
119683
+ this._filterColumnleftPosition = 0;
119676
119684
  this._enterprise = enterprise;
119677
119685
  }
119678
119686
  getGridConfig() {
@@ -119798,11 +119806,9 @@ class AgGridController {
119798
119806
  this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
119799
119807
  }
119800
119808
  }
119801
- setFilterColumnLeftPosition(params) {
119802
- if (params.type === 'columnMenu') {
119803
- const ePopup = params.ePopup;
119804
- const leftString = ePopup.style.left.replace('px', '');
119805
- this._filterColumnleftPosition = `${calcFilterColumnLeftPosition(parseInt(leftString))}px`;
119809
+ setFilterColumnLeftPosition({ type, ePopup }) {
119810
+ if (type === 'columnMenu') {
119811
+ this._filterColumnleftPosition = ePopup.getBoundingClientRect().left;
119806
119812
  return;
119807
119813
  }
119808
119814
  }
@@ -120242,7 +120248,7 @@ class AgGridController {
120242
120248
  tooltip: tooltip,
120243
120249
  isSortable: propSortable,
120244
120250
  hasFilter: () => this.hasFilterColumn(source.name),
120245
- showColumnFilter: (leftPosition, fromIcon) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon }),
120251
+ showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
120246
120252
  },
120247
120253
  valueFormatter: params => {
120248
120254
  if (params.value == undefined) {
@@ -142,16 +142,8 @@ const EzMuiltiSelectionList = class {
142
142
  }
143
143
  handleChangeSelectedItem(event) {
144
144
  const { detail: itemCheckSelected } = event;
145
- this.filteredOptions = this.filteredOptions.map(item => {
146
- if (item.label === itemCheckSelected.label) {
147
- return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
148
- }
149
- return item;
150
- });
151
- this.clearInputs();
152
- }
153
- clearInputs() {
154
- this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
145
+ const itemSelected = this.filteredOptions.find(item => item.label === itemCheckSelected.label);
146
+ itemSelected.check = itemCheckSelected.check;
155
147
  }
156
148
  buildViewList(hasDelete) {
157
149
  return (h(Fragment, null, this.displayOptionToCheckAllItems && (h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
@@ -114,6 +114,9 @@ const EzNumberInput = class {
114
114
  this.ezCancelWaitingChange.emit();
115
115
  }
116
116
  handleBlur() {
117
+ if (!this._changePending) {
118
+ return;
119
+ }
117
120
  try {
118
121
  const parsedNumber = this.getParsedNumber();
119
122
  if (parsedNumber !== undefined && isNaN(parsedNumber)) {
@@ -194,10 +194,9 @@ const EzSearch = class {
194
194
  if (currentValue == undefined) {
195
195
  return;
196
196
  }
197
- if (!this.showSelectedValue || currentValue.value == undefined) {
198
- return currentValue.label;
199
- }
200
- return currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
197
+ let text = !this.showSelectedValue || currentValue.value == undefined ? currentValue.label : `${currentValue.value} - ${currentValue.label}`;
198
+ text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
199
+ return text;
201
200
  }
202
201
  getText() {
203
202
  const currentValue = this.getSelectedOption(this.value);