@sankhyalabs/sankhyablocks 8.16.0-dev.5 → 8.16.0-dev.51

Sign up to get free protection for your applications and to get access to all the features.
Files changed (286) hide show
  1. package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-f079f5fd.js} +3 -2
  2. package/dist/cjs/{IExporterProvider-597949f9.js → ContinuousInsertUtils-64e47516.js} +64 -22
  3. package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-e059eb72.js} +28 -20
  4. package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
  5. package/dist/cjs/{SnkFormConfigManager-26dfc762.js → SnkFormConfigManager-63369164.js} +72 -16
  6. package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-bae64d0d.js} +7 -3
  7. package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-4f853233.js} +1 -1
  8. package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-228016f4.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-39397ac5.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-a9bfeb22.js} +7 -2
  14. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  15. package/dist/cjs/snk-actions-button_4.cjs.entry.js +42 -36
  16. package/dist/cjs/snk-application.cjs.entry.js +119 -61
  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} +398 -12
  19. package/dist/cjs/snk-crud.cjs.entry.js +23 -8
  20. package/dist/cjs/snk-data-exporter.cjs.entry.js +19 -18
  21. package/dist/cjs/{snk-data-unit-685272e7.js → snk-data-unit-3d9b6ed4.js} +66 -34
  22. package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
  23. package/dist/cjs/snk-detail-view.cjs.entry.js +11 -11
  24. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1420 -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-filter-text.cjs.entry.js +2 -1
  30. package/dist/cjs/snk-grid.cjs.entry.js +66 -21
  31. package/dist/cjs/{snk-guides-viewer-28122419.js → snk-guides-viewer-2139481c.js} +29 -13
  32. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
  33. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
  34. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  35. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  36. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  37. package/dist/cjs/snk-simple-crud.cjs.entry.js +68 -26
  38. package/dist/cjs/snk-taskbar.cjs.entry.js +64 -38
  39. package/dist/collection/collection-manifest.json +11 -31
  40. package/dist/collection/components/snk-actions-button/actions/index.js +12 -9
  41. package/dist/collection/components/snk-actions-button/interfaces/index.js +1 -0
  42. package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -26
  43. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +28 -0
  44. package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +16 -0
  45. package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +52 -0
  46. package/dist/collection/components/snk-application/snk-application.js +44 -54
  47. package/dist/collection/components/snk-attach/snk-attach.js +25 -16
  48. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
  49. package/dist/collection/components/snk-crud/snk-crud.js +122 -3
  50. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
  51. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +6 -6
  52. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +72 -6
  53. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
  54. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +4 -4
  55. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +5 -5
  56. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +1 -1
  57. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
  58. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +2 -2
  59. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
  60. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +4 -4
  61. package/dist/collection/components/snk-data-unit/snk-data-unit.js +81 -32
  62. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +1 -1
  63. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
  64. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +2 -1
  65. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +1 -1
  66. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js +8 -0
  67. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +5 -1
  68. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
  69. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +79 -21
  70. package/dist/collection/components/snk-form/snk-form.js +2 -2
  71. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +70 -14
  72. package/dist/collection/components/snk-form-config/snk-form-config.css +8 -3
  73. package/dist/collection/components/snk-form-config/snk-form-config.js +49 -8
  74. package/dist/collection/components/snk-grid/snk-grid.css +2 -0
  75. package/dist/collection/components/snk-grid/snk-grid.js +100 -8
  76. package/dist/collection/components/snk-print-selector/snk-print-selector.js +1 -1
  77. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
  78. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +0 -1
  79. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +111 -15
  80. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
  81. package/dist/collection/components/snk-taskbar/snk-taskbar.js +106 -38
  82. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
  83. package/dist/collection/lib/configs/ConfigStorage.js +1 -0
  84. package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -4
  85. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +34 -9
  86. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +29 -21
  87. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
  88. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +2 -2
  89. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +9 -2
  90. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +4 -1
  91. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +7 -1
  92. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +6 -1
  93. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
  94. package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
  95. package/dist/collection/lib/message/resources/snk-grid.msg.js +5 -1
  96. package/dist/collection/lib/utils/ContinuousInsertUtils.js +31 -0
  97. package/dist/collection/lib/utils/CrudUtils.js +25 -16
  98. package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
  99. package/dist/collection/sw.js +46 -0
  100. package/dist/components/ConfigStorage.js +1 -0
  101. package/dist/components/{IExporterProvider.js → ContinuousInsertUtils.js} +65 -21
  102. package/dist/components/DataFetcher.js +29 -21
  103. package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
  104. package/dist/components/SnkFormConfigManager.js +70 -14
  105. package/dist/components/SnkMessageBuilder.js +7 -3
  106. package/dist/components/dataunit-fetcher.js +47 -17
  107. package/dist/components/form-config-fetcher.js +4 -1
  108. package/dist/components/pesquisa-fetcher.js +6 -1
  109. package/dist/components/snk-actions-button2.js +39 -35
  110. package/dist/components/snk-application2.js +114 -55
  111. package/dist/components/snk-attach2.js +34 -25
  112. package/dist/components/snk-crud.js +23 -3
  113. package/dist/components/snk-data-exporter2.js +12 -11
  114. package/dist/components/snk-data-unit2.js +68 -72
  115. package/dist/components/snk-detail-view2.js +29 -10
  116. package/dist/components/snk-exporter-email-sender2.js +1 -1
  117. package/dist/components/snk-filter-bar2.js +41 -22
  118. package/dist/components/snk-filter-binary-select.js +1 -1
  119. package/dist/components/snk-filter-checkbox-list.js +1 -1
  120. package/dist/components/snk-filter-item2.js +5 -1
  121. package/dist/components/snk-filter-text.js +2 -1
  122. package/dist/components/snk-form-config2.js +34 -9
  123. package/dist/components/snk-form.js +2 -2
  124. package/dist/components/snk-grid2.js +60 -12
  125. package/dist/components/snk-personalized-filter-editor.js +1 -1
  126. package/dist/components/snk-print-selector.js +1 -1
  127. package/dist/components/snk-simple-bar2.js +1 -1
  128. package/dist/components/snk-simple-crud2.js +62 -15
  129. package/dist/components/snk-taskbar2.js +66 -40
  130. package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-6514d66e.js} +3 -2
  131. package/dist/esm/{IExporterProvider-63a188b6.js → ContinuousInsertUtils-b62906f9.js} +65 -24
  132. package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-5034df59.js} +29 -21
  133. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
  134. package/dist/esm/{SnkFormConfigManager-5782d6cf.js → SnkFormConfigManager-b409c745.js} +72 -16
  135. package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-6fff4a4c.js} +7 -3
  136. package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-ca5d3a49.js} +1 -1
  137. package/dist/esm/{constants-8457af36.js → constants-7302ee87.js} +1 -1
  138. package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-56cb648b.js} +48 -18
  139. package/dist/esm/{field-search-efbe307f.js → field-search-f8b1d91e.js} +5 -1
  140. package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-a7d3e277.js} +5 -2
  141. package/dist/esm/index-a7d3d3f1.js +8 -28
  142. package/dist/esm/loader.js +1 -1
  143. package/dist/esm/{pesquisa-fetcher-03c8f919.js → pesquisa-fetcher-6bc2e41a.js} +7 -2
  144. package/dist/esm/sankhyablocks.js +1 -1
  145. package/dist/esm/snk-actions-button_4.entry.js +44 -38
  146. package/dist/esm/snk-application.entry.js +119 -61
  147. package/dist/esm/snk-attach.entry.js +39 -30
  148. package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +399 -15
  149. package/dist/esm/snk-configurator.entry.js +1 -1
  150. package/dist/esm/snk-crud.entry.js +24 -9
  151. package/dist/esm/snk-data-exporter.entry.js +20 -19
  152. package/dist/esm/{snk-data-unit-63f83504.js → snk-data-unit-9fa7d2b9.js} +66 -34
  153. package/dist/esm/snk-data-unit.entry.js +5 -5
  154. package/dist/esm/snk-detail-view.entry.js +12 -12
  155. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  156. package/dist/esm/snk-field-config.entry.js +1 -1
  157. package/dist/esm/snk-filter-bar_4.entry.js +1413 -0
  158. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  159. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  160. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  161. package/dist/esm/snk-filter-text.entry.js +2 -1
  162. package/dist/esm/snk-grid.entry.js +61 -16
  163. package/dist/esm/{snk-guides-viewer-7460fe10.js → snk-guides-viewer-b7ed39eb.js} +30 -14
  164. package/dist/esm/snk-guides-viewer.entry.js +9 -9
  165. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  166. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  167. package/dist/esm/snk-print-selector.entry.js +1 -1
  168. package/dist/esm/snk-simple-bar.entry.js +1 -1
  169. package/dist/esm/snk-simple-crud.entry.js +65 -23
  170. package/dist/esm/snk-tab-config.entry.js +1 -1
  171. package/dist/esm/snk-taskbar.entry.js +65 -39
  172. package/dist/sankhyablocks/p-00278e07.js +1 -0
  173. package/dist/sankhyablocks/p-0d2a2e9e.entry.js +1 -0
  174. package/dist/sankhyablocks/p-0e206e62.js +1 -0
  175. package/dist/sankhyablocks/{p-df5451c7.js → p-126c58ea.js} +2 -2
  176. package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
  177. package/dist/sankhyablocks/p-17425c72.js +1 -0
  178. package/dist/sankhyablocks/p-1d3ce0d9.entry.js +1 -0
  179. package/dist/sankhyablocks/p-23736d75.js +1 -0
  180. package/dist/sankhyablocks/{p-8eb67fa4.entry.js → p-2d3f9482.entry.js} +1 -1
  181. package/dist/sankhyablocks/{p-af8efd95.js → p-341465ce.js} +2 -2
  182. package/dist/sankhyablocks/p-342eeb3b.js +1 -0
  183. package/dist/sankhyablocks/p-3728d2aa.entry.js +11 -0
  184. package/dist/sankhyablocks/p-4138da61.entry.js +1 -0
  185. package/dist/sankhyablocks/{p-7663f597.entry.js → p-41793e17.entry.js} +1 -1
  186. package/dist/sankhyablocks/{p-72fc257b.entry.js → p-434817f0.entry.js} +1 -1
  187. package/dist/sankhyablocks/p-47d24ac8.js +60 -0
  188. package/dist/sankhyablocks/p-4e1f992e.entry.js +1 -0
  189. package/dist/sankhyablocks/p-5b51491f.entry.js +1 -0
  190. package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
  191. package/dist/sankhyablocks/p-619aeac8.entry.js +1 -0
  192. package/dist/sankhyablocks/p-7075b789.entry.js +1 -0
  193. package/dist/sankhyablocks/p-7dd49d15.js +1 -0
  194. package/dist/sankhyablocks/p-83e71703.entry.js +1 -0
  195. package/dist/sankhyablocks/p-89c92727.entry.js +1 -0
  196. package/dist/sankhyablocks/{p-95df461f.entry.js → p-8b4fc28f.entry.js} +1 -1
  197. package/dist/sankhyablocks/{p-41f8bfa3.entry.js → p-8c235d4c.entry.js} +1 -1
  198. package/dist/sankhyablocks/{p-b0ef4383.js → p-95ce311a.js} +1 -1
  199. package/dist/sankhyablocks/{p-aff76a53.js → p-9ffd9fc7.js} +2 -2
  200. package/dist/sankhyablocks/p-a2c790ac.entry.js +1 -0
  201. package/dist/sankhyablocks/p-a3fadd0b.entry.js +1 -0
  202. package/dist/sankhyablocks/{p-a1d72395.entry.js → p-aa003d4e.entry.js} +1 -1
  203. package/dist/sankhyablocks/p-aaf94476.js +1 -0
  204. package/dist/sankhyablocks/p-af7f7b3e.entry.js +1 -0
  205. package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
  206. package/dist/sankhyablocks/{p-17359530.entry.js → p-e390641b.entry.js} +1 -1
  207. package/dist/sankhyablocks/p-e4391e16.js +1 -0
  208. package/dist/sankhyablocks/p-e97be1c8.js +1 -0
  209. package/dist/sankhyablocks/p-ec43fcc8.entry.js +1 -0
  210. package/dist/sankhyablocks/{p-eae7a817.entry.js → p-fca0e5cc.entry.js} +1 -1
  211. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  212. package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
  213. package/dist/types/components/snk-actions-button/interfaces/index.d.ts +3 -0
  214. package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +3 -2
  215. package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +11 -0
  216. package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +12 -0
  217. package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +13 -0
  218. package/dist/types/components/snk-application/snk-application.d.ts +9 -13
  219. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  220. package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
  221. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +15 -0
  222. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
  223. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +7 -0
  224. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.d.ts +7 -0
  225. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
  226. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +9 -0
  227. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +7 -2
  228. package/dist/types/components/snk-form-config/snk-form-config.d.ts +4 -0
  229. package/dist/types/components/snk-grid/snk-grid.d.ts +15 -0
  230. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +15 -0
  231. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
  232. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
  233. package/dist/types/components.d.ts +143 -0
  234. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +12 -2
  235. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
  236. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
  237. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -1
  238. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  239. package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +10 -0
  240. package/dist/types/lib/utils/CrudUtils.d.ts +1 -0
  241. package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
  242. package/package.json +4 -3
  243. package/dist/cjs/snk-config-options.cjs.entry.js +0 -239
  244. package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -714
  245. package/dist/cjs/snk-filter-item.cjs.entry.js +0 -312
  246. package/dist/cjs/snk-filter-list.cjs.entry.js +0 -152
  247. package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -249
  248. package/dist/cjs/snk-form.cjs.entry.js +0 -143
  249. package/dist/esm/snk-config-options.entry.js +0 -235
  250. package/dist/esm/snk-filter-bar.entry.js +0 -710
  251. package/dist/esm/snk-filter-item.entry.js +0 -308
  252. package/dist/esm/snk-filter-list.entry.js +0 -148
  253. package/dist/esm/snk-filter-modal.entry.js +0 -245
  254. package/dist/esm/snk-form.entry.js +0 -139
  255. package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
  256. package/dist/sankhyablocks/p-3a212712.js +0 -1
  257. package/dist/sankhyablocks/p-3a216b81.entry.js +0 -1
  258. package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
  259. package/dist/sankhyablocks/p-450c60e4.entry.js +0 -1
  260. package/dist/sankhyablocks/p-47b60deb.entry.js +0 -1
  261. package/dist/sankhyablocks/p-70a4af56.entry.js +0 -1
  262. package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
  263. package/dist/sankhyablocks/p-75f83d1d.entry.js +0 -1
  264. package/dist/sankhyablocks/p-7a337364.js +0 -1
  265. package/dist/sankhyablocks/p-82a0bfb0.entry.js +0 -11
  266. package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
  267. package/dist/sankhyablocks/p-913a9979.js +0 -1
  268. package/dist/sankhyablocks/p-941bf3ef.entry.js +0 -1
  269. package/dist/sankhyablocks/p-96a89d58.entry.js +0 -1
  270. package/dist/sankhyablocks/p-9863d682.js +0 -1
  271. package/dist/sankhyablocks/p-b11aa1e0.entry.js +0 -1
  272. package/dist/sankhyablocks/p-b8d06bb3.entry.js +0 -1
  273. package/dist/sankhyablocks/p-bad55caa.entry.js +0 -1
  274. package/dist/sankhyablocks/p-c2495304.js +0 -1
  275. package/dist/sankhyablocks/p-c5268346.entry.js +0 -1
  276. package/dist/sankhyablocks/p-c640163b.entry.js +0 -1
  277. package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
  278. package/dist/sankhyablocks/p-dc7c9047.js +0 -1
  279. package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
  280. package/dist/sankhyablocks/p-f1b31208.entry.js +0 -1
  281. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  282. package/dist/sankhyablocks/p-f4d7fa81.js +0 -1
  283. package/dist/sankhyablocks/p-f51acb38.js +0 -1
  284. package/dist/sankhyablocks/p-fcac4dfc.js +0 -1
  285. package/dist/sankhyablocks/p-fe79f83a.js +0 -60
  286. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -1,4 +1,4 @@
