@sankhyalabs/sankhyablocks 1.3.31-beta.1 → 1.3.31-beta.10

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 (79) hide show
  1. package/dist/cjs/{index-1133bc2a.js → index-c6671817.js} +416 -9
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  4. package/dist/cjs/snk-application.cjs.entry.js +280 -107
  5. package/dist/cjs/snk-crud.cjs.entry.js +64 -0
  6. package/dist/cjs/snk-data-unit.cjs.entry.js +218 -0
  7. package/dist/cjs/snk-form_2.cjs.entry.js +170 -0
  8. package/dist/cjs/snk-pesquisa.cjs.entry.js +6 -3
  9. package/dist/cjs/snk-taskbar.cjs.entry.js +140 -0
  10. package/dist/cjs/taskbar-elements-7f99f0c9.js +70 -0
  11. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  12. package/dist/collection/collection-manifest.json +5 -0
  13. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +2 -2
  14. package/dist/collection/components/snk-application/snk-application.js +237 -62
  15. package/dist/collection/components/snk-crud/snk-crud.css +5 -0
  16. package/dist/collection/components/snk-crud/snk-crud.js +149 -0
  17. package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
  18. package/dist/collection/components/snk-data-unit/snk-data-unit.js +492 -0
  19. package/dist/collection/components/snk-form/snk-form.css +34 -0
  20. package/dist/collection/components/snk-form/snk-form.js +230 -0
  21. package/dist/collection/components/snk-grid/snk-grid.css +5 -0
  22. package/dist/collection/components/snk-grid/snk-grid.js +148 -0
  23. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +56 -13
  24. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +5 -1
  25. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +65 -0
  26. package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
  27. package/dist/collection/components/snk-taskbar/snk-taskbar.js +252 -0
  28. package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +52 -21
  29. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +4 -3
  30. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +2 -0
  31. package/dist/components/snk-application2.js +280 -106
  32. package/dist/components/snk-crud.d.ts +11 -0
  33. package/dist/components/snk-crud.js +102 -0
  34. package/dist/components/snk-data-unit.d.ts +11 -0
  35. package/dist/components/snk-data-unit.js +242 -0
  36. package/dist/components/snk-form.d.ts +11 -0
  37. package/dist/components/snk-form.js +6 -0
  38. package/dist/components/snk-form2.js +134 -0
  39. package/dist/components/snk-grid.d.ts +11 -0
  40. package/dist/components/snk-grid.js +6 -0
  41. package/dist/components/snk-grid2.js +91 -0
  42. package/dist/components/snk-pesquisa2.js +5 -2
  43. package/dist/components/snk-taskbar.d.ts +11 -0
  44. package/dist/components/snk-taskbar.js +6 -0
  45. package/dist/components/snk-taskbar2.js +221 -0
  46. package/dist/esm/{index-ffda6382.js → index-6a83ac96.js} +416 -10
  47. package/dist/esm/loader.js +2 -2
  48. package/dist/esm/sankhyablocks.js +2 -2
  49. package/dist/esm/snk-application.entry.js +280 -107
  50. package/dist/esm/snk-crud.entry.js +60 -0
  51. package/dist/esm/snk-data-unit.entry.js +214 -0
  52. package/dist/esm/snk-form_2.entry.js +165 -0
  53. package/dist/esm/snk-pesquisa.entry.js +6 -3
  54. package/dist/esm/snk-taskbar.entry.js +136 -0
  55. package/dist/esm/taskbar-elements-e0b8a285.js +68 -0
  56. package/dist/esm/teste-pesquisa.entry.js +1 -1
  57. package/dist/sankhyablocks/p-18fe0469.entry.js +69 -0
  58. package/dist/sankhyablocks/p-4c7b32d6.entry.js +1 -0
  59. package/dist/sankhyablocks/p-5b5afdbe.entry.js +1 -0
  60. package/dist/sankhyablocks/p-7fe9e5c2.entry.js +1 -0
  61. package/dist/sankhyablocks/p-8650ae26.entry.js +1 -0
  62. package/dist/sankhyablocks/p-a5439706.js +1 -0
  63. package/dist/sankhyablocks/p-c3d20542.entry.js +1 -0
  64. package/dist/sankhyablocks/p-cd1dc099.js +2 -0
  65. package/dist/sankhyablocks/{p-2a7b4cb3.entry.js → p-d25637c9.entry.js} +1 -1
  66. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  67. package/dist/types/components/snk-application/snk-application.d.ts +103 -15
  68. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +25 -0
  69. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +45 -0
  70. package/dist/types/components.d.ts +381 -6
  71. package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +2 -0
  72. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -3
  73. package/package.json +5 -5
  74. package/react/components.d.ts +5 -0
  75. package/react/components.js +5 -0
  76. package/react/components.js.map +1 -1
  77. package/dist/sankhyablocks/p-d62412bb.entry.js +0 -1
  78. package/dist/sankhyablocks/p-e6e91d5f.entry.js +0 -69
  79. package/dist/sankhyablocks/p-edcb9d8e.js +0 -2
