@sankhyalabs/sankhyablocks 1.3.34 → 1.4.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/dist/cjs/SnkMessageBuilder-6c2f7bcd.js +302 -0
  2. package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
  3. package/dist/cjs/configurableElementsStorage-93459c72.js +20 -0
  4. package/dist/cjs/constants-9056ca9e.js +84 -0
  5. package/dist/cjs/draggable.bundle-82a25c06.js +6886 -0
  6. package/dist/cjs/filter-item-type.enum-3daf58d3.js +16 -0
  7. package/dist/cjs/form-config-fetcher-2de7c16a.js +6895 -0
  8. package/dist/cjs/{index-1133bc2a.js → index-20e8b68a.js} +964 -209
  9. package/dist/cjs/loader.cjs.js +3 -3
  10. package/dist/cjs/sankhyablocks.cjs.js +3 -3
  11. package/dist/cjs/snk-application.cjs.entry.js +680 -6994
  12. package/dist/cjs/snk-config-modal.cjs.entry.js +62 -0
  13. package/dist/cjs/snk-config-options.cjs.entry.js +230 -0
  14. package/dist/cjs/snk-configurator_6.cjs.entry.js +1156 -0
  15. package/dist/cjs/snk-crud.cjs.entry.js +78 -0
  16. package/dist/cjs/snk-data-unit.cjs.entry.js +272 -0
  17. package/dist/cjs/snk-field-config_2.cjs.entry.js +135 -0
  18. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +50 -0
  19. package/dist/cjs/snk-filter-detail.cjs.entry.js +106 -0
  20. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +26 -0
  21. package/dist/cjs/snk-filter-number.cjs.entry.js +27 -0
  22. package/dist/cjs/snk-filter-period.cjs.entry.js +40 -0
  23. package/dist/cjs/snk-filter-personalized.cjs.entry.js +89 -0
  24. package/dist/cjs/snk-filter-search.cjs.entry.js +38 -0
  25. package/dist/cjs/snk-filter-text.cjs.entry.js +22 -0
  26. package/dist/cjs/snk-form-config.cjs.entry.js +957 -0
  27. package/dist/cjs/snk-form.cjs.entry.js +146 -0
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-tab-config.cjs.entry.js +321 -0
  30. package/dist/cjs/taskbar-elements-9a4b1e19.js +97 -0
  31. package/dist/cjs/taskbar-processor-6bd0d35c.js +47 -0
  32. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  33. package/dist/collection/collection-manifest.json +45 -2
  34. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +9 -2
  35. package/dist/collection/components/snk-application/snk-application.js +1346 -642
  36. package/dist/collection/components/snk-configurator/snk-configurator.js +261 -0
  37. package/dist/collection/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.js +16 -0
  38. package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.css +122 -0
  39. package/dist/collection/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.js +137 -0
  40. package/dist/collection/components/snk-crud/snk-crud.css +6 -0
  41. package/dist/collection/components/snk-crud/snk-crud.js +232 -0
  42. package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
  43. package/dist/collection/components/snk-data-unit/snk-data-unit.js +517 -0
  44. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +100 -0
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +111 -0
  46. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +87 -0
  47. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +88 -0
  48. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +101 -0
  49. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +180 -0
  50. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +102 -0
  51. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +63 -0
  52. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +12 -0
  53. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +178 -0
  54. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +289 -0
  55. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +299 -0
  56. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +222 -0
  57. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +149 -0
  58. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +462 -0
  59. package/dist/collection/components/snk-form/snk-form.css +38 -0
  60. package/dist/collection/components/snk-form/snk-form.js +336 -0
  61. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +9 -0
  62. package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +315 -0
  63. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +164 -0
  64. package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +140 -0
  65. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +185 -0
  66. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +1062 -0
  67. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +272 -0
  68. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +476 -0
  69. package/dist/collection/components/snk-grid/snk-grid.css +18 -0
  70. package/dist/collection/components/snk-grid/snk-grid.js +273 -0
  71. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +80 -79
  72. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +90 -0
  73. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +43 -0
  74. package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
  75. package/dist/collection/components/snk-taskbar/snk-taskbar.js +339 -0
  76. package/dist/collection/components/teste-pesquisa/teste-pesquisa.js +12 -9
  77. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +39 -14
  78. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +87 -21
  79. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +62 -0
  80. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +106 -3
  81. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +4 -3
  82. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +15 -15
  83. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +9 -1
  84. package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js +47 -0
  85. package/dist/collection/lib/index.js +2 -0
  86. package/dist/collection/lib/message/SnkMessageBuilder.js +130 -0
  87. package/dist/collection/lib/message/resources/crud-utils.msg.js +4 -0
  88. package/dist/collection/lib/message/resources/snk-configurator.msg.js +11 -0
  89. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +23 -0
  90. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +30 -0
  91. package/dist/collection/lib/message/resources/snk-form.msg.js +67 -0
  92. package/dist/collection/lib/message/resources/snk-taskbar.msg.js +17 -0
  93. package/dist/collection/lib/utils/CrudUtils.js +73 -0
  94. package/dist/collection/lib/utils/constants.js +72 -0
  95. package/dist/components/SnkMessageBuilder.js +280 -0
  96. package/dist/components/_commonjsHelpers.js +17 -0
  97. package/dist/components/constants.js +74 -0
  98. package/dist/components/filter-item-type.enum.js +14 -0
  99. package/dist/components/form-config-fetcher.js +6889 -0
  100. package/dist/components/index.d.ts +26 -5
  101. package/dist/components/index.js +26 -0
  102. package/dist/components/snk-application2.js +681 -6980
  103. package/dist/components/snk-config-modal.d.ts +11 -0
  104. package/dist/components/snk-config-modal.js +6 -0
  105. package/dist/components/snk-config-modal2.js +91 -0
  106. package/dist/components/snk-config-options.d.ts +11 -0
  107. package/dist/components/snk-config-options.js +6 -0
  108. package/dist/components/snk-config-options2.js +245 -0
  109. package/dist/components/snk-configurator.d.ts +11 -0
  110. package/dist/components/snk-configurator.js +6 -0
  111. package/dist/components/snk-configurator2.js +212 -0
  112. package/dist/components/snk-crud.d.ts +11 -0
  113. package/dist/components/snk-crud.js +183 -0
  114. package/dist/components/snk-data-unit.d.ts +11 -0
  115. package/dist/components/snk-data-unit.js +294 -0
  116. package/dist/components/snk-field-config.d.ts +11 -0
  117. package/dist/components/snk-field-config.js +6 -0
  118. package/dist/components/snk-field-config2.js +70 -0
  119. package/dist/components/snk-filter-bar.d.ts +11 -0
  120. package/dist/components/snk-filter-bar.js +6 -0
  121. package/dist/components/snk-filter-bar2.js +516 -0
  122. package/dist/components/snk-filter-binary-select.d.ts +11 -0
  123. package/dist/components/snk-filter-binary-select.js +67 -0
  124. package/dist/components/snk-filter-detail.d.ts +11 -0
  125. package/dist/components/snk-filter-detail.js +6 -0
  126. package/dist/components/snk-filter-detail2.js +120 -0
  127. package/dist/components/snk-filter-item.d.ts +11 -0
  128. package/dist/components/snk-filter-item.js +6 -0
  129. package/dist/components/snk-filter-item2.js +194 -0
  130. package/dist/components/snk-filter-list.d.ts +11 -0
  131. package/dist/components/snk-filter-list.js +6 -0
  132. package/dist/components/snk-filter-list2.js +149 -0
  133. package/dist/components/snk-filter-modal.d.ts +11 -0
  134. package/dist/components/snk-filter-modal.js +6 -0
  135. package/dist/components/snk-filter-modal2.js +84 -0
  136. package/dist/components/snk-filter-multi-select.d.ts +11 -0
  137. package/dist/components/snk-filter-multi-select.js +43 -0
  138. package/dist/components/snk-filter-number.d.ts +11 -0
  139. package/dist/components/snk-filter-number.js +44 -0
  140. package/dist/components/snk-filter-period.d.ts +11 -0
  141. package/dist/components/snk-filter-period.js +57 -0
  142. package/dist/components/snk-filter-personalized.d.ts +11 -0
  143. package/dist/components/snk-filter-personalized.js +108 -0
  144. package/dist/components/snk-filter-search.d.ts +11 -0
  145. package/dist/components/snk-filter-search.js +55 -0
  146. package/dist/components/snk-filter-text.d.ts +11 -0
  147. package/dist/components/snk-filter-text.js +38 -0
  148. package/dist/components/snk-form-config.d.ts +11 -0
  149. package/dist/components/snk-form-config.js +6 -0
  150. package/dist/components/snk-form-config2.js +996 -0
  151. package/dist/components/snk-form.d.ts +11 -0
  152. package/dist/components/snk-form.js +6 -0
  153. package/dist/components/snk-form2.js +209 -0
  154. package/dist/components/snk-grid.d.ts +11 -0
  155. package/dist/components/snk-grid.js +6 -0
  156. package/dist/components/snk-grid2.js +152 -0
  157. package/dist/components/snk-tab-config.d.ts +11 -0
  158. package/dist/components/snk-tab-config.js +6 -0
  159. package/dist/components/snk-tab-config2.js +7220 -0
  160. package/dist/components/snk-taskbar.d.ts +11 -0
  161. package/dist/components/snk-taskbar.js +6 -0
  162. package/dist/components/snk-taskbar2.js +282 -0
  163. package/dist/components/taskbar-processor.js +45 -0
  164. package/dist/esm/SnkMessageBuilder-5792c260.js +280 -0
  165. package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
  166. package/dist/esm/configurableElementsStorage-cdc144b5.js +18 -0
  167. package/dist/esm/constants-c6039d3d.js +74 -0
  168. package/dist/esm/draggable.bundle-41d56f06.js +6884 -0
  169. package/dist/esm/filter-item-type.enum-a79b2fa8.js +14 -0
  170. package/dist/esm/form-config-fetcher-96c6c2dc.js +6889 -0
  171. package/dist/esm/{index-ffda6382.js → index-e4121713.js} +963 -210
  172. package/dist/esm/loader.js +3 -3
  173. package/dist/esm/polyfills/css-shim.js +1 -1
  174. package/dist/esm/sankhyablocks.js +3 -3
  175. package/dist/esm/snk-application.entry.js +667 -6981
  176. package/dist/esm/snk-config-modal.entry.js +58 -0
  177. package/dist/esm/snk-config-options.entry.js +226 -0
  178. package/dist/esm/snk-configurator_6.entry.js +1147 -0
  179. package/dist/esm/snk-crud.entry.js +74 -0
  180. package/dist/esm/snk-data-unit.entry.js +268 -0
  181. package/dist/esm/snk-field-config_2.entry.js +130 -0
  182. package/dist/esm/snk-filter-binary-select.entry.js +46 -0
  183. package/dist/esm/snk-filter-detail.entry.js +102 -0
  184. package/dist/esm/snk-filter-multi-select.entry.js +22 -0
  185. package/dist/esm/snk-filter-number.entry.js +23 -0
  186. package/dist/esm/snk-filter-period.entry.js +36 -0
  187. package/dist/esm/snk-filter-personalized.entry.js +85 -0
  188. package/dist/esm/snk-filter-search.entry.js +34 -0
  189. package/dist/esm/snk-filter-text.entry.js +18 -0
  190. package/dist/esm/snk-form-config.entry.js +953 -0
  191. package/dist/esm/snk-form.entry.js +142 -0
  192. package/dist/esm/snk-pesquisa.entry.js +1 -1
  193. package/dist/esm/snk-tab-config.entry.js +317 -0
  194. package/dist/esm/taskbar-elements-e2ed0536.js +94 -0
  195. package/dist/esm/taskbar-processor-aa6772c9.js +45 -0
  196. package/dist/esm/teste-pesquisa.entry.js +1 -1
  197. package/dist/sankhyablocks/p-029ae4e4.entry.js +1 -0
  198. package/dist/sankhyablocks/p-03f9c407.js +1 -0
  199. package/dist/sankhyablocks/p-112455b1.js +1 -0
  200. package/dist/sankhyablocks/p-12ad2a19.entry.js +1 -0
  201. package/dist/sankhyablocks/p-1feabfc7.entry.js +1 -0
  202. package/dist/sankhyablocks/p-21c8929b.js +1 -0
  203. package/dist/sankhyablocks/p-2284c850.entry.js +1 -0
  204. package/dist/sankhyablocks/p-2b891c4a.entry.js +1 -0
  205. package/dist/sankhyablocks/p-2dc76d79.entry.js +1 -0
  206. package/dist/sankhyablocks/p-361299e8.js +26 -0
  207. package/dist/sankhyablocks/p-3a276f3d.entry.js +1 -0
  208. package/dist/sankhyablocks/p-400cc777.entry.js +1 -0
  209. package/dist/sankhyablocks/{p-2a7b4cb3.entry.js → p-44ce5b90.entry.js} +1 -1
  210. package/dist/sankhyablocks/p-521c96f0.entry.js +1 -0
  211. package/dist/sankhyablocks/{p-9520d78a.entry.js → p-6988f4a6.entry.js} +1 -1
  212. package/dist/sankhyablocks/p-776ff4d1.entry.js +1 -0
  213. package/dist/sankhyablocks/p-7b4a4a50.entry.js +1 -0
  214. package/dist/sankhyablocks/p-9ba3df4c.js +2 -0
  215. package/dist/sankhyablocks/p-9dc4426d.entry.js +1 -0
  216. package/dist/sankhyablocks/p-9dd2b8cb.js +1 -0
  217. package/dist/sankhyablocks/p-a17a4fca.entry.js +1 -0
  218. package/dist/sankhyablocks/p-a5b26df2.js +1 -0
  219. package/dist/sankhyablocks/p-b6d6b172.js +1 -0
  220. package/dist/sankhyablocks/p-cc4bef9f.entry.js +1 -0
  221. package/dist/sankhyablocks/p-d50651a3.js +1 -0
  222. package/dist/sankhyablocks/p-d690b6b5.entry.js +75 -0
  223. package/dist/sankhyablocks/p-d9fbb26f.js +1 -0
  224. package/dist/sankhyablocks/p-deb1f523.entry.js +1 -0
  225. package/dist/sankhyablocks/p-e871aa92.entry.js +1 -0
  226. package/dist/sankhyablocks/p-e9beab79.entry.js +1 -0
  227. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  228. package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
  229. package/dist/types/components/snk-application/snk-application.d.ts +178 -26
  230. package/dist/types/components/snk-configurator/snk-configurator.d.ts +46 -0
  231. package/dist/types/components/snk-configurator/subcomponents/configModalProvider/configurableElementsStorage.d.ts +8 -0
  232. package/dist/types/components/snk-configurator/subcomponents/snk-config-modal/snk-config-modal.d.ts +38 -0
  233. package/dist/types/components/snk-crud/snk-crud.d.ts +50 -0
  234. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +92 -0
  235. package/dist/types/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.d.ts +4 -0
  236. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +13 -0
  237. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +9 -0
  238. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +9 -0
  239. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +15 -0
  240. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +24 -0
  241. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +11 -0
  242. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +8 -0
  243. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +11 -0
  244. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +20 -0
  245. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +40 -0
  246. package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +45 -0
  247. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +26 -0
  248. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +65 -0
  249. package/dist/types/components/snk-form/snk-form.d.ts +71 -0
  250. package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +51 -0
  251. package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +32 -0
  252. package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +139 -0
  253. package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +97 -0
  254. package/dist/types/components/snk-grid/snk-grid.d.ts +59 -0
  255. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +30 -0
  256. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +12 -0
  257. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +92 -0
  258. package/dist/types/components.d.ts +1100 -12
  259. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +7 -6
  260. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +3 -0
  261. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +6 -0
  262. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +21 -3
  263. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -1
  264. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +7 -7
  265. package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
  266. package/dist/types/lib/http/data-fetcher/fetchers/totals-fetcher.d.ts +8 -0
  267. package/dist/types/lib/index.d.ts +2 -0
  268. package/dist/types/lib/message/SnkMessageBuilder.d.ts +42 -0
  269. package/dist/types/lib/message/resources/crud-utils.msg.d.ts +2 -0
  270. package/dist/types/lib/message/resources/snk-configurator.msg.d.ts +2 -0
  271. package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +2 -0
  272. package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
  273. package/dist/types/lib/message/resources/snk-form.msg.d.ts +5 -0
  274. package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +2 -0
  275. package/dist/types/lib/utils/CrudUtils.d.ts +6 -0
  276. package/dist/types/lib/utils/constants.d.ts +76 -0
  277. package/dist/types/lib/utils/pesquisa.d.ts +2 -1
  278. package/dist/types/stencil-public-runtime.d.ts +15 -4
  279. package/loader/package.json +1 -0
  280. package/package.json +6 -5
  281. package/react/components.d.ts +23 -0
  282. package/react/components.js +23 -0
  283. package/react/components.js.map +1 -1
  284. package/dist/sankhyablocks/p-98e8490d.entry.js +0 -69
  285. package/dist/sankhyablocks/p-edcb9d8e.js +0 -2
