@apia/execution 4.0.43 → 4.0.45
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/index.d.ts +28 -15
- package/dist/index.js +236 -101
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -375,11 +375,13 @@ type TApiaTreeProperties = TApiaFieldCommonProperties & TApiaFieldWithAttributeP
|
|
|
375
375
|
autoFocus?: string;
|
|
376
376
|
};
|
|
377
377
|
|
|
378
|
-
type
|
|
378
|
+
type XMLParser<T = Record<string, unknown>> = (xml: XMLDocument | string, behaveConfig?: TParseXmlBehavior<T>) => T;
|
|
379
|
+
type TParseXmlBehavior<T> = {
|
|
379
380
|
avoidTrimXml?: boolean;
|
|
380
381
|
avoidNormalize?: boolean;
|
|
382
|
+
xmlParser?: XMLParser<T>;
|
|
381
383
|
};
|
|
382
|
-
declare const parseXml: <T = Record<string, unknown>>(xml: XMLDocument | string, behaveConfig?: TParseXmlBehavior) => T;
|
|
384
|
+
declare const parseXml: <T = Record<string, unknown>>(xml: XMLDocument | string, behaveConfig?: TParseXmlBehavior<T>) => T;
|
|
383
385
|
|
|
384
386
|
interface TApiaMessage {
|
|
385
387
|
label?: string;
|
|
@@ -407,11 +409,11 @@ interface IApiaApiRequestConfig {
|
|
|
407
409
|
axiosConfig?: AxiosRequestConfig;
|
|
408
410
|
stringifyOptions?: IStringifyOptions;
|
|
409
411
|
}
|
|
410
|
-
|
|
411
|
-
postData?:
|
|
412
|
+
type IApiaApiPostConfig<PostDataType, ResponseType = any> = IApiaApiRequestConfig & TParseXmlBehavior<ResponseType> & {
|
|
413
|
+
postData?: PostDataType;
|
|
412
414
|
postDataTreatment?: 'stringify';
|
|
413
415
|
allowAfterFinish?: boolean;
|
|
414
|
-
}
|
|
416
|
+
};
|
|
415
417
|
|
|
416
418
|
type TFormEventName = 'onLoad' | 'onSubmit' | 'onReload' | 'onBeforePrint' | 'onAfterPrint';
|
|
417
419
|
type TFrmParent = 'E' | 'P';
|
|
@@ -517,6 +519,7 @@ type SetValueOptions = Partial<{
|
|
|
517
519
|
markAsDirty: boolean;
|
|
518
520
|
synchronize: boolean;
|
|
519
521
|
force: boolean;
|
|
522
|
+
fireEvents?: boolean;
|
|
520
523
|
}>;
|
|
521
524
|
type FireEventParameters = Record<string, unknown>;
|
|
522
525
|
type FieldValidationState = {
|
|
@@ -871,6 +874,7 @@ declare class ApiaFunctions implements IApiaFunctions {
|
|
|
871
874
|
setStepTitle(stepNumber: number, stepTitle: string): void;
|
|
872
875
|
showActionButton(id: number): void;
|
|
873
876
|
viewAdmEntity(entName: string, entNum?: number): void;
|
|
877
|
+
changeTab(index: number[]): void;
|
|
874
878
|
}
|
|
875
879
|
|
|
876
880
|
declare class ActionsController {
|
|
@@ -1086,6 +1090,7 @@ declare class ApiaFieldWithAttribute<T = string | boolean> extends ApiaField {
|
|
|
1086
1090
|
clearValue(): void;
|
|
1087
1091
|
getValue(): any;
|
|
1088
1092
|
setValue(v: T): void;
|
|
1093
|
+
protected _setValue(v: T, options: SetValueOptions): void;
|
|
1089
1094
|
getLabel(): string | null | void;
|
|
1090
1095
|
getProperty<K extends keyof TApiaFieldWithAttributeProperties>(name: TApiaFieldWithAttributeProperties[K]): unknown;
|
|
1091
1096
|
}
|
|
@@ -1204,6 +1209,7 @@ declare class GridField extends ApiaField {
|
|
|
1204
1209
|
deletePage(): void;
|
|
1205
1210
|
deleteRow(index: number): Promise<void>;
|
|
1206
1211
|
editRow(index: number): void;
|
|
1212
|
+
getSelectedIndexes(useAbsoluteIndex?: boolean): number[];
|
|
1207
1213
|
getAllColumns(): (IApiaField<Readonly<{
|
|
1208
1214
|
TYPE_INPUT: "input";
|
|
1209
1215
|
TYPE_SELECT: "select";
|
|
@@ -1814,6 +1820,7 @@ declare class FileUploaderField extends ApiaFieldWithAttribute {
|
|
|
1814
1820
|
constructor(execution: Execution, field: File$1);
|
|
1815
1821
|
onChange(cb: (newValue: unknown) => unknown): void;
|
|
1816
1822
|
setValue(): null;
|
|
1823
|
+
downloadDocument(): Promise<void>;
|
|
1817
1824
|
}
|
|
1818
1825
|
|
|
1819
1826
|
declare class PasswordField extends ApiaField {
|
|
@@ -2264,6 +2271,7 @@ declare class UploaderApi extends EventEmitter$1<{
|
|
|
2264
2271
|
lockDocument(id: string): Promise<void>;
|
|
2265
2272
|
protected evaluateDeleteDocumentResult(result: unknown): boolean;
|
|
2266
2273
|
setTranslationFile(file: TUploaderFileInfo, docId: string, langId: number): void;
|
|
2274
|
+
protected getCheckSignatureParameters: typeof returnExactlyTheSame;
|
|
2267
2275
|
protected getAjaxUploadFileStatusParameters: typeof returnExactlyTheSame;
|
|
2268
2276
|
protected getAjaxUploadStartParameters: typeof returnExactlyTheSame;
|
|
2269
2277
|
protected getConfirmDropModalParameters: typeof returnExactlyTheSame;
|
|
@@ -2885,13 +2893,9 @@ declare class Observations {
|
|
|
2885
2893
|
constructor(execution: Execution);
|
|
2886
2894
|
private hasInited;
|
|
2887
2895
|
init(): Promise<void>;
|
|
2888
|
-
getConfirmParams():
|
|
2889
|
-
txtComment: string | undefined;
|
|
2890
|
-
chkAddAlert: string | undefined;
|
|
2891
|
-
chkAddAllAlert: string | undefined;
|
|
2892
|
-
chkRemAlert: string | undefined;
|
|
2893
|
-
};
|
|
2896
|
+
getConfirmParams(): Record<string, unknown>;
|
|
2894
2897
|
setPriority(newPriority: string): void;
|
|
2898
|
+
areObservationsChecked(): boolean;
|
|
2895
2899
|
}
|
|
2896
2900
|
|
|
2897
2901
|
type ConfirmStep = 'CHECK_LOCK' | 'CONFIRM' | 'CHECK_SIGN' | 'CHECK_WIZARD' | 'SIGN';
|
|
@@ -3108,6 +3112,7 @@ declare class Execution extends EventEmitter$1<{
|
|
|
3108
3112
|
private _stepCount;
|
|
3109
3113
|
readonly notifications: Notifications;
|
|
3110
3114
|
private lastModalReturn;
|
|
3115
|
+
private _pendingPromises;
|
|
3111
3116
|
constructor(environment: TExecutionEnvironment);
|
|
3112
3117
|
protected formsById: {
|
|
3113
3118
|
E: Map<string, Form>;
|
|
@@ -3122,6 +3127,7 @@ declare class Execution extends EventEmitter$1<{
|
|
|
3122
3127
|
locked: number;
|
|
3123
3128
|
hasChangedAnything: boolean;
|
|
3124
3129
|
};
|
|
3130
|
+
addPendingPromise(promise: Promise<boolean>): void;
|
|
3125
3131
|
getAllForms(): Form[];
|
|
3126
3132
|
private hasInitializedFormsTabs;
|
|
3127
3133
|
initializeFormsTabs(frmParent: TFrmParent, cb: () => unknown): void;
|
|
@@ -3185,6 +3191,7 @@ declare class Execution extends EventEmitter$1<{
|
|
|
3185
3191
|
setLastModalReturn(value: string[]): void;
|
|
3186
3192
|
getLastModalReturn(): string[];
|
|
3187
3193
|
private fireEvents;
|
|
3194
|
+
waitForPendingSyncs(): Promise<void>;
|
|
3188
3195
|
}
|
|
3189
3196
|
|
|
3190
3197
|
declare global {
|
|
@@ -3200,10 +3207,10 @@ declare function isXmlResponse(response: AxiosResponse<unknown>): RegExpMatchArr
|
|
|
3200
3207
|
declare function isHtmlResponse(response: AxiosResponse<unknown>): RegExpMatchArray | null;
|
|
3201
3208
|
declare class InvalidSessionException extends Error {
|
|
3202
3209
|
}
|
|
3203
|
-
declare const parseSuccessfulResponse: <
|
|
3210
|
+
declare const parseSuccessfulResponse: <ResponseType extends Record<string, unknown>, PostDataType = unknown>(execution: Execution, response: AxiosResponse<string>, behaveConfig?: IApiaApiPostConfig<PostDataType, ResponseType>) => Promise<(ResponseSysMessages & ResponseType & {
|
|
3204
3211
|
onClose?: string;
|
|
3205
3212
|
code?: unknown;
|
|
3206
|
-
load?:
|
|
3213
|
+
load?: ResponseType | undefined;
|
|
3207
3214
|
}) | ({
|
|
3208
3215
|
actions: unknown;
|
|
3209
3216
|
onClose: string | undefined;
|
|
@@ -3216,7 +3223,7 @@ declare const parseSuccessfulResponse: <LoadType extends Record<string, unknown>
|
|
|
3216
3223
|
sysMessages: {
|
|
3217
3224
|
message: TApiaMessage | TApiaMessage[];
|
|
3218
3225
|
} | undefined;
|
|
3219
|
-
} &
|
|
3226
|
+
} & ResponseType) | null>;
|
|
3220
3227
|
/**
|
|
3221
3228
|
* IMPORTANT!! The ApiaApi is programmed under the slogan that
|
|
3222
3229
|
* **should never throw an exception**. **Errors** coming from
|
|
@@ -3265,7 +3272,7 @@ declare const parseSuccessfulResponse: <LoadType extends Record<string, unknown>
|
|
|
3265
3272
|
}
|
|
3266
3273
|
* @returns The type of the return value depends on the type passed when calling the function. If there was an error it returns null.
|
|
3267
3274
|
*/
|
|
3268
|
-
declare function post<LoadType extends Record<string, unknown> = Record<string, unknown>, DataType = unknown, T = unknown>(execution: Execution, actualUrl: string, behaveConfig?: IApiaApiPostConfig<DataType>): TApiaApiResult<LoadType>;
|
|
3275
|
+
declare function post<LoadType extends Record<string, unknown> = Record<string, unknown>, DataType = unknown, T = unknown>(execution: Execution, actualUrl: string, behaveConfig?: IApiaApiPostConfig<DataType, LoadType>): TApiaApiResult<LoadType>;
|
|
3269
3276
|
/**
|
|
3270
3277
|
* IMPORTANTE!! El ApiaApi está programado bajo la consigna de que
|
|
3271
3278
|
* **no debe tirar núnca una excepción**. **Los errores** provenientes
|
|
@@ -3420,6 +3427,7 @@ declare class File$1 extends FieldWithAttribute<TApiaFileProperties> {
|
|
|
3420
3427
|
synchronize: boolean;
|
|
3421
3428
|
}> | undefined): Promise<boolean>;
|
|
3422
3429
|
loadFromDefinition(def: string): void;
|
|
3430
|
+
downloadDocument(): Promise<void>;
|
|
3423
3431
|
}
|
|
3424
3432
|
|
|
3425
3433
|
type GridEvents = 'gridAdd' | 'gridDelete' | 'gridSort' | 'gridColumnSelect';
|
|
@@ -3616,6 +3624,11 @@ declare class GridPaginated extends Grid {
|
|
|
3616
3624
|
*/
|
|
3617
3625
|
get finalIndex(): number;
|
|
3618
3626
|
addRow(): Promise<boolean>;
|
|
3627
|
+
protected actualDeleteRows(props: {
|
|
3628
|
+
index?: number | number[];
|
|
3629
|
+
action?: string;
|
|
3630
|
+
}): Promise<boolean>;
|
|
3631
|
+
deleteAllRows(): Promise<boolean>;
|
|
3619
3632
|
deleteRows(index?: number | number[]): Promise<boolean>;
|
|
3620
3633
|
gotoPage(page: number): Promise<boolean>;
|
|
3621
3634
|
sortDown(index?: number | number[]): Promise<boolean>;
|