@@ -1,5 +1,6 @@
1
1
  import { Component, h, Method, Event } 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,15 @@ 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
18
  export class SnkApplication {
19
19
  constructor() {
20
+ this._authPromises = [];
21
+ this._duCache = new Map();
22
+ this._duPromises = new Map();
20
23
  this._requestListener = new RequestListenerLoadingBar();
21
24
  }
22
25
  get parameters() {
@@ -35,18 +38,31 @@ export class SnkApplication {
35
38
  return this._resourceID;
36
39
  }
37
40
  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
- });
41
+ if (this._auth) {
42
+ return Promise.resolve(this._auth);
43
+ }
44
+ else {
45
+ return new Promise((resolve, reject) => {
46
+ const waitingAuth = this._authPromises.length > 0;
47
+ this._authPromises.push(new PendingPromise(resolve, reject));
48
+ if (!waitingAuth) {
49
+ this.authFetcher.getData(this._resourceID).then((authList) => {
50
+ this._auth = authList;
51
+ while (this._authPromises.length > 0) {
52
+ this._authPromises.pop().resolve(this._auth);
53
+ }
54
+ }).catch(error => {
55
+ while (this._authPromises.length > 0) {
56
+ this._authPromises.pop().reject(error);
57
+ }
58
+ });
59
+ }
60
+ });
61
+ }
49
62
  }
