@sankhyalabs/ezui 5.22.0-dev.8 → 5.22.0-dev.80

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 (311) hide show
  1. package/dist/cjs/DataBinder-e92314c2.js +445 -0
  2. package/dist/cjs/FocusResolver-885f2173.js +35 -0
  3. package/dist/cjs/ez-actions-button.cjs.entry.js +3 -2
  4. package/dist/cjs/ez-button.cjs.entry.js +11 -5
  5. package/dist/cjs/ez-card-item_2.cjs.entry.js +76 -0
  6. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-combo-box.cjs.entry.js +67 -13
  9. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +35 -5
  10. package/dist/cjs/ez-date-input.cjs.entry.js +14 -4
  11. package/dist/cjs/ez-date-time-input.cjs.entry.js +11 -4
  12. package/dist/cjs/ez-dialog.cjs.entry.js +14 -7
  13. package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
  14. package/dist/cjs/{ez-dropdown.cjs.entry.js → ez-dropdown_2.cjs.entry.js} +75 -8
  15. package/dist/cjs/ez-filter-input.cjs.entry.js +130 -0
  16. package/dist/cjs/ez-form-view.cjs.entry.js +29 -22
  17. package/dist/cjs/ez-form.cjs.entry.js +6 -325
  18. package/dist/cjs/ez-grid.cjs.entry.js +14861 -69696
  19. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-list.cjs.entry.js +258 -211
  21. package/dist/cjs/ez-modal-container.cjs.entry.js +2 -1
  22. package/dist/cjs/ez-modal.cjs.entry.js +19 -4
  23. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -2
  24. package/dist/cjs/ez-number-input.cjs.entry.js +15 -2
  25. package/dist/cjs/ez-popup.cjs.entry.js +24 -2
  26. package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
  27. package/dist/cjs/ez-search.cjs.entry.js +108 -47
  28. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
  30. package/dist/cjs/ez-split-item.cjs.entry.js +5 -2
  31. package/dist/cjs/ez-split-panel.cjs.entry.js +68 -6
  32. package/dist/cjs/ez-text-area.cjs.entry.js +68 -6
  33. package/dist/cjs/ez-text-input.cjs.entry.js +153 -16
  34. package/dist/cjs/ez-time-input.cjs.entry.js +8 -1
  35. package/dist/cjs/ez-tooltip.cjs.entry.js +55 -0
  36. package/dist/cjs/ez-tree.cjs.entry.js +5 -4
  37. package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
  38. package/dist/cjs/ezui.cjs.js +1 -1
  39. package/dist/cjs/filter-column.cjs.entry.js +2 -2
  40. package/dist/cjs/index-a7b0c73d.js +16 -8
  41. package/dist/cjs/loader.cjs.js +1 -1
  42. package/dist/collection/collection-manifest.json +3 -1
  43. package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
  44. package/dist/collection/components/ez-button/ez-button.css +23 -13
  45. package/dist/collection/components/ez-button/ez-button.js +12 -6
  46. package/dist/collection/components/ez-card-item/ez-card-item.css +60 -10
  47. package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
  48. package/dist/collection/components/ez-check/ez-check.css +1 -6
  49. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
  50. package/dist/collection/components/ez-combo-box/ez-combo-box.css +13 -1
  51. package/dist/collection/components/ez-combo-box/ez-combo-box.js +130 -15
  52. package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
  53. package/dist/collection/components/ez-date-input/ez-date-input.js +58 -5
  54. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +1 -1
  55. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +55 -5
  56. package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
  57. package/dist/collection/components/ez-dialog/ez-dialog.js +14 -16
  58. package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
  59. package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
  60. package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
  61. package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -8
  62. package/dist/collection/components/ez-filter-input/ez-filter-input.js +55 -5
  63. package/dist/collection/components/ez-form/ez-form.js +1 -0
  64. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +49 -6
  65. package/dist/collection/components/ez-form-view/ez-form-view.css +5 -2
  66. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
  67. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
  68. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
  69. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +8 -4
  70. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
  71. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
  72. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +3 -2
  73. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -1
  74. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  75. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +292 -63
  76. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +151 -31
  77. package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -1
  78. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +219 -42
  79. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +16 -0
  80. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +8 -0
  81. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +2 -0
  82. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
  83. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
  84. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +8 -1
  85. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
  86. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +2 -0
  87. package/dist/collection/components/ez-grid/ez-grid.css +47 -8
  88. package/dist/collection/components/ez-grid/ez-grid.js +280 -9
  89. package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
  90. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +1 -1
  91. package/dist/collection/components/ez-icon/ez-icon.css +155 -149
  92. package/dist/collection/components/ez-list/ez-list.css +2 -1
  93. package/dist/collection/components/ez-list/ez-list.js +301 -212
  94. package/dist/collection/components/ez-list/ezListHelper.js +85 -0
  95. package/dist/collection/components/ez-modal/ez-modal.css +5 -1
  96. package/dist/collection/components/ez-modal/ez-modal.js +38 -5
  97. package/dist/collection/components/ez-modal-container/ez-modal-container.js +20 -1
  98. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -3
  99. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
  100. package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
  101. package/dist/collection/components/ez-number-input/ez-number-input.js +68 -1
  102. package/dist/collection/components/ez-popup/ez-popup.css +8 -3
  103. package/dist/collection/components/ez-popup/ez-popup.js +43 -3
  104. package/dist/collection/components/ez-scroller/ez-scroller.css +1 -0
  105. package/dist/collection/components/ez-search/ez-search.css +21 -10
  106. package/dist/collection/components/ez-search/ez-search.js +211 -53
  107. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
  108. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
  109. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +3 -1
  110. package/dist/collection/components/ez-skeleton/ez-skeleton.css +54 -34
  111. package/dist/collection/components/ez-split-button/ez-split-button.css +50 -14
  112. package/dist/collection/components/ez-split-button/ez-split-button.js +3 -3
  113. package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
  114. package/dist/collection/components/ez-split-panel/ez-split-panel.js +106 -5
  115. package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
  116. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +14 -2
  117. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +22 -1
  118. package/dist/collection/components/ez-text-area/ez-text-area.css +78 -29
  119. package/dist/collection/components/ez-text-area/ez-text-area.js +104 -4
  120. package/dist/collection/components/ez-text-input/ez-text-input.css +106 -91
  121. package/dist/collection/components/ez-text-input/ez-text-input.js +185 -15
  122. package/dist/collection/components/ez-time-input/ez-time-input.js +44 -1
  123. package/dist/collection/components/ez-tooltip/ez-tooltip.css +20 -0
  124. package/dist/collection/components/ez-tooltip/ez-tooltip.js +116 -0
  125. package/dist/collection/components/ez-tree/ez-tree.js +21 -1
  126. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
  127. package/dist/collection/sw.js +46 -0
  128. package/dist/collection/utils/FocusResolver.js +31 -0
  129. package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
  130. package/dist/collection/utils/form/DataBinder.js +22 -7
  131. package/dist/collection/utils/form/FormMetadata.js +2 -1
  132. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
  133. package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
  134. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
  135. package/dist/custom-elements/index.d.ts +12 -0
  136. package/dist/custom-elements/index.js +16502 -70294
  137. package/dist/esm/DataBinder-9c877244.js +441 -0
  138. package/dist/esm/FocusResolver-1ccbf850.js +33 -0
  139. package/dist/esm/ez-actions-button.entry.js +3 -2
  140. package/dist/esm/ez-button.entry.js +11 -5
  141. package/dist/esm/ez-card-item_2.entry.js +71 -0
  142. package/dist/esm/ez-check.entry.js +1 -1
  143. package/dist/esm/ez-collapsible-box.entry.js +1 -1
  144. package/dist/esm/ez-combo-box.entry.js +68 -14
  145. package/dist/esm/ez-custom-form-input_2.entry.js +36 -6
  146. package/dist/esm/ez-date-input.entry.js +14 -4
  147. package/dist/esm/ez-date-time-input.entry.js +11 -4
  148. package/dist/esm/ez-dialog.entry.js +15 -8
  149. package/dist/esm/ez-double-list.entry.js +283 -0
  150. package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +75 -9
  151. package/dist/esm/ez-filter-input.entry.js +126 -0
  152. package/dist/esm/ez-form-view.entry.js +29 -22
  153. package/dist/esm/ez-form.entry.js +5 -324
  154. package/dist/esm/ez-grid.entry.js +14891 -69726
  155. package/dist/esm/ez-icon.entry.js +1 -1
  156. package/dist/esm/ez-list.entry.js +258 -211
  157. package/dist/esm/ez-modal-container.entry.js +2 -1
  158. package/dist/esm/ez-modal.entry.js +19 -4
  159. package/dist/esm/ez-multi-selection-list.entry.js +2 -2
  160. package/dist/esm/ez-number-input.entry.js +15 -2
  161. package/dist/esm/ez-popup.entry.js +24 -2
  162. package/dist/esm/ez-scroller_2.entry.js +3 -3
  163. package/dist/esm/ez-search.entry.js +108 -47
  164. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  165. package/dist/esm/ez-split-button.entry.js +2 -2
  166. package/dist/esm/ez-split-item.entry.js +5 -2
  167. package/dist/esm/ez-split-panel.entry.js +69 -7
  168. package/dist/esm/ez-text-area.entry.js +68 -6
  169. package/dist/esm/ez-text-input.entry.js +153 -16
  170. package/dist/esm/ez-time-input.entry.js +8 -1
  171. package/dist/esm/ez-tooltip.entry.js +51 -0
  172. package/dist/esm/ez-tree.entry.js +5 -4
  173. package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
  174. package/dist/esm/ezui.js +1 -1
  175. package/dist/esm/filter-column.entry.js +2 -2
  176. package/dist/esm/index-baa5e267.js +16 -8
  177. package/dist/esm/loader.js +1 -1
  178. package/dist/ezui/ezui.esm.js +1 -1
  179. package/dist/ezui/p-14b769d7.entry.js +1 -0
  180. package/dist/ezui/p-16e612fc.entry.js +1 -0
  181. package/dist/ezui/p-17eabf46.entry.js +1 -0
  182. package/dist/ezui/p-2475fd6e.entry.js +1 -0
  183. package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
  184. package/dist/ezui/p-2f45506d.entry.js +1 -0
  185. package/dist/ezui/p-35464ae8.entry.js +1 -0
  186. package/dist/ezui/p-354abfe8.entry.js +1 -0
  187. package/dist/ezui/{p-baf80b13.entry.js → p-35d467a8.entry.js} +1 -1
  188. package/dist/ezui/p-3f2dd525.entry.js +1 -0
  189. package/dist/ezui/p-420f97ff.entry.js +1 -0
  190. package/dist/ezui/p-50d83a46.entry.js +1 -0
  191. package/dist/ezui/p-654b3f99.entry.js +1 -0
  192. package/dist/ezui/p-65f471bc.entry.js +1 -0
  193. package/dist/ezui/p-6cdd3e0a.entry.js +1 -0
  194. package/dist/ezui/p-6d79930d.entry.js +1 -0
  195. package/dist/ezui/p-6f22a385.entry.js +1 -0
  196. package/dist/ezui/p-7409eeaa.entry.js +1 -0
  197. package/dist/ezui/p-7e677b7b.entry.js +1 -0
  198. package/dist/ezui/{p-bf79aaa1.entry.js → p-7fdd479f.entry.js} +1 -1
  199. package/dist/ezui/p-80dfc50b.js +1 -0
  200. package/dist/ezui/p-990b4318.entry.js +1 -0
  201. package/dist/ezui/p-a6fe527a.entry.js +1 -0
  202. package/dist/ezui/p-acddfb2e.js +1 -0
  203. package/dist/ezui/p-b6597f49.entry.js +309 -0
  204. package/dist/ezui/p-b6a4e6de.entry.js +1 -0
  205. package/dist/ezui/p-c3045972.entry.js +1 -0
  206. package/dist/ezui/p-ca6340a9.entry.js +1 -0
  207. package/dist/ezui/p-cf87aacb.entry.js +1 -0
  208. package/dist/ezui/p-da1b4a38.entry.js +1 -0
  209. package/dist/ezui/p-dc628ed3.js +1 -0
  210. package/dist/ezui/p-dc8b36c3.entry.js +1 -0
  211. package/dist/ezui/{p-84e439b9.entry.js → p-e347df9c.entry.js} +1 -1
  212. package/dist/ezui/p-e3e3fd7a.entry.js +1 -0
  213. package/dist/ezui/p-ea54d056.entry.js +1 -0
  214. package/dist/ezui/p-f43dbada.entry.js +1 -0
  215. package/dist/ezui/p-fa6732f2.entry.js +1 -0
  216. package/dist/ezui/p-fec696ab.entry.js +1 -0
  217. package/dist/types/components/ez-button/ez-button.d.ts +2 -1
  218. package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
  219. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +16 -1
  220. package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -1
  221. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +10 -1
  222. package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -1
  223. package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
  224. package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
  225. package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +4 -0
  226. package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +1 -1
  227. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +10 -1
  228. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
  229. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
  230. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
  231. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  232. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +71 -4
  233. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +36 -4
  234. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +25 -2
  235. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +33 -7
  236. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +4 -1
  237. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
  238. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  239. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
  240. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
  241. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +2 -1
  242. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
  243. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
  244. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
  245. package/dist/types/components/ez-grid/ez-grid.d.ts +49 -1
  246. package/dist/types/components/ez-list/ez-list.d.ts +23 -2
  247. package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
  248. package/dist/types/components/ez-modal/ez-modal.d.ts +7 -1
  249. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
  250. package/dist/types/components/ez-number-input/ez-number-input.d.ts +12 -0
  251. package/dist/types/components/ez-popup/ez-popup.d.ts +8 -1
  252. package/dist/types/components/ez-search/ez-search.d.ts +34 -6
  253. package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -1
  254. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +11 -0
  255. package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
  256. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
  257. package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
  258. package/dist/types/components/ez-text-input/ez-text-input.d.ts +28 -2
  259. package/dist/types/components/ez-time-input/ez-time-input.d.ts +8 -0
  260. package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +21 -0
  261. package/dist/types/components/ez-tree/ez-tree.d.ts +4 -0
  262. package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
  263. package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
  264. package/dist/types/components.d.ts +486 -27
  265. package/dist/types/utils/FocusResolver.d.ts +5 -0
  266. package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
  267. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
  268. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  269. package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
  270. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
  271. package/package.json +12 -4
  272. package/react/components.d.ts +2 -0
  273. package/react/components.js +2 -0
  274. package/react/components.js.map +1 -1
  275. package/dist/cjs/RecordValidationProcessor-4c893e04.js +0 -102
  276. package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -183
  277. package/dist/cjs/ez-skeleton.cjs.entry.js +0 -67
  278. package/dist/esm/RecordValidationProcessor-b00b8b77.js +0 -99
  279. package/dist/esm/ez-card-item_3.entry.js +0 -177
  280. package/dist/esm/ez-skeleton.entry.js +0 -63
  281. package/dist/ezui/p-04f24913.js +0 -1
  282. package/dist/ezui/p-072e6347.entry.js +0 -1
  283. package/dist/ezui/p-1285c902.entry.js +0 -1
  284. package/dist/ezui/p-13d2fe2d.entry.js +0 -1
  285. package/dist/ezui/p-2097d0cf.entry.js +0 -1
  286. package/dist/ezui/p-30775e7f.entry.js +0 -1
  287. package/dist/ezui/p-32e553e5.entry.js +0 -304
  288. package/dist/ezui/p-3b4eeeb6.entry.js +0 -1
  289. package/dist/ezui/p-3faa2b46.entry.js +0 -1
  290. package/dist/ezui/p-49456b34.entry.js +0 -1
  291. package/dist/ezui/p-4d5235f1.entry.js +0 -1
  292. package/dist/ezui/p-5bd5e68f.entry.js +0 -1
  293. package/dist/ezui/p-784fe207.entry.js +0 -1
  294. package/dist/ezui/p-7922142b.entry.js +0 -1
  295. package/dist/ezui/p-7af81663.entry.js +0 -1
  296. package/dist/ezui/p-7bc07c31.entry.js +0 -1
  297. package/dist/ezui/p-85c8baae.entry.js +0 -1
  298. package/dist/ezui/p-8888d9ed.entry.js +0 -1
  299. package/dist/ezui/p-8f0144f6.entry.js +0 -1
  300. package/dist/ezui/p-9050d2cd.entry.js +0 -1
  301. package/dist/ezui/p-922ac38b.entry.js +0 -1
  302. package/dist/ezui/p-9ab22a07.entry.js +0 -1
  303. package/dist/ezui/p-a31b9c90.entry.js +0 -1
  304. package/dist/ezui/p-af95cd16.entry.js +0 -1
  305. package/dist/ezui/p-bae4e180.entry.js +0 -1
  306. package/dist/ezui/p-bcb53f27.entry.js +0 -1
  307. package/dist/ezui/p-d9401ea0.entry.js +0 -1
  308. package/dist/ezui/p-e85c48d7.entry.js +0 -1
  309. package/dist/ezui/p-ecc2c1ec.entry.js +0 -1
  310. package/dist/ezui/p-f3c526cc.entry.js +0 -1
  311. 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,75 @@ 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
+ const field = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
1110
+ if ((field === null || field === void 0 ? void 0 : field.userInterface) === UserInterface.SEARCH) {
1111
+ return this.DEFAULT_MAX_SIZE;
1112
+ }
1113
+ 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;
1114
+ return labelSize > this.DEFAULT_MAX_SIZE ? this.DEFAULT_MAX_SIZE : labelSize;
886
1115
  }
887
1116
  }