@sankhyalabs/sankhyablocks 1.1.24 → 1.1.25

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 (180) hide show
  1. package/dist/cjs/ApplicationUtils-05b74ee9.js +39 -0
  2. package/dist/cjs/AssetsUtils-7e3c38f9.js +24 -0
  3. package/dist/cjs/CSSVarsUtils-75ca9c64.js +19 -0
  4. package/dist/cjs/ez-action-chip.cjs.entry.js +27 -0
  5. package/dist/cjs/ez-application.cjs.entry.js +26 -0
  6. package/dist/cjs/ez-button_4.cjs.entry.js +660 -0
  7. package/dist/cjs/ez-calendar.cjs.entry.js +223 -0
  8. package/dist/cjs/ez-collapsible-box.cjs.entry.js +47 -0
  9. package/dist/cjs/ez-combo-box.cjs.entry.js +278 -0
  10. package/dist/cjs/ez-date-input.cjs.entry.js +102 -0
  11. package/dist/cjs/ez-date-time-input.cjs.entry.js +145 -0
  12. package/dist/cjs/ez-dialog.cjs.entry.js +89 -0
  13. package/dist/cjs/ez-form.cjs.entry.js +463 -0
  14. package/dist/cjs/ez-grid.cjs.entry.js +647 -0
  15. package/dist/cjs/ez-icon.cjs.entry.js +41 -0
  16. package/dist/cjs/ez-label-chip.cjs.entry.js +104 -0
  17. package/dist/cjs/ez-modal_2.cjs.entry.js +316 -0
  18. package/dist/cjs/ez-number-input.cjs.entry.js +86 -0
  19. package/dist/cjs/ez-popover.cjs.entry.js +120 -0
  20. package/dist/cjs/ez-popup.cjs.entry.js +48 -0
  21. package/dist/cjs/ez-search.cjs.entry.js +64 -0
  22. package/dist/cjs/ez-tabselector.cjs.entry.js +198 -0
  23. package/dist/cjs/ez-text-area.cjs.entry.js +114 -0
  24. package/dist/cjs/ez-text-input.cjs.entry.js +201 -0
  25. package/dist/cjs/ez-time-input.cjs.entry.js +118 -0
  26. package/dist/cjs/ez-toast.cjs.entry.js +44 -0
  27. package/dist/cjs/ez-upload.cjs.entry.js +356 -0
  28. package/dist/cjs/index-682c98b2.js +1771 -0
  29. package/dist/cjs/loader.cjs.js +2 -2
  30. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  31. package/dist/cjs/snk-application.cjs.entry.js +6 -41
  32. package/dist/cjs/test-du.cjs.entry.js +76 -0
  33. package/dist/collection/collection-manifest.json +36 -1
  34. package/dist/collection/components/snk-application/snk-application.js +2 -1
  35. package/dist/{collection/temp → components}/ApplicationUtils.js +37 -36
  36. package/dist/components/AssetsUtils.js +22 -0
  37. package/dist/components/CSSVarsUtils.js +17 -0
  38. package/dist/components/ez-action-chip.js +44 -0
  39. package/dist/components/ez-application.js +39 -0
  40. package/dist/components/ez-button.js +6 -0
  41. package/dist/components/ez-button2.js +105 -0
  42. package/dist/components/ez-calendar.js +6 -0
  43. package/dist/components/ez-calendar2.js +242 -0
  44. package/dist/components/ez-check.js +6 -0
  45. package/dist/components/ez-check2.js +94 -0
  46. package/dist/components/ez-collapsible-box.js +67 -0
  47. package/dist/components/ez-combo-box.js +6 -0
  48. package/dist/components/ez-combo-box2.js +311 -0
  49. package/dist/components/ez-date-input.js +135 -0
  50. package/dist/components/ez-date-time-input.js +179 -0
  51. package/dist/components/ez-dialog.js +124 -0
  52. package/dist/components/ez-form.js +6 -0
  53. package/dist/components/ez-form2.js +485 -0
  54. package/dist/components/ez-grid.js +738 -0
  55. package/dist/components/ez-icon.js +6 -0
  56. package/dist/components/ez-icon2.js +56 -0
  57. package/dist/components/ez-label-chip.js +125 -0
  58. package/dist/components/ez-list.js +6 -0
  59. package/dist/components/ez-list2.js +523 -0
  60. package/dist/components/ez-modal.js +6 -0
  61. package/dist/components/ez-modal2.js +82 -0
  62. package/dist/components/ez-number-input.js +115 -0
  63. package/dist/components/ez-popover.js +145 -0
  64. package/dist/components/ez-popup.js +67 -0
  65. package/dist/components/ez-search.js +100 -0
  66. package/dist/components/ez-tabselector.js +6 -0
  67. package/dist/components/ez-tabselector2.js +213 -0
  68. package/dist/components/ez-text-area.js +137 -0
  69. package/dist/components/ez-text-input.js +6 -0
  70. package/dist/components/ez-text-input2.js +223 -0
  71. package/dist/components/ez-time-input.js +153 -0
  72. package/dist/components/ez-toast.js +64 -0
  73. package/dist/components/ez-upload.js +382 -0
  74. package/dist/components/grid-config.js +6 -0
  75. package/dist/components/grid-config2.js +318 -0
  76. package/dist/components/select-box.js +6 -0
  77. package/dist/components/select-box2.js +47 -0
  78. package/dist/components/snk-application.js +1 -36
  79. package/dist/components/test-du.js +101 -0
  80. package/dist/esm/ApplicationUtils-e0b6d857.js +37 -0
  81. package/dist/esm/AssetsUtils-6e6624dc.js +22 -0
  82. package/dist/esm/CSSVarsUtils-0787c3f3.js +17 -0
  83. package/dist/esm/ez-action-chip.entry.js +23 -0
  84. package/dist/esm/ez-application.entry.js +22 -0
  85. package/dist/esm/ez-button_4.entry.js +653 -0
  86. package/dist/esm/ez-calendar.entry.js +219 -0
  87. package/dist/esm/ez-collapsible-box.entry.js +43 -0
  88. package/dist/esm/ez-combo-box.entry.js +274 -0
  89. package/dist/esm/ez-date-input.entry.js +98 -0
  90. package/dist/esm/ez-date-time-input.entry.js +141 -0
  91. package/dist/esm/ez-dialog.entry.js +85 -0
  92. package/dist/esm/ez-form.entry.js +459 -0
  93. package/dist/esm/ez-grid.entry.js +643 -0
  94. package/dist/esm/ez-icon.entry.js +37 -0
  95. package/dist/esm/ez-label-chip.entry.js +100 -0
  96. package/dist/esm/ez-modal_2.entry.js +311 -0
  97. package/dist/esm/ez-number-input.entry.js +82 -0
  98. package/dist/esm/ez-popover.entry.js +116 -0
  99. package/dist/esm/ez-popup.entry.js +44 -0
  100. package/dist/esm/ez-search.entry.js +60 -0
  101. package/dist/esm/ez-tabselector.entry.js +194 -0
  102. package/dist/esm/ez-text-area.entry.js +110 -0
  103. package/dist/esm/ez-text-input.entry.js +197 -0
  104. package/dist/esm/ez-time-input.entry.js +114 -0
  105. package/dist/esm/ez-toast.entry.js +40 -0
  106. package/dist/esm/ez-upload.entry.js +352 -0
  107. package/dist/esm/index-35088a3f.js +1740 -0
  108. package/dist/esm/loader.js +2 -2
  109. package/dist/esm/sankhyablocks.js +2 -2
  110. package/dist/esm/snk-application.entry.js +2 -37
  111. package/dist/esm/test-du.entry.js +72 -0
  112. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +67 -0
  113. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +3 -0
  114. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +180 -0
  115. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +319 -0
  116. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +327 -0
  117. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +162 -0
  118. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +217 -0
  119. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +49 -0
  120. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
  121. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +527 -0
  122. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +5 -0
  123. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +31 -0
  124. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +129 -0
  125. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +10 -0
  126. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +176 -0
  127. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +139 -0
  128. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +335 -0
  129. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +358 -0
  130. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +4 -0
  131. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +44 -0
  132. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +405 -0
  133. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +3 -0
  134. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +138 -0
  135. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +165 -0
  136. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +196 -0
  137. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +10 -0
  138. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +127 -0
  139. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +568 -0
  140. package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +3 -0
  141. package/dist/sankhyablocks/p-0183d259.entry.js +1 -0
  142. package/dist/sankhyablocks/p-01f23a70.entry.js +1 -0
  143. package/dist/sankhyablocks/p-07c32f68.entry.js +1 -0
  144. package/dist/sankhyablocks/p-0f90499d.entry.js +1 -0
  145. package/dist/sankhyablocks/p-105724a3.entry.js +1 -0
  146. package/dist/sankhyablocks/p-2ac02d48.entry.js +1 -0
  147. package/dist/sankhyablocks/p-35364a97.entry.js +1 -0
  148. package/dist/sankhyablocks/p-3f6aa9a7.entry.js +1 -0
  149. package/dist/sankhyablocks/p-5f9af495.entry.js +1 -0
  150. package/dist/sankhyablocks/p-60967cf0.js +1 -0
  151. package/dist/sankhyablocks/p-6ce33b60.entry.js +57 -0
  152. package/dist/sankhyablocks/p-70ad6c16.entry.js +1 -0
  153. package/dist/sankhyablocks/p-710bfffe.entry.js +1 -0
  154. package/dist/sankhyablocks/p-735440c1.entry.js +1 -0
  155. package/dist/sankhyablocks/p-811b4b9d.js +1 -0
  156. package/dist/sankhyablocks/p-813fe4f7.js +1 -0
  157. package/dist/sankhyablocks/p-85a9446b.js +2 -0
  158. package/dist/sankhyablocks/p-89a1100f.entry.js +1 -0
  159. package/dist/sankhyablocks/p-8b543003.entry.js +1 -0
  160. package/dist/sankhyablocks/p-9750632b.entry.js +1 -0
  161. package/dist/sankhyablocks/p-a96272f7.entry.js +1 -0
  162. package/dist/sankhyablocks/p-ac8842e5.entry.js +1 -0
  163. package/dist/sankhyablocks/p-ba64cc41.entry.js +1 -0
  164. package/dist/sankhyablocks/p-c1ede043.entry.js +1 -0
  165. package/dist/sankhyablocks/p-d90ebb85.entry.js +1 -0
  166. package/dist/sankhyablocks/p-e17dfaae.entry.js +1 -0
  167. package/dist/sankhyablocks/p-e5355a29.entry.js +1 -0
  168. package/dist/sankhyablocks/p-ef04b633.entry.js +1 -0
  169. package/dist/sankhyablocks/p-f6db07fb.entry.js +1 -0
  170. package/dist/sankhyablocks/p-fcd9bd92.entry.js +1 -0
  171. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  172. package/package.json +1 -1
  173. package/react/components.d.ts +29 -0
  174. package/react/components.js +29 -0
  175. package/react/components.js.map +1 -1
  176. package/dist/cjs/index-4720dab8.js +0 -735
  177. package/dist/esm/index-72d4e2e0.js +0 -709
  178. package/dist/sankhyablocks/p-45635e4f.entry.js +0 -57
  179. package/dist/sankhyablocks/p-a33afc3b.js +0 -2
  180. package/dist/types/temp/ApplicationUtils.d.ts +0 -11
