@sankhyalabs/ezui 5.22.0-dev.11 → 5.22.0-dev.110

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 (409) hide show
  1. package/dist/cjs/{CSSVarsUtils-10c9d5b4.js → CSSVarsUtils-f20973d1.js} +1 -0
  2. package/dist/cjs/DataBinder-c2060474.js +446 -0
  3. package/dist/cjs/FocusResolver-885f2173.js +35 -0
  4. package/dist/cjs/FormLayout-c2451c7f.js +7 -0
  5. package/dist/cjs/{constants-2714478b.js → constants-569271bc.js} +4 -0
  6. package/dist/cjs/ez-actions-button.cjs.entry.js +6 -4
  7. package/dist/cjs/ez-badge.cjs.entry.js +14 -2
  8. package/dist/cjs/ez-button.cjs.entry.js +11 -5
  9. package/dist/cjs/ez-card-item_2.cjs.entry.js +270 -0
  10. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-collapsible-box.cjs.entry.js +3 -2
  13. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +388 -0
  14. package/dist/cjs/ez-combo-box.cjs.entry.js +78 -156
  15. package/dist/cjs/ez-date-input.cjs.entry.js +15 -19
  16. package/dist/cjs/ez-date-time-input.cjs.entry.js +14 -20
  17. package/dist/cjs/ez-dialog.cjs.entry.js +14 -7
  18. package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
  19. package/dist/cjs/{ez-dropdown.cjs.entry.js → ez-dropdown_2.cjs.entry.js} +75 -8
  20. package/dist/cjs/ez-filter-input.cjs.entry.js +129 -0
  21. package/dist/cjs/ez-form-view.cjs.entry.js +41 -27
  22. package/dist/cjs/ez-form.cjs.entry.js +34 -327
  23. package/dist/cjs/ez-grid.cjs.entry.js +15147 -69779
  24. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-list.cjs.entry.js +258 -211
  26. package/dist/cjs/ez-modal-container.cjs.entry.js +2 -2
  27. package/dist/cjs/ez-modal.cjs.entry.js +13 -4
  28. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
  29. package/dist/cjs/ez-number-input.cjs.entry.js +15 -3
  30. package/dist/cjs/ez-popover-plus_3.cjs.entry.js +209 -0
  31. package/dist/cjs/ez-popup.cjs.entry.js +25 -3
  32. package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
  33. package/dist/cjs/ez-search-plus.cjs.entry.js +369 -0
  34. package/dist/cjs/ez-search-result-list.cjs.entry.js +98 -0
  35. package/dist/cjs/ez-search.cjs.entry.js +123 -191
  36. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
  38. package/dist/cjs/ez-split-item.cjs.entry.js +8 -4
  39. package/dist/cjs/ez-split-panel.cjs.entry.js +68 -6
  40. package/dist/cjs/ez-text-area.cjs.entry.js +68 -6
  41. package/dist/cjs/ez-text-input.cjs.entry.js +85 -16
  42. package/dist/cjs/ez-time-input.cjs.entry.js +7 -1
  43. package/dist/cjs/ez-tooltip.cjs.entry.js +130 -0
  44. package/dist/cjs/ez-tree.cjs.entry.js +5 -4
  45. package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
  46. package/dist/cjs/ezui.cjs.js +1 -1
  47. package/dist/cjs/filter-column.cjs.entry.js +10 -47
  48. package/dist/cjs/floating-ui.dom.esm-017acce4.js +1404 -0
  49. package/dist/cjs/index-a7b0c73d.js +30 -10
  50. package/dist/cjs/loader.cjs.js +1 -1
  51. package/dist/cjs/searchFormatters-b7e1ed1e.js +23 -0
  52. package/dist/cjs/{ICustomRender-6fafffce.js → types-6a5df0c7.js} +8 -0
  53. package/dist/collection/collection-manifest.json +20 -2
  54. package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
  55. package/dist/collection/components/ez-badge/ez-badge.css +12 -1
  56. package/dist/collection/components/ez-badge/ez-badge.js +31 -1
  57. package/dist/collection/components/ez-button/ez-button.css +24 -14
  58. package/dist/collection/components/ez-button/ez-button.js +12 -6
  59. package/dist/collection/components/ez-card-item/ez-card-item.css +58 -10
  60. package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
  61. package/dist/collection/components/ez-check/ez-check.css +1 -6
  62. package/dist/collection/components/ez-chip/ez-chip.css +5 -1
  63. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
  64. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css +205 -0
  65. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +426 -0
  66. package/dist/collection/components/ez-combo-box/ez-combo-box.css +8 -247
  67. package/dist/collection/components/ez-combo-box/ez-combo-box.js +121 -165
  68. package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
  69. package/dist/collection/components/ez-date-input/ez-date-input.js +40 -19
  70. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +1 -1
  71. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +39 -20
  72. package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
  73. package/dist/collection/components/ez-dialog/ez-dialog.js +14 -16
  74. package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
  75. package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
  76. package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
  77. package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -8
  78. package/dist/collection/components/ez-filter-input/ez-filter-input.css +1 -1
  79. package/dist/collection/components/ez-filter-input/ez-filter-input.js +35 -4
  80. package/dist/collection/components/ez-form/ez-form.js +32 -4
  81. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +49 -6
  82. package/dist/collection/components/ez-form-view/ez-form-view.css +13 -2
  83. package/dist/collection/components/ez-form-view/ez-form-view.js +21 -2
  84. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +5 -2
  85. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
  86. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
  87. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +8 -4
  88. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
  89. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
  90. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
  91. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js +6 -0
  92. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -1
  93. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  94. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +387 -73
  95. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +170 -33
  96. package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -1
  97. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +244 -43
  98. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +16 -0
  99. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
  100. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +10 -0
  101. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +2 -0
  102. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
  103. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
  104. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +8 -1
  105. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js +15 -0
  106. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
  107. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +2 -0
  108. package/dist/collection/components/ez-grid/ez-grid.css +95 -10
  109. package/dist/collection/components/ez-grid/ez-grid.js +375 -12
  110. package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
  111. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +9 -46
  112. package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js +7 -54
  113. package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +20 -4
  114. package/dist/collection/components/ez-icon/ez-icon.css +156 -149
  115. package/dist/collection/components/ez-list/ez-list.css +5 -4
  116. package/dist/collection/components/ez-list/ez-list.js +301 -212
  117. package/dist/collection/components/ez-list/ezListHelper.js +85 -0
  118. package/dist/collection/components/ez-modal/ez-modal.css +7 -2
  119. package/dist/collection/components/ez-modal/ez-modal.js +14 -5
  120. package/dist/collection/components/ez-modal-container/ez-modal-container.css +1 -0
  121. package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -1
  122. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +3 -3
  123. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
  124. package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
  125. package/dist/collection/components/ez-number-input/ez-number-input.js +49 -1
  126. package/dist/collection/components/ez-popover-plus/ez-popover-plus.css +3 -0
  127. package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +434 -0
  128. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +67 -0
  129. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +527 -0
  130. package/dist/collection/components/ez-popup/ez-popup.css +8 -3
  131. package/dist/collection/components/ez-popup/ez-popup.js +44 -4
  132. package/dist/collection/components/ez-scroller/ez-scroller.css +4 -0
  133. package/dist/collection/components/ez-search/ez-search.css +2 -210
  134. package/dist/collection/components/ez-search/ez-search.js +205 -204
  135. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css +227 -0
  136. package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +289 -0
  137. package/dist/collection/components/ez-search/utils/searchFormatters.js +18 -0
  138. package/dist/collection/components/ez-search-plus/ez-search-plus.css +373 -0
  139. package/dist/collection/components/ez-search-plus/ez-search-plus.js +952 -0
  140. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +227 -0
  141. package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +279 -0
  142. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
  143. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
  144. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +4 -1
  145. package/dist/collection/components/ez-skeleton/ez-skeleton.css +54 -34
  146. package/dist/collection/components/ez-split-button/ez-split-button.css +52 -14
  147. package/dist/collection/components/ez-split-button/ez-split-button.js +3 -3
  148. package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
  149. package/dist/collection/components/ez-split-panel/ez-split-panel.js +106 -5
  150. package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
  151. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +14 -2
  152. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +22 -1
  153. package/dist/collection/components/ez-text-area/ez-text-area.css +78 -29
  154. package/dist/collection/components/ez-text-area/ez-text-area.js +104 -4
  155. package/dist/collection/components/ez-text-input/ez-text-input.css +124 -93
  156. package/dist/collection/components/ez-text-input/ez-text-input.js +145 -15
  157. package/dist/collection/components/ez-time-input/ez-time-input.js +24 -0
  158. package/dist/collection/components/ez-tooltip/ez-tooltip.css +60 -0
  159. package/dist/collection/components/ez-tooltip/ez-tooltip.js +287 -0
  160. package/dist/collection/components/ez-tree/ez-tree.js +21 -1
  161. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
  162. package/dist/collection/sw.js +46 -0
  163. package/dist/collection/utils/CSSVarsUtils.js +1 -0
  164. package/dist/collection/utils/FocusResolver.js +31 -0
  165. package/dist/collection/utils/constants.js +2 -0
  166. package/dist/collection/utils/form/DataBinder.js +25 -9
  167. package/dist/collection/utils/form/FormMetadata.js +2 -1
  168. package/dist/collection/utils/form/interfaces/FormLayout.js +5 -0
  169. package/dist/collection/utils/form/interfaces/index.js +1 -1
  170. package/dist/collection/utils/index.js +2 -0
  171. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
  172. package/dist/collection/utils/search/types.js +7 -0
  173. package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
  174. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
  175. package/dist/custom-elements/index.d.ts +48 -0
  176. package/dist/custom-elements/index.js +21426 -72860
  177. package/dist/esm/{CSSVarsUtils-71ce76be.js → CSSVarsUtils-acba92d7.js} +1 -0
  178. package/dist/esm/DataBinder-89946126.js +442 -0
  179. package/dist/esm/FocusResolver-1ccbf850.js +33 -0
  180. package/dist/esm/FormLayout-54092963.js +7 -0
  181. package/dist/esm/constants-b036528f.js +7 -0
  182. package/dist/esm/ez-actions-button.entry.js +6 -4
  183. package/dist/esm/ez-badge.entry.js +14 -2
  184. package/dist/esm/ez-button.entry.js +11 -5
  185. package/dist/esm/ez-card-item_2.entry.js +265 -0
  186. package/dist/esm/ez-check.entry.js +1 -1
  187. package/dist/esm/ez-chip.entry.js +1 -1
  188. package/dist/esm/ez-collapsible-box.entry.js +3 -2
  189. package/dist/esm/ez-combo-box-list_3.entry.js +382 -0
  190. package/dist/esm/ez-combo-box.entry.js +79 -157
  191. package/dist/esm/ez-date-input.entry.js +15 -19
  192. package/dist/esm/ez-date-time-input.entry.js +14 -20
  193. package/dist/esm/ez-dialog.entry.js +15 -8
  194. package/dist/esm/ez-double-list.entry.js +283 -0
  195. package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +75 -9
  196. package/dist/esm/ez-filter-input.entry.js +125 -0
  197. package/dist/esm/ez-form-view.entry.js +42 -28
  198. package/dist/esm/ez-form.entry.js +33 -326
  199. package/dist/esm/ez-grid.entry.js +15146 -69778
  200. package/dist/esm/ez-icon.entry.js +1 -1
  201. package/dist/esm/ez-list.entry.js +258 -211
  202. package/dist/esm/ez-modal-container.entry.js +2 -2
  203. package/dist/esm/ez-modal.entry.js +13 -4
  204. package/dist/esm/ez-multi-selection-list.entry.js +2 -2
  205. package/dist/esm/ez-number-input.entry.js +15 -3
  206. package/dist/esm/ez-popover-plus_3.entry.js +203 -0
  207. package/dist/esm/ez-popup.entry.js +25 -3
  208. package/dist/esm/ez-scroller_2.entry.js +3 -3
  209. package/dist/esm/ez-search-plus.entry.js +365 -0
  210. package/dist/esm/ez-search-result-list.entry.js +94 -0
  211. package/dist/esm/ez-search.entry.js +124 -192
  212. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  213. package/dist/esm/ez-split-button.entry.js +2 -2
  214. package/dist/esm/ez-split-item.entry.js +8 -4
  215. package/dist/esm/ez-split-panel.entry.js +69 -7
  216. package/dist/esm/ez-text-area.entry.js +68 -6
  217. package/dist/esm/ez-text-input.entry.js +85 -16
  218. package/dist/esm/ez-time-input.entry.js +7 -1
  219. package/dist/esm/ez-tooltip.entry.js +126 -0
  220. package/dist/esm/ez-tree.entry.js +5 -4
  221. package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
  222. package/dist/esm/ezui.js +1 -1
  223. package/dist/esm/filter-column.entry.js +10 -47
  224. package/dist/esm/floating-ui.dom.esm-5d3da819.js +1398 -0
  225. package/dist/esm/index-baa5e267.js +30 -10
  226. package/dist/esm/loader.js +1 -1
  227. package/dist/esm/searchFormatters-8229207e.js +20 -0
  228. package/dist/esm/{ICustomRender-875b5a40.js → types-6f6b2650.js} +9 -1
  229. package/dist/ezui/ezui.esm.js +1 -1
  230. package/dist/ezui/p-0bffeffc.entry.js +1 -0
  231. package/dist/ezui/p-0fa52b0f.entry.js +1 -0
  232. package/dist/ezui/p-173f68ea.js +1 -0
  233. package/dist/ezui/p-17de16e5.entry.js +1 -0
  234. package/dist/ezui/p-1a060042.entry.js +1 -0
  235. package/dist/ezui/p-1ec8bdd2.entry.js +309 -0
  236. package/dist/ezui/p-20c024f7.entry.js +1 -0
  237. package/dist/ezui/p-248d4f54.entry.js +1 -0
  238. package/dist/ezui/p-2872fd16.entry.js +1 -0
  239. package/dist/ezui/p-288631d1.entry.js +1 -0
  240. package/dist/ezui/p-2f45506d.entry.js +1 -0
  241. package/dist/ezui/p-3176a6ef.entry.js +1 -0
  242. package/dist/ezui/p-31b71e50.entry.js +1 -0
  243. package/dist/ezui/p-40a60148.js +1 -0
  244. package/dist/ezui/p-4e0628a7.entry.js +1 -0
  245. package/dist/ezui/p-56fe5341.entry.js +1 -0
  246. package/dist/ezui/p-5895e687.js +1 -0
  247. package/dist/ezui/p-5a14f506.entry.js +1 -0
  248. package/dist/ezui/p-5ec0ae79.entry.js +1 -0
  249. package/dist/ezui/p-5eea9886.js +1 -0
  250. package/dist/ezui/p-7e677b7b.entry.js +1 -0
  251. package/dist/ezui/{p-bf79aaa1.entry.js → p-7fdd479f.entry.js} +1 -1
  252. package/dist/ezui/p-80dfc50b.js +1 -0
  253. package/dist/ezui/p-81145609.entry.js +1 -0
  254. package/dist/ezui/p-84b1c99e.entry.js +1 -0
  255. package/dist/ezui/p-8ac8093c.entry.js +1 -0
  256. package/dist/ezui/p-9142b27a.entry.js +1 -0
  257. package/dist/ezui/p-9567b31a.entry.js +1 -0
  258. package/dist/ezui/p-9f22e1dc.entry.js +1 -0
  259. package/dist/ezui/p-a4cee65d.entry.js +1 -0
  260. package/dist/ezui/p-a64cfcfc.js +1 -0
  261. package/dist/ezui/p-bf9dec89.entry.js +1 -0
  262. package/dist/ezui/p-c1527804.entry.js +1 -0
  263. package/dist/ezui/p-c5df78be.entry.js +1 -0
  264. package/dist/ezui/p-cd07f8be.entry.js +1 -0
  265. package/dist/ezui/p-da1b4a38.entry.js +1 -0
  266. package/dist/ezui/p-dc628ed3.js +1 -0
  267. package/dist/ezui/p-dc73e1fe.entry.js +1 -0
  268. package/dist/ezui/{p-17be134a.entry.js → p-e06a9886.entry.js} +1 -1
  269. package/dist/ezui/p-e07e4671.js +1 -0
  270. package/dist/ezui/p-e3544d23.entry.js +1 -0
  271. package/dist/ezui/p-e6a9041d.entry.js +1 -0
  272. package/dist/ezui/p-e75c7a23.entry.js +1 -0
  273. package/dist/ezui/p-ea54d056.entry.js +1 -0
  274. package/dist/ezui/p-ec7db713.js +1 -0
  275. package/dist/ezui/p-ecaac11f.entry.js +1 -0
  276. package/dist/ezui/p-f4861c6a.entry.js +1 -0
  277. package/dist/ezui/p-f5a30e35.entry.js +1 -0
  278. package/dist/ezui/p-fa6732f2.entry.js +1 -0
  279. package/dist/types/components/ez-badge/ez-badge.d.ts +5 -0
  280. package/dist/types/components/ez-button/ez-button.d.ts +2 -1
  281. package/dist/types/components/ez-calendar/ez-calendar.d.ts +3 -3
  282. package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
  283. package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +104 -0
  284. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -15
  285. package/dist/types/components/ez-date-input/ez-date-input.d.ts +8 -3
  286. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +8 -3
  287. package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -1
  288. package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
  289. package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
  290. package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +4 -0
  291. package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +1 -1
  292. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +6 -1
  293. package/dist/types/components/ez-form/ez-form.d.ts +5 -1
  294. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
  295. package/dist/types/components/ez-form-view/ez-form-view.d.ts +4 -0
  296. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
  297. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.d.ts +2 -0
  298. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  299. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +75 -4
  300. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +42 -6
  301. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +26 -2
  302. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +34 -7
  303. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +4 -1
  304. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
  305. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  306. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
  307. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
  308. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +2 -1
  309. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
  310. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
  311. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.d.ts +3 -0
  312. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
  313. package/dist/types/components/ez-grid/ez-grid.d.ts +59 -1
  314. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +0 -11
  315. package/dist/types/components/ez-grid/utils/ColumnFilterManager.d.ts +1 -1
  316. package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +3 -0
  317. package/dist/types/components/ez-list/ez-list.d.ts +23 -2
  318. package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
  319. package/dist/types/components/ez-modal/ez-modal.d.ts +2 -1
  320. package/dist/types/components/ez-number-input/ez-number-input.d.ts +8 -0
  321. package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +74 -0
  322. package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +91 -0
  323. package/dist/types/components/ez-popup/ez-popup.d.ts +8 -1
  324. package/dist/types/components/ez-search/ez-search.d.ts +32 -18
  325. package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +23 -0
  326. package/dist/types/components/ez-search/utils/searchFormatters.d.ts +2 -0
  327. package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +184 -0
  328. package/dist/types/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.d.ts +26 -0
  329. package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -1
  330. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +11 -0
  331. package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
  332. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
  333. package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
  334. package/dist/types/components/ez-text-input/ez-text-input.d.ts +21 -2
  335. package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
  336. package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +53 -0
  337. package/dist/types/components/ez-tree/ez-tree.d.ts +4 -0
  338. package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
  339. package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
  340. package/dist/types/components.d.ts +1162 -72
  341. package/dist/types/utils/FocusResolver.d.ts +5 -0
  342. package/dist/types/utils/constants.d.ts +2 -0
  343. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
  344. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  345. package/dist/types/utils/form/interfaces/FormLayout.d.ts +4 -0
  346. package/dist/types/utils/form/interfaces/index.d.ts +1 -0
  347. package/dist/types/utils/index.d.ts +2 -0
  348. package/dist/types/utils/search/types.d.ts +12 -0
  349. package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
  350. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
  351. package/package.json +11 -3
  352. package/react/components.d.ts +62 -54
  353. package/react/components.js +8 -0
  354. package/react/components.js.map +1 -1
  355. package/react/react-component-lib/createComponent.d.ts +1 -1
  356. package/react/react-component-lib/createComponent.js.map +1 -1
  357. package/react/react-component-lib/createOverlayComponent.js.map +1 -1
  358. package/react/react-component-lib/interfaces.js +1 -0
  359. package/react/react-component-lib/utils/attachProps.d.ts +1 -1
  360. package/react/react-component-lib/utils/attachProps.js.map +1 -1
  361. package/react/react-component-lib/utils/dev.js.map +1 -1
  362. package/react/react-component-lib/utils/index.d.ts +2 -2
  363. package/react/react-component-lib/utils/index.js.map +1 -1
  364. package/dist/cjs/RecordValidationProcessor-4c893e04.js +0 -102
  365. package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -183
  366. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -206
  367. package/dist/cjs/ez-skeleton.cjs.entry.js +0 -67
  368. package/dist/esm/RecordValidationProcessor-b00b8b77.js +0 -99
  369. package/dist/esm/constants-4e0d35b7.js +0 -5
  370. package/dist/esm/ez-card-item_3.entry.js +0 -177
  371. package/dist/esm/ez-custom-form-input_2.entry.js +0 -201
  372. package/dist/esm/ez-skeleton.entry.js +0 -63
  373. package/dist/ezui/p-04f24913.js +0 -1
  374. package/dist/ezui/p-05e1f4e7.js +0 -1
  375. package/dist/ezui/p-072e6347.entry.js +0 -1
  376. package/dist/ezui/p-1285c902.entry.js +0 -1
  377. package/dist/ezui/p-13d2fe2d.entry.js +0 -1
  378. package/dist/ezui/p-2097d0cf.entry.js +0 -1
  379. package/dist/ezui/p-32e553e5.entry.js +0 -304
  380. package/dist/ezui/p-33286e5f.entry.js +0 -1
  381. package/dist/ezui/p-34b6916c.entry.js +0 -1
  382. package/dist/ezui/p-3b4eeeb6.entry.js +0 -1
  383. package/dist/ezui/p-3faa2b46.entry.js +0 -1
  384. package/dist/ezui/p-42533ea4.entry.js +0 -1
  385. package/dist/ezui/p-4607fb89.js +0 -1
  386. package/dist/ezui/p-49456b34.entry.js +0 -1
  387. package/dist/ezui/p-4d5235f1.entry.js +0 -1
  388. package/dist/ezui/p-5bd5e68f.entry.js +0 -1
  389. package/dist/ezui/p-650e4b6d.entry.js +0 -1
  390. package/dist/ezui/p-784fe207.entry.js +0 -1
  391. package/dist/ezui/p-7af81663.entry.js +0 -1
  392. package/dist/ezui/p-7bc07c31.entry.js +0 -1
  393. package/dist/ezui/p-84e439b9.entry.js +0 -1
  394. package/dist/ezui/p-85c8baae.entry.js +0 -1
  395. package/dist/ezui/p-8888d9ed.entry.js +0 -1
  396. package/dist/ezui/p-8d4d90ec.entry.js +0 -1
  397. package/dist/ezui/p-9050d2cd.entry.js +0 -1
  398. package/dist/ezui/p-922ac38b.entry.js +0 -1
  399. package/dist/ezui/p-9e11fc7b.js +0 -1
  400. package/dist/ezui/p-a31b9c90.entry.js +0 -1
  401. package/dist/ezui/p-af95cd16.entry.js +0 -1
  402. package/dist/ezui/p-bae4e180.entry.js +0 -1
  403. package/dist/ezui/p-baf80b13.entry.js +0 -1
  404. package/dist/ezui/p-bcb53f27.entry.js +0 -1
  405. package/dist/ezui/p-cdc472cc.entry.js +0 -1
  406. package/dist/ezui/p-d9401ea0.entry.js +0 -1
  407. package/dist/ezui/p-e85c48d7.entry.js +0 -1
  408. package/dist/ezui/p-ecc2c1ec.entry.js +0 -1
  409. package/dist/ezui/p-fcf0acce.entry.js +0 -1
