@praxisui/files-upload 1.0.0-beta.8 → 2.0.0-beta.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/README.md +189 -38
- package/fesm2022/praxisui-files-upload.mjs +2728 -752
- package/fesm2022/praxisui-files-upload.mjs.map +1 -1
- package/index.d.ts +586 -155
- package/package.json +10 -7
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, OnDestroy, NgZone, OnInit, AfterViewInit, EventEmitter, ViewContainerRef, ChangeDetectorRef, DestroyRef, Provider } from '@angular/core';
|
|
2
|
+
import { InjectionToken, OnDestroy, NgZone, OnInit, OnChanges, AfterViewInit, EventEmitter, ViewContainerRef, ChangeDetectorRef, DestroyRef, Provider } from '@angular/core';
|
|
3
3
|
import { FormControl, ValidatorFn, FormGroup, FormBuilder } from '@angular/forms';
|
|
4
|
-
import {
|
|
4
|
+
import { PraxisI18nDictionary, PraxisI18nConfig, PraxisI18nService, AsyncConfigStorage, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog } from '@praxisui/core';
|
|
5
5
|
import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel';
|
|
6
6
|
import { HttpClient, HttpEvent, HttpHeaders } from '@angular/common/http';
|
|
7
7
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
@@ -9,96 +9,155 @@ import { Overlay } from '@angular/cdk/overlay';
|
|
|
9
9
|
import { SimpleBaseInputComponent } from '@praxisui/dynamic-fields';
|
|
10
10
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/** Debounce para eventos de drag (ms). */
|
|
32
|
-
expandDebounceMs?: number;
|
|
33
|
-
};
|
|
34
|
-
list?: {
|
|
35
|
-
/** Número de itens visíveis antes de colapsar. */
|
|
36
|
-
collapseAfter?: number;
|
|
37
|
-
/** Modo de apresentação do card de detalhes. */
|
|
38
|
-
detailsMode?: 'card' | 'sidesheet' | 'auto';
|
|
39
|
-
/** Largura máxima do card (px). */
|
|
40
|
-
detailsMaxWidth?: number;
|
|
41
|
-
/** Exibir seção técnica (HTTP/logs) por padrão. */
|
|
42
|
-
detailsShowTechnical?: boolean;
|
|
43
|
-
/** Whitelist de campos de metadados a exibir (vazio = todos). */
|
|
44
|
-
detailsFields?: string[];
|
|
45
|
-
/** Âncora do overlay de detalhes. */
|
|
46
|
-
detailsAnchor?: 'item' | 'field';
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
limits?: {
|
|
50
|
-
maxFileSizeBytes?: number;
|
|
51
|
-
maxFilesPerBulk?: number;
|
|
52
|
-
maxBulkSizeBytes?: number;
|
|
53
|
-
defaultConflictPolicy?: 'ERROR' | 'SKIP' | 'OVERWRITE' | 'MAKE_UNIQUE' | 'RENAME';
|
|
54
|
-
failFast?: boolean;
|
|
55
|
-
strictValidation?: boolean;
|
|
56
|
-
maxUploadSizeMb?: number;
|
|
57
|
-
};
|
|
58
|
-
options?: {
|
|
59
|
-
allowedExtensions?: string[];
|
|
60
|
-
acceptMimeTypes?: string[];
|
|
61
|
-
targetDirectory?: string;
|
|
62
|
-
enableVirusScanning?: boolean;
|
|
63
|
-
};
|
|
64
|
-
bulk?: {
|
|
65
|
-
parallelUploads?: number;
|
|
66
|
-
retryCount?: number;
|
|
67
|
-
retryBackoffMs?: number;
|
|
68
|
-
};
|
|
69
|
-
quotas?: {
|
|
70
|
-
showQuotaWarnings?: boolean;
|
|
71
|
-
blockOnExceed?: boolean;
|
|
72
|
-
};
|
|
73
|
-
rateLimit?: {
|
|
74
|
-
autoRetryOn429?: boolean;
|
|
75
|
-
showBannerOn429?: boolean;
|
|
76
|
-
maxAutoRetry?: number;
|
|
77
|
-
baseBackoffMs?: number;
|
|
78
|
-
};
|
|
79
|
-
headers?: {
|
|
80
|
-
tenantHeader?: string;
|
|
81
|
-
userHeader?: string;
|
|
12
|
+
type FilesUploadStrategy = 'direct' | 'presign' | 'auto';
|
|
13
|
+
/**
|
|
14
|
+
* Visual presentation only.
|
|
15
|
+
* Nothing here should change the backend contract by itself.
|
|
16
|
+
*/
|
|
17
|
+
interface FilesUploadVisualConfig {
|
|
18
|
+
showDropzone?: boolean;
|
|
19
|
+
accept?: string[];
|
|
20
|
+
dense?: boolean;
|
|
21
|
+
showConflictPolicySelector?: boolean;
|
|
22
|
+
showMetadataForm?: boolean;
|
|
23
|
+
showProgress?: boolean;
|
|
24
|
+
manualUpload?: boolean;
|
|
25
|
+
dropzone?: {
|
|
26
|
+
expandOnDragProximity?: boolean;
|
|
27
|
+
proximityPx?: number;
|
|
28
|
+
expandMode?: 'overlay' | 'inline';
|
|
29
|
+
expandHeight?: number;
|
|
30
|
+
expandDebounceMs?: number;
|
|
82
31
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
32
|
+
list?: {
|
|
33
|
+
collapseAfter?: number;
|
|
34
|
+
detailsMode?: 'card' | 'sidesheet' | 'auto';
|
|
35
|
+
detailsMaxWidth?: number;
|
|
36
|
+
detailsShowTechnical?: boolean;
|
|
37
|
+
detailsFields?: string[];
|
|
38
|
+
detailsAnchor?: 'item' | 'field';
|
|
87
39
|
};
|
|
88
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Client-side validation and local flow guards.
|
|
43
|
+
* These rules are evaluated in the Angular component before the request is sent.
|
|
44
|
+
*/
|
|
45
|
+
interface FilesUploadValidationConfig {
|
|
46
|
+
maxFileSizeBytes?: number;
|
|
47
|
+
maxFilesPerBulk?: number;
|
|
48
|
+
maxBulkSizeBytes?: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Backend-facing options serialized into the upload request.
|
|
52
|
+
* These fields influence how the server validates or stores files.
|
|
53
|
+
*/
|
|
54
|
+
interface FilesUploadBackendOptionsConfig {
|
|
55
|
+
defaultConflictPolicy?: 'ERROR' | 'SKIP' | 'OVERWRITE' | 'MAKE_UNIQUE' | 'RENAME';
|
|
56
|
+
strictValidation?: boolean;
|
|
57
|
+
maxUploadSizeMb?: number;
|
|
58
|
+
allowedExtensions?: string[];
|
|
59
|
+
acceptMimeTypes?: string[];
|
|
60
|
+
targetDirectory?: string;
|
|
61
|
+
enableVirusScanning?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Transport/execution policy for the upload operation.
|
|
65
|
+
* This is about how the component performs requests, retries and concurrency.
|
|
66
|
+
*/
|
|
67
|
+
interface FilesUploadExecutionConfig {
|
|
68
|
+
failFast?: boolean;
|
|
69
|
+
parallelUploads?: number;
|
|
70
|
+
retryCount?: number;
|
|
71
|
+
retryBackoffMs?: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* User experience when quota constraints are reported by the backend.
|
|
75
|
+
*/
|
|
76
|
+
interface FilesUploadQuotaFeedbackConfig {
|
|
77
|
+
showQuotaWarnings?: boolean;
|
|
78
|
+
blockOnExceed?: boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* User experience when rate limiting is reported by the backend.
|
|
82
|
+
*/
|
|
83
|
+
interface FilesUploadRateLimitFeedbackConfig {
|
|
84
|
+
autoRetryOn429?: boolean;
|
|
85
|
+
showBannerOn429?: boolean;
|
|
86
|
+
maxAutoRetry?: number;
|
|
87
|
+
baseBackoffMs?: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Header naming used by the host application when contextual headers are needed.
|
|
91
|
+
*/
|
|
92
|
+
interface FilesUploadHeadersConfig {
|
|
93
|
+
tenantHeader?: string;
|
|
94
|
+
userHeader?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Optional host-provided messages and overrides.
|
|
98
|
+
*/
|
|
99
|
+
interface FilesUploadMessagesConfig {
|
|
100
|
+
successSingle?: string;
|
|
101
|
+
successBulk?: string;
|
|
102
|
+
errors?: Record<string, string>;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Public configuration accepted by the upload component.
|
|
106
|
+
*
|
|
107
|
+
* Separation of concerns:
|
|
108
|
+
* - `ui`: visual presentation
|
|
109
|
+
* - `limits`: client-side validation and flow constraints
|
|
110
|
+
* - `options`: backend-facing upload options
|
|
111
|
+
* - `bulk`: request execution policy
|
|
112
|
+
* - `quotas` / `rateLimit` / `messages`: feedback and UX behavior
|
|
113
|
+
*/
|
|
114
|
+
interface FilesUploadConfig {
|
|
115
|
+
strategy?: FilesUploadStrategy;
|
|
116
|
+
ui?: FilesUploadVisualConfig;
|
|
117
|
+
limits?: FilesUploadValidationConfig;
|
|
118
|
+
options?: FilesUploadBackendOptionsConfig;
|
|
119
|
+
bulk?: FilesUploadExecutionConfig;
|
|
120
|
+
quotas?: FilesUploadQuotaFeedbackConfig;
|
|
121
|
+
rateLimit?: FilesUploadRateLimitFeedbackConfig;
|
|
122
|
+
headers?: FilesUploadHeadersConfig;
|
|
123
|
+
messages?: FilesUploadMessagesConfig;
|
|
124
|
+
}
|
|
89
125
|
|
|
90
|
-
/**
|
|
91
|
-
|
|
92
|
-
|
|
126
|
+
/** Canonical top-level response status used by the backend. */
|
|
127
|
+
type ApiResponseStatus = 'success' | 'partial_success' | 'failure';
|
|
128
|
+
/** Standard success envelope returned by the backend. */
|
|
129
|
+
interface ApiSuccessEnvelope<T> {
|
|
130
|
+
status: ApiResponseStatus;
|
|
131
|
+
message: string;
|
|
132
|
+
timestamp: string;
|
|
133
|
+
data: T;
|
|
134
|
+
}
|
|
135
|
+
/** Canonical structured error item returned by the backend. */
|
|
136
|
+
interface ApiErrorItem {
|
|
93
137
|
code: string;
|
|
94
|
-
/** Human-readable error message. */
|
|
95
138
|
message: string;
|
|
96
|
-
/** Optional details useful for debugging. */
|
|
97
139
|
details?: unknown;
|
|
98
|
-
|
|
140
|
+
}
|
|
141
|
+
/** Standard error envelope returned by the backend. */
|
|
142
|
+
interface ApiErrorEnvelope {
|
|
143
|
+
status: ApiResponseStatus;
|
|
144
|
+
message: string;
|
|
145
|
+
errors?: ApiErrorItem[];
|
|
146
|
+
timestamp?: string;
|
|
99
147
|
traceId?: string;
|
|
100
148
|
}
|
|
101
149
|
|
|
150
|
+
/** Standard error response shape. */
|
|
151
|
+
type ErrorResponse = ApiErrorEnvelope;
|
|
152
|
+
/**
|
|
153
|
+
* Some bulk endpoints still return item errors in a flat shape
|
|
154
|
+
* (`{ code, message, details }`) instead of the canonical envelope.
|
|
155
|
+
*/
|
|
156
|
+
type ErrorLike = ErrorResponse | ApiErrorItem;
|
|
157
|
+
declare function isErrorEnvelope(value: unknown): value is ErrorResponse;
|
|
158
|
+
/** Resolves the primary structured error item from the backend error payload. */
|
|
159
|
+
declare function getPrimaryErrorItem(error: ErrorLike | null | undefined): ApiErrorItem | undefined;
|
|
160
|
+
|
|
102
161
|
declare enum ScanStatus {
|
|
103
162
|
PENDING = "PENDING",
|
|
104
163
|
SCANNING = "SCANNING",
|
|
@@ -133,10 +192,17 @@ declare enum BulkUploadResultStatus {
|
|
|
133
192
|
FAILED = "FAILED"
|
|
134
193
|
}
|
|
135
194
|
|
|
136
|
-
/**
|
|
137
|
-
interface
|
|
138
|
-
|
|
195
|
+
/** Raw file payload returned by the current backend contract. */
|
|
196
|
+
interface UploadResponseData {
|
|
197
|
+
originalFilename: string;
|
|
198
|
+
serverFilename: string;
|
|
199
|
+
fileId: string;
|
|
200
|
+
fileSize: number;
|
|
201
|
+
mimeType: string;
|
|
202
|
+
uploadTimestamp: string;
|
|
139
203
|
}
|
|
204
|
+
/** Response returned after successful single file upload. */
|
|
205
|
+
type UploadResponse = ApiSuccessEnvelope<UploadResponseData>;
|
|
140
206
|
/** Result for a single file in the bulk upload response. */
|
|
141
207
|
interface BulkUploadFileResult {
|
|
142
208
|
/** Original filename. */
|
|
@@ -146,17 +212,24 @@ interface BulkUploadFileResult {
|
|
|
146
212
|
/** Metadata returned when the file succeeds. */
|
|
147
213
|
file?: FileMetadata;
|
|
148
214
|
/** Error information when the file fails. */
|
|
149
|
-
error?:
|
|
215
|
+
error?: ErrorLike;
|
|
150
216
|
}
|
|
151
|
-
/**
|
|
152
|
-
interface
|
|
217
|
+
/** Canonical bulk payload returned by the backend inside `data`. */
|
|
218
|
+
interface BulkUploadResponseData {
|
|
219
|
+
totalProcessed: number;
|
|
220
|
+
totalSuccess: number;
|
|
221
|
+
totalFailed: number;
|
|
222
|
+
totalCancelled?: number;
|
|
223
|
+
wasFailFastTriggered?: boolean;
|
|
224
|
+
overallSuccess: boolean;
|
|
225
|
+
processingTimeMs?: number;
|
|
226
|
+
totalSizeBytes?: number;
|
|
227
|
+
successRate?: string;
|
|
153
228
|
results: BulkUploadFileResult[];
|
|
154
|
-
|
|
155
|
-
total: number;
|
|
156
|
-
succeeded: number;
|
|
157
|
-
failed: number;
|
|
158
|
-
};
|
|
229
|
+
metadata?: Record<string, unknown>;
|
|
159
230
|
}
|
|
231
|
+
/** Bulk upload response returned by the backend. */
|
|
232
|
+
type BulkUploadResponse = ApiSuccessEnvelope<BulkUploadResponseData>;
|
|
160
233
|
|
|
161
234
|
declare enum ErrorCode {
|
|
162
235
|
INVALID_FILE_TYPE = "INVALID_FILE_TYPE",
|
|
@@ -256,23 +329,17 @@ interface BulkUploadFile {
|
|
|
256
329
|
interface BulkUploadOptions {
|
|
257
330
|
/** Backend options JSON (FileUploadOptionsRecord), enviado no campo 'options'. */
|
|
258
331
|
optionsJson?: string;
|
|
259
|
-
/**
|
|
332
|
+
/** Override direto do fail-fast do backend. */
|
|
260
333
|
failFast?: boolean;
|
|
261
|
-
/** failFastMode legado. */
|
|
262
|
-
failFastMode?: boolean;
|
|
263
334
|
/** Número de tentativas de retry. */
|
|
264
335
|
retryCount?: number;
|
|
265
336
|
}
|
|
266
337
|
declare class FilesApiClient {
|
|
267
338
|
private readonly http;
|
|
268
339
|
constructor(http: HttpClient);
|
|
269
|
-
/**
|
|
270
|
-
* Upload a single file com metadata/conflictPolicy (compat) e/ou options JSON.
|
|
271
|
-
*/
|
|
340
|
+
/** Upload de um único arquivo com metadata/conflictPolicy e options JSON. */
|
|
272
341
|
upload(baseUrl: string, file: File, options?: UploadOptions): Observable<HttpEvent<unknown>>;
|
|
273
|
-
/**
|
|
274
|
-
* Upload múltiplo com arrays de metadata/conflictPolicy (compat) e/ou options JSON.
|
|
275
|
-
*/
|
|
342
|
+
/** Upload múltiplo com arrays de metadata/conflictPolicy e options JSON. */
|
|
276
343
|
bulkUpload(baseUrl: string, files: BulkUploadFile[], options?: BulkUploadOptions): Observable<HttpEvent<unknown>>;
|
|
277
344
|
presign(baseUrl: string, fileName: string): Observable<PresignResponse>;
|
|
278
345
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilesApiClient, never>;
|
|
@@ -285,11 +352,41 @@ declare class PresignedUploaderService {
|
|
|
285
352
|
/**
|
|
286
353
|
* Uploads a file to a presigned URL and retries when configured.
|
|
287
354
|
*/
|
|
288
|
-
upload(target: PresignResponse, file: File, retryCount?: number): Observable<HttpEvent<unknown>>;
|
|
355
|
+
upload(target: PresignResponse, file: File, options?: UploadOptions, retryCount?: number): Observable<HttpEvent<unknown>>;
|
|
356
|
+
private shouldAppendPraxisFields;
|
|
289
357
|
static ɵfac: i0.ɵɵFactoryDeclaration<PresignedUploaderService, never>;
|
|
290
358
|
static ɵprov: i0.ɵɵInjectableDeclaration<PresignedUploaderService>;
|
|
291
359
|
}
|
|
292
360
|
|
|
361
|
+
interface PraxisFilesUploadI18nOptions {
|
|
362
|
+
locale?: string;
|
|
363
|
+
fallbackLocale?: string;
|
|
364
|
+
dictionaries?: Record<string, PraxisI18nDictionary>;
|
|
365
|
+
}
|
|
366
|
+
/** @deprecated Use PraxisI18nService/providePraxisFilesUploadI18n instead. */
|
|
367
|
+
interface FilesUploadTexts {
|
|
368
|
+
[key: string]: string | undefined;
|
|
369
|
+
settingsAriaLabel?: string;
|
|
370
|
+
dropzoneLabel?: string;
|
|
371
|
+
dropzoneButton?: string;
|
|
372
|
+
conflictPolicyLabel?: string;
|
|
373
|
+
metadataLabel?: string;
|
|
374
|
+
progressAriaLabel?: string;
|
|
375
|
+
rateLimitBanner?: string;
|
|
376
|
+
}
|
|
377
|
+
/** @deprecated Use PraxisI18nService/providePraxisFilesUploadI18n instead. */
|
|
378
|
+
interface TranslateLike {
|
|
379
|
+
t?(key: string, params?: unknown, fallback?: string): string;
|
|
380
|
+
instant?(key: string): string;
|
|
381
|
+
}
|
|
382
|
+
/** @deprecated Transitional compatibility token. Prefer PraxisI18nService. */
|
|
383
|
+
declare const FILES_UPLOAD_TEXTS: InjectionToken<FilesUploadTexts>;
|
|
384
|
+
/** @deprecated Transitional compatibility token. Prefer PraxisI18nService. */
|
|
385
|
+
declare const TRANSLATE_LIKE: InjectionToken<TranslateLike>;
|
|
386
|
+
declare function createPraxisFilesUploadI18nConfig(options?: PraxisFilesUploadI18nOptions): Partial<PraxisI18nConfig>;
|
|
387
|
+
declare function providePraxisFilesUploadI18n(options?: PraxisFilesUploadI18nOptions): i0.Provider;
|
|
388
|
+
declare function resolvePraxisFilesUploadText(i18n: PraxisI18nService, key: string, fallback: string, legacyTexts?: FilesUploadTexts, legacyTranslate?: TranslateLike): string;
|
|
389
|
+
|
|
293
390
|
interface RateLimitInfo {
|
|
294
391
|
limit: number;
|
|
295
392
|
remaining: number;
|
|
@@ -304,31 +401,17 @@ interface MappedError {
|
|
|
304
401
|
phase?: string;
|
|
305
402
|
userAction?: string;
|
|
306
403
|
}
|
|
307
|
-
interface TranslateLike {
|
|
308
|
-
instant(key: string): string;
|
|
309
|
-
}
|
|
310
|
-
declare const TRANSLATE_LIKE: InjectionToken<TranslateLike>;
|
|
311
404
|
declare const FILES_UPLOAD_ERROR_MESSAGES: InjectionToken<Partial<Record<string, string>>>;
|
|
312
405
|
declare class ErrorMapperService {
|
|
406
|
+
private readonly i18n;
|
|
313
407
|
private readonly customMessages?;
|
|
314
|
-
private readonly
|
|
315
|
-
constructor(customMessages?: Partial<Record<string, string>> | undefined,
|
|
316
|
-
map(error:
|
|
317
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorMapperService, [{ optional: true; }, { optional: true; }]>;
|
|
408
|
+
private readonly legacyTranslate?;
|
|
409
|
+
constructor(i18n: PraxisI18nService, customMessages?: Partial<Record<string, string>> | undefined, legacyTranslate?: TranslateLike | undefined);
|
|
410
|
+
map(error: ErrorLike, headers?: HttpHeaders): MappedError;
|
|
411
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorMapperService, [null, { optional: true; }, { optional: true; }]>;
|
|
318
412
|
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorMapperService>;
|
|
319
413
|
}
|
|
320
414
|
|
|
321
|
-
interface FilesUploadTexts {
|
|
322
|
-
settingsAriaLabel: string;
|
|
323
|
-
dropzoneLabel: string;
|
|
324
|
-
dropzoneButton: string;
|
|
325
|
-
conflictPolicyLabel: string;
|
|
326
|
-
metadataLabel: string;
|
|
327
|
-
progressAriaLabel: string;
|
|
328
|
-
rateLimitBanner: string;
|
|
329
|
-
}
|
|
330
|
-
declare const FILES_UPLOAD_TEXTS: InjectionToken<FilesUploadTexts>;
|
|
331
|
-
|
|
332
415
|
interface DragPointer {
|
|
333
416
|
x: number;
|
|
334
417
|
y: number;
|
|
@@ -351,42 +434,103 @@ declare class DragProximityService implements OnDestroy {
|
|
|
351
434
|
static ɵprov: i0.ɵɵInjectableDeclaration<DragProximityService>;
|
|
352
435
|
}
|
|
353
436
|
|
|
354
|
-
|
|
437
|
+
/**
|
|
438
|
+
* Service responsible for retrieving the effective upload configuration
|
|
439
|
+
* from the backend and caching it for a short period (60s).
|
|
440
|
+
*/
|
|
441
|
+
declare class ConfigService {
|
|
442
|
+
private http;
|
|
443
|
+
private cache;
|
|
444
|
+
constructor(http: HttpClient);
|
|
445
|
+
private buildCacheKey;
|
|
446
|
+
/**
|
|
447
|
+
* Fetches the effective configuration from the server.
|
|
448
|
+
* @param baseUrl Base URL for the files API (default: `/api/files`).
|
|
449
|
+
* @param headersProvider Optional callback providing additional headers such as tenant/user.
|
|
450
|
+
*/
|
|
451
|
+
getEffectiveConfig(baseUrl?: string, headersProvider?: () => Record<string, string>): Observable<EffectiveUploadConfig>;
|
|
452
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
|
|
453
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigService>;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
type UploadStartEvent = {
|
|
457
|
+
files: File[];
|
|
458
|
+
mode: 'single' | 'bulk';
|
|
459
|
+
strategy: 'direct' | 'presign' | 'auto';
|
|
460
|
+
filesUploadId?: string;
|
|
461
|
+
baseUrl?: string;
|
|
462
|
+
};
|
|
463
|
+
type UploadProgressEvent = {
|
|
464
|
+
progress: number;
|
|
465
|
+
loaded: number;
|
|
466
|
+
total?: number;
|
|
467
|
+
};
|
|
468
|
+
type PendingFilesState = {
|
|
469
|
+
files: File[];
|
|
470
|
+
count: number;
|
|
471
|
+
hasPending: boolean;
|
|
472
|
+
};
|
|
473
|
+
type FilesUploadReadyState = 'idle' | 'loading' | 'ready';
|
|
474
|
+
type FilesUploadReadySource = 'local' | 'server' | 'fallback';
|
|
475
|
+
type FilesUploadReadinessEvent = {
|
|
476
|
+
state: FilesUploadReadyState;
|
|
477
|
+
source: FilesUploadReadySource;
|
|
478
|
+
filesUploadId?: string;
|
|
479
|
+
baseUrl?: string;
|
|
480
|
+
};
|
|
481
|
+
type FilesUploadResolvedTexts = {
|
|
482
|
+
settingsAriaLabel: string;
|
|
483
|
+
dropzoneLabel: string;
|
|
484
|
+
dropzoneButton: string;
|
|
485
|
+
conflictPolicyLabel: string;
|
|
486
|
+
metadataLabel: string;
|
|
487
|
+
progressAriaLabel: string;
|
|
488
|
+
rateLimitBanner: string;
|
|
489
|
+
};
|
|
490
|
+
declare class PraxisFilesUpload implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
355
491
|
private settingsPanel;
|
|
356
492
|
private dragProx;
|
|
357
|
-
private defaultTexts;
|
|
358
493
|
private overlay;
|
|
359
494
|
private viewContainerRef;
|
|
360
495
|
private cdr;
|
|
496
|
+
private configStorage;
|
|
497
|
+
private i18n;
|
|
498
|
+
private readonly legacyTexts?;
|
|
499
|
+
private readonly legacyTranslate?;
|
|
500
|
+
private configService?;
|
|
361
501
|
private api?;
|
|
362
502
|
private presign?;
|
|
363
503
|
private errors?;
|
|
364
|
-
private translate?;
|
|
365
|
-
private configStorage?;
|
|
366
504
|
config: FilesUploadConfig | null;
|
|
367
|
-
|
|
505
|
+
private _filesUploadId;
|
|
506
|
+
set filesUploadId(value: string | null | undefined);
|
|
507
|
+
get filesUploadId(): string;
|
|
508
|
+
componentInstanceId?: string;
|
|
368
509
|
baseUrl?: string;
|
|
369
510
|
displayMode: 'full' | 'compact';
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
bulkComplete: EventEmitter<
|
|
374
|
-
error: EventEmitter<
|
|
511
|
+
context: Record<string, unknown> | null;
|
|
512
|
+
enableCustomization: boolean;
|
|
513
|
+
uploadSuccess: EventEmitter<FileMetadata>;
|
|
514
|
+
bulkComplete: EventEmitter<BulkUploadResponseData>;
|
|
515
|
+
error: EventEmitter<ApiErrorEnvelope>;
|
|
375
516
|
rateLimited: EventEmitter<RateLimitInfo>;
|
|
517
|
+
uploadStart: EventEmitter<UploadStartEvent>;
|
|
518
|
+
uploadProgress: EventEmitter<UploadProgressEvent>;
|
|
376
519
|
retry: EventEmitter<BulkUploadFileResult>;
|
|
377
520
|
download: EventEmitter<BulkUploadFileResult>;
|
|
378
521
|
copyLink: EventEmitter<BulkUploadFileResult>;
|
|
379
522
|
detailsOpened: EventEmitter<BulkUploadFileResult>;
|
|
380
523
|
detailsClosed: EventEmitter<BulkUploadFileResult>;
|
|
381
|
-
|
|
524
|
+
pendingStateChange: EventEmitter<PendingFilesState>;
|
|
382
525
|
proximityChange: EventEmitter<boolean>;
|
|
526
|
+
readinessChange: EventEmitter<FilesUploadReadinessEvent>;
|
|
383
527
|
private fileInput?;
|
|
384
528
|
private hostRef?;
|
|
385
529
|
private overlayTmpl?;
|
|
386
530
|
private selectedOverlayTmpl?;
|
|
387
531
|
conflictPolicies: Array<'ERROR' | 'SKIP' | 'OVERWRITE' | 'MAKE_UNIQUE' | 'RENAME'>;
|
|
388
532
|
conflictPolicy: FormControl<string | null>;
|
|
389
|
-
|
|
533
|
+
uploadProgressValue: number;
|
|
390
534
|
allowMultiple: boolean;
|
|
391
535
|
rateLimit: RateLimitInfo | null;
|
|
392
536
|
quotaExceeded: boolean;
|
|
@@ -397,7 +541,7 @@ declare class PraxisFilesUpload implements OnInit, AfterViewInit, OnDestroy {
|
|
|
397
541
|
fileName: string;
|
|
398
542
|
success: boolean;
|
|
399
543
|
}>;
|
|
400
|
-
texts:
|
|
544
|
+
texts: FilesUploadResolvedTexts;
|
|
401
545
|
lastResults: BulkUploadFileResult[] | null;
|
|
402
546
|
lastStats: {
|
|
403
547
|
total: number;
|
|
@@ -409,6 +553,8 @@ declare class PraxisFilesUpload implements OnInit, AfterViewInit, OnDestroy {
|
|
|
409
553
|
isDragging: boolean;
|
|
410
554
|
private currentFiles;
|
|
411
555
|
private serverEffective?;
|
|
556
|
+
readinessState: FilesUploadReadyState;
|
|
557
|
+
readinessSource: FilesUploadReadySource;
|
|
412
558
|
showProximityOverlay: boolean;
|
|
413
559
|
private proxSub?;
|
|
414
560
|
private proxPtrSub?;
|
|
@@ -420,20 +566,34 @@ declare class PraxisFilesUpload implements OnInit, AfterViewInit, OnDestroy {
|
|
|
420
566
|
private windowDragEndListener;
|
|
421
567
|
private selectedOverlayRef?;
|
|
422
568
|
showAllResults: boolean;
|
|
423
|
-
|
|
569
|
+
private initialized;
|
|
570
|
+
private readonly generatedA11yId;
|
|
571
|
+
constructor(settingsPanel: SettingsPanelService, dragProx: DragProximityService, overlay: Overlay, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, configStorage: AsyncConfigStorage, i18n: PraxisI18nService, legacyTexts?: FilesUploadTexts | undefined, legacyTranslate?: TranslateLike | undefined, configService?: ConfigService | undefined, api?: FilesApiClient | undefined, presign?: PresignedUploaderService | undefined, errors?: ErrorMapperService | undefined);
|
|
572
|
+
private readonly componentKeys;
|
|
573
|
+
private readonly route;
|
|
574
|
+
private warnedMissingId;
|
|
575
|
+
private requireApiClient;
|
|
576
|
+
private requireBaseUrl;
|
|
424
577
|
get showProgress(): boolean;
|
|
425
578
|
get isUploading(): boolean;
|
|
426
579
|
get hasUploadedFiles(): boolean;
|
|
427
580
|
get pendingFiles(): File[];
|
|
428
581
|
get pendingCount(): number;
|
|
582
|
+
get a11yBaseId(): string;
|
|
583
|
+
get messageRegionId(): string;
|
|
584
|
+
get progressRegionId(): string;
|
|
585
|
+
get conflictPolicyInputId(): string;
|
|
586
|
+
get metadataInputId(): string;
|
|
587
|
+
get selectedOverlayTitleId(): string;
|
|
429
588
|
get hasLastResults(): boolean;
|
|
430
589
|
openFile(input: HTMLInputElement): void;
|
|
431
|
-
|
|
590
|
+
openFileDialog(): void;
|
|
432
591
|
displayFileName(f: any): string;
|
|
433
592
|
formatBytes(bytes: number | undefined | null): string;
|
|
434
593
|
mapErrorFull(err: unknown): any;
|
|
435
594
|
get metadataError(): string | null;
|
|
436
595
|
ngOnInit(): void;
|
|
596
|
+
ngOnChanges(): void;
|
|
437
597
|
ngAfterViewInit(): void;
|
|
438
598
|
ngOnDestroy(): void;
|
|
439
599
|
private updateHostRect;
|
|
@@ -450,23 +610,45 @@ declare class PraxisFilesUpload implements OnInit, AfterViewInit, OnDestroy {
|
|
|
450
610
|
private hideProximityOverlay;
|
|
451
611
|
private resolveTexts;
|
|
452
612
|
t(key: string, fallback: string): string;
|
|
613
|
+
get selectFilesAriaLabel(): string;
|
|
614
|
+
get policySummaryAriaLabel(): string;
|
|
615
|
+
pendingFileRemoveAriaLabel(file: File): string;
|
|
616
|
+
pendingFileMoreActionsAriaLabel(file: File): string;
|
|
617
|
+
resultActionAriaLabel(actionKey: string, fallback: string, fileName: string): string;
|
|
453
618
|
openSettings(): void;
|
|
454
619
|
private applyConfig;
|
|
455
|
-
private
|
|
456
|
-
private
|
|
620
|
+
private loadServerEffectiveConfig;
|
|
621
|
+
private setReadinessState;
|
|
622
|
+
private storageKey;
|
|
623
|
+
private componentKeyId;
|
|
624
|
+
private warnMissingId;
|
|
457
625
|
onDragOver(evt: DragEvent): void;
|
|
458
626
|
onDragLeave(_evt: DragEvent): void;
|
|
459
627
|
onDrop(evt: DragEvent): void;
|
|
460
628
|
onFilesSelected(evt: Event): void;
|
|
461
|
-
|
|
462
|
-
|
|
629
|
+
submitPendingFiles(): void;
|
|
630
|
+
resetPendingFiles(): void;
|
|
463
631
|
removePendingFile(file: File): void;
|
|
632
|
+
private emitPendingState;
|
|
464
633
|
private startUpload;
|
|
465
634
|
private directUpload;
|
|
635
|
+
private uploadMultipleFiles;
|
|
636
|
+
private uploadMultipleFilesDirect;
|
|
637
|
+
private uploadSingleFileByStrategy;
|
|
638
|
+
private uploadSingleFileDirectResult;
|
|
639
|
+
private buildBulkResponseData;
|
|
640
|
+
private buildBulkSuccessResult;
|
|
641
|
+
private buildBulkFailureResult;
|
|
642
|
+
private normalizeBulkError;
|
|
643
|
+
private createOperationalError;
|
|
644
|
+
private normalizeErrorEnvelope;
|
|
466
645
|
private buildOptionsJson;
|
|
467
646
|
private handleProgress;
|
|
468
647
|
private handleError;
|
|
469
648
|
private finishUpload;
|
|
649
|
+
private mapUploadResponseToFileMetadata;
|
|
650
|
+
primaryErrorCode(error: ErrorLike | null | undefined): string;
|
|
651
|
+
traceIdOf(error: ErrorLike | null | undefined): string | undefined;
|
|
470
652
|
get visibleResults(): BulkUploadFileResult[];
|
|
471
653
|
private fileToBulkUploadFileResult;
|
|
472
654
|
onRetry(file: File | BulkUploadFileResult): void;
|
|
@@ -477,43 +659,82 @@ declare class PraxisFilesUpload implements OnInit, AfterViewInit, OnDestroy {
|
|
|
477
659
|
onDetailsToggle(ev: Event, item: BulkUploadFileResult): void;
|
|
478
660
|
private validateFiles;
|
|
479
661
|
get policiesSummary(): string;
|
|
480
|
-
|
|
481
|
-
|
|
662
|
+
private resolveTemplateString;
|
|
663
|
+
private resolveContextPath;
|
|
664
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilesUpload, [null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
665
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilesUpload, "praxis-files-upload", never, { "config": { "alias": "config"; "required": false; }; "filesUploadId": { "alias": "filesUploadId"; "required": false; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "baseUrl": { "alias": "baseUrl"; "required": false; }; "displayMode": { "alias": "displayMode"; "required": false; }; "context": { "alias": "context"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; }, { "uploadSuccess": "uploadSuccess"; "bulkComplete": "bulkComplete"; "error": "error"; "rateLimited": "rateLimited"; "uploadStart": "uploadStart"; "uploadProgress": "uploadProgress"; "retry": "retry"; "download": "download"; "copyLink": "copyLink"; "detailsOpened": "detailsOpened"; "detailsClosed": "detailsClosed"; "pendingStateChange": "pendingStateChange"; "proximityChange": "proximityChange"; "readinessChange": "readinessChange"; }, never, ["*"], true, never>;
|
|
482
666
|
}
|
|
483
667
|
|
|
484
668
|
declare class PdxFilesUploadFieldComponent extends SimpleBaseInputComponent {
|
|
485
669
|
config: FilesUploadConfig | null;
|
|
486
|
-
valueMode: 'metadata' | 'id';
|
|
670
|
+
valueMode: 'metadata' | 'id' | 'metadata[]' | 'id[]';
|
|
487
671
|
baseUrl?: string;
|
|
672
|
+
uploadSuccess: EventEmitter<FileMetadata>;
|
|
673
|
+
bulkComplete: EventEmitter<BulkUploadResponseData>;
|
|
674
|
+
error: EventEmitter<unknown>;
|
|
488
675
|
uploadError: string | null;
|
|
489
676
|
private uploader?;
|
|
677
|
+
private pendingTrigger?;
|
|
678
|
+
private pendingPanel?;
|
|
490
679
|
pendingFiles: File[];
|
|
680
|
+
pendingPanelOpen: boolean;
|
|
681
|
+
readonly pendingOverlayPositions: ({
|
|
682
|
+
originX: "start";
|
|
683
|
+
originY: "bottom";
|
|
684
|
+
overlayX: "start";
|
|
685
|
+
overlayY: "top";
|
|
686
|
+
offsetY: number;
|
|
687
|
+
} | {
|
|
688
|
+
originX: "start";
|
|
689
|
+
originY: "top";
|
|
690
|
+
overlayX: "start";
|
|
691
|
+
overlayY: "bottom";
|
|
692
|
+
offsetY: number;
|
|
693
|
+
})[];
|
|
491
694
|
onTriggerUpload(): void;
|
|
492
695
|
onClearSelection(): void;
|
|
493
|
-
|
|
696
|
+
handlePendingState(state: PendingFilesState): void;
|
|
494
697
|
lastFileName: string | null;
|
|
495
698
|
batchCount: number;
|
|
496
699
|
isProximityActive: boolean;
|
|
497
700
|
private readonly errors;
|
|
498
|
-
private readonly
|
|
701
|
+
private readonly filesUploadI18n;
|
|
702
|
+
private readonly legacyTexts;
|
|
703
|
+
private readonly legacyTranslate;
|
|
499
704
|
get showUploadError(): boolean;
|
|
705
|
+
private resolveSingleValue;
|
|
706
|
+
private resolveBulkValue;
|
|
707
|
+
private applyResolvedValue;
|
|
708
|
+
private clearUploadState;
|
|
709
|
+
private applyUploadErrorState;
|
|
500
710
|
t(key: string, fallback: string): string;
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
onBulkComplete(resp: BulkUploadResponse): void;
|
|
711
|
+
get additionalFilesChipAriaLabel(): string;
|
|
712
|
+
onUploadSuccess(file: FileMetadata): void;
|
|
713
|
+
onBulkComplete(data: BulkUploadResponseData): void;
|
|
505
714
|
onUploadError(event: unknown): void;
|
|
506
715
|
isShellDisabled(): boolean;
|
|
716
|
+
isUploadingState(): boolean;
|
|
717
|
+
get shellAriaLabel(): string;
|
|
718
|
+
get statusSummary(): string;
|
|
507
719
|
onProximityChange(isActive: boolean): void;
|
|
508
720
|
openFromShell(): void;
|
|
721
|
+
get pendingPanelId(): string;
|
|
722
|
+
togglePendingPanel(): void;
|
|
723
|
+
closePendingPanel(restoreFocus?: boolean): void;
|
|
724
|
+
onPendingTriggerKeydown(event: KeyboardEvent): void;
|
|
725
|
+
onPendingPanelKeydown(event: KeyboardEvent): void;
|
|
726
|
+
onPendingOverlayDetach(): void;
|
|
509
727
|
onOpenInfo(): void;
|
|
510
728
|
onOpenMenu(): void;
|
|
511
729
|
onClear(): void;
|
|
512
730
|
get policySummary(): string;
|
|
513
731
|
onRemovePendingFile(file: File, event: MouseEvent): void;
|
|
732
|
+
pendingFileSummary(file: File): string;
|
|
514
733
|
formatBytes(bytes: number): string;
|
|
734
|
+
private focusPendingPanelSoon;
|
|
735
|
+
private updateUploadValidationState;
|
|
515
736
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdxFilesUploadFieldComponent, never>;
|
|
516
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdxFilesUploadFieldComponent, "pdx-material-files-upload", never, { "config": { "alias": "config"; "required": false; }; "valueMode": { "alias": "valueMode"; "required": false; }; "baseUrl": { "alias": "baseUrl"; "required": false; }; }, {}, never, never, true, never>;
|
|
737
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdxFilesUploadFieldComponent, "pdx-material-files-upload", never, { "config": { "alias": "config"; "required": false; }; "valueMode": { "alias": "valueMode"; "required": false; }; "baseUrl": { "alias": "baseUrl"; "required": false; }; }, { "uploadSuccess": "uploadSuccess"; "bulkComplete": "bulkComplete"; "error": "error"; }, never, never, true, never>;
|
|
517
738
|
}
|
|
518
739
|
|
|
519
740
|
declare function acceptValidator(allowed: string[]): ValidatorFn;
|
|
@@ -560,10 +781,136 @@ declare class PraxisFilesUploadConfigEditor implements OnInit, SettingsValueProv
|
|
|
560
781
|
onJsonChange(json: string): void;
|
|
561
782
|
private getHeadersForFetch;
|
|
562
783
|
refetchServerConfig(): void;
|
|
784
|
+
get summaryStrategyTitle(): string;
|
|
785
|
+
get summaryStrategyDetail(): string;
|
|
786
|
+
get summaryExperienceTitle(): string;
|
|
787
|
+
get summaryExperienceDetail(): string;
|
|
788
|
+
get summaryLimitsTitle(): string;
|
|
789
|
+
get summaryLimitsDetail(): string;
|
|
790
|
+
get summaryServerTitle(): string;
|
|
791
|
+
get summaryServerDetail(): string;
|
|
792
|
+
get activeRisks(): Array<{
|
|
793
|
+
title: string;
|
|
794
|
+
detail: string;
|
|
795
|
+
}>;
|
|
563
796
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilesUploadConfigEditor, never>;
|
|
564
797
|
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilesUploadConfigEditor, "praxis-files-upload-config-editor", never, {}, {}, never, never, true, never>;
|
|
565
798
|
}
|
|
566
799
|
|
|
800
|
+
declare const FILES_UPLOAD_EN_US: {
|
|
801
|
+
'praxis.filesUpload.settingsAriaLabel': string;
|
|
802
|
+
'praxis.filesUpload.dropzoneLabel': string;
|
|
803
|
+
'praxis.filesUpload.dropzoneButton': string;
|
|
804
|
+
'praxis.filesUpload.conflictPolicyLabel': string;
|
|
805
|
+
'praxis.filesUpload.metadataLabel': string;
|
|
806
|
+
'praxis.filesUpload.progressAriaLabel': string;
|
|
807
|
+
'praxis.filesUpload.rateLimitBanner': string;
|
|
808
|
+
'praxis.filesUpload.settingsTitle': string;
|
|
809
|
+
'praxis.filesUpload.statusSuccess': string;
|
|
810
|
+
'praxis.filesUpload.statusError': string;
|
|
811
|
+
'praxis.filesUpload.invalidMetadata': string;
|
|
812
|
+
'praxis.filesUpload.genericUploadError': string;
|
|
813
|
+
'praxis.filesUpload.acceptError': string;
|
|
814
|
+
'praxis.filesUpload.maxFileSizeError': string;
|
|
815
|
+
'praxis.filesUpload.maxFilesPerBulkError': string;
|
|
816
|
+
'praxis.filesUpload.maxBulkSizeError': string;
|
|
817
|
+
'praxis.filesUpload.serviceUnavailable': string;
|
|
818
|
+
'praxis.filesUpload.baseUrlMissing': string;
|
|
819
|
+
'praxis.filesUpload.selectFiles': string;
|
|
820
|
+
'praxis.filesUpload.remove': string;
|
|
821
|
+
'praxis.filesUpload.moreActions': string;
|
|
822
|
+
'praxis.filesUpload.policySummaryAction': string;
|
|
823
|
+
'praxis.filesUpload.retry': string;
|
|
824
|
+
'praxis.filesUpload.download': string;
|
|
825
|
+
'praxis.filesUpload.copyLink': string;
|
|
826
|
+
'praxis.filesUpload.details': string;
|
|
827
|
+
'praxis.filesUpload.detailsMetadata': string;
|
|
828
|
+
'praxis.filesUpload.dropzoneHint': string;
|
|
829
|
+
'praxis.filesUpload.dropzoneProximityHint': string;
|
|
830
|
+
'praxis.filesUpload.placeholder': string;
|
|
831
|
+
'praxis.filesUpload.partialUploadError': string;
|
|
832
|
+
'praxis.filesUpload.presignMetadataMissing': string;
|
|
833
|
+
'praxis.filesUpload.fieldChipAria': string;
|
|
834
|
+
'praxis.filesUpload.fieldPendingCountSuffix': string;
|
|
835
|
+
'praxis.filesUpload.removePendingFile': string;
|
|
836
|
+
'praxis.filesUpload.fieldPolicyTypes': string;
|
|
837
|
+
'praxis.filesUpload.fieldPolicyMaxPerFile': string;
|
|
838
|
+
'praxis.filesUpload.fieldPolicyMaxItems': string;
|
|
839
|
+
'praxis.filesUpload.fieldPolicyNotConfigured': string;
|
|
840
|
+
'praxis.filesUpload.sizeUnitBytes': string;
|
|
841
|
+
'praxis.filesUpload.sizeUnitKB': string;
|
|
842
|
+
'praxis.filesUpload.sizeUnitMB': string;
|
|
843
|
+
'praxis.filesUpload.sizeUnitGB': string;
|
|
844
|
+
'praxis.filesUpload.sizeUnitTB': string;
|
|
845
|
+
'praxis.filesUpload.errors.INVALID_FILE_TYPE': string;
|
|
846
|
+
'praxis.filesUpload.errors.FILE_TOO_LARGE': string;
|
|
847
|
+
'praxis.filesUpload.errors.NOT_FOUND': string;
|
|
848
|
+
'praxis.filesUpload.errors.UNAUTHORIZED': string;
|
|
849
|
+
'praxis.filesUpload.errors.RATE_LIMIT_EXCEEDED': string;
|
|
850
|
+
'praxis.filesUpload.errors.INTERNAL_ERROR': string;
|
|
851
|
+
'praxis.filesUpload.errors.QUOTA_EXCEEDED': string;
|
|
852
|
+
'praxis.filesUpload.errors.SEC_VIRUS_DETECTED': string;
|
|
853
|
+
'praxis.filesUpload.errors.SEC_MALICIOUS_CONTENT': string;
|
|
854
|
+
'praxis.filesUpload.errors.SEC_DANGEROUS_TYPE': string;
|
|
855
|
+
'praxis.filesUpload.errors.FMT_MAGIC_MISMATCH': string;
|
|
856
|
+
'praxis.filesUpload.errors.FMT_CORRUPTED': string;
|
|
857
|
+
'praxis.filesUpload.errors.FMT_UNSUPPORTED': string;
|
|
858
|
+
'praxis.filesUpload.errors.SYS_STORAGE_ERROR': string;
|
|
859
|
+
'praxis.filesUpload.errors.SYS_SERVICE_DOWN': string;
|
|
860
|
+
'praxis.filesUpload.errors.SYS_RATE_LIMIT': string;
|
|
861
|
+
'praxis.filesUpload.errors.ARQUIVO_MUITO_GRANDE': string;
|
|
862
|
+
'praxis.filesUpload.errors.TIPO_ARQUIVO_INVALIDO': string;
|
|
863
|
+
'praxis.filesUpload.errors.TIPO_MIDIA_NAO_SUPORTADO': string;
|
|
864
|
+
'praxis.filesUpload.errors.CAMPO_OBRIGATORIO_AUSENTE': string;
|
|
865
|
+
'praxis.filesUpload.errors.OPCOES_JSON_INVALIDAS': string;
|
|
866
|
+
'praxis.filesUpload.errors.ARGUMENTO_INVALIDO': string;
|
|
867
|
+
'praxis.filesUpload.errors.NAO_AUTORIZADO': string;
|
|
868
|
+
'praxis.filesUpload.errors.ERRO_INTERNO': string;
|
|
869
|
+
'praxis.filesUpload.errors.LIMITE_TAXA_EXCEDIDO': string;
|
|
870
|
+
'praxis.filesUpload.errors.COTA_EXCEDIDA': string;
|
|
871
|
+
'praxis.filesUpload.errors.ARQUIVO_JA_EXISTE': string;
|
|
872
|
+
'praxis.filesUpload.errors.INVALID_JSON_OPTIONS': string;
|
|
873
|
+
'praxis.filesUpload.errors.EMPTY_FILENAME': string;
|
|
874
|
+
'praxis.filesUpload.errors.FILE_EXISTS': string;
|
|
875
|
+
'praxis.filesUpload.errors.PATH_TRAVERSAL': string;
|
|
876
|
+
'praxis.filesUpload.errors.INSUFFICIENT_STORAGE': string;
|
|
877
|
+
'praxis.filesUpload.errors.UPLOAD_TIMEOUT': string;
|
|
878
|
+
'praxis.filesUpload.errors.BULK_UPLOAD_TIMEOUT': string;
|
|
879
|
+
'praxis.filesUpload.errors.BULK_UPLOAD_CANCELLED': string;
|
|
880
|
+
'praxis.filesUpload.errors.USER_CANCELLED': string;
|
|
881
|
+
'praxis.filesUpload.errors.UNKNOWN_ERROR': string;
|
|
882
|
+
'praxis.filesUpload.fieldPendingSummary': string;
|
|
883
|
+
'praxis.filesUpload.fieldSelectedSummary': string;
|
|
884
|
+
'praxis.filesUpload.fieldSelectedPlural': string;
|
|
885
|
+
'praxis.filesUpload.fieldEmptySummary': string;
|
|
886
|
+
'praxis.filesUpload.fieldErrorSummary': string;
|
|
887
|
+
'praxis.filesUpload.fieldActionUpload': string;
|
|
888
|
+
'praxis.filesUpload.fieldActionUploadShort': string;
|
|
889
|
+
'praxis.filesUpload.fieldActionCancel': string;
|
|
890
|
+
'praxis.filesUpload.fieldActionCancelShort': string;
|
|
891
|
+
'praxis.filesUpload.fieldActionSelect': string;
|
|
892
|
+
'praxis.filesUpload.fieldActionClear': string;
|
|
893
|
+
'praxis.filesUpload.fieldInfoAction': string;
|
|
894
|
+
'praxis.filesUpload.fieldMoreActions': string;
|
|
895
|
+
'praxis.filesUpload.fieldPendingAriaSuffix': string;
|
|
896
|
+
'praxis.filesUpload.selectedOverlayAriaLabel': string;
|
|
897
|
+
'praxis.filesUpload.selectedOverlayTitle': string;
|
|
898
|
+
'praxis.filesUpload.bulkSummaryTotal': string;
|
|
899
|
+
'praxis.filesUpload.bulkSummarySuccess': string;
|
|
900
|
+
'praxis.filesUpload.bulkSummaryFailed': string;
|
|
901
|
+
'praxis.filesUpload.resultMetaIdLabel': string;
|
|
902
|
+
'praxis.filesUpload.resultMetaTypeLabel': string;
|
|
903
|
+
'praxis.filesUpload.resultMetaSizeLabel': string;
|
|
904
|
+
'praxis.filesUpload.resultMetaUploadedAtLabel': string;
|
|
905
|
+
'praxis.filesUpload.policySummaryAny': string;
|
|
906
|
+
'praxis.filesUpload.policySummaryNotConfigured': string;
|
|
907
|
+
'praxis.filesUpload.policySummaryTypesLabel': string;
|
|
908
|
+
'praxis.filesUpload.policySummaryMaxPerFileLabel': string;
|
|
909
|
+
'praxis.filesUpload.policySummaryQuantityLabel': string;
|
|
910
|
+
'praxis.filesUpload.showAll': string;
|
|
911
|
+
'praxis.filesUpload.showLess': string;
|
|
912
|
+
};
|
|
913
|
+
|
|
567
914
|
declare const FILES_UPLOAD_PT_BR: {
|
|
568
915
|
'praxis.filesUpload.settingsAriaLabel': string;
|
|
569
916
|
'praxis.filesUpload.dropzoneLabel': string;
|
|
@@ -581,6 +928,34 @@ declare const FILES_UPLOAD_PT_BR: {
|
|
|
581
928
|
'praxis.filesUpload.maxFileSizeError': string;
|
|
582
929
|
'praxis.filesUpload.maxFilesPerBulkError': string;
|
|
583
930
|
'praxis.filesUpload.maxBulkSizeError': string;
|
|
931
|
+
'praxis.filesUpload.serviceUnavailable': string;
|
|
932
|
+
'praxis.filesUpload.baseUrlMissing': string;
|
|
933
|
+
'praxis.filesUpload.selectFiles': string;
|
|
934
|
+
'praxis.filesUpload.remove': string;
|
|
935
|
+
'praxis.filesUpload.moreActions': string;
|
|
936
|
+
'praxis.filesUpload.policySummaryAction': string;
|
|
937
|
+
'praxis.filesUpload.retry': string;
|
|
938
|
+
'praxis.filesUpload.download': string;
|
|
939
|
+
'praxis.filesUpload.copyLink': string;
|
|
940
|
+
'praxis.filesUpload.details': string;
|
|
941
|
+
'praxis.filesUpload.detailsMetadata': string;
|
|
942
|
+
'praxis.filesUpload.dropzoneHint': string;
|
|
943
|
+
'praxis.filesUpload.dropzoneProximityHint': string;
|
|
944
|
+
'praxis.filesUpload.placeholder': string;
|
|
945
|
+
'praxis.filesUpload.partialUploadError': string;
|
|
946
|
+
'praxis.filesUpload.presignMetadataMissing': string;
|
|
947
|
+
'praxis.filesUpload.fieldChipAria': string;
|
|
948
|
+
'praxis.filesUpload.fieldPendingCountSuffix': string;
|
|
949
|
+
'praxis.filesUpload.removePendingFile': string;
|
|
950
|
+
'praxis.filesUpload.fieldPolicyTypes': string;
|
|
951
|
+
'praxis.filesUpload.fieldPolicyMaxPerFile': string;
|
|
952
|
+
'praxis.filesUpload.fieldPolicyMaxItems': string;
|
|
953
|
+
'praxis.filesUpload.fieldPolicyNotConfigured': string;
|
|
954
|
+
'praxis.filesUpload.sizeUnitBytes': string;
|
|
955
|
+
'praxis.filesUpload.sizeUnitKB': string;
|
|
956
|
+
'praxis.filesUpload.sizeUnitMB': string;
|
|
957
|
+
'praxis.filesUpload.sizeUnitGB': string;
|
|
958
|
+
'praxis.filesUpload.sizeUnitTB': string;
|
|
584
959
|
'praxis.filesUpload.errors.INVALID_FILE_TYPE': string;
|
|
585
960
|
'praxis.filesUpload.errors.FILE_TOO_LARGE': string;
|
|
586
961
|
'praxis.filesUpload.errors.NOT_FOUND': string;
|
|
@@ -618,12 +993,68 @@ declare const FILES_UPLOAD_PT_BR: {
|
|
|
618
993
|
'praxis.filesUpload.errors.BULK_UPLOAD_CANCELLED': string;
|
|
619
994
|
'praxis.filesUpload.errors.USER_CANCELLED': string;
|
|
620
995
|
'praxis.filesUpload.errors.UNKNOWN_ERROR': string;
|
|
996
|
+
'praxis.filesUpload.fieldPendingSummary': string;
|
|
997
|
+
'praxis.filesUpload.fieldSelectedSummary': string;
|
|
998
|
+
'praxis.filesUpload.fieldSelectedPlural': string;
|
|
999
|
+
'praxis.filesUpload.fieldEmptySummary': string;
|
|
1000
|
+
'praxis.filesUpload.fieldErrorSummary': string;
|
|
1001
|
+
'praxis.filesUpload.fieldActionUpload': string;
|
|
1002
|
+
'praxis.filesUpload.fieldActionUploadShort': string;
|
|
1003
|
+
'praxis.filesUpload.fieldActionCancel': string;
|
|
1004
|
+
'praxis.filesUpload.fieldActionCancelShort': string;
|
|
1005
|
+
'praxis.filesUpload.fieldActionSelect': string;
|
|
1006
|
+
'praxis.filesUpload.fieldActionClear': string;
|
|
1007
|
+
'praxis.filesUpload.fieldInfoAction': string;
|
|
1008
|
+
'praxis.filesUpload.fieldMoreActions': string;
|
|
1009
|
+
'praxis.filesUpload.fieldPendingAriaSuffix': string;
|
|
1010
|
+
'praxis.filesUpload.selectedOverlayAriaLabel': string;
|
|
1011
|
+
'praxis.filesUpload.selectedOverlayTitle': string;
|
|
1012
|
+
'praxis.filesUpload.bulkSummaryTotal': string;
|
|
1013
|
+
'praxis.filesUpload.bulkSummarySuccess': string;
|
|
1014
|
+
'praxis.filesUpload.bulkSummaryFailed': string;
|
|
1015
|
+
'praxis.filesUpload.resultMetaIdLabel': string;
|
|
1016
|
+
'praxis.filesUpload.resultMetaTypeLabel': string;
|
|
1017
|
+
'praxis.filesUpload.resultMetaSizeLabel': string;
|
|
1018
|
+
'praxis.filesUpload.resultMetaUploadedAtLabel': string;
|
|
1019
|
+
'praxis.filesUpload.policySummaryAny': string;
|
|
1020
|
+
'praxis.filesUpload.policySummaryNotConfigured': string;
|
|
1021
|
+
'praxis.filesUpload.policySummaryTypesLabel': string;
|
|
1022
|
+
'praxis.filesUpload.policySummaryMaxPerFileLabel': string;
|
|
1023
|
+
'praxis.filesUpload.policySummaryQuantityLabel': string;
|
|
1024
|
+
'praxis.filesUpload.showAll': string;
|
|
1025
|
+
'praxis.filesUpload.showLess': string;
|
|
621
1026
|
};
|
|
622
1027
|
|
|
623
|
-
/** Metadata for PraxisFilesUpload component */
|
|
624
1028
|
declare const PRAXIS_FILES_UPLOAD_COMPONENT_METADATA: ComponentDocMeta;
|
|
625
|
-
/** Provider para auto-registrar metadados do componente Files Upload. */
|
|
626
1029
|
declare function providePraxisFilesUploadMetadata(): Provider;
|
|
627
1030
|
|
|
628
|
-
|
|
629
|
-
|
|
1031
|
+
/**
|
|
1032
|
+
* Capabilities catalog for FilesUploadConfig.
|
|
1033
|
+
* Paths follow FilesUploadConfig shape (patch merged at config root).
|
|
1034
|
+
*/
|
|
1035
|
+
|
|
1036
|
+
declare module '@praxisui/core' {
|
|
1037
|
+
interface AiCapabilityCategoryMap {
|
|
1038
|
+
strategy: true;
|
|
1039
|
+
ui: true;
|
|
1040
|
+
limits: true;
|
|
1041
|
+
options: true;
|
|
1042
|
+
bulk: true;
|
|
1043
|
+
quotas: true;
|
|
1044
|
+
rateLimit: true;
|
|
1045
|
+
headers: true;
|
|
1046
|
+
messages: true;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
type CapabilityCategory = AiCapabilityCategory;
|
|
1050
|
+
type ValueKind = AiValueKind;
|
|
1051
|
+
interface Capability extends AiCapability {
|
|
1052
|
+
category: CapabilityCategory;
|
|
1053
|
+
}
|
|
1054
|
+
interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
1055
|
+
capabilities: Capability[];
|
|
1056
|
+
}
|
|
1057
|
+
declare const FILES_UPLOAD_AI_CAPABILITIES: CapabilityCatalog;
|
|
1058
|
+
|
|
1059
|
+
export { BulkUploadResultStatus, ErrorCode, ErrorMapperService, FILES_UPLOAD_AI_CAPABILITIES, FILES_UPLOAD_EN_US, FILES_UPLOAD_ERROR_MESSAGES, FILES_UPLOAD_PT_BR, FILES_UPLOAD_TEXTS, FilesApiClient, PRAXIS_FILES_UPLOAD_COMPONENT_METADATA, PdxFilesUploadFieldComponent, PraxisFilesUpload, PraxisFilesUploadConfigEditor, PresignedUploaderService, ScanStatus, TRANSLATE_LIKE, acceptValidator, createPraxisFilesUploadI18nConfig, getPrimaryErrorItem, isErrorEnvelope, maxBulkSizeValidator, maxFileSizeValidator, maxFilesPerBulkValidator, providePraxisFilesUploadI18n, providePraxisFilesUploadMetadata, resolvePraxisFilesUploadText };
|
|
1060
|
+
export type { ApiErrorEnvelope, ApiErrorItem, ApiResponseStatus, ApiSuccessEnvelope, BulkConfig, BulkUploadFile, BulkUploadFileResult, BulkUploadOptions, BulkUploadResponse, BulkUploadResponseData, Capability, CapabilityCatalog, CapabilityCategory, EffectiveUploadConfig, ErrorLike, ErrorResponse, FileMetadata, FileUploadOptions, FilesUploadBackendOptionsConfig, FilesUploadConfig, FilesUploadExecutionConfig, FilesUploadHeadersConfig, FilesUploadMessagesConfig, FilesUploadQuotaFeedbackConfig, FilesUploadRateLimitFeedbackConfig, FilesUploadReadinessEvent, FilesUploadReadySource, FilesUploadReadyState, FilesUploadStrategy, FilesUploadTexts, FilesUploadValidationConfig, FilesUploadVisualConfig, MappedError, Metadata, PendingFilesState, PraxisFilesUploadI18nOptions, PresignResponse, QuotasConfig, RateLimitConfig, RateLimitInfo, ServerMessages, TranslateLike, UploadOptions, UploadProgressEvent, UploadResponse, UploadResponseData, UploadStartEvent, ValueKind };
|