@sankhyalabs/sankhyablocks 8.15.0-dev.9 → 8.15.0-rc.2

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 (159) hide show
  1. package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
  2. package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{dataunit-fetcher-353e4af2.js → pesquisa-fetcher-e4a7c4c3.js} +215 -26
  5. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  6. package/dist/cjs/snk-actions-button_2.cjs.entry.js +5 -4
  7. package/dist/cjs/snk-application.cjs.entry.js +33 -4
  8. package/dist/cjs/snk-attach.cjs.entry.js +388 -57
  9. package/dist/cjs/snk-crud.cjs.entry.js +2 -3
  10. package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
  11. package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
  12. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  13. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -5
  14. package/dist/cjs/snk-filter-bar.cjs.entry.js +25 -3
  15. package/dist/cjs/snk-filter-item.cjs.entry.js +4 -47
  16. package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -1
  17. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  18. package/dist/cjs/{snk-guides-viewer-e60ccc5e.js → snk-guides-viewer-d32c096f.js} +2 -3
  19. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -4
  20. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-simple-crud.cjs.entry.js +17 -6
  22. package/dist/collection/components/snk-application/snk-application.js +52 -9
  23. package/dist/collection/components/snk-attach/snk-attach.js +188 -39
  24. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  25. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  26. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  27. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  28. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  29. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
  30. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  31. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  32. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  33. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +4 -47
  34. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +19 -1
  35. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +39 -2
  36. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  37. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  38. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +53 -1
  39. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +3 -1
  40. package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
  41. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  42. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  43. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  44. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  45. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  46. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  47. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  48. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +17 -3
  49. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +29 -22
  50. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
  51. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +7 -1
  52. package/dist/collection/lib/index.js +1 -1
  53. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  54. package/dist/components/SnkMessageBuilder.js +13 -0
  55. package/dist/components/dataunit-fetcher.js +54 -27
  56. package/dist/components/snk-actions-button2.js +1 -0
  57. package/dist/components/snk-application2.js +32 -1
  58. package/dist/components/snk-attach2.js +394 -57
  59. package/dist/components/snk-data-exporter2.js +1 -1
  60. package/dist/components/snk-filter-bar2.js +26 -3
  61. package/dist/components/snk-filter-item2.js +4 -47
  62. package/dist/components/snk-filter-modal.js +4 -2
  63. package/dist/components/snk-filter-multi-select.js +2 -1
  64. package/dist/components/snk-pesquisa2.js +1 -1
  65. package/dist/components/snk-simple-crud2.js +15 -1
  66. package/dist/components/taskbar-actions-button2.js +3 -1
  67. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  68. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
  69. package/dist/esm/loader.js +1 -1
  70. package/dist/esm/{dataunit-fetcher-0fc935a0.js → pesquisa-fetcher-fa0c2540.js} +215 -27
  71. package/dist/esm/sankhyablocks.js +1 -1
  72. package/dist/esm/snk-actions-button_2.entry.js +5 -4
  73. package/dist/esm/snk-application.entry.js +32 -3
  74. package/dist/esm/snk-attach.entry.js +389 -58
  75. package/dist/esm/snk-crud.entry.js +2 -3
  76. package/dist/esm/snk-data-exporter.entry.js +3 -3
  77. package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
  78. package/dist/esm/snk-data-unit.entry.js +2 -2
  79. package/dist/esm/snk-detail-view.entry.js +4 -5
  80. package/dist/esm/snk-filter-bar.entry.js +25 -3
  81. package/dist/esm/snk-filter-item.entry.js +4 -47
  82. package/dist/esm/snk-filter-modal.entry.js +2 -1
  83. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  84. package/dist/esm/{snk-guides-viewer-98a8e45e.js → snk-guides-viewer-f49613c6.js} +2 -3
  85. package/dist/esm/snk-guides-viewer.entry.js +3 -4
  86. package/dist/esm/snk-pesquisa.entry.js +1 -1
  87. package/dist/esm/snk-simple-crud.entry.js +15 -4
  88. package/dist/sankhyablocks/p-02e3a45b.entry.js +1 -0
  89. package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
  90. package/dist/sankhyablocks/p-0ec5b2e5.js +1 -0
  91. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  92. package/dist/sankhyablocks/p-2582537c.entry.js +1 -0
  93. package/dist/sankhyablocks/p-282789a6.entry.js +1 -0
  94. package/dist/sankhyablocks/p-3b0e4e08.js +65 -0
  95. package/dist/sankhyablocks/{p-0874adb5.entry.js → p-40915359.entry.js} +1 -1
  96. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  97. package/dist/sankhyablocks/p-86801b08.entry.js +1 -0
  98. package/dist/sankhyablocks/p-96ef14f9.entry.js +1 -0
  99. package/dist/sankhyablocks/p-9b5944a4.entry.js +1 -0
  100. package/dist/sankhyablocks/p-9bdbc7d8.entry.js +1 -0
  101. package/dist/sankhyablocks/{p-90f9b4db.entry.js → p-a52b9254.entry.js} +3 -3
  102. package/dist/sankhyablocks/p-ac384baf.entry.js +1 -0
  103. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  104. package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
  105. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  106. package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
  107. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  108. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  109. package/dist/types/components/snk-application/snk-application.d.ts +7 -0
  110. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  111. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  112. package/dist/types/components/snk-attach/snk-attach.d.ts +27 -6
  113. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  114. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
  115. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  116. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  117. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  118. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
  119. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  120. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -2
  121. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -0
  122. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +7 -0
  123. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
  124. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -1
  125. package/dist/types/components.d.ts +74 -2
  126. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  127. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  128. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  129. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  130. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  131. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  132. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +1 -0
  133. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
  134. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  135. package/dist/types/lib/index.d.ts +1 -1
  136. package/package.json +5 -5
  137. package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
  138. package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
  139. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  140. package/dist/sankhyablocks/p-41560fd8.entry.js +0 -1
  141. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  142. package/dist/sankhyablocks/p-6678d5d4.entry.js +0 -1
  143. package/dist/sankhyablocks/p-71439fd9.entry.js +0 -1
  144. package/dist/sankhyablocks/p-7d8d7fe9.entry.js +0 -1
  145. package/dist/sankhyablocks/p-a91bb13d.js +0 -1
  146. package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
  147. package/dist/sankhyablocks/p-abfa8101.entry.js +0 -1
  148. package/dist/sankhyablocks/p-b3020263.entry.js +0 -1
  149. package/dist/sankhyablocks/p-bf93a748.js +0 -60
  150. package/dist/sankhyablocks/p-c6f89389.entry.js +0 -1
  151. package/dist/sankhyablocks/p-cebae710.entry.js +0 -1
  152. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  153. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  154. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  155. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  156. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  157. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  158. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  159. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -8,9 +8,8 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
