@sankhyalabs/sankhyablocks 8.16.0-dev.9 → 8.16.0-dev.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (383) hide show
  1. package/dist/cjs/{IExporterProvider-597949f9.js → ClientSideExporterProvider-6b781452.js} +136 -24
  2. package/dist/cjs/{ConfigStorage-a343e418.js → ConfigStorage-d024aec8.js} +2 -2
  3. package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-65879b2c.js} +216 -76
  4. package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
  5. package/dist/cjs/IFetchDataExporterParams-e78ec415.js +8 -0
  6. package/dist/cjs/{SnkFormConfigManager-166cbd1f.js → SnkFormConfigManager-c11d8468.js} +75 -17
  7. package/dist/cjs/{SnkMessageBuilder-897ffd08.js → SnkMessageBuilder-bae64d0d.js} +6 -2
  8. package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-8480751c.js} +1 -1
  9. package/dist/cjs/{constants-35ddd366.js → constants-241934b3.js} +9 -0
  10. package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-8291ac21.js} +239 -43
  11. package/dist/cjs/{field-search-f56aa7d6.js → field-search-68e34bf4.js} +5 -1
  12. package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-90126e4c.js} +42 -2
  13. package/dist/cjs/{index-1dfc7a6e.js → index-e3e39724.js} +5 -0
  14. package/dist/cjs/index-f9e81701.js +16 -32
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/pesquisa-fetcher-5c583c93.js +365 -0
  17. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +156 -0
  18. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  19. package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +139 -43
  20. package/dist/cjs/snk-application.cjs.entry.js +301 -70
  21. package/dist/cjs/snk-attach.cjs.entry.js +49 -36
  22. package/dist/cjs/{snk-form-config.cjs.entry.js → snk-config-options_3.cjs.entry.js} +399 -13
  23. package/dist/cjs/snk-configurator.cjs.entry.js +2 -2
  24. package/dist/cjs/snk-crud.cjs.entry.js +26 -22
  25. package/dist/cjs/snk-data-exporter.cjs.entry.js +38 -29
  26. package/dist/cjs/{snk-data-unit-8fa7917a.js → snk-data-unit-c8096724.js} +55 -31
  27. package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
  28. package/dist/cjs/snk-detail-view.cjs.entry.js +15 -15
  29. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  30. package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
  31. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1437 -0
  32. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  33. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  34. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  35. package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
  36. package/dist/cjs/snk-filter-text.cjs.entry.js +2 -1
  37. package/dist/cjs/snk-grid.cjs.entry.js +96 -27
  38. package/dist/cjs/{snk-guides-viewer-bdc41281.js → snk-guides-viewer-a029ff50.js} +32 -16
  39. package/dist/cjs/snk-guides-viewer.cjs.entry.js +11 -11
  40. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +4 -4
  41. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  42. package/dist/cjs/snk-pesquisa.cjs.entry.js +111 -31
  43. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  44. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  45. package/dist/cjs/snk-simple-crud.cjs.entry.js +115 -112
  46. package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
  47. package/dist/cjs/snk-taskbar.cjs.entry.js +72 -40
  48. package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-7e19882d.js} +1 -1
  49. package/dist/collection/collection-manifest.json +14 -31
  50. package/dist/collection/components/snk-actions-button/actions/index.js +16 -13
  51. package/dist/collection/components/snk-actions-button/interfaces/index.js +1 -0
  52. package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -26
  53. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +29 -0
  54. package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +16 -0
  55. package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +52 -0
  56. package/dist/collection/components/snk-application/snk-application.css +36 -0
  57. package/dist/collection/components/snk-application/snk-application.js +323 -65
  58. package/dist/collection/components/snk-attach/snk-attach.js +25 -16
  59. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
  60. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
  61. package/dist/collection/components/snk-configurator/snk-configurator.css +1 -1
  62. package/dist/collection/components/snk-crud/snk-crud.js +147 -14
  63. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +3 -3
  64. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +6 -6
  65. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +72 -6
  66. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
  67. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +8 -8
  68. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +9 -2
  69. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
  70. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +18 -6
  71. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
  72. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +10 -9
  73. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
  74. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +4 -4
  75. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
  76. package/dist/collection/components/snk-data-unit/snk-data-unit.js +53 -29
  77. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +3 -3
  78. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +1 -1
  79. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
  80. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +1 -1
  81. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +2 -1
  82. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css +13 -0
  83. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -3
  84. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js +8 -0
  85. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +9 -4
  86. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +1 -1
  87. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
  88. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -6
  89. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +119 -29
  90. package/dist/collection/components/snk-form/snk-form.js +2 -2
  91. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +73 -15
  92. package/dist/collection/components/snk-form-config/snk-form-config.css +8 -3
  93. package/dist/collection/components/snk-form-config/snk-form-config.js +49 -8
  94. package/dist/collection/components/snk-grid/snk-grid.css +8 -0
  95. package/dist/collection/components/snk-grid/snk-grid.js +199 -13
  96. package/dist/collection/components/snk-grid-config/snk-grid-config.css +1 -1
  97. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +9 -0
  98. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +226 -0
  99. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +28 -0
  100. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +208 -0
  101. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +99 -0
  102. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +35 -6
  103. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +174 -32
  104. package/dist/collection/components/snk-print-selector/snk-print-selector.js +1 -1
  105. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
  106. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +1 -1
  107. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +180 -34
  108. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
  109. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
  110. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
  111. package/dist/collection/components/snk-taskbar/snk-taskbar.js +112 -38
  112. package/dist/collection/lib/@types/index.js +5 -0
  113. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
  114. package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -4
  115. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +34 -9
  116. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +29 -21
  117. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
  118. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +59 -14
  119. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +21 -7
  120. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +108 -0
  121. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +17 -9
  122. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js +6 -1
  123. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +45 -5
  124. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +7 -1
  125. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +107 -7
  126. package/dist/collection/lib/index.js +1 -0
  127. package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
  128. package/dist/collection/lib/message/resources/snk-grid.msg.js +5 -1
  129. package/dist/collection/lib/utils/ContinuousInsertUtils.js +31 -0
  130. package/dist/collection/lib/utils/CrudUtils.js +25 -16
  131. package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
  132. package/dist/collection/lib/utils/constants.js +9 -0
  133. package/dist/collection/sw.js +46 -0
  134. package/dist/components/{IExporterProvider.js → ContinuousInsertUtils.js} +136 -24
  135. package/dist/components/DataFetcher.js +217 -77
  136. package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
  137. package/dist/components/ISave.js +367 -1
  138. package/dist/components/SnkFormConfigManager.js +73 -15
  139. package/dist/components/SnkMessageBuilder.js +6 -2
  140. package/dist/components/constants.js +10 -1
  141. package/dist/components/dataunit-fetcher.js +238 -40
  142. package/dist/components/form-config-fetcher.js +41 -1
  143. package/dist/components/index.d.ts +3 -0
  144. package/dist/components/index.js +3 -0
  145. package/dist/components/pesquisa-grid.d.ts +11 -0
  146. package/dist/components/pesquisa-grid.js +6 -0
  147. package/dist/components/pesquisa-grid2.js +102 -0
  148. package/dist/components/pesquisa-tree.d.ts +11 -0
  149. package/dist/components/pesquisa-tree.js +6 -0
  150. package/dist/components/pesquisa-tree2.js +91 -0
  151. package/dist/components/snk-actions-button2.js +44 -40
  152. package/dist/components/snk-application2.js +320 -69
  153. package/dist/components/snk-attach2.js +54 -60
  154. package/dist/components/snk-config-options2.js +1 -1
  155. package/dist/components/snk-configurator2.js +1 -1
  156. package/dist/components/snk-crud.js +86 -71
  157. package/dist/components/snk-data-exporter2.js +37 -23
  158. package/dist/components/snk-data-unit2.js +56 -69
  159. package/dist/components/snk-detail-view2.js +115 -106
  160. package/dist/components/snk-exporter-email-sender2.js +1 -1
  161. package/dist/components/snk-filter-bar2.js +68 -34
  162. package/dist/components/snk-filter-binary-select.js +1 -1
  163. package/dist/components/snk-filter-checkbox-list.js +1 -1
  164. package/dist/components/snk-filter-item2.js +9 -4
  165. package/dist/components/snk-filter-modal.js +4 -2
  166. package/dist/components/snk-filter-number.js +1 -1
  167. package/dist/components/snk-filter-text.js +2 -1
  168. package/dist/components/snk-form-config2.js +35 -10
  169. package/dist/components/snk-form.js +2 -2
  170. package/dist/components/snk-grid-config2.js +1 -1
  171. package/dist/components/snk-grid2.js +92 -18
  172. package/dist/components/snk-personalized-filter-editor.js +4 -4
  173. package/dist/components/snk-pesquisa2.js +125 -33
  174. package/dist/components/snk-print-selector.js +1 -1
  175. package/dist/components/snk-simple-bar2.js +1 -1
  176. package/dist/components/snk-simple-crud2.js +107 -120
  177. package/dist/components/snk-simple-form-config.d.ts +11 -0
  178. package/dist/components/snk-simple-form-config.js +6 -0
  179. package/dist/components/snk-simple-form-config2.js +121 -0
  180. package/dist/components/snk-tab-config2.js +1 -1
  181. package/dist/components/snk-taskbar2.js +72 -40
  182. package/dist/components/teste-pesquisa.js +13 -1
  183. package/dist/esm/{IExporterProvider-63a188b6.js → ClientSideExporterProvider-ff89c7e9.js} +136 -26
  184. package/dist/esm/{ConfigStorage-3806514e.js → ConfigStorage-373bb440.js} +2 -2
  185. package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-5221b992.js} +217 -77
  186. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
  187. package/dist/esm/IFetchDataExporterParams-d73bed3d.js +8 -0
  188. package/dist/esm/{SnkFormConfigManager-31b24066.js → SnkFormConfigManager-5022f87f.js} +75 -17
  189. package/dist/esm/{SnkMessageBuilder-571462fb.js → SnkMessageBuilder-6fff4a4c.js} +6 -2
  190. package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-e32fe8a4.js} +1 -1
  191. package/dist/esm/{constants-8457af36.js → constants-75abb876.js} +10 -1
  192. package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-5247a708.js} +239 -41
  193. package/dist/esm/{field-search-efbe307f.js → field-search-f8b1d91e.js} +5 -1
  194. package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-126e2471.js} +42 -2
  195. package/dist/esm/index-a7d3d3f1.js +16 -32
  196. package/dist/esm/{index-3aa4977a.js → index-b40568ff.js} +6 -1
  197. package/dist/esm/loader.js +1 -1
  198. package/dist/esm/pesquisa-fetcher-4284f2a3.js +362 -0
  199. package/dist/esm/pesquisa-grid_2.entry.js +151 -0
  200. package/dist/esm/sankhyablocks.js +1 -1
  201. package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +140 -45
  202. package/dist/esm/snk-application.entry.js +303 -72
  203. package/dist/esm/snk-attach.entry.js +49 -36
  204. package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +399 -15
  205. package/dist/esm/snk-configurator.entry.js +2 -2
  206. package/dist/esm/snk-crud.entry.js +26 -22
  207. package/dist/esm/snk-data-exporter.entry.js +38 -29
  208. package/dist/esm/{snk-data-unit-f5cbe64b.js → snk-data-unit-51659955.js} +55 -31
  209. package/dist/esm/snk-data-unit.entry.js +5 -5
  210. package/dist/esm/snk-detail-view.entry.js +15 -15
  211. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  212. package/dist/esm/snk-field-config.entry.js +1 -1
  213. package/dist/esm/snk-filter-bar_4.entry.js +1430 -0
  214. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  215. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  216. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  217. package/dist/esm/snk-filter-number.entry.js +1 -1
  218. package/dist/esm/snk-filter-text.entry.js +2 -1
  219. package/dist/esm/snk-grid.entry.js +91 -22
  220. package/dist/esm/{snk-guides-viewer-dda0fede.js → snk-guides-viewer-fa45714d.js} +32 -16
  221. package/dist/esm/snk-guides-viewer.entry.js +11 -11
  222. package/dist/esm/snk-personalized-filter-editor.entry.js +4 -4
  223. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  224. package/dist/esm/snk-pesquisa.entry.js +111 -31
  225. package/dist/esm/snk-print-selector.entry.js +1 -1
  226. package/dist/esm/snk-simple-bar.entry.js +1 -1
  227. package/dist/esm/snk-simple-crud.entry.js +101 -98
  228. package/dist/esm/snk-tab-config.entry.js +1 -1
  229. package/dist/esm/snk-taskbar.entry.js +73 -41
  230. package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-d2353c64.js} +1 -1
  231. package/dist/sankhyablocks/p-0b00d69c.entry.js +1 -0
  232. package/dist/sankhyablocks/p-0ce56d43.entry.js +1 -0
  233. package/dist/sankhyablocks/p-0f3698af.js +1 -0
  234. package/dist/sankhyablocks/p-1435701f.js +26 -0
  235. package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
  236. package/dist/sankhyablocks/p-172848d4.entry.js +1 -0
  237. package/dist/sankhyablocks/p-17425c72.js +1 -0
  238. package/dist/sankhyablocks/{p-52920496.js → p-19dc71e9.js} +1 -1
  239. package/dist/sankhyablocks/{p-47db7e88.entry.js → p-1cf39cfd.entry.js} +1 -1
  240. package/dist/sankhyablocks/{p-b0ef4383.js → p-1d19a5b0.js} +1 -1
  241. package/dist/sankhyablocks/p-23736d75.js +1 -0
  242. package/dist/sankhyablocks/{p-8eb67fa4.entry.js → p-23cd6abf.entry.js} +1 -1
  243. package/dist/sankhyablocks/{p-95df461f.entry.js → p-2953c481.entry.js} +1 -1
  244. package/dist/sankhyablocks/p-38179225.js +60 -0
  245. package/dist/sankhyablocks/p-3ba431c9.js +1 -0
  246. package/dist/sankhyablocks/{p-7e7a7473.js → p-3fc82614.js} +1 -1
  247. package/dist/sankhyablocks/p-40e323f9.js +1 -0
  248. package/dist/sankhyablocks/p-41c3bee5.js +6 -0
  249. package/dist/sankhyablocks/{p-72fc257b.entry.js → p-434817f0.entry.js} +1 -1
  250. package/dist/sankhyablocks/p-47178038.entry.js +1 -0
  251. package/dist/sankhyablocks/{p-7663f597.entry.js → p-4c9adf1c.entry.js} +1 -1
  252. package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
  253. package/dist/sankhyablocks/p-700a4cc3.entry.js +1 -0
  254. package/dist/sankhyablocks/p-79f823f3.entry.js +1 -0
  255. package/dist/sankhyablocks/p-7dd49d15.js +1 -0
  256. package/dist/sankhyablocks/p-82839c9f.js +1 -0
  257. package/dist/sankhyablocks/{p-2c68b3ae.entry.js → p-82ee6dc3.entry.js} +1 -1
  258. package/dist/sankhyablocks/p-89c92727.entry.js +1 -0
  259. package/dist/sankhyablocks/{p-41f8bfa3.entry.js → p-8c235d4c.entry.js} +1 -1
  260. package/dist/sankhyablocks/p-8f3f2306.js +1 -0
  261. package/dist/sankhyablocks/p-a962a3e4.entry.js +1 -0
  262. package/dist/sankhyablocks/p-aa1a0f3e.entry.js +1 -0
  263. package/dist/sankhyablocks/p-b02e58fd.entry.js +1 -0
  264. package/dist/sankhyablocks/p-b0ff53b7.entry.js +1 -0
  265. package/dist/sankhyablocks/p-bee2a6d3.entry.js +1 -0
  266. package/dist/sankhyablocks/p-c021a3a9.entry.js +1 -0
  267. package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
  268. package/dist/sankhyablocks/p-c82deea7.entry.js +1 -0
  269. package/dist/sankhyablocks/p-d2d0535f.entry.js +1 -0
  270. package/dist/sankhyablocks/p-d62228fb.js +1 -0
  271. package/dist/sankhyablocks/p-de9da2f2.js +1 -0
  272. package/dist/sankhyablocks/p-e0a6d819.entry.js +1 -0
  273. package/dist/sankhyablocks/p-e10faff0.entry.js +11 -0
  274. package/dist/sankhyablocks/p-e718fb81.entry.js +1 -0
  275. package/dist/sankhyablocks/{p-913a9979.js → p-f0b9303b.js} +1 -1
  276. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  277. package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
  278. package/dist/types/components/snk-actions-button/interfaces/index.d.ts +3 -0
  279. package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +3 -2
  280. package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +11 -0
  281. package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +12 -0
  282. package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +13 -0
  283. package/dist/types/components/snk-application/snk-application.d.ts +38 -14
  284. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  285. package/dist/types/components/snk-crud/snk-crud.d.ts +26 -0
  286. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +15 -0
  287. package/dist/types/components/snk-data-exporter/data/export-result.d.ts +2 -1
  288. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
  289. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +2 -1
  290. package/dist/types/components/snk-data-exporter/interfaces/IRecordID.d.ts +1 -0
  291. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +3 -1
  292. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
  293. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
  294. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +2 -0
  295. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.d.ts +7 -0
  296. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
  297. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +15 -1
  298. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +7 -2
  299. package/dist/types/components/snk-form-config/snk-form-config.d.ts +4 -0
  300. package/dist/types/components/snk-grid/snk-grid.d.ts +33 -0
  301. package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +44 -0
  302. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +33 -0
  303. package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +24 -0
  304. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
  305. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +27 -3
  306. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
  307. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
  308. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
  309. package/dist/types/components.d.ts +407 -15
  310. package/dist/types/lib/@types/index.d.ts +4 -0
  311. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +12 -2
  312. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
  313. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
  314. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +9 -1
  315. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +4 -0
  316. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.d.ts +6 -0
  317. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.d.ts +4 -0
  318. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +3 -3
  319. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +6 -2
  320. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
  321. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  322. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +17 -1
  323. package/dist/types/lib/index.d.ts +1 -0
  324. package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +10 -0
  325. package/dist/types/lib/utils/CrudUtils.d.ts +1 -0
  326. package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
  327. package/dist/types/lib/utils/constants.d.ts +7 -0
  328. package/package.json +4 -3
  329. package/react/components.d.ts +3 -0
  330. package/react/components.js +3 -0
  331. package/react/components.js.map +1 -1
  332. package/dist/cjs/pesquisa-fetcher-680e198f.js +0 -166
  333. package/dist/cjs/snk-config-options.cjs.entry.js +0 -239
  334. package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -714
  335. package/dist/cjs/snk-filter-item.cjs.entry.js +0 -312
  336. package/dist/cjs/snk-filter-list.cjs.entry.js +0 -152
  337. package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -249
  338. package/dist/cjs/snk-form.cjs.entry.js +0 -143
  339. package/dist/components/pesquisa-fetcher.js +0 -164
  340. package/dist/esm/pesquisa-fetcher-03c8f919.js +0 -164
  341. package/dist/esm/snk-config-options.entry.js +0 -235
  342. package/dist/esm/snk-filter-bar.entry.js +0 -710
  343. package/dist/esm/snk-filter-item.entry.js +0 -308
  344. package/dist/esm/snk-filter-list.entry.js +0 -148
  345. package/dist/esm/snk-filter-modal.entry.js +0 -245
  346. package/dist/esm/snk-form.entry.js +0 -139
  347. package/dist/sankhyablocks/p-01ba23cd.entry.js +0 -1
  348. package/dist/sankhyablocks/p-17def7cd.js +0 -1
  349. package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
  350. package/dist/sankhyablocks/p-2a408684.js +0 -1
  351. package/dist/sankhyablocks/p-30cf616e.js +0 -1
  352. package/dist/sankhyablocks/p-3a212712.js +0 -1
  353. package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
  354. package/dist/sankhyablocks/p-450c60e4.entry.js +0 -1
  355. package/dist/sankhyablocks/p-4e5e1313.entry.js +0 -1
  356. package/dist/sankhyablocks/p-62ba211a.entry.js +0 -1
  357. package/dist/sankhyablocks/p-6bb2f3e9.entry.js +0 -1
  358. package/dist/sankhyablocks/p-70a4af56.entry.js +0 -1
  359. package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
  360. package/dist/sankhyablocks/p-75e674ed.entry.js +0 -1
  361. package/dist/sankhyablocks/p-7619bdb1.entry.js +0 -11
  362. package/dist/sankhyablocks/p-7a85fd49.entry.js +0 -1
  363. package/dist/sankhyablocks/p-7ef9c55c.js +0 -1
  364. package/dist/sankhyablocks/p-80042dc6.entry.js +0 -1
  365. package/dist/sankhyablocks/p-871aa14e.entry.js +0 -1
  366. package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
  367. package/dist/sankhyablocks/p-8c59edd7.entry.js +0 -1
  368. package/dist/sankhyablocks/p-96a89d58.entry.js +0 -1
  369. package/dist/sankhyablocks/p-9863d682.js +0 -1
  370. package/dist/sankhyablocks/p-af8efd95.js +0 -6
  371. package/dist/sankhyablocks/p-b05d8893.entry.js +0 -1
  372. package/dist/sankhyablocks/p-b11aa1e0.entry.js +0 -1
  373. package/dist/sankhyablocks/p-c2495304.js +0 -1
  374. package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
  375. package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
  376. package/dist/sankhyablocks/p-d6e26ea8.entry.js +0 -1
  377. package/dist/sankhyablocks/p-dc7c9047.js +0 -1
  378. package/dist/sankhyablocks/p-df5451c7.js +0 -26
  379. package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
  380. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  381. package/dist/sankhyablocks/p-fa4d8cb4.js +0 -1
  382. package/dist/sankhyablocks/p-fe79f83a.js +0 -60
  383. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -2,28 +2,29 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index$1 = require('./index-f9e81701.js');
