@sankhyalabs/sankhyablocks 8.16.0-dev.4 → 8.16.0-dev.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (258) hide show
  1. package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-ecc0ed20.js} +3 -2
  2. package/dist/cjs/{IExporterProvider-597949f9.js → ContinuousInsertUtils-37c7cbcf.js} +64 -22
  3. package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-cadeef8e.js} +21 -15
  4. package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
  5. package/dist/cjs/{SnkFormConfigManager-1b13bacd.js → SnkFormConfigManager-f1c92f79.js} +74 -20
  6. package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-bae64d0d.js} +7 -3
  7. package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-d68841bc.js} +1 -1
  8. package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-a36ae041.js} +48 -20
  9. package/dist/cjs/{field-search-f56aa7d6.js → field-search-68e34bf4.js} +5 -1
  10. package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-ed497282.js} +5 -2
  11. package/dist/cjs/index-f9e81701.js +8 -28
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-490a86c3.js} +7 -2
  14. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  15. package/dist/cjs/snk-actions-button_4.cjs.entry.js +17 -14
  16. package/dist/cjs/snk-application.cjs.entry.js +7 -7
  17. package/dist/cjs/snk-attach.cjs.entry.js +38 -29
  18. package/dist/cjs/{snk-form-config.cjs.entry.js → snk-config-options_3.cjs.entry.js} +381 -7
  19. package/dist/cjs/snk-crud.cjs.entry.js +16 -7
  20. package/dist/cjs/snk-data-exporter.cjs.entry.js +19 -18
  21. package/dist/cjs/{snk-data-unit-685272e7.js → snk-data-unit-b460f1da.js} +42 -22
  22. package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
  23. package/dist/cjs/snk-detail-view.cjs.entry.js +12 -13
  24. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1411 -0
  26. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  27. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  28. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  29. package/dist/cjs/snk-grid.cjs.entry.js +58 -21
  30. package/dist/cjs/{snk-guides-viewer-67605336.js → snk-guides-viewer-de0a5c57.js} +27 -14
  31. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
  32. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
  33. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  34. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  35. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  36. package/dist/cjs/snk-simple-crud.cjs.entry.js +66 -27
  37. package/dist/cjs/snk-taskbar.cjs.entry.js +24 -1
  38. package/dist/collection/collection-manifest.json +11 -31
  39. package/dist/collection/components/snk-actions-button/actions/index.js +12 -9
  40. package/dist/collection/components/snk-attach/snk-attach.js +25 -16
  41. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
  42. package/dist/collection/components/snk-crud/snk-crud.js +97 -2
  43. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +3 -4
  44. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +6 -6
  45. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +70 -7
  46. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
  47. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +4 -4
  48. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +5 -5
  49. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +1 -1
  50. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
  51. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +2 -2
  52. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
  53. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +4 -4
  54. package/dist/collection/components/snk-data-unit/snk-data-unit.js +57 -20
  55. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +1 -1
  56. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
  57. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +1 -1
  58. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
  59. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +59 -21
  60. package/dist/collection/components/snk-form/snk-form.js +2 -2
  61. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +72 -18
  62. package/dist/collection/components/snk-form-config/snk-form-config.css +8 -3
  63. package/dist/collection/components/snk-form-config/snk-form-config.js +32 -3
  64. package/dist/collection/components/snk-grid/snk-grid.css +2 -0
  65. package/dist/collection/components/snk-grid/snk-grid.js +74 -8
  66. package/dist/collection/components/snk-print-selector/snk-print-selector.js +1 -1
  67. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
  68. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +0 -1
  69. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +91 -16
  70. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
  71. package/dist/collection/components/snk-taskbar/snk-taskbar.js +65 -0
  72. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
  73. package/dist/collection/lib/configs/ConfigStorage.js +1 -0
  74. package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -4
  75. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +34 -9
  76. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +22 -16
  77. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
  78. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +2 -2
  79. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +9 -2
  80. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +4 -1
  81. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +6 -1
  82. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
  83. package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
  84. package/dist/collection/lib/message/resources/snk-grid.msg.js +5 -1
  85. package/dist/collection/lib/utils/ContinuousInsertUtils.js +31 -0
  86. package/dist/collection/lib/utils/CrudUtils.js +25 -16
  87. package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
  88. package/dist/collection/sw.js +46 -0
  89. package/dist/components/ConfigStorage.js +1 -0
  90. package/dist/components/{IExporterProvider.js → ContinuousInsertUtils.js} +65 -21
  91. package/dist/components/DataFetcher.js +22 -16
  92. package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
  93. package/dist/components/SnkFormConfigManager.js +72 -18
  94. package/dist/components/SnkMessageBuilder.js +7 -3
  95. package/dist/components/dataunit-fetcher.js +47 -17
  96. package/dist/components/form-config-fetcher.js +4 -1
  97. package/dist/components/pesquisa-fetcher.js +6 -1
  98. package/dist/components/snk-actions-button2.js +12 -9
  99. package/dist/components/snk-attach2.js +34 -25
  100. package/dist/components/snk-crud.js +15 -2
  101. package/dist/components/snk-data-exporter2.js +12 -11
  102. package/dist/components/snk-data-unit2.js +44 -60
  103. package/dist/components/snk-detail-view2.js +28 -13
  104. package/dist/components/snk-exporter-email-sender2.js +1 -1
  105. package/dist/components/snk-filter-bar2.js +35 -22
  106. package/dist/components/snk-filter-binary-select.js +1 -1
  107. package/dist/components/snk-filter-checkbox-list.js +1 -1
  108. package/dist/components/snk-form-config2.js +17 -4
  109. package/dist/components/snk-form.js +2 -2
  110. package/dist/components/snk-grid2.js +51 -12
  111. package/dist/components/snk-personalized-filter-editor.js +1 -1
  112. package/dist/components/snk-print-selector.js +1 -1
  113. package/dist/components/snk-simple-bar2.js +1 -1
  114. package/dist/components/snk-simple-crud2.js +59 -16
  115. package/dist/components/snk-taskbar2.js +25 -2
  116. package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-7b36d041.js} +3 -2
  117. package/dist/esm/{IExporterProvider-63a188b6.js → ContinuousInsertUtils-881c41a9.js} +65 -24
  118. package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-a9c598f2.js} +22 -16
  119. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
  120. package/dist/esm/{SnkFormConfigManager-d4554df9.js → SnkFormConfigManager-f1a0fc92.js} +74 -20
  121. package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-6fff4a4c.js} +7 -3
  122. package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-749d880f.js} +1 -1
  123. package/dist/esm/{constants-8457af36.js → constants-7302ee87.js} +1 -1
  124. package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-fd58c640.js} +48 -18
  125. package/dist/esm/{field-search-efbe307f.js → field-search-f8b1d91e.js} +5 -1
  126. package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-adbe5d34.js} +5 -2
  127. package/dist/esm/index-a7d3d3f1.js +8 -28
  128. package/dist/esm/loader.js +1 -1
  129. package/dist/esm/{pesquisa-fetcher-03c8f919.js → pesquisa-fetcher-50fc7e6b.js} +7 -2
  130. package/dist/esm/sankhyablocks.js +1 -1
  131. package/dist/esm/snk-actions-button_4.entry.js +18 -15
  132. package/dist/esm/snk-application.entry.js +7 -7
  133. package/dist/esm/snk-attach.entry.js +39 -30
  134. package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +382 -10
  135. package/dist/esm/snk-configurator.entry.js +1 -1
  136. package/dist/esm/snk-crud.entry.js +17 -8
  137. package/dist/esm/snk-data-exporter.entry.js +20 -19
  138. package/dist/esm/{snk-data-unit-63f83504.js → snk-data-unit-590225b5.js} +42 -22
  139. package/dist/esm/snk-data-unit.entry.js +5 -5
  140. package/dist/esm/snk-detail-view.entry.js +13 -14
  141. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  142. package/dist/esm/snk-field-config.entry.js +1 -1
  143. package/dist/esm/snk-filter-bar_4.entry.js +1404 -0
  144. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  145. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  146. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  147. package/dist/esm/snk-grid.entry.js +53 -16
  148. package/dist/esm/{snk-guides-viewer-151f6091.js → snk-guides-viewer-2f4dcdc5.js} +28 -15
  149. package/dist/esm/snk-guides-viewer.entry.js +9 -9
  150. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  151. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  152. package/dist/esm/snk-print-selector.entry.js +1 -1
  153. package/dist/esm/snk-simple-bar.entry.js +1 -1
  154. package/dist/esm/snk-simple-crud.entry.js +63 -24
  155. package/dist/esm/snk-tab-config.entry.js +1 -1
  156. package/dist/esm/snk-taskbar.entry.js +24 -1
  157. package/dist/sankhyablocks/p-052213ba.entry.js +1 -0
  158. package/dist/sankhyablocks/{p-df5451c7.js → p-06421fdb.js} +2 -2
  159. package/dist/sankhyablocks/p-0b6cd238.entry.js +1 -0
  160. package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
  161. package/dist/sankhyablocks/p-17425c72.js +1 -0
  162. package/dist/sankhyablocks/{p-a1d72395.entry.js → p-212213d9.entry.js} +1 -1
  163. package/dist/sankhyablocks/p-23736d75.js +1 -0
  164. package/dist/sankhyablocks/p-242d010e.entry.js +1 -0
  165. package/dist/sankhyablocks/p-275de842.entry.js +1 -0
  166. package/dist/sankhyablocks/p-2aae03a1.entry.js +1 -0
  167. package/dist/sankhyablocks/{p-8eb67fa4.entry.js → p-2d3f9482.entry.js} +1 -1
  168. package/dist/sankhyablocks/{p-7663f597.entry.js → p-41793e17.entry.js} +1 -1
  169. package/dist/sankhyablocks/{p-72fc257b.entry.js → p-434817f0.entry.js} +1 -1
  170. package/dist/sankhyablocks/p-47bce500.js +60 -0
  171. package/dist/sankhyablocks/{p-aff76a53.js → p-4d9549cf.js} +2 -2
  172. package/dist/sankhyablocks/p-583517ba.entry.js +1 -0
  173. package/dist/sankhyablocks/p-5b51491f.entry.js +1 -0
  174. package/dist/sankhyablocks/p-5e51e833.entry.js +1 -0
  175. package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
  176. package/dist/sankhyablocks/p-6114ee36.entry.js +1 -0
  177. package/dist/sankhyablocks/p-72c10005.entry.js +1 -0
  178. package/dist/sankhyablocks/p-7bd9683d.js +1 -0
  179. package/dist/sankhyablocks/p-7dd49d15.js +1 -0
  180. package/dist/sankhyablocks/{p-af8efd95.js → p-8a9638ae.js} +2 -2
  181. package/dist/sankhyablocks/{p-95df461f.entry.js → p-8b4fc28f.entry.js} +1 -1
  182. package/dist/sankhyablocks/{p-41f8bfa3.entry.js → p-8c235d4c.entry.js} +1 -1
  183. package/dist/sankhyablocks/{p-b0ef4383.js → p-95ce311a.js} +1 -1
  184. package/dist/sankhyablocks/p-ab1645fb.entry.js +1 -0
  185. package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
  186. package/dist/sankhyablocks/{p-913a9979.js → p-ca5ec380.js} +1 -1
  187. package/dist/sankhyablocks/p-cefb0ee1.entry.js +1 -0
  188. package/dist/sankhyablocks/p-cfa1b199.js +1 -0
  189. package/dist/sankhyablocks/{p-82a0bfb0.entry.js → p-dbe6174a.entry.js} +2 -2
  190. package/dist/sankhyablocks/p-f3434fc4.js +1 -0
  191. package/dist/sankhyablocks/p-fa6c5826.entry.js +1 -0
  192. package/dist/sankhyablocks/p-fadc8339.js +1 -0
  193. package/dist/sankhyablocks/{p-eae7a817.entry.js → p-fb34e0cf.entry.js} +1 -1
  194. package/dist/sankhyablocks/p-fd13b4d2.js +1 -0
  195. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  196. package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
  197. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  198. package/dist/types/components/snk-crud/snk-crud.d.ts +17 -0
  199. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +15 -0
  200. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
  201. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +7 -0
  202. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +5 -0
  203. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +9 -4
  204. package/dist/types/components/snk-form-config/snk-form-config.d.ts +4 -0
  205. package/dist/types/components/snk-grid/snk-grid.d.ts +11 -0
  206. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +13 -0
  207. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
  208. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
  209. package/dist/types/components.d.ts +113 -0
  210. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +12 -2
  211. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
  212. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -1
  213. package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +10 -0
  214. package/dist/types/lib/utils/CrudUtils.d.ts +1 -0
  215. package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
  216. package/package.json +4 -3
  217. package/dist/cjs/snk-config-options.cjs.entry.js +0 -239
  218. package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -714
  219. package/dist/cjs/snk-filter-item.cjs.entry.js +0 -312
  220. package/dist/cjs/snk-filter-list.cjs.entry.js +0 -152
  221. package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -249
  222. package/dist/cjs/snk-form.cjs.entry.js +0 -143
  223. package/dist/esm/snk-config-options.entry.js +0 -235
  224. package/dist/esm/snk-filter-bar.entry.js +0 -710
  225. package/dist/esm/snk-filter-item.entry.js +0 -308
  226. package/dist/esm/snk-filter-list.entry.js +0 -148
  227. package/dist/esm/snk-filter-modal.entry.js +0 -245
  228. package/dist/esm/snk-form.entry.js +0 -139
  229. package/dist/sankhyablocks/p-14a08904.entry.js +0 -1
  230. package/dist/sankhyablocks/p-14b9f964.entry.js +0 -1
  231. package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
  232. package/dist/sankhyablocks/p-3a212712.js +0 -1
  233. package/dist/sankhyablocks/p-3a216b81.entry.js +0 -1
  234. package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
  235. package/dist/sankhyablocks/p-47b60deb.entry.js +0 -1
  236. package/dist/sankhyablocks/p-70a4af56.entry.js +0 -1
  237. package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
  238. package/dist/sankhyablocks/p-75f83d1d.entry.js +0 -1
  239. package/dist/sankhyablocks/p-7a337364.js +0 -1
  240. package/dist/sankhyablocks/p-829d4045.js +0 -1
  241. package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
  242. package/dist/sankhyablocks/p-8fc470e5.entry.js +0 -1
  243. package/dist/sankhyablocks/p-941bf3ef.entry.js +0 -1
  244. package/dist/sankhyablocks/p-9863d682.js +0 -1
  245. package/dist/sankhyablocks/p-b11aa1e0.entry.js +0 -1
  246. package/dist/sankhyablocks/p-b4b21558.entry.js +0 -1
  247. package/dist/sankhyablocks/p-bad55caa.entry.js +0 -1
  248. package/dist/sankhyablocks/p-c053256c.entry.js +0 -1
  249. package/dist/sankhyablocks/p-c2495304.js +0 -1
  250. package/dist/sankhyablocks/p-c5268346.entry.js +0 -1
  251. package/dist/sankhyablocks/p-cefba299.js +0 -1
  252. package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
  253. package/dist/sankhyablocks/p-dc7c9047.js +0 -1
  254. package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
  255. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  256. package/dist/sankhyablocks/p-fcac4dfc.js +0 -1
  257. package/dist/sankhyablocks/p-fe79f83a.js +0 -60
  258. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -1,4 +1,4 @@
