@sankhyalabs/ezui 7.1.0-dev.21 → 7.1.0-dev.23

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 (274) hide show
  1. package/dist/cjs/{ApplicationUtils-4fb87a9e.js → ApplicationUtils-006ca96f.js} +1 -1
  2. package/dist/cjs/FormLayout-fe8da83c.js +9 -0
  3. package/dist/cjs/{app-globals-cb31a206.js → app-globals-5cb12916.js} +1 -1
  4. package/dist/cjs/{ez-combo-box-list_5.cjs.entry.js → classic-search-list_7.cjs.entry.js} +212 -5
  5. package/dist/cjs/ez-actions-button.cjs.entry.js +4 -3
  6. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-classic-combo-box.cjs.entry.js +36 -15
  10. package/dist/cjs/ez-classic-date-input.cjs.entry.js +201 -0
  11. package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +246 -0
  12. package/dist/cjs/ez-classic-input.cjs.entry.js +99 -18
  13. package/dist/cjs/ez-classic-number-input.cjs.entry.js +205 -0
  14. package/dist/cjs/ez-classic-search-plus.cjs.entry.js +407 -0
  15. package/dist/cjs/ez-classic-search.cjs.entry.js +683 -0
  16. package/dist/cjs/ez-classic-text-area.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-classic-time-input.cjs.entry.js +197 -0
  18. package/dist/cjs/ez-collapsible-box.cjs.entry.js +4 -3
  19. package/dist/cjs/ez-combo-box.cjs.entry.js +4 -3
  20. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-form-view.cjs.entry.js +121 -35
  26. package/dist/cjs/ez-form.cjs.entry.js +11 -7
  27. package/dist/cjs/ez-grid.cjs.entry.js +7 -6
  28. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-search-plus.cjs.entry.js +7 -6
  39. package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-search.cjs.entry.js +10 -9
  41. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  43. package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
  45. package/dist/cjs/ez-split-button.cjs.entry.js +13 -14
  46. package/dist/cjs/ez-split-item.cjs.entry.js +4 -3
  47. package/dist/cjs/ez-text-input.cjs.entry.js +37 -0
  48. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  49. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  50. package/dist/cjs/ez-upload.cjs.entry.js +2 -2
  51. package/dist/cjs/ezui.cjs.js +3 -3
  52. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  53. package/dist/cjs/{index-e61642ff.js → index-350d0fa0.js} +30 -0
  54. package/dist/cjs/index-a7b0c73d.js +42 -18
  55. package/dist/cjs/loader.cjs.js +3 -3
  56. package/dist/cjs/{search-column-51e50b59.js → search-column-fbf680d7.js} +10 -5
  57. package/dist/cjs/searchFormatters-051f8677.js +23 -0
  58. package/dist/cjs/{FormLayout-18853e70.js → types-6a5df0c7.js} +0 -6
  59. package/dist/collection/collection-manifest.json +58 -5
  60. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.css +5 -0
  61. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js +77 -18
  62. package/dist/collection/components/ez-classic-date-input/ez-classic-date-input.css +44 -0
  63. package/dist/collection/components/ez-classic-date-input/ez-classic-date-input.js +541 -0
  64. package/dist/collection/components/ez-classic-date-time-input/ez-classic-date-time-input.css +44 -0
  65. package/dist/collection/components/ez-classic-date-time-input/ez-classic-date-time-input.js +586 -0
  66. package/dist/collection/components/ez-classic-input/ez-classic-input.css +33 -5
  67. package/dist/collection/components/ez-classic-input/ez-classic-input.js +155 -19
  68. package/dist/collection/components/ez-classic-number-input/ez-classic-number-input.css +16 -0
  69. package/dist/collection/components/ez-classic-number-input/ez-classic-number-input.js +583 -0
  70. package/dist/collection/components/ez-classic-search/ez-classic-search.css +126 -0
  71. package/dist/collection/components/ez-classic-search/ez-classic-search.js +1330 -0
  72. package/dist/collection/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.css +227 -0
  73. package/dist/collection/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.js +316 -0
  74. package/dist/collection/components/ez-classic-search/utils/searchFormatters.js +18 -0
  75. package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.css +406 -0
  76. package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.js +988 -0
  77. package/dist/collection/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.css +221 -0
  78. package/dist/collection/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.js +298 -0
  79. package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.css +1 -0
  80. package/dist/collection/components/ez-classic-time-input/ez-classic-time-input.css +14 -0
  81. package/dist/collection/components/ez-classic-time-input/ez-classic-time-input.js +511 -0
  82. package/dist/collection/components/ez-form/ez-form.js +9 -5
  83. package/dist/collection/components/ez-form-view/ez-form-view.css +8 -3
  84. package/dist/collection/components/ez-form-view/ez-form-view.js +40 -4
  85. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +6 -3
  86. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +9 -6
  87. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +8 -1
  88. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +30 -6
  89. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
  90. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +12 -5
  91. package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js +1 -1
  92. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +9 -3
  93. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +8 -1
  94. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +7 -1
  95. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +8 -1
  96. package/dist/collection/components/ez-form-view/structure/index.js +1 -1
  97. package/dist/collection/components/ez-icon/ez-icon.css +1 -0
  98. package/dist/collection/components/ez-rich-text/ez-rich-text.js +2 -3
  99. package/dist/collection/components/ez-split-button/ez-split-button.js +18 -13
  100. package/dist/collection/components/ez-text-input/ez-text-input.js +38 -1
  101. package/dist/collection/utils/form/DataBinder.js +2 -2
  102. package/dist/collection/utils/form/interfaces/FormLayout.js +3 -1
  103. package/dist/collection/utils/i18n/locales/en-us.js +10 -0
  104. package/dist/collection/utils/i18n/locales/es-es.js +10 -0
  105. package/dist/collection/utils/i18n/locales/pt-br.js +10 -0
  106. package/dist/collection/utils/searchColumn/search-column.js +6 -1
  107. package/dist/custom-elements/index.d.ts +48 -0
  108. package/dist/custom-elements/index.js +2722 -337
  109. package/dist/esm/{ApplicationUtils-985c24ae.js → ApplicationUtils-0c5cb207.js} +1 -1
  110. package/dist/esm/FormLayout-bda67973.js +9 -0
  111. package/dist/esm/{app-globals-75f8a758.js → app-globals-1db10325.js} +1 -1
  112. package/dist/esm/{ez-combo-box-list_5.entry.js → classic-search-list_7.entry.js} +212 -7
  113. package/dist/esm/ez-actions-button.entry.js +4 -3
  114. package/dist/esm/ez-alert-list.entry.js +1 -1
  115. package/dist/esm/ez-avatar.entry.js +1 -1
  116. package/dist/esm/ez-calendar.entry.js +1 -1
  117. package/dist/esm/ez-classic-combo-box.entry.js +36 -15
  118. package/dist/esm/ez-classic-date-input.entry.js +197 -0
  119. package/dist/esm/ez-classic-date-time-input.entry.js +242 -0
  120. package/dist/esm/ez-classic-input.entry.js +100 -19
  121. package/dist/esm/ez-classic-number-input.entry.js +201 -0
  122. package/dist/esm/ez-classic-search-plus.entry.js +403 -0
  123. package/dist/esm/ez-classic-search.entry.js +679 -0
  124. package/dist/esm/ez-classic-text-area.entry.js +1 -1
  125. package/dist/esm/ez-classic-time-input.entry.js +193 -0
  126. package/dist/esm/ez-collapsible-box.entry.js +4 -3
  127. package/dist/esm/ez-combo-box.entry.js +4 -3
  128. package/dist/esm/ez-date-input.entry.js +1 -1
  129. package/dist/esm/ez-date-time-input.entry.js +1 -1
  130. package/dist/esm/ez-dialog.entry.js +1 -1
  131. package/dist/esm/ez-double-list.entry.js +1 -1
  132. package/dist/esm/ez-file-item.entry.js +1 -1
  133. package/dist/esm/ez-form-view.entry.js +121 -35
  134. package/dist/esm/ez-form.entry.js +11 -7
  135. package/dist/esm/ez-grid.entry.js +5 -4
  136. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  137. package/dist/esm/ez-icon.entry.js +1 -1
  138. package/dist/esm/ez-link-builder_6.entry.js +1 -1
  139. package/dist/esm/ez-list.entry.js +1 -1
  140. package/dist/esm/ez-modal-container.entry.js +1 -1
  141. package/dist/esm/ez-modal.entry.js +1 -1
  142. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  143. package/dist/esm/ez-number-input.entry.js +1 -1
  144. package/dist/esm/ez-pagination.entry.js +1 -1
  145. package/dist/esm/ez-popup.entry.js +1 -1
  146. package/dist/esm/ez-search-plus.entry.js +4 -3
  147. package/dist/esm/ez-search-result-list.entry.js +1 -1
  148. package/dist/esm/ez-search.entry.js +4 -3
  149. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  150. package/dist/esm/ez-skeleton.entry.js +1 -1
  151. package/dist/esm/ez-sortable-list.entry.js +1 -1
  152. package/dist/esm/ez-spinner.entry.js +1 -1
  153. package/dist/esm/ez-split-button.entry.js +13 -14
  154. package/dist/esm/ez-split-item.entry.js +4 -3
  155. package/dist/esm/ez-text-input.entry.js +37 -0
  156. package/dist/esm/ez-time-input.entry.js +1 -1
  157. package/dist/esm/ez-tree.entry.js +1 -1
  158. package/dist/esm/ez-upload.entry.js +2 -2
  159. package/dist/esm/ezui.js +3 -3
  160. package/dist/esm/filter-column.entry.js +1 -1
  161. package/dist/esm/{index-a3b24b5d.js → index-225aa0c3.js} +30 -0
  162. package/dist/esm/index-baa5e267.js +42 -18
  163. package/dist/esm/loader.js +3 -3
  164. package/dist/esm/{search-column-0c42248b.js → search-column-40a78cac.js} +10 -5
  165. package/dist/esm/searchFormatters-6d9b06e4.js +20 -0
  166. package/dist/esm/{FormLayout-071d324c.js → types-6f6b2650.js} +1 -7
  167. package/dist/ezui/ezui.esm.js +1 -1
  168. package/dist/ezui/{p-1c3f43e8.entry.js → p-0248846f.entry.js} +1 -1
  169. package/dist/ezui/p-0625743b.entry.js +1 -0
  170. package/dist/ezui/p-07fb22c3.entry.js +1 -0
  171. package/dist/ezui/p-26cd4c2e.entry.js +1 -0
  172. package/dist/ezui/{p-2fd16ff2.entry.js → p-2da9faf1.entry.js} +1 -1
  173. package/dist/ezui/{p-1bf40959.entry.js → p-34d459e4.entry.js} +1 -1
  174. package/dist/ezui/p-44183c39.entry.js +1 -0
  175. package/dist/ezui/p-47e4a8ce.js +1 -0
  176. package/dist/ezui/p-4af745e1.entry.js +1 -0
  177. package/dist/ezui/{p-6c484770.entry.js → p-4c2a4435.entry.js} +1 -1
  178. package/dist/ezui/{p-782fe2e3.entry.js → p-4c76b365.entry.js} +1 -1
  179. package/dist/ezui/p-4e576bb9.entry.js +1 -0
  180. package/dist/ezui/{p-5e6de2c1.entry.js → p-4e869617.entry.js} +1 -1
  181. package/dist/ezui/{p-0e325699.entry.js → p-4f7ad3ee.entry.js} +1 -1
  182. package/dist/ezui/{p-582c3f90.entry.js → p-544605c4.entry.js} +1 -1
  183. package/dist/ezui/p-556bf329.entry.js +1 -0
  184. package/dist/ezui/{p-2676e2a3.entry.js → p-56565777.entry.js} +1 -1
  185. package/dist/ezui/p-57b68d43.entry.js +1 -0
  186. package/dist/ezui/p-5895e687.js +1 -0
  187. package/dist/ezui/{p-714452c7.entry.js → p-5abb220b.entry.js} +1 -1
  188. package/dist/ezui/p-619225ce.entry.js +1 -0
  189. package/dist/ezui/p-679a2942.entry.js +1 -0
  190. package/dist/ezui/{p-474076b3.js → p-6a794336.js} +1 -1
  191. package/dist/ezui/{p-4ea5c8a7.entry.js → p-6ac056d7.entry.js} +1 -1
  192. package/dist/ezui/p-7134726a.entry.js +1 -0
  193. package/dist/ezui/{p-67f9fadb.entry.js → p-729bd1be.entry.js} +1 -1
  194. package/dist/ezui/p-7953ecb9.entry.js +1 -0
  195. package/dist/ezui/{p-e2e0dd76.entry.js → p-7edc3ef7.entry.js} +1 -1
  196. package/dist/ezui/p-88a115b3.js +1 -0
  197. package/dist/ezui/{p-f45ddc1f.entry.js → p-8e5f1c74.entry.js} +1 -1
  198. package/dist/ezui/p-951b32a1.entry.js +1 -0
  199. package/dist/ezui/{p-9568a93d.entry.js → p-97312709.entry.js} +1 -1
  200. package/dist/ezui/{p-0ec5c128.js → p-9825c1d2.js} +1 -1
  201. package/dist/ezui/p-987185c4.entry.js +1 -0
  202. package/dist/ezui/p-a0f51b99.entry.js +1 -0
  203. package/dist/ezui/p-a3bad8f8.entry.js +1 -0
  204. package/dist/ezui/{p-6570ca10.entry.js → p-a4351519.entry.js} +1 -1
  205. package/dist/ezui/{p-7624767b.entry.js → p-a872c642.entry.js} +1 -1
  206. package/dist/ezui/p-b0a716ef.entry.js +1 -0
  207. package/dist/ezui/p-b36475f9.entry.js +1 -0
  208. package/dist/ezui/{p-2b23906a.entry.js → p-b705b342.entry.js} +1 -1
  209. package/dist/ezui/{p-9771ea3c.entry.js → p-b8078832.entry.js} +1 -1
  210. package/dist/ezui/p-c0ae79fa.entry.js +1 -0
  211. package/dist/ezui/{p-98218fbc.js → p-c178730b.js} +1 -1
  212. package/dist/ezui/{p-a1a63294.entry.js → p-c56ee8c0.entry.js} +1 -1
  213. package/dist/ezui/{p-3d71e8e1.entry.js → p-cd8be0c7.entry.js} +1 -1
  214. package/dist/ezui/{p-a13e65a4.entry.js → p-ce0a0036.entry.js} +1 -1
  215. package/dist/ezui/{p-0aafbc30.entry.js → p-df802548.entry.js} +1 -1
  216. package/dist/ezui/p-e2689b33.entry.js +1 -0
  217. package/dist/ezui/{p-dc192d01.entry.js → p-e2972977.entry.js} +1 -1
  218. package/dist/ezui/{p-47d9256e.entry.js → p-e3a42f47.entry.js} +1 -1
  219. package/dist/ezui/p-e3cd5080.entry.js +1 -0
  220. package/dist/ezui/{p-28af6826.entry.js → p-e493ad57.entry.js} +1 -1
  221. package/dist/ezui/{p-3fcf79c7.entry.js → p-f5552540.entry.js} +1 -1
  222. package/dist/ezui/p-ff4312d5.js +1 -0
  223. package/dist/types/components/ez-classic-combo-box/ez-classic-combo-box.d.ts +9 -3
  224. package/dist/types/components/ez-classic-date-input/ez-classic-date-input.d.ts +91 -0
  225. package/dist/types/components/ez-classic-date-time-input/ez-classic-date-time-input.d.ts +95 -0
  226. package/dist/types/components/ez-classic-input/ez-classic-input.d.ts +18 -1
  227. package/dist/types/components/ez-classic-number-input/ez-classic-number-input.d.ts +101 -0
  228. package/dist/types/components/ez-classic-search/ez-classic-search.d.ts +219 -0
  229. package/dist/types/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.d.ts +29 -0
  230. package/dist/types/components/ez-classic-search/utils/searchFormatters.d.ts +2 -0
  231. package/dist/types/components/ez-classic-search-plus/ez-classic-search-plus.d.ts +186 -0
  232. package/dist/types/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.d.ts +29 -0
  233. package/dist/types/components/ez-form/ez-form.d.ts +1 -0
  234. package/dist/types/components/ez-form-view/ez-form-view.d.ts +7 -0
  235. package/dist/types/components/ez-form-view/fieldbuilder/FieldBuilder.d.ts +7 -2
  236. package/dist/types/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.d.ts +3 -2
  237. package/dist/types/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.d.ts +2 -1
  238. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +5 -4
  239. package/dist/types/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.d.ts +2 -1
  240. package/dist/types/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.d.ts +3 -2
  241. package/dist/types/components/ez-form-view/fieldbuilder/templates/RichText.tpl.d.ts +2 -1
  242. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +2 -1
  243. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -1
  244. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.d.ts +2 -1
  245. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +2 -1
  246. package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -2
  247. package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
  248. package/dist/types/components.d.ts +2967 -1814
  249. package/dist/types/utils/form/interfaces/FormLayout.d.ts +3 -1
  250. package/dist/types/utils/i18n/locales/en-us.d.ts +10 -0
  251. package/dist/types/utils/i18n/locales/es-es.d.ts +10 -0
  252. package/dist/types/utils/i18n/locales/pt-br.d.ts +10 -0
  253. package/dist/types/utils/i18n/translations.d.ts +30 -0
  254. package/package.json +1 -1
  255. package/react/components.d.ts +8 -0
  256. package/react/components.js +8 -0
  257. package/react/components.js.map +1 -1
  258. package/dist/ezui/p-2e5de2a7.entry.js +0 -1
  259. package/dist/ezui/p-30ffb9ed.js +0 -1
  260. package/dist/ezui/p-48effc69.entry.js +0 -1
  261. package/dist/ezui/p-6a982147.js +0 -1
  262. package/dist/ezui/p-6d7f2fdc.entry.js +0 -1
  263. package/dist/ezui/p-6f466aec.entry.js +0 -1
  264. package/dist/ezui/p-7fe97ef5.entry.js +0 -1
  265. package/dist/ezui/p-8709c4f6.entry.js +0 -1
  266. package/dist/ezui/p-8a8006e6.entry.js +0 -1
  267. package/dist/ezui/p-8d626d2b.entry.js +0 -1
  268. package/dist/ezui/p-9b2e6438.entry.js +0 -1
  269. package/dist/ezui/p-9d004e22.entry.js +0 -1
  270. package/dist/ezui/p-c711900a.entry.js +0 -1
  271. package/dist/ezui/p-dee18824.entry.js +0 -1
  272. package/dist/ezui/p-e4a579f2.entry.js +0 -1
  273. package/dist/ezui/p-e82a12c6.entry.js +0 -1
  274. package/dist/ezui/p-f1bbf23f.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as a,F as s}from"./p-23a36bb6.js";import{a as o,b as r,R as l}from"./p-3e767a74.js";import{i as n}from"./p-98218fbc.js";import"@sankhyalabs/core";const c=class{constructor(i){e(this,i),this.executeToolbarCommand=t(this,"executeToolbarCommand",7),this.textToShow=void 0,this.link=void 0,this.openInNewGuide=!1}async show(e){this._popupElement.opened=!0,e&&(this.textToShow=e)}async hide(){this._popupElement.opened=!1}async componentWillLoad(){this.i18n=await n()}async handleCancel(){this.clearValues(),this.executeToolbarCommand.emit({command:o.FOCUS}),await this.hide()}clearValues(){this.link="",this.textToShow="",this.openInNewGuide=!1}async handleCreateLink(){this.executeToolbarCommand.emit({command:o.FORMAT,value:`<a href="${this.link}" ${this.openInNewGuide?'target="_blank" rel="noopener noreferrer"':""}>${this.textToShow?this.textToShow:this.link}</a>`}),this.clearValues(),await this.hide()}async handleActionPopup(e){"OK"!==e.detail?"CANCEL"!==e.detail&&"CLOSE"!==e.detail||await this.handleCancel():await this.handleCreateLink()}getOkButtonStatus(){var e;return(null===(e=this.link)||void 0===e?void 0:e.trim())?"ENABLED":"DISABLED"}render(){return i("ez-popup",{heightMode:"auto",size:"small",useHeader:!1,ref:e=>this._popupElement=e,onEzClosePopup:()=>this.clearValues()},i("div",null,i("ez-modal-container",{modalTitle:this.i18n("ez-link-builder.addLinkTitle"),modalSubTitle:this.i18n("ez-link-builder.addLinkSubtitle"),okButtonLabel:this.i18n("ez-link-builder.submit"),cancelButtonLabel:this.i18n("app.cancel"),onEzModalAction:this.handleActionPopup.bind(this),okButtonStatus:this.getOkButtonStatus()},i("div",{class:"link-builder-container"},i("ez-text-input",{id:"link_url_input",label:this.i18n("ez-link-builder.urlInputLabel"),value:this.link,onEzChange:e=>this.link=e.detail}),i("ez-text-input",{id:"link_text_input",label:this.i18n("ez-link-builder.textInputLabel"),value:this.textToShow,onEzChange:e=>this.textToShow=e.detail}),i("ez-check",{label:this.i18n("ez-link-builder.openInNewPage"),value:this.openInNewGuide,onEzChange:e=>this.openInNewGuide=e.detail})))))}};c.style=".link-builder-container.sc-ez-link-builder{font-family:'Roboto';color:#2b3a54;display:flex;flex-direction:column;gap:10px;justify-content:space-between}.header.sc-ez-link-builder{display:flex;font-weight:500;font-size:16px}.actions.sc-ez-link-builder{display:flex;justify-content:flex-end;gap:12px;margin-top:12px;width:100%}";const h=class{constructor(i){e(this,i),this.executeToolbarCommand=t(this,"executeToolbarCommand",7),this.showPreview=!0,this.isPreviewMode=!1,this.showConfigs=!0,this.showTextFormat=!0,this.showUndoRedo=!0}async componentWillLoad(){this.i18n=await n()}handleActionTriggered(e){this.executeToolbarCommand.emit({command:e.detail.command,value:e.detail.value})}handleClickPreview(){this.executeToolbarCommand.emit({command:o.PREVIEW})}renderArrows(){if(this.showUndoRedo)return i("div",{id:"rich-toolbar-undo-redo",class:"taskbar-group"},i("ez-rich-toolbar-arrows",null))}renderLetters(){if(this.showTextFormat)return i("div",{id:"rich-toolbar-text-format",class:"taskbar-group"},i("ez-rich-toolbar-letters",null))}renderConfigs(){if(this.showConfigs)return i("div",{id:"rich-toolbar-options-configs",class:"taskbar-group"},i("ez-rich-toolbar-configs",null))}renderPreview(){if(this.showPreview)return i("div",{class:"taskbar-group"},i("span",{id:"rich-text-preview-btn",class:"preview-btn",title:this.getPreviewTitle(),onClick:this.handleClickPreview.bind(this)},this.i18n(this.isPreviewMode?"ez-rich-text.edit":"ez-rich-text.preview")))}getPreviewTitle(){return this.i18n(this.isPreviewMode?"ez-rich-text.title.edit":"ez-rich-text.title.preview")}render(){return i(a,null,i("div",{class:"taskbar"},this.renderPreview(),this.renderArrows(),this.renderLetters(),this.renderConfigs()))}};h.style=".sc-ez-rich-toolbar-h{display:block;width:100%}.taskbar.sc-ez-rich-toolbar{display:flex;padding:8px;border-radius:4px 4px 0 0}.taskbar-group.sc-ez-rich-toolbar{display:flex;margin-right:15px;padding-right:15px;border-right:1px solid #ddd}.taskbar-group.sc-ez-rich-toolbar:last-child{border-right:none}.preview-btn.sc-ez-rich-toolbar{font-family:Roboto;font-size:14px;background:none;display:flex;align-items:center;padding:0 8px;border-radius:4px;cursor:pointer;color:var(--color--secondary, #383c45);transition:0.3s all ease-in-out;width:110px;justify-content:center}.preview-btn.sc-ez-rich-toolbar:hover{background-color:#f5f5f5}";const d=class{constructor(t){e(this,t)}async componentWillLoad(){this.i18n=await n()}render(){return i(a,null,i("ez-rich-toolbar-item",{icon:r.UNDO,command:o.UNDO,title:this.i18n("ez-rich-text.title.undo")}),i("ez-rich-toolbar-item",{icon:r.REDO,command:o.REDO,title:this.i18n("ez-rich-text.title.redo")}))}};d.style=".sc-ez-rich-toolbar-arrows-h{display:flex;gap:5px}";const p=class{constructor(t){e(this,t)}async componentWillLoad(){this.i18n=await n()}render(){return i(a,null,i("ez-rich-toolbar-item",{icon:r.LIST,command:o.FORMAT,value:l.LIST,title:this.i18n("ez-rich-text.title.list")}),i("ez-rich-toolbar-item",{icon:r.IMAGE,command:o.IMAGE,title:this.i18n("ez-rich-text.title.image")}),i("ez-rich-toolbar-item",{icon:r.LINK,command:o.LINK,title:this.i18n("ez-rich-text.title.link")}))}};p.style=".sc-ez-rich-toolbar-configs-h{display:flex;gap:5px}";const u=class{constructor(t){e(this,t)}async componentWillLoad(){this.i18n=await n()}render(){return i(a,null,i("ez-rich-toolbar-item",{icon:r.BOLD,command:o.FORMAT,value:l.BOLD,title:this.i18n("ez-rich-text.title.bold")}),i("ez-rich-toolbar-item",{icon:r.ITALIC,command:o.FORMAT,value:l.ITALIC,title:this.i18n("ez-rich-text.title.italic")}),i("ez-rich-toolbar-item",{icon:r.UNDERLINE,command:o.FORMAT,value:l.UNDERLINE,title:this.i18n("ez-rich-text.title.underline")}))}};function m(e,t=1){if(0===e)return"0 Bytes";const i=t<0?0:t,a=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,a)).toFixed(i))+" "+["Bytes","Kilobytes","Megabytes","Gigabytes","Terabytes","Petabytes","Exabytes","Zettabytes","Yottabytes"][a]}u.style=".sc-ez-rich-toolbar-letters-h{display:flex;gap:5px}";const b=class{constructor(i){e(this,i),this.executeToolbarCommand=t(this,"executeToolbarCommand",7),this.link=void 0,this.base64=void 0,this.messageError=void 0,this.selectedFile=void 0,this.maxSize=500}async show(){this._popupElement.opened=!0}async hide(){this._popupElement.opened=!1}async componentWillLoad(){this.i18n=await n()}async handleCancel(){this.removeSelectedFile(),this.executeToolbarCommand.emit({command:o.FOCUS}),await this.hide()}removeSelectedFile(e){null==e||e.stopPropagation(),this.link=void 0,this.base64=void 0,this.selectedFile=void 0,this.messageError=void 0}triggerFileSelect(){this.selectedFile||this._fileInput.click()}async handleImage(e){const t=e&&e[0];t&&(t.size<1e3*this.maxSize?(this.selectedFile=t,this.base64=await function(e){return new Promise(((t,i)=>{try{const i=new FileReader;i.onload=()=>{t(i.result)},i.readAsDataURL(e)}catch(e){i(e)}}))}(t)):this.messageError=this.i18n("ez-simple-image-uploader.imageTooLarge",{maxSize:m(this.maxSize)}))}getFileList(e){return e instanceof DragEvent?Array.from(e.dataTransfer.files):e.target.files}handleFileChange(e){e.preventDefault(),this.messageError=void 0,this._dropZone.classList.remove("dragging");const t=this.getFileList(e);this.handleImage(t),e.target.value=""}handleDragOver(e){e.stopPropagation(),e.preventDefault()}handleDragEnter(e){e.preventDefault(),this._dropZone.classList.add("dragging")}handleDragLeave(e){e.preventDefault(),this._dropZone.contains(e.relatedTarget)||this._dropZone.classList.remove("dragging")}async handleActionPopup(e){"OK"===e.detail?await this.handleCreateImgTag():"CANCEL"!==e.detail&&"CLOSE"!==e.detail||await this.handleCancel()}async handleCreateImgTag(){var e;const t=`<img src="${null!==(e=this.base64)&&void 0!==e?e:this.link}" alt="${this.i18n("ez-simple-image-uploader.imageAlt")}" />`;this.executeToolbarCommand.emit({command:o.FORMAT,value:t}),this.removeSelectedFile(),await this.hide()}getOkButtonStatus(){var e;return this.base64||(null===(e=this.link)||void 0===e?void 0:e.trim())?"ENABLED":"DISABLED"}render(){return i("ez-popup",{ref:e=>this._popupElement=e,heightMode:"auto",size:"small",useHeader:!1,onEzClosePopup:()=>this.handleCancel()},i("div",null,i("ez-modal-container",{modalTitle:this.i18n("ez-simple-image-uploader.uploadTitle"),modalSubTitle:this.i18n("ez-simple-image-uploader.uploadSubtitle"),okButtonLabel:this.i18n("ez-simple-image-uploader.submit"),cancelButtonLabel:this.i18n("app.cancel"),onEzModalAction:this.handleActionPopup.bind(this),okButtonStatus:this.getOkButtonStatus()},i("div",{class:"image-uploader-container"},i("ez-tooltip",{message:this.i18n("ez-simple-image-uploader.tooltipMessage"),active:!!this.selectedFile},i("ez-text-input",{label:this.i18n("ez-simple-image-uploader.urlInputLabel"),value:this.link,onEzChange:e=>this.link=e.detail,enabled:!this.selectedFile})),i("span",null,this.i18n("ez-simple-image-uploader.orText")),i("section",{class:"drop-zone-section"},i("div",{ref:e=>this._dropZone=e,class:"drop-zone",onDrop:e=>this.handleFileChange(e),onDragOver:e=>this.handleDragOver(e),onDragEnter:e=>this.handleDragEnter(e),onDragLeave:e=>this.handleDragLeave(e)},i("div",{class:{"drop-zone-container":!0,clickable:!this.selectedFile},onClick:()=>this.triggerFileSelect()},this.selectedFile?i(s,null,i("span",{class:"ez-text ez-text--primary ez-text--medium"},this.selectedFile.name," (",m(this.selectedFile.size),")"),i("button",{class:"button-close",onClick:e=>this.removeSelectedFile(e),title:this.i18n("ez-simple-image-uploader.removeFile")},i("ez-icon",{iconName:"close"}))):i(s,null,i("ez-icon",{iconName:"anexo"}),i("span",{class:"ez-text ez-text--primary ez-text--medium"},this.i18n("ez-simple-image-uploader.dragDropText")))),i("input",{ref:e=>this._fileInput=e,type:"file",accept:"image/*",style:{display:"none"},onChange:e=>this.handleFileChange(e)})),!!this.messageError&&i("span",{class:"text-error"},this.messageError))))))}};b.style='.image-uploader-container.sc-ez-simple-image-uploader{font-family:"Roboto";color:#2b3a54;display:flex;flex-direction:column;gap:var(--space--10, 10px);justify-content:space-between;align-items:center;padding-bottom:var(--space--8, 8px)}.header.sc-ez-simple-image-uploader{display:flex;font-weight:500;font-size:var(--font-size--medium, 16px)}.actions.sc-ez-simple-image-uploader{display:flex;justify-content:flex-end;gap:var(--space--12, 12px);margin-top:var(--space--12, 12px);width:100%}.drop-zone-section.sc-ez-simple-image-uploader{width:100%}.drop-zone.sc-ez-simple-image-uploader{display:flex;flex-wrap:wrap;background-color:var(--color--petroleum-70, #F4F6F9);padding:var(--space--6, 6px);width:100%;border-radius:var(--space--12, 12px);box-sizing:border-box;min-height:100px}.clickable.sc-ez-simple-image-uploader{cursor:pointer}.dragging.sc-ez-simple-image-uploader{background-color:var(--color--petroleum-100, #C8CCD3)}.drop-zone-container.sc-ez-simple-image-uploader{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--color-strokes, #DCE0E8);border-radius:6px;box-sizing:border-box}.text-error.sc-ez-simple-image-uploader{font-family:var(--font--pattern, "Roboto");color:var(--color--red-600, #BD0025);font-size:var(--font-size--small, 12px)}.button-close.sc-ez-simple-image-uploader{border:none;background:none;cursor:pointer}';export{c as ez_link_builder,h as ez_rich_toolbar,d as ez_rich_toolbar_arrows,p as ez_rich_toolbar_configs,u as ez_rich_toolbar_letters,b as ez_simple_image_uploader}