@@ -28,6 +28,7 @@ class CSSVarsUtils {
28
28
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--focus--border-color');
29
29
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__icon--width');
30
30
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--focus--icon-color');
31
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__margin-bottom');
31
32
  }
32
33
  }
33
34
  static applyVarsButton(host, child) {
@@ -0,0 +1,442 @@
1
+ import { UserInterface, Action, StringUtils, ApplicationContext, WaitingChangeException, DataUnitAction } from '@sankhyalabs/core';
2
+ import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
3
+
4
+ const buildFieldMetadata = (descriptor, config) => {
5
+ let { name, label, group } = Object.assign({}, config);
6
+ let { readOnly, required } = Object.assign({}, config);
7
+ let props;
8
+ let userInterface;
9
+ if (descriptor) {
10
+ label = label || descriptor.label;
11
+ name = name || descriptor.name;
12
+ required = descriptor.required || (config === null || config === void 0 ? void 0 : config.required);
13
+ readOnly = descriptor.readOnly || (config === null || config === void 0 ? void 0 : config.readOnly);
14
+ props = descriptor.properties;
15
+ userInterface = descriptor.userInterface;
16
+ }
17
+ return {
18
+ name, label, group,
19
+ readOnly, required,
20
+ props,
21
+ userInterface: userInterface || UserInterface.SHORTTEXT,
22
+ };
23
+ };
24
+
25
+ class RecordValidationProcessor {
26
+ constructor(dataUnit, validationSource, validator) {
27
+ this._dataUnit = dataUnit;
28
+ this._validationSource = validationSource;
29
+ this._validator = validator;
30
+ }
31
+ validate(isSaving = true) {
32
+ return new Promise((accept, reject) => {
33
+ const records = this._dataUnit.getModifiedRecords();
34
+ for (let i = 0; i < records.length; i++) {
35
+ const record = records[i];
36
+ const invalidResults = [];
37
+ let validationResult = this.validateRequired(record);
38
+ if (validationResult && !validationResult.isValid) {
39
+ invalidResults.push(validationResult);
40
+ }
41
+ if (this._validator) {
42
+ validationResult = this._validator.validateRecord(record);
43
+ if (validationResult && !validationResult.isValid) {
44
+ invalidResults.push(validationResult);
45
+ }
46
+ }
47
+ if (invalidResults.length > 0) {
48
+ if (!isSaving && invalidResults[0].invalidFields.length > 0) {
49
+ this._validationSource.markAsInvalid(invalidResults[0].invalidFields[0], record.__record__id__);
50
+ reject();
51
+ break;
52
+ }
53
+ this.processValidationResult(invalidResults, record.__record__id__);
54
+ reject();
55
+ break;
56
+ }
57
+ }
58
+ return accept();
59
+ });
60
+ }
61
+ validateRequired(record) {
62
+ const requiredFields = this._validationSource.getRequiredFields();
63
+ const invalidFields = [];
64
+ new Set(requiredFields).forEach(field => {
65
+ const value = record[field];
66
+ if (value == undefined || value === "") {
67
+ const errorMessage = this._validationSource.getMessageForField(field, record.__record__id__);
68
+ if (errorMessage) {
69
+ invalidFields.push({ name: field, message: errorMessage });
70
+ }
71
+ else {
72
+ invalidFields.push({ name: field, message: "Essa informação é obrigatória" });
73
+ }
74
+ }
75
+ });
76
+ if (invalidFields.length > 0) {
77
+ return { isValid: false, invalidFields, infoMessage: "Há pelo menos um campo obrigatório não preenchido." };
78
+ }
79
+ return undefined;
80
+ }
81
+ processValidationResult(validationResult, recordId) {
82
+ validationResult.forEach(invalidResult => {
83
+ const invalidFields = invalidResult.invalidFields;
84
+ this._dataUnit.savingCanceled(invalidFields, recordId);
85
+ if (invalidFields) {
86
+ invalidFields.forEach(field => {
87
+ this.markAsInvalid(field, recordId);
88
+ });
89
+ }
90
+ if (invalidResult.infoMessage) {
91
+ ApplicationUtils.info(invalidResult.infoMessage);
92
+ }
93
+ if (invalidResult.errorMessage) {
94
+ const { errorTitle, errorMessage } = invalidResult;
95
+ ApplicationUtils.error(errorTitle, errorMessage);
96
+ }
97
+ });
98
+ }
99
+ markAsInvalid(field, recordId) {
100
+ this._dataUnit.setInvalidField(field.name, field.message, recordId);
101
+ this._validationSource.markAsInvalid(field, recordId);
102
+ }
103
+ }
104
+
105
+ class DataBinder {
106
+ constructor(dataUnit) {
107
+ this.onDataUnitEvent = (action) => {
108
+ var _a, _b;
109
+ switch (action.type) {
110
+ case Action.DATA_LOADED:
111
+ case Action.DATA_SAVED:
112
+ case Action.RECORDS_REMOVED:
113
+ case Action.RECORDS_ADDED:
114
+ case Action.RECORDS_COPIED:
115
+ case Action.EDITION_CANCELED:
116
+ case Action.SELECTION_CHANGED:
117
+ case Action.NEXT_SELECTED:
118
+ case Action.PREVIOUS_SELECTED:
119
+ this.clearInvalid();
120
+ case Action.DATA_CHANGED:
121
+ case Action.CHANGE_UNDONE:
122
+ case Action.CHANGE_REDONE:
123
+ case Action.RECORD_LOADED:
124
+ (_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
125
+ this.updateValue(field.fieldName, field.field);
126
+ });
127
+ this.clearFieldError(Object.keys(action.payload)[0]);
128
+ break;
129
+ case Action.FIELD_INVALIDATED:
130
+ (_b = this._fields) === null || _b === void 0 ? void 0 : _b.forEach(field => {
131
+ this.updateErrorMessage(field.fieldName, field.field);
132
+ });
133
+ break;
134
+ }
135
+ };
136
+ this._uuid = StringUtils.generateUUID();
137
+ this._fields = new Map();
138
+ this._dataUnit = dataUnit;
139
+ this.applyDefaultValues();
140
+ this._dataUnit.subscribe(this.onDataUnitEvent);
141
+ this._dataUnit.addInterceptor(this);
142
+ this.setContextDataBinder(dataUnit);
143
+ }
144
+ get dataBinderId() {
145
+ return this._uuid;
146
+ }
147
+ setContextDataBinder(dataUnit) {
148
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
149
+ const dataBinders = [...(dataBindersByDataUnit.get(dataUnit.dataUnitId) || []), this];
150
+ dataBindersByDataUnit.set(dataUnit.dataUnitId, dataBinders);
151
+ ApplicationContext.setContextValue("__DATABINDER_BY_DATAUNIT__", dataBindersByDataUnit);
152
+ }
153
+ applyDefaultValues() {
154
+ const recordIds = (this._dataUnit.getAddedRecords() || []).map(r => r.__record__id__);
155
+ if (recordIds.length > 0) {
156
+ const defaultValues = this.getDefaultValues();
157
+ if (defaultValues) {
158
+ Object.keys(defaultValues).forEach(field => {
159
+ this._dataUnit.setFieldValue(field, defaultValues[field], recordIds);
160
+ });
161
+ }
162
+ }
163
+ }
164
+ bind(fields, currentContextName, formMetadata, recordsValidator) {
165
+ fields.forEach(fieldElement => {
166
+ const { fieldName, contextName } = fieldElement.dataset;
167
+ if (contextName == undefined || contextName === currentContextName) {
168
+ this.updateBind(fieldName, fieldElement);
169
+ }
170
+ });
171
+ this._formMetadata = formMetadata;
172
+ this._recordValidatorProcessor = new RecordValidationProcessor(this._dataUnit, {
173
+ getRequiredFields: () => this.getFormRequiredFields(),
174
+ markAsInvalid: field => this.markInvalid(field),
175
+ getMessageForField: field => this.getErrorMessage(field),
176
+ }, recordsValidator);
177
+ }
178
+ getFormRequiredFields() {
179
+ return this._formMetadata.getRequiredFields();
180
+ }
181
+ disconnectDataUnit() {
182
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
183
+ const dataBinders = dataBindersByDataUnit.get(this._dataUnit.dataUnitId);
184
+ const dataBindersFiltered = dataBinders.filter((dataBinder) => dataBinder.dataBinderId !== this.dataBinderId);
185
+ dataBindersByDataUnit.set(this._dataUnit.dataUnitId, dataBindersFiltered);
186
+ ApplicationContext.setContextValue("__DATABINDER_BY_DATAUNIT__", dataBindersByDataUnit);
187
+ }
188
+ onDisconnectedCallback() {
189
+ this._dataUnit.unsubscribe(this.onDataUnitEvent);
190
+ this._dataUnit.removeInterceptor(this);
191
+ this.disconnectDataUnit();
192
+ }
193
+ getCurrentRecordId() {
194
+ const record = this._dataUnit.getSelectedRecord();
195
+ return record === null || record === void 0 ? void 0 : record.__record__id__;
196
+ }
197
+ markInvalid(field) {
198
+ if (this._fields.has(field.name)) {
199
+ const fieldElement = this._fields.get(field.name).field;
200
+ this.updateErrorMessage(field.name, fieldElement, field.message);
201
+ }
202
+ }
203
+ setFocus(fieldName) {
204
+ if (!this._fields.has(fieldName)) {
205
+ return;
206
+ }
207
+ const fieldElement = this._fields.get(fieldName).field;
208
+ if (typeof fieldElement["setFocus"] != "function") {
209
+ return;
210
+ }
211
+ fieldElement["setFocus"]();
212
+ }
213
+ clearInvalid(recordId) {
214
+ this._dataUnit.clearInvalid(recordId);
215
+ this._fields.forEach(fieldBinder => {
216
+ const fieldElement = fieldBinder.field;
217
+ fieldElement["errorMessage"] = "";
218
+ });
219
+ }
220
+ clearFieldError(fieldName) {
221
+ var _a;
222
+ const field = (_a = this._fields.get(fieldName)) === null || _a === void 0 ? void 0 : _a.field;
223
+ if (field["errorMessage"]) {
224
+ field["errorMessage"] = "";
225
+ this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
226
+ }
227
+ }
228
+ updateValue(fieldName, field) {
229
+ const bind = this._fields.get(fieldName);
230
+ try {
231
+ if (bind) {
232
+ bind.listen = false;
233
+ }
234
+ field["value"] = this._dataUnit.getFieldValue(fieldName);
235
+ this.updateErrorMessage(fieldName, field);
236
+ }
237
+ finally {
238
+ if (bind) {
239
+ bind.listen = true;
240
+ }
241
+ }
242
+ }
243
+ validate() {
244
+ return this._recordValidatorProcessor.validate();
245
+ }
246
+ static async validateByDataunit(dataUnit) {
247
+ try {
248
+ const dataBinders = this.getDataBindersByDataUnit(dataUnit);
249
+ await Promise.all(dataBinders.map((dataBinder) => dataBinder.validate()));
250
+ return true;
251
+ }
252
+ catch (_a) {
253
+ return false;
254
+ }
255
+ }
256
+ static getDataBindersByDataUnit(dataUnit) {
257
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__");
258
+ return (dataBindersByDataUnit === null || dataBindersByDataUnit === void 0 ? void 0 : dataBindersByDataUnit.get(dataUnit.dataUnitId)) || [];
259
+ }
260
+ updateErrorMessage(fieldName, field, message) {
261
+ if (message == undefined) {
262
+ message = this._dataUnit.getInvalidMessage(this.getCurrentRecordId(), fieldName);
263
+ }
264
+ if (!field["errorMessage"]) {
265
+ field["errorMessage"] = message;
266
+ }
267
+ }
268
+ getErrorMessage(fieldName) {
269
+ if (this._fields.has(fieldName)) {
270
+ const fieldElement = this._fields.get(fieldName).field;
271
+ return fieldElement["errorMessage"];
272
+ }
273
+ return undefined;
274
+ }
275
+ updateBind(fieldName, field) {
276
+ const oldBind = this._fields.get(fieldName);
277
+ if (oldBind) {
278
+ oldBind.destroy();
279
+ }
280
+ this.bindSearchOptionsLoader(fieldName, field);
281
+ field["value"] = this._dataUnit.getFieldValue(fieldName);
282
+ this.updateErrorMessage(fieldName, field);
283
+ this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName) => this.cancelWaitingChange(fieldName), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
284
+ this.applyEzUploadContext(fieldName, field);
285
+ }
286
+ changeStarted(fieldName, waitingChange) {
287
+ /**
288
+ * se o waitingChange não é blocante, add um event listener pra
289
+ * fazer o accept da promise
290
+ *
291
+ * se não tiver promise no waitingChange, eu crio uma e resolvo no bind
292
+ *
293
+ *
294
+ */
295
+ if (this._dataUnit.records.length === 0) {
296
+ this._dataUnit.addRecord();
297
+ }
298
+ if (!waitingChange.blocking && waitingChange.promise == undefined) {
299
+ const bind = this._fields.get(fieldName);
300
+ if (bind) {
301
+ waitingChange.promise = new Promise((resolve, reject) => {
302
+ bind.waitingChangePromiseResolve = resolve;
303
+ bind.waitingChangePromiseReject = reject;
304
+ });
305
+ }
306
+ }
307
+ this._dataUnit.startChange(fieldName, waitingChange);
308
+ }
309
+ cancelWaitingChange(fieldName) {
310
+ if (this._dataUnit.waitingForChange(fieldName)) {
311
+ this._dataUnit.cancelWaitingChange(fieldName);
312
+ const bind = this._fields.get(fieldName);
313
+ if (bind) {
314
+ bind.rejectWaitingChange(new WaitingChangeException("Change canceled", fieldName));
315
+ }
316
+ }
317
+ }
318
+ setFieldValue(fieldName, newValue) {
319
+ if (this._dataUnit.records.length === 0) {
320
+ this._dataUnit.addRecord();
321
+ }
322
+ this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
323
+ const record = this._dataUnit.getSelectedRecord();
324
+ this._dataUnit.setFieldValue(fieldName, newValue, record ? [record.__record__id__] : undefined);
325
+ if (this._dataUnit.waitingForChange(fieldName)) {
326
+ const bind = this._fields.get(fieldName);
327
+ if (bind) {
328
+ bind.acceptWaitingChange();
329
+ }
330
+ }
331
+ }
332
+ bindSearchOptionsLoader(fieldName, field) {
333
+ if ((field.nodeName === "EZ-SEARCH" || field.nodeName === "EZ-SEARCH-PLUS") && field["optionLoader"] == undefined) {
334
+ const isSearchPlus = field.nodeName === "EZ-SEARCH-PLUS";
335
+ const loader = isSearchPlus ? ApplicationContext.getContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__") : ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
336
+ if (loader) {
337
+ field["optionLoader"] = (arg, ctxOptions) => {
338
+ return loader(arg, fieldName, this._dataUnit, ctxOptions);
339
+ };
340
+ }
341
+ }
342
+ }
343
+ applyEzUploadContext(fieldName, field) {
344
+ var _a, _b;
345
+ if (field.nodeName === "EZ-UPLOAD") {
346
+ field["urlUpload"] = ApplicationContext.getContextValue("__EZUI__UPLOAD__ADD__URL__");
347
+ field["urlDelete"] = ApplicationContext.getContextValue("__EZUI__UPLOAD__DEL__URL__");
348
+ const descriptor = this._dataUnit.getField(fieldName);
349
+ const destination = (_a = descriptor.properties) === null || _a === void 0 ? void 0 : _a.DESTINATION;
350
+ if (destination) {
351
+ field["requestHeaders"] = { XTRAINF: `{"destination": "${destination}"}` };
352
+ }
353
+ field["maxFiles"] = ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.MAX_FILES) || 0;
354
+ }
355
+ }
356
+ interceptAction(action) {
357
+ if (action.type === Action.RECORDS_COPIED) {
358
+ const cleanFields = this._formMetadata.getCleanOnCopyFields();
359
+ if (cleanFields) {
360
+ const records = action.payload;
361
+ return new DataUnitAction(Action.RECORDS_COPIED, records.map(record => {
362
+ const newRecord = Object.assign({}, record);
363
+ cleanFields.forEach(fieldName => delete newRecord[fieldName]);
364
+ return newRecord;
365
+ }));
366
+ }
367
+ }
368
+ if (action.type === Action.SAVING_DATA) {
369
+ return new Promise((resolve) => {
370
+ this.validate()
371
+ .then(() => resolve(action))
372
+ .catch(() => { });
373
+ });
374
+ }
375
+ if (action.type === Action.RECORDS_ADDED) {
376
+ const defaultValues = this.getDefaultValues();
377
+ if (defaultValues) {
378
+ const records = action.payload;
379
+ return new DataUnitAction(Action.RECORDS_ADDED, records.map(record => {
380
+ return Object.assign(Object.assign({}, record), defaultValues);
381
+ }));
382
+ }
383
+ }
384
+ return action;
385
+ }
386
+ getDefaultValues() {
387
+ var _a;
388
+ const rawDefaultValues = (_a = this._formMetadata) === null || _a === void 0 ? void 0 : _a.getDefaultValues();
389
+ if (rawDefaultValues) {
390
+ const defaultValues = {};
391
+ for (const field in rawDefaultValues) {
392
+ defaultValues[field] = this._dataUnit.valueFromString(field, rawDefaultValues[field]);
393
+ }
394
+ return defaultValues;
395
+ }
396
+ return undefined;
397
+ }
398
+ }
399
+ class Bind {
400
+ constructor() {
401
+ this.listen = true;
402
+ this.startChangeEventName = "ezStartChange";
403
+ this.cancelWaitingChangeEventName = "ezCancelWaitingChange";
404
+ this.changeEventName = "ezChange";
405
+ }
406
+ destroy() {
407
+ this.field.removeEventListener(this.startChangeEventName, this.startChangeListener);
408
+ this.field.removeEventListener(this.cancelWaitingChangeEventName, this.cancelWaitingChangeListener);
409
+ this.field.removeEventListener(this.changeEventName, this.changeListener);
410
+ }
411
+ acceptWaitingChange() {
412
+ if (this.waitingChangePromiseResolve) {
413
+ this.waitingChangePromiseResolve();
414
+ this.waitingChangePromiseReject = undefined;
415
+ this.waitingChangePromiseResolve = undefined;
416
+ }
417
+ }
418
+ rejectWaitingChange(reason) {
419
+ if (this.waitingChangePromiseReject) {
420
+ this.waitingChangePromiseReject(reason);
421
+ this.waitingChangePromiseReject = undefined;
422
+ this.waitingChangePromiseResolve = undefined;
423
+ }
424
+ }
425
+ static create(fieldName, field, startChangeCallback, cancelWaitingChangeCallback, changeCallback) {
426
+ const b = new Bind();
427
+ b.field = field;
428
+ b.fieldName = fieldName;
429
+ b.startChangeListener = (evt) => { if (b.listen)
430
+ startChangeCallback(fieldName, evt.detail); };
431
+ b.field.addEventListener(b.startChangeEventName, b.startChangeListener);
432
+ b.cancelWaitingChangeListener = () => { if (b.listen)
433
+ cancelWaitingChangeCallback(fieldName); };
434
+ b.field.addEventListener(b.cancelWaitingChangeEventName, b.cancelWaitingChangeListener);
435
+ b.changeListener = (evt) => { if (b.listen)
436
+ changeCallback(fieldName, evt.detail); };
437
+ b.field.addEventListener(b.changeEventName, b.changeListener);
438
+ return b;
439
+ }
440
+ }
441
+
442
+ export { DataBinder as D, RecordValidationProcessor as R, buildFieldMetadata as b };
@@ -0,0 +1,33 @@
1
+ class FocusResolver {
2
+ static resolveFocus(element, selectText = true) {
3
+ var _a;
4
+ if (!element)
5
+ return;
6
+ (_a = element.focus) === null || _a === void 0 ? void 0 : _a.call(element);
7
+ if (element.setFocus) {
8
+ element.setFocus({ selectText });
9
+ return;
10
+ }
11
+ this.resolveFocusOnChild(element, selectText);
12
+ }
13
+ static resolveFocusOnChild(element, selectText = true) {
14
+ var _a, _b;
15
+ if (this.isGridCell(element) && element.firstElementChild) {
16
+ this.resolveFocusOnChild(element.firstElementChild);
17
+ return;
18
+ }
19
+ if (!element || !element.classList.contains('hydrated'))
20
+ return;
21
+ const firstChild = element.firstElementChild;
22
+ if (!(firstChild === null || firstChild === void 0 ? void 0 : firstChild.focus) && !(firstChild === null || firstChild === void 0 ? void 0 : firstChild.setFocus))
23
+ return;
24
+ (_a = firstChild === null || firstChild === void 0 ? void 0 : firstChild.focus) === null || _a === void 0 ? void 0 : _a.call(firstChild);
25
+ (_b = firstChild === null || firstChild === void 0 ? void 0 : firstChild.setFocus) === null || _b === void 0 ? void 0 : _b.call(firstChild, { selectText });
26
+ }
27
+ static isGridCell(element) {
28
+ var _a;
29
+ return ((_a = element === null || element === void 0 ? void 0 : element.getAttribute) === null || _a === void 0 ? void 0 : _a.call(element, "role")) === 'gridcell';
30
+ }
31
+ }
32
+
33
+ export { FocusResolver as F };
@@ -0,0 +1,7 @@
1
+ var FormLayout;
2
+ (function (FormLayout) {
3
+ FormLayout[FormLayout["CASCADE"] = 0] = "CASCADE";
4
+ FormLayout[FormLayout["SIDE_BY_SIDE"] = 1] = "SIDE_BY_SIDE";
5
+ })(FormLayout || (FormLayout = {}));
6
+
7
+ export { FormLayout as F };
@@ -0,0 +1,7 @@
1
+ const REQUIRED_INFO = " (obrigatório) *";
2
+ const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
3
+ const EZ_GRID_LOADING_SOURCE = "EZ_GRID_LOADING_SOURCE";
4
+ const PRESENTATION_COL_ID_PROP_NAME = "gridDescriptionColID";
5
+ const PRESENTATION_FROM_COL_PROP_NAME = "presentationFieldFrom";
6
+
7
+ export { DISTINCT_FILTER_NAME_PREFIX as D, EZ_GRID_LOADING_SOURCE as E, PRESENTATION_COL_ID_PROP_NAME as P, REQUIRED_INFO as R, PRESENTATION_FROM_COL_PROP_NAME as a };
@@ -1,10 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
2
2
  import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import './ApplicationUtils-eaf91331.js';
