@progress/kendo-angular-popup 5.0.0-next.202110151001 → 5.0.0-next.202203281120
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/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/bundles/kendo-angular-popup.umd.js +1 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/popup.component.js +9 -9
- package/esm2015/popup.module.js +4 -4
- package/esm2015/popup.service.js +3 -3
- package/esm2015/services/align.service.js +4 -4
- package/esm2015/services/animation.service.js +3 -4
- package/esm2015/services/dom.service.js +10 -10
- package/esm2015/services/position.service.js +3 -3
- package/esm2015/services/resize.service.js +3 -3
- package/esm2015/services/scrollable.service.js +5 -6
- package/fesm2015/kendo-angular-popup.js +45 -47
- package/main.d.ts +1 -1
- package/models/align-element-settings.interface.d.ts +1 -1
- package/models/popup-animation.interface.d.ts +4 -2
- package/models/popup-settings.d.ts +1 -1
- package/models/position-element-settings.interface.d.ts +1 -1
- package/package.json +2 -2
- package/popup.component.d.ts +1 -1
- package/schematics/collection.json +12 -0
- package/schematics/ngAdd/index.js +13 -0
- package/schematics/ngAdd/index.js.map +1 -0
- package/schematics/ngAdd/schema.json +28 -0
- package/services/dom.service.d.ts +7 -7
- package/services/scrollable.service.d.ts +3 -3
|
@@ -13,7 +13,6 @@ const UP = 'up';
|
|
|
13
13
|
const DEFAULT_TYPE = 'slide';
|
|
14
14
|
const DEFAULT_DURATION = 100;
|
|
15
15
|
const animationTypes = {};
|
|
16
|
-
/* eslint-disable object-literal-sort-keys */
|
|
17
16
|
animationTypes.expand = (direction) => {
|
|
18
17
|
const scale = direction === UP || direction === DOWN ? 'scaleY' : 'scaleX';
|
|
19
18
|
const startScale = 0;
|
|
@@ -129,8 +128,8 @@ export class AnimationService {
|
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
|
-
AnimationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
133
|
-
AnimationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
131
|
+
AnimationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AnimationService, deps: [{ token: i1.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
132
|
+
AnimationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AnimationService });
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AnimationService, decorators: [{
|
|
135
134
|
type: Injectable
|
|
136
135
|
}], ctorParameters: function () { return [{ type: i1.AnimationBuilder }]; } });
|
|
@@ -32,14 +32,14 @@ export class DOMService {
|
|
|
32
32
|
return align(settings);
|
|
33
33
|
}
|
|
34
34
|
boundingOffset(el) {
|
|
35
|
-
return boundingOffset(
|
|
35
|
+
return boundingOffset(el);
|
|
36
36
|
}
|
|
37
37
|
getFontStyles(el) {
|
|
38
38
|
const window = this.getWindow();
|
|
39
39
|
if (!window || !el) {
|
|
40
40
|
return [];
|
|
41
41
|
}
|
|
42
|
-
const computedStyles = window.getComputedStyle(
|
|
42
|
+
const computedStyles = window.getComputedStyle(el);
|
|
43
43
|
return STYLES.map(font => ({ key: font, value: computedStyles[font] }));
|
|
44
44
|
}
|
|
45
45
|
getWindow() {
|
|
@@ -55,7 +55,7 @@ export class DOMService {
|
|
|
55
55
|
if (!el) {
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
|
-
return offset(
|
|
58
|
+
return offset(el);
|
|
59
59
|
}
|
|
60
60
|
offsetAtPoint(el, currentLocation) {
|
|
61
61
|
if (!el) {
|
|
@@ -70,7 +70,7 @@ export class DOMService {
|
|
|
70
70
|
element.style.left = left;
|
|
71
71
|
element.style.top = top;
|
|
72
72
|
// prevents elements with transition to be animated because of the change
|
|
73
|
-
// eslint-disable
|
|
73
|
+
// eslint-disable-next-line no-unused-expressions
|
|
74
74
|
element.offsetHeight;
|
|
75
75
|
element.style.transition = transition;
|
|
76
76
|
return currentOffset;
|
|
@@ -85,7 +85,7 @@ export class DOMService {
|
|
|
85
85
|
if (!element || !popup) {
|
|
86
86
|
return null;
|
|
87
87
|
}
|
|
88
|
-
return positionWithScroll(
|
|
88
|
+
return positionWithScroll(element, this.nativeElement(popup), scale);
|
|
89
89
|
}
|
|
90
90
|
removeScroll(rect, scroll) {
|
|
91
91
|
return removeScroll(rect, scroll);
|
|
@@ -97,7 +97,7 @@ export class DOMService {
|
|
|
97
97
|
return scrollPosition(this.nativeElement(el));
|
|
98
98
|
}
|
|
99
99
|
scrollableParents(el) {
|
|
100
|
-
return scrollableParents(
|
|
100
|
+
return scrollableParents(el);
|
|
101
101
|
}
|
|
102
102
|
stackingElementOffset(el) {
|
|
103
103
|
const relativeContextElement = this.getRelativeContextElement(el);
|
|
@@ -136,7 +136,7 @@ export class DOMService {
|
|
|
136
136
|
return getWindowViewPort(this.nativeElement(el));
|
|
137
137
|
}
|
|
138
138
|
zIndex(anchor, container) {
|
|
139
|
-
return zIndex(
|
|
139
|
+
return zIndex(anchor, this.nativeElement(container));
|
|
140
140
|
}
|
|
141
141
|
zoomLevel() {
|
|
142
142
|
if (!isDocumentAvailable() || !isWindowAvailable()) {
|
|
@@ -148,8 +148,8 @@ export class DOMService {
|
|
|
148
148
|
return this.zoomLevel() > 1;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
DOMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
152
|
-
DOMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
151
|
+
DOMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DOMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
152
|
+
DOMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DOMService });
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DOMService, decorators: [{
|
|
154
154
|
type: Injectable
|
|
155
155
|
}] });
|
|
@@ -43,9 +43,9 @@ export class PositionService {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
PositionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
47
|
-
PositionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
46
|
+
PositionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PositionService, deps: [{ token: i1.DOMService }, { token: SCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
47
|
+
PositionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PositionService });
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PositionService, decorators: [{
|
|
49
49
|
type: Injectable
|
|
50
50
|
}], ctorParameters: function () { return [{ type: i1.DOMService }, { type: undefined, decorators: [{
|
|
51
51
|
type: Inject,
|
|
@@ -37,8 +37,8 @@ export class ResizeService {
|
|
|
37
37
|
return this.subscription && this.subscription.closed;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
ResizeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
41
|
-
ResizeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
40
|
+
ResizeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResizeService, deps: [{ token: i1.DOMService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41
|
+
ResizeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResizeService });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResizeService, decorators: [{
|
|
43
43
|
type: Injectable
|
|
44
44
|
}], ctorParameters: function () { return [{ type: i1.DOMService }, { type: i0.NgZone }]; } });
|
|
@@ -30,7 +30,6 @@ export class ScrollableService {
|
|
|
30
30
|
if (!callback || !isDocumentAvailable() || !this.element) {
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
const nativeElement = this._dom.nativeElement(this.element);
|
|
34
33
|
const parents = this._dom.scrollableParents(this.element);
|
|
35
34
|
this._zone.runOutsideAngular(() => {
|
|
36
35
|
const observables = parents.map(p => fromEvent(p, "scroll").pipe(auditTime(FRAME_DURATION)));
|
|
@@ -40,7 +39,7 @@ export class ScrollableService {
|
|
|
40
39
|
const isDocument = target === document;
|
|
41
40
|
const isWindow = target === window;
|
|
42
41
|
if (isParent || isDocument || isWindow) {
|
|
43
|
-
callback(this.isVisible(
|
|
42
|
+
callback(this.isVisible(this.element, target));
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
45
|
this.subscription = merge(...observables).subscribe(subscriber);
|
|
@@ -54,7 +53,7 @@ export class ScrollableService {
|
|
|
54
53
|
}
|
|
55
54
|
isVisible(elem, container) {
|
|
56
55
|
const elemRect = this._dom.boundingOffset(elem);
|
|
57
|
-
const containerRect = this._dom.boundingOffset(container);
|
|
56
|
+
const containerRect = this._dom.boundingOffset(this._dom.nativeElement(container));
|
|
58
57
|
if (THRESHOLD_DIFF < (containerRect.top - elemRect.bottom)) {
|
|
59
58
|
return false;
|
|
60
59
|
}
|
|
@@ -70,8 +69,8 @@ export class ScrollableService {
|
|
|
70
69
|
return true;
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
|
-
ScrollableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
74
|
-
ScrollableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
72
|
+
ScrollableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollableService, deps: [{ token: i1.DOMService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
73
|
+
ScrollableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollableService });
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollableService, decorators: [{
|
|
76
75
|
type: Injectable
|
|
77
76
|
}], ctorParameters: function () { return [{ type: i1.DOMService }, { type: i0.NgZone }]; } });
|
|
@@ -211,14 +211,14 @@ class DOMService {
|
|
|
211
211
|
return align(settings);
|
|
212
212
|
}
|
|
213
213
|
boundingOffset(el) {
|
|
214
|
-
return boundingOffset(
|
|
214
|
+
return boundingOffset(el);
|
|
215
215
|
}
|
|
216
216
|
getFontStyles(el) {
|
|
217
217
|
const window = this.getWindow();
|
|
218
218
|
if (!window || !el) {
|
|
219
219
|
return [];
|
|
220
220
|
}
|
|
221
|
-
const computedStyles = window.getComputedStyle(
|
|
221
|
+
const computedStyles = window.getComputedStyle(el);
|
|
222
222
|
return STYLES.map(font => ({ key: font, value: computedStyles[font] }));
|
|
223
223
|
}
|
|
224
224
|
getWindow() {
|
|
@@ -234,7 +234,7 @@ class DOMService {
|
|
|
234
234
|
if (!el) {
|
|
235
235
|
return null;
|
|
236
236
|
}
|
|
237
|
-
return offset(
|
|
237
|
+
return offset(el);
|
|
238
238
|
}
|
|
239
239
|
offsetAtPoint(el, currentLocation) {
|
|
240
240
|
if (!el) {
|
|
@@ -249,7 +249,7 @@ class DOMService {
|
|
|
249
249
|
element.style.left = left;
|
|
250
250
|
element.style.top = top;
|
|
251
251
|
// prevents elements with transition to be animated because of the change
|
|
252
|
-
// eslint-disable
|
|
252
|
+
// eslint-disable-next-line no-unused-expressions
|
|
253
253
|
element.offsetHeight;
|
|
254
254
|
element.style.transition = transition;
|
|
255
255
|
return currentOffset;
|
|
@@ -264,7 +264,7 @@ class DOMService {
|
|
|
264
264
|
if (!element || !popup) {
|
|
265
265
|
return null;
|
|
266
266
|
}
|
|
267
|
-
return positionWithScroll(
|
|
267
|
+
return positionWithScroll(element, this.nativeElement(popup), scale);
|
|
268
268
|
}
|
|
269
269
|
removeScroll(rect, scroll) {
|
|
270
270
|
return removeScroll(rect, scroll);
|
|
@@ -276,7 +276,7 @@ class DOMService {
|
|
|
276
276
|
return scrollPosition(this.nativeElement(el));
|
|
277
277
|
}
|
|
278
278
|
scrollableParents(el) {
|
|
279
|
-
return scrollableParents(
|
|
279
|
+
return scrollableParents(el);
|
|
280
280
|
}
|
|
281
281
|
stackingElementOffset(el) {
|
|
282
282
|
const relativeContextElement = this.getRelativeContextElement(el);
|
|
@@ -315,7 +315,7 @@ class DOMService {
|
|
|
315
315
|
return getWindowViewPort(this.nativeElement(el));
|
|
316
316
|
}
|
|
317
317
|
zIndex(anchor, container) {
|
|
318
|
-
return zIndex(
|
|
318
|
+
return zIndex(anchor, this.nativeElement(container));
|
|
319
319
|
}
|
|
320
320
|
zoomLevel() {
|
|
321
321
|
if (!isDocumentAvailable() || !isWindowAvailable()) {
|
|
@@ -327,9 +327,9 @@ class DOMService {
|
|
|
327
327
|
return this.zoomLevel() > 1;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
DOMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
331
|
-
DOMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
330
|
+
DOMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DOMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
331
|
+
DOMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DOMService });
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DOMService, decorators: [{
|
|
333
333
|
type: Injectable
|
|
334
334
|
}] });
|
|
335
335
|
|
|
@@ -346,7 +346,7 @@ class AlignService {
|
|
|
346
346
|
const scale = this.scale || 1;
|
|
347
347
|
const fixedMode = positionMode === 'fixed' || !this._dom.hasOffsetParent(element);
|
|
348
348
|
const anchorRect = fixedMode ? this.absoluteRect(anchor, element, offset, scale) : this.relativeRect(anchor, element, offset, scale);
|
|
349
|
-
const elementRect = scaleRect(this._dom.offset(element), scale);
|
|
349
|
+
const elementRect = scaleRect(this._dom.offset(element.nativeElement), scale);
|
|
350
350
|
const result = this._dom.align({
|
|
351
351
|
anchorAlign: anchorAlign,
|
|
352
352
|
anchorRect: anchorRect,
|
|
@@ -380,9 +380,9 @@ class AlignService {
|
|
|
380
380
|
return scaleRect(rect, scale);
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
|
-
AlignService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
384
|
-
AlignService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
383
|
+
AlignService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AlignService, deps: [{ token: DOMService }, { token: SCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
384
|
+
AlignService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AlignService });
|
|
385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AlignService, decorators: [{
|
|
386
386
|
type: Injectable
|
|
387
387
|
}], ctorParameters: function () { return [{ type: DOMService }, { type: undefined, decorators: [{
|
|
388
388
|
type: Inject,
|
|
@@ -427,9 +427,9 @@ class PositionService {
|
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
PositionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
431
|
-
PositionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
432
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
430
|
+
PositionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PositionService, deps: [{ token: DOMService }, { token: SCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
431
|
+
PositionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PositionService });
|
|
432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PositionService, decorators: [{
|
|
433
433
|
type: Injectable
|
|
434
434
|
}], ctorParameters: function () { return [{ type: DOMService }, { type: undefined, decorators: [{
|
|
435
435
|
type: Inject,
|
|
@@ -466,9 +466,9 @@ class ResizeService {
|
|
|
466
466
|
return this.subscription && this.subscription.closed;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
ResizeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
470
|
-
ResizeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
471
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
469
|
+
ResizeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResizeService, deps: [{ token: DOMService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
470
|
+
ResizeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResizeService });
|
|
471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ResizeService, decorators: [{
|
|
472
472
|
type: Injectable
|
|
473
473
|
}], ctorParameters: function () { return [{ type: DOMService }, { type: i0.NgZone }]; } });
|
|
474
474
|
|
|
@@ -493,7 +493,6 @@ class ScrollableService {
|
|
|
493
493
|
if (!callback || !isDocumentAvailable() || !this.element) {
|
|
494
494
|
return;
|
|
495
495
|
}
|
|
496
|
-
const nativeElement = this._dom.nativeElement(this.element);
|
|
497
496
|
const parents = this._dom.scrollableParents(this.element);
|
|
498
497
|
this._zone.runOutsideAngular(() => {
|
|
499
498
|
const observables = parents.map(p => fromEvent(p, "scroll").pipe(auditTime(FRAME_DURATION)));
|
|
@@ -503,7 +502,7 @@ class ScrollableService {
|
|
|
503
502
|
const isDocument = target === document;
|
|
504
503
|
const isWindow = target === window;
|
|
505
504
|
if (isParent || isDocument || isWindow) {
|
|
506
|
-
callback(this.isVisible(
|
|
505
|
+
callback(this.isVisible(this.element, target));
|
|
507
506
|
}
|
|
508
507
|
};
|
|
509
508
|
this.subscription = merge(...observables).subscribe(subscriber);
|
|
@@ -517,7 +516,7 @@ class ScrollableService {
|
|
|
517
516
|
}
|
|
518
517
|
isVisible(elem, container) {
|
|
519
518
|
const elemRect = this._dom.boundingOffset(elem);
|
|
520
|
-
const containerRect = this._dom.boundingOffset(container);
|
|
519
|
+
const containerRect = this._dom.boundingOffset(this._dom.nativeElement(container));
|
|
521
520
|
if (THRESHOLD_DIFF < (containerRect.top - elemRect.bottom)) {
|
|
522
521
|
return false;
|
|
523
522
|
}
|
|
@@ -533,9 +532,9 @@ class ScrollableService {
|
|
|
533
532
|
return true;
|
|
534
533
|
}
|
|
535
534
|
}
|
|
536
|
-
ScrollableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
537
|
-
ScrollableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
535
|
+
ScrollableService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollableService, deps: [{ token: DOMService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
536
|
+
ScrollableService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollableService });
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScrollableService, decorators: [{
|
|
539
538
|
type: Injectable
|
|
540
539
|
}], ctorParameters: function () { return [{ type: DOMService }, { type: i0.NgZone }]; } });
|
|
541
540
|
|
|
@@ -546,7 +545,6 @@ const UP = 'up';
|
|
|
546
545
|
const DEFAULT_TYPE = 'slide';
|
|
547
546
|
const DEFAULT_DURATION = 100;
|
|
548
547
|
const animationTypes = {};
|
|
549
|
-
/* eslint-disable object-literal-sort-keys */
|
|
550
548
|
animationTypes.expand = (direction) => {
|
|
551
549
|
const scale = direction === UP || direction === DOWN ? 'scaleY' : 'scaleX';
|
|
552
550
|
const startScale = 0;
|
|
@@ -662,9 +660,9 @@ class AnimationService {
|
|
|
662
660
|
}
|
|
663
661
|
}
|
|
664
662
|
}
|
|
665
|
-
AnimationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
666
|
-
AnimationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
667
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
663
|
+
AnimationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AnimationService, deps: [{ token: i1.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
664
|
+
AnimationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AnimationService });
|
|
665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AnimationService, decorators: [{
|
|
668
666
|
type: Injectable
|
|
669
667
|
}], ctorParameters: function () { return [{ type: i1.AnimationBuilder }]; } });
|
|
670
668
|
|
|
@@ -675,7 +673,7 @@ const packageMetadata = {
|
|
|
675
673
|
name: '@progress/kendo-angular-popup',
|
|
676
674
|
productName: 'Kendo UI for Angular',
|
|
677
675
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
678
|
-
publishDate:
|
|
676
|
+
publishDate: 1648466372,
|
|
679
677
|
version: '',
|
|
680
678
|
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'
|
|
681
679
|
};
|
|
@@ -869,11 +867,12 @@ class PopupComponent {
|
|
|
869
867
|
this._resizeService.subscribe(this.reposition);
|
|
870
868
|
this.animationSubscriptions = this.animationService.start.subscribe(this.onAnimationStart.bind(this));
|
|
871
869
|
this.animationSubscriptions.add(this.animationService.end.subscribe(this.onAnimationEnd.bind(this)));
|
|
872
|
-
this._scrollableService.forElement(this.anchor || this.container).subscribe(this.onScroll.bind(this));
|
|
870
|
+
this._scrollableService.forElement(this.domService.nativeElement(this.anchor) || this.container.nativeElement).subscribe(this.onScroll.bind(this));
|
|
873
871
|
this.currentOffset = DEFAULT_OFFSET;
|
|
874
872
|
this.setZIndex();
|
|
875
873
|
this.copyFontStyles();
|
|
876
874
|
this.updateFixedClass();
|
|
875
|
+
this.reposition();
|
|
877
876
|
}
|
|
878
877
|
ngOnChanges(changes) {
|
|
879
878
|
if (changes.copyAnchorStyles) {
|
|
@@ -884,7 +883,6 @@ class PopupComponent {
|
|
|
884
883
|
}
|
|
885
884
|
}
|
|
886
885
|
ngAfterViewInit() {
|
|
887
|
-
this.reposition();
|
|
888
886
|
if (!this.animate) {
|
|
889
887
|
this.resolvedPromise.then(() => {
|
|
890
888
|
this.onAnimationEnd();
|
|
@@ -939,7 +937,7 @@ class PopupComponent {
|
|
|
939
937
|
}
|
|
940
938
|
setZIndex() {
|
|
941
939
|
if (this.anchor) {
|
|
942
|
-
this.setContainerStyle('z-index', String(this.domService.zIndex(this.anchor, this.container)));
|
|
940
|
+
this.setContainerStyle('z-index', String(this.domService.zIndex(this.domService.nativeElement(this.anchor), this.container)));
|
|
943
941
|
}
|
|
944
942
|
}
|
|
945
943
|
reposition() {
|
|
@@ -960,7 +958,7 @@ class PopupComponent {
|
|
|
960
958
|
}
|
|
961
959
|
position() {
|
|
962
960
|
const alignedOffset = this._alignService.alignElement({
|
|
963
|
-
anchor: this.anchor,
|
|
961
|
+
anchor: this.domService.nativeElement(this.anchor),
|
|
964
962
|
anchorAlign: this.anchorAlign,
|
|
965
963
|
element: this.container,
|
|
966
964
|
elementAlign: this.popupAlign,
|
|
@@ -969,7 +967,7 @@ class PopupComponent {
|
|
|
969
967
|
positionMode: this.positionMode
|
|
970
968
|
});
|
|
971
969
|
return this._positionService.positionElement({
|
|
972
|
-
anchor: this.anchor,
|
|
970
|
+
anchor: this.domService.nativeElement(this.anchor),
|
|
973
971
|
anchorAlign: this.anchorAlign,
|
|
974
972
|
collisions: this.collision,
|
|
975
973
|
currentLocation: alignedOffset,
|
|
@@ -993,7 +991,7 @@ class PopupComponent {
|
|
|
993
991
|
if (!this.anchor || !this.copyAnchorStyles) {
|
|
994
992
|
return;
|
|
995
993
|
}
|
|
996
|
-
this.domService.getFontStyles(this.anchor)
|
|
994
|
+
this.domService.getFontStyles(this.domService.nativeElement(this.anchor))
|
|
997
995
|
.forEach(s => this.setContainerStyle(s.key, s.value));
|
|
998
996
|
}
|
|
999
997
|
updateFixedClass() {
|
|
@@ -1009,8 +1007,8 @@ class PopupComponent {
|
|
|
1009
1007
|
}
|
|
1010
1008
|
}
|
|
1011
1009
|
}
|
|
1012
|
-
PopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1013
|
-
PopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1010
|
+
PopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupComponent, deps: [{ token: i0.ElementRef }, { token: AlignService }, { token: DOMService }, { token: PositionService }, { token: ResizeService }, { token: ScrollableService }, { token: AnimationService }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1011
|
+
PopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PopupComponent, selector: "kendo-popup", inputs: { animate: "animate", anchor: "anchor", anchorAlign: "anchorAlign", collision: "collision", popupAlign: "popupAlign", copyAnchorStyles: "copyAnchorStyles", popupClass: "popupClass", positionMode: "positionMode", offset: "offset", margin: "margin" }, outputs: { anchorViewportLeave: "anchorViewportLeave", close: "close", open: "open", positionChange: "positionChange" }, providers: [AlignService, AnimationService, DOMService, PositionService, ResizeService, ScrollableService], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["container"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ResizeSensorComponent, descendants: true, static: true }], exportAs: ["kendo-popup"], usesOnChanges: true, ngImport: i0, template: `
|
|
1014
1012
|
<div class="k-popup" [ngClass]="popupClass" #container>
|
|
1015
1013
|
<ng-content></ng-content>
|
|
1016
1014
|
<ng-template [ngTemplateOutlet]="content" [ngIf]="content"></ng-template>
|
|
@@ -1018,7 +1016,7 @@ PopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
|
|
|
1018
1016
|
</kendo-resize-sensor>
|
|
1019
1017
|
</div>
|
|
1020
1018
|
`, isInline: true, components: [{ type: i7.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1021
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupComponent, decorators: [{
|
|
1022
1020
|
type: Component,
|
|
1023
1021
|
args: [{
|
|
1024
1022
|
exportAs: 'kendo-popup',
|
|
@@ -1298,9 +1296,9 @@ class PopupService {
|
|
|
1298
1296
|
};
|
|
1299
1297
|
}
|
|
1300
1298
|
}
|
|
1301
|
-
PopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1302
|
-
PopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1299
|
+
PopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupService, deps: [{ token: i0.ApplicationRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: POPUP_CONTAINER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1300
|
+
PopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupService });
|
|
1301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupService, decorators: [{
|
|
1304
1302
|
type: Injectable
|
|
1305
1303
|
}], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ElementRef, decorators: [{
|
|
1306
1304
|
type: Inject,
|
|
@@ -1343,10 +1341,10 @@ const POPUP_DIRECTIVES = [PopupComponent];
|
|
|
1343
1341
|
*/
|
|
1344
1342
|
class PopupModule {
|
|
1345
1343
|
}
|
|
1346
|
-
PopupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1347
|
-
PopupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1348
|
-
PopupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1344
|
+
PopupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1345
|
+
PopupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupModule, declarations: [PopupComponent], imports: [CommonModule, ResizeSensorModule], exports: [PopupComponent] });
|
|
1346
|
+
PopupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupModule, providers: [PopupService], imports: [[CommonModule, ResizeSensorModule]] });
|
|
1347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PopupModule, decorators: [{
|
|
1350
1348
|
type: NgModule,
|
|
1351
1349
|
args: [{
|
|
1352
1350
|
declarations: [POPUP_DIRECTIVES],
|
package/main.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { Margin } from './models/margin.interface';
|
|
|
9
9
|
export { PopupSettings } from './models/popup-settings';
|
|
10
10
|
export { PopupRef } from './models/popup-ref';
|
|
11
11
|
export { PositionMode } from './models/position-mode';
|
|
12
|
-
export { PopupAnimation } from './models/popup-animation.interface';
|
|
12
|
+
export { PopupAnimation, AnimationType, AnimationDirection } from './models/popup-animation.interface';
|
|
13
13
|
export { PopupService, POPUP_CONTAINER } from './popup.service';
|
|
14
14
|
export { PopupComponent } from './popup.component';
|
|
15
15
|
export { PopupModule } from './popup.module';
|
|
@@ -10,7 +10,7 @@ export interface PopupAnimation {
|
|
|
10
10
|
* The type of the animation.
|
|
11
11
|
* @default 'slide'
|
|
12
12
|
*/
|
|
13
|
-
type?:
|
|
13
|
+
type?: AnimationType;
|
|
14
14
|
/**
|
|
15
15
|
* The animation duration in milliseconds.
|
|
16
16
|
* @default 100
|
|
@@ -20,5 +20,7 @@ export interface PopupAnimation {
|
|
|
20
20
|
* The animation direction. Applicable if the type is set to `slide` or `expand`.
|
|
21
21
|
* @default 'down'
|
|
22
22
|
*/
|
|
23
|
-
direction:
|
|
23
|
+
direction: AnimationDirection;
|
|
24
24
|
}
|
|
25
|
+
export declare type AnimationType = 'slide' | 'expand' | 'zoom' | 'fade';
|
|
26
|
+
export declare type AnimationDirection = 'down' | 'up' | 'left' | 'right';
|
|
@@ -24,7 +24,7 @@ export interface PopupSettings {
|
|
|
24
24
|
/**
|
|
25
25
|
* Specifies the element which will be used as an anchor. The Popup opens next to that element.
|
|
26
26
|
*/
|
|
27
|
-
anchor?: ElementRef;
|
|
27
|
+
anchor?: ElementRef | HTMLElement;
|
|
28
28
|
/**
|
|
29
29
|
* Defines the container to which the Popup will be appended.
|
|
30
30
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-popup",
|
|
3
|
-
"version": "5.0.0-next.
|
|
3
|
+
"version": "5.0.0-next.202203281120",
|
|
4
4
|
"description": "Kendo UI Angular Popup component",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@progress/kendo-popup-common": "^1.7.0",
|
|
26
|
-
"@progress/kendo-schematics": "^
|
|
26
|
+
"@progress/kendo-schematics": "^2.0.0",
|
|
27
27
|
"tslib": "^2.3.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
package/popup.component.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare class PopupComponent implements AfterViewInit, OnInit, OnChanges,
|
|
|
55
55
|
* Specifies the element that will be used as an anchor. The Popup opens next to that element.
|
|
56
56
|
* ([see example]({% slug alignmentpositioning_popup %}#toc-aligning-to-components)).
|
|
57
57
|
*/
|
|
58
|
-
anchor: ElementRef;
|
|
58
|
+
anchor: ElementRef | HTMLElement;
|
|
59
59
|
/**
|
|
60
60
|
* Specifies the anchor pivot point
|
|
61
61
|
* ([see example]({% slug alignmentpositioning_popup %}#toc-positioning)).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"ng-add": {
|
|
5
|
+
"description": "Adds Kendo Angular Package to the application.",
|
|
6
|
+
"factory": "./ngAdd",
|
|
7
|
+
"schema": "./ngAdd/schema.json",
|
|
8
|
+
"hidden": true,
|
|
9
|
+
"private": true
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
8
|
+
function default_1(options) {
|
|
9
|
+
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'PopupModule', package: 'popup' //package name, e.g grid
|
|
10
|
+
});
|
|
11
|
+
return schematics_1.externalSchematic('@progress/kendo-schematics', 'ng-add', finalOptions);
|
|
12
|
+
}
|
|
13
|
+
exports.default = default_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tooling/schematics/ngAdd/index.ts"],"names":[],"mappings":";;AAAA,2DAKqC;AAErC,mBAAyB,OAAY;IACjC,MAAM,YAAY,mCACX,OAAO,KACV,YAAY,EAAE,aAAa,EAC3B,OAAO,EAAE,OAAO,CAAC,wBAAwB;OAC5C,CAAC;IAEF,OAAO,8BAAiB,CAAC,4BAA4B,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AACnF,CAAC;AARD,4BAQC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "SchematicsKendoAngularPopup",
|
|
4
|
+
"title": "Kendo Angular Popup Options Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"theme": {
|
|
8
|
+
"enum": [
|
|
9
|
+
"default",
|
|
10
|
+
"bootstrap",
|
|
11
|
+
"material"
|
|
12
|
+
],
|
|
13
|
+
"default": "default",
|
|
14
|
+
"description": "The theme to apply"
|
|
15
|
+
},
|
|
16
|
+
"export": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"default": false,
|
|
19
|
+
"description": "Specifies if declaring module exports the component."
|
|
20
|
+
},
|
|
21
|
+
"skipInstall": {
|
|
22
|
+
"description": "Skip installing Kendo dependency packages.",
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": []
|
|
28
|
+
}
|