63
+ /**
64
+ * Caso o usuário logado seja o SUP.
65
+ */
50
66
  async isUserSup() {
51
67
  return new Promise((resolve, reject) => {
52
68
  this.auth.then((authorization) => {
@@ -56,6 +72,9 @@ export class SnkApplication {
56
72
  });
57
73
  });
58
74
  }
75
+ /**
76
+ * Se o usuário logado tem permissão pra determinada ação.
77
+ */
59
78
  async hasAccess(access) {
60
79
  return new Promise((resolve, reject) => {
61
80
  this.auth.then((authorization) => {
@@ -65,6 +84,9 @@ export class SnkApplication {
65
84
  });
66
85
  });
67
86
  }
87
+ /**
88
+ * Retorna todos os acessos do usuário logado.
89
+ */
68
90
  async getAllAccess() {
69
91
  return new Promise((resolve, reject) => {
70
92
  this.auth.then((authorization) => {
@@ -79,34 +101,54 @@ export class SnkApplication {
79
101
  });
80
102
  });
81
103
  }
82
- async getAuthList(_auth) {
83
- return await (new MGEAuthorization()).parseFromJSON(_auth);
84
- }
104
+ /**
105
+ * Retorna o valor de um parâmetro do tipo string.
106
+ */
85
107
  async getStringParam(name) {
86
108
  return this.parameters.asString(name, this.resourceID);
87
109
  }
110
+ /**
111
+ * Retorna o valor de um parâmetro do tipo Inteiro.
112
+ */
88
113
  async getIntParam(name) {
89
114
  return this.parameters.asInteger(name, this.resourceID);
90
115
  }
116
+ /**
117
+ * Retorna o valor de um parâmetro do tipo Decimal.
118
+ */
91
119
  async getFloatParam(name) {
92
120
  return this.parameters.asFloat(name, this.resourceID);
93
121
  }
122
+ /**
123
+ * Retorna o valor de um parâmetro do tipo booleano.
124
+ */
94
125
  async getBooleanParam(name) {
95
126
  return this.parameters.asBoolean(name, this.resourceID);
96
127
  }
128
+ /**
129
+ * Retorna o valor de um parâmetro do tipo data.
130
+ */
97
131
  async getDateParam(name) {
98
132
  return this.parameters.asDate(name, this.resourceID);
99
133
  }
134
+ /**
135
+ * Mostra o conteúdo passado em um Popup
136
+ */
100
137
  async showPopUp(content) {
138
+ this.clearPopUpContent();
101
139
  this._popUp.appendChild(content);
102
- this._popUp["opened"] = true;
140
+ this._popUp.opened = true;
103
141
  }
142
+ /**
143
+ * Fecha o popup, liberando o conteúdo.
144
+ */
104
145
  async closePopUp() {
105
- Array.from(this._popUp.children).forEach(c => {
106
- this._popUp.removeChild(c);
107
- });
108
- this._popUp["opened"] = false;
146
+ this.clearPopUpContent();
147
+ this._popUp.opened = false;
109
148
  }
149
+ /**
150
+ * Verifica se a licença do cliente tem determinado opcional (produto)
151
+ */
110
152
  async temOpcional(opcional) {
111
153
  const opts = opcional.split(",");
112
154
  return new Promise((resolve, reject) => {
@@ -130,6 +172,10 @@ export class SnkApplication {
130
172
  });
131
173
  });
132
174
  }
175
+ /**
176
+ * Retorna a configuração de um recurso por service broker
177
+ * Veja também o método "loadConfig"
178
+ */
133
179
  async getConfig(key) {
134
180
  let payload = {
135
181
  "serviceName": "SystemUtilsSP.getConf",
@@ -147,6 +193,9 @@ export class SnkApplication {
147
193
  .catch(error => reject(error));
148
194
  });
149
195
  }
196
+ /**
197
+ * Salva a configuração de determinado recurso.
198
+ */
150
199
  async saveConfig(key, data) {
151
200
  let payload = {
152
201
  "serviceName": "SystemUtilsSP.saveConf",
@@ -165,42 +214,122 @@ export class SnkApplication {
165
214
  .catch(error => reject(error));
166
215
  });
167
216
  }
217
+ /**
218
+ * Acessa informações de contexto "empurrados" na abertura da tela
219
+ */
168
220
  async getAttributeFromHTMLWrapper(attribName) {
169
221
  return Promise.resolve(window[attribName]);
170
222
  }
223
+ /**
224
+ * Abre determinada tela, repassando pkObject
225
+ */
171
226
  async openApp(resourceId, pkObject) {
172
227
  Workspace.openAppActivity(resourceId, pkObject);
173
228
  }
174
- async createDataunit(entityName) {
175
- return new Promise(resolve => {
176
- const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID);
177
- dataUnit.loadMetadata().then(() => resolve(dataUnit));
229
+ getDuPromissesStack(dataUnitName) {
230
+ let stack;
231
+ if (dataUnitName) {
232
+ stack = this._duPromises.get(dataUnitName);
233
+ if (!stack) {
234
+ stack = [];
235
+ this._duPromises.set(dataUnitName, stack);
236
+ }
237
+ }
238
+ return stack || [];
239
+ }
240
+ /**
241
+ * Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
242
+ * passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
243
+ */
244
+ async createDataunit(entityName, dataUnitName) {
245
+ return new Promise((resolve, reject) => {
246
+ const duPromisses = this.getDuPromissesStack(dataUnitName);
247
+ const waitingDu = duPromisses.length > 0;
248
+ duPromisses.push(new PendingPromise(resolve, reject));
249
+ if (!waitingDu) {
250
+ const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, this.resourceID);
251
+ dataUnit.loadMetadata().then(() => {
252
+ if (dataUnitName) {
253
+ this._duCache.set(dataUnitName, dataUnit);
254
+ }
255
+ while (duPromisses.length > 0) {
256
+ duPromisses.pop().resolve(dataUnit);
257
+ }
258
+ }).catch(reason => {
259
+ while (duPromisses.length > 0) {
260
+ duPromisses.pop().reject(reason);
261
+ }
262
+ });
263
+ }
264
+ });
265
+ }
266
+ /**
267
+ * Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
268
+ */
269
+ async getDataUnit(entityName, dataUnitName) {
270
+ return new Promise((resolve, reject) => {
271
+ const dataUnit = this._duCache.get(dataUnitName);
272
+ if (dataUnit) {
273
+ resolve(dataUnit);
274
+ }
275
+ else {
276
+ this.createDataunit(entityName, dataUnitName).then(dataUnit => {
277
+ resolve(dataUnit);
278
+ }).catch(reason => reject(reason));
279
+ }
178
280
  });
179
281
  }
282
+ /**
283
+ * Retorna o resourceID da tela em questão.
284
+ */
180
285
  async getResourceID() {
181
286
  return Promise.resolve(this.resourceID);
182
287
  }
288
+ /**
289
+ * Mostra o diálogo de alerta de acordo com os parâmetros passados.
290
+ */
183
291
  async alert(title, message, icon, options) {
184
292
  return ApplicationUtils.alert(title, message, icon, options);
185
293
  }
294
+ /**
295
+ * Mostra o diálogo de erro de acordo com os parâmetros passados.
296
+ */
186
297
  async error(title, message, icon, options) {
187
298
  return ApplicationUtils.error(title, message, icon, options);
188
299
  }
300
+ /**
301
+ * Exibe um diálogo de confirmação
302
+ */
189
303
  async confirm(title, message, icon, critical, options) {
190
304
  return ApplicationUtils.confirm(title, message, icon, critical, options);
191
305
  }
306
+ /**
307
+ * Mostra uma informação efêmera (de segundo plano).
308
+ */
192
309
  async info(message, options) {
193
310
  return ApplicationUtils.info(message, options);
194
311
  }
312
+ /**
313
+ * Busca a configuração de formulário.
314
+ */
195
315
  async loadFormConfig(name) {
196
316
  return this.formConfigFetcher.loadFormConfig(name, this.resourceID);
197
317
  }
198
- async loadGridConfig() {
199
- return this.gridConfigFetcher.getConfig(this.resourceID);
318
+ /**
319
+ * Busca a configuração de grade.
320
+ */
321
+ async loadGridConfig(name) {
322
+ return this.gridConfigFetcher.getConfig(name, this.resourceID);
200
323
  }
324
+ /**
325
+ * Salva a configuração de grade.
326
+ */
201
327
  async saveGridConfig(config) {
202
328
  return this.gridConfigFetcher.saveConfig(config, this.resourceID);
203
329
  }
330
+ async getAuthList(_auth) {
331
+ return await (new MGEAuthorization()).parseFromJSON(_auth);
332
+ }
204
333
  get urlParams() {
205
334
  if (!this._urlParams) {
206
335
  this._urlParams = UrlUtils.getQueryParams(location.search);
@@ -280,7 +409,7 @@ export class SnkApplication {
280
409
  pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(ENTITYNAME, text, criteria, searchOptions);
281
410
  pesquisaContent.selectItem = (option) => {
282
411
  accept(option);
283
- this.cleanPopUpTitle();
412
+ this.clearPopUpTitle();
284
413
  this.closePopUp();
285
414
  };
286
415
  this.setPopUpTitle(DESCRIPTIONENTITY);
@@ -297,11 +426,18 @@ export class SnkApplication {
297
426
  accept(window['isDebugMode']);
298
427
  });
299
428
  }
300
- cleanPopUpTitle() {
301
- this._popUp['ezTitle'] = "";
429
+ clearPopUpContent() {
430
+ if (this._popUp) {
431
+ Array.from(this._popUp.children).forEach(c => {
432
+ this._popUp.removeChild(c);
433
+ });
434
+ }
435
+ }
436
+ clearPopUpTitle() {
437
+ this._popUp.ezTitle = "";
302
438
  }
303
439
  setPopUpTitle(title) {
304
- this._popUp['ezTitle'] = title;
440
+ this._popUp.ezTitle = title;
305
441
  }
306
442
  componentWillLoad() {
307
443
  this._errorHandler = new SnkErrorHandler(this);
@@ -313,6 +449,7 @@ export class SnkApplication {
313
449
  ErrorTracking.init();
314
450
  }
315
451
  connectedCallback() {
452
+ ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
316
453
  DataFetcher.addRequestListener(this._requestListener);
317
454
  }
318
455
  disconnectedCallback() {
@@ -360,7 +497,7 @@ export class SnkApplication {
360
497
  "composed": true,
361
498
  "docs": {
362
499
  "tags": [],
363
- "text": "Evento"
500
+ "text": "Evento disparado ao iniciar a carga do componente"
364
501
  },
365
502
  "complexType": {
366
503
  "original": "boolean",
@@ -381,7 +518,7 @@ export class SnkApplication {
381
518
  "return": "Promise<boolean>"
382
519
  },
383
520
  "docs": {
384
- "text": "",
521
+ "text": "Caso o usu\u00E1rio logado seja o SUP.",
385
522
  "tags": []
386
523
  }
387
524
  },
@@ -404,7 +541,7 @@ export class SnkApplication {
404
541
  "return": "Promise<boolean>"
405
542
  },
406
543
  "docs": {
407
- "text": "",
544
+ "text": "Se o usu\u00E1rio logado tem permiss\u00E3o pra determinada a\u00E7\u00E3o.",
408
545
  "tags": []
409
546
  }
410
547
  },
@@ -420,7 +557,7 @@ export class SnkApplication {
420
557
  "return": "Promise<any>"
421
558
  },
422
559
  "docs": {
423
- "text": "",
560
+ "text": "Retorna todos os acessos do usu\u00E1rio logado.",
424
561
  "tags": []
425
562
  }
426
563
  },
@@ -439,7 +576,7 @@ export class SnkApplication {
439
576
  "return": "Promise<string>"
440
577
  },
441
578
  "docs": {
442
- "text": "",
579
+ "text": "Retorna o valor de um par\u00E2metro do tipo string.",
443
580
  "tags": []
444
581
  }
445
582
  },
@@ -458,7 +595,7 @@ export class SnkApplication {
458
595
  "return": "Promise<number>"
459
596
  },
460
597
  "docs": {
461
- "text": "",
598
+ "text": "Retorna o valor de um par\u00E2metro do tipo Inteiro.",
462
599
  "tags": []
463
600
  }
464
601
  },
@@ -477,7 +614,7 @@ export class SnkApplication {
477
614
  "return": "Promise<number>"
478
615
  },
479
616
  "docs": {
480
- "text": "",
617
+ "text": "Retorna o valor de um par\u00E2metro do tipo Decimal.",
481
618
  "tags": []
482
619
  }
483
620
  },
@@ -496,7 +633,7 @@ export class SnkApplication {
496
633
  "return": "Promise<boolean>"
497
634
  },
498
635
  "docs": {
499
- "text": "",
636
+ "text": "Retorna o valor de um par\u00E2metro do tipo booleano.",
500
637
  "tags": []
501
638
  }
502
639
  },
@@ -518,7 +655,7 @@ export class SnkApplication {
518
655
  "return": "Promise<Date>"
519
656
  },
520
657
  "docs": {
521
- "text": "",
658
+ "text": "Retorna o valor de um par\u00E2metro do tipo data.",
522
659
  "tags": []
523
660
  }
524
661
  },
@@ -540,7 +677,7 @@ export class SnkApplication {
540
677
  "return": "Promise<void>"
541
678
  },
542
679
  "docs": {
543
- "text": "",
680
+ "text": "Mostra o conte\u00FAdo passado em um Popup",
544
681
  "tags": []
545
682
  }
546
683
  },
@@ -556,7 +693,7 @@ export class SnkApplication {
556
693
  "return": "Promise<void>"
557
694
  },
558
695
  "docs": {
559
- "text": "",
696
+ "text": "Fecha o popup, liberando o conte\u00FAdo.",
560
697
  "tags": []
561
698
  }
562
699
  },