@@ -0,0 +1,660 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-682c98b2.js');
6
+
7
+ 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:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--text--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--background-color:var(--background--strong, 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(--ez-button--border);--ez-button--focus--box-shadow:none;--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:hover{background-color:var(--ez-button--hover--background-color)}button:focus{outline:none;border:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;cursor:no-drop}button.icon{padding:0px}button.small{width:32px;min-width:32px;height:32px}button.medium{width:42px;min-width:42px;height:42px}button.large{width:52px;min-width:52px;height:52px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--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)}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)}";
8
+
9
+ const EzButton = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * Deixa o botão disponível ou não para interação com o usuário.
14
+ */
15
+ this.enabled = true;
16
+ /**
17
+ * Define o modo de uso do botão; opções: icon, link e regular
18
+ */
19
+ this.mode = "regular";
20
+ /**
21
+ * É possível escolher entre [small,medium,large] (somente para os modos "icon" e "link")
22
+ */
23
+ this.size = "medium";
24
+ }
25
+ /**
26
+ * Realiza o foco no botão
27
+ */
28
+ async setFocus() {
29
+ this._button.focus();
30
+ }
31
+ /**
32
+ * Remove o foco no botão
33
+ */
34
+ async setBlur() {
35
+ this._button.blur();
36
+ }
37
+ getIconSize() {
38
+ return this.size;
39
+ }
40
+ handleSlotChange(ev) {
41
+ const slot = ev.target;
42
+ const content = slot.assignedElements()[0];
43
+ if (this.mode == "link") {
44
+ content.style.display = "inline";
45
+ if (slot.name == "leftIcon") {
46
+ content.style.paddingRight = "var(--ez-button__inline__icon--padding)";
47
+ }
48
+ else if (slot.name == "rightIcon") {
49
+ content.style.paddingLeft = "var(--ez-button__inline__icon--padding)";
50
+ }
51
+ }
52
+ else {
53
+ content.style.setProperty('--ez-icon--color', 'var(--ez-icon--color)');
54
+ }
55
+ }
56
+ render() {
57
+ if (this.mode == "icon") {
58
+ return (index.h("button", { class: "icon " + this.size, type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, index.h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize(), onClick: evt => {
59
+ if (!this.enabled)
60
+ evt.stopPropagation();
61
+ } })));
62
+ }
63
+ else if (this.mode == "label-icon") {
64
+ return (index.h("div", { class: "label-icon" }, index.h("button", { class: "icon", type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, index.h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: "large", onClick: evt => {
65
+ if (!this.enabled)
66
+ evt.stopPropagation();
67
+ } })), index.h("label", { title: this.label }, this.label)));
68
+ }
69
+ else if (this.mode == "link") {
70
+ return (index.h("a", { class: this.size, ref: (el) => this._button = el }, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
71
+ }
72
+ else {
73
+ return (index.h("button", { type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
74
+ }
75
+ }
76
+ };
77
+ EzButton.style = ezButtonCss;
78
+
79
+ const ezCheckCss = ":host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:20px;--ez-switch--pin--height:20px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--checked--background-color:var(--color--primary-300);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-secondary);--ez-switch--pin--checked--background-color:var(--color--primary);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regularMode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.regularMode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regularMode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regularMode:disabled{cursor:auto;background:none}input.regularMode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regularMode:disabled::before{border:var(--ez-check--disabled--border)}input.regularMode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regularMode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regularMode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regularMode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regularMode:checked::after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regularMode:checked:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switchMode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--text--secondary, #a2abb9);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switchMode:disabled{background-color:var(--ez-switch--disabled--background-color)}input.switchMode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(-2px) translateY(-3px);border-radius:50%;width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switchMode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color)}input.switchMode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switchMode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width))/2);background-color:var(--ez-switch--pin--focus--background-color)}input.switchMode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switchMode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width)))}input.switchMode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-3px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color)}input.switchMode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);text-shadow:var(--text-shadow);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}";
80
+
81
+ const EzCheck = class {
82
+ constructor(hostRef) {
83
+ index.registerInstance(this, hostRef);
84
+ this.ezChange = index.createEvent(this, "ezChange", 7);
85
+ /**
86
+ * Deixa o campo disponível ou não para interação com o usuário.
87
+ */
88
+ this.enabled = true;
89
+ /**
90
+ * Existem dois modos de visualização: regular e switch.
91
+ * Se esta propriedade for omitida, o componete assume o formato "regular".
92
+ * No modo "regular" a visualização é a tradicional de uma caixinha marcada/desmarcada.
93
+ * No modo "switch" o campo tem uma interface em formato de um pino liga/desliga.
94
+ */
95
+ this.mode = "regular";
96
+ }
97
+ adjustMode() {
98
+ if (this.mode === "switch") {
99
+ this._inputElem.classList.remove("regularMode");
100
+ this._inputElem.classList.add("switchMode");
101
+ }
102
+ else {
103
+ this._inputElem.classList.remove("switchMode");
104
+ this._inputElem.classList.add("regularMode");
105
+ }
106
+ }
107
+ //---------------------------------------------
108
+ // Public methods
109
+ //---------------------------------------------
110
+ /**
111
+ * Devolve o modo escolhido para o componente
112
+ */
113
+ async getMode() {
114
+ return this.mode;
115
+ }
116
+ /**
117
+ * Faz o foco no componente de input
118
+ */
119
+ async setFocus() {
120
+ this._inputElem.focus();
121
+ }
122
+ componentDidLoad() {
123
+ this.adjustMode();
124
+ }
125
+ changeValue() {
126
+ if (!this.enabled) {
127
+ return;
128
+ }
129
+ this.value = !this.value;
130
+ this.ezChange.emit(this.value);
131
+ }
132
+ getLabelClasses() {
133
+ let classes = "label";
134
+ if (!this.enabled) {
135
+ classes += " label--disabled";
136
+ }
137
+ return classes;
138
+ }
139
+ render() {
140
+ return (index.h(index.Host, null, index.h("input", { type: "checkbox", class: "regularMode", checked: this.value === true, onChange: () => { this.changeValue(); }, disabled: !this.enabled, ref: (el) => this._inputElem = el }), this.label ? index.h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
141
+ }
142
+ static get watchers() { return {
143
+ "mode": ["adjustMode"]
144
+ }; }
145
+ };
146
+ EzCheck.style = ezCheckCss;
147
+
148
+ const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon__padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item__margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Sora\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item__border-radius:var(--border--radius-small, 6px);--ez-list__selected-item__background:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Sora\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group__overlay--font-family:var(--font-pattern, \"Sora\");--ez-list__group__overlay--font-size:var(--text--medium, 14px);--ez-list__group-container__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__group-container__scrollbar--width:var(--space--medium, 12px);--ez-list__group-container__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__draggable__list--padding-bottom:var(--space--small, 6px);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__draggable__scrollbar--width:var(--space--medium, 12px);--ez-list__draggable__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__draggable__icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{display:flex;align-items:center;border-top:1px dashed #fff;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:center;align-items:center}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%}.draggable-list li{background-color:#fff;display:flex;margin:var(--ez-list__item__margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);height:32px}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:#f0f2f5}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--ez-list__icon--color);width:18px;height:18px;-webkit-mask-image:var(--ez-list__draggable__icon--image);mask-image:var(--ez-list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%}.group-name{font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom);-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar-track{background-color:#f0f2f5}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__group-container__scrollbar--background-color);border-radius:var(--ez-list__group-container__scrollbar--border-radius)}.group-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__group-container__scrollbar--width);max-width:var(--ez-list__group-container__scrollbar--width);min-width:var(--ez-list__group-container__scrollbar--width)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar-track{background-color:#f0f2f5}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.items-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.group-overlay{font-family:var(--ez-list__group__overlay--font-family);font-size:var(--ez-list__group__overlay--font-size);background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item__background);border-radius:var(--ez-list__selected-item__border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
149
+
150
+ const EzList = class {
151
+ constructor(hostRef) {
152
+ index.registerInstance(this, hostRef);
153
+ this.ezChange = index.createEvent(this, "ezChange", 7);
154
+ this._listItems = [];
155
+ this._listGroupItems = [];
156
+ this._listItemsHistory = [];
157
+ /**
158
+ * Define a lista inicial do componente.
159
+ */
160
+ this.dataSource = [];
161
+ /**
162
+ * Define se o componente renderizará os itens separados em grupos..
163
+ */
164
+ this.useGroups = false;
165
+ /**
166
+ * Define se o componente terá o comportamento de arrasto de linhas.
167
+ */
168
+ this.ezDraggable = false;
169
+ /**
170
+ * Define se os items da lista serão selecionáveis.
171
+ */
172
+ this.ezSelectable = false;
173
+ }
174
+ createList() {
175
+ if (this.useGroups) {
176
+ let list = [...this.dataSource];
177
+ list.forEach(itemGroup => {
178
+ this.sortGroup(itemGroup);
179
+ });
180
+ this._listGroupItems = list;
181
+ }
182
+ else {
183
+ this._listItems = this._listItemsHistory.length > 0 ? this._listItemsHistory : [...this.dataSource];
184
+ }
185
+ }
186
+ sortGroup(itemGroup) {
187
+ if (itemGroup.sort) {
188
+ itemGroup.items.sort(function (a, b) {
189
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
190
+ });
191
+ if (itemGroup.sort === "DSC") {
192
+ itemGroup.items.reverse();
193
+ }
194
+ }
195
+ }
196
+ /**
197
+ * Recebe como argumento um ListItem {label: string} e um booleano que define se o componente deve fazer scroll para exibir o item específico (opcional).
198
+ */
199
+ async setSelection(selectedItem, scrollToOption) {
200
+ if (selectedItem && this.ezSelectable) {
201
+ if (this.useGroups) {
202
+ let newList = [...this._listGroupItems];
203
+ newList.forEach(groupItem => {
204
+ groupItem.items.forEach(item => {
205
+ if (item.label == selectedItem.label) {
206
+ item.selected = true;
207
+ }
208
+ else {
209
+ item.selected = false;
210
+ }
211
+ });
212
+ });
213
+ this._listGroupItems = newList;
214
+ }
215
+ else {
216
+ let newList = [...this._listItems];
217
+ newList.forEach(item => {
218
+ if (item.label === selectedItem.label) {
219
+ item.selected = true;
220
+ }
221
+ else {
222
+ item.selected = false;
223
+ }
224
+ });
225
+ this._listItems = newList;
226
+ }
227
+ if (scrollToOption) {
228
+ let liElem = this.useGroups ?
229
+ this._groupContainer.querySelector('li#item_' + this.getItemId(selectedItem.label))
230
+ : this._itemContainer.querySelector('li#item_' + this.getItemId(selectedItem.label));
231
+ if (liElem) {
232
+ liElem.scrollIntoView();
233
+ }
234
+ }
235
+ }
236
+ else {
237
+ this.removeSelection();
238
+ }
239
+ }
240
+ removeSelection() {
241
+ if (this.useGroups) {
242
+ let newList = [...this._listGroupItems];
243
+ newList.forEach(groupItem => {
244
+ groupItem.items.forEach(item => {
245
+ item.selected = false;
246
+ });
247
+ });
248
+ this._listGroupItems = newList;
249
+ }
250
+ else {
251
+ let newList = [...this._listItems];
252
+ newList.forEach(item => {
253
+ item.selected = false;
254
+ });
255
+ this._listItems = newList;
256
+ }
257
+ }
258
+ /**
259
+ * Retorna o item selecionado.
260
+ */
261
+ async getSelection() {
262
+ let selectedItem;
263
+ if (this.useGroups) {
264
+ this._listGroupItems.every(group => {
265
+ let item = group.items.find((item) => item.selected == true);
266
+ if (item) {
267
+ selectedItem = item;
268
+ return false;
269
+ }
270
+ return true;
271
+ });
272
+ }
273
+ else {
274
+ selectedItem = this._listItems.find((item) => item.selected == true);
275
+ }
276
+ return selectedItem;
277
+ }
278
+ /**
279
+ * Retorna a lista de items conforme o modo de uso.
280
+ */
281
+ async getList() {
282
+ if (this.useGroups) {
283
+ return this._listGroupItems;
284
+ }
285
+ return this._listItems;
286
+ }
287
+ componentWillLoad() {
288
+ this._listItemsHistory = [];
289
+ }
290
+ componentWillRender() {
291
+ this.createList();
292
+ }
293
+ onDrop(ev, dragEndItem) {
294
+ this.removeOverClass();
295
+ this.setSelection(undefined);
296
+ if (this._dragStartItem) {
297
+ if (this.useGroups) {
298
+ let newList = [...this._listGroupItems];
299
+ let groupEnd = this._listGroupItems.find(group => dragEndItem.groupName == group.group);
300
+ //Remove item arrastado
301
+ newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
302
+ //Adiciona item arrastado
303
+ if (groupEnd.sort) {
304
+ newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
305
+ newList.find(group => group.group == dragEndItem.groupName).items.sort(function (a, b) {
306
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
307
+ });
308
+ if (groupEnd.sort === "DSC") {
309
+ newList.find(group => group.group == dragEndItem.groupName).items.reverse();
310
+ }
311
+ }
312
+ else {
313
+ let indexForAdd = (dragEndItem.index > this._dragStartItem.index) ? dragEndItem.index - 1 : dragEndItem.index;
314
+ newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
315
+ }
316
+ this._listGroupItems = newList;
317
+ this.ezChange.emit(this._listGroupItems);
318
+ }
319
+ else {
320
+ let newList = [...this._listItems];
321
+ newList.splice(this._dragStartItem.index, 1);
322
+ newList.splice(dragEndItem.index, 0, this._dragStartItem.item);
323
+ this._listItems = newList;
324
+ this._listItemsHistory = newList;
325
+ this.ezChange.emit(this._listItems);
326
+ }
327
+ }
328
+ ev.stopPropagation();
329
+ }
330
+ onDropLastIndex(ev, groupDropped) {
331
+ this.removeOverClass();
332
+ this.setSelection(undefined);
333
+ if (this._dragStartItem) {
334
+ if (this.useGroups) {
335
+ let newList = [...this._listGroupItems];
336
+ let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
337
+ //Remove item arrastado
338
+ newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
339
+ //Adiciona item arrastado
340
+ newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
341
+ if (groupEnd.sort) {
342
+ newList.find(group => group.group == groupDropped.group).items.sort(function (a, b) {
343
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
344
+ });
345
+ if (groupEnd.sort === "DSC") {
346
+ newList.find(group => group.group == groupDropped.group).items.reverse();
347
+ }
348
+ }
349
+ this._listGroupItems = newList;
350
+ this.ezChange.emit(this._listGroupItems);
351
+ }
352
+ else {
353
+ let newList = [...this._listItems];
354
+ newList.splice(this._dragStartItem.index, 1);
355
+ newList.push(this._dragStartItem.item);
356
+ this._listItems = newList;
357
+ this._listItemsHistory = newList;
358
+ this.ezChange.emit(this._listItems);
359
+ }
360
+ }
361
+ ev.stopPropagation();
362
+ }
363
+ onDropGroup(groupSelected) {
364
+ var _a;
365
+ let newList = [...this._listGroupItems];
366
+ this.setSelection(undefined);
367
+ let newGroup = newList.find(group => group.group === groupSelected.group);
368
+ if (newGroup) {
369
+ if (((_a = newGroup.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
370
+ let newItem;
371
+ newGroup.items.forEach((item, index) => {
372
+ if (item.label === this._dragStartItem.item.label) {
373
+ newItem = { item: item, index: index };
374
+ }
375
+ });
376
+ if (newItem) {
377
+ newGroup.items.splice(newItem.index, 1);
378
+ newGroup.items.unshift(newItem.item);
379
+ this.sortGroup(newGroup);
380
+ }
381
+ else {
382
+ newGroup.items.unshift(this._dragStartItem.item);
383
+ this.sortGroup(newGroup);
384
+ newList.find(group => group.group === this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
385
+ }
386
+ }
387
+ else {
388
+ newList.find(group => group.group === this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
389
+ newGroup.items = [this._dragStartItem.item];
390
+ }
391
+ this._listGroupItems = newList;
392
+ }
393
+ }
394
+ onDragEnd() {
395
+ this._dragStartItem = undefined;
396
+ if (this.useGroups) {
397
+ this.hideOverlays();
398
+ }
399
+ if (this._draggingElement) {
400
+ try {
401
+ this._element.shadowRoot.removeChild(this._draggingElement);
402
+ }
403
+ catch (err) { }
404
+ this._draggingElement = undefined;
405
+ }
406
+ }
407
+ addOverClass(element) {
408
+ if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains("draggable")) {
409
+ element.classList.add('over');
410
+ }
411
+ else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains("draggable-list")) {
412
+ this.addOverClass(element.parentElement);
413
+ }
414
+ }
415
+ addOverGroupClass(ev, group) {
416
+ if (ev.target) {
417
+ let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
418
+ let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
419
+ if (group.items.length > 0) {
420
+ groupOverlay.setAttribute("style", "display:grid");
421
+ }
422
+ else {
423
+ groupOverlay.classList.add("presetedHeight");
424
+ groupOverlay.setAttribute("style", "display:grid");
425
+ groupOverlay.scrollIntoView(false);
426
+ }
427
+ }
428
+ }
429
+ removeOverClass() {
430
+ var _a, _b;
431
+ let overCollection;
432
+ let overLastDroppableCollection;
433
+ if (this.useGroups) {
434
+ overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('over');
435
+ overLastDroppableCollection = this._groupContainer.getElementsByClassName('last-droppable-space');
436
+ }
437
+ else {
438
+ overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName('over');
439
+ overLastDroppableCollection = this._itemContainer.getElementsByClassName('last-droppable-space');
440
+ }
441
+ if (overCollection) {
442
+ Array.from(overCollection).forEach(function (element) {
443
+ element.classList.remove('over');
444
+ });
445
+ }
446
+ if (overLastDroppableCollection) {
447
+ Array.from(overLastDroppableCollection).forEach(function (element) {
448
+ element.classList.remove('over');
449
+ });
450
+ }
451
+ }
452
+ removeOverGroupClass(ev, group) {
453
+ if (ev.target) {
454
+ let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
455
+ let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
456
+ if (groupOverlay) {
457
+ groupOverlay.classList.remove("presetedHeight");
458
+ groupOverlay.setAttribute("style", "display:none");
459
+ }
460
+ }
461
+ }
462
+ onDragStart(item, group, index) {
463
+ if (this._changeDeboucingTimeout) {
464
+ window.clearTimeout(this._changeDeboucingTimeout);
465
+ }
466
+ if (this.useGroups) {
467
+ this._dragStartItem = { groupName: group.group, item: item, index: index };
468
+ this._changeDeboucingTimeout = window.setTimeout(() => {
469
+ this.showOverlays(group);
470
+ }, 10);
471
+ }
472
+ else {
473
+ this._dragStartItem = { item: item.item, index: item.index };
474
+ }
475
+ }
476
+ selectFirstItem() {
477
+ if (this.useGroups) {
478
+ this.setSelection(this._listGroupItems[0].items[0]);
479
+ }
480
+ {
481
+ this.setSelection(this._listItems[0]);
482
+ }
483
+ }
484
+ nextOption(selectedItem) {
485
+ let nextItem = undefined;
486
+ if (this.useGroups) {
487
+ this._listGroupItems.every((group, groupIndex, listGroupItems) => {
488
+ let item = undefined;
489
+ let itemIndex = group.items.findIndex(item => item.label == selectedItem.label);
490
+ if (itemIndex != undefined && itemIndex != -1) {
491
+ if (itemIndex === group.items.length - 1) {
492
+ if (groupIndex + 1 <= listGroupItems.length - 1) {
493
+ item = { label: listGroupItems[groupIndex + 1].items[0].label };
494
+ }
495
+ }
496
+ else {
497
+ item = { label: group.items[itemIndex + 1].label };
498
+ }
499
+ }
500
+ if (item != undefined) {
501
+ nextItem = item;
502
+ return false;
503
+ }
504
+ return true;
505
+ });
506
+ }
507
+ else {
508
+ let itemIndex = this._listItems.findIndex(item => item.label === selectedItem.label);
509
+ if (itemIndex >= 0 && itemIndex < this._listItems.length) {
510
+ nextItem = this._listItems[itemIndex + 1];
511
+ }
512
+ }
513
+ this.setSelection(nextItem, true);
514
+ }
515
+ previousOption(selectedItem) {
516
+ let previousItem = undefined;
517
+ if (this.useGroups) {
518
+ this._listGroupItems.every((group, groupIndex, listGroupItems) => {
519
+ let item = undefined;
520
+ let itemIndex = group.items.findIndex(item => item.label == selectedItem.label);
521
+ if (itemIndex != undefined && itemIndex != -1) {
522
+ if (itemIndex === 0) {
523
+ if ((groupIndex - 1 >= 0)) {
524
+ item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
525
+ }
526
+ }
527
+ else {
528
+ item = { label: group.items[itemIndex - 1].label };
529
+ }
530
+ }
531
+ if (item != undefined) {
532
+ previousItem = item;
533
+ return false;
534
+ }
535
+ return true;
536
+ });
537
+ }
538
+ else {
539
+ let itemIndex = this._listItems.findIndex(item => item.label === selectedItem.label);
540
+ if (itemIndex > 0 && itemIndex < this._listItems.length) {
541
+ previousItem = this._listItems[itemIndex - 1];
542
+ }
543
+ }
544
+ this.setSelection(previousItem, true);
545
+ }
546
+ keyDownHandler(event) {
547
+ event.preventDefault();
548
+ this.getSelection().then(selectedItem => {
549
+ if (selectedItem) {
550
+ switch (event.key) {
551
+ case "ArrowDown":
552
+ this.nextOption(selectedItem);
553
+ break;
554
+ case "ArrowUp":
555
+ this.previousOption(selectedItem);
556
+ break;
557
+ }
558
+ }
559
+ else {
560
+ this.selectFirstItem();
561
+ }
562
+ });
563
+ event.stopPropagation();
564
+ }
565
+ getItemId(itemLabel) {
566
+ if (itemLabel) {
567
+ return itemLabel.replace(/[^a-z0-9_]/gi, "_");
568
+ }
569
+ return undefined;
570
+ }
571
+ getDivGroupId(groupName) {
572
+ if (groupName) {
573
+ return "group-" + groupName.replace(/[^a-z0-9_]/gi, "_");
574
+ }
575
+ return undefined;
576
+ }
577
+ getGroupOverlayId(groupName) {
578
+ if (groupName) {
579
+ return "group-overlay-" + groupName.replace(/[^a-z0-9_]/gi, "_");
580
+ }
581
+ return undefined;
582
+ }
583
+ onDragOverGroup(event, group) {
584
+ if (this._dragStartItem && this._dragStartItem.groupName !== group.group && group.sort) {
585
+ event.preventDefault();
586
+ this.addOverGroupClass(event, group);
587
+ }
588
+ }
589
+ onDragOverItem(event) {
590
+ if (this._dragStartItem) {
591
+ event.preventDefault();
592
+ this.addOverClass(event.target);
593
+ event.stopPropagation();
594
+ }
595
+ }
596
+ onDragOverLastIndex(ev) {
597
+ ev.preventDefault();
598
+ if (this._dragStartItem) {
599
+ ev.target.classList.add('over');
600
+ ev.stopPropagation();
601
+ }
602
+ }
603
+ showOverlays(groupDragStart) {
604
+ let groupOverlayCollection = this._groupContainer.getElementsByClassName("group-overlay");
605
+ Array.from(groupOverlayCollection).forEach(groupOverlay => {
606
+ let groupOverlayID = this.getGroupOverlayId(groupDragStart.group);
607
+ if (groupOverlayID && groupOverlay.getAttribute("id") && groupOverlayID != groupOverlay.getAttribute("id")) {
608
+ groupOverlay.classList.add("presetedHeight");
609
+ groupOverlay.setAttribute("style", "display:grid");
610
+ }
611
+ });
612
+ }
613
+ hideOverlays() {
614
+ var _a;
615
+ let groupOverlayCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName("group-overlay");
616
+ Array.from(groupOverlayCollection).forEach(groupOverlay => {
617
+ groupOverlay.classList.remove("presetedHeight");
618
+ groupOverlay.setAttribute("style", "display:none");
619
+ });
620
+ }
621
+ render() {
622
+ return (index.h(index.Host, { ref: (el) => this._element = el }, this.useGroups ?
623
+ index.h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
624
+ return index.h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, index.h("label", { draggable: false, class: "group-name" }, group.group), index.h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, index.h("div", { class: "group-items-container" }, index.h("div", { class: "draggable-list" }, group.items.map((item, index$1) => {
625
+ return index.h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, index.h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: () => { group.sort ? undefined : this.removeOverClass(); }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index$1), onDragOver: (event) => { group.sort ? undefined : this.onDragOverItem(event); }, onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
626
+ index.h("div", { class: "slot-item" }, this.itemSlotBuilder(item, group))
627
+ : undefined));
628
+ })), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event, group) })), group.sort ?
629
+ index.h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)
630
+ : undefined));
631
+ }))
632
+ :
633
+ index.h("div", { class: "items-container", ref: (el) => this._itemContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, index.h("div", { class: "draggable-list" }, this._listItems.map((item, index$1) => {
634
+ return index.h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, index.h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onClick: () => { this.setSelection(item); }, onDragLeave: () => this.removeOverClass(), onDragOver: (event) => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
635
+ index.h("div", null, this.itemSlotBuilder(item))
636
+ : undefined));
637
+ }), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event) })))));
638
+ }
639
+ };
640
+ EzList.style = ezListCss;
641
+
642
+ const selectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
643
+
644
+ const SelectBox = class {
645
+ constructor(hostRef) {
646
+ index.registerInstance(this, hostRef);
647
+ this.ezChange = index.createEvent(this, "ezChange", 7);
648
+ this.selectedOption = { value: "na", label: "N/A" };
649
+ }
650
+ render() {
651
+ return (index.h("ez-combo-box", { class: "grid-config-combo inverted", label: "", value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, index.h("option", { value: "na" }, "N/A"), index.h("option", { value: "asc" }, "A-Z"), index.h("option", { value: "desc" }, "Z-A")));
652
+ }
653
+ static get assetsDirs() { return ["../assets"]; }
654
+ };
655
+ SelectBox.style = selectBoxCss;
656
+
657
+ exports.ez_button = EzButton;
658
+ exports.ez_check = EzCheck;
659
+ exports.ez_list = EzList;
660
+ exports.select_box = SelectBox;