5
+ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
- const constants = require('./constants-35ddd366.js');
9
- const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
10
- require('./DataFetcher-313debd8.js');
11
- require('./pesquisa-fetcher-680e198f.js');
12
- const IExporterProvider = require('./IExporterProvider-597949f9.js');
13
- const index = require('./index-1dfc7a6e.js');
8
+ const constants = require('./constants-241934b3.js');
9
+ const taskbarElements = require('./taskbar-elements-7e19882d.js');
10
+ require('./DataFetcher-65879b2c.js');
11
+ require('./pesquisa-fetcher-5c583c93.js');
12
+ const ClientSideExporterProvider = require('./ClientSideExporterProvider-6b781452.js');
13
+ const index$1 = require('./index-e3e39724.js');
14
14
  require('./ISave-e91b70a7.js');
15
15
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
- const dataunitFetcher = require('./dataunit-fetcher-688d3f05.js');
17
+ const dataunitFetcher = require('./dataunit-fetcher-8291ac21.js');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
19
- const formConfigFetcher = require('./form-config-fetcher-2dd00e5b.js');
20
- const fieldSearch = require('./field-search-f56aa7d6.js');
21
- const ConfigStorage = require('./ConfigStorage-a343e418.js');
22
- const SnkFormConfigManager = require('./SnkFormConfigManager-166cbd1f.js');
23
- const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
19
+ const formConfigFetcher = require('./form-config-fetcher-90126e4c.js');
20
+ const fieldSearch = require('./field-search-68e34bf4.js');
21
+ const ConfigStorage = require('./ConfigStorage-d024aec8.js');
22
+ const SnkFormConfigManager = require('./SnkFormConfigManager-c11d8468.js');
24
23
  const index$2 = require('./index-102ba62d.js');