@@ -1,22 +1,31 @@
1
- import { Component, h, Method, Event } from "@stencil/core";
2
- import { DataType, ErrorTracking } from "@sankhyalabs/core";
3
- import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/dataunit-fetcher";
1
+ import { h } from "@stencil/core";
2
+ import { DataType, ErrorTracking, DependencyType, ApplicationContext } from "@sankhyalabs/core";
4
3
  import { DataFetcher } from "../../lib/http/data-fetcher/DataFetcher";
4
+ import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
5
+ import { SnkErrorHandler } from "./errorhandler/snk-error-handler";
6
+ import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
7
+ import { PesquisaFetcher } from "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher";
8
+ import { agGridLicense } from '../../lib/licenses/sankhyalicense.module';
9
+ import { TotalsFetcher } from "../../lib/http/data-fetcher/fetchers/totals-fetcher";
10
+ import { SnkMessageBuilder } from "../../lib/message/SnkMessageBuilder";
11
+ import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/dataunit-fetcher";
5
12
  import UrlUtils from "../../lib/utils/urlutils";
6
13
  import Workspace from "../../lib/workspace/workspace";
7
14
  import ParametersFetcher from "../../lib/http/data-fetcher/fetchers/parameters-fecher";
8
- import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
9
- import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
10
- import { ApplicationContext } from "@sankhyalabs/core";
15
+ import MGEAuthorization from '../../lib/auth/mgeauthorization.module';
11
16
  import GridConfigFetcher from "../../lib/http/data-fetcher/fetchers/grid-config-fetcher";
12
- import { PesquisaFetcher } from "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher";
13
- import { DependencyType } from "@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";
14
17
  import AuthFetcher, { AutorizationType } from "../../lib/http/data-fetcher/fetchers/auth-fetcher";
