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