@sankhyalabs/ezui 6.4.0-ms.2 → 6.4.0-ms.3

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 (41) hide show
  1. package/dist/cjs/{ez-card-item_2.cjs.entry.js → ez-card-item.cjs.entry.js} +0 -205
  2. package/dist/cjs/ez-classic-combo-box.cjs.entry.js +324 -0
  3. package/dist/cjs/ez-classic-input.cjs.entry.js +26 -9
  4. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-popover-core.cjs.entry.js +211 -0
  6. package/dist/cjs/ezui.cjs.js +1 -1
  7. package/dist/cjs/index-a7b0c73d.js +12 -4
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/collection-manifest.json +1 -0
  10. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.css +99 -0
  11. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js +798 -0
  12. package/dist/collection/components/ez-classic-combo-box/interfaces/IOption.js +1 -0
  13. package/dist/collection/components/ez-classic-input/ez-classic-input.css +29 -0
  14. package/dist/collection/components/ez-classic-input/ez-classic-input.js +42 -8
  15. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
  16. package/dist/custom-elements/index.d.ts +6 -0
  17. package/dist/custom-elements/index.js +348 -12
  18. package/dist/esm/{ez-card-item_2.entry.js → ez-card-item.entry.js} +1 -205
  19. package/dist/esm/ez-classic-combo-box.entry.js +320 -0
  20. package/dist/esm/ez-classic-input.entry.js +26 -9
  21. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  22. package/dist/esm/ez-popover-core.entry.js +207 -0
  23. package/dist/esm/ezui.js +1 -1
  24. package/dist/esm/index-baa5e267.js +12 -4
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/ezui/ezui.esm.js +1 -1
  27. package/dist/ezui/p-3bf7f94b.entry.js +1 -0
  28. package/dist/ezui/{p-0c1a288c.entry.js → p-5b305e5e.entry.js} +1 -1
  29. package/dist/ezui/p-9b2e6438.entry.js +1 -0
  30. package/dist/ezui/p-cc11978a.entry.js +1 -0
  31. package/dist/ezui/p-d6f50207.entry.js +1 -0
  32. package/dist/types/components/ez-classic-combo-box/ez-classic-combo-box.d.ts +115 -0
  33. package/dist/types/components/ez-classic-combo-box/interfaces/IOption.d.ts +4 -0
  34. package/dist/types/components/ez-classic-input/ez-classic-input.d.ts +7 -0
  35. package/dist/types/components.d.ts +199 -20
  36. package/package.json +1 -1
  37. package/react/components.d.ts +1 -0
  38. package/react/components.js +1 -0
  39. package/react/components.js.map +1 -1
  40. package/dist/ezui/p-5e495d47.entry.js +0 -1
  41. package/dist/ezui/p-e78e87f5.entry.js +0 -1
@@ -4,7 +4,6 @@ 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 floatingUi_dom_esm = require('./floating-ui.dom.esm-017acce4.js');
8
7
 
9
8
  const ezCardItemCss = ":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--font-weight--semi-bold, 600);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--font-weight--semi-bold, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define a cor da fonte do valor do detalhe do componente.*/\n --ez-card-item__detail-value--color: var(--color--petroleum-500, #404E65);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: 0.95;\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item__detail-value--color);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--2xs) var(--space--small);\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
10
9
 
@@ -60,208 +59,4 @@ const EzCardItem = class {
60
59
  };
61
60
  EzCardItem.style = ezCardItemCss;
62
61
 
