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