@sankhyalabs/sankhyablocks 8.15.0-dev.2 → 8.15.0-dev.21

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 (231) hide show
  1. package/dist/cjs/{ConfigStorage-0d507a8f.js → ConfigStorage-302bbbd4.js} +25 -15
  2. package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
  3. package/dist/cjs/{SnkFormConfigManager-467907f6.js → SnkFormConfigManager-71c4768e.js} +1 -1
  4. package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
  5. package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{dataunit-fetcher-bdaf9482.js → pesquisa-fetcher-c790ffb7.js} +254 -34
  8. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  9. package/dist/cjs/snk-actions-button_2.cjs.entry.js +23 -5
  10. package/dist/cjs/snk-application.cjs.entry.js +95 -6
  11. package/dist/cjs/snk-attach.cjs.entry.js +395 -57
  12. package/dist/cjs/snk-crud.cjs.entry.js +10 -8
  13. package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
  14. package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
  15. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  16. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -9
  17. package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
  18. package/dist/cjs/snk-filter-bar.cjs.entry.js +57 -7
  19. package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
  20. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -2
  21. package/dist/cjs/snk-filter-modal.cjs.entry.js +16 -1
  22. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  23. package/dist/cjs/snk-form.cjs.entry.js +2 -2
  24. package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-grid.cjs.entry.js +42 -18
  26. package/dist/cjs/{snk-guides-viewer-9342bca1.js → snk-guides-viewer-32c1d35d.js} +9 -10
  27. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -8
  28. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  29. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  30. package/dist/cjs/snk-simple-crud.cjs.entry.js +19 -8
  31. package/dist/cjs/snk-taskbar.cjs.entry.js +53 -5
  32. package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-01b85b99.js} +1 -1
  33. package/dist/collection/collection-manifest.json +1 -1
  34. package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
  35. package/dist/collection/components/snk-application/snk-application.js +111 -5
  36. package/dist/collection/components/snk-attach/snk-attach.js +194 -38
  37. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  38. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  39. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  40. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  41. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  42. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
  43. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  44. package/dist/collection/components/snk-crud/snk-crud.js +24 -4
  45. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
  46. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +4 -4
  47. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  48. package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
  49. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  50. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -0
  51. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +84 -2
  52. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +0 -1
  53. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +101 -5
  54. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
  55. package/dist/collection/components/snk-grid/snk-grid.js +57 -16
  56. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
  57. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  58. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +53 -1
  59. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +26 -1
  60. package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
  61. package/dist/collection/components/snk-taskbar/snk-taskbar.js +89 -4
  62. package/dist/collection/lib/@types/index.js +1 -0
  63. package/dist/collection/lib/configs/ConfigStorage.js +24 -14
  64. package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
  65. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  66. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  67. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  68. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  69. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  70. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  71. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  72. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
  73. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +55 -31
  74. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +1 -1
  75. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
  76. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +10 -4
  77. package/dist/collection/lib/index.js +1 -1
  78. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  79. package/dist/components/ConfigStorage.js +25 -15
  80. package/dist/components/SnkMessageBuilder.js +13 -0
  81. package/dist/components/dataunit-fetcher.js +96 -38
  82. package/dist/components/index2.js +1 -0
  83. package/dist/components/snk-actions-button2.js +1 -0
  84. package/dist/components/snk-application2.js +94 -3
  85. package/dist/components/snk-attach2.js +400 -56
  86. package/dist/components/snk-crud.js +7 -3
  87. package/dist/components/snk-data-exporter2.js +1 -1
  88. package/dist/components/snk-detail-view2.js +4 -4
  89. package/dist/components/snk-entity-list.js +5 -3
  90. package/dist/components/snk-filter-bar2.js +59 -7
  91. package/dist/components/snk-filter-item2.js +3 -0
  92. package/dist/components/snk-filter-modal-item2.js +0 -1
  93. package/dist/components/snk-filter-modal.js +21 -3
  94. package/dist/components/snk-filter-multi-select.js +2 -1
  95. package/dist/components/snk-grid2.js +40 -15
  96. package/dist/components/snk-personalized-filter2.js +1 -1
  97. package/dist/components/snk-pesquisa2.js +1 -1
  98. package/dist/components/snk-simple-crud2.js +15 -1
  99. package/dist/components/snk-taskbar2.js +55 -4
  100. package/dist/components/taskbar-actions-button2.js +21 -2
  101. package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-4151acc8.js} +25 -15
  102. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  103. package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-5c7d3771.js} +1 -1
  104. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
  105. package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
  106. package/dist/esm/loader.js +1 -1
  107. package/dist/esm/{dataunit-fetcher-cc1650eb.js → pesquisa-fetcher-4000d0b8.js} +255 -36
  108. package/dist/esm/sankhyablocks.js +1 -1
  109. package/dist/esm/snk-actions-button_2.entry.js +23 -5
  110. package/dist/esm/snk-application.entry.js +95 -6
  111. package/dist/esm/snk-attach.entry.js +396 -58
  112. package/dist/esm/snk-crud.entry.js +10 -8
  113. package/dist/esm/snk-data-exporter.entry.js +4 -4
  114. package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
  115. package/dist/esm/snk-data-unit.entry.js +2 -2
  116. package/dist/esm/snk-detail-view.entry.js +8 -9
  117. package/dist/esm/snk-entity-list.entry.js +5 -3
  118. package/dist/esm/snk-filter-bar.entry.js +57 -7
  119. package/dist/esm/snk-filter-item.entry.js +3 -0
  120. package/dist/esm/snk-filter-modal-item.entry.js +1 -2
  121. package/dist/esm/snk-filter-modal.entry.js +16 -1
  122. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  123. package/dist/esm/snk-form.entry.js +2 -2
  124. package/dist/esm/snk-grid-config.entry.js +1 -1
  125. package/dist/esm/snk-grid.entry.js +42 -18
  126. package/dist/esm/{snk-guides-viewer-9ce9588c.js → snk-guides-viewer-8adacfd4.js} +9 -10
  127. package/dist/esm/snk-guides-viewer.entry.js +7 -8
  128. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  129. package/dist/esm/snk-pesquisa.entry.js +1 -1
  130. package/dist/esm/snk-simple-crud.entry.js +17 -6
  131. package/dist/esm/snk-taskbar.entry.js +54 -6
  132. package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-d4d0b424.js} +1 -1
  133. package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
  134. package/dist/sankhyablocks/p-0574c231.entry.js +1 -0
  135. package/dist/sankhyablocks/p-0eb1ff03.js +65 -0
  136. package/dist/sankhyablocks/p-11bbb65e.entry.js +1 -0
  137. package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-1d75d9f9.entry.js} +1 -1
  138. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  139. package/dist/sankhyablocks/p-2419f19f.js +1 -0
  140. package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
  141. package/dist/sankhyablocks/p-374d03f6.js +1 -0
  142. package/dist/sankhyablocks/p-38289a55.js +1 -0
  143. package/dist/sankhyablocks/p-3838d2ff.entry.js +1 -0
  144. package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-40915359.entry.js} +1 -1
  145. package/dist/sankhyablocks/p-45d82274.entry.js +1 -0
  146. package/dist/sankhyablocks/{p-2028633c.js → p-573a07c5.js} +1 -1
  147. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  148. package/dist/sankhyablocks/{p-aaa1438e.entry.js → p-761ed32f.entry.js} +1 -1
  149. package/dist/sankhyablocks/p-79b4b271.entry.js +1 -0
  150. package/dist/sankhyablocks/p-7f3c7b09.entry.js +1 -0
  151. package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
  152. package/dist/sankhyablocks/p-96ef14f9.entry.js +1 -0
  153. package/dist/sankhyablocks/p-aa95fb2c.js +56 -0
  154. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  155. package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
  156. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  157. package/dist/sankhyablocks/p-db4edd06.entry.js +11 -0
  158. package/dist/sankhyablocks/p-df2b84c4.entry.js +1 -0
  159. package/dist/sankhyablocks/p-e0b23084.entry.js +1 -0
  160. package/dist/sankhyablocks/p-e0fd9555.entry.js +1 -0
  161. package/dist/sankhyablocks/p-ed2dce4b.entry.js +1 -0
  162. package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
  163. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  164. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  165. package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
  166. package/dist/types/components/snk-application/snk-application.d.ts +12 -2
  167. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  168. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  169. package/dist/types/components/snk-attach/snk-attach.d.ts +28 -6
  170. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  171. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
  172. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  173. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  174. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  175. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
  176. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  177. package/dist/types/components/snk-crud/snk-crud.d.ts +5 -0
  178. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
  179. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +19 -1
  180. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +18 -0
  181. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
  182. package/dist/types/components/snk-grid/snk-grid.d.ts +6 -0
  183. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -1
  184. package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +2 -0
  185. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +20 -1
  186. package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
  187. package/dist/types/components.d.ts +140 -13
  188. package/dist/types/lib/@types/index.d.ts +2 -1
  189. package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
  190. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  191. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  192. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  193. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  194. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  195. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  196. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
  197. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +4 -1
  198. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  199. package/dist/types/lib/index.d.ts +1 -1
  200. package/package.json +15 -6
  201. package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
  202. package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
  203. package/dist/sankhyablocks/p-145c4434.js +0 -1
  204. package/dist/sankhyablocks/p-17dda7a2.entry.js +0 -1
  205. package/dist/sankhyablocks/p-19f51c6b.entry.js +0 -11
  206. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  207. package/dist/sankhyablocks/p-311c6173.entry.js +0 -1
  208. package/dist/sankhyablocks/p-4396d1a6.js +0 -56
  209. package/dist/sankhyablocks/p-44e894af.entry.js +0 -1
  210. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  211. package/dist/sankhyablocks/p-4b0ea83f.entry.js +0 -1
  212. package/dist/sankhyablocks/p-5534e08c.js +0 -1
  213. package/dist/sankhyablocks/p-78777ae0.entry.js +0 -1
  214. package/dist/sankhyablocks/p-953346b9.entry.js +0 -1
  215. package/dist/sankhyablocks/p-9c3229fc.entry.js +0 -1
  216. package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
  217. package/dist/sankhyablocks/p-a702a1a2.js +0 -60
  218. package/dist/sankhyablocks/p-c259545b.entry.js +0 -1
  219. package/dist/sankhyablocks/p-d1677df0.entry.js +0 -1
  220. package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
  221. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  222. package/dist/sankhyablocks/p-dd6a8377.js +0 -1
  223. package/dist/sankhyablocks/p-e138e7d4.entry.js +0 -1
  224. package/dist/sankhyablocks/p-e1b29d4c.entry.js +0 -1
  225. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  226. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  227. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  228. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  229. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  230. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  231. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -1,12 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
