@apia/execution 4.0.44 → 5.0.0

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 CHANGED
@@ -1,12 +1,35 @@
1
- import * as _apia_scheduler_controller from '@apia/scheduler-controller';
2
- import { TScheduleResult, Scheduler } from '@apia/scheduler-controller';
3
- export { Scheduler } from '@apia/scheduler-controller';
4
1
  import { AxiosRequestConfig, AxiosResponse } from 'axios';
5
2
  import { IStringifyOptions } from 'qs';
6
3
  import { TableController, Row, Cell, CellState } from '@apia/table2-controller';
7
- import * as _apia_util from '@apia/util';
8
- import { DeepReadonly, NotificationDefinition, EventEmitter as EventEmitter$1, T__LEGACY_SERVER__ApiaLoad, T__LEGACY_SERVER__ApiaFunction, TApiaLoadForm, Mutex } from '@apia/util';
4
+ import { DeepReadonly, TApiaLoadForm, EventEmitter as EventEmitter$1, Mutex } from '@apia/util';
5
+ import { UploaderApi as UploaderApi$1, TModalConfig, TUploaderFileInfo, UploaderModalController, TFileUploaded, TSaveDroppedFilesConf } from '@apia/uploader-controller';
9
6
  import { MobXTree } from '@apia/tree2-controller';
7
+ import * as _apia_scheduler_controller from '@apia/scheduler-controller';
8
+ import { TScheduleResult, Scheduler } from '@apia/scheduler-controller';
9
+
10
+ type NotificationIcon = string;
11
+ type NotificationType = 'info' | 'error' | 'success' | 'warning' | 'modal';
12
+ type NotificationDefinition = {
13
+ icon?: NotificationIcon;
14
+ id?: string | number;
15
+ isOpen?: boolean;
16
+ message: string;
17
+ stackTrace?: string;
18
+ title?: string;
19
+ type?: NotificationType;
20
+ };
21
+ declare abstract class Notification<State extends NotificationDefinition = NotificationDefinition> {
22
+ readonly props: State;
23
+ protected state: State;
24
+ constructor(props: State);
25
+ get icon(): string | undefined;
26
+ get id(): string | number | undefined;
27
+ get isOpen(): boolean | undefined;
28
+ get message(): string;
29
+ get stackTrace(): string | undefined;
30
+ get title(): string | undefined;
31
+ get type(): NotificationType | undefined;
32
+ }
10
33
 
