@sankhyalabs/ezui 1.2.0-beta.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/cjs/{ApplicationUtils-2ac1b73e.js → ApplicationUtils-edc62c5c.js} +4 -1
  2. package/dist/cjs/CheckMode-ecb90b87.js +7 -0
  3. package/dist/cjs/{DialogType-a1e288e6.js → DialogType-aa435c52.js} +1 -0
  4. package/dist/cjs/ez-actions-button.cjs.entry.js +68 -17
  5. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-button.cjs.entry.js +13 -11
  7. package/dist/cjs/ez-calendar.cjs.entry.js +5 -5
  8. package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-check.cjs.entry.js +11 -9
  10. package/dist/cjs/ez-chip.cjs.entry.js +17 -7
  11. package/dist/cjs/ez-collapsible-box.cjs.entry.js +85 -7
  12. package/dist/cjs/ez-combo-box.cjs.entry.js +51 -20
  13. package/dist/cjs/ez-date-input.cjs.entry.js +13 -18
  14. package/dist/cjs/ez-date-time-input.cjs.entry.js +12 -17
  15. package/dist/cjs/ez-dialog.cjs.entry.js +43 -8
  16. package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-form.cjs.entry.js +99 -486
  18. package/dist/cjs/ez-grid-config.cjs.entry.js +8 -9
  19. package/dist/cjs/ez-grid.cjs.entry.js +1073 -1168
  20. package/dist/cjs/ez-icon.cjs.entry.js +3 -3
  21. package/dist/cjs/ez-list.cjs.entry.js +2 -4
  22. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-modal-container.cjs.entry.js +58 -0
  24. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-number-input.cjs.entry.js +4 -4
  26. package/dist/cjs/ez-popover.cjs.entry.js +6 -6
  27. package/dist/cjs/ez-popup.cjs.entry.js +8 -4
  28. package/dist/cjs/ez-radio-button.cjs.entry.js +3 -3
  29. package/dist/cjs/ez-scroller.cjs.entry.js +2 -2
  30. package/dist/cjs/ez-search.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-select-box.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-tabselector.cjs.entry.js +8 -7
  33. package/dist/cjs/ez-text-area.cjs.entry.js +7 -7
  34. package/dist/cjs/ez-text-edit.cjs.entry.js +103 -0
  35. package/dist/cjs/ez-text-input.cjs.entry.js +14 -4
  36. package/dist/cjs/ez-time-input.cjs.entry.js +7 -7
  37. package/dist/cjs/ez-toast.cjs.entry.js +2 -2
  38. package/dist/cjs/ez-upload.cjs.entry.js +4 -4
  39. package/dist/cjs/ez-view-stack.cjs.entry.js +10 -7
  40. package/dist/cjs/ezui.cjs.js +4 -112
  41. package/dist/cjs/loader.cjs.js +2 -18
  42. package/dist/collection/collection-manifest.json +2 -0
  43. package/dist/collection/components/ez-actions-button/ez-actions-button.css +49 -20
  44. package/dist/collection/components/ez-actions-button/ez-actions-button.js +219 -23
  45. package/dist/collection/components/ez-button/ez-button.css +0 -6
  46. package/dist/collection/components/ez-button/ez-button.js +11 -9
  47. package/dist/collection/components/ez-calendar/ez-calendar.css +17 -20
  48. package/dist/collection/components/ez-check/CheckMode.js +5 -0
  49. package/dist/collection/components/ez-check/ez-check.css +23 -24
  50. package/dist/collection/components/ez-check/ez-check.js +10 -8
  51. package/dist/collection/components/ez-chip/ez-chip.css +4 -2
  52. package/dist/collection/components/ez-chip/ez-chip.js +16 -6
  53. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +16 -0
  54. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +226 -7
  55. package/dist/collection/components/ez-combo-box/ez-combo-box.css +1 -22
  56. package/dist/collection/components/ez-combo-box/ez-combo-box.js +51 -20
  57. package/dist/collection/components/ez-date-input/ez-date-input.js +8 -13
  58. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +8 -13
  59. package/dist/collection/components/ez-dialog/DialogType.js +1 -0
  60. package/dist/collection/components/ez-dialog/ez-dialog.css +19 -25
  61. package/dist/collection/components/ez-dialog/ez-dialog.js +41 -6
  62. package/dist/collection/components/ez-form/DataBinder.js +1 -0
  63. package/dist/collection/components/ez-form/ez-form.js +22 -13
  64. package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +3 -3
  65. package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +2 -1
  66. package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +4 -4
  67. package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +25 -15
  68. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +3 -0
  69. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +51 -15
  70. package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRenderer.js +31 -0
  71. package/dist/collection/components/ez-grid/ez-grid.js +40 -3
  72. package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.css +38 -27
  73. package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js +1 -2
  74. package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.js +5 -4
  75. package/dist/collection/components/ez-list/ez-list.css +12 -4
  76. package/dist/collection/components/ez-modal-container/ez-modal-container.css +38 -0
  77. package/dist/collection/components/ez-modal-container/ez-modal-container.js +190 -0
  78. package/dist/collection/components/ez-modal-container/index.js +2 -0
  79. package/dist/collection/components/ez-modal-container/modal-action.js +8 -0
  80. package/dist/collection/components/ez-modal-container/modal-button-status.js +7 -0
  81. package/dist/collection/components/ez-popover/ez-popover.css +1 -1
  82. package/dist/collection/components/ez-popup/ez-popup.css +6 -1
  83. package/dist/collection/components/ez-popup/ez-popup.js +26 -4
  84. package/dist/collection/components/ez-radio-button/ez-radio-button.css +16 -5
  85. package/dist/collection/components/ez-radio-button/ez-radio-button.js +1 -1
  86. package/dist/collection/components/ez-scroller/ez-scroller.css +3 -2
  87. package/dist/collection/components/ez-search/ez-search.js +6 -6
  88. package/dist/collection/components/ez-tabselector/ez-tabselector.css +10 -1
  89. package/dist/collection/components/ez-tabselector/ez-tabselector.js +7 -3
  90. package/dist/collection/components/ez-text-area/ez-text-area.css +6 -3
  91. package/dist/collection/components/ez-text-area/ez-text-area.js +5 -5
  92. package/dist/collection/components/ez-text-edit/ez-text-edit.css +19 -0
  93. package/dist/collection/components/ez-text-edit/ez-text-edit.js +188 -0
  94. package/dist/collection/components/ez-text-input/ez-text-input.css +18 -2
  95. package/dist/collection/components/ez-text-input/ez-text-input.js +28 -0
  96. package/dist/collection/components/ez-toast/ez-toast.css +1 -1
  97. package/dist/collection/components/ez-upload/ez-upload.css +1 -1
  98. package/dist/collection/components/ez-view-stack/ez-view-stack.js +12 -6
  99. package/dist/collection/utils/ApplicationUtils.js +3 -0
  100. package/dist/collection/utils/index.js +1 -0
  101. package/dist/custom-elements/index.d.ts +12 -0
  102. package/dist/custom-elements/index.js +1595 -4005
  103. package/dist/{ezui/ApplicationUtils-30a69eb0.js → esm/ApplicationUtils-205ac4bc.js} +4 -2
  104. package/dist/esm/CheckMode-bdb2ec19.js +7 -0
  105. package/dist/esm/{DialogType-72afa679.js → DialogType-4059dc4d.js} +1 -0
  106. package/dist/esm/ez-actions-button.entry.js +68 -17
  107. package/dist/esm/ez-application.entry.js +1 -1
  108. package/dist/esm/ez-button.entry.js +13 -11
  109. package/dist/esm/ez-calendar.entry.js +3 -3
  110. package/dist/esm/ez-card-item.entry.js +1 -1
  111. package/dist/esm/ez-check.entry.js +11 -9
  112. package/dist/esm/ez-chip.entry.js +17 -7
  113. package/dist/esm/ez-collapsible-box.entry.js +85 -7
  114. package/dist/esm/ez-combo-box.entry.js +48 -17
  115. package/dist/esm/ez-date-input.entry.js +10 -15
  116. package/dist/esm/ez-date-time-input.entry.js +10 -15
  117. package/dist/esm/ez-dialog.entry.js +43 -8
  118. package/dist/esm/ez-filter-input.entry.js +1 -1
  119. package/dist/esm/ez-form.entry.js +65 -452
  120. package/dist/esm/ez-grid-config.entry.js +6 -7
  121. package/dist/esm/ez-grid.entry.js +1039 -1134
  122. package/dist/esm/ez-icon.entry.js +2 -2
  123. package/dist/esm/ez-list.entry.js +2 -4
  124. package/dist/esm/ez-loading-bar.entry.js +1 -1
  125. package/dist/esm/ez-modal-container.entry.js +54 -0
  126. package/dist/esm/ez-modal.entry.js +1 -1
  127. package/dist/esm/ez-number-input.entry.js +2 -2
  128. package/dist/esm/ez-popover.entry.js +3 -3
  129. package/dist/esm/ez-popup.entry.js +8 -4
  130. package/dist/esm/ez-radio-button.entry.js +3 -3
  131. package/dist/esm/ez-scroller.entry.js +2 -2
  132. package/dist/esm/ez-search.entry.js +1 -1
  133. package/dist/esm/ez-select-box.entry.js +1 -1
  134. package/dist/esm/ez-tabselector.entry.js +8 -7
  135. package/dist/esm/ez-text-area.entry.js +7 -7
  136. package/dist/esm/ez-text-edit.entry.js +99 -0
  137. package/dist/esm/ez-text-input.entry.js +13 -3
  138. package/dist/esm/ez-time-input.entry.js +2 -2
  139. package/dist/esm/ez-toast.entry.js +2 -2
  140. package/dist/esm/ez-upload.entry.js +4 -4
  141. package/dist/esm/ez-view-stack.entry.js +10 -7
  142. package/dist/esm/ezui.js +4 -112
  143. package/dist/esm/loader.js +2 -18
  144. package/dist/ezui/ezui.esm.js +1 -125
  145. package/dist/ezui/index.esm.js +0 -1
  146. package/dist/ezui/p-04a41a44.entry.js +1 -0
  147. package/dist/ezui/p-0b44cf1c.js +1 -0
  148. package/dist/ezui/p-0c7203d5.entry.js +1 -0
  149. package/dist/ezui/p-2213da1f.entry.js +1 -0
  150. package/dist/ezui/p-2c6398b3.entry.js +1 -0
  151. package/dist/ezui/p-2ccad880.entry.js +1 -0
  152. package/dist/ezui/p-333d79c4.entry.js +1 -0
  153. package/dist/ezui/p-3987f8d8.entry.js +1 -0
  154. package/dist/ezui/{p-81eb2738.entry.js → p-42c6493e.entry.js} +1 -1
  155. package/dist/ezui/{p-b4ad3b15.entry.js → p-482c3dd8.entry.js} +1 -1
  156. package/dist/ezui/p-5bdb1a41.entry.js +1 -0
  157. package/dist/ezui/{p-b2cf7db2.entry.js → p-63d567cc.entry.js} +1 -1
  158. package/dist/ezui/p-659616e4.entry.js +1 -0
  159. package/dist/ezui/p-6608b9a5.entry.js +1 -0
  160. package/dist/ezui/p-77ec47ac.entry.js +1 -0
  161. package/dist/ezui/p-9b9ebf95.entry.js +1 -0
  162. package/dist/ezui/{p-88bfdea4.entry.js → p-ae5af8f9.entry.js} +1 -1
  163. package/dist/ezui/p-b853763b.js +1 -0
  164. package/dist/ezui/p-be06251d.entry.js +1 -0
  165. package/dist/ezui/{p-e7d03a0d.entry.js → p-bffae598.entry.js} +1 -1
  166. package/dist/ezui/p-cd4677d4.entry.js +1 -0
  167. package/dist/ezui/p-cfcc23e6.entry.js +1 -0
  168. package/dist/ezui/p-dfcf55e0.entry.js +1 -0
  169. package/dist/ezui/p-e1148f5c.js +1 -0
  170. package/dist/ezui/p-e1f2b5da.entry.js +1 -0
  171. package/dist/ezui/p-e230bfd2.entry.js +1 -0
  172. package/dist/ezui/{p-867aac16.entry.js → p-e3ee814c.entry.js} +1 -1
  173. package/dist/ezui/p-e697ffd5.entry.js +1 -0
  174. package/dist/ezui/{p-4eb273f8.entry.js → p-efa32bcc.entry.js} +1 -1
  175. package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +42 -9
  176. package/dist/types/components/ez-check/CheckMode.d.ts +4 -0
  177. package/dist/types/components/ez-chip/ez-chip.d.ts +2 -1
  178. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +46 -1
  179. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -5
  180. package/dist/types/components/ez-date-input/ez-date-input.d.ts +0 -1
  181. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +0 -1
  182. package/dist/types/components/ez-dialog/DialogType.d.ts +1 -0
  183. package/dist/types/components/ez-dialog/ez-dialog.d.ts +3 -0
  184. package/dist/types/components/ez-form/DataBinder.d.ts +2 -2
  185. package/dist/types/components/ez-form/ez-form.d.ts +21 -11
  186. package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -3
  187. package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -2
  188. package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +2 -5
  189. package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +3 -3
  190. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +11 -0
  191. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -1
  192. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRenderer.d.ts +9 -0
  193. package/dist/types/components/ez-grid/ez-grid.d.ts +8 -3
  194. package/dist/types/components/ez-grid/subcomponents/ez-select-box/ez-select-box.d.ts +2 -6
  195. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +47 -0
  196. package/dist/types/components/ez-modal-container/index.d.ts +2 -0
  197. package/dist/types/components/ez-modal-container/modal-action.d.ts +7 -0
  198. package/dist/types/components/ez-modal-container/modal-button-status.d.ts +6 -0
  199. package/dist/types/components/ez-popup/ez-popup.d.ts +4 -0
  200. package/dist/types/components/ez-search/ez-search.d.ts +3 -3
  201. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +2 -0
  202. package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +39 -0
  203. package/dist/types/components/ez-text-input/ez-text-input.d.ts +5 -0
  204. package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +5 -1
  205. package/dist/types/components.d.ts +274 -28
  206. package/dist/types/utils/ApplicationUtils.d.ts +1 -0
  207. package/dist/types/utils/index.d.ts +1 -0
  208. package/package.json +5 -5
  209. package/react/components.d.ts +2 -0
  210. package/react/components.js +2 -0
  211. package/react/components.js.map +1 -1
  212. package/dist/cjs/ApplicationUtils-475b50d9.js +0 -63
  213. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  214. package/dist/cjs/css-shim-3bfdba4f.js +0 -6
  215. package/dist/cjs/dom-8ac1ad03.js +0 -75
  216. package/dist/cjs/index-2ec1da82.js +0 -2307
  217. package/dist/cjs/index-55178184.js +0 -6
  218. package/dist/cjs/index-d9c5cb88.js +0 -3068
  219. package/dist/cjs/shadow-css-41d9783d.js +0 -390
  220. package/dist/esm/ApplicationUtils-30a69eb0.js +0 -61
  221. package/dist/esm/ApplicationUtils-a4a76132.js +0 -60
  222. package/dist/esm/app-globals-0f993ce5.js +0 -3
  223. package/dist/esm/css-shim-20dbffa5.js +0 -4
  224. package/dist/esm/dom-c5ed0ba5.js +0 -73
  225. package/dist/esm/index-1e9d524f.js +0 -3031
  226. package/dist/esm/index-b96183c8.js +0 -2295
  227. package/dist/esm/index-f32470b5.js +0 -3
  228. package/dist/esm/shadow-css-8c625855.js +0 -388
  229. package/dist/ezui/CSSVarsUtils-00f67f32.js +0 -70
  230. package/dist/ezui/DialogType-72afa679.js +0 -8
  231. package/dist/ezui/app-globals-0f993ce5.js +0 -3
  232. package/dist/ezui/css-shim-20dbffa5.js +0 -4
  233. package/dist/ezui/dom-c5ed0ba5.js +0 -73
  234. package/dist/ezui/ez-actions-button.entry.js +0 -98
  235. package/dist/ezui/ez-application.entry.js +0 -22
  236. package/dist/ezui/ez-button.entry.js +0 -73
  237. package/dist/ezui/ez-calendar.entry.js +0 -219
  238. package/dist/ezui/ez-card-item.entry.js +0 -40
  239. package/dist/ezui/ez-check.entry.js +0 -72
  240. package/dist/ezui/ez-chip.entry.js +0 -97
  241. package/dist/ezui/ez-collapsible-box.entry.js +0 -57
  242. package/dist/ezui/ez-combo-box.entry.js +0 -439
  243. package/dist/ezui/ez-date-input.entry.js +0 -159
  244. package/dist/ezui/ez-date-time-input.entry.js +0 -214
  245. package/dist/ezui/ez-dialog.entry.js +0 -108
  246. package/dist/ezui/ez-filter-input.entry.js +0 -75
  247. package/dist/ezui/ez-form.entry.js +0 -1395
  248. package/dist/ezui/ez-grid-config.entry.js +0 -433
  249. package/dist/ezui/ez-grid.entry.js +0 -115419
  250. package/dist/ezui/ez-icon.entry.js +0 -37
  251. package/dist/ezui/ez-list.entry.js +0 -516
  252. package/dist/ezui/ez-loading-bar.entry.js +0 -24
  253. package/dist/ezui/ez-modal.entry.js +0 -67
  254. package/dist/ezui/ez-number-input.entry.js +0 -148
  255. package/dist/ezui/ez-popover.entry.js +0 -141
  256. package/dist/ezui/ez-popup.entry.js +0 -49
  257. package/dist/ezui/ez-radio-button.entry.js +0 -45
  258. package/dist/ezui/ez-scroller.entry.js +0 -101
  259. package/dist/ezui/ez-search.entry.js +0 -83
  260. package/dist/ezui/ez-select-box.entry.js +0 -18
  261. package/dist/ezui/ez-tabselector.entry.js +0 -195
  262. package/dist/ezui/ez-text-area.entry.js +0 -158
  263. package/dist/ezui/ez-text-input.entry.js +0 -235
  264. package/dist/ezui/ez-time-input.entry.js +0 -164
  265. package/dist/ezui/ez-toast.entry.js +0 -84
  266. package/dist/ezui/ez-upload.entry.js +0 -379
  267. package/dist/ezui/ez-view-stack.entry.js +0 -74
  268. package/dist/ezui/index-1e9d524f.js +0 -3031
  269. package/dist/ezui/index-b96183c8.js +0 -2295
  270. package/dist/ezui/index-f32470b5.js +0 -3
  271. package/dist/ezui/p-2f02347d.entry.js +0 -1
  272. package/dist/ezui/p-416bedbe.entry.js +0 -1
  273. package/dist/ezui/p-544f0c63.entry.js +0 -1
  274. package/dist/ezui/p-62110996.entry.js +0 -1
  275. package/dist/ezui/p-719e9ef9.entry.js +0 -1
  276. package/dist/ezui/p-787fbdfe.js +0 -1
  277. package/dist/ezui/p-9d5be6a7.entry.js +0 -1
  278. package/dist/ezui/p-a27dafa4.entry.js +0 -1
  279. package/dist/ezui/p-aba3fa6c.entry.js +0 -1
  280. package/dist/ezui/p-adbe4188.js +0 -1
  281. package/dist/ezui/p-af43be42.entry.js +0 -1
  282. package/dist/ezui/p-b7467ad6.entry.js +0 -1
  283. package/dist/ezui/p-c019e137.entry.js +0 -1
  284. package/dist/ezui/p-c9d2060e.entry.js +0 -1
  285. package/dist/ezui/p-cccd8cde.entry.js +0 -1
  286. package/dist/ezui/p-d0671e14.entry.js +0 -1
  287. package/dist/ezui/p-e0f06d73.entry.js +0 -1
  288. package/dist/ezui/p-e59adce6.entry.js +0 -1
  289. package/dist/ezui/p-ed835b36.entry.js +0 -1
  290. package/dist/ezui/shadow-css-8c625855.js +0 -388