4
- import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
4
+ import { C as CSSVarsUtils } from './CSSVarsUtils-acba92d7.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
- import './ICustomRender-875b5a40.js';
7
+ import './types-6f6b2650.js';
8
+ import './FormLayout-54092963.js';
8
9
 
9
10
  const ezActionsButtonCss = ":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space--small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-small, 6px);--ez-actions-button__actions-list--z-index:var(--ez-elevation--8, 8);--ez-actions-button__actions-max-height:415px;--ez-actions-button__btn-action--min-width:'auto';--ez-actions-button__btn-action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.ez-actions-button__actions-list{display:flex;flex-direction:column;position:fixed;width:fit-content;height:fit-content;overflow-y:auto;scrollbar-width:thin;z-index:var(--ez-actions-button__actions-list--z-index);padding:var(--ez-actions-button__actions-list--padding);margin-top:var(--ez-actions-button__actions-list--top-margin);background-color:var(--ez-actions-button__actions-list--background-color);border-radius:var(--ez-actions-button__actions-list--border-radius);box-shadow:var(--ez-actions-button__actions-list--box-shadow)}.ez-actions-button__actions-list--max-height{max-height:var(--ez-actions-button__actions-max-height)}.ez-actions-button__actions-list--lowered{margin-top:calc(var(--ez-actions-button__actions-list--top-margin) + 6px)}.ez-actions-button__btn-action{--ez-button--justify-content:flex-start;--ez-button--width:100%;--ez-button--min-width:var(--ez-actions-button__btn-action--min-width);--ez-button--background-color:var(--ez-actions-button__btn-action--background-color);--ez-button--font-weight:var(--text-weight--medium, 400);--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__btn-action--spaced{--ez-button--padding-left:calc(var(--space--medium, 12px) + 24px)}.ez-actions-button__icon-right{margin-left:var(--space--small, 6px)}.ez-actions-button__icon-check,.ez-actions-button__icon-item{position:absolute;left:var(--space--medium, 12px)}.ez-actions-button__icon-check{color:var(--ez-button--hover-color)}.ez-actions-button__arrow{position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;width:0;height:0;z-index:calc(var(--ez-actions-button__actions-list--z-index) + 1);border-bottom:15px solid var(--ez-actions-button__btn-action--background-color)}.ez-actions-button__arrow--upped{margin-top:calc((var(--ez-actions-button__actions-list--top-margin) + 2px) * -1)}.ez-actions-button__arrow--small{margin-left:6px}.ez-actions-button__arrow--medium{margin-left:11px}.ez-actions-button__arrow--large{margin-left:13px}.ez-actions-button__arrow:only-child{display:none}.ez-actions-button__btn-transparent{--ez-button--background-color:transparent;--ez-button--hover--background-color:transparent;--ez-button--active--background-color:transparent;--ez-button--focus--border:none}.ez-actions-button__btn-label{--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__list-container{position:relative}.ez-actions-button--bottom-padding{padding-bottom:var(--space--small, 6px)}";
