@sankhyalabs/ezui 3.1.6 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -162,10 +162,11 @@ const EzActionsButton = class {
162
162
  optionsTags.forEach((e) => {
163
163
  let label = e.innerText;
164
164
  let value = e.getAttribute("value");
165
+ let enabled = !(e.getAttribute("enabled") === "false");
165
166
  if (!value) {
166
167
  value = label;
167
168
  }
168
- this.actions.push({ label, value });
169
+ this.actions.push({ label, value, enabled });
169
170
  e.hidden = true;
170
171
  });
171
172
  }
@@ -198,7 +199,7 @@ const EzActionsButton = class {
198
199
  (this.isTransparent ? " ez-actions-button__arrow--upped" : "") }), index.h("div", { ref: elem => this._actionsList = elem, class: "ez-actions-button__actions-list" +
199
200
  (this.arrowActive && !this.isTransparent ? " ez-actions-button__actions-list--lowered" : "") }, this.actions.map(action => {
200
201
  var _a;
201
- return index.h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), class: "ez-actions-button__btn-action" +
202
+ return index.h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), enabled: action.enabled, class: "ez-actions-button__btn-action" +
202
203
  (this.checkOption || this.hasIconName() ? " ez-actions-button__btn-action--spaced" : "") }, this.checkOption && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.value) === action.value &&
203
204
  index.h("ez-icon", { class: "ez-actions-button__icon-check", slot: "leftIcon", size: "small", iconName: "check" }), !this.checkOption && action.iconName &&
204
205
  index.h("ez-icon", { class: "ez-actions-button__icon-item", slot: "leftIcon", size: "small", iconName: action.iconName }));
@@ -64,10 +64,7 @@ const EzComboBox = class {
64
64
  const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
65
65
  this.ezChange.emit(valueEmitted);
66
66
  }
67
- this.hideOptions();
68
- this._criteria = undefined;
69
- this._preSelection = undefined;
70
- this.updateVisibleOptions();
67
+ this.resetOptions();
71
68
  }
72
69
  }
