@sankhyalabs/sankhyablocks 8.15.1 → 8.16.0-dev.1

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 (216) hide show
  1. package/dist/cjs/{SnkMultiSelectionListDataSource-303e85d1.js → IExporterProvider-c78cb1b8.js} +94 -4
  2. package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
  3. package/dist/cjs/{SnkFormConfigManager-f9dc0d28.js → SnkFormConfigManager-1b13bacd.js} +6 -3
  4. package/dist/cjs/{SnkMessageBuilder-66aa2557.js → SnkMessageBuilder-722b104e.js} +8 -12
  5. package/dist/cjs/{pesquisa-fetcher-213797ec.js → dataunit-fetcher-620b29a1.js} +87 -180
  6. package/dist/cjs/{index-0922807b.js → index-1dfc7a6e.js} +5 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/pesquisa-fetcher-680e198f.js +166 -0
  9. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  10. package/dist/cjs/snk-actions-button_4.cjs.entry.js +4 -2
  11. package/dist/cjs/snk-application.cjs.entry.js +34 -11
  12. package/dist/cjs/snk-attach.cjs.entry.js +71 -46
  13. package/dist/cjs/snk-crud.cjs.entry.js +96 -10
  14. package/dist/cjs/snk-data-exporter.cjs.entry.js +315 -85
  15. package/dist/cjs/snk-data-unit-82dea87e.js +679 -0
  16. package/dist/cjs/snk-data-unit.cjs.entry.js +12 -2
  17. package/dist/cjs/snk-detail-view.cjs.entry.js +48 -7
  18. package/dist/cjs/snk-filter-bar.cjs.entry.js +5 -1
  19. package/dist/cjs/snk-form-view.cjs.entry.js +67 -0
  20. package/dist/cjs/snk-form.cjs.entry.js +51 -6
  21. package/dist/cjs/snk-grid.cjs.entry.js +164 -107
  22. package/dist/cjs/{snk-guides-viewer-4b6ecda8.js → snk-guides-viewer-05a1ba27.js} +36 -8
  23. package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -6
  24. package/dist/cjs/snk-simple-crud.cjs.entry.js +264 -37
  25. package/dist/cjs/snk-taskbar.cjs.entry.js +4 -3
  26. package/dist/cjs/{taskbar-elements-3ecd1278.js → taskbar-elements-9ad1f9c0.js} +3 -3
  27. package/dist/collection/collection-manifest.json +1 -1
  28. package/dist/collection/components/snk-application/snk-application.js +35 -11
  29. package/dist/collection/components/snk-attach/snk-attach.js +67 -44
  30. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +1 -0
  31. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +1 -0
  32. package/dist/collection/components/snk-crud/snk-crud.js +249 -7
  33. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +135 -0
  34. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +161 -0
  35. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +112 -5
  36. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +97 -0
  37. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +74 -0
  38. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +54 -1
  39. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
  40. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +58 -0
  41. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
  42. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +59 -52
  43. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +62 -0
  44. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
  45. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +20 -0
  46. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
  47. package/dist/collection/components/snk-data-unit/snk-data-unit.js +507 -214
  48. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
  49. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +18 -0
  50. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +22 -1
  51. package/dist/collection/components/snk-form/snk-form.js +102 -5
  52. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -3
  53. package/dist/collection/components/snk-grid/snk-grid.js +240 -101
  54. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +386 -18
  55. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
  56. package/dist/collection/components/snk-taskbar/snk-taskbar.js +2 -1
  57. package/dist/collection/lib/@types/index.js +5 -0
  58. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
  59. package/dist/collection/lib/dataUnit/InMemoryLoader.js +7 -3
  60. package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
  61. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +1 -0
  62. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +3 -0
  63. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
  64. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -13
  65. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +1 -0
  66. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +1 -0
  67. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +1 -0
  68. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +53 -4
  69. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +22 -0
  70. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
  71. package/dist/collection/lib/message/SnkMessageBuilder.js +5 -12
  72. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -0
  73. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -0
  74. package/dist/components/{field-search.js → IExporterProvider.js} +93 -6
  75. package/dist/components/ISave.js +47 -0
  76. package/dist/components/SnkFormConfigManager.js +6 -3
  77. package/dist/components/SnkMessageBuilder.js +8 -12
  78. package/dist/components/dataunit-fetcher.js +84 -182
  79. package/dist/components/index2.js +198 -33
  80. package/dist/components/pesquisa-fetcher.js +164 -0
  81. package/dist/components/snk-actions-button2.js +4 -11
  82. package/dist/components/snk-application2.js +31 -9
  83. package/dist/components/snk-attach2.js +65 -41
  84. package/dist/components/snk-crud.js +103 -11
  85. package/dist/components/snk-data-exporter2.js +309 -85
  86. package/dist/components/snk-data-unit2.js +470 -212
  87. package/dist/components/snk-detail-view2.js +87 -10
  88. package/dist/components/snk-expression-item2.js +1 -1
  89. package/dist/components/snk-filter-bar2.js +6 -1
  90. package/dist/components/snk-form-view2.js +72 -1
  91. package/dist/components/snk-form.js +53 -6
  92. package/dist/components/snk-grid2.js +168 -106
  93. package/dist/components/snk-personalized-filter2.js +1 -1
  94. package/dist/components/snk-simple-crud2.js +259 -23
  95. package/dist/components/snk-taskbar2.js +6 -5
  96. package/dist/esm/{SnkMultiSelectionListDataSource-36918dbf.js → IExporterProvider-343272b3.js} +93 -5
  97. package/dist/esm/RecordIDUtils-87d02110.js +41 -0
  98. package/dist/esm/{SnkFormConfigManager-f53f9f87.js → SnkFormConfigManager-d4554df9.js} +6 -3
  99. package/dist/esm/{SnkMessageBuilder-0a4becdd.js → SnkMessageBuilder-89925609.js} +8 -12
  100. package/dist/esm/{pesquisa-fetcher-fe6f3826.js → dataunit-fetcher-3fbf9d12.js} +83 -181
  101. package/dist/esm/{index-0ece87a6.js → index-3aa4977a.js} +6 -1
  102. package/dist/esm/loader.js +1 -1
  103. package/dist/esm/pesquisa-fetcher-03c8f919.js +164 -0
  104. package/dist/esm/sankhyablocks.js +1 -1
  105. package/dist/esm/snk-actions-button_4.entry.js +4 -2
  106. package/dist/esm/snk-application.entry.js +33 -10
  107. package/dist/esm/snk-attach.entry.js +66 -41
  108. package/dist/esm/snk-crud.entry.js +96 -10
  109. package/dist/esm/snk-data-exporter.entry.js +316 -86
  110. package/dist/esm/snk-data-unit-8f98b45f.js +677 -0
  111. package/dist/esm/snk-data-unit.entry.js +12 -2
  112. package/dist/esm/snk-detail-view.entry.js +48 -7
  113. package/dist/esm/snk-filter-bar.entry.js +5 -1
  114. package/dist/esm/snk-form-view.entry.js +67 -0
  115. package/dist/esm/snk-form.entry.js +51 -6
  116. package/dist/esm/snk-grid.entry.js +162 -105
  117. package/dist/esm/{snk-guides-viewer-113be3fd.js → snk-guides-viewer-aee2cafe.js} +36 -8
  118. package/dist/esm/snk-guides-viewer.entry.js +8 -6
  119. package/dist/esm/snk-simple-crud.entry.js +252 -25
  120. package/dist/esm/snk-taskbar.entry.js +4 -3
  121. package/dist/esm/{taskbar-elements-2473c8ac.js → taskbar-elements-d59867f1.js} +3 -3
  122. package/dist/sankhyablocks/p-0d91b10f.entry.js +1 -0
  123. package/dist/sankhyablocks/p-1db45d26.entry.js +1 -0
  124. package/dist/sankhyablocks/p-26394a01.entry.js +1 -0
  125. package/dist/sankhyablocks/p-2d649237.entry.js +1 -0
  126. package/dist/sankhyablocks/p-30cf616e.js +1 -0
  127. package/dist/sankhyablocks/p-44767378.entry.js +1 -0
  128. package/dist/sankhyablocks/p-47b60deb.entry.js +1 -0
  129. package/dist/sankhyablocks/p-4f72727a.entry.js +1 -0
  130. package/dist/sankhyablocks/p-550fee49.entry.js +1 -0
  131. package/dist/sankhyablocks/p-5539ecb4.entry.js +1 -0
  132. package/dist/sankhyablocks/p-672302c3.js +60 -0
  133. package/dist/sankhyablocks/p-7a337364.js +1 -0
  134. package/dist/sankhyablocks/{p-ae4fc9a9.js → p-7e7a7473.js} +1 -1
  135. package/dist/sankhyablocks/p-829d4045.js +1 -0
  136. package/dist/sankhyablocks/p-8a5910a7.entry.js +1 -0
  137. package/dist/sankhyablocks/p-8cc64963.entry.js +1 -0
  138. package/dist/sankhyablocks/p-8fc470e5.entry.js +1 -0
  139. package/dist/sankhyablocks/p-9863d682.js +1 -0
  140. package/dist/sankhyablocks/p-9e99a92a.js +1 -0
  141. package/dist/sankhyablocks/p-af8efd95.js +6 -0
  142. package/dist/sankhyablocks/p-be603a24.js +1 -0
  143. package/dist/sankhyablocks/p-d09feef1.js +1 -0
  144. package/dist/sankhyablocks/p-e95b3b93.entry.js +11 -0
  145. package/dist/sankhyablocks/p-f2809746.entry.js +1 -0
  146. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  147. package/dist/types/components/snk-application/snk-application.d.ts +7 -3
  148. package/dist/types/components/snk-attach/snk-attach.d.ts +11 -9
  149. package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +4 -0
  150. package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +4 -0
  151. package/dist/types/components/snk-crud/snk-crud.d.ts +36 -1
  152. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +23 -0
  153. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +28 -3
  154. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +19 -0
  155. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +14 -0
  156. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +12 -0
  157. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +24 -4
  158. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
  159. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
  160. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
  161. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -1
  162. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +21 -0
  163. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
  164. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +4 -0
  165. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
  166. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +61 -2
  167. package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +3 -0
  168. package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +3 -0
  169. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
  170. package/dist/types/components/snk-form/snk-form.d.ts +14 -0
  171. package/dist/types/components/snk-grid/snk-grid.d.ts +46 -6
  172. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +58 -4
  173. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  174. package/dist/types/components.d.ts +220 -4
  175. package/dist/types/lib/@types/index.d.ts +5 -0
  176. package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
  177. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -1
  178. package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
  179. package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +3 -0
  180. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +2 -1
  181. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
  182. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
  183. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +10 -0
  184. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +7 -0
  185. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +6 -0
  186. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +20 -0
  187. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +3 -0
  188. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -1
  189. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  190. package/package.json +1 -1
  191. package/dist/cjs/snk-data-unit-41c29713.js +0 -462
  192. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
  193. package/dist/components/index3.js +0 -199
  194. package/dist/esm/snk-data-unit-de1d140d.js +0 -460
  195. package/dist/sankhyablocks/p-032fe52e.js +0 -1
  196. package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
  197. package/dist/sankhyablocks/p-07a61550.entry.js +0 -1
  198. package/dist/sankhyablocks/p-0899e0b5.entry.js +0 -1
  199. package/dist/sankhyablocks/p-154a7f33.entry.js +0 -1
  200. package/dist/sankhyablocks/p-15802c59.entry.js +0 -1
  201. package/dist/sankhyablocks/p-164666b1.js +0 -65
  202. package/dist/sankhyablocks/p-32556aa6.js +0 -1
  203. package/dist/sankhyablocks/p-328585d0.entry.js +0 -1
  204. package/dist/sankhyablocks/p-38289a55.js +0 -1
  205. package/dist/sankhyablocks/p-52c8e589.js +0 -1
  206. package/dist/sankhyablocks/p-5cb07080.js +0 -1
  207. package/dist/sankhyablocks/p-74d349c3.entry.js +0 -1
  208. package/dist/sankhyablocks/p-7fe120b8.entry.js +0 -11
  209. package/dist/sankhyablocks/p-add17f6a.entry.js +0 -1
  210. package/dist/sankhyablocks/p-af1ac81f.entry.js +0 -1
  211. package/dist/sankhyablocks/p-b4525fc0.entry.js +0 -1
  212. package/dist/sankhyablocks/p-cce0865d.js +0 -1
  213. package/dist/sankhyablocks/p-dec65f6c.entry.js +0 -1
  214. package/dist/sankhyablocks/p-ee9536bc.entry.js +0 -1
  215. package/dist/sankhyablocks/p-f13f7616.entry.js +0 -1
  216. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