1
- import { ApplicationContext, ElementIDUtils, OverflowDirection, OverflowWatcher, StringUtils, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
1
+ import { ApplicationContext, ElementIDUtils, OverflowDirection, OverflowWatcher, StringUtils, OVERFLOWED_CLASS_NAME, LockManager, LockManagerOperation } from '@sankhyalabs/core';
2
2
  import { h, Host } from '@stencil/core';
3
3
  import { AuthorizationConfig } from '../snk-configurator/AuthorizationConfig';
4
4
  import { AuthorizationElements, buildCustomButton, buildElem, TaskbarElement, VisibleWhenForbidden, } from './elements/taskbar-elements';
@@ -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 = [];
@@ -129,42 +149,44 @@ export class SnkTaskbar {
129
149
  return key ? (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {}) : "";
130
150
  }
131
151
  elementClick(elem) {
132
- if (this.dataUnit) {
133
- switch (elem) {
134
- case TaskbarElement.PREVIOUS:
135
- this.dataUnit.previousRecord();
136
- break;
137
- case TaskbarElement.NEXT:
138
- this.dataUnit.nextRecord();
139
- break;
140
- case TaskbarElement.REFRESH:
141
- this.dataUnit.loadData();
142
- break;
143
- case TaskbarElement.CLONE:
144
- this.dataUnit.copySelected();
145
- break;
146
- case TaskbarElement.REMOVE:
147
- this.dataUnit.removeSelectedRecords();
148
- break;
149
- case TaskbarElement.INSERT:
150
- this.dataUnit.addRecord();
151
- break;
152
- case TaskbarElement.CANCEL:
153
- this.dataUnit.cancelEdition();
154
- break;
155
- case TaskbarElement.SAVE:
156
- if (!this._isWaitingForSave) {
157
- this._isWaitingForSave = true;
158
- this.dataUnit.saveData()
159
- .finally(() => {
160
- this._isWaitingForSave = false;
161
- });
162
- }
163
- break;
152
+ LockManager.whenResolve(this._element, LockManagerOperation.TASKBAR_CLICK).then(() => {
153
+ if (this.dataUnit) {
154
+ switch (elem) {
155
+ case TaskbarElement.PREVIOUS:
156
+ this.dataUnit.previousRecord();
157
+ break;
158
+ case TaskbarElement.NEXT:
159
+ this.dataUnit.nextRecord();
160
+ break;
161
+ case TaskbarElement.REFRESH:
162
+ this.dataUnit.loadData();
163
+ break;
164
+ case TaskbarElement.CLONE:
165
+ this.dataUnit.copySelected();
166
+ break;
167
+ case TaskbarElement.REMOVE:
168
+ this.dataUnit.removeSelectedRecords();
169
+ break;
170
+ case TaskbarElement.INSERT:
171
+ this.dataUnit.addRecord();
172
+ break;
173
+ case TaskbarElement.CANCEL:
174
+ this.dataUnit.cancelEdition();
175
+ break;
176
+ case TaskbarElement.SAVE:
177
+ if (!this._isWaitingForSave) {
178
+ this._isWaitingForSave = true;
179
+ this.dataUnit.saveData()
180
+ .finally(() => {
181
+ this._isWaitingForSave = false;
182
+ });
183
+ }
184
+ break;
185
+ }
164
186
  }
165
- }
166
- if (this.isEnabled(elem))
167
- this.actionClick.emit(elem);
187
+ if (this.isEnabled(elem))
188
+ this.actionClick.emit(elem);
189
+ });
168
190
  }
169
191
  isEnabled(elem) {
170
192
  if (!this.isAllowed(elem)) {
@@ -368,9 +390,10 @@ export class SnkTaskbar {
368
390
  this._lastWidth = this._element.getBoundingClientRect().width;
369
391
  }
370
392
  disconnectedCallback() {
371
- var _a;
393
+ var _a, _b;
394
+ (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.unsubscribe(this.onSaveEvent);
372
395
  this.unlinkAllCustomElements();
373
- (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
396
+ (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.destroy();
374
397
  }
375
398
  unlinkAllCustomElements() {
376
399
  var _a;
@@ -719,6 +742,36 @@ export class SnkTaskbar {
719
742
  "resolved": "string",
720
743
  "references": {}
721
744
  }
745
+ }, {
746
+ "method": "taskbarSaveLocker",
747
+ "name": "taskbarSaveLocker",
748
+ "bubbles": true,
749
+ "cancelable": true,
750
+ "composed": true,
751
+ "docs": {
752
+ "tags": [],
753
+ "text": "Emitido sempre que um save \u00E9 iniciado pela taskbar."
754
+ },
755
+ "complexType": {
756
+ "original": "void",
757
+ "resolved": "void",
758
+ "references": {}
759
+ }
760
+ }, {
761
+ "method": "taskbarSaveUnlocker",
762
+ "name": "taskbarSaveUnlocker",
763
+ "bubbles": true,
764
+ "cancelable": true,
765
+ "composed": true,
766
+ "docs": {
767
+ "tags": [],
768
+ "text": "Emitido sempre que o ocorre alguma action que libera o save."
769
+ },
770
+ "complexType": {
771
+ "original": "void",
772
+ "resolved": "void",
773
+ "references": {}
774
+ }
722
775
  }];
723
776
  }
724
777
  static get elementRef() { return "_element"; }
@@ -732,6 +785,9 @@ export class SnkTaskbar {
732
785
  }, {
733
786
  "propName": "_lastWidth",
734
787
  "methodName": "observeLastWidth"
788
+ }, {
789
+ "propName": "_isWaitingForSave",
790
+ "methodName": "observeIsWaitingForSave"
735
791
  }];
736
792
  }
737
793
  static get listeners() {
@@ -741,6 +797,18 @@ export class SnkTaskbar {
741
797
  "target": "window",
742
798
  "capture": false,
743
799
  "passive": false
800
+ }, {
801
+ "name": "taskbarSaveLocker",
802
+ "method": "handleTaskbarSaveLocker",
803
+ "target": "window",
804
+ "capture": false,
805
+ "passive": false
806
+ }, {
807
+ "name": "taskbarSaveUnlocker",
808
+ "method": "handleTaskbarSaveUnlocker",
809
+ "target": "window",
810
+ "capture": false,
811
+ "passive": false
744
812
  }];
745
813
  }
746
814
  }
@@ -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
  }