1
- import { h, Fragment } from '@stencil/core';
1
+ import { h, Fragment, } from '@stencil/core';
2
2
  import { Action as DUAction, ApplicationContext, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
3
3
  import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
4
4
  import { ConfigStorage } from '../../lib/configs/ConfigStorage';
@@ -11,6 +11,7 @@ import { buildFieldSearch, openFieldSearch } from '../snk-taskbar/subcomponents/
11
11
  import { CrudUtils } from '../../lib';
12
12
  import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
13
13
  import ServerSideExporterProvider from '../snk-data-exporter/providers/ServerSideExporterProvider';
14
+ import { ContinuousInsertUtils } from '../../lib/utils/ContinuousInsertUtils';
14
15
  export class SnkGrid {
15
16
  constructor() {
16
17
  this._customEditors = new Map();
@@ -19,7 +20,7 @@ export class SnkGrid {
19
20
  "snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
20
21
  "snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
21
22
  "snkGridTopTaskbar.regular.singleTaskbar": [],
22
- "snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
23
+ "snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE", this.handleAddFormMode()],
23
24
  "snkGridTopTaskbar.finish_edition.secondary": [],
24
25
  "snkGridTopTaskbar.finish_edition.singleTaskbar": [],
25
26
  });
@@ -32,7 +33,7 @@ export class SnkGrid {
32
33
  "snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
33
34
  "snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
34
35
  "snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
35
- "snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
36
+ "snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE", this.handleAddFormMode()]
36
37
  });
