1 | import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
|
2 | import * as i0 from "@angular/core";
|
3 | export declare class NgbPopoverWindow {
|
4 | animation: boolean;
|
5 | title: string | TemplateRef<any> | null | undefined;
|
6 | id: string;
|
7 | popoverClass: string;
|
8 | context: any;
|
9 | isTitleTemplate(): boolean;
|
10 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbPopoverWindow, never>;
|
11 | static ɵcmp: i0.ɵɵComponentDeclaration<NgbPopoverWindow, "ngb-popover-window", never, { "animation": { "alias": "animation"; "required": false; }; "title": { "alias": "title"; "required": false; }; "id": { "alias": "id"; "required": false; }; "popoverClass": { "alias": "popoverClass"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, {}, never, ["*"], true, never>;
|
12 | }
|
13 | /**
|
14 | * A lightweight and extensible directive for fancy popover creation.
|
15 | */
|
16 | export declare class NgbPopover implements OnInit, OnDestroy, OnChanges {
|
17 | static ngAcceptInputType_autoClose: boolean | string;
|
18 | private _config;
|
19 | /**
|
20 | * If `true`, popover opening and closing will be animated.
|
21 | *
|
22 | * @since 8.0.0
|
23 | */
|
24 | animation: boolean;
|
25 | /**
|
26 | * Indicates whether the popover should be closed on `Escape` key and inside/outside clicks:
|
27 | *
|
28 | * * `true` - closes on both outside and inside clicks as well as `Escape` presses
|
29 | * * `false` - disables the autoClose feature (NB: triggers still apply)
|
30 | * * `"inside"` - closes on inside clicks as well as Escape presses
|
31 | * * `"outside"` - closes on outside clicks (sometimes also achievable through triggers)
|
32 | * as well as `Escape` presses
|
33 | *
|
34 | * @since 3.0.0
|
35 | */
|
36 | autoClose: boolean | "inside" | "outside";
|
37 | /**
|
38 | * The string content or a `TemplateRef` for the content to be displayed in the popover.
|
39 | *
|
40 | * If the title and the content are falsy, the popover won't open.
|
41 | */
|
42 | ngbPopover: string | TemplateRef<any> | null | undefined;
|
43 | /**
|
44 | * The title of the popover.
|
45 | *
|
46 | * If the title and the content are falsy, the popover won't open.
|
47 | */
|
48 | popoverTitle: string | TemplateRef<any> | null | undefined;
|
49 | /**
|
50 | * The preferred placement of the popover, among the [possible values](#/guides/positioning#api).
|
51 | *
|
52 | * The default order of preference is `"auto"`.
|
53 | *
|
54 | * Please see the [positioning overview](#/positioning) for more details.
|
55 | */
|
56 | placement: import("../util/positioning").PlacementArray;
|
57 | /**
|
58 | * Allows to change default Popper options when positioning the popover.
|
59 | * Receives current popper options and returns modified ones.
|
60 | *
|
61 | * @since 13.1.0
|
62 | */
|
63 | popperOptions: (options: Partial<import("@popperjs/core").Options>) => Partial<import("@popperjs/core").Options>;
|
64 | /**
|
65 | * Specifies events that should trigger the tooltip.
|
66 | *
|
67 | * Supports a space separated list of event names.
|
68 | * For more details see the [triggers demo](#/components/popover/examples#triggers).
|
69 | */
|
70 | triggers: string;
|
71 | /**
|
72 | * A css selector or html element specifying the element the popover should be positioned against.
|
73 | * By default, the element `ngbPopover` directive is applied to will be set as a target.
|
74 | *
|
75 | * @since 13.1.0
|
76 | */
|
77 | positionTarget?: string | HTMLElement;
|
78 | /**
|
79 | * A selector specifying the element the popover should be appended to.
|
80 | *
|
81 | * Currently only supports `body`.
|
82 | */
|
83 | container: string;
|
84 | /**
|
85 | * If `true`, popover is disabled and won't be displayed.
|
86 | *
|
87 | * @since 1.1.0
|
88 | */
|
89 | disablePopover: boolean;
|
90 | /**
|
91 | * An optional class applied to the popover window element.
|
92 | *
|
93 | * @since 2.2.0
|
94 | */
|
95 | popoverClass: string;
|
96 | /**
|
97 | * Default template context for `TemplateRef`, can be overridden with `open` method.
|
98 | *
|
99 | * @since 15.1.0
|
100 | */
|
101 | popoverContext: any;
|
102 | /**
|
103 | * The opening delay in ms. Works only for "non-manual" opening triggers defined by the `triggers` input.
|
104 | *
|
105 | * @since 4.1.0
|
106 | */
|
107 | openDelay: number;
|
108 | /**
|
109 | * The closing delay in ms. Works only for "non-manual" opening triggers defined by the `triggers` input.
|
110 | *
|
111 | * @since 4.1.0
|
112 | */
|
113 | closeDelay: number;
|
114 | /**
|
115 | * An event emitted when the popover opening animation has finished. Contains no payload.
|
116 | */
|
117 | shown: EventEmitter<void>;
|
118 | /**
|
119 | * An event emitted when the popover closing animation has finished. Contains no payload.
|
120 | *
|
121 | * At this point popover is not in the DOM anymore.
|
122 | */
|
123 | hidden: EventEmitter<void>;
|
124 | private _nativeElement;
|
125 | private _ngZone;
|
126 | private _document;
|
127 | private _changeDetector;
|
128 | private _injector;
|
129 | private _ngbPopoverWindowId;
|
130 | private _popupService;
|
131 | private _windowRef;
|
132 | private _unregisterListenersFn;
|
133 | private _positioning;
|
134 | private _afterRenderRef;
|
135 | /**
|
136 | * Opens the popover.
|
137 | *
|
138 | * This is considered to be a "manual" triggering.
|
139 | * The `context` is an optional value to be injected into the popover template when it is created.
|
140 | */
|
141 | open(context?: any): void;
|
142 | /**
|
143 | * Closes the popover.
|
144 | *
|
145 | * This is considered to be a "manual" triggering of the popover.
|
146 | */
|
147 | close(animation?: boolean): void;
|
148 | /**
|
149 | * Toggles the popover.
|
150 | *
|
151 | * This is considered to be a "manual" triggering of the popover.
|
152 | */
|
153 | toggle(): void;
|
154 | /**
|
155 | * Returns `true`, if the popover is currently shown.
|
156 | */
|
157 | isOpen(): boolean;
|
158 | ngOnInit(): void;
|
159 | ngOnChanges({ ngbPopover, popoverTitle, disablePopover, popoverClass }: SimpleChanges): void;
|
160 | ngOnDestroy(): void;
|
161 | private _isDisabled;
|
162 | private _getPositionTargetElement;
|
163 | static ɵfac: i0.ɵɵFactoryDeclaration<NgbPopover, never>;
|
164 | static ɵdir: i0.ɵɵDirectiveDeclaration<NgbPopover, "[ngbPopover]", ["ngbPopover"], { "animation": { "alias": "animation"; "required": false; }; "autoClose": { "alias": "autoClose"; "required": false; }; "ngbPopover": { "alias": "ngbPopover"; "required": false; }; "popoverTitle": { "alias": "popoverTitle"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "popperOptions": { "alias": "popperOptions"; "required": false; }; "triggers": { "alias": "triggers"; "required": false; }; "positionTarget": { "alias": "positionTarget"; "required": false; }; "container": { "alias": "container"; "required": false; }; "disablePopover": { "alias": "disablePopover"; "required": false; }; "popoverClass": { "alias": "popoverClass"; "required": false; }; "popoverContext": { "alias": "popoverContext"; "required": false; }; "openDelay": { "alias": "openDelay"; "required": false; }; "closeDelay": { "alias": "closeDelay"; "required": false; }; }, { "shown": "shown"; "hidden": "hidden"; }, never, never, true, never>;
|
165 | }
|