@@ -1,5 +1,5 @@
1
1
  import { ChangeOperation, DataType, DataUnit, DateUtils, StringUtils, } from '@sankhyalabs/core';
2
- import { applyFilter, applySorting, buildPaginationInfo } from './dataUnitInMemoryUtils';
2
+ import { buildLoadDataResponse } from './dataUnitInMemoryUtils';
3
3
  export default class InMemoryLoader {
4
4
  constructor(metadata, records, config) {
5
5
  this.metadata = metadata;
@@ -82,9 +82,7 @@ export default class InMemoryLoader {
82
82
  return StringUtils.generateUUID();
83
83
  }
84
84
  inMemoryLoader(dataUnit, request, recordsIn) {
85
- let records = applyFilter(recordsIn, dataUnit, request.filters);
86
- records = applySorting(records, dataUnit, request.sort);
87
- return Promise.resolve({ records, paginationInfo: buildPaginationInfo(records, request.offset, request.limit) });
85
+ return buildLoadDataResponse(recordsIn, dataUnit, request);
88
86
  }
89
87
  metadaLoader() {
90
88
  return Promise.resolve(this._metadata);
@@ -11,6 +11,21 @@ export function applyFilter(records, dataUnit, filters) {
11
11
  }
12
12
  return records.filter(filterFunction);
13
13
  }
14
+ export function buildLoadDataResponse(recordsIn, dataUnit, request) {
15
+ let records = recordsIn ? [...recordsIn] : [];
16
+ records = applyFilter(records, dataUnit, request.filters);
17
+ records = applySorting(records, dataUnit, request.sort);
18
+ const { offset, limit } = request;
19
+ const paginationInfoBuilderParams = {
20
+ recordsLength: records.length,
21
+ offset,
22
+ recordsPerPage: limit,
23
+ };
24
+ return Promise.resolve({
25
+ records: getPagesByRecords(records, offset, limit),
26
+ paginationInfo: buildPaginationInfo(paginationInfoBuilderParams),
27
+ });
28
+ }
14
29
  export function applySorting(records, dataUnit, sorting) {
15
30
  if (sorting == undefined || sorting.length == 0) {
16
31
  return records;
@@ -21,17 +36,27 @@ export function applySorting(records, dataUnit, sorting) {
21
36
  }
22
37
  return records.sort(sortingFunction);
23
38
  }
24
- export function buildPaginationInfo(records, offset = 0, limit = 0) {
25
- if (records === undefined) {
26
- return undefined;
39
+ function hasValidLimitAndOffset(offset, limit) {
40
+ return offset >= 0 && limit >= 0;
41
+ }
42
+ export function getPagesByRecords(records, offset = 0, limit = 0) {
43
+ if (!records || !records.length || !hasValidLimitAndOffset(offset, limit))
44
+ return [];
45
+ if (limit === 0 && offset === 0)
46
+ return records;
47
+ return records.slice(offset, offset + limit);
48
+ }
49
+ export function buildPaginationInfo({ recordsLength = 0, offset = 0, recordsPerPage = 0 }) {
50
+ if (!recordsLength) {
51
+ return { currentPage: 0, firstRecord: 0, lastRecord: 0, total: 0, hasMore: false };
27
52
  }
28
- const total = (records === null || records === void 0 ? void 0 : records.length) || 0;
29
- const lastRecord = Math.min(offset + limit, total);
53
+ const lastRecordIndex = offset + recordsPerPage;
54
+ const lastRecord = lastRecordIndex ? Math.min(lastRecordIndex, recordsLength) : recordsLength;
30
55
  return {
31
- currentPage: limit === 0 ? 0 : Math.ceil(offset / limit),
32
- firstRecord: offset,
56
+ currentPage: recordsPerPage === 0 ? 0 : Math.ceil(offset / recordsPerPage),
57
+ firstRecord: offset + 1,
33
58
  lastRecord: lastRecord,
34
- total: total,
35
- hasMore: !!(total - lastRecord),
59
+ total: recordsLength,
60
+ hasMore: lastRecord < recordsLength,
36
61
  };
37
62
  }
@@ -6,7 +6,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
6
6
  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
7
7
  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
8
8
  };
9
- import { ApplicationContext, ErrorException, ObjectUtils, StringUtils, WarningException } from '@sankhyalabs/core';
9
+ import { ApplicationContext, ErrorException, ObjectUtils, ServiceCanceledException, StringUtils, WarningException } from '@sankhyalabs/core';
10
10
  import { batchRequests } from 'graphql-request';
11
11
  import UrlUtils from "../../../lib/utils/urlutils";
12
12
  import { PrintUtils } from '../../utils/PrintUtils';
@@ -266,7 +266,8 @@ export class DataFetcher {
266
266
  }
267
267
  payloadJson['requestBody']['clientEventList'].clientEvent.push({ $: key });
268
268
  }
269
- DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url: url, requestBody: payload }));
269
+ const requestId = StringUtils.generateUUID();
270
+ DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url: url, requestBody: payload, requestId }));
270
271
  http.open("POST", url, true);
