@sankhyalabs/sankhyablocks 1.3.31-beta.2 → 1.3.31-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/SnkMessageBuilder-7717f1e4.js +326 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/css-shim-b8158822.js +6 -0
- package/dist/cjs/dom-36862b77.js +75 -0
- package/dist/cjs/filter-item-type.enum-e2e1bc5b.js +14 -0
- package/dist/cjs/index-02201bc9.js +2397 -0
- package/dist/cjs/index-b0b676c5.js +3298 -0
- package/dist/cjs/loader.cjs.js +19 -3
- package/dist/cjs/sankhyablocks.cjs.js +117 -5
- package/dist/cjs/shadow-css-346c0795.js +389 -0
- package/dist/cjs/snk-application.cjs.entry.js +1041 -177
- package/dist/cjs/snk-crud.cjs.entry.js +65 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +276 -0
- package/dist/cjs/snk-filter-bar.cjs.entry.js +265 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +47 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +49 -0
- package/dist/cjs/snk-filter-item.cjs.entry.js +143 -0
- package/dist/cjs/snk-filter-list.cjs.entry.js +91 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +23 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js +24 -0
- package/dist/cjs/snk-filter-period.cjs.entry.js +26 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +44 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js +22 -0
- package/dist/cjs/snk-form.cjs.entry.js +133 -0
- package/dist/cjs/snk-grid.cjs.entry.js +79 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +10 -7
- package/dist/cjs/snk-taskbar.cjs.entry.js +160 -0
- package/dist/cjs/taskbar-elements-283c737e.js +93 -0
- package/dist/cjs/taskbar-processor-6bd0d35c.js +47 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +5 -5
- package/dist/collection/collection-manifest.json +17 -2
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +9 -2
- package/dist/collection/components/snk-application/snk-application.js +1061 -629
- package/dist/collection/components/snk-crud/snk-crud.css +6 -0
- package/dist/collection/components/snk-crud/snk-crud.js +176 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +540 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +88 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +64 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +65 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +69 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +118 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +63 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +10 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +118 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +244 -0
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +233 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +114 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +323 -0
- package/dist/collection/components/snk-form/snk-form.css +34 -0
- package/dist/collection/components/snk-form/snk-form.js +258 -0
- package/dist/collection/components/snk-grid/snk-grid.css +18 -0
- package/dist/collection/components/snk-grid/snk-grid.js +183 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +56 -13
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +81 -76
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +86 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +43 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +307 -0
- package/dist/collection/components/teste-pesquisa/teste-pesquisa.js +12 -9
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +38 -13
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +52 -21
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +388 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +4 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js +47 -0
- package/dist/collection/lib/index.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +121 -0
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +23 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +18 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +10 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +17 -0
- package/dist/components/SnkMessageBuilder.js +303 -0
- package/dist/components/filter-item-type.enum.js +12 -0
- package/dist/components/index.d.ts +18 -5
- package/dist/components/index.js +22 -0
- package/dist/components/index2.js +2384 -0
- package/dist/components/snk-application2.js +1019 -148
- package/dist/components/snk-crud.d.ts +11 -0
- package/dist/components/snk-crud.js +127 -0
- package/dist/components/snk-data-unit.d.ts +11 -0
- package/dist/components/snk-data-unit.js +299 -0
- package/dist/components/snk-filter-bar.d.ts +11 -0
- package/dist/components/snk-filter-bar.js +6 -0
- package/dist/components/snk-filter-bar2.js +296 -0
- package/dist/components/snk-filter-binary-select.d.ts +11 -0
- package/dist/components/snk-filter-binary-select.js +63 -0
- package/dist/components/snk-filter-detail.d.ts +11 -0
- package/dist/components/snk-filter-detail.js +6 -0
- package/dist/components/snk-filter-detail2.js +63 -0
- package/dist/components/snk-filter-item.d.ts +11 -0
- package/dist/components/snk-filter-item.js +6 -0
- package/dist/components/snk-filter-item2.js +164 -0
- package/dist/components/snk-filter-list.d.ts +11 -0
- package/dist/components/snk-filter-list.js +6 -0
- package/dist/components/snk-filter-list2.js +111 -0
- package/dist/components/snk-filter-multi-select.d.ts +11 -0
- package/dist/components/snk-filter-multi-select.js +39 -0
- package/dist/components/snk-filter-number.d.ts +11 -0
- package/dist/components/snk-filter-number.js +40 -0
- package/dist/components/snk-filter-period.d.ts +11 -0
- package/dist/components/snk-filter-period.js +42 -0
- package/dist/components/snk-filter-search.d.ts +11 -0
- package/dist/components/snk-filter-search.js +62 -0
- package/dist/components/snk-filter-text.d.ts +11 -0
- package/dist/components/snk-filter-text.js +38 -0
- package/dist/components/snk-form.d.ts +11 -0
- package/dist/components/snk-form.js +6 -0
- package/dist/components/snk-form2.js +159 -0
- package/dist/components/snk-grid.d.ts +11 -0
- package/dist/components/snk-grid.js +6 -0
- package/dist/components/snk-grid2.js +126 -0
- package/dist/components/snk-pesquisa2.js +6 -3
- package/dist/components/snk-taskbar.d.ts +11 -0
- package/dist/components/snk-taskbar.js +6 -0
- package/dist/components/snk-taskbar2.js +264 -0
- package/dist/components/taskbar-processor.js +45 -0
- package/dist/components/teste-pesquisa.js +1 -1
- package/dist/esm/SnkMessageBuilder-a7da466b.js +303 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/css-shim-b3f2ee8d.js +4 -0
- package/dist/esm/dom-665d6011.js +73 -0
- package/dist/esm/filter-item-type.enum-61fbf80a.js +12 -0
- package/dist/esm/index-2b4d2d14.js +3262 -0
- package/dist/esm/index-e5b61043.js +2384 -0
- package/dist/esm/loader.js +19 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/sankhyablocks.js +117 -5
- package/dist/esm/shadow-css-b18e99d7.js +387 -0
- package/dist/esm/snk-application.entry.js +1013 -149
- package/dist/esm/snk-crud.entry.js +61 -0
- package/dist/esm/snk-data-unit.entry.js +272 -0
- package/dist/esm/snk-filter-bar.entry.js +261 -0
- package/dist/esm/snk-filter-binary-select.entry.js +43 -0
- package/dist/esm/snk-filter-detail.entry.js +45 -0
- package/dist/esm/snk-filter-item.entry.js +139 -0
- package/dist/esm/snk-filter-list.entry.js +87 -0
- package/dist/esm/snk-filter-multi-select.entry.js +19 -0
- package/dist/esm/snk-filter-number.entry.js +20 -0
- package/dist/esm/snk-filter-period.entry.js +22 -0
- package/dist/esm/snk-filter-search.entry.js +40 -0
- package/dist/esm/snk-filter-text.entry.js +18 -0
- package/dist/esm/snk-form.entry.js +129 -0
- package/dist/esm/snk-grid.entry.js +75 -0
- package/dist/esm/snk-pesquisa.entry.js +7 -4
- package/dist/esm/snk-taskbar.entry.js +156 -0
- package/dist/esm/taskbar-elements-35d64ff9.js +90 -0
- package/dist/esm/taskbar-processor-aa6772c9.js +45 -0
- package/dist/esm/teste-pesquisa.entry.js +2 -2
- package/dist/sankhyablocks/SnkMessageBuilder-a7da466b.js +303 -0
- package/dist/sankhyablocks/app-globals-0f993ce5.js +3 -0
- package/dist/sankhyablocks/css-shim-b3f2ee8d.js +4 -0
- package/dist/sankhyablocks/dom-665d6011.js +73 -0
- package/dist/sankhyablocks/filter-item-type.enum-61fbf80a.js +12 -0
- package/dist/sankhyablocks/index-2b4d2d14.js +3262 -0
- package/dist/sankhyablocks/index-e5b61043.js +2384 -0
- package/dist/sankhyablocks/index.esm.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +129 -1
- package/dist/sankhyablocks/shadow-css-b18e99d7.js +387 -0
- package/dist/sankhyablocks/snk-application.entry.js +8452 -0
- package/dist/sankhyablocks/snk-crud.entry.js +61 -0
- package/dist/sankhyablocks/snk-data-unit.entry.js +272 -0
- package/dist/sankhyablocks/snk-filter-bar.entry.js +261 -0
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +43 -0
- package/dist/sankhyablocks/snk-filter-detail.entry.js +45 -0
- package/dist/sankhyablocks/snk-filter-item.entry.js +139 -0
- package/dist/sankhyablocks/snk-filter-list.entry.js +87 -0
- package/dist/sankhyablocks/snk-filter-multi-select.entry.js +19 -0
- package/dist/sankhyablocks/snk-filter-number.entry.js +20 -0
- package/dist/sankhyablocks/snk-filter-period.entry.js +22 -0
- package/dist/sankhyablocks/snk-filter-search.entry.js +40 -0
- package/dist/sankhyablocks/snk-filter-text.entry.js +18 -0
- package/dist/sankhyablocks/snk-form.entry.js +129 -0
- package/dist/sankhyablocks/snk-grid.entry.js +75 -0
- package/dist/sankhyablocks/snk-pesquisa.entry.js +311 -0
- package/dist/sankhyablocks/snk-taskbar.entry.js +156 -0
- package/dist/sankhyablocks/taskbar-elements-35d64ff9.js +90 -0
- package/dist/sankhyablocks/taskbar-processor-aa6772c9.js +45 -0
- package/dist/sankhyablocks/teste-pesquisa.entry.js +33 -0
- package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
- package/dist/types/components/snk-application/snk-application.d.ts +141 -20
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +13 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +9 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +14 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +40 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +46 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +12 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +84 -0
- package/dist/types/components.d.ts +662 -9
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +7 -6
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +5 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -3
- package/dist/types/lib/http/data-fetcher/fetchers/totals-fetcher.d.ts +8 -0
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +42 -0
- package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-form.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/loader/package.json +1 -0
- package/package.json +5 -5
- package/react/components.d.ts +0 -2
- package/react/components.js +0 -2
- package/react/components.js.map +1 -1
- package/dist/cjs/index-1133bc2a.js +0 -1235
- package/dist/esm/index-ffda6382.js +0 -1208
- package/dist/sankhyablocks/p-2a7b4cb3.entry.js +0 -1
- package/dist/sankhyablocks/p-d62412bb.entry.js +0 -1
- package/dist/sankhyablocks/p-e6e91d5f.entry.js +0 -69
- package/dist/sankhyablocks/p-edcb9d8e.js +0 -2
|
@@ -1,76 +1,190 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
2
|
import { DataUnit } from "@sankhyalabs/core";
|
|
3
3
|
import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/dataunit-fetcher";
|
|
4
|
-
import { RequestListener } from "../../lib/http/data-fetcher/DataFetcher";
|
|
4
|
+
import { RequestListener, RequestListenerParams } from "../../lib/http/data-fetcher/DataFetcher";
|
|
5
5
|
import ParametersFetcher from "../../lib/http/data-fetcher/fetchers/parameters-fecher";
|
|
6
|
-
import { MessageOptions } from "@sankhyalabs/ezui/dist/collection/utils";
|
|
6
|
+
import { MessageOptions, DialogType } from "@sankhyalabs/ezui/dist/collection/utils";
|
|
7
7
|
import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
|
8
8
|
import { FieldConfig } from "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form";
|
|
9
|
-
import {
|
|
9
|
+
import { IGridConfig } from "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController";
|
|
10
10
|
import GridConfigFetcher from "../../lib/http/data-fetcher/fetchers/grid-config-fetcher";
|
|
11
11
|
import { PesquisaFetcher } from "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher";
|
|
12
12
|
import { Option } from "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box";
|
|
13
13
|
import AuthFetcher, { AutorizationType } from "../../lib/http/data-fetcher/fetchers/auth-fetcher";
|
|
14
14
|
import { SnkErrorHandler } from "./errorhandler/snk-error-handler";
|
|
15
|
+
import { TotalsFetcher } from "../../lib/http/data-fetcher/fetchers/totals-fetcher";
|
|
16
|
+
import { SnkMessageBuilder } from "../../lib/message/SnkMessageBuilder";
|
|
17
|
+
import FilterBarConfigFetcher from "../../lib/http/data-fetcher/fetchers/filter-bar-config-fetcher";
|
|
18
|
+
import { SnkFilterItemConfig } from "../snk-filter-bar/filter-item/snk-filter-item";
|
|
19
|
+
import { Filter } from "@sankhyalabs/core";
|
|
15
20
|
export declare class SnkApplication {
|
|
16
21
|
_parameters: ParametersFetcher;
|
|
17
22
|
_urlParams: Map<string, any>;
|
|
18
23
|
_dataUnitFetcher: DataUnitFetcher;
|
|
19
24
|
_formConfigFetcher: FormConfigFetcher;
|
|
20
25
|
_gridConfigFetcher: GridConfigFetcher;
|
|
26
|
+
_totalsFetcher: TotalsFetcher;
|
|
21
27
|
_pesquisaFetcher: PesquisaFetcher;
|
|
22
28
|
_authFetcher: AuthFetcher;
|
|
29
|
+
_filterBarConfigFetcher: FilterBarConfigFetcher;
|
|
23
30
|
_resourceID: string;
|
|
24
|
-
_popUp:
|
|
31
|
+
_popUp: HTMLEzPopupElement;
|
|
25
32
|
_errorHandler: SnkErrorHandler;
|
|
33
|
+
_authPromises: Array<PendingPromise>;
|
|
34
|
+
_duCache: Map<string, DataUnit>;
|
|
35
|
+
_duPromises: Map<string, Array<PendingPromise>>;
|
|
26
36
|
_requestListener: RequestListenerLoadingBar;
|
|
27
37
|
private _auth;
|
|
28
38
|
private get parameters();
|
|
29
39
|
private get resourceID();
|
|
30
40
|
private get auth();
|
|
41
|
+
/**
|
|
42
|
+
* messagesBuilder é um utilitário responsável por flexibilizar e padronizar
|
|
43
|
+
* o uso de mensagens nos blocos de construção.
|
|
44
|
+
*/
|
|
45
|
+
messagesBuilder: SnkMessageBuilder;
|
|
46
|
+
/**
|
|
47
|
+
* Caso o usuário logado seja o SUP.
|
|
48
|
+
*/
|
|
31
49
|
isUserSup(): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Se o usuário logado tem permissão pra determinada ação.
|
|
52
|
+
*/
|
|
32
53
|
hasAccess(access: AutorizationType): Promise<boolean>;
|
|
54
|
+
/**
|
|
55
|
+
* Retorna todos os acessos do usuário logado.
|
|
56
|
+
*/
|
|
33
57
|
getAllAccess(): Promise<any>;
|
|
34
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Retorna o valor de um parâmetro do tipo string.
|
|
60
|
+
*/
|
|
35
61
|
getStringParam(name: string): Promise<string>;
|
|
62
|
+
/**
|
|
63
|
+
* Retorna o valor de um parâmetro do tipo Inteiro.
|
|
64
|
+
*/
|
|
36
65
|
getIntParam(name: string): Promise<number>;
|
|
66
|
+
/**
|
|
67
|
+
* Retorna o valor de um parâmetro do tipo Decimal.
|
|
68
|
+
*/
|
|
37
69
|
getFloatParam(name: string): Promise<number>;
|
|
70
|
+
/**
|
|
71
|
+
* Retorna o valor de um parâmetro do tipo booleano.
|
|
72
|
+
*/
|
|
38
73
|
getBooleanParam(name: string): Promise<boolean>;
|
|
74
|
+
/**
|
|
75
|
+
* Retorna o valor de um parâmetro do tipo data.
|
|
76
|
+
*/
|
|
39
77
|
getDateParam(name: string): Promise<Date>;
|
|
78
|
+
/**
|
|
79
|
+
* Mostra o conteúdo passado em um Popup
|
|
80
|
+
*/
|
|
40
81
|
showPopUp(content: HTMLElement): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Fecha o popup, liberando o conteúdo.
|
|
84
|
+
*/
|
|
41
85
|
closePopUp(): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Verifica se a licença do cliente tem determinado opcional (produto)
|
|
88
|
+
*/
|
|
42
89
|
temOpcional(opcional: string): Promise<boolean>;
|
|
90
|
+
/**
|
|
91
|
+
* Retorna a configuração de um recurso por service broker
|
|
92
|
+
* Veja também o método "loadConfig"
|
|
93
|
+
*/
|
|
43
94
|
getConfig(key: string): Promise<any>;
|
|
95
|
+
/**
|
|
96
|
+
* Salva a configuração de determinado recurso.
|
|
97
|
+
*/
|
|
44
98
|
saveConfig(key: string, data: Object): Promise<any>;
|
|
99
|
+
/**
|
|
100
|
+
* Acessa informações de contexto "empurrados" na abertura da tela
|
|
101
|
+
*/
|
|
45
102
|
getAttributeFromHTMLWrapper(attribName: string): Promise<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Abre determinada tela, repassando pkObject
|
|
105
|
+
*/
|
|
46
106
|
openApp(resourceId: string, pkObject: Object): Promise<void>;
|
|
47
|
-
|
|
107
|
+
private getDuPromissesStack;
|
|
108
|
+
/**
|
|
109
|
+
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
|
110
|
+
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado
|
|
111
|
+
*/
|
|
112
|
+
createDataunit(entityName: string, dataUnitName?: string): Promise<DataUnit>;
|
|
113
|
+
/**
|
|
114
|
+
* Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
|
115
|
+
*/
|
|
116
|
+
getDataUnit(entityName: string, dataUnitName: string): Promise<DataUnit>;
|
|
117
|
+
/**
|
|
118
|
+
* Retorna o resourceID da tela em questão.
|
|
119
|
+
*/
|
|
48
120
|
getResourceID(): Promise<string>;
|
|
121
|
+
/**
|
|
122
|
+
* Mostra o diálogo de alerta de acordo com os parâmetros passados.
|
|
123
|
+
*/
|
|
49
124
|
alert(title: string, message: string, icon?: string, options?: MessageOptions): Promise<boolean>;
|
|
125
|
+
/**
|
|
126
|
+
* Mostra o diálogo de erro de acordo com os parâmetros passados.
|
|
127
|
+
*/
|
|
50
128
|
error(title: string, message: string, icon?: string, options?: MessageOptions): Promise<boolean>;
|
|
51
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Mostra o diálogo de sucesso de acordo com os parâmetros passados.
|
|
131
|
+
*/
|
|
132
|
+
success(title: string, message: string, icon?: string, options?: MessageOptions): Promise<boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* Exibe um diálogo de mensagem comum
|
|
135
|
+
*/
|
|
136
|
+
message(title: string, message: string, icon?: string, options?: MessageOptions): Promise<boolean>;
|
|
137
|
+
/**
|
|
138
|
+
* Exibe um diálogo de confirmação
|
|
139
|
+
*/
|
|
140
|
+
confirm(title: string, message: string, icon?: string, dialogType?: DialogType, options?: MessageOptions): Promise<boolean>;
|
|
141
|
+
/**
|
|
142
|
+
* Mostra uma informação efêmera (de segundo plano).
|
|
143
|
+
*/
|
|
52
144
|
info(message: string, options?: MessageOptions): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Busca a configuração de formulário.
|
|
147
|
+
*/
|
|
53
148
|
loadFormConfig(name: string): Promise<Array<FieldConfig>>;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
149
|
+
/**
|
|
150
|
+
* Busca a configuração de grade.
|
|
151
|
+
*/
|
|
152
|
+
loadGridConfig(name: string): Promise<IGridConfig>;
|
|
153
|
+
/**
|
|
154
|
+
* Busca os totalizadores da grade.
|
|
155
|
+
*/
|
|
156
|
+
loadTotals(name: string, resourceID: string, filters: Array<Filter>): Promise<Map<string, number>>;
|
|
157
|
+
/**
|
|
158
|
+
* Salva a configuração de grade.
|
|
159
|
+
*/
|
|
160
|
+
saveGridConfig(config: IGridConfig): Promise<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* Obtém as configurações da barra de filtros
|
|
163
|
+
*/
|
|
164
|
+
getFilterBarConfig(): Promise<Array<SnkFilterItemConfig>>;
|
|
62
165
|
/**
|
|
63
166
|
* Evento disparado quando a aplicação for carregada.
|
|
64
167
|
*/
|
|
65
168
|
applicationLoaded: EventEmitter<boolean>;
|
|
66
169
|
/**
|
|
67
|
-
* Evento
|
|
170
|
+
* Evento disparado ao iniciar a carga do componente
|
|
68
171
|
*/
|
|
69
172
|
applicationLoading: EventEmitter<boolean>;
|
|
173
|
+
private getAuthList;
|
|
174
|
+
private get urlParams();
|
|
175
|
+
private get dataUnitFetcher();
|
|
176
|
+
private get formConfigFetcher();
|
|
177
|
+
private get gridConfigFetcher();
|
|
178
|
+
private get totalsFetcher();
|
|
179
|
+
private get pesquisaFetcher();
|
|
180
|
+
private get authFetcher();
|
|
181
|
+
private get filterBarConfigFetcher();
|
|
70
182
|
executeSearch(searchArgument: any, fieldName: string, dataUnit: DataUnit): Promise<Array<Option> | Option>;
|
|
183
|
+
executePreparedSearch(mode: string, argument: string, options: any): Promise<Array<Option> | Option>;
|
|
71
184
|
isDebugMode(): Promise<boolean>;
|
|
72
|
-
|
|
73
|
-
|
|
185
|
+
private clearPopUpContent;
|
|
186
|
+
private clearPopUpTitle;
|
|
187
|
+
private setPopUpTitle;
|
|
74
188
|
componentWillLoad(): void;
|
|
75
189
|
connectedCallback(): void;
|
|
76
190
|
disconnectedCallback(): void;
|
|
@@ -79,10 +193,17 @@ export declare class SnkApplication {
|
|
|
79
193
|
}
|
|
80
194
|
declare class RequestListenerLoadingBar implements RequestListener {
|
|
81
195
|
readonly _debounceTime: number;
|
|
196
|
+
readonly _ignoredNameTypes: string[];
|
|
82
197
|
_timerLoading: any;
|
|
83
198
|
_countRequest: number;
|
|
84
199
|
loadingBar: HTMLEzLoadingBarElement;
|
|
85
|
-
onRequestStart(): void;
|
|
86
|
-
onRequestEnd(): void;
|
|
200
|
+
onRequestStart(param: RequestListenerParams): void;
|
|
201
|
+
onRequestEnd(param: RequestListenerParams): void;
|
|
202
|
+
private isIgnoreLoadingOnRequest;
|
|
203
|
+
}
|
|
204
|
+
declare class PendingPromise {
|
|
205
|
+
resolve: Function;
|
|
206
|
+
reject: Function;
|
|
207
|
+
constructor(resolve: Function, reject: Function);
|
|
87
208
|
}
|
|
88
209
|
export {};
|
package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SnkFilterItemConfig } from '../snk-filter-item';
|
|
2
|
+
export declare class SnkFilterBinarySelect {
|
|
3
|
+
_checkOne: HTMLEzCheckElement;
|
|
4
|
+
_checkTwo: HTMLEzCheckElement;
|
|
5
|
+
value: any;
|
|
6
|
+
config: SnkFilterItemConfig;
|
|
7
|
+
isSelected(option: string): boolean;
|
|
8
|
+
ezChangeListener(evt: CustomEvent): void;
|
|
9
|
+
assertCheckedOption(updatingCheck: HTMLElement): void;
|
|
10
|
+
updateValue(): void;
|
|
11
|
+
render(): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SnkFilterItemConfig } from '../snk-filter-item';
|
|
2
|
+
export declare class SnkFilterPeriod {
|
|
3
|
+
_startDate: HTMLEzDateInputElement;
|
|
4
|
+
_endDate: HTMLEzDateInputElement;
|
|
5
|
+
config: SnkFilterItemConfig;
|
|
6
|
+
value: Period;
|
|
7
|
+
ezChangeListener(): void;
|
|
8
|
+
render(): any;
|
|
9
|
+
}
|
|
10
|
+
export interface Period {
|
|
11
|
+
start?: Date;
|
|
12
|
+
end?: Date;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Option } from '@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box';
|
|
2
|
+
import { SnkFilterItemConfig } from '../snk-filter-item';
|
|
3
|
+
export declare class SnkFilterSearch {
|
|
4
|
+
config: SnkFilterItemConfig;
|
|
5
|
+
value: Option;
|
|
6
|
+
fix: () => void;
|
|
7
|
+
unfix: () => void;
|
|
8
|
+
_searchInput: HTMLEzSearchElement;
|
|
9
|
+
ezChangeListener(_evt: CustomEvent): void;
|
|
10
|
+
doSearch(mode: string, argument: string): Promise<Array<Option> | Option>;
|
|
11
|
+
render(): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { SnkFilterItemConfig } from './snk-filter-item';
|
|
3
|
+
export declare class SnkFilterDetail {
|
|
4
|
+
_editor: HTMLElement;
|
|
5
|
+
config: SnkFilterItemConfig;
|
|
6
|
+
keepOpened: boolean;
|
|
7
|
+
getMessage: (key: string, props?: any) => string;
|
|
8
|
+
filterChange: EventEmitter<SnkFilterItemConfig>;
|
|
9
|
+
changeConfig(newConfig: SnkFilterItemConfig): void;
|
|
10
|
+
getContentEditor(): string;
|
|
11
|
+
removeItem(): void;
|
|
12
|
+
getPopUpHeaderButtons(): any[];
|
|
13
|
+
render(): any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
export declare class SnkFilterList {
|
|
3
|
+
_element: HTMLElement;
|
|
4
|
+
_popoverContainer: HTMLElement;
|
|
5
|
+
_popover: HTMLElement;
|
|
6
|
+
_filterInput: HTMLEzFilterInputElement;
|
|
7
|
+
_floatingID: number;
|
|
8
|
+
_detailIsVisible: boolean;
|
|
9
|
+
_filterArgument: string;
|
|
10
|
+
_showAll: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
iconName: string;
|
|
13
|
+
items: Array<ListItem>;
|
|
14
|
+
getMessage: (key: string, props?: any) => string;
|
|
15
|
+
emptyText: string;
|
|
16
|
+
findFilterText: string;
|
|
17
|
+
buttonClass: string;
|
|
18
|
+
snkItemSelected: EventEmitter<string>;
|
|
19
|
+
private showList;
|
|
20
|
+
innerClickCheck: (floatingContainer: HTMLElement, node: HTMLElement) => boolean;
|
|
21
|
+
private hideList;
|
|
22
|
+
private buttonClick;
|
|
23
|
+
componentDidRender(): void;
|
|
24
|
+
buildItemElement(item: InternalListItem): HTMLElement;
|
|
25
|
+
itemSelected(itemName: string): void;
|
|
26
|
+
getFilterItems(): any;
|
|
27
|
+
getFooterItems(): ListItem[];
|
|
28
|
+
render(): any;
|
|
29
|
+
}
|
|
30
|
+
export interface ListItem {
|
|
31
|
+
label: string;
|
|
32
|
+
name: string;
|
|
33
|
+
kind: string;
|
|
34
|
+
iconName?: string;
|
|
35
|
+
}
|
|
36
|
+
interface InternalListItem extends ListItem {
|
|
37
|
+
iconClass?: string;
|
|
38
|
+
labelClass?: string;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DataUnit } from '@sankhyalabs/core';
|
|
2
|
+
import { SnkApplication } from '../snk-application/snk-application';
|
|
3
|
+
import { SnkFilterItemConfig } from './filter-item/snk-filter-item';
|
|
4
|
+
import { FilterProvider, Filter } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
5
|
+
import { ListItem } from './filter-list/snk-filter-list';
|
|
6
|
+
export declare class SnkFilterBar implements FilterProvider {
|
|
7
|
+
_element: HTMLElement;
|
|
8
|
+
_application: SnkApplication;
|
|
9
|
+
_updateSequence: Array<string>;
|
|
10
|
+
_calculateSortIndex: (item: SnkFilterItemConfig) => number;
|
|
11
|
+
_filtersComparator: (a: SnkFilterItemConfig, b: SnkFilterItemConfig) => number;
|
|
12
|
+
/**
|
|
13
|
+
* Recebe o DataUnit do ambiente. Se não for informado, procura pela referência
|
|
14
|
+
* do SnkDataUnit. Necessário para se registrar como provedor de filtros.
|
|
15
|
+
*/
|
|
16
|
+
dataUnit: DataUnit;
|
|
17
|
+
/**
|
|
18
|
+
* Lista de todos os filtros disponíveis ao usuário.
|
|
19
|
+
*/
|
|
20
|
+
filterConfig: Array<SnkFilterItemConfig>;
|
|
21
|
+
/**
|
|
22
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
23
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
24
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
25
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-bar.msg.ts"
|
|
26
|
+
*/
|
|
27
|
+
private getMessage;
|
|
28
|
+
getFilter(_dataUnit: string): Array<Filter>;
|
|
29
|
+
buildDUFilter(item: SnkFilterItemConfig): {
|
|
30
|
+
name: string;
|
|
31
|
+
expression: any;
|
|
32
|
+
params: any[];
|
|
33
|
+
};
|
|
34
|
+
componentWillLoad(): void;
|
|
35
|
+
getFilterItems(): Array<HTMLElement>;
|
|
36
|
+
calculateUpdateSequence(item: SnkFilterItemConfig): void;
|
|
37
|
+
filterChangeListener(evt: CustomEvent): void;
|
|
38
|
+
normalizeItem(item: SnkFilterItemConfig): SnkFilterItemConfig;
|
|
39
|
+
updateFilter(newItem: SnkFilterItemConfig, clear?: boolean): boolean;
|
|
40
|
+
getAddListItems(): Array<ListItem>;
|
|
41
|
+
getActiveClass(): "" | "sc-snk-filter-bar snk-filter-bar__filter-list-items-button--active";
|
|
42
|
+
getAppliedListItems(): Array<ListItem>;
|
|
43
|
+
addFilterHandler(itemName: string): void;
|
|
44
|
+
appliedFilterHandler(itemName: string): void;
|
|
45
|
+
render(): any;
|
|
46
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Action, CustomButton } from "../snk-taskbar";
|
|
2
|
+
export declare enum TaskbarElement {
|
|
3
|
+
PREVIOUS = "PREVIOUS",
|
|
4
|
+
NEXT = "NEXT",
|
|
5
|
+
REFRESH = "REFRESH",
|
|
6
|
+
UPDATE = "UPDATE",
|
|
7
|
+
CLONE = "CLONE",
|
|
8
|
+
REMOVE = "REMOVE",
|
|
9
|
+
INSERT = "INSERT",
|
|
10
|
+
CANCEL = "CANCEL",
|
|
11
|
+
SAVE = "SAVE",
|
|
12
|
+
GRID_MODE = "GRID_MODE",
|
|
13
|
+
FORM_MODE = "FORM_MODE",
|
|
14
|
+
CONFIG_GRID = "CONFIG_GRID",
|
|
15
|
+
MORE_OPTIONS = "MORE_OPTIONS",
|
|
16
|
+
DIVIDER = "DIVIDER"
|
|
17
|
+
}
|
|
18
|
+
export declare enum AuthorizationElements {
|
|
19
|
+
UPDATE = "UPDATE",
|
|
20
|
+
CLONE = "CLONE",
|
|
21
|
+
REMOVE = "REMOVE",
|
|
22
|
+
INSERT = "INSERT",
|
|
23
|
+
CONFIG_GRID = "CONFIG_GRID"
|
|
24
|
+
}
|
|
25
|
+
export declare enum VisibleWhenForbidden {
|
|
26
|
+
CONFIG_GRID = "CONFIG_GRID"
|
|
27
|
+
}
|
|
28
|
+
export declare const buildCustomButton: (def: CustomButton, className: string, action: (name: string) => void, isEnabled: (name: string) => boolean) => HTMLElement;
|
|
29
|
+
export declare const buildElem: (element: TaskbarElement, className: string, getTitle: (name: string) => string, action: (name: string) => void, isEnabled: (name: string) => boolean, actions: Array<Action>) => HTMLElement;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DataState } from "../../snk-data-unit/snk-data-unit";
|
|
2
|
+
import { CustomButton, TaskbarManager } from "../snk-taskbar";
|
|
3
|
+
export default class TaskbarProcessor {
|
|
4
|
+
private _defaultButtons;
|
|
5
|
+
buttons: string;
|
|
6
|
+
disabledButtons: Array<string>;
|
|
7
|
+
customButtons: Map<string, CustomButton>;
|
|
8
|
+
constructor(defaultButtons: any);
|
|
9
|
+
process(taskbarId: string, taskbarManager: TaskbarManager, dataState: DataState, disabledButtons?: Array<string>): void;
|
|
10
|
+
private getButtonsArray;
|
|
11
|
+
private isEnabled;
|
|
12
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { DataUnit } from '@sankhyalabs/core';
|
|
2
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
|
+
import { SnkApplication } from '../snk-application/snk-application';
|
|
4
|
+
import { DataState } from '../snk-data-unit/snk-data-unit';
|
|
5
|
+
import { TaskbarElement } from './elements/taskbar-elements';
|
|
6
|
+
export declare class SnkTaskbar {
|
|
7
|
+
_application: SnkApplication;
|
|
8
|
+
/**
|
|
9
|
+
* Lista separada por virgula, contendo todos os elementos a serem criados
|
|
10
|
+
*/
|
|
11
|
+
buttons: string;
|
|
12
|
+
/**
|
|
13
|
+
* Mapa com definição de botões personalizados. A chave do mapa deve ser
|
|
14
|
+
* passada na lista "buttons" no lugar onde o botão irá aparecer.
|
|
15
|
+
*/
|
|
16
|
+
customButtons: Map<string, CustomButton>;
|
|
17
|
+
/**
|
|
18
|
+
* Lista de ações que devem ser usadas no botão "Mais opções"
|
|
19
|
+
*/
|
|
20
|
+
actionsList: Array<Action>;
|
|
21
|
+
/**
|
|
22
|
+
* Qual botão deve ter aparência primária
|
|
23
|
+
*/
|
|
24
|
+
primaryButton: string;
|
|
25
|
+
/**
|
|
26
|
+
* Array contendo todos os botões a serem desabilitados
|
|
27
|
+
*/
|
|
28
|
+
disabledButtons: Array<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Instância do DataUnit
|
|
31
|
+
*/
|
|
32
|
+
dataUnit: DataUnit;
|
|
33
|
+
/**
|
|
34
|
+
* Emitido sempre que houver click de botão ou ação
|
|
35
|
+
*/
|
|
36
|
+
actionClick: EventEmitter<string>;
|
|
37
|
+
_permissions: any;
|
|
38
|
+
_definitions: Array<string>;
|
|
39
|
+
_titleKeyByElement: {
|
|
40
|
+
UPDATE: string;
|
|
41
|
+
PREVIOUS: string;
|
|
42
|
+
NEXT: string;
|
|
43
|
+
REFRESH: string;
|
|
44
|
+
CLONE: string;
|
|
45
|
+
REMOVE: string;
|
|
46
|
+
MORE_OPTIONS: string;
|
|
47
|
+
INSERT: string;
|
|
48
|
+
CANCEL: string;
|
|
49
|
+
SAVE: string;
|
|
50
|
+
GRID_MODE: string;
|
|
51
|
+
CONFIG_GRID: string;
|
|
52
|
+
FORM_MODE: string;
|
|
53
|
+
};
|
|
54
|
+
observeButtons(): void;
|
|
55
|
+
elementsFromString(strButtons: string): Array<TaskbarElement>;
|
|
56
|
+
private isAllowed;
|
|
57
|
+
/**
|
|
58
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
59
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
60
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
61
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-taskbar.msg.ts"
|
|
62
|
+
*/
|
|
63
|
+
private getTitle;
|
|
64
|
+
private elementClick;
|
|
65
|
+
private isEnabled;
|
|
66
|
+
getElement(index: number, def: TaskbarElement | CustomButton): HTMLElement;
|
|
67
|
+
componentWillLoad(): void;
|
|
68
|
+
componentWillRender(): void;
|
|
69
|
+
render(): any;
|
|
70
|
+
}
|
|
71
|
+
export interface Action {
|
|
72
|
+
value: string;
|
|
73
|
+
label: string;
|
|
74
|
+
}
|
|
75
|
+
export interface CustomButton {
|
|
76
|
+
name: string;
|
|
77
|
+
hint: string;
|
|
78
|
+
text?: string;
|
|
79
|
+
iconName?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface TaskbarManager {
|
|
82
|
+
getButtons: (taskbarId: string, dataState: DataState, currentButtons: Array<string>) => Array<string | CustomButton>;
|
|
83
|
+
isEnabled?: (taskbarId: string, dataState: DataState, buttonName: string, currentValue: boolean) => boolean;
|
|
84
|
+
}
|