@@ -575,7 +712,7 @@ export class SnkApplication {
575
712
  "return": "Promise<boolean>"
576
713
  },
577
714
  "docs": {
578
- "text": "",
715
+ "text": "Verifica se a licen\u00E7a do cliente tem determinado opcional (produto)",
579
716
  "tags": []
580
717
  }
581
718
  },
@@ -594,7 +731,7 @@ export class SnkApplication {
594
731
  "return": "Promise<any>"
595
732
  },
596
733
  "docs": {
597
- "text": "",
734
+ "text": "Retorna a configura\u00E7\u00E3o de um recurso por service broker\nVeja tamb\u00E9m o m\u00E9todo \"loadConfig\"",
598
735
  "tags": []
599
736
  }
600
737
  },
@@ -619,7 +756,7 @@ export class SnkApplication {
619
756
  "return": "Promise<any>"
620
757
  },
621
758
  "docs": {
622
- "text": "",
759
+ "text": "Salva a configura\u00E7\u00E3o de determinado recurso.",
623
760
  "tags": []
624
761
  }
625
762
  },
@@ -638,7 +775,7 @@ export class SnkApplication {
638
775
  "return": "Promise<string>"
639
776
  },
640
777
  "docs": {
641
- "text": "",
778
+ "text": "Acessa informa\u00E7\u00F5es de contexto \"empurrados\" na abertura da tela",
642
779
  "tags": []
643
780
  }