25
24
  require('./PrintUtils-bcaeb82f.js');
26
25
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
26
+ require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
27
+ require('./IFetchDataExporterParams-e78ec415.js');
27
28
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
28
29
  require('@sankhyalabs/core/dist/utils/SortingUtils');
29
30
  require('./ResourceIDUtils-5ff86aa7.js');
@@ -31,90 +32,36 @@ require('./ResourceIDUtils-5ff86aa7.js');
31
32
  const REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
32
33
  const REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
33
34
 
34
- class ClientSideExporterProvider extends IExporterProvider.CommonsExporter {
35
- getSelectedNumber() {
36
- return this.dataUnit.getSelectionInfo().length;
37
- }
38
- getTotalRecords() {
39
- var _a, _b, _c;
40
- const { total } = ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo()) || {};
41
- return total !== null && total !== void 0 ? total : (_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.records) === null || _c === void 0 ? void 0 : _c.length;
42
- }
43
- getSelectedIDs() {
44
- return RecordIDUtils.getSelectedIDs(this.dataUnit);
45
- }
46
- getRecordID() {
47
- var _a, _b, _c;
48
- return (_c = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
49
- }
50
- async getRecords() {
51
- if (this.dataUnit.records.length === 0) {
52
- return Promise.resolve([]);
53
- }
54
- const selectionInfo = this.dataUnit.getSelectionInfo();
55
- const records = selectionInfo.isEmpty() || selectionInfo.isAllRecords() ? await selectionInfo.getAllRecords() : selectionInfo.records;
56
- return Promise.resolve(records == undefined ? [] : records);
57
- }
58
- getHiddenOptions() {
59
- return [
60
- index.DataExporterOption.EXPORT_BY_EMAIL,
61
- index.DataExporterOption.EXPORT_PDF_TO_EMAIL,
62
- index.DataExporterOption.EXPORT_XLS_TO_EMAIL,
63
- index.DataExporterOption.EXPORT_PAGE_TO_PDF,
64
- index.DataExporterOption.EXPORT_PAGE_TO_XLS
65
- ];
66
- }
67
- formatValue(record, column) {
68
- const { id, descriptionFrom } = column;
69
- const value = record[descriptionFrom || id];
70
- if (value == undefined) {
71
- return "";
72
- }
73
- if (descriptionFrom != undefined) {
74
- return value.label;
75
- }
76
- const fieldDescriptor = this.dataUnit.getField(id);
77
- if (fieldDescriptor.userInterface === core.UserInterface.SEARCH) {
78
- return value.value;
79
- }
80
- if (column.customFormatter) {
81
- const ezGridColumn = this.getColumnsState().find(columnState => column.id === columnState.name);
82
- const formattedValue = column.customFormatter.format(value, ezGridColumn, record.__record__id__);
83
- return formattedValue;
84
- }
85
- return this.dataUnit.getFormattedValue(id, value);
86
- }
87
- }
88
-
89
- const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%;--snk-simple-crud-grid--min-height:300px}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto 1fr;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;--ez-grid--min-height:var(--snk-simple-crud-grid--min-height)}ez-form.sc-snk-simple-crud{min-height:300px}";
35
+ const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%;--snk-simple-crud-grid--min-height:300px}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto 1fr;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;--ez-grid__container--shadow--outline:none;--ez-grid--min-height:var(--snk-simple-crud-grid--min-height)}ez-form.sc-snk-simple-crud{min-height:300px}";
90
36
 
