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

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 (406) 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 +2 -1
  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.js +20 -1
  66. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -9
  67. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +7 -4
  68. package/dist/collection/components/ez-combo-box/ez-combo-box.js +50 -15
  69. package/dist/collection/components/ez-date-input/ez-date-input.js +6 -2
  70. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +6 -2
  71. package/dist/collection/components/ez-dialog/ez-dialog.js +8 -6
  72. package/dist/collection/components/ez-double-list/ez-double-list.js +12 -4
  73. package/dist/collection/components/ez-empty-card/ez-empty-card.css +55 -0
  74. package/dist/collection/components/ez-empty-card/ez-empty-card.js +91 -0
  75. package/dist/collection/components/ez-file-item/ez-file-item.js +9 -6
  76. package/dist/collection/components/ez-form/ez-form.js +6 -4
  77. package/dist/collection/components/ez-form-view/ez-form-view.js +4 -3
  78. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +5 -2
  79. package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js +4 -0
  80. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +38 -11
  81. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +14 -4
  82. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +3 -1
  83. package/dist/collection/components/ez-grid/controller/ag-grid/utils/buildLocaleText.js +67 -0
  84. package/dist/collection/components/ez-grid/ez-grid.js +17 -15
  85. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +7 -3
  86. package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +2 -2
  87. package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js +11 -7
  88. package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +5 -1
  89. package/dist/collection/components/ez-icon/ez-icon.css +147 -140
  90. package/dist/collection/components/ez-list/ez-list.js +4 -2
  91. package/dist/collection/components/ez-modal/ez-modal.js +5 -1
  92. package/dist/collection/components/ez-modal-container/ez-modal-container.css +2 -0
  93. package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -1
  94. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +9 -5
  95. package/dist/collection/components/ez-number-input/ez-number-input.js +5 -1
  96. package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +6 -0
  97. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +3 -2
  98. package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.css +22 -0
  99. package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.js +135 -0
  100. package/dist/collection/components/ez-rich-text/ez-rich-text.css +30 -0
  101. package/dist/collection/components/ez-rich-text/ez-rich-text.js +575 -0
  102. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.js +27 -0
  103. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.css +4 -0
  104. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.js +23 -0
  105. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.css +4 -0
  106. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.js +23 -0
  107. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.css +20 -0
  108. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.js +122 -0
  109. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.css +4 -0
  110. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.js +23 -0
  111. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.css +42 -0
  112. package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.js +187 -0
  113. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.css +70 -0
  114. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.js +220 -0
  115. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.js +1 -0
  116. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.js +14 -0
  117. package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.js +10 -0
  118. package/dist/collection/components/ez-search/ez-search.js +7 -8
  119. package/dist/collection/components/ez-search-plus/ez-search-plus.css +2 -0
  120. package/dist/collection/components/ez-search-plus/ez-search-plus.js +16 -7
  121. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +27 -7
  122. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js +5 -2
  123. package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js +0 -1
  124. package/dist/collection/components/ez-skeleton/ez-skeleton.js +4 -2
  125. package/dist/collection/components/ez-sortable-list/ez-sortable-list.js +15 -11
  126. package/dist/collection/components/ez-split-button/ez-split-button.js +6 -6
  127. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +5 -1
  128. package/dist/collection/components/ez-tag/ez-tag.css +105 -0
  129. package/dist/collection/components/ez-tag/ez-tag.js +112 -0
  130. package/dist/collection/components/ez-text-area/ez-text-area.css +244 -212
  131. package/dist/collection/components/ez-text-area/ez-text-area.js +35 -28
  132. package/dist/collection/components/ez-text-edit/ez-text-edit.js +5 -1
  133. package/dist/collection/components/ez-text-input/ez-text-input.js +2 -1
  134. package/dist/collection/components/ez-tile/ez-tile.css +151 -0
  135. package/dist/collection/components/ez-tile/ez-tile.js +269 -0
  136. package/dist/collection/components/ez-tile-medium/ez-tile-medium.css +183 -0
  137. package/dist/collection/components/ez-tile-medium/ez-tile-medium.js +353 -0
  138. package/dist/collection/components/ez-time-input/ez-time-input.js +12 -10
  139. package/dist/collection/components/ez-tooltip/ez-tooltip.js +1 -1
  140. package/dist/collection/components/ez-tree/ez-tree.js +5 -1
  141. package/dist/collection/components/ez-tree/types/Tree.js +7 -0
  142. package/dist/collection/components/ez-underface/ez-underface.css +51 -0
  143. package/dist/collection/components/ez-underface/ez-underface.js +109 -0
  144. package/dist/collection/components/ez-upload/ez-upload.js +18 -12
  145. package/dist/collection/global/app-init.js +6 -0
  146. package/dist/collection/setupTests.js +1 -1
  147. package/dist/collection/utils/ApplicationUtils.js +43 -15
  148. package/dist/collection/utils/constants.js +0 -1
  149. package/dist/collection/utils/i18n/elanguages.js +6 -0
  150. package/dist/collection/utils/i18n/i18nUtils.js +20 -0
  151. package/dist/collection/utils/i18n/index.js +30 -0
  152. package/dist/collection/utils/i18n/locales/en-us.js +279 -0
  153. package/dist/collection/utils/i18n/locales/es-es.js +279 -0
  154. package/dist/collection/utils/i18n/locales/pt-br.js +279 -0
  155. package/dist/collection/utils/i18n/translations.js +9 -0
  156. package/dist/collection/utils/index.js +1 -1
  157. package/dist/collection/utils/searchColumn/search-column.js +0 -2
  158. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +8 -2
  159. package/dist/custom-elements/index.d.ts +78 -0
  160. package/dist/custom-elements/index.js +6639 -530
  161. package/dist/esm/{ApplicationUtils-eaf91331.js → ApplicationUtils-391ebb4f.js} +43 -15
  162. package/dist/esm/RichToolbarHelper-f3a149c4.js +29 -0
  163. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  164. package/dist/esm/app-globals-2394c55a.js +10 -0
  165. package/dist/esm/{constants-b036528f.js → constants-3fabe81e.js} +1 -2
  166. package/dist/esm/ez-actions-button.entry.js +2 -1
  167. package/dist/esm/ez-alert-list.entry.js +5 -3
  168. package/dist/esm/ez-avatar.entry.js +6 -1
  169. package/dist/esm/ez-calendar.entry.js +7 -6
  170. package/dist/esm/ez-card-item_2.entry.js +1 -1
  171. package/dist/esm/ez-chart.entry.js +1 -16
  172. package/dist/esm/ez-chip.entry.js +2 -1
  173. package/dist/esm/ez-collapsible-box.entry.js +13 -10
  174. package/dist/esm/{ez-combo-box-list_3.entry.js → ez-combo-box-list_4.entry.js} +291 -6
  175. package/dist/esm/ez-combo-box.entry.js +32 -14
  176. package/dist/esm/ez-date-input.entry.js +6 -2
  177. package/dist/esm/ez-date-time-input.entry.js +6 -2
  178. package/dist/esm/ez-dialog.entry.js +8 -6
  179. package/dist/esm/ez-double-list.entry.js +12 -4
  180. package/dist/esm/ez-empty-card.entry.js +30 -0
  181. package/dist/esm/ez-file-item.entry.js +9 -6
  182. package/dist/esm/ez-filter-input.entry.js +125 -0
  183. package/dist/esm/ez-form-view.entry.js +12 -4
  184. package/dist/esm/ez-form.entry.js +7 -5
  185. package/dist/esm/ez-grid.entry.js +151 -115
  186. package/dist/esm/ez-guide-navigator.entry.js +5 -1
  187. package/dist/esm/ez-icon.entry.js +1 -1
  188. package/dist/esm/ez-link-builder_6.entry.js +306 -0
  189. package/dist/esm/ez-list.entry.js +4 -2
  190. package/dist/esm/ez-modal-container.entry.js +6 -2
  191. package/dist/esm/ez-modal.entry.js +5 -1
  192. package/dist/esm/ez-multi-selection-list.entry.js +9 -5
  193. package/dist/esm/ez-number-input.entry.js +5 -1
  194. package/dist/esm/ez-popover-plus_3.entry.js +6 -1
  195. package/dist/esm/ez-rich-toolbar-item.entry.js +23 -0
  196. package/dist/esm/ez-search-plus.entry.js +18 -9
  197. package/dist/esm/ez-search-result-list.entry.js +24 -7
  198. package/dist/esm/ez-search.entry.js +8 -9
  199. package/dist/esm/ez-sidebar-navigator.entry.js +5 -7
  200. package/dist/esm/ez-skeleton.entry.js +5 -3
  201. package/dist/esm/ez-sortable-list.entry.js +12 -5
  202. package/dist/esm/ez-split-button.entry.js +5 -4
  203. package/dist/esm/ez-split-item.entry.js +6 -2
  204. package/dist/esm/ez-tag.entry.js +34 -0
  205. package/dist/esm/ez-text-area.entry.js +34 -27
  206. package/dist/esm/ez-text-input.entry.js +2 -1
  207. package/dist/esm/ez-tile-medium.entry.js +75 -0
  208. package/dist/esm/ez-tile.entry.js +58 -0
  209. package/dist/esm/ez-time-input.entry.js +12 -10
  210. package/dist/esm/{ez-filter-input_2.entry.js → ez-tooltip.entry.js} +3 -124
  211. package/dist/esm/ez-tree.entry.js +12 -1
  212. package/dist/esm/ez-underface.entry.js +31 -0
  213. package/dist/esm/ez-upload.entry.js +17 -11
  214. package/dist/esm/ezui.js +5 -1
  215. package/dist/esm/filter-column.entry.js +8 -4
  216. package/dist/esm/index-76eedf30.js +3681 -0
  217. package/dist/esm/index-baa5e267.js +48 -16
  218. package/dist/esm/loader.js +5 -1
  219. package/dist/esm/purify-34e6ff6f.js +1357 -0
  220. package/dist/esm/{search-column-e609d513.js → search-column-661e2324.js} +10 -6
  221. package/dist/ezui/ezui.esm.js +1 -1
  222. package/dist/ezui/p-0759b307.entry.js +1 -0
  223. package/dist/ezui/p-085f83e2.entry.js +1 -0
  224. package/dist/ezui/p-103f5cdd.entry.js +7 -0
  225. package/dist/ezui/p-112455b1.js +1 -0
  226. package/dist/ezui/p-125275fa.entry.js +1 -0
  227. package/dist/ezui/p-18f6793e.entry.js +1 -0
  228. package/dist/ezui/p-199a1a34.entry.js +1 -0
  229. package/dist/ezui/p-1acc6061.entry.js +1 -0
  230. package/dist/ezui/p-20c024f7.entry.js +1 -0
  231. package/dist/ezui/p-21b252e4.entry.js +1 -0
  232. package/dist/ezui/p-287329d1.entry.js +1 -0
  233. package/dist/ezui/p-37076ba1.js +1 -0
  234. package/dist/ezui/p-3e7351ee.entry.js +1 -0
  235. package/dist/ezui/p-3e767a74.js +1 -0
  236. package/dist/ezui/p-4a6f4a80.entry.js +1 -0
  237. package/dist/ezui/p-53bc30a1.entry.js +1 -0
  238. package/dist/ezui/{p-4c01e506.entry.js → p-54a346fc.entry.js} +46 -46
  239. package/dist/ezui/p-603ef267.entry.js +1 -0
  240. package/dist/ezui/p-6369a0cd.entry.js +1 -0
  241. package/dist/ezui/p-689a2ab3.entry.js +1 -0
  242. package/dist/ezui/p-6a5c9445.entry.js +1 -0
  243. package/dist/ezui/p-6b71a749.entry.js +1 -0
  244. package/dist/ezui/p-6d596a5a.entry.js +1 -0
  245. package/dist/ezui/p-6fd4535f.entry.js +1 -0
  246. package/dist/ezui/p-75bf01eb.entry.js +1 -0
  247. package/dist/ezui/p-79044c3e.entry.js +1 -0
  248. package/dist/ezui/p-80461324.entry.js +1 -0
  249. package/dist/ezui/p-871777a5.entry.js +1 -0
  250. package/dist/ezui/{p-69937816.entry.js → p-8afb6e8a.entry.js} +1 -1
  251. package/dist/ezui/p-8ee9f175.entry.js +1 -0
  252. package/dist/ezui/p-91c9d50e.entry.js +1 -0
  253. package/dist/ezui/p-93e1c917.entry.js +1 -0
  254. package/dist/ezui/p-9fedd404.js +1 -0
  255. package/dist/ezui/p-a3ada561.entry.js +1 -0
  256. package/dist/ezui/p-a3b18ddc.entry.js +1 -0
  257. package/dist/ezui/p-b1e45320.js +1 -0
  258. package/dist/ezui/p-b31dc417.js +1 -0
  259. package/dist/ezui/p-b9c271a0.entry.js +1 -0
  260. package/dist/ezui/p-bc8d5a6a.entry.js +1 -0
  261. package/dist/ezui/p-bdacdc6d.entry.js +1 -0
  262. package/dist/ezui/p-beb42de1.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/types/components/ez-alert-list/ez-alert-list.d.ts +2 -1
  280. package/dist/types/components/ez-avatar/ez-avatar.d.ts +2 -0
  281. package/dist/types/components/ez-calendar/ez-calendar.d.ts +2 -3
  282. package/dist/types/components/ez-chip/ez-chip.d.ts +4 -0
  283. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +2 -0
  284. package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +2 -0
  285. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +9 -2
  286. package/dist/types/components/ez-date-input/ez-date-input.d.ts +2 -0
  287. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +2 -0
  288. package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -2
  289. package/dist/types/components/ez-double-list/ez-double-list.d.ts +2 -0
  290. package/dist/types/components/ez-empty-card/ez-empty-card.d.ts +18 -0
  291. package/dist/types/components/ez-file-item/ez-file-item.d.ts +2 -0
  292. package/dist/types/components/ez-form/ez-form.d.ts +1 -0
  293. package/dist/types/components/ez-form-view/fieldbuilder/templates/RichText.tpl.d.ts +2 -0
  294. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +5 -0
  295. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
  296. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
  297. package/dist/types/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.d.ts +1 -1
  298. package/dist/types/components/ez-grid/controller/ag-grid/utils/buildLocaleText.d.ts +66 -0
  299. package/dist/types/components/ez-grid/ez-grid.d.ts +2 -2
  300. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +2 -0
  301. package/dist/types/components/ez-grid/subcomponents/selection-counter.d.ts +2 -0
  302. package/dist/types/components/ez-grid/subcomponents/utils/selectionCounterUtils.d.ts +2 -2
  303. package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +2 -0
  304. package/dist/types/components/ez-list/ez-list.d.ts +2 -1
  305. package/dist/types/components/ez-modal/ez-modal.d.ts +2 -0
  306. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
  307. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +2 -0
  308. package/dist/types/components/ez-number-input/ez-number-input.d.ts +2 -0
  309. package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +1 -0
  310. package/dist/types/components/ez-rich-text/ez-link-builder/ez-link-builder.d.ts +19 -0
  311. package/dist/types/components/ez-rich-text/ez-rich-text.d.ts +105 -0
  312. package/dist/types/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.d.ts +31 -0
  313. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.d.ts +5 -0
  314. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.d.ts +5 -0
  315. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.d.ts +11 -0
  316. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.d.ts +5 -0
  317. package/dist/types/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.d.ts +35 -0
  318. package/dist/types/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.d.ts +39 -0
  319. package/dist/types/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.d.ts +1 -0
  320. package/dist/types/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.d.ts +1 -0
  321. package/dist/types/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.d.ts +1 -0
  322. package/dist/types/components/ez-search/ez-search.d.ts +2 -3
  323. package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +4 -1
  324. package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +4 -1
  325. package/dist/types/components/ez-sidebar-navigator/ez-sidebar-navigator.d.ts +2 -0
  326. package/dist/types/components/ez-skeleton/ez-skeleton.constants.d.ts +0 -1
  327. package/dist/types/components/ez-skeleton/ez-skeleton.d.ts +2 -1
  328. package/dist/types/components/ez-sortable-list/ez-sortable-list.d.ts +2 -0
  329. package/dist/types/components/ez-split-button/ez-split-button.d.ts +2 -2
  330. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +2 -0
  331. package/dist/types/components/ez-tag/ez-tag.d.ts +23 -0
  332. package/dist/types/components/ez-text-area/ez-text-area.d.ts +6 -3
  333. package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +2 -0
  334. package/dist/types/components/ez-tile/ez-tile.d.ts +58 -0
  335. package/dist/types/components/ez-tile-medium/ez-tile-medium.d.ts +98 -0
  336. package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -1
  337. package/dist/types/components/ez-tree/ez-tree.d.ts +2 -0
  338. package/dist/types/components/ez-tree/types/Tree.d.ts +1 -0
  339. package/dist/types/components/ez-underface/ez-underface.d.ts +23 -0
  340. package/dist/types/components/ez-upload/ez-upload.d.ts +3 -1
  341. package/dist/types/components.d.ts +714 -2
  342. package/dist/types/global/app-init.d.ts +1 -0
  343. package/dist/types/utils/ApplicationUtils.d.ts +3 -1
  344. package/dist/types/utils/constants.d.ts +0 -1
  345. package/dist/types/utils/i18n/elanguages.d.ts +5 -0
  346. package/dist/types/utils/i18n/i18nUtils.d.ts +2 -0
  347. package/dist/types/utils/i18n/index.d.ts +5 -0
  348. package/dist/types/utils/i18n/locales/en-us.d.ts +280 -0
  349. package/dist/types/utils/i18n/locales/es-es.d.ts +280 -0
  350. package/dist/types/utils/i18n/locales/pt-br.d.ts +280 -0
  351. package/dist/types/utils/i18n/translations.d.ts +840 -0
  352. package/dist/types/utils/index.d.ts +1 -1
  353. package/dist/types/utils/searchColumn/search-column.d.ts +0 -2
  354. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -0
  355. package/package.json +9 -2
  356. package/react/components.d.ts +13 -0
  357. package/react/components.js +13 -0
  358. package/react/components.js.map +1 -1
  359. package/dist/assets/actions-sprite.svg +0 -257
  360. package/dist/collection/components/assets/actions-sprite.svg +0 -257
  361. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +0 -75
  362. package/dist/collection/components/ez-sidebar-navigator/messages/constants.js +0 -5
  363. package/dist/ezui/p-0306dff7.entry.js +0 -1
  364. package/dist/ezui/p-07894c4a.entry.js +0 -1
  365. package/dist/ezui/p-09de35a2.entry.js +0 -1
  366. package/dist/ezui/p-0d9856a4.entry.js +0 -1
  367. package/dist/ezui/p-1276ef79.entry.js +0 -1
  368. package/dist/ezui/p-1eb34cad.entry.js +0 -1
  369. package/dist/ezui/p-2187f86c.js +0 -1
  370. package/dist/ezui/p-26685c50.entry.js +0 -1
  371. package/dist/ezui/p-2b42abbb.entry.js +0 -1
  372. package/dist/ezui/p-2b4df33d.entry.js +0 -1
  373. package/dist/ezui/p-33326ac5.entry.js +0 -1
  374. package/dist/ezui/p-35115d5d.entry.js +0 -1
  375. package/dist/ezui/p-3ba9565c.entry.js +0 -1
  376. package/dist/ezui/p-496f7832.entry.js +0 -1
  377. package/dist/ezui/p-4b67138e.entry.js +0 -1
  378. package/dist/ezui/p-4bd6dd6a.entry.js +0 -1
  379. package/dist/ezui/p-555c9018.entry.js +0 -1
  380. package/dist/ezui/p-57363cfd.entry.js +0 -1
  381. package/dist/ezui/p-58f69d24.entry.js +0 -1
  382. package/dist/ezui/p-59561756.entry.js +0 -7
  383. package/dist/ezui/p-5eea9886.js +0 -1
  384. package/dist/ezui/p-61d3a77b.entry.js +0 -1
  385. package/dist/ezui/p-63cb493e.entry.js +0 -1
  386. package/dist/ezui/p-6e429cff.entry.js +0 -1
  387. package/dist/ezui/p-7019f782.entry.js +0 -1
  388. package/dist/ezui/p-77a4bd35.entry.js +0 -1
  389. package/dist/ezui/p-7ab19270.entry.js +0 -1
  390. package/dist/ezui/p-7eae6986.entry.js +0 -1
  391. package/dist/ezui/p-9478b13b.entry.js +0 -1
  392. package/dist/ezui/p-9567b31a.entry.js +0 -1
  393. package/dist/ezui/p-998afb6a.entry.js +0 -1
  394. package/dist/ezui/p-a148e994.entry.js +0 -1
  395. package/dist/ezui/p-a3bf8cf1.entry.js +0 -1
  396. package/dist/ezui/p-bac0f920.entry.js +0 -1
  397. package/dist/ezui/p-bff24a7b.js +0 -1
  398. package/dist/ezui/p-cb75eb46.entry.js +0 -1
  399. package/dist/ezui/p-d47dabdf.entry.js +0 -1
  400. package/dist/ezui/p-da1b4a38.entry.js +0 -1
  401. package/dist/ezui/p-dc73e1fe.entry.js +0 -1
  402. package/dist/ezui/p-e06a9886.entry.js +0 -1
  403. package/dist/ezui/p-e4528470.entry.js +0 -1
  404. package/dist/ezui/p-e6a9041d.entry.js +0 -1
  405. package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +0 -2
  406. package/dist/types/components/ez-sidebar-navigator/messages/constants.d.ts +0 -5