73
70
  /**
@@ -89,7 +86,7 @@ const EzComboBox = class {
89
86
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
90
87
  }
91
88
  isDifferentValues(firstValue, secondValue) {
92
- return JSON.stringify(firstValue || {}) !== JSON.stringify(secondValue || {});
89
+ return core.ObjectUtils.objectToString(firstValue || {}) !== core.ObjectUtils.objectToString(secondValue || {});
93
90
  }
94
91
  getFormattedText(currentValue) {
95
92
  if (currentValue == undefined) {
@@ -261,19 +258,17 @@ const EzComboBox = class {
261
258
  selectOption(newOption) {
262
259
  var _a, _b;
263
260
  const currentValue = this.getSelectedOption(this.value);
264
- if (((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString())) {
261
+ if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
262
+ || (currentValue == undefined && "value" in newOption)) {
265
263
  const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
266
264
  this.value = adjustedOpt;
267
265
  }
268
266
  else {
269
- this.setInputValue();
270
- this.hideOptions();
271
- }
272
- if (this.searchMode) {
273
- this._visibleOptions = [];
267
+ this.resetOptions();
274
268
  }
275
269
  if (this.searchMode) {
276
270
  this._visibleOptions = [];
271
+ this.clearSource();
277
272
  }
278
273
  }
279
274
  loadOptions(mode, argument = "") {
@@ -292,8 +287,11 @@ const EzComboBox = class {
292
287
  this.selectOption(undefined);
293
288
  }
294
289
  else {
295
- this.setInputValue();
290
+ window.setTimeout(() => {
291
+ this.setInputValue();
292
+ }, this._deboucingTime);
296
293
  }
294
+ this.resetOptions();
297
295
  }
298
296
  setInputValue(clearError = true) {
299
297
  const textValue = this.getText();
@@ -308,8 +306,9 @@ const EzComboBox = class {
308
306
  this.value = null;
309
307
  }
310
308
  controlListWithOnlyOne() {
309
+ var _a;
311
310
  if (this.searchMode) {
312
- const source = this._visibleOptions;
311
+ const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
313
312
  if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
314
313
  this.selectOption(source[0]);
315
314
  }
@@ -392,6 +391,12 @@ const EzComboBox = class {
392
391
  var _a;
393
392
  return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(constants.REQUIRED_INFO, "").toUpperCase();
394
393
  }
394
+ resetOptions() {
395
+ this.hideOptions();
396
+ this._criteria = undefined;
397
+ this._preSelection = undefined;
398
+ this.updateVisibleOptions();
399
+ }
395
400
  //---------------------------------------------
396
401
  // Lifecycle web component
397
402
  //---------------------------------------------
@@ -457,21 +462,35 @@ const EzComboBox = class {
457
462
  this._textInput.value = event.data || argument;
458
463
  }
459
464
  this._criteria = argument;
460
- if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
465
+ if (argument) {
461
466
  if (this.searchMode) {
462
- this._showLoading = true;
467
+ this._showLoading = false;
463
468
  this.clearSource();
464
- this._changeDeboucingTimeout = window.setTimeout(() => {
465
- this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
466
- }, this._deboucingTime);
469
+ if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
470
+ this._showLoading = true;
471
+ this._changeDeboucingTimeout = window.setTimeout(() => {
472
+ this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
473
+ }, this._deboucingTime);
474
+ this.showOptions();
475
+ }
476
+ else {
477
+ this.hideOptions();
478
+ }
467
479
  }
468
480
  else {
469
481
  this.updateVisibleOptions();
482
+ this.showOptions();
470
483
  }
471
- this.showOptions();
472
484
  }
473
485
  else {
474
486
  this.hideOptions();
487
+ if (this.searchMode) {
488
+ this._showLoading = false;
489
+ this.clearSource();
490
+ }
491
+ else {
492
+ this.updateVisibleOptions();
493
+ }
475
494
  }
476
495
  }
477
496
  clearDeboucingTimeout() {
@@ -530,10 +549,14 @@ const EzComboBox = class {
530
549
  core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
531
550
  return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, index.h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, index.h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
532
551
  ? index.h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }))
533
- : undefined), index.h("section", { class: "list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, index.h("div", { class: "list-options", ref: elem => this._optionsList = elem }, this._visibleOptions.length === 0
534
- && index.h("div", { class: "message" }, !this._showLoading && index.h("span", { class: "message__no-result" }, this._textEmptyList), this._showLoading && index.h("div", { class: "message__loading" })), this.showOptionValue
552
+ : undefined), index.h("section", { class: "list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, index.h("div", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
553
+ && this._visibleOptions.length === 0
554
+ && index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
555
+ && index.h("div", { class: "message" }, index.h("div", { class: "message__loading" })), this.showOptionValue
535
556
  ? index.h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem })
536
- : undefined, this._visibleOptions.length > 0 && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
557
+ : undefined, !this._showLoading
558
+ && this._visibleOptions.length > 0
559
+ && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
537
560
  }
538
561
  get el() { return index.getElement(this); }
539
562
  static get watchers() { return {
@@ -150,10 +150,11 @@ export class EzActionsButton {
150
150
  optionsTags.forEach((e) => {
151
151
  let label = e.innerText;
152
152
  let value = e.getAttribute("value");
153
+ let enabled = !(e.getAttribute("enabled") === "false");
153
154
  if (!value) {
154
155
  value = label;
155
156
  }
156
- this.actions.push({ label, value });
157
+ this.actions.push({ label, value, enabled });
157
158
  e.hidden = true;
158
159
  });
159
160
  }
@@ -186,7 +187,7 @@ export class EzActionsButton {
186
187
  (this.isTransparent ? " ez-actions-button__arrow--upped" : "") }), h("div", { ref: elem => this._actionsList = elem, class: "ez-actions-button__actions-list" +
187
188
  (this.arrowActive && !this.isTransparent ? " ez-actions-button__actions-list--lowered" : "") }, this.actions.map(action => {
188
189
  var _a;
189
- return h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), class: "ez-actions-button__btn-action" +
190
+ return h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), enabled: action.enabled, class: "ez-actions-button__btn-action" +
190
191
  (this.checkOption || this.hasIconName() ? " ez-actions-button__btn-action--spaced" : "") }, this.checkOption && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.value) === action.value &&
191
192
  h("ez-icon", { class: "ez-actions-button__icon-check", slot: "leftIcon", size: "small", iconName: "check" }), !this.checkOption && action.iconName &&
192
193
  h("ez-icon", { class: "ez-actions-button__icon-item", slot: "leftIcon", size: "small", iconName: action.iconName }));
@@ -1,4 +1,4 @@
1
- import { ElementIDUtils, FloatingManager } from "@sankhyalabs/core";
1
+ import { ElementIDUtils, FloatingManager, ObjectUtils } from "@sankhyalabs/core";
2
2
  import { h, Host } from "@stencil/core";
3
3
  import { ApplicationUtils, CSSVarsUtils } from "../../utils";
4
4
  import { REQUIRED_INFO } from "../../utils/constants";
@@ -52,10 +52,7 @@ export class EzComboBox {
52
52
  const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
53
53
  this.ezChange.emit(valueEmitted);
54
54
  }
55
- this.hideOptions();
56
- this._criteria = undefined;
57
- this._preSelection = undefined;
58
- this.updateVisibleOptions();
55
+ this.resetOptions();
59
56
  }
60
57
  }
61
58
  /**
@@ -77,7 +74,7 @@ export class EzComboBox {
77
74
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
78
75
  }
79
76
  isDifferentValues(firstValue, secondValue) {
80
- return JSON.stringify(firstValue || {}) !== JSON.stringify(secondValue || {});
77
+ return ObjectUtils.objectToString(firstValue || {}) !== ObjectUtils.objectToString(secondValue || {});
81
78
  }
82
79
  getFormattedText(currentValue) {
83
80
  if (currentValue == undefined) {
@@ -249,19 +246,17 @@ export class EzComboBox {
249
246
  selectOption(newOption) {
250
247
  var _a, _b;
251
248
  const currentValue = this.getSelectedOption(this.value);
252
- if (((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString())) {
249
+ if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
250
+ || (currentValue == undefined && "value" in newOption)) {
253
251
  const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
254
252
  this.value = adjustedOpt;
255
253
  }
256
254
  else {
257
- this.setInputValue();
258
- this.hideOptions();
259
- }
260
- if (this.searchMode) {
261
- this._visibleOptions = [];
255
+ this.resetOptions();
262
256
  }
263
257
  if (this.searchMode) {
264
258
  this._visibleOptions = [];
259
+ this.clearSource();
265
260
  }
266
261
  }
267
262
  loadOptions(mode, argument = "") {
@@ -280,8 +275,11 @@ export class EzComboBox {
280
275
  this.selectOption(undefined);
281
276
  }
282
277
  else {
283
- this.setInputValue();
278
+ window.setTimeout(() => {
279
+ this.setInputValue();
280
+ }, this._deboucingTime);
284
281
  }
282
+ this.resetOptions();
285
283
  }
286
284
  setInputValue(clearError = true) {
287
285
  const textValue = this.getText();
@@ -296,8 +294,9 @@ export class EzComboBox {
296
294
  this.value = null;
297
295
  }
298
296
  controlListWithOnlyOne() {
297
+ var _a;
299
298
  if (this.searchMode) {
300
- const source = this._visibleOptions;
299
+ const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
301
300
  if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
302
301
  this.selectOption(source[0]);
303
302
  }
@@ -380,6 +379,12 @@ export class EzComboBox {
380
379
  var _a;
381
380
  return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
382
381
  }
382
+ resetOptions() {
383
+ this.hideOptions();
384
+ this._criteria = undefined;
385
+ this._preSelection = undefined;
386
+ this.updateVisibleOptions();
387
+ }
383
388
  //---------------------------------------------
384
389
  // Lifecycle web component
385
390
  //---------------------------------------------
@@ -445,21 +450,35 @@ export class EzComboBox {
445
450
  this._textInput.value = event.data || argument;
446
451
  }
447
452
  this._criteria = argument;
448
- if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
453
+ if (argument) {
449
454
  if (this.searchMode) {
450
- this._showLoading = true;
455
+ this._showLoading = false;
451
456
  this.clearSource();
452
- this._changeDeboucingTimeout = window.setTimeout(() => {
453
- this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
454
- }, this._deboucingTime);
457
+ if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
458
+ this._showLoading = true;
459
+ this._changeDeboucingTimeout = window.setTimeout(() => {
460
+ this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
461
+ }, this._deboucingTime);
462
+ this.showOptions();
463
+ }
464
+ else {
465
+ this.hideOptions();
466
+ }
455
467
  }
456
468
  else {
457
469
  this.updateVisibleOptions();
470
+ this.showOptions();
458
471
  }
459
- this.showOptions();
460
472
  }
461
473
  else {
462
474
  this.hideOptions();
475
+ if (this.searchMode) {
476
+ this._showLoading = false;
477
+ this.clearSource();
478
+ }
479
+ else {
480
+ this.updateVisibleOptions();
481
+ }
463
482
  }
464
483
  }
465
484
  clearDeboucingTimeout() {
@@ -518,10 +537,14 @@ export class EzComboBox {
518
537
  ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
519
538
  return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
520
539
  ? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
521
- : undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("div", { class: "list-options", ref: elem => this._optionsList = elem }, this._visibleOptions.length === 0
522
- && h("div", { class: "message" }, !this._showLoading && h("span", { class: "message__no-result" }, this._textEmptyList), this._showLoading && h("div", { class: "message__loading" })), this.showOptionValue
540
+ : undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("div", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
541
+ && this._visibleOptions.length === 0
542
+ && h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
543
+ && h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
523
544
  ? h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem })
524
- : undefined, this._visibleOptions.length > 0 && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
545
+ : undefined, !this._showLoading
546
+ && this._visibleOptions.length > 0
547
+ && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
525
548
  }
526
549
  static get is() { return "ez-combo-box"; }
527
550
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,6 @@
1
1
  import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, proxyCustomElement } from '@stencil/core/internal/client';
2
2
  export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
3
- import { FloatingManager, ElementIDUtils, JSUtils, StringUtils as StringUtils$1, DateUtils as DateUtils$1, TimeFormatter, ObjectUtils as ObjectUtils$1, Action, WaitingChangeException, ApplicationContext, UserInterface, DataUnitAction, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode, MaskFormatter } from '@sankhyalabs/core';
3
+ import { FloatingManager, ElementIDUtils, JSUtils, StringUtils as StringUtils$1, ObjectUtils as ObjectUtils$1, DateUtils as DateUtils$1, TimeFormatter, Action, WaitingChangeException, ApplicationContext, UserInterface, DataUnitAction, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode, MaskFormatter } from '@sankhyalabs/core';
4
4
 
5
5
  var DialogType;
6
6
  (function (DialogType) {
@@ -304,10 +304,11 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
304
304
  optionsTags.forEach((e) => {
305
305
  let label = e.innerText;
306
306
  let value = e.getAttribute("value");
307
+ let enabled = !(e.getAttribute("enabled") === "false");
307
308
  if (!value) {
308
309
  value = label;
309
310
  }
310
- this.actions.push({ label, value });
311
+ this.actions.push({ label, value, enabled });
311
312
  e.hidden = true;
312
313
  });
313
314
  }
@@ -340,7 +341,7 @@ const EzActionsButton$1 = class extends HTMLElement$1 {
340
341
  (this.isTransparent ? " ez-actions-button__arrow--upped" : "") }), h("div", { ref: elem => this._actionsList = elem, class: "ez-actions-button__actions-list" +
341
342
  (this.arrowActive && !this.isTransparent ? " ez-actions-button__actions-list--lowered" : "") }, this.actions.map(action => {
342
343
  var _a;
343
- return h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), class: "ez-actions-button__btn-action" +
344
+ return h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), enabled: action.enabled, class: "ez-actions-button__btn-action" +
344
345
  (this.checkOption || this.hasIconName() ? " ez-actions-button__btn-action--spaced" : "") }, this.checkOption && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.value) === action.value &&
345
346
  h("ez-icon", { class: "ez-actions-button__icon-check", slot: "leftIcon", size: "small", iconName: "check" }), !this.checkOption && action.iconName &&
346
347
  h("ez-icon", { class: "ez-actions-button__icon-item", slot: "leftIcon", size: "small", iconName: action.iconName }));
@@ -1361,10 +1362,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
1361
1362
  const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
1362
1363
  this.ezChange.emit(valueEmitted);
1363
1364
  }
1364
- this.hideOptions();
1365
- this._criteria = undefined;
1366
- this._preSelection = undefined;
1367
- this.updateVisibleOptions();
1365
+ this.resetOptions();
1368
1366
  }
1369
1367
  }
1370
1368
  /**
@@ -1386,7 +1384,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
1386
1384
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
1387
1385
  }
1388
1386
  isDifferentValues(firstValue, secondValue) {
1389
- return JSON.stringify(firstValue || {}) !== JSON.stringify(secondValue || {});
1387
+ return ObjectUtils$1.objectToString(firstValue || {}) !== ObjectUtils$1.objectToString(secondValue || {});
1390
1388
  }
1391
1389
  getFormattedText(currentValue) {
1392
1390
  if (currentValue == undefined) {
@@ -1558,19 +1556,17 @@ const EzComboBox$1 = class extends HTMLElement$1 {
1558
1556
  selectOption(newOption) {
1559
1557
  var _a, _b;
1560
1558
  const currentValue = this.getSelectedOption(this.value);
1561
- if (((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString())) {
1559
+ if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
1560
+ || (currentValue == undefined && "value" in newOption)) {
1562
1561
  const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
1563
1562
  this.value = adjustedOpt;
1564
1563
  }
1565
1564
  else {
1566
- this.setInputValue();
1567
- this.hideOptions();
1568
- }
1569
- if (this.searchMode) {
1570
- this._visibleOptions = [];
1565
+ this.resetOptions();
1571
1566
  }
1572
1567
  if (this.searchMode) {
1573
1568
  this._visibleOptions = [];
1569
+ this.clearSource();
1574
1570
  }
1575
1571
  }
1576
1572
  loadOptions(mode, argument = "") {
@@ -1589,8 +1585,11 @@ const EzComboBox$1 = class extends HTMLElement$1 {
1589
1585
  this.selectOption(undefined);
1590
1586
  }
1591
1587
  else {
1592
- this.setInputValue();
1588
+ window.setTimeout(() => {
1589
+ this.setInputValue();
1590
+ }, this._deboucingTime);
1593
1591
  }
1592
+ this.resetOptions();
1594
1593
  }
1595
1594
  setInputValue(clearError = true) {
1596
1595
  const textValue = this.getText();
@@ -1605,8 +1604,9 @@ const EzComboBox$1 = class extends HTMLElement$1 {
1605
1604
  this.value = null;
1606
1605
  }
1607
1606
  controlListWithOnlyOne() {
1607
+ var _a;
1608
1608
  if (this.searchMode) {
1609
- const source = this._visibleOptions;
1609
+ const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
1610
1610
  if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
1611
1611
  this.selectOption(source[0]);
1612
1612
  }
@@ -1689,6 +1689,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
1689
1689
  var _a;
1690
1690
  return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
1691
1691
  }
1692
+ resetOptions() {
1693
+ this.hideOptions();
1694
+ this._criteria = undefined;
1695
+ this._preSelection = undefined;
1696
+ this.updateVisibleOptions();
1697
+ }
1692
1698
  //---------------------------------------------
1693
1699
  // Lifecycle web component
1694
1700
  //---------------------------------------------
@@ -1754,21 +1760,35 @@ const EzComboBox$1 = class extends HTMLElement$1 {
1754
1760
  this._textInput.value = event.data || argument;
1755
1761
  }
1756
1762
  this._criteria = argument;
1757
- if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
1763
+ if (argument) {
1758
1764
  if (this.searchMode) {
1759
- this._showLoading = true;
1765
+ this._showLoading = false;
1760
1766
  this.clearSource();
1761
- this._changeDeboucingTimeout = window.setTimeout(() => {
1762
- this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
1763
- }, this._deboucingTime);
1767
+ if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
1768
+ this._showLoading = true;
1769
+ this._changeDeboucingTimeout = window.setTimeout(() => {
1770
+ this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
1771
+ }, this._deboucingTime);
1772
+ this.showOptions();
1773
+ }
1774
+ else {
1775
+ this.hideOptions();
1776
+ }
1764
1777
  }
1765
1778
  else {
1766
1779
  this.updateVisibleOptions();
1780
+ this.showOptions();
1767
1781
  }
1768
- this.showOptions();
1769
1782
  }
1770
1783
  else {
1771
1784
  this.hideOptions();
1785
+ if (this.searchMode) {
1786
+ this._showLoading = false;
1787
+ this.clearSource();
1788
+ }
1789
+ else {
1790
+ this.updateVisibleOptions();
1791
+ }
1772
1792
  }
1773
1793
  }
1774
1794
  clearDeboucingTimeout() {
@@ -1827,10 +1847,14 @@ const EzComboBox$1 = class extends HTMLElement$1 {
1827
1847
  ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
1828
1848
  return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
1829
1849
  ? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
1830
- : undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("div", { class: "list-options", ref: elem => this._optionsList = elem }, this._visibleOptions.length === 0
1831
- && h("div", { class: "message" }, !this._showLoading && h("span", { class: "message__no-result" }, this._textEmptyList), this._showLoading && h("div", { class: "message__loading" })), this.showOptionValue
1850
+ : undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("div", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
1851
+ && this._visibleOptions.length === 0
1852
+ && h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
1853
+ && h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
1832
1854
  ? h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem })
1833
- : undefined, this._visibleOptions.length > 0 && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
1855
+ : undefined, !this._showLoading
1856
+ && this._visibleOptions.length > 0
1857
+ && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
1834
1858
  }
1835
1859
  get el() { return this; }
1836
1860
  static get watchers() { return {
@@ -158,10 +158,11 @@ const EzActionsButton = class {
158
158
  optionsTags.forEach((e) => {
159
159
  let label = e.innerText;
160
160
  let value = e.getAttribute("value");
161
+ let enabled = !(e.getAttribute("enabled") === "false");
161
162
  if (!value) {
162
163
  value = label;
163
164
  }
164
- this.actions.push({ label, value });
165
+ this.actions.push({ label, value, enabled });
165
166
  e.hidden = true;
166
167
  });
167
168
  }
@@ -194,7 +195,7 @@ const EzActionsButton = class {
194
195
  (this.isTransparent ? " ez-actions-button__arrow--upped" : "") }), h("div", { ref: elem => this._actionsList = elem, class: "ez-actions-button__actions-list" +
195
196
  (this.arrowActive && !this.isTransparent ? " ez-actions-button__actions-list--lowered" : "") }, this.actions.map(action => {
196
197
  var _a;
197
- return h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), class: "ez-actions-button__btn-action" +
198
+ return h("ez-button", { size: "small", label: action.label, onClick: () => this.actionClick(action), enabled: action.enabled, class: "ez-actions-button__btn-action" +
198
199
  (this.checkOption || this.hasIconName() ? " ez-actions-button__btn-action--spaced" : "") }, this.checkOption && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.value) === action.value &&
199
200
  h("ez-icon", { class: "ez-actions-button__icon-check", slot: "leftIcon", size: "small", iconName: "check" }), !this.checkOption && action.iconName &&
200
201
  h("ez-icon", { class: "ez-actions-button__icon-item", slot: "leftIcon", size: "small", iconName: action.iconName }));
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-c27164d3.js';
2
- import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { ObjectUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { A as ApplicationUtils } from './ApplicationUtils-79bf1d95.js';
4
4
  import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
5
5
  import './DialogType-54a62731.js';
@@ -60,10 +60,7 @@ const EzComboBox = class {
60
60
  const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
61
61
  this.ezChange.emit(valueEmitted);
62
62
  }
63
- this.hideOptions();
64
- this._criteria = undefined;
65
- this._preSelection = undefined;
66
- this.updateVisibleOptions();
63
+ this.resetOptions();
67
64
  }
68
65
  }
69
66
  /**
@@ -85,7 +82,7 @@ const EzComboBox = class {
85
82
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
86
83
  }
87
84
  isDifferentValues(firstValue, secondValue) {
88
- return JSON.stringify(firstValue || {}) !== JSON.stringify(secondValue || {});
85
+ return ObjectUtils.objectToString(firstValue || {}) !== ObjectUtils.objectToString(secondValue || {});
89
86
  }
90
87
  getFormattedText(currentValue) {
91
88
  if (currentValue == undefined) {
@@ -257,19 +254,17 @@ const EzComboBox = class {
257
254
  selectOption(newOption) {
258
255
  var _a, _b;
259
256
  const currentValue = this.getSelectedOption(this.value);
260
- if (((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString())) {
257
+ if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
258
+ || (currentValue == undefined && "value" in newOption)) {
261
259
  const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
262
260
  this.value = adjustedOpt;
263
261
  }
264
262
  else {
265
- this.setInputValue();
266
- this.hideOptions();
267
- }
268
- if (this.searchMode) {
269
- this._visibleOptions = [];
263
+ this.resetOptions();
270
264
  }
271
265
  if (this.searchMode) {
272
266
  this._visibleOptions = [];
267
+ this.clearSource();
273
268
  }
274
269
  }
275
270
  loadOptions(mode, argument = "") {
@@ -288,8 +283,11 @@ const EzComboBox = class {
288
283
  this.selectOption(undefined);
289
284
  }
290
285
  else {
291
- this.setInputValue();
286
+ window.setTimeout(() => {
287
+ this.setInputValue();
288
+ }, this._deboucingTime);
292
289
  }
290
+ this.resetOptions();
293
291
  }
294
292
  setInputValue(clearError = true) {
295
293
  const textValue = this.getText();
@@ -304,8 +302,9 @@ const EzComboBox = class {
304
302
  this.value = null;
305
303
  }
306
304
  controlListWithOnlyOne() {
305
+ var _a;
307
306
  if (this.searchMode) {
308
- const source = this._visibleOptions;
307
+ const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
309
308
  if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
310
309
  this.selectOption(source[0]);
311
310
  }
@@ -388,6 +387,12 @@ const EzComboBox = class {
388
387
  var _a;
389
388
  return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
390
389
  }
390
+ resetOptions() {
391
+ this.hideOptions();
392
+ this._criteria = undefined;
393
+ this._preSelection = undefined;
394
+ this.updateVisibleOptions();
395
+ }
391
396
  //---------------------------------------------
392
397
  // Lifecycle web component
393
398
  //---------------------------------------------
@@ -453,21 +458,35 @@ const EzComboBox = class {
453
458
  this._textInput.value = event.data || argument;
454
459
  }
455
460
  this._criteria = argument;
456
- if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
461
+ if (argument) {
457
462
  if (this.searchMode) {
458
- this._showLoading = true;
463
+ this._showLoading = false;
459
464
  this.clearSource();
460
- this._changeDeboucingTimeout = window.setTimeout(() => {
461
- this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
462
- }, this._deboucingTime);
465
+ if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
466
+ this._showLoading = true;
467
+ this._changeDeboucingTimeout = window.setTimeout(() => {
468
+ this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
469
+ }, this._deboucingTime);
470
+ this.showOptions();
471
+ }
472
+ else {
473
+ this.hideOptions();
474
+ }
463
475
  }
464
476
  else {
465
477
  this.updateVisibleOptions();
478
+ this.showOptions();
466
479
  }
467
- this.showOptions();
468
480
  }
469
481
  else {
470
482
  this.hideOptions();
483
+ if (this.searchMode) {
484
+ this._showLoading = false;
485
+ this.clearSource();
486
+ }
487
+ else {
488
+ this.updateVisibleOptions();
489
+ }
471
490
  }
472
491
  }
473
492
  clearDeboucingTimeout() {
@@ -526,10 +545,14 @@ const EzComboBox = class {
526
545
  ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
527
546
  return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
528
547
  ? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
529
- : undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("div", { class: "list-options", ref: elem => this._optionsList = elem }, this._visibleOptions.length === 0
530
- && h("div", { class: "message" }, !this._showLoading && h("span", { class: "message__no-result" }, this._textEmptyList), this._showLoading && h("div", { class: "message__loading" })), this.showOptionValue
548
+ : undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("div", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
549
+ && this._visibleOptions.length === 0
550
+ && h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
551
+ && h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
531
552
  ? h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem })
532
- : undefined, this._visibleOptions.length > 0 && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
553
+ : undefined, !this._showLoading
554
+ && this._visibleOptions.length > 0
555
+ && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
533
556
  }
534
557
  get el() { return getElement(this); }
535
558
  static get watchers() { return {
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-00ea9b50.js";export{s as setNonce}from"./p-00ea9b50.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-8f1a5e21",[[1,"ez-actions-button",{enabled:[516],actions:[1040],size:[513],showLabel:[516,"show-label"],displayIcon:[513,"display-icon"],checkOption:[516,"check-option"],value:[513],isTransparent:[516,"is-transparent"],arrowActive:[516,"arrow-active"],_selectedAction:[32],hideActions:[64],isOpened:[64]}]]],["p-51ecf138",[[1,"ez-breadcrumb",{items:[1040],fillMode:[1025,"fill-mode"],maxItems:[1026,"max-items"],positionEllipsis:[1026,"position-ellipsis"],visibleItems:[32],hiddenItems:[32],showDropdown:[32],collapseConfigPosition:[32]}]]],["p-bb0607a6",[[1,"ez-dialog",{confirm:[1028],dialogType:[1025,"dialog-type"],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],show:[64]}]]],["p-bf442859",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],config:[1040],serverUrl:[1,"server-url"],dataUnit:[16],statusResolver:[16],_paginationInfo:[32],_paginationChangedByKeyboard:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64],quickFilter:[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["p-7932f93d",[[6,"ez-modal-container",{modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],showTitleBar:[4,"show-title-bar"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],cancelButtonStatus:[1,"cancel-button-status"],okButtonStatus:[1,"ok-button-status"]}]]],["p-064e558f",[[1,"ez-alert",{alertType:[513,"alert-type"]}]]],["p-85c1e00f",[[1,"ez-chip",{label:[513],enabled:[516],removePosition:[513,"remove-position"],mode:[513],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-149442dd",[[1,"ez-file-item",{canRemove:[4,"can-remove"],fileName:[1,"file-name"],iconName:[1,"icon-name"],fileSize:[2,"file-size"],progress:[2]}]]],["p-a0e47238",[[0,"ez-application"]]],["p-216e1153",[[1,"ez-card-item",{item:[16]}]]],["p-74b3615b",[[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],clearHistory:[64],scrollToTop:[64],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-044a3427",[[1,"ez-loading-bar",{_showLoading:[32],hide:[64],show:[64]}]]],["p-1cfae451",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-bb011a51",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],innerElement:[1537,"inner-element"],overlayType:[513,"overlay-type"],updatePosition:[64],show:[64],hide:[64]}]]],["p-78b28632",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[516,"use-header"],heightMode:[513,"height-mode"],ezTitle:[1,"ez-title"]}]]],["p-936ae3ac",[[1,"ez-radio-button",{value:[1544],options:[1040],enabled:[516],label:[513],direction:[1537]}]]],["p-68acdc61",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-93c8bdc6",[[0,"ez-view-stack",{show:[64],getSelectedIndex:[64]}]]],["p-90c3d4fd",[[2,"ez-form-view",{fields:[16]}]]],["p-38520b9c",[[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32]}]]],["p-1806b3c6",[[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],errorMessage:[1537,"error-message"],mask:[1],canShowError:[516,"can-show-error"],restrict:[1],mode:[513],noBorder:[516,"no-border"],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-bfca509e",[[1,"ez-guide-navigator",{open:[1540],items:[16],tooltipResolver:[16],filterText:[32],disableItem:[64],enableItem:[64]}]]],["p-e6cf82e8",[[1,"ez-dropdown",{items:[1040],value:[1040],itemBuilder:[16]}]]],["p-d015295f",[[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],headerAlign:[513,"header-align"],removable:[516],editable:[516],conditionalSave:[16],_activeEditText:[32],showHide:[64],applyFocusTextEdit:[64],cancelEdition:[64]}]]],["p-e8271a0e",[[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressEmptyOption:[4,"suppress-empty-option"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-77d70bae",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-cd1e0679",[[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-124859c3",[[1,"ez-time-input",{label:[513],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-aaba630e",[[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-330aef41",[[1,"ez-check",{label:[513],value:[1540],enabled:[1540],indeterminate:[516],mode:[513],getMode:[64],setFocus:[64]}]]],["p-66dba09c",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],errorMessage:[1537,"error-message"],rows:[1538],canShowError:[516,"can-show-error"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-74379544",[[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64],setFocus:[64],setBlur:[64]}]]],["p-30afcb93",[[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressSearch:[4,"suppress-search"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],mode:[513],_preSelection:[32],_visibleOptions:[32],_startLoading:[32],_showLoading:[32],_criteria:[32],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-7ff5d0cc",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-ce1408dd",[[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}]]],["p-0e4ab096",[[1,"ez-filter-input",{label:[1],value:[1537],enabled:[4],errorMessage:[1537,"error-message"],restrict:[1],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}],[1,"ez-scroller",{direction:[1],locked:[4],activeShadow:[4,"active-shadow"],isActive:[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]],[1,"ez-sidebar-button"],[1,"ez-tree",{items:[1040],value:[1040],selectedId:[1537,"selected-id"],iconResolver:[16],tooltipResolver:[16],_tree:[32],_waintingForLoad:[32],selectItem:[64],openItem:[64],disableItem:[64],enableItem:[64],addChild:[64],applyFilter:[64]},[[2,"keydown","onKeyDownListener"]]]]],["p-80f79b1c",[[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-07d71b7a",[[1,"ez-text-edit",{value:[1],styled:[16],_newValue:[32],applyFocusSelect:[64]}]]],["p-1a1c2eda",[[2,"ez-form",{dataUnit:[1040],config:[16],recordsValidator:[16],multiLevel:[4,"multi-level"],levelResolver:[16],contentBuilder:[16],validate:[64]}]]]],e)));
1
+ import{p as e,b as o}from"./p-00ea9b50.js";export{s as setNonce}from"./p-00ea9b50.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-eae59101",[[1,"ez-actions-button",{enabled:[516],actions:[1040],size:[513],showLabel:[516,"show-label"],displayIcon:[513,"display-icon"],checkOption:[516,"check-option"],value:[513],isTransparent:[516,"is-transparent"],arrowActive:[516,"arrow-active"],_selectedAction:[32],hideActions:[64],isOpened:[64]}]]],["p-51ecf138",[[1,"ez-breadcrumb",{items:[1040],fillMode:[1025,"fill-mode"],maxItems:[1026,"max-items"],positionEllipsis:[1026,"position-ellipsis"],visibleItems:[32],hiddenItems:[32],showDropdown:[32],collapseConfigPosition:[32]}]]],["p-bb0607a6",[[1,"ez-dialog",{confirm:[1028],dialogType:[1025,"dialog-type"],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],show:[64]}]]],["p-bf442859",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],config:[1040],serverUrl:[1,"server-url"],dataUnit:[16],statusResolver:[16],_paginationInfo:[32],_paginationChangedByKeyboard:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64],quickFilter:[64]},[[0,"ezSelectionChange","onSelectionChange"]]]]],["p-7932f93d",[[6,"ez-modal-container",{modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],showTitleBar:[4,"show-title-bar"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],cancelButtonStatus:[1,"cancel-button-status"],okButtonStatus:[1,"ok-button-status"]}]]],["p-064e558f",[[1,"ez-alert",{alertType:[513,"alert-type"]}]]],["p-85c1e00f",[[1,"ez-chip",{label:[513],enabled:[516],removePosition:[513,"remove-position"],mode:[513],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-149442dd",[[1,"ez-file-item",{canRemove:[4,"can-remove"],fileName:[1,"file-name"],iconName:[1,"icon-name"],fileSize:[2,"file-size"],progress:[2]}]]],["p-a0e47238",[[0,"ez-application"]]],["p-216e1153",[[1,"ez-card-item",{item:[16]}]]],["p-74b3615b",[[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],clearHistory:[64],scrollToTop:[64],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-044a3427",[[1,"ez-loading-bar",{_showLoading:[32],hide:[64],show:[64]}]]],["p-1cfae451",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-bb011a51",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],innerElement:[1537,"inner-element"],overlayType:[513,"overlay-type"],updatePosition:[64],show:[64],hide:[64]}]]],["p-78b28632",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[516,"use-header"],heightMode:[513,"height-mode"],ezTitle:[1,"ez-title"]}]]],["p-936ae3ac",[[1,"ez-radio-button",{value:[1544],options:[1040],enabled:[516],label:[513],direction:[1537]}]]],["p-68acdc61",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-93c8bdc6",[[0,"ez-view-stack",{show:[64],getSelectedIndex:[64]}]]],["p-90c3d4fd",[[2,"ez-form-view",{fields:[16]}]]],["p-38520b9c",[[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32]}]]],["p-1806b3c6",[[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],errorMessage:[1537,"error-message"],mask:[1],canShowError:[516,"can-show-error"],restrict:[1],mode:[513],noBorder:[516,"no-border"],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-bfca509e",[[1,"ez-guide-navigator",{open:[1540],items:[16],tooltipResolver:[16],filterText:[32],disableItem:[64],enableItem:[64]}]]],["p-e6cf82e8",[[1,"ez-dropdown",{items:[1040],value:[1040],itemBuilder:[16]}]]],["p-d015295f",[[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],headerAlign:[513,"header-align"],removable:[516],editable:[516],conditionalSave:[16],_activeEditText:[32],showHide:[64],applyFocusTextEdit:[64],cancelEdition:[64]}]]],["p-e8271a0e",[[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressEmptyOption:[4,"suppress-empty-option"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-77d70bae",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-cd1e0679",[[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-124859c3",[[1,"ez-time-input",{label:[513],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-aaba630e",[[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-330aef41",[[1,"ez-check",{label:[513],value:[1540],enabled:[1540],indeterminate:[516],mode:[513],getMode:[64],setFocus:[64]}]]],["p-66dba09c",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],errorMessage:[1537,"error-message"],rows:[1538],canShowError:[516,"can-show-error"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-74379544",[[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64],setFocus:[64],setBlur:[64]}]]],["p-5473e08d",[[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressSearch:[4,"suppress-search"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],mode:[513],_preSelection:[32],_visibleOptions:[32],_startLoading:[32],_showLoading:[32],_criteria:[32],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-7ff5d0cc",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-ce1408dd",[[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}]]],["p-0e4ab096",[[1,"ez-filter-input",{label:[1],value:[1537],enabled:[4],errorMessage:[1537,"error-message"],restrict:[1],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}],[1,"ez-scroller",{direction:[1],locked:[4],activeShadow:[4,"active-shadow"],isActive:[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]],[1,"ez-sidebar-button"],[1,"ez-tree",{items:[1040],value:[1040],selectedId:[1537,"selected-id"],iconResolver:[16],tooltipResolver:[16],_tree:[32],_waintingForLoad:[32],selectItem:[64],openItem:[64],disableItem:[64],enableItem:[64],addChild:[64],applyFilter:[64]},[[2,"keydown","onKeyDownListener"]]]]],["p-80f79b1c",[[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-07d71b7a",[[1,"ez-text-edit",{value:[1],styled:[16],_newValue:[32],applyFocusSelect:[64]}]]],["p-1a1c2eda",[[2,"ez-form",{dataUnit:[1040],config:[16],recordsValidator:[16],multiLevel:[4,"multi-level"],levelResolver:[16],contentBuilder:[16],validate:[64]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r as o,c as i,h as t,H as s,g as e}from"./p-00ea9b50.js";import{ObjectUtils as r,FloatingManager as l,ElementIDUtils as a}from"@sankhyalabs/core";import{A as h}from"./p-efb43dd8.js";import{C as n}from"./p-4a5e37a7.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{R as c}from"./p-3f4ae3a3.js";const b=class{constructor(t){o(this,t),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._textEmptySearch="Nenhum resultado de {0} encontrado",this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.searchMode=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.canShowError=!0,this.mode="regular"}observeErrorMessage(){var o;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(o=this.errorMessage)||void 0===o?void 0:o.trim())||this.setInputValue())}observeValue(o,i){if(this._textInput&&o!=i){const t=this.getSelectedOption(o),s=this.getSelectedOption(i),e=this.getSelectedOption(this.value);this.isDifferentValues(e,t)&&(this.value=t),this.isDifferentValues(t,s)&&(this.setInputValue(),this.ezChange.emit(null===t?void 0:t)),this.resetOptions()}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}isDifferentValues(o,i){return r.objectToString(o||{})!==r.objectToString(i||{})}getFormattedText(o){if(null!=o){if(!this.showSelectedValue||null==o.value)return o.label;if(o.label)return`${o.value} - ${o.label}`}}getText(){const o=this.getSelectedOption(this.value),i=this.getFormattedText(o);if(null!=i)return String(i).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')}getSelectedOption(o){return"string"==typeof o||o instanceof String?this._visibleOptions.find((i=>i.value===o)):o}updateVisibleOptions(){let o=this._source||[];if(!this.searchMode&&this._criteria){const i=this._criteria.toUpperCase();o=o.filter((o=>o.label.toLocaleUpperCase().indexOf(i)>-1))}this._visibleOptions=this.suppressEmptyOption?o:[{value:void 0,label:""}].concat(o),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var o;if(this.showOptionValue){const i=[];return null===(o=this._visibleOptions)||void 0===o||o.forEach((o=>{const t=this.getWidthValue(o.value);i.includes(t)||i.push(t)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(o){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=o)return i.innerHTML=o,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}buildItem(o,i){const s=this.showOptionValue&&this._maxWidthValue>0?`${this._maxWidthValue}px`:"";return o.label=o.label||(o.value?`<SEM ${this.getFieldLabel()}>`:""),t("li",{class:i===this._preSelection?"item preselected":"item",id:`item_${o.value}`,onMouseDown:()=>this.selectOption(o),onMouseOver:()=>this._preSelection=i},this.showOptionValue?t("span",{class:"item__value",title:o.value,style:{width:s,minWidth:s,maxWidth:s}},o.value):void 0,t("span",{class:"item__label "+(this.showOptionValue?"item__label--bold":""),title:o.label},o.label))}showOptions(){this.enabled&&(this._floatingID=l.float(this._listWrapper,this._listContainer,{autoClose:!0,top:this.errorMessage||!this.canShowError||"slim"===this.mode?"6px":"-13px"}),this.setFocus(),window.requestAnimationFrame((()=>{this._listWrapper.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&l.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&l.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(o,i){window.requestAnimationFrame((()=>{const t=(null==o?void 0:o.value)?this._optionsList.querySelector(`li#item_${o.value}`):void 0;if(t){const o=t.parentElement,s=o.getBoundingClientRect(),e=t.getBoundingClientRect();i&&e.bottom>s.bottom?o.scrollTop=e.height*(this._preSelection-3):!i&&e.top<s.top&&(o.scrollTop=e.height*this._preSelection)}}))}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(o){this._startLoading=!1,o instanceof Promise?(this._showLoading=!0,o.then((o=>{this._showLoading=!1,this.updateSource(o)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(o)?(this._source=o,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch())):this.selectOption(o))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(o){var i,t;const s=this.getSelectedOption(this.value);(null===(i=null==s?void 0:s.value)||void 0===i?void 0:i.toString())!==(null===(t=null==o?void 0:o.value)||void 0===t?void 0:t.toString())||null==s&&"value"in o?this.value=(null==o?void 0:o.value)?o:void 0:this.resetOptions(),this.searchMode&&(this._visibleOptions=[],this.clearSource())}loadOptions(o,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:o,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.value?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue()}),this._deboucingTime),this.resetOptions()}setInputValue(o=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,o&&(this.errorMessage=null))}clearSearch(){this.value=null}controlListWithOnlyOne(){var o;if(this.searchMode){const i=null===(o=this._visibleOptions)||void 0===o?void 0:o.filter((o=>""!==o.label&&null!=o.value));1===(null==i?void 0:i.length)&&this.selectOption(i[0])}}controlEmptySearch(){var o;this.searchMode&&((null===(o=this._visibleOptions)||void 0===o?void 0:o.length)?this.controlListWithOnlyOne():(this.clearSearch(),h.info(this._textEmptyList)))}validateDescriptionValue(){if(!this.searchMode||"object"!=typeof this.value)return;const{label:o,value:i}=this.value||{};o||null==i||this.loadDescriptionValue(i)}async loadDescriptionValue(o){var i,t;if(null==o)return;if((null===(i=this.options)||void 0===i?void 0:i.length)>0)return void this.loadOptionValue(o);const s={mode:d.PREDICTIVE,argument:o},e=await(null===(t=this.optionLoader)||void 0===t?void 0:t.call(this,s));null!=e&&(e instanceof Promise?e.then((o=>{this.setDescriptionValue(o)})):this.setDescriptionValue(e))}setDescriptionValue(o){const i=(null==o?void 0:o[0])||o;null!=i&&Object.keys(i).length?(i.label||(i.label=`<SEM ${this.getFieldLabel()}>`),this.value=i):this.showNoResultMessage()}loadOptionValue(o){var i;const t=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===o));null!=t?this.selectOption(t):this.showNoResultMessage()}async showNoResultMessage(){this.clearSearch(),h.info(this._textEmptySearch.replace("{0}",this.getFieldLabel()))}getFieldLabel(){var o;return null===(o=this.label)||void 0===o?void 0:o.replace(c,"").toUpperCase()}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}componentWillLoad(){if(void 0===this.options){this.options=[];const o=this.el.querySelectorAll("option");o&&o.forEach((o=>{let i=o.innerText,t=o.getAttribute("value");t||(t=i),this.options.push({label:i,value:t}),o.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions(d.PRELOAD)}componentDidRender(){var o;void 0===this._floatingID&&this._listWrapper.remove(),null===(o=this._optionsList)||void 0===o||o.querySelectorAll(".item").forEach((o=>{a.addIDInfoIfNotExists(o,"itemComboBox")}))}componentDidLoad(){n.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1)}componentShouldUpdate(o,i){this.isDifferentValues(o,i)&&this.validateDescriptionValue()}handlerIconClick(){this.searchMode?this.loadOptions(d.ADVANCED):this.showOptions()}onTextInputChangeHandler(o){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(o)}),this._deboucingTime));const t=null===(i=o.target.value)||void 0===i?void 0:i.trim(),s=Number(t||void 0);this._criteria||(this._textInput.value=o.data||t),this._criteria=t,t?this.searchMode?(this._showLoading=!1,this.clearSource(),!isNaN(s)||t.length>=this._limitCharsToSearch?(this._showLoading=!0,this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(d.PREDICTIVE,isNaN(s)?t:s.toString())}),this._deboucingTime),this.showOptions()):this.hideOptions()):(this.updateVisibleOptions(),this.showOptions()):(this.hideOptions(),this.searchMode?(this._showLoading=!1,this.clearSource()):this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(o){switch(this._tabPressed=!1,o.ctrlKey&&("f"!==o.key&&"F"!==o.key||(this.loadOptions(d.ADVANCED),o.stopPropagation(),o.stopImmediatePropagation(),o.preventDefault())),o.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne()}}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){var o;return a.addIDInfoIfNotExists(this.el,"input"),t(s,null,t("ez-text-input",{"data-element-id":a.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:o=>this._textInput=o,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:o=>this.onTextInputChangeHandler(o),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:o=>this.keyDownHandler(o),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},t("button",{class:"btn",slot:this.searchMode?"leftIcon":"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},t("ez-icon",{iconName:this.searchMode?"search":"chevron-down"})),this.searchMode&&(null===(o=this._textInput)||void 0===o?void 0:o.value)&&(this._criteria||this.value)?t("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},t("ez-icon",{iconName:"close"})):void 0),t("section",{class:"list-container",ref:o=>this._listContainer=o},t("div",{class:"list-wrapper",ref:o=>this._listWrapper=o},t("div",{class:"list-options",ref:o=>this._optionsList=o},!this._showLoading&&0===this._visibleOptions.length&&t("div",{class:"message"},t("span",{class:"message__no-result"},this._textEmptyList)),this._showLoading&&t("div",{class:"message"},t("div",{class:"message__loading"})),this.showOptionValue?t("span",{class:"item__value item__value--hidden",ref:o=>this._itemValueBasis=o}):void 0,!this._showLoading&&this._visibleOptions.length>0&&this._visibleOptions.map(((o,i)=>this.buildItem(o,i)))))))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"]}}};var d;!function(o){o.ADVANCED="ADVANCED",o.PRELOAD="PRELOAD",o.PREDICTIVE="PREDICTIVE"}(d||(d={})),b.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--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__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__input--error--border-color:#CC2936;--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);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--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);display:flex;flex-wrap:wrap;position:relative;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)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;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, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;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)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;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}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{b as ez_combo_box}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as o,H as n,g as s}from"./p-00ea9b50.js";import{FloatingManager as a,ElementIDUtils as e}from"@sankhyalabs/core";import"./p-efb43dd8.js";import{C as r}from"./p-4a5e37a7.js";import"./p-ab574d59.js";import"./p-b853763b.js";const c=class{constructor(o){t(this,o),this.ezAction=i(this,"ezAction",7),this._arrowOffset=5,this.innerClickCheck=(t,i)=>{var o;if(i&&t){if(i===t)return!0;const n=t.children;for(let t=0;t<n.length;t++)if(null===(o=n[t].shadowRoot)||void 0===o?void 0:o.contains(i))return!0}return!1},this._selectedAction=void 0,this.enabled=!0,this.actions=void 0,this.size="medium",this.showLabel=!1,this.displayIcon=void 0,this.checkOption=!1,this.value=void 0,this.isTransparent=!1,this.arrowActive=!1}async hideActions(){null!=this._floatingID&&a.close(this._floatingID),this._floatingID=void 0}async isOpened(){return null!=this._floatingID}getFloatOptions(){return{autoClose:!0,innerClickTest:this.innerClickCheck,isFixed:!0,top:this.getPositionTop(),left:this.getPositionLeft()}}getSideLimit(){var t;const i=document.body.clientWidth,o=null===(t=this._actionsList)||void 0===t?void 0:t.getBoundingClientRect();if((null==o?void 0:o.right)>i)return i-o.width+"px"}showActions(){if(!this.enabled)return;const t=this.getFloatOptions();this._floatingID=a.float(this._actionsList,this._listContainer,t);const i=this.getSideLimit();null!=i&&(t.left=i,a.updateFloatPosition(this._actionsList,this._listContainer,t)),window.requestAnimationFrame((()=>{this._actionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}))}updatePosition(){if(!this.enabled||null==this._floatingID)return;const t=this.getFloatOptions(),i=this.getSideLimit();null!=i&&(t.left=i),a.updateFloatPosition(this._actionsList,this._listContainer,t)}getPositionTop(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.y+i.height+"px"}getBoundingLeft(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.x-(this.arrowActive?this._arrowOffset:0)+"px"}getPositionLeft(){return this.getBoundingLeft()||(this.arrowActive?`-${this._arrowOffset}px`:null)}hasLabelOrCheckOption(){var t;return(this.showLabel||this.checkOption)&&(null===(t=this.actions)||void 0===t?void 0:t.length)>0}hasIconName(){var t;return null===(t=this.actions)||void 0===t?void 0:t.some((t=>null!=t.iconName))}controlScrollPage(){window.removeEventListener("scroll",this.updatePosition.bind(this)),window.addEventListener("scroll",this.updatePosition.bind(this))}handlerButtonClick(){this.showActions()}actionClick(t){this._selectedAction=t,this.hideActions(),this.ezAction.emit(t)}componentWillLoad(){if(null==this.actions){this.actions=[];const t=this._element.querySelectorAll("action");t&&t.forEach((t=>{let i=t.innerText,o=t.getAttribute("value"),n=!("false"===t.getAttribute("enabled"));o||(o=i),this.actions.push({label:i,value:o,enabled:n}),t.hidden=!0}))}}componentDidLoad(){r.applyVarsButton(this._element,this._button),e.addIDInfo(this._element),this.controlScrollPage()}componentDidRender(){null==this._floatingID&&this._actionsList.remove(),this.hasLabelOrCheckOption()&&(this.value?this._selectedAction=this.actions.find((t=>t.value===this.value)):this._selectedAction||(this._selectedAction=this.actions[0]))}render(){var t;return o(n,null,o("ez-button",{ref:t=>this._button=t,class:(this.isTransparent?"ez-actions-button__btn-transparent":"")+(this.showLabel?" ez-actions-button__btn-label":""),label:this.showLabel&&(null===(t=this._selectedAction)||void 0===t?void 0:t.label),enabled:this.enabled,mode:this.showLabel?void 0:"icon",iconName:this.showLabel?"":this.displayIcon||"dots-vertical",size:this.size,onClick:()=>this.handlerButtonClick()},this.showLabel&&o("ez-icon",{class:"ez-actions-button__icon-right",slot:"rightIcon",iconName:this.displayIcon||"dots-vertical"})),o("section",{class:"ez-actions-button__list-container",ref:t=>this._listContainer=t},this.arrowActive&&o("div",{class:"ez-actions-button__arrow ez-actions-button__arrow--"+(this.size||"small")+(this.isTransparent?" ez-actions-button__arrow--upped":"")}),o("div",{ref:t=>this._actionsList=t,class:"ez-actions-button__actions-list"+(this.arrowActive&&!this.isTransparent?" ez-actions-button__actions-list--lowered":"")},this.actions.map((t=>{var i;return o("ez-button",{size:"small",label:t.label,onClick:()=>this.actionClick(t),enabled:t.enabled,class:"ez-actions-button__btn-action"+(this.checkOption||this.hasIconName()?" ez-actions-button__btn-action--spaced":"")},this.checkOption&&(null===(i=this._selectedAction)||void 0===i?void 0:i.value)===t.value&&o("ez-icon",{class:"ez-actions-button__icon-check",slot:"leftIcon",size:"small",iconName:"check"}),!this.checkOption&&t.iconName&&o("ez-icon",{class:"ez-actions-button__icon-item",slot:"leftIcon",size:"small",iconName:t.iconName}))})))))}get _element(){return s(this)}};c.style=":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__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;z-index:var(--more-visible, 2);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--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(--more-visible, 2) + 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}";export{c as ez_actions_button}
@@ -77,5 +77,6 @@ export declare class EzActionsButton {
77
77
  export interface IAction {
78
78
  value: string;
79
79
  label: string;
80
+ enabled?: boolean;
80
81
  iconName?: string;
81
82
  }
@@ -121,6 +121,7 @@ export declare class EzComboBox {
121
121
  private loadOptionValue;
122
122
  private showNoResultMessage;
123
123
  private getFieldLabel;
124
+ private resetOptions;
124
125
  componentWillLoad(): void;
125
126
  componentDidRender(): void;
126
127
  componentDidLoad(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/ezui",
3
- "version": "3.1.6",
3
+ "version": "3.2.0",
4
4
  "description": "Biblioteca de componentes Sankhya.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1 +0,0 @@
1
- import{r as o,c as i,h as t,H as e,g as s}from"./p-00ea9b50.js";import{FloatingManager as r,ElementIDUtils as l}from"@sankhyalabs/core";import{A as a}from"./p-efb43dd8.js";import{C as h}from"./p-4a5e37a7.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{R as n}from"./p-3f4ae3a3.js";const c=class{constructor(t){o(this,t),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._textEmptySearch="Nenhum resultado de {0} encontrado",this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.searchMode=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.canShowError=!0,this.mode="regular"}observeErrorMessage(){var o;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(o=this.errorMessage)||void 0===o?void 0:o.trim())||this.setInputValue())}observeValue(o,i){if(this._textInput&&o!=i){const t=this.getSelectedOption(o),e=this.getSelectedOption(i),s=this.getSelectedOption(this.value);this.isDifferentValues(s,t)&&(this.value=t),this.isDifferentValues(t,e)&&(this.setInputValue(),this.ezChange.emit(null===t?void 0:t)),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}isDifferentValues(o,i){return JSON.stringify(o||{})!==JSON.stringify(i||{})}getFormattedText(o){if(null!=o){if(!this.showSelectedValue||null==o.value)return o.label;if(o.label)return`${o.value} - ${o.label}`}}getText(){const o=this.getSelectedOption(this.value),i=this.getFormattedText(o);if(null!=i)return String(i).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')}getSelectedOption(o){return"string"==typeof o||o instanceof String?this._visibleOptions.find((i=>i.value===o)):o}updateVisibleOptions(){let o=this._source||[];if(!this.searchMode&&this._criteria){const i=this._criteria.toUpperCase();o=o.filter((o=>o.label.toLocaleUpperCase().indexOf(i)>-1))}this._visibleOptions=this.suppressEmptyOption?o:[{value:void 0,label:""}].concat(o),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var o;if(this.showOptionValue){const i=[];return null===(o=this._visibleOptions)||void 0===o||o.forEach((o=>{const t=this.getWidthValue(o.value);i.includes(t)||i.push(t)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(o){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=o)return i.innerHTML=o,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}buildItem(o,i){const e=this.showOptionValue&&this._maxWidthValue>0?`${this._maxWidthValue}px`:"";return o.label=o.label||(o.value?`<SEM ${this.getFieldLabel()}>`:""),t("li",{class:i===this._preSelection?"item preselected":"item",id:`item_${o.value}`,onMouseDown:()=>this.selectOption(o),onMouseOver:()=>this._preSelection=i},this.showOptionValue?t("span",{class:"item__value",title:o.value,style:{width:e,minWidth:e,maxWidth:e}},o.value):void 0,t("span",{class:"item__label "+(this.showOptionValue?"item__label--bold":""),title:o.label},o.label))}showOptions(){this.enabled&&(this._floatingID=r.float(this._listWrapper,this._listContainer,{autoClose:!0,top:this.errorMessage||!this.canShowError||"slim"===this.mode?"6px":"-13px"}),this.setFocus(),window.requestAnimationFrame((()=>{this._listWrapper.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&r.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&r.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(o,i){window.requestAnimationFrame((()=>{const t=(null==o?void 0:o.value)?this._optionsList.querySelector(`li#item_${o.value}`):void 0;if(t){const o=t.parentElement,e=o.getBoundingClientRect(),s=t.getBoundingClientRect();i&&s.bottom>e.bottom?o.scrollTop=s.height*(this._preSelection-3):!i&&s.top<e.top&&(o.scrollTop=s.height*this._preSelection)}}))}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(o){this._startLoading=!1,o instanceof Promise?(this._showLoading=!0,o.then((o=>{this._showLoading=!1,this.updateSource(o)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(o)?(this._source=o,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch())):this.selectOption(o))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(o){var i,t;const e=this.getSelectedOption(this.value);(null===(i=null==e?void 0:e.value)||void 0===i?void 0:i.toString())!==(null===(t=null==o?void 0:o.value)||void 0===t?void 0:t.toString())?this.value=(null==o?void 0:o.value)?o:void 0:(this.setInputValue(),this.hideOptions()),this.searchMode&&(this._visibleOptions=[]),this.searchMode&&(this._visibleOptions=[])}loadOptions(o,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:o,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.value?this.selectOption(void 0):this.setInputValue()}setInputValue(o=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,o&&(this.errorMessage=null))}clearSearch(){this.value=null}controlListWithOnlyOne(){if(this.searchMode){const o=this._visibleOptions;1===(null==o?void 0:o.length)&&this.selectOption(o[0])}}controlEmptySearch(){var o;this.searchMode&&((null===(o=this._visibleOptions)||void 0===o?void 0:o.length)?this.controlListWithOnlyOne():(this.clearSearch(),a.info(this._textEmptyList)))}validateDescriptionValue(){if(!this.searchMode||"object"!=typeof this.value)return;const{label:o,value:i}=this.value||{};o||null==i||this.loadDescriptionValue(i)}async loadDescriptionValue(o){var i,t;if(null==o)return;if((null===(i=this.options)||void 0===i?void 0:i.length)>0)return void this.loadOptionValue(o);const e={mode:b.PREDICTIVE,argument:o},s=await(null===(t=this.optionLoader)||void 0===t?void 0:t.call(this,e));null!=s&&(s instanceof Promise?s.then((o=>{this.setDescriptionValue(o)})):this.setDescriptionValue(s))}setDescriptionValue(o){const i=(null==o?void 0:o[0])||o;null!=i&&Object.keys(i).length?(i.label||(i.label=`<SEM ${this.getFieldLabel()}>`),this.value=i):this.showNoResultMessage()}loadOptionValue(o){var i;const t=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===o));null!=t?this.selectOption(t):this.showNoResultMessage()}async showNoResultMessage(){this.clearSearch(),a.info(this._textEmptySearch.replace("{0}",this.getFieldLabel()))}getFieldLabel(){var o;return null===(o=this.label)||void 0===o?void 0:o.replace(n,"").toUpperCase()}componentWillLoad(){if(void 0===this.options){this.options=[];const o=this.el.querySelectorAll("option");o&&o.forEach((o=>{let i=o.innerText,t=o.getAttribute("value");t||(t=i),this.options.push({label:i,value:t}),o.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions(b.PRELOAD)}componentDidRender(){var o;void 0===this._floatingID&&this._listWrapper.remove(),null===(o=this._optionsList)||void 0===o||o.querySelectorAll(".item").forEach((o=>{l.addIDInfoIfNotExists(o,"itemComboBox")}))}componentDidLoad(){h.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1)}componentShouldUpdate(o,i){this.isDifferentValues(o,i)&&this.validateDescriptionValue()}handlerIconClick(){this.searchMode?this.loadOptions(b.ADVANCED):this.showOptions()}onTextInputChangeHandler(o){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(o)}),this._deboucingTime));const t=null===(i=o.target.value)||void 0===i?void 0:i.trim(),e=Number(t||void 0);this._criteria||(this._textInput.value=o.data||t),this._criteria=t,t&&(!isNaN(e)||t.length>=this._limitCharsToSearch)?(this.searchMode?(this._showLoading=!0,this.clearSource(),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(b.PREDICTIVE,isNaN(e)?t:e.toString())}),this._deboucingTime)):this.updateVisibleOptions(),this.showOptions()):this.hideOptions()}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(o){switch(this._tabPressed=!1,o.ctrlKey&&("f"!==o.key&&"F"!==o.key||(this.loadOptions(b.ADVANCED),o.stopPropagation(),o.stopImmediatePropagation(),o.preventDefault())),o.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne()}}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){var o;return l.addIDInfoIfNotExists(this.el,"input"),t(e,null,t("ez-text-input",{"data-element-id":l.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:o=>this._textInput=o,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:o=>this.onTextInputChangeHandler(o),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:o=>this.keyDownHandler(o),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},t("button",{class:"btn",slot:this.searchMode?"leftIcon":"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},t("ez-icon",{iconName:this.searchMode?"search":"chevron-down"})),this.searchMode&&(null===(o=this._textInput)||void 0===o?void 0:o.value)&&(this._criteria||this.value)?t("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},t("ez-icon",{iconName:"close"})):void 0),t("section",{class:"list-container",ref:o=>this._listContainer=o},t("div",{class:"list-wrapper",ref:o=>this._listWrapper=o},t("div",{class:"list-options",ref:o=>this._optionsList=o},0===this._visibleOptions.length&&t("div",{class:"message"},!this._showLoading&&t("span",{class:"message__no-result"},this._textEmptyList),this._showLoading&&t("div",{class:"message__loading"})),this.showOptionValue?t("span",{class:"item__value item__value--hidden",ref:o=>this._itemValueBasis=o}):void 0,this._visibleOptions.length>0&&this._visibleOptions.map(((o,i)=>this.buildItem(o,i)))))))}get el(){return s(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"]}}};var b;!function(o){o.ADVANCED="ADVANCED",o.PRELOAD="PRELOAD",o.PREDICTIVE="PREDICTIVE"}(b||(b={})),c.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--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__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__input--error--border-color:#CC2936;--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);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--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);display:flex;flex-wrap:wrap;position:relative;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)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;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, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;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)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;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}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{c as ez_combo_box}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as o,H as n,g as s}from"./p-00ea9b50.js";import{FloatingManager as a,ElementIDUtils as e}from"@sankhyalabs/core";import"./p-efb43dd8.js";import{C as r}from"./p-4a5e37a7.js";import"./p-ab574d59.js";import"./p-b853763b.js";const c=class{constructor(o){t(this,o),this.ezAction=i(this,"ezAction",7),this._arrowOffset=5,this.innerClickCheck=(t,i)=>{var o;if(i&&t){if(i===t)return!0;const n=t.children;for(let t=0;t<n.length;t++)if(null===(o=n[t].shadowRoot)||void 0===o?void 0:o.contains(i))return!0}return!1},this._selectedAction=void 0,this.enabled=!0,this.actions=void 0,this.size="medium",this.showLabel=!1,this.displayIcon=void 0,this.checkOption=!1,this.value=void 0,this.isTransparent=!1,this.arrowActive=!1}async hideActions(){null!=this._floatingID&&a.close(this._floatingID),this._floatingID=void 0}async isOpened(){return null!=this._floatingID}getFloatOptions(){return{autoClose:!0,innerClickTest:this.innerClickCheck,isFixed:!0,top:this.getPositionTop(),left:this.getPositionLeft()}}getSideLimit(){var t;const i=document.body.clientWidth,o=null===(t=this._actionsList)||void 0===t?void 0:t.getBoundingClientRect();if((null==o?void 0:o.right)>i)return i-o.width+"px"}showActions(){if(!this.enabled)return;const t=this.getFloatOptions();this._floatingID=a.float(this._actionsList,this._listContainer,t);const i=this.getSideLimit();null!=i&&(t.left=i,a.updateFloatPosition(this._actionsList,this._listContainer,t)),window.requestAnimationFrame((()=>{this._actionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}))}updatePosition(){if(!this.enabled||null==this._floatingID)return;const t=this.getFloatOptions(),i=this.getSideLimit();null!=i&&(t.left=i),a.updateFloatPosition(this._actionsList,this._listContainer,t)}getPositionTop(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.y+i.height+"px"}getBoundingLeft(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.x-(this.arrowActive?this._arrowOffset:0)+"px"}getPositionLeft(){return this.getBoundingLeft()||(this.arrowActive?`-${this._arrowOffset}px`:null)}hasLabelOrCheckOption(){var t;return(this.showLabel||this.checkOption)&&(null===(t=this.actions)||void 0===t?void 0:t.length)>0}hasIconName(){var t;return null===(t=this.actions)||void 0===t?void 0:t.some((t=>null!=t.iconName))}controlScrollPage(){window.removeEventListener("scroll",this.updatePosition.bind(this)),window.addEventListener("scroll",this.updatePosition.bind(this))}handlerButtonClick(){this.showActions()}actionClick(t){this._selectedAction=t,this.hideActions(),this.ezAction.emit(t)}componentWillLoad(){if(null==this.actions){this.actions=[];const t=this._element.querySelectorAll("action");t&&t.forEach((t=>{let i=t.innerText,o=t.getAttribute("value");o||(o=i),this.actions.push({label:i,value:o}),t.hidden=!0}))}}componentDidLoad(){r.applyVarsButton(this._element,this._button),e.addIDInfo(this._element),this.controlScrollPage()}componentDidRender(){null==this._floatingID&&this._actionsList.remove(),this.hasLabelOrCheckOption()&&(this.value?this._selectedAction=this.actions.find((t=>t.value===this.value)):this._selectedAction||(this._selectedAction=this.actions[0]))}render(){var t;return o(n,null,o("ez-button",{ref:t=>this._button=t,class:(this.isTransparent?"ez-actions-button__btn-transparent":"")+(this.showLabel?" ez-actions-button__btn-label":""),label:this.showLabel&&(null===(t=this._selectedAction)||void 0===t?void 0:t.label),enabled:this.enabled,mode:this.showLabel?void 0:"icon",iconName:this.showLabel?"":this.displayIcon||"dots-vertical",size:this.size,onClick:()=>this.handlerButtonClick()},this.showLabel&&o("ez-icon",{class:"ez-actions-button__icon-right",slot:"rightIcon",iconName:this.displayIcon||"dots-vertical"})),o("section",{class:"ez-actions-button__list-container",ref:t=>this._listContainer=t},this.arrowActive&&o("div",{class:"ez-actions-button__arrow ez-actions-button__arrow--"+(this.size||"small")+(this.isTransparent?" ez-actions-button__arrow--upped":"")}),o("div",{ref:t=>this._actionsList=t,class:"ez-actions-button__actions-list"+(this.arrowActive&&!this.isTransparent?" ez-actions-button__actions-list--lowered":"")},this.actions.map((t=>{var i;return o("ez-button",{size:"small",label:t.label,onClick:()=>this.actionClick(t),class:"ez-actions-button__btn-action"+(this.checkOption||this.hasIconName()?" ez-actions-button__btn-action--spaced":"")},this.checkOption&&(null===(i=this._selectedAction)||void 0===i?void 0:i.value)===t.value&&o("ez-icon",{class:"ez-actions-button__icon-check",slot:"leftIcon",size:"small",iconName:"check"}),!this.checkOption&&t.iconName&&o("ez-icon",{class:"ez-actions-button__icon-item",slot:"leftIcon",size:"small",iconName:t.iconName}))})))))}get _element(){return s(this)}};c.style=":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__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;z-index:var(--more-visible, 2);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--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(--more-visible, 2) + 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}";export{c as ez_actions_button}