91
37
  const SnkSimpleCrud = class {
92
38
  constructor(hostRef) {
93
- index$1.registerInstance(this, hostRef);
94
- this.dataStateChange = index$1.createEvent(this, "dataStateChange", 3);
95
- this.dataUnitReady = index$1.createEvent(this, "dataUnitReady", 3);
96
- this.actionClick = index$1.createEvent(this, "actionClick", 7);
97
- this.formItemsReady = index$1.createEvent(this, "formItemsReady", 7);
98
- this.configuratorSave = index$1.createEvent(this, "configuratorSave", 7);
99
- this.configuratorCancel = index$1.createEvent(this, "configuratorCancel", 7);
100
- this._multiSelectionListDataSource = new IExporterProvider.SnkMultiSelectionListDataSource();
39
+ index.registerInstance(this, hostRef);
40
+ this.dataStateChange = index.createEvent(this, "dataStateChange", 3);
41
+ this.dataUnitReady = index.createEvent(this, "dataUnitReady", 3);
42
+ this.actionClick = index.createEvent(this, "actionClick", 7);
43
+ this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
44
+ this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
45
+ this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
46
+ this._multiSelectionListDataSource = new ClientSideExporterProvider.SnkMultiSelectionListDataSource();
101
47
  this._keyDownHandler = (event) => this.keyDownListener(event);
102
48
  this._formConfigFetcher = new formConfigFetcher.FormConfigFetcher();
103
49
  this._customEditors = new Map();
104
50
  this._customRenders = new Map();
105
51
  this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
106
- "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [taskbarElements.TaskbarElement.GRID_MODE]),
52
+ "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [taskbarElements.TaskbarElement.GRID_MODE], true),
107
53
  "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, [taskbarElements.TaskbarElement.DATA_EXPORTER, taskbarElements.TaskbarElement.FORM_MODE]),
108
- "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [taskbarElements.TaskbarElement.GRID_MODE]),
54
+ "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [taskbarElements.TaskbarElement.GRID_MODE], true),
109
55
  "snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, [taskbarElements.TaskbarElement.DATA_EXPORTER, taskbarElements.TaskbarElement.FORM_MODE]),
110
- "snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
56
+ "snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
111
57
  });