63
- const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--100, 100);--ez-popover__box--overlay-z-index:var(--elevation--24, 24);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--ez-popover__box--overlay-z-index)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
64
-
65
- const EzPopoverCore = class {
66
- constructor(hostRef) {
67
- index.registerInstance(this, hostRef);
68
- this.ezVisibilityChange = index.createEvent(this, "ezVisibilityChange", 7);
69
- this.autoClose = true;
70
- this.boxWidth = "fit-content";
71
- this.opened = false;
72
- this.overlayType = "light";
73
- this.anchorElement = undefined;
74
- this.options = { horizontalGap: 0, verticalGap: 0, fromRight: false };
75
- this.useAnchorSize = false;
76
- this.minWidth = 150;
77
- }
78
- observeOpened(newValue, oldValue) {
79
- if (newValue === oldValue) {
80
- return;
81
- }
82
- if (newValue) {
83
- this.openPopover();
84
- }
85
- else {
86
- this.hidePopover();
87
- }
88
- }
89
- /**
90
- * Atualiza a posição do popover.
91
- */
92
- async updatePosition(top, left) {
93
- this.updateOptionPosition(top, left);
94
- await this.updatePositionPopover();
95
- }
96
- /**
97
- * Exibe o ez-popover.
98
- */
99
- async show(top, left) {
100
- this.updateOptionPosition(top, left);
101
- this.opened = true;
102
- }
103
- /**
104
- * Ancora a exibição do popOver a um elemento HTML.
105
- */
106
- async showUnder(element, options) {
107
- if (options) {
108
- this.options = options;
109
- }
110
- this.anchorElement = element;
111
- this.opened = true;
112
- }
113
- /**
114
- * Oculta o ez-popover.
115
- */
116
- async hide() {
117
- this.opened = false;
118
- }
119
- /**
120
- * Altera as opções.
121
- */
122
- async setOptions(options) {
123
- Object.assign(this.options, options);
124
- }
125
- /**
126
- * Altera o elemento de ancoragem.
127
- */
128
- async setAnchorElement(anchor) {
129
- this.anchorElement = anchor;
130
- }
131
- parseSizePixel(sizePixel, defaultValue) {
132
- if (!sizePixel) {
133
- return defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0;
134
- }
135
- if (typeof sizePixel === "string") {
136
- return Number(sizePixel.replace("px", ""));
137
- }
138
- return sizePixel !== null && sizePixel !== void 0 ? sizePixel : 0;
139
- }
140
- updateOptionPosition(top, left) {
141
- Object.assign(this.options, {
142
- horizontalGap: this.parseSizePixel(left, this.options.horizontalGap),
143
- verticalGap: this.parseSizePixel(top, this.options.verticalGap),
144
- });
145
- }
146
- getElement(element) {
147
- if (typeof element === 'string') {
148
- return document.getElementById(element);
149
- }
150
- return element;
151
- }
152
- getAnchorElement() {
153
- if (!this.anchorElement) {
154
- return this._host;
155
- }
156
- if (Array.isArray(this.anchorElement)) {
157
- for (const element of this.anchorElement) {
158
- const htmlElement = this.getElement(element);
159
- if (htmlElement) {
160
- return htmlElement;
161
- }
162
- }
163
- return this._host;
164
- }
165
- return this.getElement(this.anchorElement);
166
- }
167
- async updatePositionPopover() {
168
- if (!this._box || !this.opened) {
169
- return;
170
- }
171
- const currentAnchorElement = this.getAnchorElement();
172
- await floatingUi_dom_esm.computePosition(currentAnchorElement, this._box, {
173
- placement: this.options.fromRight ? 'bottom-end' : 'bottom-start',
174
- middleware: [floatingUi_dom_esm.flip(), floatingUi_dom_esm.shift({ padding: 5 })],
175
- strategy: 'fixed',
176
- }).then(({ x, y, placement }) => {
177
- const newTop = placement.includes("bottom") ? y + this.options.verticalGap : y - this.options.verticalGap;
178
- const newLeft = placement.includes("start") ? x + this.options.horizontalGap : x - this.options.horizontalGap;
179
- Object.assign(this._box.style, {
180
- top: `${newTop}px`,
181
- left: `${newLeft}px`,
182
- });
183
- });
184
- }
185
- hidePopover() {
186
- if (!this._box) {
187
- return;
188
- }
189
- this._box.style.display = '';
190
- this.hideOverlay();
191
- this.ezVisibilityChange.emit(false);
192
- }
193
- async openPopover() {
194
- if (!this._box || !this.opened) {
195
- return;
196
- }
197
- this._box.style.display = 'flex';
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
- await this.updatePositionPopover();
206
- this.openOverlay();
207
- this.ezVisibilityChange.emit(true);
208
- this._box.style.visibility = 'visible';
209
- }
210
- openOverlay() {
211
- if (!this._overlay || !this._overlayIsActive) {
212
- return;
213
- }
214
- this._overlay.style.display = 'block';
215
- }
216
- hideOverlay() {
217
- if (!this._overlay) {
218
- return;
219
- }
220
- this._overlay.style.display = 'none';
221
- }
222
- checkStatusOverlay() {
223
- if (this.overlayType !== "none") {
224
- return true;
225
- }
226
- if (this.overlayType === "none" && this.autoClose) {
227
- return true;
228
- }
229
- return false;
230
- }
231
- handlePositionUpdate() {
232
- if (!this.opened) {
233
- return;
234
- }
235
- this.updatePositionPopover();
236
- }
237
- componentWillLoad() {
238
- window.addEventListener('scroll', this.handlePositionUpdate.bind(this), true);
239
- window.addEventListener('resize', this.handlePositionUpdate.bind(this), true);
240
- }
241
- componentDidLoad() {
242
- this._overlayIsActive = this.checkStatusOverlay();
243
- this._resizeObserver = new ResizeObserver(this.updatePositionPopover.bind(this));
244
- this._resizeObserver.observe(this._box);
245
- this.openPopover();
246
- }
247
- disconnectedCallback() {
248
- window.removeEventListener('scroll', this.handlePositionUpdate.bind(this), true);
249
- window.removeEventListener('resize', this.handlePositionUpdate.bind(this), true);
250
- this._resizeObserver.disconnect();
251
- }
252
- render() {
253
- return (index.h(index.Host, null, index.h("div", { ref: el => this._overlay = el, onClick: () => this.hide(), class: `popover__overlay popover__overlay--${this.overlayType}` }), index.h("section", { ref: el => this._box = el, class: {
254
- "popover__box": true,
255
- "popover__box--fit-content": this.boxWidth === "fit-content",
256
- "popover__box--full-width": this.boxWidth !== "fit-content",
257
- } }, index.h("slot", null))));
258
- }
259
- get _host() { return index.getElement(this); }
260
- static get watchers() { return {
261
- "opened": ["observeOpened"]
262
- }; }
263
- };
264
- EzPopoverCore.style = ezPopoverCoreCss;
265
-
266
62
  exports.ez_card_item = EzCardItem;