9
9
  const DataFetcher = require('./DataFetcher-ba94ed5b.js');
10
10
  const authFetcher = require('./auth-fetcher-c8467c07.js');
11
- const dataunitFetcher = require('./dataunit-fetcher-353e4af2.js');
12
- const pesquisaFetcher = require('./pesquisa-fetcher-ef050a47.js');
13
- const SnkMessageBuilder = require('./SnkMessageBuilder-7293d0ad.js');
11
+ const pesquisaFetcher = require('./pesquisa-fetcher-e4a7c4c3.js');
12
+ const SnkMessageBuilder = require('./SnkMessageBuilder-e7dcf408.js');
14
13
  require('./form-config-fetcher-df043d3d.js');
15
14
  require('./filter-item-type.enum-a7ffdaa6.js');
16
15
  require('./PrintUtils-bcaeb82f.js');
@@ -31,7 +30,22 @@ const _0x5b7870=_0x2202;(function(_0x42e134,_0x5d9727){const _0x185c97=_0x2202,_
31
30
 
32
31
  class ParametersFetcher {
33
32
  constructor() {
33
+ this._embeddedParams = new Map();
34
34
  this.templateByQuery = new Map();
35
+ try {
36
+ if (window["MGE_PARAMS"] != undefined) {
37
+ const source = atob(window['MGE_PARAMS']);
38
+ const params = source.split('__;__');
39
+ params.forEach(param => {
40
+ const [key, value] = param.split("__=__");
41
+ this._embeddedParams.set(key, value);
42
+ });
43
+ }
44
+ }
45
+ catch (error) {
46
+ console.error("Problemas ao obter parâmetros embarcados");
47
+ console.error(error);
48
+ }
35
49
  this.buldTemplates();
36
50
  }
37
51
  buldTemplates() {
@@ -43,6 +57,9 @@ class ParametersFetcher {
43
57
  }`);
44
58
  }
45
59
  async getParam(name) {
60
+ if (this._embeddedParams.has(name)) {
61
+ return Promise.resolve(this._embeddedParams.get(name));
62
+ }
46
63
  const completPath = `param://application?params=${name}`;
47
64
  return DataFetcher.DataFetcher.get().callGraphQL({
48
65
  values: { name: completPath },
@@ -80,6 +97,9 @@ class ParametersFetcher {
80
97
  if (Array.isArray(obj) && obj.length > 0) {
81
98
  obj = obj[0];
82
99
  }
100
+ if (typeof obj === "string") {
101
+ return obj;
102
+ }
83
103
  if (core.StringUtils.isEmpty(obj.resource))
84
104
  return "";
85
105
  try {
@@ -765,7 +785,7 @@ const SnkApplication = class {
765
785
  }
766
786
  get dataUnitFetcher() {
767
787
  if (!this._dataUnitFetcher) {
768
- this._dataUnitFetcher = new dataunitFetcher.DataUnitFetcher();
788
+ this._dataUnitFetcher = new pesquisaFetcher.DataUnitFetcher();
769
789
  }
770
790
  return this._dataUnitFetcher;
771
791
  }
@@ -1004,6 +1024,15 @@ const SnkApplication = class {
1004
1024
  this._waitingAppReady.push(() => resolve(this));
1005
1025
  });
1006
1026
  }
1027
+ /**
1028
+ * Atribui valor para parâmetros de contexto no componente de pesquisa.
1029
+ *
1030
+ * @param name - Nome do parâmetro
1031
+ * @param value - String conversível de acordo com o tipo do parâmetro
1032
+ */
1033
+ async setSearchFilterContext(name, value) {
1034
+ core.ApplicationContext.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${name})__`, value);
1035
+ }
1007
1036
  clearContent(container) {
1008
1037
  if (container) {
1009
1038
  Array.from(container.children).forEach(child => {