@sankhyalabs/ezui 5.22.0-dev.9 → 5.22.0-dev.91

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 (334) hide show
  1. package/dist/cjs/{CSSVarsUtils-10c9d5b4.js → CSSVarsUtils-f20973d1.js} +1 -0
  2. package/dist/cjs/DataBinder-e92314c2.js +445 -0
  3. package/dist/cjs/FocusResolver-885f2173.js +35 -0
  4. package/dist/cjs/ez-actions-button.cjs.entry.js +4 -3
  5. package/dist/cjs/ez-button.cjs.entry.js +11 -5
  6. package/dist/cjs/ez-card-item_2.cjs.entry.js +76 -0
  7. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-combo-box-list_3.cjs.entry.js +366 -0
  10. package/dist/cjs/ez-combo-box.cjs.entry.js +82 -155
  11. package/dist/cjs/ez-date-input.cjs.entry.js +13 -4
  12. package/dist/cjs/ez-date-time-input.cjs.entry.js +10 -4
  13. package/dist/cjs/ez-dialog.cjs.entry.js +14 -7
  14. package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
  15. package/dist/cjs/{ez-dropdown.cjs.entry.js → ez-dropdown_2.cjs.entry.js} +75 -8
  16. package/dist/cjs/ez-filter-input.cjs.entry.js +129 -0
  17. package/dist/cjs/ez-form-view.cjs.entry.js +28 -21
  18. package/dist/cjs/ez-form.cjs.entry.js +6 -325
  19. package/dist/cjs/ez-grid.cjs.entry.js +14959 -69757
  20. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-list.cjs.entry.js +258 -211
  22. package/dist/cjs/ez-modal-container.cjs.entry.js +2 -2
  23. package/dist/cjs/ez-modal.cjs.entry.js +12 -3
  24. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
  25. package/dist/cjs/ez-number-input.cjs.entry.js +15 -3
  26. package/dist/cjs/ez-popover-core_2.cjs.entry.js +1504 -0
  27. package/dist/cjs/ez-popup.cjs.entry.js +24 -2
  28. package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
  29. package/dist/cjs/ez-search.cjs.entry.js +109 -48
  30. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
  32. package/dist/cjs/ez-split-item.cjs.entry.js +6 -3
  33. package/dist/cjs/ez-split-panel.cjs.entry.js +68 -6
  34. package/dist/cjs/ez-text-area.cjs.entry.js +68 -6
  35. package/dist/cjs/ez-text-input.cjs.entry.js +152 -16
  36. package/dist/cjs/ez-time-input.cjs.entry.js +7 -1
  37. package/dist/cjs/ez-tooltip.cjs.entry.js +55 -0
  38. package/dist/cjs/ez-tree.cjs.entry.js +5 -4
  39. package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
  40. package/dist/cjs/ezui.cjs.js +1 -1
  41. package/dist/cjs/filter-column.cjs.entry.js +10 -47
  42. package/dist/cjs/index-a7b0c73d.js +22 -10
  43. package/dist/cjs/loader.cjs.js +1 -1
  44. package/dist/collection/collection-manifest.json +6 -1
  45. package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
  46. package/dist/collection/components/ez-button/ez-button.css +23 -13
  47. package/dist/collection/components/ez-button/ez-button.js +12 -6
  48. package/dist/collection/components/ez-card-item/ez-card-item.css +60 -10
  49. package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
  50. package/dist/collection/components/ez-check/ez-check.css +1 -6
  51. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
  52. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css +205 -0
  53. package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js +405 -0
  54. package/dist/collection/components/ez-combo-box/ez-combo-box.css +8 -246
  55. package/dist/collection/components/ez-combo-box/ez-combo-box.js +129 -166
  56. package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
  57. package/dist/collection/components/ez-date-input/ez-date-input.js +38 -4
  58. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +1 -1
  59. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +35 -4
  60. package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
  61. package/dist/collection/components/ez-dialog/ez-dialog.js +14 -16
  62. package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
  63. package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
  64. package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
  65. package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -8
  66. package/dist/collection/components/ez-filter-input/ez-filter-input.css +1 -1
  67. package/dist/collection/components/ez-filter-input/ez-filter-input.js +35 -4
  68. package/dist/collection/components/ez-form/ez-form.js +1 -0
  69. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +49 -6
  70. package/dist/collection/components/ez-form-view/ez-form-view.css +5 -2
  71. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
  72. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
  73. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
  74. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +8 -4
  75. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
  76. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
  77. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +3 -2
  78. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -1
  79. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  80. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +295 -63
  81. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +151 -31
  82. package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -1
  83. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +219 -42
  84. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +16 -0
  85. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
  86. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +8 -0
  87. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +2 -0
  88. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
  89. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
  90. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +8 -1
  91. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
  92. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +2 -0
  93. package/dist/collection/components/ez-grid/ez-grid.css +95 -10
  94. package/dist/collection/components/ez-grid/ez-grid.js +315 -10
  95. package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
  96. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +9 -46
  97. package/dist/collection/components/ez-icon/ez-icon.css +156 -149
  98. package/dist/collection/components/ez-list/ez-list.css +5 -4
  99. package/dist/collection/components/ez-list/ez-list.js +301 -212
  100. package/dist/collection/components/ez-list/ezListHelper.js +85 -0
  101. package/dist/collection/components/ez-modal/ez-modal.css +7 -2
  102. package/dist/collection/components/ez-modal/ez-modal.js +13 -4
  103. package/dist/collection/components/ez-modal-container/ez-modal-container.css +1 -0
  104. package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -1
  105. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +3 -3
  106. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
  107. package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
  108. package/dist/collection/components/ez-number-input/ez-number-input.js +49 -1
  109. package/dist/collection/components/ez-popover-plus/ez-popover-plus.css +3 -0
  110. package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +385 -0
  111. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +67 -0
  112. package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +468 -0
  113. package/dist/collection/components/ez-popup/ez-popup.css +8 -3
  114. package/dist/collection/components/ez-popup/ez-popup.js +43 -3
  115. package/dist/collection/components/ez-scroller/ez-scroller.css +1 -0
  116. package/dist/collection/components/ez-search/ez-search.css +22 -11
  117. package/dist/collection/components/ez-search/ez-search.js +193 -53
  118. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
  119. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
  120. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +4 -1
  121. package/dist/collection/components/ez-skeleton/ez-skeleton.css +54 -34
  122. package/dist/collection/components/ez-split-button/ez-split-button.css +52 -14
  123. package/dist/collection/components/ez-split-button/ez-split-button.js +3 -3
  124. package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
  125. package/dist/collection/components/ez-split-panel/ez-split-panel.js +106 -5
  126. package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
  127. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +14 -2
  128. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +22 -1
  129. package/dist/collection/components/ez-text-area/ez-text-area.css +78 -29
  130. package/dist/collection/components/ez-text-area/ez-text-area.js +104 -4
  131. package/dist/collection/components/ez-text-input/ez-text-input.css +106 -91
  132. package/dist/collection/components/ez-text-input/ez-text-input.js +166 -15
  133. package/dist/collection/components/ez-time-input/ez-time-input.js +24 -0
  134. package/dist/collection/components/ez-tooltip/ez-tooltip.css +20 -0
  135. package/dist/collection/components/ez-tooltip/ez-tooltip.js +116 -0
  136. package/dist/collection/components/ez-tree/ez-tree.js +21 -1
  137. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
  138. package/dist/collection/sw.js +46 -0
  139. package/dist/collection/utils/CSSVarsUtils.js +1 -0
  140. package/dist/collection/utils/FocusResolver.js +31 -0
  141. package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
  142. package/dist/collection/utils/form/DataBinder.js +22 -7
  143. package/dist/collection/utils/form/FormMetadata.js +2 -1
  144. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
  145. package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
  146. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
  147. package/dist/custom-elements/index.d.ts +30 -0
  148. package/dist/custom-elements/index.js +19539 -71833
  149. package/dist/esm/{CSSVarsUtils-71ce76be.js → CSSVarsUtils-acba92d7.js} +1 -0
  150. package/dist/esm/DataBinder-9c877244.js +441 -0
  151. package/dist/esm/FocusResolver-1ccbf850.js +33 -0
  152. package/dist/esm/ez-actions-button.entry.js +4 -3
  153. package/dist/esm/ez-button.entry.js +11 -5
  154. package/dist/esm/ez-card-item_2.entry.js +71 -0
  155. package/dist/esm/ez-check.entry.js +1 -1
  156. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  157. package/dist/esm/ez-combo-box-list_3.entry.js +360 -0
  158. package/dist/esm/ez-combo-box.entry.js +83 -156
  159. package/dist/esm/ez-date-input.entry.js +13 -4
  160. package/dist/esm/ez-date-time-input.entry.js +10 -4
  161. package/dist/esm/ez-dialog.entry.js +15 -8
  162. package/dist/esm/ez-double-list.entry.js +283 -0
  163. package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +75 -9
  164. package/dist/esm/ez-filter-input.entry.js +125 -0
  165. package/dist/esm/ez-form-view.entry.js +28 -21
  166. package/dist/esm/ez-form.entry.js +5 -324
  167. package/dist/esm/ez-grid.entry.js +14899 -69697
  168. package/dist/esm/ez-icon.entry.js +1 -1
  169. package/dist/esm/ez-list.entry.js +258 -211
  170. package/dist/esm/ez-modal-container.entry.js +2 -2
  171. package/dist/esm/ez-modal.entry.js +12 -3
  172. package/dist/esm/ez-multi-selection-list.entry.js +2 -2
  173. package/dist/esm/ez-number-input.entry.js +15 -3
  174. package/dist/esm/ez-popover-core_2.entry.js +1499 -0
  175. package/dist/esm/ez-popup.entry.js +24 -2
  176. package/dist/esm/ez-scroller_2.entry.js +3 -3
  177. package/dist/esm/ez-search.entry.js +109 -48
  178. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  179. package/dist/esm/ez-split-button.entry.js +2 -2
  180. package/dist/esm/ez-split-item.entry.js +6 -3
  181. package/dist/esm/ez-split-panel.entry.js +69 -7
  182. package/dist/esm/ez-text-area.entry.js +68 -6
  183. package/dist/esm/ez-text-input.entry.js +152 -16
  184. package/dist/esm/ez-time-input.entry.js +7 -1
  185. package/dist/esm/ez-tooltip.entry.js +51 -0
  186. package/dist/esm/ez-tree.entry.js +5 -4
  187. package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
  188. package/dist/esm/ezui.js +1 -1
  189. package/dist/esm/filter-column.entry.js +10 -47
  190. package/dist/esm/index-baa5e267.js +22 -10
  191. package/dist/esm/loader.js +1 -1
  192. package/dist/ezui/ezui.esm.js +1 -1
  193. package/dist/ezui/p-0fa52b0f.entry.js +1 -0
  194. package/dist/ezui/p-0faf71c5.entry.js +1 -0
  195. package/dist/ezui/p-15134d97.entry.js +1 -0
  196. package/dist/ezui/p-17de16e5.entry.js +1 -0
  197. package/dist/ezui/p-17eabf46.entry.js +1 -0
  198. package/dist/ezui/p-1ad6c61b.entry.js +1 -0
  199. package/dist/ezui/p-20c024f7.entry.js +1 -0
  200. package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
  201. package/dist/ezui/p-2f45506d.entry.js +1 -0
  202. package/dist/ezui/p-3195a7a7.entry.js +1 -0
  203. package/dist/ezui/p-31b71e50.entry.js +1 -0
  204. package/dist/ezui/p-3429080c.entry.js +1 -0
  205. package/dist/ezui/p-463be973.entry.js +309 -0
  206. package/dist/ezui/p-556468d9.entry.js +1 -0
  207. package/dist/ezui/p-56fe5341.entry.js +1 -0
  208. package/dist/ezui/p-58783dcf.entry.js +1 -0
  209. package/dist/ezui/p-65f471bc.entry.js +1 -0
  210. package/dist/ezui/p-6cdd3e0a.entry.js +1 -0
  211. package/dist/ezui/p-7bd15498.entry.js +1 -0
  212. package/dist/ezui/p-7e677b7b.entry.js +1 -0
  213. package/dist/ezui/{p-bf79aaa1.entry.js → p-7fdd479f.entry.js} +1 -1
  214. package/dist/ezui/p-80dfc50b.js +1 -0
  215. package/dist/ezui/p-990b4318.entry.js +1 -0
  216. package/dist/ezui/p-a4cee65d.entry.js +1 -0
  217. package/dist/ezui/p-acddfb2e.js +1 -0
  218. package/dist/ezui/p-b26f6c5b.entry.js +1 -0
  219. package/dist/ezui/p-c1527804.entry.js +1 -0
  220. package/dist/ezui/p-cb1535f7.entry.js +1 -0
  221. package/dist/ezui/p-cf87aacb.entry.js +1 -0
  222. package/dist/ezui/p-d9548bdf.entry.js +1 -0
  223. package/dist/ezui/p-da1b4a38.entry.js +1 -0
  224. package/dist/ezui/p-dc628ed3.js +1 -0
  225. package/dist/ezui/p-dc73e1fe.entry.js +1 -0
  226. package/dist/ezui/{p-84e439b9.entry.js → p-e347df9c.entry.js} +1 -1
  227. package/dist/ezui/p-e6a9041d.entry.js +1 -0
  228. package/dist/ezui/p-ea54d056.entry.js +1 -0
  229. package/dist/ezui/p-ec7db713.js +1 -0
  230. package/dist/ezui/p-f5931caa.entry.js +1 -0
  231. package/dist/ezui/p-fa6732f2.entry.js +1 -0
  232. package/dist/ezui/p-fd0a19d6.entry.js +1 -0
  233. package/dist/types/components/ez-button/ez-button.d.ts +2 -1
  234. package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
  235. package/dist/types/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.d.ts +104 -0
  236. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +17 -15
  237. package/dist/types/components/ez-date-input/ez-date-input.d.ts +6 -1
  238. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +6 -1
  239. package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -1
  240. package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
  241. package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
  242. package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +4 -0
  243. package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +1 -1
  244. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +6 -1
  245. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
  246. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
  247. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
  248. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  249. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +71 -4
  250. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +36 -4
  251. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +25 -2
  252. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +33 -7
  253. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +4 -1
  254. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
  255. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  256. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
  257. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
  258. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +2 -1
  259. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
  260. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
  261. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
  262. package/dist/types/components/ez-grid/ez-grid.d.ts +54 -1
  263. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +0 -11
  264. package/dist/types/components/ez-list/ez-list.d.ts +23 -2
  265. package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
  266. package/dist/types/components/ez-modal/ez-modal.d.ts +2 -1
  267. package/dist/types/components/ez-number-input/ez-number-input.d.ts +8 -0
  268. package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +68 -0
  269. package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +81 -0
  270. package/dist/types/components/ez-popup/ez-popup.d.ts +8 -1
  271. package/dist/types/components/ez-search/ez-search.d.ts +30 -6
  272. package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -1
  273. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +11 -0
  274. package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
  275. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
  276. package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
  277. package/dist/types/components/ez-text-input/ez-text-input.d.ts +24 -2
  278. package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
  279. package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +21 -0
  280. package/dist/types/components/ez-tree/ez-tree.d.ts +4 -0
  281. package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
  282. package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
  283. package/dist/types/components.d.ts +717 -29
  284. package/dist/types/utils/FocusResolver.d.ts +5 -0
  285. package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
  286. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
  287. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  288. package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
  289. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
  290. package/package.json +11 -3
  291. package/react/components.d.ts +5 -0
  292. package/react/components.js +5 -0
  293. package/react/components.js.map +1 -1
  294. package/dist/cjs/RecordValidationProcessor-4c893e04.js +0 -102
  295. package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -183
  296. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +0 -206
  297. package/dist/cjs/ez-skeleton.cjs.entry.js +0 -67
  298. package/dist/esm/RecordValidationProcessor-b00b8b77.js +0 -99
  299. package/dist/esm/ez-card-item_3.entry.js +0 -177
  300. package/dist/esm/ez-custom-form-input_2.entry.js +0 -201
  301. package/dist/esm/ez-skeleton.entry.js +0 -63
  302. package/dist/ezui/p-04f24913.js +0 -1
  303. package/dist/ezui/p-072e6347.entry.js +0 -1
  304. package/dist/ezui/p-1285c902.entry.js +0 -1
  305. package/dist/ezui/p-13d2fe2d.entry.js +0 -1
  306. package/dist/ezui/p-2097d0cf.entry.js +0 -1
  307. package/dist/ezui/p-32e553e5.entry.js +0 -304
  308. package/dist/ezui/p-34b6916c.entry.js +0 -1
  309. package/dist/ezui/p-3b4eeeb6.entry.js +0 -1
  310. package/dist/ezui/p-3faa2b46.entry.js +0 -1
  311. package/dist/ezui/p-42533ea4.entry.js +0 -1
  312. package/dist/ezui/p-49456b34.entry.js +0 -1
  313. package/dist/ezui/p-4d5235f1.entry.js +0 -1
  314. package/dist/ezui/p-5bd5e68f.entry.js +0 -1
  315. package/dist/ezui/p-784fe207.entry.js +0 -1
  316. package/dist/ezui/p-7922142b.entry.js +0 -1
  317. package/dist/ezui/p-7af81663.entry.js +0 -1
  318. package/dist/ezui/p-7bc07c31.entry.js +0 -1
  319. package/dist/ezui/p-85c8baae.entry.js +0 -1
  320. package/dist/ezui/p-8888d9ed.entry.js +0 -1
  321. package/dist/ezui/p-8f0144f6.entry.js +0 -1
  322. package/dist/ezui/p-9050d2cd.entry.js +0 -1
  323. package/dist/ezui/p-922ac38b.entry.js +0 -1
  324. package/dist/ezui/p-9ab22a07.entry.js +0 -1
  325. package/dist/ezui/p-9e11fc7b.js +0 -1
  326. package/dist/ezui/p-a31b9c90.entry.js +0 -1
  327. package/dist/ezui/p-af95cd16.entry.js +0 -1
  328. package/dist/ezui/p-bae4e180.entry.js +0 -1
  329. package/dist/ezui/p-baf80b13.entry.js +0 -1
  330. package/dist/ezui/p-bcb53f27.entry.js +0 -1
  331. package/dist/ezui/p-d9401ea0.entry.js +0 -1
  332. package/dist/ezui/p-e85c48d7.entry.js +0 -1
  333. package/dist/ezui/p-ecc2c1ec.entry.js +0 -1
  334. package/dist/ezui/p-fcf0acce.entry.js +0 -1
