1 | import { TemplateRef, InjectionToken, ViewContainerRef } from '@angular/core';
|
2 | import { NbComponentType } from '../cdk/overlay/mapping';
|
3 | export declare enum NbWindowState {
|
4 | MINIMIZED = "minimized",
|
5 | MAXIMIZED = "maximized",
|
6 | FULL_SCREEN = "full-screen"
|
7 | }
|
8 | export interface NbWindowStateChange {
|
9 | oldState: NbWindowState;
|
10 | newState: NbWindowState;
|
11 | }
|
12 | export interface NbWindowControlButtonsConfig {
|
13 | minimize: boolean;
|
14 | maximize: boolean;
|
15 | fullScreen: boolean;
|
16 | close: boolean;
|
17 | }
|
18 | export declare const NB_WINDOW_DEFAULT_BUTTONS_CONFIG: NbWindowControlButtonsConfig;
|
19 | /**
|
20 | * Window configuration options.
|
21 | */
|
22 | export declare class NbWindowConfig {
|
23 | /**
|
24 | * Window title.
|
25 | */
|
26 | title: string;
|
27 | /**
|
28 | * Window title as template. Use it instead of `title` property.
|
29 | */
|
30 | titleTemplate?: TemplateRef<any>;
|
31 | /**
|
32 | * Title as template may receive data through `config.titleTemplateContext` property.
|
33 | * Window title as Template. You can access context inside template as $implicit.
|
34 | */
|
35 | titleTemplateContext?: Object;
|
36 | /**
|
37 | * Initial window state. Full screen by default.
|
38 | */
|
39 | initialState: NbWindowState;
|
40 | /**
|
41 | * If true than backdrop will be rendered behind window.
|
42 | * By default set to true.
|
43 | */
|
44 | hasBackdrop: boolean;
|
45 | /**
|
46 | * If set to true mouse clicks on backdrop will close a window.
|
47 | * Default is true.
|
48 | */
|
49 | closeOnBackdropClick: boolean;
|
50 | /**
|
51 | * If true then escape press will close a window.
|
52 | * Default is true.
|
53 | */
|
54 | closeOnEsc: boolean;
|
55 | /**
|
56 | * Class to be applied to the window.
|
57 | */
|
58 | windowClass: string;
|
59 | /**
|
60 | * Both, template and component may receive data through `config.context` property.
|
61 | * For components, this data will be set as component properties.
|
62 | * For templates, you can access it inside template as $implicit.
|
63 | */
|
64 | context?: Object;
|
65 | /**
|
66 | * Where the attached component should live in Angular's *logical* component tree.
|
67 | * This affects what is available for injection and the change detection order for the
|
68 | * component instantiated inside of the window. This does not affect where the window
|
69 | * content will be rendered.
|
70 | */
|
71 | viewContainerRef: ViewContainerRef;
|
72 | /**
|
73 | * Windows control buttons can be hidden by setting according property to false.
|
74 | */
|
75 | buttons: Partial<NbWindowControlButtonsConfig>;
|
76 | constructor(...configs: Partial<NbWindowConfig>[]);
|
77 | protected applyDefaultButtonConfig(): void;
|
78 | }
|
79 | export declare const NB_WINDOW_CONTENT: InjectionToken<TemplateRef<any> | NbComponentType>;
|
80 | export declare const NB_WINDOW_CONFIG: InjectionToken<NbWindowConfig>;
|
81 | export declare const NB_WINDOW_CONTEXT: InjectionToken<Object>;
|