@sankhyalabs/ezui 1.2.0-beta.2 → 1.2.0-beta.21

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 (216) hide show
  1. package/dist/cjs/{ApplicationUtils-483c0a9e.js → ApplicationUtils-edc62c5c.js} +6 -2
  2. package/dist/cjs/{CSSVarsUtils-09b431cc.js → CSSVarsUtils-af809e73.js} +17 -0
  3. package/dist/cjs/{DialogType-a1e288e6.js → DialogType-aa435c52.js} +1 -0
  4. package/dist/cjs/FieldBuilder-cd3e45ed.js +119 -0
  5. package/dist/cjs/ez-actions-button.cjs.entry.js +67 -15
  6. package/dist/cjs/ez-button.cjs.entry.js +12 -10
  7. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-chip.cjs.entry.js +6 -6
  9. package/dist/cjs/ez-collapsible-box.cjs.entry.js +85 -6
  10. package/dist/cjs/ez-combo-box.cjs.entry.js +38 -13
  11. package/dist/cjs/ez-date-input.cjs.entry.js +9 -14
  12. package/dist/cjs/ez-date-time-input.cjs.entry.js +9 -14
  13. package/dist/cjs/ez-dialog.cjs.entry.js +42 -7
  14. package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-form.cjs.entry.js +44 -133
  16. package/dist/cjs/ez-grid-config.cjs.entry.js +4 -5
  17. package/dist/cjs/ez-grid.cjs.entry.js +97 -10
  18. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  19. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-modal-container.cjs.entry.js +54 -0
  21. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-popup.cjs.entry.js +7 -3
  24. package/dist/cjs/ez-radio-button.cjs.entry.js +2 -2
  25. package/dist/cjs/ez-scroller.cjs.entry.js +1 -1
  26. package/dist/cjs/ez-search.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-tabselector.cjs.entry.js +7 -5
  28. package/dist/cjs/ez-text-area.cjs.entry.js +6 -6
  29. package/dist/cjs/ez-text-edit.cjs.entry.js +103 -0
  30. package/dist/cjs/ez-text-input.cjs.entry.js +11 -1
  31. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-upload.cjs.entry.js +2 -2
  33. package/dist/cjs/ez-view-stack.cjs.entry.js +9 -5
  34. package/dist/cjs/ezui.cjs.js +1 -1
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +6 -4
  37. package/dist/collection/components/ez-actions-button/ez-actions-button.css +49 -20
  38. package/dist/collection/components/ez-actions-button/ez-actions-button.js +219 -23
  39. package/dist/collection/components/ez-button/ez-button.css +1 -6
  40. package/dist/collection/components/ez-button/ez-button.js +11 -9
  41. package/dist/collection/components/ez-calendar/ez-calendar.css +17 -20
  42. package/dist/collection/components/ez-chip/ez-chip.css +6 -3
  43. package/dist/collection/components/ez-chip/ez-chip.js +5 -5
  44. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +16 -0
  45. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +226 -7
  46. package/dist/collection/components/ez-combo-box/ez-combo-box.css +1 -22
  47. package/dist/collection/components/ez-combo-box/ez-combo-box.js +42 -18
  48. package/dist/collection/components/ez-date-input/ez-date-input.js +8 -13
  49. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +8 -13
  50. package/dist/collection/components/ez-dialog/DialogType.js +1 -0
  51. package/dist/collection/components/ez-dialog/ez-dialog.css +19 -25
  52. package/dist/collection/components/ez-dialog/ez-dialog.js +41 -6
  53. package/dist/collection/components/ez-form/DataBinder.js +1 -0
  54. package/dist/collection/components/ez-form/ez-form.js +22 -13
  55. package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +1 -1
  56. package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +24 -14
  57. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +3 -0
  58. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +64 -10
  59. package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRenderer.js +31 -0
  60. package/dist/collection/components/ez-grid/ez-grid.js +40 -3
  61. package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.css +36 -25
  62. package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js +1 -2
  63. package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.js +5 -4
  64. package/dist/collection/components/ez-icon/ez-icon.css +117 -98
  65. package/dist/collection/components/ez-list/ez-list.css +9 -1
  66. package/dist/collection/components/ez-modal-container/ez-modal-container.css +38 -0
  67. package/dist/collection/components/ez-modal-container/ez-modal-container.js +166 -0
  68. package/dist/collection/components/ez-modal-container/index.js +2 -0
  69. package/dist/collection/components/ez-modal-container/modal-action.js +8 -0
  70. package/dist/collection/components/ez-modal-container/modal-button-status.js +7 -0
  71. package/dist/collection/components/ez-popover/ez-popover.css +1 -1
  72. package/dist/collection/components/ez-popup/ez-popup.css +4 -0
  73. package/dist/collection/components/ez-popup/ez-popup.js +26 -4
  74. package/dist/collection/components/ez-radio-button/ez-radio-button.css +16 -5
  75. package/dist/collection/components/ez-radio-button/ez-radio-button.js +1 -1
  76. package/dist/collection/components/ez-scroller/ez-scroller.css +4 -2
  77. package/dist/collection/components/ez-search/ez-search.js +6 -6
  78. package/dist/collection/components/ez-tabselector/ez-tabselector.css +9 -0
  79. package/dist/collection/components/ez-tabselector/ez-tabselector.js +7 -3
  80. package/dist/collection/components/ez-text-area/ez-text-area.css +6 -3
  81. package/dist/collection/components/ez-text-area/ez-text-area.js +5 -5
  82. package/dist/collection/components/ez-text-edit/ez-text-edit.css +19 -0
  83. package/dist/collection/components/ez-text-edit/ez-text-edit.js +188 -0
  84. package/dist/collection/components/ez-text-input/ez-text-input.css +18 -2
  85. package/dist/collection/components/ez-text-input/ez-text-input.js +28 -0
  86. package/dist/collection/components/ez-view-stack/ez-view-stack.js +12 -6
  87. package/dist/collection/utils/ApplicationUtils.js +5 -1
  88. package/dist/collection/utils/CSSVarsUtils.js +17 -0
  89. package/dist/collection/utils/index.js +1 -0
  90. package/dist/custom-elements/index.d.ts +12 -0
  91. package/dist/custom-elements/index.js +728 -254
  92. package/dist/esm/{ApplicationUtils-5f87ae60.js → ApplicationUtils-205ac4bc.js} +6 -2
  93. package/dist/esm/{CSSVarsUtils-499b75c2.js → CSSVarsUtils-00f67f32.js} +17 -0
  94. package/dist/esm/{DialogType-72afa679.js → DialogType-4059dc4d.js} +1 -0
  95. package/dist/esm/FieldBuilder-9e9545fc.js +117 -0
  96. package/dist/esm/ez-actions-button.entry.js +67 -15
  97. package/dist/esm/ez-button.entry.js +12 -10
  98. package/dist/esm/ez-calendar.entry.js +1 -1
  99. package/dist/esm/ez-chip.entry.js +6 -6
  100. package/dist/esm/ez-collapsible-box.entry.js +86 -7
  101. package/dist/esm/ez-combo-box.entry.js +38 -13
  102. package/dist/esm/ez-date-input.entry.js +9 -14
  103. package/dist/esm/ez-date-time-input.entry.js +10 -15
  104. package/dist/esm/ez-dialog.entry.js +42 -7
  105. package/dist/esm/ez-filter-input.entry.js +1 -1
  106. package/dist/esm/ez-form.entry.js +43 -132
  107. package/dist/esm/ez-grid-config.entry.js +4 -5
  108. package/dist/esm/ez-grid.entry.js +97 -10
  109. package/dist/esm/ez-icon.entry.js +1 -1
  110. package/dist/esm/ez-list.entry.js +1 -1
  111. package/dist/esm/ez-modal-container.entry.js +50 -0
  112. package/dist/esm/ez-number-input.entry.js +1 -1
  113. package/dist/esm/ez-popover.entry.js +1 -1
  114. package/dist/esm/ez-popup.entry.js +7 -3
  115. package/dist/esm/ez-radio-button.entry.js +2 -2
  116. package/dist/esm/ez-scroller.entry.js +1 -1
  117. package/dist/esm/ez-search.entry.js +1 -1
  118. package/dist/esm/ez-tabselector.entry.js +7 -5
  119. package/dist/esm/ez-text-area.entry.js +6 -6
  120. package/dist/esm/ez-text-edit.entry.js +99 -0
  121. package/dist/esm/ez-text-input.entry.js +11 -1
  122. package/dist/esm/ez-time-input.entry.js +1 -1
  123. package/dist/esm/ez-upload.entry.js +2 -2
  124. package/dist/esm/ez-view-stack.entry.js +9 -5
  125. package/dist/esm/ezui.js +1 -1
  126. package/dist/esm/loader.js +1 -1
  127. package/dist/ezui/ezui.esm.js +1 -1
  128. package/dist/ezui/p-0b44cf1c.js +1 -0
  129. package/dist/ezui/p-0c7203d5.entry.js +1 -0
  130. package/dist/ezui/p-2cc6dd66.entry.js +1 -0
  131. package/dist/ezui/p-2ccad880.entry.js +1 -0
  132. package/dist/ezui/p-333d79c4.entry.js +1 -0
  133. package/dist/ezui/p-3987f8d8.entry.js +1 -0
  134. package/dist/ezui/p-3c87845d.entry.js +1 -0
  135. package/dist/ezui/{p-768053d0.entry.js → p-43bb6a59.entry.js} +1 -1
  136. package/dist/ezui/p-4a5e37a7.js +1 -0
  137. package/dist/ezui/p-4ad647fc.entry.js +1 -0
  138. package/dist/ezui/p-54ecd19a.js +1 -0
  139. package/dist/ezui/{p-03742d3e.entry.js → p-56688470.entry.js} +1 -1
  140. package/dist/ezui/{p-b901ba02.entry.js → p-5a1927a2.entry.js} +1 -1
  141. package/dist/ezui/{p-b2cf7db2.entry.js → p-63d567cc.entry.js} +1 -1
  142. package/dist/ezui/p-6befd7e4.entry.js +1 -0
  143. package/dist/ezui/p-712bd293.entry.js +1 -0
  144. package/dist/ezui/{p-d9c72ff7.entry.js → p-72c75a43.entry.js} +1 -1
  145. package/dist/ezui/{p-15d18ece.entry.js → p-744eb735.entry.js} +1 -1
  146. package/dist/ezui/{p-81eb2738.entry.js → p-802d23d9.entry.js} +1 -1
  147. package/dist/ezui/p-86daa81a.entry.js +1 -0
  148. package/dist/ezui/{p-72ab066f.entry.js → p-b706619e.entry.js} +1 -1
  149. package/dist/ezui/p-bca406db.entry.js +1 -0
  150. package/dist/ezui/p-be06251d.entry.js +1 -0
  151. package/dist/ezui/{p-e7d03a0d.entry.js → p-bffae598.entry.js} +1 -1
  152. package/dist/ezui/p-d91527dc.entry.js +1 -0
  153. package/dist/ezui/p-dd257f17.entry.js +1 -0
  154. package/dist/ezui/p-e1148f5c.js +1 -0
  155. package/dist/ezui/p-e1f2b5da.entry.js +1 -0
  156. package/dist/ezui/p-e230bfd2.entry.js +1 -0
  157. package/dist/ezui/{p-5c721278.entry.js → p-e3ee814c.entry.js} +1 -1
  158. package/dist/ezui/p-e697ffd5.entry.js +1 -0
  159. package/dist/ezui/p-ec9decf2.entry.js +1 -0
  160. package/dist/ezui/p-f36dbc21.entry.js +1 -0
  161. package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +42 -9
  162. package/dist/types/components/ez-chip/ez-chip.d.ts +1 -1
  163. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +46 -1
  164. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -5
  165. package/dist/types/components/ez-date-input/ez-date-input.d.ts +0 -1
  166. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +0 -1
  167. package/dist/types/components/ez-dialog/DialogType.d.ts +1 -0
  168. package/dist/types/components/ez-dialog/ez-dialog.d.ts +3 -0
  169. package/dist/types/components/ez-form/DataBinder.d.ts +2 -2
  170. package/dist/types/components/ez-form/ez-form.d.ts +21 -11
  171. package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -3
  172. package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +2 -5
  173. package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +3 -3
  174. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +11 -0
  175. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +5 -1
  176. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRenderer.d.ts +9 -0
  177. package/dist/types/components/ez-grid/ez-grid.d.ts +8 -3
  178. package/dist/types/components/ez-grid/subcomponents/ez-select-box/ez-select-box.d.ts +2 -6
  179. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +43 -0
  180. package/dist/types/components/ez-modal-container/index.d.ts +2 -0
  181. package/dist/types/components/ez-modal-container/modal-action.d.ts +7 -0
  182. package/dist/types/components/ez-modal-container/modal-button-status.d.ts +6 -0
  183. package/dist/types/components/ez-popup/ez-popup.d.ts +4 -0
  184. package/dist/types/components/ez-search/ez-search.d.ts +3 -3
  185. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +2 -0
  186. package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +39 -0
  187. package/dist/types/components/ez-text-input/ez-text-input.d.ts +5 -0
  188. package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +5 -1
  189. package/dist/types/components.d.ts +266 -28
  190. package/dist/types/utils/ApplicationUtils.d.ts +1 -0
  191. package/dist/types/utils/CSSVarsUtils.d.ts +1 -0
  192. package/dist/types/utils/index.d.ts +1 -0
  193. package/package.json +5 -5
  194. package/react/components.d.ts +2 -0
  195. package/react/components.js +2 -0
  196. package/react/components.js.map +1 -1
  197. package/dist/ezui/p-3263a002.js +0 -1
  198. package/dist/ezui/p-3ae441ec.entry.js +0 -1
  199. package/dist/ezui/p-3ffdde40.entry.js +0 -1
  200. package/dist/ezui/p-416bedbe.entry.js +0 -1
  201. package/dist/ezui/p-47e06040.entry.js +0 -1
  202. package/dist/ezui/p-6cfe20a0.entry.js +0 -1
  203. package/dist/ezui/p-719e9ef9.entry.js +0 -1
  204. package/dist/ezui/p-787fbdfe.js +0 -1
  205. package/dist/ezui/p-7fe1ac9a.entry.js +0 -1
  206. package/dist/ezui/p-898b9906.js +0 -1
  207. package/dist/ezui/p-9c3c9da8.entry.js +0 -1
  208. package/dist/ezui/p-a27dafa4.entry.js +0 -1
  209. package/dist/ezui/p-a3ff4f0e.entry.js +0 -1
  210. package/dist/ezui/p-aba3fa6c.entry.js +0 -1
  211. package/dist/ezui/p-b3e978aa.entry.js +0 -1
  212. package/dist/ezui/p-cccd8cde.entry.js +0 -1
  213. package/dist/ezui/p-cf283c4a.entry.js +0 -1
  214. package/dist/ezui/p-d0671e14.entry.js +0 -1
  215. package/dist/ezui/p-e0f06d73.entry.js +0 -1
  216. package/dist/ezui/p-ed835b36.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import { D as DialogType } from './DialogType-72afa679.js';
