@sankhyalabs/ezui 7.1.0-dev.20 → 7.1.0-dev.22

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 (378) hide show
  1. package/dist/cjs/{ApplicationUtils-d04f5c94.js → ApplicationUtils-006ca96f.js} +1 -1
  2. package/dist/cjs/FormLayout-fe8da83c.js +9 -0
  3. package/dist/cjs/{app-globals-c128c97e.js → app-globals-5cb12916.js} +1 -1
  4. package/dist/cjs/{ez-combo-box-list_4.cjs.entry.js → classic-search-list_7.cjs.entry.js} +361 -7
  5. package/dist/cjs/ez-actions-button.cjs.entry.js +5 -4
  6. package/dist/cjs/ez-alert-list.cjs.entry.js +2 -2
  7. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-avatar.cjs.entry.js +2 -2
  10. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-button.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-calendar.cjs.entry.js +2 -2
  14. package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-classic-combo-box.cjs.entry.js +37 -16
  19. package/dist/cjs/ez-classic-date-input.cjs.entry.js +201 -0
  20. package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +246 -0
  21. package/dist/cjs/ez-classic-input.cjs.entry.js +100 -19
  22. package/dist/cjs/ez-classic-number-input.cjs.entry.js +205 -0
  23. package/dist/cjs/ez-classic-search-plus.cjs.entry.js +407 -0
  24. package/dist/cjs/ez-classic-search.cjs.entry.js +683 -0
  25. package/dist/cjs/ez-classic-text-area.cjs.entry.js +2 -2
  26. package/dist/cjs/ez-classic-time-input.cjs.entry.js +197 -0
  27. package/dist/cjs/ez-collapsible-box.cjs.entry.js +5 -4
  28. package/dist/cjs/ez-combo-box.cjs.entry.js +5 -4
  29. package/dist/cjs/ez-date-input.cjs.entry.js +2 -2
  30. package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -2
  31. package/dist/cjs/ez-dialog.cjs.entry.js +2 -2
  32. package/dist/cjs/ez-double-list.cjs.entry.js +2 -2
  33. package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-file-item.cjs.entry.js +2 -2
  36. package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-form-view.cjs.entry.js +130 -37
  38. package/dist/cjs/ez-form.cjs.entry.js +13 -8
  39. package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-grid.cjs.entry.js +11 -7
  41. package/dist/cjs/ez-guide-navigator.cjs.entry.js +2 -2
  42. package/dist/cjs/ez-icon.cjs.entry.js +2 -2
  43. package/dist/cjs/ez-link-builder_6.cjs.entry.js +2 -2
  44. package/dist/cjs/ez-list-item.cjs.entry.js +1 -1
  45. package/dist/cjs/ez-list.cjs.entry.js +2 -2
  46. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  47. package/dist/cjs/ez-modal-container.cjs.entry.js +2 -2
  48. package/dist/cjs/ez-modal.cjs.entry.js +2 -2
  49. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
  50. package/dist/cjs/ez-number-input.cjs.entry.js +2 -2
  51. package/dist/cjs/ez-pagination.cjs.entry.js +2 -2
  52. package/dist/cjs/ez-popover-core.cjs.entry.js +1 -1
  53. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
  54. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  55. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  56. package/dist/cjs/ez-progress-bar.cjs.entry.js +1 -1
  57. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  58. package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +1 -1
  59. package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
  60. package/dist/cjs/ez-search-plus.cjs.entry.js +8 -7
  61. package/dist/cjs/ez-search-result-list.cjs.entry.js +2 -2
  62. package/dist/cjs/ez-search.cjs.entry.js +11 -10
  63. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +2 -2
  64. package/dist/cjs/ez-skeleton.cjs.entry.js +2 -2
  65. package/dist/cjs/ez-sortable-list.cjs.entry.js +2 -2
  66. package/dist/cjs/ez-spinner.cjs.entry.js +2 -2
  67. package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
  68. package/dist/cjs/ez-split-item.cjs.entry.js +5 -4
  69. package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
  70. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  71. package/dist/cjs/ez-tag-input.cjs.entry.js +1 -1
  72. package/dist/cjs/ez-tag.cjs.entry.js +1 -1
  73. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  74. package/dist/cjs/ez-text-input.cjs.entry.js +38 -1
  75. package/dist/cjs/ez-tile-medium.cjs.entry.js +1 -1
  76. package/dist/cjs/ez-tile.cjs.entry.js +1 -1
  77. package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
  78. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  79. package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
  80. package/dist/cjs/ez-tree.cjs.entry.js +2 -2
  81. package/dist/cjs/ez-underface.cjs.entry.js +1 -1
  82. package/dist/cjs/ez-upload.cjs.entry.js +3 -3
  83. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  84. package/dist/cjs/ezui.cjs.js +4 -4
  85. package/dist/cjs/filter-column.cjs.entry.js +2 -2
  86. package/dist/cjs/{index-00d0166b.js → index-350d0fa0.js} +54 -0
  87. package/dist/cjs/{index-a7b0c73d.js → index-9e5554cb.js} +45 -18
  88. package/dist/cjs/loader.cjs.js +4 -4
  89. package/dist/cjs/{search-column-8bfee733.js → search-column-9654bf26.js} +5 -5
  90. package/dist/cjs/searchFormatters-051f8677.js +23 -0
  91. package/dist/cjs/{FormLayout-18853e70.js → types-6a5df0c7.js} +0 -6
  92. package/dist/collection/collection-manifest.json +59 -5
  93. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.css +5 -0
  94. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js +77 -18
  95. package/dist/collection/components/ez-classic-date-input/ez-classic-date-input.css +44 -0
  96. package/dist/collection/components/ez-classic-date-input/ez-classic-date-input.js +541 -0
  97. package/dist/collection/components/ez-classic-date-time-input/ez-classic-date-time-input.css +44 -0
  98. package/dist/collection/components/ez-classic-date-time-input/ez-classic-date-time-input.js +586 -0
  99. package/dist/collection/components/ez-classic-input/ez-classic-input.css +33 -5
  100. package/dist/collection/components/ez-classic-input/ez-classic-input.js +155 -19
  101. package/dist/collection/components/ez-classic-number-input/ez-classic-number-input.css +16 -0
  102. package/dist/collection/components/ez-classic-number-input/ez-classic-number-input.js +583 -0
  103. package/dist/collection/components/ez-classic-search/ez-classic-search.css +126 -0
  104. package/dist/collection/components/ez-classic-search/ez-classic-search.js +1330 -0
  105. package/dist/collection/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.css +227 -0
  106. package/dist/collection/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.js +316 -0
  107. package/dist/collection/components/ez-classic-search/utils/searchFormatters.js +18 -0
  108. package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.css +406 -0
  109. package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.js +988 -0
  110. package/dist/collection/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.css +221 -0
  111. package/dist/collection/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.js +298 -0
  112. package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.css +1 -0
  113. package/dist/collection/components/ez-classic-time-input/ez-classic-time-input.css +14 -0
  114. package/dist/collection/components/ez-classic-time-input/ez-classic-time-input.js +511 -0
  115. package/dist/collection/components/ez-form/ez-form.js +30 -4
  116. package/dist/collection/components/ez-form-view/ez-form-view.css +8 -3
  117. package/dist/collection/components/ez-form-view/ez-form-view.js +61 -3
  118. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +9 -4
  119. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +9 -6
  120. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +8 -1
  121. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +30 -6
  122. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
  123. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ImageInput.tpl.js +4 -0
  124. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +12 -5
  125. package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js +1 -1
  126. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +9 -3
  127. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +8 -1
  128. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +7 -1
  129. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +8 -1
  130. package/dist/collection/components/ez-form-view/structure/index.js +1 -1
  131. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +3 -0
  132. package/dist/collection/components/ez-icon/ez-icon.css +1 -0
  133. package/dist/collection/components/ez-image-input/ez-image-input.css +173 -0
  134. package/dist/collection/components/ez-image-input/ez-image-input.js +324 -0
  135. package/dist/collection/components/ez-rich-text/ez-rich-text.js +2 -3
  136. package/dist/collection/components/ez-text-input/ez-text-input.js +38 -1
  137. package/dist/collection/utils/form/DataBinder.js +2 -2
  138. package/dist/collection/utils/form/interfaces/FormLayout.js +3 -1
  139. package/dist/collection/utils/i18n/locales/en-us.js +18 -0
  140. package/dist/collection/utils/i18n/locales/es-es.js +18 -0
  141. package/dist/collection/utils/i18n/locales/pt-br.js +18 -0
  142. package/dist/custom-elements/index.d.ts +54 -0
  143. package/dist/custom-elements/index.js +2913 -347
  144. package/dist/esm/{ApplicationUtils-12768f5a.js → ApplicationUtils-0c5cb207.js} +1 -1
  145. package/dist/esm/FormLayout-bda67973.js +9 -0
  146. package/dist/esm/{app-globals-9507c20e.js → app-globals-1db10325.js} +1 -1
  147. package/dist/esm/{ez-combo-box-list_4.entry.js → classic-search-list_7.entry.js} +359 -8
  148. package/dist/esm/ez-actions-button.entry.js +5 -4
  149. package/dist/esm/ez-alert-list.entry.js +2 -2
  150. package/dist/esm/ez-alert.entry.js +1 -1
  151. package/dist/esm/ez-application.entry.js +1 -1
  152. package/dist/esm/ez-avatar.entry.js +2 -2
  153. package/dist/esm/ez-badge.entry.js +1 -1
  154. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  155. package/dist/esm/ez-button.entry.js +1 -1
  156. package/dist/esm/ez-calendar.entry.js +2 -2
  157. package/dist/esm/ez-card-item.entry.js +1 -1
  158. package/dist/esm/ez-chart.entry.js +1 -1
  159. package/dist/esm/ez-check.entry.js +1 -1
  160. package/dist/esm/ez-chip.entry.js +1 -1
  161. package/dist/esm/ez-classic-combo-box.entry.js +37 -16
  162. package/dist/esm/ez-classic-date-input.entry.js +197 -0
  163. package/dist/esm/ez-classic-date-time-input.entry.js +242 -0
  164. package/dist/esm/ez-classic-input.entry.js +101 -20
  165. package/dist/esm/ez-classic-number-input.entry.js +201 -0
  166. package/dist/esm/ez-classic-search-plus.entry.js +403 -0
  167. package/dist/esm/ez-classic-search.entry.js +679 -0
  168. package/dist/esm/ez-classic-text-area.entry.js +2 -2
  169. package/dist/esm/ez-classic-time-input.entry.js +193 -0
  170. package/dist/esm/ez-collapsible-box.entry.js +5 -4
  171. package/dist/esm/ez-combo-box.entry.js +5 -4
  172. package/dist/esm/ez-date-input.entry.js +2 -2
  173. package/dist/esm/ez-date-time-input.entry.js +2 -2
  174. package/dist/esm/ez-dialog.entry.js +2 -2
  175. package/dist/esm/ez-double-list.entry.js +2 -2
  176. package/dist/esm/ez-dropdown.entry.js +1 -1
  177. package/dist/esm/ez-empty-card.entry.js +1 -1
  178. package/dist/esm/ez-file-item.entry.js +2 -2
  179. package/dist/esm/ez-filter-input.entry.js +1 -1
  180. package/dist/esm/ez-form-view.entry.js +130 -37
  181. package/dist/esm/ez-form.entry.js +13 -8
  182. package/dist/esm/ez-grid-view.entry.js +1 -1
  183. package/dist/esm/ez-grid.entry.js +9 -5
  184. package/dist/esm/ez-guide-navigator.entry.js +2 -2
  185. package/dist/esm/ez-icon.entry.js +2 -2
  186. package/dist/esm/ez-link-builder_6.entry.js +2 -2
  187. package/dist/esm/ez-list-item.entry.js +1 -1
  188. package/dist/esm/ez-list.entry.js +2 -2
  189. package/dist/esm/ez-loading-bar.entry.js +1 -1
  190. package/dist/esm/ez-modal-container.entry.js +2 -2
  191. package/dist/esm/ez-modal.entry.js +2 -2
  192. package/dist/esm/ez-multi-selection-list.entry.js +2 -2
  193. package/dist/esm/ez-number-input.entry.js +2 -2
  194. package/dist/esm/ez-pagination.entry.js +2 -2
  195. package/dist/esm/ez-popover-core.entry.js +1 -1
  196. package/dist/esm/ez-popover-plus_3.entry.js +1 -1
  197. package/dist/esm/ez-popover.entry.js +1 -1
  198. package/dist/esm/ez-popup.entry.js +2 -2
  199. package/dist/esm/ez-progress-bar.entry.js +1 -1
  200. package/dist/esm/ez-radio-button.entry.js +1 -1
  201. package/dist/esm/ez-rich-toolbar-item.entry.js +1 -1
  202. package/dist/esm/ez-scroller_2.entry.js +1 -1
  203. package/dist/esm/ez-search-plus.entry.js +5 -4
  204. package/dist/esm/ez-search-result-list.entry.js +2 -2
  205. package/dist/esm/ez-search.entry.js +5 -4
  206. package/dist/esm/ez-sidebar-navigator.entry.js +2 -2
  207. package/dist/esm/ez-skeleton.entry.js +2 -2
  208. package/dist/esm/ez-sortable-list.entry.js +2 -2
  209. package/dist/esm/ez-spinner.entry.js +2 -2
  210. package/dist/esm/ez-split-button.entry.js +2 -2
  211. package/dist/esm/ez-split-item.entry.js +5 -4
  212. package/dist/esm/ez-split-panel.entry.js +1 -1
  213. package/dist/esm/ez-tabselector.entry.js +1 -1
  214. package/dist/esm/ez-tag-input.entry.js +1 -1
  215. package/dist/esm/ez-tag.entry.js +1 -1
  216. package/dist/esm/ez-text-area.entry.js +1 -1
  217. package/dist/esm/ez-text-input.entry.js +38 -1
  218. package/dist/esm/ez-tile-medium.entry.js +1 -1
  219. package/dist/esm/ez-tile.entry.js +1 -1
  220. package/dist/esm/ez-time-input.entry.js +2 -2
  221. package/dist/esm/ez-toast.entry.js +1 -1
  222. package/dist/esm/ez-tooltip.entry.js +1 -1
  223. package/dist/esm/ez-tree.entry.js +2 -2
  224. package/dist/esm/ez-underface.entry.js +1 -1
  225. package/dist/esm/ez-upload.entry.js +3 -3
  226. package/dist/esm/ez-view-stack.entry.js +1 -1
  227. package/dist/esm/ezui.js +5 -5
  228. package/dist/esm/filter-column.entry.js +2 -2
  229. package/dist/esm/{index-62fc771e.js → index-225aa0c3.js} +54 -0
  230. package/dist/esm/{index-baa5e267.js → index-5a720e56.js} +45 -19
  231. package/dist/esm/loader.js +5 -5
  232. package/dist/esm/{search-column-c00119ae.js → search-column-c3df6285.js} +5 -5
  233. package/dist/esm/searchFormatters-6d9b06e4.js +20 -0
  234. package/dist/esm/{FormLayout-071d324c.js → types-6f6b2650.js} +1 -7
  235. package/dist/ezui/ezui.esm.js +1 -1
  236. package/dist/ezui/{p-e75c7a23.entry.js → p-000159dc.entry.js} +1 -1
  237. package/dist/ezui/p-05bcbe61.entry.js +1 -0
  238. package/dist/ezui/{p-93e1c917.entry.js → p-05e68ab3.entry.js} +1 -1
  239. package/dist/ezui/{p-288631d1.entry.js → p-06f1b8e4.entry.js} +1 -1
  240. package/dist/ezui/{p-2854f087.entry.js → p-0820f8c3.entry.js} +1 -1
  241. package/dist/ezui/{p-6d596a5a.entry.js → p-0b531233.entry.js} +1 -1
  242. package/dist/ezui/{p-79277e43.entry.js → p-0ba284cd.entry.js} +1 -1
  243. package/dist/ezui/p-0d393a5d.entry.js +1 -0
  244. package/dist/ezui/{p-3fe05d6b.entry.js → p-12cc95dc.entry.js} +1 -1
  245. package/dist/ezui/p-14d6aeb8.entry.js +1 -0
  246. package/dist/ezui/{p-2528e988.entry.js → p-169d460d.entry.js} +1 -1
  247. package/dist/ezui/{p-6f77a359.entry.js → p-1723f728.entry.js} +1 -1
  248. package/dist/ezui/{p-a401041c.entry.js → p-181cb82f.entry.js} +1 -1
  249. package/dist/ezui/{p-eee3c7ff.entry.js → p-24993171.entry.js} +1 -1
  250. package/dist/ezui/{p-377768bd.entry.js → p-25748a4e.entry.js} +2 -2
  251. package/dist/ezui/p-27421015.entry.js +1 -0
  252. package/dist/ezui/p-27c8a9b7.entry.js +1 -0
  253. package/dist/ezui/{p-4f0632b4.js → p-29341f74.js} +1 -1
  254. package/dist/ezui/p-29f0de90.entry.js +1 -0
  255. package/dist/ezui/{p-44ad16df.entry.js → p-2b51d5a9.entry.js} +1 -1
  256. package/dist/ezui/p-2c123fdf.entry.js +1 -0
  257. package/dist/ezui/{p-6a9a20a0.entry.js → p-2fa490f1.entry.js} +1 -1
  258. package/dist/ezui/{p-da585ff3.entry.js → p-3453dad5.entry.js} +1 -1
  259. package/dist/ezui/p-34d596a3.entry.js +1 -0
  260. package/dist/ezui/{p-ef8bd3e8.entry.js → p-35e3715c.entry.js} +1 -1
  261. package/dist/ezui/{p-fa6732f2.entry.js → p-44b39e81.entry.js} +1 -1
  262. package/dist/ezui/{p-124699e0.entry.js → p-458027b5.entry.js} +1 -1
  263. package/dist/ezui/p-47e4a8ce.js +1 -0
  264. package/dist/ezui/{p-4d30b703.entry.js → p-4a876b8b.entry.js} +1 -1
  265. package/dist/ezui/p-4d909730.entry.js +1 -0
  266. package/dist/ezui/{p-e27d7dc2.entry.js → p-4df2edb5.entry.js} +1 -1
  267. package/dist/ezui/{p-6369a0cd.entry.js → p-51e34317.entry.js} +1 -1
  268. package/dist/ezui/{p-957d08cd.entry.js → p-534209bf.entry.js} +1 -1
  269. package/dist/ezui/{p-0c0eb410.entry.js → p-55a9e4ba.entry.js} +1 -1
  270. package/dist/ezui/p-5895e687.js +1 -0
  271. package/dist/ezui/{p-59a98e31.entry.js → p-636ea910.entry.js} +1 -1
  272. package/dist/ezui/{p-1f50fa05.entry.js → p-6b51c9cc.entry.js} +1 -1
  273. package/dist/ezui/p-6ec40dec.entry.js +1 -0
  274. package/dist/ezui/{p-5ed81457.entry.js → p-6fc26622.entry.js} +1 -1
  275. package/dist/ezui/p-70f30bfe.entry.js +1 -0
  276. package/dist/ezui/p-71b341cc.entry.js +1 -0
  277. package/dist/ezui/{p-cd6f5783.entry.js → p-75443a91.entry.js} +1 -1
  278. package/dist/ezui/{p-e8c6c973.entry.js → p-75e650ff.entry.js} +1 -1
  279. package/dist/ezui/p-75e8862c.entry.js +1 -0
  280. package/dist/ezui/{p-d6f50207.entry.js → p-770cf2b8.entry.js} +1 -1
  281. package/dist/ezui/{p-91c9d50e.entry.js → p-78e975b4.entry.js} +1 -1
  282. package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
  283. package/dist/ezui/p-81a98a7c.entry.js +1 -0
  284. package/dist/ezui/p-82e1d7fc.entry.js +1 -0
  285. package/dist/ezui/{p-8df1ca33.entry.js → p-82fa4b09.entry.js} +1 -1
  286. package/dist/ezui/p-87739608.entry.js +1 -0
  287. package/dist/ezui/p-88a115b3.js +1 -0
  288. package/dist/ezui/p-892e7326.entry.js +1 -0
  289. package/dist/ezui/p-8f7373ab.entry.js +1 -0
  290. package/dist/ezui/{p-f34ec732.entry.js → p-980f1f18.entry.js} +1 -1
  291. package/dist/ezui/{p-5a11cf56.js → p-9825c1d2.js} +1 -1
  292. package/dist/ezui/{p-a3075f52.entry.js → p-9bcfa689.entry.js} +1 -1
  293. package/dist/ezui/{p-e882635e.entry.js → p-9d515e5b.entry.js} +1 -1
  294. package/dist/ezui/{p-1adf7139.entry.js → p-9fb7131e.entry.js} +1 -1
  295. package/dist/ezui/{p-6f119d5f.entry.js → p-a6ea8da3.entry.js} +1 -1
  296. package/dist/ezui/{p-d6742c1e.entry.js → p-a9432878.entry.js} +1 -1
  297. package/dist/ezui/{p-e8c57463.entry.js → p-b21efe83.entry.js} +1 -1
  298. package/dist/ezui/{p-a0bf1fc7.entry.js → p-bc693db6.entry.js} +1 -1
  299. package/dist/ezui/{p-1cde96f9.entry.js → p-be2e39c5.entry.js} +1 -1
  300. package/dist/ezui/{p-641ee538.js → p-c178730b.js} +1 -1
  301. package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
  302. package/dist/ezui/{p-6020f3d5.entry.js → p-c754774e.entry.js} +1 -1
  303. package/dist/ezui/{p-d2645bdf.entry.js → p-c96e536d.entry.js} +1 -1
  304. package/dist/ezui/{p-cfa26133.entry.js → p-ce2614fc.entry.js} +1 -1
  305. package/dist/ezui/{p-20c024f7.entry.js → p-cf33bc48.entry.js} +1 -1
  306. package/dist/ezui/p-d3aca6aa.entry.js +1 -0
  307. package/dist/ezui/p-d57ea090.entry.js +1 -0
  308. package/dist/ezui/{p-a80b1287.entry.js → p-dfca5946.entry.js} +1 -1
  309. package/dist/ezui/{p-5ab08b60.entry.js → p-e0380234.entry.js} +1 -1
  310. package/dist/ezui/{p-e99cbb51.entry.js → p-e039e049.entry.js} +1 -1
  311. package/dist/ezui/{p-a7eab406.entry.js → p-e0fd2ce5.entry.js} +1 -1
  312. package/dist/ezui/{p-7f792043.entry.js → p-e195eaad.entry.js} +1 -1
  313. package/dist/ezui/{p-7b999377.entry.js → p-e275353b.entry.js} +1 -1
  314. package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
  315. package/dist/ezui/{p-2a70f094.entry.js → p-e94d3af5.entry.js} +1 -1
  316. package/dist/ezui/p-e963cb3f.entry.js +1 -0
  317. package/dist/ezui/{p-e7a7c594.entry.js → p-e9b409c1.entry.js} +1 -1
  318. package/dist/ezui/p-f0425f87.entry.js +1 -0
  319. package/dist/ezui/{p-19cf13bc.entry.js → p-f1b54699.entry.js} +1 -1
  320. package/dist/ezui/{p-a3ada561.entry.js → p-f26b97e9.entry.js} +1 -1
  321. package/dist/ezui/{p-ff4bde07.entry.js → p-f32d5a82.entry.js} +1 -1
  322. package/dist/ezui/{p-411c0222.entry.js → p-f7ca8634.entry.js} +1 -1
  323. package/dist/ezui/{p-294f54fe.entry.js → p-fe0bca65.entry.js} +1 -1
  324. package/dist/ezui/p-ff4312d5.js +1 -0
  325. package/dist/types/components/ez-classic-combo-box/ez-classic-combo-box.d.ts +9 -3
  326. package/dist/types/components/ez-classic-date-input/ez-classic-date-input.d.ts +91 -0
  327. package/dist/types/components/ez-classic-date-time-input/ez-classic-date-time-input.d.ts +95 -0
  328. package/dist/types/components/ez-classic-input/ez-classic-input.d.ts +18 -1
  329. package/dist/types/components/ez-classic-number-input/ez-classic-number-input.d.ts +101 -0
  330. package/dist/types/components/ez-classic-search/ez-classic-search.d.ts +219 -0
  331. package/dist/types/components/ez-classic-search/subcomponent/classic-search-list/classic-search-list.d.ts +29 -0
  332. package/dist/types/components/ez-classic-search/utils/searchFormatters.d.ts +2 -0
  333. package/dist/types/components/ez-classic-search-plus/ez-classic-search-plus.d.ts +186 -0
  334. package/dist/types/components/ez-classic-search-plus/subcomponent/ez-search-result-list/ez-classic-search-result-list.d.ts +29 -0
  335. package/dist/types/components/ez-form/ez-form.d.ts +6 -0
  336. package/dist/types/components/ez-form-view/ez-form-view.d.ts +11 -0
  337. package/dist/types/components/ez-form-view/fieldbuilder/FieldBuilder.d.ts +8 -1
  338. package/dist/types/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.d.ts +3 -2
  339. package/dist/types/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.d.ts +2 -1
  340. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +5 -4
  341. package/dist/types/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.d.ts +2 -1
  342. package/dist/types/components/ez-form-view/fieldbuilder/templates/ImageInput.tpl.d.ts +2 -0
  343. package/dist/types/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.d.ts +3 -2
  344. package/dist/types/components/ez-form-view/fieldbuilder/templates/RichText.tpl.d.ts +2 -1
  345. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +2 -1
  346. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -1
  347. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.d.ts +2 -1
  348. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +2 -1
  349. package/dist/types/components/ez-image-input/ez-image-input.d.ts +42 -0
  350. package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
  351. package/dist/types/components.d.ts +3220 -1969
  352. package/dist/types/utils/form/interfaces/FormLayout.d.ts +3 -1
  353. package/dist/types/utils/i18n/locales/en-us.d.ts +18 -0
  354. package/dist/types/utils/i18n/locales/es-es.d.ts +18 -0
  355. package/dist/types/utils/i18n/locales/pt-br.d.ts +18 -0
  356. package/dist/types/utils/i18n/translations.d.ts +54 -0
  357. package/package.json +1 -1
  358. package/react/components.d.ts +9 -0
  359. package/react/components.js +9 -0
  360. package/react/components.js.map +1 -1
  361. package/dist/ezui/p-1266fe78.entry.js +0 -1
  362. package/dist/ezui/p-14807f4e.js +0 -1
  363. package/dist/ezui/p-1730ee24.entry.js +0 -1
  364. package/dist/ezui/p-30ffb9ed.js +0 -1
  365. package/dist/ezui/p-48effc69.entry.js +0 -1
  366. package/dist/ezui/p-59092a66.entry.js +0 -1
  367. package/dist/ezui/p-7fe97ef5.entry.js +0 -1
  368. package/dist/ezui/p-8d626d2b.entry.js +0 -1
  369. package/dist/ezui/p-8dc267ff.entry.js +0 -1
  370. package/dist/ezui/p-96b33264.entry.js +0 -1
  371. package/dist/ezui/p-9b2e6438.entry.js +0 -1
  372. package/dist/ezui/p-adaa2a81.entry.js +0 -1
  373. package/dist/ezui/p-bc2f844e.entry.js +0 -1
  374. package/dist/ezui/p-c82acfc6.entry.js +0 -1
  375. package/dist/ezui/p-d8cc640d.entry.js +0 -1
  376. package/dist/ezui/p-dee18824.entry.js +0 -1
  377. package/dist/ezui/p-df316d40.entry.js +0 -1
  378. package/dist/ezui/p-eca050b4.entry.js +0 -1
