@sankhyalabs/ezui 5.21.2 → 5.22.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dist/cjs/ICustomRender-6fafffce.js +13 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -0
  3. package/dist/cjs/ez-chart.cjs.entry.js +435 -0
  4. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -0
  5. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -0
  6. package/dist/cjs/{ez-text-edit.cjs.entry.js → ez-custom-form-input_2.cjs.entry.js} +99 -0
  7. package/dist/cjs/ez-form-view.cjs.entry.js +34 -3
  8. package/dist/cjs/ez-form.cjs.entry.js +77 -2
  9. package/dist/cjs/ez-grid.cjs.entry.js +313 -39
  10. package/dist/cjs/ez-list.cjs.entry.js +10 -2
  11. package/dist/cjs/ez-number-input.cjs.entry.js +37 -31
  12. package/dist/cjs/ez-scroller_2.cjs.entry.js +222 -0
  13. package/dist/cjs/ez-search.cjs.entry.js +39 -32
  14. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +92 -0
  15. package/dist/cjs/ez-split-item.cjs.entry.js +1 -0
  16. package/dist/cjs/{ez-scroller_3.cjs.entry.js → ez-tree.cjs.entry.js} +0 -215
  17. package/dist/cjs/ezui.cjs.js +1 -1
  18. package/dist/cjs/index-a7b0c73d.js +16 -4
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/collection/collection-manifest.json +3 -0
  21. package/dist/collection/components/ez-chart/components/BarChart.js +27 -0
  22. package/dist/collection/components/ez-chart/components/ColumnChart.js +27 -0
  23. package/dist/collection/components/ez-chart/components/DonutChart.js +42 -0
  24. package/dist/collection/components/ez-chart/components/LineChart.js +27 -0
  25. package/dist/collection/components/ez-chart/components/PieChart.js +45 -0
  26. package/dist/collection/components/ez-chart/components/index.js +5 -0
  27. package/dist/collection/components/ez-chart/ez-chart.css +5 -0
  28. package/dist/collection/components/ez-chart/ez-chart.js +286 -0
  29. package/dist/collection/components/ez-chart/interfaces/ChartAxis.js +1 -0
  30. package/dist/collection/components/ez-chart/interfaces/ChartContext.js +14 -0
  31. package/dist/collection/components/ez-chart/interfaces/ChartOptions.js +1 -0
  32. package/dist/collection/components/ez-chart/interfaces/ChartSerie.js +1 -0
  33. package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js +1 -0
  34. package/dist/collection/components/ez-chart/interfaces/ChartType.js +8 -0
  35. package/dist/collection/components/ez-chart/interfaces/index.js +5 -0
  36. package/dist/collection/components/ez-chart/test/mock-chart.js +137 -0
  37. package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +146 -0
  38. package/dist/collection/components/ez-form/ez-form.js +130 -4
  39. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +278 -0
  40. package/dist/collection/components/ez-form-view/ez-form-view.js +110 -1
  41. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +3 -2
  42. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +51 -22
  43. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +6 -1
  44. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +35 -1
  45. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +59 -0
  46. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js +40 -0
  47. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js +11 -0
  48. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js +11 -0
  49. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +10 -3
  50. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js +40 -0
  51. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js +1 -0
  52. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +3 -2
  53. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +40 -0
  54. package/dist/collection/components/ez-grid/ez-grid.js +237 -12
  55. package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js +1 -0
  56. package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
  57. package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js +19 -0
  58. package/dist/collection/components/ez-list/ez-list.js +28 -2
  59. package/dist/collection/components/ez-number-input/ez-number-input.js +46 -31
  60. package/dist/collection/components/ez-search/ez-search.js +38 -32
  61. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +6 -2
  62. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
  63. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +180 -0
  64. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js +293 -0
  65. package/dist/collection/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.js +5 -0
  66. package/dist/collection/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.js +6 -0
  67. package/dist/collection/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.js +6 -0
  68. package/dist/collection/components/ez-sidebar-navigator/interfaces/index.js +3 -0
  69. package/dist/collection/components/ez-sidebar-navigator/messages/constants.js +5 -0
  70. package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js +5 -0
  71. package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js +1 -0
  72. package/dist/collection/utils/customRender/interfaces/ICustomRender.js +5 -0
  73. package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js +1 -0
  74. package/dist/collection/utils/form/DataBinder.js +26 -0
  75. package/dist/collection/utils/form/test/DataBinder.test.js +41 -4
  76. package/dist/collection/utils/form/test/resources/metadataTest.js +15 -0
  77. package/dist/collection/utils/index.js +2 -0
  78. package/dist/custom-elements/index.d.ts +18 -0
  79. package/dist/custom-elements/index.js +1147 -117
  80. package/dist/esm/ICustomRender-875b5a40.js +13 -0
  81. package/dist/esm/ez-actions-button.entry.js +1 -0
  82. package/dist/esm/ez-chart.entry.js +431 -0
  83. package/dist/esm/ez-collapsible-box.entry.js +1 -0
  84. package/dist/esm/ez-combo-box.entry.js +1 -0
  85. package/dist/esm/{ez-text-edit.entry.js → ez-custom-form-input_2.entry.js} +101 -3
  86. package/dist/esm/ez-form-view.entry.js +34 -3
  87. package/dist/esm/ez-form.entry.js +78 -3
  88. package/dist/esm/ez-grid.entry.js +313 -39
  89. package/dist/esm/ez-list.entry.js +10 -2
  90. package/dist/esm/ez-number-input.entry.js +38 -32
  91. package/dist/esm/ez-scroller_2.entry.js +217 -0
  92. package/dist/esm/ez-search.entry.js +39 -32
  93. package/dist/esm/ez-sidebar-navigator.entry.js +88 -0
  94. package/dist/esm/ez-split-item.entry.js +1 -0
  95. package/dist/esm/{ez-scroller_3.entry.js → ez-tree.entry.js} +3 -216
  96. package/dist/esm/ezui.js +1 -1
  97. package/dist/esm/index-baa5e267.js +16 -4
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/ezui/ezui.esm.js +1 -1
  100. package/dist/ezui/p-12ae1104.entry.js +1 -0
  101. package/dist/ezui/p-2097d0cf.entry.js +1 -0
  102. package/dist/ezui/p-3b4eeeb6.entry.js +1 -0
  103. package/dist/ezui/p-4607fb89.js +1 -0
  104. package/dist/ezui/p-4d5235f1.entry.js +1 -0
  105. package/dist/ezui/p-5056284a.entry.js +1 -0
  106. package/dist/ezui/p-5b205c80.entry.js +1 -0
  107. package/dist/ezui/p-7922142b.entry.js +1 -0
  108. package/dist/ezui/{p-fbee26ec.entry.js → p-816cece6.entry.js} +2 -2
  109. package/dist/ezui/p-84e439b9.entry.js +1 -0
  110. package/dist/ezui/p-8888d9ed.entry.js +1 -0
  111. package/dist/ezui/p-922ac38b.entry.js +1 -0
  112. package/dist/ezui/p-9ab22a07.entry.js +1 -0
  113. package/dist/ezui/p-a31b9c90.entry.js +1 -0
  114. package/dist/ezui/p-bcb53f27.entry.js +1 -0
  115. package/dist/ezui/p-ecc2c1ec.entry.js +1 -0
  116. package/dist/types/components/ez-chart/components/BarChart.d.ts +9 -0
  117. package/dist/types/components/ez-chart/components/ColumnChart.d.ts +9 -0
  118. package/dist/types/components/ez-chart/components/DonutChart.d.ts +9 -0
  119. package/dist/types/components/ez-chart/components/LineChart.d.ts +9 -0
  120. package/dist/types/components/ez-chart/components/PieChart.d.ts +9 -0
  121. package/dist/types/components/ez-chart/components/index.d.ts +5 -0
  122. package/dist/types/components/ez-chart/ez-chart.d.ts +58 -0
  123. package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +7 -0
  124. package/dist/types/components/ez-chart/interfaces/ChartContext.d.ts +11 -0
  125. package/dist/types/components/ez-chart/interfaces/ChartOptions.d.ts +10 -0
  126. package/dist/types/components/ez-chart/interfaces/ChartSerie.d.ts +20 -0
  127. package/dist/types/components/ez-chart/interfaces/ChartStrategies.d.ts +7 -0
  128. package/dist/types/components/ez-chart/interfaces/ChartType.d.ts +7 -0
  129. package/dist/types/components/ez-chart/interfaces/index.d.ts +5 -0
  130. package/dist/types/components/ez-chart/types/BaseHighChartsRender.d.ts +15 -0
  131. package/dist/types/components/ez-form/ez-form.d.ts +20 -1
  132. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +48 -0
  133. package/dist/types/components/ez-form-view/ez-form-view.d.ts +16 -1
  134. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +37 -0
  135. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +13 -4
  136. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
  137. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -1
  138. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +19 -0
  139. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +14 -0
  140. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.d.ts +11 -0
  141. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.d.ts +11 -0
  142. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +6 -0
  143. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +15 -0
  144. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellRender.d.ts +10 -0
  145. package/dist/types/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.d.ts +6 -0
  146. package/dist/types/components/ez-grid/ez-grid.d.ts +35 -1
  147. package/dist/types/components/ez-grid/interfaces/ICustomFormatter.d.ts +5 -0
  148. package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
  149. package/dist/types/components/ez-grid/test/resources/gridDataUnit.d.ts +2 -0
  150. package/dist/types/components/ez-list/ez-list.d.ts +5 -0
  151. package/dist/types/components/ez-number-input/ez-number-input.d.ts +3 -0
  152. package/dist/types/components/ez-search/ez-search.d.ts +4 -2
  153. package/dist/types/components/ez-sidebar-navigator/ez-sidebar-navigator.d.ts +57 -0
  154. package/dist/types/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.d.ts +4 -0
  155. package/dist/types/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.d.ts +5 -0
  156. package/dist/types/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.d.ts +5 -0
  157. package/dist/types/components/ez-sidebar-navigator/interfaces/index.d.ts +3 -0
  158. package/dist/types/components/ez-sidebar-navigator/messages/constants.d.ts +5 -0
  159. package/dist/types/components.d.ts +334 -5
  160. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +31 -0
  161. package/dist/types/utils/customEditor/interfaces/ICustomEditorInfo.d.ts +5 -0
  162. package/dist/types/utils/customRender/interfaces/ICustomRender.d.ts +29 -0
  163. package/dist/types/utils/customRender/interfaces/ICustomRenderInfo.d.ts +5 -0
  164. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  165. package/dist/types/utils/form/test/resources/metadataTest.d.ts +2 -0
  166. package/dist/types/utils/index.d.ts +2 -0
  167. package/package.json +2 -1
  168. package/react/components.d.ts +3 -0
  169. package/react/components.js +3 -0
  170. package/react/components.js.map +1 -1
  171. package/dist/ezui/p-0447d17c.entry.js +0 -1
  172. package/dist/ezui/p-20ec22c0.entry.js +0 -1
  173. package/dist/ezui/p-2a1a0e04.entry.js +0 -1
  174. package/dist/ezui/p-637f69f2.entry.js +0 -1
  175. package/dist/ezui/p-786559c5.entry.js +0 -1
  176. package/dist/ezui/p-7c770f14.entry.js +0 -1
  177. package/dist/ezui/p-91f626d3.entry.js +0 -1
  178. package/dist/ezui/p-99ead599.entry.js +0 -1
  179. package/dist/ezui/p-b567fa8c.entry.js +0 -1
  180. package/dist/ezui/p-bae3d0aa.entry.js +0 -1
  181. package/dist/ezui/p-db77a984.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-baa5e267.js';
