@sankhyalabs/ezui 5.22.0-dev.123 → 5.22.0-dev.125

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 (92) hide show
  1. package/dist/cjs/{types-6a5df0c7.js → FormLayout-18853e70.js} +6 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -2
  3. package/dist/cjs/ez-card-item_2.cjs.entry.js +12 -15
  4. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -2
  5. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +2 -3
  6. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -2
  7. package/dist/cjs/ez-form.cjs.entry.js +60 -5
  8. package/dist/cjs/ez-grid.cjs.entry.js +61 -12
  9. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +31 -2
  10. package/dist/cjs/ez-search-plus.cjs.entry.js +4 -5
  11. package/dist/cjs/ez-search.cjs.entry.js +13 -3
  12. package/dist/cjs/ez-split-button.cjs.entry.js +15 -6
  13. package/dist/cjs/ez-split-item.cjs.entry.js +1 -2
  14. package/dist/cjs/ez-text-input.cjs.entry.js +16 -2
  15. package/dist/cjs/ezui.cjs.js +1 -1
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/cjs/{DataBinder-b9973a19.js → search-column-e9409a62.js} +31 -0
  18. package/dist/collection/components/ez-form/ez-form.js +95 -2
  19. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +18 -1
  20. package/dist/collection/components/ez-grid/ez-grid.js +56 -4
  21. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +12 -15
  22. package/dist/collection/components/ez-search/ez-search.js +12 -1
  23. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +31 -2
  24. package/dist/collection/components/ez-split-button/ez-split-button.css +1 -1
  25. package/dist/collection/components/ez-split-button/ez-split-button.js +87 -10
  26. package/dist/collection/components/ez-text-input/ez-text-input.css +7 -0
  27. package/dist/collection/components/ez-text-input/ez-text-input.js +15 -1
  28. package/dist/collection/utils/index.js +1 -0
  29. package/dist/collection/utils/searchColumn/search-column.js +35 -0
  30. package/dist/custom-elements/index.js +223 -35
  31. package/dist/esm/{types-6f6b2650.js → FormLayout-071d324c.js} +7 -1
  32. package/dist/esm/ez-actions-button.entry.js +1 -2
  33. package/dist/esm/ez-card-item_2.entry.js +12 -15
  34. package/dist/esm/ez-collapsible-box.entry.js +1 -2
  35. package/dist/esm/ez-combo-box-list_3.entry.js +1 -2
  36. package/dist/esm/ez-combo-box.entry.js +1 -2
  37. package/dist/esm/ez-form.entry.js +59 -4
  38. package/dist/esm/ez-grid.entry.js +56 -7
  39. package/dist/esm/ez-popover-plus_3.entry.js +31 -2
  40. package/dist/esm/ez-search-plus.entry.js +1 -2
  41. package/dist/esm/ez-search.entry.js +13 -3
  42. package/dist/esm/ez-split-button.entry.js +15 -6
  43. package/dist/esm/ez-split-item.entry.js +1 -2
  44. package/dist/esm/ez-text-input.entry.js +16 -2
  45. package/dist/esm/ezui.js +1 -1
  46. package/dist/esm/loader.js +1 -1
  47. package/dist/esm/{DataBinder-1035e36f.js → search-column-d0a74266.js} +26 -1
  48. package/dist/ezui/ezui.esm.js +1 -1
  49. package/dist/ezui/p-07894c4a.entry.js +1 -0
  50. package/dist/ezui/p-1eb34cad.entry.js +1 -0
  51. package/dist/ezui/p-30ffb9ed.js +1 -0
  52. package/dist/ezui/p-341da682.entry.js +1 -0
  53. package/dist/ezui/p-35115d5d.entry.js +1 -0
  54. package/dist/ezui/p-41e3ecf5.entry.js +1 -0
  55. package/dist/ezui/p-4b67138e.entry.js +1 -0
  56. package/dist/ezui/p-64a9c36f.entry.js +1 -0
  57. package/dist/ezui/{p-bf9dec89.entry.js → p-69937816.entry.js} +1 -1
  58. package/dist/ezui/p-998afb6a.entry.js +1 -0
  59. package/dist/ezui/p-a3bf8cf1.entry.js +1 -0
  60. package/dist/ezui/p-b53571cc.entry.js +1 -0
  61. package/dist/ezui/{p-6b39b79a.entry.js → p-c0368531.entry.js} +46 -46
  62. package/dist/ezui/p-e3792c2a.js +1 -0
  63. package/dist/ezui/p-f2a3fcbe.entry.js +1 -0
  64. package/dist/types/components/ez-form/ez-form.d.ts +18 -0
  65. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -1
  66. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -1
  67. package/dist/types/components/ez-grid/ez-grid.d.ts +7 -0
  68. package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +1 -3
  69. package/dist/types/components/ez-search/ez-search.d.ts +1 -0
  70. package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +6 -0
  71. package/dist/types/components/ez-split-button/ez-split-button.d.ts +14 -2
  72. package/dist/types/components/ez-text-input/ez-text-input.d.ts +2 -0
  73. package/dist/types/components.d.ts +42 -0
  74. package/dist/types/utils/index.d.ts +1 -0
  75. package/dist/types/utils/searchColumn/search-column.d.ts +9 -0
  76. package/package.json +1 -1
  77. package/dist/cjs/FormLayout-c2451c7f.js +0 -7
  78. package/dist/esm/FormLayout-54092963.js +0 -7
  79. package/dist/ezui/p-15ea0c98.js +0 -1
  80. package/dist/ezui/p-173f68ea.js +0 -1
  81. package/dist/ezui/p-5895e687.js +0 -1
  82. package/dist/ezui/p-5a14f506.entry.js +0 -1
  83. package/dist/ezui/p-5ec0ae79.entry.js +0 -1
  84. package/dist/ezui/p-629d15ed.entry.js +0 -1
  85. package/dist/ezui/p-6754489a.entry.js +0 -1
  86. package/dist/ezui/p-a4cee65d.entry.js +0 -1
  87. package/dist/ezui/p-c00df4be.entry.js +0 -1
  88. package/dist/ezui/p-ebd23857.entry.js +0 -1
  89. package/dist/ezui/p-ecaac11f.entry.js +0 -1
  90. package/dist/ezui/p-f4861c6a.entry.js +0 -1
  91. package/dist/ezui/p-f5a30e35.entry.js +0 -1
  92. package/dist/ezui/p-f6316720.entry.js +0 -1
