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

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 (215) 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-e4a7c4c3.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 +74 -6
  11. package/dist/cjs/snk-attach.cjs.entry.js +395 -57
  12. package/dist/cjs/snk-crud.cjs.entry.js +5 -6
  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-filter-bar.cjs.entry.js +40 -5
  18. package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
  19. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -2
  20. package/dist/cjs/snk-filter-modal.cjs.entry.js +16 -1
  21. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  22. package/dist/cjs/snk-form.cjs.entry.js +2 -2
  23. package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
  24. package/dist/cjs/snk-grid.cjs.entry.js +41 -18
  25. package/dist/cjs/{snk-guides-viewer-9342bca1.js → snk-guides-viewer-d32c096f.js} +6 -7
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -8
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  28. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-simple-crud.cjs.entry.js +19 -8
  30. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
  31. package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-01b85b99.js} +1 -1
  32. package/dist/collection/collection-manifest.json +1 -1
  33. package/dist/collection/components/snk-application/snk-application.js +119 -13
  34. package/dist/collection/components/snk-attach/snk-attach.js +194 -38
  35. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  36. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  37. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  38. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  39. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  40. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
  41. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  42. package/dist/collection/components/snk-crud/snk-crud.js +2 -2
  43. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +2 -2
  44. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  46. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -0
  47. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +84 -2
  48. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +0 -1
  49. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +84 -3
  50. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
  51. package/dist/collection/components/snk-grid/snk-grid.js +39 -16
  52. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
  53. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  54. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +53 -1
  55. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +26 -1
  56. package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -1
  57. package/dist/collection/lib/@types/index.js +1 -0
  58. package/dist/collection/lib/configs/ConfigStorage.js +24 -14
  59. package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
  60. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  61. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  62. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  63. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  64. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  65. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  66. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  67. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
  68. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +55 -31
  69. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +1 -1
  70. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +7 -1
  71. package/dist/collection/lib/index.js +1 -1
  72. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  73. package/dist/components/ConfigStorage.js +25 -15
  74. package/dist/components/SnkMessageBuilder.js +13 -0
  75. package/dist/components/dataunit-fetcher.js +93 -35
  76. package/dist/components/index2.js +1 -0
  77. package/dist/components/snk-actions-button2.js +1 -0
  78. package/dist/components/snk-application2.js +73 -3
  79. package/dist/components/snk-attach2.js +400 -56
  80. package/dist/components/snk-crud.js +1 -1
  81. package/dist/components/snk-data-exporter2.js +1 -1
  82. package/dist/components/snk-detail-view2.js +1 -1
  83. package/dist/components/snk-filter-bar2.js +42 -5
  84. package/dist/components/snk-filter-item2.js +3 -0
  85. package/dist/components/snk-filter-modal-item2.js +0 -1
  86. package/dist/components/snk-filter-modal.js +21 -3
  87. package/dist/components/snk-filter-multi-select.js +2 -1
  88. package/dist/components/snk-grid2.js +38 -15
  89. package/dist/components/snk-personalized-filter2.js +1 -1
  90. package/dist/components/snk-pesquisa2.js +1 -1
  91. package/dist/components/snk-simple-crud2.js +15 -1
  92. package/dist/components/taskbar-actions-button2.js +21 -2
  93. package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-4151acc8.js} +25 -15
  94. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  95. package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-5c7d3771.js} +1 -1
  96. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
  97. package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/esm/{dataunit-fetcher-cc1650eb.js → pesquisa-fetcher-fa0c2540.js} +255 -36
  100. package/dist/esm/sankhyablocks.js +1 -1
  101. package/dist/esm/snk-actions-button_2.entry.js +23 -5
  102. package/dist/esm/snk-application.entry.js +74 -6
  103. package/dist/esm/snk-attach.entry.js +396 -58
  104. package/dist/esm/snk-crud.entry.js +5 -6
  105. package/dist/esm/snk-data-exporter.entry.js +4 -4
  106. package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
  107. package/dist/esm/snk-data-unit.entry.js +2 -2
  108. package/dist/esm/snk-detail-view.entry.js +8 -9
  109. package/dist/esm/snk-filter-bar.entry.js +40 -5
  110. package/dist/esm/snk-filter-item.entry.js +3 -0
  111. package/dist/esm/snk-filter-modal-item.entry.js +1 -2
  112. package/dist/esm/snk-filter-modal.entry.js +16 -1
  113. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  114. package/dist/esm/snk-form.entry.js +2 -2
  115. package/dist/esm/snk-grid-config.entry.js +1 -1
  116. package/dist/esm/snk-grid.entry.js +41 -18
  117. package/dist/esm/{snk-guides-viewer-9ce9588c.js → snk-guides-viewer-f49613c6.js} +6 -7
  118. package/dist/esm/snk-guides-viewer.entry.js +7 -8
  119. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  120. package/dist/esm/snk-pesquisa.entry.js +1 -1
  121. package/dist/esm/snk-simple-crud.entry.js +17 -6
  122. package/dist/esm/snk-taskbar.entry.js +2 -2
  123. package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-d4d0b424.js} +1 -1
  124. package/dist/sankhyablocks/p-02e3a45b.entry.js +1 -0
  125. package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
  126. package/dist/sankhyablocks/p-0ec5b2e5.js +1 -0
  127. package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-1d75d9f9.entry.js} +1 -1
  128. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  129. package/dist/sankhyablocks/p-2582537c.entry.js +1 -0
  130. package/dist/sankhyablocks/p-282789a6.entry.js +1 -0
  131. package/dist/sankhyablocks/p-374d03f6.js +1 -0
  132. package/dist/sankhyablocks/p-38289a55.js +1 -0
  133. package/dist/sankhyablocks/p-3b0e4e08.js +65 -0
  134. package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-40915359.entry.js} +1 -1
  135. package/dist/sankhyablocks/{p-2028633c.js → p-573a07c5.js} +1 -1
  136. package/dist/sankhyablocks/p-62896624.entry.js +1 -0
  137. package/dist/sankhyablocks/{p-953346b9.entry.js → p-69efa80d.entry.js} +1 -1
  138. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  139. package/dist/sankhyablocks/{p-aaa1438e.entry.js → p-761ed32f.entry.js} +1 -1
  140. package/dist/sankhyablocks/p-7f3c7b09.entry.js +1 -0
  141. package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
  142. package/dist/sankhyablocks/p-9b5944a4.entry.js +1 -0
  143. package/dist/sankhyablocks/p-9bdbc7d8.entry.js +1 -0
  144. package/dist/sankhyablocks/p-aa95fb2c.js +56 -0
  145. package/dist/sankhyablocks/p-ac384baf.entry.js +1 -0
  146. package/dist/sankhyablocks/p-b05ab13d.entry.js +1 -0
  147. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  148. package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
  149. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  150. package/dist/sankhyablocks/p-e0fd9555.entry.js +1 -0
  151. package/dist/sankhyablocks/p-e817f254.entry.js +11 -0
  152. package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
  153. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  154. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  155. package/dist/types/components/snk-application/snk-application.d.ts +12 -2
  156. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  157. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  158. package/dist/types/components/snk-attach/snk-attach.d.ts +28 -6
  159. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  160. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
  161. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  162. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  163. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  164. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
  165. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  166. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
  167. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +19 -1
  168. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +16 -0
  169. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
  170. package/dist/types/components/snk-grid/snk-grid.d.ts +1 -0
  171. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -1
  172. package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +2 -0
  173. package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
  174. package/dist/types/components.d.ts +108 -13
  175. package/dist/types/lib/@types/index.d.ts +2 -1
  176. package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
  177. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  178. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  179. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  180. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  181. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  182. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  183. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
  184. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +4 -1
  185. package/dist/types/lib/index.d.ts +1 -1
  186. package/package.json +15 -6
  187. package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
  188. package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
  189. package/dist/sankhyablocks/p-145c4434.js +0 -1
  190. package/dist/sankhyablocks/p-17dda7a2.entry.js +0 -1
  191. package/dist/sankhyablocks/p-19f51c6b.entry.js +0 -11
  192. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  193. package/dist/sankhyablocks/p-311c6173.entry.js +0 -1
  194. package/dist/sankhyablocks/p-4396d1a6.js +0 -56
  195. package/dist/sankhyablocks/p-44e894af.entry.js +0 -1
  196. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  197. package/dist/sankhyablocks/p-4b0ea83f.entry.js +0 -1
  198. package/dist/sankhyablocks/p-5534e08c.js +0 -1
  199. package/dist/sankhyablocks/p-78777ae0.entry.js +0 -1
  200. package/dist/sankhyablocks/p-9c3229fc.entry.js +0 -1
  201. package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
  202. package/dist/sankhyablocks/p-a702a1a2.js +0 -60
  203. package/dist/sankhyablocks/p-c259545b.entry.js +0 -1
  204. package/dist/sankhyablocks/p-d1677df0.entry.js +0 -1
  205. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  206. package/dist/sankhyablocks/p-dd6a8377.js +0 -1
  207. package/dist/sankhyablocks/p-e138e7d4.entry.js +0 -1
  208. package/dist/sankhyablocks/p-e1b29d4c.entry.js +0 -1
  209. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  210. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  211. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  212. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  213. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  214. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  215. /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-fa0c2540.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';