2
- import { NumberUtils, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { NumberUtils, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
4
4
 
5
5
  const ezNumberInputCss = ":host{display:block;width:100%}.number__input{height:100%}";
@@ -13,6 +13,7 @@ const EzNumberInput = class {
13
13
  this._focused = false;
14
14
  this._changePending = false;
15
15
  this._valuePromiseCallbacks = [];
16
+ this._value = undefined;
16
17
  this.label = undefined;
17
18
  this.value = undefined;
18
19
  this.enabled = true;
@@ -68,35 +69,42 @@ const EzNumberInput = class {
68
69
  }
69
70
  observeValue(newValue, oldValue) {
70
71
  if (this._textInput && newValue != oldValue) {
71
- const newValueValidated = this.validateValue(newValue);
72
- const oldValueValidated = this.validateValue(oldValue);
73
- if (newValueValidated === null) {
74
- this._textInput.value = '';
75
- }
76
- if (newValueValidated != oldValueValidated) {
77
- const textValue = this.getTextValue(newValueValidated) || '';
78
- if ((this._textInput.value || '') !== textValue) {
79
- const parsedNumber = this.getParsedNumber(textValue);
80
- if (parsedNumber !== undefined || !this._focused) {
81
- this._textInput.value = textValue;
82
- this._focused = false;
83
- this.errorMessage = "";
84
- }
85
- }
86
- const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
87
- this.ezChange.emit(valueEmitted);
88
- }
72
+ this.handleNewValue(newValue, oldValue);
89
73
  }
90
74
  this._changePending = false;
91
75
  }
76
+ observePrecision() {
77
+ if (this._textInput) {
78
+ this.setInputValue();
79
+ }
80
+ }
81
+ handleNewValue(newValue, oldValue) {
82
+ const newValueValidated = this.validateValue(newValue);
83
+ const oldValueValidated = this.validateValue(oldValue);
84
+ if (newValueValidated === null) {
85
+ this._value = '';
86
+ }
87
+ if (newValueValidated === oldValueValidated) {
88
+ return;
89
+ }
90
+ const textValue = this.getTextValue(newValueValidated) || '';
91
+ const parsedNumber = this.getParsedNumber(textValue);
92
+ if ((this._value || '') !== textValue && (parsedNumber !== undefined || !this._focused)) {
93
+ this._value = textValue;
94
+ this._focused = false;
95
+ this.errorMessage = "";
96
+ }
97
+ const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
98
+ this.ezChange.emit(valueEmitted);
99
+ }
92
100
  validateValue(value) {
93
101
  return isNaN(value) || value === undefined ? null : value;
94
102
  }
95
103
  getTextValue(value) {
96
- if (value != undefined) {
97
- return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
98
- }
99
- return undefined;
104
+ if (value == undefined)
105
+ return undefined;
106
+ let textValue = this.precision >= 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
107
+ return (this.precision === 0) ? StringUtils.replaceAll(textValue, ".", "") : textValue;
100
108
  }
101
109
  changeValue(newValue) {
102
110
  this.errorMessage = "";
@@ -147,17 +155,13 @@ const EzNumberInput = class {
147
155
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
148
156
  }
149
157
  }
150
- getParsedNumber(value) {
151
- var _a;
152
- if (value === void 0) {
153
- value = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value;
154
- }
158
+ getParsedNumber(value = this._textInput.value) {
155
159
  return (value === null || value === void 0 ? void 0 : value.trim()) ? NumberUtils.stringToNumber(value) : undefined;
156
160
  }
157
161
  setInputValue() {
158
162
  const textValue = this.getTextValue(this.value) || '';
159
- if ((this._textInput.value || '') !== textValue) {
160
- this._textInput.value = textValue;
163
+ if ((this._value || '') !== textValue) {
164
+ this._value = textValue;
161
165
  }
162
166
  }
163
167
  componentDidLoad() {
@@ -166,13 +170,15 @@ const EzNumberInput = class {
166
170
  }
167
171
  render() {
168
172
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
169
- return (h("ez-text-input", { class: "number__input", "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }));
173
+ return (h("ez-text-input", { class: "number__input", "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError, value: this._value }));
170
174
  }
171
175
  get _elem() { return getElement(this); }
172
176
  static get watchers() { return {
173
177
  "label": ["observeLabel"],
174
178
  "errorMessage": ["observeErrorMessage"],
175
- "value": ["observeValue"]
179
+ "value": ["observeValue"],
180
+ "precision": ["observePrecision"],
181
+ "prettyPrecision": ["observePrecision"]
176
182
  }; }
177
183
  };
178
184
  EzNumberInput.style = ezNumberInputCss;
@@ -0,0 +1,217 @@
1
+ import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-baa5e267.js';
2
+ import { JSUtils, ElementIDUtils } from '@sankhyalabs/core';
3
+ import { E as EzScrollDirection } from './EzScrollDirection-2df26c93.js';
4
+
5
+ const ezScrollerCss = ":host{--ez-scroller--box-shadow-color:var(--background--body, #fafcff);--ez-scroller__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-scroller__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-scroller__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-scroller__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-scroller__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-scroller__scrollbar--width:var(--space--small, 6px);--ez-scroller__max-height:unset;display:flex;cursor:grab;width:100%;overflow:hidden}.dragging{cursor:grabbing}.ez-scroller__container{display:flex;overflow-y:hidden;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked),.ez-scroller__container:not(.ez-scroller__container--locked):hover{scrollbar-color:var(--ez-scroller__scrollbar--color-clicked) var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container--both{overflow-y:scroll;overflow-x:scroll;flex-wrap:wrap}.ez-scroller__container--horizontal{overflow-x:scroll;flex-direction:row}.ez-scroller__container--vertical{overflow-y:scroll;flex-direction:column;max-height:var(--ez-scroller__max-height)}.ez-scroller__container::-webkit-scrollbar{background-color:transparent;width:var(--ez-scroller__scrollbar--width);height:var(--ez-scroller__scrollbar--width);max-width:var(--ez-scroller__scrollbar--width);min-width:var(--ez-scroller__scrollbar--width)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-track{visibility:hidden;background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-track,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-track{background-color:var(--ez-scroller__scrollbar--color-background)}.ez-scroller__container::-webkit-scrollbar-thumb{background-color:transparent;border-radius:var(--ez-scroller__scrollbar--border-radius)}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb{background-color:var(--ez-scroller__scrollbar--color-default)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:hover{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:hover,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-scroller__scrollbar--color-hover)}.ez-scroller__container::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container::-webkit-scrollbar-thumb:horizontal:active{background-color:transparent}.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container--both:not(.ez-scroller__container--locked)::-webkit-scrollbar-thumb:horizontal:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:vertical:active,.ez-scroller__container:not(.ez-scroller__container--locked):hover::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-scroller__scrollbar--color-clicked)}.ez-scroller__wrapper{display:flex;position:relative;width:100%;height:auto}.ez-scroller__wrapper--horizontal{flex-direction:row}.ez-scroller__wrapper--vertical{flex-direction:column}.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--shadow-end::after{content:\"\";display:flex;position:absolute;z-index:1}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{width:24px;min-height:calc(100% - 10px)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-start::before{left:0;background:linear-gradient(to right, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--horizontal.ez-scroller__wrapper--shadow-end::after{right:0;background:linear-gradient(to left, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before,.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{min-width:calc(100% - 10px);height:24px}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-start::before{top:0;background:linear-gradient(to bottom, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}.ez-scroller__wrapper--vertical.ez-scroller__wrapper--shadow-end::after{bottom:0;background:linear-gradient(to top, var(--ez-scroller--box-shadow-color) 20%, transparent 80%)}";
6
+
7
+ const EzScroller = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this._shadowStart = "ez-scroller__wrapper--shadow-start";
11
+ this._shadowEnd = "ez-scroller__wrapper--shadow-end";
12
+ this.isActive = false;
13
+ this.direction = undefined;
14
+ this.locked = false;
15
+ this.activeShadow = false;
16
+ }
17
+ //---------------------------------------------
18
+ // Private methods
19
+ //---------------------------------------------
20
+ getContainerClass() {
21
+ return `ez-scroller__container ez-scroller__container--${this.direction}
22
+ ${this.locked || !this.isActive ? " ez-scroller__container--locked" : ""}
23
+ `;
24
+ }
25
+ getWrapperClass() {
26
+ return `ez-scroller__wrapper ez-scroller__wrapper--${this.direction}`;
27
+ }
28
+ finishDrag() {
29
+ if (this._controller) {
30
+ this._container.classList.remove("dragging");
31
+ }
32
+ }
33
+ updateScroller() {
34
+ const container = this._container;
35
+ if (container == undefined) {
36
+ return;
37
+ }
38
+ let remainingScroll;
39
+ if (this.direction === EzScrollDirection.HORIZONTAL) {
40
+ const { scrollWidth, clientWidth, scrollLeft } = container;
41
+ remainingScroll = scrollWidth - clientWidth - Math.ceil(scrollLeft);
42
+ this._startHidden = container.scrollLeft > 0;
43
+ }
44
+ else if (this.direction === EzScrollDirection.VERTICAL) {
45
+ const { scrollHeight, clientHeight, scrollTop } = container;
46
+ remainingScroll = scrollHeight - clientHeight - Math.ceil(scrollTop);
47
+ this._startHidden = container.scrollTop > 0;
48
+ }
49
+ this._endHidden = remainingScroll > 0;
50
+ this.isActive = this._startHidden || this._endHidden || this.isActiveScroller();
51
+ this.updateShadow();
52
+ }
53
+ updateShadow() {
54
+ const wrapper = this._wrapper;
55
+ if (!this.activeShadow || wrapper == undefined) {
56
+ return;
57
+ }
58
+ const shadowPositions = ["", "start", "end", "middle"];
59
+ const currentPosition = shadowPositions[Number(this._startHidden) | Number(this._endHidden) << 1];
60
+ if (currentPosition === "start") {
61
+ wrapper.classList.add(this._shadowStart);
62
+ wrapper.classList.remove(this._shadowEnd);
63
+ }
64
+ else if (currentPosition === "end") {
65
+ wrapper.classList.remove(this._shadowStart);
66
+ wrapper.classList.add(this._shadowEnd);
67
+ }
68
+ else if (currentPosition === "middle") {
69
+ wrapper.classList.add(this._shadowStart);
70
+ wrapper.classList.add(this._shadowEnd);
71
+ }
72
+ else {
73
+ wrapper.classList.remove(this._shadowStart);
74
+ wrapper.classList.remove(this._shadowEnd);
75
+ }
76
+ }
77
+ configResize() {
78
+ const container = this._container;
79
+ if (container == undefined) {
80
+ return;
81
+ }
82
+ if (this._resizeObserver != undefined) {
83
+ this._resizeObserver.unobserve(container);
84
+ }
85
+ this._resizeObserver = new ResizeObserver(JSUtils.debounce(this.updateScroller.bind(this), 200));
86
+ this._resizeObserver.observe(container);
87
+ }
88
+ getContainerElement() {
89
+ return h("div", { ref: ref => this._container = ref, class: this.getContainerClass() }, h("slot", null));
90
+ }
91
+ isActiveScroller() {
92
+ if (this._container == undefined) {
93
+ return false;
94
+ }
95
+ return this._container.scrollWidth > this._container.clientWidth
96
+ || this._container.scrollHeight > this._container.clientHeight;
97
+ }
98
+ //---------------------------------------------
99
+ // Event handlers
100
+ //---------------------------------------------
101
+ clickListener(evt) {
102
+ if (this._controller && this._controller.didScroll()) {
103
+ evt.preventDefault();
104
+ evt.stopPropagation();
105
+ evt.stopImmediatePropagation();
106
+ }
107
+ }
108
+ mouseDownHandler(evt) {
109
+ if (this.locked) {
110
+ this.finishDrag();
111
+ return;
112
+ }
113
+ if (!this._controller) {
114
+ this._controller = new ScrollCtrl(this._container);
115
+ }
116
+ this._controller.startDragg(evt);
117
+ this._container.classList.add("dragging");
118
+ }
119
+ mouseUpHandler() {
120
+ this.finishDrag();
121
+ }
122
+ mouseMoveHandler(evt) {
123
+ if (this.locked) {
124
+ this.finishDrag();
125
+ return;
126
+ }
127
+ if (this._controller) {
128
+ if (evt.buttons === 0) {
129
+ this.finishDrag();
130
+ }
131
+ else {
132
+ this._controller.doScroll(evt);
133
+ }
134
+ }
135
+ }
136
+ componentDidRender() {
137
+ var _a, _b;
138
+ if (this._container == undefined) {
139
+ return;
140
+ }
141
+ if (this.direction === EzScrollDirection.BOTH) {
142
+ (_a = this._wrapper) === null || _a === void 0 ? void 0 : _a.classList.remove(this._shadowStart);
143
+ (_b = this._wrapper) === null || _b === void 0 ? void 0 : _b.classList.remove(this._shadowEnd);
144
+ this.isActive = this.isActiveScroller();
145
+ return;
146
+ }
147
+ this._container.onscroll = this.updateScroller.bind(this);
148
+ this.configResize();
149
+ this.updateScroller();
150
+ }
151
+ render() {
152
+ return (h(Host, null, this.activeShadow
153
+ ? h("div", { ref: ref => this._wrapper = ref, class: this.getWrapperClass() }, this.getContainerElement())
154
+ : this.getContainerElement()));
155
+ }
156
+ };
157
+ class ScrollCtrl {
158
+ constructor(scrollablePanel) {
159
+ this.scrollablePanel = scrollablePanel;
160
+ }
161
+ startDragg(evt) {
162
+ this.startX = this.measureX(evt);
163
+ this.startY = this.measureY(evt);
164
+ this.scrollWidth = 0;
165
+ this.scrollHeight = 0;
166
+ }
167
+ measureX(e) {
168
+ return e.pageX - this.scrollablePanel.offsetLeft;
169
+ }
170
+ measureY(e) {
171
+ return e.pageY - this.scrollablePanel.offsetTop;
172
+ }
173
+ doScroll(e) {
174
+ const x = this.measureX(e);
175
+ const y = this.measureY(e);
176
+ if (x != this.startX || y != this.startY) {
177
+ const scrollX = x - this.startX;
178
+ const scrollY = y - this.startY;
179
+ this.startX += scrollX;
180
+ this.startY += scrollY;
181
+ this.scrollWidth += Math.abs(scrollX);
182
+ this.scrollHeight += Math.abs(scrollY);
183
+ this.scrollablePanel.scrollLeft = Math.max(0, this.scrollablePanel.scrollLeft - scrollX);
184
+ this.scrollablePanel.scrollTop = Math.max(0, this.scrollablePanel.scrollTop - scrollY);
185
+ }
186
+ }
187
+ didScroll() {
188
+ const tollerance = 5;
189
+ return this.scrollHeight > tollerance || this.scrollWidth > tollerance;
190
+ }
191
+ }
192
+ EzScroller.style = ezScrollerCss;
193
+
194
+ const ezSidebarButtonCss = ":host{position:relative;--ez-sidebar-button--width:6px;--ez-sidebar-button--hover--width:12px;--ez-sidebar-button--height:96px;--ez-sidebar-button--background-color--xlight:var(--background--xlight, #fff);--ez-sidebar-button--background-color--primary:var(--color--primary);--ez-sidebar-button--space--small:var(--space--small, 6px);--ez-sidebar-button--space--medium:var(--space--medium, 12px);--ez-sidebar-button--box-shadow:var(--shadow--small, 0px 0px 16px rgba(0, 38, 111, 0.07));--ez-sidebar-button--hover--box-shadow:var(--shadow--hard, 0px 0px 16px rgba(43, 58, 84, 0.24));--ez-sidebar-button--border--radius-small:var(--border--radius-small);--ez-sidebar-button--border--radius-medium:var(--border--radius-medium)}button{position:absolute;display:flex;background:var(--ez-sidebar-button--background-color--xlight);border:0;border-radius:0 var(--ez-sidebar-button--border--radius-medium) var(--ez-sidebar-button--border--radius-medium) 0;box-shadow:var(--ez-sidebar-button--box-shadow);padding:0;cursor:pointer;align-items:center}span{width:var(--ez-sidebar-button--width);height:var(--ez-sidebar-button--height);margin:var(--ez-sidebar-button--space--medium) 0 var(--ez-sidebar-button--space--medium) 0;background:var(--ez-sidebar-button--background-color--primary);border-radius:0 var(--ez-sidebar-button--border--radius-small) var(--ez-sidebar-button--border--radius-small) 0}ez-icon{--ez-icon--color:var(--ez-sidebar-button--background-color--primary)}button:hover{box-shadow:var(--ez-sidebar-button--hover--box-shadow)}button:hover span{width:var(--ez-sidebar-button--hover--width);margin:var(--ez-sidebar-button--space--medium) 0 var(--ez-sidebar-button--space--medium) 0}";
195
+
196
+ const EzSidebarButton = class {
197
+ constructor(hostRef) {
198
+ registerInstance(this, hostRef);
199
+ this.ezClick = createEvent(this, "ezClick", 7);
200
+ }
201
+ componentDidLoad() {
202
+ if (this._element) {
203
+ ElementIDUtils.addIDInfo(this._element);
204
+ }
205
+ if (this._button) {
206
+ const dataInfo = { id: 'embedded' };
207
+ ElementIDUtils.addIDInfo(this._button, 'button', dataInfo);
208
+ }
209
+ }
210
+ render() {
211
+ return (h("button", { type: "button", onClick: () => { this.ezClick.emit(); }, ref: (el) => this._button = el }, h("span", null), h("ez-icon", { iconName: "chevron-right" })));
212
+ }
213
+ get _element() { return getElement(this); }
214
+ };
215
+ EzSidebarButton.style = ezSidebarButtonCss;
216
+
217
+ export { EzScroller as ez_scroller, EzSidebarButton as ez_sidebar_button };
@@ -4,6 +4,7 @@ import { ObjectUtils, StringUtils, FloatingManager, ElementIDUtils } from '@sank
4
4
  import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
+ import './ICustomRender-875b5a40.js';
7
8
  import { R as REQUIRED_INFO } from './constants-4e0d35b7.js';
8
9
 
9
10
  const ezSearchCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-search--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-search__scrollbar--color-background);width:var(--ez-search__scrollbar--width);max-width:var(--ez-search__scrollbar--width);min-width:var(--ez-search__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);padding:var(--ez-search--space--small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
@@ -19,7 +20,6 @@ const EzSearch = class {
19
20
  this._tabPressed = false;
20
21
  this._textEmptyList = "Nenhum resultado encontrado";
21
22
  this._textEmptySearch = "Nenhum resultado de {0} encontrado";
22
- this._lookupMode = false;
23
23
  this._startHighlightTag = "<span class='card-item__highlight'>";
24
24
  this._endHighlightTag = "</span>";
25
25
  this._preSelection = undefined;
@@ -48,36 +48,30 @@ const EzSearch = class {
48
48
  var _a;
49
49
  if (this._textInput) {
50
50
  this._textInput.errorMessage = this.errorMessage;
51
- if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
51
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim()) && this.errorMessage) {
52
52
  this.setInputValue();
53
53
  }
54
54
  }
55
55
  }
56
- observeValue(newValue, oldValue) {
57
- if (this._textInput && newValue != oldValue) {
58
- try {
59
- if (newValue === "string") {
60
- this.setInputValue();
61
- return;
62
- }
63
- const newValueSelected = this.getSelectedOption(newValue);
64
- const oldValueSelected = this.getSelectedOption(oldValue);
65
- const currentValue = this.getSelectedOption(this.value);
66
- if (this.isDifferentValues(currentValue, newValueSelected)) {
67
- this.value = newValueSelected;
68
- }
69
- if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
70
- this.setInputValue();
71
- const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
72
- if (!this._lookupMode) {
73
- this.ezChange.emit(valueEmitted);
74
- }
75
- }
76
- this.resetOptions();
56
+ validateNewValue(newValue, oldValue) {
57
+ const getValue = (val) => typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
58
+ return (getValue(newValue) !== getValue(oldValue));
59
+ }
60
+ async observeValue(newValue, oldValue) {
61
+ if (this._textInput && newValue !== oldValue && this.validateNewValue(newValue, oldValue)) {
62
+ if (typeof newValue === "string") {
63
+ await this.handleValueAsString(newValue);
64
+ return;
77
65
  }
78
- finally {
79
- this._lookupMode = false;
66
+ const newValueSelected = this.getSelectedOption(newValue);
67
+ const currentValue = this.getSelectedOption(this._currentValue);
68
+ if (this.isDifferentValues(currentValue, newValueSelected)) {
69
+ this._currentValue = newValueSelected;
70
+ this.setInputValue();
71
+ const valueEmitted = newValueSelected !== null && newValueSelected !== void 0 ? newValueSelected : undefined;
72
+ this.ezChange.emit(valueEmitted);
80
73
  }
74
+ this.resetOptions();
81
75
  }
82
76
  }
83
77
  observeOptions(newOptions, oldOptions) {
@@ -144,6 +138,16 @@ const EzSearch = class {
144
138
  });
145
139
  }
146
140
  }
141
+ async handleValueAsString(value) {
142
+ if (this.getSelectedOption(value)) {
143
+ this.setInputValue();
144
+ return;
145
+ }
146
+ await this.loadDescriptionValue(value);
147
+ this.setInputValue();
148
+ this.ezChange.emit(this.value);
149
+ this._currentValue = this.value;
150
+ }
147
151
  updateListPosition() {
148
152
  let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
149
153
  const elementRect = this._listWrapper.getBoundingClientRect();
@@ -199,7 +203,7 @@ const EzSearch = class {
199
203
  return text;
200
204
  }
201
205
  getText() {
202
- const currentValue = this.getSelectedOption(this.value);
206
+ const currentValue = this.getSelectedOption(this._currentValue);
203
207
  const text = this.getFormattedText(currentValue);
204
208
  if (text == undefined) {
205
209
  return;
@@ -374,6 +378,7 @@ const EzSearch = class {
374
378
  || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
375
379
  const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
376
380
  this.value = adjustedOpt;
381
+ this._currentValue = adjustedOpt;
377
382
  }
378
383
  else {
379
384
  this.setInputValue();
@@ -394,7 +399,7 @@ const EzSearch = class {
394
399
  }
395
400
  }
396
401
  cancelPreselection() {
397
- if (!this._textInput.value && this.value) {
402
+ if (!this._textInput.value && this._currentValue) {
398
403
  this.selectOption(undefined);
399
404
  }
400
405
  else {
@@ -415,6 +420,7 @@ const EzSearch = class {
415
420
  }
416
421
  clearSearch() {
417
422
  this.value = null;
423
+ this._currentValue = null;
418
424
  }
419
425
  controlListWithOnlyOne() {
420
426
  var _a, _b;
@@ -444,11 +450,11 @@ const EzSearch = class {
444
450
  if (StringUtils.isEmpty(this.value)) {
445
451
  return;
446
452
  }
447
- let value = this.value;
448
- if (typeof value === "object") {
453
+ if (!this.validateNewValue(this.value, this._currentValue)) {
449
454
  return;
450
455
  }
451
- if (StringUtils.isEmpty(value)) {
456
+ let value = this.value;
457
+ if (typeof value === "object") {
452
458
  return;
453
459
  }
454
460
  this.loadDescriptionValue(value);
@@ -485,8 +491,8 @@ const EzSearch = class {
485
491
  this.showNoResultMessage();
486
492
  return;
487
493
  }
488
- this._lookupMode = true;
489
- this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
494
+ this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
495
+ this.value = this._currentValue;
490
496
  }
491
497
  loadOptionValue(argument) {
492
498
  var _a;
@@ -545,6 +551,7 @@ const EzSearch = class {
545
551
  this.validateDescriptionValue();
546
552
  }
547
553
  componentDidLoad() {
554
+ this._currentValue = this.value;
548
555
  CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
549
556
  this.setInputValue(false);
550
557
  this._resizeObserver = new ResizeObserver((entries) => {
@@ -0,0 +1,88 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
2
+ import { ElementIDUtils } from '@sankhyalabs/core';
3
+ import { E as EzScrollDirection } from './EzScrollDirection-2df26c93.js';
4
+
5
+ var ModeMenuEnum;
6
+ (function (ModeMenuEnum) {
7
+ ModeMenuEnum["FLOAT"] = "float";
8
+ ModeMenuEnum["FIXED"] = "fixed";
9
+ })(ModeMenuEnum || (ModeMenuEnum = {}));
10
+
11
+ var SizeMenuEnum;
12
+ (function (SizeMenuEnum) {
13
+ SizeMenuEnum["SMALL"] = "sm";
14
+ SizeMenuEnum["MEDIUM"] = "md";
15
+ SizeMenuEnum["LARGE"] = "lg";
16
+ })(SizeMenuEnum || (SizeMenuEnum = {}));
17
+
18
+ var TypeMenuEnum;
19
+ (function (TypeMenuEnum) {
20
+ TypeMenuEnum["FLOAT"] = "float";
21
+ TypeMenuEnum["FIXED"] = "fixed";
22
+ TypeMenuEnum["DYNAMIC"] = "dynamic";
23
+ })(TypeMenuEnum || (TypeMenuEnum = {}));
24
+
25
+ const MESSAGES = {
26
+ HIDE_MENU: 'Ocultar menu',
27
+ UN_PIN_MENU: 'Desafixar menu',
28
+ PUSH_PIN_MENU: 'Fixar menu',
29
+ };
30
+
31
+ const ezSidebarNavigatorCss = ":host{--ez-sidebar-navigator--padding-left:var(--space--xs, 12px);--ez-sidebar-navigator--padding-right:var(--space--xs, 12px);--ez-sidebar-navigator--gap:var(--space--xs, 12px);--ez-sidebar-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-sidebar-navigator--background-color:var(--color--inverted);--ez-sidebar-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-sidebar-navigator--height:calc(100vh - var(--space--lg, 24px));--ez-sidebar-navigator--header-gap:var(--space--xs, 12px);--ez-sidebar-navigator--footer-gap:var(--space--xs, 12px);--ez-ez-sidebar-navigator__title--font-family:var(--font-pattern, \"Roboto\");--ez-ez-sidebar-navigator__title--font-size:var(--title--medium, 16px);--ez-ez-sidebar-navigator__title--color:var(--title--primary, #2b3a54);--ez-ez-sidebar-navigator__title--font-weight:var(--text-weight--extra-large, 700)}.inverted{transform:rotate(180deg)}.ez-sidebar-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:var(--ez-sidebar-navigator--height);padding-top:var(--space--xs, 12px);padding-bottom:var(--space--xs, 12px);gap:var(--ez-sidebar-navigator--gap);padding-left:var(--ez-sidebar-navigator--padding-left);padding-right:var(--ez-sidebar-navigator--padding-right);background-color:var(--ez-sidebar-navigator--background-color);-webkit-box-shadow:var(--ez-sidebar-navigator--box-shadow);box-shadow:var(--ez-sidebar-navigator--box-shadow);border-radius:var(--ez-sidebar-navigator--border-radius)}.ez-sidebar-navigator__header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-content:space-between;gap:var(--ez-sidebar-navigator--header-gap)}.ez-sidebar-navigator__content{height:100%}.ez-sidebar-navigator__footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-sidebar-navigator--footer-gap)}.ez-sidebar-navigator__title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-family:var(--ez-ez-sidebar-navigator__title--font-family);font-size:var(--ez-ez-sidebar-navigator__title--font-size);font-weight:var(--ez-ez-sidebar-navigator__title--font-weight);color:var(--ez-ez-sidebar-navigator__title--color)}.ez-sidebar-navigator__end{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;gap:var(--ez-sidebar-navigator--gap)}.dynamic{position:absolute;z-index:var(--most-visible\t, 4)}.fixed{position:relative}.hidden{display:none}.show{animation:fadeIn .1s ease-in-out 1}@keyframes fadeIn{from{transform:translate(-100%)}}.sm{width:240px}.md{width:280px}.lg{width:320px}@media screen and (max-width: 991px){.responsive{width:240px}}@media screen and (min-width: 992px){.responsive{width:280px}}@media screen and (min-width: 1200px){.responsive{width:320px}}";
32
+
33
+ const EzSidebarNavigator = class {
34
+ constructor(hostRef) {
35
+ registerInstance(this, hostRef);
36
+ this.ezChangeMode = createEvent(this, "ezChangeMode", 7);
37
+ this.handleToggleSidebar = () => {
38
+ this.open = !this.open;
39
+ };
40
+ this.handleToggleMode = () => {
41
+ this.mode = this.mode === ModeMenuEnum.FIXED ? ModeMenuEnum.FLOAT : ModeMenuEnum.FIXED;
42
+ this.ezChangeMode.emit(this.mode);
43
+ };
44
+ this.type = TypeMenuEnum.DYNAMIC;
45
+ this.mode = ModeMenuEnum.FLOAT;
46
+ this.size = SizeMenuEnum.SMALL;
47
+ this.isResponsive = false;
48
+ this.titleMenu = "";
49
+ this.showCollapseMenu = true;
50
+ this.showFixedButton = true;
51
+ this.open = false;
52
+ }
53
+ /**
54
+ * Método para fixar/desafixar o menu, emitindo o evento ezChangeMode.
55
+ */
56
+ async changeModeMenu() {
57
+ if (this.type === TypeMenuEnum.DYNAMIC) {
58
+ this.handleToggleMode();
59
+ }
60
+ }
61
+ /**
62
+ * Método para fechar o menu automaticamente após uma ação, fluxo, etc.
63
+ */
64
+ async closeSidebar() {
65
+ this.open = false;
66
+ }
67
+ /**
68
+ * Método para abrir o menu automaticamente após uma ação, fluxo, etc.
69
+ */
70
+ async openSidebar() {
71
+ this.open = true;
72
+ }
73
+ componentDidLoad() {
74
+ if (this.type === TypeMenuEnum.FIXED) {
75
+ this.mode = ModeMenuEnum.FIXED;
76
+ this.open = true;
77
+ }
78
+ }
79
+ render() {
80
+ ElementIDUtils.addIDInfoIfNotExists(this._element);
81
+ return (h(Host, null, h("ez-sidebar-button", { class: this.open ? "hidden" : "", onEzClick: this.mode === ModeMenuEnum.FIXED ? this.handleToggleSidebar : undefined, onMouseEnter: this.mode === ModeMenuEnum.FLOAT ? this.handleToggleSidebar : undefined, "aria-controls": "navigator", "aria-expanded": this.open, "data-element-id": ElementIDUtils.getInternalIDInfo("openButton") }), this.open ? (h("aside", { tabIndex: -1, id: "navigator", class: `ez-col ez-col--sd-12 ez-col--tb-3 ez-sidebar-navigator ${this.mode === ModeMenuEnum.FLOAT ? 'dynamic' : 'fixed'} ${this.isResponsive ? 'responsive' : this.size} ${!this.open ? "hidden" : "show"}`, "data-element-id": ElementIDUtils.getInternalIDInfo("sidebar"), onMouseLeave: this.type !== TypeMenuEnum.FIXED && this.mode === ModeMenuEnum.FLOAT ? this.handleToggleSidebar : undefined }, h("header", { class: "ez-sidebar-navigator__header" }, h("slot", { name: "start" }), this.titleMenu !== '' && (h("div", { class: "ez-sidebar-navigator__title", title: this.titleMenu }, this.titleMenu)), !this.titleMenu && (h("slot", { name: "content" })), h("div", { class: "ez-sidebar-navigator__end" }, h("slot", { name: "end" }), (this.type === TypeMenuEnum.DYNAMIC && this.showFixedButton) && (h("ez-button", { onClick: this.handleToggleMode, mode: "icon", size: "small", iconName: this.mode === ModeMenuEnum.FIXED ? "un-pin" : "push-pin", title: this.mode === ModeMenuEnum.FIXED ? MESSAGES.UN_PIN_MENU : MESSAGES.PUSH_PIN_MENU, "aria-label": this.mode === ModeMenuEnum.FIXED ? MESSAGES.UN_PIN_MENU : MESSAGES.PUSH_PIN_MENU, "aria-controls": "navigator", "data-element-id": ElementIDUtils.getInternalIDInfo("pinButton") })), (this.mode === ModeMenuEnum.FIXED && this.showCollapseMenu) && (h("ez-button", { onClick: this.handleToggleSidebar, class: "inverted", mode: "icon", size: "small", iconName: "show_menu", title: MESSAGES.HIDE_MENU, "aria-label": MESSAGES.HIDE_MENU, "aria-controls": "navigator", "data-element-id": ElementIDUtils.getInternalIDInfo("closeButton") })))), this.titleMenu && (h("slot", { name: "content" })), h("ez-scroller", { class: "ez-sidebar-navigator__content", direction: EzScrollDirection.VERTICAL, activeShadow: true }, h("slot", null)), h("footer", { class: "ez-sidebar-navigator__footer" }, h("slot", { name: "footer" }))))
82
+ : undefined));
83
+ }
84
+ get _element() { return getElement(this); }
85
+ };
86
+ EzSidebarNavigator.style = ezSidebarNavigatorCss;
87
+
88
+ export { EzSidebarNavigator as ez_sidebar_navigator };
@@ -4,6 +4,7 @@ import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
4
4
  import './DialogType-54a62731.js';
5
5
  import './CheckMode-bdb2ec19.js';
6
6
  import '@sankhyalabs/core';
7
+ import './ICustomRender-875b5a40.js';
7
8
 
8
9
  const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}";
9
10