@sankhyalabs/sankhyablocks 1.3.34 → 1.4.0-beta.1

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