@nanahoshi/mona-ui 0.27.2 → 0.28.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/docs/api/chart.md +2 -2
- package/docs/api/popup.md +1 -1
- package/docs/api/theme.md +2 -2
- package/docs/chart.md +14 -0
- package/docs/editor.md +2 -0
- package/docs/installation.md +147 -15
- package/docs/introduction.md +37 -15
- package/docs/theming-built-in-themes.md +67 -0
- package/docs/theming-custom-colors.md +274 -0
- package/docs/theming-custom-themes.md +168 -0
- package/docs/theming.md +164 -248
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
- package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
- package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
- package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
- package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
- package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
- package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
- package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
- package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
- package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
- package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
- package/llms.txt +6 -2
- package/package.json +62 -23
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
- package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
- package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
- package/types/nanahoshi-mona-ui-button.d.ts +227 -166
- package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
- package/types/nanahoshi-mona-ui-card.d.ts +125 -111
- package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
- package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
- package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
- package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
- package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
- package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
- package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
- package/types/nanahoshi-mona-ui-command.d.ts +279 -191
- package/types/nanahoshi-mona-ui-common.d.ts +354 -385
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
- package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
- package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
- package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
- package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
- package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
- package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
- package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
- package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
- package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
- package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
- package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
- package/types/nanahoshi-mona-ui-label.d.ts +108 -78
- package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
- package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
- package/types/nanahoshi-mona-ui-list.d.ts +2 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
- package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
- package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
- package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
- package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
- package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
- package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
- package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
- package/types/nanahoshi-mona-ui-query.d.ts +82 -88
- package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
- package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
- package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
- package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
- package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
- package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
- package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
- package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
- package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
- package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
- package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
- package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
- package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
- package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
- package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
- package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
- package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
- package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
- package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
- package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
- package/types/nanahoshi-mona-ui-window.d.ts +494 -399
- package/types/nanahoshi-mona-ui.d.ts +1 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
|
@@ -1,580 +1,718 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Action } from
|
|
5
|
-
import { PreventableEvent } from
|
|
6
|
-
import { Observable } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
get via(): PopupCloseSource | undefined;
|
|
1
|
+
import { ComponentType, ConnectedPosition, ConnectionPositionPair, FlexibleConnectedPositionStrategyOrigin, OverlayRef } from "@angular/cdk/overlay";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ComponentRef, InjectionToken, Injector, OnDestroy, StaticProvider, TemplateRef } from "@angular/core";
|
|
4
|
+
import { Action } from "@nanahoshi/mona-ui/internal";
|
|
5
|
+
import { PreventableEvent } from "@nanahoshi/mona-ui/common";
|
|
6
|
+
import { Observable } from "rxjs";
|
|
7
|
+
export declare class PopupCloseEvent<R = unknown> extends PreventableEvent {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(options?: Partial<PopupCloseEventOptions<R>>);
|
|
10
|
+
/** The result value passed to `close()`, if any. */
|
|
11
|
+
get result(): R | undefined;
|
|
12
|
+
/** The source of the close. */
|
|
13
|
+
get via(): PopupCloseSource | undefined;
|
|
15
14
|
}
|
|
16
15
|
interface PopupCloseEventOptions<R = unknown, E = unknown> {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
event?: E;
|
|
17
|
+
originalEvent: Event;
|
|
18
|
+
result?: R;
|
|
19
|
+
type?: string;
|
|
20
|
+
via?: PopupCloseSource;
|
|
22
21
|
}
|
|
23
|
-
declare enum PopupCloseSource {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
export declare enum PopupCloseSource {
|
|
23
|
+
/** A dialog action button, such as OK or Cancel. */
|
|
24
|
+
Action = "action",
|
|
25
|
+
/** A click on the backdrop, when `closeOnBackdropClick` allows it. */
|
|
26
|
+
BackdropClick = "backdropClick",
|
|
27
|
+
/** The close button of a dialog, window or sheet. */
|
|
28
|
+
CloseButton = "closeButton",
|
|
29
|
+
/** The Escape key. */
|
|
30
|
+
Escape = "escape",
|
|
31
|
+
/** The pointer leaving the anchor, when `closeOnMouseLeave` is set. */
|
|
32
|
+
MouseLeave = "mouseLeave",
|
|
33
|
+
/** A `close()` call from code, with no user interaction behind it. */
|
|
34
|
+
Programmatic = "programmatic",
|
|
35
|
+
/** A pointer press outside the popup and its anchor. */
|
|
36
|
+
OutsideClick = "outsideClick",
|
|
37
|
+
/** The anchor scrolling away, when `closeOnScroll` is set. */
|
|
38
|
+
Scroll = "scroll"
|
|
40
39
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
vertical?: number;
|
|
40
|
+
export interface PopupOffset {
|
|
41
|
+
horizontal?: number;
|
|
42
|
+
vertical?: number;
|
|
45
43
|
}
|
|
46
|
-
|
|
47
44
|
interface PopupRefParams {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
get beforeClose$(): Observable<PopupCloseEvent>;
|
|
46
|
+
close: <R>(result?: R, delay?: number) => boolean;
|
|
47
|
+
get closeStart$(): Observable<PopupCloseEvent>;
|
|
48
|
+
get closed$(): Observable<PopupCloseEvent>;
|
|
49
|
+
get component(): ComponentRef<unknown> | null;
|
|
50
|
+
get opened$(): Observable<void>;
|
|
51
|
+
get overlayRef(): OverlayRef;
|
|
52
|
+
get positionChanges$(): Observable<ConnectionPositionPair>;
|
|
56
53
|
}
|
|
57
|
-
|
|
58
54
|
/** Returned by `PopupService.create()` and emitted via `PopupComponent`'s `open` output. */
|
|
59
|
-
declare class PopupRef {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
55
|
+
export declare class PopupRef {
|
|
56
|
+
#private;
|
|
57
|
+
constructor(options: PopupRefParams);
|
|
58
|
+
/**
|
|
59
|
+
* Requests the popup to close.
|
|
60
|
+
* @param result optional result passed to `beforeClose` and `closed` as the event's `result`
|
|
61
|
+
* @param delay optional delay in milliseconds before the popup is removed, instead of waiting for the
|
|
62
|
+
* leave animation
|
|
63
|
+
* @returns `false` when the close was prevented or the popup is already closing, `true` otherwise.
|
|
64
|
+
*/
|
|
65
|
+
close<R>(result?: R, delay?: number): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Closes the popup after a delay.
|
|
68
|
+
* When the popup is closed, the overlay element is removed from the DOM instantly.
|
|
69
|
+
* This causes the animation of the child elements to not play, therefore,
|
|
70
|
+
* a delay is added to allow the animation to play.
|
|
71
|
+
*
|
|
72
|
+
* @see {@link https://github.com/angular/angular/issues/23302} for more information.
|
|
73
|
+
* @param delay delay in milliseconds
|
|
74
|
+
* @param result optional result to pass to the closed observable
|
|
75
|
+
*/
|
|
76
|
+
closeWithDelay<R>(delay?: number, result?: R): void;
|
|
77
|
+
/**
|
|
78
|
+
* @description Emitted when the popup is about to close.
|
|
79
|
+
* This event can be prevented. If it is prevented, the popup will not close.
|
|
80
|
+
*/
|
|
81
|
+
get beforeClose(): Observable<PopupCloseEvent>;
|
|
82
|
+
/**
|
|
83
|
+
* @description Emitted when the popup begins closing, before the leave animation completes.
|
|
84
|
+
* Subscribe to this to react at the moment the close sequence starts — for example, to begin
|
|
85
|
+
* coordinating a transition in the consuming component. The `closed` observable fires after
|
|
86
|
+
* the leave animation finishes.
|
|
87
|
+
*/
|
|
88
|
+
get closeStart(): Observable<PopupCloseEvent>;
|
|
89
|
+
/**
|
|
90
|
+
* @description Emitted when the popup is closed.
|
|
91
|
+
* This event is emitted after the animation completes.
|
|
92
|
+
* Preventing this event has no effect.
|
|
93
|
+
*/
|
|
94
|
+
get closed(): Observable<PopupCloseEvent>;
|
|
95
|
+
/**
|
|
96
|
+
* @description Reference to the component hosted in the popup.
|
|
97
|
+
* This is `null` if the popup does not contain a component.
|
|
98
|
+
*/
|
|
99
|
+
get component(): ComponentRef<unknown> | null;
|
|
100
|
+
/**
|
|
101
|
+
* @description Emitted when the popup is opened.
|
|
102
|
+
*/
|
|
103
|
+
get opened(): Observable<void>;
|
|
104
|
+
/**
|
|
105
|
+
* @description Reference to the underlying CDK overlay.
|
|
106
|
+
* Use this reference to manipulate the overlay directly, such as to set its size or position.
|
|
107
|
+
* @see {@link https://material.angular.io/cdk/overlay/overview} for more information.
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* const overlayRef = popupRef.overlayRef;
|
|
111
|
+
* overlayRef.updateSize({ width: '500px', height: '300px' });
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
get overlayRef(): OverlayRef;
|
|
115
|
+
/**
|
|
116
|
+
* @description Returns the position pair of the popup's anchor element.
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* const positionChanges$ = popupRef.positionChanges;
|
|
120
|
+
* positionChanges$.subscribe(pair => {
|
|
121
|
+
* console.log(`Popup position changed to: ${pair.originX} ${pair.originY} -> ${pair.overlayX} ${pair.overlayY}`);
|
|
122
|
+
* });
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
get positionChanges(): Observable<ConnectionPositionPair>;
|
|
130
126
|
}
|
|
131
|
-
|
|
132
127
|
type ConnectionPoint = "topleft" | "topcenter" | "topright" | "centerleft" | "center" | "centerright" | "bottomleft" | "bottomcenter" | "bottomright";
|
|
133
|
-
|
|
134
128
|
type PopupAnchor = FlexibleConnectedPositionStrategyOrigin | string;
|
|
135
129
|
interface PopupSettings<T = unknown, C = void> {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
130
|
+
/**
|
|
131
|
+
* The anchor element to which the popup will be connected.
|
|
132
|
+
* Can be an element, ElementRef, or CSS selector string.
|
|
133
|
+
* @type {PopupAnchor}
|
|
134
|
+
*/
|
|
135
|
+
anchor: PopupAnchor;
|
|
136
|
+
/**
|
|
137
|
+
* The connection point of the anchor element to which the popup will be connected.
|
|
138
|
+
* @type {ConnectionPoint}
|
|
139
|
+
*/
|
|
140
|
+
anchorConnectionPoint?: ConnectionPoint | null;
|
|
141
|
+
/**
|
|
142
|
+
* Animation settings for the popup.
|
|
143
|
+
*/
|
|
144
|
+
animation?: boolean | PopupAnimationSettings;
|
|
145
|
+
/**
|
|
146
|
+
* Classes to be applied to the backdrop.
|
|
147
|
+
* @type {string | string[]}
|
|
148
|
+
*/
|
|
149
|
+
backdropClass?: string | string[];
|
|
150
|
+
/**
|
|
151
|
+
* Whether scrolling behind the popup should be blocked while it is open. A page whose root doesn't scroll, because
|
|
152
|
+
* `html` or `body` hides its overflow, is left as it is, so no scrollbar appears and the page doesn't shift.
|
|
153
|
+
* Default: false.
|
|
154
|
+
* @type {boolean}
|
|
155
|
+
*/
|
|
156
|
+
blockScroll?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Whether the popup will be closed when the user clicks on the backdrop.
|
|
159
|
+
* Only applies if `hasBackdrop` is true.
|
|
160
|
+
* Default: true.
|
|
161
|
+
* @type {boolean}
|
|
162
|
+
*/
|
|
163
|
+
closeOnBackdropClick?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Whether the popup will be closed when the user presses the escape key.
|
|
166
|
+
* Escape only reaches the topmost open popup. When that popup sets this to `false`, Escape closes nothing,
|
|
167
|
+
* not even the popups underneath it.
|
|
168
|
+
* Default: true.
|
|
169
|
+
* @type {boolean}
|
|
170
|
+
*/
|
|
171
|
+
closeOnEscape?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Whether the popup will be closed when the mouse leaves the anchor element.
|
|
174
|
+
* Default: false.
|
|
175
|
+
* @type {boolean}
|
|
176
|
+
*/
|
|
177
|
+
closeOnMouseLeave?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Whether the popup will be closed when the user clicks outside of it.
|
|
180
|
+
* Clicks on the backdrop are governed by `closeOnBackdropClick` instead.
|
|
181
|
+
* Default: true.
|
|
182
|
+
* @type {boolean}
|
|
183
|
+
*/
|
|
184
|
+
closeOnOutsideClick?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Whether the popup will be closed when the user scrolls the page or a scrollable container around the anchor.
|
|
187
|
+
* Default: false.
|
|
188
|
+
* @type {boolean}
|
|
189
|
+
*/
|
|
190
|
+
closeOnScroll?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* The content to display in the popup.
|
|
193
|
+
* @type {TemplateRef | ComponentType}
|
|
194
|
+
*/
|
|
195
|
+
content: TemplateRef<C> | ComponentType<C>;
|
|
196
|
+
/**
|
|
197
|
+
* Optional data to pass to the popup context.
|
|
198
|
+
*/
|
|
199
|
+
data?: T;
|
|
200
|
+
/**
|
|
201
|
+
* Whether the popup will have a backdrop.
|
|
202
|
+
* Default: false.
|
|
203
|
+
*/
|
|
204
|
+
hasBackdrop?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Height of the popup.
|
|
207
|
+
* @type {number | string}
|
|
208
|
+
*/
|
|
209
|
+
height?: number | string;
|
|
210
|
+
/**
|
|
211
|
+
* Parent injector for the popup content. Component content resolves its dependencies here, after
|
|
212
|
+
* `providers`. Pass the injector of the component that opens the popup so its content can use services
|
|
213
|
+
* provided by that component, its ancestors or a lazy-loaded route.
|
|
214
|
+
* Default: the root injector.
|
|
215
|
+
* @type {Injector}
|
|
216
|
+
*/
|
|
217
|
+
injector?: Injector;
|
|
218
|
+
/**
|
|
219
|
+
* Maximum height of the popup.
|
|
220
|
+
* @type {number | string}
|
|
221
|
+
*/
|
|
222
|
+
maxHeight?: number | string;
|
|
223
|
+
/**
|
|
224
|
+
* Maximum width of the popup.
|
|
225
|
+
* @type {number | string}
|
|
226
|
+
*/
|
|
227
|
+
maxWidth?: number | string;
|
|
228
|
+
/**
|
|
229
|
+
* Minimum height of the popup.
|
|
230
|
+
* @type {number | string}
|
|
231
|
+
*/
|
|
232
|
+
minHeight?: number | string;
|
|
233
|
+
/**
|
|
234
|
+
* Minimum width of the popup.
|
|
235
|
+
* @type {number | string}
|
|
236
|
+
*/
|
|
237
|
+
minWidth?: number | string;
|
|
238
|
+
/**
|
|
239
|
+
* Offset of the popup.
|
|
240
|
+
* @type {PopupOffset}
|
|
241
|
+
*/
|
|
242
|
+
offset?: PopupOffset;
|
|
243
|
+
/**
|
|
244
|
+
* Classes to be applied to the popup.
|
|
245
|
+
* @type {string | string[]}
|
|
246
|
+
*/
|
|
247
|
+
popupClass?: string | string[];
|
|
248
|
+
/**
|
|
249
|
+
* The connection point of the popup element to which the anchor will be connected.
|
|
250
|
+
* @type {ConnectionPoint}
|
|
251
|
+
*/
|
|
252
|
+
popupConnectionPoint?: ConnectionPoint | null;
|
|
253
|
+
/**
|
|
254
|
+
* Classes to be applied to the popup wrapper content div.
|
|
255
|
+
*/
|
|
256
|
+
popupWrapperClass?: string | string[];
|
|
257
|
+
/**
|
|
258
|
+
* The strategy for positioning the popup.
|
|
259
|
+
* `global` means the popup will be positioned relative to the viewport,
|
|
260
|
+
* `connected` means the popup will be positioned relative to the anchor element.
|
|
261
|
+
* @type {"global" | "connected"}
|
|
262
|
+
*/
|
|
263
|
+
positionStrategy?: "global" | "connected";
|
|
264
|
+
/**
|
|
265
|
+
* @description The positions to use for the popup.
|
|
266
|
+
* The popup will try to position itself in the first position that fits.
|
|
267
|
+
* This is only used when `positionStrategy` is set to `connected`.
|
|
268
|
+
*/
|
|
269
|
+
positions?: Array<ConnectedPosition | ConnectionPositionPair>;
|
|
270
|
+
/**
|
|
271
|
+
* Optional callback invoked when the popup is about to close.
|
|
272
|
+
* Return `true` to cancel the close. Takes priority over `PopupCloseEvent.preventDefault()`.
|
|
273
|
+
* @type {(event: PopupCloseEvent) => boolean}
|
|
274
|
+
*/
|
|
275
|
+
preventClose?: Action<PopupCloseEvent, boolean>;
|
|
276
|
+
/**
|
|
277
|
+
* Additional Angular providers made available within the popup's injector.
|
|
278
|
+
* Use this to inject services or values that the popup content component needs.
|
|
279
|
+
* @type {StaticProvider[]}
|
|
280
|
+
*/
|
|
281
|
+
providers?: StaticProvider[];
|
|
282
|
+
/**
|
|
283
|
+
* Controls focus restoration behavior when the popup is closed.
|
|
284
|
+
* - true: Always restore focus to anchor
|
|
285
|
+
* - false: Never restore focus (recommended for tooltips)
|
|
286
|
+
* - "auto": Only restore focus if the anchor, or an element inside it, was focused when the popup opened;
|
|
287
|
+
* focus returns to that element
|
|
288
|
+
* Focus is only restored while it is on the page itself, inside the popup or inside the anchor. If the user
|
|
289
|
+
* moved it elsewhere, for example by clicking another field, it stays there.
|
|
290
|
+
* Default: "auto".
|
|
291
|
+
* @type {boolean | "auto"}
|
|
292
|
+
*/
|
|
293
|
+
restoreFocus?: boolean | "auto";
|
|
294
|
+
/**
|
|
295
|
+
* Width of the popup.
|
|
296
|
+
* @type {number | string}
|
|
297
|
+
*/
|
|
298
|
+
width?: number | string;
|
|
299
|
+
/**
|
|
300
|
+
* Whether the CDK overlay should push the popup into the visible viewport when it would
|
|
301
|
+
* otherwise overflow the screen edges.
|
|
302
|
+
* Default: true.
|
|
303
|
+
* @type {boolean}
|
|
304
|
+
*/
|
|
305
|
+
withPush?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* Whether the popup should track scroll events and reposition itself.
|
|
308
|
+
* Default: true.
|
|
309
|
+
* @type {boolean}
|
|
310
|
+
*/
|
|
311
|
+
withScrollTracking?: boolean;
|
|
317
312
|
}
|
|
318
313
|
interface PopupAnimationSettings {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
314
|
+
/**
|
|
315
|
+
* CSS class or classes applied by animate.enter when the popup is shown.
|
|
316
|
+
*/
|
|
317
|
+
enter?: string | string[];
|
|
318
|
+
/**
|
|
319
|
+
* CSS class or classes applied by animate.leave when the popup is hidden.
|
|
320
|
+
*/
|
|
321
|
+
leave?: string | string[];
|
|
327
322
|
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
323
|
+
export declare class PopupComponent<T = unknown> implements OnDestroy {
|
|
324
|
+
#private;
|
|
325
|
+
protected readonly contentTemplate: import("@angular/core").Signal<TemplateRef<any>>;
|
|
326
|
+
protected popupRef: PopupRef | null;
|
|
327
|
+
/**
|
|
328
|
+
* @description The anchor element or point for the popup.
|
|
329
|
+
*/
|
|
330
|
+
readonly anchor: import("@angular/core").InputSignal<FlexibleConnectedPositionStrategyOrigin>;
|
|
331
|
+
/**
|
|
332
|
+
* @description The connection point for the popup anchor.
|
|
333
|
+
*/
|
|
334
|
+
readonly anchorConnectionPoint: import("@angular/core").InputSignal<ConnectionPoint>;
|
|
335
|
+
/**
|
|
336
|
+
* @description The animation settings for the popup.
|
|
337
|
+
*/
|
|
338
|
+
readonly animation: import("@angular/core").InputSignal<boolean | PopupAnimationSettings>;
|
|
339
|
+
/**
|
|
340
|
+
* @description The class or classes to apply to the backdrop of the popup.
|
|
341
|
+
*/
|
|
342
|
+
readonly backdropClass: import("@angular/core").InputSignal<string | string[]>;
|
|
343
|
+
/**
|
|
344
|
+
* @description Emits when the popup is closed.
|
|
345
|
+
*/
|
|
346
|
+
readonly close: import("@angular/core").OutputEmitterRef<void>;
|
|
347
|
+
/**
|
|
348
|
+
* @description Whether to close the popup when clicking on the backdrop.
|
|
349
|
+
* Only applies when the popup has a backdrop.
|
|
350
|
+
*/
|
|
351
|
+
readonly closeOnBackdropClick: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
352
|
+
/**
|
|
353
|
+
* @description Whether to close the popup when the escape key is pressed.
|
|
354
|
+
* Escape only reaches the topmost open popup.
|
|
355
|
+
*/
|
|
356
|
+
readonly closeOnEscape: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
357
|
+
/**
|
|
358
|
+
* @description Whether to close the popup when the mouse leaves the anchor element.
|
|
359
|
+
*/
|
|
360
|
+
readonly closeOnMouseLeave: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
361
|
+
/**
|
|
362
|
+
* @description Whether to close the popup when clicking outside of it.
|
|
363
|
+
*/
|
|
364
|
+
readonly closeOnOutsideClick: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
365
|
+
/**
|
|
366
|
+
* @description Whether to close the popup when the user scrolls the page or a scrollable container around the anchor.
|
|
367
|
+
*/
|
|
368
|
+
readonly closeOnScroll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
369
|
+
/**
|
|
370
|
+
* @description Arbitrary data to pass to the popup.
|
|
371
|
+
*/
|
|
372
|
+
readonly data: import("@angular/core").InputSignal<T | undefined>;
|
|
373
|
+
/**
|
|
374
|
+
* @description Whether the popup should have a backdrop.
|
|
375
|
+
*/
|
|
376
|
+
readonly hasBackdrop: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
377
|
+
/**
|
|
378
|
+
* @description The height of the popup.
|
|
379
|
+
*/
|
|
380
|
+
readonly height: import("@angular/core").InputSignal<string | number | undefined>;
|
|
381
|
+
/**
|
|
382
|
+
* @description The maximum height of the popup.
|
|
383
|
+
*/
|
|
384
|
+
readonly maxHeight: import("@angular/core").InputSignal<string | number | undefined>;
|
|
385
|
+
/**
|
|
386
|
+
* @description The maximum width of the popup.
|
|
387
|
+
*/
|
|
388
|
+
readonly maxWidth: import("@angular/core").InputSignal<string | number | undefined>;
|
|
389
|
+
/**
|
|
390
|
+
* @description The minimum height of the popup.
|
|
391
|
+
*/
|
|
392
|
+
readonly minHeight: import("@angular/core").InputSignal<string | number | undefined>;
|
|
393
|
+
/**
|
|
394
|
+
* @description The minimum width of the popup.
|
|
395
|
+
*/
|
|
396
|
+
readonly minWidth: import("@angular/core").InputSignal<string | number | undefined>;
|
|
397
|
+
/**
|
|
398
|
+
* @description The offset of the popup from the anchor.
|
|
399
|
+
*/
|
|
400
|
+
readonly offset: import("@angular/core").InputSignal<PopupOffset | undefined>;
|
|
401
|
+
/**
|
|
402
|
+
* @description Emits when the popup is opened.
|
|
403
|
+
*/
|
|
404
|
+
readonly open: import("@angular/core").OutputEmitterRef<PopupRef>;
|
|
405
|
+
/**
|
|
406
|
+
* @description The class or classes to apply to the popup.
|
|
407
|
+
*/
|
|
408
|
+
readonly popupClass: import("@angular/core").InputSignal<string | string[]>;
|
|
409
|
+
/**
|
|
410
|
+
* @description The connection point for the popup.
|
|
411
|
+
*/
|
|
412
|
+
readonly popupConnectionPoint: import("@angular/core").InputSignal<ConnectionPoint>;
|
|
413
|
+
/**
|
|
414
|
+
* @description The class or classes to apply to the popup wrapper.
|
|
415
|
+
*/
|
|
416
|
+
readonly popupWrapperClass: import("@angular/core").InputSignal<string | string[]>;
|
|
417
|
+
/**
|
|
418
|
+
* @description The strategy for positioning the popup.
|
|
419
|
+
* `global` means the popup will be positioned relative to the viewport,
|
|
420
|
+
* `connected` means the popup will be positioned relative to the anchor element.
|
|
421
|
+
*/
|
|
422
|
+
readonly positionStrategy: import("@angular/core").InputSignal<"global" | "connected">;
|
|
423
|
+
/**
|
|
424
|
+
* @description The positions to use for the popup.
|
|
425
|
+
* The popup will try to position itself in the first position that fits.
|
|
426
|
+
* This is only used when the `positionStrategy` is set to `connected`.
|
|
427
|
+
*/
|
|
428
|
+
readonly positions: import("@angular/core").InputSignal<(ConnectionPositionPair | ConnectedPosition)[] | undefined>;
|
|
429
|
+
/**
|
|
430
|
+
* @description Called when the popup is requested to close.
|
|
431
|
+
* This can be used to prevent the popup from closing.
|
|
432
|
+
*/
|
|
433
|
+
readonly preventClose: import("@angular/core").InputSignal<Action<PopupCloseEvent<unknown>, boolean> | undefined>;
|
|
434
|
+
/**
|
|
435
|
+
* @description The providers that will be injected into the popup.
|
|
436
|
+
*/
|
|
437
|
+
readonly providers: import("@angular/core").InputSignal<StaticProvider[]>;
|
|
438
|
+
/**
|
|
439
|
+
* @description Controls focus restoration when the popup closes.
|
|
440
|
+
* - `true`: always restore focus to the anchor element.
|
|
441
|
+
* - `false`: never restore focus (recommended for tooltips).
|
|
442
|
+
* - `"auto"`: restore focus only if the anchor, or an element inside it, was focused when the popup opened.
|
|
443
|
+
*
|
|
444
|
+
* Focus is left alone if the user moved it outside the popup and the anchor before it closed.
|
|
445
|
+
*/
|
|
446
|
+
readonly restoreFocus: import("@angular/core").InputSignalWithTransform<boolean | "auto", unknown>;
|
|
447
|
+
/**
|
|
448
|
+
* @description The trigger event for opening the popup.
|
|
449
|
+
*/
|
|
450
|
+
readonly trigger: import("@angular/core").InputSignal<string>;
|
|
451
|
+
/**
|
|
452
|
+
* @description The width of the popup.
|
|
453
|
+
*/
|
|
454
|
+
readonly width: import("@angular/core").InputSignal<string | number | undefined>;
|
|
455
|
+
/**
|
|
456
|
+
* @description Whether to push the popup into the screen when it is opened.
|
|
457
|
+
*/
|
|
458
|
+
readonly withPush: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
459
|
+
/**
|
|
460
|
+
* @description Whether the popup should track scroll events and reposition itself.
|
|
461
|
+
*/
|
|
462
|
+
readonly withScrollTracking: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
463
|
+
constructor();
|
|
464
|
+
/** Closes the popup if one is currently open. */
|
|
465
|
+
closePopup(): void;
|
|
466
|
+
ngOnDestroy(): void;
|
|
467
|
+
private getPopupWidth;
|
|
468
|
+
private setupEventListeners;
|
|
469
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PopupComponent<any>, never>;
|
|
470
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PopupComponent<any>, "mona-popup", never, {
|
|
471
|
+
"anchor": {
|
|
472
|
+
"alias": "anchor";
|
|
473
|
+
"required": true;
|
|
474
|
+
"isSignal": true;
|
|
475
|
+
};
|
|
476
|
+
"anchorConnectionPoint": {
|
|
477
|
+
"alias": "anchorConnectionPoint";
|
|
478
|
+
"required": false;
|
|
479
|
+
"isSignal": true;
|
|
480
|
+
};
|
|
481
|
+
"animation": {
|
|
482
|
+
"alias": "animation";
|
|
483
|
+
"required": false;
|
|
484
|
+
"isSignal": true;
|
|
485
|
+
};
|
|
486
|
+
"backdropClass": {
|
|
487
|
+
"alias": "backdropClass";
|
|
488
|
+
"required": false;
|
|
489
|
+
"isSignal": true;
|
|
490
|
+
};
|
|
491
|
+
"closeOnBackdropClick": {
|
|
492
|
+
"alias": "closeOnBackdropClick";
|
|
493
|
+
"required": false;
|
|
494
|
+
"isSignal": true;
|
|
495
|
+
};
|
|
496
|
+
"closeOnEscape": {
|
|
497
|
+
"alias": "closeOnEscape";
|
|
498
|
+
"required": false;
|
|
499
|
+
"isSignal": true;
|
|
500
|
+
};
|
|
501
|
+
"closeOnMouseLeave": {
|
|
502
|
+
"alias": "closeOnMouseLeave";
|
|
503
|
+
"required": false;
|
|
504
|
+
"isSignal": true;
|
|
505
|
+
};
|
|
506
|
+
"closeOnOutsideClick": {
|
|
507
|
+
"alias": "closeOnOutsideClick";
|
|
508
|
+
"required": false;
|
|
509
|
+
"isSignal": true;
|
|
510
|
+
};
|
|
511
|
+
"closeOnScroll": {
|
|
512
|
+
"alias": "closeOnScroll";
|
|
513
|
+
"required": false;
|
|
514
|
+
"isSignal": true;
|
|
515
|
+
};
|
|
516
|
+
"data": {
|
|
517
|
+
"alias": "data";
|
|
518
|
+
"required": false;
|
|
519
|
+
"isSignal": true;
|
|
520
|
+
};
|
|
521
|
+
"hasBackdrop": {
|
|
522
|
+
"alias": "hasBackdrop";
|
|
523
|
+
"required": false;
|
|
524
|
+
"isSignal": true;
|
|
525
|
+
};
|
|
526
|
+
"height": {
|
|
527
|
+
"alias": "height";
|
|
528
|
+
"required": false;
|
|
529
|
+
"isSignal": true;
|
|
530
|
+
};
|
|
531
|
+
"maxHeight": {
|
|
532
|
+
"alias": "maxHeight";
|
|
533
|
+
"required": false;
|
|
534
|
+
"isSignal": true;
|
|
535
|
+
};
|
|
536
|
+
"maxWidth": {
|
|
537
|
+
"alias": "maxWidth";
|
|
538
|
+
"required": false;
|
|
539
|
+
"isSignal": true;
|
|
540
|
+
};
|
|
541
|
+
"minHeight": {
|
|
542
|
+
"alias": "minHeight";
|
|
543
|
+
"required": false;
|
|
544
|
+
"isSignal": true;
|
|
545
|
+
};
|
|
546
|
+
"minWidth": {
|
|
547
|
+
"alias": "minWidth";
|
|
548
|
+
"required": false;
|
|
549
|
+
"isSignal": true;
|
|
550
|
+
};
|
|
551
|
+
"offset": {
|
|
552
|
+
"alias": "offset";
|
|
553
|
+
"required": false;
|
|
554
|
+
"isSignal": true;
|
|
555
|
+
};
|
|
556
|
+
"popupClass": {
|
|
557
|
+
"alias": "popupClass";
|
|
558
|
+
"required": false;
|
|
559
|
+
"isSignal": true;
|
|
560
|
+
};
|
|
561
|
+
"popupConnectionPoint": {
|
|
562
|
+
"alias": "popupConnectionPoint";
|
|
563
|
+
"required": false;
|
|
564
|
+
"isSignal": true;
|
|
565
|
+
};
|
|
566
|
+
"popupWrapperClass": {
|
|
567
|
+
"alias": "popupWrapperClass";
|
|
568
|
+
"required": false;
|
|
569
|
+
"isSignal": true;
|
|
570
|
+
};
|
|
571
|
+
"positionStrategy": {
|
|
572
|
+
"alias": "positionStrategy";
|
|
573
|
+
"required": false;
|
|
574
|
+
"isSignal": true;
|
|
575
|
+
};
|
|
576
|
+
"positions": {
|
|
577
|
+
"alias": "positions";
|
|
578
|
+
"required": false;
|
|
579
|
+
"isSignal": true;
|
|
580
|
+
};
|
|
581
|
+
"preventClose": {
|
|
582
|
+
"alias": "preventClose";
|
|
583
|
+
"required": false;
|
|
584
|
+
"isSignal": true;
|
|
585
|
+
};
|
|
586
|
+
"providers": {
|
|
587
|
+
"alias": "providers";
|
|
588
|
+
"required": false;
|
|
589
|
+
"isSignal": true;
|
|
590
|
+
};
|
|
591
|
+
"restoreFocus": {
|
|
592
|
+
"alias": "restoreFocus";
|
|
593
|
+
"required": false;
|
|
594
|
+
"isSignal": true;
|
|
595
|
+
};
|
|
596
|
+
"trigger": {
|
|
597
|
+
"alias": "trigger";
|
|
598
|
+
"required": false;
|
|
599
|
+
"isSignal": true;
|
|
600
|
+
};
|
|
601
|
+
"width": {
|
|
602
|
+
"alias": "width";
|
|
603
|
+
"required": false;
|
|
604
|
+
"isSignal": true;
|
|
605
|
+
};
|
|
606
|
+
"withPush": {
|
|
607
|
+
"alias": "withPush";
|
|
608
|
+
"required": false;
|
|
609
|
+
"isSignal": true;
|
|
610
|
+
};
|
|
611
|
+
"withScrollTracking": {
|
|
612
|
+
"alias": "withScrollTracking";
|
|
613
|
+
"required": false;
|
|
614
|
+
"isSignal": true;
|
|
615
|
+
};
|
|
616
|
+
}, {
|
|
617
|
+
"close": "close";
|
|
618
|
+
"open": "open";
|
|
619
|
+
}, never, ["*"], true, never>;
|
|
477
620
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PopupService>;
|
|
621
|
+
export declare class PopupService {
|
|
622
|
+
#private;
|
|
623
|
+
/**
|
|
624
|
+
* Opens a popup and returns its `PopupRef`. If `settings.anchor` is a CSS selector string, creates a
|
|
625
|
+
* hover-triggered popup for every matching element (see Multi-element popups); otherwise creates a single popup
|
|
626
|
+
* attached to the given element, `ElementRef`, or point.
|
|
627
|
+
*/
|
|
628
|
+
create(settings: PopupSettings): PopupRef;
|
|
629
|
+
private attachContent;
|
|
630
|
+
private buildPanelClass;
|
|
631
|
+
/**
|
|
632
|
+
* With `"auto"` (also the default), remembers the focused element when it is the anchor or inside it, such
|
|
633
|
+
* as the button inside a host component or the input inside a date picker, and returns focus to that element.
|
|
634
|
+
*/
|
|
635
|
+
private captureOriginalFocus;
|
|
636
|
+
private createInjector;
|
|
637
|
+
private createMultiElementPopup;
|
|
638
|
+
private createOverlay;
|
|
639
|
+
private createPositionStrategy;
|
|
640
|
+
private createScrollDispatcherTarget;
|
|
641
|
+
private createSingleElementPopup;
|
|
642
|
+
private getAnchorElement;
|
|
643
|
+
private getPosition;
|
|
644
|
+
private getScrollableAncestorElements;
|
|
645
|
+
private getScrollableContainers;
|
|
646
|
+
private getTopmostOpenPopup;
|
|
647
|
+
/**
|
|
648
|
+
* Escape goes to the topmost open popup only, so closing a dropdown inside a dialog leaves the dialog
|
|
649
|
+
* open. The topmost popup consumes the key even when it doesn't close on Escape, so a modal that can't
|
|
650
|
+
* be dismissed doesn't let it reach the popup underneath. An Escape that ends an IME composition is left
|
|
651
|
+
* alone. `preventDefault()` doesn't keep the popup open, because controls call it on every navigation key;
|
|
652
|
+
* a control that handles Escape itself stops its propagation instead.
|
|
653
|
+
*/
|
|
654
|
+
private handleEscapeKey;
|
|
655
|
+
private handleFocusRestoration;
|
|
656
|
+
private isScrollableElement;
|
|
657
|
+
private isScrollableOverflow;
|
|
658
|
+
/**
|
|
659
|
+
* One pair of `document` listeners serves every open popup. The capturing one notes which popup is on
|
|
660
|
+
* top before the key reaches any control; the bubbling one closes it if nothing handled the key.
|
|
661
|
+
*/
|
|
662
|
+
private listenForEscape;
|
|
663
|
+
/**
|
|
664
|
+
* A popup leaves the stack as soon as it starts closing, so a second Escape during its leave animation
|
|
665
|
+
* goes to the popup underneath.
|
|
666
|
+
*/
|
|
667
|
+
private registerOpenPopup;
|
|
668
|
+
/**
|
|
669
|
+
* Resolves a PopupAnchor to a FlexibleConnectedPositionStrategyOrigin.
|
|
670
|
+
* This method should only receive actual elements or ElementRefs, not CSS selector strings.
|
|
671
|
+
* CSS selectors are handled by the multi-element popup creation path.
|
|
672
|
+
* @param anchor The anchor to resolve (should be Element or ElementRef)
|
|
673
|
+
* @returns The resolved anchor
|
|
674
|
+
*/
|
|
675
|
+
private resolveAnchor;
|
|
676
|
+
private setupBackdropCloseSubscription;
|
|
677
|
+
/**
|
|
678
|
+
* Starts the backdrop fade-out as soon as the close begins, so it runs alongside the popup's leave
|
|
679
|
+
* animation. Without it the backdrop stays fully opaque until `dispose()` removes it in one frame.
|
|
680
|
+
*/
|
|
681
|
+
private setupBackdropFadeOut;
|
|
682
|
+
private setupCleanupSubscription;
|
|
683
|
+
private setupCloseSubscriptions;
|
|
684
|
+
/**
|
|
685
|
+
* `PopupRef.overlayRef` is public, so the overlay can be detached or disposed without going through
|
|
686
|
+
* `close()`. Finish the close then too, or `closed` never fires and focus, subscriptions and consumers
|
|
687
|
+
* waiting for it (the dropdowns won't reopen until it does) stay stuck.
|
|
688
|
+
*/
|
|
689
|
+
private setupDetachTracking;
|
|
690
|
+
private setupDirectionTracking;
|
|
691
|
+
/**
|
|
692
|
+
* Listens on the document rather than on the elements matched at creation time, so elements added later
|
|
693
|
+
* get a popup too. One popup shows at a time; it closes when the pointer leaves its element, and the
|
|
694
|
+
* returned subscription's teardown closes it as well.
|
|
695
|
+
*/
|
|
696
|
+
private setupInternalEventDelegation;
|
|
697
|
+
private setupMouseLeaveSubscription;
|
|
698
|
+
private setupOutsideClickSubscription;
|
|
699
|
+
private setupPositionChangeTracking;
|
|
700
|
+
private setupScrollClosing;
|
|
701
|
+
private setupScrollTracking;
|
|
702
|
+
private shouldIgnoreOutsideClick;
|
|
703
|
+
private unregisterOpenPopup;
|
|
704
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PopupService, never>;
|
|
705
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
564
706
|
}
|
|
565
|
-
|
|
566
|
-
declare const
|
|
567
|
-
declare const
|
|
568
|
-
declare const
|
|
569
|
-
declare const
|
|
570
|
-
declare const
|
|
571
|
-
declare const
|
|
572
|
-
declare const slideFromBottomPopupAnimation: Required<PopupAnimationSettings>;
|
|
573
|
-
|
|
707
|
+
export declare const defaultPopupAnimation: Required<PopupAnimationSettings>;
|
|
708
|
+
export declare const dropdownPopupAnimation: Required<PopupAnimationSettings>;
|
|
709
|
+
export declare const fadePopupAnimation: Required<PopupAnimationSettings>;
|
|
710
|
+
export declare const slideFromRightPopupAnimation: Required<PopupAnimationSettings>;
|
|
711
|
+
export declare const slideFromLeftPopupAnimation: Required<PopupAnimationSettings>;
|
|
712
|
+
export declare const slideFromTopPopupAnimation: Required<PopupAnimationSettings>;
|
|
713
|
+
export declare const slideFromBottomPopupAnimation: Required<PopupAnimationSettings>;
|
|
574
714
|
/**
|
|
575
715
|
* The `data` passed in `PopupSettings`, available to the popup content.
|
|
576
716
|
*/
|
|
577
|
-
declare const PopupDataInjectionToken: InjectionToken<unknown>;
|
|
578
|
-
|
|
579
|
-
export { PopupCloseEvent, PopupCloseSource, PopupComponent, PopupDataInjectionToken, PopupRef, PopupService, defaultPopupAnimation, dropdownPopupAnimation, fadePopupAnimation, slideFromBottomPopupAnimation, slideFromLeftPopupAnimation, slideFromRightPopupAnimation, slideFromTopPopupAnimation };
|
|
580
|
-
export type { ConnectionPoint, PopupAnchor, PopupAnimationSettings, PopupOffset, PopupSettings };
|
|
717
|
+
export declare const PopupDataInjectionToken: InjectionToken<unknown>;
|
|
718
|
+
export type { ConnectionPoint, PopupAnchor, PopupAnimationSettings, PopupSettings };
|