@acorex/components 22.3.6 → 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
|
*
|
|
@@ -203,14 +276,16 @@ declare class AXPopupHostComponent extends NXComponent {
|
|
|
203
276
|
* @category Components
|
|
204
277
|
*/
|
|
205
278
|
declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDestroy {
|
|
279
|
+
#private;
|
|
206
280
|
private _zone;
|
|
207
281
|
private loadingService;
|
|
208
282
|
private _platform;
|
|
209
|
-
private componentService;
|
|
210
283
|
private document;
|
|
211
284
|
private contentContainerRef;
|
|
212
285
|
private contentContainerEl;
|
|
286
|
+
private dragDir;
|
|
213
287
|
private popupEl;
|
|
288
|
+
private projectedHandles;
|
|
214
289
|
readonly __content__: _angular_core.InputSignal<AXPopupContentType>;
|
|
215
290
|
readonly __config__: _angular_core.InputSignal<AXPopupConfig>;
|
|
216
291
|
readonly __popupRef__: _angular_core.InputSignal<AXPopupRef<any>>;
|
|
@@ -244,6 +319,7 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
244
319
|
protected fullScreenState: _angular_core.WritableSignal<boolean>;
|
|
245
320
|
protected minimizeLeft: _angular_core.WritableSignal<string>;
|
|
246
321
|
protected minimizeRight: _angular_core.WritableSignal<string>;
|
|
322
|
+
protected readonly minimizeSide: _angular_core.Signal<_acorex_components_popup.AXPopupMinimizePosition>;
|
|
247
323
|
private fullscreenChangeHandler;
|
|
248
324
|
protected closeEnabled: () => boolean;
|
|
249
325
|
protected maximizeEnabled: () => boolean;
|
|
@@ -255,6 +331,7 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
255
331
|
private renderContent;
|
|
256
332
|
/** @ignore */
|
|
257
333
|
private handleContentRendered;
|
|
334
|
+
private bindContentDragHandles;
|
|
258
335
|
/** @ignore */
|
|
259
336
|
onKeydownHandler(): void;
|
|
260
337
|
/** @ignore */
|
|
@@ -270,7 +347,7 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
270
347
|
*/
|
|
271
348
|
close(data?: unknown): void;
|
|
272
349
|
/**
|
|
273
|
-
* Minimizes the popup
|
|
350
|
+
* Minimizes the popup. Routes through the popup ref so a registered dock can host the tab.
|
|
274
351
|
*/
|
|
275
352
|
minimize(): void;
|
|
276
353
|
/**
|
|
@@ -281,6 +358,27 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
281
358
|
* Restores the popup from minimized or fullscreen state.
|
|
282
359
|
*/
|
|
283
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;
|
|
284
382
|
/**
|
|
285
383
|
* Sets inputs on the content component.
|
|
286
384
|
*/
|
|
@@ -295,7 +393,7 @@ declare class AXPopupComponent extends MXBaseComponent implements OnInit, OnDest
|
|
|
295
393
|
|
|
296
394
|
declare class AXPopupModule {
|
|
297
395
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPopupModule, never>;
|
|
298
|
-
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]>;
|
|
299
397
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXPopupModule>;
|
|
300
398
|
}
|
|
301
399
|
|
|
@@ -307,6 +405,9 @@ declare class AXPopupModule {
|
|
|
307
405
|
declare class AXPopupService {
|
|
308
406
|
private popupList;
|
|
309
407
|
private overlayService;
|
|
408
|
+
private injector;
|
|
409
|
+
private dockCounts;
|
|
410
|
+
private minimizedByDock;
|
|
310
411
|
/**
|
|
311
412
|
* Open popup 1
|
|
312
413
|
*/
|
|
@@ -319,38 +420,33 @@ declare class AXPopupService {
|
|
|
319
420
|
* Opens a popup and returns a mutable reference (for host components and advanced control).
|
|
320
421
|
*/
|
|
321
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;
|
|
322
428
|
private mergeConfig;
|
|
323
429
|
/**
|
|
324
430
|
* Opens a popup with the specified content and configuration.
|
|
325
431
|
*/
|
|
326
432
|
private openInternal;
|
|
327
|
-
/**
|
|
328
|
-
* Closes a popup by its ID.
|
|
329
|
-
*/
|
|
330
433
|
close<TResult = any>(id: number, data?: TResult): void;
|
|
331
|
-
/**
|
|
332
|
-
* Sets input values for a popup by its ID.
|
|
333
|
-
*/
|
|
334
434
|
setInputs(id: number, values: AXComponentInputs): void;
|
|
335
|
-
/**
|
|
336
|
-
* Sets the title for a popup by its ID.
|
|
337
|
-
*/
|
|
338
435
|
setTitle(id: number, title: string): void;
|
|
339
436
|
minimize(id: number): void;
|
|
340
437
|
maximize(id: number): void;
|
|
341
438
|
restore(id: number): void;
|
|
342
|
-
/**
|
|
343
|
-
* Gets the index of a popup in the open stack (used for minimized bar positioning).
|
|
344
|
-
*/
|
|
345
439
|
getMapIndexOf(targetKey: number): number;
|
|
346
|
-
/**
|
|
347
|
-
* Brings a popup to the front of all other overlays.
|
|
348
|
-
*/
|
|
349
440
|
bringToFront(id: number): void;
|
|
441
|
+
markMaximized(id: number, maximized: boolean): void;
|
|
442
|
+
private addToDock;
|
|
443
|
+
private removeFromDock;
|
|
444
|
+
private setOverlayVisible;
|
|
445
|
+
private toDockItem;
|
|
350
446
|
private getPopupInstance;
|
|
351
447
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPopupService, never>;
|
|
352
448
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
|
|
353
449
|
}
|
|
354
450
|
|
|
355
|
-
export { AXPopupComponent, AXPopupComponentBase, AXPopupFooterComponent, AXPopupHostComponent, AXPopupModule, AXPopupService, AX_POPUP_DEFAULT_RESIZE_HANDLES, resolvePopupCloseButton, resolvePopupMaximizable, resolvePopupMinimize, resolvePopupResizable };
|
|
356
|
-
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 };
|