271
272
  http.withCredentials = true;
272
273
  http.send(ObjectUtils.objectToString(payloadJson));
@@ -306,7 +307,7 @@ export class DataFetcher {
306
307
  else if (http.readyState == 4 && http.status != 200) {
307
308
  reject(new ErrorException(`Erro ao executar serviço: ${serviceName}`, http.responseText));
308
309
  }
309
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload }));
310
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url: url, requestBody: payload, requestId }));
310
311
  };
311
312
  });
312
313
  }
@@ -352,6 +353,7 @@ export class DataFetcher {
352
353
  }
353
354
  }
354
355
  async executePendingRequest(watingRequestsById) {
356
+ var _a, _b;
355
357
  const requestsBatch = [];
356
358
  let quietMode = true;
357
359
  watingRequestsById.forEach((waitingReq) => {
@@ -362,31 +364,36 @@ export class DataFetcher {
362
364
  const response = await this.fecthGraphQL(requestsBatch, quietMode);
363
365
  const { data: dataResponse, errors: errorsResponse, extensions } = response;
364
366
  //Reject promises with errors from query
365
- errorsResponse.forEach((errorResponse) => {
366
- Object.entries(errorResponse).forEach(async ([key, val]) => {
367
- const waitingRequest = watingRequestsById.get(val.request.variables[val.index].queryID);
367
+ for (const errorResponse of errorsResponse) {
368
+ const values = Object.values(errorResponse);
369
+ for (const value of values) {
370
+ const waitingRequest = watingRequestsById.get(value.request.variables[value.index].queryID);
368
371
  const hasClientEvent = await this.proccesGraphQLClientEvents(extensions, waitingRequest.request, waitingRequest.resolve, waitingRequest.reject);
369
- Promise.race([
372
+ const data = await Promise.race([
370
373
  waitingRequest.promise,
371
374
  new Promise((resolve) => {
372
375
  resolve(false);
373
376
  })
374
- ]).then((data) => {
375
- var _a;
376
- if (!hasClientEvent || data === false) {
377
- (((_a = watingRequestsById.get(val.request.variables[val.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new ErrorException("Falha detectada", val.message));
377
+ ]);
378
+ if (!hasClientEvent || data === false) {
379
+ if (Object.keys(errorResponse[0].extensions).includes("SERVICE_CANCELED") || Object.keys(extensions).includes("isServiceCancelled")) {
380
+ (((_a = watingRequestsById.get(value.request.variables[value.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new ServiceCanceledException("Service canceled", value.message));
378
381
  }
379
- });
380
- });
381
- });
382
+ else {
383
+ (((_b = watingRequestsById.get(value.request.variables[value.index].queryID)) === null || _b === void 0 ? void 0 : _b.reject) || Promise.reject)(new ErrorException("Falha detectada", value.message));
384
+ }
385
+ }
386
+ }
387
+ }
382
388
  //Resolve promises with data from query
383
- dataResponse.forEach((data) => {
384
- Object.entries(data).forEach(async ([key, val]) => {
389
+ for (const data of dataResponse) {
390
+ const entries = Object.entries(data);
391
+ for (const [key, val] of entries) {
385
392
  const waitingRequest = watingRequestsById.get(key);
386
393
  await this.proccesGraphQLClientEvents(extensions, waitingRequest.request, waitingRequest.resolve, waitingRequest.reject);
387
394
  ((waitingRequest === null || waitingRequest === void 0 ? void 0 : waitingRequest.resolve) || Promise.resolve)(val);
388
- });
389
- });
395
+ }
396
+ }
390
397
  }
391
398
  buildGraphQlURL(quietMode) {
392
399
  const urlParams = UrlUtils.getQueryParams(location.search);
@@ -405,7 +412,8 @@ export class DataFetcher {
405
412
  const errorsResponse = [];
406
413
  const responseExtensions = [];
407
414
  const url = this.buildGraphQlURL(quietMode);
408
- DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url, requestBody: request }));
415
+ const requestId = StringUtils.generateUUID();
416
+ DataFetcher.requestListener.forEach(listener => listener.onRequestStart({ url, requestBody: request, requestId }));
409
417
  try {
410
418
  const response = await batchRequests(url, request, { 'Content-Type': `application/json; charset=${window['SERVER_ENCODING'] || 'UTF-8'}` });
411
419
  response.forEach((resItem, index) => {
@@ -439,11 +447,11 @@ export class DataFetcher {
439
447
  });
440
448
  }
441
449
  else {
442
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request }));
450
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request, requestId }));
443
451
  throw new ErrorException("Falha de comunicação", err.message);
444
452
  }
445
453
  }
446
- DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request }));
454
+ DataFetcher.requestListener.forEach(listener => listener.onRequestEnd({ url, requestBody: request, requestId }));
447
455
  return { data: dataResponse, errors: errorsResponse, extensions: responseExtensions };
448
456
  }
449
457
  isHttpError(err) {
@@ -6,21 +6,23 @@ const SERVICE = {
6
6
  download: "AnexoSistemaSP.baixar",
7
7
  };
8
8
  export class AnexoSistemaFetcher {
9
- constructor(entityName, registerKey, dataUnitName) {
9
+ constructor(entityName, dataUnitName) {
10
10
  var _a;
11
11
  this.entityName = entityName;
12
- this.registerKey = registerKey;
13
12
  this.dataUnitName = dataUnitName;
14
13
  this.validateFields = (fields) => {
15
14
  if (!!fields.LINK && !!fields.NOMEARQUIVO)
16
15
  throw new Error(SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME);
17
16
  if (!fields.LINK && !fields.NOMEARQUIVO)
18
17
  throw new Error(SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED);
19
- if (!this.registerKey)
18
+ if (!this._registerKey)
20
19
  throw new Error('Register key can not be null');
21
20
  };
22
21
  this.resourceID = (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID));
23
22
  }
23
+ set registerKey(registerKey) {
24
+ this._registerKey = registerKey;
25
+ }
24
26
  async save(change) {
25
27
  var _a, _b;
26
28
  let { updatingFields: fields } = change;
@@ -39,7 +41,7 @@ export class AnexoSistemaFetcher {
39
41
  nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
40
42
  link: fields.LINK,
41
43
  nameEntity: this.entityName,
42
- pkEntity: this.registerKey,
44
+ pkEntity: this._registerKey,
43
45
  typeAcess: fields.TIPOACESSO,
44
46
  typeApres: fields.TIPOAPRES,
45
47
  }
@@ -79,7 +81,7 @@ export class AnexoSistemaFetcher {
79
81
  nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
80
82
  link: fields.LINK,
81
83
  nameEntity: this.entityName,
82
- pkEntity: this.registerKey,
84
+ pkEntity: this._registerKey,
83
85
  typeAcess: fields.TIPOACESSO,
84
86
  typeApres: fields.TIPOAPRES,
85
87
  }
@@ -73,7 +73,7 @@ export default class DataUnitDataLoader {
73
73
  }
74
74
  const count = loadingInfo.count;
75
75
  if (loadingInfo.loadingInProgress) {
76
- dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { count }));
76
+ dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { count, loadingInProgress: true }));
77
77
  return;
78
78
  }