11
34
  type TApiaButtonDefinition = TApiaFieldBaseDefinition<TApiaButtonProperties> & {
12
35
  fieldType: 'button';
@@ -521,7 +544,7 @@ type SetValueOptions = Partial<{
521
544
  markAsDirty: boolean;
522
545
  synchronize: boolean;
523
546
  force: boolean;
524
- fireEvents: boolean;
547
+ fireEvents?: boolean;
525
548
  }>;
526
549
  type FireEventParameters = Record<string, unknown>;
527
550
  type FieldValidationState = {
@@ -630,6 +653,7 @@ declare abstract class FieldWithAttribute<FieldProps extends TApiaFieldWithAttri
630
653
  protected processSynchronizeError(e: unknown): void;
631
654
  protected synchronize(newValue: ValueType): Promise<boolean>;
632
655
  protected hasValue(): boolean;
656
+ protected isValidValue(): boolean;
633
657
  validate(): Promise<boolean>;
634
658
  setError(err: string): void;
635
659
  protected getServerEventParams(evtId: number, additionalParams?: Record<string, any>): MakeApiaUrlProps;
@@ -1053,7 +1077,7 @@ declare class ApiaForm implements IApiaForm {
1053
1077
  declare abstract class ApiaField<Props extends typeof FieldConstants = typeof FieldConstants> implements IApiaField<Props> {
1054
1078
  #private;
1055
1079
  constructor(execution: Execution, field: Field<any>);
1056
- get fldType(): "button" | "check" | "file" | "hidden" | "image" | "input" | "href" | "multiple" | "radio" | "select" | "label" | "area" | "title" | "editor" | "grid" | "password" | "captcha" | "tree";
1080
+ get fldType(): "title" | "button" | "check" | "file" | "hidden" | "image" | "input" | "href" | "multiple" | "radio" | "select" | "label" | "area" | "editor" | "grid" | "password" | "captcha" | "tree";
1057
1081
  get fldId(): string;
1058
1082
  get form(): ApiaForm;
1059
1083
  get index(): number;
@@ -2057,19 +2081,6 @@ declare abstract class TranslatableField<FieldProps extends TApiaTranslatableFie
2057
2081
  type FieldConstructor = new (definition: any) => Field<any, any, any> | FieldWithAttribute<any, any, any> | TranslatableField<any, any, any>;
2058
2082
  type FieldsMapping = Record<string, (definition: any) => FieldConstructor>;
2059
2083
 
2060
- declare abstract class Notification<State extends NotificationDefinition = NotificationDefinition> {
2061
- readonly props: State;
2062
- protected state: State;
2063
- constructor(props: State);
2064
- get icon(): string | undefined;
2065
- get id(): string | number | undefined;
2066
- get isOpen(): boolean | undefined;
2067
- get message(): string;
2068
- get stackTrace(): string | undefined;
2069
- get title(): string | undefined;
2070
- get type(): _apia_util.NotificationType | undefined;
2071
- }
2072
-
2073
2084
  declare class Notifications {
2074
2085
  execution: Execution;
2075
2086
  private emitter;
@@ -2077,8 +2088,8 @@ declare class Notifications {
2077
2088
  protected notifications: Notification[];
2078
2089
  add(notification: Notification): void;
2079
2090
  closeTab(): void;
2080
- getAll(): Notification<_apia_util.NotificationDefinition>[];
2081
- getById(id: string | number): Notification<_apia_util.NotificationDefinition> | undefined;
2091
+ getAll(): Notification<NotificationDefinition>[];
2092
+ getById(id: string | number): Notification<NotificationDefinition> | undefined;
2082
2093
  kill(): void;
2083
2094
  remove(notification: string | number | Notification): void;
2084
2095
  on: <K extends "closeTab" | "kill" | "notification">(event: K, cb: Callback<{
@@ -2181,482 +2192,57 @@ type TProcess = {
2181
2192
  };
2182
2193
  };
2183
2194
 
2184
- /**
2185
- * El comportamiento de esta función se explica por su
2186
- * nombre.
2187
- */
2188
- declare function returnExactlyTheSame(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2189
- declare function isOneClickUploadEnabled(execution: Execution, oneClickUploadProp?: boolean): string | boolean;
2190
- declare const parseFileDefinition: (execution: Execution, fileDefinition: TFileUploaded | TUploaderFileInfo, isSignRequired: boolean) => TUploaderFileInfo;
2191
- type TOnUploadProgress = (progress: number) => void;
2192
- declare class UploaderApi extends EventEmitter$1<{
2193
- fileUploaded: null;
2194
- }> {
2195
+ declare class UploaderApi extends UploaderApi$1 {
2195
2196
  execution: Execution;
2196
- id: string;
2197
2197
  type: 'E' | 'P';
2198
- modalConfig: TModalConfig;
2199
- maxFiles: number;
2200
- modalController: UploaderModalController | null;
2201
- allowTranslations: boolean;
2202
- langs: Record<number, string> | undefined;
2203
- currentConfiguration: TUploaderLoadCurrentFunctionMessages | undefined;
2204
- docTypePermittedObjId: string | undefined;
2205
- state: UploaderState;
2206
- get filesArray(): TUploaderFileInfo[];
2198
+ docTypePermittedObjId: string;
2207
2199
  constructor(execution: Execution, id: string, type: 'E' | 'P', modalConfig: TModalConfig);
2208
- init(): Promise<void>;
2209
- onStartUpload(files?: File[]): Promise<void>;
2210
- onTranslateUpload(conf: {
2211
- langId: number;
2212
- translatingFile: TUploaderFileInfo;
2213
- }, files?: File[]): Promise<void>;
2214
- onVersionUpload(file: TUploaderFileInfo, conf?: {
2215
- newFiles?: File[];
2216
- langId?: number;
2217
- translatingFile?: TUploaderFileInfo;
2218
- }): Promise<void>;
2219
- autoLock(): Promise<boolean>;
2220
- notify(notification: NotificationDefinition): void;
2221
- protected getAjaxUrl(): string;
2222
- getDocTypes(): TDocType[];
2223
- getCurrentDocTypeId(): string;
2224
- getCurrentDocType(): TDocType | undefined;
2225
- getInProgressFiles(): File[];
2226
- getHiddenFiles(): File[];
2227
- getExistingFiles(): Record<string, TUploaderFileInfo>;
2228
- getProgress(): number;
2229
- getHasAllDocTypes(): boolean | undefined;
2230
- getDocumentInfo({ docId: apiId, downloadDocId: docId, }: TRequireOnlyOne<{
2231
- docId: string;
2232
- downloadDocId: string;
2233
- }>, newElem?: boolean): Promise<({
2234
- canClose: boolean;
2235
- type: string;
2236
- } & {
2237
- function: {
2238
- name: string;
2239
- } & {
2240
- data: {
2241
- onClose: string;
2242
- general: TApiaDocumentDefinition;
2243
- permissions: {
2244
- pool: TDocumentPermission | TDocumentPermission[];
2245
- user: TDocumentPermission | TDocumentPermission[];
2246
- };
2247
- versions: {
2248
- version: TDocumentVersion | TDocumentVersion[];
2249
- };
2250
- };
2251
- currentUsrPems: {
2252
- usrCanModify: boolean;
2253
- };
2254
- metadatas: {
2255
- metadata: TDocumentMetadata | TDocumentMetadata[];
2256
- };
2257
- docDownHistory: {
2258
- docHistory: TDocumentDownloadHistory | TDocumentDownloadHistory[];
2259
- };
2260
- };
2261
- } & ResponseSysMessages) | null>;
2262
- /**
2263
- * This method searches for the provided id in several places:
2264
- *
2265
- * If it's found in the current files, returns it.
2266
- * If not, it searches the provided docId in the translations map of each uploaded file.
2267
- */
2268
- getDocument(docId: string): TUploaderFileInfo | undefined;
2269
- protected updateDocument(docId: string, newValue: TUploaderFileInfo): void;
2270
- protected deleteDocument(docId: string): void;
2271
- clearFile(name: string): void;
2272
- clearFiles(): void;
2273
- clearState(): void;
2274
- checkLockDocument(id: string, shouldNotifyUnlocked?: boolean): Promise<string | boolean>;
2275
- setCurrentDocTypeId(docTypeId: string): void;
2276
- ajaxUploadStart(newFiles?: File[]): Promise<boolean | undefined>;
2277
- reloadMetadata(props?: Partial<{
2278
- docId: string;
2279
- docTypeId: number | string;
2280
- }>, additionalProps?: Record<string, unknown>): Promise<void>;
2281
- saveDroppedFiles(unprocessedFiles: File[], conf?: TSaveDroppedFilesConf): Promise<boolean>;
2282
- checkWebDavLock(docId: string): Promise<unknown>;
2283
- checkSignature(file: TUploaderFileInfo): Promise<TApiaApiAxiosResponse<({
2284
- markedToSign: boolean;
2285
- } & ResponseSysMessages) | null> | null>;
2286
- editDocument(id: string): Promise<void>;
2287
- downloadVersion(fileId: string, version?: string): Promise<void>;
2288
- downloadDocument(id: string, version?: string): Promise<void>;
2289
- ajaxDeleteDocument(id: string, langId?: number): Promise<void>;
2290
- version(file: TUploaderFileInfo, conf?: {
2291
- newFiles?: File[];
2292
- langId?: number;
2293
- translatingFile?: TUploaderFileInfo;
2294
- }): Promise<void>;
2295
- versionFileInfo(file: TUploaderFileInfo): Promise<void>;
2296
- pickFileById(id: string): Promise<void>;
2297
- markFileToSign(id: string, langId?: string): Promise<void>;
2298
- /**
2299
- * Por el momento realiza la descarga de todos los archivos
2300
- * que estén subidos.
2301
- */
2302
- downloadMultipleDocuments(): void;
2303
- confirmDropModal(conf?: {
2304
- langId?: number;
2305
- translatingFile?: TUploaderFileInfo;
2306
- }): Promise<boolean>;
2307
- loadCurrentDocuments(): Promise<void>;
2308
- lockDocument(id: string): Promise<void>;
2309
- protected evaluateDeleteDocumentResult(result: unknown): boolean;
2310
- setTranslationFile(file: TUploaderFileInfo, docId: string, langId: number): void;
2311
- protected getCheckSignatureParameters: typeof returnExactlyTheSame;
2312
- protected getAjaxUploadFileStatusParameters: typeof returnExactlyTheSame;
2313
- protected getAjaxUploadStartParameters: typeof returnExactlyTheSame;
2314
- protected getConfirmDropModalParameters: typeof returnExactlyTheSame;
2315
- protected getCheckLockDocumentParameters: typeof returnExactlyTheSame;
2316
- protected getCheckWebDavLockParameters: typeof returnExactlyTheSame;
2317
- protected getConfirmDropModalPostdata: typeof returnExactlyTheSame;
2318
- protected getConfirmDropModalMetadataString: ({ metadata, }: {
2319
- metadata: TDocumentMetadata[];
2320
- }) => string;
2321
- protected getConfirmDropModalPermissionsString: ({ poolsPermissions, usersPermissions, }: {
2322
- poolsPermissions: IPoolsPermissions[];
2323
- usersPermissions: IUsersPermissions[];
2324
- }) => string;
2325
- protected getConfirmDropModalAdditionalMetadataString: (additionalMetadata: TDocumentMetadata[] | []) => string;
2326
- protected getDeleteDocumentParameters: typeof returnExactlyTheSame;
2327
- protected getClearTempFilesParameters: typeof returnExactlyTheSame;
2328
- protected getDocumentInfoParameters: typeof returnExactlyTheSame;
2329
- protected getDownloadMultipleDocumentsParameters: typeof returnExactlyTheSame;
2330
- protected getEditDocumentParameters: typeof returnExactlyTheSame;
2331
- protected getLockDocumentParameters: typeof returnExactlyTheSame;
2332
- protected getMarkFileToSignParameters: typeof returnExactlyTheSame;
2333
- protected getProcessDroppedFilesParameters: typeof returnExactlyTheSame;
2334
- protected getProcessDroppedFilesPostdata: typeof returnExactlyTheSame;
2335
- protected getReloadMetadataParameters: typeof returnExactlyTheSame;
2336
- protected getSaveDroppedFilesParameters: typeof returnExactlyTheSame;
2337
- protected filterAlreadyUploadedFiles(files: File[], conf?: TSaveDroppedFilesConf): File[];
2338
- protected filterByFilesAmountLimit(files: File[]): File[];
2339
- protected filterAcceptedFiles(files: File[], shouldNotify?: boolean, docTypeId?: string | TDocType): File[];
2340
- protected filterExistingFiles(files: File[], conf?: TSaveDroppedFilesConf): File[];
2341
- protected filterVersioningFiles(files: File[], conf?: {
2342
- langId?: number;
2343
- strictMode?: boolean;
2344
- translatingFile?: TUploaderFileInfo;
2345
- shouldReset?: boolean;
2346
- }): File[];
2347
- parseFileDefinition: (file: TFileUploaded) => TUploaderFileInfo;
2348
2200
  getLoadFileSystemStructureTree(): Record<string, unknown>;
2349
2201
  getLoadFilesForFolderParameters(): Record<string, unknown>;
2350
- }
2351
-
2352
- declare class UploaderModalController {
2353
- api: UploaderApi;
2354
- modalConfig: TModalConfig;
2355
- conf?: {
2356
- langId?: number;
2357
- translatingFile?: TUploaderFileInfo;
2358
- versionFile?: TUploaderFileInfo;
2359
- } | undefined;
2360
- state: UploaderModalState;
2361
- constructor(api: UploaderApi, modalConfig: TModalConfig, conf?: {
2362
- langId?: number;
2363
- translatingFile?: TUploaderFileInfo;
2364
- versionFile?: TUploaderFileInfo;
2365
- } | undefined);
2366
- get allMetadata(): TDocumentMetadata[];
2367
- get allowAllType(): "" | "M" | "R";
2368
- get description(): string;
2369
- get docFolder(): number | undefined;
2370
- get docExpDate(): string | undefined;
2371
- get docTypes(): TDocType[];
2372
- get freeMetadata(): TDocumentMetadata[];
2373
- get exitingFiles(): Record<string, TUploaderFileInfo>;
2374
- get inProgressFiles(): File[];
2375
- get hiddenFiles(): File[];
2376
- get progress(): number;
2377
- get metadata(): TDocumentMetadata[];
2378
- get selectedDocTypeId(): string;
2379
- get selectedDocType(): TDocType | undefined;
2380
- addMetadata(): void;
2381
- addFiles(files: File[]): void;
2382
- addDirectoryFile(file: TApiaDocumentDefinition): void;
2383
- changeDocType(docTypeId: string): Promise<void>;
2384
- clearDirectoryFile(): void;
2385
- clearFile(name: string): void;
2386
- clearFiles(): void;
2387
- clearState(): void;
2388
- clearPartialState(): void;
2389
- onCloseModal(): void;
2390
- confirm(): Promise<boolean>;
2391
- deleteMetadata(indices: number[]): void;
2392
- deletePermission(item: IPoolsPermissions | IUsersPermissions): void;
2393
- protected onChangeExtension(): void;
2394
- openModal(): Promise<void>;
2395
- setDescription(desc: string): void;
2396
- protected resetMetadata(): Promise<void>;
2397
- validate(): boolean;
2398
- }
2399
-
2400
- type TUploadModalOpener = (controller: UploaderModalController) => void;
2401
- type UploaderModalState = {
2402
- fileReqError: boolean;
2403
- metadata: {
2404
- metadataArray: TDocumentMetadata[];
2405
- isFreeMetadata: boolean;
2406
- freeMetadataArray: TDocumentMetadata[];
2407
- };
2408
- fromDirectoryFile: TApiaDocumentDefinition | null;
2409
- docFolder?: number;
2410
- docPath?: string;
2411
- docExpDate?: string;
2412
- description: string;
2413
- isReadonly?: boolean;
2414
- permissions: {
2415
- allowAllType: 'M' | 'R' | '';
2416
- users: IUsersPermissions[];
2417
- pools: IPoolsPermissions[];
2418
- };
2419
- };
2420
- type UploaderState = {
2421
- progress: number;
2422
- allowedTypes: TDocType[];
2423
- selectedDocTypeId: string;
2424
- versioningFile: TUploaderFileInfo | null;
2425
- inProgressFiles: File[];
2426
- hiddenFiles: File[];
2427
- files: Record<string, TUploaderFileInfo>;
2428
- translatedFiles: Map<string, Map<number, TUploaderFileInfo>>;
2429
- hasAllDocTypes?: boolean;
2430
- selectedFiles: string[];
2431
- };
2432
- interface IUsersPermissions {
2433
- userId: string;
2434
- userLogin: string;
2435
- canUpdate: boolean;
2436
- }
2437
- interface IPoolsPermissions {
2438
- poolId: string;
2439
- poolName: string;
2440
- canUpdate: boolean;
2441
- }
2442
- type TUploaderFileInfo = Omit<TFileUploaded, 'locked' | 'userLocking'> & {
2443
- canEdit?: boolean;
2444
- canRead?: boolean;
2445
- isLocked: boolean;
2446
- locked?: boolean;
2447
- isLockedByMe: boolean;
2448
- isVirtual: boolean;
2449
- lockingUser: string;
2450
- };
2451
- type TFileUploaded = {
2452
- canEdit?: boolean;
2453
- canWrite?: boolean;
2454
- canRead?: boolean;
2455
- description?: string;
2456
- docDescription?: string;
2457
- docId: string;
2458
- docLang?: string;
2459
- docLangGroup?: string;
2460
- docName?: string;
2461
- docSize?: string;
2462
- docTypeFreeMetadata?: boolean;
2463
- docTypeId?: string;
2464
- docTypeLabel?: string;
2465
- docTypeTitle: string;
2466
- downloadDocId: string;
2467
- isMarkedToSign: boolean;
2468
- markedToSign: boolean;
2469
- lock?: string | boolean;
2470
- isLocked?: string | boolean;
2471
- lockedBy?: string;
2472
- name?: string;
2473
- onlyInformation: boolean;
2474
- prefix: string;
2475
- preview: string;
2476
- sign?: string | boolean;
2477
- size?: string;
2478
- userLocking: string;
2479
- virtualDoc?: boolean;
2480
- locked?: boolean;
2481
- };
2482
- type TAjaxUploadStart = T__LEGACY_SERVER__ApiaLoad<T__LEGACY_SERVER__ApiaFunction<{
2483
- general: {
2484
- isDocTypeDisabled: boolean;
2202
+ protected getAjaxUploadStartParameters(defaultParameters: Record<string, unknown>): {
2203
+ prefix: "P" | "E";
2485
2204
  useDocTypePermitted: boolean;
2486
- createMode: boolean;
2487
- allowAllTypes: string;
2488
- allDocTypes: boolean;
2205
+ docTypePermittedObjType: "P" | "E";
2206
+ docTypePermittedObjId: string;
2489
2207
  };
2490
- docTypes: {
2491
- docType: TDocType | TDocType[];
2208
+ protected addPrefix(defaultParameters: Record<string, unknown>): {
2209
+ prefix: "P" | "E";
2492
2210
  };
2493
- metadatas: {
2494
- metadata: TDocumentMetadata | TDocumentMetadata[];
2211
+ protected getDocumentInfoParameters(defaultParameters: Record<string, unknown>): {
2212
+ prefix: "P" | "E";
2495
2213
  };
2496
- }, false>>;
2497
- type TDocType = {
2498
- docExts: string;
2499
- maxSize: number;
2500
- id: string;
2501
- title: string;
2502
- free: boolean;
2503
- selected: boolean;
2504
- };
2505
- type TDocumentMetadata = {
2506
- free: string;
2507
- id: string;
2508
- name: string;
2509
- required: 'Y' | 'N';
2510
- title: string;
2511
- type: 'S' | 'N' | 'D';
2512
- value: string;
2513
- errorMessage: string;
2514
- labelErrorMessage: string;
2515
- };
2516
- type TModalConfig = {
2517
- allowDocumentsMonitor: boolean;
2518
- allowPickFromDirectories: boolean;
2519
- collapsePermissions: boolean;
2520
- collapseDirectories: boolean;
2521
- collapseMetadata: boolean;
2522
- defaultDirectory?: number;
2523
- monitorId?: number;
2524
- oneClickUpload: boolean;
2525
- rootFolder?: string;
2526
- showDirectoriesStructure: boolean;
2527
- showExpDate: boolean;
2528
- showPermissions: boolean;
2529
- showMetadata: boolean;
2530
- translationId?: string;
2531
- };
2532
- type TUploaderLoadCurrentFunctionMessages = {
2533
- allowSign: boolean;
2534
- allowLock: boolean;
2535
- allowMultiple: boolean;
2536
- readOnly: boolean;
2537
- };
2538
- type TSaveDroppedFilesConf = {
2539
- langId?: number;
2540
- strictMode?: boolean;
2541
- translatingFile?: TUploaderFileInfo;
2542
- shouldReset?: boolean;
2543
- };
2544
- type TAjaxUploadFileStatus = T__LEGACY_SERVER__ApiaLoad<T__LEGACY_SERVER__ApiaFunction<{
2545
- message: {
2546
- label: string;
2547
- name: string;
2548
- }[];
2549
- }>>;
2550
- type TProcessDroppedFiles = T__LEGACY_SERVER__ApiaLoad<T__LEGACY_SERVER__ApiaFunction<{
2551
- principal: {
2552
- docInfo: TDocInfo | TDocInfo[];
2553
- docTypes: {
2554
- 'data-free': boolean;
2555
- docTypeExtensions: string;
2556
- docTypeId: string;
2557
- docTypeMaxSize: number;
2558
- docTypeName: string;
2559
- };
2560
- elemInfo: {
2561
- elemId: string;
2562
- elemType: string;
2563
- };
2564
- };
2565
- }, false>>;
2566
- type TDocInfo = {
2567
- docInfoName: string;
2568
- docInfoSize: string;
2569
- docInfoTmpId: string;
2570
- docInfoType: string;
2571
- };
2572
- type TConfirmDropModal = T__LEGACY_SERVER__ApiaLoad<T__LEGACY_SERVER__ApiaFunction<{
2573
- general: TFileUploaded | TFileUploaded[];
2574
- fromForm: {
2575
- fromForm: {
2576
- fromForm: boolean;
2577
- }[];
2214
+ protected getCheckLockDocumentParameters: (defaultParameters: Record<string, unknown>) => {
2215
+ prefix: "P" | "E";
2578
2216
  };
2579
- }, false>>;
2580
- type TApiaDocumentDefinition = {
2581
- docDesc: string;
2582
- docTypeLabel: string;
2583
- docId: string;
2584
- prefix: string;
2585
- docSize: string;
2586
- docDate: string;
2587
- docDwnExternal: string;
2588
- docExpDate: string;
2589
- docFolder: string;
2590
- docFolderPath: string;
2591
- docUsu: string;
2592
- docAllPoolPerm: 'M' | 'R' | '';
2593
- docName: string;
2594
- docTypeId: string;
2595
- locked: boolean;
2596
- downloadDocId: string;
2597
- };
2598
- type TUploaderLoadCurrentFunction = {
2599
- general?: TFileUploaded | TFileUploaded[];
2600
- messages: {
2601
- message: {
2602
- name: keyof TUploaderLoadCurrentFunctionMessages;
2603
- label: boolean;
2604
- } | {
2605
- name: keyof TUploaderLoadCurrentFunctionMessages;
2606
- label: boolean;
2607
- }[];
2217
+ protected getReloadMetadataParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2218
+ protected getSaveDroppedFilesParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2219
+ protected getAjaxUploadFileStatusParameters(defaultParameters: Record<string, unknown>): {
2220
+ prefix: "P" | "E";
2608
2221
  };
2609
- };
2610
- type TDocumentInformation = T__LEGACY_SERVER__ApiaLoad<T__LEGACY_SERVER__ApiaFunction<{
2611
- data: {
2612
- onClose: string;
2613
- general: TApiaDocumentDefinition;
2614
- permissions: {
2615
- pool: TDocumentPermission | TDocumentPermission[];
2616
- user: TDocumentPermission | TDocumentPermission[];
2617
- };
2618
- versions: {
2619
- version: TDocumentVersion | TDocumentVersion[];
2620
- };
2621
- };
2622
- currentUsrPems: {
2623
- usrCanModify: boolean;
2624
- };
2625
- metadatas: {
2626
- metadata: TDocumentMetadata | TDocumentMetadata[];
2627
- };
2628
- docDownHistory: {
2629
- docHistory: TDocumentDownloadHistory | TDocumentDownloadHistory[];
2630
- };
2631
- }, false>>;
2632
- type TDocumentPermission = {
2633
- id: string;
2634
- name: string;
2635
- permType: 'R' | 'M';
2636
- };
2637
- type TDocumentDownloadHistory = {
2638
- hisDwn: string;
2639
- hisUsr: string;
2640
- hisVer: string;
2641
- };
2642
- type TDocumentVersion = {
2643
- verUser: string;
2644
- verNumber: string;
2645
- verDate: string;
2646
- };
2647
- type TRequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
2648
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
2649
- }[Keys];
2222
+ protected getMarkFileToSignParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2223
+ protected getProcessDroppedFilesPostdata(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2224
+ protected getProcessDroppedFilesParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2225
+ protected getConfirmDropModalParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2226
+ protected getConfirmDropModalPostdata(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2227
+ protected getCheckWebDavLockParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2228
+ protected getDownloadMultipleDocumentsParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2229
+ protected getLoadCurrentDocumentsParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2230
+ protected getDeleteDocumentParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2231
+ }
2650
2232
 
2651
2233
  declare class FormsUploader extends UploaderApi {
2652
2234
  execution: Execution;
2653
2235
  type: 'E' | 'P';
2654
- modalConfig: TModalConfig;
2655
2236
  field: File$1;
2656
2237
  constructor(execution: Execution, type: 'E' | 'P', modalConfig: TModalConfig, field: File$1);
2657
2238
  isEditionMode: boolean | undefined;
2658
2239
  index(): number;
2659
2240
  elemId(): string;
2241
+ protected buildModalController(conf?: {
2242
+ langId?: number;
2243
+ translatingFile?: TUploaderFileInfo;
2244
+ versionFile?: TUploaderFileInfo;
2245
+ }): UploaderModalController;
2660
2246
  protected filterByFilesAmountLimit(files: File[]): File[];
2661
2247
  protected getFormParameters(): {
2662
2248
  frmId: string;
@@ -2688,8 +2274,27 @@ declare class FormsUploader extends UploaderApi {
2688
2274
  frmOut: boolean;
2689
2275
  };
2690
2276
  };
2691
- getAjaxUploadFileStatusParameters: (defaultParameters: Record<string, unknown>) => Record<string, unknown>;
2692
- getAjaxUploadStartParameters: ({ useDocTypePermitted, docTypePermittedObjType, docTypePermittedObjId, ...defaultParameters }: Record<string, unknown>) => Record<string, unknown>;
2277
+ getAjaxUploadFileStatusParameters(defaultParameters: Record<string, unknown>): {
2278
+ frmId: string;
2279
+ frmParent: TFrmParent;
2280
+ attId: string;
2281
+ index: number;
2282
+ editionMode: boolean | undefined;
2283
+ prefix: TFrmParent;
2284
+ forceDocTypeId: string | undefined;
2285
+ };
2286
+ getAjaxUploadStartParameters({ useDocTypePermitted, docTypePermittedObjType, docTypePermittedObjId, ...defaultParameters }: Record<string, unknown>): {
2287
+ frmId: string;
2288
+ frmParent: TFrmParent;
2289
+ attId: string;
2290
+ index: number;
2291
+ editionMode: boolean | undefined;
2292
+ prefix: TFrmParent;
2293
+ forceDocTypeId: string | undefined;
2294
+ useDocTypePermitted: boolean;
2295
+ docTypePermittedObjType: "P" | "E";
2296
+ docTypePermittedObjId: string;
2297
+ };
2693
2298
  getCheckLockDocumentParameters: ({ prefix, ...parameters }: Record<string, unknown>) => {
2694
2299
  frmId: string;
2695
2300
  frmParent: TFrmParent;
@@ -2708,7 +2313,7 @@ declare class FormsUploader extends UploaderApi {
2708
2313
  attId: string;
2709
2314
  index: number;
2710
2315
  };
2711
- getConfirmDropModalParameters: (defaultParameters: Record<string, unknown>) => Record<string, unknown>;
2316
+ getConfirmDropModalParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2712
2317
  getConfirmDropModalPostdata: ({ pe, ...parameters }: Record<string, unknown>) => Record<string, unknown>;
2713
2318
  getDeleteDocumentParameters: ({ prefix, isAjax, ...currentParameters }: Record<string, unknown>) => {
2714
2319
  frmId: string;
@@ -2717,8 +2322,9 @@ declare class FormsUploader extends UploaderApi {
2717
2322
  index: number;
2718
2323
  editionMode: boolean | undefined;
2719
2324
  };
2720
- getDocumentInfoParameters: (parameters: Record<string, unknown>) => {
2325
+ getDocumentInfoParameters(parameters: Record<string, unknown>): {
2721
2326
  ajaxUrl: string;
2327
+ prefix: "P" | "E";
2722
2328
  };
2723
2329
  getEditDocumentParameters: ({ action, docId }: Record<string, unknown>) => {
2724
2330
  docId: unknown;
@@ -2732,7 +2338,7 @@ declare class FormsUploader extends UploaderApi {
2732
2338
  getLoadFilesForFolderParameters: () => Record<string, unknown>;
2733
2339
  getLoadFileSystemStructureTree: () => {
2734
2340
  useDocTypePermitted: boolean;
2735
- docTypeForcedId: string | undefined;
2341
+ docTypeForcedId: string;
2736
2342
  };
2737
2343
  getLockDocumentParameters: ({ prefix, isAjax, ...currentParameters }: Record<string, unknown>) => {
2738
2344
  frmId: string;
@@ -2753,8 +2359,8 @@ declare class FormsUploader extends UploaderApi {
2753
2359
  };
2754
2360
  getProcessDroppedFilesParameters: (defaultParameters: Record<string, unknown>) => Record<string, unknown>;
2755
2361
  getProcessDroppedFilesPostdata: ({ useDocTypePermitted, docTypePermittedObjId, docTypePermittedObjType, ...parameters }: Record<string, unknown>) => Record<string, unknown>;
2756
- getReloadMetadataParameters: (defaultParameters: Record<string, unknown>) => Record<string, unknown>;
2757
- getSaveDroppedFilesParameters: (defaultParameters: Record<string, unknown>) => Record<string, unknown>;
2362
+ getReloadMetadataParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2363
+ getSaveDroppedFilesParameters(defaultParameters: Record<string, unknown>): Record<string, unknown>;
2758
2364
  downloadVersion(fileId: string, version?: string): Promise<void>;
2759
2365
  downloadDocument(fileId: string, version?: string): Promise<void>;
2760
2366
  loadCurrentDocuments(): Promise<void>;
@@ -3085,6 +2691,7 @@ type TExecutionEnvironment = {
3085
2691
  taskName: string;
3086
2692
  processName: string;
3087
2693
  };
2694
+ openUploaderModal?: (execution: UploaderModalController) => unknown;
3088
2695
  };
3089
2696
  declare class Execution extends EventEmitter$1<{
3090
2697
  flow: 'previous' | 'confirm' | 'next' | 'save' | 'release' | 'share' | 'viewDocs' | 'print' | 'delegate';
@@ -3096,6 +2703,7 @@ declare class Execution extends EventEmitter$1<{
3096
2703
  };
3097
2704
  }> {
3098
2705
  environment: TExecutionEnvironment;
2706
+ renderers?: TModalConfig['renderers'];
3099
2707
  fieldsMapping: FieldsMapping;
3100
2708
  private entity;
3101
2709
  private process;
@@ -3108,7 +2716,7 @@ declare class Execution extends EventEmitter$1<{
3108
2716
  readonly notifications: Notifications;
3109
2717
  private lastModalReturn;
3110
2718
  private _pendingPromises;
3111
- constructor(environment: TExecutionEnvironment);
2719
+ constructor(environment: TExecutionEnvironment, renderers?: TModalConfig['renderers']);
3112
2720
  protected formsById: {
3113
2721
  E: Map<string, Form>;
3114
2722
  P: Map<string, Form>;
@@ -3410,7 +3018,7 @@ declare class Checkbox extends FieldWithAttribute<TApiaCheckboxProperties, boole
3410
3018
  type EditorEvents = 'onChange';
3411
3019
  declare class Editor extends TranslatableField<TApiaEditorProperties, string> {
3412
3020
  fireEvent(eventName: EditorEvents, options?: TFireEventOptions): Promise<boolean>;
3413
- protected hasValue(): boolean;
3021
+ protected isValidValue(): boolean;
3414
3022
  protected getSynchronizePostConfiguration(value: string): IApiaApiPostConfig<any>;
3415
3023
  }
3416
3024
 
@@ -3665,7 +3273,7 @@ declare class Input extends TranslatableField<TApiaInputProperties, string, TApi
3665
3273
  setValue(newValue: string | Date | number, options?: SetValueOptions): Promise<boolean>;
3666
3274
  private validateRegex;
3667
3275
  validate(): Promise<boolean>;
3668
- protected hasValue(): boolean;
3276
+ protected isValidValue(): boolean;
3669
3277
  }
3670
3278
 
3671
3279
  declare class Label extends Field<TApiaLabelProperties, TApiaLabelDefinition> {
@@ -3723,7 +3331,7 @@ declare class Multiple extends FieldWithAttribute<TApiaMultipleProperties, strin
3723
3331
  }
3724
3332
 
3725
3333
  declare class Password extends FieldWithAttribute<TApiaPasswordProperties, string> {
3726
- protected hasValue(): boolean;
3334
+ protected isValidValue(): boolean;
3727
3335
  }
3728
3336
 
3729
3337
  type RadioEvents = 'onPopulate' | 'onChange' | 'onClick';
@@ -3742,7 +3350,7 @@ declare class Select extends FieldWithAttribute<TApiaSelectProperties, string, T
3742
3350
  }
3743
3351
 
3744
3352
  declare class Textarea extends TranslatableField<TApiaTextareaProperties, string> {
3745
- protected hasValue(): boolean;
3353
+ protected isValidValue(): boolean;
3746
3354
  protected getSynchronizePostConfiguration(value: string): IApiaApiPostConfig<any>;
3747
3355
  }
3748
3356
 
@@ -3760,6 +3368,7 @@ declare class Tree extends FieldWithAttribute<TApiaTreeProperties, TTreeValue[],
3760
3368
  protected hasValue(): boolean;
3761
3369
  setProperty<K extends keyof TApiaTreeProperties>(propName: K, propValue: TApiaTreeProperties[K]): void;
3762
3370
  init(form: Form): Promise<void>;
3371
+ protected isValidValue(): boolean;
3763
3372
  setValue(newValue: TTreeValue[], options?: Partial<{
3764
3373
  comparator: Comparator$1<any>;
3765
3374
  format: 'd/m/Y' | 'apia';
@@ -4076,5 +3685,5 @@ declare function getLabel(execution: Execution, label: string, replacers?: Parti
4076
3685
 
4077
3686
  declare function parseFakeJSON<T extends Record<string, unknown>>(str: string): T;
4078
3687
 
4079
- export { ActionsController, AdditionalCell, ApiaAttribute, ApiaField, ApiaFieldWithAttribute, ApiaForm, ApiaFunctions, BouncingEmitter, Button, ButtonField, Captcha, CaptchaField, CheckField, Checkbox, type ComponentEvent, CustomComponent, GridField as DataGridField, Editor, EditorField, EventEmitter, Execution, ExecutionState, Field, FieldWithAttribute, type FieldWithAttributeState, type FieldsMapping, File$1 as File, FileUploaderField, FlowModal, Form, FormsUploader, Grid, GridCell, GridField, GridPaginated, HeaderCell, Hidden, HiddenField, type IApiaField, type IApiaForm, type IApiaFunctions, type IIProperty, type IPoolsPermissions, IProperty, type ISignatureData, type IUsersPermissions, Image, ImageField, Input, InputField, InvalidSessionException, Label, Link, LinkField, MessageNotification, ModalInput, ModalInputField, Multiple, MultipleField, Notifications, Password, PasswordField, type PossibleValue, Radio, RadioField, type RadioPossibleValue, SchedulerField, Select, SelectField, type SelectPossibleValue, ShowConfirmMessage, ShowPathSelection, ShowPoolSelection, ShowSign, ShowSignSelection, StatefulEmitter, type Status, StatusNotification, type TAjaxUploadFileStatus, type TAjaxUploadStart, type TApiaButtonProperties, type TApiaCaptchaProperties, type TApiaCheckboxProperties, type TApiaDocumentDefinition, type TApiaEditorProperties, type TApiaFieldBaseDefinition, type TApiaFieldCommonProperties, type TApiaFieldDefinition, type TApiaFieldPossibleValue, type TApiaFieldSizableFieldProperties, type TApiaFieldType, type TApiaFieldValueType, type TApiaFieldWithAttributeBaseProps, type TApiaFieldWithAttributeProperties, type TApiaFileProperties, type TApiaForm, type TApiaFormProperties, type TApiaGridProperties, type TApiaGroupableFieldProperties, type TApiaHiddenProperties, type TApiaImageProperties, type TApiaInputProperties, type TApiaLabelProperties, type TApiaLinkProperties, type TApiaMultipleProperties, type TApiaPasswordProperties, type TApiaRadioProperties, type TApiaSchedulerProperties, type TApiaSelectProperties, type TApiaTextareaProperties, type TApiaTitleProperties, type TApiaTranslatableFieldProperties, type TApiaTreePossibleValue, type TApiaTreeProperties, type TApiaValuatedFieldProperties, type TCheckWizardResponse, type TConfirmDropModal, type TCusCmpStateRequest, type TCustomComponentDefaultResponse, type TCustomComponentDefinition, type TDocInfo, type TDocType, type TDocumentDownloadHistory, type TDocumentInformation, type TDocumentMetadata, type TDocumentPermission, type TDocumentVersion, type TExecutionConfig, type TFetchConfirmPathResponse, type TFieldEvent, type TFieldScriptEvent, type TFieldScriptEventParameters, type TFieldScriptEvents, type TFieldServerEvent, type TFieldServerEvents, type TFileUploaded, type TFormEventName, type TFormScriptEvent, type TFormScriptEventParameters, type TFormScriptEvents, type TFrmParent, type TItemTreeObj, type TModalConfig, type TObservation, type TObservations, type TOnUploadProgress, type TPathType, type TProcessDroppedFiles, type TRequireOnlyOne, type TSaveDroppedFilesConf, type TSignaturesData, type TUploadModalOpener, type TUploaderFileInfo, type TUploaderLoadCurrentFunction, type TUploaderLoadCurrentFunctionMessages, AreaField as TextAreaField, TextField, Textarea, Title, TranslatableField, Translation, Tree, TreeField, UploaderApi, UploaderModalController, type UploaderModalState, type UploaderState, createNewField, deepEqual, get, getLabel, isHtmlResponse, isJsonResponse, isOneClickUploadEnabled, isXmlResponse, makeApiaUrl, parseFakeJSON, parseFileDefinition, parseSuccessfulResponse, parseXml, post, returnExactlyTheSame, shallowEqual };
3688
+ export { ActionsController, AdditionalCell, ApiaAttribute, ApiaField, ApiaFieldWithAttribute, ApiaForm, ApiaFunctions, BouncingEmitter, Button, ButtonField, Captcha, CaptchaField, CheckField, Checkbox, type ComponentEvent, CustomComponent, GridField as DataGridField, Editor, EditorField, EventEmitter, Execution, ExecutionState, Field, FieldWithAttribute, type FieldWithAttributeState, type FieldsMapping, File$1 as File, FileUploaderField, FlowModal, Form, FormsUploader, Grid, GridCell, GridField, GridPaginated, HeaderCell, Hidden, HiddenField, type IApiaField, type IApiaForm, type IApiaFunctions, type IIProperty, IProperty, type ISignatureData, Image, ImageField, Input, InputField, InvalidSessionException, Label, Link, LinkField, MessageNotification, ModalInput, ModalInputField, Multiple, MultipleField, Notification, Notifications, Password, PasswordField, type PossibleValue, Radio, RadioField, type RadioPossibleValue, SchedulerField, Select, SelectField, type SelectPossibleValue, ShowConfirmMessage, ShowPathSelection, ShowPoolSelection, ShowSign, ShowSignSelection, StatefulEmitter, type Status, StatusNotification, type TApiaButtonProperties, type TApiaCaptchaProperties, type TApiaCheckboxProperties, type TApiaEditorProperties, type TApiaFieldBaseDefinition, type TApiaFieldCommonProperties, type TApiaFieldDefinition, type TApiaFieldPossibleValue, type TApiaFieldSizableFieldProperties, type TApiaFieldType, type TApiaFieldValueType, type TApiaFieldWithAttributeBaseProps, type TApiaFieldWithAttributeProperties, type TApiaFileProperties, type TApiaForm, type TApiaFormProperties, type TApiaGridProperties, type TApiaGroupableFieldProperties, type TApiaHiddenProperties, type TApiaImageProperties, type TApiaInputProperties, type TApiaLabelProperties, type TApiaLinkProperties, type TApiaMultipleProperties, type TApiaPasswordProperties, type TApiaRadioProperties, type TApiaSchedulerProperties, type TApiaSelectProperties, type TApiaTextareaProperties, type TApiaTitleProperties, type TApiaTranslatableFieldProperties, type TApiaTreePossibleValue, type TApiaTreeProperties, type TApiaValuatedFieldProperties, type TCheckWizardResponse, type TCusCmpStateRequest, type TCustomComponentDefaultResponse, type TCustomComponentDefinition, type TExecutionConfig, type TFetchConfirmPathResponse, type TFieldEvent, type TFieldScriptEvent, type TFieldScriptEventParameters, type TFieldScriptEvents, type TFieldServerEvent, type TFieldServerEvents, type TFormEventName, type TFormScriptEvent, type TFormScriptEventParameters, type TFormScriptEvents, type TFrmParent, type TItemTreeObj, type TObservation, type TObservations, type TPathType, type TSignaturesData, AreaField as TextAreaField, TextField, Textarea, Title, TranslatableField, Translation, Tree, TreeField, UploaderApi, createNewField, deepEqual, get, getLabel, isHtmlResponse, isJsonResponse, isXmlResponse, makeApiaUrl, parseFakeJSON, parseSuccessfulResponse, parseXml, post, shallowEqual };
4080
3689
  //# sourceMappingURL=index.d.ts.map