644
781
  },
@@ -663,16 +800,19 @@ export class SnkApplication {
663
800
  "return": "Promise<void>"
664
801
  },
665
802
  "docs": {
666
- "text": "",
803
+ "text": "Abre determinada tela, repassando pkObject",
667
804
  "tags": []
668
805
  }
669
806
  },
670
807
  "createDataunit": {
671
808
  "complexType": {
672
- "signature": "(entityName: string) => Promise<DataUnit>",
809
+ "signature": "(entityName: string, dataUnitName?: string) => Promise<DataUnit>",
673
810
  "parameters": [{
674
811
  "tags": [],
675
812
  "text": ""
813
+ }, {
814
+ "tags": [],
815
+ "text": ""
676
816
  }],
677
817
  "references": {
678
818
  "Promise": {
@@ -686,7 +826,33 @@ export class SnkApplication {
686
826
  "return": "Promise<DataUnit>"
687
827
  },
688
828
  "docs": {
689
- "text": "",
829
+ "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",
830
+ "tags": []
831
+ }
832
+ },
833
+ "getDataUnit": {
834
+ "complexType": {
835
+ "signature": "(entityName: string, dataUnitName: string) => Promise<DataUnit>",
836
+ "parameters": [{
837
+ "tags": [],
838
+ "text": ""
839
+ }, {
840
+ "tags": [],
841
+ "text": ""
842
+ }],
843
+ "references": {
844
+ "Promise": {
845
+ "location": "global"
846
+ },
847
+ "DataUnit": {
848
+ "location": "import",
849
+ "path": "@sankhyalabs/core"
850
+ }
851
+ },
852
+ "return": "Promise<DataUnit>"
853
+ },
854
+ "docs": {
855
+ "text": "Obtem um DataUnit do cache ou cria um caso ainda n\u00E3o tenha sido criado.",
690
856
  "tags": []
691
857
  }
692
858
  },
@@ -702,7 +868,7 @@ export class SnkApplication {
702
868
  "return": "Promise<string>"
703
869
  },
704
870
  "docs": {
705
- "text": "",
871
+ "text": "Retorna o resourceID da tela em quest\u00E3o.",
706
872
  "tags": []
707
873
  }
708
874
  },
@@ -734,7 +900,7 @@ export class SnkApplication {
734
900
  "return": "Promise<boolean>"
735
901
  },
736
902
  "docs": {
737
- "text": "",
903
+ "text": "Mostra o di\u00E1logo de alerta de acordo com os par\u00E2metros passados.",
738
904
  "tags": []
739
905
  }
740
906
  },
@@ -766,7 +932,7 @@ export class SnkApplication {
766
932
  "return": "Promise<boolean>"
767
933
  },
768
934
  "docs": {
769
- "text": "",
935
+ "text": "Mostra o di\u00E1logo de erro de acordo com os par\u00E2metros passados.",
770
936
  "tags": []
771
937
  }
772
938
  },