79
79
  if (loadingInfo.needReload) {
@@ -81,7 +81,7 @@ export default class DataUnitDataLoader {
81
81
  dataUnit.gotoPage(0);
82
82
  return;
83
83
  }
84
- dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { total: count, count }));
84
+ dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { total: count, count, loadingInProgress: false }));
85
85
  }
86
86
  static registryLoading(dataUnit, loadingInfo) {
87
87
  if (loadingInfo == undefined) {
@@ -44,12 +44,19 @@ export class DatasetStrategy {
44
44
  const records = this.processRecords(dataUnit, fields, responseRecords);
45
45
  const loadingInProgress = pagerId != undefined;
46
46
  const count = loadingInfo.count + records.length;
47
+ const isInsertingNewRecord = dataUnit.hasNewRecord();
47
48
  const needReload = !loadingInProgress && localSorting.length > 0;
49
+ /**
50
+ * Caso precise recarregar dados, porém está no meio de uma inserção, os dados não devem recarregados instantaneamente,
51
+ * Mas sim, sinalizar que o dataUnit está aguardando para der recarregado.
52
+ */
53
+ if (needReload && isInsertingNewRecord) {
54
+ dataUnit.setWaitingToReload(true);
55
+ }
48
56
  return Promise.resolve({
49
57
  records,
50
58
  loadingInfo: Object.assign(Object.assign({}, loadingInfo), { pagerId,
51
- loadingInProgress, total: loadingInProgress ? undefined : count, count,
52
- needReload })
59
+ loadingInProgress, total: loadingInProgress ? undefined : count, count, needReload: needReload && !isInsertingNewRecord })
53
60
  });
54
61
  }