267
- exports.ez_popover_core = EzPopoverCore;
@@ -0,0 +1,324 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-a7b0c73d.js');
6
+ const core = require('@sankhyalabs/core');
7
+ const index$1 = require('./index-425b1f67.js');
8
+
9
+ const ezClassicComboBoxCss = ":host{display:block;box-sizing:border-box;font-family:var(--font--pattern, 'Roboto', Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--gray-500, #494A4E);--ez-classic-combo-box-highlighted-bg-color:var(--color--gray-90, #EAEAEA);--ez-classic-combo-box-max-height:180px;--ez-classic-combo-box-list-bg-color:var(--color--gray-70, #FFFFFF);--ez-classic-combo-box-item-hover-bg-color:var(--color--gray-100, #DEDEDE);--ez-classic-combo-box-selected-bg-color:var(--color--ocean-green-90, #E6F3EF);--ez-classic-combo-box-selected-text-color:var(--color--ocean-green-600, #008561);--ez-classic-combo-box-selected-font-weight:var(--font-weight--medium, 500);--ez-classic-combo-box-item-padding:var(--space--8, 8px) var(--space--4, 4px);--ez-classic-combo-box-item-border-radius:var(--border--radius-8, 8px);--ez-classic-combo-box-list-margin:var(--space--6, 6px);--ez-classic-combo-box-transition-duration:150ms;--ez-classic-combo-box-scrollbar-color:var(--color--gray-300, #C4C4C4);--ez-classic-combo-box-no-results-margin:var(--space--52, 52px) 0;--ez-classic-combo-box-item-text-color:inherit;--ez-classic-combo-box-item-min-height:auto}ul{list-style:none;padding:0;margin:var(--ez-classic-combo-box-list-margin);display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--ez-classic-combo-box-scrollbar-color) transparent;max-height:var(--ez-classic-combo-box-max-height);scroll-behavior:smooth;background-color:var(--ez-classic-combo-box-list-bg-color)}li{cursor:pointer;border-radius:var(--ez-classic-combo-box-item-border-radius);padding:var(--ez-classic-combo-box-item-padding);transition:var(--ez-classic-combo-box-transition-duration) background-color linear;color:var(--ez-classic-combo-box-item-text-color);min-height:var(--ez-classic-combo-box-item-min-height)}li:hover{background-color:var(--ez-classic-combo-box-item-hover-bg-color)}li.highlighted{background-color:var(--ez-classic-combo-box-highlighted-bg-color)}li.selected{background-color:var(--ez-classic-combo-box-selected-bg-color);color:var(--ez-classic-combo-box-selected-text-color);font-weight:var(--ez-classic-combo-box-selected-font-weight)}span.no-results{margin:var(--ez-classic-combo-box-no-results-margin);cursor:default;text-align:center;display:flex;align-items:center;justify-content:center}";
10
+
11
+ const EzClassicComboBox = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.ezChange = index.createEvent(this, "ezChange", 7);
15
+ this.ezBlur = index.createEvent(this, "ezBlur", 7);
16
+ this.iconClick = index.createEvent(this, "iconClick", 7);
17
+ this.ezVisibilityChange = index.createEvent(this, "ezVisibilityChange", 7);
18
+ this.ezType = index.createEvent(this, "ezType", 7);
19
+ this._keyboardManager = undefined;
20
+ this._boundHandleDocumentClick = this.handleDocumentClick.bind(this);
21
+ this.popoverVisible = false;
22
+ this.hasSlotContent = false;
23
+ this.highlightedIndex = 0;
24
+ this.filteredOptions = [];
25
+ this.inputValue = '';
26
+ this.value = null;
27
+ this.label = undefined;
28
+ this.placeholder = undefined;
29
+ this.enabled = true;
30
+ this.readonly = false;
31
+ this.name = undefined;
32
+ this.state = "default";
33
+ this.helpText = undefined;
34
+ this.iconName = undefined;
35
+ this.titleIcon = undefined;
36
+ this.iconClickable = false;
37
+ this.suppressSearch = false;
38
+ this.options = undefined;
39
+ this.textEmptyOption = undefined;
40
+ this.suppressEmptyOption = false;
41
+ }
42
+ /**
43
+ * Aplica o foco no campo.
44
+ */
45
+ async setFocus(option) {
46
+ var _a;
47
+ await ((_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.setFocus(option));
48
+ }
49
+ /**
50
+ * Remove o foco do campo.
51
+ */
52
+ async setBlur() {
53
+ var _a;
54
+ await ((_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.setBlur());
55
+ await this.hidePopover();
56
+ }
57
+ /**
58
+ * Exibe o popover abaixo do input.
59
+ */
60
+ async showPopover() {
61
+ var _a, _b, _c;
62
+ if (!this._popoverElem || !this._inputElem || this.popoverVisible) {
63
+ return;
64
+ }
65
+ this.popoverVisible = true;
66
+ const inputContainer = (_b = (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.input-container');
67
+ await ((_c = this._popoverElem) === null || _c === void 0 ? void 0 : _c.showUnder(inputContainer !== null && inputContainer !== void 0 ? inputContainer : this._inputElem));
68
+ }
69
+ /**
70
+ * Oculta o popover.
71
+ */
72
+ async hidePopover() {
73
+ var _a;
74
+ this.popoverVisible = false;
75
+ await ((_a = this._popoverElem) === null || _a === void 0 ? void 0 : _a.hide());
76
+ }
77
+ compareOptionValues(option1, option2) {
78
+ var _a, _b;
79
+ return JSON.stringify((_a = option1 === null || option1 === void 0 ? void 0 : option1.value) !== null && _a !== void 0 ? _a : null) === JSON.stringify((_b = option2 === null || option2 === void 0 ? void 0 : option2.value) !== null && _b !== void 0 ? _b : null);
80
+ }
81
+ setEmptyValue() {
82
+ this.value = null;
83
+ this.inputValue = '';
84
+ }
85
+ async setValue(option) {
86
+ if (!option || !this.options) {
87
+ this.setEmptyValue();
88
+ await this.hidePopover();
89
+ return;
90
+ }
91
+ if (this.compareOptionValues(this.value, option)) {
92
+ await this.hidePopover();
93
+ return;
94
+ }
95
+ if (!option.value) {
96
+ this.setEmptyValue();
97
+ }
98
+ else {
99
+ this.value = option;
100
+ this.inputValue = option.label;
101
+ }
102
+ this.ezChange.emit(this.value);
103
+ await this.hidePopover();
104
+ }
105
+ async optionsChanged() {
106
+ this.filterOptions('');
107
+ }
108
+ async valueChanged(newValue) {
109
+ if (newValue) {
110
+ this.inputValue = newValue.label;
111
+ this.setHighlightedIndexToValue();
112
+ }
113
+ else {
114
+ this.inputValue = '';
115
+ this.highlightedIndex = 0;
116
+ }
117
+ }
118
+ async handleIconClick(event) {
119
+ event.stopPropagation();
120
+ event.preventDefault();
121
+ if (event.detail.icon === 'right') {
122
+ if (!this.popoverVisible) {
123
+ await this.showPopover();
124
+ }
125
+ else {
126
+ await this.hidePopover();
127
+ }
128
+ }
129
+ else {
130
+ this.iconClick.emit();
131
+ }
132
+ }
133
+ async handleEzChange(event) {
134
+ event.stopPropagation();
135
+ this.inputValue = event.detail;
136
+ if (!this.popoverVisible && this.inputValue.length > 0) {
137
+ await this.showPopover();
138
+ }
139
+ this.ezType.emit(this.inputValue);
140
+ this.highlightedIndex = 0;
141
+ this.filterOptions(this.inputValue);
142
+ }
143
+ async handleEzBlur(event) {
144
+ var _a, _b;
145
+ event.stopPropagation();
146
+ if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.label) !== this.inputValue) {
147
+ this.inputValue = ((_b = this.value) === null || _b === void 0 ? void 0 : _b.label) || '';
148
+ }
149
+ this.ezBlur.emit(this.value);
150
+ }
151
+ filterOptions(searchTerm) {
152
+ if (!this.options) {
153
+ this.filteredOptions = [];
154
+ return;
155
+ }
156
+ let currentOptions = [];
157
+ if (!searchTerm || searchTerm.trim() === '') {
158
+ currentOptions = currentOptions.concat([...this.options]);
159
+ }
160
+ else {
161
+ const term = searchTerm.toLowerCase().trim();
162
+ currentOptions = currentOptions.concat(this.options.filter(option => option.label.toLowerCase().includes(term) ||
163
+ option.value.toLowerCase().includes(term)));
164
+ }
165
+ if (!this.suppressEmptyOption && currentOptions.length > 0) {
166
+ currentOptions = [
167
+ {
168
+ value: null,
169
+ label: this.textEmptyOption || this.i18n('ez-classic-combo-box.emptyOption')
170
+ },
171
+ ...currentOptions
172
+ ];
173
+ }
174
+ this.filteredOptions = currentOptions;
175
+ this.setHighlightedIndexToValue();
176
+ this.scrollToHighlightedOption();
177
+ }
178
+ scrollToHighlightedOption() {
179
+ if (this.highlightedIndex < 0 || !this._listElem) {
180
+ return;
181
+ }
182
+ const highlightedOption = this._listElem.children[this.highlightedIndex];
183
+ if (highlightedOption) {
184
+ highlightedOption.scrollIntoView({
185
+ behavior: 'smooth',
186
+ block: 'nearest',
187
+ inline: 'start'
188
+ });
189
+ }
190
+ }
191
+ async selectOption(option) {
192
+ if (!option || this.readonly || !this.enabled) {
193
+ return;
194
+ }
195
+ await this.setValue(option);
196
+ }
197
+ async handleArrowUp() {
198
+ var _a;
199
+ if (!this.popoverVisible) {
200
+ await this.showPopover();
201
+ return;
202
+ }
203
+ const optionsLength = ((_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a.length) || 0;
204
+ if (optionsLength <= 0 || this.highlightedIndex <= 0) {
205
+ return;
206
+ }
207
+ this.highlightedIndex = Math.max(0, this.highlightedIndex - 1);
208
+ this.scrollToHighlightedOption();
209
+ }
210
+ handleArrowDown() {
211
+ var _a;
212
+ if (!this.popoverVisible) {
213
+ this.showPopover();
214
+ return;
215
+ }
216
+ const optionsLength = ((_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a.length) || 0;
217
+ if (optionsLength <= 0) {
218
+ return;
219
+ }
220
+ this.highlightedIndex = Math.min(optionsLength - 1, this.highlightedIndex + 1);
221
+ this.scrollToHighlightedOption();
222
+ }
223
+ async selectCurrentItem() {
224
+ if (!this.popoverVisible || this.highlightedIndex < 0) {
225
+ return;
226
+ }
227
+ if (this.hasSlotContent || this.filteredOptions.length === 0 || this.readonly || !this.enabled) {
228
+ await this.hidePopover();
229
+ return;
230
+ }
231
+ if (this.filteredOptions && this.filteredOptions[this.highlightedIndex]) {
232
+ this.selectOption(this.filteredOptions[this.highlightedIndex]);
233
+ }
234
+ }
235
+ handleVisibilityChange(event) {
236
+ this.popoverVisible = event.detail;
237
+ this.ezVisibilityChange.emit(this.popoverVisible);
238
+ }
239
+ checkSlotContent() {
240
+ const slot = this._element.querySelector('slot') || this._element;
241
+ if (slot instanceof HTMLSlotElement) {
242
+ this.hasSlotContent = slot.assignedNodes().length > 0;
243
+ }
244
+ else {
245
+ this.hasSlotContent = slot.children.length > 0;
246
+ }
247
+ }
248
+ setHighlightedIndexToValue() {
249
+ if (this.value && this.filteredOptions) {
250
+ const index = this.filteredOptions.findIndex(opt => opt.value === this.value.value);
251
+ if (index >= 0) {
252
+ this.highlightedIndex = index;
253
+ return;
254
+ }
255
+ this.highlightedIndex = 0;
256
+ }
257
+ }
258
+ async handleDocumentClick(event) {
259
+ const target = event.target;
260
+ if (!this._element.contains(target) && !this._popoverElem.contains(target)) {
261
+ await this.hidePopover();
262
+ }
263
+ }
264
+ addInfoId() {
265
+ const dataInfo = { id: 'embedded' };
266
+ if (this._element) {
267
+ core.ElementIDUtils.addIDInfo(this._element);
268
+ }
269
+ if (this._inputElem) {
270
+ core.ElementIDUtils.addIDInfo(this._inputElem, 'classic-combo-box-input', dataInfo);
271
+ }
272
+ if (this._popoverElem) {
273
+ core.ElementIDUtils.addIDInfo(this._popoverElem, 'classic-combo-box-popover', dataInfo);
274
+ }
275
+ }
276
+ async initKeyboardManager() {
277
+ this._keyboardManager = new core.KeyboardManager({ element: this._element, propagate: true });
278
+ this._keyboardManager
279
+ .bind("ArrowUp", () => this.handleArrowUp(), { propagate: false })
280
+ .bind("ArrowDown", () => this.handleArrowDown(), { propagate: false })
281
+ .bind("Enter", () => this.selectCurrentItem(), { propagate: false })
282
+ .bind("Tab", () => this.selectCurrentItem())
283
+ .bind("shift+Tab", () => this.selectCurrentItem())
284
+ .bind("Escape", () => this.hidePopover());
285
+ }
286
+ async connectedCallback() {
287
+ this.i18n = await index$1.initI18n();
288
+ await this.initKeyboardManager();
289
+ document.addEventListener('mouseup', this._boundHandleDocumentClick);
290
+ }
291
+ disconnectedCallback() {
292
+ this._keyboardManager.unbindAllShortcutKeys();
293
+ document.removeEventListener('mouseup', this._boundHandleDocumentClick);
294
+ }
295
+ componentWillLoad() {
296
+ this.filterOptions('');
297
+ }
298
+ componentDidLoad() {
299
+ this.addInfoId();
300
+ this.checkSlotContent();
301
+ if (this.value) {
302
+ this.inputValue = this.value.label;
303
+ this.setHighlightedIndexToValue();
304
+ }
305
+ }
306
+ render() {
307
+ var _a;
308
+ return (index.h(index.Host, null, index.h("ez-classic-input", { ref: ref => this._inputElem = ref, name: this.name, label: this.label, placeholder: this.placeholder, value: this.inputValue, state: this.state, enabled: this.enabled, readonly: this.readonly || this.suppressSearch, leftIconName: this.iconName, leftIconTooltip: this.titleIcon, leftIconClickable: this.iconClickable, rightIconClickable: true, helpText: this.helpText, rightIconName: this.popoverVisible ? 'angle-up' : 'angle-down', onIconClick: this.handleIconClick.bind(this), onEzChange: this.handleEzChange.bind(this), onEzFocus: this.showPopover.bind(this), onEzBlur: this.handleEzBlur.bind(this) }), index.h("ez-popover-core", { ref: ref => this._popoverElem = ref, useAnchorSize: true, onEzVisibilityChange: this.handleVisibilityChange.bind(this), overlayType: "none", options: { verticalGap: 2, horizontalGap: 0 }, autoClose: false }, index.h("slot", { onSlotchange: this.checkSlotContent.bind(this) }), !this.hasSlotContent && (((_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (index.h("ul", { ref: ref => this._listElem = ref, tabIndex: -1 }, this.filteredOptions.map((option, index$1) => {
309
+ var _a, _b;
310
+ return (index.h("li", { key: (_a = option.value) !== null && _a !== void 0 ? _a : '__empty__', value: option.value, class: {
311
+ 'highlighted': this.highlightedIndex === index$1,
312
+ 'selected': ((_b = this.value) === null || _b === void 0 ? void 0 : _b.value) === option.value
313
+ }, onMouseDown: () => this.selectOption(option) }, option.label));
314
+ }))) : (index.h("span", { class: "no-results" }, this.i18n('ez-classic-combo-box.noResults')))))));
315
+ }
316
+ get _element() { return index.getElement(this); }
317
+ static get watchers() { return {
318
+ "options": ["optionsChanged"],
319
+ "value": ["valueChanged"]
320
+ }; }
321
+ };
322
+ EzClassicComboBox.style = ezClassicComboBoxCss;
323
+
324
+ exports.ez_classic_combo_box = EzClassicComboBox;
@@ -200,14 +200,16 @@ class MaskFormatter {
200
200
  }
201
201
  }
202
202
 
203
- const ezClassicInputCss = ":host{display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);border:none;padding:0;--ez-classic-input--label-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--border-color-default:var(--color--gray-200, #D2D2D3);--ez-classic-input--border-color-focus:var(--color--gray-300, #A4A5A7);--ez-classic-input--border-color-success:var(--color--green-600, #157A00);--ez-classic-input--border-color-error:var(--color--red-600, #BD0025);--ez-classic-input--border-color-warning:var(--color--yellow-600, #EFB103);--ez-classic-input--background-color:var(--color--gray-70, #FFFFFF);--ez-classic-input--background-color-disabled:var(--color--gray-90, #EAEAEA);--ez-classic-input--text-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--placeholder-color:#bdbdbd;--ez-classic-input--icon-color:var(--color--gray-400, #77777A);--ez-classic-input--helptext-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--height:56px}.input-container{display:flex;flex-direction:row;align-items:center;width:100%;border:none;border-radius:var(--border--radius-8, 8px);padding:var(--space--16, 16px);box-sizing:border-box;gap:var(--space--10, 10px);margin:var(--space--4, 4px) var(--space--2, 2px);transition:box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);height:var(--ez-classic-input--height);background-color:var(--ez-classic-input--background-color)}.input-container,.input-container[data-state=\"default\"]{box-shadow:0 0 0 1px var(--ez-classic-input--border-color-default)}.input-container[data-state=\"success\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-success)}.input-container[data-state=\"error\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-error)}.input-container[data-state=\"warning\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-warning)}.input-container:focus-within{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-focus)}ez-icon{min-width:var(--space--24, 24px);color:var(--ez-classic-input--icon-color)}input{flex:1;border:none;outline:none;background:transparent;height:100%;width:100%;padding:0;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);text-overflow:ellipsis;color:var(--ez-classic-input--text-color)}input::placeholder{color:var(--ez-classic-input--placeholder-color)}.input-container[data-disabled=\"true\"]{cursor:not-allowed;background:var(--ez-classic-input--background-color-disabled);border-color:var(--ez-classic-input--border-color-default)}.input-container[data-disabled=\"true\"]>*{cursor:not-allowed}@keyframes ez-helptext-fadein{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}span{font-size:var(--font-size--xsmall, 10px);line-height:var(--line-height--16, 16px);overflow:hidden;text-overflow:ellipsis;animation:ez-helptext-fadein 0.3s ease;color:var(--ez-classic-input--helptext-color)}label{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--line-height--20, 20px);color:var(--ez-classic-input--label-color)}.icon-clickable{cursor:pointer}";
203
+ const ezClassicInputCss = ":host{display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);border:none;padding:0;--ez-classic-input--label-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--border-color-default:var(--color--gray-200, #D2D2D3);--ez-classic-input--border-color-focus:var(--color--gray-300, #A4A5A7);--ez-classic-input--border-color-success:var(--color--green-600, #157A00);--ez-classic-input--border-color-error:var(--color--red-600, #BD0025);--ez-classic-input--border-color-warning:var(--color--yellow-600, #EFB103);--ez-classic-input--background-color:var(--color--gray-70, #FFFFFF);--ez-classic-input--background-color-disabled:var(--color--gray-90, #EAEAEA);--ez-classic-input--text-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--placeholder-color:#bdbdbd;--ez-classic-input--icon-color:var(--color--gray-400, #77777A);--ez-classic-input--helptext-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--height:56px}.input-container{display:flex;flex-direction:row;align-items:center;width:100%;border:none;border-radius:var(--border--radius-8, 8px);padding:var(--space--16, 16px);box-sizing:border-box;gap:var(--space--10, 10px);margin:var(--space--4, 4px) var(--space--2, 2px);transition:box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);height:var(--ez-classic-input--height);background-color:var(--ez-classic-input--background-color)}.input-container,.input-container[data-state=\"default\"]{box-shadow:0 0 0 1px var(--ez-classic-input--border-color-default)}.input-container[data-state=\"success\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-success)}.input-container[data-state=\"error\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-error)}.input-container[data-state=\"warning\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-warning)}.input-container:focus-within{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-focus)}ez-icon{min-width:var(--space--24, 24px);color:var(--ez-classic-input--icon-color)}input{flex:1;border:none;outline:none;background:transparent;height:100%;width:100%;padding:0;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);text-overflow:ellipsis;color:var(--ez-classic-input--text-color)}input::placeholder{color:var(--ez-classic-input--placeholder-color)}.input-container[data-disabled=\"true\"]{cursor:not-allowed;background:var(--ez-classic-input--background-color-disabled);border-color:var(--ez-classic-input--border-color-default)}.input-container[data-disabled=\"true\"]>*{cursor:not-allowed}.input-container input:read-only{cursor:default}@keyframes ez-helptext-fadein{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}span{font-size:var(--font-size--xsmall, 10px);line-height:var(--line-height--16, 16px);overflow:hidden;text-overflow:ellipsis;animation:ez-helptext-fadein 0.3s ease;color:var(--ez-classic-input--helptext-color)}label{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--line-height--20, 20px);color:var(--ez-classic-input--label-color)}.icon-clickable{cursor:pointer}";
204
204
 
205
205
  const EzClassicInput = class {
206
206
  constructor(hostRef) {
207
207
  index.registerInstance(this, hostRef);
208
208
  this.ezChange = index.createEvent(this, "ezChange", 7);
209
209
  this.ezBlur = index.createEvent(this, "ezBlur", 7);
210
+ this.ezFocus = index.createEvent(this, "ezFocus", 7);
210
211
  this.iconClick = index.createEvent(this, "iconClick", 7);
212
+ this._internalValueChange = false;
211
213
  this.type = 'text';
212
214
  this.value = undefined;
213
215
  this.label = undefined;
@@ -246,6 +248,19 @@ const EzClassicInput = class {
246
248
  async setBlur() {
247
249
  this._inputElem.blur();
248
250
  }
251
+ async syncValue() {
252
+ if (this._internalValueChange) {
253
+ this._internalValueChange = false;
254
+ return;
255
+ }
256
+ if (this.value && this._maskFormatter && this._inputElem) {
257
+ const formattedValue = this._maskFormatter.format(this.value);
258
+ this._inputElem.value = formattedValue;
259
+ }
260
+ else if (this._inputElem) {
261
+ this._inputElem.value = this.value || '';
262
+ }
263
+ }
249
264
  onInput(event) {
250
265
  try {
251
266
  const inputElement = event.target;
@@ -254,11 +269,13 @@ const EzClassicInput = class {
254
269
  const formattedValue = this._maskFormatter.format(inputValue);
255
270
  const cleanValue = this._maskFormatter.removeMask(formattedValue);
256
271
  inputElement.value = formattedValue;
272
+ this._internalValueChange = true;
257
273
  this.value = cleanValue;
258
274
  const emitValue = this.emitMaskedValue ? formattedValue : cleanValue;
259
275
  this.ezChange.emit(emitValue);
260
276
  }
261
277
  else {
278
+ this._internalValueChange = true;
262
279
  this.value = inputValue;
263
280
  this.ezChange.emit(inputValue);
264
281
  }
@@ -270,6 +287,9 @@ const EzClassicInput = class {
270
287
  onBlur() {
271
288
  this.ezBlur.emit(this.value);
272
289
  }
290
+ onFocus() {
291
+ this.ezFocus.emit(this.value);
292
+ }
273
293
  handleIconClick(event, icon) {
274
294
  if (!this.enabled) {
275
295
  return;
@@ -299,19 +319,16 @@ const EzClassicInput = class {
299
319
  }
300
320
  }
301
321
  componentDidLoad() {
302
- if (this.value && this._maskFormatter && this._inputElem) {
303
- const formattedValue = this._maskFormatter.format(this.value);
304
- this._inputElem.value = formattedValue;
305
- }
306
- else {
307
- this._inputElem.value = this.value || '';
308
- }
322
+ this.syncValue();
309
323
  this.addInfoId();
310
324
  }
311
325
  render() {
312
- return (index.h(index.Host, null, index.h("label", { title: this.label, htmlFor: this.name }, this.label), index.h("div", { class: "input-container", "data-state": this.state, "data-disabled": (!this.enabled).toString(), onClick: () => this.setFocus({ preventScroll: true }) }, this.leftIconName && (index.h("ez-icon", { iconName: this.leftIconName, title: this.leftIconTooltip, onClick: (event) => this.handleIconClick(event, "left"), class: { 'icon-clickable': this.leftIconClickable } })), index.h("input", { ref: el => this._inputElem = el, id: this.name, type: this.type, title: this.value, placeholder: this.placeholder, disabled: !this.enabled, readonly: this.readonly, name: this.name, minlength: this.minlength, maxlength: this.maxlength, onInput: this.onInput.bind(this), onBlur: this.onBlur.bind(this) }), this.rightIconName && (index.h("ez-icon", { iconName: this.rightIconName, title: this.rightIconTooltip, onClick: (event) => this.handleIconClick(event, "right"), class: { 'icon-clickable': this.rightIconClickable } }))), this.helpText && (index.h("span", { title: this.helpText }, this.helpText))));
326
+ return (index.h(index.Host, null, index.h("label", { title: this.label, htmlFor: this.name }, this.label), index.h("div", { class: "input-container", "data-state": this.state, "data-disabled": (!this.enabled).toString(), onClick: () => this.setFocus({ preventScroll: true }) }, this.leftIconName && (index.h("ez-icon", { iconName: this.leftIconName, title: this.leftIconTooltip, onClick: (event) => this.handleIconClick(event, "left"), class: { 'icon-clickable': this.leftIconClickable } })), index.h("input", { ref: el => this._inputElem = el, id: this.name, type: this.type, title: this.value, placeholder: this.placeholder, disabled: !this.enabled, readonly: this.readonly, name: this.name, minlength: this.minlength, maxlength: this.maxlength, onInput: (event) => this.onInput(event), onBlur: this.onBlur.bind(this), onFocus: this.onFocus.bind(this) }), this.rightIconName && (index.h("ez-icon", { iconName: this.rightIconName, title: this.rightIconTooltip, onClick: (event) => this.handleIconClick(event, "right"), class: { 'icon-clickable': this.rightIconClickable } }))), this.helpText && (index.h("span", { title: this.helpText }, this.helpText))));
313
327
  }
314
328
  get _element() { return index.getElement(this); }
329
+ static get watchers() { return {
330
+ "value": ["syncValue"]
331
+ }; }
315
332
  };
316
333
  EzClassicInput.style = ezClassicInputCss;
317
334
 
@@ -154,7 +154,7 @@ const EzMuiltiSelectionList = class {
154
154
  itemSelected.check = itemCheckSelected.check;
155
155
  }
156
156
  buildViewList(hasDelete) {
157
- return (index.h(index.Fragment, null, this.displayOptionToCheckAllItems && (index.h("ez-check", { ref: (element) => (this.checkInput = element), label: this.i18n("ez-multi-selection-list.selectAll"), class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), index.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 })));
157
+ return (index.h(index.Fragment, null, this.displayOptionToCheckAllItems && (index.h("ez-check", { ref: (element) => (this.checkInput = element), label: this.i18n("ez-multi-selection-list.selectAll"), class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), index.h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions.map(opt => (Object.assign(Object.assign({}, opt), { id: opt.value }))), listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
158
158
  }
159
159
  buildDeleteIconSlot(item) {
160
160
  return index.h("ez-icon", { style: { cursor: 'pointer' }, iconName: "delete", onClick: () => this.handleRemoveItemFromOptions(item) });