@sankhyalabs/ezui 6.1.0-dev.3 → 6.1.0-dev.31

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 (407) hide show
  1. package/dist/cjs/{ApplicationUtils-c9d1205c.js → ApplicationUtils-d45368f4.js} +43 -15
  2. package/dist/cjs/RichToolbarHelper-ea12328f.js +33 -0
  3. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  4. package/dist/cjs/app-globals-08a85285.js +12 -0
  5. package/dist/cjs/{constants-569271bc.js → constants-72b7e05e.js} +0 -2
  6. package/dist/cjs/ez-actions-button.cjs.entry.js +2 -1
  7. package/dist/cjs/ez-alert-list.cjs.entry.js +5 -3
  8. package/dist/cjs/ez-avatar.cjs.entry.js +6 -1
  9. package/dist/cjs/ez-calendar.cjs.entry.js +7 -6
  10. package/dist/cjs/ez-card-item_2.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-chart.cjs.entry.js +3 -18
  12. package/dist/cjs/ez-chip.cjs.entry.js +52 -47
  13. package/dist/cjs/ez-collapsible-box.cjs.entry.js +13 -10
  14. package/dist/cjs/{ez-combo-box-list_3.cjs.entry.js → ez-combo-box-list_4.cjs.entry.js} +290 -4
  15. package/dist/cjs/ez-combo-box.cjs.entry.js +32 -14
  16. package/dist/cjs/ez-date-input.cjs.entry.js +6 -2
  17. package/dist/cjs/ez-date-time-input.cjs.entry.js +6 -2
  18. package/dist/cjs/ez-dialog.cjs.entry.js +8 -6
  19. package/dist/cjs/ez-double-list.cjs.entry.js +12 -4
  20. package/dist/cjs/ez-empty-card.cjs.entry.js +34 -0
  21. package/dist/cjs/ez-file-item.cjs.entry.js +9 -6
  22. package/dist/cjs/ez-filter-input.cjs.entry.js +129 -0
  23. package/dist/cjs/ez-form-view.cjs.entry.js +12 -4
  24. package/dist/cjs/ez-form.cjs.entry.js +7 -5
  25. package/dist/cjs/ez-grid.cjs.entry.js +169 -133
  26. package/dist/cjs/ez-guide-navigator.cjs.entry.js +5 -1
  27. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-link-builder_6.cjs.entry.js +315 -0
  29. package/dist/cjs/ez-list.cjs.entry.js +4 -2
  30. package/dist/cjs/ez-modal-container.cjs.entry.js +6 -2
  31. package/dist/cjs/ez-modal.cjs.entry.js +5 -1
  32. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +9 -5
  33. package/dist/cjs/ez-number-input.cjs.entry.js +5 -1
  34. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +5 -0
  35. package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +27 -0
  36. package/dist/cjs/ez-search-plus.cjs.entry.js +18 -9
  37. package/dist/cjs/ez-search-result-list.cjs.entry.js +24 -7
  38. package/dist/cjs/ez-search.cjs.entry.js +8 -9
  39. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +5 -7
  40. package/dist/cjs/ez-skeleton.cjs.entry.js +5 -3
  41. package/dist/cjs/ez-sortable-list.cjs.entry.js +12 -5
  42. package/dist/cjs/ez-split-button.cjs.entry.js +5 -4
  43. package/dist/cjs/ez-split-item.cjs.entry.js +6 -2
  44. package/dist/cjs/ez-tag.cjs.entry.js +38 -0
  45. package/dist/cjs/ez-text-area.cjs.entry.js +34 -27
  46. package/dist/cjs/ez-text-input.cjs.entry.js +2 -1
  47. package/dist/cjs/ez-tile-medium.cjs.entry.js +79 -0
  48. package/dist/cjs/ez-tile.cjs.entry.js +62 -0
  49. package/dist/cjs/ez-time-input.cjs.entry.js +12 -10
  50. package/dist/cjs/{ez-filter-input_2.cjs.entry.js → ez-tooltip.cjs.entry.js} +1 -123
  51. package/dist/cjs/ez-tree.cjs.entry.js +12 -1
  52. package/dist/cjs/ez-underface.cjs.entry.js +35 -0
  53. package/dist/cjs/ez-upload.cjs.entry.js +17 -11
  54. package/dist/cjs/ezui.cjs.js +5 -1
  55. package/dist/cjs/filter-column.cjs.entry.js +8 -4
  56. package/dist/cjs/index-040deae3.js +3684 -0
  57. package/dist/cjs/index-a7b0c73d.js +48 -16
  58. package/dist/cjs/loader.cjs.js +5 -1
  59. package/dist/cjs/purify-0bd8a150.js +1359 -0
  60. package/dist/cjs/{search-column-27d1f72f.js → search-column-de15f22d.js} +11 -9
  61. package/dist/collection/collection-manifest.json +45 -1
  62. package/dist/collection/components/ez-alert-list/ez-alert-list.js +5 -3
  63. package/dist/collection/components/ez-avatar/ez-avatar.js +5 -1
  64. package/dist/collection/components/ez-calendar/ez-calendar.js +7 -6
  65. package/dist/collection/components/ez-chip/ez-chip.css +102 -83
  66. package/dist/collection/components/ez-chip/ez-chip.js +177 -53
  67. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -9
  68. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +7 -4
  69. package/dist/collection/components/ez-combo-box/ez-combo-box.js +50 -15
  70. package/dist/collection/components/ez-date-input/ez-date-input.js +6 -2
  71. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +6 -2
  72. package/dist/collection/components/ez-dialog/ez-dialog.js +8 -6
  73. package/dist/collection/components/ez-double-list/ez-double-list.js +12 -4
  74. package/dist/collection/components/ez-empty-card/ez-empty-card.css +55 -0
  75. package/dist/collection/components/ez-empty-card/ez-empty-card.js +91 -0
  76. package/dist/collection/components/ez-file-item/ez-file-item.js +9 -6
  77. package/dist/collection/components/ez-form/ez-form.js +6 -4
  78. package/dist/collection/components/ez-form-view/ez-form-view.js +4 -3
  79. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +5 -2
  80. package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js +4 -0
  81. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +38 -11
  82. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +14 -4
  83. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +3 -1
  84. package/dist/collection/components/ez-grid/controller/ag-grid/utils/buildLocaleText.js +67 -0
  85. package/dist/collection/components/ez-grid/ez-grid.js +17 -15
  86. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +7 -3
  87. package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +2 -2
  88. package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js +11 -7
  89. package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +5 -1
  90. package/dist/collection/components/ez-icon/ez-icon.css +147 -140
  91. package/dist/collection/components/ez-list/ez-list.js +4 -2
  92. package/dist/collection/components/ez-modal/ez-modal.js +5 -1
  93. package/dist/collection/components/ez-modal-container/ez-modal-container.css +2 -0
  94. package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -1
  95. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +9 -5
  96. package/dist/collection/components/ez-number-input/ez-number-input.js +5 -1
  97. package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +6 -0
  98. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +3 -2
  99. package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.css +22 -0
  100. package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.js +135 -0
  101. package/dist/collection/components/ez-rich-text/ez-rich-text.css +30 -0
  102. package/dist/collection/components/ez-rich-text/ez-rich-text.js +575 -0
  103. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.js +27 -0
  104. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.css +4 -0
  105. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.js +23 -0
  106. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.css +4 -0
  107. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.js +23 -0
  108. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.css +20 -0
  109. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.js +122 -0
  110. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.css +4 -0
  111. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.js +23 -0
  112. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.css +42 -0
  113. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.js +187 -0
  114. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.css +70 -0
  115. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.js +220 -0
  116. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.js +1 -0
  117. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.js +14 -0
  118. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.js +10 -0
  119. package/dist/collection/components/ez-search/ez-search.js +7 -8
  120. package/dist/collection/components/ez-search-plus/ez-search-plus.css +2 -0
  121. package/dist/collection/components/ez-search-plus/ez-search-plus.js +16 -7
  122. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +27 -7
  123. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js +5 -2
  124. package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js +0 -1
  125. package/dist/collection/components/ez-skeleton/ez-skeleton.js +4 -2
  126. package/dist/collection/components/ez-sortable-list/ez-sortable-list.js +15 -11
  127. package/dist/collection/components/ez-split-button/ez-split-button.js +6 -6
  128. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +5 -1
  129. package/dist/collection/components/ez-tag/ez-tag.css +105 -0
  130. package/dist/collection/components/ez-tag/ez-tag.js +112 -0
  131. package/dist/collection/components/ez-text-area/ez-text-area.css +244 -212
  132. package/dist/collection/components/ez-text-area/ez-text-area.js +35 -28
  133. package/dist/collection/components/ez-text-edit/ez-text-edit.js +5 -1
  134. package/dist/collection/components/ez-text-input/ez-text-input.js +2 -1
  135. package/dist/collection/components/ez-tile/ez-tile.css +151 -0
  136. package/dist/collection/components/ez-tile/ez-tile.js +269 -0
  137. package/dist/collection/components/ez-tile-medium/ez-tile-medium.css +183 -0
  138. package/dist/collection/components/ez-tile-medium/ez-tile-medium.js +353 -0
  139. package/dist/collection/components/ez-time-input/ez-time-input.js +12 -10
  140. package/dist/collection/components/ez-tooltip/ez-tooltip.js +1 -1
  141. package/dist/collection/components/ez-tree/ez-tree.js +5 -1
  142. package/dist/collection/components/ez-tree/types/Tree.js +7 -0
  143. package/dist/collection/components/ez-underface/ez-underface.css +51 -0
  144. package/dist/collection/components/ez-underface/ez-underface.js +109 -0
  145. package/dist/collection/components/ez-upload/ez-upload.js +18 -12
  146. package/dist/collection/global/app-init.js +6 -0
  147. package/dist/collection/setupTests.js +1 -1
  148. package/dist/collection/utils/ApplicationUtils.js +43 -15
  149. package/dist/collection/utils/constants.js +0 -1
  150. package/dist/collection/utils/i18n/elanguages.js +6 -0
  151. package/dist/collection/utils/i18n/i18nUtils.js +20 -0
  152. package/dist/collection/utils/i18n/index.js +30 -0
  153. package/dist/collection/utils/i18n/locales/en-us.js +279 -0
  154. package/dist/collection/utils/i18n/locales/es-es.js +279 -0
  155. package/dist/collection/utils/i18n/locales/pt-br.js +279 -0
  156. package/dist/collection/utils/i18n/translations.js +9 -0
  157. package/dist/collection/utils/index.js +1 -1
  158. package/dist/collection/utils/searchColumn/search-column.js +0 -2
  159. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +8 -2
  160. package/dist/custom-elements/index.d.ts +78 -0
  161. package/dist/custom-elements/index.js +6689 -576
  162. package/dist/esm/{ApplicationUtils-eaf91331.js → ApplicationUtils-391ebb4f.js} +43 -15
  163. package/dist/esm/RichToolbarHelper-f3a149c4.js +29 -0
  164. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  165. package/dist/esm/app-globals-2394c55a.js +10 -0
  166. package/dist/esm/{constants-b036528f.js → constants-3fabe81e.js} +1 -2
  167. package/dist/esm/ez-actions-button.entry.js +2 -1
  168. package/dist/esm/ez-alert-list.entry.js +5 -3
  169. package/dist/esm/ez-avatar.entry.js +6 -1
  170. package/dist/esm/ez-calendar.entry.js +7 -6
  171. package/dist/esm/ez-card-item_2.entry.js +1 -1
  172. package/dist/esm/ez-chart.entry.js +1 -16
  173. package/dist/esm/ez-chip.entry.js +52 -47
  174. package/dist/esm/ez-collapsible-box.entry.js +13 -10
  175. package/dist/esm/{ez-combo-box-list_3.entry.js → ez-combo-box-list_4.entry.js} +291 -6
  176. package/dist/esm/ez-combo-box.entry.js +32 -14
  177. package/dist/esm/ez-date-input.entry.js +6 -2
  178. package/dist/esm/ez-date-time-input.entry.js +6 -2
  179. package/dist/esm/ez-dialog.entry.js +8 -6
  180. package/dist/esm/ez-double-list.entry.js +12 -4
  181. package/dist/esm/ez-empty-card.entry.js +30 -0
  182. package/dist/esm/ez-file-item.entry.js +9 -6
  183. package/dist/esm/ez-filter-input.entry.js +125 -0
  184. package/dist/esm/ez-form-view.entry.js +12 -4
  185. package/dist/esm/ez-form.entry.js +7 -5
  186. package/dist/esm/ez-grid.entry.js +151 -115
  187. package/dist/esm/ez-guide-navigator.entry.js +5 -1
  188. package/dist/esm/ez-icon.entry.js +1 -1
  189. package/dist/esm/ez-link-builder_6.entry.js +306 -0
  190. package/dist/esm/ez-list.entry.js +4 -2
  191. package/dist/esm/ez-modal-container.entry.js +6 -2
  192. package/dist/esm/ez-modal.entry.js +5 -1
  193. package/dist/esm/ez-multi-selection-list.entry.js +9 -5
  194. package/dist/esm/ez-number-input.entry.js +5 -1
  195. package/dist/esm/ez-popover-plus_3.entry.js +6 -1
  196. package/dist/esm/ez-rich-toolbar-item.entry.js +23 -0
  197. package/dist/esm/ez-search-plus.entry.js +18 -9
  198. package/dist/esm/ez-search-result-list.entry.js +24 -7
  199. package/dist/esm/ez-search.entry.js +8 -9
  200. package/dist/esm/ez-sidebar-navigator.entry.js +5 -7
  201. package/dist/esm/ez-skeleton.entry.js +5 -3
  202. package/dist/esm/ez-sortable-list.entry.js +12 -5
  203. package/dist/esm/ez-split-button.entry.js +5 -4
  204. package/dist/esm/ez-split-item.entry.js +6 -2
  205. package/dist/esm/ez-tag.entry.js +34 -0
  206. package/dist/esm/ez-text-area.entry.js +34 -27
  207. package/dist/esm/ez-text-input.entry.js +2 -1
  208. package/dist/esm/ez-tile-medium.entry.js +75 -0
  209. package/dist/esm/ez-tile.entry.js +58 -0
  210. package/dist/esm/ez-time-input.entry.js +12 -10
  211. package/dist/esm/{ez-filter-input_2.entry.js → ez-tooltip.entry.js} +3 -124
  212. package/dist/esm/ez-tree.entry.js +12 -1
  213. package/dist/esm/ez-underface.entry.js +31 -0
  214. package/dist/esm/ez-upload.entry.js +17 -11
  215. package/dist/esm/ezui.js +5 -1
  216. package/dist/esm/filter-column.entry.js +8 -4
  217. package/dist/esm/index-76eedf30.js +3681 -0
  218. package/dist/esm/index-baa5e267.js +48 -16
  219. package/dist/esm/loader.js +5 -1
  220. package/dist/esm/purify-34e6ff6f.js +1357 -0
  221. package/dist/esm/{search-column-e609d513.js → search-column-661e2324.js} +10 -6
  222. package/dist/ezui/ezui.esm.js +1 -1
  223. package/dist/ezui/p-0759b307.entry.js +1 -0
  224. package/dist/ezui/p-085f83e2.entry.js +1 -0
  225. package/dist/ezui/p-103f5cdd.entry.js +7 -0
  226. package/dist/ezui/p-112455b1.js +1 -0
  227. package/dist/ezui/p-125275fa.entry.js +1 -0
  228. package/dist/ezui/p-18f6793e.entry.js +1 -0
  229. package/dist/ezui/p-199a1a34.entry.js +1 -0
  230. package/dist/ezui/p-1acc6061.entry.js +1 -0
  231. package/dist/ezui/p-20c024f7.entry.js +1 -0
  232. package/dist/ezui/p-21b252e4.entry.js +1 -0
  233. package/dist/ezui/p-287329d1.entry.js +1 -0
  234. package/dist/ezui/p-37076ba1.js +1 -0
  235. package/dist/ezui/p-3e7351ee.entry.js +1 -0
  236. package/dist/ezui/p-3e767a74.js +1 -0
  237. package/dist/ezui/p-4a6f4a80.entry.js +1 -0
  238. package/dist/ezui/p-53bc30a1.entry.js +1 -0
  239. package/dist/ezui/{p-4c01e506.entry.js → p-54a346fc.entry.js} +46 -46
  240. package/dist/ezui/p-603ef267.entry.js +1 -0
  241. package/dist/ezui/p-6369a0cd.entry.js +1 -0
  242. package/dist/ezui/p-689a2ab3.entry.js +1 -0
  243. package/dist/ezui/p-6a5c9445.entry.js +1 -0
  244. package/dist/ezui/p-6b71a749.entry.js +1 -0
  245. package/dist/ezui/p-6d596a5a.entry.js +1 -0
  246. package/dist/ezui/p-6fd4535f.entry.js +1 -0
  247. package/dist/ezui/p-75bf01eb.entry.js +1 -0
  248. package/dist/ezui/p-79044c3e.entry.js +1 -0
  249. package/dist/ezui/p-80461324.entry.js +1 -0
  250. package/dist/ezui/p-871777a5.entry.js +1 -0
  251. package/dist/ezui/{p-69937816.entry.js → p-8afb6e8a.entry.js} +1 -1
  252. package/dist/ezui/p-8ee9f175.entry.js +1 -0
  253. package/dist/ezui/p-91c9d50e.entry.js +1 -0
  254. package/dist/ezui/p-93e1c917.entry.js +1 -0
  255. package/dist/ezui/p-9fedd404.js +1 -0
  256. package/dist/ezui/p-a3ada561.entry.js +1 -0
  257. package/dist/ezui/p-a3b18ddc.entry.js +1 -0
  258. package/dist/ezui/p-b1e45320.js +1 -0
  259. package/dist/ezui/p-b31dc417.js +1 -0
  260. package/dist/ezui/p-b9c271a0.entry.js +1 -0
  261. package/dist/ezui/p-bc8d5a6a.entry.js +1 -0
  262. package/dist/ezui/p-bdacdc6d.entry.js +1 -0
  263. package/dist/ezui/p-c441a6b9.entry.js +1 -0
  264. package/dist/ezui/p-cbf1a296.entry.js +1 -0
  265. package/dist/ezui/p-d1efd7b7.entry.js +1 -0
  266. package/dist/ezui/p-d2364956.js +3 -0
  267. package/dist/ezui/p-d2645bdf.entry.js +1 -0
  268. package/dist/ezui/p-d3dc8595.entry.js +1 -0
  269. package/dist/ezui/p-d5fb569d.entry.js +1 -0
  270. package/dist/ezui/p-d63703ef.entry.js +1 -0
  271. package/dist/ezui/p-d8cc640d.entry.js +1 -0
  272. package/dist/ezui/p-dd5afff2.entry.js +1 -0
  273. package/dist/ezui/p-e7a7c594.entry.js +1 -0
  274. package/dist/ezui/p-e7cd9e9b.entry.js +1 -0
  275. package/dist/ezui/p-ec4c70a6.entry.js +1 -0
  276. package/dist/ezui/p-f45cda60.entry.js +1 -0
  277. package/dist/ezui/p-f84b784b.js +1 -0
  278. package/dist/ezui/p-fcb3e6be.entry.js +1 -0
  279. package/dist/ezui/p-fcdc7d0b.entry.js +1 -0
  280. package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +2 -1
  281. package/dist/types/components/ez-avatar/ez-avatar.d.ts +2 -0
  282. package/dist/types/components/ez-calendar/ez-calendar.d.ts +2 -3
  283. package/dist/types/components/ez-chip/ez-chip.d.ts +36 -6
  284. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +2 -0
  285. package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +2 -0
  286. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +9 -2
  287. package/dist/types/components/ez-date-input/ez-date-input.d.ts +2 -0
  288. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +2 -0
  289. package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -2
  290. package/dist/types/components/ez-double-list/ez-double-list.d.ts +2 -0
  291. package/dist/types/components/ez-empty-card/ez-empty-card.d.ts +18 -0
  292. package/dist/types/components/ez-file-item/ez-file-item.d.ts +2 -0
  293. package/dist/types/components/ez-form/ez-form.d.ts +1 -0
  294. package/dist/types/components/ez-form-view/fieldbuilder/templates/RichText.tpl.d.ts +2 -0
  295. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +5 -0
  296. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
  297. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
  298. package/dist/types/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.d.ts +1 -1
  299. package/dist/types/components/ez-grid/controller/ag-grid/utils/buildLocaleText.d.ts +66 -0
  300. package/dist/types/components/ez-grid/ez-grid.d.ts +2 -2
  301. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +2 -0
  302. package/dist/types/components/ez-grid/subcomponents/selection-counter.d.ts +2 -0
  303. package/dist/types/components/ez-grid/subcomponents/utils/selectionCounterUtils.d.ts +2 -2
  304. package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +2 -0
  305. package/dist/types/components/ez-list/ez-list.d.ts +2 -1
  306. package/dist/types/components/ez-modal/ez-modal.d.ts +2 -0
  307. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
  308. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +2 -0
  309. package/dist/types/components/ez-number-input/ez-number-input.d.ts +2 -0
  310. package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +1 -0
  311. package/dist/types/components/ez-rich-text/ez-link-builder/ez-link-builder.d.ts +19 -0
  312. package/dist/types/components/ez-rich-text/ez-rich-text.d.ts +105 -0
  313. package/dist/types/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.d.ts +31 -0
  314. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.d.ts +5 -0
  315. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.d.ts +5 -0
  316. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.d.ts +11 -0
  317. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.d.ts +5 -0
  318. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.d.ts +35 -0
  319. package/dist/types/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.d.ts +39 -0
  320. package/dist/types/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.d.ts +1 -0
  321. package/dist/types/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.d.ts +1 -0
  322. package/dist/types/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.d.ts +1 -0
  323. package/dist/types/components/ez-search/ez-search.d.ts +2 -3
  324. package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +4 -1
  325. package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +4 -1
  326. package/dist/types/components/ez-sidebar-navigator/ez-sidebar-navigator.d.ts +2 -0
  327. package/dist/types/components/ez-skeleton/ez-skeleton.constants.d.ts +0 -1
  328. package/dist/types/components/ez-skeleton/ez-skeleton.d.ts +2 -1
  329. package/dist/types/components/ez-sortable-list/ez-sortable-list.d.ts +2 -0
  330. package/dist/types/components/ez-split-button/ez-split-button.d.ts +2 -2
  331. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +2 -0
  332. package/dist/types/components/ez-tag/ez-tag.d.ts +23 -0
  333. package/dist/types/components/ez-text-area/ez-text-area.d.ts +6 -3
  334. package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +2 -0
  335. package/dist/types/components/ez-tile/ez-tile.d.ts +58 -0
  336. package/dist/types/components/ez-tile-medium/ez-tile-medium.d.ts +98 -0
  337. package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -1
  338. package/dist/types/components/ez-tree/ez-tree.d.ts +2 -0
  339. package/dist/types/components/ez-tree/types/Tree.d.ts +1 -0
  340. package/dist/types/components/ez-underface/ez-underface.d.ts +23 -0
  341. package/dist/types/components/ez-upload/ez-upload.d.ts +3 -1
  342. package/dist/types/components.d.ts +758 -2
  343. package/dist/types/global/app-init.d.ts +1 -0
  344. package/dist/types/utils/ApplicationUtils.d.ts +3 -1
  345. package/dist/types/utils/constants.d.ts +0 -1
  346. package/dist/types/utils/i18n/elanguages.d.ts +5 -0
  347. package/dist/types/utils/i18n/i18nUtils.d.ts +2 -0
  348. package/dist/types/utils/i18n/index.d.ts +5 -0
  349. package/dist/types/utils/i18n/locales/en-us.d.ts +280 -0
  350. package/dist/types/utils/i18n/locales/es-es.d.ts +280 -0
  351. package/dist/types/utils/i18n/locales/pt-br.d.ts +280 -0
  352. package/dist/types/utils/i18n/translations.d.ts +840 -0
  353. package/dist/types/utils/index.d.ts +1 -1
  354. package/dist/types/utils/searchColumn/search-column.d.ts +0 -2
  355. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -0
  356. package/package.json +9 -2
  357. package/react/components.d.ts +13 -0
  358. package/react/components.js +13 -0
  359. package/react/components.js.map +1 -1
  360. package/dist/assets/actions-sprite.svg +0 -257
  361. package/dist/collection/components/assets/actions-sprite.svg +0 -257
  362. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +0 -75
  363. package/dist/collection/components/ez-sidebar-navigator/messages/constants.js +0 -5
  364. package/dist/ezui/p-0306dff7.entry.js +0 -1
  365. package/dist/ezui/p-07894c4a.entry.js +0 -1
  366. package/dist/ezui/p-09de35a2.entry.js +0 -1
  367. package/dist/ezui/p-0d9856a4.entry.js +0 -1
  368. package/dist/ezui/p-1276ef79.entry.js +0 -1
  369. package/dist/ezui/p-1eb34cad.entry.js +0 -1
  370. package/dist/ezui/p-2187f86c.js +0 -1
  371. package/dist/ezui/p-26685c50.entry.js +0 -1
  372. package/dist/ezui/p-2b42abbb.entry.js +0 -1
  373. package/dist/ezui/p-2b4df33d.entry.js +0 -1
  374. package/dist/ezui/p-33326ac5.entry.js +0 -1
  375. package/dist/ezui/p-35115d5d.entry.js +0 -1
  376. package/dist/ezui/p-3ba9565c.entry.js +0 -1
  377. package/dist/ezui/p-496f7832.entry.js +0 -1
  378. package/dist/ezui/p-4b67138e.entry.js +0 -1
  379. package/dist/ezui/p-4bd6dd6a.entry.js +0 -1
  380. package/dist/ezui/p-555c9018.entry.js +0 -1
  381. package/dist/ezui/p-57363cfd.entry.js +0 -1
  382. package/dist/ezui/p-58f69d24.entry.js +0 -1
  383. package/dist/ezui/p-59561756.entry.js +0 -7
  384. package/dist/ezui/p-5eea9886.js +0 -1
  385. package/dist/ezui/p-61d3a77b.entry.js +0 -1
  386. package/dist/ezui/p-63cb493e.entry.js +0 -1
  387. package/dist/ezui/p-6e429cff.entry.js +0 -1
  388. package/dist/ezui/p-7019f782.entry.js +0 -1
  389. package/dist/ezui/p-77a4bd35.entry.js +0 -1
  390. package/dist/ezui/p-7ab19270.entry.js +0 -1
  391. package/dist/ezui/p-7eae6986.entry.js +0 -1
  392. package/dist/ezui/p-9478b13b.entry.js +0 -1
  393. package/dist/ezui/p-9567b31a.entry.js +0 -1
  394. package/dist/ezui/p-998afb6a.entry.js +0 -1
  395. package/dist/ezui/p-a148e994.entry.js +0 -1
  396. package/dist/ezui/p-a3bf8cf1.entry.js +0 -1
  397. package/dist/ezui/p-bac0f920.entry.js +0 -1
  398. package/dist/ezui/p-bff24a7b.js +0 -1
  399. package/dist/ezui/p-cb75eb46.entry.js +0 -1
  400. package/dist/ezui/p-d47dabdf.entry.js +0 -1
  401. package/dist/ezui/p-da1b4a38.entry.js +0 -1
  402. package/dist/ezui/p-dc73e1fe.entry.js +0 -1
  403. package/dist/ezui/p-e06a9886.entry.js +0 -1
  404. package/dist/ezui/p-e4528470.entry.js +0 -1
  405. package/dist/ezui/p-e6a9041d.entry.js +0 -1
  406. package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +0 -2
  407. package/dist/types/components/ez-sidebar-navigator/messages/constants.d.ts +0 -5