55
62
  catch (error) {
@@ -155,7 +155,10 @@ export class FormConfigFetcher extends ResourceFetcher {
155
155
  query: this.queryConfig.get("fetchDefaultConfig"),
156
156
  })
157
157
  .then((result) => {
158
- resolve(ObjectUtils.stringToObject((result === null || result === void 0 ? void 0 : result.resource) || ''));
158
+ if (!(result === null || result === void 0 ? void 0 : result.resource)) {
159
+ resolve(null);
160
+ }
161
+ resolve(ObjectUtils.stringToObject(result === null || result === void 0 ? void 0 : result.resource));
159
162
  })
160
163
  .catch((error) => {
161
164
  reject(error);
@@ -4,6 +4,7 @@ import { DataFetcher } from "../DataFetcher";
4
4
  export default class ParametersFetcher {
5
5
  constructor() {
6
6
  this._embeddedParams = new Map();
7
+ this._cachedParams = new Map();
7
8
  this.templateByQuery = new Map();
8
9
  try {
9
10
  if (window["MGE_PARAMS"] != undefined) {
@@ -33,11 +34,16 @@ export default class ParametersFetcher {
33
34
  if (this._embeddedParams.has(name)) {
34
35
  return Promise.resolve(this._embeddedParams.get(name));
35
36
  }
37
+ if (this._cachedParams.has(name)) {
38
+ return this._cachedParams.get(name);
39
+ }
36
40
  const completPath = `param://application?params=${name}`;
37
- return DataFetcher.get().callGraphQL({
41
+ const param = await DataFetcher.get().callGraphQL({
38
42
  values: { name: completPath },
39
43
  query: this.templateByQuery.get("fetchParam"),
40
44
  });
45
+ this._cachedParams.set(name, param);
46
+ return param;
41
47
  }
42
48
  async asString(name) {
43
49
  const paramArr = await this.getParam(name);
@@ -96,9 +96,14 @@ export class PesquisaFetcher {
96
96
  }
97
97
  }
98
98
  };
99
+ const urlOptions = {
100
+ urlParams: {
101
+ "quietMode": true
102
+ }
103
+ };
99
104
  return new Promise((resolve, reject) => {
100
105
  DataFetcher.get()
101
- .callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody))
106
+ .callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody), urlOptions)
102
107
  .then(result => resolve(result))
103
108
  .catch(error => reject(error));
104
109
  });
@@ -6,7 +6,7 @@ const snkDataUnitMessages = {
6
6
  },
7
7
  cancelInfo: {
8
8
  clone: "Duplicação descartada!",
9
- insert: "A inclusão descartada!",
9
+ insert: "A inclusão foi descartada!",
10
10
  update: "A edição foi descartada!"
11
11
  },
12
12
  confirm: {
@@ -7,7 +7,7 @@ const snkExporterMessages = {
7
7
  emailSenderOptStep_subtitle: "Primeiro, escolha o formato do arquivo",
8
8
  emailSenderOptStep_lblFormat: "Formato:",
9
9
  emailSenderOptStep_formatPDF: "PDF (.pdf)",
10
- emailSenderOptStep_formatXLSX: "Planilha (.xlsx)",
10
+ emailSenderOptStep_formatXLS: "Planilha (.xls)",
11
11
  emailSenderOptStep_export: "Exportar:",
12
12
  emailSenderOptStep_allData: "Toda a grade",
13
13
  emailSenderOptStep_currentPage: "Somente a página atual",
@@ -1,5 +1,9 @@
1
1
  export const snkGridMessages = {
2
- findColumn: "Busca de colunas"
2
+ findColumn: "Busca de colunas",
3
+ cancelConfirmation: {
4
+ title: "Aviso",
5
+ message: "As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?</b>",
6
+ }
3
7
  };
4
8
  export const snkGridConfigMessages = {
5
9
  gridConfiguration: "Configuração da Grade",
@@ -0,0 +1,31 @@
1
+ import { h } from '@stencil/core';
2
+ import { StringUtils } from '@sankhyalabs/core';
3
+ export class ContinuousInsertUtils {
4
+ constructor(snkApplication, resourceID, configName) {
5
+ this.snkApplication = snkApplication;
6
+ this.keyConfigEnableContinuousInsert = `${resourceID}enableContinuousInsert${configName ? configName : ''}`;
7
+ }
8
+ handleSaveConfig(enableContinuousInsert) {
9
+ return this.snkApplication.saveConfig(this.keyConfigEnableContinuousInsert, enableContinuousInsert);
10
+ }
11
+ getConfig() {
12
+ return this.snkApplication.getConfig(this.keyConfigEnableContinuousInsert).then(value => {
13
+ if (value) {
14
+ return value == "true" ? true : false;
15
+ }
16
+ return false;
17
+ }).catch(() => {
18
+ return false;
19
+ });
20
+ }
21
+ actionContinuousInsert(enableContinuousInsert, handleEnableContinuousInsert) {
22
+ return {
23
+ value: StringUtils.generateUUID(),
24
+ label: enableContinuousInsert ? 'Desativar inclusão contínua' : 'Ativar inclusão contínua',
25
+ enabled: true,
26
+ itemBuilder: () => {
27
+ return (h("div", { class: "ez-dropdown__item-wrapper", onClick: handleEnableContinuousInsert }, h("span", { class: "ez-dropdown__item-label" }, enableContinuousInsert ? 'Desativar inclusão contínua' : 'Ativar inclusão contínua')));
28
+ },
29
+ };
30
+ }
31
+ }