@acorex/components 22.0.0-next.5 → 22.0.0-next.7
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/datetime-text-box/README.md +3 -0
- package/fesm2022/acorex-components-datetime-text-box.mjs +632 -0
- package/fesm2022/acorex-components-datetime-text-box.mjs.map +1 -0
- package/fesm2022/acorex-components-file-viewer.mjs +368 -107
- package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
- package/package.json +7 -3
- package/types/acorex-components-datetime-text-box.d.ts +142 -0
- package/types/acorex-components-file-viewer.d.ts +146 -17
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { AXComponentContent, AXComponentInputs } from '@acorex/core/components';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
+
import { OnDestroy, TemplateRef, Type, Provider } from '@angular/core';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import * as dist_packages_core_types_acorex_core_components from 'dist/packages/core/types/acorex-core-components';
|
|
6
|
+
import { AXStyleColorType, AXComponentClosedPromise } from '@acorex/cdk/common';
|
|
3
7
|
import * as _acorex_core_file from '@acorex/core/file';
|
|
4
8
|
import { AXFileTypeExtensionHint, AXFileType, AXFileTypeViewComponent } from '@acorex/core/file';
|
|
5
|
-
import { AXStyleColorType } from '@acorex/cdk/common';
|
|
6
9
|
import { SafeResourceUrl } from '@angular/platform-browser';
|
|
7
10
|
|
|
8
11
|
/** Single item displayed in a file-viewer carousel. */
|
|
@@ -24,6 +27,18 @@ interface AXFileViewerViewPayload {
|
|
|
24
27
|
index: number;
|
|
25
28
|
active: boolean;
|
|
26
29
|
}
|
|
30
|
+
/** Component or template rendered in the file-viewer header center slot. */
|
|
31
|
+
type AXFileViewerHeaderContent = AXComponentContent;
|
|
32
|
+
/** Inputs passed to {@link AXFileViewerHeaderContent} when it is a component. */
|
|
33
|
+
type AXFileViewerHeaderContentInputs = AXComponentInputs;
|
|
34
|
+
/** Placeholder component or template shown in the center when {@link AXFileViewerHeaderContent} is omitted. */
|
|
35
|
+
type AXFileViewerHeaderPlaceholderContent = AXComponentContent;
|
|
36
|
+
/** Inputs passed to the header placeholder when it is a component. */
|
|
37
|
+
type AXFileViewerHeaderPlaceholderInputs = AXComponentInputs;
|
|
38
|
+
/** Component or template rendered instead of the built-in fallback viewer for `file` type items. */
|
|
39
|
+
type AXFileViewerFallbackContent = AXComponentContent;
|
|
40
|
+
/** Inputs passed to {@link AXFileViewerFallbackContent} when it is a component. */
|
|
41
|
+
type AXFileViewerFallbackContentInputs = AXComponentInputs;
|
|
27
42
|
|
|
28
43
|
/** Carousel state shared between container, slides and thumbnails. Provided per-container. */
|
|
29
44
|
declare class AXFileViewerService {
|
|
@@ -36,34 +51,47 @@ declare class AXFileViewerService {
|
|
|
36
51
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXFileViewerService>;
|
|
37
52
|
}
|
|
38
53
|
|
|
39
|
-
/** Registers file-viewer components on standard file-type catalog entries. */
|
|
40
|
-
declare function provideFileViewer(): Provider[];
|
|
41
|
-
|
|
42
54
|
/** Infers a file-type catalog name from the item. */
|
|
43
55
|
declare function resolveFileViewerFileType(item: AXFileViewerItem): string;
|
|
44
56
|
/** Builds an extension hint from item metadata. */
|
|
45
57
|
declare function buildFileViewerExtensionHint(item: AXFileViewerItem): AXFileTypeExtensionHint | undefined;
|
|
46
58
|
|
|
47
|
-
declare function createFileViewerFileTypes(): AXFileType[];
|
|
48
|
-
|
|
49
59
|
declare class AXFileViewerContainerComponent implements OnDestroy {
|
|
50
60
|
#private;
|
|
51
61
|
readonly items: _angular_core.InputSignal<AXFileViewerItem[]>;
|
|
62
|
+
readonly startIndex: _angular_core.InputSignal<number>;
|
|
52
63
|
readonly thumbnail: _angular_core.InputSignal<boolean>;
|
|
53
64
|
readonly pagination: _angular_core.InputSignal<boolean>;
|
|
54
65
|
readonly download: _angular_core.InputSignal<boolean>;
|
|
55
66
|
readonly fullscreen: _angular_core.InputSignal<boolean>;
|
|
67
|
+
/** When true, opens in a gallery overlay and closes when fullscreen exits. */
|
|
68
|
+
readonly galleryMode: _angular_core.InputSignal<boolean>;
|
|
69
|
+
/** Component or template rendered in the header center slot. */
|
|
70
|
+
readonly headerContent: _angular_core.InputSignal<AXFileViewerHeaderContent>;
|
|
71
|
+
/** Inputs for {@link headerContent} when it is a component. */
|
|
72
|
+
readonly headerContentInputs: _angular_core.InputSignal<dist_packages_core_types_acorex_core_components.AXComponentInputs>;
|
|
73
|
+
/** Context data exposed as `$implicit` to header templates. */
|
|
74
|
+
readonly headerContentData: _angular_core.InputSignal<unknown>;
|
|
75
|
+
/** Custom placeholder when {@link headerContent} is omitted. */
|
|
76
|
+
readonly headerContentPlaceholder: _angular_core.InputSignal<AXFileViewerHeaderPlaceholderContent>;
|
|
77
|
+
/** Inputs for {@link headerContentPlaceholder} when it is a component. */
|
|
78
|
+
readonly headerContentPlaceholderInputs: _angular_core.InputSignal<dist_packages_core_types_acorex_core_components.AXComponentInputs>;
|
|
79
|
+
/** Component or template replacing the built-in fallback viewer for `file` type items. */
|
|
80
|
+
readonly fallbackContent: _angular_core.InputSignal<AXFileViewerFallbackContent>;
|
|
81
|
+
/** Inputs for {@link fallbackContent} when it is a component. */
|
|
82
|
+
readonly fallbackContentInputs: _angular_core.InputSignal<dist_packages_core_types_acorex_core_components.AXComponentInputs>;
|
|
83
|
+
/** Context data exposed as `$implicit` to fallback templates. */
|
|
84
|
+
readonly fallbackContentData: _angular_core.InputSignal<unknown>;
|
|
56
85
|
/** External loading flag — show overlay while parent data is being fetched. */
|
|
57
86
|
readonly loading: _angular_core.InputSignal<boolean>;
|
|
87
|
+
readonly fullscreenClosed: _angular_core.OutputEmitterRef<void>;
|
|
58
88
|
readonly service: AXFileViewerService;
|
|
59
89
|
private readonly host;
|
|
60
|
-
private readonly zIndexService;
|
|
61
90
|
private readonly fullScreenService;
|
|
62
91
|
private readonly mainCarouselRef;
|
|
63
92
|
private readonly thumbCarouselRef;
|
|
64
|
-
readonly fullscreenActive: _angular_core.WritableSignal<boolean>;
|
|
65
|
-
private zToken;
|
|
66
93
|
private initToken;
|
|
94
|
+
readonly isFullscreenActive: _angular_core.WritableSignal<boolean>;
|
|
67
95
|
/** True while carousels are being (re)initialized. */
|
|
68
96
|
readonly initializing: _angular_core.WritableSignal<boolean>;
|
|
69
97
|
readonly isBusy: _angular_core.Signal<boolean>;
|
|
@@ -74,34 +102,135 @@ declare class AXFileViewerContainerComponent implements OnDestroy {
|
|
|
74
102
|
readonly currentTypeLabel: _angular_core.Signal<string>;
|
|
75
103
|
readonly currentTypeColor: _angular_core.Signal<AXStyleColorType>;
|
|
76
104
|
readonly slideCounter: _angular_core.Signal<string>;
|
|
105
|
+
readonly headerTemplateContent: _angular_core.Signal<TemplateRef<any>>;
|
|
106
|
+
readonly headerComponentContent: _angular_core.Signal<Type<unknown>>;
|
|
107
|
+
readonly headerPlaceholderTemplateContent: _angular_core.Signal<TemplateRef<any>>;
|
|
108
|
+
readonly headerPlaceholderComponentContent: _angular_core.Signal<Type<unknown>>;
|
|
109
|
+
readonly hasHeaderCenterContent: _angular_core.Signal<boolean>;
|
|
110
|
+
readonly headerContentContext: _angular_core.Signal<{
|
|
111
|
+
$implicit: unknown;
|
|
112
|
+
item: AXFileViewerItem;
|
|
113
|
+
items: AXFileViewerItem[];
|
|
114
|
+
selectedIndex: number;
|
|
115
|
+
slideCounter: string;
|
|
116
|
+
}>;
|
|
77
117
|
readonly resolveFileType: typeof resolveFileViewerFileType;
|
|
78
118
|
resolveTypeLabel(item: AXFileViewerItem): string;
|
|
79
119
|
formatSize(size?: number): string;
|
|
80
120
|
private readonly mainCarouselOptions;
|
|
81
121
|
private readonly thumbnailCarouselOptions;
|
|
82
|
-
|
|
83
|
-
|
|
122
|
+
toggleFullscreen(): void;
|
|
123
|
+
enterFullscreen(): void;
|
|
124
|
+
/** @param emitGalleryClose When false, skips gallery close notification (used during service teardown). */
|
|
125
|
+
exitFullscreen(emitGalleryClose?: boolean): void;
|
|
126
|
+
closeGallery(): void;
|
|
84
127
|
private initCarousels;
|
|
85
128
|
private readonly onSlideChange;
|
|
86
129
|
next(): void;
|
|
87
130
|
prev(): void;
|
|
88
131
|
goToIndex(index: number, speed?: number): void;
|
|
89
|
-
toggleFullscreen(): void;
|
|
90
132
|
downloadCurrent(): Promise<void>;
|
|
91
133
|
ngOnDestroy(): void;
|
|
92
134
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFileViewerContainerComponent, never>;
|
|
93
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerContainerComponent, "ax-file-viewer-container", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "thumbnail": { "alias": "thumbnail"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "download": { "alias": "download"; "required": false; "isSignal": true; }; "fullscreen": { "alias": "fullscreen"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never,
|
|
135
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerContainerComponent, "ax-file-viewer-container", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "startIndex": { "alias": "startIndex"; "required": false; "isSignal": true; }; "thumbnail": { "alias": "thumbnail"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "download": { "alias": "download"; "required": false; "isSignal": true; }; "fullscreen": { "alias": "fullscreen"; "required": false; "isSignal": true; }; "galleryMode": { "alias": "galleryMode"; "required": false; "isSignal": true; }; "headerContent": { "alias": "headerContent"; "required": false; "isSignal": true; }; "headerContentInputs": { "alias": "headerContentInputs"; "required": false; "isSignal": true; }; "headerContentData": { "alias": "headerContentData"; "required": false; "isSignal": true; }; "headerContentPlaceholder": { "alias": "headerContentPlaceholder"; "required": false; "isSignal": true; }; "headerContentPlaceholderInputs": { "alias": "headerContentPlaceholderInputs"; "required": false; "isSignal": true; }; "fallbackContent": { "alias": "fallbackContent"; "required": false; "isSignal": true; }; "fallbackContentInputs": { "alias": "fallbackContentInputs"; "required": false; "isSignal": true; }; "fallbackContentData": { "alias": "fallbackContentData"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "fullscreenClosed": "fullscreenClosed"; }, never, never, true, never>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
interface AXFileViewerGalleryConfig {
|
|
139
|
+
items: AXFileViewerItem[];
|
|
140
|
+
startIndex?: number;
|
|
141
|
+
thumbnail?: boolean;
|
|
142
|
+
download?: boolean;
|
|
143
|
+
loading?: boolean;
|
|
144
|
+
panelClass?: string[];
|
|
145
|
+
headerContent?: AXFileViewerHeaderContent | null;
|
|
146
|
+
headerContentInputs?: AXFileViewerHeaderContentInputs;
|
|
147
|
+
headerContentData?: unknown;
|
|
148
|
+
headerContentPlaceholder?: AXFileViewerHeaderPlaceholderContent | null;
|
|
149
|
+
headerContentPlaceholderInputs?: AXFileViewerHeaderPlaceholderInputs;
|
|
150
|
+
fallbackContent?: AXFileViewerFallbackContent | null;
|
|
151
|
+
fallbackContentInputs?: AXFileViewerFallbackContentInputs;
|
|
152
|
+
fallbackContentData?: unknown;
|
|
153
|
+
}
|
|
154
|
+
interface AXFileViewerGalleryRef<TResult = any> {
|
|
155
|
+
close: (data?: TResult) => void;
|
|
156
|
+
setInputs: (values: AXComponentInputs) => void;
|
|
157
|
+
bringToFront: () => void;
|
|
158
|
+
onClose: Subject<TResult>;
|
|
159
|
+
componentInstance?: AXFileViewerContainerComponent;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** Opens {@link AXFileViewerContainerComponent} in fullscreen gallery mode. */
|
|
163
|
+
declare class AXFileViewerGalleryService {
|
|
164
|
+
private readonly galleryList;
|
|
165
|
+
private readonly overlayService;
|
|
166
|
+
/**
|
|
167
|
+
* Opens a file viewer gallery in fullscreen.
|
|
168
|
+
* @param config - Gallery configuration
|
|
169
|
+
* @returns Promise that resolves when the gallery is closed
|
|
170
|
+
*/
|
|
171
|
+
open(config: AXFileViewerGalleryConfig): AXComponentClosedPromise;
|
|
172
|
+
/**
|
|
173
|
+
* Closes a gallery by its ID.
|
|
174
|
+
* @param id - The gallery ID to close
|
|
175
|
+
* @param data - Optional data to pass to the close event
|
|
176
|
+
*/
|
|
177
|
+
close<TResult = unknown>(id: number, data?: TResult): void;
|
|
178
|
+
/**
|
|
179
|
+
* Sets input values for a gallery by its ID.
|
|
180
|
+
* @param id - The gallery ID
|
|
181
|
+
* @param values - Object containing input values to set
|
|
182
|
+
*/
|
|
183
|
+
setInputs(id: number, values: AXComponentInputs): void;
|
|
184
|
+
/**
|
|
185
|
+
* Brings a gallery to the front of all other overlays.
|
|
186
|
+
* @param id - The gallery ID to bring to front
|
|
187
|
+
*/
|
|
188
|
+
bringToFront(id: number): void;
|
|
189
|
+
private openInternal;
|
|
190
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFileViewerGalleryService, never>;
|
|
191
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXFileViewerGalleryService>;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** Registers file-viewer components on standard file-type catalog entries. */
|
|
195
|
+
declare function provideFileViewer(): Provider[];
|
|
196
|
+
|
|
197
|
+
declare function createFileViewerFileTypes(): AXFileType[];
|
|
198
|
+
|
|
199
|
+
/** Optional center header slot component for use with {@link headerContentPlaceholder}. */
|
|
200
|
+
declare class AXFileViewerHeaderPlaceholderComponent {
|
|
201
|
+
readonly slideCounter: _angular_core.InputSignal<string>;
|
|
202
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFileViewerHeaderPlaceholderComponent, never>;
|
|
203
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerHeaderPlaceholderComponent, "ax-file-viewer-header-placeholder", never, { "slideCounter": { "alias": "slideCounter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
94
204
|
}
|
|
95
205
|
|
|
96
206
|
declare class AXFileViewerSlideComponent {
|
|
97
207
|
readonly item: _angular_core.InputSignal<AXFileViewerItem>;
|
|
98
208
|
readonly index: _angular_core.InputSignal<number>;
|
|
209
|
+
/** Component or template replacing the built-in fallback viewer for `file` type items. */
|
|
210
|
+
readonly fallbackContent: _angular_core.InputSignal<AXFileViewerFallbackContent>;
|
|
211
|
+
/** Inputs for {@link fallbackContent} when it is a component. */
|
|
212
|
+
readonly fallbackContentInputs: _angular_core.InputSignal<dist_packages_core_types_acorex_core_components.AXComponentInputs>;
|
|
213
|
+
/** Context data exposed as `$implicit` to fallback templates. */
|
|
214
|
+
readonly fallbackContentData: _angular_core.InputSignal<unknown>;
|
|
99
215
|
private readonly service;
|
|
100
216
|
readonly fileTypeName: _angular_core.Signal<string>;
|
|
101
217
|
readonly extensionHint: _angular_core.Signal<_acorex_core_file.AXFileTypeExtensionHint>;
|
|
102
218
|
readonly viewPayload: _angular_core.Signal<AXFileViewerViewPayload>;
|
|
219
|
+
readonly fallbackTemplateContent: _angular_core.Signal<TemplateRef<any>>;
|
|
220
|
+
readonly fallbackComponentContent: _angular_core.Signal<Type<unknown>>;
|
|
221
|
+
readonly useCustomFallback: _angular_core.Signal<boolean>;
|
|
222
|
+
readonly fallbackContentContext: _angular_core.Signal<{
|
|
223
|
+
$implicit: unknown;
|
|
224
|
+
payload: AXFileViewerViewPayload;
|
|
225
|
+
item: AXFileViewerItem;
|
|
226
|
+
index: number;
|
|
227
|
+
active: boolean;
|
|
228
|
+
}>;
|
|
229
|
+
readonly fallbackComponentInputs: _angular_core.Signal<{
|
|
230
|
+
payload: AXFileViewerViewPayload;
|
|
231
|
+
}>;
|
|
103
232
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXFileViewerSlideComponent, never>;
|
|
104
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerSlideComponent, "ax-file-viewer-slide", never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
233
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerSlideComponent, "ax-file-viewer-slide", never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": true; "isSignal": true; }; "fallbackContent": { "alias": "fallbackContent"; "required": false; "isSignal": true; }; "fallbackContentInputs": { "alias": "fallbackContentInputs"; "required": false; "isSignal": true; }; "fallbackContentData": { "alias": "fallbackContentData"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
105
234
|
}
|
|
106
235
|
|
|
107
236
|
declare class AXFileViewerThumbPreviewComponent {
|
|
@@ -176,5 +305,5 @@ declare class AXFileViewerFileFallbackComponent implements AXFileTypeViewCompone
|
|
|
176
305
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXFileViewerFileFallbackComponent, "ax-file-viewer-fallback", never, { "payload": { "alias": "payload"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
177
306
|
}
|
|
178
307
|
|
|
179
|
-
export { AXFileViewerAudioComponent, AXFileViewerContainerComponent, AXFileViewerFileFallbackComponent, AXFileViewerImageComponent, AXFileViewerPdfComponent, AXFileViewerService, AXFileViewerSlideComponent, AXFileViewerThumbPreviewComponent, AXFileViewerThumbnailsComponent, AXFileViewerVideoComponent, buildFileViewerExtensionHint, createFileViewerFileTypes, provideFileViewer, resolveFileViewerFileType };
|
|
180
|
-
export type { AXFileViewerItem, AXFileViewerViewPayload };
|
|
308
|
+
export { AXFileViewerAudioComponent, AXFileViewerContainerComponent, AXFileViewerFileFallbackComponent, AXFileViewerGalleryService, AXFileViewerHeaderPlaceholderComponent, AXFileViewerImageComponent, AXFileViewerPdfComponent, AXFileViewerService, AXFileViewerSlideComponent, AXFileViewerThumbPreviewComponent, AXFileViewerThumbnailsComponent, AXFileViewerVideoComponent, buildFileViewerExtensionHint, createFileViewerFileTypes, provideFileViewer, resolveFileViewerFileType };
|
|
309
|
+
export type { AXFileViewerFallbackContent, AXFileViewerFallbackContentInputs, AXFileViewerGalleryConfig, AXFileViewerGalleryRef, AXFileViewerHeaderContent, AXFileViewerHeaderContentInputs, AXFileViewerHeaderPlaceholderContent, AXFileViewerHeaderPlaceholderInputs, AXFileViewerItem, AXFileViewerViewPayload };
|