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 | }
|
17 | export declare const NB_WINDOW_DEFAULT_BUTTONS_CONFIG: NbWindowControlButtonsConfig;
|
18 | /**
|
19 | * Window configuration options.
|
20 | */
|
21 | export declare class NbWindowConfig {
|
22 | /**
|
23 | * Window title.
|
24 | */
|
25 | title: string;
|
26 | /**
|
27 | * Initial window state. Full screen by default.
|
28 | */
|
29 | initialState: NbWindowState;
|
30 | /**
|
31 | * If true than backdrop will be rendered behind window.
|
32 | * By default set to true.
|
33 | */
|
34 | hasBackdrop: boolean;
|
35 | /**
|
36 | * If set to true mouse clicks on backdrop will close a window.
|
37 | * Default is true.
|
38 | */
|
39 | closeOnBackdropClick: boolean;
|
40 | /**
|
41 | * If true then escape press will close a window.
|
42 | * Default is true.
|
43 | */
|
44 | closeOnEsc: boolean;
|
45 | /**
|
46 | * Class to be applied to the window.
|
47 | */
|
48 | windowClass: string;
|
49 | /**
|
50 | * Both, template and component may receive data through `config.context` property.
|
51 | * For components, this data will be set as component properties.
|
52 | * For templates, you can access it inside template as $implicit.
|
53 | */
|
54 | context?: Object;
|
55 | /**
|
56 | * Where the attached component should live in Angular's *logical* component tree.
|
57 | * This affects what is available for injection and the change detection order for the
|
58 | * component instantiated inside of the window. This does not affect where the window
|
59 | * content will be rendered.
|
60 | */
|
61 | viewContainerRef: ViewContainerRef;
|
62 | /**
|
63 | * Windows control buttons can be hidden by setting according property to false.
|
64 | */
|
65 | buttons: Partial<NbWindowControlButtonsConfig>;
|
66 | constructor(...configs: Partial<NbWindowConfig>[]);
|
67 | protected applyDefaultButtonConfig(): void;
|
68 | }
|
69 | export declare const NB_WINDOW_CONTENT: InjectionToken<TemplateRef<any> | NbComponentType<any>>;
|
70 | export declare const NB_WINDOW_CONFIG: InjectionToken<NbWindowConfig>;
|
71 | export declare const NB_WINDOW_CONTEXT: InjectionToken<Object>;
|