@apia/api 5.0.0 → 5.0.3
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/ApiaApiContext.js +15 -0
- package/dist/ApiaApiContext.js.map +1 -0
- package/dist/ApiaApiHandler.d.ts +67 -0
- package/dist/ApiaApiHandler.d.ts.map +1 -0
- package/dist/ApiaApiHandler.js +390 -0
- package/dist/ApiaApiHandler.js.map +1 -0
- package/dist/apiaApi.d.ts +174 -0
- package/dist/apiaApi.d.ts.map +1 -0
- package/dist/apiaApi.js +478 -0
- package/dist/apiaApi.js.map +1 -0
- package/dist/buttons/ApiaApiButtonsContainer.js +129 -0
- package/dist/buttons/ApiaApiButtonsContainer.js.map +1 -0
- package/dist/fields/ApiaApiCheckbox.js +39 -0
- package/dist/fields/ApiaApiCheckbox.js.map +1 -0
- package/dist/fields/ApiaApiEnvironmentsModalField.js +172 -0
- package/dist/fields/ApiaApiEnvironmentsModalField.js.map +1 -0
- package/dist/fields/ApiaApiFieldsContainer.d.ts +9 -0
- package/dist/fields/ApiaApiFieldsContainer.d.ts.map +1 -0
- package/dist/fields/ApiaApiFieldsContainer.js +288 -0
- package/dist/fields/ApiaApiFieldsContainer.js.map +1 -0
- package/dist/fields/ApiaApiFileInput.js +34 -0
- package/dist/fields/ApiaApiFileInput.js.map +1 -0
- package/dist/fields/ApiaApiInput.d.ts +20 -0
- package/dist/fields/ApiaApiInput.d.ts.map +1 -0
- package/dist/fields/ApiaApiInput.js +111 -0
- package/dist/fields/ApiaApiInput.js.map +1 -0
- package/dist/fields/ApiaApiPoolsModalField.js +172 -0
- package/dist/fields/ApiaApiPoolsModalField.js.map +1 -0
- package/dist/fields/ApiaApiProcessesModalField.js +172 -0
- package/dist/fields/ApiaApiProcessesModalField.js.map +1 -0
- package/dist/fields/ApiaApiRadio.js +43 -0
- package/dist/fields/ApiaApiRadio.js.map +1 -0
- package/dist/fields/ApiaApiSelect.js +64 -0
- package/dist/fields/ApiaApiSelect.js.map +1 -0
- package/dist/fields/ApiaApiTasksModalField.js +172 -0
- package/dist/fields/ApiaApiTasksModalField.js.map +1 -0
- package/dist/fields/ApiaApiTextArea.js +50 -0
- package/dist/fields/ApiaApiTextArea.js.map +1 -0
- package/dist/fields/ApiaApiUsersModalField.js +170 -0
- package/dist/fields/ApiaApiUsersModalField.js.map +1 -0
- package/dist/index.d.ts +13 -575
- package/dist/index.js +11 -5208
- package/dist/index.js.map +1 -1
- package/dist/modals/apia/components/ApiaEnvironmentsModal.js +162 -0
- package/dist/modals/apia/components/ApiaEnvironmentsModal.js.map +1 -0
- package/dist/modals/apia/components/ApiaPoolsModal.js +165 -0
- package/dist/modals/apia/components/ApiaPoolsModal.js.map +1 -0
- package/dist/modals/apia/components/ApiaProcessesModal.js +164 -0
- package/dist/modals/apia/components/ApiaProcessesModal.js.map +1 -0
- package/dist/modals/apia/components/ApiaTasksModal.js +161 -0
- package/dist/modals/apia/components/ApiaTasksModal.js.map +1 -0
- package/dist/modals/apia/components/ApiaUsersModal.js +158 -0
- package/dist/modals/apia/components/ApiaUsersModal.js.map +1 -0
- package/dist/modals/apia/components/generics/ApiaFormsModal2.d.ts +8 -0
- package/dist/modals/apia/components/generics/ApiaFormsModal2.d.ts.map +1 -0
- package/dist/modals/apia/components/generics/ApiaFormsModal2.js +57 -0
- package/dist/modals/apia/components/generics/ApiaFormsModal2.js.map +1 -0
- package/dist/modals/apia/components/generics/ApiaMonDocModal2.d.ts +27 -0
- package/dist/modals/apia/components/generics/ApiaMonDocModal2.d.ts.map +1 -0
- package/dist/modals/apia/components/generics/ApiaMonDocModal2.js +390 -0
- package/dist/modals/apia/components/generics/ApiaMonDocModal2.js.map +1 -0
- package/dist/modals/apia/components/generics/ApiaPoolsModal2.d.ts +11 -0
- package/dist/modals/apia/components/generics/ApiaPoolsModal2.d.ts.map +1 -0
- package/dist/modals/apia/components/generics/ApiaPoolsModal2.js +49 -0
- package/dist/modals/apia/components/generics/ApiaPoolsModal2.js.map +1 -0
- package/dist/modals/apia/components/generics/ApiaUsersModal2.d.ts +6 -0
- package/dist/modals/apia/components/generics/ApiaUsersModal2.d.ts.map +1 -0
- package/dist/modals/apia/components/generics/ApiaUsersModal2.js +42 -0
- package/dist/modals/apia/components/generics/ApiaUsersModal2.js.map +1 -0
- package/dist/modals/apia/components/generics/GenericListQuery.d.ts +20 -0
- package/dist/modals/apia/components/generics/GenericListQuery.d.ts.map +1 -0
- package/dist/modals/apia/components/generics/GenericListQuery.js +71 -0
- package/dist/modals/apia/components/generics/GenericListQuery.js.map +1 -0
- package/dist/modals/apia/components/generics/LangsModal2.d.ts +8 -0
- package/dist/modals/apia/components/generics/LangsModal2.d.ts.map +1 -0
- package/dist/modals/apia/components/generics/LangsModal2.js +57 -0
- package/dist/modals/apia/components/generics/LangsModal2.js.map +1 -0
- package/dist/modals/apia/components/util/FiltersModal.js +46 -0
- package/dist/modals/apia/components/util/FiltersModal.js.map +1 -0
- package/dist/modals/apia/hooks/defaultFetcher.js +143 -0
- package/dist/modals/apia/hooks/defaultFetcher.js.map +1 -0
- package/dist/queries/FilterTypesComponent.js +37 -0
- package/dist/queries/FilterTypesComponent.js.map +1 -0
- package/dist/queries/QueryController.d.ts +88 -0
- package/dist/queries/QueryController.d.ts.map +1 -0
- package/dist/queries/QueryController.js +422 -0
- package/dist/queries/QueryController.js.map +1 -0
- package/dist/queries/QueryModalController.d.ts +29 -0
- package/dist/queries/QueryModalController.d.ts.map +1 -0
- package/dist/queries/QueryModalController.js +169 -0
- package/dist/queries/QueryModalController.js.map +1 -0
- package/dist/queries/filters/Filter.d.ts +20 -0
- package/dist/queries/filters/Filter.d.ts.map +1 -0
- package/dist/queries/filters/Filter.js +98 -0
- package/dist/queries/filters/Filter.js.map +1 -0
- package/dist/queries/filters/FilterLabel.js +43 -0
- package/dist/queries/filters/FilterLabel.js.map +1 -0
- package/dist/queries/filters/renderers/DateFilterRenderer.js +124 -0
- package/dist/queries/filters/renderers/DateFilterRenderer.js.map +1 -0
- package/dist/queries/filters/renderers/FreeLabelFilterRenderer.js +115 -0
- package/dist/queries/filters/renderers/FreeLabelFilterRenderer.js.map +1 -0
- package/dist/queries/filters/renderers/InputFilterRenderer.js +40 -0
- package/dist/queries/filters/renderers/InputFilterRenderer.js.map +1 -0
- package/dist/queries/filters/renderers/RangeFilterRenderer.js +112 -0
- package/dist/queries/filters/renderers/RangeFilterRenderer.js.map +1 -0
- package/dist/queries/filters/renderers/SelectFilterRenderer.js +32 -0
- package/dist/queries/filters/renderers/SelectFilterRenderer.js.map +1 -0
- package/dist/queries/filters/types.d.ts +34 -0
- package/dist/queries/filters/types.d.ts.map +1 -0
- package/dist/queries/table/AdditionalFilters/AdditionalFiltersModal.js +74 -0
- package/dist/queries/table/AdditionalFilters/AdditionalFiltersModal.js.map +1 -0
- package/dist/queries/table/AdditionalFilters/components/AdditionalFiltersComponent.js +134 -0
- package/dist/queries/table/AdditionalFilters/components/AdditionalFiltersComponent.js.map +1 -0
- package/dist/queries/table/TableController.d.ts +37 -0
- package/dist/queries/table/TableController.d.ts.map +1 -0
- package/dist/queries/table/TableController.js +209 -0
- package/dist/queries/table/TableController.js.map +1 -0
- package/dist/queries/table/types.d.ts +31 -0
- package/dist/queries/table/types.d.ts.map +1 -0
- package/dist/queries/types.d.ts +23 -0
- package/dist/queries/types.d.ts.map +1 -0
- package/dist/types.d.ts +76 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,576 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
declare function isXmlResponse(response: AxiosResponse<unknown>): RegExpMatchArray | null;
|
|
15
|
-
declare function isHtmlResponse(response: AxiosResponse<unknown>): RegExpMatchArray | null;
|
|
16
|
-
declare const parseSuccessfulResponse: <LoadType extends Record<string, unknown>>(response: AxiosResponse<string>, currentUrl: string, outerBehaveConfig?: IApiaApiRequestConfig<LoadType>) => Promise<(LoadType & {
|
|
17
|
-
sysMessages: {
|
|
18
|
-
message: TApiaMessage | TApiaMessage[];
|
|
19
|
-
} | undefined;
|
|
20
|
-
exceptions: {
|
|
21
|
-
exception: TApiaMessage | TApiaMessage[];
|
|
22
|
-
} | undefined;
|
|
23
|
-
sysExceptions: {
|
|
24
|
-
exception: TApiaMessage | TApiaMessage[];
|
|
25
|
-
} | undefined;
|
|
26
|
-
}) | null>;
|
|
27
|
-
type TApiaApiAxiosResponse<LoadType> = AxiosResponse<LoadType | null> & {
|
|
28
|
-
hasError: boolean;
|
|
29
|
-
hasMessages: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* IMPORTANT!! The ApiaApi is programmed under the slogan that
|
|
33
|
-
* **should never throw an exception**. **Errors** coming from
|
|
34
|
-
* connectivity or exceptions on the server **will be handled
|
|
35
|
-
* automatically** by ApiaApi, using the notification system
|
|
36
|
-
* of the application. It is possible to determine in what context they should
|
|
37
|
-
* be thrown those exceptions (global, main, modal) using the
|
|
38
|
-
* alertsCategory configuration properties **(see errorsHandling.md)**.
|
|
39
|
-
*
|
|
40
|
-
* @param url String, the url you want to call
|
|
41
|
-
* @param config interface IApiaApiRequestConfig<DataType>;
|
|
42
|
-
*
|
|
43
|
-
* @throws Nothing
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
*
|
|
47
|
-
* ApiaApi.post<ResponseType>('url...', {
|
|
48
|
-
axiosConfig?: AxiosRequestConfig;
|
|
49
|
-
|
|
50
|
-
// Configuración de postData
|
|
51
|
-
postData? unknown;
|
|
52
|
-
postDataTreatement?: 'stringify' | undefined;
|
|
53
|
-
|
|
54
|
-
// Configuración de queryString
|
|
55
|
-
queryData?: string | Record<string, unknown>;
|
|
56
|
-
stringifyOptions?: QueryString.IStringifyOptions;
|
|
57
|
-
|
|
58
|
-
// Response validator,
|
|
59
|
-
// If it returns true, everything continues correctly
|
|
60
|
-
// If it returns false, the ApiaApi throws a standard error.
|
|
61
|
-
// If it returns string, ApiaApi throws the error returned in the string.
|
|
62
|
-
validateResponse?: (
|
|
63
|
-
response: AxiosResponse<DataType | null>,
|
|
64
|
-
) => boolean | string;
|
|
65
|
-
|
|
66
|
-
// Configuración de alertas
|
|
67
|
-
alertsImportance?: TAlertImportance;
|
|
68
|
-
|
|
69
|
-
// Configuración de ApiaApiHandler, falta documentar
|
|
70
|
-
handleLoad?: boolean;
|
|
71
|
-
eventsHandler?: IEventsHandler;
|
|
72
|
-
|
|
73
|
-
// other configuration
|
|
74
|
-
colors?: TColors;
|
|
75
|
-
debug?: boolean;
|
|
76
|
-
}
|
|
77
|
-
* @returns The type of the return value depends on the type passed when calling the function. If there was an error it returns null.
|
|
78
|
-
*/
|
|
79
|
-
declare function post<LoadType extends Record<string, unknown> = Record<string, unknown>, DataType = unknown>(url: string | TModify<IApiaApiRequestConfig<LoadType>, {
|
|
80
|
-
postData?: DataType;
|
|
81
|
-
postDataTreatement?: 'stringify';
|
|
82
|
-
}>, config?: TModify<IApiaApiRequestConfig<LoadType>, {
|
|
83
|
-
postData?: DataType;
|
|
84
|
-
postDataTreatement?: 'stringify';
|
|
85
|
-
}>): TApiaApiResult<LoadType>;
|
|
86
|
-
declare function post<LoadType extends Record<string, unknown> = Record<string, unknown>, DataType = unknown>(config: TModify<IApiaApiRequestConfig<LoadType>, {
|
|
87
|
-
postData?: DataType;
|
|
88
|
-
postDataTreatement?: 'stringify';
|
|
89
|
-
}>): TApiaApiResult<LoadType>;
|
|
90
|
-
/**
|
|
91
|
-
* IMPORTANTE!! El ApiaApi está programado bajo la consigna de que
|
|
92
|
-
* **no debe tirar núnca una excepción**. **Los errores** provenientes
|
|
93
|
-
* de la conectividad o de excepciones en el servidor **serán manejados
|
|
94
|
-
* automáticamente** por el ApiaApi utilizando el sistema de notificaciones
|
|
95
|
-
* de la aplicación. Es posible determinar en qué contexto deben
|
|
96
|
-
* ser lanzadas esas excepciones (global, main, modal) utilizando las
|
|
97
|
-
* propiedades de configuración alertsCategory **(ver errorsHandling.md)**.
|
|
98
|
-
*
|
|
99
|
-
* @param url String, el url al que se desea llamar
|
|
100
|
-
* @param config interface IApiaApiRequestConfig<DataType>;
|
|
101
|
-
*
|
|
102
|
-
* @throws Nothing
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
*
|
|
106
|
-
* ApiaApi.get<TipoDeRespuesta>('url...', {
|
|
107
|
-
axiosConfig?: AxiosRequestConfig;
|
|
108
|
-
|
|
109
|
-
// Configuración de queryString
|
|
110
|
-
queryData?: string | Record<string, unknown>;
|
|
111
|
-
stringifyOptions?: QueryString.IStringifyOptions;
|
|
112
|
-
|
|
113
|
-
// Validador de respuesta,
|
|
114
|
-
// Si devuelve true, todo sigue correctamente
|
|
115
|
-
// Si devuelve false, el ApiaApi tira un error estándar.
|
|
116
|
-
// Si devuelve string, el ApiaApi tira el error devuelto en el string.
|
|
117
|
-
validateResponse?: (
|
|
118
|
-
response: AxiosResponse<DataType | null>,
|
|
119
|
-
) => boolean | string;
|
|
120
|
-
|
|
121
|
-
// Configuración de alertas
|
|
122
|
-
alertsImportance?: TAlertImportance;
|
|
123
|
-
|
|
124
|
-
// Configuración de ApiaApiHandler, falta documentar
|
|
125
|
-
handleLoad?: boolean;
|
|
126
|
-
eventsHandler?: IEventsHandler;
|
|
127
|
-
|
|
128
|
-
// Otra configuración
|
|
129
|
-
colors?: TColors;
|
|
130
|
-
debug?: boolean;
|
|
131
|
-
}
|
|
132
|
-
* @returns El tipo del valor devuelto depende del tipo pasado al llamar a la función. Si hubo un error devuelve null
|
|
133
|
-
*/
|
|
134
|
-
declare function get<LoadType extends Record<string, unknown> = Record<string, unknown>>(url: string | IApiaApiRequestConfig<LoadType>, config?: IApiaApiRequestConfig<LoadType>): TApiaApiResult<LoadType>;
|
|
135
|
-
declare function get<LoadType extends Record<string, unknown> = Record<string, unknown>>(config: IApiaApiRequestConfig<LoadType>): TApiaApiResult<LoadType>;
|
|
136
|
-
declare const ApiaApi: {
|
|
137
|
-
get: typeof get;
|
|
138
|
-
getConfig: typeof getConfig;
|
|
139
|
-
post: typeof post;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Creates an url based on the general requirements of Apia.
|
|
143
|
-
* If the ajaxUrl property is not passed, it will use the
|
|
144
|
-
* window.URL_REQUEST_AJAX. Its use is very simple, just pass the objects you
|
|
145
|
-
* want to appear in the query string.
|
|
146
|
-
*
|
|
147
|
-
* @example makeApiaUrl({
|
|
148
|
-
* ajaxUrl: 'the.endpoint.you.want',
|
|
149
|
-
* queryString: 'an=existent&query=string',
|
|
150
|
-
* action: 'theAction',
|
|
151
|
-
* anotherProp: 15
|
|
152
|
-
* })
|
|
153
|
-
*
|
|
154
|
-
* @returns the well formed url, in the example, the response url is:
|
|
155
|
-
* /context/the.endpoint.you.want?an=existent&query=string&anotherProp=15&tabId=...&tokenId=...&action=theAction
|
|
156
|
-
*/
|
|
157
|
-
declare function makeApiaUrl(props?: {
|
|
158
|
-
action?: string;
|
|
159
|
-
ajaxUrl?: string;
|
|
160
|
-
queryString?: string;
|
|
161
|
-
stringifyOptions?: QueryString.IStringifyOptions;
|
|
162
|
-
tabId?: string | number;
|
|
163
|
-
preventAsXmlParameter?: boolean;
|
|
164
|
-
avoidTabId?: boolean;
|
|
165
|
-
[key: string]: unknown;
|
|
166
|
-
}): string;
|
|
167
|
-
declare global {
|
|
168
|
-
interface Window {
|
|
169
|
-
TAB_ID_REQUEST: string;
|
|
170
|
-
CONTEXT: string;
|
|
171
|
-
URL_REQUEST_AJAX: string;
|
|
172
|
-
FILTERS_LABEL: string;
|
|
173
|
-
BTN_DELETE_FILTERS: string;
|
|
174
|
-
FINDER_ORDER_BY: string;
|
|
175
|
-
FINDER_FILTERS: string;
|
|
176
|
-
ADDITIONAL_FILTERS_LABEL: string;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
interface TColors {
|
|
181
|
-
exception?: string;
|
|
182
|
-
alert?: string;
|
|
183
|
-
message?: string;
|
|
184
|
-
}
|
|
185
|
-
type TApiaApiResult<LoadType> = Promise<TApiaApiAxiosResponse<(LoadType & TNotificationMessage) | null> | null>;
|
|
186
|
-
interface IApiaApiConsoleConfig {
|
|
187
|
-
colors?: TColors;
|
|
188
|
-
debug?: boolean;
|
|
189
|
-
}
|
|
190
|
-
type TSetModalProps = (configuration: THandleConfiguration, formDefinition?: TApiaLoad) => TModal | null;
|
|
191
|
-
interface IApiaApiRequestConfig<DataType> extends IApiaApiConsoleConfig {
|
|
192
|
-
axiosConfig?: AxiosRequestConfig;
|
|
193
|
-
modalConfiguration?: IModalConfig;
|
|
194
|
-
handleLoad?: boolean;
|
|
195
|
-
setModalProps?: TSetModalProps;
|
|
196
|
-
/**
|
|
197
|
-
* Algunas veces las funciones llamadas por una acción en el servidor
|
|
198
|
-
* tienen el mismo nombre siendo en realidad funciones distintas. Para
|
|
199
|
-
* corregir este problema es posible pasar un path relativo al directorio
|
|
200
|
-
* apiaApi/methods
|
|
201
|
-
*/
|
|
202
|
-
methodsPath?: string;
|
|
203
|
-
notificationsCategory?: string;
|
|
204
|
-
queryData?: string | Record<string, unknown>;
|
|
205
|
-
stringifyOptions?: QueryString.IStringifyOptions;
|
|
206
|
-
validateResponse?: (response: AxiosResponse<DataType | null>) => Promise<boolean | string> | boolean | string;
|
|
207
|
-
}
|
|
208
|
-
interface TApiaMessage {
|
|
209
|
-
text: string;
|
|
210
|
-
label?: string;
|
|
211
|
-
}
|
|
212
|
-
type TApiaLoad<T extends Record<string, unknown> = TApiaLoadForm> = {
|
|
213
|
-
canClose: boolean;
|
|
214
|
-
type: string;
|
|
215
|
-
} & T;
|
|
216
|
-
interface TMessage {
|
|
217
|
-
text: string;
|
|
218
|
-
content?: string;
|
|
219
|
-
title?: string;
|
|
220
|
-
type?: string;
|
|
221
|
-
}
|
|
222
|
-
interface TNotificationMessage {
|
|
223
|
-
onClose?: string;
|
|
224
|
-
sysMessages?: {
|
|
225
|
-
message: TMessage | TMessage[];
|
|
226
|
-
};
|
|
227
|
-
sysExceptions?: {
|
|
228
|
-
exception: TMessage | TMessage[];
|
|
229
|
-
};
|
|
230
|
-
exceptions?: {
|
|
231
|
-
exception: TMessage | TMessage[];
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
type TApiaApiSectionElement = TApiaFormElement & {
|
|
236
|
-
sectionElementId: string;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
type TMethod = {
|
|
240
|
-
name: string;
|
|
241
|
-
props: {
|
|
242
|
-
attributes?: Record<string, unknown>;
|
|
243
|
-
currentUrl?: string;
|
|
244
|
-
funCall?: string;
|
|
245
|
-
inlineArguments?: string[];
|
|
246
|
-
messages?: unknown;
|
|
247
|
-
};
|
|
248
|
-
};
|
|
249
|
-
type TApiaApiMethodHandler = {
|
|
250
|
-
alert: typeof notify;
|
|
251
|
-
assignForm: (newForm: TApiaLoad) => unknown;
|
|
252
|
-
close: () => void;
|
|
253
|
-
configuration?: THandleConfiguration;
|
|
254
|
-
formDefinition: TApiaLoad;
|
|
255
|
-
setModalProps?: (configuration: THandleConfiguration, formDefinition?: TApiaLoad) => TModal | null;
|
|
256
|
-
reset: () => void;
|
|
257
|
-
setError: typeof notify;
|
|
258
|
-
setMessage: (message: Record<string, unknown>) => unknown;
|
|
259
|
-
setState: React$1.Dispatch<React$1.SetStateAction<IApiaApiHandlerState>>;
|
|
260
|
-
state: IApiaApiHandlerState;
|
|
261
|
-
setValue: (name: string, value: string) => void;
|
|
262
|
-
};
|
|
263
|
-
type TApiaApiMethod = (handler: TApiaApiMethodHandler, props: TMethod['props']) => Promise<void> | void;
|
|
264
|
-
type TApiaApiField = TApiaApiMethodHandler & {
|
|
265
|
-
element: TModify<TApiaFormElement, {
|
|
266
|
-
onChange: React$1.ChangeEventHandler;
|
|
267
|
-
}>;
|
|
268
|
-
};
|
|
269
|
-
type TStoredApiaApiMethod = (props?: TMethod['props']) => unknown;
|
|
270
|
-
/**
|
|
271
|
-
* Este método permite cargar en forma asíncrona un método que se encuentre
|
|
272
|
-
* dentro del directorio /api/methods
|
|
273
|
-
*/
|
|
274
|
-
declare function getFunction(name: string, handler: TApiaApiMethodHandler): Promise<TStoredApiaApiMethod | undefined>;
|
|
275
|
-
interface IModalConfig {
|
|
276
|
-
modalTitle?: string;
|
|
277
|
-
onClose?: () => void;
|
|
278
|
-
onMessage?: (message: Record<string, unknown>) => unknown;
|
|
279
|
-
onMessageClose?: () => unknown;
|
|
280
|
-
onSubmitted?: (handler: TApiaApiMethodHandler, response: AxiosResponse<Record<string, unknown> | null> | null) => unknown;
|
|
281
|
-
fieldsRenderer?: (element: TApiaApiSectionElement) => React$1.FC<Pick<TApiaApiMethodHandler, 'assignForm'>> | null;
|
|
282
|
-
onFieldChange?: (element: TApiaApiSectionElement, handler: TApiaApiMethodHandler) => unknown;
|
|
283
|
-
}
|
|
284
|
-
type THandleConfiguration = Partial<Pick<IApiaApiRequestConfig<unknown>, 'modalConfiguration' | 'methodsPath' | 'setModalProps'>>;
|
|
285
|
-
interface IApiaApiHandlerState {
|
|
286
|
-
disabled: boolean;
|
|
287
|
-
isLoading: boolean;
|
|
288
|
-
isMultipart: boolean;
|
|
289
|
-
progress: number;
|
|
290
|
-
errors: Record<string, string>;
|
|
291
|
-
windowIndex: number;
|
|
292
|
-
}
|
|
293
|
-
declare const ApiaApiHandler: React$1.MemoExoticComponent<() => React$1.JSX.Element>;
|
|
294
|
-
|
|
295
|
-
declare global {
|
|
296
|
-
interface Window {
|
|
297
|
-
SALT: string;
|
|
298
|
-
IV: string;
|
|
299
|
-
PASSPHRASE: string;
|
|
300
|
-
KEY_SIZE: number;
|
|
301
|
-
ITERATION_COUNT: number;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Permite cargar en forma asíncrona un modal que se encuentre dentro del
|
|
306
|
-
* directorio /api/modals
|
|
307
|
-
* */
|
|
308
|
-
declare const getModal: (path: string) => React__default.LazyExoticComponent<React__default.ComponentType<TApiaApiField>>;
|
|
309
|
-
|
|
310
|
-
type TFilter = {
|
|
311
|
-
avoidLabel?: boolean;
|
|
312
|
-
column?: string;
|
|
313
|
-
errorMessage?: string;
|
|
314
|
-
id: string;
|
|
315
|
-
filterToId?: string;
|
|
316
|
-
filterToValue?: string;
|
|
317
|
-
hideToFilter?: true;
|
|
318
|
-
isAdditional?: boolean;
|
|
319
|
-
isHidden?: boolean;
|
|
320
|
-
onChange?: (queryController: QueryController) => unknown;
|
|
321
|
-
options?: TApiaFilterOption[];
|
|
322
|
-
placeholder?: string;
|
|
323
|
-
multiplier?: number;
|
|
324
|
-
readonly?: boolean;
|
|
325
|
-
required?: boolean;
|
|
326
|
-
runAutomatically?: boolean;
|
|
327
|
-
title?: string;
|
|
328
|
-
tooltip?: string;
|
|
329
|
-
isRange?: boolean;
|
|
330
|
-
group?: string;
|
|
331
|
-
type?: 'date' | 'D' | 'S' | 'number' | 'N' | 'apiaNumber' | 'triple' | 'dateHour' | 'double';
|
|
332
|
-
value: any;
|
|
333
|
-
isSize?: boolean;
|
|
334
|
-
addFilter?: () => void;
|
|
335
|
-
removeFilter?: () => void;
|
|
336
|
-
icon?: string;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
type TFilterTypesElementConditions = {
|
|
340
|
-
onChange: string;
|
|
341
|
-
readonly: boolean;
|
|
342
|
-
name: string;
|
|
343
|
-
valueAsAttribute: boolean;
|
|
344
|
-
disabled: boolean;
|
|
345
|
-
html: boolean;
|
|
346
|
-
text: string;
|
|
347
|
-
id: string;
|
|
348
|
-
title: string;
|
|
349
|
-
type: string;
|
|
350
|
-
value: string;
|
|
351
|
-
selected: boolean;
|
|
352
|
-
options: {
|
|
353
|
-
option: {
|
|
354
|
-
content: string;
|
|
355
|
-
value: string;
|
|
356
|
-
}[];
|
|
357
|
-
};
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
declare class Filter {
|
|
361
|
-
protected tableName?: string;
|
|
362
|
-
filterState: TFilter;
|
|
363
|
-
focus(): void;
|
|
364
|
-
constructor(properties: TFilter);
|
|
365
|
-
getInputRenderer(): React$1.JSX.Element;
|
|
366
|
-
getSelectRenderer(): React$1.JSX.Element;
|
|
367
|
-
getRangeRenderer(): React$1.JSX.Element;
|
|
368
|
-
getDateRenderer(): React$1.JSX.Element;
|
|
369
|
-
getDoubleRenderer(): React$1.JSX.Element;
|
|
370
|
-
Component: (() => React$1.JSX.Element) & {
|
|
371
|
-
displayName: string;
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
type TableControllerState = {
|
|
376
|
-
finishedFirstLoad: boolean;
|
|
377
|
-
columns: Map<string, TResponsiveTableColumn>;
|
|
378
|
-
filters: Map<string | number, Filter>;
|
|
379
|
-
isLoading: boolean;
|
|
380
|
-
pagination: {
|
|
381
|
-
currentPage: number;
|
|
382
|
-
totalPages: number;
|
|
383
|
-
totalRecords: number;
|
|
384
|
-
};
|
|
385
|
-
props: Omit<TResponsiveTableContextProps, 'FiltersRenderer' | 'SelectionHandler' | 'filters' | 'columns' | 'rows' | keyof TableControllerEvents>;
|
|
386
|
-
rows: TResponsiveTableRow[];
|
|
387
|
-
};
|
|
388
|
-
type TableControllerEvents = {
|
|
389
|
-
onChangeSelection: TResponsiveTableRowsSelectionEvent;
|
|
390
|
-
onFilterBlur: TApiaFilter;
|
|
391
|
-
onFilterChange: TApiaFilter;
|
|
392
|
-
onFilterPressEnter: TApiaFilter;
|
|
393
|
-
onPage: number;
|
|
394
|
-
onRefresh: null;
|
|
395
|
-
onRowClick: TResponsiveTableRowsSelectionEvent[number];
|
|
396
|
-
onSelectRows: TResponsiveTableRowsSelectionEvent;
|
|
397
|
-
onSortChange: TResponsiveTableSortChangeEvent;
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
declare class TableController {
|
|
401
|
-
private emitter;
|
|
402
|
-
private tableName;
|
|
403
|
-
private controllerComponent;
|
|
404
|
-
state: TableControllerState;
|
|
405
|
-
private baseFilterIds;
|
|
406
|
-
constructor(initialState?: Partial<TableControllerState>);
|
|
407
|
-
clearFilters(): void;
|
|
408
|
-
private parseFilters;
|
|
409
|
-
Context: (({ children }: {
|
|
410
|
-
children: React.ReactNode;
|
|
411
|
-
}) => React$1.JSX.Element) & {
|
|
412
|
-
displayName: string;
|
|
413
|
-
};
|
|
414
|
-
private TableContext;
|
|
415
|
-
getTableName(): string;
|
|
416
|
-
Pagination: (() => React$1.JSX.Element) & {
|
|
417
|
-
displayName: string;
|
|
418
|
-
};
|
|
419
|
-
Table: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<theme_ui.BoxProps & React$1.RefAttributes<HTMLDivElement>>>;
|
|
420
|
-
on<K extends keyof TableControllerEvents>(ev: K, cb: (e: TableControllerEvents[K]) => unknown): _apia_util.UnSubscriber;
|
|
421
|
-
updateFilters(newFilters: Filter[]): void;
|
|
422
|
-
updateState(newState: Partial<TableControllerState> | ((currentState: TableControllerState) => void)): void;
|
|
423
|
-
markInitialFilters(): void;
|
|
424
|
-
removeAddedFilters(): void;
|
|
425
|
-
removeFilter(id: string): void;
|
|
426
|
-
clearFilter(id: string): void;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
type QueryControllerStructure = {
|
|
430
|
-
description: string;
|
|
431
|
-
hasAdditionalInformation: boolean;
|
|
432
|
-
isDynamic: boolean;
|
|
433
|
-
openFiltersAutomatically: boolean;
|
|
434
|
-
runFiltersAutomatically: boolean;
|
|
435
|
-
hideFilterTypes: boolean;
|
|
436
|
-
title: string;
|
|
437
|
-
columns: TResponsiveTableColumn[];
|
|
438
|
-
filters: TFilter[];
|
|
439
|
-
queryData?: {
|
|
440
|
-
noExecFirstTime?: boolean;
|
|
441
|
-
autoFilter?: boolean;
|
|
442
|
-
showAllAttributes?: boolean;
|
|
443
|
-
showColumn?: string;
|
|
444
|
-
name?: string;
|
|
445
|
-
hideCount?: boolean;
|
|
446
|
-
description?: string;
|
|
447
|
-
storeColumn?: string;
|
|
448
|
-
title?: string;
|
|
449
|
-
};
|
|
450
|
-
};
|
|
451
|
-
type StoredQueryControllerStructure = Omit<QueryControllerStructure, 'columns' | 'filters'>;
|
|
452
|
-
declare class QueryController {
|
|
453
|
-
ajaxUrl: string;
|
|
454
|
-
protected hasInited: boolean;
|
|
455
|
-
protected initializing: boolean;
|
|
456
|
-
protected mutex: Mutex;
|
|
457
|
-
structure: StoredQueryControllerStructure | null;
|
|
458
|
-
tableController: TableController;
|
|
459
|
-
conditions: TFilterTypesElementConditions[];
|
|
460
|
-
constructor(ajaxUrl: string);
|
|
461
|
-
protected actualRefreshMethod(serverFirstRefresh?: boolean): Promise<void>;
|
|
462
|
-
protected areRequiredFilters(): boolean;
|
|
463
|
-
protected buildTableController(): TableController;
|
|
464
|
-
clearFilters(): Promise<void>;
|
|
465
|
-
private timeout;
|
|
466
|
-
protected executeRefresh(): void;
|
|
467
|
-
getTableControllerDefaultProps(): Omit<TResponsiveTableContextProps, 'FiltersRenderer' | 'SelectionHandler' | 'filters' | 'columns' | 'rows' | keyof TableControllerEvents> & Pick<TResponsiveTableContextProps, 'statesColumns'>;
|
|
468
|
-
protected getEventsHandlers(): {
|
|
469
|
-
onChangeSelection: (ev: TResponsiveTableRowsSelectionEvent) => void;
|
|
470
|
-
onFilterBlur: (_ev: TApiaFilter) => void;
|
|
471
|
-
onFilterChange: (_ev: TApiaFilter) => void;
|
|
472
|
-
onFilterPressEnter: (_ev: TApiaFilter) => void;
|
|
473
|
-
onRowClick: (_ev: TResponsiveTableRowsSelectionEvent[number]) => void;
|
|
474
|
-
onSelectRows: (_ev: TResponsiveTableRowsSelectionEvent) => void;
|
|
475
|
-
onSortChange: (ev: TResponsiveTableSortChangeEvent) => void;
|
|
476
|
-
onPage: (num: number) => Promise<void>;
|
|
477
|
-
onRefresh: () => Promise<void>;
|
|
478
|
-
};
|
|
479
|
-
protected getLoadStructureParameters(): Record<string, unknown>;
|
|
480
|
-
protected getClearFiltersParameters(): Record<string, unknown>;
|
|
481
|
-
protected getFiltersValuesMap(): Record<string, unknown>;
|
|
482
|
-
get isLoading(): boolean;
|
|
483
|
-
protected getPageParameters(): Record<string, unknown>;
|
|
484
|
-
protected getRefreshParameters(): Record<string, unknown>;
|
|
485
|
-
protected getSortParameters(): Record<string, unknown>;
|
|
486
|
-
protected getStructure(): Promise<QueryControllerStructure & {
|
|
487
|
-
columns: TResponsiveTableColumn[];
|
|
488
|
-
filters: TFilter[];
|
|
489
|
-
}>;
|
|
490
|
-
protected initEvents(): void;
|
|
491
|
-
initialLoad(): Promise<void>;
|
|
492
|
-
protected loadFilterTypes(): Promise<void>;
|
|
493
|
-
page(num: number): Promise<void>;
|
|
494
|
-
protected parseLoadStructureResponse(response: any): QueryControllerStructure & {
|
|
495
|
-
columns: TResponsiveTableColumn[];
|
|
496
|
-
filters: TFilter[];
|
|
497
|
-
};
|
|
498
|
-
protected parseRefreshResponse(response?: T__LEGACY_SERVER__ApiaFunction | null): void;
|
|
499
|
-
protected parseStructure(structure: ReturnType<QueryController['parseLoadStructureResponse']>): void;
|
|
500
|
-
refresh(now?: boolean): Promise<void>;
|
|
501
|
-
setFilterOptions(): Promise<void>;
|
|
502
|
-
sort(column: string, orderType: 'Asc' | 'Des'): Promise<void>;
|
|
503
|
-
protected updatePageState(pageInfo?: T__LEGACY_SERVER__ApiaFunctionPageInfo): void;
|
|
504
|
-
protected updateRows(rows: TResponsiveTableRow[]): void;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
type QueryModalControllerEvents = Pick<TableControllerEvents, 'onSelectRows'> & {
|
|
508
|
-
cancel: null;
|
|
509
|
-
};
|
|
510
|
-
declare class QueryModalController {
|
|
511
|
-
protected emitter: EventEmitter<QueryModalControllerEvents>;
|
|
512
|
-
protected queryController: QueryController;
|
|
513
|
-
private modalHandler;
|
|
514
|
-
protected currentSelection: TResponsiveTableRowsSelectionEvent | null;
|
|
515
|
-
private additionalFiltersController;
|
|
516
|
-
protected sx: ThemeUICSSObject;
|
|
517
|
-
constructor(queryController: QueryController);
|
|
518
|
-
protected getModalDefinition(): TOpenModal;
|
|
519
|
-
getQueryController(): QueryController;
|
|
520
|
-
protected on<K extends keyof QueryModalControllerEvents>(ev: K, cb: (e: QueryModalControllerEvents[K]) => unknown): UnSubscriber;
|
|
521
|
-
openModal<T = QueryModalControllerEvents['onSelectRows']>(properties?: TOpenModal): Promise<T>;
|
|
522
|
-
getModalHandler(): ApiaUtilModalHandler | null;
|
|
523
|
-
protected onConfirm(): void;
|
|
524
|
-
protected onConfirmResolve<T>(): Promise<T>;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
declare const makeApiaUsersModal2: () => QueryModalController;
|
|
528
|
-
|
|
529
|
-
declare class GenericListQuery extends QueryController {
|
|
530
|
-
ajaxUrl: string;
|
|
531
|
-
constructor(ajaxUrl: string);
|
|
532
|
-
protected getClearFiltersParameters(): Record<string, unknown>;
|
|
533
|
-
getTableControllerDefaultProps(): Omit<TResponsiveTableContextProps, 'FiltersRenderer' | 'SelectionHandler' | 'filters' | 'columns' | 'rows' | keyof TableControllerEvents> & Pick<TResponsiveTableContextProps, 'statesColumns'>;
|
|
534
|
-
protected getLoadStructureParameters(): {
|
|
535
|
-
[x: string]: unknown;
|
|
536
|
-
};
|
|
537
|
-
protected getRefreshParameters(): Record<string, unknown>;
|
|
538
|
-
protected getStructure(): Promise<QueryControllerStructure>;
|
|
539
|
-
initialLoad(): Promise<void>;
|
|
540
|
-
protected parseLoadStructureResponse(response: any): QueryControllerStructure;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
type TPoolsParameters = {
|
|
544
|
-
showCurrentEnv?: boolean;
|
|
545
|
-
showGlobal: boolean;
|
|
546
|
-
};
|
|
547
|
-
declare const makeApiaPoolsModals2: (config?: TPoolsParameters) => QueryModalController;
|
|
548
|
-
|
|
549
|
-
type TFormsParameters$1 = {};
|
|
550
|
-
declare const makeApiaFormsModal2: (config?: TFormsParameters$1) => QueryModalController;
|
|
551
|
-
|
|
552
|
-
type TFormsParameters = {};
|
|
553
|
-
declare const makeApiaLangsModal2: (config?: TFormsParameters) => QueryModalController;
|
|
554
|
-
|
|
555
|
-
type TOpenMonDocModal = {
|
|
556
|
-
docTypeId: string[];
|
|
557
|
-
docTypeSel: string;
|
|
558
|
-
monDocId: number;
|
|
559
|
-
};
|
|
560
|
-
declare class ApiaMonDocModal2 extends QueryModalController {
|
|
561
|
-
protected sx: {
|
|
562
|
-
'tr.expired[class]': {
|
|
563
|
-
color: string;
|
|
564
|
-
'&:hover': {
|
|
565
|
-
color: string;
|
|
566
|
-
};
|
|
567
|
-
};
|
|
568
|
-
};
|
|
569
|
-
constructor();
|
|
570
|
-
openModal<T = TResponsiveTableRowsSelectionEvent>(properties: TOpenModal & {
|
|
571
|
-
monitorProperties: TOpenMonDocModal;
|
|
572
|
-
}): Promise<T>;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
export { ApiaApi, ApiaApiHandler, ApiaMonDocModal2, GenericListQuery, type IApiaApiRequestConfig, QueryController, type QueryControllerStructure, QueryModalController, type TApiaApiAxiosResponse, type TApiaApiMethod, type TApiaApiResult, type TFilter, getFunction, getModal, isHtmlResponse, isXmlResponse, makeApiaFormsModal2, makeApiaLangsModal2, makeApiaPoolsModals2, makeApiaUrl, makeApiaUsersModal2, parseSuccessfulResponse };
|
|
1
|
+
export { ApiaApiHandler, TApiaApiMethod, TApiaApiMethodHandler, getFunction } from './ApiaApiHandler.js';
|
|
2
|
+
export { default as ApiaApi, TApiaApiAxiosResponse, isHtmlResponse, isXmlResponse, makeApiaUrl, parseSuccessfulResponse } from './apiaApi.js';
|
|
3
|
+
export { IApiaApiRequestConfig, TApiaApiResult, TApiaLoadText } from './types.js';
|
|
4
|
+
export { getModal } from './fields/ApiaApiInput.js';
|
|
5
|
+
export { QueryController, QueryControllerStructure } from './queries/QueryController.js';
|
|
6
|
+
export { QueryModalController } from './queries/QueryModalController.js';
|
|
7
|
+
export { TFilter } from './queries/filters/types.js';
|
|
8
|
+
export { makeApiaUsersModal2 } from './modals/apia/components/generics/ApiaUsersModal2.js';
|
|
9
|
+
export { makeApiaPoolsModals2 } from './modals/apia/components/generics/ApiaPoolsModal2.js';
|
|
10
|
+
export { GenericListQuery } from './modals/apia/components/generics/GenericListQuery.js';
|
|
11
|
+
export { makeApiaFormsModal2 } from './modals/apia/components/generics/ApiaFormsModal2.js';
|
|
12
|
+
export { makeApiaLangsModal2 } from './modals/apia/components/generics/LangsModal2.js';
|
|
13
|
+
export { ApiaMonDocModal2 } from './modals/apia/components/generics/ApiaMonDocModal2.js';
|
|
576
14
|
//# sourceMappingURL=index.d.ts.map
|