1
+ import { D as DialogType } from './DialogType-4059dc4d.js';
2
2
 
3
3
  class ApplicationUtils {
4
4
  static async showDialog(title, message, icon = null, confirm, dialogType = DialogType.DEFAULT, options) {
@@ -20,6 +20,9 @@ class ApplicationUtils {
20
20
  static async error(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
21
21
  return ApplicationUtils.showDialog(title, message, icon, false, DialogType.CRITICAL, options);
22
22
  }
23
+ static async success(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
24
+ return ApplicationUtils.showDialog(title, message, icon, false, DialogType.SUCCESS, options);
25
+ }
23
26
  static async confirm(title, message, icon = null, dialogType = DialogType.WARN, options = ApplicationUtils.defaultMessageOptions) {
24
27
  return ApplicationUtils.showDialog(title, message, icon, true, dialogType, options);
25
28
  }
@@ -31,8 +34,9 @@ class ApplicationUtils {
31
34
  if (!toast) {
32
35
  toast = document.createElement("ez-toast");
33
36
  const icon = document.createElement("ez-icon");
34
- icon.className = "ez-margin-right--small toast__icon--color";
37
+ icon.className = "ez-margin-right--small";
35
38
  icon.slot = "icon";
39
+ icon.style.setProperty('--ez-icon--color', 'var(--color--success)');
36
40
  toast.appendChild(icon);
37
41
  window.document.body.appendChild(toast);
38
42
  }
@@ -1,4 +1,21 @@
1
1
  class CSSVarsUtils {
2
+ static applyCSSVars(document, host, child) {
3
+ const isSameDomain = (styleSheet) => {
4
+ if (!styleSheet.href) {
5
+ return true;
6
+ }
7
+ return styleSheet.href.indexOf(window.location.origin) === 0;
8
+ };
9
+ Array.from(document.styleSheets).filter(isSameDomain).forEach((sheet) => {
10
+ Array.from(sheet.cssRules).filter(rule => rule instanceof CSSStyleRule).forEach((rule) => {
11
+ Array.from(rule.style).forEach((propName) => {
12
+ if (propName.startsWith("--")) {
13
+ CSSVarsUtils.applyIfExists(host, child, propName);
14
+ }
15
+ });
16
+ });
17
+ });
18
+ }
2
19
  static applyVarsTextInput(host, child) {
3
20
  if (child) {
4
21
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
@@ -2,6 +2,7 @@ var DialogType;
2
2
  (function (DialogType) {
3
3
  DialogType["WARN"] = "warn";
4
4
  DialogType["CRITICAL"] = "critical";
5
+ DialogType["SUCCESS"] = "success";
5
6
  DialogType["DEFAULT"] = "default";
6
7
  })(DialogType || (DialogType = {}));
7
8
 
@@ -0,0 +1,117 @@
1
+ import { UserInterface } from '@sankhyalabs/core';
2
+ import { h } from './index-7bc778b3.js';
3
+
4
+ const buildTextArea = ({ name, label, readOnly }) => {
5
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small", key: name },
6
+ h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name })));
7
+ };
8
+
9
+ const buildTextInput = ({ name, label, readOnly }) => {
10
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
11
+ h("ez-text-input", { label: label, "data-field-name": name, key: name, enabled: !readOnly })));
12
+ };
13
+
14
+ const buildSwitch = (fieldConfig) => {
15
+ return buildField$1(fieldConfig.name, fieldConfig.label, fieldConfig.readOnly, true);
16
+ };
17
+ const buildCheckBox = (fieldConfig) => {
18
+ return buildField$1(fieldConfig.name, fieldConfig.label, fieldConfig.readOnly, false);
19
+ };
20
+ function buildField$1(fieldName, fieldLabel, readOnly, switchMode = false) {
21
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" },
22
+ h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? "switch" : "regular", "data-field-name": fieldName, key: fieldName })));
23
+ }
24
+
25
+ const buildComboBox = ({ name, label, readOnly, required }, properties) => {
26
+ const prop = properties === null || properties === void 0 ? void 0 : properties.options;
27
+ let options;
28
+ if (typeof prop === "string") {
29
+ const parsed = JSON.parse(prop);
30
+ options = Object.keys(parsed).map(key => { return { value: key, label: parsed[key] }; });
31
+ }
32
+ else {
33
+ options = prop;
34
+ }
35
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
36
+ h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name, options: options })));
37
+ };
38
+
39
+ const buildSearch = ({ name, label, readOnly, required }) => {
40
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
41
+ h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name })));
42
+ };
43
+
44
+ const buildFile = ({ name, label, readOnly }) => {
45
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" },
46
+ h("ez-upload", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
47
+ };
48
+
49
+ const buildDate = ({ name, label, readOnly }) => {
50
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
51
+ h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
52
+ };
53
+ const buildTime = ({ name, label }) => {
54
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
55
+ h("ez-time-input", { label: label, "data-field-name": name, key: name })));
56
+ };
57
+ const buildTimeDate = ({ name, label }) => {
58
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
59
+ h("ez-date-time-input", { label: label, "data-field-name": name, key: name })));
60
+ };
61
+
62
+ const buildDecimal = ({ name, label, readOnly }, properties) => {
63
+ const precision = Number((properties === null || properties === void 0 ? void 0 : properties.precision) || 2);
64
+ const prettyPrecision = Number((properties === null || properties === void 0 ? void 0 : properties.prettyPrecision) || precision);
65
+ return buildNumeric(name, label, readOnly, precision, prettyPrecision);
66
+ };
67
+ const buildInteger = ({ name, label, readOnly }) => {
68
+ return buildNumeric(name, label, readOnly, 0, 0);
69
+ };
70
+ function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision) {
71
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
72
+ h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, key: fieldName })));
73
+ }
74
+
75
+ const uiBuilders = new Map();
76
+ uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
77
+ uiBuilders.set(UserInterface.CHECKBOX, buildCheckBox);
78
+ uiBuilders.set(UserInterface.SWITCH, buildSwitch);
79
+ uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
80
+ uiBuilders.set(UserInterface.SEARCH, buildSearch);
81
+ uiBuilders.set(UserInterface.FILE, buildFile);
82
+ uiBuilders.set(UserInterface.DATE, buildDate);
83
+ uiBuilders.set(UserInterface.TIME, buildTime);
84
+ uiBuilders.set(UserInterface.DATETIME, buildTimeDate);
85
+ uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
86
+ uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
87
+ const buildField = (field) => {
88
+ const descriptor = field.descriptor;
89
+ const config = Object.assign({}, field.config);
90
+ let builder;
91
+ let props;
92
+ if (descriptor) {
93
+ if (!config.label) {
94
+ config.label = descriptor.label;
95
+ }
96
+ if (!config.name) {
97
+ config.name = descriptor.name;
98
+ }
99
+ if (config.required === undefined) {
100
+ config.required = descriptor.required;
101
+ }
102
+ if (config.readOnly === undefined) {
103
+ config.readOnly = descriptor.readOnly;
104
+ }
105
+ props = descriptor.properties;
106
+ builder = uiBuilders.get(descriptor.userInterface);
107
+ }
108
+ if (config.required) {
109
+ config.label = `${config.label} (obrigatório) *`;
110
+ }
111
+ if (!builder) {
112
+ builder = buildTextInput;
113
+ }
114
+ return builder(config, props);
115
+ };
116
+
117
+ export { buildField as b };
@@ -1,10 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7bc778b3.js';
2
2
  import { FloatingManager } from '@sankhyalabs/core';