10
11
 
@@ -95,8 +96,9 @@ const EzActionsButton = class {
95
96
  var _a;
96
97
  const docWidth = document.body.clientWidth;
97
98
  const boundingList = (_a = this._actionsList) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
98
- if ((boundingList === null || boundingList === void 0 ? void 0 : boundingList.right) > docWidth) {
99
- return (docWidth - boundingList.width) + "px";
99
+ const rightOffset = docWidth - this._button.getBoundingClientRect().right;
100
+ if ((boundingList === null || boundingList === void 0 ? void 0 : boundingList.right) >= docWidth || (boundingList === null || boundingList === void 0 ? void 0 : boundingList.right) === (docWidth - rightOffset)) {
101
+ return (docWidth - boundingList.width - rightOffset) + "px";
100
102
  }
101
103
  return;
102
104
  }
@@ -11,7 +11,7 @@ var Sizes;
11
11
  Sizes["EXTRA_SMALL"] = "extra-small";
12
12
  })(Sizes || (Sizes = {}));
13
13
 
14
- const ezBadgeCss = ":host{--ez-badge--size-2xs:var(--space--2xs, 8px);--ez-badge--size-xs:var(--space--xs, 12px);--ez-badge--size-sm:var(--space--sm, 16px);--ez-badge--size-md:var(--space--md, 20px);--ez-badge--size-lg:var(--space--lg, 24px);--ez-badge--size-xl:var(--space--xl, 32px);--ez-badge--padding-2xs:0;--ez-badge--padding-xs:var(--space--nano, 2px);--ez-badge--padding-sm:calc(var(--space--nano, 2px) + 1px);--ez-badge--padding-md:var(--space--3xs, 4px);--ez-badge--padding-lg:calc(var(--space--3xs, 4px) + 2px);--ez-badge--padding-xl:var(--space--2xs);--ez-badge--border-radius:calc(var(--border--radius-medium, 12px) + 8px);--ez-badge--font-family:var(--font-pattern, Roboto);--ez-badge--font-weight-medium:var(--text-weight--medium, 400);--ez-badge--background-color:var(--color--primary, #008561);--ez-badge--border-none:0;--ez-badge--color:var(--text--inverted, #ffffff);--ez-badge--gap:calc(var(--ez-badge--padding-xs) + 1px);--ez-badge--font-size-md:var(--text--medium);--ez-badge--font-size-sm:var(--text--medium);--ez-badge--font-size-xs:var(--text--small)}ez-icon{--ez-icon--color:inherit}.badge{display:flex;justify-content:center;align-items:center;position:relative}.badge__content{font-family:var(--ez-badge--font-family, Roboto);font-weight:var(--ez-badge--font-weight-medium, 400);background-color:var(--ez-badge--background-color, #008561);border:var(--ez-badge--border-none, 0);color:var(--ez-badge--color, #ffffff);border-radius:var(--ez-badge--border-radius, 20px);gap:var(--ez-badge--gap, 3px);display:flex;justify-content:center;align-items:center}.badge__content--fill-xs{height:var(--ez-badge--size-xs, 12px);min-width:var(--ez-badge--size-xs, 12px)}.badge__content--fill-2xs{height:var(--ez-badge--size-2xs, 8px);min-width:var(--ez-badge--size-2xs, 8px)}.badge__content--text-md{height:calc(var(--ez-badge--size-md, 20px) - 2px);min-width:var(--ez-badge--size-sm, 20px);padding-top:var(--ez-badge--padding-sm);padding-bottom:var(--ez-badge--padding-sm);padding-right:var(--ez-badge--padding-xl);padding-left:var(--ez-badge--padding-xl);font-size:var(--ez-badge--font-size-md)}.badge__content--text-sm{height:calc(var(--ez-badge--size-sm, 16px) - 2px);min-width:var(--ez-badge--size-sm, 16px);padding-top:var(--ez-badge--padding-sm);padding-bottom:var(--ez-badge--padding-sm);padding-right:var(--ez-badge--padding-xl);padding-left:var(--ez-badge--padding-xl);font-size:var(--ez-badge--font-size-sm)}.badge__content--text-xs{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding-top:var(--ez-badge--padding-2xs);padding-bottom:var(--ez-badge--padding-2xs);padding-right:var(--ez-badge--padding-lg);padding-left:var(--ez-badge--padding-lg);font-size:var(--ez-badge--font-size-xs)}.badge__content--icon-lg{height:var(--ez-badge--size-lg, 24px);min-width:var(--ez-badge--size-lg, 24px);padding:var(--ez-badge--padding-md)}.badge__content--icon-md{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding:var(--ez-badge--padding-md)}.badge__content--icon-sm{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding:var(--ez-badge--padding-xs)}.badge__content--icon-xs{height:var(--ez-badge--size-xs, 12px);min-width:var(--ez-badge--size-xs, 12px);padding:var(--ez-badge--padding-xs)}.badge__content--fill{position:absolute;top:0;inset-inline-end:0;z-index:var(--most-visible, 2)}.badge__content--fill-top-right{transform:translate(50%, -50%);position:absolute;top:0;right:0}.badge__content--fill-top-left{transform:translate(-50%, -50%);position:absolute;top:0;left:0}.badge__content--fill-bottom-left{transform:translate(-50%, 50%);position:absolute;bottom:0;left:0}.badge__content--fill-bottom-right{transform:translate(50%, 50%);position:absolute;bottom:0;right:0}";
14
+ const ezBadgeCss = ":host{--ez-badge--size-2xs:var(--space--2xs, 8px);--ez-badge--size-xs:var(--space--xs, 12px);--ez-badge--size-sm:var(--space--sm, 16px);--ez-badge--size-md:var(--space--md, 20px);--ez-badge--size-lg:var(--space--lg, 24px);--ez-badge--size-xl:var(--space--xl, 32px);--ez-badge--padding-2xs:0;--ez-badge--padding-xs:var(--space--nano, 2px);--ez-badge--padding-sm:calc(var(--space--nano, 2px) + 1px);--ez-badge--padding-md:var(--space--3xs, 4px);--ez-badge--padding-lg:calc(var(--space--3xs, 4px) + 2px);--ez-badge--padding-xl:var(--space--2xs);--ez-badge--border-radius:calc(var(--border--radius-medium, 12px) + 8px);--ez-badge--font-family:var(--font-pattern, Roboto);--ez-badge--font-weight-medium:var(--text-weight--medium, 400);--ez-badge--background-color:var(--color--primary, #008561);--ez-badge--border-none:0;--ez-badge--color:var(--text--inverted, #ffffff);--ez-badge--gap:calc(var(--ez-badge--padding-xs) + 1px);--ez-badge--font-size-md:var(--text--medium);--ez-badge--font-size-sm:var(--text--medium);--ez-badge--font-size-xs:var(--text--small)}ez-icon{--ez-icon--color:inherit}.badge{display:flex;justify-content:center;align-items:center;position:relative}.badge__content{font-family:var(--ez-badge--font-family, Roboto);font-weight:var(--ez-badge--font-weight-medium, 400);background-color:var(--ez-badge--background-color, #008561);border:var(--ez-badge--border-none, 0);color:var(--ez-badge--color, #ffffff);border-radius:var(--ez-badge--border-radius, 20px);gap:var(--ez-badge--gap, 3px);display:flex;justify-content:center}.badge__content--fill-xs{height:var(--ez-badge--size-xs, 12px);min-width:var(--ez-badge--size-xs, 12px)}.badge__content--fill-2xs{height:var(--ez-badge--size-2xs, 8px);min-width:var(--ez-badge--size-2xs, 8px)}.badge__content--text-md{height:calc(var(--ez-badge--size-md, 20px) - 2px);min-width:var(--ez-badge--size-sm, 20px);padding-top:var(--ez-badge--padding-sm);padding-bottom:var(--ez-badge--padding-sm);padding-right:var(--ez-badge--padding-xl);padding-left:var(--ez-badge--padding-xl);font-size:var(--ez-badge--font-size-md)}.badge__content--text-sm{height:calc(var(--ez-badge--size-sm, 16px) - 2px);min-width:var(--ez-badge--size-sm, 16px);padding-top:var(--ez-badge--padding-sm);padding-bottom:var(--ez-badge--padding-sm);padding-right:var(--ez-badge--padding-xl);padding-left:var(--ez-badge--padding-xl);font-size:var(--ez-badge--font-size-sm)}.badge__content--text-xs{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding-top:var(--ez-badge--padding-2xs);padding-bottom:var(--ez-badge--padding-2xs);padding-right:var(--ez-badge--padding-lg);padding-left:var(--ez-badge--padding-lg);font-size:var(--ez-badge--font-size-xs)}.badge__content--icon-lg{height:var(--ez-badge--size-lg, 24px);min-width:var(--ez-badge--size-lg, 24px);padding:var(--ez-badge--padding-md)}.badge__content--icon-md{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding:var(--ez-badge--padding-md)}.badge__content--icon-sm{height:var(--ez-badge--size-sm, 16px);min-width:var(--ez-badge--size-sm, 16px);padding:var(--ez-badge--padding-xs)}.badge__content--icon-xs{height:var(--ez-badge--size-xs, 12px);min-width:var(--ez-badge--size-xs, 12px);padding:var(--ez-badge--padding-xs)}.badge__content--icon-align-center{align-items:center}.badge__content--icon-align-start{align-items:flex-start}.badge__content--icon-align-end{align-items:flex-end}.badge__content--fill{position:absolute;top:0;inset-inline-end:0;z-index:var(--most-visible, 2)}.badge__content--fill-top-right{transform:translate(50%, -50%);position:absolute;top:0;right:0}.badge__content--fill-top-left{transform:translate(-50%, -50%);position:absolute;top:0;left:0}.badge__content--fill-bottom-left{transform:translate(-50%, 50%);position:absolute;bottom:0;left:0}.badge__content--fill-bottom-right{transform:translate(50%, 50%);position:absolute;bottom:0;right:0}";
15
15
 
