@sankhyalabs/ezui 7.2.0-dev.6 → 7.2.0-dev.8

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 (289) hide show
  1. package/dist/cjs/{ApplicationUtils-dc653b57.js → ApplicationUtils-50f74c38.js} +1 -1
  2. package/dist/cjs/{app-globals-16ec1ff7.js → app-globals-18e8b9df.js} +1 -1
  3. package/dist/cjs/classic-search-list_7.cjs.entry.js +4 -4
  4. package/dist/cjs/ez-actions-button.cjs.entry.js +3 -3
  5. package/dist/cjs/ez-alert-list.cjs.entry.js +2 -2
  6. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-avatar.cjs.entry.js +2 -2
  9. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-button.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-calendar.cjs.entry.js +2 -2
  13. package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-classic-combo-box.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-classic-date-input.cjs.entry.js +2 -2
  19. package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +2 -2
  20. package/dist/cjs/ez-classic-input.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-classic-number-input.cjs.entry.js +2 -2
  22. package/dist/cjs/ez-classic-search-plus.cjs.entry.js +26 -13
  23. package/dist/cjs/ez-classic-search.cjs.entry.js +3 -3
  24. package/dist/cjs/ez-classic-text-area.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-classic-time-input.cjs.entry.js +2 -2
  26. package/dist/cjs/ez-collapsible-box.cjs.entry.js +3 -3
  27. package/dist/cjs/ez-combo-box.cjs.entry.js +3 -3
  28. package/dist/cjs/ez-date-input.cjs.entry.js +2 -2
  29. package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -2
  30. package/dist/cjs/ez-dialog.cjs.entry.js +2 -2
  31. package/dist/cjs/ez-double-list.cjs.entry.js +2 -2
  32. package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-file-item.cjs.entry.js +2 -2
  35. package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-form-view.cjs.entry.js +2 -2
  37. package/dist/cjs/ez-form.cjs.entry.js +4 -4
  38. package/dist/cjs/ez-grid-pagination.cjs.entry.js +2 -2
  39. package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-grid.cjs.entry.js +4 -4
  41. package/dist/cjs/ez-guide-navigator.cjs.entry.js +2 -2
  42. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  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-record-navigation.cjs.entry.js +2 -2
  59. package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +1 -1
  60. package/dist/cjs/ez-scroller_2.cjs.entry.js +2 -2
  61. package/dist/cjs/ez-search-plus.cjs.entry.js +12 -3
  62. package/dist/cjs/ez-search-result-list.cjs.entry.js +2 -2
  63. package/dist/cjs/ez-search.cjs.entry.js +3 -3
  64. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +2 -2
  65. package/dist/cjs/ez-skeleton.cjs.entry.js +2 -2
  66. package/dist/cjs/ez-sortable-list.cjs.entry.js +3 -3
  67. package/dist/cjs/ez-spinner.cjs.entry.js +2 -2
  68. package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
  69. package/dist/cjs/ez-split-item.cjs.entry.js +3 -3
  70. package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
  71. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  72. package/dist/cjs/ez-tag-input.cjs.entry.js +1 -1
  73. package/dist/cjs/ez-tag.cjs.entry.js +1 -1
  74. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  75. package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
  76. package/dist/cjs/ez-tile-medium.cjs.entry.js +1 -1
  77. package/dist/cjs/ez-tile.cjs.entry.js +1 -1
  78. package/dist/cjs/ez-time-input.cjs.entry.js +2 -2
  79. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  80. package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
  81. package/dist/cjs/ez-tree.cjs.entry.js +2 -2
  82. package/dist/cjs/ez-underface.cjs.entry.js +1 -1
  83. package/dist/cjs/ez-upload.cjs.entry.js +3 -3
  84. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  85. package/dist/cjs/ezui.cjs.js +4 -4
  86. package/dist/cjs/filter-column.cjs.entry.js +2 -2
  87. package/dist/cjs/{index-a8537087.js → index-8faf8416.js} +3 -0
  88. package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +0 -3
  89. package/dist/cjs/loader.cjs.js +4 -4
  90. package/dist/cjs/{search-column-c0485015.js → search-column-1c884d08.js} +3 -3
  91. package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.js +26 -11
  92. package/dist/collection/components/ez-search-plus/ez-search-plus.js +9 -0
  93. package/dist/collection/components/ez-sortable-list/ez-sortable-list.css +1 -1
  94. package/dist/collection/utils/i18n/locales/en-us.js +1 -0
  95. package/dist/collection/utils/i18n/locales/es-es.js +1 -0
  96. package/dist/collection/utils/i18n/locales/pt-br.js +1 -0
  97. package/dist/custom-elements/index.js +37 -12
  98. package/dist/esm/{ApplicationUtils-e99e53c8.js → ApplicationUtils-7eb5d339.js} +1 -1
  99. package/dist/esm/{app-globals-6e27b3bb.js → app-globals-94e67ab2.js} +1 -1
  100. package/dist/esm/classic-search-list_7.entry.js +4 -4
  101. package/dist/esm/ez-actions-button.entry.js +3 -3
  102. package/dist/esm/ez-alert-list.entry.js +2 -2
  103. package/dist/esm/ez-alert.entry.js +1 -1
  104. package/dist/esm/ez-application.entry.js +1 -1
  105. package/dist/esm/ez-avatar.entry.js +2 -2
  106. package/dist/esm/ez-badge.entry.js +1 -1
  107. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  108. package/dist/esm/ez-button.entry.js +1 -1
  109. package/dist/esm/ez-calendar.entry.js +2 -2
  110. package/dist/esm/ez-card-item.entry.js +1 -1
  111. package/dist/esm/ez-chart.entry.js +1 -1
  112. package/dist/esm/ez-check.entry.js +1 -1
  113. package/dist/esm/ez-chip.entry.js +1 -1
  114. package/dist/esm/ez-classic-combo-box.entry.js +1 -1
  115. package/dist/esm/ez-classic-date-input.entry.js +2 -2
  116. package/dist/esm/ez-classic-date-time-input.entry.js +2 -2
  117. package/dist/esm/ez-classic-input.entry.js +1 -1
  118. package/dist/esm/ez-classic-number-input.entry.js +2 -2
  119. package/dist/esm/ez-classic-search-plus.entry.js +26 -13
  120. package/dist/esm/ez-classic-search.entry.js +3 -3
  121. package/dist/esm/ez-classic-text-area.entry.js +1 -1
  122. package/dist/esm/ez-classic-time-input.entry.js +2 -2
  123. package/dist/esm/ez-collapsible-box.entry.js +3 -3
  124. package/dist/esm/ez-combo-box.entry.js +3 -3
  125. package/dist/esm/ez-date-input.entry.js +2 -2
  126. package/dist/esm/ez-date-time-input.entry.js +2 -2
  127. package/dist/esm/ez-dialog.entry.js +2 -2
  128. package/dist/esm/ez-double-list.entry.js +2 -2
  129. package/dist/esm/ez-dropdown.entry.js +1 -1
  130. package/dist/esm/ez-empty-card.entry.js +1 -1
  131. package/dist/esm/ez-file-item.entry.js +2 -2
  132. package/dist/esm/ez-filter-input.entry.js +1 -1
  133. package/dist/esm/ez-form-view.entry.js +2 -2
  134. package/dist/esm/ez-form.entry.js +4 -4
  135. package/dist/esm/ez-grid-pagination.entry.js +2 -2
  136. package/dist/esm/ez-grid-view.entry.js +1 -1
  137. package/dist/esm/ez-grid.entry.js +4 -4
  138. package/dist/esm/ez-guide-navigator.entry.js +2 -2
  139. package/dist/esm/ez-icon.entry.js +1 -1
  140. package/dist/esm/ez-link-builder_6.entry.js +2 -2
  141. package/dist/esm/ez-list-item.entry.js +1 -1
  142. package/dist/esm/ez-list.entry.js +2 -2
  143. package/dist/esm/ez-loading-bar.entry.js +1 -1
  144. package/dist/esm/ez-modal-container.entry.js +2 -2
  145. package/dist/esm/ez-modal.entry.js +2 -2
  146. package/dist/esm/ez-multi-selection-list.entry.js +2 -2
  147. package/dist/esm/ez-number-input.entry.js +2 -2
  148. package/dist/esm/ez-pagination.entry.js +2 -2
  149. package/dist/esm/ez-popover-core.entry.js +1 -1
  150. package/dist/esm/ez-popover-plus_3.entry.js +1 -1
  151. package/dist/esm/ez-popover.entry.js +1 -1
  152. package/dist/esm/ez-popup.entry.js +2 -2
  153. package/dist/esm/ez-progress-bar.entry.js +1 -1
  154. package/dist/esm/ez-radio-button.entry.js +1 -1
  155. package/dist/esm/ez-record-navigation.entry.js +2 -2
  156. package/dist/esm/ez-rich-toolbar-item.entry.js +1 -1
  157. package/dist/esm/ez-scroller_2.entry.js +2 -2
  158. package/dist/esm/ez-search-plus.entry.js +12 -3
  159. package/dist/esm/ez-search-result-list.entry.js +2 -2
  160. package/dist/esm/ez-search.entry.js +3 -3
  161. package/dist/esm/ez-sidebar-navigator.entry.js +2 -2
  162. package/dist/esm/ez-skeleton.entry.js +2 -2
  163. package/dist/esm/ez-sortable-list.entry.js +3 -3
  164. package/dist/esm/ez-spinner.entry.js +2 -2
  165. package/dist/esm/ez-split-button.entry.js +2 -2
  166. package/dist/esm/ez-split-item.entry.js +3 -3
  167. package/dist/esm/ez-split-panel.entry.js +1 -1
  168. package/dist/esm/ez-tabselector.entry.js +1 -1
  169. package/dist/esm/ez-tag-input.entry.js +1 -1
  170. package/dist/esm/ez-tag.entry.js +1 -1
  171. package/dist/esm/ez-text-area.entry.js +1 -1
  172. package/dist/esm/ez-text-input.entry.js +1 -1
  173. package/dist/esm/ez-tile-medium.entry.js +1 -1
  174. package/dist/esm/ez-tile.entry.js +1 -1
  175. package/dist/esm/ez-time-input.entry.js +2 -2
  176. package/dist/esm/ez-toast.entry.js +1 -1
  177. package/dist/esm/ez-tooltip.entry.js +1 -1
  178. package/dist/esm/ez-tree.entry.js +2 -2
  179. package/dist/esm/ez-underface.entry.js +1 -1
  180. package/dist/esm/ez-upload.entry.js +3 -3
  181. package/dist/esm/ez-view-stack.entry.js +1 -1
  182. package/dist/esm/ezui.js +5 -5
  183. package/dist/esm/filter-column.entry.js +2 -2
  184. package/dist/esm/{index-a031816b.js → index-4dc8ed82.js} +3 -0
  185. package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +1 -3
  186. package/dist/esm/loader.js +5 -5
  187. package/dist/esm/{search-column-9aaf3738.js → search-column-e79eb0f3.js} +3 -3
  188. package/dist/ezui/ezui.esm.js +1 -1
  189. package/dist/ezui/{p-ddfd7ecf.entry.js → p-00162042.entry.js} +1 -1
  190. package/dist/ezui/{p-f80fb048.entry.js → p-0298252e.entry.js} +1 -1
  191. package/dist/ezui/{p-712f059e.entry.js → p-05ee4e45.entry.js} +1 -1
  192. package/dist/ezui/{p-49eb13ea.entry.js → p-0d80e3ec.entry.js} +1 -1
  193. package/dist/ezui/{p-f6c5078e.entry.js → p-159f4beb.entry.js} +1 -1
  194. package/dist/ezui/{p-f9a7255c.entry.js → p-160a268d.entry.js} +1 -1
  195. package/dist/ezui/{p-c6021712.entry.js → p-178cb9df.entry.js} +1 -1
  196. package/dist/ezui/{p-1d624aa7.entry.js → p-19a60062.entry.js} +1 -1
  197. package/dist/ezui/{p-cdd18178.entry.js → p-1b01db47.entry.js} +1 -1
  198. package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
  199. package/dist/ezui/{p-efa7b5a1.entry.js → p-1ec7f65c.entry.js} +1 -1
  200. package/dist/ezui/{p-787c6496.entry.js → p-1f1ba5b9.entry.js} +1 -1
  201. package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
  202. package/dist/ezui/{p-cf33bc48.entry.js → p-20c024f7.entry.js} +1 -1
  203. package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
  204. package/dist/ezui/{p-82a2b0bc.entry.js → p-2490ff37.entry.js} +1 -1
  205. package/dist/ezui/{p-169d460d.entry.js → p-2528e988.entry.js} +1 -1
  206. package/dist/ezui/{p-efa5e822.entry.js → p-28658422.entry.js} +1 -1
  207. package/dist/ezui/{p-7ca13a5f.entry.js → p-2a1c1daf.entry.js} +1 -1
  208. package/dist/ezui/{p-5b680898.entry.js → p-361a4bfa.entry.js} +2 -2
  209. package/dist/ezui/{p-815716be.entry.js → p-373a7b4e.entry.js} +1 -1
  210. package/dist/ezui/{p-08ccdf00.entry.js → p-377125c7.entry.js} +1 -1
  211. package/dist/ezui/{p-7808d0c0.entry.js → p-39e1c05d.entry.js} +1 -1
  212. package/dist/ezui/{p-c719e15f.entry.js → p-3a167b3f.entry.js} +1 -1
  213. package/dist/ezui/{p-f7ca8634.entry.js → p-411c0222.entry.js} +1 -1
  214. package/dist/ezui/{p-87739608.entry.js → p-44183c39.entry.js} +1 -1
  215. package/dist/ezui/{p-24582dd6.js → p-46b0b0c7.js} +1 -1
  216. package/dist/ezui/{p-47c5b2d8.entry.js → p-4cf0ed43.entry.js} +1 -1
  217. package/dist/ezui/{p-0ad696a3.entry.js → p-4dca017c.entry.js} +1 -1
  218. package/dist/ezui/p-517498c1.js +1 -0
  219. package/dist/ezui/{p-a0080b19.entry.js → p-57bf1a88.entry.js} +1 -1
  220. package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
  221. package/dist/ezui/{p-c754774e.entry.js → p-6020f3d5.entry.js} +1 -1
  222. package/dist/ezui/{p-32201585.entry.js → p-61e11a7a.entry.js} +1 -1
  223. package/dist/ezui/{p-51e34317.entry.js → p-6369a0cd.entry.js} +1 -1
  224. package/dist/ezui/{p-0b531233.entry.js → p-6d596a5a.entry.js} +1 -1
  225. package/dist/ezui/{p-1723f728.entry.js → p-6f77a359.entry.js} +1 -1
  226. package/dist/ezui/{p-0913a517.entry.js → p-6fde1c11.entry.js} +1 -1
  227. package/dist/ezui/p-714f2b21.entry.js +1 -0
  228. package/dist/ezui/{p-f04a298d.entry.js → p-77f112e0.entry.js} +1 -1
  229. package/dist/ezui/{p-91e7574c.entry.js → p-78c8a5e7.entry.js} +1 -1
  230. package/dist/ezui/{p-26b01fe6.entry.js → p-78d2b5a5.entry.js} +1 -1
  231. package/dist/ezui/{p-a6df6cdc.entry.js → p-7df45688.entry.js} +1 -1
  232. package/dist/ezui/{p-e195eaad.entry.js → p-7f792043.entry.js} +1 -1
  233. package/dist/ezui/{p-39084308.entry.js → p-854fa107.entry.js} +1 -1
  234. package/dist/ezui/{p-aebfbcdd.entry.js → p-8c0ad73d.entry.js} +1 -1
  235. package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
  236. package/dist/ezui/{p-78e975b4.entry.js → p-91c9d50e.entry.js} +1 -1
  237. package/dist/ezui/{p-05e68ab3.entry.js → p-93e1c917.entry.js} +1 -1
  238. package/dist/ezui/{p-12c6b66f.entry.js → p-96120941.entry.js} +1 -1
  239. package/dist/ezui/{p-1827fced.entry.js → p-9883faa0.entry.js} +1 -1
  240. package/dist/ezui/{p-3286d016.entry.js → p-9f58cc27.entry.js} +1 -1
  241. package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
  242. package/dist/ezui/{p-bc693db6.entry.js → p-a0bf1fc7.entry.js} +1 -1
  243. package/dist/ezui/{p-27421015.entry.js → p-a0f51b99.entry.js} +1 -1
  244. package/dist/ezui/{p-9bcfa689.entry.js → p-a3075f52.entry.js} +1 -1
  245. package/dist/ezui/{p-f26b97e9.entry.js → p-a3ada561.entry.js} +1 -1
  246. package/dist/ezui/{p-894392ca.entry.js → p-a4735a12.entry.js} +1 -1
  247. package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
  248. package/dist/ezui/{p-1ee006d6.entry.js → p-b39b7880.entry.js} +1 -1
  249. package/dist/ezui/{p-69344c23.js → p-b6579f86.js} +1 -1
  250. package/dist/ezui/{p-d321c2b8.entry.js → p-b72322ad.entry.js} +1 -1
  251. package/dist/ezui/{p-9fb33cd8.entry.js → p-b8a83790.entry.js} +1 -1
  252. package/dist/ezui/p-bc2f844e.entry.js +1 -0
  253. package/dist/ezui/{p-1b30bb80.entry.js → p-bce082cf.entry.js} +1 -1
  254. package/dist/ezui/{p-14a932b7.entry.js → p-c626a0e4.entry.js} +1 -1
  255. package/dist/ezui/{p-55d2be5c.entry.js → p-cf66ace0.entry.js} +1 -1
  256. package/dist/ezui/{p-d5565a0f.entry.js → p-d5c2d721.entry.js} +1 -1
  257. package/dist/ezui/{p-a9432878.entry.js → p-d6742c1e.entry.js} +1 -1
  258. package/dist/ezui/{p-770cf2b8.entry.js → p-d6f50207.entry.js} +1 -1
  259. package/dist/ezui/p-d8cc640d.entry.js +1 -0
  260. package/dist/ezui/{p-76835bee.entry.js → p-dce34f38.entry.js} +1 -1
  261. package/dist/ezui/{p-707b073d.entry.js → p-dd522434.entry.js} +1 -1
  262. package/dist/ezui/{p-fd1e22b8.entry.js → p-dfe374b1.entry.js} +1 -1
  263. package/dist/ezui/{p-71e982ef.entry.js → p-e5df0199.entry.js} +1 -1
  264. package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
  265. package/dist/ezui/{p-e9b409c1.entry.js → p-e7a7c594.entry.js} +1 -1
  266. package/dist/ezui/{p-b21efe83.entry.js → p-e8c57463.entry.js} +1 -1
  267. package/dist/ezui/{p-dc5fd882.entry.js → p-f01c3171.entry.js} +1 -1
  268. package/dist/ezui/{p-980f1f18.entry.js → p-f34ec732.entry.js} +1 -1
  269. package/dist/ezui/{p-b7c0368d.entry.js → p-f678b330.entry.js} +1 -1
  270. package/dist/ezui/p-f8e18112.entry.js +1 -0
  271. package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
  272. package/dist/ezui/{p-73b578a3.js → p-fc57648e.js} +1 -1
  273. package/dist/ezui/{p-1b7d0c1c.entry.js → p-fc72aeb8.entry.js} +1 -1
  274. package/dist/ezui/{p-b6fcfa4f.entry.js → p-fd784a7f.entry.js} +1 -1
  275. package/dist/ezui/p-fda563e0.entry.js +1 -0
  276. package/dist/ezui/{p-73042259.entry.js → p-ffffdccf.entry.js} +1 -1
  277. package/dist/types/components/ez-classic-search-plus/ez-classic-search-plus.d.ts +3 -0
  278. package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +1 -0
  279. package/dist/types/utils/i18n/locales/en-us.d.ts +1 -0
  280. package/dist/types/utils/i18n/locales/es-es.d.ts +1 -0
  281. package/dist/types/utils/i18n/locales/pt-br.d.ts +1 -0
  282. package/dist/types/utils/i18n/translations.d.ts +3 -0
  283. package/package.json +1 -1
  284. package/dist/ezui/p-14d6aeb8.entry.js +0 -1
  285. package/dist/ezui/p-2241dea1.js +0 -1
  286. package/dist/ezui/p-6ec40dec.entry.js +0 -1
  287. package/dist/ezui/p-810b81ad.entry.js +0 -1
  288. package/dist/ezui/p-ba335c16.entry.js +0 -1
  289. package/dist/ezui/p-f1f083b6.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as s,g as a}from"./p-e4c7eb39.js";import{DateUtils as n,TimeFormatter as o,ElementIDUtils as h}from"@sankhyalabs/core";import{C as l}from"./p-ec7db713.js";import{i as r}from"./p-69344c23.js";const c=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.size="default",this.required=!1,this.canShowError=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=n.validateDate(t,!0),s=n.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=n.validateDate(this.value,!0),e=n.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),a=s.length>0?s[0]:t,h=o.prepareValue(s[1]?s[1]:"",this.showSeconds);return n.strToDate(a+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=n.validateDate(this.value,!0),i=n.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-classic-date-time-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return n.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=n.validateDate(this.value,!0),s=n.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}async componentWillLoad(){this.i18n=await r()}componentDidLoad(){l.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-classic-input",{ref:t=>this._textInput=t,"data-element-id":h.getInternalIDInfo("textInput"),"data-slave-mode":"true",label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,size:this.size,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),required:this.required,leftIconName:"calendar",leftIconClickable:this.enabled,onIconClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},onEzChange:t=>t.stopPropagation()}),e("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none","data-element-id":this._elem.getAttribute("data-element-id")},e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},time:!0,showSeconds:this.showSeconds})))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};c.style=':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)}';export{c as ez_classic_date_time_input}
1
+ import{r as t,c as i,h as e,H as s,g as a}from"./p-23a36bb6.js";import{DateUtils as n,TimeFormatter as o,ElementIDUtils as h}from"@sankhyalabs/core";import{C as l}from"./p-ec7db713.js";import{i as r}from"./p-b6579f86.js";const c=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.size="default",this.required=!1,this.canShowError=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=n.validateDate(t,!0),s=n.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=n.validateDate(this.value,!0),e=n.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),a=s.length>0?s[0]:t,h=o.prepareValue(s[1]?s[1]:"",this.showSeconds);return n.strToDate(a+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=n.validateDate(this.value,!0),i=n.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-classic-date-time-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return n.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=n.validateDate(this.value,!0),s=n.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}disconnectedCallback(){this._popover.hide()}async componentWillLoad(){this.i18n=await r()}componentDidLoad(){l.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-classic-input",{ref:t=>this._textInput=t,"data-element-id":h.getInternalIDInfo("textInput"),"data-slave-mode":"true",label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,size:this.size,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),required:this.required,leftIconName:"calendar",leftIconClickable:this.enabled,onIconClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},onEzChange:t=>t.stopPropagation()}),e("ez-popover-plus",{ref:t=>this._popover=t,anchorElement:this._textInput,autoClose:!0,boxWidth:"fit-content",overlayType:"none","data-element-id":this._elem.getAttribute("data-element-id")},e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},time:!0,showSeconds:this.showSeconds})))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};c.style=':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)}';export{c as ez_classic_date_time_input}
@@ -121,6 +121,8 @@ export declare class EzClassicSearchPlus {
121
121
  private searchDescriptionIsOpen;
122
122
  private visibleOptions;
123
123
  private showLoading;
124
+ private canShowClearButton;
125
+ private isHoveringDescription;
124
126
  observeValue(newValue: IOption | string, oldValue: IOption | string): Promise<void>;
125
127
  /**
126
128
  * Aplica o foco no campo.
@@ -173,6 +175,7 @@ export declare class EzClassicSearchPlus {
173
175
  private handleCodeInputFocus;
174
176
  private handleDescriptionInputFocus;
175
177
  private handleOnEzVisibilityChange;
178
+ private getClearButtonStatus;
176
179
  render(): any;
177
180
  }
178
181
  export interface IOption {
@@ -178,6 +178,7 @@ export declare class EzSearchPlus {
178
178
  private setLatestFocusedInputElement;
179
179
  private handleCodeInputFocus;
180
180
  private handleDescriptionInputFocus;
181
+ private cleanFieldsRef;
181
182
  private getRightIconElement;
182
183
  private getLeftIconElement;
183
184
  private handleOnEzVisibilityChange;
@@ -283,6 +283,7 @@ declare const _default: {
283
283
  emptyList: string;
284
284
  optionLoaderNotDefined: string;
285
285
  defaultCodeLabel: string;
286
+ clearValue: string;
286
287
  };
287
288
  "ez-sortable-list": {
288
289
  emptyMessage: string;
@@ -283,6 +283,7 @@ declare const _default: {
283
283
  emptyList: string;
284
284
  optionLoaderNotDefined: string;
285
285
  defaultCodeLabel: string;
286
+ clearValue: string;
286
287
  };
287
288
  "ez-sortable-list": {
288
289
  emptyMessage: string;
@@ -283,6 +283,7 @@ declare const _default: {
283
283
  emptyList: string;
284
284
  optionLoaderNotDefined: string;
285
285
  defaultCodeLabel: string;
286
+ clearValue: string;
286
287
  };
287
288
  "ez-sortable-list": {
288
289
  emptyMessage: string;
@@ -284,6 +284,7 @@ declare const _default: {
284
284
  emptyList: string;
285
285
  optionLoaderNotDefined: string;
286
286
  defaultCodeLabel: string;
287
+ clearValue: string;
287
288
  };
288
289
  "ez-sortable-list": {
289
290
  emptyMessage: string;
@@ -617,6 +618,7 @@ declare const _default: {
617
618
  emptyList: string;
618
619
  optionLoaderNotDefined: string;
619
620
  defaultCodeLabel: string;
621
+ clearValue: string;
620
622
  };
621
623
  "ez-sortable-list": {
622
624
  emptyMessage: string;
@@ -950,6 +952,7 @@ declare const _default: {
950
952
  emptyList: string;
951
953
  optionLoaderNotDefined: string;
952
954
  defaultCodeLabel: string;
955
+ clearValue: string;
953
956
  };
954
957
  "ez-sortable-list": {
955
958
  emptyMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/ezui",
3
- "version": "7.2.0-dev.6",
3
+ "version": "7.2.0-dev.8",
4
4
  "description": "Biblioteca de componentes Sankhya.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1 +0,0 @@
1
- import{r as e,h as r,H as o,g as a}from"./p-e4c7eb39.js";import{ElementIDUtils as c}from"@sankhyalabs/core";const n=class{constructor(r){e(this,r),this.color="default",this.customColor=void 0,this.height=void 0,this.width=void 0}componentDidRender(){this._element&&c.addIDInfo(this._element),this._container&&c.addIDInfo(this._container,"underface",{id:"container"})}render(){const e=Object.assign({},this.customColor&&{"--ez-underface--custom-background-color":`var(${this.customColor})`},this.height&&{"--ez-underface--custom-height":`${this.height}px`},this.width&&{"--ez-underface--custom-width":`${this.width}px`});return r(o,{style:e},r("div",{ref:e=>this._container=e,class:`underface_container ${this.color}`},r("slot",null)))}get _element(){return a(this)}};n.style=":host{--ez-underface--width:693px;--ez-underface--height:247px;--ez-underface--padding:var(--space--24, 24px);--ez-underface--border-radius:var(--border--radius-26, 26px)}div{width:var(--ez-underface--custom-width, var(--ez-underface--width));height:var(--ez-underface--custom-height, var(--ez-underface--height));border-radius:var(--ez-underface--border-radius);padding:var(--ez-underface--padding);display:block;overflow:hidden;outline:none;box-shadow:none;border:none;box-sizing:border-box;background-color:var(--ez-underface--custom-background-color, var(--color--petroleum-700, #222D42))}.light-green{background-color:var(--ez-underface--custom-background-color, var(--color--ocean-green-90))}.green{background-color:var(--ez-underface--custom-background-color, var(--color--green-600))}.light-gray{background-color:var(--ez-underface--custom-background-color, var(--color--gray-80))}.dark-petroleum{background-color:var(--ez-underface--custom-background-color, var(--color--petroleum-900))}.ocean-green{background-color:var(--ez-underface--custom-background-color, var(--color--ocean-green-600))}";export{n as ez_underface}
@@ -1 +0,0 @@
1
- import{i}from"./p-69344c23.js";const o=async function(){await i(),console.log("Global initialization ez-ui completed!")};export{o as g}
@@ -1 +0,0 @@
1
- import{r as o,c as t,h as i}from"./p-e4c7eb39.js";const s=class{constructor(i){o(this,i),this.applicationLoaded=t(this,"applicationLoaded",7)}componentWillLoad(){}componentDidLoad(){this.applicationLoaded.emit(!0)}render(){return i("div",null)}};s.style="";export{s as ez_application}
@@ -1 +0,0 @@
1
- import{r as s,c as e,h as i,H as t,g as a}from"./p-e4c7eb39.js";import{StringUtils as r,KeyboardManager as l,ElementIDUtils as o}from"@sankhyalabs/core";import"./p-24582dd6.js";import{C as c}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as n}from"./p-69344c23.js";import{S as h}from"./p-5895e687.js";import"./p-47e4a8ce.js";const d=class{constructor(i){s(this,i),this.ezChange=e(this,"ezChange",7),this.SEARCH_DESCRIPTION_TIMEOUT=2e3,this.INTERVAL_TO_RETRY_ASYNC_VALUE=100,this._ignoreNextValue=!1,this.value=void 0,this.enabled=!0,this.disableCodeInput=!1,this.disableDescriptionInput=!1,this.label=void 0,this.hideDescriptionInput=!1,this.canShowError=!0,this.errorMessage=void 0,this.mode="regular",this.size="default",this.required=!1,this.contextProperties=void 0,this.optionLoader=void 0,this.showOptionValue=!0,this.stopPropagateEnterKeyEvent=!1,this.autoFocus=!1,this.showSelectedValue=!0,this.suppressEmptyOption=!1,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.suppressSearch=!1,this.suppressPreLoad=!0,this.ensureClearButtonVisible=!1,this.descriptionValue="",this.codeValue="",this.isLoadingDescription=!1,this.searchDescriptionIsOpen=!1,this.visibleOptions=void 0,this.showLoading=!0}async observeValue(s,e){var i;if(this._ignoreNextValue)return void(this._ignoreNextValue=!1);const t=this.normalizeValueToCodeValue(s);if(t!==this.normalizeValueToCodeValue(e)){if(void 0===t)return this.codeValue=void 0,this.descriptionValue=void 0,void this.ezChange.emit(void 0);this.codeValue=t;try{if(this.descriptionValue=await this.normalizeCodeToDescriptionValue(s),null==this.descriptionValue)throw new Error("Valor não encontrado!")}catch(s){throw this._ignoreNextValue=!0,this.clearSearch(),console.warn("[EzSearchPlus] Erro ao obter descrição do registro.",s),"WarningException"===(null===(i=null==s?void 0:s.constructor)||void 0===i?void 0:i.name)&&(this.errorMessage=s.message),s}this.value=this.buildCurrentValue(),this.ezChange.emit(this.value),this.errorMessage=null}}async setFocus(s){var e;this.disableCodeInput?null===(e=this._textInputDescriptionValue)||void 0===e||e.setFocus(s):this._latestFocusedInputElement?this._latestFocusedInputElement.setFocus(s):this._textInputCodeValue.setFocus(s)}async getValueAsync(){if(!this.isLoadingDescription){const s=this.buildCurrentValue();return new Promise((e=>e(s)))}return new Promise((s=>{let e=setInterval((()=>{if(!this.isLoadingDescription){clearInterval(e);const i=this.buildCurrentValue();s(i)}}),this.INTERVAL_TO_RETRY_ASYNC_VALUE)}))}async clearValue(){this.clearSearch()}async setBlur(){var s,e;null===(s=this._textInputCodeValue)||void 0===s||s.setBlur(),null===(e=this._textInputDescriptionValue)||void 0===e||e.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async componentWillLoad(){this.i18n=await n(),this.value&&r.isEmpty(this.codeValue)&&await this.observeValue(this.value,void 0)}componentDidLoad(){c.applyVarsTextInput(this.el,this._textInputCodeValue),c.applyVarsTextInput(this.el,this._textInputDescriptionValue)}connectedCallback(){this.initKeyboardManager(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}clearSearch(){this.value=null,this.codeValue=null,this.descriptionValue=null,this.hideDescriptionInput||(this._textInputDescriptionValue.value=null)}async normalizeCodeToDescriptionValue(s){if(!s)return"";if("string"==typeof s)try{if((null==(s=JSON.parse(s))?void 0:s.value)&&!(null==s?void 0:s.label))return await this.loadDescriptionValueByCode(null==s?void 0:s.value)}catch(e){return await this.loadDescriptionValueByCode(s)}return"object"!=typeof s?await this.loadDescriptionValueByCode(s):null==s?void 0:s.label}normalizeValueToCodeValue(s){if(s){if("string"==typeof s)try{s=JSON.parse(s)}catch(e){return s}return"object"!=typeof s?"number"==typeof s?String(s):s:null==s?void 0:s.value}}async loadDescriptionValueByCode(s){if(!this.optionLoader)return console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined")),"";try{this.isLoadingDescription=!0;const e={mode:h.LOAD_DESCRIPTION,argument:s},i=await this.optionLoader(e);return i?Array.isArray(i)?i[0].label:i.label:""}finally{this.isLoadingDescription=!1}}handleCodeInputFocusOut(){this.cancelSelection(),this.codeValue!=this._textInputCodeValue.value&&(this.value=this._textInputCodeValue.value)}handleSearchClick(){this.loadAdvancedSearch()}async loadAdvancedSearch(){if(!this.optionLoader)return void console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined"));const s={mode:h.ADVANCED,argument:""};let e;try{e=await this.optionLoader(s,this.contextProperties)}catch(s){}e&&(this.value=e)}buildCurrentValue(){if(!r.isEmpty(this.codeValue))return{value:this.codeValue,label:this.descriptionValue}}async handleTextInputChangeHandler(s){this.searchDescriptionIsOpen||this._popover.showUnder(this.el);const e=s.target.value;await this.debounceLoaderOptions(e)}async debounceLoaderOptions(s){return this._debounceSearch&&clearTimeout(this._debounceSearch),new Promise((e=>{this._debounceSearch=setTimeout((async()=>{await this.processOptionsLoader(s),e()}),this.SEARCH_DESCRIPTION_TIMEOUT)}))}updateKeyOption(s){return Object.assign(Object.assign({},s),{presentationValue:s.value,presentationLabel:s.label})}parseSearchOptions(s=[]){if(Array.isArray(s)){const e=s[0];return e?"label"in e||"value"in e?s.map((s=>this.updateKeyOption(s))):s:[]}return("label"in s||"value"in s)&&this.updateKeyOption(s),[s]}async processOptionsLoader(s){try{this.showLoading=!0;const e={mode:h.PREDICTIVE,argument:s},i=await this.optionLoader(e);this.visibleOptions=this.parseSearchOptions(i)}finally{this.showLoading=!1}}handleSelectItem(s){this.value=s.detail,this._popover.hide(),window.requestAnimationFrame((()=>{var s;null===(s=this._textInputDescriptionValue)||void 0===s||s.setFocus({selectText:!0})}))}async handleArrowUp(){this.isOptionsVisible()&&await this._classicSearchList.previousOption()}async handleArrowDown(){this.isOptionsVisible()&&await this._classicSearchList.nextOption()}async selectCurrentItem(){var s;await(null===(s=this._classicSearchList)||void 0===s?void 0:s.selectCurrentItem())}async cancelSelection(){var s,e,i;const t="object"==typeof this.value?null===(s=this.value)||void 0===s?void 0:s.label:"";this._textInputDescriptionValue&&t&&this._textInputDescriptionValue.value!=t&&(this._textInputDescriptionValue.value=t),await(null===(e=this._classicSearchList)||void 0===e?void 0:e.cancelSelection()),null===(i=this._popover)||void 0===i||i.hide()}async handleInputTab(){await this.cancelSelection()}async handleInputEsc(){var s;await this.cancelSelection(),await(null===(s=this._latestFocusedInputElement)||void 0===s?void 0:s.setFocus({selectText:!0}))}async initKeyboardManager(){this._keyboardManager=new l;const s={element:this.el,propagate:!0};this._keyboardManager.bind("ArrowUp",(()=>this.handleArrowUp()),Object.assign(Object.assign({},s),{propagate:!1})).bind("ArrowDown",(()=>this.handleArrowDown()),Object.assign(Object.assign({},s),{propagate:!1})).bind("Enter",(()=>this.selectCurrentItem()),Object.assign(Object.assign({},s),{propagate:!this.stopPropagateEnterKeyEvent})).bind("Tab",(()=>this.handleInputTab()),s).bind("Escape",(()=>this.handleInputEsc()),s)}disconnectedCallback(){this._keyboardManager.unbind("ArrowUp").unbind("ArrowDown").unbind("Enter").unbind("Tab").unbind("Escape")}isOptionsVisible(){return this._popover.opened}setLatestFocusedInputElement(s){this._latestFocusedInputElement=s}handleCodeInputFocus(){this.setLatestFocusedInputElement(this._textInputCodeValue)}handleDescriptionInputFocus(){this.setLatestFocusedInputElement(this._textInputDescriptionValue)}handleOnEzVisibilityChange(s){s.stopPropagation(),this.searchDescriptionIsOpen=s.detail}render(){var s,e;o.addIDInfoIfNotExists(this.el,"input");const a=!(this.ensureClearButtonVisible||this.value||(null===(s=this._textInputCodeValue)||void 0===s?void 0:s.value)||(null===(e=this._textInputDescriptionValue)||void 0===e?void 0:e.value));return i(t,null,i("div",{class:"ez-classic-search-plus__wrapper"},i("div",{class:"ez-classic-search-plus__label-container"},i("label",{title:this.label},this.label),this.required&&i("span",{class:"required-indicator"},"*")),i("div",{class:"ez-classic-search-plus__container"},i("ez-classic-input",{ref:s=>this._textInputCodeValue=s,class:{"ez-classic-search-plus__code-input":!this.hideDescriptionInput,"ez-classic-search-plus__code-input-no-border":!this.hideDescriptionInput,"ez-classic-search-plus__code-input-full":this.hideDescriptionInput},"data-element-id":o.getInternalIDInfo("codeInput"),"data-slave-mode":"true",enabled:!this.disableCodeInput&&this.enabled,size:this.size,label:null,errorMessage:this.hideDescriptionInput?this.errorMessage:"",value:this.codeValue,onFocusout:()=>this.handleCodeInputFocusOut(),onFocus:()=>this.handleCodeInputFocus(),leftIconName:"search",leftIconClickable:this.enabled,onIconClick:()=>this.handleSearchClick(),onEzChange:s=>s.stopPropagation(),state:this.errorMessage&&this.canShowError?"error":"default"}),!this.hideDescriptionInput&&i("div",{class:"description-input-container"},i("ez-classic-input",{ref:s=>this._textInputDescriptionValue=s,tabIndex:-1,class:{"ez-classic-search-plus__text-input":!0},"data-element-id":o.getInternalIDInfo("textInput"),"data-slave-mode":"true",enabled:!this.disableDescriptionInput&&this.enabled,label:null,size:this.size,value:this.descriptionValue,onInput:s=>this.handleTextInputChangeHandler(s),onFocus:()=>this.handleDescriptionInputFocus(),rightIconName:a?"close":null,rightIconClickable:this.enabled,onIconClick:()=>this.clearSearch(),onEzChange:s=>s.stopPropagation(),state:this.errorMessage&&this.canShowError?"error":"default"}),i("ez-popover-plus",{ref:s=>this._popover=s,anchorElement:this.el,autoClose:!0,boxWidth:"fit-content",overlayType:"none",useAnchorSize:!0,onEzVisibilityChange:s=>this.handleOnEzVisibilityChange(s),"data-element-id":this.el.getAttribute("data-element-id")},i("ez-classic-search-result-list",{ref:s=>this._classicSearchList=s,showLoading:this.showLoading,visibleOptions:this.visibleOptions,value:this.value,showOptionValue:this.showOptionValue,onChangeValue:s=>this.handleSelectItem(s)})))),i("div",{class:"ez-classic-search-plus__error-container"},i("span",null,this.errorMessage))))}get el(){return a(this)}static get watchers(){return{value:["observeValue"]}}};d.style=":host{--ez-classic-search--height:42px;--ez-classic-search--width:100%;--ez-classic-search__icon--width:48px;--ez-classic-search--border-radius:var(--border--radius-medium, 12px);--ez-classic-search--border-radius-small:var(--border--radius-small, 6px);--ez-classic-search--font-size:var(--text--medium, 14px);--ez-classic-search--font-family:var(--font-pattern, Arial);--ez-classic-search--font-weight--large:var(--text-weight--large, 500);--ez-classic-search--font-weight--medium:var(--text-weight--medium, 400);--ez-classic-search--background-color--xlight:var(--background--xlight, #fff);--ez-classic-search--background-medium:var(--background--medium, #f0f3f7);--ez-classic-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-classic-search__input--background-color:var(--background--medium, #e0e0e0);--ez-classic-search__input--border:var(--border--medium, 2px solid);--ez-classic-search__input--border-color:var(--ez-classic-search__input--background-color);--ez-classic-search__input--focus--border-color:var(--color--primary, #008561);--ez-classic-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-classic-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-classic-search__input--error--border-color:#CC2936;--ez-classic-search__btn--color:var(--title--primary, #2B3A54);--ez-classic-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-classic-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-classic-search__label--color:var(--title--primary, #2B3A54);--ez-classic-search__list-title--primary:var(--title--primary, #2B3A54);--ez-classic-search__list-text--primary:var(--text--primary, #626e82);--ez-classic-search__list-height:calc(var(--ez-classic-search--font-size) + var(--ez-classic-search--space--medium) + 4px);--ez-classic-search__list-min-width:64px;--ez-classic-search--space--medium:var(--space--medium, 12px);--ez-classic-search--space--small:var(--space--small, 6px);--ez-classic-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-classic-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-classic-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-classic-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-classic-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-classic-search__scrollbar--width:var(--space--medium, 12px);--ez-classic-input--helptext-color:var(--color--ocean-green-1000, #00281D);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-classic-search--width);font-family:var(--font--pattern, Arial, sans-serif)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-classic-input__input--border-color:var(--color--strokes, #dce0e8);--ez-classic-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-classic-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-classic-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-classic-search--background-color--xlight);border-radius:var(--ez-classic-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-classic-search__scrollbar--color-clicked) var(--ez-classic-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-classic-search__scrollbar--color-background);border-radius:var(--ez-classic-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-classic-search__scrollbar--color-default);border-radius:var(--ez-classic-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-classic-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-classic-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-classic-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-classic-search__list-title--primary);font-family:var(--ez-classic-search--font-family);font-size:var(--ez-classic-search--font-size);line-height:var(--ez-classic-search--line-height)}.item__label{font-weight:var(--ez-classic-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-classic-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-classic-search__list-text--primary);font-weight:var(--ez-classic-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-classic-search__list-height)}.message__no-result{color:var(--ez-classic-search__list-title--primary);font-family:var(--ez-classic-search--font-family);font-size:var(--ez-classic-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-classic-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-classic-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-classic-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-classic-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-classic-search__btn-disabled--color)}.btn:hover{color:var(--ez-classic-search__btn-hover--color)}.btn__close{visibility:hidden}ez-classic-input:hover .btn__close,ez-c-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-classic-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-classic-search-plus__wrapper{display:flex;flex-direction:column;flex-grow:1;overflow:hidden}.ez-classic-search-plus__label-container{display:flex;flex-grow:1;gap:3px;overflow:hidden}.ez-classic-search-plus__label-container label{overflow:hidden;text-overflow:ellipsis;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);white-space:nowrap}.ez-classic-search-plus__text-input{--ez-classic-input--border-top-left-radius:0px;--ez-classic-input--border-bottom-left-radius:0px;outline:none}.ez-classic-search-plus__code-input-no-border{--ez-classic-input--border-top-right-radius:0px;--ez-classic-input--border-bottom-right-radius:0px}.ez-classic-search-plus__code-input{max-width:85px;--ez-classic-input--padding-inline:6px;--ez-classic-input--gap:6px}.ez-classic-search-plus__code-input-full{width:100%}.description-input-container{width:100%;outline:none}.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}.ez-classic-search-plus__error-container{display:flex;flex-grow:1;gap:3px;overflow:hidden}.ez-classic-search-plus__error-container 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)}";export{d as ez_classic_search_plus}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as r,g as s}from"./p-e4c7eb39.js";import{StringUtils as a,KeyboardManager as o,ElementIDUtils as l}from"@sankhyalabs/core";import{A as n}from"./p-24582dd6.js";import{C as h}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as c}from"./p-69344c23.js";import{S as d}from"./p-5895e687.js";import"./p-47e4a8ce.js";const u=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.ezEmptySearch=t(this,"ezEmptySearch",7),this.SEARCH_DESCRIPTION_TIMEOUT=300,this.INTERVAL_TO_RETRY_ASYNC_VALUE=100,this._ignoreNextValue=!1,this.value=void 0,this.enabled=!0,this.disableCodeInput=!1,this.disableDescriptionInput=!1,this.label=void 0,this.codLabel=void 0,this.hideDescriptionInput=!1,this.canShowError=!0,this.errorMessage=void 0,this.mode="regular",this.contextProperties=void 0,this.optionLoader=void 0,this.showOptionValue=!0,this.stopPropagateEnterKeyEvent=!1,this.autoFocus=!1,this.showSelectedValue=!0,this.suppressEmptyOption=!1,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.suppressSearch=!1,this.suppressPreLoad=!0,this.ensureClearButtonVisible=!1,this.descriptionValue="",this.codeValue="",this.isLoadingDescription=!1,this.searchDescriptionIsOpen=!1,this.visibleOptions=void 0,this.showLoading=!0}async observeValue(e,t){var i;if(this._ignoreNextValue)return void(this._ignoreNextValue=!1);const r=this.normalizeValueToCodeValue(e);if(r===this.normalizeValueToCodeValue(t))return;if(void 0===r)return this.codeValue=void 0,this.descriptionValue=void 0,void this.ezChange.emit(void 0);this.codeValue=r;let s=!0;try{this.descriptionValue=await this.normalizeCodeToDescriptionValue(e),null==this.descriptionValue&&console.error(`Valor de descrição não encontrado! ${this.label}: ${this.codeValue}`)}catch(e){await n.info(e.message);const t="string"==typeof this.value?this.value:null===(i=this.value)||void 0===i?void 0:i.value;this.ezEmptySearch.emit(t),this.errorMessage=e.message,s=!1,this._ignoreNextValue=!0,this.clearSearch(),console.warn("[EzSearchPlus] Erro ao obter descrição do registro.",e)}this.value=this.buildCurrentValue(),this.ezChange.emit(this.value),s&&(this.errorMessage=null)}canShowLoadSpinDescription(){return this.isLoadingDescription}async setFocus(e){var t,i;this.disableCodeInput?null===(t=this._textInputDescriptionValue)||void 0===t||t.setFocus(e):this._latestFocusedInputElement?this._latestFocusedInputElement.setFocus(e):null===(i=this._textInputCodeValue)||void 0===i||i.setFocus(e)}async getValueAsync(){if(!this.isLoadingDescription){const e=this.buildCurrentValue();return new Promise((t=>t(e)))}return new Promise((e=>{let t=setInterval((()=>{if(!this.isLoadingDescription){clearInterval(t);const i=this.buildCurrentValue();e(i)}}),this.INTERVAL_TO_RETRY_ASYNC_VALUE)}))}async clearValue(){this.clearSearch()}async setBlur(){var e,t;null===(e=this._textInputCodeValue)||void 0===e||e.setBlur(),null===(t=this._textInputDescriptionValue)||void 0===t||t.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async componentWillLoad(){this.i18n=await c(),this.value&&a.isEmpty(this.codeValue)&&await this.observeValue(this.value,void 0)}componentDidLoad(){h.applyVarsTextInput(this.el,this._textInputCodeValue),h.applyVarsTextInput(this.el,this._textInputDescriptionValue)}connectedCallback(){this.initKeyboardManager(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}clearSearch(){this.value=null,this.codeValue=null,this.descriptionValue=null,!this.hideDescriptionInput&&this._textInputDescriptionValue&&(this._textInputDescriptionValue.value=null)}getCodLabel(){var e;return this.hideDescriptionInput?this.label:null!==(e=this.codLabel)&&void 0!==e?e:this.i18n("ez-search-plus.defaultCodeLabel")}async normalizeCodeToDescriptionValue(e){if(!e)return"";if("string"==typeof e)try{if((null==(e=JSON.parse(e))?void 0:e.value)&&!(null==e?void 0:e.label))return await this.loadDescriptionValueByCode(null==e?void 0:e.value)}catch(t){return await this.loadDescriptionValueByCode(e)}return"object"!=typeof e?await this.loadDescriptionValueByCode(e):null==e?void 0:e.label}normalizeValueToCodeValue(e){if(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){return e}return"object"!=typeof e?"number"==typeof e?String(e):e:null==e?void 0:e.value}}async loadDescriptionValueByCode(e){if(!this.optionLoader)return console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined")),"";try{this.isLoadingDescription=!0;const t={mode:d.LOAD_DESCRIPTION,argument:e},i=await this.optionLoader(t);return i?Array.isArray(i)?i[0].label:i.label:""}finally{this.isLoadingDescription=!1}}handleCodeInputFocusOut(){this.cancelSelection(),this.codeValue!=this._textInputCodeValue.value&&(this.value=this._textInputCodeValue.value)}handleSearchClick(){this.loadAdvancedSearch()}async loadAdvancedSearch(){if(!this.optionLoader)return void console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined"));const e={mode:d.ADVANCED,argument:""};let t;try{t=await this.optionLoader(e,this.contextProperties)}catch(e){}t&&(this.value=t)}buildCurrentValue(){if(!a.isEmpty(this.codeValue))return{value:this.codeValue,label:this.descriptionValue}}async handleTextInputChangeHandler(e){this.searchDescriptionIsOpen||this._popover.showUnder(this.el);const t=e.target.value;await this.debounceLoaderOptions(t)}async debounceLoaderOptions(e){return this._debounceSearch&&clearTimeout(this._debounceSearch),new Promise((t=>{this._debounceSearch=setTimeout((async()=>{await this.processOptionsLoader(e),t()}),this.SEARCH_DESCRIPTION_TIMEOUT)}))}updateKeyOption(e){return Object.assign(Object.assign({},e),{presentationValue:e.value,presentationLabel:e.label})}parseSearchOptions(e=[]){if(Array.isArray(e)){const t=e[0];return t?"label"in t||"value"in t?e.map((e=>this.updateKeyOption(e))):e:[]}return("label"in e||"value"in e)&&this.updateKeyOption(e),[e]}async processOptionsLoader(e){try{this.showLoading=!0;const t={mode:d.PREDICTIVE,argument:e},i=await this.optionLoader(t);this.visibleOptions=this.parseSearchOptions(i)}finally{this.showLoading=!1}}handleSelectItem(e){this.value=e.detail,this._popover.hide(),window.requestAnimationFrame((()=>{var e;null===(e=this._textInputDescriptionValue)||void 0===e||e.setFocus({selectText:!0})}))}async handleArrowUp(){this.isOptionsVisible()&&await this._searchList.previousOption()}async handleArrowDown(){this.isOptionsVisible()&&await this._searchList.nextOption()}async selectCurrentItem(){var e;await(null===(e=this._searchList)||void 0===e?void 0:e.selectCurrentItem())}async cancelSelection(){var e,t,i;const r="object"==typeof this.value?null===(e=this.value)||void 0===e?void 0:e.label:"";this._textInputDescriptionValue&&r&&this._textInputDescriptionValue.value!=r&&(this._textInputDescriptionValue.value=r),await(null===(t=this._searchList)||void 0===t?void 0:t.cancelSelection()),null===(i=this._popover)||void 0===i||i.hide()}async handleInputTab(){await this.cancelSelection()}async handleInputEsc(){var e;await this.cancelSelection(),await(null===(e=this._latestFocusedInputElement)||void 0===e?void 0:e.setFocus({selectText:!0}))}async initKeyboardManager(){this._keyboardManager=new o;const e={element:this.el,propagate:!0};this._keyboardManager.bind("ArrowUp",(()=>this.handleArrowUp()),Object.assign(Object.assign({},e),{propagate:!1})).bind("ArrowDown",(()=>this.handleArrowDown()),Object.assign(Object.assign({},e),{propagate:!1})).bind("Enter",(()=>this.selectCurrentItem()),Object.assign(Object.assign({},e),{propagate:!this.stopPropagateEnterKeyEvent})).bind("Tab",(()=>this.handleInputTab()),e).bind("Escape",(()=>this.handleInputEsc()),e)}disconnectedCallback(){this._keyboardManager.unbind("ArrowUp").unbind("ArrowDown").unbind("Enter").unbind("Tab").unbind("Escape")}isOptionsVisible(){return this._popover.opened}setLatestFocusedInputElement(e){this._latestFocusedInputElement=e}handleCodeInputFocus(){this.setLatestFocusedInputElement(this._textInputCodeValue)}handleDescriptionInputFocus(){this.setLatestFocusedInputElement(this._textInputDescriptionValue)}getRightIconElement(){var e,t;return this.ensureClearButtonVisible||this.value||(null===(e=this._textInputCodeValue)||void 0===e?void 0:e.value)||(null===(t=this._textInputDescriptionValue)||void 0===t?void 0:t.value)?i("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},i("ez-icon",{iconName:"close"})):null}getLeftIconElement(){return i("button",{class:"btn",slot:"leftIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handleSearchClick()},this.canShowLoadSpinDescription()?i("div",{class:"message__loading"}):i("ez-icon",{iconName:"search"}))}handleOnEzVisibilityChange(e){e.stopPropagation(),this.searchDescriptionIsOpen=e.detail}render(){return l.addIDInfoIfNotExists(this.el,"input"),i(r,null,i("div",{class:"ez-search-plus__container"},i("ez-text-input",{ref:e=>this._textInputCodeValue=e,class:{"ez-search-plus__code-input":!this.hideDescriptionInput,"ez-search-plus__code-input-no-border":!this.hideDescriptionInput,"ez-search-plus__code-input-full":this.hideDescriptionInput},"data-element-id":l.getInternalIDInfo("codeInput"),"data-slave-mode":"true",enabled:!this.disableCodeInput&&this.enabled,mode:this.mode,label:this.getCodLabel(),canShowError:this.canShowError,hasInvalid:!a.isEmpty(this.errorMessage),errorMessage:this.hideDescriptionInput?this.errorMessage:"",value:this.codeValue,onFocusout:()=>this.handleCodeInputFocusOut(),onFocus:()=>this.handleCodeInputFocus()},this.getLeftIconElement()),!this.hideDescriptionInput&&i("div",{class:"description-input-container"},i("ez-text-input",{ref:e=>this._textInputDescriptionValue=e,tabIndex:-1,class:"ez-search-plus__text-input","data-element-id":l.getInternalIDInfo("textInput"),"data-slave-mode":"true",enabled:!this.disableDescriptionInput&&this.enabled,label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,value:this.descriptionValue,onInput:e=>this.handleTextInputChangeHandler(e),onFocus:()=>this.handleDescriptionInputFocus()},this.getRightIconElement()),i("ez-popover-plus",{ref:e=>this._popover=e,anchorElement:this.el,autoClose:!0,boxWidth:"fit-content",overlayType:"none",useAnchorSize:!0,onEzVisibilityChange:e=>this.handleOnEzVisibilityChange(e),"data-element-id":this.el.getAttribute("data-element-id")},i("ez-search-result-list",{ref:e=>this._searchList=e,showLoading:this.showLoading,visibleOptions:this.visibleOptions,value:this.value,showOptionValue:this.showOptionValue,onChangeValue:e=>this.handleSelectItem(e)})))))}get el(){return s(this)}static get watchers(){return{value:["observeValue"]}}};u.style=":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px;outline:none}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{max-width:85px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%;outline:none}";export{u as ez_search_plus}
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as e,H as s,a,g as r}from"./p-e4c7eb39.js";import{StringUtils as o,ElementIDUtils as l,ObjectUtils as c,HTMLBuilder as n,KeyboardManager as h}from"@sankhyalabs/core";import{a as d,r as m}from"./p-88a115b3.js";import{i as b}from"./p-69344c23.js";import{C as u}from"./p-5895e687.js";import{R as p,a as v}from"./p-3e767a74.js";import{p as g}from"./p-dff9862b.js";import{A as _}from"./p-24582dd6.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-47e4a8ce.js";import"./p-112455b1.js";const x=class{constructor(e){i(this,e),this.changeValue=t(this,"changeValue",7),this.changePreSelection=t(this,"changePreSelection",7),this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this.MAX_HEIGHT=350,this.HEADER_MENU_HEIGHT=60,this.showLoading=void 0,this.visibleOptions=[],this.textEmptyList=void 0,this.canShowListOptions=void 0,this.value=void 0,this.showOptionValue=!0,this.preSelection=void 0}async nextOption(){const i=void 0===this.preSelection?0:Math.min(this.preSelection+1,this.visibleOptions.length-1);this.changePreSelection.emit(i),this.scrollToOption(this.visibleOptions[i])}async previousOption(){const i=void 0===this.preSelection?0:Math.max(this.preSelection-1,0);this.changePreSelection.emit(i),this.scrollToOption(this.visibleOptions[i])}selectOption(i){const t=Object.assign(Object.assign({},i),{value:d(null==i?void 0:i.value),label:d(null==i?void 0:i.label)}),e=Object.assign(Object.assign({},t),{value:m(null==t?void 0:t.value),label:m(null==t?void 0:t.label)});this.changeValue.emit(e)}createOption(i){let{key:t,title:e}=i;const s=new RegExp(this._startHighlightTag,"g"),a=new RegExp(this._endHighlightTag,"g");e=o.decodeHtmlEntities(e);const r={value:null==t?void 0:t.replace(s,"").replace(a,""),label:null==e?void 0:e.replace(s,"").replace(a,"")};this.selectOption(r)}scrollToOption(i){window.requestAnimationFrame((()=>{const t=(null==i?void 0:i.value)?this._optionsList.querySelector(`div#item_${i.value.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g,"\\$1")}`):void 0;t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})}))}buildItem(i,t){i.label=i.label||i.value;const s={key:i.value,title:i.label,details:i.details};return e("div",{style:{height:"100%"},class:t===this.preSelection?"item preselected":"item",id:`item_${i.value}`,onMouseDown:()=>this.createOption(s),onMouseOver:()=>this.changePreSelection.emit(t)},e("ez-card-item",{item:s,compacted:!0,enableKey:this.showOptionValue}))}componentDidLoad(){this._optionsList&&(this._optionsList.style.maxHeight=`${this.MAX_HEIGHT}px`)}componentDidUpdate(){if(this._optionsList){const i=this._optionsList.getBoundingClientRect();window.innerHeight-i.bottom<0&&this.adjustMaxHeight(i)}}adjustMaxHeight(i){if(this._optionsList){const t=Math.min(i.top-this.HEADER_MENU_HEIGHT,this.MAX_HEIGHT);this._optionsList.style.maxHeight=`${t}px`}}cleanEmptyObjectArray(i){return i.filter((i=>void 0!==(null==i?void 0:i.value)))}render(){return e(s,null,e("ul",{class:"list-options",ref:i=>this._optionsList=i},!this.showLoading&&0===this.cleanEmptyObjectArray(this.visibleOptions).length&&e("div",{class:"message"},e("span",{class:"message__no-result"},this.textEmptyList)),this.showLoading&&e("div",{class:"message"},e("div",{class:"message__loading"})),this.canShowListOptions&&this.visibleOptions.map(((i,t)=>this.buildItem(i,t)))))}};x.style=":host{--ez-classic-search__list-title--primary:var(--title--primary, #2B3A54);--ez-classic-search__list-text--primary:var(--text--primary, #626e82);--ez-classic-search__list-height:calc(var(--ez-classic-search--font-size) + var(--ez-classic-search--space--medium) + 4px);--ez-classic-search__list-min-width:64px;--ez-classic-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-classic-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-classic-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-classic-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-classic-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-classic-search__scrollbar--width:var(--space--small, 6px);--ez-classic-search--border-radius-small:var(--border--radius-small, 6px);--ez-classic-search--font-size:var(--text--medium, 14px);--ez-classic-search--font-family:var(--font-pattern, Arial);--ez-classic-search--font-weight--large:var(--text-weight--large, 500);--ez-classic-search--font-weight--medium:var(--text-weight--medium, 400);--ez-classic-search--background-medium:var(--background--medium, #f0f3f7);--ez-classic-search--line-height:calc(var(--text--medium, 14px) + 4px)}.list-options{position:relative;z-index:var(--more-visible, 2);margin:var(--space--small) 0px;padding:0px;padding-inline-start:0px;box-sizing:border-box;width:100%;height:100%;max-height:350px;min-width:150px;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-classic-search__scrollbar--color-clicked) var(--ez-classic-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-classic-search__scrollbar--color-background);border-radius:var(--ez-classic-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-classic-search__scrollbar--color-default);border-radius:var(--ez-classic-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-classic-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-classic-search__scrollbar--color-clicked)}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;margin:var(--space--medium) 0px;min-height:var(--ez-classic-search__list-height)}.message__no-result{color:var(--ez-classic-search__list-title--primary);font-family:var(--ez-classic-search--font-family);font-size:var(--ez-classic-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-classic-search__list-title--primary);border-top:3px solid transparent}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-classic-search__list-title--primary);font-family:var(--ez-classic-search--font-family);font-size:var(--ez-classic-search--font-size);line-height:var(--ez-classic-search--line-height)}.item__label{font-weight:var(--ez-classic-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-classic-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-classic-search__list-text--primary);font-weight:var(--ez-classic-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.item__list>li:hover{background-color:var(--ez-classic-search--background-medium)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-classic-search--border-radius-small);gap:var(--space--small, 6px)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}";const z=class{constructor(e){i(this,e),this.changeValue=t(this,"changeValue",7),this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this.showLoading=void 0,this.visibleOptions=[],this.value=void 0,this.showOptionValue=!0,this._preSelection=void 0}observerVisivleOptions(i){i.length&&this.preSelectItemByIndex(0)}async nextOption(){const i=void 0===this._preSelection?0:Math.min(this._preSelection+1,this.visibleOptions.length-1);this.preSelectItemByIndex(i)}async previousOption(){const i=void 0===this._preSelection?0:Math.max(this._preSelection-1,0);this.preSelectItemByIndex(i)}preSelectItemByIndex(i){this._preSelection=i,this.scrollToOption(this.visibleOptions[i])}selectOption(i){const t=Object.assign(Object.assign({},i),{value:null==i?void 0:i.value,label:null==i?void 0:i.label}),e=Object.assign(Object.assign({},t),{value:this.removeHighLight(null==t?void 0:t.value),label:this.removeHighLight(null==t?void 0:t.label)});this.changeValue.emit(e)}removeHighLight(i){if(!i||"string"!=typeof i)return i;const t=new RegExp(this._startHighlightTag,"g"),e=new RegExp(this._endHighlightTag,"g");return i.replace(t,"").replace(e,"")}createAndSelectOption(i){let{key:t,title:e}=i;t=String(null!=t?t:""),e=o.decodeHtmlEntities(e);const s={value:this.removeHighLight(t),label:this.removeHighLight(e)};this.selectOption(s)}scrollToOption(i){(null==i?void 0:i.value)&&this._optionsList&&window.requestAnimationFrame((()=>{var t;const e=String(null!==(t=null==i?void 0:i.value)&&void 0!==t?t:""),s=e?this._optionsList.querySelector(`div#item_${e.replace(/([ #;&,.+*~':"!^$[\]()=<>|/\\])/g,"\\$1")}`):void 0;s&&s.scrollIntoView({behavior:"smooth",block:"nearest"})}))}buildItem(i,t){var s;i.label=i.label||i.value;const a={key:String(null!==(s=i.presentationValue)&&void 0!==s?s:""),title:i.presentationLabel,details:i.details};return e("div",{style:{height:"100%"},class:t===this._preSelection?"item preselected":"item",id:`item_${i.value}`,onMouseDown:()=>this.createAndSelectOption(a),onMouseOver:()=>{this._preSelection=t}},e("ez-card-item",{item:a,compacted:!0,enableKey:this.showOptionValue}))}async selectCurrentItem(){this.selectOption(this.visibleOptions[this._preSelection])}async cancelSelection(){this.cancelPreselection()}cancelPreselection(){this._preSelection=void 0}canShowListOptions(){return!this.showLoading&&this.visibleOptions.length>0}async componentWillLoad(){this.i18n=await b()}render(){return e(s,null,e("ul",{class:"list-options",ref:i=>this._optionsList=i},!this.showLoading&&0===this.visibleOptions.length&&e("div",{class:"message"},e("span",{class:"message__no-result"},this.i18n("ez-classic-search-plus.emptyList"))),this.showLoading&&e("div",{class:"loading__container"},e("ez-skeleton",{count:4,height:"20px"})),this.canShowListOptions()&&this.visibleOptions.map(((i,t)=>this.buildItem(i,t)))))}static get watchers(){return{visibleOptions:["observerVisivleOptions"]}}};z.style=":host{--ez-classic-search__list-title--primary:var(--title--primary, #2B3A54);--ez-classic-search__list-text--primary:var(--text--primary, #626e82);--ez-classic-search__list-height:calc(var(--ez-classic-search--font-size) + var(--ez-classic-search--space--medium) + 4px);--ez-classic-search__list-min-width:64px;--ez-classic-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-classic-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-classic-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-classic-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-classic-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-classic-search__scrollbar--width:var(--space--small, 6px);--ez-classic-search--border-radius-small:var(--border--radius-small, 6px);--ez-classic-search--font-size:var(--text--medium, 14px);--ez-classic-search--font-family:var(--font-pattern, Arial);--ez-classic-search--font-weight--large:var(--text-weight--large, 500);--ez-classic-search--font-weight--medium:var(--text-weight--medium, 400);--ez-classic-search--background-medium:var(--background--medium, #f0f3f7);--ez-classic-search--line-height:calc(var(--text--medium, 14px) + 4px)}.list-options{position:relative;z-index:var(--more-visible, 2);margin:var(--space--small) 0px;padding:0px;padding-inline-start:0px;box-sizing:border-box;width:100%;height:100%;max-height:350px;min-width:150px;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-classic-search__scrollbar--color-clicked) var(--ez-classic-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-classic-search__scrollbar--color-background);border-radius:var(--ez-classic-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-classic-search__scrollbar--color-default);border-radius:var(--ez-classic-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-classic-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-classic-search__scrollbar--color-clicked)}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;margin:var(--space--medium) 0px;min-height:var(--ez-classic-search__list-height)}.message__no-result{color:var(--ez-classic-search__list-title--primary);font-family:var(--ez-classic-search--font-family);font-size:var(--ez-classic-search--font-size)}.loading__container{display:flex;flex-direction:column;margin:var(--space--small)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-classic-search__list-title--primary);font-family:var(--ez-classic-search--font-family);font-size:var(--ez-classic-search--font-size);line-height:var(--ez-classic-search--line-height)}.item__label{font-weight:var(--ez-classic-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-classic-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-classic-search__list-text--primary);font-weight:var(--ez-classic-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.item__list>li:hover{background-color:var(--ez-classic-search--background-medium)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-classic-search--border-radius-small);gap:var(--space--small, 6px)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}";const f=class{constructor(t){i(this,t),this.showLoading=void 0,this.visibleOptions=void 0,this.textEmptyList=void 0,this.showOptionValue=void 0,this.preSelection=void 0,this.maxWidth=void 0,this.width=void 0,this.onOptionSelect=void 0,this.onOptionHover=void 0}async nextOption(){var i,t;(null===(i=this.visibleOptions)||void 0===i?void 0:i.length)&&(void 0!==this.preSelection&&this.preSelection>=this.visibleOptions.length-1||(this.preSelection=void 0===this.preSelection?0:this.preSelection+1,this.scrollToOption(this.visibleOptions[this.preSelection]),null===(t=this.onOptionHover)||void 0===t||t.call(this,this.preSelection)))}async previousOption(){var i,t;(null===(i=this.visibleOptions)||void 0===i?void 0:i.length)&&(void 0!==this.preSelection&&this.preSelection<=0||(this.preSelection=void 0===this.preSelection?this.visibleOptions.length-1:this.preSelection-1,this.scrollToOption(this.visibleOptions[this.preSelection]),null===(t=this.onOptionHover)||void 0===t||t.call(this,this.preSelection)))}async selectCurrentOption(){void 0!==this.preSelection&&(this.onOptionSelect(this.visibleOptions[this.preSelection]),this.preSelection=void 0)}observeWidth(i,t){i!==t&&this._listWrapper&&(this._listWrapper.style.width=`${this.width}px`)}observeMaxWidth(i,t){i!==t&&this._listWrapper&&(this._listWrapper.style.maxWidth=this.maxWidth?`${this.maxWidth}px`:"")}handleKeyDown(i){switch(i.key){case"ArrowDown":i.preventDefault(),i.stopPropagation(),this.nextOption();break;case"ArrowUp":i.preventDefault(),i.stopPropagation(),this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.preSelection=void 0}}buildItem(i,t){const s=this.showOptionValue&&this.maxWidth>0?`${this.maxWidth}px`:"";return i.label=i.label||i.value,e("li",{tabIndex:1,class:t===this.preSelection?"item preselected":"item",id:`item_${i.value}_${t}`,key:`item_${i.value}_${t}`,onMouseDown:()=>this.onOptionSelect(i),onMouseOver:()=>this.preSelection=t},this.showOptionValue?e("span",{class:"item__value",title:i.value,style:{width:s,minWidth:s,maxWidth:s}},i.value):void 0,e("span",{class:"item__label "+(this.showOptionValue?"item__label--bold":""),title:i.label},i.label))}scrollToOption(i){if(!(null==i?void 0:i.value)||!this._optionsList)return;const t=this.visibleOptions.indexOf(i);if(-1===t)return;const e=this._optionsList.querySelector(`li#item_${CSS.escape(i.value)}_${CSS.escape(String(t))}`);e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}async componentWillLoad(){this.i18n=await b()}componentDidLoad(){this._listWrapper.style.width=`${this.width}px`,this._listWrapper.style.maxWidth=this.maxWidth?`${this.maxWidth}px`:""}componentDidRender(){var i;null===(i=this._optionsList)||void 0===i||i.querySelectorAll(".item").forEach((i=>{l.addIDInfoIfNotExists(i,"itemComboBox")}))}render(){return e("section",{class:"list-container"},e("div",{class:"list-wrapper",ref:i=>this._listWrapper=i},e("ul",{class:"list-options",ref:i=>this._optionsList=i},!this.showLoading&&0===this.visibleOptions.length&&e("div",{class:"message"},e("span",{class:"message__no-result"},this.textEmptyList||this.i18n("ez-combo-box.noResults"))),this.showLoading&&e("div",{class:"message"},e("div",{class:"message__loading"})),this.showOptionValue&&e("span",{class:"item__value item__value--hidden"}),!this.showLoading&&this.visibleOptions.length>0&&this.visibleOptions.map(((i,t)=>this.buildItem(i,t))))))}static get watchers(){return{width:["observeWidth"],maxWidth:["observeMaxWidth"]}}};f.style=":host{--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);--ez-combo-box__list-container--padding:var(--space--extra-small, 3px)}.list-container{padding-top:var(--ez-combo-box__list-container--padding)}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow--medium, 0 8px 24px 0 rgba(43, 58, 84, 0.10));padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;margin:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";const w=class{constructor(t){i(this,t),this.gui=void 0,this.customEditor=void 0,this.formViewField=void 0,this.value=void 0,this.detailContext=void 0,this.builderFallback=void 0,this.selectedRecord=void 0}async setFocus(){var i,t;null===(t=null===(i=this.gui)||void 0===i?void 0:i.setFocus)||void 0===t||t.call(i)}async setBlur(){var i,t;null===(t=null===(i=this.gui)||void 0===i?void 0:i.setBlur)||void 0===t||t.call(i)}async isInvalid(){var i,t;return(null===(t=null===(i=this.gui)||void 0===i?void 0:i.isInvalid)||void 0===t?void 0:t.call(i))||!1}watchValue(){this.handleValue(this.gui)}watchCustomEditor(){this.getContent()}watchFormViewField(i,t){c.equals(i,t)||this.getContent()}watchDetailContext(){this.getContent()}watchBuilderFallback(){this.getContent()}watchSelectedRecord(i,t){(null==i?void 0:i.__record__id__)!==(null==t?void 0:t.__record__id__)&&this.getContent()}getContent(){var i,t,s,r,l;const c=new Map;for(const i in this.formViewField.props)c.set(i,this.formViewField.props[i]);const h={value:this.value,name:this.formViewField.name,currentEditor:this.builderFallback(this.formViewField),setValue:i=>this.setValue(i),getValue:this.getValue,record:this.selectedRecord,editorMetadata:{label:this.formViewField.label,hidden:!1===(null===(i=this.formViewField.props)||void 0===i?void 0:i.visible),userInterface:this.formViewField.userInterface,options:null===(t=this.formViewField.props)||void 0===t?void 0:t.options,props:this.formViewField.props?c:void 0,optionLoader:this.formViewField.optionLoader},source:u.FORM,detailContext:this.detailContext};let d=this.customEditor.getEditorElement(h);if(!d)return d=this.builderFallback(this.formViewField),this.handleValue(d),void(this.gui=d);if(!(d instanceof a)&&"string"!=typeof d)return this.handleValue(d),void(this.gui=d);"string"==typeof d&&(d=n.parseElement(d));const m=null!==(l=null!==(r=null===(s=this.value)||void 0===s?void 0:s.value)&&void 0!==r?r:this.value)&&void 0!==l?l:"";d.setAttribute("value",m),this.gui=e("div",{key:o.generateUUID(),ref:i=>i&&i.appendChild(d)})}setValue(i){this.value=i}getValue(){return this.value}handleValue(i){var t;null===(t=i.i)||void 0===t||t.forEach((i=>{i.t.value=this.value}))}componentWillLoad(){this.getContent()}render(){return e(s,null,this.gui)}static get watchers(){return{value:["watchValue"],customEditor:["watchCustomEditor"],formViewField:["watchFormViewField"],detailContext:["watchDetailContext"],builderFallback:["watchBuilderFallback"],selectedRecord:["watchSelectedRecord"]}}},y=class{constructor(e){i(this,e),this.ezChange=t(this,"ezChange",7),this.ezError=t(this,"ezError",7),this.handleFileSelect=i=>{const t=i.target;t.files&&t.files[0]&&this.processFile(t.files[0])},this.handleDrop=i=>{var t;if(i.preventDefault(),i.stopPropagation(),this._isDragging=!1,!this.enabled)return;const e=null===(t=i.dataTransfer)||void 0===t?void 0:t.files;e&&e[0]&&this.processFile(e[0])},this.handleDragOver=i=>{i.preventDefault(),i.stopPropagation(),this.enabled&&(this._isDragging=!0)},this.handleDragLeave=i=>{i.preventDefault(),i.stopPropagation(),this._isDragging=!1},this.handleRemoveImage=i=>{i.stopPropagation(),this.value=void 0,this._hasImage=!1,this._inputElem&&(this._inputElem.value=""),this.ezChange.emit("")},this.handleClickDropZone=()=>{var i;this.enabled&&!this._hasImage&&(null===(i=this._inputElem)||void 0===i||i.click())},this.handleImageClick=i=>{i.stopPropagation(),this._hasImage&&this.value&&(this._showImagePopup=!0)},this.handlePopupAction=i=>{const t=i.detail;"CANCEL"!==t&&"OK"!==t||this.handleClosePopup()},this.handleClosePopup=()=>{this._showImagePopup=!1},this.enabled=!0,this.label=void 0,this.name=void 0,this.value=void 0,this.maxFileSize=20971520,this.accept="image/*",this.loading=!1,this._hasImage=!1,this._isDragging=!1,this._showImagePopup=!1}onValueChange(i,t){i!==t&&(this._hasImage=!!i),!i&&this._inputElem&&(this._inputElem.value="")}addInfoId(){this._element&&l.addIDInfo(this._element),this._inputElem&&l.addIDInfo(this._inputElem,"image-input",{id:"embedded"})}processFile(i){if(!i.type.startsWith("image/")){const i=this.i18n("ez-image-input.invalidFileType");return void this.ezError.emit(i)}if(this.maxFileSize&&i.size>this.maxFileSize){const i=(this.maxFileSize/1048576).toFixed(2),t=this.i18n("ez-image-input.fileTooLarge",{maxSize:`${i}MB`});return void this.ezError.emit(t)}const t=new FileReader;t.onload=i=>{var t;const e=null===(t=i.target)||void 0===t?void 0:t.result;this.value=e,this._hasImage=!0,this.ezChange.emit(e)},t.readAsDataURL(i)}async componentWillLoad(){this.i18n=await b(),this._hasImage=!!this.value}componentDidLoad(){this.addInfoId()}render(){if(this.loading)return e(s,null,e("ez-skeleton",{width:"280px",height:"200px"}));const i=this.label||this.i18n("ez-image-input.defaultLabel");return e(s,null,e("div",{class:{"image-input__container":!0,"image-input__container--disabled":!this.enabled,"image-input__container--dragging":this._isDragging,"image-input__container--has-image":this._hasImage},"data-enabled":this.enabled.toString(),"data-has-image":this._hasImage.toString(),onClick:this.handleClickDropZone,onDrop:this.handleDrop,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,role:"button","aria-label":i,tabindex:this.enabled?0:-1},e("input",{ref:i=>this._inputElem=i,type:"file",accept:this.accept,name:this.name,disabled:!this.enabled,onChange:this.handleFileSelect,class:"image-input__file-input","aria-hidden":"true"}),this._hasImage&&this.value?e("div",{class:"image-input__preview"},e("img",{src:this.value,alt:this.i18n("ez-image-input.imageAlt"),class:"image-input__image",onClick:this.handleImageClick}),this.enabled&&e("ez-button",{class:"image-input__remove-button",variant:"primary",type:"button",mode:"icon",size:"small",iconName:"trash-alt",onClick:this.handleRemoveImage,"aria-label":this.i18n("ez-image-input.removeImage"),title:this.i18n("ez-image-input.removeImage")})):e("div",{class:"image-input__dropzone"},e("ez-icon",{iconName:"image",size:"x-large"}),e("span",{class:"image-input__label"},i))),e("ez-popup",{opened:this._showImagePopup,ezTitle:this.i18n("ez-image-input.imagePreview"),size:"large",heightMode:"auto",onEzPopupAction:this.handlePopupAction,onEzClosePopup:this.handleClosePopup},e("div",{class:"image-input__popup-content"},e("img",{src:this.value,alt:this.i18n("ez-image-input.imageAlt"),class:"image-input__popup-image"}))))}get _element(){return r(this)}static get watchers(){return{value:["onValueChange"]}}};y.style=":host{display:block;--ez-image-input--container-height:200px;--ez-image-input--container-width:280px;--ez-image-input--background-color:var(--color--gray-80);--ez-image-input--border-color:var(--color--gray-200);--ez-image-input--border-color-hover:var(--color--ocean-green-600);--ez-image-input--border-color-dragging:var(--color--ocean-green-500);--ez-image-input--border-color-disabled:var(--color--gray-200);--ez-image-input--label-color:var(--color--petroleum-900);--ez-image-input--icon-color:var(--color--gray-400);--ez-image-input--border-radius:var(--border--radius-24);--ez-image-input--border-width:2px;--ez-image-input--remove-button-bg:var(--color--red-600);--ez-image-input--remove-button-bg-hover:var(--color--red-700);--ez-image-input--remove-button-color:var(--color--gray-70);--ez-image-input--remove-button-border:1px solid var(--color--red-700)}.image-input__container{display:flex;align-items:center;justify-content:center;position:relative;height:var(--ez-image-input--container-height);width:var(--ez-image-input--container-width);border:var(--ez-image-input--border-width) dashed var(--ez-image-input--border-color);border-radius:var(--ez-image-input--border-radius);background-color:var(--ez-image-input--background-color);cursor:pointer;transition:all 0.3s ease;overflow:hidden}.image-input__container:hover:not(.image-input__container--disabled){border-color:var(--ez-image-input--border-color-hover)}.image-input__container--dragging{border-color:var(--ez-image-input--border-color-dragging);background-color:var(--color--ocean-green-90)}.image-input__container--disabled{cursor:not-allowed;opacity:0.6;border-color:var(--ez-image-input--border-color-disabled)}.image-input__container--has-image{border-style:solid;padding:var(--space--0)}.image-input__file-input{display:none}.image-input__dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space--16);padding:var(--space--24);text-align:center}.image-input__dropzone ez-icon{color:var(--ez-image-input--icon-color)}.image-input__label{font-family:var(--font--pattern);font-size:var(--font-size--default);font-weight:var(--font-weight--medium);color:var(--ez-image-input--label-color);line-height:var(--line-height--20)}.image-input__preview{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-input__image{height:100%;object-fit:cover;border-radius:calc(var(--ez-image-input--border-radius) - var(--ez-image-input--border-width))}ez-button{--ez-button--background-color:var(--ez-image-input--remove-button-bg);--ez-button--hover--background-color:var(--ez-image-input--remove-button-bg-hover);--ez-button--color:var(--ez-image-input--remove-button-color);--ez-button--border:var(--ez-image-input--remove-button-border);--ez-button--hover--border:var(--ez-image-input--remove-button-border)}.image-input__remove-button{position:absolute;top:var(--space--8);right:var(--space--8);display:flex;align-items:center;justify-content:center}.image-input__popup-content{display:flex;align-items:center;justify-content:center;padding:var(--space--16);height:100%}.image-input__popup-image{max-width:100%;max-height:70vh;object-fit:contain;border-radius:var(--border--radius-8)}.image-input__image{height:100%;object-fit:cover;border-radius:calc(var(--ez-image-input--border-radius) - var(--ez-image-input--border-width));cursor:pointer;transition:transform 0.2s ease}.image-input__image:hover{transform:scale(1.02)}ez-skeleton{--skeleton-width:var(--ez-image-input--container-width);--skeleton-height:var(--ez-image-input--container-height)}";const k=class{constructor(e){i(this,e),this.ezChange=t(this,"ezChange",7),this.historyStack=[],this.historyIndex=-1,this.previewMode=!1,this.showPreview=!0,this.value=void 0,this.label=void 0,this.mode="regular",this.enabled=!0,this.rows=6,this.errorMessage=void 0,this.canShowError=!0,this.showConfigs=!0,this.showTextFormat=!0,this.showUndoRedo=!0}observeValue(i,t){c.equals(i,t)||this.ezChange.emit(i)}observeErrorMessage(i){i&&this.previewMode&&(this.previewMode=!1)}async handleExecuteToolbarCommand(i){const{command:t,value:e}=i.detail;await this.executeCommand(t,e)}async setFocus(){this.handleFocus()}async setBlur(){var i;await(null===(i=this.textAreaRef)||void 0===i?void 0:i.setBlur())}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}bindPreview(){this._keyboardManager&&this.showPreview&&this._keyboardManager.bind("ctrl + p",(async()=>{await this.togglePreview()}),{description:"Entra em modo de pré visualização.",element:this.element})}bindConfigs(){this._keyboardManager&&this.showConfigs&&this._keyboardManager.bind("ctrl + l",(async()=>{await this.handleFormatSelection(p.LIST)}),{description:this.i18n("ez-rich-text.listShortcut"),element:this.element}).bind("ctrl + k",(async()=>{await this.handleLink()}),{description:this.i18n("ez-rich-text.linkShortcut"),element:this.element}).bind("ctrl + o",(async()=>{await this.handleImage()}),{description:this.i18n("ez-rich-text.imageShortcut"),element:this.element})}bindTextFormat(){this._keyboardManager&&this.showTextFormat&&this._keyboardManager.bind("ctrl + b",(async()=>{await this.handleFormatSelection(p.BOLD)}),{description:this.i18n("ez-rich-text.boldShortcut"),element:this.element}).bind("ctrl + i",(async()=>{await this.handleFormatSelection(p.ITALIC)}),{description:this.i18n("ez-rich-text.italicShortcut"),element:this.element}).bind("ctrl + u",(async()=>{await this.handleFormatSelection(p.UNDERLINE)}),{description:this.i18n("ez-rich-text.underlineShortcut"),element:this.element})}initKeyboardManager(){this._keyboardManager=new h({propagate:!1,element:this.element}),this._keyboardManager.bind("ctrl + Enter",(async()=>{await this.handleFormatSelection(p.BREAK_LINE)}),{description:this.i18n("ez-rich-text.breakLineShortcut"),element:this.element}).bind("ctrl + z",(async()=>{await this.handleUndo()}),{description:this.i18n("ez-rich-text.undoShortcut"),element:this.element}).bind("ctrl + x",(async()=>{await this.handleRedo()}),{description:this.i18n("ez-rich-text.redoShortcut"),element:this.element}),this.bindPreview(),this.bindConfigs(),this.bindTextFormat()}async executeCommand(i,t){switch(i){case v.FOCUS:this.handleFocus();break;case v.PREVIEW:await this.togglePreview();break;case v.FORMAT:await this.handleFormatSelection(t);break;case v.UNDO:await this.handleUndo();break;case v.REDO:await this.handleRedo();break;case v.LINK:await this.handleLink();break;case v.IMAGE:await this.handleImage()}}handleFocus(){this.previewMode=!1,requestAnimationFrame((async()=>{await this.textAreaRef.setFocus()}))}async handleLink(){this.previewMode=!1,requestAnimationFrame((async()=>{await this.linkBuilderRef.show(this.getSelectedText())}))}async handleImage(){this.previewMode=!1,await this.imageUploaderRef.show()}async handleRedo(){this.previewMode=!1,requestAnimationFrame((async()=>{this.redo(),await this.textAreaRef.setFocus()}))}async handleUndo(){this.previewMode=!1,requestAnimationFrame((async()=>{this.undo(),await this.textAreaRef.setFocus()}))}async handleFormatSelection(i){i&&(this.previewMode=!1,requestAnimationFrame((async()=>{await this.formatSelection(i),await this.textAreaRef.setFocus()})))}async togglePreview(){this.previewMode=!this.previewMode,this.previewMode&&await this.textAreaRef.setFocus()}getSelectedText(){const i=this.getTextAreaElement();if(i)return(this.textAreaRef.value||"").substring(i.selectionStart,i.selectionEnd)}getTextAreaElement(){return this.element.querySelector("ez-text-area").shadowRoot.querySelector("textarea")}async formatSelection(i){if(!this.textAreaRef)return;const t=i.replace("$selection",this.getSelectedText()||"");await this.textAreaRef.appendTextToSelection(t),this.value=this.textAreaRef.value,this.addToHistory(this.value)}addToHistory(i){this.historyIndex>=0&&i===this.historyStack[this.historyIndex]||(this.historyStack.length>=50&&this.historyStack.splice(0,this.historyStack.length-49),this.historyStack.push(i),this.historyIndex=this.historyStack.length-1)}undo(){if(!this.canExecuteUndo())return;this.historyIndex--;const i=this.historyStack[this.historyIndex];this.value=i,this.textAreaRef.value=i}canExecuteUndo(){return this.historyIndex>0}redo(){this.canExecuteRedo()&&(this.historyIndex++,this.getValueFromHistory())}canExecuteRedo(){return this.historyIndex<this.historyStack.length-1}getValueFromHistory(){const i=this.historyStack[this.historyIndex];this.value=i,this.textAreaRef.value=i}handleTextAreaChanged(i){this.value=i.detail,this.addToHistory(this.value)}async removeShortcuts(){var i;null===(i=this._keyboardManager)||void 0===i||i.unbindAllShortcutKeys()}async componentWillLoad(){this.i18n=await b()}componentDidLoad(){this.initKeyboardManager(),this.addToHistory(this.value)}async disconnectedCallback(){await this.removeShortcuts()}getSanitizedValue(){return g.sanitize(this.value,{ADD_ATTR:["target","rel"]})}renderContent(){return this.previewMode?e("div",{id:"rich-text-preview-container",class:"preview",innerHTML:this.getSanitizedValue()}):e("ez-text-area",{ref:i=>this.textAreaRef=i,label:this.label,value:this.value,enabled:this.enabled,rows:this.rows,mode:this.mode,canShowError:this.canShowError,errorMessage:this.errorMessage,onEzChange:this.handleTextAreaChanged.bind(this)})}render(){return e(s,null,e("div",{class:"editor-container bordered"},e("ez-rich-toolbar",{isPreviewMode:this.previewMode,showPreview:this.showPreview,showConfigs:this.showConfigs&&this.enabled,showTextFormat:this.showTextFormat&&this.enabled,showUndoRedo:this.showUndoRedo&&this.enabled}),this.renderContent()),e("ez-link-builder",{ref:i=>this.linkBuilderRef=i}),e("ez-simple-image-uploader",{ref:i=>this.imageUploaderRef=i}))}get element(){return r(this)}static get watchers(){return{value:["observeValue"],errorMessage:["observeErrorMessage"]}}};k.style=".sc-ez-rich-text-h{display:block;width:100%;font-family:Roboto;--ez-rich-text--box-shadow:0 0 3px 0 #DCE0E8;--ez-rich-text--shadow--outline:var(--shadow--outline) var(--color--strokes)}.editor-container.sc-ez-rich-text{width:100%;overflow:hidden;border-radius:12px;border:1px solid #DCE0E8}ez-text-area.sc-ez-rich-text{--text-area__input--border:1px solid}.preview.sc-ez-rich-text{min-height:20px;padding:12px;resize:both;overflow:auto;max-width:100%;border-top:1px solid #DCE0E8}";const E=class{constructor(e){i(this,e),this.saveEdition=t(this,"saveEdition",7),this.cancelEdition=t(this,"cancelEdition",7),this._newValue=void 0,this.value=void 0,this.styled=void 0}async applyFocusSelect(){this.calcSizeInput(this.value,!0)}calcSizeInput(i,t=!1){var e,s;const a=null===(s=null===(e=this._inputElement)||void 0===e?void 0:e.shadowRoot)||void 0===s?void 0:s.querySelector("input");if(null!=a){const e=this.getWidthValue(i);a.style.width=e+"px",t&&setTimeout((()=>a.select()),100)}}getWidthValue(i){if(null!=this._valueBasis){const t=this._valueBasis;if(null!=i){const e=2;return t.innerHTML=i,t.clientWidth>0?t.clientWidth+e:e}t.innerHTML=""}return 0}setStyledInput(){var i,t;let e="",s="",a="";null!=this.styled&&(e=this.styled.fontSize,s=this.styled.fontWeight,a=this.styled.fontFamily);const r=null===(t=null===(i=this._inputElement)||void 0===i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("input");null!=r&&(r.style.fontSize=e,r.style.fontWeight=s,r.style.fontFamily=a);const o=this._valueBasis;null!=o&&(o.style.fontSize=e,o.style.fontWeight=s,o.style.fontFamily=a)}handleSaveEdition(){this._newValue?this.saveEdition.emit({value:this.value,newValue:this._newValue}):_.alert(this.i18n("app.warning"),this.i18n("ez-text-edit.emptyFieldWarning")).then((()=>{this.setNewValue(this.value,!0)}))}handleCancelEdition(){this.cancelEdition.emit()}setNewValue(i,t=!1){this._newValue=i,this.calcSizeInput(this._newValue,t)}async componentWillLoad(){this.i18n=await b()}componentDidLoad(){this.applyFocusSelect(),this.setNewValue(this.value)}componentDidRender(){this.setStyledInput()}render(){return l.addIDInfoIfNotExists(this._element,"input"),e(s,null,e("span",{class:"text-edit__hidden-value",ref:i=>this._valueBasis=i}),e("ez-text-input",{"data-element-id":l.getInternalIDInfo("textInput"),onInput:()=>{this.calcSizeInput(this._newValue)},class:"text-edit__form-input",value:this._newValue,ref:i=>this._inputElement=i,mode:"slim",onEzChange:i=>this.setNewValue(null==i?void 0:i.detail),noBorder:!0}),e("ez-button",{class:"text-edit__icon-check",mode:"icon",iconName:"check",size:"small",onClick:()=>{this.handleSaveEdition()}}),e("ez-button",{class:"text-edit__icon-close",mode:"icon",iconName:"close",size:"small",onClick:()=>{this.handleCancelEdition()}}))}get _element(){return r(this)}};E.style=":host{display:flex;align-items:center;gap:5px}.text-edit__form-input{width:auto;--ez-text-input__input--padding:0px}.text-edit__hidden-value{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}";export{x as classic_search_list,z as ez_classic_search_result_list,f as ez_combo_box_list,w as ez_custom_form_input,y as ez_image_input,k as ez_rich_text,E as ez_text_edit}