37
38
  this.dataUnitInterceptor = {
38
39
  interceptAction: async (action) => {
@@ -47,6 +48,7 @@ export class SnkGrid {
47
48
  this._gridConfig = undefined;
48
49
  this._popUpGridConfig = false;
49
50
  this._showSnkFilterBar = true;
51
+ this._enableContinuousInsert = false;
50
52
  this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
51
53
  this.configName = undefined;
52
54
  this.filterBarTitle = undefined;
@@ -70,6 +72,7 @@ export class SnkGrid {
70
72
  this.filterBarLegacyConfigName = undefined;
71
73
  this.autoLoad = undefined;
72
74
  this.autoFocus = true;
75
+ this.enableGridInsert = false;
73
76
  }
74
77
  /**
75
78
  * Exibe a janela de configurações da grade.
@@ -156,6 +159,17 @@ export class SnkGrid {
156
159
  async setFocus() {
157
160
  this._grid.setFocus();
158
161
  }
162
+ async handleClick(event) {
163
+ if (this.hasToBlockEvent(event)) {
164
+ event.preventDefault();
165
+ event.stopPropagation();
166
+ await this._dataUnit.cancelEdition();
167
+ }
168
+ }
169
+ hasToBlockEvent(event) {
170
+ var _a;
171
+ return ((_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.contains(event.target)) && this.enableGridInsert && this._dataUnit.hasNewRecord();
172
+ }
159
173
  async handleGridLegacyConfigName(newLegacyConfig, oldLegacyConfig) {
160
174
  if (!newLegacyConfig) {
161
175
  return;
@@ -166,6 +180,9 @@ export class SnkGrid {
166
180
  this.addGridLegacyConfigName();
167
181
  this.loadConfig();
168
182
  }
183
+ handleAddFormMode() {
184
+ return this.enableGridInsert ? TaskbarElement.FORM_MODE : "";
185
+ }
169
186
  openGridConfig() {
170
187
  this._grid.getColumnsState()
171
188
  .then((gridColumns) => {
@@ -293,10 +310,15 @@ export class SnkGrid {
293
310
  this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
294
311
  this.addGridLegacyConfigName();
295
312
  this.loadConfig();
313
+ this._continuousInsertUtils = new ContinuousInsertUtils(this._application, this.resourceID, this.configName);
314
+ if (this.enableGridInsert) {
315
+ this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
316
+ }
296
317
  }
297
318
  componentDidRender() {
319
+ var _a, _b;
298
320
  this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
299
- this.loadGridCustomFormatters(this._dataUnit.metadata.fields);
321
+ this.loadGridCustomFormatters((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.fields);
300
322
  this.setCustomRenders();
301
323
  this.setCustomEditors();
302
324
  }
@@ -309,7 +331,7 @@ export class SnkGrid {
309
331
  const disabledButtons = [];
310
332
  if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
311
333
  if (this._dataState.selectionInfo.length > 1) {
312
- disabledButtons.push(TaskbarElement.CLONE, "ATTACH");
334
+ disabledButtons.push(TaskbarElement.CLONE, "ATTACH", TaskbarElement.UPDATE);
313
335
  }
314
336
  if (this._dataState.selectionInfo.isAllRecords()) {
315
337
  disabledButtons.push("REMOVE");
@@ -394,6 +416,14 @@ export class SnkGrid {
394
416
  eagerInitialize: true,
395
417
  itemBuilder: (actionButton, item) => this.getColumnSearch(actionButton, item)
396
418
  }];
419
+ if (this.enableGridInsert) {
420
+ hardList.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert, () => {
421
+ this._enableContinuousInsert = !this._enableContinuousInsert;
422
+ this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert);
423
+ }));
424
+ }
425
+ if (this.isGridInsertActive())
426
+ return hardList;
397
427
  if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
398
428
  const taskbarID = this.getTopTaskBarId();
399
429
  return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this._dataState, this.actionsList));
@@ -411,12 +441,20 @@ export class SnkGrid {
411
441
  }
412
442
  this._showSnkFilterBar = true;
413
443
  }
444
+ getGridHeaderButtons() {
445
+ if (this.isGridInsertActive())
446
+ return TaskbarElement.MORE_OPTIONS;
447
+ return this._headerTaskbarProcessor.buttons;
448
+ }
449
+ isGridInsertActive() {
450
+ return this.enableGridInsert && this._dataUnit.hasNewRecord();
451
+ }
414
452
  render() {
415
453
  if (!this._dataUnit) {
416
454
  return undefined;
417
455
  }
418
- return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
419
- h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
456
+ return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
457
+ h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
420
458
  }
421
459
  static get is() { return "snk-grid"; }
422
460
  static get encapsulation() { return "scoped"; }
@@ -862,6 +900,24 @@ export class SnkGrid {
862
900
  "attribute": "auto-focus",
863
901
  "reflect": false,
864
902
  "defaultValue": "true"
903
+ },
904
+ "enableGridInsert": {
905
+ "type": "boolean",
906
+ "mutable": false,
907
+ "complexType": {
908
+ "original": "boolean",
909
+ "resolved": "boolean",
910
+ "references": {}
911
+ },
912
+ "required": false,
913
+ "optional": true,
914
+ "docs": {
915
+ "tags": [],
916
+ "text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
917
+ },
918
+ "attribute": "enable-grid-insert",
919
+ "reflect": false,
920
+ "defaultValue": "false"
865
921
  }
866
922
  };
867
923
  }
@@ -871,7 +927,8 @@ export class SnkGrid {
871
927
  "_dataState": {},
872
928
  "_gridConfig": {},
873
929
  "_popUpGridConfig": {},
874
- "_showSnkFilterBar": {}
930
+ "_showSnkFilterBar": {},
931
+ "_enableContinuousInsert": {}
875
932
  };
876
933
  }
877
934
  static get events() {
@@ -1143,4 +1200,13 @@ export class SnkGrid {
1143
1200
  "methodName": "handleGridLegacyConfigName"
1144
1201
  }];
1145
1202
  }
1203
+ static get listeners() {
1204
+ return [{
1205
+ "name": "click",
1206
+ "method": "handleClick",
1207
+ "target": undefined,
1208
+ "capture": true,
1209
+ "passive": false
1210
+ }];
1211
+ }
1146
1212
  }
@@ -146,7 +146,7 @@ export class SnkPrintSelector {
146
146
  render() {
147
147
  return (h(Host, null, h("ez-popup", Object.assign({ size: 'small', heightMode: 'full', useHeader: false, ref: (ref) => this._ezPopup = ref }, this.getElementID("snk-print-selector")), h("ez-modal-container", { modalTitle: this.getMessage("snkPrintSelector.title.printerSelection"), okButtonLabel: this.getMessage("snkPrintSelector.button.print"), okButtonStatus: this._selectedPrinter ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED, cancelButtonLabel: this.getMessage("snkPrintSelector.button.cancel"), onEzModalAction: (evt) => this.handleModalAction(evt.detail) }, this._isSingleJob &&
148
148
  h("div", { class: 'ez-flex ez-margin-bottom--large' }, h("div", { class: 'ez-flex ez-margin-right--large' }, h("span", { class: 'ez-text ez-text--bold ez-text--medium ez-padding-right--small' }, this.getMessage("snkPrintSelector.subtitle.document")), h("span", { class: 'ez-text ez-text--primary ez-text--medium' }, this._printJobData.pendingPrinters[0].docTypeDescription)), h("div", { class: 'ez-flex ez-margin-right--large' }, h("span", { class: 'ez-text ez-text--bold ez-text--medium ez-padding-right--small' }, this.getMessage("snkPrintSelector.subtitle.jobs")), h("span", { class: 'ez-text ez-text--primary ez-text--medium' }, this._printJobData.pendingPrinters[0].printJobCount))), h("ez-tabselector", { tabs: this.buildIdTabSelector(), onEzChange: (evt) => this.onChangeTab(evt), selectedTab: this._printServerActive ? this.REMOTE_PRINTERS_TAB : this.LOCAL_PRINTERS_TAB }), h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, h("stack-item", { hidePolicy: 'hide' }, this._printServerActive &&
149
- h("div", { class: `list-scroll ez-size-height--full ${this._isSingleJob ? 'with-header' : 'without-header'}` }, h("ez-list", { ref: (ref) => this._remotePrintersList = ref, class: `ez-padding-top--medium ${this._hasRemotePrinters ? '' : 'hidden'}`, dataSource: this._remotePrintersDataSource, onEzSelectItem: (evt) => this.onSelectPrinter(evt.detail, false), itemLeftSlotBuilder: this.buildPrinterIcon, useGroups: true, ezSelectable: true, hoverFeedback: true, "data-element-id": 'remotePrintersList' }), !this._hasRemotePrinters && this.renderNoPrinters())), h("stack-item", { hidePolicy: 'hide' }, h("div", { class: `list-scroll ez-size-height--full ${this._isSingleJob ? 'with-header' : 'without-header'}` }, h("ez-list", { ref: (ref) => this._localPrintersList = ref, class: `ez-padding-top--medium ${this._hasLocalPrinters ? '' : 'hidden'}`, dataSource: this._localPrintersDataSource, onEzSelectItem: (evt) => this.onSelectPrinter(evt.detail, true), itemLeftSlotBuilder: this.buildPrinterIcon, ezSelectable: true, hoverFeedback: true }), !this._hasLocalPrinters && this.renderNoPrinters()))), h("ez-check", { label: this.getMessage("snkPrintSelector.message.savePrinter"), onEzChange: evt => this._saveSubstitute = evt.detail, compact: true })))));
149
+ h("div", { class: `list-scroll ez-size-height--full ${this._isSingleJob ? 'with-header' : 'without-header'}` }, h("ez-list", { ref: (ref) => this._remotePrintersList = ref, class: `ez-padding-top--medium ${this._hasRemotePrinters ? '' : 'hidden'}`, dataSource: this._remotePrintersDataSource, onEzSelectItem: (evt) => this.onSelectPrinter(evt.detail, false), itemLeftSlotBuilder: this.buildPrinterIcon, useGroups: true, ezSelectable: true, hoverFeedback: true, "data-element-id": 'remotePrintersList' }), !this._hasRemotePrinters && this.renderNoPrinters())), h("stack-item", { hidePolicy: 'hide' }, h("div", { class: `list-scroll ez-size-height--full ${this._isSingleJob ? 'with-header' : 'without-header'}` }, h("ez-list", { ref: (ref) => this._localPrintersList = ref, class: `ez-padding-top--medium ${this._hasLocalPrinters ? '' : 'hidden'}`, dataSource: this._localPrintersDataSource, onEzSelectItem: (evt) => this.onSelectPrinter(evt.detail, true), itemLeftSlotBuilder: this.buildPrinterIcon, ezSelectable: true, hoverFeedback: true }), !this._hasLocalPrinters && this.renderNoPrinters()))), h("ez-check", { label: this.getMessage("snkPrintSelector.message.savePrinter"), onEzChange: evt => this._saveSubstitute = evt.detail })))));
150
150
  }
151
151
  static get is() { return "snk-print-selector"; }
152
152
  static get encapsulation() { return "scoped"; }
@@ -26,7 +26,7 @@ export class SnkSimpleBar {
26
26
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
27
27
  }
28
28
  render() {
29
- return (h("div", { class: "simple-bar__container ez-margin-vertical--medium ez-padding--extra-small" }, h("div", { class: "simple-bar__left-slot" }, h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), h("div", { class: "simple-bar__column" }, h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), h("div", { class: "simple-bar__right-slot" }, h("slot", { name: "rightSlot" }))));
29
+ return (h("div", { class: "simple-bar__container ez-margin-vertical--small ez-padding--extra-small" }, h("div", { class: "simple-bar__left-slot" }, h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), h("div", { class: "simple-bar__column" }, h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), h("div", { class: "simple-bar__right-slot" }, h("slot", { name: "rightSlot" }))));
30
30
  }
31
31
  static get is() { return "snk-simple-bar"; }
32
32
  static get encapsulation() { return "scoped"; }
@@ -10,7 +10,6 @@
10
10
  .simple-crud__container {
11
11
  display: grid;
12
12
  grid-template-rows: auto 1fr;
13
- row-gap: 12px;
14
13
  height: 100%;
15
14
  width: 100%;
16
15
  }
@@ -1,5 +1,5 @@
1
1
  import { ApplicationContext, DataType, ElementIDUtils, FloatingManager, JSUtils, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
2
- import { CSSVarsUtils } from "@sankhyalabs/ezui/dist/collection/utils";
2
+ import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
3
3
  import { h } from '@stencil/core';
4
4
  import { SIMPLE_CRUD_MODE, VIEW_MODE } from '../../lib/utils/constants';
5
5
  import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
@@ -13,7 +13,8 @@ import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
13
13
  import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './regular-buttons';
14
14
  import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
15
15
  import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
16
- import store from "../../lib/store";
16
+ import store from '../../lib/store';
17
+ import { ContinuousInsertUtils } from '../../lib/utils/ContinuousInsertUtils';
17
18
  export class SnkSimpleCrud {
18
19
  constructor() {
19
20
  this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
@@ -22,11 +23,11 @@ export class SnkSimpleCrud {
22
23
  this._customEditors = new Map();
23
24
  this._customRenders = new Map();
24
25
  this._taskbarProcessor = new TaskbarProcessor({
25
- "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [TaskbarElement.GRID_MODE]),
26
+ "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [TaskbarElement.GRID_MODE], true),
26
27
  "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
27
- "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [TaskbarElement.GRID_MODE]),
28
+ "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [TaskbarElement.GRID_MODE], true),
28
29
  "snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
29
- "snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
30
+ "snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
30
31
  });
31
32
  this._showPopUpGridConfig = false;
32
33
  this._showFormConfig = false;
@@ -42,10 +43,12 @@ export class SnkSimpleCrud {
42
43
  this.formConfig = undefined;
43
44
  this._formFields = [];
44
45
  this._fieldsProps = new Map();
46
+ this._enableContinuousInsert = true;
45
47
  this.multipleSelection = undefined;
46
48
  this.useCancelConfirm = true;
47
49
  this.pageSize = 150;
48
50
  this.resourceID = undefined;
51
+ this.enableGridInsert = false;
49
52
  this.taskbarManager = undefined;
50
53
  this.messagesBuilder = undefined;
51
54
  this.useEnterLikeTab = false;
@@ -56,6 +59,7 @@ export class SnkSimpleCrud {
56
59
  this.formLegacyConfigName = undefined;
57
60
  this.ignoreReadOnlyFormFields = false;
58
61
  this.autoFocus = true;
62
+ this.domainMessagesBuilder = undefined;
59
63
  this.autoLoad = undefined;
60
64
  }
61
65
  /**
@@ -114,8 +118,19 @@ export class SnkSimpleCrud {
114
118
  newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
115
119
  this._fieldsProps = newCustomFieldProps;
116
120
  }
117
- getButtons(selected, extraButtons) {
118
- return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
121
+ getFinishEditionButtonsCallback() {
122
+ const btns = ["CANCEL", "SAVE"];
123
+ if (this.enableGridInsert && this._currentViewMode !== VIEW_MODE.ATTACHMENT) {
124
+ btns.push(this._currentViewMode === VIEW_MODE.GRID ? TaskbarElement.FORM_MODE : TaskbarElement.GRID_MODE);
125
+ }
126
+ return btns;
127
+ }
128
+ getButtons(selected, extraButtons, removeRefresh) {
129
+ let btnList = selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS;
130
+ if (removeRefresh) {
131
+ btnList = btnList.filter(item => item !== TaskbarElement.REFRESH);
132
+ }
133
+ return this.addConfigButton(this.resolveInMemoryBtns(btnList)
119
134
  .concat(extraButtons));
120
135
  }
121
136
  addConfigButton(buttons) {
@@ -196,7 +211,6 @@ export class SnkSimpleCrud {
196
211
  await this.setFieldProp(field, 'precision', rmPrecision);
197
212
  await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
198
213
  }
199
- ;
200
214
  this._rmPrecisionCustomValueFormatter.setDataState(this.dataState);
201
215
  }
202
216
  async handleUpdateGridLegacyConfig(newValue, oldValue) {
@@ -278,7 +292,7 @@ export class SnkSimpleCrud {
278
292
  return;
279
293
  }
280
294
  if (this._formConfigManager == undefined) {
281
- this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
295
+ this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID(), undefined, this.dataUnit);
282
296
  this._formConfigManager.setConfig(this.formConfig);
283
297
  }
284
298
  if (this.formConfigIsLoaded() && !forceLoad) {
@@ -319,6 +333,10 @@ export class SnkSimpleCrud {
319
333
  this.onModeChange();
320
334
  this.configDatasource();
321
335
  this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
336
+ this._continuousInsertUtils = new ContinuousInsertUtils(this.application, this.resolveResourceID(), this.configName);
337
+ if (this.enableGridInsert) {
338
+ this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
339
+ }
322
340
  }
323
341
  componentDidLoad() {
324
342
  CSSVarsUtils.applyVarsGrid(this._element, this._grid);
@@ -553,6 +571,9 @@ export class SnkSimpleCrud {
553
571
  const options = filteredFields.map(field => ({ value: field.name, label: field.label }));
554
572
  return Promise.resolve(options);
555
573
  }
574
+ isGridInsertActive() {
575
+ return this.enableGridInsert && this.dataUnit.hasNewRecord();
576
+ }
556
577
  getActionsList() {
557
578
  var _a, _b;
558
579
  const hardList = [{
@@ -564,11 +585,21 @@ export class SnkSimpleCrud {
564
585
  ? this.getColumnSearch(actionButton, item)
565
586
  : this.getFieldSearch(actionButton, item)
566
587
  }];
588
+ if (this.enableGridInsert) {
589
+ hardList.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert, () => {
590
+ this._enableContinuousInsert = !this._enableContinuousInsert;
591
+ this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert);
592
+ }));
593
+ }
594
+ if (this.isGridInsertActive())
595
+ return hardList;
567
596
  if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
568
597
  const taskbarID = this.getTopTaskBarId();
569
598
  return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
570
599
  }
571
- return hardList.concat(this.actionsList);
600
+ if (this.actionsList)
601
+ return hardList.concat(this.actionsList);
602
+ return hardList;
572
603
  }
573
604
  getTopTaskBarId() {
574
605
  var _a;
@@ -613,9 +644,11 @@ export class SnkSimpleCrud {
613
644
  window.removeEventListener("keydown", this._keyDownHandler);
614
645
  }
615
646
  gridConfigChangeHandler(evt) {
647
+ evt.stopPropagation();
648
+ if (!this.configName)
649
+ return;
616
650
  const config = evt.detail;
617
651
  ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
618
- evt.stopPropagation();
619
652
  }
620
653
  modalConfigChangeHandler(evt) {
621
654
  const config = evt.detail;
@@ -672,8 +705,8 @@ export class SnkSimpleCrud {
672
705
  return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
673
706
  }
674
707
  getFormConfig() {
675
- var _a, _b;
676
- const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.insertionMode, this.dataUnit, this.ignoreReadOnlyFormFields);
708
+ var _a;
709
+ const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig(this.dataUnit, this.ignoreReadOnlyFormFields);
677
710
  if (!this.configName && !configFromManager) {
678
711
  return this.formConfig;
679
712
  }
@@ -687,15 +720,21 @@ export class SnkSimpleCrud {
687
720
  }
688
721
  this._formConfigManager.setConfig(this.formConfig);
689
722
  }
723
+ handleDataUnitOnInsertionMode() {
724
+ if (this.enableGridInsert)
725
+ return;
726
+ this.goToView(VIEW_MODE.FORM);
727
+ }
690
728
  /* istanbul ignore next */
691
729
  render() {
692
730
  var _a;
693
731
  if (this.dataUnit == undefined) {
694
732
  return;
695
733
  }
696
- return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this) }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
734
+ const taskbarContent = (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM && "ez-box ez-box--shadow ez-padding--small", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
735
+ return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, this._currentViewMode === VIEW_MODE.FORM && taskbarContent, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
697
736
  ? undefined
698
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
737
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert }, this._currentViewMode === VIEW_MODE.GRID && taskbarContent, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
699
738
  }
700
739
  static get is() { return "snk-simple-crud"; }
701
740
  static get encapsulation() { return "scoped"; }
@@ -901,6 +940,24 @@ export class SnkSimpleCrud {
901
940
  "attribute": "resource-i-d",
902
941
  "reflect": false
903
942
  },
943
+ "enableGridInsert": {
944
+ "type": "boolean",
945
+ "mutable": false,
946
+ "complexType": {
947
+ "original": "boolean",
948
+ "resolved": "boolean",
949
+ "references": {}
950
+ },
951
+ "required": false,
952
+ "optional": true,
953
+ "docs": {
954
+ "tags": [],
955
+ "text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
956
+ },
957
+ "attribute": "enable-grid-insert",
958
+ "reflect": false,
959
+ "defaultValue": "false"
960
+ },
904
961
  "taskbarManager": {
905
962
  "type": "unknown",
906
963
  "mutable": false,
@@ -1086,6 +1143,23 @@ export class SnkSimpleCrud {
1086
1143
  "reflect": false,
1087
1144
  "defaultValue": "true"
1088
1145
  },
1146
+ "domainMessagesBuilder": {
1147
+ "type": "string",
1148
+ "mutable": false,
1149
+ "complexType": {
1150
+ "original": "string",
1151
+ "resolved": "string",
1152
+ "references": {}
1153
+ },
1154
+ "required": false,
1155
+ "optional": false,
1156
+ "docs": {
1157
+ "tags": [],
1158
+ "text": "Define a chave customizada para sobrescrever as mensagens (N\u00E3o pegando pela entidade)"
1159
+ },
1160
+ "attribute": "domain-messages-builder",
1161
+ "reflect": false
1162
+ },
1089
1163
  "autoLoad": {
1090
1164
  "type": "boolean",
1091
1165
  "mutable": false,
@@ -1114,7 +1188,8 @@ export class SnkSimpleCrud {
1114
1188
  "_fieldToGetFocus": {},
1115
1189
  "_customContainerId": {},
1116
1190
  "_formFields": {},
1117
- "_fieldsProps": {}
1191
+ "_fieldsProps": {},
1192
+ "_enableContinuousInsert": {}
1118
1193
  };
1119
1194
  }
1120
1195
  static get events() {
@@ -29,12 +29,16 @@ export default class TaskbarProcessor {
29
29
  });
30
30
  }
31
31
  getButtonsArray(taskbarId, taskbarManager, dataState) {
32
- const defaults = this._defaultButtons[taskbarId];
32
+ const defaults = this.getButtonsFromKey(taskbarId);
33
33
  if (taskbarManager) {
34
34
  return taskbarManager.getButtons(taskbarId, dataState, [...defaults]);
35
35
  }
36
36
  return defaults;
37
37
  }
38
+ getButtonsFromKey(taskbarId) {
39
+ const btnsValue = this._defaultButtons[taskbarId];
40
+ return typeof btnsValue === 'function' ? btnsValue() : btnsValue;
41
+ }
38
42
  isEnabled(taskbarId, taskbarManager, buttonName, dataState, disabled) {
39
43
  const originalValue = disabled.includes(buttonName) ? false : true;
40
44
  if (taskbarManager && taskbarManager.isEnabled) {
@@ -29,8 +29,10 @@ export class SnkTaskbar {
29
29
  this.onSaveEvent = (action) => {
30
30
  switch (action.type) {
31
31
  case DUAction.FIELD_INVALIDATED:
32
+ case DUAction.INVALIDATE_CLEAN:
32
33
  case DUAction.DATA_SAVED:
33
34
  case DUAction.SAVING_ERROR:
35
+ case DUAction.SAVING_CANCELED:
34
36
  this._isWaitingForSave = false;
35
37
  break;
36
38
  case DUAction.SAVING_DATA:
@@ -67,6 +69,16 @@ export class SnkTaskbar {
67
69
  this.getCustomElements(true);
68
70
  }
69
71
  }
72
+ handleTaskbarSaveLocker() {
73
+ if (this._isWaitingForSave !== true) {
74
+ this._isWaitingForSave = true;
75
+ }
76
+ }
77
+ handleTaskbarSaveUnlocker() {
78
+ if (this._isWaitingForSave === true) {
79
+ this._isWaitingForSave = false;
80
+ }
81
+ }
70
82
  hasToSearchCustomElements(event) {
71
83
  return this.customSlotId === event.detail && !this._slotContainer;
72
84
  }
@@ -85,6 +97,14 @@ export class SnkTaskbar {
85
97
  this._hasToUpdateOverFlow = true;
86
98
  }
87
99
  }
100
+ observeIsWaitingForSave(newValue, oldValue) {
101
+ if (newValue == true && oldValue == false) {
102
+ this.taskbarSaveLocker.emit();
103
+ }
104
+ if (newValue == false && oldValue == true) {
105
+ this.taskbarSaveUnlocker.emit();
106
+ }
107
+ }
88
108
  // Internal methods
89
109
  elementsFromString(strButtons) {
90
110
  const elements = [];
@@ -719,6 +739,36 @@ export class SnkTaskbar {
719
739
  "resolved": "string",
720
740
  "references": {}
721
741
  }
742
+ }, {
743
+ "method": "taskbarSaveLocker",
744
+ "name": "taskbarSaveLocker",
745
+ "bubbles": true,
746
+ "cancelable": true,
747
+ "composed": true,
748
+ "docs": {
749
+ "tags": [],
750
+ "text": "Emitido sempre que um save \u00E9 iniciado pela taskbar."
751
+ },
752
+ "complexType": {
753
+ "original": "void",
754
+ "resolved": "void",
755
+ "references": {}
756
+ }
757
+ }, {
758
+ "method": "taskbarSaveUnlocker",
759
+ "name": "taskbarSaveUnlocker",
760
+ "bubbles": true,
761
+ "cancelable": true,
762
+ "composed": true,
763
+ "docs": {
764
+ "tags": [],
765
+ "text": "Emitido sempre que o ocorre alguma action que libera o save."
766
+ },
767
+ "complexType": {
768
+ "original": "void",
769
+ "resolved": "void",
770
+ "references": {}
771
+ }
722
772
  }];
723
773
  }
724
774
  static get elementRef() { return "_element"; }
@@ -732,6 +782,9 @@ export class SnkTaskbar {
732
782
  }, {
733
783
  "propName": "_lastWidth",
734
784
  "methodName": "observeLastWidth"
785
+ }, {
786
+ "propName": "_isWaitingForSave",
787
+ "methodName": "observeIsWaitingForSave"
735
788
  }];
736
789
  }