@@ -19,3 +19,9 @@ exports.SearchMode = void 0;
19
19
  SearchMode["LOAD_DESCRIPTION"] = "LOAD_DESCRIPTION";
20
20
  SearchMode["PRELOAD"] = "PRELOAD";
21
21
  })(exports.SearchMode || (exports.SearchMode = {}));
22
+
23
+ exports.FormLayout = void 0;
24
+ (function (FormLayout) {
25
+ FormLayout[FormLayout["CASCADE"] = 0] = "CASCADE";
26
+ FormLayout[FormLayout["SIDE_BY_SIDE"] = 1] = "SIDE_BY_SIDE";
27
+ })(exports.FormLayout || (exports.FormLayout = {}));
@@ -8,8 +8,7 @@ require('./ApplicationUtils-c9d1205c.js');
8
8
  const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
- require('./types-6a5df0c7.js');
12
- require('./FormLayout-c2451c7f.js');
11
+ require('./FormLayout-18853e70.js');
13
12
 
14
13
  const ezActionsButtonCss = ":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space--small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-small, 6px);--ez-actions-button__actions-list--z-index:var(--ez-elevation--8, 8);--ez-actions-button__actions-max-height:415px;--ez-actions-button__btn-action--min-width:'auto';--ez-actions-button__btn-action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.ez-actions-button__actions-list{display:flex;flex-direction:column;position:fixed;width:fit-content;height:fit-content;overflow-y:auto;scrollbar-width:thin;z-index:var(--ez-actions-button__actions-list--z-index);padding:var(--ez-actions-button__actions-list--padding);margin-top:var(--ez-actions-button__actions-list--top-margin);background-color:var(--ez-actions-button__actions-list--background-color);border-radius:var(--ez-actions-button__actions-list--border-radius);box-shadow:var(--ez-actions-button__actions-list--box-shadow)}.ez-actions-button__actions-list--max-height{max-height:var(--ez-actions-button__actions-max-height)}.ez-actions-button__actions-list--lowered{margin-top:calc(var(--ez-actions-button__actions-list--top-margin) + 6px)}.ez-actions-button__btn-action{--ez-button--justify-content:flex-start;--ez-button--width:100%;--ez-button--min-width:var(--ez-actions-button__btn-action--min-width);--ez-button--background-color:var(--ez-actions-button__btn-action--background-color);--ez-button--font-weight:var(--text-weight--medium, 400);--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__btn-action--spaced{--ez-button--padding-left:calc(var(--space--medium, 12px) + 24px)}.ez-actions-button__icon-right{margin-left:var(--space--small, 6px)}.ez-actions-button__icon-check,.ez-actions-button__icon-item{position:absolute;left:var(--space--medium, 12px)}.ez-actions-button__icon-check{color:var(--ez-button--hover-color)}.ez-actions-button__arrow{position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;width:0;height:0;z-index:calc(var(--ez-actions-button__actions-list--z-index) + 1);border-bottom:15px solid var(--ez-actions-button__btn-action--background-color)}.ez-actions-button__arrow--upped{margin-top:calc((var(--ez-actions-button__actions-list--top-margin) + 2px) * -1)}.ez-actions-button__arrow--small{margin-left:6px}.ez-actions-button__arrow--medium{margin-left:11px}.ez-actions-button__arrow--large{margin-left:13px}.ez-actions-button__arrow:only-child{display:none}.ez-actions-button__btn-transparent{--ez-button--background-color:transparent;--ez-button--hover--background-color:transparent;--ez-button--active--background-color:transparent;--ez-button--focus--border:none}.ez-actions-button__btn-label{--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__list-container{position:relative}.ez-actions-button--bottom-padding{padding-bottom:var(--space--small, 6px)}";