2
- import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
2
+ import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { C as ConfigStorage } from './ConfigStorage-379a9cba.js';
4
+ import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
5
5
  import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-aa159c5a.js';
6
6
  import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-c05dc474.js';
7
- import { D as DataUnitFetcher } from './dataunit-fetcher-cc1650eb.js';
8
- import { P as PesquisaFetcher } from './pesquisa-fetcher-dd3ca0a5.js';
9
- import { S as SnkMessageBuilder } from './SnkMessageBuilder-ca843d1b.js';
7
+ import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-4000d0b8.js';
8
+ import { S as SnkMessageBuilder } from './SnkMessageBuilder-0fb796b9.js';
10
9
  import './form-config-fetcher-36219cd3.js';
11
10
  import './filter-item-type.enum-d45e026f.js';
12
11
  import './PrintUtils-3e4ff0f5.js';
@@ -27,7 +26,22 @@ const _0x5b7870=_0x2202;(function(_0x42e134,_0x5d9727){const _0x185c97=_0x2202,_
27
26
 
28
27
  class ParametersFetcher {
29
28
  constructor() {
29
+ this._embeddedParams = new Map();
30
30
  this.templateByQuery = new Map();
31
+ try {
32
+ if (window["MGE_PARAMS"] != undefined) {
33
+ const source = atob(window['MGE_PARAMS']);
34
+ const params = source.split('__;__');
35
+ params.forEach(param => {
36
+ const [key, value] = param.split("__=__");
37
+ this._embeddedParams.set(key, value);
38
+ });
39
+ }
40
+ }
41
+ catch (error) {
42
+ console.error("Problemas ao obter parâmetros embarcados");
43
+ console.error(error);
44
+ }
31
45
  this.buldTemplates();
32
46
  }
33
47
  buldTemplates() {
@@ -39,6 +53,9 @@ class ParametersFetcher {
39
53
  }`);
40
54
  }
41
55
  async getParam(name) {
56
+ if (this._embeddedParams.has(name)) {
57
+ return Promise.resolve(this._embeddedParams.get(name));
58
+ }
42
59
  const completPath = `param://application?params=${name}`;
43
60
  return DataFetcher.get().callGraphQL({
44
61
  values: { name: completPath },
@@ -76,6 +93,9 @@ class ParametersFetcher {
76
93
  if (Array.isArray(obj) && obj.length > 0) {
77
94
  obj = obj[0];
78
95
  }
96
+ if (typeof obj === "string") {
97
+ return obj;
98
+ }
79
99
  if (StringUtils.isEmpty(obj.resource))
80
100
  return "";
81
101
  try {
@@ -825,11 +845,53 @@ const SnkApplication = class {
825
845
  return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
826
846
  }
827
847
  }
848
+ filterInvalidFields(resp, item, mdByName) {
849
+ let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
850
+ let accept = !StringUtils.isEmpty(item[field.fieldName]) &&
851
+ field.visible !== false &&
852
+ field.type !== 'B' &&
853
+ resp.pkField !== field.fieldName &&
854
+ resp.descriptionField !== field.fieldName &&
855
+ (field.isPrimaryKey || !field.isLinkField) &&
856
+ !(field.type === 'S' && field.presentationType === 'H');
857
+ if (accept) {
858
+ mdByName[field.fieldName] = field;
859
+ }
860
+ //Condição que trata o problema de trazer imagem no entityCard na pesquisa de registros
861
+ if (typeof item[field.fieldName] === 'string' && (item[field.fieldName].indexOf('<img') > -1 || item[field.fieldName].indexOf('<svg') > -1)) {
862
+ return false;
863
+ }
864
+ return accept;
865
+ });
866
+ return fieldsMetadata;
867
+ }
868
+ filterMathFields(matchFields, fields, qtyFields, mdByName) {
869
+ if (matchFields && Array.isArray(matchFields)) {
870
+ matchFields.forEach((matchField) => {
871
+ let fieldMD = ArrayUtils.removeReference(fields, mdByName[matchField]);
872
+ if (fieldMD) {
873
+ fields.unshift(fieldMD);
874
+ }
875
+ });
876
+ }
877
+ fields = fields.slice(0, qtyFields);
878
+ return fields;
879
+ }
880
+ builOptionItem(argument, item, fields, descriptionField, pkField) {
881
+ var _a;
882
+ let exibitionItem = {
883
+ value: StringUtils.highlightValue(argument, item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
884
+ label: descriptionField ? StringUtils.highlightValue(argument, item['__matchFields'], item[descriptionField], fields, true) : "",
885
+ details: SearchUtils.buildDetails(argument, fields, item)
886
+ };
887
+ return exibitionItem;
888
+ }
828
889
  /**
829
890
  * Obtém as opções em componentes de pesquisa
830
891
  * Ex.: snk-config-options
831
892
  */
832
893
  async executePreparedSearch(mode, argument, options) {
894
+ const mdByName = {};
833
895
  const { entity, entityDescription, criteria, searchOptions } = options;
834
896
  if (mode === "ADVANCED") {
835
897
  return new Promise(accept => {
@@ -847,7 +909,25 @@ const SnkApplication = class {
847
909
  });
848
910
  }
849
911
  else {
850
- return this.pesquisaFetcher.loadSearchOptions(entity, argument, criteria, searchOptions);
912
+ return new Promise((resolve, reject) => {
913
+ this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
914
+ .then(result => {
915
+ result = ObjectUtils.stringToObject(result.json.$);
916
+ let descriptionField = result.descriptionField;
917
+ let pkField = result.pkField;
918
+ const list = [];
919
+ result.data.forEach((item) => {
920
+ let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
921
+ let qtyFields = 6;
922
+ let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
923
+ list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
924
+ });
925
+ resolve(list);
926
+ })
927
+ .catch(error => {
928
+ reject(error);
929
+ });
930
+ });
851
931
  }
852
932
  }
853
933
  /**
@@ -940,6 +1020,15 @@ const SnkApplication = class {
940
1020
  this._waitingAppReady.push(() => resolve(this));
941
1021
  });
942
1022
  }
1023
+ /**
1024
+ * Atribui valor para parâmetros de contexto no componente de pesquisa.
1025
+ *
1026
+ * @param name - Nome do parâmetro
1027
+ * @param value - String conversível de acordo com o tipo do parâmetro
1028
+ */
1029
+ async setSearchFilterContext(name, value) {
1030
+ ApplicationContext.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${name})__`, value);
1031
+ }
943
1032
  clearContent(container) {
944
1033
  if (container) {
945
1034
  Array.from(container.children).forEach(child => {