15
- import MGEAuthorization from '../../lib/auth/mgeauthorization.module';
16
- import { SnkErrorHandler } from "./errorhandler/snk-error-handler";
17
- import { agGridLicense } from '../../lib/licenses/sankhyalicense.module';
18
+ import FilterBarConfigFetcher from "../../lib/http/data-fetcher/fetchers/filter-bar-config-fetcher";
19
+ /**
20
+ * É possível customizar as mensagens dos blocos de construção através de um pequeno modulo na estrutura da aplicação:
21
+ * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
22
+ * Para conhecer os detalhes do módulo, vide os arquivos neste projeto "/src/lib/message/resources/*.msg.ts"
23
+ */
18
24
  export class SnkApplication {
19
25
  constructor() {
26
+ this._authPromises = [];
27
+ this._duCache = new Map();
28
+ this._duPromises = new Map();
20
29
  this._requestListener = new RequestListenerLoadingBar();
21
30
  }
22
31
  get parameters() {
@@ -35,18 +44,31 @@ export class SnkApplication {
35
44
  return this._resourceID;
36
45
  }
37
46
  get auth() {
38
- return new Promise((resolve, reject) => {
39
- if (this._auth) {
40
- resolve(this._auth);
41
- }
42
- else {
43
- this.authFetcher.getData(this._resourceID).then((authList) => {
44
- this._auth = authList;
45
- resolve(authList);
46
- }).catch(error => reject(error));
47
- }
48
- });
47
+ if (this._auth) {
48
+ return Promise.resolve(this._auth);
49
+ }
50
+ else {
51
+ return new Promise((resolve, reject) => {
52
+ const waitingAuth = this._authPromises.length > 0;
53
+ this._authPromises.push(new PendingPromise(resolve, reject));
54
+ if (!waitingAuth) {
55
+ this.authFetcher.getData(this.resourceID).then((authList) => {
56
+ this._auth = authList;
57
+ while (this._authPromises.length > 0) {
58
+ this._authPromises.pop().resolve(this._auth);
59
+ }
60
+ }).catch(error => {
61
+ while (this._authPromises.length > 0) {
62
+ this._authPromises.pop().reject(error);
63
+ }
64
+ });
65
+ }
66
+ });
67
+ }
49
68
  }
69
+ /**
70
+ * Caso o usuário logado seja o SUP.
71
+ */
50
72
  async isUserSup() {
51
73
  return new Promise((resolve, reject) => {
52
74
  this.auth.then((authorization) => {
@@ -56,6 +78,9 @@ export class SnkApplication {
56
78
  });
57
79
  });
58
80
  }
81
+ /**
82
+ * Se o usuário logado tem permissão pra determinada ação.
83
+ */
59
84
  async hasAccess(access) {
60
85
  return new Promise((resolve, reject) => {
61
86
  this.auth.then((authorization) => {
@@ -65,6 +90,9 @@ export class SnkApplication {
65
90
  });
66
91
  });
67
92
  }
93
+ /**
94
+ * Retorna todos os acessos do usuário logado.
95
+ */
68
96
  async getAllAccess() {
69
97
  return new Promise((resolve, reject) => {
70
98
  this.auth.then((authorization) => {
@@ -79,33 +107,69 @@ export class SnkApplication {
79
107
  });
80
108
  });
81
109
  }
82
- async getAuthList(_auth) {
83
- return await (new MGEAuthorization()).parseFromJSON(_auth);
84
- }
110
+ /**
111
+ * Retorna o valor de um parâmetro do tipo string.
112
+ */
85
113
  async getStringParam(name) {
86
- return this.parameters.asString(name, this.resourceID);
114
+ return this.parameters.asString(name);
87
115
  }
116
+ /**
117
+ * Retorna o valor de um parâmetro do tipo Inteiro.
118
+ */
88
119
  async getIntParam(name) {
89
- return this.parameters.asInteger(name, this.resourceID);
120
+ return this.parameters.asInteger(name);
90
121
  }
122
+ /**
123
+ * Retorna o valor de um parâmetro do tipo Decimal.
124
+ */
91
125
  async getFloatParam(name) {
92
- return this.parameters.asFloat(name, this.resourceID);
126
+ return this.parameters.asFloat(name);
93
127
  }
128
+ /**
129
+ * Retorna o valor de um parâmetro do tipo booleano.
130
+ */
94
131
  async getBooleanParam(name) {
95
- return this.parameters.asBoolean(name, this.resourceID);
132
+ return this.parameters.asBoolean(name);
96
133
  }
134
+ /**
135
+ * Retorna o valor de um parâmetro do tipo data.
136
+ */
97
137
  async getDateParam(name) {
98
- return this.parameters.asDate(name, this.resourceID);
138
+ return this.parameters.asDate(name);
99
139
  }
100
- async showPopUp(content) {
101
- this.clearPopUpContent();
140
+ /**
141
+ * Mostra o conteúdo passado em um Popup
142
+ */
143
+ async showPopUp(content, size = "full") {
144
+ this.clearContent(this._popUp);
145
+ if (content.tagName === 'EZ-MODAL-CONTAINER') {
146
+ this._popUp.useHeader = false;
147
+ }
102
148
  this._popUp.appendChild(content);
103
149
  this._popUp.opened = true;
150
+ this._popUp.heightMode = size;
104
151
  }
152
+ async showModal(content) {
153
+ this.clearContent(this._rightModal);
154
+ this._rightModal.appendChild(content);
155
+ this._rightModal.opened = true;
156
+ }
157
+ async closeModal() {
158
+ this.clearContent(this._rightModal);
159
+ this._rightModal.opened = false;
160
+ }
161
+ /**
162
+ * Fecha o popup, liberando o conteúdo.
163
+ */
105
164
  async closePopUp() {
106
- this.clearPopUpContent();
165
+ this.clearContent(this._popUp);
107
166
  this._popUp.opened = false;
167
+ this._popUp.useHeader = true;
168
+ this._popUp.heightMode = "full";
108
169
  }
170
+ /**
171
+ * Verifica se a licença do cliente tem determinado opcional (produto)
172
+ */
109
173
  async temOpcional(opcional) {
110
174
  const opts = opcional.split(",");
111
175
  return new Promise((resolve, reject) => {
@@ -129,6 +193,10 @@ export class SnkApplication {
129
193
  });
130
194
  });
131
195
  }
196
+ /**
197
+ * Retorna a configuração de um recurso por service broker
198
+ * Veja também o método "loadConfig"
199
+ */
132
200
  async getConfig(key) {
133
201
  let payload = {
134
202
  "serviceName": "SystemUtilsSP.getConf",
@@ -146,6 +214,9 @@ export class SnkApplication {
146
214
  .catch(error => reject(error));
147
215
  });
148
216
  }
217
+ /**
218
+ * Salva a configuração de determinado recurso.
219
+ */
149
220
  async saveConfig(key, data) {
150
221
  let payload = {
151
222
  "serviceName": "SystemUtilsSP.saveConf",
@@ -164,42 +235,196 @@ export class SnkApplication {
164
235
  .catch(error => reject(error));
165
236
  });
166
237
  }
238
+ /**
239
+ * Acessa informações de contexto "empurrados" na abertura da tela
240
+ */
167
241
  async getAttributeFromHTMLWrapper(attribName) {
168
242
  return Promise.resolve(window[attribName]);
169
243
  }
244
+ /**
245
+ * Abre determinada tela, repassando pkObject
246
+ */
170
247
  async openApp(resourceId, pkObject) {
171
248
  Workspace.openAppActivity(resourceId, pkObject);
172
249
  }
173
- async createDataunit(entityName) {
174
- return new Promise(resolve => {
175
- const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID);
176
- dataUnit.loadMetadata().then(() => resolve(dataUnit));
250
+ getDuPromissesStack(dataUnitName) {
251
+ let stack;
252
+ if (dataUnitName) {
253
+ stack = this._duPromises.get(dataUnitName);
254
+ if (!stack) {
255
+ stack = [];
256
+ this._duPromises.set(dataUnitName, stack);
257
+ }
258
+ }
259
+ return stack || [];
260
+ }
261
+ /**
262
+ * Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
263
+ * passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
264
+ */
265
+ async createDataunit(entityName, dataUnitName) {
266
+ return new Promise((resolve, reject) => {
267
+ const duPromisses = this.getDuPromissesStack(dataUnitName);
268
+ const waitingDu = duPromisses.length > 0;
269
+ duPromisses.push(new PendingPromise(resolve, reject));
270
+ if (!waitingDu) {
271
+ const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID);
272
+ dataUnit.loadMetadata().then(() => {
273
+ if (dataUnitName) {
274
+ this._duCache.set(dataUnitName, dataUnit);
275
+ }
276
+ while (duPromisses.length > 0) {
277
+ duPromisses.pop().resolve(dataUnit);
278
+ }
279
+ }).catch(reason => {
280
+ while (duPromisses.length > 0) {
281
+ duPromisses.pop().reject(reason);
282
+ }
283
+ });
284
+ }
177
285
  });
178
286
  }
287
+ /**
288
+ * Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
289
+ */
290
+ async getDataUnit(entityName, dataUnitName) {
291
+ return new Promise((resolve, reject) => {
292
+ const dataUnit = this._duCache.get(dataUnitName);
293
+ if (dataUnit) {
294
+ resolve(dataUnit);
295
+ }
296
+ else {
297
+ this.createDataunit(entityName, dataUnitName).then(dataUnit => {
298
+ resolve(dataUnit);
299
+ }).catch(reason => reject(reason));
300
+ }
301
+ });
302
+ }
303
+ /**
304
+ * Retorna o resourceID da tela em questão.
305
+ */
179
306
  async getResourceID() {
180
307
  return Promise.resolve(this.resourceID);
181
308
  }
309
+ /**
310
+ * Retorna o resourceID da tela em questão.
311
+ */
312
+ async getUserID() {
313
+ return Promise.resolve(window["UID"]);
314
+ }
315
+ /**
316
+ * Mostra o diálogo de alerta de acordo com os parâmetros passados.
317
+ */
182
318
  async alert(title, message, icon, options) {
183
319
  return ApplicationUtils.alert(title, message, icon, options);
184
320
  }
321
+ /**
322
+ * Mostra o diálogo de erro de acordo com os parâmetros passados.
323
+ */
185
324
  async error(title, message, icon, options) {
186
325
  return ApplicationUtils.error(title, message, icon, options);
187
326
  }
188
- async confirm(title, message, icon, critical, options) {
189
- return ApplicationUtils.confirm(title, message, icon, critical, options);
327
+ /**
328
+ * Mostra o diálogo de sucesso de acordo com os parâmetros passados.
329
+ */
330
+ async success(title, message, icon, options) {
331
+ return ApplicationUtils.success(title, message, icon, options);
332
+ }
333
+ /**
334
+ * Exibe um diálogo de mensagem comum
335
+ */
336
+ async message(title, message, icon, options) {
337
+ return ApplicationUtils.message(title, message, icon, options);
190
338
  }
339
+ /**
340
+ * Exibe um diálogo de confirmação
341
+ */
342
+ async confirm(title, message, icon, dialogType, options) {
343
+ return ApplicationUtils.confirm(title, message, icon, dialogType, options);
344
+ }
345
+ /**
346
+ * Mostra uma informação efêmera (de segundo plano).
347
+ */
191
348
  async info(message, options) {
192
349
  return ApplicationUtils.info(message, options);
193
350
  }
351
+ /**
352
+ * Busca a configuração de formulário.
353
+ */
194
354
  async loadFormConfig(name) {
195
355
  return this.formConfigFetcher.loadFormConfig(name, this.resourceID);
196
356
  }
197
- async loadGridConfig() {
198
- return this.gridConfigFetcher.getConfig(this.resourceID);
357
+ /**
358
+ * Busca a configuração de grade.
359
+ */
360
+ async loadGridConfig(name) {
361
+ return this.gridConfigFetcher.getConfig(name, this.resourceID);
362
+ }
363
+ /**
364
+ * Busca lista de configurações de formulário do usuário.
365
+ */
366
+ async fetchUserAvailableConfigs(name) {
367
+ return this.formConfigFetcher.fetchUserAvailableConfigs(name, this.resourceID);
199
368
  }
369
+ /**
370
+ * Busca a configuração de formulário do usuário.
371
+ */
372
+ async fetchLegacyConfig(name) {
373
+ return this.formConfigFetcher.fetchLegacyConfig(name, this.resourceID);
374
+ }
375
+ /**
376
+ * Busca a configuração padrão de formulário.
377
+ */
378
+ async fetchDefaultConfig(name) {
379
+ return this.formConfigFetcher.fetchDefaultConfig(name, this.resourceID);
380
+ }
381
+ /**
382
+ * Busca os totalizadores da grade.
383
+ */
384
+ async loadTotals(name, resourceID, filters) {
385
+ return this.totalsFetcher.fetchTotals(name, resourceID, filters);
386
+ }
387
+ /**
388
+ * Salva a configuração de grade.
389
+ */
200
390
  async saveGridConfig(config) {
201
391
  return this.gridConfigFetcher.saveConfig(config, this.resourceID);
202
392
  }
393
+ /**
394
+ * Obtém as configurações da barra de filtros
395
+ */
396
+ async getFilterBarConfig(name) {
397
+ return new Promise((accept, reject) => {
398
+ if (this.configName === name && this._filterBarConfig) {
399
+ accept(this._filterBarConfig);
400
+ }
401
+ else if (this.configName === name && this._filterConfigPromise != undefined) {
402
+ Promise.all([this._filterConfigPromise])
403
+ .then(result => accept(result[0]))
404
+ .catch(reason => reject(reason[0]));
405
+ }
406
+ else {
407
+ this.filterBarConfigFetcher.getConfig(this.resourceID, name)
408
+ .then(config => accept(config))
409
+ .catch(reason => reject(reason));
410
+ }
411
+ });
412
+ }
413
+ /**
414
+ * Salva as configurações da barra de filtros
415
+ */
416
+ async saveFilterBarConfig(config, name) {
417
+ return this.filterBarConfigFetcher.saveConfig(config, this.resourceID, name);
418
+ }
419
+ /**
420
+ * Salva a configuração de formulário.
421
+ */
422
+ async saveFormConfig(config, name) {
423
+ return this.formConfigFetcher.saveConfig(config, name, this.resourceID);
424
+ }
425
+ async getAuthList(_auth) {
426
+ return await (new MGEAuthorization()).parseFromJSON(_auth);
427
+ }
203
428
  get urlParams() {
204
429
  if (!this._urlParams) {
205
430
  this._urlParams = UrlUtils.getQueryParams(location.search);
@@ -224,6 +449,12 @@ export class SnkApplication {
224
449
  }
225
450
  return this._gridConfigFetcher;
226
451
  }
452
+ get totalsFetcher() {
453
+ if (!this._totalsFetcher) {
454
+ this._totalsFetcher = new TotalsFetcher();
455
+ }
456
+ return this._totalsFetcher;
457
+ }
227
458
  get pesquisaFetcher() {
228
459
  if (!this._pesquisaFetcher) {
229
460
  this._pesquisaFetcher = new PesquisaFetcher();
@@ -236,6 +467,12 @@ export class SnkApplication {
236
467
  }
237
468
  return this._authFetcher;
238
469
  }
470
+ get filterBarConfigFetcher() {
471
+ if (!this._filterBarConfigFetcher) {
472
+ this._filterBarConfigFetcher = new FilterBarConfigFetcher();
473
+ }
474
+ return this._filterBarConfigFetcher;
475
+ }
239
476
  async executeSearch(searchArgument, fieldName, dataUnit) {
240
477
  const descriptor = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(fieldName);
241
478
  if (!descriptor) {
@@ -272,23 +509,27 @@ export class SnkApplication {
272
509
  }
273
510
  }
274
511
  });
275
- if (mode === "ADVANCED") {
276
- return new Promise(accept => {
277
- const pesquisaContent = document.createElement("snk-pesquisa");
278
- pesquisaContent.argument = argument;
279
- pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(ENTITYNAME, text, criteria, searchOptions);
280
- pesquisaContent.selectItem = (option) => {
281
- accept(option);
282
- this.clearPopUpTitle();
283
- this.closePopUp();
284
- };
285
- this.setPopUpTitle(DESCRIPTIONENTITY);
286
- this.showPopUp(pesquisaContent);
287
- });
288
- }
289
- else {
290
- return this.pesquisaFetcher.loadSearchOptions(ENTITYNAME, argument, criteria, searchOptions);
291
- }
512
+ return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
513
+ }
514
+ }
515
+ async executePreparedSearch(mode, argument, options) {
516
+ const { entity, entityDescription, criteria, searchOptions } = options;
517
+ if (mode === "ADVANCED") {
518
+ return new Promise(accept => {
519
+ const pesquisaContent = document.createElement("snk-pesquisa");
520
+ pesquisaContent.argument = argument;
521
+ pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
522
+ pesquisaContent.selectItem = (option) => {
523
+ accept(option);
524
+ this.clearPopUpTitle();
525
+ this.closePopUp();
526
+ };
527
+ this.setPopUpTitle(entityDescription);
528
+ this.showPopUp(pesquisaContent);
529
+ });
530
+ }
531
+ else {
532
+ return this.pesquisaFetcher.loadSearchOptions(entity, argument, criteria, searchOptions);
292
533
  }
293
534
  }
294
535
  async isDebugMode() {
@@ -296,10 +537,10 @@ export class SnkApplication {
296
537
  accept(window['isDebugMode']);
297
538
  });
298
539
  }
299
- clearPopUpContent() {
300
- if (this._popUp) {
301
- Array.from(this._popUp.children).forEach(c => {
302
- this._popUp.removeChild(c);
540
+ clearContent(container) {
541
+ if (container) {
542
+ Array.from(container.children).forEach(child => {
543
+ container.removeChild(child);
303
544
  });
304
545
  }
305
546
  }
@@ -311,14 +552,26 @@ export class SnkApplication {
311
552
  }
312
553
  componentWillLoad() {
313
554
  this._errorHandler = new SnkErrorHandler(this);
555
+ this.messagesBuilder = new SnkMessageBuilder();
314
556
  ApplicationContext.setContextValue("__EZUI__UPLOAD__ADD__URL__", `${UrlUtils.getUrlBase()}/mge/upload/file`);
315
557
  ApplicationContext.setContextValue("__EZUI__SEARCH__OPTION__LOADER__", (searchArgument, fieldName, dataUnit) => {
316
558
  return this.executeSearch(searchArgument, fieldName, dataUnit);
317
559
  });
318
560
  ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
561
+ if (this.configName) {
562
+ this._filterConfigPromise = new Promise((accept, reject) => {
563
+ this.filterBarConfigFetcher.getConfig(this.resourceID, this.configName)
564
+ .then(config => {
565
+ this._filterBarConfig = config;
566
+ accept(config);
567
+ })
568
+ .catch(reason => reject(reason));
569
+ });
570
+ }
319
571
  ErrorTracking.init();
320
572
  }
321
573
  connectedCallback() {
574
+ ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
322
575
  DataFetcher.addRequestListener(this._requestListener);
323
576
  }
324
577
  disconnectedCallback() {
@@ -331,656 +584,1088 @@ export class SnkApplication {
331
584
  });
332
585
  }
333
586
  render() {
334
- return (h("div", null,
335
- h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }),
336
- h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() })));
587
+ return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "col col--sd-3", closeOutsideClick: true, closeEsc: true })));
337
588
  }
338
589
  static get is() { return "snk-application"; }
339
590
  static get encapsulation() { return "scoped"; }
340
- static get originalStyleUrls() { return {
341
- "$": ["snk-application.css"]
342
- }; }
343
- static get styleUrls() { return {
344
- "$": ["snk-application.css"]
345
- }; }
346
- static get events() { return [{
347
- "method": "applicationLoaded",
348
- "name": "applicationLoaded",
349
- "bubbles": true,
350
- "cancelable": true,
351
- "composed": true,
352
- "docs": {
353
- "tags": [],
354
- "text": "Evento disparado quando a aplica\u00E7\u00E3o for carregada."
355
- },
356
- "complexType": {
357
- "original": "boolean",
358
- "resolved": "boolean",
359
- "references": {}
360
- }
361
- }, {
362
- "method": "applicationLoading",
363
- "name": "applicationLoading",
364
- "bubbles": true,
365
- "cancelable": true,
366
- "composed": true,
367
- "docs": {
368
- "tags": [],
369
- "text": "Evento"
370
- },
371
- "complexType": {
372
- "original": "boolean",
373
- "resolved": "boolean",
374
- "references": {}
375
- }
376
- }]; }
377
- static get methods() { return {
378
- "isUserSup": {
379
- "complexType": {
380
- "signature": "() => Promise<boolean>",
381
- "parameters": [],
382
- "references": {
383
- "Promise": {
384
- "location": "global"
591
+ static get originalStyleUrls() {
592
+ return {
593
+ "$": ["snk-application.css"]
594
+ };
595
+ }
596
+ static get styleUrls() {
597
+ return {
598
+ "$": ["snk-application.css"]
599
+ };
600
+ }
601
+ static get properties() {
602
+ return {
603
+ "messagesBuilder": {
604
+ "type": "unknown",
605
+ "mutable": true,
606
+ "complexType": {
607
+ "original": "SnkMessageBuilder",
608
+ "resolved": "SnkMessageBuilder",
609
+ "references": {
610
+ "SnkMessageBuilder": {
611
+ "location": "import",
612
+ "path": "../../lib/message/SnkMessageBuilder"
613
+ }
385
614
  }
386
615
  },
387
- "return": "Promise<boolean>"
616
+ "required": false,
617
+ "optional": false,
618
+ "docs": {
619
+ "tags": [],
620
+ "text": "messagesBuilder \u00E9 um utilit\u00E1rio respons\u00E1vel por flexibilizar e padronizar\no uso de mensagens nos blocos de constru\u00E7\u00E3o."
621
+ }
388
622
  },
389
- "docs": {
390
- "text": "",
391
- "tags": []
623
+ "configName": {
624
+ "type": "string",
625
+ "mutable": false,
626
+ "complexType": {
627
+ "original": "string",
628
+ "resolved": "string",
629
+ "references": {}
630
+ },
631
+ "required": false,
632
+ "optional": false,
633
+ "docs": {
634
+ "tags": [],
635
+ "text": "Usado para salvar as configura\u00E7\u00F5es dos blocos de constru\u00E7\u00E3o."
636
+ },
637
+ "attribute": "config-name",
638
+ "reflect": false
392
639
  }
393
- },
394
- "hasAccess": {
395
- "complexType": {
396
- "signature": "(access: AutorizationType) => Promise<boolean>",
397
- "parameters": [{
398
- "tags": [],
399
- "text": ""
400
- }],
401
- "references": {
402
- "Promise": {
403
- "location": "global"
404
- },
405
- "AutorizationType": {
406
- "location": "import",
407
- "path": "../../lib/http/data-fetcher/fetchers/auth-fetcher"
408
- }
640
+ };
641
+ }
642
+ static get events() {
643
+ return [{
644
+ "method": "applicationLoaded",
645
+ "name": "applicationLoaded",
646
+ "bubbles": true,
647
+ "cancelable": true,
648
+ "composed": true,
649
+ "docs": {
650
+ "tags": [],
651
+ "text": "Evento disparado quando a aplica\u00E7\u00E3o for carregada."
409
652
  },
410
- "return": "Promise<boolean>"
653
+ "complexType": {
654
+ "original": "boolean",
655
+ "resolved": "boolean",
656
+ "references": {}
657
+ }
658
+ }, {
659
+ "method": "applicationLoading",
660
+ "name": "applicationLoading",
661
+ "bubbles": true,
662
+ "cancelable": true,
663
+ "composed": true,
664
+ "docs": {
665
+ "tags": [],
666
+ "text": "Evento disparado ao iniciar a carga do componente"
667
+ },
668
+ "complexType": {
669
+ "original": "boolean",
670
+ "resolved": "boolean",
671
+ "references": {}
672
+ }
673
+ }];
674
+ }
675
+ static get methods() {
676
+ return {
677
+ "isUserSup": {
678
+ "complexType": {
679
+ "signature": "() => Promise<boolean>",
680
+ "parameters": [],
681
+ "references": {
682
+ "Promise": {
683
+ "location": "global"
684
+ }
685
+ },
686
+ "return": "Promise<boolean>"
687
+ },
688
+ "docs": {
689
+ "text": "Caso o usu\u00E1rio logado seja o SUP.",
690
+ "tags": []
691
+ }
411
692
  },
412
- "docs": {
413
- "text": "",
414
- "tags": []
415
- }
416
- },
417
- "getAllAccess": {
418
- "complexType": {
419
- "signature": "() => Promise<any>",
420
- "parameters": [],
421
- "references": {
422
- "Promise": {
423
- "location": "global"
424
- }
693
+ "hasAccess": {
694
+ "complexType": {
695
+ "signature": "(access: AutorizationType) => Promise<boolean>",
696
+ "parameters": [{
697
+ "tags": [],
698
+ "text": ""
699
+ }],
700
+ "references": {
701
+ "Promise": {
702
+ "location": "global"
703
+ },
704
+ "AutorizationType": {
705
+ "location": "import",
706
+ "path": "../../lib/http/data-fetcher/fetchers/auth-fetcher"
707
+ }
708
+ },
709
+ "return": "Promise<boolean>"
425
710
  },
426
- "return": "Promise<any>"
711
+ "docs": {
712
+ "text": "Se o usu\u00E1rio logado tem permiss\u00E3o pra determinada a\u00E7\u00E3o.",
713
+ "tags": []
714
+ }
427
715
  },
428
- "docs": {
429
- "text": "",
430
- "tags": []
431
- }
432
- },
433
- "getStringParam": {
434
- "complexType": {
435
- "signature": "(name: string) => Promise<string>",
436
- "parameters": [{
437
- "tags": [],
438
- "text": ""
439
- }],
440
- "references": {
441
- "Promise": {
442
- "location": "global"
443
- }
716
+ "getAllAccess": {
717
+ "complexType": {
718
+ "signature": "() => Promise<any>",
719
+ "parameters": [],
720
+ "references": {
721
+ "Promise": {
722
+ "location": "global"
723
+ }
724
+ },
725
+ "return": "Promise<any>"
444
726
  },
445
- "return": "Promise<string>"
727
+ "docs": {
728
+ "text": "Retorna todos os acessos do usu\u00E1rio logado.",
729
+ "tags": []
730
+ }
446
731
  },
447
- "docs": {
448
- "text": "",
449
- "tags": []
450
- }
451
- },
452
- "getIntParam": {
453
- "complexType": {
454
- "signature": "(name: string) => Promise<number>",
455
- "parameters": [{
456
- "tags": [],
457
- "text": ""
458
- }],
459
- "references": {
460
- "Promise": {
461
- "location": "global"
462
- }
732
+ "getStringParam": {
733
+ "complexType": {
734
+ "signature": "(name: string) => Promise<string>",
735
+ "parameters": [{
736
+ "tags": [],
737
+ "text": ""
738
+ }],
739
+ "references": {
740
+ "Promise": {
741
+ "location": "global"
742
+ }
743
+ },
744
+ "return": "Promise<string>"
463
745
  },
464
- "return": "Promise<number>"
746
+ "docs": {
747
+ "text": "Retorna o valor de um par\u00E2metro do tipo string.",
748
+ "tags": []
749
+ }
465
750
  },
466
- "docs": {
467
- "text": "",
468
- "tags": []
469
- }
470
- },
471
- "getFloatParam": {
472
- "complexType": {
473
- "signature": "(name: string) => Promise<number>",
474
- "parameters": [{
475
- "tags": [],
476
- "text": ""
477
- }],
478
- "references": {
479
- "Promise": {
480
- "location": "global"
481
- }
751
+ "getIntParam": {
752
+ "complexType": {
753
+ "signature": "(name: string) => Promise<number>",
754
+ "parameters": [{
755
+ "tags": [],
756
+ "text": ""
757
+ }],
758
+ "references": {
759
+ "Promise": {
760
+ "location": "global"
761
+ }
762
+ },
763
+ "return": "Promise<number>"
482
764
  },
483
- "return": "Promise<number>"
765
+ "docs": {
766
+ "text": "Retorna o valor de um par\u00E2metro do tipo Inteiro.",
767
+ "tags": []
768
+ }
484
769
  },
485
- "docs": {
486
- "text": "",
487
- "tags": []
488
- }
489
- },
490
- "getBooleanParam": {
491
- "complexType": {
492
- "signature": "(name: string) => Promise<boolean>",
493
- "parameters": [{
494
- "tags": [],
495
- "text": ""
496
- }],
497
- "references": {
498
- "Promise": {
499
- "location": "global"
500
- }
770
+ "getFloatParam": {
771
+ "complexType": {
772
+ "signature": "(name: string) => Promise<number>",
773
+ "parameters": [{
774
+ "tags": [],
775
+ "text": ""
776
+ }],
777
+ "references": {
778
+ "Promise": {
779
+ "location": "global"
780
+ }
781
+ },
782
+ "return": "Promise<number>"
501
783
  },
502
- "return": "Promise<boolean>"
784
+ "docs": {
785
+ "text": "Retorna o valor de um par\u00E2metro do tipo Decimal.",
786
+ "tags": []
787
+ }
503
788
  },
504
- "docs": {
505
- "text": "",
506
- "tags": []
507
- }
508
- },
509
- "getDateParam": {
510
- "complexType": {
511
- "signature": "(name: string) => Promise<Date>",
512
- "parameters": [{
513
- "tags": [],
514
- "text": ""
515
- }],
516
- "references": {
517
- "Promise": {
518
- "location": "global"
519
- },
520
- "Date": {
521
- "location": "global"
522
- }
789
+ "getBooleanParam": {
790
+ "complexType": {
791
+ "signature": "(name: string) => Promise<boolean>",
792
+ "parameters": [{
793
+ "tags": [],
794
+ "text": ""
795
+ }],
796
+ "references": {
797
+ "Promise": {
798
+ "location": "global"
799
+ }
800
+ },
801
+ "return": "Promise<boolean>"
523
802
  },
524
- "return": "Promise<Date>"
803
+ "docs": {
804
+ "text": "Retorna o valor de um par\u00E2metro do tipo booleano.",
805
+ "tags": []
806
+ }
525
807
  },
526
- "docs": {
527
- "text": "",
528
- "tags": []
529
- }
530
- },
531
- "showPopUp": {
532
- "complexType": {
533
- "signature": "(content: HTMLElement) => Promise<void>",
534
- "parameters": [{
535
- "tags": [],
536
- "text": ""
537
- }],
538
- "references": {
539
- "Promise": {
540
- "location": "global"
541
- },
542
- "HTMLElement": {
543
- "location": "global"
544
- }
808
+ "getDateParam": {
809
+ "complexType": {
810
+ "signature": "(name: string) => Promise<Date>",
811
+ "parameters": [{
812
+ "tags": [],
813
+ "text": ""
814
+ }],
815
+ "references": {
816
+ "Promise": {
817
+ "location": "global"
818
+ },
819
+ "Date": {
820
+ "location": "global"
821
+ }
822
+ },
823
+ "return": "Promise<Date>"
545
824
  },
546
- "return": "Promise<void>"
825
+ "docs": {
826
+ "text": "Retorna o valor de um par\u00E2metro do tipo data.",
827
+ "tags": []
828
+ }
547
829
  },
548
- "docs": {
549
- "text": "",
550
- "tags": []
551
- }
552
- },
553
- "closePopUp": {
554
- "complexType": {
555
- "signature": "() => Promise<void>",
556
- "parameters": [],
557
- "references": {
558
- "Promise": {
559
- "location": "global"
560
- }
830
+ "showPopUp": {
831
+ "complexType": {
832
+ "signature": "(content: HTMLElement, size?: string) => Promise<void>",
833
+ "parameters": [{
834
+ "tags": [],
835
+ "text": ""
836
+ }, {
837
+ "tags": [],
838
+ "text": ""
839
+ }],
840
+ "references": {
841
+ "Promise": {
842
+ "location": "global"
843
+ },
844
+ "HTMLElement": {
845
+ "location": "global"
846
+ }
847
+ },
848
+ "return": "Promise<void>"
561
849
  },
562
- "return": "Promise<void>"
850
+ "docs": {
851
+ "text": "Mostra o conte\u00FAdo passado em um Popup",
852
+ "tags": []
853
+ }
563
854
  },
564
- "docs": {
565
- "text": "",
566
- "tags": []
567
- }
568
- },
569
- "temOpcional": {
570
- "complexType": {
571
- "signature": "(opcional: string) => Promise<boolean>",
572
- "parameters": [{
573
- "tags": [],
574
- "text": ""
575
- }],
576
- "references": {
577
- "Promise": {
578
- "location": "global"
579
- }
855
+ "showModal": {
856
+ "complexType": {
857
+ "signature": "(content: HTMLElement) => Promise<void>",
858
+ "parameters": [{
859
+ "tags": [],
860
+ "text": ""
861
+ }],
862
+ "references": {
863
+ "Promise": {
864
+ "location": "global"
865
+ },
866
+ "HTMLElement": {
867
+ "location": "global"
868
+ }
869
+ },
870
+ "return": "Promise<void>"
580
871
  },
581
- "return": "Promise<boolean>"
872
+ "docs": {
873
+ "text": "",
874
+ "tags": []
875
+ }
582
876
  },
583
- "docs": {
584
- "text": "",
585
- "tags": []
586
- }
587
- },
588
- "getConfig": {
589
- "complexType": {
590
- "signature": "(key: string) => Promise<any>",
591
- "parameters": [{
592
- "tags": [],
593
- "text": ""
594
- }],
595
- "references": {
596
- "Promise": {
597
- "location": "global"
598
- }
877
+ "closeModal": {
878
+ "complexType": {
879
+ "signature": "() => Promise<void>",
880
+ "parameters": [],
881
+ "references": {
882
+ "Promise": {
883
+ "location": "global"
884
+ }
885
+ },
886
+ "return": "Promise<void>"
599
887
  },
600
- "return": "Promise<any>"
888
+ "docs": {
889
+ "text": "",
890
+ "tags": []
891
+ }
601
892
  },
602
- "docs": {
603
- "text": "",
604
- "tags": []
605
- }
606
- },
607
- "saveConfig": {
608
- "complexType": {
609
- "signature": "(key: string, data: Object) => Promise<any>",
610
- "parameters": [{
611
- "tags": [],
612
- "text": ""
613
- }, {
614
- "tags": [],
615
- "text": ""
616
- }],
617
- "references": {
618
- "Promise": {
619
- "location": "global"
620
- },
621
- "Object": {
622
- "location": "global"
623
- }
893
+ "closePopUp": {
894
+ "complexType": {
895
+ "signature": "() => Promise<void>",
896
+ "parameters": [],
897
+ "references": {
898
+ "Promise": {
899
+ "location": "global"
900
+ }
901
+ },
902
+ "return": "Promise<void>"
624
903
  },
625
- "return": "Promise<any>"
904
+ "docs": {
905
+ "text": "Fecha o popup, liberando o conte\u00FAdo.",
906
+ "tags": []
907
+ }
626
908
  },
627
- "docs": {
628
- "text": "",
629
- "tags": []
630
- }
631
- },
632
- "getAttributeFromHTMLWrapper": {
633
- "complexType": {
634
- "signature": "(attribName: string) => Promise<string>",
635
- "parameters": [{
636
- "tags": [],
637
- "text": ""
638
- }],
639
- "references": {
640
- "Promise": {
641
- "location": "global"
642
- }
909
+ "temOpcional": {
910
+ "complexType": {
911
+ "signature": "(opcional: string) => Promise<boolean>",
912
+ "parameters": [{
913
+ "tags": [],
914
+ "text": ""
915
+ }],
916
+ "references": {
917
+ "Promise": {
918
+ "location": "global"
919
+ }
920
+ },
921
+ "return": "Promise<boolean>"
643
922
  },
644
- "return": "Promise<string>"
923
+ "docs": {
924
+ "text": "Verifica se a licen\u00E7a do cliente tem determinado opcional (produto)",
925
+ "tags": []
926
+ }
645
927
  },
646
- "docs": {
647
- "text": "",
648
- "tags": []
649
- }
650
- },
651
- "openApp": {
652
- "complexType": {
653
- "signature": "(resourceId: string, pkObject: Object) => Promise<void>",
654
- "parameters": [{
655
- "tags": [],
656
- "text": ""
657
- }, {
658
- "tags": [],
659
- "text": ""
660
- }],
661
- "references": {
662
- "Promise": {
663
- "location": "global"
664
- },
665
- "Object": {
666
- "location": "global"
667
- }
928
+ "getConfig": {
929
+ "complexType": {
930
+ "signature": "(key: string) => Promise<any>",
931
+ "parameters": [{
932
+ "tags": [],
933
+ "text": ""
934
+ }],
935
+ "references": {
936
+ "Promise": {
937
+ "location": "global"
938
+ }
939
+ },
940
+ "return": "Promise<any>"
668
941
  },
669
- "return": "Promise<void>"
942
+ "docs": {
943
+ "text": "Retorna a configura\u00E7\u00E3o de um recurso por service broker\nVeja tamb\u00E9m o m\u00E9todo \"loadConfig\"",
944
+ "tags": []
945
+ }
670
946
  },
671
- "docs": {
672
- "text": "",
673
- "tags": []
674
- }
675
- },
676
- "createDataunit": {
677
- "complexType": {
678
- "signature": "(entityName: string) => Promise<DataUnit>",
679
- "parameters": [{
680
- "tags": [],
681
- "text": ""
682
- }],
683
- "references": {
684
- "Promise": {
685
- "location": "global"
686
- },
687
- "DataUnit": {
688
- "location": "import",
689
- "path": "@sankhyalabs/core"
690
- }
947
+ "saveConfig": {
948
+ "complexType": {
949
+ "signature": "(key: string, data: Object) => Promise<any>",
950
+ "parameters": [{
951
+ "tags": [],
952
+ "text": ""
953
+ }, {
954
+ "tags": [],
955
+ "text": ""
956
+ }],
957
+ "references": {
958
+ "Promise": {
959
+ "location": "global"
960
+ },
961
+ "Object": {
962
+ "location": "global"
963
+ }
964
+ },
965
+ "return": "Promise<any>"
691
966
  },
692
- "return": "Promise<DataUnit>"
967
+ "docs": {
968
+ "text": "Salva a configura\u00E7\u00E3o de determinado recurso.",
969
+ "tags": []
970
+ }
693
971
  },
694
- "docs": {
695
- "text": "",
696
- "tags": []
697
- }
698
- },
699
- "getResourceID": {
700
- "complexType": {
701
- "signature": "() => Promise<string>",
702
- "parameters": [],
703
- "references": {
704
- "Promise": {
705
- "location": "global"
706
- }
972
+ "getAttributeFromHTMLWrapper": {
973
+ "complexType": {
974
+ "signature": "(attribName: string) => Promise<string>",
975
+ "parameters": [{
976
+ "tags": [],
977
+ "text": ""
978
+ }],
979
+ "references": {
980
+ "Promise": {
981
+ "location": "global"
982
+ }
983
+ },
984
+ "return": "Promise<string>"
707
985
  },
708
- "return": "Promise<string>"
986
+ "docs": {
987
+ "text": "Acessa informa\u00E7\u00F5es de contexto \"empurrados\" na abertura da tela",
988
+ "tags": []
989
+ }
709
990
  },
710
- "docs": {
711
- "text": "",
712
- "tags": []
713
- }
714
- },
715
- "alert": {
716
- "complexType": {
717
- "signature": "(title: string, message: string, icon?: string, options?: MessageOptions) => Promise<boolean>",
718
- "parameters": [{
719
- "tags": [],
720
- "text": ""
721
- }, {
722
- "tags": [],
723
- "text": ""
724
- }, {
725
- "tags": [],
726
- "text": ""
727
- }, {
728
- "tags": [],
729
- "text": ""
730
- }],
731
- "references": {
732
- "Promise": {
733
- "location": "global"
734
- },
735
- "MessageOptions": {
736
- "location": "import",
737
- "path": "@sankhyalabs/ezui/dist/collection/utils"
738
- }
991
+ "openApp": {
992
+ "complexType": {
993
+ "signature": "(resourceId: string, pkObject: Object) => Promise<void>",
994
+ "parameters": [{
995
+ "tags": [],
996
+ "text": ""
997
+ }, {
998
+ "tags": [],
999
+ "text": ""
1000
+ }],
1001
+ "references": {
1002
+ "Promise": {
1003
+ "location": "global"
1004
+ },
1005
+ "Object": {
1006
+ "location": "global"
1007
+ }
1008
+ },
1009
+ "return": "Promise<void>"
739
1010
  },
740
- "return": "Promise<boolean>"
1011
+ "docs": {
1012
+ "text": "Abre determinada tela, repassando pkObject",
1013
+ "tags": []
1014
+ }
741
1015
  },
742
- "docs": {
743
- "text": "",
744
- "tags": []
745
- }
746
- },
747
- "error": {
748
- "complexType": {
749
- "signature": "(title: string, message: string, icon?: string, options?: MessageOptions) => Promise<boolean>",
750
- "parameters": [{
751
- "tags": [],
752
- "text": ""
753
- }, {
754
- "tags": [],
755
- "text": ""
756
- }, {
757
- "tags": [],
758
- "text": ""
759
- }, {
760
- "tags": [],
761
- "text": ""
762
- }],
763
- "references": {
764
- "Promise": {
765
- "location": "global"
766
- },
767
- "MessageOptions": {
768
- "location": "import",
769
- "path": "@sankhyalabs/ezui/dist/collection/utils"
770
- }
1016
+ "createDataunit": {
1017
+ "complexType": {
1018
+ "signature": "(entityName: string, dataUnitName?: string) => Promise<DataUnit>",
1019
+ "parameters": [{
1020
+ "tags": [],
1021
+ "text": ""
1022
+ }, {
1023
+ "tags": [],
1024
+ "text": ""
1025
+ }],
1026
+ "references": {
1027
+ "Promise": {
1028
+ "location": "global"
1029
+ },
1030
+ "DataUnit": {
1031
+ "location": "import",
1032
+ "path": "@sankhyalabs/core"
1033
+ }
1034
+ },
1035
+ "return": "Promise<DataUnit>"
771
1036
  },
772
- "return": "Promise<boolean>"
1037
+ "docs": {
1038
+ "text": "Cria o DataUnit a partir do nome da entidade. \u00C9 poss\u00EDvel armazen\u00E1-lo no cache\npassando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit ser\u00E1 usado",
1039
+ "tags": []
1040
+ }
773
1041
  },
774
- "docs": {
775
- "text": "",
776
- "tags": []
777
- }
778
- },
779
- "confirm": {
780
- "complexType": {
781
- "signature": "(title: string, message: string, icon?: string, critical?: boolean, options?: MessageOptions) => Promise<boolean>",
782
- "parameters": [{
783
- "tags": [],
784
- "text": ""
785
- }, {
786
- "tags": [],
787
- "text": ""
788
- }, {
789
- "tags": [],
790
- "text": ""
791
- }, {
792
- "tags": [],
793
- "text": ""
794
- }, {
795
- "tags": [],
796
- "text": ""
797
- }],
798
- "references": {
799
- "Promise": {
800
- "location": "global"
801
- },
802
- "MessageOptions": {
803
- "location": "import",
804
- "path": "@sankhyalabs/ezui/dist/collection/utils"
805
- }
1042
+ "getDataUnit": {
1043
+ "complexType": {
1044
+ "signature": "(entityName: string, dataUnitName: string) => Promise<DataUnit>",
1045
+ "parameters": [{
1046
+ "tags": [],
1047
+ "text": ""
1048
+ }, {
1049
+ "tags": [],
1050
+ "text": ""
1051
+ }],
1052
+ "references": {
1053
+ "Promise": {
1054
+ "location": "global"
1055
+ },
1056
+ "DataUnit": {
1057
+ "location": "import",
1058
+ "path": "@sankhyalabs/core"
1059
+ }
1060
+ },
1061
+ "return": "Promise<DataUnit>"
806
1062
  },
807
- "return": "Promise<boolean>"
1063
+ "docs": {
1064
+ "text": "Obtem um DataUnit do cache ou cria um caso ainda n\u00E3o tenha sido criado.",
1065
+ "tags": []
1066
+ }
808
1067
  },
809
- "docs": {
810
- "text": "",
811
- "tags": []
812
- }
813
- },
814
- "info": {
815
- "complexType": {
816
- "signature": "(message: string, options?: MessageOptions) => Promise<void>",
817
- "parameters": [{
818
- "tags": [],
819
- "text": ""
820
- }, {
821
- "tags": [],
822
- "text": ""
823
- }],
824
- "references": {
825
- "Promise": {
826
- "location": "global"
827
- },
828
- "MessageOptions": {
829
- "location": "import",
830
- "path": "@sankhyalabs/ezui/dist/collection/utils"
831
- }
1068
+ "getResourceID": {
1069
+ "complexType": {
1070
+ "signature": "() => Promise<string>",
1071
+ "parameters": [],
1072
+ "references": {
1073
+ "Promise": {
1074
+ "location": "global"
1075
+ }
1076
+ },
1077
+ "return": "Promise<string>"
832
1078
  },
833
- "return": "Promise<void>"
1079
+ "docs": {
1080
+ "text": "Retorna o resourceID da tela em quest\u00E3o.",
1081
+ "tags": []
1082
+ }
834
1083
  },
835
- "docs": {
836
- "text": "",
837
- "tags": []
838
- }
839
- },
840
- "loadFormConfig": {
841
- "complexType": {
842
- "signature": "(name: string) => Promise<Array<FieldConfig>>",
843
- "parameters": [{
844
- "tags": [],
845
- "text": ""
846
- }],
847
- "references": {
848
- "Promise": {
849
- "location": "global"
850
- },
851
- "FieldConfig": {
852
- "location": "import",
853
- "path": "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form"
854
- },
855
- "Array": {
856
- "location": "global"
857
- }
1084
+ "getUserID": {
1085
+ "complexType": {
1086
+ "signature": "() => Promise<string>",
1087
+ "parameters": [],
1088
+ "references": {
1089
+ "Promise": {
1090
+ "location": "global"
1091
+ }
1092
+ },
1093
+ "return": "Promise<string>"
858
1094
  },
859
- "return": "Promise<FieldConfig[]>"
1095
+ "docs": {
1096
+ "text": "Retorna o resourceID da tela em quest\u00E3o.",
1097
+ "tags": []
1098
+ }
860
1099
  },
861
- "docs": {
862
- "text": "",
863
- "tags": []
864
- }
865
- },
866
- "loadGridConfig": {
867
- "complexType": {
868
- "signature": "() => Promise<IGridConfig>",
869
- "parameters": [],
870
- "references": {
871
- "Promise": {
872
- "location": "global"
873
- },
874
- "IGridConfig": {
875
- "location": "import",
876
- "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
877
- }
1100
+ "alert": {
1101
+ "complexType": {
1102
+ "signature": "(title: string, message: string, icon?: string, options?: MessageOptions) => Promise<boolean>",
1103
+ "parameters": [{
1104
+ "tags": [],
1105
+ "text": ""
1106
+ }, {
1107
+ "tags": [],
1108
+ "text": ""
1109
+ }, {
1110
+ "tags": [],
1111
+ "text": ""
1112
+ }, {
1113
+ "tags": [],
1114
+ "text": ""
1115
+ }],
1116
+ "references": {
1117
+ "Promise": {
1118
+ "location": "global"
1119
+ },
1120
+ "MessageOptions": {
1121
+ "location": "import",
1122
+ "path": "@sankhyalabs/ezui/dist/collection/utils"
1123
+ }
1124
+ },
1125
+ "return": "Promise<boolean>"
878
1126
  },
879
- "return": "Promise<IGridConfig>"
1127
+ "docs": {
1128
+ "text": "Mostra o di\u00E1logo de alerta de acordo com os par\u00E2metros passados.",
1129
+ "tags": []
1130
+ }
880
1131
  },
881
- "docs": {
882
- "text": "",
883
- "tags": []
884
- }
885
- },
886
- "saveGridConfig": {
887
- "complexType": {
888
- "signature": "(config: IGridConfig) => Promise<boolean>",
889
- "parameters": [{
890
- "tags": [],
891
- "text": ""
892
- }],
893
- "references": {
894
- "Promise": {
895
- "location": "global"
896
- },
897
- "IGridConfig": {
898
- "location": "import",
899
- "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
900
- }
1132
+ "error": {
1133
+ "complexType": {
1134
+ "signature": "(title: string, message: string, icon?: string, options?: MessageOptions) => Promise<boolean>",
1135
+ "parameters": [{
1136
+ "tags": [],
1137
+ "text": ""
1138
+ }, {
1139
+ "tags": [],
1140
+ "text": ""
1141
+ }, {
1142
+ "tags": [],
1143
+ "text": ""
1144
+ }, {
1145
+ "tags": [],
1146
+ "text": ""
1147
+ }],
1148
+ "references": {
1149
+ "Promise": {
1150
+ "location": "global"
1151
+ },
1152
+ "MessageOptions": {
1153
+ "location": "import",
1154
+ "path": "@sankhyalabs/ezui/dist/collection/utils"
1155
+ }
1156
+ },
1157
+ "return": "Promise<boolean>"
901
1158
  },
902
- "return": "Promise<boolean>"
1159
+ "docs": {
1160
+ "text": "Mostra o di\u00E1logo de erro de acordo com os par\u00E2metros passados.",
1161
+ "tags": []
1162
+ }
903
1163
  },
904
- "docs": {
905
- "text": "",
906
- "tags": []
907
- }
908
- },
909
- "executeSearch": {
910
- "complexType": {
911
- "signature": "(searchArgument: any, fieldName: string, dataUnit: DataUnit) => Promise<Array<Option> | Option>",
912
- "parameters": [{
913
- "tags": [],
914
- "text": ""
915
- }, {
916
- "tags": [],
917
- "text": ""
918
- }, {
919
- "tags": [],
920
- "text": ""
921
- }],
922
- "references": {
923
- "Promise": {
924
- "location": "global"
925
- },
926
- "Option": {
927
- "location": "import",
928
- "path": "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box"
929
- },
930
- "DataUnit": {
931
- "location": "import",
932
- "path": "@sankhyalabs/core"
933
- },
934
- "Array": {
935
- "location": "global"
936
- },
937
- "SearchCriteria": {
938
- "location": "import",
939
- "path": "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher"
940
- },
941
- "HTMLSnkPesquisaElement": {
942
- "location": "global"
943
- }
1164
+ "success": {
1165
+ "complexType": {
1166
+ "signature": "(title: string, message: string, icon?: string, options?: MessageOptions) => Promise<boolean>",
1167
+ "parameters": [{
1168
+ "tags": [],
1169
+ "text": ""
1170
+ }, {
1171
+ "tags": [],
1172
+ "text": ""
1173
+ }, {
1174
+ "tags": [],
1175
+ "text": ""
1176
+ }, {
1177
+ "tags": [],
1178
+ "text": ""
1179
+ }],
1180
+ "references": {
1181
+ "Promise": {
1182
+ "location": "global"
1183
+ },
1184
+ "MessageOptions": {
1185
+ "location": "import",
1186
+ "path": "@sankhyalabs/ezui/dist/collection/utils"
1187
+ }
1188
+ },
1189
+ "return": "Promise<boolean>"
944
1190
  },
945
- "return": "Promise<Option | Option[]>"
1191
+ "docs": {
1192
+ "text": "Mostra o di\u00E1logo de sucesso de acordo com os par\u00E2metros passados.",
1193
+ "tags": []
1194
+ }
946
1195
  },
947
- "docs": {
948
- "text": "",
949
- "tags": []
950
- }
951
- },
952
- "isDebugMode": {
953
- "complexType": {
954
- "signature": "() => Promise<boolean>",
955
- "parameters": [],
956
- "references": {
957
- "Promise": {
958
- "location": "global"
959
- }
1196
+ "message": {
1197
+ "complexType": {
1198
+ "signature": "(title: string, message: string, icon?: string, options?: MessageOptions) => Promise<boolean>",
1199
+ "parameters": [{
1200
+ "tags": [],
1201
+ "text": ""
1202
+ }, {
1203
+ "tags": [],
1204
+ "text": ""
1205
+ }, {
1206
+ "tags": [],
1207
+ "text": ""
1208
+ }, {
1209
+ "tags": [],
1210
+ "text": ""
1211
+ }],
1212
+ "references": {
1213
+ "Promise": {
1214
+ "location": "global"
1215
+ },
1216
+ "MessageOptions": {
1217
+ "location": "import",
1218
+ "path": "@sankhyalabs/ezui/dist/collection/utils"
1219
+ }
1220
+ },
1221
+ "return": "Promise<boolean>"
1222
+ },
1223
+ "docs": {
1224
+ "text": "Exibe um di\u00E1logo de mensagem comum",
1225
+ "tags": []
1226
+ }
1227
+ },
1228
+ "confirm": {
1229
+ "complexType": {
1230
+ "signature": "(title: string, message: string, icon?: string, dialogType?: DialogType, options?: MessageOptions) => Promise<boolean>",
1231
+ "parameters": [{
1232
+ "tags": [],
1233
+ "text": ""
1234
+ }, {
1235
+ "tags": [],
1236
+ "text": ""
1237
+ }, {
1238
+ "tags": [],
1239
+ "text": ""
1240
+ }, {
1241
+ "tags": [],
1242
+ "text": ""
1243
+ }, {
1244
+ "tags": [],
1245
+ "text": ""
1246
+ }],
1247
+ "references": {
1248
+ "Promise": {
1249
+ "location": "global"
1250
+ },
1251
+ "DialogType": {
1252
+ "location": "import",
1253
+ "path": "@sankhyalabs/ezui/dist/collection/utils"
1254
+ },
1255
+ "MessageOptions": {
1256
+ "location": "import",
1257
+ "path": "@sankhyalabs/ezui/dist/collection/utils"
1258
+ }
1259
+ },
1260
+ "return": "Promise<boolean>"
960
1261
  },
961
- "return": "Promise<boolean>"
1262
+ "docs": {
1263
+ "text": "Exibe um di\u00E1logo de confirma\u00E7\u00E3o",
1264
+ "tags": []
1265
+ }
962
1266
  },
963
- "docs": {
964
- "text": "",
965
- "tags": []
1267
+ "info": {
1268
+ "complexType": {
1269
+ "signature": "(message: string, options?: MessageOptions) => Promise<void>",
1270
+ "parameters": [{
1271
+ "tags": [],
1272
+ "text": ""
1273
+ }, {
1274
+ "tags": [],
1275
+ "text": ""
1276
+ }],
1277
+ "references": {
1278
+ "Promise": {
1279
+ "location": "global"
1280
+ },
1281
+ "MessageOptions": {
1282
+ "location": "import",
1283
+ "path": "@sankhyalabs/ezui/dist/collection/utils"
1284
+ }
1285
+ },
1286
+ "return": "Promise<void>"
1287
+ },
1288
+ "docs": {
1289
+ "text": "Mostra uma informa\u00E7\u00E3o ef\u00EAmera (de segundo plano).",
1290
+ "tags": []
1291
+ }
1292
+ },
1293
+ "loadFormConfig": {
1294
+ "complexType": {
1295
+ "signature": "(name: string) => Promise<IFormConfig>",
1296
+ "parameters": [{
1297
+ "tags": [],
1298
+ "text": ""
1299
+ }],
1300
+ "references": {
1301
+ "Promise": {
1302
+ "location": "global"
1303
+ },
1304
+ "IFormConfig": {
1305
+ "location": "import",
1306
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form"
1307
+ }
1308
+ },
1309
+ "return": "Promise<IFormConfig>"
1310
+ },
1311
+ "docs": {
1312
+ "text": "Busca a configura\u00E7\u00E3o de formul\u00E1rio.",
1313
+ "tags": []
1314
+ }
1315
+ },
1316
+ "loadGridConfig": {
1317
+ "complexType": {
1318
+ "signature": "(name: string) => Promise<IGridConfig>",
1319
+ "parameters": [{
1320
+ "tags": [],
1321
+ "text": ""
1322
+ }],
1323
+ "references": {
1324
+ "Promise": {
1325
+ "location": "global"
1326
+ },
1327
+ "IGridConfig": {
1328
+ "location": "import",
1329
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
1330
+ }
1331
+ },
1332
+ "return": "Promise<IGridConfig>"
1333
+ },
1334
+ "docs": {
1335
+ "text": "Busca a configura\u00E7\u00E3o de grade.",
1336
+ "tags": []
1337
+ }
1338
+ },
1339
+ "fetchUserAvailableConfigs": {
1340
+ "complexType": {
1341
+ "signature": "(name: string) => Promise<Array<IUserConfig>>",
1342
+ "parameters": [{
1343
+ "tags": [],
1344
+ "text": ""
1345
+ }],
1346
+ "references": {
1347
+ "Promise": {
1348
+ "location": "global"
1349
+ },
1350
+ "IUserConfig": {
1351
+ "location": "import",
1352
+ "path": "../../lib/http/data-fetcher/fetchers/form-config-fetcher"
1353
+ },
1354
+ "Array": {
1355
+ "location": "global"
1356
+ }
1357
+ },
1358
+ "return": "Promise<IUserConfig[]>"
1359
+ },
1360
+ "docs": {
1361
+ "text": "Busca lista de configura\u00E7\u00F5es de formul\u00E1rio do usu\u00E1rio.",
1362
+ "tags": []
1363
+ }
1364
+ },
1365
+ "fetchLegacyConfig": {
1366
+ "complexType": {
1367
+ "signature": "(name: string) => Promise<IFormConfig>",
1368
+ "parameters": [{
1369
+ "tags": [],
1370
+ "text": ""
1371
+ }],
1372
+ "references": {
1373
+ "Promise": {
1374
+ "location": "global"
1375
+ },
1376
+ "IFormConfig": {
1377
+ "location": "import",
1378
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form"
1379
+ }
1380
+ },
1381
+ "return": "Promise<IFormConfig>"
1382
+ },
1383
+ "docs": {
1384
+ "text": "Busca a configura\u00E7\u00E3o de formul\u00E1rio do usu\u00E1rio.",
1385
+ "tags": []
1386
+ }
1387
+ },
1388
+ "fetchDefaultConfig": {
1389
+ "complexType": {
1390
+ "signature": "(name: string) => Promise<IFormConfig>",
1391
+ "parameters": [{
1392
+ "tags": [],
1393
+ "text": ""
1394
+ }],
1395
+ "references": {
1396
+ "Promise": {
1397
+ "location": "global"
1398
+ },
1399
+ "IFormConfig": {
1400
+ "location": "import",
1401
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form"
1402
+ }
1403
+ },
1404
+ "return": "Promise<IFormConfig>"
1405
+ },
1406
+ "docs": {
1407
+ "text": "Busca a configura\u00E7\u00E3o padr\u00E3o de formul\u00E1rio.",
1408
+ "tags": []
1409
+ }
1410
+ },
1411
+ "loadTotals": {
1412
+ "complexType": {
1413
+ "signature": "(name: string, resourceID: string, filters: Array<Filter>) => Promise<Map<string, number>>",
1414
+ "parameters": [{
1415
+ "tags": [],
1416
+ "text": ""
1417
+ }, {
1418
+ "tags": [],
1419
+ "text": ""
1420
+ }, {
1421
+ "tags": [],
1422
+ "text": ""
1423
+ }],
1424
+ "references": {
1425
+ "Promise": {
1426
+ "location": "global"
1427
+ },
1428
+ "Map": {
1429
+ "location": "global"
1430
+ },
1431
+ "Array": {
1432
+ "location": "global"
1433
+ },
1434
+ "Filter": {
1435
+ "location": "import",
1436
+ "path": "@sankhyalabs/core"
1437
+ }
1438
+ },
1439
+ "return": "Promise<Map<string, number>>"
1440
+ },
1441
+ "docs": {
1442
+ "text": "Busca os totalizadores da grade.",
1443
+ "tags": []
1444
+ }
1445
+ },
1446
+ "saveGridConfig": {
1447
+ "complexType": {
1448
+ "signature": "(config: IGridConfig) => Promise<boolean>",
1449
+ "parameters": [{
1450
+ "tags": [],
1451
+ "text": ""
1452
+ }],
1453
+ "references": {
1454
+ "Promise": {
1455
+ "location": "global"
1456
+ },
1457
+ "IGridConfig": {
1458
+ "location": "import",
1459
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
1460
+ }
1461
+ },
1462
+ "return": "Promise<boolean>"
1463
+ },
1464
+ "docs": {
1465
+ "text": "Salva a configura\u00E7\u00E3o de grade.",
1466
+ "tags": []
1467
+ }
1468
+ },
1469
+ "getFilterBarConfig": {
1470
+ "complexType": {
1471
+ "signature": "(name: string) => Promise<Array<SnkFilterItemConfig>>",
1472
+ "parameters": [{
1473
+ "tags": [],
1474
+ "text": ""
1475
+ }],
1476
+ "references": {
1477
+ "Promise": {
1478
+ "location": "global"
1479
+ },
1480
+ "SnkFilterItemConfig": {
1481
+ "location": "import",
1482
+ "path": "../snk-filter-bar/filter-item/snk-filter-item"
1483
+ },
1484
+ "Array": {
1485
+ "location": "global"
1486
+ }
1487
+ },
1488
+ "return": "Promise<SnkFilterItemConfig[]>"
1489
+ },
1490
+ "docs": {
1491
+ "text": "Obt\u00E9m as configura\u00E7\u00F5es da barra de filtros",
1492
+ "tags": []
1493
+ }
1494
+ },
1495
+ "saveFilterBarConfig": {
1496
+ "complexType": {
1497
+ "signature": "(config: Array<SnkFilterItemConfig>, name: string) => Promise<boolean>",
1498
+ "parameters": [{
1499
+ "tags": [],
1500
+ "text": ""
1501
+ }, {
1502
+ "tags": [],
1503
+ "text": ""
1504
+ }],
1505
+ "references": {
1506
+ "Promise": {
1507
+ "location": "global"
1508
+ },
1509
+ "Array": {
1510
+ "location": "global"
1511
+ },
1512
+ "SnkFilterItemConfig": {
1513
+ "location": "import",
1514
+ "path": "../snk-filter-bar/filter-item/snk-filter-item"
1515
+ }
1516
+ },
1517
+ "return": "Promise<boolean>"
1518
+ },
1519
+ "docs": {
1520
+ "text": "Salva as configura\u00E7\u00F5es da barra de filtros",
1521
+ "tags": []
1522
+ }
1523
+ },
1524
+ "saveFormConfig": {
1525
+ "complexType": {
1526
+ "signature": "(config: IFormConfig, name: string) => Promise<boolean>",
1527
+ "parameters": [{
1528
+ "tags": [],
1529
+ "text": ""
1530
+ }, {
1531
+ "tags": [],
1532
+ "text": ""
1533
+ }],
1534
+ "references": {
1535
+ "Promise": {
1536
+ "location": "global"
1537
+ },
1538
+ "IFormConfig": {
1539
+ "location": "import",
1540
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form"
1541
+ }
1542
+ },
1543
+ "return": "Promise<boolean>"
1544
+ },
1545
+ "docs": {
1546
+ "text": "Salva a configura\u00E7\u00E3o de formul\u00E1rio.",
1547
+ "tags": []
1548
+ }
1549
+ },
1550
+ "executeSearch": {
1551
+ "complexType": {
1552
+ "signature": "(searchArgument: ISearchArgument, fieldName: string, dataUnit: DataUnit) => Promise<Array<IOption> | IOption>",
1553
+ "parameters": [{
1554
+ "tags": [],
1555
+ "text": ""
1556
+ }, {
1557
+ "tags": [],
1558
+ "text": ""
1559
+ }, {
1560
+ "tags": [],
1561
+ "text": ""
1562
+ }],
1563
+ "references": {
1564
+ "Promise": {
1565
+ "location": "global"
1566
+ },
1567
+ "IOption": {
1568
+ "location": "import",
1569
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box"
1570
+ },
1571
+ "ISearchArgument": {
1572
+ "location": "import",
1573
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box"
1574
+ },
1575
+ "DataUnit": {
1576
+ "location": "import",
1577
+ "path": "@sankhyalabs/core"
1578
+ },
1579
+ "Array": {
1580
+ "location": "global"
1581
+ },
1582
+ "SearchCriteria": {
1583
+ "location": "import",
1584
+ "path": "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher"
1585
+ }
1586
+ },
1587
+ "return": "Promise<IOption | IOption[]>"
1588
+ },
1589
+ "docs": {
1590
+ "text": "",
1591
+ "tags": []
1592
+ }
1593
+ },
1594
+ "executePreparedSearch": {
1595
+ "complexType": {
1596
+ "signature": "(mode: string, argument: string, options: any) => Promise<Array<IOption> | IOption>",
1597
+ "parameters": [{
1598
+ "tags": [],
1599
+ "text": ""
1600
+ }, {
1601
+ "tags": [],
1602
+ "text": ""
1603
+ }, {
1604
+ "tags": [],
1605
+ "text": ""
1606
+ }],
1607
+ "references": {
1608
+ "Promise": {
1609
+ "location": "global"
1610
+ },
1611
+ "IOption": {
1612
+ "location": "import",
1613
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box"
1614
+ },
1615
+ "Array": {
1616
+ "location": "global"
1617
+ },
1618
+ "HTMLSnkPesquisaElement": {
1619
+ "location": "global"
1620
+ }
1621
+ },
1622
+ "return": "Promise<IOption | IOption[]>"
1623
+ },
1624
+ "docs": {
1625
+ "text": "",
1626
+ "tags": []
1627
+ }
1628
+ },
1629
+ "isDebugMode": {
1630
+ "complexType": {
1631
+ "signature": "() => Promise<boolean>",
1632
+ "parameters": [],
1633
+ "references": {
1634
+ "Promise": {
1635
+ "location": "global"
1636
+ }
1637
+ },
1638
+ "return": "Promise<boolean>"
1639
+ },
1640
+ "docs": {
1641
+ "text": "",
1642
+ "tags": []
1643
+ }
966
1644
  }
967
- }
968
- }; }
1645
+ };
1646
+ }
969
1647
  }
970
1648
  class RequestListenerLoadingBar {
971
1649
  constructor() {
972
1650
  this._debounceTime = 1000;
1651
+ this._ignoredNameTypes = ["totals"];
973
1652
  this._countRequest = 0;
974
1653
  }
975
- onRequestStart() {
976
- this.loadingBar.show();
1654
+ onRequestStart(param) {
1655
+ if (this.isIgnoreLoadingOnRequest(param)) {
1656
+ return;
1657
+ }
977
1658
  this._countRequest++;
1659
+ this.loadingBar.show();
978
1660
  if (this._timerLoading) {
979
1661
  clearTimeout(this._timerLoading);
980
1662
  }
981
1663
  }
982
1664
  ;
983
- onRequestEnd() {
1665
+ onRequestEnd(param) {
1666
+ if (this.isIgnoreLoadingOnRequest(param)) {
1667
+ return;
1668
+ }
984
1669
  this._countRequest--;
985
1670
  this._timerLoading = setTimeout(() => {
986
1671
  if (this._countRequest <= 0) {
@@ -989,4 +1674,23 @@ class RequestListenerLoadingBar {
989
1674
  }, this._debounceTime);
990
1675
  }
991
1676
  ;
1677
+ isIgnoreLoadingOnRequest(param) {
1678
+ var _a;
1679
+ if (((_a = param === null || param === void 0 ? void 0 : param.requestBody) === null || _a === void 0 ? void 0 : _a.length) == 1) {
1680
+ const { name } = param.requestBody[0].variables;
1681
+ if (name) {
1682
+ const nameParts = name.split(":");
1683
+ const nameType = nameParts[0];
1684
+ return this._ignoredNameTypes.indexOf(nameType) >= 0;
1685
+ }
1686
+ }
1687
+ return false;
1688
+ }
1689
+ ;
1690
+ }
1691
+ class PendingPromise {
1692
+ constructor(resolve, reject) {
1693
+ this.resolve = resolve;
1694
+ this.reject = reject;
1695
+ }
992
1696
  }