@progress/kendo-angular-popup 19.1.1-develop.2 → 19.1.2-develop.1
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/esm2022/models/position-mode.mjs +1 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/popup.component.mjs +27 -129
- package/esm2022/popup.module.mjs +1 -3
- package/esm2022/popup.service.mjs +32 -69
- package/esm2022/scale.mjs +3 -7
- package/fesm2022/progress-kendo-angular-popup.mjs +65 -210
- package/models/align.interface.d.ts +3 -3
- package/models/collision.interface.d.ts +3 -3
- package/models/collision.type.d.ts +0 -1
- package/models/margin.interface.d.ts +3 -3
- package/models/offset.interface.d.ts +3 -3
- package/models/popup-animation.interface.d.ts +9 -3
- package/models/popup-ref.d.ts +8 -11
- package/models/popup-settings.d.ts +14 -25
- package/models/position-mode.d.ts +1 -1
- package/package.json +4 -4
- package/popup.component.d.ts +27 -129
- package/popup.module.d.ts +1 -3
- package/popup.service.d.ts +32 -69
- package/scale.d.ts +3 -7
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Defines all possible values for the `positionMode` property of the Popup.
|
|
7
7
|
*/
|
|
8
8
|
export {};
|
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: '19.1.
|
|
13
|
+
publishDate: 1749804025,
|
|
14
|
+
version: '19.1.2-develop.1',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
16
16
|
};
|
|
@@ -29,19 +29,11 @@ const ANIMATION_CONTAINER_FIXED = 'k-animation-container-fixed';
|
|
|
29
29
|
* Represents the [Kendo UI Popup component for Angular]({% slug overview_popup %}).
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* <kendo-popup *ngIf="show" [anchor]="anchor">
|
|
38
|
-
* <strong>Popup content!</strong>
|
|
39
|
-
* </kendo-popup>
|
|
40
|
-
* `
|
|
41
|
-
* })
|
|
42
|
-
* class AppComponent {
|
|
43
|
-
* public show: boolean = false;
|
|
44
|
-
* }
|
|
32
|
+
* ```html
|
|
33
|
+
* <button #anchor (click)="show = !show">Toggle</button>
|
|
34
|
+
* <kendo-popup *ngIf="show" [anchor]="anchor">
|
|
35
|
+
* <strong>Popup content!</strong>
|
|
36
|
+
* </kendo-popup>
|
|
45
37
|
* ```
|
|
46
38
|
*/
|
|
47
39
|
export class PopupComponent {
|
|
@@ -55,162 +47,68 @@ export class PopupComponent {
|
|
|
55
47
|
_renderer;
|
|
56
48
|
_zone;
|
|
57
49
|
/**
|
|
58
|
-
* Controls the Popup animation. By default, the opening and closing animations
|
|
59
|
-
*
|
|
50
|
+
* Controls the Popup animation. By default, the opening and closing animations are enabled ([see example]({% slug animations_popup %})).
|
|
51
|
+
* @default true
|
|
60
52
|
*/
|
|
61
53
|
animate = true;
|
|
62
54
|
/**
|
|
63
|
-
*
|
|
64
|
-
* ([see example]({% slug alignmentpositioning_popup %}#toc-aligning-to-components)).
|
|
55
|
+
* Sets the element to use as an anchor. The Popup opens next to this element. ([See example]({% slug alignmentpositioning_popup %}#toc-aligning-to-components)).
|
|
65
56
|
*/
|
|
66
57
|
anchor;
|
|
67
58
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
59
|
+
* Sets the anchor pivot point ([see example]({% slug alignmentpositioning_popup %}#toc-positioning)).
|
|
60
|
+
* @default '{ horizontal: "left", vertical: "bottom" }'
|
|
70
61
|
*/
|
|
71
62
|
anchorAlign = { horizontal: 'left', vertical: 'bottom' };
|
|
72
63
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
64
|
+
* Sets the collision behavior of the Popup ([see example]({% slug viewportboundarydetection_popup %})).
|
|
65
|
+
* @default '{ horizontal: "fit", vertical: "flip" }'
|
|
75
66
|
*/
|
|
76
67
|
collision = { horizontal: 'fit', vertical: 'flip' };
|
|
77
68
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
69
|
+
* Sets the pivot point of the Popup ([see example]({% slug alignmentpositioning_popup %}#toc-positioning)).
|
|
70
|
+
* @default '{ horizontal: "left", vertical: "top" }'
|
|
80
71
|
*/
|
|
81
72
|
popupAlign = { horizontal: 'left', vertical: 'top' };
|
|
82
73
|
/**
|
|
83
|
-
* Controls whether the component
|
|
74
|
+
* Controls whether the component copies the `anchor` font styles.
|
|
75
|
+
* @default false
|
|
84
76
|
*/
|
|
85
77
|
copyAnchorStyles = false;
|
|
86
78
|
/**
|
|
87
|
-
*
|
|
88
|
-
* animated element ([see example]({% slug appearance_popup %})).
|
|
79
|
+
* Sets a list of CSS classes to add to the internal animated element ([see example]({% slug appearance_popup %})).
|
|
89
80
|
*
|
|
90
81
|
* > To style the content of the Popup, use this property binding.
|
|
91
82
|
*/
|
|
92
83
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
93
84
|
popupClass;
|
|
94
85
|
/**
|
|
95
|
-
*
|
|
96
|
-
* To make the Popup acquire absolute positioning, set this option to `absolute`.
|
|
86
|
+
* Sets the position mode of the component. By default, the Popup uses fixed positioning. To use absolute positioning, set this option to `absolute`.
|
|
97
87
|
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* ```html
|
|
103
|
-
* <style>
|
|
104
|
-
* .parent-content {
|
|
105
|
-
* position: relative;
|
|
106
|
-
* width: 200px;
|
|
107
|
-
* height: 200px;
|
|
108
|
-
* overflow: auto;
|
|
109
|
-
* margin: 200px auto;
|
|
110
|
-
* border: 1px solid red;
|
|
111
|
-
* }
|
|
112
|
-
* .content {
|
|
113
|
-
* position: relative;
|
|
114
|
-
* width: 100px;
|
|
115
|
-
* height: 100px;
|
|
116
|
-
* overflow: auto;
|
|
117
|
-
* margin: 300px;
|
|
118
|
-
* border: 1px solid blue;
|
|
119
|
-
* }
|
|
120
|
-
* .anchor {
|
|
121
|
-
* position: absolute;
|
|
122
|
-
* top: 200px;
|
|
123
|
-
* left: 200px;
|
|
124
|
-
* }
|
|
125
|
-
* </style>
|
|
126
|
-
* ```
|
|
127
|
-
* ```ts
|
|
128
|
-
* _@Component({
|
|
129
|
-
* selector: 'my-app',
|
|
130
|
-
* template: `
|
|
131
|
-
* <div class="example-config">
|
|
132
|
-
* Position mode:
|
|
133
|
-
* <label><input type="radio" value="fixed" [(ngModel)]="mode" /> Fixed</label>
|
|
134
|
-
* <label><input type="radio" value="absolute" [(ngModel)]="mode" /> Absolute</label>
|
|
135
|
-
* </div>
|
|
136
|
-
* <div class="example-config">
|
|
137
|
-
* Append to
|
|
138
|
-
* <label>
|
|
139
|
-
* <input type="radio" name="place" [value]="1" [(ngModel)]="checked" />
|
|
140
|
-
* Root component
|
|
141
|
-
* </label>
|
|
142
|
-
* <label>
|
|
143
|
-
* <input type="radio" name="place" [value]="2" [(ngModel)]="checked" />
|
|
144
|
-
* <span [style.color]="'red'">Red Container</span>
|
|
145
|
-
* </label>
|
|
146
|
-
* <label>
|
|
147
|
-
* <input type="radio" name="place" [value]="3" [(ngModel)]="checked" />
|
|
148
|
-
* <span [style.color]="'blue'">Blue Container</span>
|
|
149
|
-
* </label>
|
|
150
|
-
* </div>
|
|
151
|
-
* <div class="example">
|
|
152
|
-
* <div class="parent-content" [scrollLeft]="250" [scrollTop]="230">
|
|
153
|
-
* <div class="content" [scrollLeft]="170" [scrollTop]="165">
|
|
154
|
-
* <button #anchor class="anchor" (click)="show = !show">Toggle</button>
|
|
155
|
-
* <kendo-popup [positionMode]="mode" [anchor]="anchor" (anchorViewportLeave)="show=false" *ngIf="show && checked === 3">
|
|
156
|
-
* <ul>
|
|
157
|
-
* <li>Item1</li>
|
|
158
|
-
* <li>Item2</li>
|
|
159
|
-
* <li>Item3</li>
|
|
160
|
-
* </ul>
|
|
161
|
-
* </kendo-popup>
|
|
162
|
-
* <span [style.position]="'absolute'" [style.top.px]="400" [style.left.px]="400">Bottom/Right</span>
|
|
163
|
-
* </div>
|
|
164
|
-
* <kendo-popup [positionMode]="mode" [anchor]="anchor" (anchorViewportLeave)="show=false" *ngIf="show && checked === 2">
|
|
165
|
-
* <ul>
|
|
166
|
-
* <li>Item1</li>
|
|
167
|
-
* <li>Item2</li>
|
|
168
|
-
* <li>Item3</li>
|
|
169
|
-
* </ul>
|
|
170
|
-
* </kendo-popup>
|
|
171
|
-
* <span [style.position]="'absolute'" [style.top.px]="600" [style.left.px]="600">Bottom/Right</span>
|
|
172
|
-
* </div>
|
|
173
|
-
* <kendo-popup [positionMode]="mode" [anchor]="anchor" (anchorViewportLeave)="show=false" *ngIf="show && checked === 1">
|
|
174
|
-
* <ul>
|
|
175
|
-
* <li>Item1</li>
|
|
176
|
-
* <li>Item2</li>
|
|
177
|
-
* <li>Item3</li>
|
|
178
|
-
* </ul>
|
|
179
|
-
* </kendo-popup>
|
|
180
|
-
* </div>
|
|
181
|
-
* `
|
|
182
|
-
* })
|
|
183
|
-
* class AppComponent {
|
|
184
|
-
* public checked: number = 3;
|
|
185
|
-
* public mode: string = 'absolute';
|
|
186
|
-
* public show: boolean = true;
|
|
187
|
-
* }
|
|
188
|
-
* ```
|
|
88
|
+
* To support mobile browsers with the zoom option, use the `absolute` positioning of the Popup.
|
|
89
|
+
* @default 'fixed'
|
|
189
90
|
*/
|
|
190
91
|
positionMode = 'fixed';
|
|
191
92
|
/**
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* The boundary detection is applied by using the window viewport.
|
|
93
|
+
* Sets the absolute position of the element ([see example]({% slug alignmentpositioning_popup %}#toc-aligning-to-absolute-points)).
|
|
94
|
+
* The Popup opens next to this point. The Popup pivot point is defined by the `popupAlign` option. The boundary detection uses the window viewport.
|
|
95
|
+
* @default '{ left: -10000, top: 0 }'
|
|
196
96
|
*/
|
|
197
97
|
offset = DEFAULT_OFFSET;
|
|
198
98
|
/**
|
|
199
|
-
*
|
|
200
|
-
* between the popup and the anchor ([see example]({% slug alignmentpositioning_popup %}#toc-adding-a-margin)).
|
|
99
|
+
* Sets the margin value in pixels. Adds blank space between the Popup and the anchor ([see example]({% slug alignmentpositioning_popup %}#toc-adding-a-margin)).
|
|
201
100
|
*/
|
|
202
101
|
margin;
|
|
203
102
|
/**
|
|
204
|
-
* Fires when the anchor
|
|
205
|
-
* ([see example]({% slug closing_popup %}#toc-after-leaving-the-viewport)).
|
|
103
|
+
* Fires when the anchor scrolls outside the screen boundaries. ([See example]({% slug closing_popup %}#toc-after-leaving-the-viewport)).
|
|
206
104
|
*/
|
|
207
105
|
anchorViewportLeave = new EventEmitter();
|
|
208
106
|
/**
|
|
209
|
-
* Fires after the component
|
|
107
|
+
* Fires after the component closes.
|
|
210
108
|
*/
|
|
211
109
|
close = new EventEmitter();
|
|
212
110
|
/**
|
|
213
|
-
* Fires after the component
|
|
111
|
+
* Fires after the component opens and the opening animation ends.
|
|
214
112
|
*/
|
|
215
113
|
open = new EventEmitter();
|
|
216
114
|
/**
|
package/esm2022/popup.module.mjs
CHANGED
|
@@ -11,11 +11,9 @@ import * as i1 from "@progress/kendo-angular-common";
|
|
|
11
11
|
import * as i2 from "./popup.component";
|
|
12
12
|
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* definition for the Popup component.
|
|
14
|
+
* Required for adding all Popup features in NgModule-based Angular applications.
|
|
16
15
|
*
|
|
17
16
|
* @example
|
|
18
|
-
*
|
|
19
17
|
* ```ts-no-run
|
|
20
18
|
* // Import the Popup module
|
|
21
19
|
* import { PopupModule } from '@progress/kendo-angular-popup';
|
|
@@ -11,15 +11,13 @@ const removeElement = (element) => {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
* the application is used.
|
|
14
|
+
* Injects the Popup container. If not set, uses the first root component of the application.
|
|
16
15
|
*
|
|
17
|
-
* >
|
|
16
|
+
* > Use `POPUP_CONTAINER` only with the `PopupService` class ([see example](slug:service_popup)).
|
|
18
17
|
*
|
|
19
|
-
* In
|
|
18
|
+
* In standalone components:
|
|
20
19
|
*
|
|
21
20
|
* @example
|
|
22
|
-
*
|
|
23
21
|
* ```ts
|
|
24
22
|
* import { Component } from '@angular/core';
|
|
25
23
|
* import { KENDO_POPUP, PopupService } from '@progress/kendo-angular-popup';
|
|
@@ -40,19 +38,18 @@ const removeElement = (element) => {
|
|
|
40
38
|
* export class AppComponent {}
|
|
41
39
|
* ```
|
|
42
40
|
*
|
|
43
|
-
* In
|
|
41
|
+
* In NgModule-based applications:
|
|
44
42
|
*
|
|
45
43
|
* @example
|
|
46
|
-
*
|
|
47
|
-
* ```ts-no-run
|
|
44
|
+
* ```ts
|
|
48
45
|
* import { PopupModule, POPUP_CONTAINER } from '@progress/kendo-angular-popup';
|
|
49
46
|
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
50
47
|
* import { ElementRef, NgModule } from '@angular/core';
|
|
51
48
|
* import { AppComponent } from './app.component';
|
|
52
49
|
*
|
|
53
50
|
* _@NgModule({
|
|
54
|
-
* declarations: [AppComponent],
|
|
55
|
-
* imports: [BrowserModule, PopupModule],
|
|
51
|
+
* declarations: [AppComponent],
|
|
52
|
+
* imports: [BrowserModule, PopupModule],
|
|
56
53
|
* bootstrap: [AppComponent],
|
|
57
54
|
* providers: [{
|
|
58
55
|
* provide: POPUP_CONTAINER,
|
|
@@ -69,8 +66,7 @@ const removeElement = (element) => {
|
|
|
69
66
|
*/
|
|
70
67
|
export const POPUP_CONTAINER = new InjectionToken('Popup Container');
|
|
71
68
|
/**
|
|
72
|
-
*
|
|
73
|
-
* ([see example]({% slug service_popup %})).
|
|
69
|
+
* Provides a service for opening Popup components dynamically ([see example]({% slug service_popup %})).
|
|
74
70
|
*
|
|
75
71
|
* @export
|
|
76
72
|
* @class PopupService
|
|
@@ -81,9 +77,9 @@ export class PopupService {
|
|
|
81
77
|
injector;
|
|
82
78
|
container;
|
|
83
79
|
/**
|
|
84
|
-
* Gets the root view container
|
|
80
|
+
* Gets the root view container for injecting the component.
|
|
85
81
|
*
|
|
86
|
-
* @returns {ComponentRef<any>}
|
|
82
|
+
* @returns {ComponentRef<any>} The root view container reference.
|
|
87
83
|
*/
|
|
88
84
|
get rootViewContainer() {
|
|
89
85
|
// https://github.com/angular/angular/blob/4.0.x/packages/core/src/application_ref.ts#L571
|
|
@@ -97,9 +93,9 @@ export class PopupService {
|
|
|
97
93
|
`);
|
|
98
94
|
}
|
|
99
95
|
/**
|
|
100
|
-
*
|
|
96
|
+
* Gets the HTML element of the root component container.
|
|
101
97
|
*
|
|
102
|
-
* @returns {HTMLElement}
|
|
98
|
+
* @returns {HTMLElement} The root container HTML element.
|
|
103
99
|
*/
|
|
104
100
|
get rootViewContainerNode() {
|
|
105
101
|
return this.container ? this.container.nativeElement : this.getComponentRootNode(this.rootViewContainer);
|
|
@@ -111,43 +107,10 @@ export class PopupService {
|
|
|
111
107
|
this.container = container;
|
|
112
108
|
}
|
|
113
109
|
/**
|
|
114
|
-
* Opens a Popup component.
|
|
115
|
-
* in the DOM directly in the root application component.
|
|
116
|
-
*
|
|
117
|
-
* @param {PopupSettings} options - The options which define the Popup.
|
|
118
|
-
* @returns {ComponentRef<PopupComponent>} - A reference to the Popup object.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
*
|
|
122
|
-
* ```ts-no-run
|
|
123
|
-
* _@Component({
|
|
124
|
-
* selector: 'my-app',
|
|
125
|
-
* template: `
|
|
126
|
-
* <ng-template #template>
|
|
127
|
-
* Popup content
|
|
128
|
-
* </ng-template>
|
|
129
|
-
* <button #anchor kendoButton (click)="open(anchor, template)">Open</button>
|
|
130
|
-
* `
|
|
131
|
-
* })
|
|
132
|
-
* export class AppComponent {
|
|
133
|
-
* public popupRef: PopupRef;
|
|
134
|
-
*
|
|
135
|
-
* constructor( private popupService: PopupService ) {}
|
|
136
|
-
*
|
|
137
|
-
* public open(anchor: ElementRef, template: TemplateRef<any>): void {
|
|
138
|
-
* if (this.popupRef) {
|
|
139
|
-
* this.popupRef.close();
|
|
140
|
-
* this.popupRef = null;
|
|
141
|
-
* return;
|
|
142
|
-
* }
|
|
110
|
+
* Opens a Popup component. The Popup mounts in the DOM under the root application component.
|
|
143
111
|
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* content: template
|
|
147
|
-
* });
|
|
148
|
-
* }
|
|
149
|
-
* }
|
|
150
|
-
* ```
|
|
112
|
+
* @param {PopupSettings} options - The options for the Popup.
|
|
113
|
+
* @returns {ComponentRef<PopupComponent>} A reference to the Popup object.
|
|
151
114
|
*/
|
|
152
115
|
open(options = {}) {
|
|
153
116
|
const { component, nodes } = this.contentFrom(options.content);
|
|
@@ -194,28 +157,28 @@ export class PopupService {
|
|
|
194
157
|
/**
|
|
195
158
|
* Gets the HTML element for a component reference.
|
|
196
159
|
*
|
|
197
|
-
* @param {ComponentRef<any>} componentRef
|
|
198
|
-
* @returns {HTMLElement}
|
|
160
|
+
* @param {ComponentRef<any>} componentRef The component reference.
|
|
161
|
+
* @returns {HTMLElement} The root HTML element of the component.
|
|
199
162
|
*/
|
|
200
163
|
getComponentRootNode(componentRef) {
|
|
201
164
|
return componentRef.location.nativeElement;
|
|
202
165
|
}
|
|
203
166
|
/**
|
|
204
|
-
* Gets the `ComponentFactory` instance by
|
|
167
|
+
* Gets the `ComponentFactory` instance by type.
|
|
205
168
|
*
|
|
206
|
-
* @param {*} componentClass
|
|
207
|
-
* @
|
|
208
|
-
* @returns {ComponentRef<any>}
|
|
169
|
+
* @param {*} componentClass The component class.
|
|
170
|
+
* @returns {ComponentFactory<any>} The component factory instance.
|
|
209
171
|
*/
|
|
210
172
|
getComponentFactory(componentClass) {
|
|
211
173
|
return this.componentFactoryResolver.resolveComponentFactory(componentClass);
|
|
212
174
|
}
|
|
213
175
|
/**
|
|
214
|
-
* Creates a component reference from a `Component`
|
|
176
|
+
* Creates a component reference from a `Component` class.
|
|
215
177
|
*
|
|
216
|
-
* @param {*} componentClass
|
|
217
|
-
* @param {*} nodes
|
|
218
|
-
* @
|
|
178
|
+
* @param {*} componentClass The component class.
|
|
179
|
+
* @param {*} nodes The nodes to project.
|
|
180
|
+
* @param {ViewContainerRef} container The container to use.
|
|
181
|
+
* @returns {ComponentRef<any>} The created component reference.
|
|
219
182
|
*/
|
|
220
183
|
createComponent(componentClass, nodes, container) {
|
|
221
184
|
const factory = this.getComponentFactory(componentClass);
|
|
@@ -229,11 +192,11 @@ export class PopupService {
|
|
|
229
192
|
}
|
|
230
193
|
}
|
|
231
194
|
/**
|
|
232
|
-
* Projects the
|
|
195
|
+
* Projects the input options onto the component instance.
|
|
233
196
|
*
|
|
234
|
-
* @param {ComponentRef<any>} component
|
|
235
|
-
* @param {*} options
|
|
236
|
-
* @returns {ComponentRef<any>}
|
|
197
|
+
* @param {ComponentRef<any>} component The component reference.
|
|
198
|
+
* @param {*} options The options to project.
|
|
199
|
+
* @returns {ComponentRef<any>} The updated component reference.
|
|
237
200
|
*/
|
|
238
201
|
projectComponentInputs(component, options) {
|
|
239
202
|
Object.getOwnPropertyNames(options)
|
|
@@ -244,10 +207,10 @@ export class PopupService {
|
|
|
244
207
|
return component;
|
|
245
208
|
}
|
|
246
209
|
/**
|
|
247
|
-
* Gets the component and
|
|
210
|
+
* Gets the component and nodes to append from the `content` option.
|
|
248
211
|
*
|
|
249
|
-
* @param {*} content
|
|
250
|
-
* @returns {any}
|
|
212
|
+
* @param {*} content The content to use.
|
|
213
|
+
* @returns {any} The component and nodes for projection.
|
|
251
214
|
*/
|
|
252
215
|
contentFrom(content) {
|
|
253
216
|
if (!content || content instanceof TemplateRef) {
|
package/esm2022/scale.mjs
CHANGED
|
@@ -4,14 +4,10 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { InjectionToken } from '@angular/core';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* The document or container scale is required to compute the popup position correctly. Detecting the scale is not reliable and must be set by providing a value for SCALE. See [Support for Document Scale]({% slug documentscale_popup %}).
|
|
10
|
-
*
|
|
11
|
-
* > Using this token is not necessary for user-applied browser zoom.
|
|
12
|
-
*
|
|
13
|
-
* <demo metaUrl="popup/scale/" height="300"></demo>
|
|
7
|
+
* Use the `SCALE` injection token to set the document scale when you use a [scale transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale).
|
|
14
8
|
*
|
|
9
|
+
* The document or container scale is required to compute the popup position correctly. Set the value for `SCALE` to ensure correct positioning. See [Support for Document Scale]({% slug documentscale_popup %}).
|
|
15
10
|
*
|
|
11
|
+
* > You do not need to use this token for user-applied browser zoom.
|
|
16
12
|
*/
|
|
17
13
|
export const SCALE = new InjectionToken('Popup Document Scale');
|