15
14
 
@@ -66,7 +66,6 @@ const EzPopoverCore = class {
66
66
  constructor(hostRef) {
67
67
  index.registerInstance(this, hostRef);
68
68
  this.ezVisibilityChange = index.createEvent(this, "ezVisibilityChange", 7);
69
- this.TIME_DEBOUNCE = 500;
70
69
  this.autoClose = true;
71
70
  this.boxWidth = "fit-content";
72
71
  this.opened = false;
@@ -170,11 +169,6 @@ const EzPopoverCore = class {
170
169
  return;
171
170
  }
172
171
  const currentAnchorElement = this.getAnchorElement();
173
- if (this.useAnchorSize) {
174
- const anchorSize = currentAnchorElement.getBoundingClientRect().width;
175
- const width = anchorSize < this.minWidth ? this.minWidth : anchorSize;
176
- this._box.style.width = `${width}px`;
177
- }
178
172
  await floatingUi_dom_esm.computePosition(currentAnchorElement, this._box, {
179
173
  placement: this.options.fromRight ? 'bottom-end' : 'bottom-start',
180
174
  middleware: [floatingUi_dom_esm.flip(), floatingUi_dom_esm.shift({ padding: 5 })],
@@ -202,6 +196,12 @@ const EzPopoverCore = class {
202
196
  }
203
197
  this._box.style.display = 'flex';
204
198
  this._box.style.visibility = 'hidden';
199
+ if (this.useAnchorSize) {
200
+ const currentAnchorElement = this.getAnchorElement();
201
+ const anchorSize = currentAnchorElement.getBoundingClientRect().width;
202
+ const width = anchorSize < this.minWidth ? this.minWidth : anchorSize;
203
+ this._box.style.width = `${width}px`;
204
+ }
205
205
  await this.updatePositionPopover();
206
206
  this.openOverlay();
207
207
  this.ezVisibilityChange.emit(true);
@@ -228,18 +228,15 @@ const EzPopoverCore = class {
228
228
  }
229
229
  return false;
230
230
  }
231
- updatePositionDebounce() {
231
+ handlePositionUpdate() {
232
232
  if (!this.opened) {
233
233
  return;
234
234
  }
235
- clearTimeout(this._timeoutDebounce);
236
- this._timeoutDebounce = setTimeout(() => {
237
- this.updatePositionPopover();
238
- }, this.TIME_DEBOUNCE);
235
+ this.updatePositionPopover();
239
236
  }
240
237
  componentWillLoad() {
241
- window.addEventListener('scroll', this.updatePositionDebounce.bind(this), true);
242
- window.addEventListener('resize', this.updatePositionDebounce.bind(this), true);
238
+ window.addEventListener('scroll', this.handlePositionUpdate.bind(this), true);
239
+ window.addEventListener('resize', this.handlePositionUpdate.bind(this), true);
243
240
  }
244
241
  componentDidLoad() {
245
242
  this._overlayIsActive = this.checkStatusOverlay();
@@ -248,8 +245,8 @@ const EzPopoverCore = class {
248
245
  this.openPopover();
249
246
  }
250
247
  disconnectedCallback() {
251
- window.removeEventListener('scroll', this.updatePositionDebounce.bind(this), true);
252
- window.removeEventListener('resize', this.updatePositionDebounce.bind(this), true);
248
+ window.removeEventListener('scroll', this.handlePositionUpdate.bind(this), true);
249
+ window.removeEventListener('resize', this.handlePositionUpdate.bind(this), true);
253
250
  this._resizeObserver.disconnect();
254
251
  }
255
252
  render() {
@@ -7,8 +7,7 @@ const core = require('@sankhyalabs/core');
7
7
  const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
8
8
  require('./DialogType-2114c337.js');
9
9
  require('./CheckMode-ecb90b87.js');
10
- require('./types-6a5df0c7.js');
11
- require('./FormLayout-c2451c7f.js');
10
+ require('./FormLayout-18853e70.js');
12
11
 
13
12
  const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsable-box--bordered{border:var(--border--small);border-color:var(--color--strokes);border-radius:var(--border--radius-medium);padding:var(--space--xs)}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:100%;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:block;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:2s all ease-in-out}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
14
13
 
@@ -4,11 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const types = require('./types-6a5df0c7.js');
7
+ const FormLayout = require('./FormLayout-18853e70.js');
8
8
  const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
- require('./FormLayout-c2451c7f.js');
12
11
 
13
12
  const ezComboBoxListCss = ":host{--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);--ez-combo-box__list-container--padding:var(--space--extra-small, 3px)}.list-container{padding-top:var(--ez-combo-box__list-container--padding)}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow--medium, 0 8px 24px 0 rgba(43, 58, 84, 0.10));padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
14
13
 
@@ -236,7 +235,7 @@ const EzCustomFormInput = class {
236
235
  props: this.formViewField.props ? fieldProps : undefined,
237
236
  optionLoader: this.formViewField.optionLoader
238
237
  },
239
- source: types.CustomEditorSource.FORM,
238
+ source: FormLayout.CustomEditorSource.FORM,
240
239
  detailContext: this.detailContext
241
240
  };
242
241
  let gui = this.customEditor.getEditorElement(params);
@@ -8,8 +8,7 @@ require('./ApplicationUtils-c9d1205c.js');
8
8
  const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
- require('./types-6a5df0c7.js');
12
- require('./FormLayout-c2451c7f.js');
11
+ require('./FormLayout-18853e70.js');
13
12
 
14
13
  const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;padding:0px;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}.text-input-slot-container{--ez-text-input__icon--width:32px;--ez-text-input__min-width:var(--ez-combo-box__min-width);--ez-text-input__max-width:var(--ez-combo-box__max-width)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
15
14
 
@@ -4,10 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const DataBinder = require('./DataBinder-b9973a19.js');
8
- const FormLayout = require('./FormLayout-c2451c7f.js');
7
+ const searchColumn = require('./search-column-e9409a62.js');
8
+ const FormLayout = require('./FormLayout-18853e70.js');
9
9
  require('./ApplicationUtils-c9d1205c.js');
10
10
  require('./DialogType-2114c337.js');
11
+ require('./CheckMode-ecb90b87.js');
11
12
 
12
13
  const DETAIL_PATTERN = /child\[([^\]]+)\]/;
13
14
  const REGEX_DEFAULT_VAR_KEY = /\$\{.+\}/;
@@ -111,7 +112,7 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
111
112
  if (!sheets.has(tabConfig)) {
112
113
  sheets.set(tabConfig, []);
113
114
  }
114
- const formField = DataBinder.buildFieldMetadata(descriptor, field);
115
+ const formField = searchColumn.buildFieldMetadata(descriptor, field);
115
116
  sheets.get(tabConfig).push(formField);
116
117
  if (formField.required) {
117
118
  requiredFields.push(field.name);
@@ -574,6 +575,8 @@ const EzForm = class {
574
575
  this.recordsValidator = undefined;
575
576
  this.fieldToFocus = undefined;
576
577
  this.onlyStaticFields = false;
578
+ this.useSearchField = true;
579
+ this.elementFocusSearchField = undefined;
577
580
  }
578
581
  /**
579
582
  * Realiza validação no conteúdo de todos os campos.
@@ -631,7 +634,56 @@ const EzForm = class {
631
634
  }
632
635
  this.ezFormSetFields.emit(fields);
633
636
  const idFormSheet = `${core.StringUtils.replaceAccentuatedChars(core.StringUtils.toCamelCase(currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.label), false)}_selectorContainer`;
634
- return (index.h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, index.h("ez-form-view", { ref: (element) => (this._formView = element), class: "ez-row ez-padding-vertical--small", fields: fields, singleColumn: this._singleColumn, selectedRecord: this.dataUnit.getSelectedRecord() })));
637
+ return (index.h("div", { class: "dynamic-content ez-box--no-outline", "data-element-id": idFormSheet, ref: elem => (this._container = elem), tabindex: "0" }, index.h("ez-popover", { ref: elem => (this._ezPopoverSearchField = elem), overlayType: "none" }, this.renderFieldColumn()), index.h("ez-form-view", { ref: (element) => (this._formView = element), class: "ez-row ez-padding-vertical--small", fields: fields, singleColumn: this._singleColumn, selectedRecord: this.dataUnit.getSelectedRecord() })));
638
+ }
639
+ renderFieldColumn() {
640
+ if (this._fieldSearch != undefined) {
641
+ return this._fieldSearch;
642
+ }
643
+ this._fieldSearch = searchColumn.buildFieldSearch({
644
+ value: core.StringUtils.generateUUID(),
645
+ label: searchColumn.LABEL_SEARCH_FIELD,
646
+ }, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
647
+ return this._fieldSearch;
648
+ }
649
+ getFormFields() {
650
+ var _a;
651
+ return (_a = this.config) === null || _a === void 0 ? void 0 : _a.fields;
652
+ }
653
+ fieldsOptionLoader(argument) {
654
+ const searchTerm = argument === null || argument === void 0 ? void 0 : argument.toLowerCase();
655
+ const allFields = this.getFormFields().map(field => { var _a; return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(field.name); });
656
+ const filteredFields = allFields.filter(field => {
657
+ var _a, _b;
658
+ return ((_a = field.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm)) ||
659
+ ((_b = field.label) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(searchTerm));
660
+ });
661
+ const options = filteredFields.map(field => ({ value: field.name, label: field.label }));
662
+ return Promise.resolve(options);
663
+ }
664
+ onSelectField(option) {
665
+ if (option == undefined || option.value == undefined) {
666
+ this.fieldToFocus = "";
667
+ return;
668
+ }
669
+ this.fieldToFocus = option.value;
670
+ this._ezPopoverSearchField.hide();
671
+ }
672
+ async initKeyboardManager() {
673
+ var _a, _b;
674
+ this._keyboardManager = new core.KeyboardManager({ propagate: false, element: (_a = this.elementFocusSearchField) !== null && _a !== void 0 ? _a : this._element });
675
+ if (this.useSearchField) {
676
+ this._keyboardManager.bind(searchColumn.SHORTCUT_SEARCH_FIELD, async () => {
677
+ if (!this._container || !this._ezPopoverSearchField)
678
+ return;
679
+ const container = this._container.getBoundingClientRect();
680
+ await searchColumn.focusOnFieldSerch(this._fieldSearch);
681
+ this._ezPopoverSearchField.showUnder(this._container, { horizontalGap: container.width - (searchColumn.SEARCH_FIELD_FULL_WIDTH), verticalGap: container.height * -1 });
682
+ }, { description: searchColumn.LABEL_SEARCH_FIELD, element: (_b = this.elementFocusSearchField) !== null && _b !== void 0 ? _b : this._element });
683
+ }
684
+ }
685
+ componentDidLoad() {
686
+ this.initKeyboardManager();
635
687
  }
636
688
  processMetadata() {
637
689
  if (this.bindFields() && this.dataUnit && this._store) {
@@ -653,7 +705,7 @@ const EzForm = class {
653
705
  }
654
706
  this.dataUnit.unsubscribe(this.onDataUnitAction);
655
707
  this.dataUnit.subscribe(this.onDataUnitAction);
656
- this._dataBinder = new DataBinder.DataBinder(this.dataUnit);
708
+ this._dataBinder = new searchColumn.DataBinder(this.dataUnit);
657
709
  this._store = createStore(formReducer);
658
710
  this._store.subscribe(() => index.forceUpdate(this));
659
711
  this._staticFields = Array.from(this._element.querySelectorAll("[data-field-name]"));
@@ -714,6 +766,7 @@ const EzForm = class {
714
766
  requestAnimationFrame(() => {
715
767
  this._dataBinder.setFocus(this.fieldToFocus);
716
768
  this.ezFormRequestClearFieldToFocus.emit();
769
+ this.fieldToFocus = null;
717
770
  });
718
771
  }
719
772
  setFieldsProps() {
@@ -728,8 +781,10 @@ const EzForm = class {
728
781
  }
729
782
  }
730
783
  disconnectedCallback() {
784
+ var _a;
731
785
  this.dataUnit.unsubscribe(this.onDataUnitAction);
732
786
  this._dataBinder.onDisconnectedCallback();
787
+ (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
733
788
  }
734
789
  buildIdTabSelector(tabs) {
735
790
  if (tabs) {
@@ -8,10 +8,9 @@ const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
8
8
  const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
- const types = require('./types-6a5df0c7.js');
12
- require('./FormLayout-c2451c7f.js');
11
+ const FormLayout = require('./FormLayout-18853e70.js');
12
+ const searchColumn = require('./search-column-e9409a62.js');
13
13
  const constants = require('./constants-569271bc.js');
14
- const DataBinder = require('./DataBinder-b9973a19.js');
15
14
  const FocusResolver = require('./FocusResolver-885f2173.js');
16
15
 
17
16
  /**
@@ -50537,7 +50536,7 @@ const gridTerms = {
50537
50536
  };
50538
50537
 
50539
50538
  const buildEditorMetadata = (descriptor, eGridCell, dataUnit, editionManager) => {
50540
- return Object.assign(Object.assign({}, DataBinder.buildFieldMetadata(descriptor)), { eGridCell, dataUnit, editionManager });
50539
+ return Object.assign(Object.assign({}, searchColumn.buildFieldMetadata(descriptor)), { eGridCell, dataUnit, editionManager });
50541
50540
  };
50542
50541
 
50543
50542
  const MINIMIUM_WIDTH_TEXTAREA = 210;
@@ -50808,7 +50807,7 @@ class EzGridCustomCellEditor extends EzCellEditor {
50808
50807
  charPress: params.charPress,
50809
50808
  currentEditor: this._defaultGui,
50810
50809
  name: this._fieldName,
50811
- source: types.CustomEditorSource.GRID,
50810
+ source: FormLayout.CustomEditorSource.GRID,
50812
50811
  detailContext: params.customEditorsInfo.detailContext,
50813
50812
  setValue: (value) => this.setValue(value),
50814
50813
  getValue: () => this.getValue(),
@@ -50915,7 +50914,7 @@ class EzGridCustomCellRender extends EzCellRender {
50915
50914
  charPress: '',
50916
50915
  currentRender: super.getGui(),
50917
50916
  name: this._fieldName,
50918
- source: types.CustomRenderSource.GRID,
50917
+ source: FormLayout.CustomRenderSource.GRID,
50919
50918
  getValue: () => params.getValue(),
50920
50919
  detailContext: params.customRendersInfo.detailContext,
50921
50920
  renderMetadata: {
@@ -50945,7 +50944,7 @@ class GridEditionManager {
50945
50944
  constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert, lockerId) {
50946
50945
  this._inProgressChanges = [];
50947
50946
  this._dataUnit = dataUnit;
50948
- this._recordValidationProcessor = new DataBinder.RecordValidationProcessor(this._dataUnit, {
50947
+ this._recordValidationProcessor = new searchColumn.RecordValidationProcessor(this._dataUnit, {
50949
50948
  getRequiredFields: () => this.getRequiredFields(),
50950
50949
  markAsInvalid: (invalidField, recordId) => { this.pushInvalidCell(invalidField, recordId); },
50951
50950
  getMessageForField: () => null,
@@ -51165,7 +51164,7 @@ class GridEditionManager {
51165
51164
  }
51166
51165
  getFormRequiredFields() {
51167
51166
  const formRequiredFields = [];
51168
- const dataBinders = DataBinder.DataBinder.getDataBindersByDataUnit(this._dataUnit);
51167
+ const dataBinders = searchColumn.DataBinder.getDataBindersByDataUnit(this._dataUnit);
51169
51168
  dataBinders.forEach(dataBinder => {
51170
51169
  formRequiredFields.push(...dataBinder.getFormRequiredFields());
51171
51170
  });
@@ -64855,8 +64854,25 @@ class AgGridController {
64855
64854
  getGridConfig() {
64856
64855
  return this._gridConfig;
64857
64856
  }
64858
- locateColumn(columnName) {
64857
+ locateColumn(columnName, gridElement) {
64859
64858
  this._gridOptions.api.ensureColumnVisible(columnName);
64859
+ requestAnimationFrame(() => {
64860
+ this.highlightColumnHeader(columnName, gridElement);
64861
+ });
64862
+ }
64863
+ highlightColumnHeader(columnName, gridElement) {
64864
+ const headerElement = gridElement.querySelector(`.ag-header-cell[col-id="${columnName}"]`);
64865
+ if (!headerElement)
64866
+ return;
64867
+ headerElement.classList.add("ez-grid__column-highlight-header");
64868
+ headerElement.setAttribute("tabindex", "0");
64869
+ const removeHighlight = (event) => {
64870
+ if (!headerElement.contains(event.target)) {
64871
+ headerElement.classList.remove("ez-grid__column-highlight-header");
64872
+ document.removeEventListener("click", removeHighlight);
64873
+ }
64874
+ };
64875
+ document.addEventListener("click", removeHighlight);
64860
64876
  }
64861
64877
  getSort(_dataUnitName, defaultSorting) {
64862
64878
  const sortedColumns = [];
@@ -66242,6 +66258,7 @@ const EzGrid = class {
66242
66258
  this.outlineMode = false;
66243
66259
  this.enableRowTableStriped = true;
66244
66260
  this.compact = false;
66261
+ this.useSearchColumn = true;
66245
66262
  }
66246
66263
  /**
66247
66264
  * Aplica a definição de colunas.
@@ -66295,7 +66312,7 @@ const EzGrid = class {
66295
66312
  * Localiza determinada coluna tornando-a visível.
66296
66313
  */
66297
66314
  async locateColumn(columnName) {
66298
- this._gridController.locateColumn(columnName);
66315
+ this._gridController.locateColumn(columnName, this._element);
66299
66316
  }
66300
66317
  /**
66301
66318
  * Usa um argumento para filtrar as colunas po label
@@ -66793,11 +66810,43 @@ const EzGrid = class {
66793
66810
  this.nextPage();
66794
66811
  }
66795
66812
  }, { description: "Avança para a próxima página.", element: this._element });
66813
+ if (this.useSearchColumn) {
66814
+ this._keyboardManager.bind(searchColumn.SHORTCUT_SEARCH_FIELD, async () => {
66815
+ if (!this._container || !this._ezPopoverSearchColumn)
66816
+ return;
66817
+ const container = this._container.getBoundingClientRect();
66818
+ await searchColumn.focusOnFieldSerch(this._columnSearch);
66819
+ this._ezPopoverSearchColumn.showUnder(this._container, { horizontalGap: container.width - (searchColumn.SEARCH_FIELD_FULL_WIDTH), verticalGap: container.height * -1 });
66820
+ }, { description: searchColumn.LABEL_SEARCH_COLUMN, element: this._element });
66821
+ }
66796
66822
  }
66797
66823
  async removeShortcuts() {
66798
66824
  var _a;
66799
66825
  (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
66800
66826
  }
66827
+ renderFieldSearchColumn() {
66828
+ this._columnSearch = searchColumn.buildFieldSearch({
66829
+ value: core.StringUtils.generateUUID(),
66830
+ label: searchColumn.LABEL_SEARCH_COLUMN,
66831
+ }, ({ argument }) => new Promise(accept => {
66832
+ this.filterColumns(argument).then((columns) => {
66833
+ accept(columns
66834
+ .filter(column => !column.hidden)
66835
+ .map(column => ({ label: column.label, value: column.name })));
66836
+ });
66837
+ }), async (option) => {
66838
+ if (option != undefined && option.value != undefined) {
66839
+ await this.locateColumn(option.value);
66840
+ if (this._ezPopoverSearchColumn) {
66841
+ this._ezPopoverSearchColumn.hide();
66842
+ }
66843
+ if (this._container) {
66844
+ requestAnimationFrame(() => this._container.focus());
66845
+ }
66846
+ }
66847
+ });
66848
+ return this._columnSearch;
66849
+ }
66801
66850
  render() {
66802
66851
  var _a;
66803
66852
  return (index.h(index.Host, { "no-header": this.hideHeader() }, index.h("div", { class: {
@@ -66806,11 +66855,11 @@ const EzGrid = class {
66806
66855
  'shadow-mode': !this.outlineMode,
66807
66856
  'no-padding': this.compact,
66808
66857
  'header-overlay': !this.hideHeader(),
66809
- }, ref: elem => (this._container = elem) }), index.h("div", { class: {
66858
+ }, ref: elem => (this._container = elem), tabindex: "0" }), index.h("div", { class: {
66810
66859
  'ez-box ez-padding--small grid-header': true,
66811
66860
  'outline-mode': this.outlineMode,
66812
66861
  'shadow-mode': !this.outlineMode && !this.hideHeader(),
66813
- } }, index.h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), index.h("div", { class: "grid-header__position" }, index.h("div", { class: `grid-header__container grid-header__left-container ${this.resolveLeftHeaderClass()}` }, index.h("slot", { name: "leftButtons" })), this.getPaginationControl())), index.h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
66862
+ }, tabindex: "0" }, index.h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), index.h("div", { class: "grid-header__position" }, index.h("div", { class: `grid-header__container grid-header__left-container ${this.resolveLeftHeaderClass()}` }, index.h("slot", { name: "leftButtons" })), this.getPaginationControl())), index.h("ez-popover", { ref: elem => (this._ezPopoverSearchColumn = elem), overlayType: "none" }, this.renderFieldSearchColumn()), index.h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
66814
66863
  ${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
66815
66864
  ` }, index.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) })), index.h("div", { class: "grid__footer" }, index.h("slot", { name: "footer" }))));
66816
66865
  }
@@ -142,6 +142,8 @@ const SearchList = class {
142
142
  this.changePreSelection = index.createEvent(this, "changePreSelection", 7);
143
143
  this._startHighlightTag = "<span class='card-item__highlight'>";
144
144
  this._endHighlightTag = "</span>";
145
+ this.MAX_HEIGHT = 350;
146
+ this.HEADER_MENU_HEIGHT = 60;
145
147
  this.showLoading = undefined;
146
148
  this.visibleOptions = [];
147
149
  this.textEmptyList = undefined;
@@ -195,11 +197,38 @@ const SearchList = class {
195
197
  };
196
198
  return index.h("div", { style: { "height": "100%" }, class: index$1 === this.preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this.changePreSelection.emit(index$1) }, index.h("ez-card-item", { item: card, compacted: true, enableKey: this.showOptionValue }));
197
199
  }
200
+ componentDidLoad() {
201
+ if (this._optionsList) {
202
+ this._optionsList.style.maxHeight = `${this.MAX_HEIGHT}px`;
203
+ }
204
+ }
205
+ componentDidUpdate() {
206
+ if (this._optionsList) {
207
+ const rect = this._optionsList.getBoundingClientRect();
208
+ const spaceBelow = window.innerHeight - rect.bottom;
209
+ if (spaceBelow < 0) {
210
+ this.adjustMaxHeight(rect);
211
+ }
212
+ }
213
+ }
214
+ adjustMaxHeight(rect) {
215
+ if (this._optionsList) {
216
+ const spaceAbove = rect.top - this.HEADER_MENU_HEIGHT;
217
+ const maxHeight = this.MAX_HEIGHT;
218
+ const height = Math.min(spaceAbove, maxHeight);
219
+ this._optionsList.style.maxHeight = `${height}px`;
220
+ }
221
+ }
222
+ cleanEmptyObjectArray(arr) {
223
+ return arr.filter(item => {
224
+ return Object.values(item).some(valor => valor !== undefined);
225
+ });
226
+ }
198
227
  render() {
199
228
  return (index.h(index.Host, null, index.h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
200
- && this.visibleOptions.length === 0
229
+ && this.cleanEmptyObjectArray(this.visibleOptions).length === 0
201
230
  && index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this.textEmptyList)), this.showLoading
202
- && index.h("div", { class: "message" }, index.h("div", { class: "message__loading" })), this.canShowListOptions && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
231
+ && index.h("div", { class: "message" }, index.h("div", { class: "message__loading" })), this.canShowListOptions && this.cleanEmptyObjectArray(this.visibleOptions).map((opt, index) => this.buildItem(opt, index)))));
203
232
  }
204
233
  };
205
234
  SearchList.style = searchListCss;
@@ -8,8 +8,7 @@ require('./ApplicationUtils-c9d1205c.js');
8
8
  const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
- const types = require('./types-6a5df0c7.js');
12
- require('./FormLayout-c2451c7f.js');
11
+ const FormLayout = require('./FormLayout-18853e70.js');
13
12
 
14
13
  const ezSearchPlusCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{max-width:85px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%}";
15
14
 
@@ -204,7 +203,7 @@ const EzSearchPlus = class {
204
203
  }
205
204
  try {
206
205
  this.isLoadingDescription = true;
207
- const searchArgument = { mode: types.SearchMode.LOAD_DESCRIPTION, argument: codeValue };
206
+ const searchArgument = { mode: FormLayout.SearchMode.LOAD_DESCRIPTION, argument: codeValue };
208
207
  const loadedOption = await this.optionLoader(searchArgument);
209
208
  if (!loadedOption) {
210
209
  return "";
@@ -232,7 +231,7 @@ const EzSearchPlus = class {
232
231
  console.warn("optionLoader não definido");
233
232
  return;
234
233
  }
235
- const searchArgument = { mode: types.SearchMode.ADVANCED, argument: "" };
234
+ const searchArgument = { mode: FormLayout.SearchMode.ADVANCED, argument: "" };
236
235
  let selectedItem = undefined;
237
236
  try {
238
237
  selectedItem = await this.optionLoader(searchArgument, this.contextProperties);
@@ -290,7 +289,7 @@ const EzSearchPlus = class {
290
289
  async processOptionsLoader(argument) {
291
290
  try {
292
291
  this.showLoading = true;
293
- const searchArgument = { mode: types.SearchMode.PREDICTIVE, argument };
292
+ const searchArgument = { mode: FormLayout.SearchMode.PREDICTIVE, argument };
294
293
  const options = await this.optionLoader(searchArgument);
295
294
  this.visibleOptions = this.parseSearchOptions(options);
296
295
  }
@@ -8,8 +8,7 @@ const core = require('@sankhyalabs/core');
8
8
  const ApplicationUtils = require('./ApplicationUtils-c9d1205c.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
- require('./types-6a5df0c7.js');
12
- require('./FormLayout-c2451c7f.js');
11
+ require('./FormLayout-18853e70.js');
13
12
  const constants = require('./constants-569271bc.js');
14
13
  const searchFormatters = require('./searchFormatters-b7e1ed1e.js');
15
14
 
@@ -475,6 +474,16 @@ const EzSearch = class {
475
474
  return;
476
475
  });
477
476
  });
477
+ this._intersectionObserver = new IntersectionObserver((entries) => {
478
+ entries.forEach(entry => {
479
+ if (!entry.isIntersecting && this._ezPopOverPlusElement) {
480
+ this._ezPopOverPlusElement.hide();
481
+ }
482
+ });
483
+ }, { threshold: 0.1 });
484
+ if (this._textInput) {
485
+ this._intersectionObserver.observe(this._textInput);
486
+ }
478
487
  await this.handleInitialValue();
479
488
  if (this.autoFocus) {
480
489
  requestAnimationFrame(() => {
@@ -483,8 +492,9 @@ const EzSearch = class {
483
492
  }
484
493
  }
485
494
  disconnectedCallback() {
486
- var _a;
495
+ var _a, _b;
487
496
  (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
497
+ (_b = this._intersectionObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
488
498
  }
489
499
  //---------------------------------------------
490
500
  // Event handlers