3
- import './ApplicationUtils-5f87ae60.js';
4
- import { C as CSSVarsUtils } from './CSSVarsUtils-499b75c2.js';
5
- import './DialogType-72afa679.js';
3
+ import './ApplicationUtils-205ac4bc.js';
4
+ import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
5
+ import './DialogType-4059dc4d.js';
6
+ import './FieldBuilder-9e9545fc.js';
6
7
 
7
- const ezActionsButtonCss = ":host{--ez-actions-button__box--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__box--background-color:var(--background--xlight, #fff);--ez-actions-button__box--padding:var(--space-small, 6px);--ez-actions-button__box--top-margin:var(--space-extra-small, 3px);--ez-actions-button__action--min-width:400px;--ez-actions-button__action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.actions-list{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;z-index:var(--more-visible, 1);padding:var(--ez-actions-button__box--padding);margin-top:var(--ez-actions-button__box--top-margin);background-color:var(--ez-actions-button__box--background-color);border-radius:var(--ez-actions-button__box--border-radius);box-shadow:var(--ez-actions-button__box--box-shadow)}.btn-action{--ez-button--min-width:var(--ez-actions-button__action--min-width);--ez-button--background-color:var(--ez-actions-button__action--background-color)}";
8
+ const ezActionsButtonCss = ":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space-small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-extra-small, 3px);--ez-actions-button__btn-action--min-width:400px;--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__btn-action{--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-actions-button__icon-left{margin-left:var(--space-small, 6px)}.ez-actions-button__icon-right{margin-right:var(--space-small, 6px)}.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__arrow{position:absolute;top:-13px;left:10px;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:15px solid var(--ez-actions-button__btn-action--background-color);width:0;height:0}";
8
9
 