@@ -0,0 +1 @@
1
+ import{r,h as e,H as o,g as a}from"./p-23a36bb6.js";import{ElementIDUtils as c}from"@sankhyalabs/core";const n=class{constructor(e){r(this,e),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 r=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 e(o,{style:r},e("div",{ref:r=>this._container=r,class:`underface_container ${this.color}`},e("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}
@@ -0,0 +1 @@
1
+ import{r as l,c as i,h as o,g as e}from"./p-23a36bb6.js";import{ElementIDUtils as t}from"@sankhyalabs/core";import{A as s}from"./p-9fedd404.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as a}from"./p-b31dc417.js";import"./p-30ffb9ed.js";const r=class{constructor(o){l(this,o),this.ezChange=i(this,"ezChange",7),this.ezRemove=i(this,"ezRemove",7),this.ezSaveEditLabel=i(this,"ezSaveEditLabel",7),this.ezEditLabelMode=i(this,"ezEditLabelMode",7),this._activeEditText=!1,this.value=!1,this.boxBordered=!1,this.label=void 0,this.subtitle=void 0,this.headerSize="small",this.iconPlacement="left",this.headerAlign="left",this.removable=!1,this.editable=!1,this.conditionalSave=void 0}async showHide(){this.value=!this.value}async applyFocusTextEdit(){var l;null===(l=this._refTextEdit)||void 0===l||l.applyFocusSelect()}async cancelEdition(){this._activeEditText=!1,this.ezEditLabelMode.emit(this._activeEditText)}observeCollapsedValue(){this.ezChange.emit(this.value)}getHeaderSize(){const l=this.headerSize&&this.headerSize.toLowerCase(),i=["xsmall","xlarge"].includes(l)?l.replace("x","x-"):l;return["x-small","small","medium","large","x-large"].includes(i)?i:"small"}removeElement(){this._hostElement&&this._hostElement.remove(),this.ezRemove.emit(this)}editLabel(l){l.preventDefault(),l.stopPropagation(),this._activeEditText=!0,this.ezEditLabelMode.emit(this._activeEditText)}async confirmRemove(l){l.stopPropagation();const i=this.i18n("ez-collapsible-box.confirmRemove",{label:this.label});await s.confirm(this.i18n("app.warning"),i)&&this.removeElement()}saveEditionText(l){const{value:i,newValue:o}=l.detail;if(i===o)return void this.cancelEdition();let e=!0;this.conditionalSave&&(e=this.conditionalSave(o)),this.label!==o&&e&&(this.label=o,this._activeEditText=!1,this.ezSaveEditLabel.emit(l.detail),this.ezEditLabelMode.emit(this._activeEditText))}getStyledLabel(){if(null!=this._refLabel)return{fontSize:window.getComputedStyle(this._refLabel).getPropertyValue("font-size"),fontWeight:window.getComputedStyle(this._refLabel).getPropertyValue("font-weight"),fontFamily:window.getComputedStyle(this._refLabel).getPropertyValue("font-family")}}async componentWillLoad(){this.i18n=await a()}componentDidLoad(){t.addIDInfo(this._hostElement)}render(){return o("div",{class:`collapsible-box ${this.boxBordered&&"collapsable-box--bordered"}`},o("div",{class:"collapsible-box__header"},o("button",Object.assign({},this._activeEditText?null:{onClick:()=>{this.showHide()}},{class:"collapsible-box__title collapsible-box__title--"+(this.headerAlign||"left")+("right"===this.iconPlacement?" collapsible-box__title--icon-right":"")+(this.value?" collapsible-box__title--no-margin":"")}),o("ez-icon",{slot:"icon","icon-name":"chevron-right",size:this.getHeaderSize(),class:"collapsible-box__icon collapsible-box__icon--"+this.getHeaderSize()+(this.value?" collapsible-box__icon--collapsed":""),id:"toggleCollapsible"}),this._activeEditText?o("ez-text-edit",{class:"collapsible-box__text-edit",ref:l=>this._refTextEdit=l,value:this.label,styled:this.getStyledLabel(),onSaveEdition:l=>this.saveEditionText(l),onCancelEdition:()=>this.cancelEdition()}):o("label",{class:"collapsible-box__label font--"+this.getHeaderSize(),title:this.label,ref:l=>this._refLabel=l},o("span",null,this.label),this.editable&&o("ez-icon",{slot:"icon","icon-name":"edit",onClick:l=>this.editLabel(l),title:this.i18n("app.edit")}),this.removable&&o("ez-icon",{slot:"icon","icon-name":"delete",onClick:l=>this.confirmRemove(l),title:this.i18n("app.remove")}))),o("slot",{name:"rightSlot"})),o("div",{class:"collapsible-box__content"+(this.value?"":" collapsible-box__content--show")},this.subtitle&&o("div",{class:"subtitle-box__content"},o("label",{class:"subtitle-box__label",title:this.subtitle},o("span",null,this.subtitle))),o("slot",null)))}get _hostElement(){return e(this)}static get watchers(){return{value:["observeCollapsedValue"]}}};r.style=":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%;overflow:hidden}.collapsable-box--bordered{border:var(--border--small);border-color:var(--color--strokes);border-radius:var(--border--radius-medium);padding:var(--space--xs)}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:100%;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:2s all ease-in-out}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";export{r as ez_collapsible_box}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as a,H as r,g as o}from"./p-23a36bb6.js";import{ElementIDUtils as i}from"@sankhyalabs/core";const l=class{constructor(a){t(this,a),this.ezChange=e(this,"ezChange",7),this.LINE_HEIGHT=24,this.HEIGHT_RATIO=1.4,this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.rows=4,this.canShowError=!0,this.mode="regular",this.enableResize=!0,this.autoRows=!1,this.autoFocus=!1,this.alternativePlaceholder=void 0,this.forceLabelFloat=!1}observeErrorMessage(){var t,e,a,r;"string"==typeof this.errorMessage&&""!==this.errorMessage?(null===(t=this._container)||void 0===t||t.classList.add("hasError"),null===(e=this._messageBoxElem)||void 0===e||e.classList.add("hasError")):(null===(a=this._container)||void 0===a||a.classList.remove("hasError"),null===(r=this._messageBoxElem)||void 0===r||r.classList.remove("hasError"))}observeValue(t,e){this._inputElem&&t!=e&&(this.canChangeValue()&&(this._inputElem.value=this.value||""),this.adjustFloatingLabel(),this.errorMessage="",this.ezChange.emit(this.value))}observeMode(){null==this._initialRows&&(this._initialRows=this.rows>0?this.rows:void 0);const t=this._initialRows>0?this._initialRows:"slim"!=this.mode?4:2;t!==this.rows&&(this.rows=t)}observeRows(){const t=this.rows>0?this.rows:"slim"!=this.mode?4:2;t!==this.rows&&this.updateRows(t)}observeAutoRows(){var t,e;this.autoRows?(null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this.initializeResizeObserver()):null===(e=this._resizeObserver)||void 0===e||e.disconnect()}observeAlternativePlaceholder(t){this.forceLabelFloat=!!t}async appendTextToSelection(t){var e,a,r,o;const i=this._inputElem.selectionStart,l=this._inputElem.selectionEnd,s=null!==(a=null===(e=this.value)||void 0===e?void 0:e.substring(0,i))&&void 0!==a?a:"",n=null!==(o=null===(r=this.value)||void 0===r?void 0:r.substring(l))&&void 0!==o?o:"";this.value=`${s}${t}${n}`;const c=i+t.length;this._inputElem.setSelectionRange(i===l?c:i,c),await this.setFocus()}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}canChangeValue(){return this._inputElem&&(this.value||"")!==this._inputElem.value}adjustFloatingLabel(){if(!this.forceLabelFloat&&this.label&&this._labelElem){const t=this.value&&this.value.toString().length>0,e=this._labelElem.classList.contains("textarea__label--floated");t||this.isFocused()?e||this._labelElem.classList.add("textarea__label--floated"):e&&this._labelElem.classList.remove("textarea__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}updateRows(t){this.rows=t,this._initialRows=t}calculateMaxRows(){const t=this._hostElement.parentElement;if(!t)return;const e=Math.max((null==t?void 0:t.clientHeight)||0,this.LINE_HEIGHT);if(e>0){const t=Math.floor(e/this.LINE_HEIGHT*this.HEIGHT_RATIO);t!==this.rows&&this.updateRows(t)}}initializeResizeObserver(){if(!this.autoRows)return;const t=this._hostElement.parentElement;if(t){try{null!=this._resizeObserver&&this._resizeObserver.unobserve(t),this._resizeObserver=new ResizeObserver(this.calculateMaxRows.bind(this)),this._resizeObserver.observe(t)}catch(t){console.warn(t)}this.calculateMaxRows()}}handleFocusout(){this.adjustFloatingLabel(),this._container&&this._container.classList.contains("textarea--focus")&&this._container.classList.remove("textarea--focus")}handleChange(){this.canChangeValue()&&(this.value=this._inputElem.value)}handleFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("textarea__label--floated")&&this._labelElem.classList.add("textarea__label--floated"),this._container&&!this._container.classList.contains("textarea--focus")&&this._container.classList.add("textarea--focus")}connectedCallback(){this.initializeResizeObserver()}disconnectedCallback(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect()}buildPlaceholder(){return this.alternativePlaceholder?this.alternativePlaceholder:"slim"===this.mode&&this.label?this.label:""}buildLabelClass(){let t=this.enabled?"textarea__label":"textarea__label textarea__label--disabled";return this.errorMessage&&(t+=" hasError"),this.forceLabelFloat&&(t+=" textarea__label--floated"),t}renderErrorTooltip(){if(this.canShowError&&"slim"!=this.mode&&this.errorMessage)return a("div",{class:"tooltip-container"},a("ez-tooltip",{type:"error",message:this.errorMessage},a("ez-icon",{class:"tooltip-icon "+(this.errorMessage?"hasError":""),"data-element-id":i.getInternalIDInfo("tooltip-icon"),iconName:"alert-circle"})))}renderLabel(){return this.label&&"slim"!=this.mode?a("label",{ref:t=>this._labelElem=t,class:this.buildLabelClass(),onClick:()=>this._inputElem.focus(),title:this.label},this.label):null}renderTextArea(){return a("textarea",{onFocus:()=>this.handleFocus(),"data-element-id":i.getInternalIDInfo("input"),ref:t=>this._inputElem=t,value:this.value,disabled:!this.enabled,class:{"textarea--slim":"slim"===this.mode},placeholder:this.buildPlaceholder(),onInput:()=>this.handleChange(),onFocusout:()=>this.handleFocusout(),rows:this.rows})}componentDidLoad(){this.observeErrorMessage(),this.adjustFloatingLabel(),this.observeMode(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus()}))}render(){return i.addIDInfoIfNotExists(this._hostElement,"input"),a(r,null,a("div",{class:"textarea "+(this.enabled?"":"textarea--disabled"),ref:t=>this._container=t},this.renderLabel(),a("div",{class:"input-container "+(this.enableResize?"textarea--resizable":"")},this.renderTextArea(),this.renderErrorTooltip())))}get _hostElement(){return o(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],mode:["observeMode"],rows:["observeRows"],autoRows:["observeAutoRows"],alternativePlaceholder:["observeAlternativePlaceholder"]}}};l.style=":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #2B3A54);--text-area__input--background-color:var(--background--light, #FFFFFF);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--color--strokes, #DCE0E8);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--background--medium, #F0F3F7);--text-area__input--disabled--color:var(--text--primary, #626E82);--text-area__input--disabled--border--color:var(--color--strokes, #DCE0E8);--text-area__input--error--border-color:var(--color-alert--error-800, #BD0025);--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color-alert--error-800, #BD0025);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;--text-area__scrollbar--color-default:var(--scrollbar--default, #626e82);--text-area__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--text-area__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--text-area__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--text-area__scrollbar--border-radius:var(--border--radius-small, 6px);--text-area__scrollbar--width:var(--space--small, 6px);--ez-text-area__tooltip-icon--spacing:var(--space--large);--ez-text-area__tooltip-icon---width:var(--space--large);--ez-text-area__tooltip-icon---horizontal-margin:var(--space--medium, 12px);--ez-text-area__tooltip-icon---vertical-margin:10px;--ez-text-area__tooltip_icon--error--color:var(--color-alert--error-800, #BD0025);display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{display:flex;flex-direction:column;height:calc(100% - 16px);box-sizing:border-box;border:none;resize:none;width:100%;padding:0;background:none;min-height:42px;font-weight:var(--text-area--font-weight);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);margin-top:calc(var(--space--medium, 12px) + 4px);scrollbar-width:thin;scrollbar-color:var(--text-area__scrollbar--color-clicked) var(--text-area__scrollbar--color-background)}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color);border:var(--text-area__input--disabled--border);cursor:not-allowed}textarea::-webkit-scrollbar{background-color:var(--text-area__scrollbar--color-background);width:var(--text-area__scrollbar--width);max-width:var(--text-area__scrollbar--width);min-width:var(--text-area__scrollbar--width)}textarea::-webkit-scrollbar-thumb{background-color:var(--text-area__scrollbar--color-default);border-radius:var(--text-area__scrollbar--border-radius)}textarea::-webkit-scrollbar-track{background-color:var(--text-area__scrollbar--color-background);border-radius:var(--text-area__scrollbar--border-radius)}textarea::-webkit-scrollbar-thumb:vertical:hover,textarea::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--text-area__scrollbar--color-hover)}textarea::-webkit-scrollbar-thumb:vertical:active,textarea::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--text-area__scrollbar--color-clicked)}.textarea{width:100%;min-height:42px;max-width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--disabled{border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--disabled--border--color);background-color:var(--text-area__input--disabled--background-color);cursor:not-allowed}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color);cursor:not-allowed}.textarea--slim{margin-top:var(--space--small, 6px)}.textarea--slim::-webkit-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-ms-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:disabled::-webkit-input-placeholder,.textarea--slim:disabled:-moz-placeholder,.textarea--slim:disabled::-moz-placeholder,.textarea--slim:disabled:-ms-input-placeholder,.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color);cursor:not-allowed}ez-icon.tooltip-icon.hasError{--ez-icon--color:var(--ez-text-area__tooltip_icon--error--color)}.input-container{display:flex;align-items:center}.textarea--resizable{resize:vertical;overflow:auto;min-height:42px}";export{l as ez_text_area}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e,g as h}from"./p-23a36bb6.js";import{C as r}from"./p-ec7db713.js";import{ObjectUtils as o,StringUtils as a,ElementIDUtils as n}from"@sankhyalabs/core";import{A as l}from"./p-9fedd404.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as c}from"./p-b31dc417.js";import"./p-30ffb9ed.js";import{r as d,a as u}from"./p-40a60148.js";const v=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._showLoadingDescription=!1,this._criteria=void 0,this.value=void 0,this.label=void 0,this.enabled=!0,this.errorMessage=void 0,this.optionLoader=void 0,this.contextProperties=void 0,this.showSelectedValue=!0,this.showOptionValue=!0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!1,this.mode="regular",this.canShowError=!0,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.options=void 0,this.suppressSearch=!1,this.ensureClearButtonVisible=!1,this.suppressPreLoad=!0,this.autoFocus=!1,this.alternativePlaceholder=void 0}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,!(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())&&this.errorMessage&&this.setInputValue())}getValue(t){return"object"==typeof t?null==t?void 0:t.value:t}validateNewValue(t,i){const s=this.getValue(t),e=this.getValue(i);return!("[object Object]"===s||s===e)}async observeValue(t,i){if(this._textInput&&this.validateNewValue(t,i)){if("string"==typeof t)return void await this.handleValueAsString(t);const i=this.getSelectedOption(t),s=this.getSelectedOption(this._currentValue);this.isDifferentValues(s,i)&&(this._currentValue=i,this.setInputValue(),this.ezChange.emit(null!=i?i:void 0)),this.resetOptions()}}observeOptions(t,i){!t.length&&this.suppressPreLoad||(null==t?void 0:t.join(""))!==(null==i?void 0:i.join(""))&&this.loadOptions(p.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.value))}),100)}:t=>t(this.value))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}async handleValueAsString(t){this.getSelectedOption(t)?this.setInputValue():(await this.loadDescriptionValue(t),this._currentValue&&(this.setInputValue(),this.ezChange.emit(this.value),this._currentValue=this.value))}isDifferentValues(t,i){return o.objectToString(t||{})!==o.objectToString(i||{})}getFormattedText(t){if(null==t)return;let i=this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label;return i=null==i?void 0:i.replace(new RegExp(this._startHighlightTag,"g"),"").replace(new RegExp(this._endHighlightTag,"g"),""),i}getText(){const t=this.getSelectedOption(this._currentValue),i=this.getFormattedText(t);return d(i)}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t?Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}):t}updateVisibleOptions(){let t=this._source||[];this._visibleOptions=this.suppressEmptyOption?t:[{value:void 0,label:""}].concat(t),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var t;const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}showOptions(){this.enabled&&(this.isOptionsVisible()||this._ezPopOverPlusElement.showUnder(this._textInput))}hideOptions(){this._ezPopOverPlusElement.hide()}isOptionsVisible(){return this._ezPopOverPlusElement.opened}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,this._showLoadingDescription=!0,t.then((t=>{this.updateSource(t)})).finally((()=>{this._showLoading=!1,this._showLoadingDescription=!1})),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch(!1))):this.selectOption(t))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(t,i=!0){var s,e;const h=this.getSelectedOption(this.value),r=Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}),o=Object.assign(Object.assign({},r),{value:d(null==r?void 0:r.value),label:d(null==r?void 0:r.label)});if((null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(e=null==o?void 0:o.value)||void 0===e?void 0:e.toString())||null==h&&null!=o&&"value"in o){const t=(null==o?void 0:o.value)?o:void 0;this.value=t,this._currentValue=t}else this.setInputValue(),this.resetOptions();this._visibleOptions=[],this.clearSource(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i},this.contextProperties):this.options)}cancelPreselection(){!this._textInput.value&&this._currentValue&&this._source.length>0?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue()}),this._deboucingTime),this.resetOptions()}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null,this._currentValue=null}controlListWithOnlyOne(t=!0){var i,s;const e=null===(i=this._visibleOptions)||void 0===i?void 0:i.filter((t=>""!==t.label&&null!=t.value));if((null==e?void 0:e.length)>0){const i=new RegExp(this._startHighlightTag,"g"),h=new RegExp(this._endHighlightTag,"g");let r=a.decodeHtmlEntities(e[0].label);const o={value:null===(s=e[0].value)||void 0===s?void 0:s.replace(i,"").replace(h,""),label:null==r?void 0:r.replace(i,"").replace(h,"")};this.selectOption(o,t)}}controlEmptySearch(t=!0){var i;(null===(i=this._visibleOptions)||void 0===i?void 0:i.length)?this.controlListWithOnlyOne(t):(this.clearSearch(),l.info(this.i18n("ez-search.emptyList")))}async loadDescriptionValue(t){var i,s;if(null==t)return;if((null===(i=this.options)||void 0===i?void 0:i.length)>0)return void this.loadOptionValue(t);const e={mode:p.PREDICTIVE,argument:t},h=await(null===(s=this.optionLoader)||void 0===s?void 0:s.call(this,e,this.contextProperties));null!=h&&(h instanceof Promise?h.then((t=>{this.setDescriptionValue(t)})):this.setDescriptionValue(h))}setDescriptionValue(t){const i=(null==t?void 0:t[0])||t;null!=i&&Object.keys(i).length?(this._currentValue=i?Object.assign(Object.assign({},i),{value:u(i.value),label:u(i.label)}):i,this.value=this._currentValue,this.setTextInputValue()):this.showNoResultMessage()}setTextInputValue(){if(this._textInput&&null==this._textInput.value){if(null==this.value)return;const t="string"==typeof this.value?this.value:this.getFormattedText(this.value);this._textInput.value=d(t)}}loadOptionValue(t){var i;const s=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===t));null!=s?this.selectOption(s):this.showNoResultMessage()}async showNoResultMessage(){this.clearSearch(),l.info(this.i18n("ez-search.emptySearch",{field:this.getFieldLabel()}))}getFieldLabel(){var t;return null===(t=this.label)||void 0===t?void 0:t.replace(this.i18n("app.requiredInfo"),"").toUpperCase()}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}async handleInitialValue(){if(!this.getValue(this.value))return;if("string"==typeof this.value)return void await this.handleValueAsString(this.value);let t=this.getFormattedText(this.value);t=d(t),this._textInput.value=t}async componentWillLoad(){if(this.i18n=await c(),void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value"),e=t.getAttribute("details");s||(s=i),this.options.push({label:i,value:s,details:e}),t.hidden=!0}))}this.updateSource([])}componentDidRender(){var t;null===(t=this._optionsList)||void 0===t||t.querySelectorAll(".item").forEach((t=>{n.addIDInfoIfNotExists(t,"itemSearch")}))}async componentDidLoad(){this._currentValue=this.value,r.applyVarsTextInput(this.el,this._textInput),this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)}))})),this._intersectionObserver=new IntersectionObserver((t=>{t.forEach((t=>{!t.isIntersecting&&this._ezPopOverPlusElement&&this._ezPopOverPlusElement.hide()}))}),{threshold:.1}),this._textInput&&this._intersectionObserver.observe(this._textInput),await this.handleInitialValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t,i;null===(t=this._resizeObserver)||void 0===t||t.disconnect(),null===(i=this._intersectionObserver)||void 0===i||i.disconnect()}handlerIconClick(){this.loadOptions(p.ADVANCED)}buildNumberArgument(t){return this.isTextSearch?NaN:Number(t||void 0)}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim(),e=this.buildNumberArgument(s);this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this._showLoading=!1,this.clearSource(),this.ignoreLimitCharsToSearch||!isNaN(e)||s.length>=this._limitCharsToSearch?(this._showLoading=!0,this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(p.PREDICTIVE,isNaN(e)?s:e.toString())}),this._deboucingTime),this.showOptions()):this.hideOptions()):(this.hideOptions(),this._showLoading=!1,this.clearSource())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}async keyDownHandler(t){switch(this._tabPressed=!1,t.ctrlKey&&("f"!==t.key&&"F"!==t.key||(this.loadOptions(p.ADVANCED),t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault())),t.key){case"ArrowDown":t.stopPropagation(),this.canShowListOptions()&&t.preventDefault(),this.isOptionsVisible()||this.showOptions(),await this._searchList.nextOption();break;case"ArrowUp":t.stopPropagation(),this.canShowListOptions()&&t.preventDefault(),await this._searchList.previousOption();break;case"Enter":this.handleEventPropagation(t),this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne(!1)}}handleEventPropagation(t){this._ezPopOverPlusElement.opened&&this.stopPropagateEnterKeyEvent&&t.stopPropagation()}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}canShowLoadSpinDescription(){return this._showLoadingDescription&&!this._ezPopOverPlusElement.opened}onChangePreSelection(t){this._preSelection=t}render(){var t;return n.addIDInfoIfNotExists(this.el,"input"),s(e,null,s("ez-text-input",{"data-element-id":n.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,alternativePlaceholder:this.alternativePlaceholder},s("button",{class:"btn",slot:"leftIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},this.canShowLoadSpinDescription()?s("div",{class:"message__loading"}):s("ez-icon",{iconName:"search"})),(null===(t=this._textInput)||void 0===t?void 0:t.value)&&(this._criteria||this.value)||this.ensureClearButtonVisible?s("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},s("ez-icon",{iconName:"close"})):void 0),s("ez-popover-plus",{ref:t=>this._ezPopOverPlusElement=t,autoClose:!1,overlayType:"none",useAnchorSize:!0,anchorElement:[this._textInput,this.el],"data-element-id":this.el.getAttribute("data-element-id")},s("search-list",{ref:t=>this._searchList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this.i18n("ez-search.emptyList"),canShowListOptions:this.canShowListOptions(),value:this.value,showOptionValue:this.showOptionValue,preSelection:this._preSelection,onChangeValue:({detail:t})=>this.selectOption(t),onChangePreSelection:({detail:t})=>this.onChangePreSelection(t)})))}get el(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var p;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(p||(p={})),v.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--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);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)}.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}";export{v as ez_search}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,F as e,H as l}from"./p-23a36bb6.js";import{i as h}from"./p-b31dc417.js";import{ArrayUtils as n}from"@sankhyalabs/core";var o;!function(t){t.DATASOURCE_RESULTS="DATASOURCE_RESULTS",t.DATASOURCE_RESULTS_EMPTY="DATASOURCE_RESULTS_EMPTY",t.DATASOURCE_INIT="DATASOURCE_INIT",t.OPTIONS_EMPTY="OPTIONS_EMPTY",t.OPTIONS="OPTIONS"}(o||(o={}));const a=class{constructor(s){t(this,s),this.changeFilteredOptions=i(this,"changeFilteredOptions",7),this.columnName=void 0,this.dataSource=void 0,this.useOptions=!1,this.options=void 0,this.isTextSearch=!1,this.filteredOptions=void 0,this.displayOptions=void 0,this.viewScenario=void 0,this.displayOptionToCheckAllItems=!0}async componentWillLoad(){this.i18n=await h()}async clearFilteredOptions(){this.setInitialScenario(),this.filteredOptions=[],this.searchInput&&(this.searchInput.value=""),this.filterInput&&(this.filterInput.value="")}onChangeUseOptions(){this.setInitialScenario()}onChangeOptions(){this.options&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.options)),this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.setInitialScenario()}onChangeFilteredOptions(t){this.displayOptions=this.filteredOptions,this.displayOptionToCheckAllItems=this.filteredOptions.length>1,this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.changeFilteredOptions.emit(t)}componentDidRender(){this.changeCheckAllValeuFromFilteredOptions()}ordenationByCheckStateAndAlphabetically(t){const i=[],s=[];let e;return t.forEach((t=>{null==t.value||""===t.label?e=Object.assign(Object.assign({},t),{label:this.i18n("ez-multi-selection-list.empty")}):t.check?i.push(t):s.push(t)})),(null==e?[]:[e]).concat(null==this.dataSource?n.sortAlphabetically(i):this.dataSource.sortItems(this.columnName,i)).concat(null==this.dataSource?n.sortAlphabetically(s):this.dataSource.sortItems(this.columnName,s))}changeCheckAllValeuFromFilteredOptions(){var t,i,s,e;const l=null===(t=this.filteredOptions)||void 0===t?void 0:t.every((t=>!0===t.check)),h=null===(i=this.filteredOptions)||void 0===i?void 0:i.every((t=>!1===t.check)),n=(null===(s=this.filteredOptions)||void 0===s?void 0:s.some((t=>!1===t.check)))&&(null===(e=this.filteredOptions)||void 0===e?void 0:e.some((t=>!0===t.check)))&&(!l||!h);return this.checkInput&&l?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!0)):this.checkInput&&n?(this.checkInput.indeterminate=!0,void(this.checkInput.value=!1)):this.checkInput&&h?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!1)):void 0}setInitialScenario(){if(this.useOptions)return this.viewScenario=o.OPTIONS,void this.changeCheckAllValeuFromFilteredOptions();this.viewScenario=this.options&&this.options.length>0?o.DATASOURCE_RESULTS:o.DATASOURCE_INIT}async searchWithDataSource(t,i){const{argument:s,mode:e}=t;if("PRELOAD"!==e&&i)return this.dataSource.fetchData(s,i)}handleSearchOnDataSource(t){var i;const s=null!==(i=this.filteredOptions)&&void 0!==i?i:[];t.detail&&!s.some((i=>i.value==t.detail.value))&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...s,t.detail])),this.viewScenario=o.DATASOURCE_RESULTS,this.searchInput.value=""}handleRemoveItemFromOptions(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter((i=>i.value!==t.value))),0===this.filteredOptions.length&&(this.viewScenario=o.DATASOURCE_INIT),this.searchInput&&(this.searchInput.value="")}handleSearchOnOption(t){if(t.detail)return this.displayOptions=n.applyStringFilter(t.detail,this.filteredOptions,!0),void(this.viewScenario=0===this.displayOptions.length?o.OPTIONS_EMPTY:o.OPTIONS);this.displayOptions=this.filteredOptions,this.viewScenario=o.OPTIONS}handleChangeSelectAllItems(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...this.filteredOptions.map((i=>(i.check=!!t.detail,i)))])}handleChangeSelectedItem(t){const{detail:i}=t;this.filteredOptions.find((t=>t.label===i.label)).check=i.check}buildViewList(t){return s(e,null,this.displayOptionToCheckAllItems&&s("ez-check",{ref:t=>this.checkInput=t,label:this.i18n("ez-multi-selection-list.selectAll"),class:"multi-selection__select-all",onEzChange:this.handleChangeSelectAllItems.bind(this)}),s("ez-list",{class:"multi-selection__list",dataSource:this.displayOptions,listMode:"check",hoverFeedback:!0,onEzCheckChange:this.handleChangeSelectedItem.bind(this),itemSlotBuilder:t?this.buildDeleteIconSlot.bind(this):null}))}buildDeleteIconSlot(t){return s("ez-icon",{style:{cursor:"pointer"},iconName:"delete",onClick:()=>this.handleRemoveItemFromOptions(t)})}buildInitViewWithDataSource(){return s("multi-selection-box-message",{message:this.i18n("ez-multi-selection-list.initMessage")})}buildViewEmptyResults(){return s("multi-selection-box-message",{message:this.i18n("ez-multi-selection-list.emptyResults")})}scenarioToDisplay(t){const i={[o.DATASOURCE_INIT]:()=>this.buildInitViewWithDataSource(),[o.DATASOURCE_RESULTS]:()=>this.buildViewList(!0),[o.DATASOURCE_RESULTS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS]:()=>this.buildViewList(!1)}[t];return i?i():void 0}render(){return s(l,null,s("div",{class:"multi-selection"},this.useOptions?s("ez-filter-input",{ref:t=>this.filterInput=t,label:this.i18n("ez-multi-selection-list.search"),onEzChange:this.handleSearchOnOption.bind(this)}):s("ez-search",{class:"multi-selection__input",label:this.i18n("ez-multi-selection-list.search"),ref:t=>this.searchInput=t,suppressEmptyOption:!0,showOptionValue:!1,showSelectedValue:!1,optionLoader:t=>this.searchWithDataSource(t,this.columnName),onEzChange:this.handleSearchOnDataSource.bind(this),isTextSearch:this.isTextSearch}),s("ez-scroll",{class:"multi-selection__content-options"},this.scenarioToDisplay(this.viewScenario))))}static get watchers(){return{useOptions:["onChangeUseOptions"],options:["onChangeOptions"],filteredOptions:["onChangeFilteredOptions"]}}};a.style=".sc-ez-multi-selection-list-h{--ez-check--outter-gap:0px;--ez-multi-selection-default-height:322px;display:block;width:304px;height:var(--ez-multi-selection-default-height);min-height:fit-content;max-height:calc(100vh - 350px)}.multi-selection__input.sc-ez-multi-selection-list{margin-bottom:var(--space--2xs, 8px)}.multi-selection__content-options.sc-ez-multi-selection-list{position:relative;left:-4px}.multi-selection__select-all.sc-ez-multi-selection-list{height:var(--space--xl);margin:0 var(--space--small, 6px)}.multi-selection__list.sc-ez-multi-selection-list{max-height:calc(100vh - 435px);overflow-y:auto;overflow-x:clip}.multi-selection__list.sc-ez-multi-selection-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{a as ez_multi_selection_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as s,g as a}from"./p-23a36bb6.js";import{DateUtils as n,ElementIDUtils as o}from"@sankhyalabs/core";import{C as r}from"./p-ec7db713.js";import{i as h}from"./p-b31dc417.js";const l=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.ezStartChange=e(this,"ezStartChange",7),this.ezCancelWaitingChange=e(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.mode="regular",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,e){if(this._textInput&&t!=e){const i=n.validateDate(t),s=n.validateDate(e);if((null==i?void 0:i.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(i)||"";!n.strToDate(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===i?void 0:i)}}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)}changeValue(t){const e=n.validateDate(this.value),i=n.validateDate(t);(null==e?void 0:e.getTime())!==(null==i?void 0:i.getTime())?this.value=i:this._changePending=!1}hideCalendar(){this.changeValue(this._calendar.value),this._popover.hide()}handleBlur(){if(this._changePending)try{const t=this._textInput.value,e=n.strToDate(t);if(e||!t){this.errorMessage="";const t=n.validateDate(this.value),i=n.validateDate(e);(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._focused=!1,this.changeValue(i))}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage=this.i18n("ez-date-input.invalidDate")}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){return t?n.formatDate(t):void 0}handleInput(t){const e=n.strToDate(this._textInput.value),i=n.validateDate(this.value),s=n.validateDate(e);(null==i?void 0:i.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 h()}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}render(){return o.addIDInfoIfNotExists(this._elem,"input"),i(s,null,i("ez-text-input",{"data-element-id":o.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError,alternativePlaceholder:this.alternativePlaceholder},i("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>{var t;return null===(t=this._popover)||void 0===t?void 0:t.showUnder(this._textInput)},slot:"leftIcon"})),i("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")},i("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":o.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()}})))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};l.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-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-date-input__calendar-image);mask-image:var(--ez-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-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{l as ez_date_input}
@@ -0,0 +1 @@
1
+ import{UserInterface as t,Action as s,StringUtils as i,ApplicationContext as e,ObjectUtils as n,WaitingChangeException as a,DataUnitAction as h}from"@sankhyalabs/core";import{A as r}from"./p-9fedd404.js";import{g as o}from"./p-b31dc417.js";import{h as l}from"./p-23a36bb6.js";const c=(s,i)=>{let e,n,{name:a,label:h,group:r}=Object.assign({},i),{readOnly:o,required:l}=Object.assign({},i);return s&&(h=h||s.label,a=a||s.name,l=s.required||(null==i?void 0:i.required),o=s.readOnly||(null==i?void 0:i.readOnly),e=s.properties,n=s.userInterface),{name:a,label:h,group:r,readOnly:o,required:l,props:e,userInterface:n||t.SHORTTEXT}};class d{constructor(t,s,i){this._dataUnit=t,this._validationSource=s,this._validator=i,this._i18n=o()}validate(t=!0){return new Promise(((s,i)=>{const e=this._dataUnit.getModifiedRecords();for(let s=0;s<e.length;s++){const n=e[s],a=[];let h=this.validateRequired(n);if(h&&!h.isValid&&a.push(h),this._validator&&(h=this._validator.validateRecord(n),h&&!h.isValid&&a.push(h)),a.length>0){if(!t&&a[0].invalidFields.length>0){this._validationSource.markAsInvalid(a[0].invalidFields[0],n.__record__id__),i();break}this.processValidationResult(a,n.__record__id__),i();break}}return s()}))}validateRequired(t){const s=this._validationSource.getRequiredFields(),i=[];if(new Set(s).forEach((s=>{const e=t[s];if(null==e||""===e){const e=this._validationSource.getMessageForField(s,t.__record__id__);i.push(e?{name:s,message:e}:{name:s,message:this._i18n("utils.requiredField")})}})),i.length>0)return{isValid:!1,invalidFields:i,infoMessage:this._i18n("utils.requiredFieldMessage")}}processValidationResult(t,s){t.forEach((t=>{const i=t.invalidFields;if(this._dataUnit.savingCanceled(i,s),i&&i.forEach((t=>{this.markAsInvalid(t,s)})),t.infoMessage&&r.info(t.infoMessage),t.errorMessage){const{errorTitle:s,errorMessage:i}=t;r.error(s,i)}}))}markAsInvalid(t,s){this._dataUnit.setInvalidField(t.name,t.message,s),this._validationSource.markAsInvalid(t,s)}}class u{constructor(t){this.onDataUnitEvent=t=>{var i;switch(t.type){case s.MULTIPLE_EDITION_CHANGED:this.clearInvalid(),this.updateAllFieldsValues();break;case s.DATA_LOADED:case s.DATA_SAVED:case s.RECORDS_REMOVED:case s.RECORDS_ADDED:case s.RECORDS_COPIED:case s.EDITION_CANCELED:case s.SELECTION_CHANGED:case s.NEXT_SELECTED:case s.PREVIOUS_SELECTED:this.clearInvalid();case s.DATA_CHANGED:case s.CHANGE_UNDONE:case s.CHANGE_REDONE:case s.RECORD_LOADED:this.updateAllFieldsValues(),this.clearFieldError(Object.keys(t.payload)[0]);break;case s.FIELD_INVALIDATED:null===(i=this._fields)||void 0===i||i.forEach((t=>{this.updateErrorMessage(t.fieldName,t.field)}))}},this._uuid=i.generateUUID(),this._fields=new Map,this._dataUnit=t,this.applyDefaultValues(),this._dataUnit.subscribe(this.onDataUnitEvent),this._dataUnit.addInterceptor(this),this.setContextDataBinder(t)}get dataBinderId(){return this._uuid}setContextDataBinder(t){const s=e.getContextValue("__DATABINDER_BY_DATAUNIT__")||new Map,i=[...s.get(t.dataUnitId)||[],this];s.set(t.dataUnitId,i),e.setContextValue("__DATABINDER_BY_DATAUNIT__",s)}applyDefaultValues(){const t=(this._dataUnit.getAddedRecords()||[]).map((t=>t.__record__id__));if(t.length>0){const s=this.getDefaultValues();s&&Object.keys(s).forEach((i=>{this._dataUnit.setFieldValue(i,s[i],t)}))}}bind(t,s,i,e){t.forEach((t=>{const{fieldName:i,contextName:e}=t.dataset;null!=e&&e!==s||this.updateBind(i,t)})),this._formMetadata=i,this._recordValidatorProcessor=new d(this._dataUnit,{getRequiredFields:()=>this.getFormRequiredFields(),markAsInvalid:t=>this.markInvalid(t),getMessageForField:t=>this.getErrorMessage(t)},e)}getFormRequiredFields(){return this._formMetadata.getRequiredFields()}disconnectDataUnit(){const t=e.getContextValue("__DATABINDER_BY_DATAUNIT__")||new Map,s=t.get(this._dataUnit.dataUnitId).filter((t=>t.dataBinderId!==this.dataBinderId));t.set(this._dataUnit.dataUnitId,s),e.setContextValue("__DATABINDER_BY_DATAUNIT__",t)}onDisconnectedCallback(){this._dataUnit.unsubscribe(this.onDataUnitEvent),this._dataUnit.removeInterceptor(this),this.disconnectDataUnit()}getCurrentRecordId(){const t=this._dataUnit.getSelectedRecord();return null==t?void 0:t.__record__id__}markInvalid(t){if(this._fields.has(t.name)){const s=this._fields.get(t.name).field;this.updateErrorMessage(t.name,s,t.message)}}setFocus(t){if(!this._fields.has(t))return;const s=this._fields.get(t).field;"function"==typeof s.setFocus&&s.setFocus()}clearInvalid(t){this._dataUnit.clearInvalid(t),this._fields.forEach((t=>{t.field.errorMessage=""}))}clearFieldError(t){var s;const i=null===(s=this._fields.get(t))||void 0===s?void 0:s.field;i.errorMessage&&(i.errorMessage="",this._dataUnit.clearInvalid(this.getCurrentRecordId(),t))}updateFieldValue(t,s){const i=this._fields.get(t);try{i&&(i.listen=!1),this._dataUnit.isMultipleEdition&&this.hasMultipleValuesBetweenRecords(t)?(s.value=void 0,s.alternativePlaceholder="Múltiplos Valores"):(s.value=this._dataUnit.getFieldValue(t),s.alternativePlaceholder=void 0),this.updateErrorMessage(t,s)}finally{i&&(i.listen=!0)}}hasMultipleValuesBetweenRecords(t){var s,i;const e=null!==(i=null===(s=this._dataUnit.getSelectionInfo())||void 0===s?void 0:s.records)&&void 0!==i?i:[];if(e.length<=1)return!1;const a=e[0][t];return!e.every((s=>n.equals(s[t],a)))}validate(){return this._recordValidatorProcessor.validate()}static async validateByDataunit(t){try{const s=this.getDataBindersByDataUnit(t);return await Promise.all(s.map((t=>t.validate()))),!0}catch(t){return!1}}static getDataBindersByDataUnit(t){const s=e.getContextValue("__DATABINDER_BY_DATAUNIT__");return(null==s?void 0:s.get(t.dataUnitId))||[]}updateErrorMessage(t,s,i){null==i&&(i=this._dataUnit.getInvalidMessage(this.getCurrentRecordId(),t)),s.errorMessage||(s.errorMessage=i)}getErrorMessage(t){if(this._fields.has(t))return this._fields.get(t).field.errorMessage}updateBind(t,s){const i=this._fields.get(t);i&&i.destroy(),this.bindSearchOptionsLoader(t,s),this.updateFieldValue(t,s),this.updateErrorMessage(t,s),this._fields.set(t,_.create(t,s,((t,s)=>this.changeStarted(t,s)),(t=>this.cancelWaitingChange(t)),((t,s)=>this.setFieldValue(t,s)))),this.applyEzUploadContext(t,s)}changeStarted(t,s){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),!s.blocking&&null==s.promise){const i=this._fields.get(t);i&&(s.promise=new Promise(((t,s)=>{i.waitingChangePromiseResolve=t,i.waitingChangePromiseReject=s})))}this._dataUnit.startChange(t,s)}cancelWaitingChange(t){if(this._dataUnit.waitingForChange(t)){this._dataUnit.cancelWaitingChange(t);const s=this._fields.get(t);s&&s.rejectWaitingChange(new a("Change canceled",t))}}setFieldValue(t,s){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._dataUnit.clearInvalid(this.getCurrentRecordId(),t),this._dataUnit.isMultipleEdition){const i=this._dataUnit.getSelectionInfo();this._dataUnit.setFieldValue(t,s,i.recordIds)}else{const i=this._dataUnit.getSelectedRecord();this._dataUnit.setFieldValue(t,s,i?[i.__record__id__]:void 0)}if(this._dataUnit.waitingForChange(t)){const s=this._fields.get(t);s&&s.acceptWaitingChange()}}bindSearchOptionsLoader(t,s){if(("EZ-SEARCH"===s.nodeName||"EZ-SEARCH-PLUS"===s.nodeName)&&null==s.optionLoader){const i=e.getContextValue("EZ-SEARCH-PLUS"===s.nodeName?"__EZUI__SEARCH__PLUS__OPTION__LOADER__":"__EZUI__SEARCH__OPTION__LOADER__");i&&(s.optionLoader=(s,e)=>i(s,t,this._dataUnit,e))}}applyEzUploadContext(t,s){var i,n;if("EZ-UPLOAD"===s.nodeName){s.urlUpload=e.getContextValue("__EZUI__UPLOAD__ADD__URL__"),s.urlDelete=e.getContextValue("__EZUI__UPLOAD__DEL__URL__");const a=this._dataUnit.getField(t),h=null===(i=a.properties)||void 0===i?void 0:i.DESTINATION;h&&(s.requestHeaders={XTRAINF:`{"destination": "${h}"}`}),s.maxFiles=(null===(n=a.properties)||void 0===n?void 0:n.MAX_FILES)||0}}updateAllFieldsValues(){var t;null===(t=this._fields)||void 0===t||t.forEach((t=>{this.updateFieldValue(t.fieldName,t.field)}))}interceptAction(t){if(t.type===s.RECORDS_COPIED){const i=this._formMetadata.getCleanOnCopyFields();if(i)return new h(s.RECORDS_COPIED,t.payload.map((t=>{const s=Object.assign({},t);return i.forEach((t=>delete s[t])),s})))}if(t.type===s.SAVING_DATA)return new Promise((s=>{this.validate().then((()=>s(t))).catch((()=>{}))}));if(t.type===s.RECORDS_ADDED){const i=this.getDefaultValues();if(i)return new h(s.RECORDS_ADDED,t.payload.map((t=>Object.assign(Object.assign({},t),i))))}return t}getDefaultValues(){var t;const s=null===(t=this._formMetadata)||void 0===t?void 0:t.getDefaultValues();if(s){const t={};for(const i in s)t[i]=this._dataUnit.valueFromString(i,s[i]);return t}}}class _{constructor(){this.listen=!0,this.startChangeEventName="ezStartChange",this.cancelWaitingChangeEventName="ezCancelWaitingChange",this.changeEventName="ezChange"}destroy(){this.field.removeEventListener(this.startChangeEventName,this.startChangeListener),this.field.removeEventListener(this.cancelWaitingChangeEventName,this.cancelWaitingChangeListener),this.field.removeEventListener(this.changeEventName,this.changeListener)}acceptWaitingChange(){this.waitingChangePromiseResolve&&(this.waitingChangePromiseResolve(),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}rejectWaitingChange(t){this.waitingChangePromiseReject&&(this.waitingChangePromiseReject(t),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}static create(t,s,i,e,n){const a=new _;return a.field=s,a.fieldName=t,a.startChangeListener=s=>{a.listen&&i(t,s.detail)},a.field.addEventListener(a.startChangeEventName,a.startChangeListener),a.cancelWaitingChangeListener=()=>{a.listen&&e(t)},a.field.addEventListener(a.cancelWaitingChangeEventName,a.cancelWaitingChangeListener),a.changeListener=s=>{a.listen&&n(t,s.detail)},a.field.addEventListener(a.changeEventName,a.changeListener),a}}const f="ctrl+f",p=240,v=String(210)+"px",A=(t,s,i)=>l("ez-search",{class:"ez-padding--small ez-margin--none",style:{"--ez-text-input__margin-bottom":"0px","--ez-search--width":v},canShowError:!1,showSelectedValue:!1,showOptionValue:!1,suppressEmptyOption:!0,label:t.label,value:null,optionLoader:s,onEzChange:t=>i(t.detail),ignoreLimitCharsToSearch:!0}),g=async t=>{requestAnimationFrame((async()=>{if(t){const s=t.t;if(!s)return;s.value=null,await s.setFocus()}}))};export{u as D,d as R,f as S,A as a,c as b,p as c,g as f}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as s}from"./p-23a36bb6.js";import{ObjectUtils as o}from"@sankhyalabs/core";import{i as l}from"./p-80dfc50b.js";import{i as n}from"./p-b31dc417.js";function h(t,e,i){if(!t.length)return[...e];if(!e.length)return[];const s=function(t,e){return t.map((t=>e.findIndex((e=>e.id===t))))}(t,e),o=0===(l=s).length?0:l.reduce(((t,e)=>e<t?e:t),l[0]);var l;const n=function(t){return 0===t.length?0:t.reduce(((t,e)=>e>t?e:t),t[0])}(s);return function(t,e,i,s){return t<0||e>=s.length||t>e?s:i?function(t,e,i){if(t===i.length-1)return i;const s=i.slice(0,e),o=i.slice(e,t+1),l=i.slice(t+1),n=l.shift();return n?[...s,n,...o,...l]:i}(e,t,s):function(t,e,i){if(0===t)return i;const s=i.slice(0,t-1),o=i.slice(t,e+1),l=i.slice(e+1);return[...s,...o,i[t-1],...l]}(t,e,s)}(o,n,i,e)}function r({from:t,to:e,selectedFrom:i,selectedTo:s}){return e=[...e.map((t=>d(t,!1))),...t.map((t=>d(t,!0)))],i=[],s=[...t.map((({id:t})=>t))],{from:t=[],to:e,selectedFrom:i,selectedTo:s}}function a({from:t,to:e,selectedFrom:i,selectedTo:s,insertIndex:o=e.length}){if(!t.length)return{from:t,to:e,selectedFrom:i,selectedTo:s};const l=function(t,e,i){const s=t.map((t=>t.id)),o=e.filter((t=>!s.includes(t)));return i.filter((({id:t})=>o.includes(t)))}(e,i,t);if(!l.length)return{from:t,to:e,selectedFrom:i,selectedTo:s};let n=e.map((t=>d(t,!1)));return n.splice(o,0,...l.map((t=>d(t,!0)))),{from:t.filter((t=>!i.includes(t.id))),to:n,selectedFrom:[],selectedTo:[...i]}}function d(t,e){return Object.assign(Object.assign({},t),{selected:e})}const c=class{constructor(i){t(this,i),this.ezLeftListChanged=e(this,"ezLeftListChanged",7),this.ezRightListChanged=e(this,"ezRightListChanged",7),this.LEFT_LIST_ID="LEFT-LIST-ID",this.RIGHT_LIST_ID="RIGHT-LIST-ID",this.leftList=[],this.leftTitle=void 0,this.rightList=[],this.entityLabel="item",this.entityLabelPlural="itens",this.leftListLabel="disponíveis",this.rightListLabel="selecionados",this.useOnlyRightList=!1,this.rightTitle=void 0,this.emptyMessage=void 0,this.slotsListBuilder=void 0,this.leftFilteredList=[],this.rightFilteredList=[],this.selectedLeftList=[],this.selectedRightList=[],this.isFilteringLeft=!1,this.isFilteringRight=!1}async resetSelectedLists(){this.selectedLeftList=[],this.selectedRightList=[]}observeLeftList(t,e){o.equals(t,e)||this.ezLeftListChanged.emit(t)}observeRightList(t,e){o.equals(t,e)||this.ezRightListChanged.emit(t)}async componentWillLoad(){this.i18n=await n()}async handleChangeLeft({detail:t}){t.to.getAttribute("id")&&t.to.getAttribute("id")===this.RIGHT_LIST_ID?(t.selectItens=t.selectItens.filter((t=>this.rightList.every((e=>e.id!==t)))),this.leftList=[...t.dataSource],this.selectedLeftList=[...t.selectItens],this.transferToRight(null==t?void 0:t.newIndex)):this.leftList=[...this.reorderArray(t.dataSource,t.selectItens,t.newIndex)]}async handleChangeRight({detail:t}){t.to.getAttribute("id")&&t.to.getAttribute("id")===this.LEFT_LIST_ID?(t.selectItens=t.selectItens.filter((t=>this.leftList.every((e=>e.id!==t)))),this.rightList=[...t.dataSource],this.selectedRightList=[...t.selectItens],this.transferToLeft(null==t?void 0:t.newIndex)):this.rightList=[...this.reorderArray(t.dataSource,t.selectItens,t.newIndex)]}reorderArray(t,e,i){const s=t.filter((t=>!e.includes(t.id))),o=t.filter((t=>e.includes(t.id)));return s.splice(i,0,...o),s}enableTransferAllToRight(){return this.leftList.length>0}enableTransferAllToLeft(){return this.rightList.length>0}enableTransferToRight(){return this.selectedLeftList.length>0}enableTransferToLeft(){return this.selectedRightList.length>0}enableMoveUp(t){if(this.isFilteringRight)return!1;const e=this.getRightSelectedItemsIndex();return this.selectedRightList.length>0&&!e.includes(0)&&(!!t||l(e))}enableMoveDown(t){if(this.isFilteringRight)return!1;const e=this.getRightSelectedItemsIndex();return this.selectedRightList.length>0&&!e.includes(this.rightList.length-1)&&(!!t||l(e))}getRightSelectedItemsIndex(){return this.selectedRightList.map((t=>this.rightList.findIndex((e=>e.id===t))))}transferToRight(t){const{from:e,to:i,selectedFrom:s,selectedTo:o}=a(Object.assign(Object.assign({},this.buildTransferToRightConfig()),{insertIndex:null!=t?t:0}));this.leftList=[],requestAnimationFrame((()=>this.leftList=[...e])),this.rightList=[...i],this.selectedLeftList=[...s],this.selectedRightList=[...o]}transferToLeft(t){const{from:e,to:i,selectedFrom:s,selectedTo:o}=a(Object.assign(Object.assign({},this.buildTransferToLeftConfig()),{insertIndex:null!=t?t:0}));this.rightList=[],requestAnimationFrame((()=>this.rightList=[...e])),this.leftList=[...i],this.selectedRightList=[...s],this.selectedLeftList=[...o]}async handleTransferAllToRight(){const{from:t,to:e,selectedFrom:i,selectedTo:s}=r(this.buildTransferToRightConfig());this.leftList=[...t],this.rightList=[...e],this.selectedLeftList=[...i],this.selectedRightList=[...s],requestAnimationFrame((async()=>{await this.clearSelectionAll()}))}async handleTransferAllToLeft(){const{from:t,to:e,selectedFrom:i,selectedTo:s}=r(this.buildTransferToLeftConfig());this.rightList=[...t],this.leftList=[...e],this.selectedRightList=[...i],this.selectedLeftList=[...s],requestAnimationFrame((async()=>{await this.clearSelectionAll()}))}buildTransferToRightConfig(){return{from:this.leftList,to:this.rightList,selectedFrom:this.selectedLeftList,selectedTo:this.selectedRightList}}buildTransferToLeftConfig(){return{from:this.rightList,to:this.leftList,selectedFrom:this.selectedRightList,selectedTo:this.selectedLeftList}}handleMoveUp(){this.rightList=[...h(this.selectedRightList,this.rightList,!1)]}handleMoveDown(){this.rightList=[...h(this.selectedRightList,this.rightList,!0)]}handleMoveToTop(){const{itemsToKeep:t,itemsToMove:e}=this.getItemsToKeepAndToMove();this.rightList=[...e,...t]}handleMoveToBottom(){const{itemsToKeep:t,itemsToMove:e}=this.getItemsToKeepAndToMove();this.rightList=[...t,...e]}handleSelectLeftItem({detail:t}){this.selectedLeftList=[...t.map((({id:t})=>t))]}handleSelectRightItem({detail:t}){this.selectedRightList=[...t.map((({id:t})=>t))]}getItemsToKeepAndToMove(){return{itemsToKeep:this.rightList.filter((t=>!this.selectedRightList.includes(t.id))),itemsToMove:this.rightList.filter((t=>this.selectedRightList.includes(t.id)))}}async handleTransferToRight(){this.transferToRight(),this.leftFilteredList=[],await this.leftEzListInstance.clearSelection()}async handleTransferToLeft(){this.transferToLeft(),this.rightFilteredList=[],await this.rightEzListInstance.clearSelection()}async clearSelectionAll(){await this.rightEzListInstance.clearSelection(),await this.leftEzListInstance.clearSelection()}handleChooseLeft(){requestAnimationFrame((async()=>{await this.rightEzListInstance.clearSelection()}))}handleChooseRight(){this.useOnlyRightList||requestAnimationFrame((async()=>{await this.leftEzListInstance.clearSelection()}))}renderList(t){const{idSortableList:e,list:s,isFiltering:o,filteredList:l,emptyMessage:n,slotConfig:h,callbacks:r,title:a}=t;return i("ez-sortable-list",{ref:null==r?void 0:r.setRef,title:a,idSortableList:e,emptyMessage:n,class:"ez-size-height--full",dataSource:o?l:s,hoverFeedback:!0,enableMultipleSelection:!0,removeItensMoved:!0,entityLabel:this.entityLabel,entityLabelPlural:this.entityLabelPlural,itemRightSlotBuilder:null==h?void 0:h.itemRightSlotBuilder,itemLeftSlotBuilder:null==h?void 0:h.itemLeftSlotBuilder,onItemsReordered:null==r?void 0:r.onChange.bind(this),onEzSelectItens:null==r?void 0:r.onSelect.bind(this),onEzDoubleClick:null==r?void 0:r.onDoubleClick.bind(this),onEzChoose:null==r?void 0:r.onChoose.bind(this)})}render(){var t,e,o,l,n,h,r,a,d,c;return i(s,null,!this.useOnlyRightList&&i("div",{class:"list__container"},this.leftList&&this.renderList({idSortableList:this.LEFT_LIST_ID,list:this.leftList,title:this.leftTitle,isFiltering:this.isFilteringLeft,filteredList:this.leftFilteredList,emptyMessage:(null===(t=this.emptyMessage)||void 0===t?void 0:t.LEFT_LIST)?this.emptyMessage.LEFT_LIST:this.i18n("ez-double-list.noItemsAvailable",{entity:this.entityLabel}),slotConfig:{itemRightSlotBuilder:null===(o=null===(e=this.slotsListBuilder)||void 0===e?void 0:e.LEFT_LIST)||void 0===o?void 0:o.itemRightSlotBuilder,itemLeftSlotBuilder:null===(n=null===(l=this.slotsListBuilder)||void 0===l?void 0:l.LEFT_LIST)||void 0===n?void 0:n.itemLeftSlotBuilder},callbacks:{setRef:t=>this.leftEzListInstance=t,onChange:t=>this.handleChangeLeft(t),onSelect:this.handleSelectLeftItem.bind(this),onDoubleClick:this.handleTransferToRight.bind(this),onChoose:this.handleChooseLeft.bind(this)}})),!this.useOnlyRightList&&i("div",{class:"actions__column"},i("ez-button",{mode:"icon",iconName:"dual-chevron-right",enabled:this.enableTransferAllToRight(),title:this.i18n("ez-double-list.moveAllTo",{list:this.rightListLabel}),size:"small",onClick:this.handleTransferAllToRight.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-right",enabled:this.enableTransferToRight(),title:this.i18n("ez-double-list.moveTo",{list:this.rightListLabel}),size:"small",onClick:this.handleTransferToRight.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-left",enabled:this.enableTransferToLeft(),title:this.i18n("ez-double-list.moveTo",{list:this.leftListLabel}),size:"small",onClick:this.handleTransferToLeft.bind(this)}),i("ez-button",{mode:"icon",iconName:"dual-chevron-left",enabled:this.enableTransferAllToLeft(),title:this.i18n("ez-double-list.moveAllTo",{list:this.leftListLabel}),size:"small",onClick:this.handleTransferAllToLeft.bind(this)})),i("div",{class:"list__container"},this.rightList&&this.renderList({idSortableList:this.RIGHT_LIST_ID,list:this.rightList,title:this.rightTitle,isFiltering:this.isFilteringRight,filteredList:this.rightFilteredList,emptyMessage:(null===(h=this.emptyMessage)||void 0===h?void 0:h.RIGHT_LIST)?this.emptyMessage.RIGHT_LIST:this.i18n("ez-double-list.noItemsSelected",{entity:this.entityLabel}),slotConfig:{itemRightSlotBuilder:null===(a=null===(r=this.slotsListBuilder)||void 0===r?void 0:r.RIGHT_LIST)||void 0===a?void 0:a.itemRightSlotBuilder,itemLeftSlotBuilder:null===(c=null===(d=this.slotsListBuilder)||void 0===d?void 0:d.RIGHT_LIST)||void 0===c?void 0:c.itemLeftSlotBuilder},callbacks:{setRef:t=>this.rightEzListInstance=t,onChange:t=>this.handleChangeRight(t),onSelect:this.handleSelectRightItem.bind(this),onDoubleClick:this.handleTransferToLeft.bind(this),onChoose:this.handleChooseRight.bind(this)}})),i("div",{class:"actions__column"},i("ez-button",{mode:"icon",iconName:"dual-chevron-up",enabled:this.enableMoveUp(!0),title:this.i18n("ez-double-list.moveToFirstPosition"),size:"small",onClick:this.handleMoveToTop.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-up",enabled:this.enableMoveUp(),title:this.i18n("ez-double-list.moveUp"),size:"small",onClick:this.handleMoveUp.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-down",enabled:this.enableMoveDown(),title:this.i18n("ez-double-list.moveDown"),size:"small",onClick:this.handleMoveDown.bind(this)}),i("ez-button",{mode:"icon",iconName:"dual-chevron-down",enabled:this.enableMoveDown(!0),title:this.i18n("ez-double-list.moveToLastPosition"),size:"small",onClick:this.handleMoveToBottom.bind(this)})))}static get watchers(){return{leftList:["observeLeftList"],rightList:["observeRightList"]}}};c.style='.sc-ez-double-list-h{display:flex;flex-direction:row;gap:8px;align-items:center;font-family:var(--font-pattern, "Roboto");width:100%}@media screen and (max-width: 1366px){.group.sc-ez-double-list{height:350px}}.list__container.sc-ez-double-list{height:100%;width:100%;min-height:150px;overflow:auto;display:flex}.actions__column.sc-ez-double-list{display:flex;flex-direction:column;gap:4px}';export{c as ez_double_list}
@@ -0,0 +1 @@
1
+ import{r as e,c as a,h as l,g as r}from"./p-23a36bb6.js";import{ElementIDUtils as o}from"@sankhyalabs/core";const i=class{constructor(l){e(this,l),this.valueChange=a(this,"valueChange",7),this.removeChip=a(this,"removeChip",7),this.actionClick=a(this,"actionClick",7),this.iconClick=a(this,"iconClick",7),this.label=void 0,this.enabled=!0,this.removePosition=void 0,this.mode=void 0,this.value=!1,this.showNativeTooltip=!1,this.disableAutoUpdateValue=!1,this.maxWidth=void 0,this.size="default",this.iconNameLeft=void 0,this.iconNameRight=void 0,this.type="primary",this._isOverflowing=!1}async setFocus(){this._containerElem.focus()}async setBlur(){this._containerElem.blur()}handleValueChange(){this.swichState(),this.valueChange.emit(this.value)}handleClick(){if(this.enabled)return"action"===this.mode?this.actionClick.emit():this.disableAutoUpdateValue?void 0:this.handleValueChange()}handleClickRemoveButton(e){this.enabled&&(e.stopPropagation(),this.removeChip.emit())}handleIconClick(e,a){this.enabled&&(e.stopPropagation(),this.iconClick.emit({icon:a}))}swichState(){this.enabled&&(this.value=!this.value)}checkIsOverflowing(){this._isOverflowing=!!this._labelElem&&this._labelElem.offsetWidth<this._labelElem.scrollWidth}componentDidLoad(){this._element&&o.addIDInfo(this._element,"ezChip"),this._containerElem&&this._containerElem.setAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME,o.getInternalIDInfo("button")),this.checkIsOverflowing()}render(){let e="default";return this.enabled?this.value&&"action"!==this.mode&&(e="active"):e="disabled",l("ez-tooltip",{active:this.showNativeTooltip||this._isOverflowing,message:this.label},l("button",{ref:e=>this._containerElem=e,class:{"label__container--row-reverse":"left"===this.removePosition,label__container:!0},"data-color-state":e,"data-color-type":this.type,"data-size":this.size,onClick:()=>this.handleClick(),style:{maxWidth:this.maxWidth}},this.iconNameLeft&&l("ez-icon",{size:"medium","icon-name":this.iconNameLeft,onClick:e=>this.handleIconClick(e,"left")}),l("slot",{name:"leftIcon"}),l("label",{ref:e=>this._labelElem=e,class:{"label__text--disabled":!this.enabled,label__text:!0}},this.label),l("slot",{name:"rightIcon"}),this.iconNameRight&&l("ez-icon",{size:"medium","icon-name":this.iconNameRight,onClick:e=>this.handleIconClick(e,"right")}),"action"!==this.mode&&this.removePosition&&l("ez-icon",{class:"btn-close",size:"medium","icon-name":"close",onClick:e=>this.handleClickRemoveButton(e)})))}get _element(){return r(this)}};i.style=':host{--ez-label-chip--height:32px;--ez-label-chip__label--font-size:var(--font-size--default, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--font-weight--regular, 400);--ez-label-chip__horizontal-padding:var(--space--8, 8px);--ez-label-chip__label--text--primary:var(--color--gray-70, #FFFFFF);--ez-label-chip__label--icon--primary:var(--color--gray-70, #FFFFFF);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:transparent;--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--gray-80, #F9F9F9);--ez-label-chip__label__container--background-color:var(--color--ocean-green-600, #008561);--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--border-color-active:transparent;--ez-label-chip__label__container--default--background-color--active:var(--color--ocean-green-700, #00684C);--ez-label-chip__label__container--default--color--active:var(--color--gray-70, #FFFFFF);--ez-label-chip__label__container--text--disabled:var(--color--gray-300, #A4A5A7);--ez-label-chip__label__container--default--border-color--active:transparent;--ez-label-chip__label__container--default--margin-top:var(--space-extra-small, 0px)}.label__text{cursor:pointer;white-space:nowrap;user-select:none;text-overflow:ellipsis;overflow:hidden;max-width:100%;font-family:var(--ez-label-chip__label--font-family);font-size:var(--ez-label-chip__label--font-size);font-weight:var(--ez-label-chip__label--font-weight)}.label__text--disabled{cursor:not-allowed}.label__container{cursor:pointer;width:max-content;display:flex;flex-wrap:wrap;align-items:center;gap:var(--space--4);height:var(--ez-label-chip--height);border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);padding:0 var(--ez-label-chip__horizontal-padding);outline-color:var(--ez-label-chip__label__container--default--border-color--active);margin-top:var(--ez-label-chip__label__container--default--margin-top)}.label__container[data-size="default"]{height:var(--ez-label-chip--height, 32px)}.label__container[data-size="medium"]{height:42px}.label__container[data-size="large"]{height:50px}.label__container--row-reverse{flex-direction:row-reverse}.label__container--disabled{cursor:not-allowed}.label__container:hover{-webkit-transition:150ms -webkit-filter linear;transition:150ms filter linear, 150ms -webkit-filter linear;filter:brightness(90%)}.label__container:focus{outline:none;box-shadow:0 0 0 2px var(--ez-label-chip__label__container--default--border-color--active)}.label__container:active{-webkit-transition:150ms -webkit-filter linear;transition:150ms filter linear, 150ms -webkit-filter linear;filter:brightness(85%)}.label__container[data-color-type="primary"] ez-icon{--ez-icon--color:var(--ez-label-chip__label--icon--primary)}:host .label__container[data-color-type="primary"] ::slotted(ez-icon){--ez-icon--color:var(--ez-label-chip__label--icon--primary)}.label__container[data-color-type="primary"][data-color-state="default"]{border-color:var(--ez-label-chip__label__container--border-color-strokes);background-color:var(--ez-label-chip__label__container--background-color);color:var(--ez-label-chip__label--text--primary)}.label__container[data-color-type="primary"][data-color-state="active"]{border-color:var(--ez-label-chip__label__container--border-color-active);background-color:var(--ez-label-chip__label__container--default--background-color--active);color:var(--ez-label-chip__label__container--default--color--active)}.label__container[data-color-type="primary"]:focus{border-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__container[data-color-type="secondary"] ez-icon{--ez-icon--color:var(--color--gray-300, #A4A5A7)}:host .label__container[data-color-type="secondary"] ::slotted(ez-icon){--ez-icon--color:var(--color--gray-300, #A4A5A7)}.label__container[data-color-type="secondary"][data-color-state="default"]{border-color:var(--color--gray-200, #D2D2D3);background-color:var(--color--gray-70);color:var(--color--ocean-green-1000, #00281D)}.label__container[data-color-type="secondary"][data-color-state="active"]{border-color:var(--color--gray-200, #D2D2D3);background-color:var(--color--primary-300, #f2faf8);color:var(--color--primary, #f2faf8)}.label__container[data-color-type="secondary"]:focus{color:var(--color--primary, #007a5a)}.label__container[data-color-state="disabled"]{border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);color:var(--ez-label-chip__label__container--text--disabled);cursor:not-allowed;filter:none}.label__container[data-color-state="disabled"] ez-icon{--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}';export{i as ez_chip}
@@ -4,6 +4,7 @@ export declare class EzAlertList {
4
4
  private _container;
5
5
  private _overlayId;
6
6
  private _overlayRef;
7
+ private i18n;
7
8
  /**
8
9
  * Lista de alertas que devem ser apresentados no componente.
9
10
  */
@@ -71,7 +72,7 @@ export declare class EzAlertList {
71
72
  private getBoundingBottom;
72
73
  private dataElementId;
73
74
  componentDidLoad(): void;
74
- componentWillLoad(): void;
75
+ componentWillLoad(): Promise<void>;
75
76
  render(): any;
76
77
  }
77
78
  export interface AlertItem {
@@ -1,6 +1,7 @@
1
1
  export declare class EzAvatar {
2
2
  private readonly DECIMAL_PARSE_BASE;
3
3
  private readonly FONT_SIZE_BASE_CALC;
4
+ private i18n;
4
5
  /** Nome do usuário para exibição da inicial. */
5
6
  name?: string;
6
7
  /** URL da imagem do Avatar. */
@@ -20,5 +21,6 @@ export declare class EzAvatar {
20
21
  private calcFontSize;
21
22
  private getClass;
22
23
  private renderAvatarContent;
24
+ componentWillLoad(): Promise<void>;
23
25
  render(): any;
24
26
  }
@@ -7,9 +7,6 @@ export declare class EzCalendar {
7
7
  private _calendarWidth;
8
8
  private _currentPosition;
9
9
  private _firstRender;
10
- private _todayLabel;
11
- private _weekDayLabels;
12
- private _monthLabels;
13
10
  private _hoursLabel;
14
11
  private _minutosLabel;
15
12
  private _hoursSelect;
@@ -18,6 +15,7 @@ export declare class EzCalendar {
18
15
  private _hoursScroll;
19
16
  private _minutesScroll;
20
17
  private _secondsScroll;
18
+ private i18n;
21
19
  _hostElem: HTMLEzCalendarElement;
22
20
  /**
23
21
  * Define o valor do calendário.
@@ -67,6 +65,7 @@ export declare class EzCalendar {
67
65
  private selectMinutes;
68
66
  private selectSeconds;
69
67
  updateScroll(element: HTMLElement): void;
68
+ componentWillLoad(): Promise<void>;
70
69
  componentDidRender(): void;
71
70
  componentDidLoad(): void;
72
71
  private scroll;
@@ -28,6 +28,30 @@ export declare class EzChip {
28
28
  * Exibe condicionalmente o tooltip nativo do navegador ao sobrepor o cursor acima do elemento.
29
29
  */
30
30
  showNativeTooltip: boolean;
31
+ /**
32
+ * Desabilita a alteração da propriedade value ao clicar.
33
+ */
34
+ disableAutoUpdateValue: boolean;
35
+ /**
36
+ * Define o tamanho máximo do chip.
37
+ */
38
+ maxWidth: string;
39
+ /**
40
+ * Define o tamanho do chip.
41
+ */
42
+ size: 'default' | 'medium' | 'large';
43
+ /**
44
+ * Define o icone esquerdo.
45
+ */
46
+ iconNameLeft: string;
47
+ /**
48
+ * Define o icone direito.
49
+ */
50
+ iconNameRight: string;
51
+ /**
52
+ * Define o tipo de estilização do chip.
53
+ */
54
+ type: 'primary' | 'secondary';
31
55
  /**
32
56
  * Emitido quando acontece a alteração de valor do ez-chip.
33
57
  */
@@ -40,6 +64,12 @@ export declare class EzChip {
40
64
  * Emitido no modo "action" quando o usuário clica no ez-chip.
41
65
  */
42
66
  actionClick: EventEmitter<void>;
67
+ /**
68
+ * Emitido quando o icone é acionado.
69
+ */
70
+ iconClick: EventEmitter<{
71
+ icon: "left" | "right";
72
+ }>;
43
73
  /**
44
74
  * Aplica o foco no ez-chip.
45
75
  */
@@ -48,13 +78,13 @@ export declare class EzChip {
48
78
  * Remove o foco do ez-chip.
49
79
  */
50
80
  setBlur(): Promise<void>;
51
- handleSlotChange(ev: Event): void;
81
+ private _isOverflowing;
52
82
  handleValueChange(): void;
53
- handleClick(ev: Event): void | CustomEvent<void>;
54
- swichState(): void;
55
- formatLabel(): string;
56
- observeValue(): void;
57
- observeEnabled(): void;
83
+ private handleClick;
84
+ private handleClickRemoveButton;
85
+ private handleIconClick;
86
+ private swichState;
87
+ private checkIsOverflowing;
58
88
  componentDidLoad(): void;
59
89
  render(): any;
60
90
  }
@@ -2,6 +2,7 @@ import { EventEmitter } from "../../stencil-public-runtime";
2
2
  export declare class EzCollapsibleBox {
3
3
  private _refLabel;
4
4
  private _refTextEdit;
5
+ private i18n;
5
6
  private _hostElement;
6
7
  private _activeEditText;
7
8
  /**
@@ -86,6 +87,7 @@ export declare class EzCollapsibleBox {
86
87
  fontWeight: string;
87
88
  fontFamily: string;
88
89
  };
90
+ componentWillLoad(): Promise<void>;
89
91
  componentDidLoad(): void;
90
92
  render(): any;
91
93
  }
@@ -2,6 +2,7 @@ import { IOption } from "../ez-combo-box";
2
2
  export declare class EzComboBoxList {
3
3
  private _optionsList;
4
4
  private _listWrapper;
5
+ private i18n;
5
6
  /**
6
7
  * Indica se o indicador de carregamento deve ser exibido.
7
8
  *
@@ -98,6 +99,7 @@ export declare class EzComboBoxList {
98
99
  handleKeyDown(event: KeyboardEvent): void;
99
100
  private buildItem;
100
101
  private scrollToOption;
102
+ componentWillLoad(): Promise<void>;
101
103
  componentDidLoad(): void;
102
104
  componentDidRender(): void;
103
105
  render(): any;
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
2
  import { TFocusOptions } from "../ez-text-input/ez-text-input";
3
3
  export declare class EzComboBox {
4
+ private i18n;
4
5
  private _textInput;
5
6
  private _comboBoxList;
6
7
  private _popover;
@@ -10,7 +11,6 @@ export declare class EzComboBox {
10
11
  private _deboucingTime;
11
12
  private _maxWidthValue;
12
13
  private _tabPressed;
13
- private _textEmptyList;
14
14
  private _lookupMode;
15
15
  private _resizeObserver;
16
16
  isOpen: boolean;
@@ -93,6 +93,10 @@ export declare class EzComboBox {
93
93
  * Se true o campo de texto receberá o foco ao ser renderizado.
94
94
  */
95
95
  autoFocus: boolean;
96
+ /**
97
+ * Se true, impede que o campo de texto receba foco automaticamente ao abrir as opções.
98
+ */
99
+ preventAutoFocus: boolean;
96
100
  /**
97
101
  * Texto alternativo a ser apresentado como título do campo.
98
102
  */
@@ -142,7 +146,10 @@ export declare class EzComboBox {
142
146
  private setInputValue;
143
147
  private clearSearch;
144
148
  private resetOptions;
145
- componentWillLoad(): void;
149
+ private sanitizeValue;
150
+ componentWillLoad(): Promise<void>;
151
+ private setResizeObserver;
152
+ connectedCallback(): void;
146
153
  componentDidLoad(): void;
147
154
  disconnectedCallback(): void;
148
155
  private handlerIconClick;
@@ -8,6 +8,7 @@ export declare class EzDateInput {
8
8
  private _focused;
9
9
  private _valuePromiseCallbacks;
10
10
  private _popover;
11
+ private i18n;
11
12
  private _elem;
12
13
  /**
13
14
  * Emitido quando acontece a alteração de valor do campo.
@@ -76,6 +77,7 @@ export declare class EzDateInput {
76
77
  private handleInput;
77
78
  private setInputValue;
78
79
  disconnectedCallback(): void;
80
+ componentWillLoad(): Promise<void>;
79
81
  componentDidLoad(): void;
80
82
  render(): any;
81
83
  }
@@ -8,6 +8,7 @@ export declare class EzDateTimeInput {
8
8
  private _focused;
9
9
  private _valuePromiseCallbacks;
10
10
  private _popover;
11
+ private i18n;
11
12
  private _elem;
12
13
  /**
13
14
  * Emitido quando acontece a alteração de valor do campo.
@@ -84,6 +85,7 @@ export declare class EzDateTimeInput {
84
85
  private handleInput;
85
86
  private setInputValue;
86
87
  disconnectedCallback(): void;
88
+ componentWillLoad(): Promise<void>;
87
89
  componentDidLoad(): void;
88
90
  render(): any;
89
91
  }
@@ -16,8 +16,6 @@ declare class Message {
16
16
  export declare class EzDialog {
17
17
  _element: HTMLElement;
18
18
  private readonly PRIMARY_BUTTON_ID;
19
- private labelConfirm;
20
- private labelCancel;
21
19
  private btnConfirmDanger;
22
20
  private _messageQueue;
23
21
  private _currentMessage;
@@ -26,6 +24,7 @@ export declare class EzDialog {
26
24
  private _canFocusOnPrimaryBtn;
27
25
  private _lastActiveElement;
28
26
  private _keyboardManager;
27
+ private i18n;
29
28
  /**
30
29
  * Define se o ez-dialog será utilizado no modo de confirmação.
31
30
  */
@@ -78,6 +77,7 @@ export declare class EzDialog {
78
77
  getClassIconIndicator(dialogType: DialogType): string;
79
78
  getClassContainer(message: Message): "dialog__container dialog__container--default" | "dialog__container";
80
79
  getClassTitleLabel(message: Message): "title title__label title__label--no-icon" | "title title__label";
80
+ componentWillLoad(): Promise<void>;
81
81
  componentWillRender(): void;
82
82
  componentDidLoad(): void;
83
83
  componentDidRender(): void;
@@ -87,6 +87,8 @@ export declare class EzDoubleList {
87
87
  observeRightList(newValue: any, oldValue: any): void;
88
88
  private leftEzListInstance;
89
89
  private rightEzListInstance;
90
+ private i18n;
91
+ componentWillLoad(): Promise<void>;
90
92
  handleChangeLeft({ detail }: CustomEvent): Promise<void>;
91
93
  handleChangeRight({ detail }: CustomEvent): Promise<void>;
92
94
  private reorderArray;
@@ -0,0 +1,18 @@
1
+ export declare class EzEmptyCard {
2
+ _element: HTMLElement;
3
+ private _container;
4
+ /**
5
+ * Define a cor tema do componente.
6
+ */
7
+ color: "default" | "green" | "gray" | "yellow" | "red" | "petroleum";
8
+ /**
9
+ * Define o tamanho do componente, sobrescrevendo o padrão da propriedade size.
10
+ */
11
+ height?: number;
12
+ /**
13
+ * Define a largura do componente, sobrescrevendo o padrão da propriedade size.
14
+ */
15
+ width?: number;
16
+ componentDidRender(): void;
17
+ render(): any;
18
+ }
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
2
  export declare class EzFileItem {
3
+ private i18n;
3
4
  _element: HTMLElement;
4
5
  /**
5
6
  * Define se o usuário pode remover o arquivo que está sendo apresentado.
@@ -32,5 +33,6 @@ export declare class EzFileItem {
32
33
  observeProgress(newProgress: number): void;
33
34
  private getFileSize;
34
35
  private getIconName;
36
+ componentWillLoad(): Promise<void>;
35
37
  render(): any;
36
38
  }
@@ -16,6 +16,7 @@ export declare class EzForm {
16
16
  private _ezPopoverSearchField;
17
17
  private _container;
18
18
  private _keyboardManager;
19
+ private _i18n;
19
20
  private _fieldsProps;
20
21
  private _singleColumn;
21
22
  /**
@@ -0,0 +1,2 @@
1
+ import { IFormViewField } from "../../interfaces/IFormViewField";
2
+ export declare const buildRichText: ({ name, label, readOnly, contextName, rows, canShowError }: IFormViewField) => HTMLElement;
@@ -5,6 +5,7 @@ import { ICustomEditorInfo } from '../../../utils/customEditor/interfaces/ICusto
5
5
  import { ICustomRenderInfo } from '../../../utils/customRender/interfaces/ICustomRenderInfo';
6
6
  import { ICustomFormatter } from '../interfaces';
7
7
  import FilterCollumn = Components.FilterColumn;
8
+ import { TFunction } from 'i18next';
8
9
  /**
9
10
  * O intuito desta abstração, é isolar o componente EzGrid de uma implementação
10
11
  * específica, permitindo que usemos componentes de terceiros sem um acoplamento
@@ -281,6 +282,10 @@ export interface EzGridOptions {
281
282
  * Define se a grade deve suprimir o scroll horizontal.
282
283
  */
283
284
  suppressHorizontalScroll?: boolean;
285
+ /**
286
+ * Define a função de intercionalização.
287
+ */
288
+ i18n: TFunction;
284
289
  }
285
290
  /**
286
291
  * Representa cada coluna da grade.
@@ -43,6 +43,7 @@ export default class AgGridController implements EzGridController, SortingProvid
43
43
  private _gridShowDom;
44
44
  private peddingExecutionsOnGridShow;
45
45
  private _lastColsConfig;
46
+ private _i18n;
46
47
  configFilterColumn(filterColumn: HTMLFilterColumnElement): void;
47
48
  private handleFilteredColumnsChanged;
48
49
  clearFilter(): void;
@@ -113,6 +114,7 @@ export default class AgGridController implements EzGridController, SortingProvid
113
114
  setSelectedIndex(index: number): void;
114
115
  hasFilterColumn(columnName: string): boolean;
115
116
  private buildColDef;
117
+ private setHTMLRender;
116
118
  setCustomFormatters(customFormatters: Map<string, ICustomFormatter>): void;
117
119
  refreshSelectedRows(): void;
118
120
  private getInitCellStyle;
@@ -43,6 +43,7 @@ export default class DataSource implements IServerSideDatasource {
43
43
  private callbackGetRows;
44
44
  destroy(): void;
45
45
  registryListeners(): void;
46
+ private getDescriptionField;
46
47
  buildColumnDefs(): Array<EzGridColumn>;
47
48
  private buildDescriptionColumn;
48
49
  }
@@ -3,4 +3,4 @@ export declare const gridEditionImplementation: {
3
3
  getComponents: () => {};
4
4
  configureGrid: (option: any) => any;
5
5
  };
6
- export declare function buildOptions(dataUnit: DataUnit): any;
6
+ export declare function buildOptions(dataUnit: DataUnit): Promise<any>;