@sankhyalabs/sankhyablocks 8.16.0-dev.7 → 8.16.0-dev.70

Sign up to get free protection for your applications and to get access to all the features.
Files changed (335) hide show
  1. package/dist/cjs/{ConfigStorage-a343e418.js → ConfigStorage-d024aec8.js} +2 -2
  2. package/dist/cjs/{IExporterProvider-597949f9.js → ContinuousInsertUtils-54d44192.js} +65 -23
  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/{SnkFormConfigManager-166cbd1f.js → SnkFormConfigManager-07f747be.js} +75 -17
  6. package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-bae64d0d.js} +7 -3
  7. package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-8480751c.js} +1 -1
  8. package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-8ea97d88.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-90126e4c.js} +42 -2
  11. package/dist/cjs/index-f9e81701.js +16 -32
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-f3454c23.js} +185 -2
  14. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +133 -0
  15. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  16. package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +136 -40
  17. package/dist/cjs/snk-application.cjs.entry.js +248 -69
  18. package/dist/cjs/snk-attach.cjs.entry.js +46 -33
  19. package/dist/cjs/{snk-form-config.cjs.entry.js → snk-config-options_3.cjs.entry.js} +398 -12
  20. package/dist/cjs/snk-crud.cjs.entry.js +22 -8
  21. package/dist/cjs/snk-data-exporter.cjs.entry.js +34 -22
  22. package/dist/cjs/{snk-data-unit-04df81bf.js → snk-data-unit-72ef8777.js} +54 -32
  23. package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
  24. package/dist/cjs/snk-detail-view.cjs.entry.js +12 -12
  25. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  26. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1436 -0
  27. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  28. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  30. package/dist/cjs/snk-filter-text.cjs.entry.js +2 -1
  31. package/dist/cjs/snk-grid.cjs.entry.js +71 -21
  32. package/dist/cjs/{snk-guides-viewer-bdc41281.js → snk-guides-viewer-b20b0cfd.js} +29 -13
  33. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
  34. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +4 -4
  35. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  36. package/dist/cjs/snk-pesquisa.cjs.entry.js +123 -31
  37. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  38. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  39. package/dist/cjs/snk-simple-crud.cjs.entry.js +101 -45
  40. package/dist/cjs/snk-taskbar.cjs.entry.js +64 -38
  41. package/dist/collection/collection-manifest.json +14 -31
  42. package/dist/collection/components/snk-actions-button/actions/index.js +16 -13
  43. package/dist/collection/components/snk-actions-button/interfaces/index.js +1 -0
  44. package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -26
  45. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +29 -0
  46. package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +16 -0
  47. package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +52 -0
  48. package/dist/collection/components/snk-application/snk-application.css +34 -0
  49. package/dist/collection/components/snk-application/snk-application.js +235 -64
  50. package/dist/collection/components/snk-attach/snk-attach.js +25 -16
  51. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
  52. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
  53. package/dist/collection/components/snk-crud/snk-crud.js +122 -3
  54. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +3 -3
  55. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +6 -6
  56. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +72 -6
  57. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
  58. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +13 -7
  59. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +9 -2
  60. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
  61. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +1 -1
  62. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
  63. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +3 -5
  64. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
  65. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +4 -4
  66. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
  67. package/dist/collection/components/snk-data-unit/snk-data-unit.js +52 -30
  68. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +1 -1
  69. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
  70. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +2 -1
  71. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css +13 -0
  72. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -3
  73. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js +8 -0
  74. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +5 -1
  75. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
  76. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
  77. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +118 -28
  78. package/dist/collection/components/snk-form/snk-form.js +2 -2
  79. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +73 -15
  80. package/dist/collection/components/snk-form-config/snk-form-config.css +8 -3
  81. package/dist/collection/components/snk-form-config/snk-form-config.js +49 -8
  82. package/dist/collection/components/snk-grid/snk-grid.css +2 -0
  83. package/dist/collection/components/snk-grid/snk-grid.js +153 -8
  84. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
  85. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
  86. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
  87. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +179 -0
  88. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
  89. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
  90. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +186 -32
  91. package/dist/collection/components/snk-print-selector/snk-print-selector.js +1 -1
  92. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
  93. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +1 -1
  94. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +160 -50
  95. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
  96. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
  97. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
  98. package/dist/collection/components/snk-taskbar/snk-taskbar.js +106 -38
  99. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
  100. package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -4
  101. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +34 -9
  102. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +29 -21
  103. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
  104. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +2 -2
  105. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +9 -2
  106. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +45 -5
  107. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +7 -1
  108. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +98 -4
  109. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
  110. package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
  111. package/dist/collection/lib/message/resources/snk-grid.msg.js +5 -1
  112. package/dist/collection/lib/utils/ContinuousInsertUtils.js +31 -0
  113. package/dist/collection/lib/utils/CrudUtils.js +25 -16
  114. package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
  115. package/dist/collection/sw.js +46 -0
  116. package/dist/components/{IExporterProvider.js → ContinuousInsertUtils.js} +66 -23
  117. package/dist/components/DataFetcher.js +217 -77
  118. package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
  119. package/dist/components/ISave.js +346 -1
  120. package/dist/components/SnkFormConfigManager.js +73 -15
  121. package/dist/components/SnkMessageBuilder.js +7 -3
  122. package/dist/components/dataunit-fetcher.js +47 -17
  123. package/dist/components/form-config-fetcher.js +41 -1
  124. package/dist/components/index.d.ts +3 -0
  125. package/dist/components/index.js +3 -0
  126. package/dist/components/pesquisa-grid.d.ts +11 -0
  127. package/dist/components/pesquisa-grid.js +6 -0
  128. package/dist/components/pesquisa-grid2.js +86 -0
  129. package/dist/components/pesquisa-tree.d.ts +11 -0
  130. package/dist/components/pesquisa-tree.js +6 -0
  131. package/dist/components/pesquisa-tree2.js +82 -0
  132. package/dist/components/snk-actions-button2.js +43 -40
  133. package/dist/components/snk-application2.js +264 -68
  134. package/dist/components/snk-attach2.js +54 -60
  135. package/dist/components/snk-crud.js +83 -59
  136. package/dist/components/snk-data-exporter2.js +28 -17
  137. package/dist/components/snk-data-unit2.js +55 -70
  138. package/dist/components/snk-detail-view2.js +114 -105
  139. package/dist/components/snk-exporter-email-sender2.js +1 -1
  140. package/dist/components/snk-filter-bar2.js +64 -30
  141. package/dist/components/snk-filter-binary-select.js +1 -1
  142. package/dist/components/snk-filter-checkbox-list.js +1 -1
  143. package/dist/components/snk-filter-item2.js +5 -1
  144. package/dist/components/snk-filter-modal.js +3 -1
  145. package/dist/components/snk-filter-text.js +2 -1
  146. package/dist/components/snk-form-config2.js +34 -9
  147. package/dist/components/snk-form.js +2 -2
  148. package/dist/components/snk-grid2.js +68 -13
  149. package/dist/components/snk-personalized-filter-editor.js +4 -4
  150. package/dist/components/snk-pesquisa2.js +136 -33
  151. package/dist/components/snk-print-selector.js +1 -1
  152. package/dist/components/snk-simple-bar2.js +1 -1
  153. package/dist/components/snk-simple-crud2.js +108 -66
  154. package/dist/components/snk-simple-form-config.d.ts +11 -0
  155. package/dist/components/snk-simple-form-config.js +6 -0
  156. package/dist/components/snk-simple-form-config2.js +120 -0
  157. package/dist/components/snk-taskbar2.js +66 -40
  158. package/dist/components/teste-pesquisa.js +13 -1
  159. package/dist/esm/{ConfigStorage-3806514e.js → ConfigStorage-373bb440.js} +2 -2
  160. package/dist/esm/{IExporterProvider-63a188b6.js → ContinuousInsertUtils-25e7bd9a.js} +66 -25
  161. package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-5221b992.js} +217 -77
  162. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
  163. package/dist/esm/{SnkFormConfigManager-31b24066.js → SnkFormConfigManager-1ff928fa.js} +75 -17
  164. package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-6fff4a4c.js} +7 -3
  165. package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-e32fe8a4.js} +1 -1
  166. package/dist/esm/{constants-8457af36.js → constants-7302ee87.js} +1 -1
  167. package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-8dd93d8b.js} +48 -18
  168. package/dist/esm/{field-search-efbe307f.js → field-search-f8b1d91e.js} +5 -1
  169. package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-126e2471.js} +42 -2
  170. package/dist/esm/index-a7d3d3f1.js +16 -32
  171. package/dist/esm/loader.js +1 -1
  172. package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +186 -4
  173. package/dist/esm/pesquisa-grid_2.entry.js +128 -0
  174. package/dist/esm/sankhyablocks.js +1 -1
  175. package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +138 -43
  176. package/dist/esm/snk-application.entry.js +250 -71
  177. package/dist/esm/snk-attach.entry.js +47 -34
  178. package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +399 -15
  179. package/dist/esm/snk-configurator.entry.js +1 -1
  180. package/dist/esm/snk-crud.entry.js +23 -9
  181. package/dist/esm/snk-data-exporter.entry.js +35 -23
  182. package/dist/esm/{snk-data-unit-8eec78bd.js → snk-data-unit-11a49fc3.js} +54 -32
  183. package/dist/esm/snk-data-unit.entry.js +5 -5
  184. package/dist/esm/snk-detail-view.entry.js +13 -13
  185. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  186. package/dist/esm/snk-field-config.entry.js +1 -1
  187. package/dist/esm/snk-filter-bar_4.entry.js +1429 -0
  188. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  189. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  190. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  191. package/dist/esm/snk-filter-text.entry.js +2 -1
  192. package/dist/esm/snk-grid.entry.js +66 -16
  193. package/dist/esm/{snk-guides-viewer-dda0fede.js → snk-guides-viewer-94918cf7.js} +30 -14
  194. package/dist/esm/snk-guides-viewer.entry.js +9 -9
  195. package/dist/esm/snk-personalized-filter-editor.entry.js +4 -4
  196. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  197. package/dist/esm/snk-pesquisa.entry.js +123 -31
  198. package/dist/esm/snk-print-selector.entry.js +1 -1
  199. package/dist/esm/snk-simple-bar.entry.js +1 -1
  200. package/dist/esm/snk-simple-crud.entry.js +99 -43
  201. package/dist/esm/snk-tab-config.entry.js +1 -1
  202. package/dist/esm/snk-taskbar.entry.js +65 -39
  203. package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
  204. package/dist/sankhyablocks/p-0d86c004.entry.js +1 -0
  205. package/dist/sankhyablocks/p-1435701f.js +26 -0
  206. package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
  207. package/dist/sankhyablocks/p-16cc8640.entry.js +11 -0
  208. package/dist/sankhyablocks/p-17425c72.js +1 -0
  209. package/dist/sankhyablocks/{p-52920496.js → p-19dc71e9.js} +1 -1
  210. package/dist/sankhyablocks/p-1a91d1f3.entry.js +1 -0
  211. package/dist/sankhyablocks/{p-47db7e88.entry.js → p-1cf39cfd.entry.js} +1 -1
  212. package/dist/sankhyablocks/p-23736d75.js +1 -0
  213. package/dist/sankhyablocks/{p-8eb67fa4.entry.js → p-2d3f9482.entry.js} +1 -1
  214. package/dist/sankhyablocks/p-3150ad41.js +1 -0
  215. package/dist/sankhyablocks/{p-c1d57831.entry.js → p-3a3d4055.entry.js} +1 -1
  216. package/dist/sankhyablocks/{p-7663f597.entry.js → p-41793e17.entry.js} +1 -1
  217. package/dist/sankhyablocks/{p-72fc257b.entry.js → p-434817f0.entry.js} +1 -1
  218. package/dist/sankhyablocks/p-469384a2.entry.js +1 -0
  219. package/dist/sankhyablocks/p-47178038.entry.js +1 -0
  220. package/dist/sankhyablocks/p-471785a1.entry.js +1 -0
  221. package/dist/sankhyablocks/p-4ca8e061.entry.js +1 -0
  222. package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
  223. package/dist/sankhyablocks/p-60e4db34.js +1 -0
  224. package/dist/sankhyablocks/p-618a29ed.entry.js +1 -0
  225. package/dist/sankhyablocks/p-619aeac8.entry.js +1 -0
  226. package/dist/sankhyablocks/p-68134a67.entry.js +1 -0
  227. package/dist/sankhyablocks/p-798386c7.js +6 -0
  228. package/dist/sankhyablocks/p-7dd49d15.js +1 -0
  229. package/dist/sankhyablocks/{p-2c68b3ae.entry.js → p-82ee6dc3.entry.js} +1 -1
  230. package/dist/sankhyablocks/p-89c92727.entry.js +1 -0
  231. package/dist/sankhyablocks/p-8a1ee5b5.js +1 -0
  232. package/dist/sankhyablocks/{p-95df461f.entry.js → p-8b4fc28f.entry.js} +1 -1
  233. package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
  234. package/dist/sankhyablocks/{p-41f8bfa3.entry.js → p-8c235d4c.entry.js} +1 -1
  235. package/dist/sankhyablocks/{p-b0ef4383.js → p-95ce311a.js} +1 -1
  236. package/dist/sankhyablocks/p-a3803d7c.entry.js +1 -0
  237. package/dist/sankhyablocks/p-aaef93e8.js +1 -0
  238. package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
  239. package/dist/sankhyablocks/p-d62228fb.js +1 -0
  240. package/dist/sankhyablocks/p-d92d4f91.entry.js +1 -0
  241. package/dist/sankhyablocks/p-ddefbbc7.js +60 -0
  242. package/dist/sankhyablocks/p-e5430b29.entry.js +1 -0
  243. package/dist/sankhyablocks/{p-913a9979.js → p-f0b9303b.js} +1 -1
  244. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  245. package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
  246. package/dist/types/components/snk-actions-button/interfaces/index.d.ts +3 -0
  247. package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +3 -2
  248. package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +11 -0
  249. package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +12 -0
  250. package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +13 -0
  251. package/dist/types/components/snk-application/snk-application.d.ts +28 -14
  252. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  253. package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
  254. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +15 -0
  255. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
  256. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
  257. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
  258. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
  259. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +2 -0
  260. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.d.ts +7 -0
  261. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
  262. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +15 -1
  263. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +7 -2
  264. package/dist/types/components/snk-form-config/snk-form-config.d.ts +4 -0
  265. package/dist/types/components/snk-grid/snk-grid.d.ts +26 -0
  266. package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
  267. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +29 -0
  268. package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
  269. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +36 -1
  270. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +27 -7
  271. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
  272. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
  273. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
  274. package/dist/types/components.d.ts +372 -15
  275. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +12 -2
  276. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
  277. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
  278. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -1
  279. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
  280. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  281. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
  282. package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +10 -0
  283. package/dist/types/lib/utils/CrudUtils.d.ts +1 -0
  284. package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
  285. package/package.json +4 -3
  286. package/react/components.d.ts +3 -0
  287. package/react/components.js +3 -0
  288. package/react/components.js.map +1 -1
  289. package/dist/cjs/snk-config-options.cjs.entry.js +0 -239
  290. package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -714
  291. package/dist/cjs/snk-filter-item.cjs.entry.js +0 -312
  292. package/dist/cjs/snk-filter-list.cjs.entry.js +0 -152
  293. package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -249
  294. package/dist/cjs/snk-form.cjs.entry.js +0 -143
  295. package/dist/esm/pesquisa-fetcher-03c8f919.js +0 -164
  296. package/dist/esm/snk-config-options.entry.js +0 -235
  297. package/dist/esm/snk-filter-bar.entry.js +0 -710
  298. package/dist/esm/snk-filter-item.entry.js +0 -308
  299. package/dist/esm/snk-filter-list.entry.js +0 -148
  300. package/dist/esm/snk-filter-modal.entry.js +0 -245
  301. package/dist/esm/snk-form.entry.js +0 -139
  302. package/dist/sankhyablocks/p-045eae4d.entry.js +0 -11
  303. package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
  304. package/dist/sankhyablocks/p-2a408684.js +0 -1
  305. package/dist/sankhyablocks/p-3a212712.js +0 -1
  306. package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
  307. package/dist/sankhyablocks/p-450c60e4.entry.js +0 -1
  308. package/dist/sankhyablocks/p-46d38387.entry.js +0 -1
  309. package/dist/sankhyablocks/p-4e5e1313.entry.js +0 -1
  310. package/dist/sankhyablocks/p-547eeac8.entry.js +0 -1
  311. package/dist/sankhyablocks/p-62ba211a.entry.js +0 -1
  312. package/dist/sankhyablocks/p-70a4af56.entry.js +0 -1
  313. package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
  314. package/dist/sankhyablocks/p-75e674ed.entry.js +0 -1
  315. package/dist/sankhyablocks/p-7a337364.js +0 -1
  316. package/dist/sankhyablocks/p-7a85fd49.entry.js +0 -1
  317. package/dist/sankhyablocks/p-7b08d0f8.entry.js +0 -1
  318. package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
  319. package/dist/sankhyablocks/p-96a89d58.entry.js +0 -1
  320. package/dist/sankhyablocks/p-9863d682.js +0 -1
  321. package/dist/sankhyablocks/p-af8efd95.js +0 -6
  322. package/dist/sankhyablocks/p-b05d8893.entry.js +0 -1
  323. package/dist/sankhyablocks/p-b11aa1e0.entry.js +0 -1
  324. package/dist/sankhyablocks/p-c2495304.js +0 -1
  325. package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
  326. package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
  327. package/dist/sankhyablocks/p-d6e26ea8.entry.js +0 -1
  328. package/dist/sankhyablocks/p-dc7c9047.js +0 -1
  329. package/dist/sankhyablocks/p-df5451c7.js +0 -26
  330. package/dist/sankhyablocks/p-e549f7d1.js +0 -1
  331. package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
  332. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  333. package/dist/sankhyablocks/p-fa4d8cb4.js +0 -1
  334. package/dist/sankhyablocks/p-fe79f83a.js +0 -60
  335. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -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,44 @@ 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()