112
58
  this._showPopUpGridConfig = false;
113
- this._showFormConfig = false;
114
59
  this._currentViewMode = constants.VIEW_MODE.GRID;
115
60
  this._config = undefined;
116
61
  this._fieldToGetFocus = undefined;
117
62
  this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
63
+ this.enableLockManagerLoadingComp = false;
64
+ this.enableLockManagerTaskbarClick = false;
118
65
  this.dataState = undefined;
119
66
  this.dataUnit = undefined;
120
67
  this.entityName = undefined;
@@ -123,10 +70,12 @@ const SnkSimpleCrud = class {
123
70
  this.formConfig = undefined;
124
71
  this._formFields = [];
125
72
  this._fieldsProps = new Map();
73
+ this.enableContinuousInsert = false;
126
74
  this.multipleSelection = undefined;
127
75
  this.useCancelConfirm = true;
128
76
  this.pageSize = 150;
129
77
  this.resourceID = undefined;
78
+ this.enableGridInsert = false;
130
79
  this.taskbarManager = undefined;
131
80
  this.messagesBuilder = undefined;
132
81
  this.useEnterLikeTab = false;
@@ -139,6 +88,7 @@ const SnkSimpleCrud = class {
139
88
  this.autoFocus = true;
140
89
  this.domainMessagesBuilder = undefined;
141
90
  this.autoLoad = undefined;
91
+ this.outlineMode = false;
142
92
  }
143
93
  /**
144
94
  * Registra um editor customizado para campos da grade e formulário.
@@ -196,8 +146,19 @@ const SnkSimpleCrud = class {
196
146
  newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
197
147
  this._fieldsProps = newCustomFieldProps;
198
148
  }
199
- getButtons(selected, extraButtons) {
200
- return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
149
+ getFinishEditionButtonsCallback() {
150
+ const btns = ["CANCEL", "SAVE"];
151
+ if (this.enableGridInsert && this._currentViewMode !== constants.VIEW_MODE.ATTACHMENT) {
152
+ btns.push(this._currentViewMode === constants.VIEW_MODE.GRID ? taskbarElements.TaskbarElement.FORM_MODE : taskbarElements.TaskbarElement.GRID_MODE);
153
+ }
154
+ return btns;
155
+ }
156
+ getButtons(selected, extraButtons, removeRefresh) {
157
+ let btnList = selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS;
158
+ if (removeRefresh) {
159
+ btnList = btnList.filter(item => item !== taskbarElements.TaskbarElement.REFRESH);
160
+ }
161
+ return this.addConfigButton(this.resolveInMemoryBtns(btnList)
201
162
  .concat(extraButtons));
202
163
  }
203
164
  addConfigButton(buttons) {
@@ -316,15 +277,9 @@ const SnkSimpleCrud = class {
316
277
  });
317
278
  }
318
279
  async openFormConfig() {
319
- var _a, _b;
320
- //No momento não daremos suporte para configuraçao de formulário quando houver legacy config
321
- if (this.formLegacyConfigName) {
322
- const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
323
- const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
324
- await this.application.alert(title, message);
325
- return;
280
+ if (this.formLegacyConfigName || this.configName) {
281
+ await this._snkSimpleFormConfig.show();
326
282
  }
327
- this._showFormConfig = true;
328
283
  }
329
284
  addGridLegacyConfigName() {
330
285
  if (this.gridLegacyConfigName && this.configName) {
@@ -354,12 +309,12 @@ const SnkSimpleCrud = class {
354
309
  formConfigIsLoaded() {
355
310
  return this.formConfig != undefined || this._formConfigAlreadyLoaded;
356
311
  }
357
- async loadFormConfig(forceLoad = false) {
312
+ async loadFormConfig(forceLoad = false, forceSetNewConfig = false) {
358
313
  if (this.configName === undefined) {
359
314
  return;
360
315
  }
361
316
  if (this._formConfigManager == undefined) {
362
- this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID());
317
+ this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID(), undefined, this.dataUnit);
363
318
  this._formConfigManager.setConfig(this.formConfig);
364
319
  }
365
320
  if (this.formConfigIsLoaded() && !forceLoad) {
@@ -369,7 +324,7 @@ const SnkSimpleCrud = class {
369
324
  let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
370
325
  if (loadedLegacyConfig != undefined) {
371
326
  this._formConfigManager.setConfig(loadedLegacyConfig);
372
- this.setFormConfig(loadedLegacyConfig);
327
+ this.setFormConfig(loadedLegacyConfig, forceSetNewConfig);
373
328
  return;
374
329
  }
375
330
  this.setFormConfig(await this._formConfigManager.loadConfig());
@@ -399,10 +354,15 @@ const SnkSimpleCrud = class {
399
354
  this.processMetadata();
400
355
  this.onModeChange();
401
356
  this.configDatasource();
402
- this._rmPrecisionCustomValueFormatter = new IExporterProvider.RmPrecisionCustomValueFormatter();
357
+ this._rmPrecisionCustomValueFormatter = new ClientSideExporterProvider.RmPrecisionCustomValueFormatter();
358
+ this._continuousInsertUtils = new ClientSideExporterProvider.ContinuousInsertUtils(this.application, this.resolveResourceID(), this.configName);
359
+ if (this.enableGridInsert) {
360
+ this._continuousInsertUtils.getConfig().then(value => this.enableContinuousInsert = value);
361
+ }
403
362
  }
404
363
  componentDidLoad() {
405
364
  utils.CSSVarsUtils.applyVarsGrid(this._element, this._grid);
365
+ this.initKeyboardManager();
406
366
  }
407
367
  setCustomRenders() {
408
368
  if (!this._grid) {
@@ -634,6 +594,9 @@ const SnkSimpleCrud = class {
634
594
  const options = filteredFields.map(field => ({ value: field.name, label: field.label }));
635
595
  return Promise.resolve(options);
636
596
  }
597
+ isGridInsertActive() {
598
+ return this.enableGridInsert && this.dataUnit.hasNewRecord();
599
+ }
637
600
  getActionsList() {
638
601
  var _a, _b;
639
602
  const hardList = [{
@@ -645,16 +608,26 @@ const SnkSimpleCrud = class {
645
608
  ? this.getColumnSearch(actionButton, item)
646
609
  : this.getFieldSearch(actionButton, item)
647
610
  }];
611
+ if (this.enableGridInsert) {
612
+ hardList.push(this._continuousInsertUtils.actionContinuousInsert(this.enableContinuousInsert, () => {
613
+ this.enableContinuousInsert = !this.enableContinuousInsert;
614
+ this._continuousInsertUtils.handleSaveConfig(this.enableContinuousInsert);
615
+ }));
616
+ }
617
+ if (this.isGridInsertActive())
618
+ return hardList;
648
619
  if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
649
620
  const taskbarID = this.getTopTaskBarId();
650
621
  return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
651
622
  }
652
- return hardList.concat(this.actionsList);
623
+ if (this.actionsList)
624
+ return hardList.concat(this.actionsList);
625
+ return hardList;
653
626
  }
654
627
  getTopTaskBarId() {
655
628
  var _a;
656
- return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${index.PresentationMode.PRIMARY}` :
657
- `snkGridTopTaskbar.regular${index.PresentationMode.PRIMARY}`;
629
+ return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${index$1.PresentationMode.PRIMARY}` :
630
+ `snkGridTopTaskbar.regular${index$1.PresentationMode.PRIMARY}`;
658
631
  }
659
632
  async keyDownListener(event) {
660
633
  if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
@@ -694,9 +667,11 @@ const SnkSimpleCrud = class {
694
667
  window.removeEventListener("keydown", this._keyDownHandler);
695
668
  }
696
669
  gridConfigChangeHandler(evt) {
670
+ evt.stopPropagation();
671
+ if (!this.configName)
672
+ return;
697
673
  const config = evt.detail;
698
674
  ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
699
- evt.stopPropagation();
700
675
  }
701
676
  modalConfigChangeHandler(evt) {
702
677
  const config = evt.detail;
@@ -715,7 +690,7 @@ const SnkSimpleCrud = class {
715
690
  if (this._grid == undefined) {
716
691
  return;
717
692
  }
718
- const dataExporterProvider = new ClientSideExporterProvider(this.dataUnit, this._grid);
693
+ const dataExporterProvider = new ClientSideExporterProvider.ClientSideExporterProvider(this.dataUnit, this._grid);
719
694
  index$2.store.set("exporterProviders", Object.assign(Object.assign({}, index$2.store.get("exporterProviders")), { [this.getDataExporterStoreKey()]: dataExporterProvider }));
720
695
  }
721
696
  getDataExporterStoreKey() {
@@ -723,7 +698,7 @@ const SnkSimpleCrud = class {
723
698
  }
724
699
  setGridConfig(config) {
725
700
  this.gridConfig = config;
726
- IExporterProvider.CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
701
+ ClientSideExporterProvider.CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
727
702
  }
728
703
  setFormConfig(config, forceUpdate) {
729
704
  if (this.formConfig && !forceUpdate)
@@ -733,9 +708,6 @@ const SnkSimpleCrud = class {
733
708
  closeGridConfig() {
734
709
  this._showPopUpGridConfig = false;
735
710
  }
736
- closeFormConfig() {
737
- this._showFormConfig = false;
738
- }
739
711
  getPageSize() {
740
712
  if (this.mode === constants.SIMPLE_CRUD_MODE.IN_MEMORY) {
741
713
  return 0;
@@ -745,10 +717,6 @@ const SnkSimpleCrud = class {
745
717
  }
746
718
  return this.pageSize;
747
719
  }
748
- //No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
749
- handleShowFormConfig() {
750
- return this._showFormConfig && !this.formLegacyConfigName;
751
- }
752
720
  resolveResourceID() {
753
721
  return core.StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
754
722
  }
@@ -761,24 +729,59 @@ const SnkSimpleCrud = class {
761
729
  return configFromManager;
762
730
  }
763
731
  updateFormConfig() {
764
- const newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
732
+ let newConfig = this.formConfig;
733
+ if (this.formLegacyConfigName == undefined) {
734
+ newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
735
+ }
765
736
  this.setFormConfig(newConfig, true);
766
737
  if (this._formConfigManager == undefined) {
767
738
  this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID());
768
739
  }
769
740
  this._formConfigManager.setConfig(this.formConfig);
770
741
  }
742
+ handleDataUnitOnInsertionMode() {
743
+ if (this.enableGridInsert)
744
+ return;
745
+ this.goToView(constants.VIEW_MODE.FORM);
746
+ }
747
+ async initKeyboardManager() {
748
+ var _a;
749
+ const keyboardManager = new core.KeyboardManager();
750
+ const dataUnit = this.dataUnit || await ((_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
751
+ if (dataUnit == undefined) {
752
+ return;
753
+ }
754
+ keyboardManager
755
+ .bind("F7", () => dataUnit.saveData(), { description: "Salva os dados.", element: this._element })
756
+ .bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
757
+ .bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
758
+ .bind("Escape", () => {
759
+ if (dataUnit.isDirty()) {
760
+ dataUnit.cancelEdition();
761
+ }
762
+ }, {
763
+ debounceTime: 1000,
764
+ description: "Cancela uma ação.", element: this._element
765
+ });
766
+ }
767
+ async handleFormConfigSaved() {
768
+ await this.loadFormConfig(true, true);
769
+ }
770
+ renderTaskbarContent() {
771
+ var _a;
772
+ return (index.h("snk-taskbar", { class: this._currentViewMode === constants.VIEW_MODE.FORM && `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow-xsmall'} 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: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
773
+ }
771
774
  /* istanbul ignore next */
772
775
  render() {
773
776
  var _a;
774
777
  if (this.dataUnit == undefined) {
775
778
  return;
776
779
  }
777
- return (index$1.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(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index$1.h("header", null, index$1.h("slot", { name: "snkSimpleCrudHeader" })), index$1.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index$1.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: index.PresentationMode.SECONDARY }, index$1.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index$1.h("stack-item", null, index$1.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(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
780
+ return (index.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 === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.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(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
778
781
  ? undefined
779
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, index$1.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() && index$1.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index$1.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 })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
782
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, this.renderTaskbarContent(), index.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), index.h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && index.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 })), index.h("div", { id: `${this._customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }))), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
780
783
  }
781
- get _element() { return index$1.getElement(this); }
784
+ get _element() { return index.getElement(this); }
782
785
  static get watchers() { return {
783
786
  "resourceID": ["handleResourceIDChanged"],
784
787
  "entityName": ["onChangeEntityName"],
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const Sortable = require('./Sortable-fb1c4cbb.js');
7
7
  const core = require('@sankhyalabs/core');
8
- const constants = require('./constants-35ddd366.js');
8
+ const constants = require('./constants-241934b3.js');
9
9
 
10
10
  const snkTabConfigCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}.sc-snk-tab-config-h{--snk-tab-config--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--snk-tab-config--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--snk-tab-config__lower-bar--background-color:var(--color--disable-primary, #e5eaf0);--snk-tab-config__lower-bar--border:2px solid var(--color--disable-primary, #e5eaf0);--snk-tab-config__tab--color:var(--text--primary, #626e82);--snk-tab-config__tab--font-family:var(--font-pattern, \"Roboto\");--snk-tab-config__tab--font-size:var(--title--small, 14px);--snk-tab-config__tab--padding:var(--space--small, 6px) var(--space--medium, 12px);--snk-tab-config__tab-is-active--color:var(--color--primary, #008561);--snk-tab-config__tab-hover--color:var(--color--secondary, #383c45);--snk-tab-config__tab-is-focused--border:1px dashed var(--color--primary, #008561);--snk-tab-config__tab-label--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--snk-tab-config__tab-label--margin-bottom:var(--space--extra-small, 3px);--snk-tab-config__new-button-icon--color:var(--color--secondary-700, #1C1D22);--snk-tab-config__forward-button--background-color:var(--text--primary, #626e82);--snk-tab-config__forward-button-hover--background-color:var(--color--primary, #008561);--snk-tab-config__left-icon--padding-right:var(--space--small, 6px);--snk-tab-config__left-icon--color:var(--text--disable, #AFB6C0);--snk-tab-config__tab-label-disabled--color:var(--text--disable, #AFB6C0);--snk-tab-config__slot--margin-left:var(--space--small, 6px);display:flex;position:relative;width:100%;overflow:hidden}.tab-config__scroll.sc-snk-tab-config{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.tab-config__lower-bar.sc-snk-tab-config{position:absolute;left:0%;right:0%;top:91%;bottom:0%;border-radius:2px;background-color:var(--snk-tab-config__lower-bar--background-color);border:var(--snk-tab-config__lower-bar--border)}.tab-config__tab.sc-snk-tab-config{display:flex;border:none;background-color:unset;cursor:pointer;align-items:center;justify-content:center;min-width:fit-content;color:var(--snk-tab-config__tab--color);font-family:var(--snk-tab-config__tab--font-family);font-size:var(--snk-tab-config__tab--font-size);padding:var(--snk-tab-config__tab--padding)}.tab-config__tab.sc-snk-tab-config:focus,.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{outline:none}.tab-config__tab--is-active.sc-snk-tab-config{position:relative;color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-active.sc-snk-tab-config::after{content:\"\";position:absolute;width:100%;height:100%;clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out;background-color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-focused.sc-snk-tab-config{border:var(--snk-tab-config__tab-is-focused--border)}.tab-config__tab-label.sc-snk-tab-config{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--snk-tab-config__tab-label--text-shadow);margin-bottom:var(--snk-tab-config__tab-label--margin-bottom)}.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__new-button-icon--color)}.tab-config__backward-button.sc-snk-tab-config{left:0px;box-shadow:10px 10px 5px 5px white;background:white}.tab-config__forward-button.sc-snk-tab-config{box-shadow:10px 10px 5px 20px white;background:white}.tab-config__forward-button.sc-snk-tab-config::after,.tab-config__backward-button.sc-snk-tab-config::after{content:'';display:flex;width:10px;height:16px;background-color:var(--snk-tab-config__forward-button--background-color)}.tab-config__forward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--forward-icon);mask-image:var(--snk-tab-config--forward-icon)}.tab-config__backward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--backward-icon);mask-image:var(--snk-tab-config--backward-icon)}.tab-config__forward-button.sc-snk-tab-config:hover::after,.tab-config__backward-button.sc-snk-tab-config:hover::after{background-color:var(--snk-tab-config__forward-button-hover--background-color)}.tab-config__new-button.sc-snk-tab-config:hover ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__forward-button-hover--background-color)}.tab-config__hidden.sc-snk-tab-config{display:none}.tab-config__scroll.sc-snk-tab-config::-webkit-scrollbar{display:none}.tab-config__left-icon.sc-snk-tab-config{padding-right:var(--snk-tab-config__left-icon--padding-right);--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__left-icon--eye-off.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__right-icon.sc-snk-tab-config{visibility:hidden;padding-left:var(--snk-tab-config__left-icon--padding-right)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{visibility:visible}.tab-config__tab--is-active.sc-snk-tab-config .tab-config__right-icon.sc-snk-tab-config{visibility:visible;--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.tab-config__actions-button.sc-snk-tab-config{--ez-actions-button__btn-action--min-width:100px;visibility:hidden;opacity:0;transition:visibility 1s linear, opacity 0.3s linear}.tab-config__tab.sc-snk-tab-config:hover .tab-config__actions-button.sc-snk-tab-config{visibility:visible;opacity:1;transition:visibility 0.2s linear, opacity 0.10s linear}[data-draggable-element].sc-snk-tab-config{cursor:grab}.tab-config__tab-label-disabled.sc-snk-tab-config{color:var(--snk-tab-config__tab-label-disabled--color)}.tab-config__slot.sc-snk-tab-config{margin-left:var(--snk-tab-config__slot--margin-left)}";
11
11
 
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
8
- const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
9
- const index$1 = require('./index-1dfc7a6e.js');
8
+ const taskbarElements = require('./taskbar-elements-7e19882d.js');
9
+ const index$1 = require('./index-e3e39724.js');
10
10
  require('./index-102ba62d.js');
11
11
 
12
12
  const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
@@ -15,6 +15,8 @@ const SnkTaskbar = class {
15
15
  constructor(hostRef) {
16
16
  index.registerInstance(this, hostRef);
17
17
  this.actionClick = index.createEvent(this, "actionClick", 7);
18
+ this.taskbarSaveLocker = index.createEvent(this, "taskbarSaveLocker", 7);
19
+ this.taskbarSaveUnlocker = index.createEvent(this, "taskbarSaveUnlocker", 7);
18
20
  this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
19
21
  this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
20
22
  this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
@@ -38,8 +40,10 @@ const SnkTaskbar = class {
38
40
  this.onSaveEvent = (action) => {
39
41
  switch (action.type) {
40
42
  case core.Action.FIELD_INVALIDATED:
43
+ case core.Action.INVALIDATE_CLEAN:
41
44
  case core.Action.DATA_SAVED:
42
45
  case core.Action.SAVING_ERROR:
46
+ case core.Action.SAVING_CANCELED:
43
47
  this._isWaitingForSave = false;
44
48
  break;
45
49
  case core.Action.SAVING_DATA:
@@ -76,6 +80,16 @@ const SnkTaskbar = class {
76
80
  this.getCustomElements(true);
77
81
  }
78
82
  }
83
+ handleTaskbarSaveLocker() {
84
+ if (this._isWaitingForSave !== true) {
85
+ this._isWaitingForSave = true;
86
+ }
87
+ }
88
+ handleTaskbarSaveUnlocker() {
89
+ if (this._isWaitingForSave === true) {
90
+ this._isWaitingForSave = false;
91
+ }
92
+ }
79
93
  hasToSearchCustomElements(event) {
80
94
  return this.customSlotId === event.detail && !this._slotContainer;
81
95
  }
@@ -94,6 +108,14 @@ const SnkTaskbar = class {
94
108
  this._hasToUpdateOverFlow = true;
95
109
  }
96
110
  }
111
+ observeIsWaitingForSave(newValue, oldValue) {
112
+ if (newValue == true && oldValue == false) {
113
+ this.taskbarSaveLocker.emit();
114
+ }
115
+ if (newValue == false && oldValue == true) {
116
+ this.taskbarSaveUnlocker.emit();
117
+ }
118
+ }
97
119
  // Internal methods
98
120
  elementsFromString(strButtons) {
99
121
  const elements = [];
@@ -138,42 +160,50 @@ const SnkTaskbar = class {
138
160
  return key ? (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {}) : "";
139
161
  }
140
162
  elementClick(elem) {
141
- if (this.dataUnit) {
142
- switch (elem) {
143
- case taskbarElements.TaskbarElement.PREVIOUS:
144
- this.dataUnit.previousRecord();
145
- break;
146
- case taskbarElements.TaskbarElement.NEXT:
147
- this.dataUnit.nextRecord();
148
- break;
149
- case taskbarElements.TaskbarElement.REFRESH:
150
- this.dataUnit.loadData();
151
- break;
152
- case taskbarElements.TaskbarElement.CLONE:
153
- this.dataUnit.copySelected();
154
- break;
155
- case taskbarElements.TaskbarElement.REMOVE:
156
- this.dataUnit.removeSelectedRecords();
157
- break;
158
- case taskbarElements.TaskbarElement.INSERT:
159
- this.dataUnit.addRecord();
160
- break;
161
- case taskbarElements.TaskbarElement.CANCEL:
162
- this.dataUnit.cancelEdition();
163
- break;
164
- case taskbarElements.TaskbarElement.SAVE:
165
- if (!this._isWaitingForSave) {
166
- this._isWaitingForSave = true;
167
- this.dataUnit.saveData()
168
- .finally(() => {
169
- this._isWaitingForSave = false;
170
- });
171
- }
172
- break;
163
+ core.LockManager.whenResolve(this._element, core.LockManagerOperation.TASKBAR_CLICK).then(() => {
164
+ if (this.dataUnit) {
165
+ switch (elem) {
166
+ case taskbarElements.TaskbarElement.PREVIOUS:
167
+ this.dataUnit.previousRecord();
168
+ break;
169
+ case taskbarElements.TaskbarElement.NEXT:
170
+ this.dataUnit.nextRecord();
171
+ break;
172
+ case taskbarElements.TaskbarElement.REFRESH:
173
+ this.dataUnit.loadData();
174
+ break;
175
+ case taskbarElements.TaskbarElement.CLONE:
176
+ this.dataUnit.copySelected();
177
+ break;
178
+ case taskbarElements.TaskbarElement.REMOVE:
179
+ this.dataUnit.removeSelectedRecords();
180
+ break;
181
+ case taskbarElements.TaskbarElement.INSERT:
182
+ this.dataUnit.addRecord();
183
+ break;
184
+ case taskbarElements.TaskbarElement.CANCEL:
185
+ this.dataUnit.cancelEdition();
186
+ break;
187
+ case taskbarElements.TaskbarElement.SAVE:
188
+ if (!this._isWaitingForSave) {
189
+ this._isWaitingForSave = true;
190
+ this.dataUnit.saveData().catch((err) => {
191
+ if (err instanceof core.SilentException) {
192
+ return;
193
+ }
194
+ else {
195
+ throw err;
196
+ }
197
+ }).finally(() => {
198
+ this._isWaitingForSave = false;
199
+ });
200
+ }
201
+ break;
202
+ }
173
203
  }
174
- }
175
- if (this.isEnabled(elem))
176
- this.actionClick.emit(elem);
204
+ if (this.isEnabled(elem))
205
+ this.actionClick.emit(elem);
206
+ });
177
207
  }
178
208
  isEnabled(elem) {
179
209
  if (!this.isAllowed(elem)) {
@@ -377,9 +407,10 @@ const SnkTaskbar = class {
377
407
  this._lastWidth = this._element.getBoundingClientRect().width;
378
408
  }
379
409
  disconnectedCallback() {
380
- var _a;
410
+ var _a, _b;
411
+ (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.unsubscribe(this.onSaveEvent);
381
412
  this.unlinkAllCustomElements();
382
- (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
413
+ (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.destroy();
383
414
  }
384
415
  unlinkAllCustomElements() {
385
416
  var _a;
@@ -422,7 +453,8 @@ const SnkTaskbar = class {
422
453
  static get watchers() { return {
423
454
  "buttons": ["observeButtons"],
424
455
  "disabledButtons": ["observeDisabledButtons"],
425
- "_lastWidth": ["observeLastWidth"]
456
+ "_lastWidth": ["observeLastWidth"],
457
+ "_isWaitingForSave": ["observeIsWaitingForSave"]
426
458
  }; }
427
459
  };
428
460
  SnkTaskbar.style = snkTaskbarCss;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
- const index$2 = require('./index-1dfc7a6e.js');
4
+ const index$2 = require('./index-e3e39724.js');
5
5
  const index$1 = require('./index-102ba62d.js');
6
6
 
7
7
  exports.TaskbarElement = void 0;