@sankhyalabs/sankhyablocks 9.1.0-dev.20 → 9.1.0-dev.21
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/collection/components/snk-application/snk-application.js +11 -2
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-plus.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -596
@@ -3356,6 +3356,9 @@ export class SnkApplication {
|
|
3356
3356
|
"SearchCriteria": {
|
3357
3357
|
"location": "import",
|
3358
3358
|
"path": "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher"
|
3359
|
+
},
|
3360
|
+
"IPreparedSearchOptions": {
|
3361
|
+
"location": "global"
|
3359
3362
|
}
|
3360
3363
|
},
|
3361
3364
|
"return": "Promise<IOption | IOption[]>"
|
@@ -3385,7 +3388,7 @@ export class SnkApplication {
|
|
3385
3388
|
},
|
3386
3389
|
"executePreparedSearchPlus": {
|
3387
3390
|
"complexType": {
|
3388
|
-
"signature": "(mode: string, argument: string, options:
|
3391
|
+
"signature": "(mode: string, argument: string, options: IPreparedSearchOptions) => Promise<Array<IOption> | IOption>",
|
3389
3392
|
"parameters": [{
|
3390
3393
|
"tags": [],
|
3391
3394
|
"text": ""
|
@@ -3404,6 +3407,9 @@ export class SnkApplication {
|
|
3404
3407
|
"location": "import",
|
3405
3408
|
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
3406
3409
|
},
|
3410
|
+
"IPreparedSearchOptions": {
|
3411
|
+
"location": "global"
|
3412
|
+
},
|
3407
3413
|
"Array": {
|
3408
3414
|
"location": "global"
|
3409
3415
|
}
|
@@ -3417,7 +3423,7 @@ export class SnkApplication {
|
|
3417
3423
|
},
|
3418
3424
|
"executePreparedSearch": {
|
3419
3425
|
"complexType": {
|
3420
|
-
"signature": "(mode: string, argument: string, options:
|
3426
|
+
"signature": "(mode: string, argument: string, options: IPreparedSearchOptions) => Promise<Array<IOption> | IOption>",
|
3421
3427
|
"parameters": [{
|
3422
3428
|
"tags": [{
|
3423
3429
|
"name": "param",
|
@@ -3445,6 +3451,9 @@ export class SnkApplication {
|
|
3445
3451
|
"location": "import",
|
3446
3452
|
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
3447
3453
|
},
|
3454
|
+
"IPreparedSearchOptions": {
|
3455
|
+
"location": "global"
|
3456
|
+
},
|
3448
3457
|
"Array": {
|
3449
3458
|
"location": "global"
|
3450
3459
|
},
|
package/dist/types/components/snk-application/search-strategy/exec-prepared-search-plus.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ISearchOption } from "@sankhyalabs/ezui/dist/types/utils";
|
2
2
|
import { SnkApplication } from "../snk-application";
|
3
3
|
import { PesquisaFetcher } from "../../../lib";
|
4
|
-
declare const executePreparedSearchPlus: (mode: string, argument: string, options:
|
4
|
+
declare const executePreparedSearchPlus: (mode: string, argument: string, options: IPreparedSearchOptions, app: SnkApplication, pesquisaFetcher: PesquisaFetcher) => Promise<Array<ISearchOption> | ISearchOption>;
|
5
5
|
export default executePreparedSearchPlus;
|
@@ -290,11 +290,11 @@ export namespace Components {
|
|
290
290
|
* @returns Uma lista de opções ou uma única opção.
|
291
291
|
* @async
|
292
292
|
*/
|
293
|
-
"executePreparedSearch": (mode: string, argument: string, options:
|
293
|
+
"executePreparedSearch": (mode: string, argument: string, options: IPreparedSearchOptions) => Promise<Array<IOption1> | IOption1>;
|
294
294
|
/**
|
295
295
|
* Realiza a pesquisa de registros Ex.: snk-config-options
|
296
296
|
*/
|
297
|
-
"executePreparedSearchPlus": (mode: string, argument: string, options:
|
297
|
+
"executePreparedSearchPlus": (mode: string, argument: string, options: IPreparedSearchOptions) => Promise<Array<IOption1> | IOption1>;
|
298
298
|
/**
|
299
299
|
* Obtém as opções em componentes de pesquisa. Ex.: snk-config-options
|
300
300
|
* @param searchArgument - Argumentos da pesquisa.
|
package/package.json
CHANGED
@@ -1,596 +0,0 @@
|
|
1
|
-
import { DataUnit, Filter, KeyboardManager, Record } from "@sankhyalabs/core";
|
2
|
-
import { DialogType, MessageOptions } from "@sankhyalabs/ezui/dist/collection/utils";
|
3
|
-
import { AlertItem } from "@sankhyalabs/ezui/dist/types/components/ez-alert-list/ez-alert-list";
|
4
|
-
import { IOption, ISearchArgument } from "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search";
|
5
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
6
|
-
import { IAppletCallerParams } from "../../lib/applet-caller/applet-caller";
|
7
|
-
import { DataFetcher, Options } from "../../lib/http/data-fetcher/DataFetcher";
|
8
|
-
import AuthFetcher, { AutorizationType } from "../../lib/http/data-fetcher/fetchers/auth-fetcher";
|
9
|
-
import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher";
|
10
|
-
import GridConfigFetcher from "../../lib/http/data-fetcher/fetchers/grid-config-fetcher";
|
11
|
-
import ParametersFetcher from "../../lib/http/data-fetcher/fetchers/parameters-fecher";
|
12
|
-
import { IRemoveSearchListener, ISearchListener, PesquisaFetcher } from "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher";
|
13
|
-
import { TotalsFetcher } from "../../lib/http/data-fetcher/fetchers/totals-fetcher";
|
14
|
-
import { IClientEventResponse } from "../../lib/http/data-fetcher/interfaces/IClientEventResponse";
|
15
|
-
import { IDataFetcherRecaller } from "../../lib/http/data-fetcher/recaller/IDataFetcherRecaller";
|
16
|
-
import { SnkMessageBuilder } from "../../lib/message/SnkMessageBuilder";
|
17
|
-
import { SnkErrorHandler } from "./errorhandler/snk-error-handler";
|
18
|
-
import { ILoadBarRequestListener } from "./request-listener/RequestListenerFactory";
|
19
|
-
import { TEMPLATES_SKELETON } from "../../lib/utils/constants";
|
20
|
-
import { LayoutFormConfig } from "../../lib/configs/LayoutFormConfig";
|
21
|
-
export declare class SnkApplication {
|
22
|
-
private readonly NEW_VERSION_POPUP_LOCKER;
|
23
|
-
private readonly FEATURE_FLAG_CACHE_DURATION;
|
24
|
-
_parameters: ParametersFetcher;
|
25
|
-
_urlParams: Map<string, any>;
|
26
|
-
_dataUnitFetcher: DataUnitFetcher;
|
27
|
-
_gridConfigFetcher: GridConfigFetcher;
|
28
|
-
_totalsFetcher: TotalsFetcher;
|
29
|
-
_pesquisaFetcher: PesquisaFetcher;
|
30
|
-
_authFetcher: AuthFetcher;
|
31
|
-
_applicationResourceID: string;
|
32
|
-
_popUp: HTMLEzPopupElement;
|
33
|
-
_rightModal: HTMLEzModalElement;
|
34
|
-
_errorHandler: SnkErrorHandler;
|
35
|
-
_authPromises: Array<PendingPromise>;
|
36
|
-
_removeVersionLayoutPopup: Function;
|
37
|
-
_keyboardManager: KeyboardManager;
|
38
|
-
_waitingAppReady: Array<any>;
|
39
|
-
_duCache: Map<string, DataUnit>;
|
40
|
-
_duPromises: Map<string, Array<PendingPromise>>;
|
41
|
-
_requestListener: ILoadBarRequestListener;
|
42
|
-
private readonly _maxTimerAppLoading;
|
43
|
-
private readonly _featureFlagsCache;
|
44
|
-
private _lockManagerTimer;
|
45
|
-
private _scrimWindowTimer;
|
46
|
-
private _isBrowserTypeElectron;
|
47
|
-
private _pendingActions;
|
48
|
-
private _auth;
|
49
|
-
private _currentPkParameter;
|
50
|
-
private _loadPkParameter;
|
51
|
-
private _isLoadedByPk;
|
52
|
-
private _formConfigFetcher;
|
53
|
-
private _LayoutFormConfigSingleton;
|
54
|
-
private processPendingActions;
|
55
|
-
private get parameters();
|
56
|
-
private getAuth;
|
57
|
-
private getApplicationAuth;
|
58
|
-
private _element;
|
59
|
-
_applicationReady: boolean;
|
60
|
-
_templateSkeleton: TEMPLATES_SKELETON;
|
61
|
-
_activeScrimWindow: boolean;
|
62
|
-
/**
|
63
|
-
* Define se o componente deve usar o LockManager para controle de carregamento da aplicação.
|
64
|
-
*/
|
65
|
-
enableLockManagerLoadingApp: boolean;
|
66
|
-
/**
|
67
|
-
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
68
|
-
*/
|
69
|
-
messagesBuilder: SnkMessageBuilder;
|
70
|
-
/**
|
71
|
-
* Nome da configuração utilizada para salvar as preferências dos blocos de construção.
|
72
|
-
*/
|
73
|
-
configName: string;
|
74
|
-
/**
|
75
|
-
* Chave da configuração legada da grade, utilizada para migração de configurações antigas.
|
76
|
-
*/
|
77
|
-
gridLegacyConfigName: string;
|
78
|
-
/**
|
79
|
-
* Chave da configuração legada do formulário, utilizada para migração de configurações antigas.
|
80
|
-
*/
|
81
|
-
formLegacyConfigName: string;
|
82
|
-
/**
|
83
|
-
* Usado para receber um parâmetro na inicialização da tela, e utilizá-lo conforme necessário
|
84
|
-
* caso a tela receba um parâmetro, e, esta propriedade não seja informada
|
85
|
-
* é criado um filtro de forma automática através do método defaultLoadByPk
|
86
|
-
*/
|
87
|
-
loadByPK: LoadByPkHandler;
|
88
|
-
watchPropHandler(newValue: LoadByPkHandler, _: LoadByPkHandler): void;
|
89
|
-
/**
|
90
|
-
* Obtém o controlador de teclado.
|
91
|
-
* @returns {Promise<KeyboardManager>} O gerenciador de teclado.
|
92
|
-
* @async
|
93
|
-
*/
|
94
|
-
getKeyboardManager(): Promise<KeyboardManager>;
|
95
|
-
/**
|
96
|
-
* Obtém o notificador de Layout de formulário.
|
97
|
-
* @returns {Promise<LayoutFormConfig>} O configurador de Layout do Formulário.
|
98
|
-
* @async
|
99
|
-
*/
|
100
|
-
getLayoutFormConfig(): Promise<LayoutFormConfig>;
|
101
|
-
/**
|
102
|
-
* Obtém `true` caso o usuário logado seja o SUP.
|
103
|
-
* @returns {Promise<boolean>} `true` se o usuário for SUP, `false` caso contrário.
|
104
|
-
* @async
|
105
|
-
*/
|
106
|
-
isUserSup(): Promise<boolean>;
|
107
|
-
/**
|
108
|
-
* Adiciona uma ação pendente que deve ser executada por um determinado locker.
|
109
|
-
* @param {string} actionsLocker - Nome do locker da ação que será adicionada.
|
110
|
-
* @param {Function} action - Ação que será executada.
|
111
|
-
* @returns {Promise<void>}
|
112
|
-
* @async
|
113
|
-
*/
|
114
|
-
addPendingAction(actionsLocker: string, action: Function): Promise<void>;
|
115
|
-
/**
|
116
|
-
* Realiza a chamada ao Service Broker conforme o nome do serviço.
|
117
|
-
* @param {string} serviceName - Nome do serviço.
|
118
|
-
* @param {string | Object} payload - Dados que serão processados na ação.
|
119
|
-
* @param {Options} [options] - Parâmetros de URL.
|
120
|
-
* @returns {Promise<any>} A resposta do Service Broker.
|
121
|
-
* @async
|
122
|
-
*/
|
123
|
-
callServiceBroker(serviceName: string, payload: string | Object, options?: Options): Promise<any>;
|
124
|
-
/**
|
125
|
-
* Inicializa o onboarding para uma chave específica.
|
126
|
-
* @param {string} onboardingKey - A chave do onboarding a ser iniciado.
|
127
|
-
* @returns {Promise<void>}
|
128
|
-
* @async
|
129
|
-
*/
|
130
|
-
initOnboarding(onboardingKey: string): Promise<void>;
|
131
|
-
private doInitOnboarding;
|
132
|
-
/**
|
133
|
-
* Obtém `true` caso o usuário logado tenha permissão para determinada ação.
|
134
|
-
* @param {AutorizationType} access - O tipo de acesso a ser verificado.
|
135
|
-
* @param {string} [resourceID] - O ID do recurso para verificar a permissão. Se não fornecido, verifica a permissão da aplicação.
|
136
|
-
* @returns {Promise<boolean>} `true` se o usuário tiver acesso, `false` caso contrário.
|
137
|
-
* @async
|
138
|
-
*/
|
139
|
-
hasAccess(access: AutorizationType, resourceID?: string): Promise<boolean>;
|
140
|
-
/**
|
141
|
-
* Obtém todos os acessos do usuário logado para um recurso específico ou para a aplicação.
|
142
|
-
* @param {string} [resourceID] - O ID do recurso. Se não fornecido, obtém os acessos da aplicação.
|
143
|
-
* @returns {Promise<any>} Um objeto contendo todos os tipos de acesso e se o usuário os possui.
|
144
|
-
* @async
|
145
|
-
*/
|
146
|
-
getAllAccess(resourceID?: string): Promise<any>;
|
147
|
-
/**
|
148
|
-
* Obtém o valor de um parâmetro do tipo string.
|
149
|
-
* @param {string} name - O nome do parâmetro.
|
150
|
-
* @returns {Promise<string>} O valor do parâmetro como string.
|
151
|
-
* @async
|
152
|
-
*/
|
153
|
-
getStringParam(name: string): Promise<string>;
|
154
|
-
/**
|
155
|
-
* Obtém o valor de um parâmetro do tipo Inteiro.
|
156
|
-
* @param {string} name - O nome do parâmetro.
|
157
|
-
* @returns {Promise<number>} O valor do parâmetro como número inteiro.
|
158
|
-
* @async
|
159
|
-
*/
|
160
|
-
getIntParam(name: string): Promise<number>;
|
161
|
-
/**
|
162
|
-
* Obtém o valor de um parâmetro do tipo Decimal.
|
163
|
-
* @param {string} name - O nome do parâmetro.
|
164
|
-
* @returns {Promise<number>} O valor do parâmetro como número decimal.
|
165
|
-
* @async
|
166
|
-
*/
|
167
|
-
getFloatParam(name: string): Promise<number>;
|
168
|
-
/**
|
169
|
-
* Obtém o valor de um parâmetro do tipo booleano.
|
170
|
-
* @param {string} name - O nome do parâmetro.
|
171
|
-
* @returns {Promise<boolean>} O valor do parâmetro como booleano.
|
172
|
-
* @async
|
173
|
-
*/
|
174
|
-
getBooleanParam(name: string): Promise<boolean>;
|
175
|
-
/**
|
176
|
-
* Obtém o valor de um parâmetro do tipo data.
|
177
|
-
* @param {string} name - O nome do parâmetro.
|
178
|
-
* @returns {Promise<Date>} O valor do parâmetro como objeto Date.
|
179
|
-
* @async
|
180
|
-
*/
|
181
|
-
getDateParam(name: string): Promise<Date>;
|
182
|
-
/**
|
183
|
-
* Exibe o conteúdo passado em um Popup.
|
184
|
-
* @param {HTMLElement} content - O elemento HTML a ser exibido no popup.
|
185
|
-
* @param {"auto" | "full"} [size="full"] - O tamanho do popup.
|
186
|
-
* @param {boolean} [useHeader=true] - Define se o cabeçalho do popup deve ser usado.
|
187
|
-
* @param {Function} [onCloseCallback] - Função a ser chamada quando o popup for fechado.
|
188
|
-
* @returns {Promise<void>}
|
189
|
-
* @async
|
190
|
-
*/
|
191
|
-
showPopUp(content: HTMLElement, size?: "auto" | "full", useHeader?: boolean, onCloseCallback?: Function): Promise<void>;
|
192
|
-
/**
|
193
|
-
* Exibe o conteúdo passado em um Modal.
|
194
|
-
* @param {HTMLElement} content - O elemento HTML a ser exibido no modal.
|
195
|
-
* @returns {Promise<void>}
|
196
|
-
* @async
|
197
|
-
*/
|
198
|
-
showModal(content: HTMLElement): Promise<void>;
|
199
|
-
/**
|
200
|
-
* Apresenta uma lista de alertas.
|
201
|
-
* Geralmente é utilizado para apresentar resultados de processamentos em lote.
|
202
|
-
* @param {Array<AlertItem>} alerts - A lista de alertas a serem exibidos.
|
203
|
-
* @returns {Promise<void>}
|
204
|
-
*/
|
205
|
-
showAlerts(alerts: Array<AlertItem>): Promise<void>;
|
206
|
-
/**
|
207
|
-
* Fecha o Modal e limpa o conteúdo.
|
208
|
-
* @returns {Promise<void>}
|
209
|
-
* @async
|
210
|
-
*/
|
211
|
-
closeModal(): Promise<void>;
|
212
|
-
/**
|
213
|
-
* Fecha o Popup e limpa o conteúdo.
|
214
|
-
* @returns {Promise<void>}
|
215
|
-
* @async
|
216
|
-
*/
|
217
|
-
closePopUp(): Promise<void>;
|
218
|
-
/**
|
219
|
-
* Verifica se a licença do cliente tem determinado opcional (produto).
|
220
|
-
* @param {string} opcional - O nome do opcional ou uma string de opcionais separados por vírgula.
|
221
|
-
* @returns {Promise<boolean>} `true` se o cliente tiver o opcional, `false` caso contrário.
|
222
|
-
* @async
|
223
|
-
*/
|
224
|
-
temOpcional(opcional: string): Promise<boolean>;
|
225
|
-
/**
|
226
|
-
* Obtém a configuração de um recurso por service broker.
|
227
|
-
* @param {string} key - A chave da configuração.
|
228
|
-
* @returns {Promise<any>} Os dados da configuração.
|
229
|
-
* @async
|
230
|
-
*/
|
231
|
-
getConfig(key: string): Promise<any>;
|
232
|
-
/**
|
233
|
-
* Retorna se uma feature flag global está ativa ou não.
|
234
|
-
*/
|
235
|
-
isFeatureActive(featureName: string): Promise<boolean>;
|
236
|
-
/**
|
237
|
-
* Salva a configuração de determinado recurso.
|
238
|
-
* @param {string} key - A chave da configuração.
|
239
|
-
* @param {Object} data - Os dados da configuração a serem salvos.
|
240
|
-
* @returns {Promise<any>} O resultado da operação de salvamento.
|
241
|
-
* @async
|
242
|
-
*/
|
243
|
-
saveConfig(key: string, data: Object): Promise<any>;
|
244
|
-
/**
|
245
|
-
* Acessa informações de contexto "empurrados" na abertura da tela.
|
246
|
-
* @param {string} attribName - O nome do atributo.
|
247
|
-
* @returns {Promise<string>} O valor do atributo.
|
248
|
-
* @async
|
249
|
-
*/
|
250
|
-
getAttributeFromHTMLWrapper(attribName: string): Promise<string>;
|
251
|
-
/**
|
252
|
-
* Abre determinada tela, repassando pkObject.
|
253
|
-
* @param {string} resourceId - O ID do recurso da tela a ser aberta.
|
254
|
-
* @param {Object} pkObject - O objeto de chave primária a ser passado para a tela.
|
255
|
-
* @returns {Promise<void>}
|
256
|
-
* @async
|
257
|
-
*/
|
258
|
-
openApp(resourceId: string, pkObject: Object): Promise<void>;
|
259
|
-
/**
|
260
|
-
* Realiza a chamada do WebConnection para realizar a exportação de arquivo.
|
261
|
-
* @param {string} keyPort - Chave da porta que será requisitada.
|
262
|
-
* @param {string} methodName - Nome do tipo de exportação de arquivo que será realizado.
|
263
|
-
* @param {IAppletCallerParams} params - Parâmetros necessários para realizar a exportação do arquivo.
|
264
|
-
* @returns {Promise<void>}
|
265
|
-
* @async
|
266
|
-
*/
|
267
|
-
webConnection(keyPort: string, methodName: string, params: IAppletCallerParams): Promise<void>;
|
268
|
-
private getDuPromissesStack;
|
269
|
-
/**
|
270
|
-
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
271
|
-
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado.
|
272
|
-
* @param {string} entityName - O nome da entidade.
|
273
|
-
* @param {string} [dataUnitName] - O nome para identificar o DataUnit no cache.
|
274
|
-
* @param {DataUnit} [parentDataUnit] - O DataUnit pai, se houver.
|
275
|
-
* @param {string} [configName] - O nome da configuração a ser usada.
|
276
|
-
* @param {string} [resourceID] - O ID do recurso. Se não fornecido, usa o da aplicação.
|
277
|
-
* @returns {Promise<DataUnit>} O DataUnit criado ou obtido do cache.
|
278
|
-
* @async
|
279
|
-
*/
|
280
|
-
createDataunit(entityName: string, dataUnitName?: string, parentDataUnit?: DataUnit, configName?: string, resourceID?: string): Promise<DataUnit>;
|
281
|
-
private processResolveDataUnit;
|
282
|
-
/**
|
283
|
-
* Atualiza o cache de dataunits da aplicação.
|
284
|
-
* @param {string} oldName - Nome do dataunit que está em cache (será removido).
|
285
|
-
* @param {string} dataUnitName - Nome do dataunit que será armazenado em cache.
|
286
|
-
* @param {DataUnit} dataUnit - Instância do Dataunit para ser armazenado em cache.
|
287
|
-
* @returns {Promise<void>}
|
288
|
-
* @async
|
289
|
-
*/
|
290
|
-
updateDataunitCache(oldName: string, dataUnitName: string, dataUnit: DataUnit): Promise<void>;
|
291
|
-
/**
|
292
|
-
* Obtém um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
293
|
-
* @param {string} entityName - O nome da entidade.
|
294
|
-
* @param {string} dataUnitName - O nome para identificar o DataUnit no cache.
|
295
|
-
* @param {DataUnit} [parentDataUnit] - O DataUnit pai, se houver.
|
296
|
-
* @param {string} [configName] - O nome da configuração a ser usada.
|
297
|
-
* @param {string} [resourceID] - O ID do recurso. Se não fornecido, usa o da aplicação.
|
298
|
-
* @returns {Promise<DataUnit>} O DataUnit obtido do cache ou recém-criado.
|
299
|
-
* @async
|
300
|
-
*/
|
301
|
-
getDataUnit(entityName: string, dataUnitName: string, parentDataUnit?: DataUnit, configName?: string, resourceID?: string): Promise<DataUnit>;
|
302
|
-
/**
|
303
|
-
* Registra um client event para o DataFetcher da aplicação.
|
304
|
-
* @param {String} eventID - Nome do evento para a aplicação se registrar.
|
305
|
-
* @param {(clientEvent: IClientEventResponse, dataFetcherReacaller: IDataFetcherRecaller) => void} handler - Função de callback que será chamada quando o client event ocorrer.
|
306
|
-
* @returns {Promise<void>}
|
307
|
-
* @async
|
308
|
-
*/
|
309
|
-
addClientEvent(eventID: String, handler: (clientEvent: IClientEventResponse, dataFetcherReacaller: IDataFetcherRecaller) => void): Promise<void>;
|
310
|
-
/**
|
311
|
-
* Remove um client event do DataFetcher da aplicação.
|
312
|
-
* @param {String} eventID - Nome do evento a ser removido.
|
313
|
-
* @returns {Promise<void>}
|
314
|
-
* @async
|
315
|
-
*/
|
316
|
-
removeClientEvent(eventID: String): Promise<void>;
|
317
|
-
/**
|
318
|
-
* Verifica se um client event está registrado no DataFetcher da aplicação.
|
319
|
-
* @param {String} eventID - Nome do evento a ser verificado.
|
320
|
-
* @returns {Promise<boolean>} `true` se o evento estiver registrado, `false` caso contrário.
|
321
|
-
* @async
|
322
|
-
*/
|
323
|
-
hasClientEvent(eventID: String): Promise<boolean>;
|
324
|
-
private get applicationResourceID();
|
325
|
-
/**
|
326
|
-
* Obtém o resourceID da tela em questão.
|
327
|
-
* @returns {Promise<string>} O ID do recurso da aplicação.
|
328
|
-
* @async
|
329
|
-
*/
|
330
|
-
getResourceID(): Promise<string>;
|
331
|
-
/**
|
332
|
-
* Obtém o UserId do usuário logado.
|
333
|
-
* @returns {Promise<string>} O ID do usuário.
|
334
|
-
* @async
|
335
|
-
*/
|
336
|
-
getUserID(): Promise<string>;
|
337
|
-
/**
|
338
|
-
* Exibe o diálogo de alerta de acordo com os parâmetros passados.
|
339
|
-
* @param {string} title - O título do alerta.
|
340
|
-
* @param {string} message - A mensagem do alerta.
|
341
|
-
* @param {string} [icon] - O nome do ícone a ser exibido.
|
342
|
-
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
343
|
-
* @returns {Promise<boolean>}
|
344
|
-
* @async
|
345
|
-
*/
|
346
|
-
alert(title: string, message: string, icon?: string, options?: MessageOptions): Promise<boolean>;
|
347
|
-
/**
|
348
|
-
* Exibe o diálogo de erro de acordo com os parâmetros passados.
|
349
|
-
* @param {string} title - O título do erro.
|
350
|
-
* @param {string} message - A mensagem do erro.
|
351
|
-
* @param {string} [icon] - O nome do ícone a ser exibido.
|
352
|
-
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
353
|
-
* @returns {Promise<boolean>}
|
354
|
-
* @async
|
355
|
-
*/
|
356
|
-
error(title: string, message: string, icon?: string, options?: MessageOptions): Promise<boolean>;
|
357
|
-
/**
|
358
|
-
* Exibe o diálogo de sucesso de acordo com os parâmetros passados.
|
359
|
-
* @param {string} title - O título da mensagem de sucesso.
|
360
|
-
* @param {string} message - A mensagem de sucesso.
|
361
|
-
* @param {string} [icon] - O nome do ícone a ser exibido.
|
362
|
-
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
363
|
-
* @returns {Promise<boolean>}
|
364
|
-
* @async
|
365
|
-
*/
|
366
|
-
success(title: string, message: string, icon?: string, options?: MessageOptions): Promise<boolean>;
|
367
|
-
/**
|
368
|
-
* Exibe um diálogo de mensagem comum.
|
369
|
-
* @param {string} title - O título da mensagem.
|
370
|
-
* @param {string} message - A mensagem.
|
371
|
-
* @param {string} [icon] - O nome do ícone a ser exibido.
|
372
|
-
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
373
|
-
* @returns {Promise<boolean>}
|
374
|
-
* @async
|
375
|
-
*/
|
376
|
-
message(title: string, message: string, icon?: string, options?: MessageOptions): Promise<boolean>;
|
377
|
-
/**
|
378
|
-
* Exibe um diálogo de confirmação.
|
379
|
-
* @param {string} title - O título da confirmação.
|
380
|
-
* @param {string} message - A mensagem da confirmação.
|
381
|
-
* @param {string} [icon] - O nome do ícone a ser exibido.
|
382
|
-
* @param {DialogType} [dialogType] - O tipo de diálogo.
|
383
|
-
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
384
|
-
* @returns {Promise<boolean>} `true` se confirmado, `false` caso contrário.
|
385
|
-
* @async
|
386
|
-
*/
|
387
|
-
confirm(title: string, message: string, icon?: string, dialogType?: DialogType, options?: MessageOptions): Promise<boolean>;
|
388
|
-
/**
|
389
|
-
* Exibe uma informação efêmera (de segundo plano).
|
390
|
-
* @param {string} message - A mensagem a ser exibida.
|
391
|
-
* @param {MessageOptions} [options] - Opções adicionais para a mensagem.
|
392
|
-
* @returns {Promise<void>}
|
393
|
-
* @async
|
394
|
-
*/
|
395
|
-
info(message: string, options?: MessageOptions): Promise<void>;
|
396
|
-
/**
|
397
|
-
* Obtém os totalizadores da grade.
|
398
|
-
* @param {string} name - O nome da configuração de totalizadores.
|
399
|
-
* @param {string} resourceID - O ID do recurso.
|
400
|
-
* @param {Array<Filter>} filters - A lista de filtros a serem aplicados.
|
401
|
-
* @returns {Promise<Map<string, number>>} Um mapa com os nomes dos totalizadores e seus valores.
|
402
|
-
* @async
|
403
|
-
*/
|
404
|
-
loadTotals(name: string, resourceID: string, filters: Array<Filter>): Promise<Map<string, number>>;
|
405
|
-
/**
|
406
|
-
* Obtém a informação se o último carregamento do dataunit foi feito através de um loadByPk.
|
407
|
-
* @returns {Promise<boolean>} `true` se foi carregado por PK, `false` caso contrário.
|
408
|
-
* @async
|
409
|
-
*/
|
410
|
-
isLoadedByPk(): Promise<boolean>;
|
411
|
-
/**
|
412
|
-
* Remove registro do cache do PreLoader do dataunit.
|
413
|
-
* Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
|
414
|
-
* @param {DataUnit} dataUnit - O DataUnit do qual o registro será removido.
|
415
|
-
* @param {Array<string>} recordsIDs - Os IDs dos registros a serem removidos.
|
416
|
-
* @returns {Promise<void>}
|
417
|
-
* @async
|
418
|
-
*/
|
419
|
-
preloadMangerRemoveRecord(dataUnit: DataUnit, recordsIDs: Array<string>): Promise<void>;
|
420
|
-
private getCountSkeleton;
|
421
|
-
private getSkeletonRandomWidth;
|
422
|
-
/**
|
423
|
-
* Emitido quando a aplicação for carregada.
|
424
|
-
*/
|
425
|
-
applicationLoaded: EventEmitter<boolean>;
|
426
|
-
/**
|
427
|
-
* Emitido ao iniciar a carga do componente.
|
428
|
-
*/
|
429
|
-
applicationLoading: EventEmitter<boolean>;
|
430
|
-
private getAuthList;
|
431
|
-
private get urlParams();
|
432
|
-
private getMessage;
|
433
|
-
private get dataUnitFetcher();
|
434
|
-
private get totalsFetcher();
|
435
|
-
private get pesquisaFetcher();
|
436
|
-
private get authFetcher();
|
437
|
-
/**
|
438
|
-
* Obtém as opções em componentes de pesquisa.
|
439
|
-
* Ex.: snk-config-options
|
440
|
-
* @param {ISearchArgument} searchArgument - Argumentos da pesquisa.
|
441
|
-
* @param {string} fieldName - Nome do campo no DataUnit.
|
442
|
-
* @param {DataUnit} dataUnit - Instância do DataUnit.
|
443
|
-
* @param {ISearchCtxOptions} [ctxOptions] - Opções de contexto adicionais.
|
444
|
-
* @returns {Promise<Array<IOption> | IOption>} Uma lista de opções ou uma única opção.
|
445
|
-
* @async
|
446
|
-
*/
|
447
|
-
executeSearch(searchArgument: ISearchArgument, fieldName: string, dataUnit: DataUnit, ctxOptions?: ISearchCtxOptions): Promise<Array<IOption> | IOption>;
|
448
|
-
private filterInvalidFields;
|
449
|
-
private filterMathFields;
|
450
|
-
private builOptionItem;
|
451
|
-
/**
|
452
|
-
* Realiza a pesquisa de registros
|
453
|
-
* Ex.: snk-config-options
|
454
|
-
*/
|
455
|
-
executePreparedSearchPlus(mode: string, argument: string, options: any): Promise<Array<IOption> | IOption>;
|
456
|
-
/**
|
457
|
-
* @param {string} mode - O modo da pesquisa ("ADVANCED" ou outro).
|
458
|
-
* @param {string} argument - O argumento da pesquisa.
|
459
|
-
* @param {any} options - Opções preparadas para a pesquisa. Veja a documentação para exemplo de uso.
|
460
|
-
* @returns {Promise<Array<IOption> | IOption>} Uma lista de opções ou uma única opção.
|
461
|
-
* @async
|
462
|
-
*/
|
463
|
-
executePreparedSearch(mode: string, argument: string, options: any): Promise<Array<IOption> | IOption>;
|
464
|
-
/**
|
465
|
-
* Obtém `true` caso a tela esteja em modo de debug.
|
466
|
-
*/
|
467
|
-
isDebugMode(): Promise<boolean>;
|
468
|
-
/**
|
469
|
-
* Obtém o nome (label) da aplicação.
|
470
|
-
* @returns {Promise<string>} O nome da aplicação.
|
471
|
-
* @async
|
472
|
-
*/
|
473
|
-
getAppLabel(): Promise<string>;
|
474
|
-
/**
|
475
|
-
* Adiciona um listener no fetcher de Pesquisa.
|
476
|
-
* @param {string} entityName - O nome da entidade.
|
477
|
-
* @param {DataUnit} dataUnit - A instância do DataUnit.
|
478
|
-
* @param {ISearchListener} listener - O listener a ser adicionado.
|
479
|
-
* @returns {Promise<IRemoveSearchListener>} Uma função para remover o listener.
|
480
|
-
* @async
|
481
|
-
*/
|
482
|
-
addSearchListener(entityName: string, dataUnit: DataUnit, listener: ISearchListener): Promise<IRemoveSearchListener>;
|
483
|
-
/**
|
484
|
-
Realiza o import de um JavaScript que está disponível dentro da pasta /public da aplicação.
|
485
|
-
@param {string | Array<string>} relativePath - Define o caminho relativo para o arquivo JavaScript a ser importado, ou uma lista de caminhos.
|
486
|
-
@returns {Promise<void>}
|
487
|
-
@async
|
488
|
-
*/
|
489
|
-
importScript(relativePath: string | Array<string>): Promise<void>;
|
490
|
-
/**
|
491
|
-
* Retorna o path relativo da aplicação.
|
492
|
-
* @returns {Promise<string>} O caminho relativo da aplicação.
|
493
|
-
* @async
|
494
|
-
*/
|
495
|
-
getApplicationPath(): Promise<string>;
|
496
|
-
/**
|
497
|
-
* Retorna o contexto Sankhya-om da aplicação.
|
498
|
-
*/
|
499
|
-
getModuleName(): string;
|
500
|
-
/**
|
501
|
-
* Com base em um campo realiza um "select distinct" respeitando os
|
502
|
-
* filtros atuais do dataUnit e um critério de filtro para a própria
|
503
|
-
* coluna.
|
504
|
-
* @param {DataUnit} dataUnit - A instância do DataUnit.
|
505
|
-
* @param {string} fieldName - O nome do campo para o select distinct.
|
506
|
-
* @param {string} argument - O argumento de filtro para a coluna.
|
507
|
-
* @returns {Promise<Array<any>>} Uma lista de valores distintos.
|
508
|
-
* @async
|
509
|
-
*/
|
510
|
-
executeSelectDistinct(dataUnit: DataUnit, fieldName: string, argument: string): Promise<Array<any>>;
|
511
|
-
/**
|
512
|
-
* Retorna a instância do DataFetcher utilizado pelo application.
|
513
|
-
* @returns {Promise<DataFetcher>} O DataFetcher da aplicação.
|
514
|
-
* @async
|
515
|
-
*/
|
516
|
-
getDataFetcher(): Promise<DataFetcher>;
|
517
|
-
/**
|
518
|
-
* Retorna uma promise que será resolvida quando o snk-application estiver carregado e registrado no ApplicationContext.
|
519
|
-
* @returns {Promise<SnkApplication>} O componente SnkApplication carregado.
|
520
|
-
* @async
|
521
|
-
*/
|
522
|
-
whenApplicationReady(): Promise<SnkApplication>;
|
523
|
-
/**
|
524
|
-
* Atribui valor para parâmetros de contexto no componente de pesquisa.
|
525
|
-
* @param {string} name - Nome do parâmetro.
|
526
|
-
* @param {string} value - String conversível de acordo com o tipo do parâmetro.
|
527
|
-
* @returns {Promise<void>}
|
528
|
-
* @async
|
529
|
-
*/
|
530
|
-
setSearchFilterContext(name: string, value: string): Promise<void>;
|
531
|
-
private clearContent;
|
532
|
-
clearPopUpTitle(): Promise<void>;
|
533
|
-
setPopUpTitle(title: string): Promise<void>;
|
534
|
-
private pkChangeListener;
|
535
|
-
private getResourceIdFromToken;
|
536
|
-
private defaultLoadByPK;
|
537
|
-
private loadDataWithPKFilter;
|
538
|
-
private getFirstDataUnitFromDOM;
|
539
|
-
private getFilterParamsFromPkObject;
|
540
|
-
private getDefaultDataTypeLoadByPK;
|
541
|
-
private buildFilterExpressionByPkObject;
|
542
|
-
private showNewVersionPopup;
|
543
|
-
private newVersionPopupEventListener;
|
544
|
-
private handleShowNewVersionPopup;
|
545
|
-
private hasToShowNewVersionPopup;
|
546
|
-
private registerPkChangeListener;
|
547
|
-
componentWillLoad(): void;
|
548
|
-
setLayoutFormConfig(): Promise<void>;
|
549
|
-
connectedCallback(): void;
|
550
|
-
disconnectedCallback(): void;
|
551
|
-
componentDidLoad(): Promise<void>;
|
552
|
-
showScrimApp(active: boolean): Promise<void>;
|
553
|
-
private changeTemplateSkeleton;
|
554
|
-
/**
|
555
|
-
* Marca a aplicação para recarregar, opcionalmente especificando um tipo de esqueleto de carregamento.
|
556
|
-
* @param {TEMPLATES_SKELETON} [templateSkeletonType] - O tipo de esqueleto de carregamento a ser exibido.
|
557
|
-
* @returns {Promise<void>}
|
558
|
-
* @async
|
559
|
-
*/
|
560
|
-
markToReload(templateSkeletonType?: TEMPLATES_SKELETON): Promise<void>;
|
561
|
-
/**
|
562
|
-
* Adiciona um bloqueio de carregamento à aplicação.
|
563
|
-
* @param {boolean} [forceReady=false] - Se `true`, força a aplicação para o estado "não pronto" antes de adicionar o bloqueio.
|
564
|
-
* @param {TEMPLATES_SKELETON} [templateSkeletonType] - O tipo de esqueleto de carregamento a ser exibido.
|
565
|
-
* @returns {Promise<string>} O ID do bloqueio adicionado.
|
566
|
-
* @async
|
567
|
-
*/
|
568
|
-
addLoadingLock(forceReady?: boolean, templateSkeletonType?: TEMPLATES_SKELETON): Promise<() => void>;
|
569
|
-
private resolveApplicationReady;
|
570
|
-
private stopTimeoutLockManager;
|
571
|
-
private checkTimeoutLimitLockManager;
|
572
|
-
private initKeyboardManager;
|
573
|
-
private removeShortcuts;
|
574
|
-
private renderLoadingSkeleton;
|
575
|
-
private getLoadingVisibilityStyle;
|
576
|
-
private getSkeletonTemplateGrid;
|
577
|
-
private getSkeletonTemplateGridWithSidebar;
|
578
|
-
private getSkeletonTemplateGridWithPanel;
|
579
|
-
private getSkeletonTemplateFormWithSidebar;
|
580
|
-
private getSpinnerLoadingDefault;
|
581
|
-
render(): any;
|
582
|
-
}
|
583
|
-
type LoadByPkHandler = (objPK: {
|
584
|
-
pk: Record<string, any>;
|
585
|
-
}, redirectFrom?: string) => void;
|
586
|
-
declare class PendingPromise {
|
587
|
-
resolve: Function;
|
588
|
-
reject: Function;
|
589
|
-
constructor(resolve: Function, reject: Function);
|
590
|
-
}
|
591
|
-
export interface ISearchCtxOptions {
|
592
|
-
allowsNonAnalytic?: boolean;
|
593
|
-
useSearchPlus?: boolean;
|
594
|
-
[key: string]: any;
|
595
|
-
}
|
596
|
-
export {};
|