737
790
  static get listeners() {
@@ -741,6 +794,18 @@ export class SnkTaskbar {
741
794
  "target": "window",
742
795
  "capture": false,
743
796
  "passive": false
797
+ }, {
798
+ "name": "taskbarSaveLocker",
799
+ "method": "handleTaskbarSaveLocker",
800
+ "target": "window",
801
+ "capture": false,
802
+ "passive": false
803
+ }, {
804
+ "name": "taskbarSaveUnlocker",
805
+ "method": "handleTaskbarSaveUnlocker",
806
+ "target": "window",
807
+ "capture": false,
808
+ "passive": false
744
809
  }];
745
810
  }
746
811
  }
@@ -1,4 +1,4 @@
1
- import { NumberUtils, ObjectUtils } from "@sankhyalabs/core";
1
+ import { NumberUtils, ObjectUtils, StringUtils } from "@sankhyalabs/core";
2
2
  export default class RmPrecisionCustomValueFormatter {
3
3
  setGrid(grid) {
4
4
  if (this._grid) {
@@ -8,7 +8,7 @@ export default class RmPrecisionCustomValueFormatter {
8
8
  this.refreshSelectedRows();
9
9
  }
10
10
  setDataState(dataState) {
11
- if (ObjectUtils.objectToString(dataState) === ObjectUtils.objectToString(this._dataState)) {
11
+ if (this._dataState && ObjectUtils.equals(dataState === null || dataState === void 0 ? void 0 : dataState.metadataByRow, this._dataState.metadataByRow)) {
12
12
  return;
13
13
  }
14
14
  this._dataState = dataState;
@@ -16,7 +16,7 @@ export default class RmPrecisionCustomValueFormatter {
16
16
  }
17
17
  format(currentValue, column, recordId) {
18
18
  var _a;
19
- if (!currentValue) {
19
+ if (StringUtils.isEmpty(currentValue)) {
20
20
  return currentValue;
21
21
  }
22
22
  const rowMetadata = (_a = this._dataState) === null || _a === void 0 ? void 0 : _a.metadataByRow.get(recordId);
@@ -71,6 +71,7 @@ export class ConfigStorage {
71
71
  if (config == undefined) {
72
72
  return;
73
73
  }
74
+ name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
74
75
  await this.deleteGridConfigCache(name, resourceID);
75
76
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
76
77
  }