@acorex/cdk 21.0.2-next.29 → 21.0.2-next.30
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/fesm2022/acorex-cdk-accordion.mjs +24 -24
- package/fesm2022/acorex-cdk-accordion.mjs.map +1 -1
- package/fesm2022/acorex-cdk-carousel.mjs +3 -3
- package/fesm2022/acorex-cdk-carousel.mjs.map +1 -1
- package/fesm2022/acorex-cdk-clipboard.mjs +8 -8
- package/fesm2022/acorex-cdk-clipboard.mjs.map +1 -1
- package/fesm2022/acorex-cdk-common.mjs +161 -106
- package/fesm2022/acorex-cdk-common.mjs.map +1 -1
- package/fesm2022/acorex-cdk-dom.mjs +4 -4
- package/fesm2022/acorex-cdk-dom.mjs.map +1 -1
- package/fesm2022/acorex-cdk-double-click.mjs +4 -4
- package/fesm2022/acorex-cdk-double-click.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drag-drop.mjs +22 -22
- package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drawer.mjs +13 -13
- package/fesm2022/acorex-cdk-drawer.mjs.map +1 -1
- package/fesm2022/acorex-cdk-focus-trap.mjs +3 -3
- package/fesm2022/acorex-cdk-focus-trap.mjs.map +1 -1
- package/fesm2022/acorex-cdk-full-screen.mjs +4 -4
- package/fesm2022/acorex-cdk-full-screen.mjs.map +1 -1
- package/fesm2022/acorex-cdk-input-mask.mjs +11 -5
- package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
- package/fesm2022/acorex-cdk-list-navigation.mjs +13 -13
- package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -1
- package/fesm2022/acorex-cdk-outline.mjs +68 -57
- package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +16 -3
- package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
- package/fesm2022/acorex-cdk-pan-view.mjs +4 -4
- package/fesm2022/acorex-cdk-pan-view.mjs.map +1 -1
- package/fesm2022/acorex-cdk-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-cdk-resizable.mjs +5 -6
- package/fesm2022/acorex-cdk-resizable.mjs.map +1 -1
- package/fesm2022/acorex-cdk-selection.mjs +13 -13
- package/fesm2022/acorex-cdk-selection.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sliding-item.mjs +3 -3
- package/fesm2022/acorex-cdk-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sticky.mjs +3 -3
- package/fesm2022/acorex-cdk-sticky.mjs.map +1 -1
- package/fesm2022/acorex-cdk-uploader.mjs +171 -281
- package/fesm2022/acorex-cdk-uploader.mjs.map +1 -1
- package/fesm2022/acorex-cdk-virtual-scroll.mjs +11 -11
- package/fesm2022/acorex-cdk-virtual-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-cdk-z-index.mjs +3 -3
- package/fesm2022/acorex-cdk-z-index.mjs.map +1 -1
- package/fesm2022/acorex-cdk.mjs.map +1 -1
- package/package.json +28 -28
- package/{common/index.d.ts → types/acorex-cdk-common.d.ts} +9 -7
- package/{focus-trap/index.d.ts → types/acorex-cdk-focus-trap.d.ts} +1 -1
- package/{input-mask/index.d.ts → types/acorex-cdk-input-mask.d.ts} +1 -0
- package/{outline/index.d.ts → types/acorex-cdk-outline.d.ts} +1 -0
- package/{overlay/index.d.ts → types/acorex-cdk-overlay.d.ts} +1 -0
- package/{uploader/index.d.ts → types/acorex-cdk-uploader.d.ts} +110 -120
- /package/{accordion/index.d.ts → types/acorex-cdk-accordion.d.ts} +0 -0
- /package/{carousel/index.d.ts → types/acorex-cdk-carousel.d.ts} +0 -0
- /package/{clipboard/index.d.ts → types/acorex-cdk-clipboard.d.ts} +0 -0
- /package/{dom/index.d.ts → types/acorex-cdk-dom.d.ts} +0 -0
- /package/{double-click/index.d.ts → types/acorex-cdk-double-click.d.ts} +0 -0
- /package/{drag-drop/index.d.ts → types/acorex-cdk-drag-drop.d.ts} +0 -0
- /package/{drawer/index.d.ts → types/acorex-cdk-drawer.d.ts} +0 -0
- /package/{full-screen/index.d.ts → types/acorex-cdk-full-screen.d.ts} +0 -0
- /package/{list-navigation/index.d.ts → types/acorex-cdk-list-navigation.d.ts} +0 -0
- /package/{pan-view/index.d.ts → types/acorex-cdk-pan-view.d.ts} +0 -0
- /package/{qrcode/index.d.ts → types/acorex-cdk-qrcode.d.ts} +0 -0
- /package/{resizable/index.d.ts → types/acorex-cdk-resizable.d.ts} +0 -0
- /package/{selection/index.d.ts → types/acorex-cdk-selection.d.ts} +0 -0
- /package/{sliding-item/index.d.ts → types/acorex-cdk-sliding-item.d.ts} +0 -0
- /package/{sticky/index.d.ts → types/acorex-cdk-sticky.d.ts} +0 -0
- /package/{virtual-scroll/index.d.ts → types/acorex-cdk-virtual-scroll.d.ts} +0 -0
- /package/{wysiwyg/index.d.ts → types/acorex-cdk-wysiwyg.d.ts} +0 -0
- /package/{z-index/index.d.ts → types/acorex-cdk-z-index.d.ts} +0 -0
- /package/{index.d.ts → types/acorex-cdk.d.ts} +0 -0
|
@@ -1,44 +1,47 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnInit, OnDestroy, TemplateRef } from '@angular/core';
|
|
3
3
|
import { AXEvent } from '@acorex/cdk/common';
|
|
4
|
-
import { AXValidationRuleResult } from '@acorex/core/validation';
|
|
5
4
|
import * as rxjs from 'rxjs';
|
|
6
5
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* A directive that provides browse functionality for file uploads.
|
|
9
|
+
* When applied to an element, clicking it will trigger the file browser dialog.
|
|
11
10
|
* @category Directives
|
|
12
11
|
*/
|
|
13
12
|
declare class AXUploaderBrowseDirective implements OnInit, OnDestroy {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
private
|
|
13
|
+
/**
|
|
14
|
+
* The uploader zone directive instance.
|
|
15
|
+
* @ignore
|
|
16
|
+
*/
|
|
17
|
+
private uploaderZone;
|
|
18
|
+
/**
|
|
19
|
+
* The element reference for the directive host.
|
|
20
|
+
* @ignore
|
|
21
|
+
*/
|
|
22
|
+
private elementRef;
|
|
23
|
+
/**
|
|
24
|
+
* Platform ID for browser detection.
|
|
25
|
+
* @ignore
|
|
26
|
+
*/
|
|
27
|
+
private platformID;
|
|
28
|
+
/**
|
|
29
|
+
* Initializes the directive by adding click event listener and data attribute.
|
|
30
|
+
*/
|
|
19
31
|
ngOnInit(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Cleans up the directive by removing event listeners.
|
|
34
|
+
*/
|
|
20
35
|
ngOnDestroy(): void;
|
|
21
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Handles the click event to trigger file browser.
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
22
40
|
private handleClick;
|
|
23
41
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXUploaderBrowseDirective, never>;
|
|
24
42
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXUploaderBrowseDirective, "[axUploaderBrowseHandle]", never, {}, {}, never, never, true, never>;
|
|
25
43
|
}
|
|
26
44
|
|
|
27
|
-
interface AXUploaderChooseFilesResult {
|
|
28
|
-
accepted: File[];
|
|
29
|
-
rejected: {
|
|
30
|
-
file: File;
|
|
31
|
-
errors: AXValidationRuleResult[];
|
|
32
|
-
}[];
|
|
33
|
-
}
|
|
34
|
-
interface AXUploaderFileChangeEvent {
|
|
35
|
-
event: Event;
|
|
36
|
-
files: File[];
|
|
37
|
-
rejected?: {
|
|
38
|
-
file: File;
|
|
39
|
-
errors: AXValidationRuleResult[];
|
|
40
|
-
}[];
|
|
41
|
-
}
|
|
42
45
|
type AXUploadStatus = 'new' | 'inprogress' | 'completed' | 'failed' | 'canceled';
|
|
43
46
|
interface AXUploaderChangedEvent extends AXEvent {
|
|
44
47
|
requests: AXUploadRequest[];
|
|
@@ -116,11 +119,6 @@ declare class AXUploaderZoneDirective implements OnDestroy {
|
|
|
116
119
|
* @defaultValue null
|
|
117
120
|
*/
|
|
118
121
|
accept: _angular_core.InputSignal<string>;
|
|
119
|
-
/**
|
|
120
|
-
* Logical file type name from {@link AXFileService} (e.g. `conversation-image`).
|
|
121
|
-
* Required for browse handles and validated selection.
|
|
122
|
-
*/
|
|
123
|
-
fileType: _angular_core.InputSignal<string>;
|
|
124
122
|
/**
|
|
125
123
|
* Custom template for the drag overlay. If provided, this will be used instead of the default overlay.
|
|
126
124
|
*/
|
|
@@ -179,7 +177,10 @@ declare class AXUploaderZoneDirective implements OnDestroy {
|
|
|
179
177
|
* Emitted when files are selected or dropped (like HTML file input).
|
|
180
178
|
* Emits an event with files property containing the selected files.
|
|
181
179
|
*/
|
|
182
|
-
fileChange: _angular_core.OutputEmitterRef<
|
|
180
|
+
fileChange: _angular_core.OutputEmitterRef<{
|
|
181
|
+
event: Event;
|
|
182
|
+
files: File[];
|
|
183
|
+
}>;
|
|
183
184
|
/**
|
|
184
185
|
* Emitted when files are changed (added, removed, etc.).
|
|
185
186
|
* @deprecated Use fileChange instead for simpler file input-like behavior
|
|
@@ -275,114 +276,103 @@ declare class AXUploaderZoneDirective implements OnDestroy {
|
|
|
275
276
|
*/
|
|
276
277
|
browser(): Promise<void>;
|
|
277
278
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXUploaderZoneDirective, never>;
|
|
278
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXUploaderZoneDirective, "[axUploaderZone]", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "
|
|
279
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXUploaderZoneDirective, "[axUploaderZone]", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "overlayTemplate": { "alias": "overlayTemplate"; "required": false; "isSignal": true; }; "disableBrowse": { "alias": "disableBrowse"; "required": false; "isSignal": true; }; "disableDragDrop": { "alias": "disableDragDrop"; "required": false; "isSignal": true; }; }, { "fileChange": "fileChange"; "onChanged": "onChanged"; "dragEnter": "dragEnter"; "dragLeave": "dragLeave"; "dragOver": "dragOver"; "onFileUploadComplete": "onFileUploadComplete"; "onFilesUploadComplete": "onFilesUploadComplete"; }, never, never, true, never>;
|
|
279
280
|
}
|
|
280
281
|
|
|
281
|
-
/** Reference to stored file/media (url and/or mediaId). */
|
|
282
|
-
interface AXUploadReference {
|
|
283
|
-
url?: string;
|
|
284
|
-
mediaId?: string;
|
|
285
|
-
mimeType?: string;
|
|
286
|
-
size?: number;
|
|
287
|
-
expiresAt?: number;
|
|
288
|
-
metadata?: Record<string, unknown>;
|
|
289
|
-
}
|
|
290
|
-
interface AXFileUploadOptions {
|
|
291
|
-
source: File | Blob;
|
|
292
|
-
fileName?: string;
|
|
293
|
-
mimeType?: string;
|
|
294
|
-
metadata?: Record<string, unknown>;
|
|
295
|
-
onProgress?: (percent: number) => void;
|
|
296
|
-
signal?: AbortSignal;
|
|
297
|
-
}
|
|
298
|
-
interface AXUploadResult {
|
|
299
|
-
url: string;
|
|
300
|
-
thumbnailUrl?: string;
|
|
301
|
-
mediaId?: string;
|
|
302
|
-
size: number;
|
|
303
|
-
mimeType: string;
|
|
304
|
-
metadata?: Record<string, unknown>;
|
|
305
|
-
}
|
|
306
|
-
/** Emitted when {@link AXUploaderService.upload} is called. */
|
|
307
|
-
interface AXUploaderUploadEvent extends AXEvent {
|
|
308
|
-
options: AXFileUploadOptions;
|
|
309
|
-
resolve: (result: AXUploadResult) => void;
|
|
310
|
-
reject: (reason: unknown) => void;
|
|
311
|
-
}
|
|
312
|
-
/** Emitted when {@link AXUploaderService.resolveUrl} is called. */
|
|
313
|
-
interface AXUploaderResolveUrlEvent extends AXEvent {
|
|
314
|
-
reference: AXUploadReference;
|
|
315
|
-
signal?: AbortSignal;
|
|
316
|
-
resolve: (url: string) => void;
|
|
317
|
-
reject: (reason: unknown) => void;
|
|
318
|
-
}
|
|
319
|
-
/** Emitted when {@link AXUploaderService.deleteMedia} is called. */
|
|
320
|
-
interface AXUploaderDeleteMediaEvent extends AXEvent {
|
|
321
|
-
reference: AXUploadReference;
|
|
322
|
-
resolve: () => void;
|
|
323
|
-
reject: (reason: unknown) => void;
|
|
324
|
-
}
|
|
325
|
-
interface AXUploaderBrowseOptions {
|
|
326
|
-
multiple?: boolean;
|
|
327
|
-
accept?: string;
|
|
328
|
-
/** Logical file type name(s) registered in {@link AXFileService}. */
|
|
329
|
-
fileType?: string | string[];
|
|
330
|
-
}
|
|
331
|
-
interface AXUploaderAddOptions {
|
|
332
|
-
fileType?: string | string[];
|
|
333
|
-
}
|
|
334
282
|
/**
|
|
335
|
-
*
|
|
336
|
-
* Storage is implemented by subscribing to upload/resolve/delete events.
|
|
283
|
+
* Service for managing file uploads with drag-and-drop support, progress tracking, and dialog management.
|
|
337
284
|
* @category Services
|
|
338
285
|
*/
|
|
339
286
|
declare class AXUploaderService {
|
|
340
|
-
|
|
287
|
+
/**
|
|
288
|
+
* Translation service for localized text.
|
|
289
|
+
* @ignore
|
|
290
|
+
*/
|
|
291
|
+
private translateService;
|
|
292
|
+
/**
|
|
293
|
+
* File service for file operations.
|
|
294
|
+
* @ignore
|
|
295
|
+
*/
|
|
296
|
+
private fileService;
|
|
297
|
+
/**
|
|
298
|
+
* Behavior subject for managing upload requests.
|
|
299
|
+
* @ignore
|
|
300
|
+
*/
|
|
341
301
|
private readonly _files$;
|
|
302
|
+
/**
|
|
303
|
+
* Gets the files behavior subject for observing upload requests.
|
|
304
|
+
*/
|
|
342
305
|
readonly files: rxjs.Observable<AXUploadRequest[]>;
|
|
306
|
+
/**
|
|
307
|
+
* Subject for file upload start events.
|
|
308
|
+
*/
|
|
343
309
|
readonly onFileUploadStart: Subject<AXUploaderFileStartEvent>;
|
|
310
|
+
/**
|
|
311
|
+
* Subject for file upload complete events.
|
|
312
|
+
*/
|
|
344
313
|
readonly onFileUploadComplete: Subject<AXUploaderFileCompleteEvent>;
|
|
314
|
+
/**
|
|
315
|
+
* Subject for all files upload complete events.
|
|
316
|
+
*/
|
|
345
317
|
readonly onFilesUploadComplete: Subject<AXUploaderFilesCompleteEvent>;
|
|
318
|
+
/**
|
|
319
|
+
* Subject for file upload canceled events.
|
|
320
|
+
*/
|
|
346
321
|
readonly onFileUploadCanceled: Subject<AXUploaderFileCancelEvent>;
|
|
347
|
-
/**
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
readonly
|
|
351
|
-
/**
|
|
352
|
-
|
|
322
|
+
/**
|
|
323
|
+
* Signal indicating if any upload has determined progress.
|
|
324
|
+
*/
|
|
325
|
+
readonly isAnyDetermined: _angular_core.Signal<boolean>;
|
|
326
|
+
/**
|
|
327
|
+
* Observable for total estimated upload time.
|
|
328
|
+
*/
|
|
353
329
|
readonly totalEstimateTime: rxjs.Observable<number>;
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
private
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
*
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
330
|
+
/**
|
|
331
|
+
* Converts a File object to an AXUploadRequest.
|
|
332
|
+
* @private
|
|
333
|
+
*/
|
|
334
|
+
private convertFileToRequest;
|
|
335
|
+
/**
|
|
336
|
+
* Starts uploading files that are in 'new' status.
|
|
337
|
+
* @private
|
|
338
|
+
*/
|
|
339
|
+
private startUpload;
|
|
340
|
+
/**
|
|
341
|
+
* Binds event handlers to an upload request.
|
|
342
|
+
* @private
|
|
343
|
+
*/
|
|
344
|
+
private bindEvents;
|
|
345
|
+
/**
|
|
346
|
+
* Opens the file browser dialog and returns selected files as upload requests.
|
|
347
|
+
* @param options - Configuration options for file selection
|
|
348
|
+
* @returns Promise that resolves to an array of upload requests
|
|
349
|
+
*/
|
|
350
|
+
browse(options?: {
|
|
351
|
+
multiple?: boolean;
|
|
352
|
+
accept?: string;
|
|
353
|
+
}): Promise<AXUploadRequest[]>;
|
|
354
|
+
/**
|
|
355
|
+
* Adds files to the upload queue and starts the upload process.
|
|
356
|
+
* @param files - Files to add to the upload queue
|
|
357
|
+
* @returns Promise that resolves to an array of upload requests
|
|
358
|
+
*/
|
|
359
|
+
add(files: FileList | File[]): Promise<AXUploadRequest[]>;
|
|
360
|
+
/**
|
|
361
|
+
* Cancels all pending and in-progress uploads.
|
|
362
|
+
*/
|
|
377
363
|
cancelAll(): Promise<void>;
|
|
364
|
+
/**
|
|
365
|
+
* Clears all completed uploads from the queue.
|
|
366
|
+
*/
|
|
378
367
|
clearAll(): void;
|
|
368
|
+
/**
|
|
369
|
+
* Removes a specific upload request from the queue.
|
|
370
|
+
* @param item - The upload request to remove
|
|
371
|
+
*/
|
|
379
372
|
remove(item: AXUploadRequest): void;
|
|
380
|
-
private startUpload;
|
|
381
|
-
private bindEvents;
|
|
382
|
-
private applyFileTypeValidation;
|
|
383
373
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXUploaderService, never>;
|
|
384
374
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXUploaderService>;
|
|
385
375
|
}
|
|
386
376
|
|
|
387
377
|
export { AXUploadRequest, AXUploaderBrowseDirective, AXUploaderService, AXUploaderZoneDirective };
|
|
388
|
-
export type {
|
|
378
|
+
export type { AXUploadStatus, AXUploaderChangedEvent, AXUploaderFileCancelEvent, AXUploaderFileCompleteEvent, AXUploaderFileStartEvent, AXUploaderFilesCompleteEvent };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|