@@ -825,11 +824,53 @@ const SnkApplication = class {
825
824
  return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
826
825
  }
827
826
  }
827
+ filterInvalidFields(resp, item, mdByName) {
828
+ let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
829
+ let accept = !StringUtils.isEmpty(item[field.fieldName]) &&
830
+ field.visible !== false &&
831
+ field.type !== 'B' &&
832
+ resp.pkField !== field.fieldName &&
833
+ resp.descriptionField !== field.fieldName &&
834
+ (field.isPrimaryKey || !field.isLinkField) &&
835
+ !(field.type === 'S' && field.presentationType === 'H');
836
+ if (accept) {
837
+ mdByName[field.fieldName] = field;
838
+ }
839
+ //Condição que trata o problema de trazer imagem no entityCard na pesquisa de registros
840
+ if (typeof item[field.fieldName] === 'string' && (item[field.fieldName].indexOf('<img') > -1 || item[field.fieldName].indexOf('<svg') > -1)) {
841
+ return false;
842
+ }
843
+ return accept;
844
+ });
845
+ return fieldsMetadata;
846
+ }
847
+ filterMathFields(matchFields, fields, qtyFields, mdByName) {
848
+ if (matchFields && Array.isArray(matchFields)) {
849
+ matchFields.forEach((matchField) => {
850
+ let fieldMD = ArrayUtils.removeReference(fields, mdByName[matchField]);
851
+ if (fieldMD) {
852
+ fields.unshift(fieldMD);
853
+ }
854
+ });
855
+ }
856
+ fields = fields.slice(0, qtyFields);
857
+ return fields;
858
+ }
859
+ builOptionItem(argument, item, fields, descriptionField, pkField) {
860
+ var _a;
861
+ let exibitionItem = {
862
+ value: StringUtils.highlightValue(argument, item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
863
+ label: descriptionField ? StringUtils.highlightValue(argument, item['__matchFields'], item[descriptionField], fields, true) : "",
864
+ details: SearchUtils.buildDetails(argument, fields, item)
865
+ };
866
+ return exibitionItem;
867
+ }
828
868
  /**
829
869
  * Obtém as opções em componentes de pesquisa
830
870
  * Ex.: snk-config-options
831
871
  */
832
872
  async executePreparedSearch(mode, argument, options) {
873
+ const mdByName = {};
833
874
  const { entity, entityDescription, criteria, searchOptions } = options;
834
875
  if (mode === "ADVANCED") {
835
876
  return new Promise(accept => {
@@ -847,7 +888,25 @@ const SnkApplication = class {
847
888
  });
848
889
  }
849
890
  else {
850
- return this.pesquisaFetcher.loadSearchOptions(entity, argument, criteria, searchOptions);
891
+ return new Promise((resolve, reject) => {
892
+ this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
893
+ .then(result => {
894
+ result = ObjectUtils.stringToObject(result.json.$);
895
+ let descriptionField = result.descriptionField;
896
+ let pkField = result.pkField;
897
+ const list = [];
898
+ result.data.forEach((item) => {
899
+ let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
900
+ let qtyFields = 6;
901
+ let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
902
+ list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
903
+ });
904
+ resolve(list);
905
+ })
906
+ .catch(error => {
907
+ reject(error);
908
+ });
909
+ });
851
910
  }
852
911
  }
853
912
  /**
@@ -940,6 +999,15 @@ const SnkApplication = class {
940
999
  this._waitingAppReady.push(() => resolve(this));
941
1000
  });
942
1001
  }
1002
+ /**
1003
+ * Atribui valor para parâmetros de contexto no componente de pesquisa.
1004
+ *
1005
+ * @param name - Nome do parâmetro
1006
+ * @param value - String conversível de acordo com o tipo do parâmetro
1007
+ */
1008
+ async setSearchFilterContext(name, value) {
1009
+ ApplicationContext.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${name})__`, value);
1010
+ }
943
1011
  clearContent(container) {
944
1012
  if (container) {
945
1013
  Array.from(container.children).forEach(child => {