@@ -0,0 +1,246 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-9e5554cb.js');
6
+ const core = require('@sankhyalabs/core');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
8
+ const index$1 = require('./index-350d0fa0.js');
9
+
10
+ const ezClassicDateTimeInputCss = ":host{display:block;width:100%;--ez-classic-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-classic-date-input__input--border-color:var(--ez-classic-date-input__input--background-color);--ez-classic-date-input__calendar-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"15px\"><path d=\"M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z\"/></svg>')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:not-allowed}.btn-open-cal::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-classic-date-input__calendar-image);mask-image:var(--ez-classic-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-classic-input{--text-input__input--background-color:var(--ez-classic-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-classic-date-input__input--border-color, #DCE0E8)}";
11
+
12
+ const EzClassicDateTimeInput = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.ezChange = index.createEvent(this, "ezChange", 7);
16
+ this.ezStartChange = index.createEvent(this, "ezStartChange", 7);
17
+ this.ezCancelWaitingChange = index.createEvent(this, "ezCancelWaitingChange", 7);
18
+ this._changePending = false;
19
+ this._focused = false;
20
+ this._valuePromiseCallbacks = [];
21
+ this.label = undefined;
22
+ this.value = undefined;
23
+ this.enabled = true;
24
+ this.errorMessage = undefined;
25
+ this.showSeconds = false;
26
+ this.mode = "regular";
27
+ this.size = "default";
28
+ this.required = false;
29
+ this.canShowError = true;
30
+ this.autoFocus = false;
31
+ this.alternativePlaceholder = undefined;
32
+ }
33
+ observeLabel() {
34
+ if (this._textInput) {
35
+ this._textInput.label = this.label;
36
+ }
37
+ }
38
+ observeErrorMessage() {
39
+ var _a;
40
+ if (this._textInput) {
41
+ this._textInput.errorMessage = this.errorMessage;
42
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
43
+ this.setInputValue();
44
+ }
45
+ }
46
+ }
47
+ observeValue(newValue, oldValue) {
48
+ if (this._textInput && newValue != oldValue) {
49
+ const newValueValidated = core.DateUtils.validateDate(newValue, true);
50
+ const oldValueValidated = core.DateUtils.validateDate(oldValue, true);
51
+ if ((newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime()) !== (oldValueValidated === null || oldValueValidated === void 0 ? void 0 : oldValueValidated.getTime())) {
52
+ const textValue = this.getTextValue(newValueValidated) || '';
53
+ const parsedDate = this.getParsedDateTime(textValue);
54
+ if ((parsedDate || !this._focused) && (this._textInput.value || '') !== textValue) {
55
+ this._textInput.value = textValue;
56
+ this._focused = false;
57
+ this.errorMessage = "";
58
+ }
59
+ const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
60
+ this.ezChange.emit(valueEmitted);
61
+ }
62
+ }
63
+ this._changePending = false;
64
+ }
65
+ /**
66
+ * Aplica o foco no campo.
67
+ */
68
+ async setFocus(options) {
69
+ this._textInput.setFocus(options);
70
+ }
71
+ /**
72
+ * Remove o foco do campo.
73
+ */
74
+ async setBlur() {
75
+ this._textInput.setBlur();
76
+ }
77
+ /**
78
+ * Retorna se o conteúdo é inválido.
79
+ */
80
+ async isInvalid() {
81
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
82
+ }
83
+ /*
84
+ * Retorna uma promise com o valor da opção selecionada,
85
+ * que será resolvida quando o backend devolver este dado.
86
+ */
87
+ async getValueAsync() {
88
+ if (this._changePending) {
89
+ return new Promise(accept => {
90
+ this._valuePromiseCallbacks.push(accept);
91
+ });
92
+ }
93
+ return Promise.resolve(this.value);
94
+ }
95
+ handleKeyDown(event) {
96
+ const input = this._textInput.shadowRoot.querySelector('input');
97
+ if (event.shiftKey && event.key === "Tab") {
98
+ if (input.selectionStart > 0) {
99
+ let selectIni = input.value.lastIndexOf(" ", input.selectionStart);
100
+ if (selectIni !== -1) {
101
+ input.setSelectionRange(0, selectIni);
102
+ event.preventDefault();
103
+ }
104
+ }
105
+ }
106
+ else if (event.key === "Tab") {
107
+ if (input.value.length !== input.selectionEnd) {
108
+ let selectIni = input.value.indexOf(" ", input.selectionEnd);
109
+ selectIni = selectIni === -1 ? input.selectionEnd : selectIni + 1;
110
+ input.setSelectionRange(selectIni, input.value.length);
111
+ event.preventDefault();
112
+ }
113
+ }
114
+ }
115
+ handleFocus() {
116
+ const input = this._textInput.shadowRoot.querySelector('input');
117
+ if (input.selectionStart !== input.selectionEnd) {
118
+ let selectIni = input.value.indexOf(" ", input.selectionStart);
119
+ selectIni = selectIni === -1 ? input.value.length : selectIni;
120
+ input.setSelectionRange(0, selectIni);
121
+ }
122
+ }
123
+ handleClick() {
124
+ const input = this._textInput.shadowRoot.querySelector('input');
125
+ let selectIni = input.value.lastIndexOf(" ", input.selectionEnd);
126
+ selectIni = selectIni === -1 ? 0 : selectIni + 1;
127
+ selectIni = selectIni > input.selectionEnd ? 0 : selectIni;
128
+ let selectFin = selectIni === 0 ? input.value.indexOf(" ") : input.value.length;
129
+ input.setSelectionRange(selectIni, selectFin);
130
+ }
131
+ changeValue(newValue) {
132
+ const currentValue = core.DateUtils.validateDate(this.value, true);
133
+ const newValueValidated = core.DateUtils.validateDate(newValue, true);
134
+ if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
135
+ this.value = newValueValidated;
136
+ }
137
+ }
138
+ hideCalendar() {
139
+ this.changeValue(this._calendar.value);
140
+ this._popover.hide();
141
+ }
142
+ getParsedDateTime(strValue) {
143
+ var _a, _b;
144
+ if (strValue === void 0) {
145
+ strValue = (((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "");
146
+ }
147
+ if (!strValue) {
148
+ return;
149
+ }
150
+ const partsDateTime = strValue.split(" ");
151
+ const onlyDate = partsDateTime.length > 0 ? partsDateTime[0] : strValue;
152
+ const onlyTime = partsDateTime[1] ? partsDateTime[1] : "";
153
+ const parsedTime = core.TimeFormatter.prepareValue(onlyTime, this.showSeconds);
154
+ const strDateTime = onlyDate + (parsedTime && " " + parsedTime);
155
+ return core.DateUtils.strToDate(strDateTime);
156
+ }
157
+ handleBlur() {
158
+ var _a, _b;
159
+ if (!this._changePending) {
160
+ return;
161
+ }
162
+ try {
163
+ const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
164
+ const newValue = this.getParsedDateTime();
165
+ if (newValue || !strValue) {
166
+ this.errorMessage = "";
167
+ const currentValue = core.DateUtils.validateDate(this.value, true);
168
+ const newValueValidated = core.DateUtils.validateDate(newValue, true);
169
+ if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
170
+ if (newValueValidated) {
171
+ this._textInput.value = this.getTextValue(newValueValidated) || '';
172
+ this._focused = false;
173
+ }
174
+ this.ezCancelWaitingChange.emit();
175
+ }
176
+ else {
177
+ this.changeValue(newValueValidated);
178
+ }
179
+ }
180
+ else {
181
+ this.changeValue(undefined);
182
+ this.ezCancelWaitingChange.emit();
183
+ this.errorMessage = this.i18n("ez-classic-date-time-input.invalidDate");
184
+ }
185
+ }
186
+ finally {
187
+ for (const callback of this._valuePromiseCallbacks) {
188
+ callback(this.value);
189
+ }
190
+ this._valuePromiseCallbacks = [];
191
+ }
192
+ }
193
+ getTextValue(date) {
194
+ if (!date) {
195
+ return;
196
+ }
197
+ return core.DateUtils.formatDateTime(date, this.showSeconds);
198
+ }
199
+ handleInput(event) {
200
+ const newValue = this.getParsedDateTime();
201
+ const currentValue = core.DateUtils.validateDate(this.value, true);
202
+ const newValueValidated = core.DateUtils.validateDate(newValue, true);
203
+ if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
204
+ this._changePending = true;
205
+ this._focused = true;
206
+ this.ezStartChange.emit({ waitmessage: "", blocking: false });
207
+ }
208
+ if (event['data'] === "H" || event['data'] === "h") {
209
+ this.changeValue(new Date());
210
+ }
211
+ }
212
+ setInputValue() {
213
+ const textValue = this.getTextValue(this.value) || '';
214
+ if ((this._textInput.value || '') !== textValue) {
215
+ this._textInput.value = textValue;
216
+ }
217
+ }
218
+ disconnectedCallback() {
219
+ this._popover.hide();
220
+ }
221
+ async componentWillLoad() {
222
+ this.i18n = await index$1.initI18n();
223
+ }
224
+ componentDidLoad() {
225
+ CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
226
+ this.setInputValue();
227
+ if (this.autoFocus) {
228
+ requestAnimationFrame(() => {
229
+ this.setFocus({ selectText: true });
230
+ });
231
+ }
232
+ }
233
+ render() {
234
+ core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
235
+ return (index.h(index.Host, null, index.h("ez-classic-input", { ref: (elem) => this._textInput = elem, "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), "data-slave-mode": "true", label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, size: this.size, onKeyDown: (event) => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick(), required: this.required, leftIconName: "calendar", leftIconClickable: this.enabled, onIconClick: () => { var _a; return (_a = this._popover) === null || _a === void 0 ? void 0 : _a.showUnder(this._textInput); }, onEzChange: (event) => event.stopPropagation() }), index.h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInput, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', "data-element-id": this._elem.getAttribute("data-element-id") }, index.h("ez-calendar", { ref: elem => this._calendar = elem, "data-element-id": core.ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, time: true, showSeconds: this.showSeconds }))));
236
+ }
237
+ get _elem() { return index.getElement(this); }
238
+ static get watchers() { return {
239
+ "label": ["observeLabel"],
240
+ "errorMessage": ["observeErrorMessage"],
241
+ "value": ["observeValue"]
242
+ }; }
243
+ };
244
+ EzClassicDateTimeInput.style = ezClassicDateTimeInputCss;
245
+
246
+ exports.ez_classic_date_time_input = EzClassicDateTimeInput;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-a7b0c73d.js');
5
+ const index = require('./index-9e5554cb.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
 
8
8
  class MaskFormatter {
@@ -200,7 +200,7 @@ class MaskFormatter {
200
200
  }
201
201
  }
202
202
 
203
- const ezClassicInputCss = ":host{display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);border:none;padding:0;--ez-classic-input--label-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--border-color-default:var(--color--gray-200, #D2D2D3);--ez-classic-input--border-color-focus:var(--color--gray-300, #A4A5A7);--ez-classic-input--border-color-success:var(--color--green-600, #157A00);--ez-classic-input--border-color-error:var(--color--red-600, #BD0025);--ez-classic-input--border-color-warning:var(--color--yellow-600, #EFB103);--ez-classic-input--background-color:var(--color--gray-70, #FFFFFF);--ez-classic-input--background-color-disabled:var(--color--gray-90, #EAEAEA);--ez-classic-input--text-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--placeholder-color:#bdbdbd;--ez-classic-input--icon-color:var(--color--gray-400, #77777A);--ez-classic-input--helptext-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--height:56px}.input-container{display:flex;flex-direction:row;align-items:center;width:100%;border:none;border-radius:var(--border--radius-8, 8px);padding:var(--space--16, 16px);box-sizing:border-box;gap:var(--space--10, 10px);margin:var(--space--4, 4px) var(--space--2, 2px);transition:box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);height:var(--ez-classic-input--height);background-color:var(--ez-classic-input--background-color)}.input-container,.input-container[data-state=\"default\"]{box-shadow:0 0 0 1px var(--ez-classic-input--border-color-default)}.input-container[data-state=\"success\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-success)}.input-container[data-state=\"error\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-error)}.input-container[data-state=\"warning\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-warning)}.input-container:focus-within{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-focus)}ez-icon{min-width:var(--space--24, 24px);color:var(--ez-classic-input--icon-color)}input{flex:1;border:none;outline:none;background:transparent;height:100%;width:100%;padding:0;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);text-overflow:ellipsis;color:var(--ez-classic-input--text-color)}input::placeholder{color:var(--ez-classic-input--placeholder-color)}.input-container[data-disabled=\"true\"]{cursor:not-allowed;background:var(--ez-classic-input--background-color-disabled);border-color:var(--ez-classic-input--border-color-default)}.input-container[data-disabled=\"true\"]>*{cursor:not-allowed}.input-container input:read-only{cursor:default}@keyframes ez-helptext-fadein{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}span{font-size:var(--font-size--xsmall, 10px);line-height:var(--line-height--16, 16px);overflow:hidden;text-overflow:ellipsis;animation:ez-helptext-fadein 0.3s ease;color:var(--ez-classic-input--helptext-color)}label{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--line-height--20, 20px);color:var(--ez-classic-input--label-color)}.icon-clickable{cursor:pointer}";
203
+ const ezClassicInputCss = ":host{display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);border:none;padding:0;padding-inline:var(--space--2, 2px);width:100%;--ez-classic-input--label-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--border-color-default:var(--color--gray-200, #D2D2D3);--ez-classic-input--border-color-focus:var(--color--gray-300, #A4A5A7);--ez-classic-input--border-color-success:var(--color--green-600, #157A00);--ez-classic-input--border-color-error:var(--color--red-600, #BD0025);--ez-classic-input--border-color-warning:var(--color--yellow-600, #EFB103);--ez-classic-input--background-color:var(--color--gray-70, #FFFFFF);--ez-classic-input--background-color-disabled:var(--color--gray-90, #EAEAEA);--ez-classic-input--text-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--placeholder-color:#bdbdbd;--ez-classic-input--icon-color:var(--color--gray-400, #77777A);--ez-classic-input--helptext-color:var(--color--ocean-green-1000, #00281D);--ez-classic-input--height:var(--space--56, 56px);--ez-classic-input--height-small:var(--space--48, 48px);--ez-classic-input--height-xsmall:var(--space--40, 40px);--ez-classic-input--gap:var(--space--10, 10px);--ez-classic-input--padding-inline:var(--space--16, 16px)}.input-container{display:flex;flex-direction:row;align-items:center;width:100%;border:none;border-radius:var(--border--radius-8, 8px);padding-inline:var(--ez-classic-input--padding-inline);box-sizing:border-box;gap:var(--ez-classic-input--gap);margin-block:var(--space--4, 4px);transition:box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);height:var(--ez-classic-input--height);background-color:var(--ez-classic-input--background-color)}.input-container--small{height:var(--ez-classic-input--height-small)}.input-container--xsmall{height:var(--ez-classic-input--height-xsmall)}.input-container,.input-container[data-state=\"default\"]{box-shadow:0 0 0 1px var(--ez-classic-input--border-color-default)}.input-container[data-state=\"success\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-success)}.input-container[data-state=\"error\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-error)}.input-container[data-state=\"warning\"]{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-warning)}.input-container:focus-within{box-shadow:0 0 0 var(--space--2, 2px) var(--ez-classic-input--border-color-focus)}ez-icon{min-width:var(--space--24, 24px);color:var(--ez-classic-input--icon-color)}input{flex:1;border:none;outline:none;background:transparent;height:100%;width:100%;padding:0;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);color:var(--color--ocean-green-1000, #00281D);text-overflow:ellipsis;color:var(--ez-classic-input--text-color)}input::placeholder{color:var(--ez-classic-input--placeholder-color)}.input-container[data-disabled=\"true\"]{cursor:not-allowed;background:var(--ez-classic-input--background-color-disabled);border-color:var(--ez-classic-input--border-color-default)}.input-container[data-disabled=\"true\"]>*{cursor:not-allowed}.input-container input:read-only{cursor:default}@keyframes ez-helptext-fadein{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}span{font-size:var(--font-size--xsmall, 10px);line-height:var(--line-height--16, 16px);overflow:hidden;text-overflow:ellipsis;animation:ez-helptext-fadein 0.3s ease;color:var(--ez-classic-input--helptext-color)}label{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-classic-input--label-color)}.icon-clickable{cursor:pointer}.required-indicator{font-size:var(--font--size--default, 14px);font-family:var(--font--pattern, 'Roboto');color:var(--color--red-600, #BD0025);margin-left:var(--space--4, 4px);vertical-align:top}";
204
204
 
205
205
  const EzClassicInput = class {
206
206
  constructor(hostRef) {
@@ -214,10 +214,13 @@ const EzClassicInput = class {
214
214
  this.value = undefined;
215
215
  this.label = undefined;
216
216
  this.helpText = undefined;
217
+ this.errorMessage = undefined;
217
218
  this.placeholder = undefined;
218
219
  this.enabled = true;
219
220
  this.readonly = false;
221
+ this.required = false;
220
222
  this.name = undefined;
223
+ this.size = "default";
221
224
  this.minlength = undefined;
222
225
  this.maxlength = undefined;
223
226
  this.leftIconName = undefined;
@@ -261,29 +264,67 @@ const EzClassicInput = class {
261
264
  this._inputElem.value = this.value || '';
262
265
  }
263
266
  }
267
+ async observeErrorMessage(newValue) {
268
+ if (newValue && newValue.trim() !== '') {
269
+ this.state = "error";
270
+ return;
271
+ }
272
+ this.state = "default";
273
+ }
264
274
  onInput(event) {
265
275
  try {
266
276
  const inputElement = event.target;
267
- let inputValue = inputElement.value;
277
+ const inputValue = inputElement.value;
268
278
  if (this._maskFormatter) {
269
- const formattedValue = this._maskFormatter.format(inputValue);
270
- const cleanValue = this._maskFormatter.removeMask(formattedValue);
271
- inputElement.value = formattedValue;
272
- this._internalValueChange = true;
273
- this.value = cleanValue;
274
- const emitValue = this.emitMaskedValue ? formattedValue : cleanValue;
275
- this.ezChange.emit(emitValue);
279
+ const { formattedValue, cleanValue } = this.processInputWithMask(inputValue);
280
+ this.updateInputValue(inputElement, formattedValue, cleanValue);
276
281
  }
277
282
  else {
278
- this._internalValueChange = true;
279
- this.value = inputValue;
280
- this.ezChange.emit(inputValue);
283
+ this.updateInputValueWithoutMask(inputValue);
281
284
  }
282
285
  }
283
286
  catch (error) {
284
287
  console.error("Error processing input event:", error);
285
288
  }
286
289
  }
290
+ processInputWithMask(inputValue) {
291
+ if (this.mask === "cgc_cpf") {
292
+ return this.processCgcCpfMask(inputValue);
293
+ }
294
+ else {
295
+ return this.processRegularMask(inputValue);
296
+ }
297
+ }
298
+ processCgcCpfMask(inputValue) {
299
+ const numericOnly = inputValue.replace(/\D/g, '');
300
+ if (numericOnly.length === 11 || numericOnly.length === 14) {
301
+ const maskToUse = numericOnly.length === 11
302
+ ? core.MaskFormatter.DEFAULT_MASKS.cpf
303
+ : core.MaskFormatter.DEFAULT_MASKS.cnpj;
304
+ this._maskFormatter = new MaskFormatter(maskToUse);
305
+ const formattedValue = this._maskFormatter.format(numericOnly);
306
+ return { formattedValue, cleanValue: numericOnly };
307
+ }
308
+ // Se não tem o tamanho correto, mantém apenas os números
309
+ return { formattedValue: numericOnly, cleanValue: numericOnly };
310
+ }
311
+ processRegularMask(inputValue) {
312
+ const formattedValue = this._maskFormatter.format(inputValue);
313
+ const cleanValue = this._maskFormatter.removeMask(formattedValue);
314
+ return { formattedValue, cleanValue };
315
+ }
316
+ updateInputValue(inputElement, formattedValue, cleanValue) {
317
+ inputElement.value = formattedValue;
318
+ this._internalValueChange = true;
319
+ this.value = cleanValue;
320
+ const emitValue = this.emitMaskedValue ? formattedValue : cleanValue;
321
+ this.ezChange.emit(emitValue);
322
+ }
323
+ updateInputValueWithoutMask(inputValue) {
324
+ this._internalValueChange = true;
325
+ this.value = inputValue;
326
+ this.ezChange.emit(inputValue);
327
+ }
287
328
  onBlur() {
288
329
  this.ezBlur.emit(this.value);
289
330
  }
@@ -310,24 +351,64 @@ const EzClassicInput = class {
310
351
  core.ElementIDUtils.addIDInfo(this._inputElem, 'classic-input', dataInfo);
311
352
  }
312
353
  }
313
- componentWillLoad() {
314
- if (this.mask && !this._maskFormatter) {
315
- this._maskFormatter = new MaskFormatter(this.mask);
316
- }
354
+ buildPlaceholder() {
317
355
  if (!this.placeholder && this._maskFormatter) {
318
356
  this.placeholder = this._maskFormatter.generatePlaceholder();
319
357
  }
320
358
  }
359
+ buildMaskFormatter() {
360
+ if (this.mask && (!this._maskFormatter || this.mask === 'cgc_cpf')) {
361
+ const maskToBuilder = this.getMaskToBuilder();
362
+ this._maskFormatter = maskToBuilder ? new MaskFormatter(maskToBuilder) : undefined;
363
+ }
364
+ }
365
+ getMaskToBuilder() {
366
+ if (this.mask === "cgc_cpf") {
367
+ return this.getCGCCpfMask();
368
+ }
369
+ if (this.mask === 'phone') {
370
+ return this.getPhoneMask();
371
+ }
372
+ if (this.mask in core.MaskFormatter.DEFAULT_MASKS) {
373
+ return core.MaskFormatter.DEFAULT_MASKS[this.mask];
374
+ }
375
+ return this.mask;
376
+ }
377
+ getPhoneMask() {
378
+ if (this.value && this.value.length === 10) {
379
+ return MaskFormatter.DEFAULT_MASKS ? MaskFormatter.DEFAULT_MASKS.phone : undefined;
380
+ }
381
+ if (this.value && this.value.length === 11) {
382
+ return MaskFormatter.DEFAULT_MASKS ? MaskFormatter.DEFAULT_MASKS.phone_mobile : undefined;
383
+ }
384
+ return undefined;
385
+ }
386
+ getCGCCpfMask() {
387
+ var _a, _b;
388
+ if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === 11) {
389
+ return core.MaskFormatter.DEFAULT_MASKS.cpf;
390
+ }
391
+ if (((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) === 14) {
392
+ return core.MaskFormatter.DEFAULT_MASKS.cnpj;
393
+ }
394
+ return undefined;
395
+ }
396
+ componentDidRender() {
397
+ this.buildMaskFormatter();
398
+ this.buildPlaceholder();
399
+ this.syncValue();
400
+ }
321
401
  componentDidLoad() {
322
402
  this.syncValue();
323
403
  this.addInfoId();
324
404
  }
325
405
  render() {
326
- return (index.h(index.Host, null, index.h("label", { title: this.label, htmlFor: this.name }, this.label), index.h("div", { class: "input-container", "data-state": this.state, "data-disabled": (!this.enabled).toString(), onClick: () => this.setFocus({ preventScroll: true }) }, this.leftIconName && (index.h("ez-icon", { iconName: this.leftIconName, title: this.leftIconTooltip, onClick: (event) => this.handleIconClick(event, "left"), class: { 'icon-clickable': this.leftIconClickable } })), index.h("input", { ref: el => this._inputElem = el, id: this.name, type: this.type, title: this.value, placeholder: this.placeholder, disabled: !this.enabled, readonly: this.readonly, name: this.name, minlength: this.minlength, maxlength: this.maxlength, onInput: (event) => this.onInput(event), onBlur: this.onBlur.bind(this), onFocus: this.onFocus.bind(this) }), this.rightIconName && (index.h("ez-icon", { iconName: this.rightIconName, title: this.rightIconTooltip, onClick: (event) => this.handleIconClick(event, "right"), class: { 'icon-clickable': this.rightIconClickable } }))), this.helpText && (index.h("span", { title: this.helpText }, this.helpText))));
406
+ return (index.h(index.Host, null, index.h("label", { title: this.label, htmlFor: this.name }, this.label, this.required && index.h("span", { class: "required-indicator" }, "*")), index.h("div", { class: "input-container " + (this.size ? `input-container--${this.size}` : ""), "data-state": this.state, "data-disabled": (!this.enabled).toString(), onClick: () => this.setFocus({ preventScroll: true }) }, this.leftIconName && (index.h("ez-icon", { iconName: this.leftIconName, title: this.leftIconTooltip, onClick: (event) => this.handleIconClick(event, "left"), class: { 'icon-clickable': this.leftIconClickable } })), index.h("input", { ref: el => this._inputElem = el, id: this.name, type: this.type, title: this.value, placeholder: this.placeholder, disabled: !this.enabled, readonly: this.readonly, name: this.name, minlength: this.minlength, maxlength: this.maxlength, onInput: (event) => this.onInput(event), onBlur: this.onBlur.bind(this), onFocus: this.onFocus.bind(this) }), this.rightIconName && (index.h("ez-icon", { iconName: this.rightIconName, title: this.rightIconTooltip, onClick: (event) => this.handleIconClick(event, "right"), class: { 'icon-clickable': this.rightIconClickable } }))), (this.helpText || this.errorMessage) && (index.h("span", { id: "input_helpText", title: this.errorMessage || this.helpText }, this.errorMessage || this.helpText))));
327
407
  }
328
408
  get _element() { return index.getElement(this); }
329
409
  static get watchers() { return {
330
- "value": ["syncValue"]
410
+ "value": ["syncValue"],
411
+ "errorMessage": ["observeErrorMessage"]
331
412
  }; }
332
413
  };
333
414
  EzClassicInput.style = ezClassicInputCss;
@@ -0,0 +1,205 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-9e5554cb.js');
6
+ const core = require('@sankhyalabs/core');
7
+ const CSSVarsUtils = require('./CSSVarsUtils-f20973d1.js');
8
+ const index$1 = require('./index-350d0fa0.js');
9
+
10
+ const ezClassicNumberInputCss = ":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)}";
11
+
12
+ const EzClassicNumberInput = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.ezChange = index.createEvent(this, "ezChange", 7);
16
+ this.ezStartChange = index.createEvent(this, "ezStartChange", 7);
17
+ this.ezCancelWaitingChange = index.createEvent(this, "ezCancelWaitingChange", 7);
18
+ this._focused = false;
19
+ this._changePending = false;
20
+ this._valuePromiseCallbacks = [];
21
+ this._value = undefined;
22
+ this.label = undefined;
23
+ this.value = undefined;
24
+ this.enabled = true;
25
+ this.required = false;
26
+ this.canShowError = true;
27
+ this.errorMessage = undefined;
28
+ this.allowNegative = true;
29
+ this.precision = undefined;
30
+ this.prettyPrecision = undefined;
31
+ this.mode = "regular";
32
+ this.size = "default";
33
+ this.autoFocus = false;
34
+ this.alternativePlaceholder = undefined;
35
+ }
36
+ /**
37
+ * Aplica o foco no campo.
38
+ */
39
+ async setFocus(options) {
40
+ this._textInput.setFocus(options);
41
+ }
42
+ /**
43
+ * Remove o foco do campo.
44
+ */
45
+ async setBlur() {
46
+ this._textInput.setBlur();
47
+ }
48
+ /**
49
+ * Retorna se o conteúdo é inválido.
50
+ */
51
+ async isInvalid() {
52
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
53
+ }
54
+ /*
55
+ * Retorna uma promise com o valor da opção selecionada,
56
+ * que será resolvida quando o backend devolver este dado.
57
+ */
58
+ async getValueAsync() {
59
+ if (this._changePending) {
60
+ return new Promise(accept => {
61
+ this._valuePromiseCallbacks.push(accept);
62
+ });
63
+ }
64
+ return Promise.resolve(this.value);
65
+ }
66
+ observeLabel() {
67
+ if (this._textInput) {
68
+ this._textInput.label = this.label;
69
+ }
70
+ }
71
+ observeErrorMessage() {
72
+ var _a;
73
+ if (this._textInput) {
74
+ this._textInput.errorMessage = this.errorMessage;
75
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
76
+ this.setInputValue();
77
+ }
78
+ }
79
+ }
80
+ observeValue(newValue, oldValue) {
81
+ if (this._textInput && newValue != oldValue) {
82
+ this.handleNewValue(newValue, oldValue);
83
+ }
84
+ this._changePending = false;
85
+ }
86
+ observePrecision() {
87
+ if (this._textInput) {
88
+ this.setInputValue();
89
+ }
90
+ }
91
+ handleNewValue(newValue, oldValue) {
92
+ const newValueValidated = this.validateValue(newValue);
93
+ const oldValueValidated = this.validateValue(oldValue);
94
+ if (newValueValidated === null) {
95
+ this._value = '';
96
+ }
97
+ if (newValueValidated === oldValueValidated) {
98
+ return;
99
+ }
100
+ const textValue = this.getTextValue(newValueValidated) || '';
101
+ const parsedNumber = this.getParsedNumber(textValue);
102
+ if ((this._value || '') !== textValue && (parsedNumber !== undefined || !this._focused)) {
103
+ this._value = textValue;
104
+ this._focused = false;
105
+ this.errorMessage = "";
106
+ }
107
+ const valueEmitted = newValueValidated === null ? undefined : newValueValidated;
108
+ this.ezChange.emit(valueEmitted);
109
+ }
110
+ validateValue(value) {
111
+ return isNaN(value) || value === undefined ? null : value;
112
+ }
113
+ getTextValue(value) {
114
+ if (value == undefined)
115
+ return undefined;
116
+ let textValue = this.precision >= 0 ? core.NumberUtils.format(value.toString(), Number(this.precision), Number(this.prettyPrecision)) : value.toString();
117
+ return (this.precision === 0) ? core.StringUtils.replaceAll(textValue, ".", "") : textValue;
118
+ }
119
+ changeValue(newValue) {
120
+ this.errorMessage = "";
121
+ if (this.value != newValue) {
122
+ this.value = newValue === undefined ? null : newValue;
123
+ }
124
+ else {
125
+ this.setInputValue();
126
+ this.ezCancelWaitingChange.emit();
127
+ }
128
+ }
129
+ setError(msg) {
130
+ this.value = null;
131
+ this.errorMessage = msg;
132
+ this.ezCancelWaitingChange.emit();
133
+ }
134
+ handleBlur() {
135
+ if (!this._changePending) {
136
+ return;
137
+ }
138
+ try {
139
+ const parsedNumber = this.getParsedNumber();
140
+ if (parsedNumber !== undefined && isNaN(parsedNumber)) {
141
+ this.setError(this.i18n("ez-classic-number-input.invalidNumber"));
142
+ }
143
+ else {
144
+ try {
145
+ this.changeValue(parsedNumber);
146
+ }
147
+ catch (e) {
148
+ this.setError(e.message);
149
+ return;
150
+ }
151
+ }
152
+ }
153
+ finally {
154
+ for (const callback of this._valuePromiseCallbacks) {
155
+ callback(this.value);
156
+ }
157
+ this._valuePromiseCallbacks = [];
158
+ }
159
+ }
160
+ handleInput() {
161
+ const parsedNumber = this.getParsedNumber();
162
+ if (parsedNumber !== this.value) {
163
+ this._focused = true;
164
+ this._changePending = true;
165
+ this.ezStartChange.emit({ waitmessage: "", blocking: false });
166
+ }
167
+ }
168
+ getParsedNumber(value = this._textInput.value) {
169
+ return (value === null || value === void 0 ? void 0 : value.trim()) ? core.NumberUtils.stringToNumber(value) : undefined;
170
+ }
171
+ setInputValue() {
172
+ const textValue = this.getTextValue(this.value) || '';
173
+ if ((this._value || '') !== textValue) {
174
+ this._value = textValue;
175
+ this._textInput.value = this._value;
176
+ }
177
+ }
178
+ async componentWillLoad() {
179
+ this.i18n = await index$1.initI18n();
180
+ }
181
+ componentDidLoad() {
182
+ CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
183
+ this.setInputValue();
184
+ if (this.autoFocus) {
185
+ requestAnimationFrame(() => {
186
+ this.setFocus({ selectText: true });
187
+ });
188
+ }
189
+ }
190
+ render() {
191
+ core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
192
+ return (index.h("ez-classic-input", { class: "number__input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: (elem) => this._textInput = elem, "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: (event) => event.stopPropagation() }));
193
+ }
194
+ get _elem() { return index.getElement(this); }
195
+ static get watchers() { return {
196
+ "label": ["observeLabel"],
197
+ "errorMessage": ["observeErrorMessage"],
198
+ "value": ["observeValue"],
199
+ "precision": ["observePrecision"],
200
+ "prettyPrecision": ["observePrecision"]
201
+ }; }
202
+ };
203
+ EzClassicNumberInput.style = ezClassicNumberInputCss;
204
+
205
+ exports.ez_classic_number_input = EzClassicNumberInput;