@@ -0,0 +1,164 @@
1
+ import { DataType, ApplicationContext } from '@sankhyalabs/core';
2
+ import { d as dist, D as DataFetcher } from './DataFetcher-c1baf61d.js';
3
+
4
+ class PesquisaFetcher {
5
+ constructor() {
6
+ this._defaultPageSize = 100;
7
+ this._templateByQuery = new Map();
8
+ this._searchListenersByDataUnit = new Map();
9
+ this.buldTemplates();
10
+ }
11
+ buldTemplates() {
12
+ this._templateByQuery.set("search", dist.gql `query($entityName: String! $argument: String $criteria: InputSearchCriteria $options: InputSearchOptions) {
13
+ $queryAlias$: search(entityName: $entityName argument: $argument criteria: $criteria options: $options){
14
+ value
15
+ label
16
+ }
17
+ }`);
18
+ }
19
+ loadSearchOptions(entityName, argument, criteria, options) {
20
+ var _a;
21
+ const cleanText = (argument === null || argument === void 0 ? void 0 : argument.toString().trim()) || undefined;
22
+ argument = isNaN(Number(cleanText)) && cleanText ? `%${cleanText}` : cleanText;
23
+ criteria === null || criteria === void 0 ? void 0 : criteria.params.forEach(param => {
24
+ if (param.dataType === DataType.OBJECT) {
25
+ param.value = JSON.stringify(param.value);
26
+ }
27
+ });
28
+ const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, options);
29
+ const values = {
30
+ argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
31
+ entityName,
32
+ criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
33
+ options: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || options,
34
+ };
35
+ if (values.options) {
36
+ (_a = values.options) === null || _a === void 0 ? true : delete _a.dataUnitId;
37
+ }
38
+ return new Promise((resolve, reject) => {
39
+ DataFetcher.get()
40
+ .callGraphQL({
41
+ values,
42
+ query: this._templateByQuery.get("search"),
43
+ })
44
+ .then((result) => {
45
+ resolve(result);
46
+ })
47
+ .catch((error) => {
48
+ reject(error);
49
+ });
50
+ });
51
+ }
52
+ loadAdvancedSearch(entityName, argument, criteria, searchOptions) {
53
+ var _a, _b, _c, _d, _e;
54
+ const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
55
+ const values = {
56
+ argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
57
+ criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
58
+ searchOptions: Object.assign(Object.assign({}, searchOptions), listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions),
59
+ };
60
+ const serviceName = "PesquisaSP.getSuggestion";
61
+ const externalCriteria = {
62
+ query: {
63
+ $: (_a = values.criteria) === null || _a === void 0 ? void 0 : _a.expression
64
+ }
65
+ };
66
+ if (((_c = (_b = values.criteria) === null || _b === void 0 ? void 0 : _b.params) === null || _c === void 0 ? void 0 : _c.length) > 0) {
67
+ externalCriteria.params = {
68
+ param: values.criteria.params.map(param => {
69
+ let value = param.value;
70
+ if (typeof value === "string") {
71
+ const match = /CTX\{([^}]+)\}/.exec(value);
72
+ if (match) {
73
+ value = ApplicationContext.getContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${match[1]})__`);
74
+ }
75
+ }
76
+ let type = param.dataType;
77
+ if (type === DataType.OBJECT) {
78
+ value = value.value;
79
+ type = "S";
80
+ }
81
+ else {
82
+ type = convertParamType(param.dataType);
83
+ }
84
+ return { $: value, type };
85
+ })
86
+ };
87
+ }
88
+ const options = searchOptions != undefined
89
+ ? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
90
+ const reqBody = {
91
+ "serviceName": serviceName,
92
+ "requestBody": {
93
+ "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_e = values.searchOptions) === null || _e === void 0 ? void 0 : _e.rootEntity }, { options }),
94
+ "clientEventList": {
95
+ "clientEvent": []
96
+ }
97
+ }
98
+ };
99
+ return new Promise((resolve, reject) => {
100
+ DataFetcher.get()
101
+ .callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody))
102
+ .then(result => resolve(result))
103
+ .catch(error => reject(error));
104
+ });
105
+ }
106
+ addSearchListener(entityName, dataUnitID, listener) {
107
+ var _a;
108
+ const dataUnitSearchListeners = this._searchListenersByDataUnit.get(dataUnitID) || [];
109
+ const entityListener = dataUnitSearchListeners.find(currentListener => currentListener.entity === entityName);
110
+ if (!entityListener) {
111
+ this._searchListenersByDataUnit.set(dataUnitID, [...dataUnitSearchListeners, { entity: entityName, listener }]);
112
+ }
113
+ else {
114
+ for (const type of Object.keys(listener)) {
115
+ if (type in entityListener.listener) {
116
+ const listenerFunctionIsEquals = ((_a = entityListener.listener[type]) === null || _a === void 0 ? void 0 : _a.toString()) === listener[type].toString();
117
+ if (listenerFunctionIsEquals)
118
+ continue;
119
+ entityListener.listener[type] = listener[type];
120
+ }
121
+ }
122
+ }
123
+ return () => {
124
+ const newListeners = dataUnitSearchListeners.filter(currentListener => currentListener.entity !== entityName);
125
+ if (!newListeners.length) {
126
+ this._searchListenersByDataUnit.delete(dataUnitID);
127
+ return;
128
+ }
129
+ this._searchListenersByDataUnit.set(dataUnitID, newListeners);
130
+ };
131
+ }
132
+ applySearchListener(listenerType, entityName, argument, criteria, searchOptions) {
133
+ var _a;
134
+ const dataUnitId = searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.dataUnitId;
135
+ if (!dataUnitId)
136
+ return;
137
+ const entityListener = (_a = this._searchListenersByDataUnit.get(dataUnitId)) === null || _a === void 0 ? void 0 : _a.find(({ entity }) => entity === entityName);
138
+ if (!entityListener)
139
+ return;
140
+ const { listener } = entityListener;
141
+ if (!(listenerType in listener))
142
+ return;
143
+ return listener[listenerType]({ argument, criteria, searchOptions });
144
+ }
145
+ }
146
+ function convertParamType(dataType) {
147
+ //Alerta: Cuidado pra não contaminar o DataType com a implementação
148
+ //atual da pesquisa... em geral, somente inteiros,
149
+ //data (com ou sem hora) e string são realmente relevantes
150
+ switch (dataType) {
151
+ case DataType.NUMBER:
152
+ return "I";
153
+ case DataType.DATE:
154
+ return "D";
155
+ default:
156
+ return "S";
157
+ }
158
+ }
159
+ var SearchListenerType;
160
+ (function (SearchListenerType) {
161
+ SearchListenerType["beforeSearch"] = "beforeSearch";
162
+ })(SearchListenerType || (SearchListenerType = {}));
163
+
164
+ export { PesquisaFetcher as P };
@@ -14,5 +14,5 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- return bootstrapLazy(JSON.parse("[[\"teste-pesquisa\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"configName\":[1025,\"config-name\"],\"filters\":[1040],\"applyFilters\":[16],\"closeModal\":[16],\"addPersonalizedFilter\":[16],\"editPersonalizedFilter\":[16],\"deletePersonalizedFilter\":[16],\"filtersToDelete\":[16],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"]},[[0,\"deleteFilter\",\"deletePersonalizedFilterListener\"]]]]],[\"snk-actions-form\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-custom-slot-elements\",[[6,\"snk-custom-slot-elements\",{\"slotName\":[1,\"slot-name\"]}]]],[\"snk-entity-list\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"],\"resetValues\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-checkbox-list\",[[0,\"snk-filter-checkbox-list\",{\"config\":[1040],\"optionsList\":[32]}]]],[\"snk-filter-list\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number\",[[0,\"snk-filter-number\",{\"config\":[16],\"getMessage\":[16],\"value\":[2],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-search\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-personalized-filter-editor\",[[2,\"snk-personalized-filter-editor\",{\"messagesBuilder\":[1040],\"presentationMode\":[2,\"presentation-mode\"],\"config\":[16],\"value\":[1040],\"items\":[32],\"show\":[64]}]]],[\"snk-print-selector\",[[2,\"snk-print-selector\",{\"_printServerActive\":[32],\"_selectedPrinter\":[32],\"_remotePrintersDataSource\":[32],\"_localPrintersDataSource\":[32],\"_printJobData\":[32],\"openPrintSelector\":[64]}]]],[\"snk-filter-modal-item\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-pesquisa\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-simple-crud\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[1040],\"formConfig\":[1040],\"multipleSelection\":[4,\"multiple-selection\"],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"resourceID\":[1,\"resource-i-d\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"actionsList\":[16],\"configName\":[1025,\"config-name\"],\"showConfiguratorButtons\":[4,\"show-configurator-buttons\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"ignoreReadOnlyFormFields\":[4,\"ignore-read-only-form-fields\"],\"_showPopUpGridConfig\":[32],\"_showFormConfig\":[32],\"_currentViewMode\":[32],\"_config\":[32],\"_fieldToGetFocus\":[32],\"_customContainerId\":[32],\"_formFields\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"updateConfig\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]]]],[\"snk-attach\",[[2,\"snk-attach\",{\"fetcherType\":[1,\"fetcher-type\"],\"fetcher\":[16],\"dataUnit\":[16],\"dataUnitBuilder\":[16],\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"_currentFetcher\":[32],\"_currentDataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"showUp\":[64]}]]],[\"snk-filter-field-search_2\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"searchEmpty\":[32],\"groupEmpty\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-expression-group_2\",[[2,\"snk-expression-group\",{\"parentTop\":[1026,\"parent-top\"],\"group\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityURI\":[1025,\"entity-u-r-i\"],\"_conditionOperator\":[32],\"_group\":[32],\"_selfTop\":[32],\"canAddExpression\":[32],\"_showDashes\":[32],\"getExpressionGroup\":[64]},[[8,\"ezExpressionLayoutChanged\",\"todoCompletedHandler\"]]],[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"entityURI\":[1025,\"entity-u-r-i\"],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-personalized-filter\",[[2,\"snk-personalized-filter\",{\"messagesBuilder\":[1040],\"entityUri\":[1025,\"entity-uri\"],\"filterId\":[1025,\"filter-id\"],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_filterAssistentMode\":[32],\"_filterAssistent\":[32],\"createPersonalizedFilter\":[64]}]]],[\"snk-filter-item\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"showChips\":[4,\"show-chips\"],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-filter-bar\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"title\":[1],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"mode\":[1],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"allowDefault\":[32],\"scrollerLocked\":[32],\"showPersonalizedFilter\":[32],\"personalizedFilterId\":[32],\"reload\":[64],\"getFilterItem\":[64],\"updateFilterItem\":[64],\"addFilterItem\":[64],\"removeFilterItem\":[64],\"showFilterModal\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-grid\",[[6,\"snk-grid\",{\"columnFilterDataSource\":[1040],\"configName\":[1,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"resourceID\":[1,\"resource-i-d\"],\"selectionToastConfig\":[16],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"gridHeaderCustomSlotId\":[1,\"grid-header-custom-slot-id\"],\"topTaskbarCustomSlotId\":[1,\"top-taskbar-custom-slot-id\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"_showSnkFilterBar\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"findColumn\":[64],\"setFocus\":[64]}]]],[\"snk-configurator\",[[2,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"viewMode\":[2,\"view-mode\"],\"customContainerId\":[1,\"custom-container-id\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-unit\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"ignoreSaveMessage\":[4,\"ignore-save-message\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-taskbar\",[[6,\"snk-taskbar\",{\"alignRigth\":[4,\"align-rigth\"],\"customSlotId\":[1,\"custom-slot-id\"],\"customContainerId\":[1,\"custom-container-id\"],\"overflowStrategy\":[1,\"overflow-strategy\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32],\"_overFlowedElements\":[32],\"_customElements\":[32],\"_customElementsId\":[32],\"_slotContainer\":[32],\"_hiddenActionsList\":[32],\"_lastWidth\":[32],\"_hasToUpdateOverFlow\":[32],\"_isWaitingForSave\":[32]},[[8,\"snkCustomSlotElementsLoaded\",\"handleCustomSlotElementsLoaded\"]]]]],[\"snk-filter-detail\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"showHardFixed\":[4,\"show-hard-fixed\"],\"show\":[64]}]]],[\"snk-config-options\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-simple-bar\",[[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-exporter-email-sender\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-crud\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"selectionToastConfig\":[16],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"_canEdit\":[32],\"_resourceID\":[32],\"customContainerId\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64]}]]],[\"snk-form\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-data-exporter\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-guides-viewer\",[[6,\"snk-guides-viewer\",{\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"canEdit\":[4,\"can-edit\"],\"presentationMode\":[1,\"presentation-mode\"],\"resourceID\":[1,\"resource-i-d\"],\"detailTaskbarCustomContainerId\":[1,\"detail-taskbar-custom-container-id\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"_hasToCreateFieldSearch\":[32],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"_fieldToGetFocus\":[32],\"showFormConfig\":[64],\"findField\":[64],\"setFocus\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-application\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"loadByPK\":[16],\"getKeyboardManager\":[64],\"isUserSup\":[64],\"addPendingAction\":[64],\"callServiceBroker\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"showAlerts\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadTotals\":[64],\"isLoadedByPk\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"importScript\":[64],\"getApplicationPath\":[64],\"executeSelectDistinct\":[64],\"getDataFetcher\":[64],\"whenApplicationReady\":[64],\"setSearchFilterContext\":[64]}]]],[\"snk-filter-advanced-mode_2\",[[2,\"snk-filter-assistent-mode\",{\"filterAssistent\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityUri\":[1025,\"entity-uri\"],\"application\":[1040]}],[2,\"snk-filter-advanced-mode\",{\"filterAssistent\":[1040],\"application\":[1040]}]]],[\"snk-actions-button_4\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}],[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}],[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}],[2,\"taskbar-actions-button\",{\"title\":[1],\"enabled\":[4],\"actions\":[16],\"_showDropdown\":[32],\"showActions\":[64],\"hideActions\":[64],\"isOpened\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"ezOpenModal\",\"handleClose\"]]]]],[\"snk-detail-view\",[[6,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"resourceID\":[1,\"resource-i-d\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[1040],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"_disabledButtons\":[32],\"_currentView\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]]]"), options);
17
+ return bootstrapLazy(JSON.parse("[[\"teste-pesquisa\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"configName\":[1025,\"config-name\"],\"filters\":[1040],\"applyFilters\":[16],\"closeModal\":[16],\"addPersonalizedFilter\":[16],\"editPersonalizedFilter\":[16],\"deletePersonalizedFilter\":[16],\"filtersToDelete\":[16],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"]},[[0,\"deleteFilter\",\"deletePersonalizedFilterListener\"]]]]],[\"snk-actions-form\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-custom-slot-elements\",[[6,\"snk-custom-slot-elements\",{\"slotName\":[1,\"slot-name\"]}]]],[\"snk-entity-list\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"],\"resetValues\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-checkbox-list\",[[0,\"snk-filter-checkbox-list\",{\"config\":[1040],\"optionsList\":[32]}]]],[\"snk-filter-list\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number\",[[0,\"snk-filter-number\",{\"config\":[16],\"getMessage\":[16],\"value\":[2],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-search\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-personalized-filter-editor\",[[2,\"snk-personalized-filter-editor\",{\"messagesBuilder\":[1040],\"presentationMode\":[2,\"presentation-mode\"],\"config\":[16],\"value\":[1040],\"items\":[32],\"show\":[64]}]]],[\"snk-print-selector\",[[2,\"snk-print-selector\",{\"_printServerActive\":[32],\"_selectedPrinter\":[32],\"_remotePrintersDataSource\":[32],\"_localPrintersDataSource\":[32],\"_printJobData\":[32],\"openPrintSelector\":[64]}]]],[\"snk-filter-modal-item\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-pesquisa\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-simple-crud\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"entityName\":[1,\"entity-name\"],\"mode\":[2],\"gridConfig\":[1040],\"formConfig\":[1040],\"multipleSelection\":[4,\"multiple-selection\"],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"pageSize\":[2,\"page-size\"],\"resourceID\":[1,\"resource-i-d\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"actionsList\":[16],\"configName\":[1025,\"config-name\"],\"showConfiguratorButtons\":[4,\"show-configurator-buttons\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"ignoreReadOnlyFormFields\":[4,\"ignore-read-only-form-fields\"],\"autoFocus\":[4,\"auto-focus\"],\"autoLoad\":[4,\"auto-load\"],\"_showPopUpGridConfig\":[32],\"_showFormConfig\":[32],\"_currentViewMode\":[32],\"_config\":[32],\"_fieldToGetFocus\":[32],\"_customContainerId\":[32],\"_formFields\":[32],\"_fieldsProps\":[32],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"addCustomValueFormatter\":[64],\"removeCustomValueFormatter\":[64],\"setFieldProp\":[64],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"updateConfig\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]]]],[\"snk-attach\",[[2,\"snk-attach\",{\"fetcherType\":[1,\"fetcher-type\"],\"fetcher\":[16],\"dataUnit\":[16],\"dataUnitBuilder\":[16],\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"_currentFetcher\":[32],\"_currentDataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"customEditors\":[16],\"fieldsProps\":[16],\"showUp\":[64],\"addCustomEditor\":[64],\"setFieldProp\":[64]}]]],[\"snk-filter-field-search_2\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"searchEmpty\":[32],\"groupEmpty\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-expression-group_2\",[[2,\"snk-expression-group\",{\"parentTop\":[1026,\"parent-top\"],\"group\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityURI\":[1025,\"entity-u-r-i\"],\"_conditionOperator\":[32],\"_group\":[32],\"_selfTop\":[32],\"canAddExpression\":[32],\"_showDashes\":[32],\"getExpressionGroup\":[64]},[[8,\"ezExpressionLayoutChanged\",\"todoCompletedHandler\"]]],[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"entityURI\":[1025,\"entity-u-r-i\"],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-personalized-filter\",[[2,\"snk-personalized-filter\",{\"messagesBuilder\":[1040],\"entityUri\":[1025,\"entity-uri\"],\"filterId\":[1025,\"filter-id\"],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_filterAssistentMode\":[32],\"_filterAssistent\":[32],\"createPersonalizedFilter\":[64]}]]],[\"snk-filter-item\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"showChips\":[4,\"show-chips\"],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-filter-bar\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"title\":[1],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"mode\":[1],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"autoLoad\":[4,\"auto-load\"],\"allowDefault\":[32],\"scrollerLocked\":[32],\"showPersonalizedFilter\":[32],\"personalizedFilterId\":[32],\"reload\":[64],\"getFilterItem\":[64],\"updateFilterItem\":[64],\"addFilterItem\":[64],\"removeFilterItem\":[64],\"showFilterModal\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-grid\",[[6,\"snk-grid\",{\"columnFilterDataSource\":[1040],\"configName\":[1,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"resourceID\":[1,\"resource-i-d\"],\"selectionToastConfig\":[16],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"gridHeaderCustomSlotId\":[1,\"grid-header-custom-slot-id\"],\"topTaskbarCustomSlotId\":[1,\"top-taskbar-custom-slot-id\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"autoLoad\":[4,\"auto-load\"],\"autoFocus\":[4,\"auto-focus\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"_showSnkFilterBar\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"findColumn\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"addCustomValueFormatter\":[64],\"removeCustomValueFormatter\":[64],\"setFocus\":[64]}]]],[\"snk-configurator\",[[2,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"viewMode\":[2,\"view-mode\"],\"customContainerId\":[1,\"custom-container-id\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-unit\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"ignoreSaveMessage\":[4,\"ignore-save-message\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"fieldsToLink\":[32],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64],\"getFieldsWithRmp\":[64],\"getFieldsWithRmPrecision\":[64],\"getRowMetadata\":[64]}]]],[\"snk-taskbar\",[[6,\"snk-taskbar\",{\"alignRigth\":[4,\"align-rigth\"],\"customSlotId\":[1,\"custom-slot-id\"],\"customContainerId\":[1,\"custom-container-id\"],\"overflowStrategy\":[1,\"overflow-strategy\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32],\"_overFlowedElements\":[32],\"_customElements\":[32],\"_customElementsId\":[32],\"_slotContainer\":[32],\"_hiddenActionsList\":[32],\"_lastWidth\":[32],\"_hasToUpdateOverFlow\":[32],\"_isWaitingForSave\":[32]},[[8,\"snkCustomSlotElementsLoaded\",\"handleCustomSlotElementsLoaded\"]]]]],[\"snk-filter-detail\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"showHardFixed\":[4,\"show-hard-fixed\"],\"show\":[64]}]]],[\"snk-config-options\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-simple-bar\",[[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-exporter-email-sender\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-crud\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"selectionToastConfig\":[16],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"autoLoad\":[4,\"auto-load\"],\"autoFocus\":[4,\"auto-focus\"],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"_canEdit\":[32],\"_resourceID\":[32],\"customContainerId\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"addCustomValueFormatter\":[64],\"removeCustomValueFormatter\":[64],\"setFieldProp\":[64]}]]],[\"snk-form\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"addCustomEditor\":[64],\"setFieldProp\":[64]}]]],[\"snk-data-exporter\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32]}]]],[\"snk-guides-viewer\",[[6,\"snk-guides-viewer\",{\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"canEdit\":[4,\"can-edit\"],\"presentationMode\":[1,\"presentation-mode\"],\"resourceID\":[1,\"resource-i-d\"],\"detailTaskbarCustomContainerId\":[1,\"detail-taskbar-custom-container-id\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"_hasToCreateFieldSearch\":[32],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"_fieldToGetFocus\":[32],\"_customEditors\":[32],\"_customRenders\":[32],\"_fieldsProps\":[32],\"showFormConfig\":[64],\"findField\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"setFieldProp\":[64],\"setFocus\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-application\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"loadByPK\":[16],\"getKeyboardManager\":[64],\"isUserSup\":[64],\"addPendingAction\":[64],\"callServiceBroker\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"showAlerts\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadTotals\":[64],\"isLoadedByPk\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"importScript\":[64],\"getApplicationPath\":[64],\"executeSelectDistinct\":[64],\"getDataFetcher\":[64],\"whenApplicationReady\":[64],\"setSearchFilterContext\":[64]}]]],[\"snk-filter-advanced-mode_2\",[[2,\"snk-filter-assistent-mode\",{\"filterAssistent\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityUri\":[1025,\"entity-uri\"],\"application\":[1040]}],[2,\"snk-filter-advanced-mode\",{\"filterAssistent\":[1040],\"application\":[1040]}]]],[\"snk-actions-button_4\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}],[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}],[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}],[2,\"taskbar-actions-button\",{\"title\":[1],\"enabled\":[4],\"actions\":[16],\"_showDropdown\":[32],\"showActions\":[64],\"hideActions\":[64],\"isOpened\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"ezOpenModal\",\"handleClose\"]]]]],[\"snk-detail-view\",[[6,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"resourceID\":[1,\"resource-i-d\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[1040],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"customEditors\":[16],\"customRenders\":[16],\"_disabledButtons\":[32],\"_currentView\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]]]"), options);
18
18
  });
@@ -2,11 +2,12 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
2
2
  import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './DataFetcher-c1baf61d.js';
4
4
  import { P as ParamType } from './ParamType-d5152b06.js';
5
- import './pesquisa-fetcher-fe6f3826.js';
6
- import './index-0ece87a6.js';
5
+ import './pesquisa-fetcher-03c8f919.js';
6
+ import './index-3aa4977a.js';
7
7
  import './ISave-d8c8bc59.js';
8
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
+ import './dataunit-fetcher-3fbf9d12.js';
10
11
  import './filter-item-type.enum-d45e026f.js';
11
12
  import './form-config-fetcher-30fb808f.js';
12
13
  import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
@@ -16,6 +17,7 @@ import { C as ConfigStorage } from './ConfigStorage-86187da3.js';
16
17
  import { O as ORDER_VALUES } from './constants-8457af36.js';
17
18
  import './PrintUtils-3e4ff0f5.js';
18
19
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
20
+ import '@sankhyalabs/core/dist/utils/SortingUtils';
19
21
 
20
22
  const SERVICE_ACTION_EXECUTE_JAVA = 'ActionButtonsSP.executeJava';
21
23
  class JavaExecutor {
@@ -4,14 +4,16 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { C as ConfigStorage } from './ConfigStorage-86187da3.js';
5
5
  import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-c1baf61d.js';
6
6
  import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-039abba3.js';
7
- import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-fe6f3826.js';
8
- import { S as SnkMessageBuilder } from './SnkMessageBuilder-0a4becdd.js';
7
+ import { D as DataUnitFetcher } from './dataunit-fetcher-3fbf9d12.js';
8
+ import { P as PesquisaFetcher } from './pesquisa-fetcher-03c8f919.js';
9
+ import { S as SnkMessageBuilder } from './SnkMessageBuilder-89925609.js';
9
10
  import './form-config-fetcher-30fb808f.js';
10
11
  import './filter-item-type.enum-d45e026f.js';
11
12
  import './PrintUtils-3e4ff0f5.js';
12
13
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
13
14
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
14
15
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
16
+ import '@sankhyalabs/core/dist/utils/SortingUtils';
15
17
  import './ResourceIDUtils-a114189a.js';
16
18
 
17
19
  class AppletCaller {
@@ -294,6 +296,7 @@ const SnkApplication = class {
294
296
  this._duPromises = new Map();
295
297
  this._requestListener = new RequestListenerLoadingBar();
296
298
  this._pendingActions = new Map;
299
+ this._loadPkParameter = null;
297
300
  this._isLoadedByPk = false;
298
301
  this.messagesBuilder = undefined;
299
302
  this.configName = undefined;
@@ -351,6 +354,12 @@ const SnkApplication = class {
351
354
  });
352
355
  }
353
356
  }
357
+ watchPropHandler(newValue, _) {
358
+ if (newValue && this._loadPkParameter) {
359
+ this.loadByPK(this._loadPkParameter.pk, this._loadPkParameter.redirect);
360
+ this._loadPkParameter = null;
361
+ }
362
+ }
354
363
  /**
355
364
  * Obtém o controlador de teclado.
356
365
  *
@@ -625,12 +634,7 @@ const SnkApplication = class {
625
634
  if (!waitingDu) {
626
635
  const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, resourceID, parentDataUnit, configName);
627
636
  dataUnit.loadMetadata().then(() => {
628
- if (dataUnitName) {
629
- this.updateDataunitCache(undefined, dataUnitName, dataUnit);
630
- }
631
- while (duPromisses.length > 0) {
632
- duPromisses.pop().resolve(dataUnit);
633
- }
637
+ this.processResolveDataUnit(dataUnit, dataUnitName, duPromisses);
634
638
  }).catch(reason => {
635
639
  while (duPromisses.length > 0) {
636
640
  duPromisses.pop().reject(reason);
@@ -639,6 +643,14 @@ const SnkApplication = class {
639
643
  }
640
644
  });
641
645
  }
646
+ processResolveDataUnit(dataUnit, dataUnitName, duPromisses) {
647
+ if (dataUnitName) {
648
+ this.updateDataunitCache(undefined, dataUnitName, dataUnit);
649
+ }
650
+ while (duPromisses.length > 0) {
651
+ duPromisses.pop().resolve(dataUnit);
652
+ }
653
+ }
642
654
  /**
643
655
  * Atualiza o cache de dataunits da aplicação.
644
656
  * @param oldName - Nome do dataunit que está em cache.
@@ -1052,15 +1064,23 @@ const SnkApplication = class {
1052
1064
  return;
1053
1065
  const resourceIDfromUrl = this.getResourceIdFromToken();
1054
1066
  const pkObject = UrlUtils.getPkObjectFromUrlToken(top.window.location.hash);
1055
- if (pkObject == undefined || resourceIDfromUrl !== this.applicationResourceID)
1067
+ const redirectFrom = window["redirectFrom"];
1068
+ if (pkObject === undefined) {
1056
1069
  return;
1070
+ }
1071
+ if (!redirectFrom || redirectFrom.split("_")[0].indexOf(resourceIDfromUrl.split("_")[0]) === -1) {
1072
+ if (resourceIDfromUrl !== this.applicationResourceID) {
1073
+ return;
1074
+ }
1075
+ }
1057
1076
  const pkParam = { pk: pkObject };
1058
1077
  this._isLoadedByPk = true;
1059
1078
  if (this.loadByPK) {
1060
- this.loadByPK(pkParam);
1079
+ this.loadByPK(pkParam, redirectFrom);
1061
1080
  this._currentPkParameter = pkHash;
1062
1081
  return;
1063
1082
  }
1083
+ this._loadPkParameter = { pk: pkParam, redirect: redirectFrom };
1064
1084
  this.defaultLoadByPK(pkParam, pkHash);
1065
1085
  }
1066
1086
  getResourceIdFromToken() {
@@ -1251,6 +1271,9 @@ const SnkApplication = class {
1251
1271
  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": "small", closeOutsideClick: true, closeEsc: true })));
1252
1272
  }
1253
1273
  get _element() { return getElement(this); }
1274
+ static get watchers() { return {
1275
+ "loadByPK": ["watchPropHandler"]
1276
+ }; }
1254
1277
  };
1255
1278
  class RequestListenerLoadingBar {
1256
1279
  constructor() {
@@ -1,18 +1,20 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
2
2
  import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './DataFetcher-c1baf61d.js';
4
- import { a as PreloadManager, b as applyFilter, c as applySorting, d as buildPaginationInfo, D as DataUnitFetcher, I as InMemoryLoader } from './pesquisa-fetcher-fe6f3826.js';
5
- import './index-0ece87a6.js';
4
+ import './pesquisa-fetcher-03c8f919.js';
5
+ import './index-3aa4977a.js';
6
6
  import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
7
+ import { P as PreloadManager, b as applyFilter, c as applySorting, d as buildPaginationInfo, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher-3fbf9d12.js';
7
8
  import './filter-item-type.enum-d45e026f.js';
8
9
  import './form-config-fetcher-30fb808f.js';
9
10
  import { d as VIEW_MODE } from './constants-8457af36.js';
10
11
  import { A as AutorizationType } from './auth-fetcher-039abba3.js';
11
- import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
12
+ import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
12
13
  import './PrintUtils-3e4ff0f5.js';
13
14
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
14
15
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
15
16
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
17
+ import '@sankhyalabs/core/dist/utils/SortingUtils';
16
18
  import './ResourceIDUtils-a114189a.js';
17
19
  import './index-bdf75557.js';
18
20
 
@@ -648,26 +650,37 @@ const SnkAttach = class {
648
650
  this._currentDataUnit = undefined;
649
651
  this.crudConfig = undefined;
650
652
  }
651
- registerKeyWatcher(newRegisterKey, oldRegisterKey) {
652
- var _a, _b, _c, _d, _e, _f;
653
- if (!this._currentDataUnit) {
653
+ async registerKeyWatcher(newRegisterKey, oldRegisterKey) {
654
+ var _a;
655
+ if (this._currentDataUnit == null) {
654
656
  this.loadAttachmentDataUnit();
655
657
  }
656
658
  if (oldRegisterKey !== newRegisterKey) {
657
- this.returnToGridMode();
658
- if (this.fetcherType === "AnexoSistema") {
659
- this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
660
- (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
661
- return (_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData();
662
- }
663
- if (this.fetcherType === "Attach") {
664
- const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
665
- if (hasMoreOneItem)
666
- return;
667
- }
668
- return (_f = (_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata()) === null || _f === void 0 ? void 0 : _f.then(this._currentDataUnit.loadData.bind(undefined, undefined, true, this.registerKey));
659
+ await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
669
660
  }
670
661
  }
662
+ async initAttach() {
663
+ var _a, _b, _c, _d, _e, _f;
664
+ if (!this.fetcherType && !this.registerKey)
665
+ return;
666
+ if (!this.fetcherType) {
667
+ this.fetcherType = "AnexoSistema";
668
+ }
669
+ this.returnToGridMode();
670
+ if (this.fetcherType === "AnexoSistema") {
671
+ this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
672
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
673
+ await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
674
+ return;
675
+ }
676
+ if (this.fetcherType === "Attach") {
677
+ const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
678
+ if (hasMoreOneItem)
679
+ return;
680
+ }
681
+ await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata());
682
+ await ((_f = this._currentDataUnit) === null || _f === void 0 ? void 0 : _f.loadData(undefined, undefined, true, this.registerKey));
683
+ }
671
684
  /**
672
685
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
673
686
  * através de um pequeno modulo na estrutura da aplicação:
@@ -705,14 +718,14 @@ const SnkAttach = class {
705
718
  if (this._crudElement)
706
719
  this._crudElement.goToView(VIEW_MODE.GRID);
707
720
  }
708
- loadAttachmentDataUnit() {
721
+ async loadAttachmentDataUnit() {
709
722
  try {
710
723
  switch (this.fetcherType) {
711
724
  case "AnexoSistema":
712
- this.loadAnexoSistema();
725
+ await this.loadAnexoSistema();
713
726
  break;
714
727
  case "Attach":
715
- this.loadAttach();
728
+ await this.loadAttach();
716
729
  break;
717
730
  default:
718
731
  this._currentFetcher = this.fetcher;
@@ -724,28 +737,29 @@ const SnkAttach = class {
724
737
  throw new Error('There was an error while creating the data unit');
725
738
  }
726
739
  }
727
- loadAnexoSistema() {
728
- var _a;
729
- this._currentDataUnit = this._currentDataUnit || new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
740
+ async loadAnexoSistema() {
741
+ var _a, _b, _c;
742
+ this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
730
743
  this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
731
744
  if (!this._currentDataUnit.metadata) {
732
- this._currentDataUnit
733
- .loadMetadata()
734
- .then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
745
+ await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata());
746
+ this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
735
747
  }
736
- this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
748
+ this.initDataUnitLoaders();
737
749
  this._currentDataUnit.addFilterProvider({
738
750
  getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
739
751
  });
740
752
  this._currentDataUnit.addInterceptor({
741
753
  interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
742
754
  });
743
- this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
755
+ await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
756
+ this.disableEditFieldsNotInForm();
744
757
  }
745
- loadAttach() {
746
- var _a, _b, _c;
758
+ async loadAttach() {
759
+ var _a, _b;
747
760
  this._currentFetcher = new AttachFetcher();
748
761
  this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
762
+ this.initDataUnitLoaders();
749
763
  this._currentDataUnit.addInterceptor({
750
764
  interceptAction: (action) => {
751
765
  var _a;
@@ -756,16 +770,26 @@ const SnkAttach = class {
756
770
  return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
757
771
  }
758
772
  });
759
- this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
760
- (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
761
- this.returnToGridMode();
762
- await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
763
- });
764
773
  if (!this._currentDataUnit.metadata) {
765
- (_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
766
- var _a, _b;
767
- this.crudConfig = Object.assign({}, attachCrudConfig);
768
- (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
774
+ await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
775
+ this.crudConfig = Object.assign({}, attachCrudConfig);
776
+ await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
777
+ this.disableEditFieldsNotInForm();
778
+ }
779
+ }
780
+ initDataUnitLoaders() {
781
+ var _a, _b, _c;
782
+ if (this.fetcherType === "AnexoSistema") {
783
+ this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
784
+ this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
785
+ (_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
786
+ }
787
+ if (this.fetcherType === "Attach") {
788
+ this._currentFetcher = new AttachFetcher();
789
+ this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
790
+ (_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
791
+ this.returnToGridMode();
792
+ await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
769
793
  });
770
794
  }
771
795
  }
@@ -779,8 +803,9 @@ const SnkAttach = class {
779
803
  }
780
804
  });
781
805
  }
782
- componentWillLoad() {
806
+ async componentWillLoad() {
783
807
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
808
+ await this.initAttach();
784
809
  }
785
810
  componentWillRender() {
786
811
  if (!this.fetcherType) {