16
16
  const EzBadge = class {
17
17
  constructor(hostRef) {
@@ -42,6 +42,7 @@ const EzBadge = class {
42
42
  this.iconLeft = undefined;
43
43
  this.iconRight = undefined;
44
44
  this.position = { horizontal: "right", vertical: "top" };
45
+ this.alignItems = "center";
45
46
  }
46
47
  getIconSize() {
47
48
  switch (this.size) {
@@ -56,6 +57,16 @@ const EzBadge = class {
56
57
  return null;
57
58
  }
58
59
  }
60
+ getAlignItemsClass() {
61
+ switch (this.alignItems) {
62
+ case "flex-end":
63
+ return "end";
64
+ case "flex-start":
65
+ return "start";
66
+ default:
67
+ return "center";
68
+ }
69
+ }
59
70
  componentDidLoad() {
60
71
  if (this._element) {
61
72
  ElementIDUtils.addIDInfo(this._element);
@@ -79,7 +90,8 @@ const EzBadge = class {
79
90
  }
80
91
  createContainerClassName() {
81
92
  let sizeSufix = this._sizes[this.size].sufix;
82
- let containerClassNames = ["badge__content"];
93
+ let alignItemsClass = "badge__content--icon-align-" + this.getAlignItemsClass();
94
+ let containerClassNames = ["badge__content", alignItemsClass];
83
95
  if (this.hasSlot) {
84
96
  containerClassNames.push("badge__content--fill-" + sizeSufix);
85
97
  if (this.position.vertical == "bottom" && this.position.horizontal == "right") {
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-baa5e267.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
 
4
- const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link-disabled-color:var(--color--disable-primary, '#e5eaf0');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}a.disabled{color:var(--ez-button--link-disabled-color);cursor:not-allowed}";
4
+ const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--width:'auto';--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #2B3A54);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large, 500);--ez-button--background-color:var(--background--light, #ffffff);--ez-button--border-radius:var(--border--radius-large, 24px);--ez-button--border:1px solid var(--color--strokes);--ez-button--justify-content:center;--ez-button--hover-color:var(--color--primary-600, #007a5a);--ez-button--hover--background-color:var(--background--light, #ffffff);--ez-button--disabled-color:var(--text--primary);--ez-button--disabled--background-color:var(--background--medium);--ez-button--focus--border:var(--border--medium, 2px solid) var(--color--primary-300);--ez-button--focus--box-shadow:var(--color--primary-300) 0px 0px 0px 2px;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link-disabled-color:var(--text--secondary, #a2abb9);--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-button--min-width);width:var(--ez-button--width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border);justify-content:var(--ez-button--justify-content)}button:focus{outline:var(--ez-button--focus--border);box-shadow:none}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.x-small{height:28px;--ez-button--font-size:var(--text--small, 12px)}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--x-small{width:28px;min-width:28px;height:28px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}a.disabled{color:var(--ez-button--link-disabled-color);cursor:not-allowed}";
5
5
 
6
6
  const EzButton = class {
7
7
  constructor(hostRef) {
@@ -39,10 +39,16 @@ const EzButton = class {
39
39
  ElementIDUtils.addIDInfo(this._button, 'button', dataInfo);
40
40
  }
41
41
  }
42
+ getButtonSize(sizeParam = "medium") {
43
+ const sizeList = ["x-small", "small", "medium", "large"];
44
+ const sizeLowerCase = this.size && this.size.toLowerCase();
45
+ return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
46
+ }
42
47
  getIconSize(sizeParam = "medium") {
43
48
  const sizeList = ["small", "medium", "large"];
44
49
  const sizeLowerCase = this.size && this.size.toLowerCase();
45
- return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
50
+ const sizeMapped = sizeLowerCase === "x-small" ? "small" : sizeLowerCase;
51
+ return sizeList.includes(sizeMapped) ? sizeMapped : sizeParam;
46
52
  }
47
53
  handleSlotChange(ev) {
48
54
  const slot = ev.target;
@@ -64,16 +70,16 @@ const EzButton = class {
64
70
  }
65
71
  render() {
66
72
  if (this.mode == "icon") {
67
- return (h("button", { class: "btn-icon " + ((this.getIconSize()) ? `btn-icon--${this.getIconSize()}` : ""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize() })));
73
+ return (h("button", { class: "btn-icon " + ((this.getButtonSize()) ? `btn-icon--${this.getButtonSize()}` : ""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize() })));
68
74
  }
69
75
  else if (this.mode == "label-icon") {
70
- return (h("div", { class: "label-icon" }, h("button", { class: "btn-icon " + ((this.getIconSize()) ? `btn-icon--${this.getIconSize()}` : ""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize() })), h("label", { title: this.label }, this.label)));
76
+ return (h("div", { class: "label-icon" }, h("button", { class: "btn-icon " + ((this.getButtonSize()) ? `btn-icon--${this.getButtonSize()}` : ""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("ez-icon", { class: "icon", href: this.image, iconName: this.iconName, size: this.getIconSize() })), h("label", { title: this.label }, this.label)));
71
77
  }
72
78
  else if (this.mode == "link") {
73
79
  return (h("a", { class: `${this.getIconSize()} ${!this.enabled ? "disabled" : ""}`, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
74
80
  }
75
81
  else {
76
- return (h("button", { class: this.getIconSize(""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
82
+ return (h("button", { class: this.getButtonSize(""), type: "button", disabled: !this.enabled, ref: (el) => this._button = el }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label, h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } })));
77
83
  }
78
84
  }
79
85
  get _element() { return getElement(this); }