1
+ import{r as e,c as t,h as i,H as a,F as s}from"./p-23a36bb6.js";import{a as o,b as r,R as l}from"./p-3e767a74.js";import{i as n}from"./p-c178730b.js";import"@sankhyalabs/core";const c=class{constructor(i){e(this,i),this.executeToolbarCommand=t(this,"executeToolbarCommand",7),this.textToShow=void 0,this.link=void 0,this.openInNewGuide=!1}async show(e){this._popupElement.opened=!0,e&&(this.textToShow=e)}async hide(){this._popupElement.opened=!1}async componentWillLoad(){this.i18n=await n()}async handleCancel(){this.clearValues(),this.executeToolbarCommand.emit({command:o.FOCUS}),await this.hide()}clearValues(){this.link="",this.textToShow="",this.openInNewGuide=!1}async handleCreateLink(){this.executeToolbarCommand.emit({command:o.FORMAT,value:`<a href="${this.link}" ${this.openInNewGuide?'target="_blank" rel="noopener noreferrer"':""}>${this.textToShow?this.textToShow:this.link}</a>`}),this.clearValues(),await this.hide()}async handleActionPopup(e){"OK"!==e.detail?"CANCEL"!==e.detail&&"CLOSE"!==e.detail||await this.handleCancel():await this.handleCreateLink()}getOkButtonStatus(){var e;return(null===(e=this.link)||void 0===e?void 0:e.trim())?"ENABLED":"DISABLED"}render(){return i("ez-popup",{heightMode:"auto",size:"small",useHeader:!1,ref:e=>this._popupElement=e,onEzClosePopup:()=>this.clearValues()},i("div",null,i("ez-modal-container",{modalTitle:this.i18n("ez-link-builder.addLinkTitle"),modalSubTitle:this.i18n("ez-link-builder.addLinkSubtitle"),okButtonLabel:this.i18n("ez-link-builder.submit"),cancelButtonLabel:this.i18n("app.cancel"),onEzModalAction:this.handleActionPopup.bind(this),okButtonStatus:this.getOkButtonStatus()},i("div",{class:"link-builder-container"},i("ez-text-input",{id:"link_url_input",label:this.i18n("ez-link-builder.urlInputLabel"),value:this.link,onEzChange:e=>this.link=e.detail}),i("ez-text-input",{id:"link_text_input",label:this.i18n("ez-link-builder.textInputLabel"),value:this.textToShow,onEzChange:e=>this.textToShow=e.detail}),i("ez-check",{label:this.i18n("ez-link-builder.openInNewPage"),value:this.openInNewGuide,onEzChange:e=>this.openInNewGuide=e.detail})))))}};c.style=".link-builder-container.sc-ez-link-builder{font-family:'Roboto';color:#2b3a54;display:flex;flex-direction:column;gap:10px;justify-content:space-between}.header.sc-ez-link-builder{display:flex;font-weight:500;font-size:16px}.actions.sc-ez-link-builder{display:flex;justify-content:flex-end;gap:12px;margin-top:12px;width:100%}";const h=class{constructor(i){e(this,i),this.executeToolbarCommand=t(this,"executeToolbarCommand",7),this.showPreview=!0,this.isPreviewMode=!1,this.showConfigs=!0,this.showTextFormat=!0,this.showUndoRedo=!0}async componentWillLoad(){this.i18n=await n()}handleActionTriggered(e){this.executeToolbarCommand.emit({command:e.detail.command,value:e.detail.value})}handleClickPreview(){this.executeToolbarCommand.emit({command:o.PREVIEW})}renderArrows(){if(this.showUndoRedo)return i("div",{id:"rich-toolbar-undo-redo",class:"taskbar-group"},i("ez-rich-toolbar-arrows",null))}renderLetters(){if(this.showTextFormat)return i("div",{id:"rich-toolbar-text-format",class:"taskbar-group"},i("ez-rich-toolbar-letters",null))}renderConfigs(){if(this.showConfigs)return i("div",{id:"rich-toolbar-options-configs",class:"taskbar-group"},i("ez-rich-toolbar-configs",null))}renderPreview(){if(this.showPreview)return i("div",{class:"taskbar-group"},i("span",{id:"rich-text-preview-btn",class:"preview-btn",title:this.getPreviewTitle(),onClick:this.handleClickPreview.bind(this)},this.i18n(this.isPreviewMode?"ez-rich-text.edit":"ez-rich-text.preview")))}getPreviewTitle(){return this.i18n(this.isPreviewMode?"ez-rich-text.title.edit":"ez-rich-text.title.preview")}render(){return i(a,null,i("div",{class:"taskbar"},this.renderPreview(),this.renderArrows(),this.renderLetters(),this.renderConfigs()))}};h.style=".sc-ez-rich-toolbar-h{display:block;width:100%}.taskbar.sc-ez-rich-toolbar{display:flex;padding:8px;border-radius:4px 4px 0 0}.taskbar-group.sc-ez-rich-toolbar{display:flex;margin-right:15px;padding-right:15px;border-right:1px solid #ddd}.taskbar-group.sc-ez-rich-toolbar:last-child{border-right:none}.preview-btn.sc-ez-rich-toolbar{font-family:Roboto;font-size:14px;background:none;display:flex;align-items:center;padding:0 8px;border-radius:4px;cursor:pointer;color:var(--color--secondary, #383c45);transition:0.3s all ease-in-out;width:110px;justify-content:center}.preview-btn.sc-ez-rich-toolbar:hover{background-color:#f5f5f5}";const d=class{constructor(t){e(this,t)}async componentWillLoad(){this.i18n=await n()}render(){return i(a,null,i("ez-rich-toolbar-item",{icon:r.UNDO,command:o.UNDO,title:this.i18n("ez-rich-text.title.undo")}),i("ez-rich-toolbar-item",{icon:r.REDO,command:o.REDO,title:this.i18n("ez-rich-text.title.redo")}))}};d.style=".sc-ez-rich-toolbar-arrows-h{display:flex;gap:5px}";const p=class{constructor(t){e(this,t)}async componentWillLoad(){this.i18n=await n()}render(){return i(a,null,i("ez-rich-toolbar-item",{icon:r.LIST,command:o.FORMAT,value:l.LIST,title:this.i18n("ez-rich-text.title.list")}),i("ez-rich-toolbar-item",{icon:r.IMAGE,command:o.IMAGE,title:this.i18n("ez-rich-text.title.image")}),i("ez-rich-toolbar-item",{icon:r.LINK,command:o.LINK,title:this.i18n("ez-rich-text.title.link")}))}};p.style=".sc-ez-rich-toolbar-configs-h{display:flex;gap:5px}";const u=class{constructor(t){e(this,t)}async componentWillLoad(){this.i18n=await n()}render(){return i(a,null,i("ez-rich-toolbar-item",{icon:r.BOLD,command:o.FORMAT,value:l.BOLD,title:this.i18n("ez-rich-text.title.bold")}),i("ez-rich-toolbar-item",{icon:r.ITALIC,command:o.FORMAT,value:l.ITALIC,title:this.i18n("ez-rich-text.title.italic")}),i("ez-rich-toolbar-item",{icon:r.UNDERLINE,command:o.FORMAT,value:l.UNDERLINE,title:this.i18n("ez-rich-text.title.underline")}))}};function m(e,t=1){if(0===e)return"0 Bytes";const i=t<0?0:t,a=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,a)).toFixed(i))+" "+["Bytes","Kilobytes","Megabytes","Gigabytes","Terabytes","Petabytes","Exabytes","Zettabytes","Yottabytes"][a]}u.style=".sc-ez-rich-toolbar-letters-h{display:flex;gap:5px}";const b=class{constructor(i){e(this,i),this.executeToolbarCommand=t(this,"executeToolbarCommand",7),this.link=void 0,this.base64=void 0,this.messageError=void 0,this.selectedFile=void 0,this.maxSize=500}async show(){this._popupElement.opened=!0}async hide(){this._popupElement.opened=!1}async componentWillLoad(){this.i18n=await n()}async handleCancel(){this.removeSelectedFile(),this.executeToolbarCommand.emit({command:o.FOCUS}),await this.hide()}removeSelectedFile(e){null==e||e.stopPropagation(),this.link=void 0,this.base64=void 0,this.selectedFile=void 0,this.messageError=void 0}triggerFileSelect(){this.selectedFile||this._fileInput.click()}async handleImage(e){const t=e&&e[0];t&&(t.size<1e3*this.maxSize?(this.selectedFile=t,this.base64=await function(e){return new Promise(((t,i)=>{try{const i=new FileReader;i.onload=()=>{t(i.result)},i.readAsDataURL(e)}catch(e){i(e)}}))}(t)):this.messageError=this.i18n("ez-simple-image-uploader.imageTooLarge",{maxSize:m(this.maxSize)}))}getFileList(e){return e instanceof DragEvent?Array.from(e.dataTransfer.files):e.target.files}handleFileChange(e){e.preventDefault(),this.messageError=void 0,this._dropZone.classList.remove("dragging");const t=this.getFileList(e);this.handleImage(t),e.target.value=""}handleDragOver(e){e.stopPropagation(),e.preventDefault()}handleDragEnter(e){e.preventDefault(),this._dropZone.classList.add("dragging")}handleDragLeave(e){e.preventDefault(),this._dropZone.contains(e.relatedTarget)||this._dropZone.classList.remove("dragging")}async handleActionPopup(e){"OK"===e.detail?await this.handleCreateImgTag():"CANCEL"!==e.detail&&"CLOSE"!==e.detail||await this.handleCancel()}async handleCreateImgTag(){var e;const t=`<img src="${null!==(e=this.base64)&&void 0!==e?e:this.link}" alt="${this.i18n("ez-simple-image-uploader.imageAlt")}" />`;this.executeToolbarCommand.emit({command:o.FORMAT,value:t}),this.removeSelectedFile(),await this.hide()}getOkButtonStatus(){var e;return this.base64||(null===(e=this.link)||void 0===e?void 0:e.trim())?"ENABLED":"DISABLED"}render(){return i("ez-popup",{ref:e=>this._popupElement=e,heightMode:"auto",size:"small",useHeader:!1,onEzClosePopup:()=>this.handleCancel()},i("div",null,i("ez-modal-container",{modalTitle:this.i18n("ez-simple-image-uploader.uploadTitle"),modalSubTitle:this.i18n("ez-simple-image-uploader.uploadSubtitle"),okButtonLabel:this.i18n("ez-simple-image-uploader.submit"),cancelButtonLabel:this.i18n("app.cancel"),onEzModalAction:this.handleActionPopup.bind(this),okButtonStatus:this.getOkButtonStatus()},i("div",{class:"image-uploader-container"},i("ez-tooltip",{message:this.i18n("ez-simple-image-uploader.tooltipMessage"),active:!!this.selectedFile},i("ez-text-input",{label:this.i18n("ez-simple-image-uploader.urlInputLabel"),value:this.link,onEzChange:e=>this.link=e.detail,enabled:!this.selectedFile})),i("span",null,this.i18n("ez-simple-image-uploader.orText")),i("section",{class:"drop-zone-section"},i("div",{ref:e=>this._dropZone=e,class:"drop-zone",onDrop:e=>this.handleFileChange(e),onDragOver:e=>this.handleDragOver(e),onDragEnter:e=>this.handleDragEnter(e),onDragLeave:e=>this.handleDragLeave(e)},i("div",{class:{"drop-zone-container":!0,clickable:!this.selectedFile},onClick:()=>this.triggerFileSelect()},this.selectedFile?i(s,null,i("span",{class:"ez-text ez-text--primary ez-text--medium"},this.selectedFile.name," (",m(this.selectedFile.size),")"),i("button",{class:"button-close",onClick:e=>this.removeSelectedFile(e),title:this.i18n("ez-simple-image-uploader.removeFile")},i("ez-icon",{iconName:"close"}))):i(s,null,i("ez-icon",{iconName:"anexo"}),i("span",{class:"ez-text ez-text--primary ez-text--medium"},this.i18n("ez-simple-image-uploader.dragDropText")))),i("input",{ref:e=>this._fileInput=e,type:"file",accept:"image/*",style:{display:"none"},onChange:e=>this.handleFileChange(e)})),!!this.messageError&&i("span",{class:"text-error"},this.messageError))))))}};b.style='.image-uploader-container.sc-ez-simple-image-uploader{font-family:"Roboto";color:#2b3a54;display:flex;flex-direction:column;gap:var(--space--10, 10px);justify-content:space-between;align-items:center;padding-bottom:var(--space--8, 8px)}.header.sc-ez-simple-image-uploader{display:flex;font-weight:500;font-size:var(--font-size--medium, 16px)}.actions.sc-ez-simple-image-uploader{display:flex;justify-content:flex-end;gap:var(--space--12, 12px);margin-top:var(--space--12, 12px);width:100%}.drop-zone-section.sc-ez-simple-image-uploader{width:100%}.drop-zone.sc-ez-simple-image-uploader{display:flex;flex-wrap:wrap;background-color:var(--color--petroleum-70, #F4F6F9);padding:var(--space--6, 6px);width:100%;border-radius:var(--space--12, 12px);box-sizing:border-box;min-height:100px}.clickable.sc-ez-simple-image-uploader{cursor:pointer}.dragging.sc-ez-simple-image-uploader{background-color:var(--color--petroleum-100, #C8CCD3)}.drop-zone-container.sc-ez-simple-image-uploader{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--color-strokes, #DCE0E8);border-radius:6px;box-sizing:border-box}.text-error.sc-ez-simple-image-uploader{font-family:var(--font--pattern, "Roboto");color:var(--color--red-600, #BD0025);font-size:var(--font-size--small, 12px)}.button-close.sc-ez-simple-image-uploader{border:none;background:none;cursor:pointer}';export{c as ez_link_builder,h as ez_rich_toolbar,d as ez_rich_toolbar_arrows,p as ez_rich_toolbar_configs,u as ez_rich_toolbar_letters,b as ez_simple_image_uploader}
@@ -0,0 +1 @@
1
+ import{r as i,c as s,h as t,g as e}from"./p-23a36bb6.js";import{NumberUtils as h,StringUtils as r,ElementIDUtils as n}from"@sankhyalabs/core";import{C as a}from"./p-ec7db713.js";import{i as o}from"./p-c178730b.js";const l=class{constructor(t){i(this,t),this.ezChange=s(this,"ezChange",7),this.ezStartChange=s(this,"ezStartChange",7),this.ezCancelWaitingChange=s(this,"ezCancelWaitingChange",7),this._focused=!1,this._changePending=!1,this._valuePromiseCallbacks=[],this._value=void 0,this.label=void 0,this.value=void 0,this.enabled=!0,this.required=!1,this.canShowError=!0,this.errorMessage=void 0,this.allowNegative=!0,this.precision=void 0,this.prettyPrecision=void 0,this.mode="regular",this.size="default",this.autoFocus=!1,this.alternativePlaceholder=void 0}async setFocus(i){this._textInput.setFocus(i)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((i=>{this._valuePromiseCallbacks.push(i)})):Promise.resolve(this.value)}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var i;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(i=this.errorMessage)||void 0===i?void 0:i.trim())||this.setInputValue())}observeValue(i,s){this._textInput&&i!=s&&this.handleNewValue(i,s),this._changePending=!1}observePrecision(){this._textInput&&this.setInputValue()}handleNewValue(i,s){const t=this.validateValue(i),e=this.validateValue(s);if(null===t&&(this._value=""),t===e)return;const h=this.getTextValue(t)||"",r=this.getParsedNumber(h);(this._value||"")===h||void 0===r&&this._focused||(this._value=h,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===t?void 0:t)}validateValue(i){return isNaN(i)||void 0===i?null:i}getTextValue(i){if(null==i)return;let s=this.precision>=0?h.format(i.toString(),Number(this.precision),Number(this.prettyPrecision)):i.toString();return 0===this.precision?r.replaceAll(s,".",""):s}changeValue(i){this.errorMessage="",this.value!=i?this.value=void 0===i?null:i:(this.setInputValue(),this.ezCancelWaitingChange.emit())}setError(i){this.value=null,this.errorMessage=i,this.ezCancelWaitingChange.emit()}handleBlur(){if(this._changePending)try{const i=this.getParsedNumber();if(void 0!==i&&isNaN(i))this.setError(this.i18n("ez-classic-number-input.invalidNumber"));else try{this.changeValue(i)}catch(i){return void this.setError(i.message)}}finally{for(const i of this._valuePromiseCallbacks)i(this.value);this._valuePromiseCallbacks=[]}}handleInput(){this.getParsedNumber()!==this.value&&(this._focused=!0,this._changePending=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1}))}getParsedNumber(i=this._textInput.value){return(null==i?void 0:i.trim())?h.stringToNumber(i):void 0}setInputValue(){const i=this.getTextValue(this.value)||"";(this._value||"")!==i&&(this._value=i,this._textInput.value=this._value)}async componentWillLoad(){this.i18n=await o()}componentDidLoad(){a.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return n.addIDInfoIfNotExists(this._elem,"input"),t("ez-classic-input",{class:"number__input","data-element-id":n.getInternalIDInfo("textInput"),ref:i=>this._textInput=i,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),enabled:this.enabled,errorMessage:this.errorMessage,size:this.size,value:this._value,required:this.required,onEzChange:i=>i.stopPropagation()})}get _elem(){return e(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"],precision:["observePrecision"],prettyPrecision:["observePrecision"]}}};l.style=":host{--ez-classic-number-input__min-width:0px;--ez-classic-number-input__max-width:100%;display:block;width:100%}.number__input{height:100%;min-width:var(--ez-classic-number-input__min-width);max-width:var(--ez-classic-number-input__max-width)}";export{l as ez_classic_number_input}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e}from"./p-23a36bb6.js";import{UserInterface as s}from"@sankhyalabs/core";import{a as l}from"./p-b1e45320.js";import{i as o}from"./p-98218fbc.js";const n=window,a=new CustomEvent("onSubmitFilter",{detail:{showToast:!0}}),r=class{constructor(e){t(this,e),this.applyFilterColumnOptions=i(this,"applyFilterColumnOptions",7),this.opened=!0,this.columnName=void 0,this.columnLabel=void 0,this.gridHeaderHidden=!1,this.noHeaderTaskBar=!1,this.dataSource=void 0,this.dataUnit=void 0,this.options=void 0,this.selectedItems=void 0,this.fieldDescriptor=void 0,this.useOptions=!1,this.isTextSearch=!1}async hide(){await this.ezPopoverElement.hide(),await this.clearConfigs()}async show(t){var i;this.canShow(t)&&(this.fieldDescriptor=null!==(i=t.fieldDescriptor)&&void 0!==i?i:this.dataUnit.getField(t.columnName),this.buildIsTextSearch(),this.columnName=t.columnName,this.columnLabel=t.columnLabel,await this.setOptions(t),await this.ezPopoverElement.showUnder(`filter-column-${t.columnName}-${this.dataUnit.dataUnitId}`))}buildIsTextSearch(){var t,i;const e=null!==(i=null===(t=this.fieldDescriptor)||void 0===t?void 0:t.userInterface)&&void 0!==i?i:s.SHORTTEXT;this.isTextSearch=!(e===s.DECIMALNUMBER||e===s.INTEGERNUMBER)}async clearConfigs(){var t;await(null===(t=this.ezMultiSelectionList)||void 0===t?void 0:t.clearFilteredOptions()),this.options=null,this.columnName=null}canShow(t){return!this.ezPopoverElement.opened||t.columnName!==this.columnName}submit(){this.applyFilterColumnOptions.emit({field:this.columnName,values:this.selectedItems}),n.dispatchEvent(a),this.hide()}changeSelectedItems(t){this.selectedItems=t}hasToUseOptions(){return this.fieldDescriptor.userInterface===s.OPTIONSELECTOR||this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}isCheckBoxOrSwitch(){return this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}async setOptions(t){var i,e,s,o;const n=t.filteredOptions,a=this.hasToUseOptions();if(a)return this.useOptions=a,void(this.options=a?this.buildOptions(n):null!=n?n:null);let r=this.columnName;const h={onlyLabel:!1};(null===(e=null===(i=t.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e[l])&&(r=null===(o=null===(s=t.fieldDescriptor)||void 0===s?void 0:s.properties)||void 0===o?void 0:o[l],h.onlyLabel=!0);const c=await this.dataSource.getStaticOptions(r,h);if(null!=c){const t=new Set((n||[]).filter((t=>t.check)).map((t=>t.label)));return this.useOptions=!0,void(this.options=0===t.size?c:c.map((i=>Object.assign(Object.assign({},i),{check:t.has(i.label)}))))}this.useOptions=!1,this.options=null}buildOptions(t){var i,e;if(t&&t.length>0)return t;if(this.isCheckBoxOrSwitch())return[{label:this.i18n("app.yes"),value:"true",check:!0},{label:this.i18n("app.no"),value:"false",check:!0}];const s=null===(e=null===(i=this.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e.options;if(Array.isArray(s))return s.map((t=>({label:t.value,value:t.value,check:!0})));const l=JSON.parse(s);return Object.keys(l).map((t=>({label:l[t],value:t,check:!0})))}handleEzVisibilityChange(t){!1===t.detail&&this.clearConfigs()}async componentWillLoad(){this.i18n=await o()}render(){return e("ez-popover-plus",{ref:t=>this.ezPopoverElement=t,class:"filter-column__popover","overlay-type":"none",autoClose:!0,onEzVisibilityChange:this.handleEzVisibilityChange.bind(this)},e("section",{class:"filter-column"},e("header",{class:"filter-column__header"},e("span",{class:"ez-text ez-text--medium filter-column__header-title"},this.i18n("ez-grid.filterColumnHeader",{columnLabel:this.columnLabel})),e("ez-button",{mode:"icon","icon-name":"close",class:"ez-button--tertiary",onClick:()=>this.hide()})),e("ez-multi-selection-list",{id:"filter-column-selection-list",columnName:this.columnName,dataSource:this.dataSource,options:this.options,useOptions:this.useOptions,ref:t=>this.ezMultiSelectionList=t,onChangeFilteredOptions:t=>this.changeSelectedItems(t.detail),isTextSearch:this.isTextSearch,"data-element-id":this.columnName}),e("footer",{class:"filter-column__footer"},e("ez-button",{label:this.i18n("app.apply"),class:"ez-button--primary",onClick:this.submit.bind(this)}))))}};r.style=".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}#filter-column-selection-list{--ez-multi-selection-default-height:unset}";export{r as filter_column}
1
+ import{r as t,c as i,h as e}from"./p-23a36bb6.js";import{UserInterface as s}from"@sankhyalabs/core";import{a as l}from"./p-b1e45320.js";import{i as o}from"./p-c178730b.js";const n=window,a=new CustomEvent("onSubmitFilter",{detail:{showToast:!0}}),r=class{constructor(e){t(this,e),this.applyFilterColumnOptions=i(this,"applyFilterColumnOptions",7),this.opened=!0,this.columnName=void 0,this.columnLabel=void 0,this.gridHeaderHidden=!1,this.noHeaderTaskBar=!1,this.dataSource=void 0,this.dataUnit=void 0,this.options=void 0,this.selectedItems=void 0,this.fieldDescriptor=void 0,this.useOptions=!1,this.isTextSearch=!1}async hide(){await this.ezPopoverElement.hide(),await this.clearConfigs()}async show(t){var i;this.canShow(t)&&(this.fieldDescriptor=null!==(i=t.fieldDescriptor)&&void 0!==i?i:this.dataUnit.getField(t.columnName),this.buildIsTextSearch(),this.columnName=t.columnName,this.columnLabel=t.columnLabel,await this.setOptions(t),await this.ezPopoverElement.showUnder(`filter-column-${t.columnName}-${this.dataUnit.dataUnitId}`))}buildIsTextSearch(){var t,i;const e=null!==(i=null===(t=this.fieldDescriptor)||void 0===t?void 0:t.userInterface)&&void 0!==i?i:s.SHORTTEXT;this.isTextSearch=!(e===s.DECIMALNUMBER||e===s.INTEGERNUMBER)}async clearConfigs(){var t;await(null===(t=this.ezMultiSelectionList)||void 0===t?void 0:t.clearFilteredOptions()),this.options=null,this.columnName=null}canShow(t){return!this.ezPopoverElement.opened||t.columnName!==this.columnName}submit(){this.applyFilterColumnOptions.emit({field:this.columnName,values:this.selectedItems}),n.dispatchEvent(a),this.hide()}changeSelectedItems(t){this.selectedItems=t}hasToUseOptions(){return this.fieldDescriptor.userInterface===s.OPTIONSELECTOR||this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}isCheckBoxOrSwitch(){return this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}async setOptions(t){var i,e,s,o;const n=t.filteredOptions,a=this.hasToUseOptions();if(a)return this.useOptions=a,void(this.options=a?this.buildOptions(n):null!=n?n:null);let r=this.columnName;const h={onlyLabel:!1};(null===(e=null===(i=t.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e[l])&&(r=null===(o=null===(s=t.fieldDescriptor)||void 0===s?void 0:s.properties)||void 0===o?void 0:o[l],h.onlyLabel=!0);const c=await this.dataSource.getStaticOptions(r,h);if(null!=c){const t=new Set((n||[]).filter((t=>t.check)).map((t=>t.label)));return this.useOptions=!0,void(this.options=0===t.size?c:c.map((i=>Object.assign(Object.assign({},i),{check:t.has(i.label)}))))}this.useOptions=!1,this.options=null}buildOptions(t){var i,e;if(t&&t.length>0)return t;if(this.isCheckBoxOrSwitch())return[{label:this.i18n("app.yes"),value:"true",check:!0},{label:this.i18n("app.no"),value:"false",check:!0}];const s=null===(e=null===(i=this.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e.options;if(Array.isArray(s))return s.map((t=>({label:t.value,value:t.value,check:!0})));const l=JSON.parse(s);return Object.keys(l).map((t=>({label:l[t],value:t,check:!0})))}handleEzVisibilityChange(t){!1===t.detail&&this.clearConfigs()}async componentWillLoad(){this.i18n=await o()}render(){return e("ez-popover-plus",{ref:t=>this.ezPopoverElement=t,class:"filter-column__popover","overlay-type":"none",autoClose:!0,onEzVisibilityChange:this.handleEzVisibilityChange.bind(this)},e("section",{class:"filter-column"},e("header",{class:"filter-column__header"},e("span",{class:"ez-text ez-text--medium filter-column__header-title"},this.i18n("ez-grid.filterColumnHeader",{columnLabel:this.columnLabel})),e("ez-button",{mode:"icon","icon-name":"close",class:"ez-button--tertiary",onClick:()=>this.hide()})),e("ez-multi-selection-list",{id:"filter-column-selection-list",columnName:this.columnName,dataSource:this.dataSource,options:this.options,useOptions:this.useOptions,ref:t=>this.ezMultiSelectionList=t,onChangeFilteredOptions:t=>this.changeSelectedItems(t.detail),isTextSearch:this.isTextSearch,"data-element-id":this.columnName}),e("footer",{class:"filter-column__footer"},e("ez-button",{label:this.i18n("app.apply"),class:"ez-button--primary",onClick:this.submit.bind(this)}))))}};r.style=".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}#filter-column-selection-list{--ez-multi-selection-default-height:unset}";export{r as filter_column}
@@ -1 +1 @@
1
- import{r as a,c as e,f as r,h as t,g as l}from"./p-23a36bb6.js";import{FloatingManager as i}from"@sankhyalabs/core";import{i as s}from"./p-98218fbc.js";const n=class{constructor(r){a(this,r),this.ezChange=e(this,"ezChange",7),this._firstRender=!0,this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(a,e,r,t){this.floating&&(this._floatingID=i.float(this._box,this._container,{isFixed:this.isFixed(),autoClose:!0,top:a,left:e,bottom:r,right:t}),this.isFixed()||(window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.scroll()))}async fitVertical(a,e){const r=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>r?this.show(a+"px",void 0,"unset"):this.show("unset",void 0,e+"px")}async fitHorizontal(a){const e=this._container.getBoundingClientRect().right+this._calendarWidth;(window.innerWidth||document.documentElement.clientWidth)>e||this.show(void 0,"unset",void 0,a+"px")}async hide(){void 0!==this._floatingID&&(i.close(this._floatingID),this._floatingID=void 0)}observeValue(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}scrollListener(){this.floating&&this.isFixed()&&this.hide()}isFixed(){return"true"===this._hostElem.dataset.isFixed}getMonthLabel(){return this.i18n(`ez-calendar.month.${this._currentPosition.getMonth()}`)+" "+this._currentPosition.getFullYear()}isSelectedDate(a){return!!this.value&&this.value.getDate()==a.getDate()&&this.value.getMonth()==a.getMonth()&&this.value.getFullYear()==a.getFullYear()}changeMonth(a){this._currentPosition.setMonth(this._currentPosition.getMonth()+a),r(this)}selectDate(a){let e=a;this.value&&(this.time||this.showSeconds)&&(e.setHours(this.value.getHours()),e.setMinutes(this.value.getMinutes()),e.setSeconds(this.showSeconds?this.value.getSeconds():0)),this.value=e,this.ezChange.emit(this.value)}selectHours(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),a,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit(this.value)}selectMinutes(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),a,this.value.getSeconds()),this.ezChange.emit(this.value)}selectSeconds(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),a),this.ezChange.emit(this.value)}updateScroll(a){if(a){const{scrollHeight:e,clientHeight:r,scrollTop:t}=a;e-r-Math.ceil(t)>0?a.classList.add("endHidden"):a.classList.remove("endHidden")}}async componentWillLoad(){this.i18n=await s()}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._calendarWidth=this._box.clientWidth,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){this.scroll()}scroll(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64,this.updateScroll(this._secondsScroll)))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const a=new Date;return a.setTime(this._currentPosition.getTime()),a.setDate(1-a.getDay()),t("section",{ref:a=>this._container=a},t("div",{ref:a=>this._box=a,class:"calendar__container"},t("div",{class:"calendar"},t("div",{class:"calendar__header"},t("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),t("label",{class:"calendar__lbl-month"},this.getMonthLabel()),t("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),t("div",{class:"calendar__body"},t("div",{class:"calendar__line"},[...Array(7).keys()].map((a=>t("div",{"data-day":this.i18n(`ez-calendar.weekDay.${a}`),class:"calendar__cell calendar__cell--unselectable"},this.i18n(`ez-calendar.weekDay.${a}`))))),[0,7,14,21,28,35].map((e=>t("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((r=>{const l=new Date;l.setTime(a.getTime()),l.setDate(l.getDate()+e+r);let i=`${l.getMonth()+1}-${l.getDate()}-${l.getFullYear()}`,s="calendar__cell";return this._currentPosition.getMonth()!=l.getMonth()?s+=" calendar__cell--secondary":this.isSelectedDate(l)&&(s+=" calendar__cell--selected"),t("div",{"data-day-month":i,class:s,onClick:()=>this.selectDate(l)},l.getDate())})))))),t("div",{class:"calendar__footer"},t("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this.i18n("ez-calendar.today")))),(this.time||this.showSeconds)&&t("div",{class:"calendar-time"},t("div",{class:"calendar-time__header"},t("div",null,"H"),t("div",{class:"separatorTime"},":"),t("div",null,"M"),this.showSeconds&&t("div",{class:"separatorTime"},":"),this.showSeconds&&t("div",null,"S")),t("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"12px",paddingRight:"12px"}},t("div",{class:"calendar__column",ref:a=>this._hoursScroll=a,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((a,e)=>e===this.value.getHours()?t("div",{style:{display:"flex"},ref:a=>this._hoursSelect=a},t("div",{"data-hour":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(e)},a),t("div",{class:"separatorTime"},":")):t("div",{style:{display:"flex"}},t("div",{"data-hour":a,class:"calendar__cell",onClick:()=>this.selectHours(e)},a),t("div",{class:"separatorTime"},":"))))),t("div",{class:"calendar__column",ref:a=>this._minutesScroll=a,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getMinutes()?t("div",{style:{display:"flex"},ref:a=>this._minutesSelect=a},t("div",{"data-minute":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&t("div",{class:"separatorTime"},":")):t("div",{style:{display:"flex"}},t("div",{"data-minute":a,class:"calendar__cell",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&t("div",{class:"separatorTime"},":"))))),this.showSeconds&&t("div",{class:"calendar__column",ref:a=>this._secondsScroll=a,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getSeconds()?t("div",{"data-second":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(e),ref:a=>this._secondsSelect=a},a):t("div",{"data-second":a,class:"calendar__cell",onClick:()=>this.selectSeconds(e)},a))))))))}get _hostElem(){return l(this)}static get watchers(){return{value:["observeValue"]}}};n.style=':host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--ez-calendar__nav-btn--next-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:\'\';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto;scrollbar-width:none}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}';export{n as ez_calendar}
1
+ import{r as a,c as e,f as r,h as t,g as l}from"./p-23a36bb6.js";import{FloatingManager as i}from"@sankhyalabs/core";import{i as s}from"./p-c178730b.js";const n=class{constructor(r){a(this,r),this.ezChange=e(this,"ezChange",7),this._firstRender=!0,this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(a,e,r,t){this.floating&&(this._floatingID=i.float(this._box,this._container,{isFixed:this.isFixed(),autoClose:!0,top:a,left:e,bottom:r,right:t}),this.isFixed()||(window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.scroll()))}async fitVertical(a,e){const r=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>r?this.show(a+"px",void 0,"unset"):this.show("unset",void 0,e+"px")}async fitHorizontal(a){const e=this._container.getBoundingClientRect().right+this._calendarWidth;(window.innerWidth||document.documentElement.clientWidth)>e||this.show(void 0,"unset",void 0,a+"px")}async hide(){void 0!==this._floatingID&&(i.close(this._floatingID),this._floatingID=void 0)}observeValue(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}scrollListener(){this.floating&&this.isFixed()&&this.hide()}isFixed(){return"true"===this._hostElem.dataset.isFixed}getMonthLabel(){return this.i18n(`ez-calendar.month.${this._currentPosition.getMonth()}`)+" "+this._currentPosition.getFullYear()}isSelectedDate(a){return!!this.value&&this.value.getDate()==a.getDate()&&this.value.getMonth()==a.getMonth()&&this.value.getFullYear()==a.getFullYear()}changeMonth(a){this._currentPosition.setMonth(this._currentPosition.getMonth()+a),r(this)}selectDate(a){let e=a;this.value&&(this.time||this.showSeconds)&&(e.setHours(this.value.getHours()),e.setMinutes(this.value.getMinutes()),e.setSeconds(this.showSeconds?this.value.getSeconds():0)),this.value=e,this.ezChange.emit(this.value)}selectHours(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),a,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit(this.value)}selectMinutes(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),a,this.value.getSeconds()),this.ezChange.emit(this.value)}selectSeconds(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),a),this.ezChange.emit(this.value)}updateScroll(a){if(a){const{scrollHeight:e,clientHeight:r,scrollTop:t}=a;e-r-Math.ceil(t)>0?a.classList.add("endHidden"):a.classList.remove("endHidden")}}async componentWillLoad(){this.i18n=await s()}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._calendarWidth=this._box.clientWidth,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){this.scroll()}scroll(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64,this.updateScroll(this._secondsScroll)))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const a=new Date;return a.setTime(this._currentPosition.getTime()),a.setDate(1-a.getDay()),t("section",{ref:a=>this._container=a},t("div",{ref:a=>this._box=a,class:"calendar__container"},t("div",{class:"calendar"},t("div",{class:"calendar__header"},t("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),t("label",{class:"calendar__lbl-month"},this.getMonthLabel()),t("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),t("div",{class:"calendar__body"},t("div",{class:"calendar__line"},[...Array(7).keys()].map((a=>t("div",{"data-day":this.i18n(`ez-calendar.weekDay.${a}`),class:"calendar__cell calendar__cell--unselectable"},this.i18n(`ez-calendar.weekDay.${a}`))))),[0,7,14,21,28,35].map((e=>t("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((r=>{const l=new Date;l.setTime(a.getTime()),l.setDate(l.getDate()+e+r);let i=`${l.getMonth()+1}-${l.getDate()}-${l.getFullYear()}`,s="calendar__cell";return this._currentPosition.getMonth()!=l.getMonth()?s+=" calendar__cell--secondary":this.isSelectedDate(l)&&(s+=" calendar__cell--selected"),t("div",{"data-day-month":i,class:s,onClick:()=>this.selectDate(l)},l.getDate())})))))),t("div",{class:"calendar__footer"},t("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this.i18n("ez-calendar.today")))),(this.time||this.showSeconds)&&t("div",{class:"calendar-time"},t("div",{class:"calendar-time__header"},t("div",null,"H"),t("div",{class:"separatorTime"},":"),t("div",null,"M"),this.showSeconds&&t("div",{class:"separatorTime"},":"),this.showSeconds&&t("div",null,"S")),t("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"12px",paddingRight:"12px"}},t("div",{class:"calendar__column",ref:a=>this._hoursScroll=a,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((a,e)=>e===this.value.getHours()?t("div",{style:{display:"flex"},ref:a=>this._hoursSelect=a},t("div",{"data-hour":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(e)},a),t("div",{class:"separatorTime"},":")):t("div",{style:{display:"flex"}},t("div",{"data-hour":a,class:"calendar__cell",onClick:()=>this.selectHours(e)},a),t("div",{class:"separatorTime"},":"))))),t("div",{class:"calendar__column",ref:a=>this._minutesScroll=a,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getMinutes()?t("div",{style:{display:"flex"},ref:a=>this._minutesSelect=a},t("div",{"data-minute":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&t("div",{class:"separatorTime"},":")):t("div",{style:{display:"flex"}},t("div",{"data-minute":a,class:"calendar__cell",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&t("div",{class:"separatorTime"},":"))))),this.showSeconds&&t("div",{class:"calendar__column",ref:a=>this._secondsScroll=a,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getSeconds()?t("div",{"data-second":a,class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(e),ref:a=>this._secondsSelect=a},a):t("div",{"data-second":a,class:"calendar__cell",onClick:()=>this.selectSeconds(e)},a))))))))}get _hostElem(){return l(this)}static get watchers(){return{value:["observeValue"]}}};n.style=':host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--ez-calendar__nav-btn--next-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:\'\';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto;scrollbar-width:none}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}';export{n as ez_calendar}
@@ -0,0 +1 @@
1
+ import{i}from"./p-c178730b.js";const o=async function(){await i(),console.log("Global initialization ez-ui completed!")};export{o as g}
@@ -13,19 +13,23 @@ export declare class EzClassicComboBox {
13
13
  filteredOptions: Array<IOption>;
14
14
  inputValue: string;
15
15
  /** Valor do combo box. */
16
- value?: IOption;
16
+ value?: IOption | string;
17
17
  /** Texto do label exibido acima do combo box. */
18
18
  label?: string;
19
19
  /** Placeholder do combo box */
20
20
  placeholder?: string;
21
21
  /** Define se o combo box está habilitado. */
22
22
  enabled?: boolean;
23
+ /** Define se o input é obrigatório (visualmente) */
24
+ required?: boolean;
23
25
  /** Define se o combo box é somente leitura. */
24
26
  readonly?: boolean;
25
27
  /** Nome do combo box. */
26
28
  name?: string;
27
29
  /** Estado visual do combo box: default, error, success ou warning. */
28
30
  state?: "default" | "error" | "success" | "warning";
31
+ /** Tamanho do input */
32
+ size?: "default" | "small" | "xsmall";
29
33
  /** Texto de ajuda exibido abaixo do combo box. */
30
34
  helpText?: string;
31
35
  /** Nome do ícone. */
@@ -85,11 +89,13 @@ export declare class EzClassicComboBox {
85
89
  * Oculta o popover.
86
90
  */
87
91
  hidePopover(): Promise<void>;
92
+ private getFullOption;
93
+ private getOptionValue;
88
94
  private compareOptionValues;
89
95
  private setEmptyValue;
90
- setValue(option: IOption): Promise<void>;
96
+ setValue(option: IOption | string): Promise<void>;
91
97
  optionsChanged(): Promise<void>;
92
- valueChanged(newValue: IOption): Promise<void>;
98
+ valueChanged(newValue: IOption | string, oldValue: IOption | string): Promise<void>;
93
99
  private handleIconClick;
94
100
  private handleEzChange;
95
101
  private handleEzBlur;
@@ -0,0 +1,91 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { WaitingChange } from '@sankhyalabs/core';
3
+ import { TFocusOptions } from '../ez-classic-input/ez-classic-input';
4
+ export declare class EzClassicDateInput {
5
+ private _calendar;
6
+ private _textInput;
7
+ private _changePending;
8
+ private _focused;
9
+ private _valuePromiseCallbacks;
10
+ private _popover;
11
+ private i18n;
12
+ private _elem;
13
+ /**
14
+ * Emitido quando acontece a alteração de valor do campo.
15
+ */
16
+ ezChange: EventEmitter<Date>;
17
+ /**
18
+ * Emitido ao iniciar a alteração (digitação incompleta).
19
+ */
20
+ ezStartChange: EventEmitter<WaitingChange>;
21
+ /**
22
+ * Emitido quando não foi possível completar a alteração entre o evento ezStartChange e ezChange.
23
+ */
24
+ ezCancelWaitingChange: EventEmitter<void>;
25
+ /**
26
+ * Emitido quando o usuário digita uma data válida no campo.
27
+ */
28
+ ezInput: EventEmitter<Date>;
29
+ /**
30
+ * Texto a ser apresentado como título do campo.
31
+ */
32
+ label: string;
33
+ /**
34
+ * Define o valor do campo.
35
+ */
36
+ value: Date;
37
+ /**
38
+ * Se false o usuário não pode interagir com o campo.
39
+ */
40
+ enabled: boolean;
41
+ /**
42
+ * Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
43
+ */
44
+ errorMessage: string;
45
+ /**
46
+ * Define o tamanho do campo.
47
+ */
48
+ mode: "slim" | "regular";
49
+ /** Tamanho do input */
50
+ size?: "default" | "small" | "xsmall";
51
+ /** Define se o campo é obrigatório */
52
+ required?: boolean;
53
+ /**
54
+ * Se false deixa de exibir a mensagem de erro dentro do campo.
55
+ */
56
+ canShowError: boolean;
57
+ /**
58
+ * Se true o campo de texto receberá o foco ao ser renderizado.
59
+ */
60
+ autoFocus: boolean;
61
+ /**
62
+ * Texto alternativo ser apresentado como título do campo.
63
+ */
64
+ alternativePlaceholder: string;
65
+ observeLabel(): void;
66
+ observeErrorMessage(): void;
67
+ observeValue(newValue: Date, oldValue: Date): void;
68
+ /**
69
+ * Aplica o foco no campo.
70
+ */
71
+ setFocus(options?: TFocusOptions): Promise<void>;
72
+ /**
73
+ * Remove o foco do campo.
74
+ */
75
+ setBlur(): Promise<void>;
76
+ /**
77
+ * Retorna se o conteúdo é inválido.
78
+ */
79
+ isInvalid(): Promise<boolean>;
80
+ getValueAsync(): Promise<Date>;
81
+ private changeValue;
82
+ private handleChangeCalendar;
83
+ private handleBlur;
84
+ private getTextValue;
85
+ private handleInput;
86
+ private setInputValue;
87
+ disconnectedCallback(): void;
88
+ componentWillLoad(): Promise<void>;
89
+ componentDidLoad(): void;
90
+ render(): any;
91
+ }
@@ -0,0 +1,95 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { WaitingChange } from '@sankhyalabs/core';
3
+ import { OptionsSetFocus } from '../ez-classic-input/interfaces/optionsSetFocus';
4
+ export declare class EzClassicDateTimeInput {
5
+ private _calendar;
6
+ private _textInput;
7
+ private _changePending;
8
+ private _focused;
9
+ private _valuePromiseCallbacks;
10
+ private _popover;
11
+ private i18n;
12
+ private _elem;
13
+ /**
14
+ * Emitido quando acontece a alteração de valor do campo.
15
+ */
16
+ ezChange: EventEmitter<Date>;
17
+ /**
18
+ * Emitido ao iniciar a alteração (digitação incompleta).
19
+ */
20
+ ezStartChange: EventEmitter<WaitingChange>;
21
+ /**
22
+ * Emitido quando não foi possível completar a alteração entre o evento ezStartChange e ezChange.
23
+ */
24
+ ezCancelWaitingChange: EventEmitter<void>;
25
+ /**
26
+ * Texto a ser apresentado como título do campo.
27
+ */
28
+ label: string;
29
+ /**
30
+ * Define o valor do campo.
31
+ */
32
+ value: Date;
33
+ /**
34
+ * Se false o usuário não pode interagir com o campo.
35
+ */
36
+ enabled: boolean;
37
+ /**
38
+ * Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
39
+ */
40
+ errorMessage: string;
41
+ /**
42
+ * Se true considera segundos.
43
+ */
44
+ showSeconds: boolean;
45
+ /**
46
+ * Define o tamanho do campo.
47
+ */
48
+ mode: "slim" | "regular";
49
+ /** Tamanho do input */
50
+ size?: "default" | "small" | "xsmall";
51
+ /** Define se o campo é obrigatório */
52
+ required?: boolean;
53
+ /**
54
+ * Se false deixa de exibir a mensagem de erro dentro do campo.
55
+ */
56
+ canShowError: boolean;
57
+ /**
58
+ * Se true o campo de texto receberá o foco ao ser renderizado.
59
+ */
60
+ autoFocus: boolean;
61
+ /**
62
+ * Texto alternativo ser apresentado como título do campo.
63
+ */
64
+ alternativePlaceholder: string;
65
+ observeLabel(): void;
66
+ observeErrorMessage(): void;
67
+ observeValue(newValue: Date, oldValue: Date): void;
68
+ /**
69
+ * Aplica o foco no campo.
70
+ */
71
+ setFocus(options?: OptionsSetFocus): Promise<void>;
72
+ /**
73
+ * Remove o foco do campo.
74
+ */
75
+ setBlur(): Promise<void>;
76
+ /**
77
+ * Retorna se o conteúdo é inválido.
78
+ */
79
+ isInvalid(): Promise<boolean>;
80
+ getValueAsync(): Promise<Date>;
81
+ private handleKeyDown;
82
+ private handleFocus;
83
+ private handleClick;
84
+ private changeValue;
85
+ private hideCalendar;
86
+ private getParsedDateTime;
87
+ private handleBlur;
88
+ private getTextValue;
89
+ private handleInput;
90
+ private setInputValue;
91
+ disconnectedCallback(): void;
92
+ componentWillLoad(): Promise<void>;
93
+ componentDidLoad(): void;
94
+ render(): any;
95
+ }
@@ -13,14 +13,20 @@ export declare class EzClassicInput {
13
13
  label?: string;
14
14
  /** Texto de ajuda exibido abaixo do input */
15
15
  helpText?: string;
16
+ /** Texto de erro exibido abaixo do input */
17
+ errorMessage?: string;
16
18
  /** Placeholder do input */
17
19
  placeholder?: string;
18
20
  /** Define se o input está habilitado */
19
21
  enabled?: boolean;
20
22
  /** Define se o input é somente leitura */
21
23
  readonly?: boolean;
24
+ /** Define se o input é obrigatório (visualmente) */
25
+ required?: boolean;
22
26
  /** Nome do input */
23
27
  name?: string;
28
+ /** Tamanho do input */
29
+ size?: "default" | "small" | "xsmall";
24
30
  /** Tamanho mínimo do valor */
25
31
  minlength?: number;
26
32
  /** Tamanho máximo do valor */
@@ -74,12 +80,23 @@ export declare class EzClassicInput {
74
80
  */
75
81
  setBlur(): Promise<void>;
76
82
  syncValue(): Promise<void>;
83
+ observeErrorMessage(newValue: string): Promise<void>;
77
84
  private onInput;
85
+ private processInputWithMask;
86
+ private processCgcCpfMask;
87
+ private processRegularMask;
88
+ private updateInputValue;
89
+ private updateInputValueWithoutMask;
78
90
  private onBlur;
79
91
  private onFocus;
80
92
  private handleIconClick;
81
93
  private addInfoId;
82
- componentWillLoad(): void;
94
+ private buildPlaceholder;
95
+ private buildMaskFormatter;
96
+ private getMaskToBuilder;
97
+ private getPhoneMask;
98
+ private getCGCCpfMask;
99
+ componentDidRender(): void;
83
100
  componentDidLoad(): void;
84
101
  render(): any;
85
102
  }
@@ -0,0 +1,101 @@
1
+ import { WaitingChange } from "@sankhyalabs/core";
2
+ import { EventEmitter } from "../../stencil-public-runtime";
3
+ import { OptionsSetFocus } from "../ez-classic-input/interfaces/optionsSetFocus";
4
+ export declare class EzClassicNumberInput {
5
+ private _textInput;
6
+ private _focused;
7
+ private _changePending;
8
+ private _valuePromiseCallbacks;
9
+ private i18n;
10
+ private _elem;
11
+ private _value;
12
+ /**
13
+ * Emitido quando acontece a alteração de valor do campo.
14
+ */
15
+ ezChange: EventEmitter<number>;
16
+ /**
17
+ * Emitido ao iniciar a alteração (digitação incompleta).
18
+ */
19
+ ezStartChange: EventEmitter<WaitingChange>;
20
+ /**
21
+ * Emitido quando não foi possível completar a alteração entre o evento ezStartChange e ezChange.
22
+ */
23
+ ezCancelWaitingChange: EventEmitter<void>;
24
+ /**
25
+ * Texto a ser apresentado como título do campo.
26
+ */
27
+ label: string;
28
+ /**
29
+ * Define o valor do campo.
30
+ */
31
+ value: number;
32
+ /**
33
+ * Se false, o usuário não pode interagir com o campo.
34
+ */
35
+ enabled: boolean;
36
+ /** Define se o input é obrigatório (visualmente) */
37
+ required?: boolean;
38
+ /**
39
+ * Se false deixa de exibir a mensagem de erro dentro do campo.
40
+ */
41
+ canShowError: boolean;
42
+ /**
43
+ * Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
44
+ */
45
+ errorMessage: string;
46
+ /**
47
+ * Se false, o input não aceitará números negativos.
48
+ */
49
+ allowNegative: boolean;
50
+ /**
51
+ * Define quantas casas decimais serão exibidas. Caso haja mais casas haverá arredondamento.
52
+ */
53
+ precision: number;
54
+ /**
55
+ * Define qual é o mínimo de casas depois da vírgula.
56
+ * Exemplo: 1,1 será exibido como 1,1000 quando `prettyPrecision = 4`.
57
+ */
58
+ prettyPrecision: number;
59
+ /**
60
+ * Define o tamanho do campo.
61
+ */
62
+ mode: "slim" | "regular";
63
+ /** Tamanho do input */
64
+ size?: "default" | "small" | "xsmall";
65
+ /** * Se true o campo de texto receberá o foco ao ser renderizado.
66
+ */
67
+ autoFocus: boolean;
68
+ /**
69
+ * Texto alternativo a ser apresentado como título do campo.
70
+ */
71
+ alternativePlaceholder: string;
72
+ /**
73
+ * Aplica o foco no campo.
74
+ */
75
+ setFocus(options?: OptionsSetFocus): Promise<void>;
76
+ /**
77
+ * Remove o foco do campo.
78
+ */
79
+ setBlur(): Promise<void>;
80
+ /**
81
+ * Retorna se o conteúdo é inválido.
82
+ */
83
+ isInvalid(): Promise<boolean>;
84
+ getValueAsync(): Promise<number>;
85
+ observeLabel(): void;
86
+ observeErrorMessage(): void;
87
+ observeValue(newValue: number, oldValue: number): void;
88
+ observePrecision(): void;
89
+ private handleNewValue;
90
+ private validateValue;
91
+ private getTextValue;
92
+ private changeValue;
93
+ private setError;
94
+ private handleBlur;
95
+ private handleInput;
96
+ private getParsedNumber;
97
+ private setInputValue;
98
+ componentWillLoad(): Promise<void>;
99
+ componentDidLoad(): void;
100
+ render(): any;
101
+ }