@@ -1 +0,0 @@
1
- import{r as t,c as i,f as o,h as e,g as a}from"./p-23a36bb6.js";import{D as n}from"./p-ab574d59.js";import{FloatingManager as l,ElementIDUtils as r,KeyboardManager as d}from"@sankhyalabs/core";import{F as c}from"./p-dc628ed3.js";class s{constructor(t,i,o,e,a,n,l,r,d,c){this.title=t,this.message=i,this.dialogType=o,this.confirm=e,this.icon=a,this.labelCancel=n,this.labelConfirm=l,this.btnConfirmDanger=r,this.callBack=d,this.beforeClose=c}}const h=class{constructor(o){t(this,o),this.ezCancel=i(this,"ezCancel",7),this.ezAccept=i(this,"ezAccept",7),this.PRIMARY_BUTTON_ID="EZ_DIALOG_PRIMARY_BUTTON",this.labelConfirm="Sim",this.labelCancel="Não",this.btnConfirmDanger=!1,this._messageQueue=[],this._canFocusOnPrimaryBtn=!1,this.confirm=!1,this.dialogType=void 0,this.message=void 0,this.opened=!1,this.personalizedIconPath=void 0,this.ezTitle=void 0,this.beforeClose=void 0}observeConfig(t,i){this.manageOverflow(),t&&!i&&(this._canFocusOnPrimaryBtn=!0)}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=l.subscribeOverlayControl(this._overlayRef):l.unsubscribeOverlayControl(this._overlayRef||this._overlayId)}handleButtonClick(t){this._currentMessage.beforeClose&&!1===this._currentMessage.beforeClose(t)||(this.opened=this._messageQueue.length>0,this._currentMessage.callBack&&this._currentMessage.callBack(t),t?this.ezAccept.emit(t):this.ezCancel.emit(t),this._currentMessage=this._messageQueue.shift(),o(this))}async show(t,i,o,e,a,n,l,r,d){return this.opened=!0,new Promise((c=>{this._messageQueue.push(new s(t,i,o,e,a,n,l,r,c,d))}))}isCritical(t){return t===n.CRITICAL}getIconElement(t){if(t.dialogType===n.DEFAULT)return;const i=this.getIconClass(t.dialogType);return e("div",{class:`changeable__icon__container ${i}`},e("ez-icon",{class:"changeable__icon",size:"small",iconName:this.getIconName(t)}))}getIconClass(t){return this.isCritical(t)?"title-icon--critical":t===n.SUCCESS?"title-icon--success":t===n.WARN?"title-icon--warn":""}getIconName(t){return t.icon?t.icon:this.isCritical(t.dialogType)?"alert-circle-inverted":t.dialogType===n.WARN?"warning-outline":t.dialogType===n.SUCCESS?"check":void 0}getTypeIndicatorElement(t){if(t.dialogType!==n.DEFAULT)return e("div",{class:this.getClassIconIndicator(t.dialogType)})}getClassIconIndicator(t){return this.isCritical(t)?"dialog__critical--indicator":t==n.SUCCESS?"dialog__success--indicator":t==n.WARN?"dialog__warning--indicator":""}getClassContainer(t){return(t.dialogType||n.DEFAULT)===n.DEFAULT?"dialog__container dialog__container--default":"dialog__container"}getClassTitleLabel(t){return null==this.getIconElement(t)?"title title__label title__label--no-icon":"title title__label"}componentWillRender(){this._currentMessage||(this._messageQueue.length>0?this._currentMessage=this._messageQueue.pop():this.opened&&(this._currentMessage=new s(this.ezTitle,this.message,this.dialogType,this.confirm,this.personalizedIconPath,this.labelCancel,this.labelConfirm,this.btnConfirmDanger,null,this.beforeClose)))}componentDidLoad(){r.addIDInfo(this._element),this._keyboardManager=new d({propagate:!1,element:this._element}).bind("Enter",(()=>this.handleButtonClick(!0)),{description:"Botão de confirmação ou OK",element:this._element}).bind("Escape",(()=>this.handleButtonClick(!1)),{description:"Botão de fechar ou x",element:this._element}).bind("Esc",(()=>this.handleButtonClick(!1)),{description:"Botão de fechar ou x",element:this._element})}componentDidRender(){this.manageOverlay(),this.focusOnDialog(),this.handleFocusOnPrimaryButton()}focusOnDialog(){const t=this._element.shadowRoot.querySelector(".overlay .dialog");t instanceof HTMLDivElement&&(t.style.outline="none",this._lastActiveElement=document.activeElement,t.focus())}handleFocusOnPrimaryButton(){this._canFocusOnPrimaryBtn&&(this.focusOnPrimaryButton(),this._canFocusOnPrimaryBtn=!1)}focusOnPrimaryButton(){const t=this._element.shadowRoot.querySelector(`#${this.PRIMARY_BUTTON_ID}`),i=null==t?void 0:t.shadowRoot.querySelector("button");requestAnimationFrame((()=>{null==i||i.focus()}))}disconnectedCallback(){var t;c.resolveFocus(this._lastActiveElement),this._lastActiveElement=void 0,null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}render(){return this.opened&&this._currentMessage?e("div",{class:"overlay",ref:t=>this._overlayRef=t},e("div",{tabindex:"-1",class:"dialog"},this.getTypeIndicatorElement(this._currentMessage),e("div",{class:this.getClassContainer(this._currentMessage)},e("div",{class:"title__container"},e("div",{class:"title__box"},this.getIconElement(this._currentMessage),e("div",{class:this.getClassTitleLabel(this._currentMessage),innerHTML:this._currentMessage.title,"data-element-id":r.getInternalIDInfo("title")})),e("button",{class:"btn-close",onClick:()=>this.handleButtonClick(!1),"data-element-id":r.getInternalIDInfo("buttonClose")})),e("div",{class:"message",innerHTML:this._currentMessage.message,"data-element-id":r.getInternalIDInfo("message")}),this._currentMessage.confirm&&e("div",{class:"button-yes-no__container"},e("ez-button",{class:"button__cancel","data-element-id":r.getInternalIDInfo("cancel"),label:this._currentMessage.labelCancel,onClick:()=>this.handleButtonClick(!1)}),e("ez-button",{id:this.PRIMARY_BUTTON_ID,class:this._currentMessage.btnConfirmDanger?"button__confirm--danger":"button__confirm","data-element-id":r.getInternalIDInfo("confirm"),label:this._currentMessage.labelConfirm,onClick:()=>this.handleButtonClick(!0)})),!this._currentMessage.confirm&&e("div",{class:"button__confirm--container"},e("ez-button",{id:this.PRIMARY_BUTTON_ID,label:"Ok","data-element-id":r.getInternalIDInfo("ok"),class:"button__confirm",onClick:()=>this.handleButtonClick(!0)}))))):null}get _element(){return a(this)}static get watchers(){return{opened:["observeConfig"]}}};h.style=':host{--dialog__container-padding:var(--space--md, 20px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--dialog__title--font-pattern:var(--font-pattern, "Roboto");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, "Roboto");--dialog__body--text-shadow:var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--medium, 12px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--dialog-z-index:var(--elevation--100, 100);--dialog--warning__image:url(\'data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>\');--dialog--critical__image:url(\'data: image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"><path d="M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z"/></svg>\')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__container--default{border-radius:6px 6px 6px 6px}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:var(--space--medium);overflow-y:auto}.changeable__icon__container{background:var(--dialog__warning--background-color);display:flex;justify-content:center;align-items:center;min-width:26px;min-height:26px;border-radius:50%}.changeable__icon{--ez-icon--color:var(--dialog__icon--color)}.changeable__icon__container.title-icon--critical{background-color:var(--dialog__critical--background-color)}.changeable__icon__container.title-icon--success{background-color:var(--dialog__success--background-color)}.changeable__icon__container.title-icon--warn{background-color:var(--dialog__warning--background-color)}.changeable__icon__container.title-icon--warn ez-icon{transform:translateY(-1px)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);color:var(--title--primary)}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title__label{padding-left:var(--dialog__title--padding-left)}.title__label--no-icon{padding-left:0}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:\'\';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{h as ez_dialog}
@@ -1 +0,0 @@
1
- import{h as e,r as a,c as t,g as n,H as r}from"./p-23a36bb6.js";import{ObjectUtils as o,StringUtils as l,UserInterface as i,ElementIDUtils as s}from"@sankhyalabs/core";import{R as d}from"./p-5eea9886.js";import{C as c}from"./p-b853763b.js";function m(a,t,n,r,o){return e("div",{class:"ez-col ez-col--sd-12 ez-align--middle ez-padding-bottom--large"},e("ez-check",{enabled:!n,label:t,mode:o?c.SWITCH:c.REGULAR,"data-field-name":a,"data-context-name":r,key:a}))}function u(a,t,n,r,o,l,i){return e("div",{class:"ez-col ez-col--sd-12"},e("ez-number-input",{class:"ez-input__no-margin",enabled:!n,label:t,precision:r,prettyPrecision:o,"data-field-name":a,"data-context-name":l,key:a,canShowError:i}))}const h=({name:a,label:t,readOnly:n,contextName:r,canShowError:o,props:l})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-text-input",{class:"ez-input__no-margin",label:t,"data-field-name":a,"data-context-name":r,key:a,enabled:!n,canShowError:o,mask:null==l?void 0:l.mask,"clean-value-mask":null==l?void 0:l.cleanValueMask})),p=new Map;p.set(i.CHECKBOX,(e=>m(e.name,e.label,e.readOnly,e.contextName,!1))),p.set(i.SWITCH,(e=>m(e.name,e.label,e.readOnly,e.contextName,!0))),p.set(i.OPTIONSELECTOR,(({name:a,label:t,readOnly:n,required:r,props:o,contextName:l,canShowError:i})=>{const s=null==o?void 0:o.options;let d;if("string"==typeof s){const e=JSON.parse(s);d=Object.keys(e).map((a=>({value:a,label:e[a]})))}else d=s;return e("div",{class:"ez-col ez-col--sd-12"},e("ez-combo-box",{class:"ez-input__no-margin",enabled:!n,suppressEmptyOption:r,label:t,"data-field-name":a,"data-context-name":l,key:a,options:d,canShowError:i}))})),p.set(i.DATE,(({name:a,label:t,readOnly:n,canShowError:r})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-date-input",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,key:a,canShowError:r})))),p.set(i.TIME,(({name:a,label:t,readOnly:n,canShowError:r,props:o})=>{var l;return e("div",{class:"ez-col ez-col--sd-12"},e("ez-time-input",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,key:a,canShowError:r,"show-seconds":null!==(l=null==o?void 0:o.showSeconds)&&void 0!==l&&l}))})),p.set(i.ELAPSEDTIME,(({name:a,label:t,readOnly:n,canShowError:r})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-time-input",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,key:a,canShowError:r,showSeconds:!0})))),p.set(i.DATETIME,(({name:a,label:t,readOnly:n,contextName:r,canShowError:o})=>e("div",{class:"ez-col ez-col--sd-12"},e("ez-date-time-input",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,"data-context-name":r,key:a,canShowError:o})))),p.set(i.FILE,(({name:a,label:t,readOnly:n,contextName:r,props:l})=>{const i=o.removeEmptyValues({subTitle:l.subTitle,requestHeaders:Object.assign(Object.assign({},l.STORAGESTRATEGY&&{STORAGESTRATEGY:l.STORAGESTRATEGY}),l.INTERNAL_FILENAME&&{INTERNAL_FILENAME:l.INTERNAL_FILENAME})});return e("div",{class:"ez-col ez-col--sd-12"},e("ez-upload",Object.assign({enabled:!n,label:t,"data-field-name":a,"data-context-name":r,key:a},i)))})),p.set(i.DECIMALNUMBER,(({name:e,label:a,readOnly:t,props:n,contextName:r,canShowError:o})=>{var l,i;const s=Number(null!==(l=null==n?void 0:n.precision)&&void 0!==l?l:2);return u(e,a,t,s,Number(null!==(i=null==n?void 0:n.prettyPrecision)&&void 0!==i?i:s),r,o)})),p.set(i.INTEGERNUMBER,(({name:e,label:a,readOnly:t,contextName:n,canShowError:r})=>u(e,a,t,0,0,n,r))),p.set(i.SEARCH,(({name:a,label:t,readOnly:n,required:r,contextName:o,canShowError:l,optionLoader:i,props:s})=>{var d;return e("div",{class:"ez-col ez-col--sd-12"},e("ez-search",{class:"ez-input__no-margin",enabled:!n,suppressEmptyOption:r,label:t,"data-field-name":a,"data-context-name":o,key:a,canShowError:l,optionLoader:i,ignoreLimitCharsToSearch:null!==(d=null==s?void 0:s.ignoreLimitCharsToSearch)&&void 0!==d&&d}))})),p.set(i.SEARCHPLUS,(({name:a,label:t,readOnly:n,contextName:r,canShowError:o,optionLoader:i,props:s})=>{const d=!l.isEmpty(null==s?void 0:s.DESCRIPTIONFIELD);return e("div",{class:"ez-col ez-col--sd-12"},e("ez-search-plus",{class:"ez-input__no-margin",enabled:!n,label:t,"data-field-name":a,"data-context-name":r,key:a,canShowError:o,optionLoader:i,hideDescriptionInput:!d}))})),p.set(i.LONGTEXT,(({name:a,label:t,readOnly:n,contextName:r,rows:o,canShowError:l})=>e("div",{class:"ez-col ez-col--sd-12",key:a},e("ez-text-area",{enabled:!n,label:t,"data-field-name":a,"data-context-name":r,rows:o,canShowError:l}))));const w=e=>{const a=p.get(e.userInterface)||h,t=e.required?`${e.label}${d}`:e.label,n=a(Object.assign(Object.assign({},e),{label:t}));return n.t["data-form-item"]=e.name,n};class v{constructor(e){this.elem=e}addRightElement(e){this.removeRightElement(),e.classList.add("ez-padding-left--small"),e.setAttribute("data-custom-item","true"),this.elem.classList.add("ez-col--nowrap"),this.elem.appendChild(e)}removeRightElement(){Array.from(this.elem.querySelectorAll('[data-custom-item="true"]')).forEach((e=>e.remove()))}get fieldName(){return this.elem.getAttribute("data-form-item")}}class z{constructor(e,a){this.items=new Map,this.formId=a,e.forEach((e=>{const a=new v(e);this.items.set(a.fieldName,a)}))}getItem(e){return this.items.get(e)}get formName(){return this.formId}}const b=class{constructor(e){a(this,e),this.ezContentReady=t(this,"ezContentReady",7),this.formItemsReady=t(this,"formItemsReady",7),this._customEditors=new Map,this.fields=void 0,this.selectedRecord=void 0,this.singleColumn=!0}async showUp(){this._element.scrollIntoView({behavior:"smooth",block:"start"})}async addCustomEditor(e,a,t){const n=new Map(this._customEditors);n.set(e,{customEditor:a,detailContext:t}),this._customEditors=n}async setFieldProp(e,a,t){const n=this.fields.map((n=>(n.name!==e||!t&&0!==t||(n.props=n.props||{},n.props[a]=t),n)));this.fields=[...n]}groupFields(e){const a=new Map;return e.forEach((e=>{const t=e.group;if(t){let n=a.get(t);null==n&&(n=[],a.set(t,n)),n.push(e)}else a.set(e.name,e)})),a}componentDidRender(){this._formElements=Array.from(this._element.querySelectorAll("[data-field-name]")),this.ezContentReady.emit(this._formElements);const e=new z(Array.from(this._element.querySelectorAll("[data-form-item]")));this.formItemsReady.emit(e)}isItemFullWidth(e){return[i.FILE,i.LONGTEXT].includes(e)}buildFormItemElement(a,t=""){var n;if(this.isItemFullWidth(a.userInterface)&&(t+=" input-full_width"),this._customEditors.has(a.name)){const r=null===(n=this._formElements.map((e=>({name:e.dataset.fieldName,value:e.value}))).find((e=>e.name===a.name)))||void 0===n?void 0:n.value,o=this._customEditors.get(a.name).customEditor;return e("div",{class:t},e("ez-custom-form-input",{"data-field-name":a.name,customEditor:o,formViewField:a,builderFallback:w,value:r,selectedRecord:this.selectedRecord}))}return e("div",{class:t},w(a))}render(){if(s.addIDInfoIfNotExists(this._element,"ezFormView"),null==this.fields)return;let a=[],t=Array.from(this.groupFields(this.fields).entries()).map((([t,n])=>{if(Array.isArray(n))return e("ez-collapsible-box",{id:`group-${t}`,label:t,"header-size":"large",key:t},e("div",{class:`form-view__content ${this.singleColumn&&"form-view__content--single-column"}`},n.map((e=>this.buildFormItemElement(e)))));a.push(n)})),n=a.map((e=>this.buildFormItemElement(e))),o=e("div",{class:`form-view__content ${this.singleColumn&&"form-view__content--single-column"}`},n);return e(r,null,o,t)}get _element(){return n(this)}};b.style=".sc-ez-form-view-h{display:flex;flex-wrap:wrap;width:100%;--ez-form-view__item--min-width:220px;--ez-form-view__item--max-width:440px;--ez-form-view__item--width:var(--space--small);--ez-form-view__item--padding:var(--space--small)}.form-view__content.sc-ez-form-view{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));gap:var(--ez-form-view__item--width);padding-inline:var(--ez-form-view__item--padding);width:100%}.form-view__content--single-column.sc-ez-form-view{grid-template-columns:repeat(1, minmax(var(--ez-form-view__item--min-width), var(--ez-form-view__item--max-width)))}.input-full_width.sc-ez-form-view{grid-column:1 / -1;width:100%}";export{b as ez_form_view}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s,H as e,g as h}from"./p-23a36bb6.js";import{C as o}from"./p-ec7db713.js";import{ObjectUtils as r,StringUtils as n,ElementIDUtils as a}from"@sankhyalabs/core";import{A as l}from"./p-2187f86c.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-30ffb9ed.js";import{R as c}from"./p-5eea9886.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._textEmptyList="Nenhum resultado encontrado",this._textEmptySearch="Nenhum resultado de {0} encontrado",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 r.objectToString(t||{})!==r.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),o=Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}),r=Object.assign(Object.assign({},o),{value:d(null==o?void 0:o.value),label:d(null==o?void 0:o.label)});if((null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(e=null==r?void 0:r.value)||void 0===e?void 0:e.toString())||null==h&&null!=r&&"value"in r){const t=(null==r?void 0:r.value)?r: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 o=n.decodeHtmlEntities(e[0].label);const r={value:null===(s=e[0].value)||void 0===s?void 0:s.replace(i,"").replace(h,""),label:null==o?void 0:o.replace(i,"").replace(h,"")};this.selectOption(r,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._textEmptyList))}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._textEmptySearch.replace("{0}",this.getFieldLabel()))}getFieldLabel(){var t;return null===(t=this.label)||void 0===t?void 0:t.replace(c,"").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}componentWillLoad(){if(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=>{a.addIDInfoIfNotExists(t,"itemSearch")}))}async componentDidLoad(){this._currentValue=this.value,o.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 a.addIDInfoIfNotExists(this.el,"input"),s(e,null,s("ez-text-input",{"data-element-id":a.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]},s("search-list",{ref:t=>this._searchList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this._textEmptyList,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}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e}from"./p-23a36bb6.js";import{UserInterface as s}from"@sankhyalabs/core";import{a as l}from"./p-5eea9886.js";const o=window,n=new CustomEvent("onSubmitFilter",{detail:{showToast:!0}}),a=class{constructor(e){t(this,e),this.applyFilterColumnOptions=i(this,"applyFilterColumnOptions",7),this.opened=!0,this.columnName=void 0,this.columnLabel=void 0,this.gridHeaderHidden=!1,this.noHeaderTaskBar=!1,this.dataSource=void 0,this.dataUnit=void 0,this.options=void 0,this.selectedItems=void 0,this.fieldDescriptor=void 0,this.useOptions=!1,this.isTextSearch=!1}async hide(){await this.ezPopoverElement.hide(),await this.clearConfigs()}async show(t){var i;this.canShow(t)&&(this.fieldDescriptor=null!==(i=t.fieldDescriptor)&&void 0!==i?i:this.dataUnit.getField(t.columnName),this.buildIsTextSearch(),this.columnName=t.columnName,this.columnLabel=t.columnLabel,await this.setOptions(t),await this.ezPopoverElement.showUnder(`filter-column-${t.columnName}-${this.dataUnit.dataUnitId}`))}buildIsTextSearch(){var t,i;const e=null!==(i=null===(t=this.fieldDescriptor)||void 0===t?void 0:t.userInterface)&&void 0!==i?i:s.SHORTTEXT;this.isTextSearch=!(e===s.DECIMALNUMBER||e===s.INTEGERNUMBER)}async clearConfigs(){var t;await(null===(t=this.ezMultiSelectionList)||void 0===t?void 0:t.clearFilteredOptions()),this.options=null,this.columnName=null}canShow(t){return!this.ezPopoverElement.opened||t.columnName!==this.columnName}submit(){this.applyFilterColumnOptions.emit({field:this.columnName,values:this.selectedItems}),o.dispatchEvent(n),this.hide()}changeSelectedItems(t){this.selectedItems=t}hasToUseOptions(){return this.fieldDescriptor.userInterface===s.OPTIONSELECTOR||this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}isCheckBoxOrSwitch(){return this.fieldDescriptor.userInterface===s.SWITCH||this.fieldDescriptor.userInterface===s.CHECKBOX}async setOptions(t){var i,e,s,o;const n=t.filteredOptions,a=this.hasToUseOptions();if(a)return this.useOptions=a,void(this.options=a?this.buildOptions(n):null!=n?n:null);let r=this.columnName;const h={onlyLabel:!1};(null===(e=null===(i=t.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e[l])&&(r=null===(o=null===(s=t.fieldDescriptor)||void 0===s?void 0:s.properties)||void 0===o?void 0:o[l],h.onlyLabel=!0);const c=await this.dataSource.getStaticOptions(r,h);if(null!=c){const t=new Set((n||[]).filter((t=>t.check)).map((t=>t.label)));return this.useOptions=!0,void(this.options=0===t.size?c:c.map((i=>Object.assign(Object.assign({},i),{check:t.has(i.label)}))))}this.useOptions=!1,this.options=null}buildOptions(t){var i,e;if(t&&t.length>0)return t;if(this.isCheckBoxOrSwitch())return[{label:"Sim",value:"true",check:!0},{label:"Não",value:"false",check:!0}];const s=null===(e=null===(i=this.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===e?void 0:e.options;if(Array.isArray(s))return s.map((t=>({label:t.value,value:t.value,check:!0})));const l=JSON.parse(s);return Object.keys(l).map((t=>({label:l[t],value:t,check:!0})))}handleEzVisibilityChange(t){!1===t.detail&&this.clearConfigs()}render(){return e("ez-popover-plus",{ref:t=>this.ezPopoverElement=t,class:"filter-column__popover","overlay-type":"none",autoClose:!0,onEzVisibilityChange:this.handleEzVisibilityChange.bind(this)},e("section",{class:"filter-column"},e("header",{class:"filter-column__header"},e("span",{class:"ez-text ez-text--medium filter-column__header-title"},"Filtro da coluna ",this.columnLabel),e("ez-button",{mode:"icon","icon-name":"close",class:"ez-button--tertiary",onClick:()=>this.hide()})),e("ez-multi-selection-list",{id:"filter-column-selection-list",columnName:this.columnName,dataSource:this.dataSource,options:this.options,useOptions:this.useOptions,ref:t=>this.ezMultiSelectionList=t,onChangeFilteredOptions:t=>this.changeSelectedItems(t.detail),isTextSearch:this.isTextSearch}),e("footer",{class:"filter-column__footer"},e("ez-button",{label:"Aplicar",class:"ez-button--primary",onClick:this.submit.bind(this)}))))}};a.style=".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}#filter-column-selection-list{--ez-multi-selection-default-height:unset}";export{a as filter_column}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,H as r,g as o}from"./p-23a36bb6.js";import{MaskFormatter as n,ElementIDUtils as s}from"@sankhyalabs/core";const a=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this._isOverflowing=!1,this.label=void 0,this.alternativePlaceholder=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.hasInvalid=!1,this.mask=void 0,this.cleanValueMask=!1,this.canShowError=!0,this.restrict=void 0,this.mode="regular",this.noBorder=!1,this.password=!1,this.autoFocus=!1,this.hasRightSlotContent=!1,this.forceLabelFloat=!1}observeHasInvalid(t,i){t!==i&&this.validateErrors()}observeMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new n(this.mask):this._maskFormatter.mask=this.mask)}observeValue(t,i){this._inputElem&&t!=i&&(this._inputElem.value=this.value||"",this.handleChange(),this.adjustFloatingLabel(),this.checkIsOverflowing(),this.isSlaveMode()||(this.errorMessage="",this.ezChange.emit(this.value)))}observeAlternativePlaceholder(t){this.forceLabelFloat=!!t}validateErrors(){const t=this.handleValidateErrorMessage(this.errorMessage);this.updateClassError(this.canShowError&&(t||this.hasInvalid))}handleValidateErrorMessage(t=this.errorMessage){return"string"==typeof t&&""!==t.trim()}updateClassError(t){this._inputElem&&(t?this._inputElem.classList.add("hasError"):this._inputElem.classList.remove("hasError"))}adjustFloatingLabel(){if(this.label&&this._labelElem){if(this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label"),this.forceLabelFloat)return;const t=this.value&&this.value.toString().length>0,i=this._labelElem.classList.contains("input__label--floated");t||this.isFocused()?i||this._labelElem.classList.add("input__label--floated"):i&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}isSlaveMode(){var t,i;return"true"===(null===(i=null===(t=this._hostElement)||void 0===t?void 0:t.dataset)||void 0===i?void 0:i.slaveMode)}adjustColorContentSlot(t=""){this._contentLeftSlot&&(this._contentLeftSlot.style.color=t)}adjustBorderInput(){this.noBorder&&this._inputElem.classList.add("input__slim--noborder")}async setFocus(t){const{selectText:i}=t||{};if(i&&this._inputElem.select(),this._inputElem.disabled)return this._inputElem.classList.add("focused"),void this._inputElem.scrollIntoView({behavior:"smooth",block:"start"});requestAnimationFrame((()=>this._inputElem.focus()))}async setBlur(){this._inputElem.blur()}async isInvalid(){return this.handleValidateErrorMessage()}handleFocusout(){const t=this._inputElem.value;if(t&&this._maskFormatter)try{this.cleanValueMask?this.applyMask(t):this._inputElem.value=this._maskFormatter.format(t)}catch(t){this.errorMessage=t.message}this.controlChangeValue(),this.adjustFloatingLabel(),this.adjustColorContentSlot()}isValidValue(t){return!this.restrict||Array.from(t).reduce(((t,i)=>t&&this.restrict.indexOf(i)>-1),!0)}controlChangeValue(){this._inputElem&&(this.value||"")!==this._inputElem.value&&(this.value=this.cleanValueMask?this._maskFormatter.removeMask(this._inputElem.value):this._inputElem.value)}applyMask(t){if(!t||""===t)return t;if(this._maskFormatter)try{const i=this._maskFormatter.applyMask(this._maskFormatter.removeMask(t));return this._inputElem?(this._inputElem.value=i,this._inputElem.value):(this.value=i,this.value)}catch(t){this.errorMessage=t.message}return t}handleChange(){if(!this._inputElem)return;const t=this._inputElem.value;this.isValidValue(t)?this._lastValidValue=t:this._inputElem.value=null==this._lastValidValue?"":this._lastValidValue,this.controlChangeValue()}handleSlotChange(t){var i;const e=t.target,r=e.assignedElements()[0];this.hasRightSlotContent=!1,r&&(r.style.position="absolute",r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.overflow="hidden",r.style.top="0px",r.style.width="var(--ez-text-input__icon--width)",r.style.height="slim"!=this.mode?"var(--ez-text-input--height)":"var(--ez-text-input--height--slim)","leftIcon"==e.name?(r.style.left="0px",r.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left"),this._contentLeftSlot=r):"rightIcon"==e.name&&(r.style.right="0px",r.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"),this._tooltipIconElem&&this._tooltipIconElem.classList.add("rightIconSlot"),this.hasRightSlotContent=(null===(i=r.children)||void 0===i?void 0:i.length)>0),e.name&&s.addIDInfo(r,e.name)),this.validateErrors()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated"),this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)")}getValue(){return this.mask&&this.cleanValueMask?this.applyMask(this.value):this.value}buildLabelClass(){let t=this.enabled?"input__label":"input__label input__label--disabled";return this.errorMessage&&(t+=" hasError"),this.forceLabelFloat&&(t+=" input__label--floated"),t}buildPlaceholder(){return this.alternativePlaceholder?this.alternativePlaceholder:"slim"===this.mode&&this.label?this.label:""}checkIsOverflowing(){this._isOverflowing=!!this._inputElem&&this._inputElem.offsetWidth<this._inputElem.scrollWidth}componentWillLoad(){if(this.observeMask(),this.value){if(this._maskFormatter)try{this.cleanValueMask?this.applyMask(this.value):this.value=this._maskFormatter.format(this.value)}catch(t){this.errorMessage=t.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}componentDidLoad(){var t;this.validateErrors(),this.observeMask(),this.adjustFloatingLabel(),this.adjustBorderInput(),this.checkIsOverflowing(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})})),null===(t=this._inputElem)||void 0===t||t.addEventListener("focus",(()=>{var t;this._inputElem.setSelectionRange(0,null===(t=this._inputElem)||void 0===t?void 0:t.value.length)})),this.onClickOutside=t=>{this._inputElem.contains(t.target)||this._inputElem.classList.remove("focused")},document.addEventListener("click",this.onClickOutside)}disconnectedCallback(){document.removeEventListener("click",this.onClickOutside)}componentDidRender(){this.adjustFloatingLabel()}render(){return s.addIDInfoIfNotExists(this._hostElement,"input"),e(r,{style:this._hostElement.classList.contains("grid_editor")?{height:"100%"}:null},e("slot",{name:"leftIcon",onSlotchange:t=>{this.handleSlotChange(t)}}),this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.buildLabelClass(),onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("input",{"data-element-id":s.getInternalIDInfo("input"),onFocus:()=>this.doFocus(),ref:t=>this._inputElem=t,type:this.password?"password":"text",class:"slim"===this.mode?"input--slim":"",placeholder:this.buildPlaceholder(),value:this.getValue(),disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),e("ez-tooltip",{anchoringElement:this._hostElement,message:this.getValue(),active:this._isOverflowing,useAnchorSize:!0}),this.canShowError&&"slim"!=this.mode&&this.errorMessage&&e("ez-tooltip",{type:"error",message:this.errorMessage},e("ez-icon",{class:`tooltip-icon ${this.errorMessage?"hasError":""} ${this.hasRightSlotContent?"rightIconSlot":""}`,"data-element-id":s.getInternalIDInfo("tooltip-icon"),ref:t=>this._tooltipIconElem=t,iconName:"alert-circle"})),e("slot",{name:"rightIcon",onSlotchange:t=>{this.handleSlotChange(t)}}," "))}get _hostElement(){return o(this)}static get watchers(){return{hasInvalid:["observeHasInvalid"],errorMessage:["observeHasInvalid"],canShowError:["observeHasInvalid"],mask:["observeMask"],value:["observeValue"],alternativePlaceholder:["observeAlternativePlaceholder"]}}};a.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:30px;--ez-text-input--height--slim:32px;--ez-text-input__min-width:0px;--ez-text-input__max-width:100%;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--border-top-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-left-radius:var(--ez-text-input--border-radius);--ez-text-input--border-top-right-radius:var(--ez-text-input--border-radius);--ez-text-input--border-bottom-right-radius:var(--ez-text-input--border-radius);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__margin-bottom:var(--space--small);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__placeholder--color:var(--text--secondary, #a2abb9);--ez-text-input__tooltip_icon--error--color:var(--color-alert--error-800,#BD0025);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);--ez-text-input__tooltip-icon--spacing:var(--space--large);--ez-text-input__tooltip-icon---width:var(--space--large);--ez-text-input__tooltip-icon---horizontal-margin:var(--space--medium, 12px);--ez-text-input__tooltip-icon---vertical-margin:10px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width);min-width:var(--ez-text-input__min-width);max-width:var(--ez-text-input__max-width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;height:var(--ez-text-input--height);border-top-left-radius:var(--ez-text-input--border-top-left-radius);border-bottom-left-radius:var(--ez-text-input--border-bottom-left-radius);border-top-right-radius:var(--ez-text-input--border-top-right-radius);border-bottom-right-radius:var(--ez-text-input--border-bottom-right-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding);margin-bottom:var(--ez-text-input__margin-bottom)}input.no--margin{--ez-text-input__margin-bottom:0}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}input:focus{outline:none;border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.focused{border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--left.hasError{padding-right:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.icon--right.hasError{padding-right:calc(var(--ez-text-input__icon--width) + var(--ez-text-input__tooltip-icon--spacing))}input.hasError{color:var(--ez-text-input--color);border:var(--border--medium, 2px solid);border-color:var(--ez-text-input__input--error--border-color);padding-right:calc(var(--ez-text-input__tooltip-icon---width) + (2*var(--ez-text-input__tooltip-icon---horizontal-margin)))}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.hasError{color:var(--ez-text-input__tooltip_icon--error--color)}.input__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(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label.hasError{width:calc(100% - 2*(var(--ez-text-input__tooltip-icon--spacing)))}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right.hasError{width:calc(100% - var(--ez-text-input__icon--width) - var(--ez-text-input__tooltip-icon--spacing))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder,.input--slim:-moz-placeholder,.input--slim::-moz-placeholder,.input--slim:-ms-input-placeholder,.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input__placeholder--color)}.input--slim:disabled::-webkit-input-placeholder,.input--slim:disabled:-moz-placeholder,.input--slim:disabled::-moz-placeholder,.input--slim:disabled:-ms-input-placeholder,.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}ez-icon.tooltip-icon{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;width:var(--ez-text-input__tooltip-icon---width);height:22px;margin:var(--ez-text-input__tooltip-icon---vertical-margin) var(--ez-text-input__tooltip-icon---horizontal-margin);top:0;right:0;z-index:var(--elevation--4);border-radius:var(--ez-text-input--border-radius)}ez-icon.tooltip-icon.rightIconSlot{right:var(--ez-text-input__tooltip-icon--spacing)}ez-icon.tooltip-icon.hasError{--ez-icon--color:var(--ez-text-input__tooltip_icon--error--color)}";export{a as ez_text_input}
@@ -1 +0,0 @@
1
- import{r as t,c as d,h as i,H as o,g as l}from"./p-23a36bb6.js";import{FloatingManager as e,KeyboardManager as a}from"@sankhyalabs/core";const n=class{constructor(i){t(this,i),this.ezCloseModal=d(this,"ezCloseModal",7),this.ezOpenModal=d(this,"ezOpenModal",7),this.ezModalAction=d(this,"ezModalAction",7),this.modalSize=void 0,this.align=void 0,this.heightMode="regular",this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.closeOutsideLeave=!1,this.scrim="medium"}observeOpened(){this.opened?this._overlayId=e.subscribeOverlayControl(this._modalRef):e.unsubscribeOverlayControl(this._modalRef||this._overlayId)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}componentDidLoad(){this.observeOpened(),this._keyboardManager=new a({propagate:!1,element:this._element,enableShadowDom:!0}).bind("Enter",this.ezModalAction.emit.bind("OK")).bind("Escape",(()=>this.closeModal())).bind("Esc",(()=>this.closeModal()))}componentDidRender(){this.modalFocus()}disconnectedCallback(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}modalFocus(){this.opened&&requestAnimationFrame((()=>{const t=this._element.shadowRoot.querySelector("ez-modal-container");this._modalRef&&null===t&&this._modalRef.focus()}))}onMouseDownHandler(t){this.closeOutsideClick&&t.target===this._overlay&&this.closeModal()}onMouseLeaveHandler(){this.closeOutsideLeave&&this.closeModal()}render(){const t="left"===this.align?"left":"right";return i(o,null,this.opened?i("div",{ref:t=>this._modalRef=t,class:`modal modal__screen-${this.scrim} ${"regular"===this.heightMode?"modal__vertical-padding":""}`,onMouseDown:t=>this.onMouseDownHandler(t),tabIndex:-1},i("div",{class:`modal__container modal__container--${t}`,ref:t=>this._overlay=t},i("div",{onMouseLeave:()=>this.onMouseLeaveHandler(),class:`modal__content ${"regular"===this.heightMode?`modal__content--${t}`:""} ${this.modalSize}`},i("slot",null)))):void 0)}get _element(){return l(this)}static get watchers(){return{opened:["observeOpened"]}}};n.style=":host{--ez-modal-z-index:var(--elevation--22, 22);--ez-modal-vertical-padding:var(--space--large, 24px);--ez-modal-content-padding:24px;display:block}.modal{position:fixed;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;outline:none}.modal__screen-light{background:rgba(0, 4, 12, 0.1)}.modal__screen-none{background:none}.modal__screen-medium{backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.modal__vertical-padding{padding:var(--ez-modal-vertical-padding) 0}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;box-sizing:border-box;max-height:100%;height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:var(--ez-modal-content-padding);box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";export{n as ez_modal}
@@ -1 +0,0 @@
1
- import{UserInterface as t,Action as s,StringUtils as i,ApplicationContext as e,ObjectUtils as a,WaitingChangeException as n,DataUnitAction as r}from"@sankhyalabs/core";import{A as h}from"./p-2187f86c.js";import{h as o}from"./p-23a36bb6.js";const c=(s,i)=>{let e,a,{name:n,label:r,group:h}=Object.assign({},i),{readOnly:o,required:c}=Object.assign({},i);return s&&(r=r||s.label,n=n||s.name,c=s.required||(null==i?void 0:i.required),o=s.readOnly||(null==i?void 0:i.readOnly),e=s.properties,a=s.userInterface),{name:n,label:r,group:h,readOnly:o,required:c,props:e,userInterface:a||t.SHORTTEXT}};class l{constructor(t,s,i){this._dataUnit=t,this._validationSource=s,this._validator=i}validate(t=!0){return new Promise(((s,i)=>{const e=this._dataUnit.getModifiedRecords();for(let s=0;s<e.length;s++){const a=e[s],n=[];let r=this.validateRequired(a);if(r&&!r.isValid&&n.push(r),this._validator&&(r=this._validator.validateRecord(a),r&&!r.isValid&&n.push(r)),n.length>0){if(!t&&n[0].invalidFields.length>0){this._validationSource.markAsInvalid(n[0].invalidFields[0],a.__record__id__),i();break}this.processValidationResult(n,a.__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:"Essa informação é obrigatória"})}})),i.length>0)return{isValid:!1,invalidFields:i,infoMessage:"Há pelo menos um campo obrigatório não preenchido."}}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&&h.info(t.infoMessage),t.errorMessage){const{errorTitle:s,errorMessage:i}=t;h.error(s,i)}}))}markAsInvalid(t,s){this._dataUnit.setInvalidField(t.name,t.message,s),this._validationSource.markAsInvalid(t,s)}}class d{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 l(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 n=e[0][t];return!e.every((s=>a.equals(s[t],n)))}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,u.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 n("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,a;if("EZ-UPLOAD"===s.nodeName){s.urlUpload=e.getContextValue("__EZUI__UPLOAD__ADD__URL__"),s.urlDelete=e.getContextValue("__EZUI__UPLOAD__DEL__URL__");const n=this._dataUnit.getField(t),r=null===(i=n.properties)||void 0===i?void 0:i.DESTINATION;r&&(s.requestHeaders={XTRAINF:`{"destination": "${r}"}`}),s.maxFiles=(null===(a=n.properties)||void 0===a?void 0:a.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 r(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 r(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 u{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,a){const n=new u;return n.field=s,n.fieldName=t,n.startChangeListener=s=>{n.listen&&i(t,s.detail)},n.field.addEventListener(n.startChangeEventName,n.startChangeListener),n.cancelWaitingChangeListener=()=>{n.listen&&e(t)},n.field.addEventListener(n.cancelWaitingChangeEventName,n.cancelWaitingChangeListener),n.changeListener=s=>{n.listen&&a(t,s.detail)},n.field.addEventListener(n.changeEventName,n.changeListener),n}}const _="Buscar campos (ctrl+F)",p="Buscar colunas (Ctrl+F)",f="ctrl+f",v=240,A=String(210)+"px",g=(t,s,i)=>o("ez-search",{class:"ez-padding--small ez-margin--none",style:{"--ez-text-input__margin-bottom":"0px","--ez-search--width":A},canShowError:!1,showSelectedValue:!1,showOptionValue:!1,suppressEmptyOption:!0,label:t.label,value:null,optionLoader:s,onEzChange:t=>i(t.detail),ignoreLimitCharsToSearch:!0}),m=async t=>{requestAnimationFrame((async()=>{if(t){const s=t.t;if(!s)return;s.value=null,await s.setFocus()}}))};export{d as D,_ as L,l as R,f as S,g as a,c as b,v as c,p as d,m as f}
@@ -1 +0,0 @@
1
- import{r as t,c as a,h as e,H as r,g as o}from"./p-23a36bb6.js";import{ElementIDUtils as i}from"@sankhyalabs/core";const s=class{constructor(e){t(this,e),this.ezChange=a(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,a,e,r;"string"==typeof this.errorMessage&&""!==this.errorMessage?(null===(t=this._container)||void 0===t||t.classList.add("hasError"),null===(a=this._messageBoxElem)||void 0===a||a.classList.add("hasError")):(null===(e=this._container)||void 0===e||e.classList.remove("hasError"),null===(r=this._messageBoxElem)||void 0===r||r.classList.remove("hasError"))}observeValue(t,a){this._inputElem&&t!=a&&(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,a;this.autoRows?(null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this.initializeResizeObserver()):null===(a=this._resizeObserver)||void 0===a||a.disconnect()}observeAlternativePlaceholder(t){this.forceLabelFloat=!!t}async appendTextToSelection(t){var a,e,r,o;const i=this._inputElem.selectionStart,s=this._inputElem.selectionEnd,l=null!==(e=null===(a=this.value)||void 0===a?void 0:a.substring(0,i))&&void 0!==e?e:"",h=null!==(o=null===(r=this.value)||void 0===r?void 0:r.substring(s))&&void 0!==o?o:"";this.value=`${l}${t}${h}`;const n=i+t.length;this._inputElem.setSelectionRange(i===s?n:i,n),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,a=this._labelElem.classList.contains("textarea__label--floated");t||this.isFocused()?a||this._labelElem.classList.add("textarea__label--floated"):a&&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 a=Math.max((null==t?void 0:t.clientHeight)||0,this.LINE_HEIGHT);if(a>0){const t=Math.floor(a/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}componentDidLoad(){this.observeErrorMessage(),this.adjustFloatingLabel(),this.observeMode(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus()}))}render(){return i.addIDInfoIfNotExists(this._hostElement,"input"),e(r,null,e("div",{class:"textarea "+(this.enabled?"":"textarea--disabled"),ref:t=>this._container=t},this.label&&"slim"!=this.mode?e("label",{ref:t=>this._labelElem=t,class:this.buildLabelClass(),onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,e("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,"textarea--resizable":this.enableResize},placeholder:this.buildPlaceholder(),onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},rows:this.rows})),this.canShowError&&"slim"!=this.mode&&e("span",{class:"message-box",ref:t=>this._messageBoxElem=t,title:this.errorMessage},this.errorMessage))}get _hostElement(){return o(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],mode:["observeMode"],rows:["observeRows"],autoRows:["observeAutoRows"],alternativePlaceholder:["observeAlternativePlaceholder"]}}};s.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);display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{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--resizable{resize:vertical}.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}";export{s as ez_text_area}