191
+ .finally(() => {
192
+ this._isWaitingForSave = false;
193
+ });
194
+ }
195
+ break;
196
+ }
173
197
  }
174
- }
175
- if (this.isEnabled(elem))
176
- this.actionClick.emit(elem);
198
+ if (this.isEnabled(elem))
199
+ this.actionClick.emit(elem);
200
+ });
177
201
  }
178
202
  isEnabled(elem) {
179
203
  if (!this.isAllowed(elem)) {
@@ -377,9 +401,10 @@ const SnkTaskbar = class {
377
401
  this._lastWidth = this._element.getBoundingClientRect().width;
378
402
  }
379
403
  disconnectedCallback() {
380
- var _a;
404
+ var _a, _b;
405
+ (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.unsubscribe(this.onSaveEvent);
381
406
  this.unlinkAllCustomElements();
382
- (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
407
+ (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.destroy();
383
408
  }
384
409
  unlinkAllCustomElements() {
385
410
  var _a;
@@ -422,7 +447,8 @@ const SnkTaskbar = class {
422
447
  static get watchers() { return {
423
448
  "buttons": ["observeButtons"],
424
449
  "disabledButtons": ["observeDisabledButtons"],
425
- "_lastWidth": ["observeLastWidth"]
450
+ "_lastWidth": ["observeLastWidth"],
451
+ "_isWaitingForSave": ["observeIsWaitingForSave"]
426
452
  }; }
427
453
  };
428
454
  SnkTaskbar.style = snkTaskbarCss;
@@ -48,8 +48,11 @@
48
48
  "./components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js",
49
49
  "./components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js",
50
50
  "./components/snk-pesquisa/snk-pesquisa.js",
51
+ "./components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js",
52
+ "./components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js",
51
53
  "./components/snk-simple-bar/snk-simple-bar.js",
52
54
  "./components/snk-simple-crud/snk-simple-crud.js",
55
+ "./components/snk-simple-form-config/snk-simple-form-config.js",
53
56
  "./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
54
57
  "./components/teste-pesquisa/teste-pesquisa.js"
55
58
  ],
@@ -65,21 +68,6 @@
65
68
  "snk-application"
66
69
  ]
67
70
  },
68
- {
69
- "components": [
70
- "snk-form"
71
- ]
72
- },
73
- {
74
- "components": [
75
- "snk-form-config"
76
- ]
77
- },
78
- {
79
- "components": [
80
- "snk-config-options"
81
- ]
82
- },
83
71
  {
84
72
  "components": [
85
73
  "snk-tab-config"
@@ -132,42 +120,37 @@
132
120
  },
133
121
  {
134
122
  "components": [
135
- "snk-filter-bar"
136
- ]
137
- },
138
- {
139
- "components": [
140
- "snk-filter-item"
141
- ]
142
- },
143
- {
144
- "components": [
145
- "snk-filter-list"
123
+ "snk-field-config"
146
124
  ]
147
125
  },
148
126
  {
149
127
  "components": [
150
- "snk-filter-modal"
128
+ "snk-grid"
151
129
  ]
152
130
  },
153
131
  {
154
132
  "components": [
155
- "snk-field-config"
133
+ "snk-pesquisa"
156
134
  ]
157
135
  },
158
136
  {
159
137
  "components": [
160
- "snk-grid"
138
+ "snk-taskbar"
161
139
  ]
162
140
  },
163
141
  {
164
142
  "components": [
165
- "snk-pesquisa"
143
+ "snk-config-options",
144
+ "snk-form",
145
+ "snk-form-config"
166
146
  ]
167
147
  },
168
148
  {
169
149
  "components": [
170
- "snk-taskbar"
150
+ "snk-filter-bar",
151
+ "snk-filter-item",
152
+ "snk-filter-list",
153
+ "snk-filter-modal"
171
154
  ]
172
155
  }
173
156
  ]
@@ -3,9 +3,9 @@ import { RefreshType } from "./enum/RefreshType";
3
3
  import { ParamType } from "./enum/ParamType";
4
4
  import { DataFetcher } from "../../../lib";
5
5
  import { ActionsType } from "./enum/ActionsType";
6
+ import { getSelectedRecordsIDsInfo } from "../../../lib/utils/GetSelectedRecordsIDsInfo";
6
7
  const MASTER_ROW_PROPERTY = "__MASTER_ROW__";
7
8
  const ENTITY_NAME_PROPERTY = '__ENTITY_NAME__';
8
- const NUFIN_COLUMN = 'NUFIN';
9
9
  const SERVICE_GET_CONFIGURATIONS = 'SystemUtilsSP.getConf';
10
10
  export default class Actions {
11
11
  constructor(actionsExecuteInterface, dataUnit, appResourceId) {
@@ -17,6 +17,10 @@ export default class Actions {
17
17
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
18
18
  this._appResourceId = appResourceId;
19
19
  }
20
+ getPrimaryKeys() {
21
+ const ids = getSelectedRecordsIDsInfo(this._dataUnit);
22
+ return ids.map(({ name }) => name);
23
+ }
20
24
  apply(action, hasParamsToSave) {
21
25
  this._application.closePopUp();
22
26
  this._actionsExecuteInterface.execute(action, this._dataUnit)
@@ -83,9 +87,9 @@ export default class Actions {
83
87
  return resultParams;
84
88
  });
85
89
  }
86
- actionExecute(execSource, callback) {
90
+ async actionExecute(execSource, callback) {
87
91
  execSource.virtualPage = this.buildVirtualPage();
88
- this.prepareAndExecute(execSource, callback);
92
+ await this.prepareAndExecute(execSource, callback);
89
93
  this.recordsReloader(execSource.refreshType);
90
94
  }
91
95
  resolvePromptParams(action, execSource, hasParamsToSave) {
@@ -280,11 +284,12 @@ export default class Actions {
280
284
  async buildResourceId(actionId) {
281
285
  return this._appResourceId + '.actionconfig.' + actionId;
282
286
  }
283
- prepareAndExecute(execSource, executeAction) {
287
+ async prepareAndExecute(execSource, executeAction) {
284
288
  this.addRows(execSource);
285
- executeAction(execSource);
289
+ await executeAction(execSource);
286
290
  }
287
291
  addRows(execSource) {
292
+ const primaryKeys = this.getPrimaryKeys();
288
293
  const rows = {
289
294
  row: []
290
295
  };
@@ -298,15 +303,13 @@ export default class Actions {
298
303
  delete sourceRow[MASTER_ROW_PROPERTY];
299
304
  delete sourceRow[ENTITY_NAME_PROPERTY];
300
305
  }
301
- for (const fieldName in sourceRow) {
302
- if (fieldName !== NUFIN_COLUMN)
303
- continue;
304
- if (!row.field) {
305
- row.field = [];
306
- }
306
+ if (!row.field) {
307
+ row.field = [];
308
+ }
309
+ for (const primaryKey of primaryKeys) {
307
310
  row.field.push({
308
- fieldName: fieldName,
309
- $: sourceRow[fieldName]
311
+ fieldName: primaryKey,
312
+ $: sourceRow[primaryKey]
310
313
  });
311
314
  }
312
315
  rows.row.push(row);
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from '@stencil/core';
2
- import { ApplicationContext, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { ApplicationContext, ArrayUtils, ElementIDUtils, ServiceUtils, StorageType } from '@sankhyalabs/core';
3
3
  import { DataFetcher } from '../../lib/http/data-fetcher/DataFetcher';
4
4
  import ExecutorFactory from './actions/factory/executor.factory';
5
5
  import Actions from './actions';
@@ -8,6 +8,7 @@ import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
8
8
  export class SnkActionsButton {
9
9
  constructor() {
10
10
  this.CLIENT_EVENT_CONFIRM_NAME = "br.com.sankhya.actionbutton.clientconfirm";
11
+ this._actions = [];
11
12
  this.handleClick = (evt) => {
12
13
  const selectedAction = this._actions.find((action) => action.actionID == evt.detail.id);
13
14
  const executor = new ExecutorFactory(selectedAction.type).executor;
@@ -17,27 +18,22 @@ export class SnkActionsButton {
17
18
  };
18
19
  this._items = [];
19
20
  this._showDropdown = false;
20
- this._actions = [];
21
- this._isOrderActions = false;
22
21
  }
23
22
  async getActions() {
24
- let param = {
25
- param: {
26
- entityName: this._entityName,
27
- resourceID: this._resourceID
28
- }
29
- };
30
- return DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param).then((result) => {
23
+ const actions = await ServiceUtils.useCacheWithService(`SnkActionsButton_${this._entityName}-${this._resourceID}`, async () => {
31
24
  var _a;
32
- if (!((_a = result.actions) === null || _a === void 0 ? void 0 : _a.action))
33
- return;
34
- if (this._isOrderActions) {
35
- this._actions = ArrayUtils.sortAlphabetically(result.actions.action, 'description');
36
- }
37
- else {
38
- this._actions = result.actions.action;
39
- }
40
- });
25
+ const param = {
26
+ param: {
27
+ entityName: this._entityName,
28
+ resourceID: this._resourceID,
29
+ },
30
+ };
31
+ const result = await DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param);
32
+ return ((_a = result.actions) === null || _a === void 0 ? void 0 : _a.action) || [];
33
+ }, StorageType.IN_MEMORY_CACHE);
34
+ this._actions = SnkActionsButton.parameters.isOrderActions
35
+ ? ArrayUtils.sortAlphabetically(actions, 'description')
36
+ : actions;
41
37
  }
42
38
  controlDropdown() {
43
39
  this._showDropdown = !this._showDropdown;
@@ -70,7 +66,7 @@ export class SnkActionsButton {
70
66
  }
71
67
  async componentWillLoad() {
72
68
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
73
- this._isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
69
+ await this.loadParameters();
74
70
  const snkDataUnit = this._element.parentElement;
75
71
  this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
76
72
  this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
@@ -79,9 +75,8 @@ export class SnkActionsButton {
79
75
  this._resourceID = await ResourceIDUtils.getResourceID();
80
76
  }
81
77
  this.setEvents();
82
- this.getActions().then(() => {
83
- this.loadItems();
84
- });
78
+ await this.getActions();
79
+ this.loadItems();
85
80
  }
86
81
  async componentDidLoad() {
87
82
  if (!this._element)
@@ -108,6 +103,11 @@ export class SnkActionsButton {
108
103
  [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(sufix)
109
104
  };
110
105
  }
106
+ async loadParameters() {
107
+ if (SnkActionsButton.parameters.isOrderActions != null)
108
+ return;
109
+ SnkActionsButton.parameters.isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
110
+ }
111
111
  render() {
112
112
  return (h(Host, null, (this._actions && this._actions.length > 0) &&
113
113
  (h("div", { class: `ez-padding-left--medium snk-actions-button
@@ -134,10 +134,11 @@ export class SnkActionsButton {
134
134
  static get states() {
135
135
  return {
136
136
  "_items": {},
137
- "_showDropdown": {},
138
- "_actions": {},
139
- "_isOrderActions": {}
137
+ "_showDropdown": {}
140
138
  };
141
139
  }
142
140
  static get elementRef() { return "_element"; }
143
141
  }
142
+ SnkActionsButton.parameters = {
143
+ isOrderActions: null
144
+ };
@@ -0,0 +1,29 @@
1
+ class DebouncedRequestListener {
2
+ constructor() {
3
+ this._debounceTime = 1500;
4
+ this.requests = new Map();
5
+ this.requestsLoadingBar = [];
6
+ }
7
+ onRequestStart(param) {
8
+ if (param.url.includes("quietMode=true")) {
9
+ return;
10
+ }
11
+ this.requestsLoadingBar.push(param.requestId);
12
+ const timeout = setTimeout(() => {
13
+ this.ezLoadingBar.show();
14
+ }, this._debounceTime);
15
+ this.requests.set(param.requestId, timeout);
16
+ }
17
+ ;
18
+ onRequestEnd(param) {
19
+ var _a, _b, _c;
20
+ const timeoutId = this.requests.get(param.requestId);
21
+ clearTimeout(timeoutId);
22
+ if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
23
+ this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
24
+ !this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
25
+ }
26
+ }
27
+ ;
28
+ }
29
+ export default DebouncedRequestListener;
@@ -0,0 +1,16 @@
1
+ import DebouncedRequestListener from "./DebouncedRequestListener";
2
+ import RequestListenerLoadingBar from "./RequestListenerLoadingBar";
3
+ class RequestListenerFactory {
4
+ static create({ strategy }) {
5
+ switch (strategy) {
6
+ case 'request_name':
7
+ return new RequestListenerLoadingBar();
8
+ case 'request_time':
9
+ return new DebouncedRequestListener();
10
+ default:
11
+ throw new Error('Strategy not found');
12
+ }
13
+ ;
14
+ }
15
+ }
16
+ export default RequestListenerFactory;
@@ -0,0 +1,52 @@
1
+ class RequestListenerLoadingBar {
2
+ constructor() {
3
+ this._debounceTime = 1000;
4
+ this._ignoredNameTypes = ["totals"];
5
+ this._countRequest = 0;
6
+ }
7
+ onRequestStart(param) {
8
+ if (this.isIgnoreLoadingOnRequest(param)) {
9
+ return;
10
+ }
11
+ this._countRequest++;
12
+ this.ezLoadingBar.show();
13
+ if (this._timerLoading) {
14
+ clearTimeout(this._timerLoading);
15
+ }
16
+ }
17
+ ;
18
+ onRequestEnd(param) {
19
+ if (this.isIgnoreLoadingOnRequest(param)) {
20
+ return;
21
+ }
22
+ this._countRequest--;
23
+ this._timerLoading = setTimeout(() => {
24
+ if (this._countRequest <= 0) {
25
+ this.ezLoadingBar.hide();
26
+ }
27
+ }, this._debounceTime);
28
+ }
29
+ ;
30
+ isIgnoreLoadingOnRequest(param) {
31
+ if (param == undefined) {
32
+ return false;
33
+ }
34
+ if (param.url.includes("quietMode=true")) {
35
+ return true;
36
+ }
37
+ if (param.requestBody == undefined) {
38
+ return false;
39
+ }
40
+ if (param.requestBody.length == 1) {
41
+ const { name } = param.requestBody[0].variables;
42
+ if (name) {
43
+ const nameParts = name.split(":");
44
+ const nameType = nameParts[0];
45
+ return this._ignoredNameTypes.indexOf(nameType) >= 0;
46
+ }
47
+ }
48
+ return false;
49
+ }
50
+ ;
51
+ }
52
+ export default RequestListenerLoadingBar;
@@ -3,3 +3,37 @@
3
3
  flex-direction: column;
4
4
  height: 100%;
5
5
  }
6
+
7
+ :host > .loading-hidden {
8
+ display: none;
9
+ pointer-events: none;
10
+ }
11
+
12
+ .skeleton-content-left {
13
+ width: 300px;
14
+ padding-right: 5px;
15
+ }
16
+
17
+ .skeleton-content {
18
+ height: calc(100vh - 310px);
19
+ }
20
+
21
+ .spinner {
22
+ height: 100vh;
23
+ gap: 10px;
24
+ }
25
+ .spinner > .spin {
26
+ animation-name: spin;
27
+ animation-duration: 5000ms;
28
+ animation-iteration-count: infinite;
29
+ animation-timing-function: linear;
30
+ }
31
+
32
+ @keyframes spin {
33
+ from {
34
+ transform:rotate(0deg);
35
+ }
36
+ to {
37
+ transform:rotate(360deg);
38
+ }
39
+ }