@acorex/components 22.3.7 → 22.3.8
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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, ViewContainerRef, StaticProvider, ElementRef, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { TemplateRef, ViewContainerRef, StaticProvider, Signal, ElementRef, OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import * as i2 from '@acorex/cdk/common';
|
|
4
4
|
import { NXComponent, MXBaseComponent, AXComponentClosedPromise } from '@acorex/cdk/common';
|
|
5
|
-
import {
|
|
5
|
+
import { AXDropListDroppedEvent } from '@acorex/cdk/drag-drop';
|
|
6
6
|
import { AXResizeHandle } from '@acorex/cdk/resizable';
|
|
7
7
|
import { AXOverlayAnimation } from '@acorex/cdk/overlay';
|
|
8
|
+
import { AXComponentType, AXComponentInputs } from '@acorex/core/components';
|
|
8
9
|
import { Subject } from 'rxjs';
|
|
9
10
|
import * as _acorex_components_popup from '@acorex/components/popup';
|
|
10
11
|
import * as i1 from '@angular/common';
|
|
@@ -12,18 +13,30 @@ import * as i3 from '@acorex/components/button';
|
|
|
12
13
|
import * as i4 from '@acorex/components/decorators';
|
|
13
14
|
import * as i5 from '@acorex/core/translation';
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
type AXPopupCaptionIconName = 'minimize' | 'maximize' | 'restore' | 'close';
|
|
17
|
+
/**
|
|
18
|
+
* Windows-style window caption glyphs: minimize, maximize, restore, close.
|
|
19
|
+
*/
|
|
20
|
+
declare class AXPopupCaptionIconComponent {
|
|
21
|
+
name: _angular_core.InputSignal<AXPopupCaptionIconName>;
|
|
22
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPopupCaptionIconComponent, never>;
|
|
23
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPopupCaptionIconComponent, "ax-popup-caption-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
18
24
|
}
|
|
19
25
|
|
|
20
26
|
type AXPopupContentType = TemplateRef<unknown> | AXComponentType<unknown> | HTMLElement;
|
|
21
27
|
type AXPopupSizeType = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | 'fit';
|
|
22
28
|
type AXPopupMinimizePosition = 'bottom-right' | 'bottom-left';
|
|
29
|
+
type AXPopupWindowState = 'normal' | 'minimized' | 'maximized';
|
|
23
30
|
interface AXPopupButtonsConfig {
|
|
24
31
|
minimize?: {
|
|
25
32
|
enable: boolean;
|
|
26
33
|
position: AXPopupMinimizePosition;
|
|
34
|
+
/**
|
|
35
|
+
* Name of an `<ax-popup-dock>` that should host this popup when minimized.
|
|
36
|
+
* Falls back to the built-in bottom bar when no matching dock is registered.
|
|
37
|
+
* @defaultValue 'default'
|
|
38
|
+
*/
|
|
39
|
+
dock?: string;
|
|
27
40
|
};
|
|
28
41
|
maximize?: boolean;
|
|
29
42
|
close?: boolean;
|
|
@@ -116,6 +129,15 @@ interface AXPopupData {
|
|
|
116
129
|
draggable: boolean;
|
|
117
130
|
content: AXPopupContentType;
|
|
118
131
|
}
|
|
132
|
+
interface AXPopupDockItem {
|
|
133
|
+
id: number;
|
|
134
|
+
title: Signal<string>;
|
|
135
|
+
data: unknown;
|
|
136
|
+
ref: AXPopupRef;
|
|
137
|
+
restore: () => void;
|
|
138
|
+
maximize: () => void;
|
|
139
|
+
close: () => void;
|
|
140
|
+
}
|
|
119
141
|
interface AXPopupRef<TResult = any> {
|
|
120
142
|
close: (data?: TResult) => void;
|
|
121
143
|
setInputs: (values: AXComponentInputs) => void;
|
|
@@ -126,13 +148,24 @@ interface AXPopupRef<TResult = any> {
|
|
|
126
148
|
/** Brings this popup to the front of all other overlays */
|
|
127
149
|
bringToFront: () => void;
|
|
128
150
|
onClose: Subject<TResult>;
|
|
151
|
+
onStateChange: Subject<AXPopupWindowState>;
|
|
152
|
+
readonly state: Signal<AXPopupWindowState>;
|
|
153
|
+
readonly title: Signal<string>;
|
|
154
|
+
readonly isMinimized: Signal<boolean>;
|
|
155
|
+
readonly isMaximized: Signal<boolean>;
|
|
129
156
|
/** The component instance rendered inside the popup (available after content is rendered) */
|
|
130
157
|
componentInstance?: unknown;
|
|
131
158
|
/** @internal Stack index among open popups (minimized bar positioning). */
|
|
132
159
|
_getStackIndex?: () => number;
|
|
160
|
+
/** @internal */
|
|
161
|
+
_setState?: (state: AXPopupWindowState) => void;
|
|
133
162
|
}
|
|
134
163
|
declare abstract class AXPopupComponentBase {
|
|
135
164
|
__popup__: _angular_core.InputSignal<AXPopupRef<any>>;
|
|
165
|
+
readonly popupState: Signal<AXPopupWindowState>;
|
|
166
|
+
readonly isMinimized: Signal<boolean>;
|
|
167
|
+
readonly isMaximized: Signal<boolean>;
|
|
168
|
+
readonly popupTitle: Signal<string>;
|
|
136
169
|
close(data?: any): void;
|
|
137
170
|
setTitle(title: string): void;
|
|
138
171
|
minimize(): void;
|
|
@@ -150,10 +183,50 @@ declare function resolvePopupMaximizable(config?: AXPopupConfig | null): boolean
|
|
|
150
183
|
declare function resolvePopupMinimize(config?: AXPopupConfig | null): {
|
|
151
184
|
enable: boolean;
|
|
152
185
|
position: AXPopupMinimizePosition;
|
|
186
|
+
dock: string;
|
|
153
187
|
};
|
|
154
188
|
/** Resolves resize config. Disabled for `size: 'full'` and when `resizable` is false/omitted. */
|
|
155
189
|
declare function resolvePopupResizable(config?: AXPopupConfig | null): AXPopupResolvedResizableConfig;
|
|
156
190
|
|
|
191
|
+
/**
|
|
192
|
+
* Page-hosted dock for minimized popups. Place it anywhere in the app; matching
|
|
193
|
+
* `buttons.minimize.dock` names send hidden windows here as reorderable tabs.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```html
|
|
197
|
+
* <ax-popup-dock name="taskbar">
|
|
198
|
+
* <ng-template let-item>
|
|
199
|
+
* <button axDragHandle (click)="item.restore()">{{ item.title() }}</button>
|
|
200
|
+
* <button (click)="item.close()">Close</button>
|
|
201
|
+
* </ng-template>
|
|
202
|
+
* </ax-popup-dock>
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
declare class AXPopupDockComponent extends NXComponent {
|
|
206
|
+
private popupService;
|
|
207
|
+
/**
|
|
208
|
+
* Dock name matched against `buttons.minimize.dock`.
|
|
209
|
+
* @defaultValue 'default'
|
|
210
|
+
*/
|
|
211
|
+
name: _angular_core.InputSignal<string>;
|
|
212
|
+
/**
|
|
213
|
+
* Layout of the tab strip.
|
|
214
|
+
* @defaultValue 'horizontal'
|
|
215
|
+
*/
|
|
216
|
+
orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
217
|
+
protected itemTemplate: _angular_core.Signal<TemplateRef<any>>;
|
|
218
|
+
protected items: _angular_core.Signal<AXPopupDockItem[]>;
|
|
219
|
+
constructor();
|
|
220
|
+
protected onDropped(event: AXDropListDroppedEvent): void;
|
|
221
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPopupDockComponent, never>;
|
|
222
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPopupDockComponent, "ax-popup-dock", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, ["itemTemplate"], never, true, never>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare class AXPopupFooterComponent {
|
|
226
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPopupFooterComponent, never>;
|
|
227
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPopupFooterComponent, "ax-popup-footer", never, {}, {}, never, ["ax-prefix", "ax-suffix", "*"], true, never>;
|
|
228
|
+
}
|
|
229
|
+
|
|
157
230
|
/**
|
|
158
231
|
* Declarative popup host. Project content and call `open()` / `close()` on the component instance.
|
|
159
232
|
*
|
|
@@ -246,6 +319,7 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
246
319
|
protected fullScreenState: _angular_core.WritableSignal<boolean>;
|
|
247
320
|
protected minimizeLeft: _angular_core.WritableSignal<string>;
|
|
248
321
|
protected minimizeRight: _angular_core.WritableSignal<string>;
|
|
322
|
+
protected readonly minimizeSide: _angular_core.Signal<_acorex_components_popup.AXPopupMinimizePosition>;
|
|
249
323
|
private fullscreenChangeHandler;
|
|
250
324
|
protected closeEnabled: () => boolean;
|
|
251
325
|
protected maximizeEnabled: () => boolean;
|
|
@@ -273,7 +347,7 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
273
347
|
*/
|
|
274
348
|
close(data?: unknown): void;
|
|
275
349
|
/**
|
|
276
|
-
* Minimizes the popup
|
|
350
|
+
* Minimizes the popup. Routes through the popup ref so a registered dock can host the tab.
|
|
277
351
|
*/
|
|
278
352
|
minimize(): void;
|
|
279
353
|
/**
|
|
@@ -284,6 +358,27 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
284
358
|
* Restores the popup from minimized or fullscreen state.
|
|
285
359
|
*/
|
|
286
360
|
restore(): void;
|
|
361
|
+
/**
|
|
362
|
+
* Applies the minimized visual. When `docked` is true the overlay is hidden by the service
|
|
363
|
+
* and the window stays at normal size for the next restore.
|
|
364
|
+
* @internal
|
|
365
|
+
*/
|
|
366
|
+
enterMinimized(docked: boolean): void;
|
|
367
|
+
/**
|
|
368
|
+
* Restores the window from the legacy bottom bar.
|
|
369
|
+
* @internal
|
|
370
|
+
*/
|
|
371
|
+
exitMinimized(): void;
|
|
372
|
+
/**
|
|
373
|
+
* Enters or toggles the Fullscreen API on the popup element.
|
|
374
|
+
* @internal
|
|
375
|
+
*/
|
|
376
|
+
enterMaximized(): void;
|
|
377
|
+
/**
|
|
378
|
+
* Leaves fullscreen.
|
|
379
|
+
* @internal
|
|
380
|
+
*/
|
|
381
|
+
exitMaximized(): void;
|
|
287
382
|
/**
|
|
288
383
|
* Sets inputs on the content component.
|
|
289
384
|
*/
|
|
@@ -298,7 +393,7 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
298
393
|
|
|
299
394
|
declare class AXPopupModule {
|
|
300
395
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPopupModule, never>;
|
|
301
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXPopupModule, never, [typeof i1.CommonModule, typeof i2.AXCommonModule, typeof i3.AXButtonModule, typeof i4.AXDecoratorModule, typeof i5.AXTranslationModule, typeof AXPopupComponent, typeof AXPopupHostComponent, typeof AXPopupFooterComponent], [typeof AXPopupComponent, typeof AXPopupHostComponent, typeof AXPopupFooterComponent]>;
|
|
396
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXPopupModule, never, [typeof i1.CommonModule, typeof i2.AXCommonModule, typeof i3.AXButtonModule, typeof i4.AXDecoratorModule, typeof i5.AXTranslationModule, typeof AXPopupComponent, typeof AXPopupHostComponent, typeof AXPopupFooterComponent, typeof AXPopupDockComponent, typeof AXPopupCaptionIconComponent], [typeof AXPopupComponent, typeof AXPopupHostComponent, typeof AXPopupFooterComponent, typeof AXPopupDockComponent, typeof AXPopupCaptionIconComponent]>;
|
|
302
397
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXPopupModule>;
|
|
303
398
|
}
|
|
304
399
|
|
|
@@ -310,6 +405,9 @@ declare class AXPopupModule {
|
|
|
310
405
|
declare class AXPopupService {
|
|
311
406
|
private popupList;
|
|
312
407
|
private overlayService;
|
|
408
|
+
private injector;
|
|
409
|
+
private dockCounts;
|
|
410
|
+
private minimizedByDock;
|
|
313
411
|
/**
|
|
314
412
|
* Open popup 1
|
|
315
413
|
*/
|
|
@@ -322,38 +420,33 @@ declare class AXPopupService {
|
|
|
322
420
|
* Opens a popup and returns a mutable reference (for host components and advanced control).
|
|
323
421
|
*/
|
|
324
422
|
openRef<TResult = any>(content: AXPopupContentType, config?: AXPopupConfig): Promise<AXPopupRef<TResult>>;
|
|
423
|
+
hasDock(name: string): boolean;
|
|
424
|
+
registerDock(name: string): void;
|
|
425
|
+
unregisterDock(name: string): void;
|
|
426
|
+
minimizedInDock(dock: string): AXPopupDockItem[];
|
|
427
|
+
reorderMinimized(dock: string, fromIndex: number, toIndex: number): void;
|
|
325
428
|
private mergeConfig;
|
|
326
429
|
/**
|
|
327
430
|
* Opens a popup with the specified content and configuration.
|
|
328
431
|
*/
|
|
329
432
|
private openInternal;
|
|
330
|
-
/**
|
|
331
|
-
* Closes a popup by its ID.
|
|
332
|
-
*/
|
|
333
433
|
close<TResult = any>(id: number, data?: TResult): void;
|
|
334
|
-
/**
|
|
335
|
-
* Sets input values for a popup by its ID.
|
|
336
|
-
*/
|
|
337
434
|
setInputs(id: number, values: AXComponentInputs): void;
|
|
338
|
-
/**
|
|
339
|
-
* Sets the title for a popup by its ID.
|
|
340
|
-
*/
|
|
341
435
|
setTitle(id: number, title: string): void;
|
|
342
436
|
minimize(id: number): void;
|
|
343
437
|
maximize(id: number): void;
|
|
344
438
|
restore(id: number): void;
|
|
345
|
-
/**
|
|
346
|
-
* Gets the index of a popup in the open stack (used for minimized bar positioning).
|
|
347
|
-
*/
|
|
348
439
|
getMapIndexOf(targetKey: number): number;
|
|
349
|
-
/**
|
|
350
|
-
* Brings a popup to the front of all other overlays.
|
|
351
|
-
*/
|
|
352
440
|
bringToFront(id: number): void;
|
|
441
|
+
markMaximized(id: number, maximized: boolean): void;
|
|
442
|
+
private addToDock;
|
|
443
|
+
private removeFromDock;
|
|
444
|
+
private setOverlayVisible;
|
|
445
|
+
private toDockItem;
|
|
353
446
|
private getPopupInstance;
|
|
354
447
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPopupService, never>;
|
|
355
448
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
|
|
356
449
|
}
|
|
357
450
|
|
|
358
|
-
export { AXPopupComponent, AXPopupComponentBase, AXPopupFooterComponent, AXPopupHostComponent, AXPopupModule, AXPopupService, AX_POPUP_DEFAULT_RESIZE_HANDLES, resolvePopupCloseButton, resolvePopupMaximizable, resolvePopupMinimize, resolvePopupResizable };
|
|
359
|
-
export type { AXPopupButtonsConfig, AXPopupConfig, AXPopupContentType, AXPopupData, AXPopupMinimizePosition, AXPopupRef, AXPopupResizableConfig, AXPopupResolvedResizableConfig, AXPopupSizeType };
|
|
451
|
+
export { AXPopupCaptionIconComponent, AXPopupComponent, AXPopupComponentBase, AXPopupDockComponent, AXPopupFooterComponent, AXPopupHostComponent, AXPopupModule, AXPopupService, AX_POPUP_DEFAULT_RESIZE_HANDLES, resolvePopupCloseButton, resolvePopupMaximizable, resolvePopupMinimize, resolvePopupResizable };
|
|
452
|
+
export type { AXPopupButtonsConfig, AXPopupCaptionIconName, AXPopupConfig, AXPopupContentType, AXPopupData, AXPopupDockItem, AXPopupMinimizePosition, AXPopupRef, AXPopupResizableConfig, AXPopupResolvedResizableConfig, AXPopupSizeType, AXPopupWindowState };
|