@nanahoshi/mona-ui 0.24.7 → 0.24.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -9
- package/fesm2022/nanahoshi-mona-ui-button.mjs +8 -2
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +4 -3
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +101 -47
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +339 -101
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +119 -69
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-vXXNWmEN.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-DDgNmgE0.mjs → nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-Dzf6Vbs_.mjs → nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs} +2 -3
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DAPNqnWV.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-B9rmDLq8.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs} +10 -10
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +44 -3
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +20 -4
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +335 -45
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +565 -197
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +465 -23
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +598 -208
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +193 -71
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +33 -3
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +33 -3
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +40 -3
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +33 -3
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +33 -3
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +49 -3
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +29 -3
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +127 -133
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +473 -240
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +202 -90
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +609 -256
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +45 -10
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +102 -58
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +286 -443
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +205 -140
- package/fesm2022/nanahoshi-mona-ui-window.mjs +591 -310
- package/i18n/catalogs/en-US.messages.json +32 -6
- package/locales/ar-sa/ar-sa.messages.json +29 -3
- package/locales/de-de/de-de.messages.json +29 -3
- package/locales/es-es/es-es.messages.json +29 -3
- package/locales/fr-fr/fr-fr.messages.json +29 -3
- package/locales/id-id/id-id.messages.json +29 -3
- package/locales/it-it/it-it.messages.json +29 -3
- package/locales/ja-jp/ja-jp.messages.json +29 -3
- package/locales/ko-kr/ko-kr.messages.json +29 -3
- package/locales/pt-br/pt-br.messages.json +29 -3
- package/locales/ru-ru/ru-ru.messages.json +29 -3
- package/locales/tr-tr/tr-tr.messages.json +29 -3
- package/locales/zh-cn/zh-cn.messages.json +29 -3
- package/locales/zh-tw/zh-tw.messages.json +29 -3
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-button-group.d.ts +13 -3
- package/types/nanahoshi-mona-ui-button.d.ts +20 -3
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +5 -6
- package/types/nanahoshi-mona-ui-dialog.d.ts +131 -20
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +75 -56
- package/types/nanahoshi-mona-ui-i18n.d.ts +69 -0
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +14 -2
- package/types/nanahoshi-mona-ui-internal-list.d.ts +89 -10
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +155 -40
- package/types/nanahoshi-mona-ui-internal.d.ts +128 -16
- package/types/nanahoshi-mona-ui-list-box.d.ts +148 -47
- package/types/nanahoshi-mona-ui-list-view.d.ts +112 -21
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +26 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +26 -0
- package/types/nanahoshi-mona-ui-menubar.d.ts +65 -62
- package/types/nanahoshi-mona-ui-notification.d.ts +76 -16
- package/types/nanahoshi-mona-ui-popover.d.ts +44 -17
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +110 -32
- package/types/nanahoshi-mona-ui-popup.d.ts +2 -0
- package/types/nanahoshi-mona-ui-sheet.d.ts +16 -5
- package/types/nanahoshi-mona-ui-split-button.d.ts +29 -7
- package/types/nanahoshi-mona-ui-tooltip.d.ts +43 -20
- package/types/nanahoshi-mona-ui-tree-view.d.ts +84 -40
- package/types/nanahoshi-mona-ui-window.d.ts +103 -14
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
|
|
2
2
|
import { MonaWindowMessages, WindowMessages } from '@nanahoshi/mona-ui/i18n';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { ElementRef, ComponentRef, TemplateRef, Type } from '@angular/core';
|
|
5
|
-
import { PopupCloseEvent, PopupRef } from '@nanahoshi/mona-ui/popup';
|
|
4
|
+
import { ElementRef, ComponentRef, TemplateRef, Type, Injector, InjectionToken } from '@angular/core';
|
|
5
|
+
import { PopupCloseEvent, PopupCloseSource, PopupRef } from '@nanahoshi/mona-ui/popup';
|
|
6
6
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
7
|
import { VariantInputs, Action } from '@nanahoshi/mona-ui/internal';
|
|
8
8
|
import { VariantProps } from 'class-variance-authority';
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
10
10
|
|
|
11
11
|
declare const windowBaseThemeVariants: (props?: ({
|
|
12
|
-
rounded?: "
|
|
12
|
+
rounded?: "small" | "none" | "medium" | "large" | null | undefined;
|
|
13
13
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
14
|
declare const windowContentContainerThemeVariants: (props?: ({
|
|
15
|
-
rounded?: "
|
|
15
|
+
rounded?: "small" | "none" | "medium" | "large" | null | undefined;
|
|
16
16
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
17
|
declare const windowContentThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
18
18
|
declare const windowResizerThemeVariants: (props?: ({
|
|
@@ -21,7 +21,7 @@ declare const windowResizerThemeVariants: (props?: ({
|
|
|
21
21
|
declare const windowTitleBarActionThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
22
22
|
declare const windowTitleBarThemeVariants: (props?: ({
|
|
23
23
|
look?: "default" | "primary" | null | undefined;
|
|
24
|
-
rounded?: "
|
|
24
|
+
rounded?: "small" | "none" | "medium" | "large" | null | undefined;
|
|
25
25
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
26
26
|
declare const windowTitleContainerThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
27
27
|
declare const windowTitleThemeVariants: (props?: ({
|
|
@@ -50,12 +50,22 @@ declare class WindowComponent implements WindowVariantInput {
|
|
|
50
50
|
private readonly actionTemplate;
|
|
51
51
|
private readonly contentTemplate;
|
|
52
52
|
private readonly footerTemplate;
|
|
53
|
+
private readonly projectedContent;
|
|
53
54
|
private readonly titleTemplate;
|
|
55
|
+
/**
|
|
56
|
+
* @description Accessible name for the window when it has no `title` or title template.
|
|
57
|
+
*/
|
|
58
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
54
59
|
/**
|
|
55
60
|
* @description Sets the visibility of the close button in the window header.
|
|
56
61
|
* @default true
|
|
57
62
|
*/
|
|
58
63
|
readonly closable: _angular_core.InputSignal<boolean>;
|
|
64
|
+
/**
|
|
65
|
+
* @description Emits before the window closes, whatever closes it: the close button, Escape, a programmatic close,
|
|
66
|
+
* or the component being destroyed. Call `preventDefault()` to keep it open (a close caused by destruction can't
|
|
67
|
+
* be kept).
|
|
68
|
+
*/
|
|
59
69
|
readonly close: _angular_core.OutputEmitterRef<PopupCloseEvent<unknown>>;
|
|
60
70
|
/**
|
|
61
71
|
* @description Sets whether the window should close when the escape key is pressed.
|
|
@@ -141,7 +151,7 @@ declare class WindowComponent implements WindowVariantInput {
|
|
|
141
151
|
* @description Sets the border radius of the window.
|
|
142
152
|
* @default "medium"
|
|
143
153
|
*/
|
|
144
|
-
readonly rounded: _angular_core.InputSignal<"
|
|
154
|
+
readonly rounded: _angular_core.InputSignal<"small" | "none" | "medium" | "large" | null | undefined>;
|
|
145
155
|
/**
|
|
146
156
|
* @description Sets the title of the window.
|
|
147
157
|
*/
|
|
@@ -156,17 +166,27 @@ declare class WindowComponent implements WindowVariantInput {
|
|
|
156
166
|
readonly width: _angular_core.ModelSignal<number | undefined>;
|
|
157
167
|
constructor();
|
|
158
168
|
closeWindow(): void;
|
|
169
|
+
/**
|
|
170
|
+
* Moves the window, in pixels. An axis that isn't given keeps its place.
|
|
171
|
+
*/
|
|
159
172
|
move(position: {
|
|
160
173
|
top?: number;
|
|
161
174
|
left?: number;
|
|
162
175
|
}): void;
|
|
176
|
+
/**
|
|
177
|
+
* Opens the window. Called once after the first render; call it again to reopen a window that was closed. Does
|
|
178
|
+
* nothing while the window is open.
|
|
179
|
+
*/
|
|
163
180
|
openWindow(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Resizes the window, in pixels. A dimension that isn't given keeps its size.
|
|
183
|
+
*/
|
|
164
184
|
resize(dimensions: {
|
|
165
185
|
width?: number;
|
|
166
186
|
height?: number;
|
|
167
187
|
}): void;
|
|
168
188
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WindowComponent, never>;
|
|
169
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WindowComponent, "mona-window", never, { "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "focusedElement": { "alias": "focusedElement"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "left": { "alias": "left"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "maximizable": { "alias": "maximizable"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "minimizable": { "alias": "minimizable"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "top": { "alias": "top"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "dragEnd": "dragEnd"; "dragStart": "dragStart"; "height": "heightChange"; "left": "leftChange"; "top": "topChange"; "width": "widthChange"; }, ["actionTemplate", "contentTemplate", "footerTemplate", "titleTemplate"],
|
|
189
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WindowComponent, "mona-window", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "focusedElement": { "alias": "focusedElement"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "left": { "alias": "left"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "maximizable": { "alias": "maximizable"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "minimizable": { "alias": "minimizable"; "required": false; "isSignal": true; }; "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "top": { "alias": "top"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "dragEnd": "dragEnd"; "dragStart": "dragStart"; "height": "heightChange"; "left": "leftChange"; "top": "topChange"; "width": "widthChange"; }, ["actionTemplate", "contentTemplate", "footerTemplate", "titleTemplate"], ["*"], true, never>;
|
|
170
190
|
}
|
|
171
191
|
|
|
172
192
|
declare class WindowActionTemplateDirective {
|
|
@@ -203,12 +223,23 @@ interface ResizeEvent {
|
|
|
203
223
|
width: number;
|
|
204
224
|
}
|
|
205
225
|
|
|
226
|
+
/**
|
|
227
|
+
* How a window closed, emitted once by `WindowRef.closed$`.
|
|
228
|
+
* @typeParam R the type of the value passed to `WindowRef.close(value)`
|
|
229
|
+
*/
|
|
230
|
+
interface WindowResult<R = unknown> {
|
|
231
|
+
/** The value passed to `close(value)`; `undefined` for the close button, Escape and the host being destroyed. */
|
|
232
|
+
readonly value: R | undefined;
|
|
233
|
+
/** What closed the window: the close button, Escape, or a programmatic close. */
|
|
234
|
+
readonly via: PopupCloseSource;
|
|
235
|
+
}
|
|
236
|
+
|
|
206
237
|
interface WindowRefParams<R = unknown> {
|
|
207
238
|
center: () => void;
|
|
208
239
|
close: (result?: R) => void;
|
|
209
240
|
get close$(): Observable<PopupCloseEvent<R>>;
|
|
210
241
|
closeWithDelay: (delay: number, result?: R) => void;
|
|
211
|
-
get closed$(): Observable<
|
|
242
|
+
get closed$(): Observable<WindowResult<R>>;
|
|
212
243
|
get component(): ComponentRef<unknown> | null;
|
|
213
244
|
get drag$(): Observable<MoveEvent>;
|
|
214
245
|
get dragEnd$(): Observable<void>;
|
|
@@ -229,30 +260,59 @@ interface WindowRefParams<R = unknown> {
|
|
|
229
260
|
get width(): number;
|
|
230
261
|
}
|
|
231
262
|
|
|
263
|
+
/**
|
|
264
|
+
* A handle on an open window.
|
|
265
|
+
* @typeParam R the type of the value passed to `close(value)`
|
|
266
|
+
*/
|
|
232
267
|
declare class WindowRef<R = unknown> implements WindowRefParams<R> {
|
|
233
268
|
#private;
|
|
234
269
|
constructor(options: WindowRefParams<R>);
|
|
270
|
+
/**
|
|
271
|
+
* Centers the window in the viewport. It stays centered as its size changes, until it is moved.
|
|
272
|
+
*/
|
|
235
273
|
center(): void;
|
|
274
|
+
/**
|
|
275
|
+
* Closes the window. `close$` can still prevent it.
|
|
276
|
+
* @param result the value `closed$` reports
|
|
277
|
+
*/
|
|
236
278
|
close(result?: R): void;
|
|
237
279
|
closeWithDelay(delay: number, result?: R): void;
|
|
280
|
+
/**
|
|
281
|
+
* Moves the window, in pixels from the viewport's top-left corner. An axis that isn't given keeps its place.
|
|
282
|
+
*/
|
|
238
283
|
move(params: {
|
|
239
284
|
top?: number;
|
|
240
285
|
left?: number;
|
|
241
286
|
}): void;
|
|
287
|
+
/**
|
|
288
|
+
* Resizes the window, in pixels. A dimension that isn't given keeps its size; `center` centers the window
|
|
289
|
+
* afterward.
|
|
290
|
+
*/
|
|
242
291
|
resize(params: {
|
|
243
292
|
width?: number;
|
|
244
293
|
height?: number;
|
|
245
294
|
center?: boolean;
|
|
246
295
|
}): void;
|
|
296
|
+
/**
|
|
297
|
+
* Emits before the window closes, whatever closes it. Call `preventDefault()` to keep it open. Completes once the
|
|
298
|
+
* window has closed.
|
|
299
|
+
*/
|
|
247
300
|
get close$(): Observable<PopupCloseEvent<R>>;
|
|
248
|
-
|
|
301
|
+
/**
|
|
302
|
+
* Emits how the window closed, once it has closed, then completes. Replays to late subscribers.
|
|
303
|
+
*/
|
|
304
|
+
get closed$(): Observable<WindowResult<R>>;
|
|
249
305
|
get component(): ComponentRef<unknown> | null;
|
|
306
|
+
/** Emits while the window is dragged. Completes when it closes. */
|
|
250
307
|
get drag$(): Observable<MoveEvent>;
|
|
308
|
+
/** Emits when a drag ends. Completes when the window closes. */
|
|
251
309
|
get dragEnd$(): Observable<void>;
|
|
310
|
+
/** Emits when a drag starts. Completes when the window closes. */
|
|
252
311
|
get dragStart$(): Observable<void>;
|
|
253
312
|
get element(): HTMLElement;
|
|
254
313
|
get height(): number;
|
|
255
314
|
get popupRef(): PopupRef;
|
|
315
|
+
/** Emits while the window is resized by the user. Completes when it closes. */
|
|
256
316
|
get resize$(): Observable<ResizeEvent>;
|
|
257
317
|
get width(): number;
|
|
258
318
|
}
|
|
@@ -261,15 +321,30 @@ interface WindowActionTemplateContext {
|
|
|
261
321
|
$implicit: WindowRef;
|
|
262
322
|
}
|
|
263
323
|
|
|
264
|
-
|
|
324
|
+
/**
|
|
325
|
+
* @typeParam D the type of `data`
|
|
326
|
+
*/
|
|
327
|
+
interface WindowSettings<D = unknown> {
|
|
265
328
|
actionTemplate?: TemplateRef<WindowActionTemplateContext>;
|
|
329
|
+
/** Accessible name for a window without a `title`. */
|
|
330
|
+
ariaLabel?: string;
|
|
266
331
|
closable?: boolean;
|
|
267
332
|
closeOnEscape?: boolean;
|
|
268
333
|
content?: TemplateRef<unknown> | Type<unknown>;
|
|
334
|
+
/**
|
|
335
|
+
* Data for the content: a component injects it with `WINDOW_DATA`, a template gets it as its implicit context
|
|
336
|
+
* (`let-data`).
|
|
337
|
+
*/
|
|
338
|
+
data?: D;
|
|
269
339
|
draggable?: boolean;
|
|
270
340
|
focusedElement?: HTMLElement | ElementRef<HTMLElement> | string | null;
|
|
271
341
|
footerTemplate?: TemplateRef<unknown>;
|
|
272
342
|
height?: number;
|
|
343
|
+
/**
|
|
344
|
+
* Parent injector for the window's content. Pass the opener's injector so a component given as `content` can
|
|
345
|
+
* inject what the opener provides. Default: the root injector.
|
|
346
|
+
*/
|
|
347
|
+
injector?: Injector;
|
|
273
348
|
left?: number;
|
|
274
349
|
look?: WindowVariantProps["look"];
|
|
275
350
|
maxHeight?: number;
|
|
@@ -282,7 +357,7 @@ interface WindowSettings {
|
|
|
282
357
|
modal?: boolean;
|
|
283
358
|
preventClose?: Action<PopupCloseEvent, boolean>;
|
|
284
359
|
resizable?: boolean;
|
|
285
|
-
rounded
|
|
360
|
+
rounded?: WindowVariantProps["rounded"];
|
|
286
361
|
title?: string | TemplateRef<unknown>;
|
|
287
362
|
top?: number;
|
|
288
363
|
width?: number;
|
|
@@ -291,10 +366,24 @@ interface WindowSettings {
|
|
|
291
366
|
|
|
292
367
|
declare class WindowService {
|
|
293
368
|
#private;
|
|
294
|
-
|
|
369
|
+
/**
|
|
370
|
+
* Opens a window.
|
|
371
|
+
* @typeParam R the type of the value passed to `WindowRef.close(value)`
|
|
372
|
+
* @typeParam D the type of `data`
|
|
373
|
+
*/
|
|
374
|
+
open<R = unknown, D = unknown>(settings: WindowSettings<D>): WindowRef<R>;
|
|
295
375
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WindowService, never>;
|
|
296
376
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WindowService>;
|
|
297
377
|
}
|
|
298
378
|
|
|
299
|
-
|
|
300
|
-
|
|
379
|
+
/**
|
|
380
|
+
* The `data` a window was opened with, for a component given as its `content`.
|
|
381
|
+
* @example
|
|
382
|
+
* ```ts
|
|
383
|
+
* readonly #data = inject<{ name: string }>(WINDOW_DATA);
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
declare const WINDOW_DATA: InjectionToken<unknown>;
|
|
387
|
+
|
|
388
|
+
export { WINDOW_DATA, WINDOW_DEFAULT_MESSAGES, WindowActionTemplateDirective, WindowComponent, WindowContentTemplateDirective, WindowFooterTemplateDirective, WindowRef, WindowService, WindowTitleTemplateDirective };
|
|
389
|
+
export type { MoveEvent, ResizeEvent, WindowActionTemplateContext, WindowResult, WindowSettings, WindowVariantProps };
|