@@ -801,7 +967,7 @@ export class SnkApplication {
801
967
  "return": "Promise<boolean>"
802
968
  },
803
969
  "docs": {
804
- "text": "",
970
+ "text": "Exibe um di\u00E1logo de confirma\u00E7\u00E3o",
805
971
  "tags": []
806
972
  }
807
973
  },
@@ -827,7 +993,7 @@ export class SnkApplication {
827
993
  "return": "Promise<void>"
828
994
  },
829
995
  "docs": {
830
- "text": "",
996
+ "text": "Mostra uma informa\u00E7\u00E3o ef\u00EAmera (de segundo plano).",
831
997
  "tags": []
832
998
  }
833
999
  },
@@ -853,33 +1019,36 @@ export class SnkApplication {
853
1019
  "return": "Promise<FieldConfig[]>"
854
1020
  },
855
1021
  "docs": {
856
- "text": "",
1022
+ "text": "Busca a configura\u00E7\u00E3o de formul\u00E1rio.",
857
1023
  "tags": []
858
1024
  }
859
1025
  },
860
1026
  "loadGridConfig": {
861
1027
  "complexType": {
862
- "signature": "() => Promise<EzGridConfig>",
863
- "parameters": [],
1028
+ "signature": "(name: string) => Promise<IGridConfig>",
1029
+ "parameters": [{
1030
+ "tags": [],
1031
+ "text": ""
1032
+ }],
864
1033
  "references": {
865
1034
  "Promise": {
866
1035
  "location": "global"
867
1036
  },
868
- "EzGridConfig": {
1037
+ "IGridConfig": {
869
1038
  "location": "import",
870
1039
  "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
871
1040
  }
872
1041
  },
873
- "return": "Promise<EzGridConfig>"
1042
+ "return": "Promise<IGridConfig>"
874
1043
  },
875
1044
  "docs": {
876
- "text": "",
1045
+ "text": "Busca a configura\u00E7\u00E3o de grade.",
877
1046
  "tags": []
878
1047
  }
879
1048
  },
880
1049
  "saveGridConfig": {
881
1050
  "complexType": {
882
- "signature": "(config: EzGridConfig) => Promise<boolean>",
1051
+ "signature": "(config: IGridConfig) => Promise<boolean>",
883
1052
  "parameters": [{
884
1053
  "tags": [],
885
1054
  "text": ""
@@ -888,7 +1057,7 @@ export class SnkApplication {
888
1057
  "Promise": {
889
1058
  "location": "global"
890
1059
  },
891
- "EzGridConfig": {
1060
+ "IGridConfig": {
892
1061
  "location": "import",
893
1062
  "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
894
1063
  }
@@ -896,7 +1065,7 @@ export class SnkApplication {
896
1065
  "return": "Promise<boolean>"
897
1066
  },
898
1067
  "docs": {
899
- "text": "",
1068
+ "text": "Salva a configura\u00E7\u00E3o de grade.",
900
1069
  "tags": []
901
1070
  }
902
1071
  },
@@ -984,3 +1153,9 @@ class RequestListenerLoadingBar {
984
1153
  }
985
1154
  ;
986
1155
  }
1156
+ class PendingPromise {
1157
+ constructor(resolve, reject) {
1158
+ this.resolve = resolve;
1159
+ this.reject = reject;
1160
+ }
1161
+ }
@@ -0,0 +1,5 @@
1
+ :host {
2
+ display: flex;
3
+ height: 100%;
4
+ width: 100%;
5
+ }