@@ -1,6 +1,6 @@
1
- import { ApplicationContext, DataType, MaskFormatter, NumberUtils, SortMode, StringUtils, UserInterface, } from '@sankhyalabs/core';
2
- import { Grid } from 'ag-grid-community';
3
- import { Grid as EnterpriseGrid, LicenseManager } from 'ag-grid-enterprise';
1
+ import { ApplicationContext, DataType, LockManager, LockManagerOperation, MaskFormatter, NumberUtils, SortMode, StringUtils, UserInterface, } from '@sankhyalabs/core';
2
+ import { Grid } from "@ag-grid-community/core";
3
+ import { LicenseManager } from '@ag-grid-enterprise/core';
4
4
  import DataSource from './DataSource';
5
5
  import { EzGridCustomHeader } from './components/EzGridCustomHeader';
6
6
  import { CellRendererStatus } from './components/cellRendererStatus';
@@ -8,6 +8,12 @@ import SelectionHeader from './components/selectionHeader';
8
8
  import gridTerms from './i18n/pt-BR';
9
9
  import { DISTINCT_FILTER_NAME_PREFIX, EZ_GRID_LOADING_SOURCE } from '../../../../utils/constants';
10
10
  import GridEditionManager from './GridEditionManager';
11
+ import { ModuleRegistry } from '@ag-grid-community/core';
12
+ import { EnterpriseCoreModule } from '@ag-grid-enterprise/core';
13
+ import { RangeSelectionModule } from '@ag-grid-enterprise/range-selection';
14
+ import { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';
15
+ import { ClipboardModule } from '@ag-grid-enterprise/clipboard';
16
+ import { MenuModule } from '@ag-grid-enterprise/menu';
11
17
  export default class AgGridController {
12
18
  configFilterColumn(filterColumn) {
13
19
  this._filterColumn = filterColumn;
@@ -27,21 +33,32 @@ export default class AgGridController {
27
33
  var _a;
28
34
  (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
29
35
  }
30
- constructor(enterprise) {
36
+ constructor(_enterprise) {
31
37
  this.DEFAULT_ROW_HEIGHT = 30;
32
38
  this.DEFAULT_HEADER_ROW_HEIGHT = 32;
33
39
  this.CHECK_BOX_COL_ID = 'checkBoxColumn';
34
40
  this.STATUS_COL_ID = 'statusColumn';
35
41
  this.RECORD_ARCHIVE_COL_ID = '__RECORD_ARCHIVE__';
36
42
  this.BLOCK_LOAD_DEBOUNCE = 100;
37
- this.DOC_WIDTH = 1150;
43
+ this.DEFAULT_FONT_SIZE = 14;
44
+ this.DEFAULT_ICON_SIZE = 12;
45
+ this.DEFAULT_MAX_SIZE = 200;
46
+ this.DOC_WIDTH = 800;
38
47
  this._menuItems = [];
39
48
  this._idAttribName = '__record__id__';
40
49
  this._gridConfig = [];
41
50
  this._filteredColumns = new Map();
42
51
  this._filterColumnleftPosition = 0;
43
52
  this._customFormatters = new Map();
44
- this._enterprise = enterprise;
53
+ this._gridShowDom = false;
54
+ this.peddingExecutionsOnGridShow = [];
55
+ ModuleRegistry.registerModules([
56
+ EnterpriseCoreModule,
57
+ RangeSelectionModule,
58
+ ServerSideRowModelModule,
59
+ ClipboardModule,
60
+ MenuModule
61
+ ]);
45
62
  }
46
63
  getGridConfig() {
47
64
  return this._gridConfig;
@@ -119,6 +136,12 @@ export default class AgGridController {
119
136
  var _a;
120
137
  this._options = options;
121
138
  this._container = container;
139
+ const lockerIdTaskbarClick = (options === null || options === void 0 ? void 0 : options.enableLockManagerTaskbarClick) ? LockManager === null || LockManager === void 0 ? void 0 : LockManager.addLockManagerCtxId(this._container) : null;
140
+ let resolveLoading = undefined;
141
+ if (options === null || options === void 0 ? void 0 : options.enableLockManagerLoadingComp) {
142
+ const lockerIdAppLoading = LockManager === null || LockManager === void 0 ? void 0 : LockManager.addLockManagerCtxId(this._container);
143
+ resolveLoading = LockManager === null || LockManager === void 0 ? void 0 : LockManager.lock(lockerIdAppLoading, LockManagerOperation.APP_LOADING);
144
+ }
122
145
  if (this._grid === undefined) {
123
146
  LicenseManager.setLicenseKey(ApplicationContext.getContextValue('__EZUI__GRID_LICENSE__'));
124
147
  this._columnStateChangeCallback = options.onColumnStateChange;
@@ -126,7 +149,7 @@ export default class AgGridController {
126
149
  this._doubleClickCallBack = options.onDoubleClick;
127
150
  this._multipleSelection = options.allowMultipleSelection;
128
151
  this._dataUnit = options.dataUnit;
129
- this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders);
152
+ this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert, options.enableGridInsert, lockerIdTaskbarClick);
130
153
  this._statusResolver = options.statusResolver;
131
154
  if (this._dataUnit) {
132
155
  this._dataUnit.sortingProvider = this;
@@ -146,10 +169,16 @@ export default class AgGridController {
146
169
  defaultColDef: {
147
170
  headerClass: 'ez-grid__cell-header',
148
171
  cellClass: 'ez-grid__cell-body',
172
+ cellClassRules: {
173
+ 'invalidValue': (params) => this._editionManager.hasInvalidField(params.colDef.field, params.data["__record__id__"]),
174
+ },
149
175
  cellStyle: {
150
176
  height: '100%'
151
177
  }
152
178
  },
179
+ rowClassRules: {
180
+ 'row-striped': ({ node }) => (options.enableRowTableStriped && node.rowIndex % 2 === 0),
181
+ },
153
182
  suppressFieldDotNotation: true,
154
183
  components: Object.assign({ ezGridHeaderComponent: SelectionHeader, ezGridCustomHeader: EzGridCustomHeader }, this._editionManager.getComponents()),
155
184
  context: {
@@ -166,16 +195,11 @@ export default class AgGridController {
166
195
  processCellCallback: this.processFormatterCellCallback
167
196
  }
168
197
  };
169
- this.defineRowModelType(this._gridOptions, options);
198
+ this.defineRowModelType(this._gridOptions, options, resolveLoading);
170
199
  this.setOptionsEvents(this._gridOptions);
171
200
  this.setOptionsSupress(this._gridOptions);
172
201
  this._gridOptions = this._editionManager.configureGrid(this._gridOptions);
173
- if (this._enterprise) {
174
- this._grid = new EnterpriseGrid(container, this._gridOptions);
175
- }
176
- else {
177
- this._grid = new Grid(container, this._gridOptions);
178
- }
202
+ this._grid = new Grid(container, this._gridOptions);
179
203
  const selection = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo();
180
204
  if (selection === null || selection === void 0 ? void 0 : selection.isAllRecords()) {
181
205
  this.selectAll(true);
@@ -185,6 +209,23 @@ export default class AgGridController {
185
209
  }
186
210
  this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
187
211
  this._customFormatters = options.customFormatters;
212
+ const observerCallback = (entries) => {
213
+ entries.forEach(entry => {
214
+ if (entry.isIntersecting) {
215
+ this._gridShowDom = true;
216
+ this.peddingExecutionsOnGridShow.forEach(func => func());
217
+ this.peddingExecutionsOnGridShow = [];
218
+ }
219
+ else {
220
+ this._gridShowDom = false;
221
+ }
222
+ });
223
+ };
224
+ this.observer = new IntersectionObserver(observerCallback, {
225
+ root: null,
226
+ threshold: 0.1
227
+ });
228
+ this.observer.observe(container);
188
229
  }
189
230
  }
190
231
  processFormatterCellCallback(params) {
@@ -315,10 +356,10 @@ export default class AgGridController {
315
356
  }
316
357
  return null;
317
358
  }
318
- defineRowModelType(opt, sourceOptions) {
359
+ defineRowModelType(opt, sourceOptions, resolveLoading) {
319
360
  if (this._dataUnit != undefined) {
320
361
  opt.rowModelType = 'serverSide';
321
- opt.serverSideDatasource = new DataSource(this._dataUnit, this, sourceOptions);
362
+ opt.serverSideDatasource = this._dataSource = new DataSource(this._dataUnit, this, sourceOptions, resolveLoading);
322
363
  opt.serverSideSortOnServer = true;
323
364
  opt.columnDefs = this._colDefs;
324
365
  }
@@ -362,7 +403,7 @@ export default class AgGridController {
362
403
  return status;
363
404
  }
364
405
  updateSelectionForAll(selectAll) {
365
- this._dataUnit.updatePageSelection(selectAll ? this._dataUnit.records.map(r => r.__record__id__) : []);
406
+ selectAll ? this._dataUnit.selectAllRecords() : this._dataUnit.unSelectAllRecords();
366
407
  }
367
408
  setData(data) {
368
409
  if (this._grid === undefined) {
@@ -375,10 +416,17 @@ export default class AgGridController {
375
416
  throw new Error('Erro interno: Grid ainda não inicializado.');
376
417
  }
377
418
  }
378
- updateRows() {
419
+ updateRows(rows) {
379
420
  if (this._grid === undefined) {
380
421
  throw new Error('Erro interno: Grid ainda não inicializado.');
381
422
  }
423
+ rows === null || rows === void 0 ? void 0 : rows.forEach(row => this.updateRowData(row));
424
+ }
425
+ updateRowData(row) {
426
+ const node = this._gridOptions.api.getRowNode(row[this._idAttribName]);
427
+ node.setData(Object.assign({}, row));
428
+ this._editionManager.updateCurrentEditorGuiValue(row);
429
+ this._editionManager.recordValidate();
382
430
  }
383
431
  selectAll(quietly = false) {
384
432
  try {
@@ -461,14 +509,45 @@ export default class AgGridController {
461
509
  });
462
510
  r.setData(data);
463
511
  });
512
+ this._gridOptions.api.refreshCells({ force: true });
513
+ const invalidCell = this._editionManager.getNextInvalidCell();
514
+ if (invalidCell) {
515
+ const rowNode = this._gridOptions.api.getRowNode(invalidCell.recordId);
516
+ if (rowNode && invalidCell.field) {
517
+ this.startEdition(rowNode.rowIndex, this._gridOptions.columnApi.getColumn(invalidCell.field.name));
518
+ }
519
+ }
464
520
  }
465
521
  }
466
- refresh() {
522
+ savingCanceled(fields, recordId) {
523
+ if (!this._gridShowDom)
524
+ return;
525
+ const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
526
+ const rowIndex = this._gridOptions.api.getRowNode(recordId).rowIndex;
527
+ const columnFocus = displayedColumns.find(column => this.isColumnEditable(rowIndex, column) && fields.find(field => field.name === column.getColId()));
528
+ this.focusByCollAndRow(columnFocus, rowIndex);
529
+ this.startEdition(rowIndex, columnFocus);
530
+ }
531
+ refresh(scrollToSelectedRow = false) {
467
532
  if (this._grid === undefined) {
468
533
  throw new Error('Erro interno: Grid ainda não inicializado.');
469
534
  }
535
+ this._gridOptions.api.clearRangeSelection();
470
536
  this._gridOptions.api.refreshServerSide({ purge: true });
471
537
  this._options.onRefresh();
538
+ if (scrollToSelectedRow)
539
+ this.scrollToSelectedRow();
540
+ }
541
+ scrollToSelectedRow() {
542
+ const rowNode = this._gridOptions.api.getSelectedNodes();
543
+ if (!rowNode || rowNode.length === 0)
544
+ return;
545
+ if (this._gridShowDom) {
546
+ this._gridOptions.api.ensureNodeVisible(rowNode[0]);
547
+ }
548
+ else {
549
+ this.peddingExecutionsOnGridShow.push(() => this._gridOptions.api.ensureNodeVisible(rowNode[0]));
550
+ }
472
551
  }
473
552
  focusOnGridContainer() {
474
553
  this._container.setAttribute('tabindex', '-1');
@@ -476,17 +555,28 @@ export default class AgGridController {
476
555
  }
477
556
  setFocus() {
478
557
  var _a, _b;
479
- if ((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length) {
480
- this.setFocusFirstRow();
481
- }
482
- else {
558
+ if (!((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length)) {
483
559
  this.focusOnGridContainer();
560
+ return;
484
561
  }
562
+ if (!this._dataUnit.getSelectedRecord()) {
563
+ this.setFocusFirstRow();
564
+ return;
565
+ }
566
+ this.syncSelectWithDataUnit();
485
567
  }
486
568
  setAutoFocus(autoFocus) {
487
569
  var _a;
488
570
  (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setAutoFocus(autoFocus);
489
571
  }
572
+ setEnableGridInsert(enable) {
573
+ var _a;
574
+ (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setEnableGridInsert(enable);
575
+ }
576
+ setEnableContinuousInsert(enable) {
577
+ var _a;
578
+ (_a = this._editionManager) === null || _a === void 0 ? void 0 : _a.setEnableContinuousInsert(enable);
579
+ }
490
580
  setFocusFirstRow() {
491
581
  const firstRow = this._gridOptions.api.getDisplayedRowAtIndex(0);
492
582
  if (firstRow) {
@@ -502,17 +592,80 @@ export default class AgGridController {
502
592
  this.setFocusOnRow(lastRow.rowIndex);
503
593
  }
504
594
  }
595
+ startEditionOnRowByIndex(rowIndex) {
596
+ this._dataUnit.setSelectionByIndex([rowIndex]);
597
+ const firstCol = this.getFirstEditableColl(rowIndex);
598
+ if (!firstCol)
599
+ return;
600
+ this.focusByCollAndRow(firstCol, rowIndex);
601
+ this.startEdition(rowIndex, firstCol);
602
+ }
603
+ startEditionOnLastRow() {
604
+ var _a;
605
+ if (this._gridShowDom) {
606
+ const newRowIndex = ((_a = this._dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) - 1;
607
+ this.startEditionOnRowByIndex(newRowIndex);
608
+ }
609
+ }
610
+ syncSelectWithDataUnit() {
611
+ const rowNode = this._gridOptions.api.getRowNode(this._dataUnit.getSelectedRecord().__record__id__);
612
+ if ((rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) < 0)
613
+ return;
614
+ const rowRange = this._gridOptions.api.getCellRanges().find(row => row.startRow.rowIndex === rowNode.rowIndex);
615
+ if ((rowRange === null || rowRange === void 0 ? void 0 : rowRange.columns.length) > 0) {
616
+ if (this._dataUnit.hasNewRecord()) {
617
+ this.startEdition(rowNode.rowIndex, rowRange.columns[0]);
618
+ return;
619
+ }
620
+ this.focusByCollAndRow(rowRange.columns[0], rowNode.rowIndex);
621
+ this._gridOptions.api.addCellRange({ rowStartIndex: rowNode.rowIndex, rowEndIndex: rowNode.rowIndex, columns: rowRange.columns });
622
+ return;
623
+ }
624
+ this._gridOptions.api.clearRangeSelection();
625
+ this.setFocusOnRow(rowNode.rowIndex);
626
+ }
627
+ startEdition(rowIndex, firstCol) {
628
+ if (!this._gridShowDom)
629
+ return;
630
+ this._gridOptions.api.clearRangeSelection();
631
+ this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstCol] });
632
+ this._gridOptions.api.setFocusedCell(rowIndex, firstCol);
633
+ this._gridOptions.api.startEditingCell({ rowIndex, colKey: firstCol });
634
+ const cellEditor = this._gridOptions.api.getCellEditorInstances()[0];
635
+ if (cellEditor) {
636
+ cellEditor.focusIn();
637
+ }
638
+ }
639
+ getFirstEditableColl(rowIndex) {
640
+ try {
641
+ const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
642
+ return displayedColumns.find(column => this.isColumnEditable(rowIndex, column));
643
+ }
644
+ catch (e) {
645
+ console.warn(e);
646
+ }
647
+ }
648
+ isColumnEditable(rowIndex, column) {
649
+ if (column.getColDef().headerName === '' || rowIndex === -1)
650
+ return false;
651
+ const rowId = this._dataUnit.records[rowIndex][this._idAttribName];
652
+ const rowNode = this._gridOptions.api.getRowNode(rowId);
653
+ return column.isCellEditable(rowNode);
654
+ }
505
655
  setFocusOnRow(rowIndex) {
506
656
  let displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
507
- let firstCell = displayedColumns.find(column => column.getColDef().headerName !== '');
657
+ let firstColl = displayedColumns.find(column => column.getColDef().headerName !== '');
658
+ this.focusByCollAndRow(firstColl, rowIndex);
659
+ this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstColl] });
660
+ }
661
+ focusByCollAndRow(firstCell, rowIndex) {
508
662
  this._gridOptions.api.ensureColumnVisible(firstCell);
509
663
  this._gridOptions.api.ensureIndexVisible(rowIndex);
510
664
  this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
511
665
  }
512
666
  setColumnsDef(cols) {
513
- const newColDefs = [
514
- Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: '', checkboxSelection: true, width: 29, suppressMovable: true, suppressAutoSize: true, suppressMenu: true, lockPosition: true, pinned: true }, (this._multipleSelection && { headerComponent: 'ezGridHeaderComponent', headerClass: 'ag-column-select-header' })),
515
- ];
667
+ const checkBoxColumn = Object.assign({ colId: this.CHECK_BOX_COL_ID, headerName: '', checkboxSelection: true, width: 29, suppressMovable: true, suppressAutoSize: true, suppressMenu: true, lockPosition: true, pinned: true }, (this._multipleSelection && { headerComponent: 'ezGridHeaderComponent', headerClass: 'ag-column-select-header' }));
668
+ const newColDefs = this._options.suppressCheckBoxCol ? [] : [checkBoxColumn];
516
669
  if (this._statusResolver != undefined) {
517
670
  newColDefs.push({
518
671
  colId: this.STATUS_COL_ID,
@@ -542,6 +695,14 @@ export default class AgGridController {
542
695
  this._gridOptions.api.setColumnDefs(this._colDefs);
543
696
  }
544
697
  }
698
+ hideSelectionColumn() {
699
+ var _a, _b;
700
+ (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.columnApi) === null || _b === void 0 ? void 0 : _b.setColumnVisible(this.CHECK_BOX_COL_ID, false);
701
+ }
702
+ showSelectionColumn() {
703
+ var _a, _b;
704
+ (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.columnApi) === null || _b === void 0 ? void 0 : _b.setColumnVisible(this.CHECK_BOX_COL_ID, true);
705
+ }
545
706
  getColumnsDef() {
546
707
  if (this._grid === undefined) {
547
708
  throw new Error('Erro interno: Grid ainda não inicializado.');
@@ -574,9 +735,8 @@ export default class AgGridController {
574
735
  const columnsOffset = colDef.length - columns.length;
575
736
  this._gridConfig = state;
576
737
  let sort = [];
577
- state === null || state === void 0 ? void 0 : state.forEach((cfgColumn, index) => {
578
- var _a;
579
- const colWidth = (_a = this._gridOptions.columnApi.getColumn(cfgColumn.name)) === null || _a === void 0 ? void 0 : _a.getActualWidth();
738
+ state.forEach((cfgColumn, index) => {
739
+ const colWidth = this.getColumnWidth(cfgColumn);
580
740
  this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + columnsOffset);
581
741
  this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
582
742
  visibleColumns.push(cfgColumn.name);
@@ -826,38 +986,54 @@ export default class AgGridController {
826
986
  return false;
827
987
  }
828
988
  onSelectionChange(event) {
829
- if (this._selectionChangeCallback) {
830
- clearTimeout(this._selectionChangeDeboucing);
831
- this._selectionChangeDeboucing = window.setTimeout(() => {
832
- this._editionManager.proceedAutoSave();
833
- if (this._dataUnit) {
834
- if (event.context.selectionChangeQuietly) {
835
- const selectionInfo = this._dataUnit;
836
- this._selectionChangeCallback({
837
- selection: selectionInfo.records,
838
- selectionHeaderStatus: this.getSelectionHeaderStatus(),
839
- });
840
- }
841
- else {
842
- this._dataUnit.updatePageSelection(this._gridOptions.api.getSelectedRows().map((r) => r.__record__id__)).then(selectionInfo => {
843
- this._selectionChangeCallback({
844
- selection: selectionInfo.records,
845
- selectionHeaderStatus: this.getSelectionHeaderStatus(),
846
- });
847
- });
848
- }
849
- }
850
- else {
851
- this._selectionChangeCallback({
852
- selection: this._gridOptions.api.getSelectedRows(),
853
- selectionHeaderStatus: this.getSelectionHeaderStatus(),
854
- });
855
- }
856
- }, 0);
989
+ var _a, _b;
990
+ const selectedRowId = (_b = (_a = event.api.getSelectedNodes()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id;
991
+ const isNewRecord = this._dataUnit.isNewRecord(selectedRowId);
992
+ if (!this._selectionChangeCallback)
993
+ return;
994
+ clearTimeout(this._selectionChangeDeboucing);
995
+ this._selectionChangeDeboucing = window.setTimeout(async () => {
996
+ const saveSuccess = (!isNewRecord && selectedRowId) ? await this.handleExecuteProceedAutosave() : true;
997
+ if (!saveSuccess)
998
+ return;
999
+ this.processBuildSelectionChangeCallback(event);
1000
+ }, 0);
1001
+ }
1002
+ async handleExecuteProceedAutosave() {
1003
+ if (this._gridShowDom) {
1004
+ return await this._editionManager.proceedAutoSave();
1005
+ }
1006
+ return true;
1007
+ }
1008
+ processBuildSelectionChangeCallback(event) {
1009
+ if (this._dataUnit) {
1010
+ this.handleBuildSelectionChangeWithDU(event.context.selectionChangeQuietly);
1011
+ return;
1012
+ }
1013
+ this.buildSelectionChangeCallback(this._gridOptions.api.getSelectedRows());
1014
+ }
1015
+ handleBuildSelectionChangeWithDU(quietly) {
1016
+ if (quietly) {
1017
+ this.buildSelectionChangeCallback(this._dataUnit.records);
1018
+ return;
857
1019
  }
1020
+ this._dataUnit.updatePageSelection(this._gridOptions.api.getSelectedRows()
1021
+ .map((r) => r.__record__id__))
1022
+ .then(selectionInfo => this.buildSelectionChangeCallback(selectionInfo.records));
1023
+ }
1024
+ buildSelectionChangeCallback(records) {
1025
+ this._selectionChangeCallback({
1026
+ selection: records,
1027
+ selectionHeaderStatus: this.getSelectionHeaderStatus(),
1028
+ });
858
1029
  }
859
1030
  onRowDoubleClick(evt) {
860
- if (this._doubleClickCallBack) {
1031
+ var _a, _b;
1032
+ if (this._doubleClickCallBack && (!this._options.enableGridInsert || !this._dataUnit.hasNewRecord())) {
1033
+ /**
1034
+ * Evita mudança de view e a grade permanecer no modo de edição.
1035
+ */
1036
+ (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.stopEditing();
861
1037
  this._doubleClickCallBack(evt.data);
862
1038
  }
863
1039
  }
@@ -866,22 +1042,78 @@ export default class AgGridController {
866
1042
  host[attribute] = value;
867
1043
  }
868
1044
  }
1045
+ processEditionCanceled() {
1046
+ this.clearInvalidCells(true);
1047
+ if (this._gridShowDom) {
1048
+ this._dataUnit.clearSelection();
1049
+ }
1050
+ }
869
1051
  setCellEditors(customEditors) {
870
- var _a;
1052
+ var _a, _b, _c, _d, _e;
871
1053
  if (!this._editionManager) {
872
1054
  this._customEditors = customEditors;
873
1055
  return;
874
1056
  }
1057
+ const currentEditingCells = (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.getEditingCells();
875
1058
  this._editionManager.setCellEditors(customEditors);
876
- (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
1059
+ if ((currentEditingCells === null || currentEditingCells === void 0 ? void 0 : currentEditingCells.length) > 0) {
1060
+ this._gridOptions.api.startEditingCell({ colKey: (_d = (_c = currentEditingCells[0]) === null || _c === void 0 ? void 0 : _c.column) === null || _d === void 0 ? void 0 : _d.getColId(), rowIndex: (_e = currentEditingCells[0]) === null || _e === void 0 ? void 0 : _e.rowIndex });
1061
+ }
877
1062
  }
878
1063
  setCellRenders(customRenders) {
879
- var _a;
1064
+ var _a, _b, _c, _d, _e, _f;
880
1065
  if (!this._editionManager) {
881
1066
  this._customRenders = customRenders;
882
1067
  return;
883
1068
  }
884
1069
  this._editionManager.setCellRenders(customRenders);
885
- (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
1070
+ const currentEditingCells = (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.getEditingCells();
1071
+ (_c = this._gridOptions) === null || _c === void 0 ? void 0 : _c.api.redrawRows();
1072
+ if ((currentEditingCells === null || currentEditingCells === void 0 ? void 0 : currentEditingCells.length) > 0) {
1073
+ this._gridOptions.api.startEditingCell({ colKey: (_e = (_d = currentEditingCells[0]) === null || _d === void 0 ? void 0 : _d.column) === null || _e === void 0 ? void 0 : _e.getColId(), rowIndex: (_f = currentEditingCells[0]) === null || _f === void 0 ? void 0 : _f.rowIndex });
1074
+ }
1075
+ }
1076
+ clearInvalidCells(stopEdition) {
1077
+ if (!this._editionManager)
1078
+ return;
1079
+ this._editionManager.clearInvalidCells(stopEdition);
1080
+ this._gridOptions.api.refreshCells({ force: true });
1081
+ }
1082
+ processContinuousInsert() {
1083
+ this._editionManager.processContinuousInsert();
1084
+ }
1085
+ destroy() {
1086
+ var _a;
1087
+ this.observer.disconnect();
1088
+ (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.destroy();
1089
+ }
1090
+ registryListeners() {
1091
+ var _a;
1092
+ (_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.registryListeners();
1093
+ }
1094
+ resetPaginationState() {
1095
+ var _a, _b;
1096
+ (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.clearRangeSelection();
1097
+ }
1098
+ stopEdit() {
1099
+ this._gridOptions.api.stopEditing();
1100
+ }
1101
+ getColumnWidth(cfgColumn) {
1102
+ var _a, _b;
1103
+ if (cfgColumn == undefined) {
1104
+ return;
1105
+ }
1106
+ if (cfgColumn.customWidth != undefined) {
1107
+ return cfgColumn.customWidth;
1108
+ }
1109
+ if (cfgColumn.width != undefined) {
1110
+ return cfgColumn.width;
1111
+ }
1112
+ const field = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
1113
+ if ((field === null || field === void 0 ? void 0 : field.userInterface) === UserInterface.SEARCH) {
1114
+ return this.DEFAULT_MAX_SIZE;
1115
+ }
1116
+ const labelSize = (((_b = field === null || field === void 0 ? void 0 : field.label) === null || _b === void 0 ? void 0 : _b.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
1117
+ return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
886
1118
  }
887
1119
  }