9
10
  let EzActionsButton = class {
10
11
  constructor(hostRef) {
@@ -14,14 +15,31 @@ let EzActionsButton = class {
14
15
  * Deixa o campo disponível ou não para interação com usuário.
15
16
  */
16
17
  this.enabled = true;
18
+ /**
19
+ * Define se o label será apresentado no display do componente.
20
+ */
21
+ this.showLabel = false;
22
+ /**
23
+ * Define se na opção selecionada apresentará um ícone de check.
24
+ */
25
+ this.checkOption = false;
26
+ /**
27
+ * Define se o background do botão será transparent.
28
+ */
29
+ this.isTransparent = false;
30
+ /**
31
+ * Define se o elemento contará com a seta de orientação
32
+ */
33
+ this.arrowActive = false;
17
34
  this.innerClickCheck = (floatingContainer, node) => {
35
+ var _a;
18
36
  if (node && floatingContainer) {
19
37
  if (node === floatingContainer) {
20
38
  return true;
21
39
  }
22
40
  const children = floatingContainer.children;
23
41
  for (let i = 0; i < children.length; i++) {
24
- if (children[i].shadowRoot.contains(node)) {
42
+ if ((_a = children[i].shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(node)) {
25
43
  return true;
26
44
  }
27
45
  }
@@ -29,25 +47,44 @@ let EzActionsButton = class {
29
47
  return false;
30
48
  };
31
49
  }
50
+ /**
51
+ * Oculta a lista de ações
52
+ */
53
+ async hideActions() {
54
+ if (this._floatingID != undefined) {
55
+ FloatingManager.close(this._floatingID);
56
+ }
57
+ this._floatingID = undefined;
58
+ }
59
+ /**
60
+ * Verifica se a lista de ações está oculta
61
+ */
62
+ async isOpened() {
63
+ return this._floatingID != undefined;
64
+ }
32
65
  showActions() {
66
+ var _a, _b;
33
67
  if (!this.enabled) {
34
68
  return;
35
69
  }
36
- this._floatingID = FloatingManager.float(this._actionsList, this._listContainer, { autoClose: true, innerClickTest: this.innerClickCheck });
70
+ const boundingHost = (_a = this._element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
71
+ let posLeft = boundingHost ? (boundingHost.x - (this.arrowActive ? 5 : 0)) + "px" : null;
72
+ let options = { autoClose: true, innerClickTest: this.innerClickCheck, isFixed: true, left: posLeft };
73
+ this._floatingID = FloatingManager.float(this._actionsList, this._listContainer, options);
37
74
  const docWidth = document.body.clientWidth;
38
- const bounding = this._actionsList.getBoundingClientRect();
39
- if (bounding.right > docWidth) {
40
- FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: (docWidth - bounding.width) + "px" });
75
+ const boundingList = (_b = this._actionsList) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
76
+ if ((boundingList === null || boundingList === void 0 ? void 0 : boundingList.right) > docWidth) {
77
+ posLeft = (docWidth - boundingList.width) + "px";
78
+ options = { autoClose: true, innerClickTest: this.innerClickCheck, left: posLeft };
79
+ FloatingManager.updateFloatPosition(this._actionsList, this._listContainer, options);
41
80
  }
42
81
  window.requestAnimationFrame(() => {
43
82
  this._actionsList.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
44
83
  });
45
84
  }
46
- hideActions() {
47
- if (this._floatingID != undefined) {
48
- FloatingManager.close(this._floatingID);
49
- }
50
- this._floatingID = undefined;
85
+ hasLabelOrCheckOption() {
86
+ var _a;
87
+ return (this.showLabel || this.checkOption) && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
51
88
  }
52
89
  //---------------------------------------------
53
90
  // Event handlers
@@ -56,6 +93,7 @@ let EzActionsButton = class {
56
93
  this.showActions();
57
94
  }
58
95
  actionClick(action) {
96
+ this._selectedAction = action;
59
97
  this.hideActions();
60
98
  this.ezAction.emit(action);
61
99
  }
@@ -86,9 +124,23 @@ let EzActionsButton = class {
86
124
  if (this._floatingID == undefined) {
87
125
  this._actionsList.remove();
88
126
  }
127
+ if (this.hasLabelOrCheckOption()) {
128
+ if (!!this.value) {
129
+ this._selectedAction = this.actions.find((action) => action.value === this.value);
130
+ }
131
+ else if (!!!this._selectedAction) {
132
+ this._selectedAction = this.actions[0];
133
+ }
134
+ }
89
135
  }
90
136
  render() {
91
- return (h(Host, null, h("ez-button", { ref: elem => this._button = elem, enabled: this.enabled, mode: "icon", iconName: "dots-vertical", size: this.size, onClick: () => this.handlerButtonClick() }), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "actions-list", ref: elem => this._actionsList = elem }, this.actions.map(action => h("ez-button", { class: "btn-action", size: "small", label: action.label, onClick: () => this.actionClick(action) }))))));
137
+ var _a;
138
+ return (h(Host, null, h("ez-button", { ref: elem => this._button = elem, class: this.isTransparent ? "ez-actions-button__btn-transparent" : "", label: this.showLabel && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.label), enabled: this.enabled, mode: this.showLabel ? "" : "icon", iconName: this.showLabel ? "" : this.iconName || "dots-vertical", size: this.size, onClick: () => this.handlerButtonClick() }, this.showLabel &&
139
+ h("ez-icon", { class: "ez-actions-button__icon-left", slot: "rightIcon", iconName: this.iconName || "dots-vertical" })), h("section", { class: "ez-actions-button__list-container", ref: elem => this._listContainer = elem }, h("div", { class: "ez-actions-button__actions-list", ref: elem => this._actionsList = elem }, this.arrowActive && h("div", { class: "ez-actions-button__arrow" }), this.actions.map(action => {
140
+ var _a;
141
+ return h("ez-button", { class: "ez-actions-button__btn-action", size: "small", label: action.label, onClick: () => this.actionClick(action) }, this.checkOption && ((_a = this._selectedAction) === null || _a === void 0 ? void 0 : _a.value) === action.value &&
142
+ h("ez-icon", { class: "ez-actions-button__icon-right", slot: "leftIcon", iconName: "check" }));
143
+ })))));
92
144
  }
93
145
  get _element() { return getElement(this); }
94
146
  };
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h } from './index-7bc778b3.js';
2
2
 
3
- const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:focus{outline:none;outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
3
+ const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
4
4
 
5
5
  let EzButton = class {
6
6
  constructor(hostRef) {
@@ -34,18 +34,20 @@ let EzButton = class {
34
34
  handleSlotChange(ev) {
35
35
  const slot = ev.target;
36
36
  const content = slot.assignedElements()[0];
37
- if (this.mode == "link") {
38
- content.style.display = "inline";
39
- if (slot.name == "leftIcon") {
40
- content.style.paddingRight = "var(--ez-button__inline__icon--padding)";
37
+ if (!!content) {
38
+ if (this.mode == "link") {
39
+ content.style.display = "inline";
40
+ if (slot.name == "leftIcon") {
41
+ content.style.paddingRight = "var(--ez-button__inline__icon--padding)";
42
+ }
43
+ else if (slot.name == "rightIcon") {
44
+ content.style.paddingLeft = "var(--ez-button__inline__icon--padding)";
45
+ }
41
46
  }
42
- else if (slot.name == "rightIcon") {
43
- content.style.paddingLeft = "var(--ez-button__inline__icon--padding)";
47
+ else {
48
+ content.style.setProperty("--ez-icon--color", "var(--ez-icon--color)");
44
49
  }
45
50
  }
46
- else {
47
- content.style.setProperty("--ez-icon--color", "var(--ez-icon--color)");
48
- }
49
51
  }
50
52
  render() {
51
53
  if (this.mode == "icon") {
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-7bc778b3.js';
2
2
  import { FloatingManager } from '@sankhyalabs/core';
3
3
 
4
- const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);padding:0px;font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
4
+ const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
5
5
 
6
6
  let EzCalendar = class {
7
7
  constructor(hostRef) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-7bc778b3.js';
2
2
 
3
- const ezChipCss = ":host{--ez-label-chip--height:30px;--ez-label-chip__label--font-size:var(--text--medium, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--text-weight--medium, 400);--ez-label-chip__label--space--medium:var(--space--medium, 12px);--ez-label-chip__label--title--primary:var(--title--primary, #2B3A54);--ez-label-chip__label--text--primary:var(--text--primary, #626e82);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:var(--color--strokes, #DCE0E8);--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-label-chip__label__container--background-color:var(--color--primary-300);--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--default--border-color--active:var(--color--primary, #007a5a);--ez-label-chip__label__container--default--background-color--hover:var(--color--primary-300, #f2faf8);--ez-label-chip__label__container--default--color--hover:var(--color--primary, #f2faf8);--ez-label-chip__label__container--text--disabled:var(--text--disable, #AFB6C0);--ez-label-chip__label__container--default--border-color--active:var(--color--primary)}.lbl{display:flex;align-items:center;font-weight:var(--ez-label-chip__label--font-weight);cursor:pointer;color:var(--ez-label-chip__label--title--primary);user-select:none;height:var(--ez-label-chip--height);font-family:var(--ez-label-chip__label--font-family);font-size:var(--ez-label-chip__label--font-size)}.lbl--active{color:var(--ez-label-chip__label__container--default--color--hover)}.lbl--disabled{color:var(--ez-label-chip__label__container--text--disabled)}.label__container{cursor:pointer;width:fit-content;display:flex;flex-wrap:wrap;align-items:center;background-color:#FFFFFF;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary);border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);border-color:var(--ez-label-chip__label__container--border-color-strokes);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium)}.label__content{display:flex;align-items:center;flex-wrap:wrap;--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--disabled{cursor:default;border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__container--active{border-color:var(--ez-label-chip__label__container--default--background-color--hover);background-color:var(--ez-label-chip__label__container--default--background-color--hover);color:var(--ez-label-chip__label__container--default--color--hover);fill:var(--ez-label-chip__label__container--default--color--hover);--ez-icon--color:var(--ez-label-chip__label__container--default--color--hover)}.label__container:hover{border-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__container--disabled:hover{cursor:default;border:var(--ez-label-chip__label__container--border);border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__content__icon{display:flex;cursor:pointer;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--row-reverse{flex-direction:row-reverse}.label__container .btn-close{padding:0px 0px 0px 8px}.label__container--row-reverse .btn-close{padding:0px 8px 0px 0px}.cursor-disable{cursor:default}ez-icon{--ez-icon--color:inherit}";
3
+ const ezChipCss = ":host{--ez-label-chip--height:30px;--ez-label-chip__label--font-size:var(--text--medium, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--text-weight--medium, 400);--ez-label-chip__label--space--medium:var(--space--medium, 12px);--ez-label-chip__label--title--primary:var(--title--primary, #2B3A54);--ez-label-chip__label--text--primary:var(--text--primary, #626e82);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:var(--color--strokes, #DCE0E8);--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-label-chip__label__container--background-color:var(--color--primary-300);--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--default--border-color--active:var(--color--primary, #007a5a);--ez-label-chip__label__container--default--background-color--hover:var(--color--primary-300, #f2faf8);--ez-label-chip__label__container--default--color--hover:var(--color--primary, #f2faf8);--ez-label-chip__label__container--text--disabled:var(--text--disable, #AFB6C0);--ez-label-chip__label__container--default--border-color--active:var(--color--primary)}.lbl{display:flex;white-space:nowrap;align-items:center;cursor:pointer;user-select:none;color:var(--ez-label-chip__label--title--primary);height:var(--ez-label-chip--height);font-family:var(--ez-label-chip__label--font-family);font-size:var(--ez-label-chip__label--font-size);font-weight:var(--ez-label-chip__label--font-weight)}.lbl--active{color:var(--ez-label-chip__label__container--default--color--hover)}.lbl--disabled{color:var(--ez-label-chip__label__container--text--disabled)}.label__container{cursor:pointer;width:max-content;display:flex;flex-wrap:wrap;align-items:center;background-color:#FFFFFF;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary);border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);border-color:var(--ez-label-chip__label__container--border-color-strokes);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium);outline-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__content{display:flex;align-items:center;flex-wrap:wrap;--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--disabled{cursor:default;border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__container--active{border-color:var(--ez-label-chip__label__container--default--background-color--hover);background-color:var(--ez-label-chip__label__container--default--background-color--hover);color:var(--ez-label-chip__label__container--default--color--hover);fill:var(--ez-label-chip__label__container--default--color--hover);--ez-icon--color:var(--ez-label-chip__label__container--default--color--hover)}.label__container:hover{border-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__container--disabled:hover{cursor:default;border:var(--ez-label-chip__label__container--border);border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__content__icon{display:flex;cursor:pointer;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--row-reverse{flex-direction:row-reverse}.label__container .btn-close{padding:0px 0px 0px 8px}.label__container--row-reverse .btn-close{padding:0px 8px 0px 0px}.cursor-disable{cursor:default}ez-icon{--ez-icon--color:inherit}";
4
4
 
5
5
  let EzChip = class {
6
6
  constructor(hostRef) {
@@ -61,16 +61,16 @@ let EzChip = class {
61
61
  }
62
62
  }
63
63
  observeValue() {
64
- (this.value && this.mode !== "action") ? this._divElem.classList.add("label__container--active") : this._divElem.classList.remove("label__container--active");
64
+ (this.value && this.mode !== "action") ? this._containerElem.classList.add("label__container--active") : this._containerElem.classList.remove("label__container--active");
65
65
  }
66
66
  observeEnabled() {
67
67
  if (this.enabled) {
68
- this._divElem.classList.remove("label__container--disabled");
68
+ this._containerElem.classList.remove("label__container--disabled");
69
69
  this._labelElem.classList.remove("lbl--disabled");
70
70
  this._labelElem.classList.remove("cursor-disable");
71
71
  }
72
72
  else {
73
- this._divElem.classList.add("label__container--disabled");
73
+ this._containerElem.classList.add("label__container--disabled");
74
74
  this._labelElem.classList.add("lbl--disabled");
75
75
  this._labelElem.classList.add("cursor-disable");
76
76
  }
@@ -79,13 +79,13 @@ let EzChip = class {
79
79
  // Lifecycle web component
80
80
  //---------------------------------------------
81
81
  componentDidLoad() {
82
- if (this._divElem) {
82
+ if (this._containerElem) {
83
83
  this.observeValue();
84
84
  this.observeEnabled();
85
85
  }
86
86
  }
87
87
  render() {
88
- return (h("div", { onClick: (ev) => this.handleClick(ev), class: "label__container" + (this.removePosition === "left" ? " label__container--row-reverse" : ""), ref: (el) => this._divElem = el }, h("div", { class: "label__content" }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), h("label", { class: "lbl " + (this.value ? "lbl--active " : ""), ref: (el) => this._labelElem = el }, this.label), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })), this.mode !== 'action' && this.removePosition && h("ez-icon", { class: "btn-close", size: "small", "icon-name": "close" })));
88
+ return (h("button", { onClick: (ev) => this.handleClick(ev), class: "label__container" + (this.removePosition === "left" ? " label__container--row-reverse" : ""), ref: (el) => this._containerElem = el }, h("div", { class: "label__content" }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), h("label", { class: "lbl " + (this.value ? "lbl--active " : ""), ref: (el) => this._labelElem = el }, this.label), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })), this.mode !== 'action' && this.removePosition && h("ez-icon", { class: "btn-close", size: "small", "icon-name": "close" })));
89
89
  }
90
90
  static get watchers() { return {
91
91
  "value": ["observeValue"],
@@ -1,11 +1,19 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-7bc778b3.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-7bc778b3.js';
2
+ import { A as ApplicationUtils } from './ApplicationUtils-205ac4bc.js';
3
+ import './DialogType-4059dc4d.js';
4
+ import './FieldBuilder-9e9545fc.js';
5
+ import '@sankhyalabs/core';
2
6
 
3
- const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--stretched{width:100%;justify-content:space-between}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
7
+ const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.collapsible-box__label ez-icon{visibility:hidden;transition:0.25s linear}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--stretched{width:100%;justify-content:space-between}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
4
8
 
5
9
  let EzCollapsibleBox = class {
6
10
  constructor(hostRef) {
7
11
  registerInstance(this, hostRef);
8
12
  this.ezChange = createEvent(this, "ezChange", 7);
13
+ this.ezRemove = createEvent(this, "ezRemove", 7);
14
+ this.ezSaveEditLabel = createEvent(this, "ezSaveEditLabel", 7);
15
+ this.ezEditLabelMode = createEvent(this, "ezEditLabelMode", 7);
16
+ this._activeEditText = false;
9
17
  /**
10
18
  * Valor externalizado que garante a exibição ou não do componente.
11
19
  */
@@ -22,9 +30,14 @@ let EzCollapsibleBox = class {
22
30
  * Define se o titulo irá ocupar toda a largura do componente.
23
31
  */
24
32
  this.stretchTitle = false;
25
- }
26
- observeCollapsedValue() {
27
- this.ezChange.emit(this.value);
33
+ /**
34
+ * Ativa o ícone para remoção do componente.
35
+ */
36
+ this.removable = false;
37
+ /**
38
+ * Ativa o ícone para edição do componente.
39
+ */
40
+ this.editable = false;
28
41
  }
29
42
  /**
30
43
  * Esconde ou revela o conteúdo do componente.
@@ -32,6 +45,23 @@ let EzCollapsibleBox = class {
32
45
  async showHide() {
33
46
  this.value = !this.value;
34
47
  }
48
+ /**
49
+ * Aplica focus no campo de edição de título.
50
+ */
51
+ async applyFocusTextEdit() {
52
+ var _a;
53
+ (_a = this._refTextEdit) === null || _a === void 0 ? void 0 : _a.applyFocusSelect();
54
+ }
55
+ /**
56
+ * Fecha a edição de título.
57
+ */
58
+ async cancelEdition() {
59
+ this._activeEditText = false;
60
+ this.ezEditLabelMode.emit(this._activeEditText);
61
+ }
62
+ observeCollapsedValue() {
63
+ this.ezChange.emit(this.value);
64
+ }
35
65
  /**
36
66
  * Retorna o tamanho configurado do texto e do ícone.
37
67
  */
@@ -42,12 +72,61 @@ let EzCollapsibleBox = class {
42
72
  const sizeCustom = sizeAlias.includes(sizeLowerCase) ? sizeLowerCase.replace('x', 'x-') : sizeLowerCase;
43
73
  return sizeList.includes(sizeCustom) ? sizeCustom : "small";
44
74
  }
75
+ removeElement() {
76
+ this._hostElement && this._hostElement.remove();
77
+ this.ezRemove.emit(this);
78
+ }
79
+ editLabel(evt) {
80
+ evt.preventDefault();
81
+ evt.stopPropagation();
82
+ this._activeEditText = true;
83
+ this.ezEditLabelMode.emit(this._activeEditText);
84
+ }
85
+ confirmRemove(evt) {
86
+ evt.preventDefault();
87
+ evt.stopPropagation();
88
+ ApplicationUtils.confirm("Aviso", `Deseja realmente remover o grupo <b>${this.label}</b>?`)
89
+ .then((canRemove) => {
90
+ if (canRemove) {
91
+ this.removeElement();
92
+ }
93
+ });
94
+ }
95
+ saveEditionText(editDetails) {
96
+ const { newValue } = editDetails.detail;
97
+ let canSave = true;
98
+ if (this.conditionalSave) {
99
+ canSave = this.conditionalSave(newValue);
100
+ }
101
+ if (this.label !== newValue && canSave) {
102
+ this.label = newValue;
103
+ this._activeEditText = false;
104
+ this.ezSaveEditLabel.emit(editDetails.detail);
105
+ this.ezEditLabelMode.emit(this._activeEditText);
106
+ }
107
+ }
108
+ getStyledLabel() {
109
+ if (this._refLabel == undefined) {
110
+ return;
111
+ }
112
+ let styledLabel = {
113
+ fontSize: window.getComputedStyle(this._refLabel).getPropertyValue('font-size'),
114
+ fontWeight: window.getComputedStyle(this._refLabel).getPropertyValue('font-weight'),
115
+ fontFamily: window.getComputedStyle(this._refLabel).getPropertyValue('font-family')
116
+ };
117
+ return styledLabel;
118
+ }
45
119
  render() {
46
- return (h("div", { class: "collapsible-box" }, h("div", { class: "collapsible-box__header" }, h("button", { onClick: () => this.showHide(), class: "collapsible-box__title" +
120
+ return (h("div", { class: "collapsible-box" }, h("div", { class: "collapsible-box__header" }, h("button", Object.assign({}, (!this._activeEditText ? { onClick: () => { this.showHide(); } } : null), { class: "collapsible-box__title" +
47
121
  (this.iconPlacement === "right" ? " collapsible-box__title--icon-right" : "") +
48
122
  (this.stretchTitle ? " collapsible-box__title--stretched" : "") +
49
- (this.value ? " collapsible-box__title--no-margin" : "") }, h("ez-icon", { slot: "icon", "icon-name": "chevron-right", size: this.getHeaderSize(), class: "collapsible-box__icon collapsible-box__icon--" + this.getHeaderSize() + (this.value ? " collapsible-box__icon--collapsed" : "") }), h("label", { class: "collapsible-box__label font--" + this.getHeaderSize(), title: this.label }, this.label))), h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") }, h("slot", null))));
123
+ (this.value ? " collapsible-box__title--no-margin" : "") }), h("ez-icon", { slot: "icon", "icon-name": "chevron-right", size: this.getHeaderSize(), class: "collapsible-box__icon collapsible-box__icon--" + this.getHeaderSize() + (this.value ? " collapsible-box__icon--collapsed" : "") }), !this._activeEditText ?
124
+ h("label", { class: "collapsible-box__label font--" + this.getHeaderSize(), title: this.label, ref: elem => this._refLabel = elem }, h("span", null, this.label), this.editable &&
125
+ h("ez-icon", { slot: "icon", "icon-name": "edit", onClick: (evt) => this.editLabel(evt), title: "Editar" }), this.removable &&
126
+ h("ez-icon", { slot: "icon", "icon-name": "delete", onClick: (evt) => this.confirmRemove(evt), title: "Remover" })) :
127
+ h("ez-text-edit", { class: "collapsible-box__text-edit", ref: ref => this._refTextEdit = ref, value: this.label, styled: this.getStyledLabel(), onSaveEdition: (ev) => this.saveEditionText(ev), onCancelEdition: () => this.cancelEdition() }))), h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") }, h("slot", null))));
50
128
  }
129
+ get _hostElement() { return getElement(this); }
51
130
  static get watchers() { return {
52
131
  "value": ["observeCollapsedValue"]
53
132
  }; }