@@ -1,148 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, g as getElement } from './index-1e9d524f.js';
2
- import { N as NumberUtils } from './index-b96183c8.js';
3
- import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
4
-
5
- const ezNumberInputCss = ":host{display:block;width:100%}";
6
-
7
- let EzNumberInput = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.ezChange = createEvent(this, "ezChange", 7);
11
- this.ezStartChange = createEvent(this, "ezStartChange", 7);
12
- this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
13
- this._focused = false;
14
- /**
15
- * Deixa o campo disponível ou não para uso.
16
- */
17
- this.enabled = true;
18
- /**
19
- * Define o modo do tamanho do campo; opções: slim e regular.
20
- */
21
- this.mode = "regular";
22
- }
23
- /**
24
- * Realiza o foco no componente de input
25
- */
26
- async setFocus() {
27
- this._textInput.setFocus();
28
- }
29
- /**
30
- * Remove o foco no componente de input
31
- */
32
- async setBlur() {
33
- this._textInput.setBlur();
34
- }
35
- /**
36
- * Retorna informando se o campo está inválido (true | false)
37
- */
38
- async isInvalid() {
39
- return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
40
- }
41
- observeLabel() {
42
- if (this._textInput) {
43
- this._textInput.label = this.label;
44
- }
45
- }
46
- observeErrorMessage() {
47
- var _a;
48
- if (this._textInput) {
49
- this._textInput.errorMessage = this.errorMessage;
50
- if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
51
- this.setInputValue();
52
- }
53
- }
54
- }
55
- observeValue(newValue, oldValue) {
56
- if (this._textInput && newValue != oldValue) {
57
- const newValueValidated = this.validateValue(newValue);
58
- const oldValueValidated = this.validateValue(oldValue);
59
- if (newValueValidated != oldValueValidated) {
60
- const textValue = this.getTextValue(newValueValidated) || '';
61
- if ((this._textInput.value || '') !== textValue) {
62
- const parsedNumber = this.getParsedNumber(textValue);
63
- if (parsedNumber !== undefined || !this._focused) {
64
- this._textInput.value = textValue;
65
- this._focused = false;
66
- this.errorMessage = "";
67
- }
68
- }
69
- const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
70
- this.ezChange.emit(valueEmitted);
71
- }
72
- }
73
- }
74
- validateValue(value) {
75
- return isNaN(value) || value === undefined ? null : value;
76
- }
77
- getTextValue(value) {
78
- if (value != undefined) {
79
- return this.precision > 0 ? NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
80
- }
81
- return undefined;
82
- }
83
- changeValue(newValue) {
84
- this.errorMessage = "";
85
- if (this.value != newValue) {
86
- this.value = newValue === undefined ? null : newValue;
87
- }
88
- else {
89
- this.ezCancelWaitingChange.emit();
90
- }
91
- }
92
- setError(msg) {
93
- this.value = null;
94
- this.errorMessage = msg;
95
- this.ezCancelWaitingChange.emit();
96
- }
97
- handleBlur() {
98
- const parsedNumber = this.getParsedNumber();
99
- if (parsedNumber !== undefined && isNaN(parsedNumber)) {
100
- this.setError("O valor digitado não é um número válido");
101
- }
102
- else {
103
- try {
104
- this.changeValue(parsedNumber);
105
- }
106
- catch (e) {
107
- this.setError(e.message);
108
- return;
109
- }
110
- }
111
- }
112
- handleInput() {
113
- const parsedNumber = this.getParsedNumber();
114
- if (parsedNumber !== this.value) {
115
- this._focused = true;
116
- this.ezStartChange.emit({ waitmessage: "", blocking: false });
117
- }
118
- }
119
- getParsedNumber(value) {
120
- var _a;
121
- if (value === void 0) {
122
- value = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value;
123
- }
124
- return (value === null || value === void 0 ? void 0 : value.trim()) ? NumberUtils.stringToNumber(value) : undefined;
125
- }
126
- setInputValue() {
127
- const textValue = this.getTextValue(this.value) || '';
128
- if ((this._textInput.value || '') !== textValue) {
129
- this._textInput.value = textValue;
130
- }
131
- }
132
- componentDidLoad() {
133
- CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
134
- this.setInputValue();
135
- }
136
- render() {
137
- return (h("ez-text-input", { ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode }));
138
- }
139
- get _elem() { return getElement(this); }
140
- static get watchers() { return {
141
- "label": ["observeLabel"],
142
- "errorMessage": ["observeErrorMessage"],
143
- "value": ["observeValue"]
144
- }; }
145
- };
146
- EzNumberInput.style = ezNumberInputCss;
147
-
148
- export { EzNumberInput as ez_number_input };
@@ -1,141 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-1e9d524f.js';
2
- import { F as FloatingManager } from './index-b96183c8.js';
3
-
4
- const ezPopoverCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none}.popover__box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:100%}";
5
-
6
- let EzPopover = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.ezVisibilityChange = createEvent(this, "ezVisibilityChange", 7);
10
- this._firstRender = true;
11
- /**
12
- * No modo floating = false o popover só se tornará visível
13
- * quando o método show() for acionado.
14
- */
15
- this.autoClose = true;
16
- /**
17
- * Offset top do popover em relação ao componente pai
18
- */
19
- this.top = "0px";
20
- /**
21
- * Offset left do popover em relação ao componente pai
22
- */
23
- this.left = "0px";
24
- /**
25
- * Offset bottom do popover em relação ao componente pai
26
- */
27
- this.bottom = "0px";
28
- /**
29
- * Offset right do popover em relação ao componente pai
30
- */
31
- this.right = "0px";
32
- /**
33
- * Ajusta o comportamento da largura do popover.
34
- * Opções: "100% e "fit-content" (default)
35
- */
36
- this.boxWidth = "fit-content";
37
- this.innerClickTest = (_popOvercontainer, node, eventOrigin) => {
38
- const innerContainers = [_popOvercontainer];
39
- if (this.innerElement) {
40
- if (typeof (this.innerElement) == "string") {
41
- innerContainers.push(document.querySelector(`#${this.innerElement}`));
42
- }
43
- else {
44
- this.innerElement.forEach(comp => {
45
- innerContainers.push(document.querySelector(`#${comp}`));
46
- });
47
- }
48
- }
49
- for (var i = 0; i < innerContainers.length; i++) {
50
- let _container = innerContainers[i];
51
- if (_container != undefined) {
52
- if (_container.contains(node)) {
53
- return true;
54
- }
55
- if (eventOrigin && "nodeType" in (eventOrigin === null || eventOrigin === void 0 ? void 0 : eventOrigin.target) && _container.contains(eventOrigin.target)) {
56
- return true;
57
- }
58
- if (_container.shadowRoot && _container.shadowRoot.contains(node)) {
59
- return true;
60
- }
61
- _container = this._host;
62
- if (!_container.lastElementChild.shadowRoot ? _container.contains(node) : _container.lastElementChild.shadowRoot.contains(node)) {
63
- return true;
64
- }
65
- }
66
- }
67
- return false;
68
- };
69
- this.backClickListener = () => {
70
- this.ezVisibilityChange.emit(false);
71
- };
72
- }
73
- observeOpened(newValue, oldValue) {
74
- if (newValue != oldValue) {
75
- if (oldValue) {
76
- this.hide();
77
- }
78
- else {
79
- this.show();
80
- }
81
- this.ezVisibilityChange.emit(newValue);
82
- }
83
- }
84
- /**
85
- * Atualiza a posição do popover em relação ao componente pai.
86
- */
87
- async updatePosition(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
88
- const floatingOptions = {
89
- autoClose: this.autoClose,
90
- top,
91
- left,
92
- bottom,
93
- right,
94
- innerClickTest: this.innerClickTest,
95
- backClickListener: this.backClickListener
96
- };
97
- FloatingManager.updateFloatPosition(this._box, this._container, floatingOptions);
98
- }
99
- /**
100
- * Faz com que o popover seja renderizado na DOM.
101
- */
102
- async show(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
103
- const floatingOptions = {
104
- autoClose: this.autoClose,
105
- top,
106
- left,
107
- bottom,
108
- right,
109
- innerClickTest: this.innerClickTest,
110
- backClickListener: this.backClickListener
111
- };
112
- this._floatingID = FloatingManager.float(this._box, this._container, floatingOptions);
113
- this.opened = true;
114
- }
115
- /**
116
- * Usado no modo floating. Faz com que o componente seja ocultado.
117
- */
118
- async hide() {
119
- if (this._floatingID !== undefined) {
120
- FloatingManager.close(this._floatingID);
121
- this._floatingID = undefined;
122
- this.opened = false;
123
- }
124
- }
125
- componentDidRender() {
126
- if (this._firstRender) {
127
- this._box.remove();
128
- this._firstRender = false;
129
- }
130
- }
131
- render() {
132
- return (h(Host, null, h("section", { ref: el => this._container = el }, h("div", { class: `popover__box ${this.boxWidth === "fit-content" ? "popover__box--fit-content" : "popover__box--full-width"}`, ref: el => this._box = el }, h("slot", null)))));
133
- }
134
- get _host() { return getElement(this); }
135
- static get watchers() { return {
136
- "opened": ["observeOpened"]
137
- }; }
138
- };
139
- EzPopover.style = ezPopoverCss;
140
-
141
- export { EzPopover as ez_popover };
@@ -1,49 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, f as Host } from './index-1e9d524f.js';
2
-
3
- const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--most-visible, 3);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"'Sora', 'Algerian'\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:grid;grid-template-rows:auto 1fr}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;height:100%;width:100%}.popup__header{padding-bottom:var(--ez-popup__header--padding-bottom);width:100%;display:flex}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
4
-
5
- let EzPopup = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.ezClosePopup = createEvent(this, "ezClosePopup", 7);
9
- this._sizeClasses = {
10
- "x-small": "col--sd-3",
11
- "small": "col--sd-5",
12
- "medium": "col--sd-6",
13
- "large": "col--sd-9",
14
- "x-large": "col--sd-11"
15
- };
16
- /**
17
- * Define o width que o componente deve ter, seguindo o grid system. Os valores devem estar
18
- * compreendidos em [x-small | small | medium | large | x-large].
19
- */
20
- this.size = "medium";
21
- /**
22
- * Controla a exibição do componente.
23
- */
24
- this.opened = false;
25
- /**
26
- * Define se o componente utilizará um cabeçalho com botão de fechamento.
27
- */
28
- this.useHeader = false;
29
- }
30
- getGridSize() {
31
- return this._sizeClasses[this.size] || this._sizeClasses["medium"];
32
- }
33
- componentDidRender() {
34
- if (this._container) {
35
- this._container.focus();
36
- }
37
- }
38
- render() {
39
- if (this.opened) {
40
- return (h(Host, null, h("div", { class: "overlay" }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class: "popup__container", ref: elem => this._container = elem, tabIndex: -1 }, h("div", { class: "popup__content" }, h("div", { class: "popup__header" }, this.ezTitle ?
41
- h("div", { class: "popup__title" }, this.ezTitle)
42
- : undefined, h("button", { class: this.ezTitle ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezClosePopup.emit(); } })), h("div", { class: "popup__expandable-content" }, h("slot", null))))))));
43
- }
44
- return null;
45
- }
46
- };
47
- EzPopup.style = ezPopupCss;
48
-
49
- export { EzPopup as ez_popup };
@@ -1,45 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-1e9d524f.js';
2
-
3
- const ezRadioButtonCss = ":host{--ez-radio-button--font-family:var(--font-pattern, Arial);--ez-radio-button--font-size:var(--text--large, 16px);--ez-radio-button--font-weight:var(--text-weight--large);--ez-radio-button--font-color:var(--title--primary, #2B3A54);--ez-radio-button__form-label--font-family:var(--font-pattern, Arial);--ez-radio-button__form-label--font-weight:var(--text-weight--medium, 400);--ez-radio-button__form-label--title-primary:var(--title--primary, #2B3A54);--ez-radio-button__form-label--font-size:var(--text--medium, 14px);--ez-radio-button__form-radio--border-color:var(--title--primary, #2B3A54);--ez-radio-button__form-radio--checked--color:var(--color--primary, #008561);--ez-radio-button__form-radio--disabled--border-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--disabled--background-color:var(--background--medium, #f0f3f7);--ez-radio-button__form-radio--disabled--color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--disabled--before--background-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--focus--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--box-shadow-color:var(--background--strong, #e4eaf1);--ez-radio-button__form-radio--checked--focus--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--focus--box-shadow-color:var(--color--primary-300, #e2f4ef);--ez-radio-button__form-radio--checked--hover--background-color:var(--color--inverted, #fff);--ez-radio-button__form-radio--checked--hover--box-shadow-color:#daece7;--ez-radio-button__form-radio--hover--box-shadow-color:var(--color--strokes, #dce0e8);--ez-radio-button__form-radio--checked--disabled--hover--background-color:var(--background--medium, #f0f3f7);display:flex;width:100%;margin:10px;flex-direction:column;align-items:flex-start}.form--vertical{display:flex;flex-direction:column}.form--horizontal{display:flex;flex-direction:row}.form__group{display:flex;align-items:center;margin-top:15px}.label{font-family:var(--ez-radio-button--font-family);font-size:var(--ez-radio-button--font-size);font-weight:var(--ez-radio-button--font-weight);color:var(--ez-radio-button--font-color)}.form__label{cursor:pointer;padding-left:12px;padding-right:25px;font-weight:var(--ez-radio-button__form-label--font-weight);color:var(--ez-radio-button__form-label--title-primary);font-family:var(--ez-radio-button__form-label--font-family);font-size:var(--ez-radio-button__form-label--font-size)}.form__radio{cursor:pointer;appearance:none;outline:none;position:relative;display:flex;align-items:center;justify-content:center;margin:0;padding:0;width:18px;height:18px;border-radius:50%;border:2px solid var(--ez-radio-button__form-radio--border-color)}.form__radio::before{content:'';display:block;position:absolute;opacity:0;transition:all 300ms ease-in-out;height:calc(18px/2);width:calc(18px/2);border-radius:50%;background:var(--ez-radio-button__form-radio--checked--color)}.form__radio:checked:before{opacity:1}.form__radio:checked{border:2px solid var(--ez-radio-button__form-radio--checked--color)}.form__radio:disabled{cursor:default;border:2px solid var(--ez-radio-button__form-radio--disabled--border-color);background-color:var(--ez-radio-button__form-radio--disabled--background-color)}.form__radio:disabled:hover{box-shadow:inherit}input[type=radio]:disabled~label{cursor:default;color:var(--ez-radio-button__form-radio--disabled--color)}.form__radio:disabled:before{background:var(--ez-radio-button__form-radio--disabled--before--background-color)}.form__radio:focus{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--focus--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--box-shadow-color)}.form__radio:checked:focus{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--checked--focus--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--focus--box-shadow-color)}.form__radio:checked:hover{transition:0.25s linear;background-color:var(--ez-radio-button__form-radio--checked--hover--background-color);box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--checked--hover--box-shadow-color)}.form__radio:hover{transition:0.25s linear;box-shadow:0px 0px 0px 6px var(--ez-radio-button__form-radio--hover--box-shadow-color)}.form__radio:checked:disabled:hover{box-shadow:none;background-color:var(--ez-radio-button__form-radio--checked--disabled--hover--background-color)}";
4
-
5
- let EzRadioButton = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.ezChange = createEvent(this, "ezChange", 7);
9
- /**
10
- * Define as opções que serão apresentadas
11
- */
12
- this.options = [];
13
- /**
14
- * Define se o componente está habilitado ou desabilitado
15
- */
16
- this.enabled = true;
17
- /**
18
- * Define a direção em que os itens são apresentadoss, podendo ser horizontal ou vertical.
19
- */
20
- this.direction = "vertical";
21
- }
22
- componentWillLoad() {
23
- this._options = this.options;
24
- const optionsTags = this.hostElement.querySelectorAll("ez-radio-button-option");
25
- if (optionsTags) {
26
- optionsTags.forEach(e => {
27
- let label = e.getAttribute("label");
28
- let value = e.getAttribute("value");
29
- this._options.push({ label, value });
30
- });
31
- }
32
- }
33
- handleInputChange(ev) {
34
- const slot = ev.target;
35
- this.value = slot.value;
36
- this.ezChange.emit(this.value);
37
- }
38
- render() {
39
- return (h(Host, null, this.label && h("label", { class: "label" }, this.label), h("div", { class: "form--" + this.direction }, this._options.map((option, key) => h("div", { class: "form__group" }, h("input", { id: "rad" + key, class: "form__radio", name: "theradio", type: "radio", value: option.value, onChange: (ev) => { this.handleInputChange(ev); }, disabled: !this.enabled, checked: option.value === this.value }), h("label", { htmlFor: "rad" + key, class: "form__label" }, option.label))))));
40
- }
41
- get hostElement() { return getElement(this); }
42
- };
43
- EzRadioButton.style = ezRadioButtonCss;
44
-
45
- export { EzRadioButton as ez_radio_button };
@@ -1,101 +0,0 @@
1
- import { r as registerInstance, h } from './index-1e9d524f.js';
2
-
3
- var EzScrollDirection;
4
- (function (EzScrollDirection) {
5
- EzScrollDirection["HORIZONTAL"] = "horizontal";
6
- EzScrollDirection["VERTICAL"] = "vertical";
7
- EzScrollDirection["BOTH"] = "both";
8
- })(EzScrollDirection || (EzScrollDirection = {}));
9
-
10
- const ezScrollerCss = ":host{display:flex;cursor:grab;width:100%}.dragging{cursor:grabbing}.ez-scroller__container{display:flex;flex-direction:column;overflow:hidden}.ez-scroller__container--horizontal{flex-direction:row;overflow-y:hidden;overflow-x:auto}.ez-scroller__container--vertical{overflow-y:auto;overflow-x:hidden}.ez-scroller__container--both{overflow:auto}::-webkit-scrollbar-track{background-color:var(--scrollbar--secondary);border-radius:var(--border--radius-small);visibility:hidden}::-webkit-scrollbar-thumb{background-color:#00000000;border-radius:var(--border--radius-small);background-color:var(--scrollbar--primary)}:hover::-webkit-scrollbar-thumb{background-color:var(--scrollbar--primary)}::-webkit-scrollbar{background-color:#00000000;width:var(--space--small);height:var(--space--small);max-width:var(--space--small);min-width:var(--space--small)}:hover::-webkit-scrollbar{background-color:var(--scrollbar--secondary)}";
11
-
12
- let EzScroller = class {
13
- constructor(hostRef) {
14
- registerInstance(this, hostRef);
15
- /**
16
- * Determina se haverá scroll na direção Vertical, Horizontal ou Ambos.
17
- * Por padrão, a direção é "Ambos".
18
- */
19
- this.direction = EzScrollDirection.BOTH;
20
- }
21
- //---------------------------------------------
22
- // Private methods
23
- //---------------------------------------------
24
- getContainerClass() {
25
- return `ez-scroller__container ez-scroller__container--${this.direction}`;
26
- }
27
- finishDrag() {
28
- this._container.classList.remove("dragging");
29
- }
30
- //---------------------------------------------
31
- // Event handlers
32
- //---------------------------------------------
33
- clickListener(evt) {
34
- if (this._controller && this._controller.didScroll()) {
35
- evt.preventDefault();
36
- evt.stopPropagation();
37
- evt.stopImmediatePropagation();
38
- }
39
- }
40
- mouseDownHandler(evt) {
41
- if (!this._controller) {
42
- this._controller = new ScrollCtrl(this._container);
43
- }
44
- this._controller.startDragg(evt);
45
- this._container.classList.add("dragging");
46
- }
47
- mouseUpHandler() {
48
- this.finishDrag();
49
- }
50
- mouseMoveHandler(evt) {
51
- if (this._controller) {
52
- if (evt.buttons === 0) {
53
- this.finishDrag();
54
- }
55
- else {
56
- this._controller.doScroll(evt);
57
- }
58
- }
59
- }
60
- render() {
61
- return (h("div", { ref: ref => this._container = ref, class: this.getContainerClass() }, h("slot", null)));
62
- }
63
- };
64
- class ScrollCtrl {
65
- constructor(scrollablePanel) {
66
- this.scrollablePanel = scrollablePanel;
67
- }
68
- startDragg(evt) {
69
- this.startX = this.measureX(evt);
70
- this.startY = this.measureY(evt);
71
- this.scrollWidth = 0;
72
- this.scrollHeight = 0;
73
- }
74
- measureX(e) {
75
- return e.pageX - this.scrollablePanel.offsetLeft;
76
- }
77
- measureY(e) {
78
- return e.pageY - this.scrollablePanel.offsetTop;
79
- }
80
- doScroll(e) {
81
- const x = this.measureX(e);
82
- const y = this.measureY(e);
83
- if (x != this.startX || y != this.startY) {
84
- const scrollX = x - this.startX;
85
- const scrollY = y - this.startY;
86
- this.startX += scrollX;
87
- this.startY += scrollY;
88
- this.scrollWidth += Math.abs(scrollX);
89
- this.scrollHeight += Math.abs(scrollY);
90
- this.scrollablePanel.scrollLeft = Math.max(0, this.scrollablePanel.scrollLeft - scrollX);
91
- this.scrollablePanel.scrollTop = Math.max(0, this.scrollablePanel.scrollTop - scrollY);
92
- }
93
- }
94
- didScroll() {
95
- const tollerance = 5;
96
- return this.scrollHeight > tollerance || this.scrollWidth > tollerance;
97
- }
98
- }
99
- EzScroller.style = ezScrollerCss;
100
-
101
- export { EzScroller as ez_scroller };
@@ -1,83 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, g as getElement } from './index-1e9d524f.js';
2
- import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
3
-
4
- const ezSearchCss = ":host{width:100%}";
5
-
6
- let EzSearch = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.ezChange = createEvent(this, "ezChange", 7);
10
- this.showPopup = createEvent(this, "showPopup", 7);
11
- /**
12
- * Deixa o campo disponível ou não.
13
- */
14
- this.enabled = true;
15
- /**
16
- * Ajusta a opção de mostrar o "value" ao selecionar uma opção.
17
- */
18
- this.showSelectedValue = true;
19
- /**
20
- * Ajusta a opção de mostrar o "value" para cada opção.
21
- */
22
- this.showOptionValue = true;
23
- /**
24
- * Remove a opção vazia da lista de opções
25
- */
26
- this.suppressEmptyOption = false;
27
- /**
28
- * Define o modo do tamanho do campo; opções: slim e regular.
29
- */
30
- this.mode = "regular";
31
- }
32
- observeErrorMessage() {
33
- if (this._comboElement) {
34
- this._comboElement.errorMessage = this.errorMessage;
35
- }
36
- }
37
- observeValue() {
38
- if (this._comboElement) {
39
- this._comboElement.value = this.value;
40
- }
41
- }
42
- /**
43
- * Realiza o foco no componente de pesquisa
44
- */
45
- async setFocus() {
46
- this._comboElement.setFocus();
47
- }
48
- /**
49
- * Remove o foco no componente de pesquisa
50
- */
51
- async setBlur() {
52
- this._comboElement.setBlur();
53
- }
54
- /**
55
- * Retorna informando se o campo está inválido (true | false)
56
- */
57
- async isInvalid() {
58
- return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
59
- }
60
- onComboChange(event) {
61
- event.stopPropagation();
62
- this.value = event.detail;
63
- this.ezChange.emit(event.detail);
64
- if (this.errorMessage !== this._comboElement.errorMessage) {
65
- this.errorMessage = this._comboElement.errorMessage;
66
- }
67
- }
68
- componentDidLoad() {
69
- CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
70
- }
71
- render() {
72
- return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode }));
73
- }
74
- ;
75
- get _elem() { return getElement(this); }
76
- static get watchers() { return {
77
- "errorMessage": ["observeErrorMessage"],
78
- "value": ["observeValue"]
79
- }; }
80
- };
81
- EzSearch.style = ezSearchCss;
82
-
83
- export { EzSearch as ez_search };
@@ -1,18 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h } from './index-1e9d524f.js';
2
-
3
- const ezSelectBoxCss = "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}";
4
-
5
- let SelectBox = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.ezChange = createEvent(this, "ezChange", 7);
9
- this.selectedOption = { value: "na", label: "N/A" };
10
- }
11
- render() {
12
- return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, h("option", { value: "na" }, "N/A"), h("option", { value: "asc" }, "A-Z"), h("option", { value: "desc" }, "Z-A")));
13
- }
14
- static get assetsDirs() { return ["../assets"]; }
15
- };
16
- SelectBox.style = ezSelectBoxCss;
17
-
18
- export { SelectBox as ez_select_box };