@progress/kendo-angular-popup 4.0.6 → 5.0.0-dev.202204131653
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/bundles/kendo-angular-popup.umd.js +5 -0
- package/{dist/es2015/models/position-mode.js → esm2015/kendo-angular-popup.js} +2 -1
- package/{dist/es → esm2015}/main.js +0 -0
- package/{dist/es → esm2015}/models/align-element-settings.interface.js +1 -0
- package/{dist/es2015 → esm2015}/models/align.interface.js +1 -0
- package/{dist/es2015 → esm2015}/models/collision.interface.js +1 -0
- package/{dist/es2015 → esm2015}/models/collision.type.js +1 -0
- package/{dist/es → esm2015}/models/margin.interface.js +1 -0
- package/{dist/es → esm2015}/models/offset.interface.js +1 -0
- package/{dist/es → esm2015}/models/popup-animation.interface.js +1 -0
- package/{dist/es → esm2015}/models/popup-ref.js +1 -0
- package/{dist/es → esm2015}/models/popup-settings.js +1 -0
- package/{dist/es → esm2015}/models/position-element-settings.interface.js +1 -0
- package/{dist/es → esm2015}/models/position-mode.js +1 -0
- package/{dist/es → esm2015}/models/position.interface.js +1 -0
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/popup.component.js +64 -86
- package/{dist/es2015 → esm2015}/popup.module.js +16 -13
- package/{dist/es2015 → esm2015}/popup.service.js +14 -15
- package/{dist/es2015 → esm2015}/scale.js +0 -0
- package/{dist/es2015 → esm2015}/services/align.service.js +14 -10
- package/{dist/es2015 → esm2015}/services/animation.service.js +10 -10
- package/{dist/es2015 → esm2015}/services/dom.service.js +9 -8
- package/{dist/es2015 → esm2015}/services/position.service.js +14 -10
- package/{dist/es2015 → esm2015}/services/resize.service.js +10 -10
- package/{dist/es2015 → esm2015}/services/scrollable.service.js +10 -10
- package/{dist/es2015 → esm2015}/util.js +5 -10
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-popup.js} +205 -192
- package/kendo-angular-popup.d.ts +9 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +1 -1
- package/{dist/es2015/models → models}/align-element-settings.interface.d.ts +0 -0
- package/{dist/es2015/models → models}/align.interface.d.ts +0 -0
- package/{dist/es2015/models → models}/collision.interface.d.ts +0 -0
- package/{dist/es2015/models → models}/collision.type.d.ts +0 -0
- package/{dist/es2015/models → models}/margin.interface.d.ts +0 -0
- package/{dist/es2015/models → models}/offset.interface.d.ts +0 -0
- package/{dist/es2015/models → models}/popup-animation.interface.d.ts +4 -2
- package/{dist/es2015/models → models}/popup-ref.d.ts +0 -0
- package/{dist/es2015/models → models}/popup-settings.d.ts +0 -0
- package/{dist/es2015/models → models}/position-element-settings.interface.d.ts +0 -0
- package/{dist/es2015/models → models}/position-mode.d.ts +0 -0
- package/{dist/es2015/models → models}/position.interface.d.ts +0 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +34 -99
- package/{dist/es2015/popup.component.d.ts → popup.component.d.ts} +5 -1
- package/{dist/es2015/popup.module.d.ts → popup.module.d.ts} +7 -0
- package/{dist/es2015/popup.service.d.ts → popup.service.d.ts} +5 -2
- package/{dist/es2015/scale.d.ts → scale.d.ts} +0 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/services → services}/align.service.d.ts +3 -0
- package/{dist/es2015/services → services}/animation.service.d.ts +3 -0
- package/{dist/es2015/services → services}/dom.service.d.ts +3 -0
- package/{dist/es2015/services → services}/position.service.d.ts +3 -0
- package/{dist/es2015/services → services}/resize.service.d.ts +3 -0
- package/{dist/es2015/services → services}/scrollable.service.d.ts +3 -0
- package/{dist/es2015/util.d.ts → util.d.ts} +1 -1
- package/dist/cdn/js/kendo-angular-popup.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/index.js +0 -14
- package/dist/es/models/align.interface.js +0 -4
- package/dist/es/models/collision.interface.js +0 -4
- package/dist/es/models/collision.type.js +0 -4
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/popup.component.js +0 -438
- package/dist/es/popup.module.js +0 -57
- package/dist/es/popup.service.js +0 -254
- package/dist/es/scale.js +0 -21
- package/dist/es/services/align.service.js +0 -64
- package/dist/es/services/animation.service.js +0 -137
- package/dist/es/services/dom.service.js +0 -158
- package/dist/es/services/position.service.js +0 -53
- package/dist/es/services/resize.service.js +0 -46
- package/dist/es/services/scrollable.service.js +0 -78
- package/dist/es/util.js +0 -168
- package/dist/es2015/index.d.ts +0 -14
- package/dist/es2015/index.js +0 -14
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/main.js +0 -8
- package/dist/es2015/models/align-element-settings.interface.js +0 -4
- package/dist/es2015/models/margin.interface.js +0 -4
- package/dist/es2015/models/offset.interface.js +0 -4
- package/dist/es2015/models/popup-animation.interface.js +0 -4
- package/dist/es2015/models/popup-ref.js +0 -4
- package/dist/es2015/models/popup-settings.js +0 -4
- package/dist/es2015/models/position-element-settings.interface.js +0 -4
- package/dist/es2015/models/position.interface.js +0 -4
- package/dist/fesm5/index.js +0 -1381
- package/dist/npm/index.js +0 -23
- package/dist/npm/main.js +0 -15
- package/dist/npm/models/align-element-settings.interface.js +0 -6
- package/dist/npm/models/align.interface.js +0 -6
- package/dist/npm/models/collision.interface.js +0 -6
- package/dist/npm/models/collision.type.js +0 -6
- package/dist/npm/models/margin.interface.js +0 -6
- package/dist/npm/models/offset.interface.js +0 -6
- package/dist/npm/models/popup-animation.interface.js +0 -6
- package/dist/npm/models/popup-ref.js +0 -6
- package/dist/npm/models/popup-settings.js +0 -6
- package/dist/npm/models/position-element-settings.interface.js +0 -6
- package/dist/npm/models/position-mode.js +0 -9
- package/dist/npm/models/position.interface.js +0 -6
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/popup.component.js +0 -440
- package/dist/npm/popup.module.js +0 -59
- package/dist/npm/popup.service.js +0 -256
- package/dist/npm/scale.js +0 -23
- package/dist/npm/services/align.service.js +0 -66
- package/dist/npm/services/animation.service.js +0 -139
- package/dist/npm/services/dom.service.js +0 -160
- package/dist/npm/services/position.service.js +0 -55
- package/dist/npm/services/resize.service.js +0 -48
- package/dist/npm/services/scrollable.service.js +0 -80
- package/dist/npm/util.js +0 -173
- package/dist/systemjs/kendo-angular-popup.js +0 -5
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var dom_service_1 = require("./dom.service");
|
|
10
|
-
var util_1 = require("../util");
|
|
11
|
-
var scale_1 = require("../scale");
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
var PositionService = /** @class */ (function () {
|
|
16
|
-
function PositionService(_dom, scale) {
|
|
17
|
-
if (scale === void 0) { scale = 1; }
|
|
18
|
-
this._dom = _dom;
|
|
19
|
-
this.scale = scale;
|
|
20
|
-
}
|
|
21
|
-
PositionService.prototype.positionElement = function (settings) {
|
|
22
|
-
var anchor = settings.anchor, currentLocation = settings.currentLocation, element = settings.element, anchorAlign = settings.anchorAlign, elementAlign = settings.elementAlign, collisions = settings.collisions, margin = settings.margin;
|
|
23
|
-
var dom = this._dom;
|
|
24
|
-
var scale = this.scale || 1;
|
|
25
|
-
var elementOffset = dom.offsetAtPoint(element, currentLocation);
|
|
26
|
-
var elementRect = util_1.scaleRect(elementOffset, scale);
|
|
27
|
-
var anchorOffset = util_1.scaleRect(dom.offset(anchor), scale);
|
|
28
|
-
var anchorRect = util_1.eitherRect(anchorOffset, currentLocation);
|
|
29
|
-
var viewPort = settings.viewPort || dom.windowViewPort(element);
|
|
30
|
-
viewPort.width = viewPort.width / scale;
|
|
31
|
-
viewPort.height = viewPort.height / scale;
|
|
32
|
-
var result = dom.restrictToView({
|
|
33
|
-
anchorAlign: anchorAlign,
|
|
34
|
-
anchorRect: anchorRect,
|
|
35
|
-
collisions: collisions,
|
|
36
|
-
elementAlign: elementAlign,
|
|
37
|
-
elementRect: elementRect,
|
|
38
|
-
margin: margin,
|
|
39
|
-
viewPort: viewPort
|
|
40
|
-
});
|
|
41
|
-
var offset = dom.addOffset(currentLocation, result.offset);
|
|
42
|
-
return {
|
|
43
|
-
flip: result.flip,
|
|
44
|
-
flipped: result.flipped,
|
|
45
|
-
offset: offset
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
PositionService = tslib_1.__decorate([
|
|
49
|
-
core_1.Injectable(),
|
|
50
|
-
tslib_1.__param(1, core_1.Inject(scale_1.SCALE)), tslib_1.__param(1, core_1.Optional()),
|
|
51
|
-
tslib_1.__metadata("design:paramtypes", [dom_service_1.DOMService, Number])
|
|
52
|
-
], PositionService);
|
|
53
|
-
return PositionService;
|
|
54
|
-
}());
|
|
55
|
-
exports.PositionService = PositionService;
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var rxjs_1 = require("rxjs");
|
|
10
|
-
var operators_1 = require("rxjs/operators");
|
|
11
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
12
|
-
var util_1 = require("../util");
|
|
13
|
-
var dom_service_1 = require("./dom.service");
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
var ResizeService = /** @class */ (function () {
|
|
18
|
-
function ResizeService(_dom, _zone) {
|
|
19
|
-
this._dom = _dom;
|
|
20
|
-
this._zone = _zone;
|
|
21
|
-
}
|
|
22
|
-
ResizeService.prototype.subscribe = function (callback) {
|
|
23
|
-
var _this = this;
|
|
24
|
-
if (!kendo_angular_common_1.isDocumentAvailable()) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
this._zone.runOutsideAngular(function () {
|
|
28
|
-
_this.subscription = rxjs_1.fromEvent(_this._dom.getWindow(), "resize")
|
|
29
|
-
.pipe(operators_1.auditTime(util_1.FRAME_DURATION))
|
|
30
|
-
.subscribe(function () { return callback(); });
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
ResizeService.prototype.unsubscribe = function () {
|
|
34
|
-
if (!this.subscription) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
this.subscription.unsubscribe();
|
|
38
|
-
};
|
|
39
|
-
ResizeService.prototype.isUnsubscribed = function () {
|
|
40
|
-
return this.subscription && this.subscription.closed;
|
|
41
|
-
};
|
|
42
|
-
ResizeService = tslib_1.__decorate([
|
|
43
|
-
core_1.Injectable(),
|
|
44
|
-
tslib_1.__metadata("design:paramtypes", [dom_service_1.DOMService, core_1.NgZone])
|
|
45
|
-
], ResizeService);
|
|
46
|
-
return ResizeService;
|
|
47
|
-
}());
|
|
48
|
-
exports.ResizeService = ResizeService;
|
|
@@ -1,80 +0,0 @@
|
|
|
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
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var rxjs_1 = require("rxjs");
|
|
10
|
-
var operators_1 = require("rxjs/operators");
|
|
11
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
12
|
-
var dom_service_1 = require("./dom.service");
|
|
13
|
-
var util_1 = require("../util");
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
exports.THRESHOLD_DIFF = 1;
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
var ScrollableService = /** @class */ (function () {
|
|
22
|
-
function ScrollableService(_dom, _zone) {
|
|
23
|
-
this._dom = _dom;
|
|
24
|
-
this._zone = _zone;
|
|
25
|
-
}
|
|
26
|
-
ScrollableService.prototype.forElement = function (element) {
|
|
27
|
-
this.unsubscribe();
|
|
28
|
-
this.element = element;
|
|
29
|
-
return this;
|
|
30
|
-
};
|
|
31
|
-
ScrollableService.prototype.subscribe = function (callback) {
|
|
32
|
-
var _this = this;
|
|
33
|
-
if (!callback || !kendo_angular_common_1.isDocumentAvailable() || !this.element) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
var parents = this._dom.scrollableParents(this.element);
|
|
37
|
-
this._zone.runOutsideAngular(function () {
|
|
38
|
-
var observables = parents.map(function (p) { return rxjs_1.fromEvent(p, "scroll").pipe(operators_1.auditTime(util_1.FRAME_DURATION)); });
|
|
39
|
-
var subscriber = function (e) {
|
|
40
|
-
var target = e.target;
|
|
41
|
-
var isParent = parents.filter(function (p) { return p === target; }).length > 0;
|
|
42
|
-
var isDocument = target === document;
|
|
43
|
-
var isWindow = target === window;
|
|
44
|
-
if (isParent || isDocument || isWindow) {
|
|
45
|
-
callback(_this.isVisible(_this.element, target));
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
_this.subscription = rxjs_1.merge.apply(void 0, observables).subscribe(subscriber);
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
ScrollableService.prototype.unsubscribe = function () {
|
|
52
|
-
if (!this.subscription) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
this.subscription.unsubscribe();
|
|
56
|
-
};
|
|
57
|
-
ScrollableService.prototype.isVisible = function (elem, container) {
|
|
58
|
-
var elemRect = this._dom.boundingOffset(elem);
|
|
59
|
-
var containerRect = this._dom.boundingOffset(this._dom.nativeElement(container));
|
|
60
|
-
if (exports.THRESHOLD_DIFF < (containerRect.top - elemRect.bottom)) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
if (exports.THRESHOLD_DIFF < (elemRect.top - containerRect.bottom)) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
if (exports.THRESHOLD_DIFF < (elemRect.left - containerRect.right)) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
if (exports.THRESHOLD_DIFF < (containerRect.left - elemRect.right)) {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
return true;
|
|
73
|
-
};
|
|
74
|
-
ScrollableService = tslib_1.__decorate([
|
|
75
|
-
core_1.Injectable(),
|
|
76
|
-
tslib_1.__metadata("design:paramtypes", [dom_service_1.DOMService, core_1.NgZone])
|
|
77
|
-
], ScrollableService);
|
|
78
|
-
return ScrollableService;
|
|
79
|
-
}());
|
|
80
|
-
exports.ScrollableService = ScrollableService;
|
package/dist/npm/util.js
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
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
|
-
var kendo_popup_common_1 = require("@progress/kendo-popup-common");
|
|
8
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
exports.eitherRect = function (rect, offset) {
|
|
13
|
-
if (!rect) {
|
|
14
|
-
return { height: 0, left: offset.left, top: offset.top, width: 0 };
|
|
15
|
-
}
|
|
16
|
-
return rect;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
exports.replaceOffset = function (rect, offset) {
|
|
22
|
-
if (!offset) {
|
|
23
|
-
return rect;
|
|
24
|
-
}
|
|
25
|
-
var result = {
|
|
26
|
-
height: rect.height,
|
|
27
|
-
left: offset.left,
|
|
28
|
-
top: offset.top,
|
|
29
|
-
width: rect.width
|
|
30
|
-
};
|
|
31
|
-
return result;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
exports.removeStackingOffset = function (rect, stackingOffset) {
|
|
37
|
-
if (!stackingOffset) {
|
|
38
|
-
return rect;
|
|
39
|
-
}
|
|
40
|
-
var result = {
|
|
41
|
-
height: rect.height,
|
|
42
|
-
left: rect.left - stackingOffset.left,
|
|
43
|
-
top: rect.top - stackingOffset.top,
|
|
44
|
-
width: rect.width
|
|
45
|
-
};
|
|
46
|
-
return result;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
exports.isDifferentOffset = function (oldOffset, newOffset) {
|
|
52
|
-
var oldLeft = oldOffset.left, oldTop = oldOffset.top;
|
|
53
|
-
var newLeft = newOffset.left, newTop = newOffset.top;
|
|
54
|
-
return Math.abs(oldLeft - newLeft) >= 1 || Math.abs(oldTop - newTop) >= 1;
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* @hidden
|
|
58
|
-
*/
|
|
59
|
-
exports.isWindowAvailable = function () {
|
|
60
|
-
return typeof window !== 'undefined';
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* @hidden
|
|
64
|
-
*/
|
|
65
|
-
exports.hasBoundingRect = function (elem) { return !!elem.getBoundingClientRect; };
|
|
66
|
-
/**
|
|
67
|
-
* @hidden
|
|
68
|
-
*/
|
|
69
|
-
exports.OVERFLOW_REGEXP = /auto|scroll/;
|
|
70
|
-
var overflowElementStyle = function (element) {
|
|
71
|
-
return "" + element.style.overflow + element.style.overflowX + element.style.overflowY;
|
|
72
|
-
};
|
|
73
|
-
var ɵ0 = overflowElementStyle;
|
|
74
|
-
exports.ɵ0 = ɵ0;
|
|
75
|
-
var overflowComputedStyle = function (element) {
|
|
76
|
-
var styles = window.getComputedStyle(element);
|
|
77
|
-
return "" + styles.overflow + styles.overflowX + styles.overflowY;
|
|
78
|
-
};
|
|
79
|
-
var ɵ1 = overflowComputedStyle;
|
|
80
|
-
exports.ɵ1 = ɵ1;
|
|
81
|
-
var overflowStyle = function (element) {
|
|
82
|
-
return overflowElementStyle(element) || overflowComputedStyle(element);
|
|
83
|
-
};
|
|
84
|
-
var ɵ2 = overflowStyle;
|
|
85
|
-
exports.ɵ2 = ɵ2;
|
|
86
|
-
/**
|
|
87
|
-
* @hidden
|
|
88
|
-
*/
|
|
89
|
-
exports.scrollableParents = function (element) {
|
|
90
|
-
var parentElements = [];
|
|
91
|
-
if (!kendo_angular_common_1.isDocumentAvailable() || !exports.isWindowAvailable()) {
|
|
92
|
-
return parentElements;
|
|
93
|
-
}
|
|
94
|
-
var parent = element.parentElement;
|
|
95
|
-
while (parent) {
|
|
96
|
-
if (exports.OVERFLOW_REGEXP.test(overflowStyle(parent)) || parent.hasAttribute('data-scrollable')) {
|
|
97
|
-
parentElements.push(parent);
|
|
98
|
-
}
|
|
99
|
-
parent = parent.parentElement;
|
|
100
|
-
}
|
|
101
|
-
parentElements.push(window);
|
|
102
|
-
return parentElements;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* @hidden
|
|
106
|
-
*/
|
|
107
|
-
exports.FRAME_DURATION = 1000 / 60; //1000ms divided by 60fps
|
|
108
|
-
function memoize(fun) {
|
|
109
|
-
var result;
|
|
110
|
-
var called = false;
|
|
111
|
-
return function () {
|
|
112
|
-
var args = [];
|
|
113
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
114
|
-
args[_i] = arguments[_i];
|
|
115
|
-
}
|
|
116
|
-
if (called) {
|
|
117
|
-
return result;
|
|
118
|
-
}
|
|
119
|
-
result = fun.apply(void 0, args);
|
|
120
|
-
called = true;
|
|
121
|
-
return result;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
var ɵ3 = function () {
|
|
125
|
-
if (!kendo_angular_common_1.isDocumentAvailable() && document.body !== null) {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
var top = 10;
|
|
129
|
-
var parent = document.createElement("div");
|
|
130
|
-
parent.style.transform = "matrix(10, 0, 0, 10, 0, 0)";
|
|
131
|
-
parent.innerHTML = "<div style=\"position: fixed; top: " + top + "px;\">child</div>";
|
|
132
|
-
document.body.appendChild(parent);
|
|
133
|
-
var isDifferent = parent.children[0].getBoundingClientRect().top !== top;
|
|
134
|
-
document.body.removeChild(parent);
|
|
135
|
-
return isDifferent;
|
|
136
|
-
};
|
|
137
|
-
exports.ɵ3 = ɵ3;
|
|
138
|
-
/**
|
|
139
|
-
* @hidden
|
|
140
|
-
*/
|
|
141
|
-
exports.hasRelativeStackingContext = memoize(ɵ3);
|
|
142
|
-
/**
|
|
143
|
-
* @hidden
|
|
144
|
-
*/
|
|
145
|
-
exports.zIndex = function (anchor, container) {
|
|
146
|
-
if (!anchor || !kendo_angular_common_1.isDocumentAvailable() || !exports.isWindowAvailable()) {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
var sibling = kendo_popup_common_1.siblingContainer(anchor, container);
|
|
150
|
-
if (!sibling) {
|
|
151
|
-
return null;
|
|
152
|
-
}
|
|
153
|
-
var result = [anchor].concat(kendo_popup_common_1.parents(anchor, sibling)).reduce(function (index, p) {
|
|
154
|
-
var zIndexStyle = p.style.zIndex || window.getComputedStyle(p).zIndex;
|
|
155
|
-
var current = parseInt(zIndexStyle, 10);
|
|
156
|
-
return current > index ? current : index;
|
|
157
|
-
}, 0);
|
|
158
|
-
return result ? (result + 1) : null;
|
|
159
|
-
};
|
|
160
|
-
/**
|
|
161
|
-
* @hidden
|
|
162
|
-
*/
|
|
163
|
-
exports.scaleRect = function (rect, scale) {
|
|
164
|
-
if (!rect || scale === 1) {
|
|
165
|
-
return rect;
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
height: rect.height / scale,
|
|
169
|
-
left: rect.left / scale,
|
|
170
|
-
top: rect.top / scale,
|
|
171
|
-
width: rect.width / scale
|
|
172
|
-
};
|
|
173
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
System.register("@progress/kendo-angular-popup",["tslib","@angular/core","@progress/kendo-angular-common","@angular/common","rxjs","@progress/kendo-licensing","@progress/kendo-popup-common","rxjs/operators","@angular/animations"],function(s){var r,a,p,c,l,u,d,f,h;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){r=e(t)},function(t){a=e(t)},function(t){p=e(t)},function(t){c=e(t)},function(t){l=e(t)},function(t){u=e(t)},function(t){d=e(t)},function(t){f=e(t)},function(t){h=e(t)}],execute:function(){function o(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var n,i;n=[function(t,e){t.exports=a},function(t,e){t.exports=r},function(t,e){t.exports=p},function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n,o,r=e(9),s=e(2);i.eitherRect=function(t,e){return t||{height:0,left:e.left,top:e.top,width:0}},i.replaceOffset=function(t,e){return e?{height:t.height,left:e.left,top:e.top,width:t.width}:t},i.removeStackingOffset=function(t,e){return e?{height:t.height,left:t.left-e.left,top:t.top-e.top,width:t.width}:t},i.isDifferentOffset=function(t,e){var n=t.left,t=t.top,o=e.left,e=e.top;return 1<=Math.abs(n-o)||1<=Math.abs(t-e)},i.isWindowAvailable=function(){return"undefined"!=typeof window},i.hasBoundingRect=function(t){return!!t.getBoundingClientRect},i.OVERFLOW_REGEXP=/auto|scroll/;i.scrollableParents=function(t){var e=[];if(!s.isDocumentAvailable()||!i.isWindowAvailable())return e;for(var n,o=t.parentElement;o;)(i.OVERFLOW_REGEXP.test(""+(n=o).style.overflow+n.style.overflowX+n.style.overflowY||""+(n=window.getComputedStyle(n)).overflow+n.overflowX+n.overflowY)||o.hasAttribute("data-scrollable"))&&e.push(o),o=o.parentElement;return e.push(window),e},i.FRAME_DURATION=1e3/60,i.hasRelativeStackingContext=(o=!1,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o||(n=function(){if(!s.isDocumentAvailable()&&null!==document.body)return!1;var t=document.createElement("div"),e=(t.style.transform="matrix(10, 0, 0, 10, 0, 0)",t.innerHTML='<div style="position: fixed; top: 10px;">child</div>',document.body.appendChild(t),10!==t.children[0].getBoundingClientRect().top);return document.body.removeChild(t),e}.apply(void 0,t),o=!0),n}),i.zIndex=function(t,e){if(!t||!s.isDocumentAvailable()||!i.isWindowAvailable())return null;e=r.siblingContainer(t,e);if(!e)return null;t=[t].concat(r.parents(t,e)).reduce(function(t,e){e=e.style.zIndex||window.getComputedStyle(e).zIndex,e=parseInt(e,10);return t<e?e:t},0);return t?t+1:null},i.scaleRect=function(t,e){return t&&1!==e?{height:t.height/e,left:t.left/e,top:t.top/e,width:t.width/e}:t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(9),s=n(3),a=n(2),p=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],n=(c.prototype.addOffset=function(t,e){return{left:t.left+e.left,top:t.top+e.top}},c.prototype.addScroll=function(t,e){return r.addScroll(t,e)},c.prototype.align=function(t){return r.align(t)},c.prototype.boundingOffset=function(t){return r.boundingOffset(t)},c.prototype.getFontStyles=function(t){var e=this.getWindow();if(!e||!t)return[];var n=e.getComputedStyle(t);return p.map(function(t){return{key:t,value:n[t]}})},c.prototype.getWindow=function(){return s.isWindowAvailable()?window:null},c.prototype.hasOffsetParent=function(t){return!!t&&!!this.nativeElement(t).offsetParent},c.prototype.offset=function(t){return t?r.offset(t):null},c.prototype.offsetAtPoint=function(t,e){if(!t)return null;var t=this.nativeElement(t),n=t.style,o=n.left,i=n.top,n=n.transition,e=(t.style.transition="none",t.style.left=e.left+"px",t.style.top=e.top+"px",r.offset(t));return t.style.left=o,t.style.top=i,t.offsetHeight,t.style.transition=n,e},c.prototype.nativeElement=function(t){return t?t.nativeElement||t:null},c.prototype.position=function(t,e,n){return void 0===n&&(n=1),t&&e?r.positionWithScroll(t,this.nativeElement(e),n):null},c.prototype.removeScroll=function(t,e){return r.removeScroll(t,e)},c.prototype.restrictToView=function(t){return r.restrictToView(t)},c.prototype.scrollPosition=function(t){return r.scrollPosition(this.nativeElement(t))},c.prototype.scrollableParents=function(t){return s.scrollableParents(t)},c.prototype.stackingElementOffset=function(t){t=this.getRelativeContextElement(t);return t?r.offset(t):null},c.prototype.stackingElementScroll=function(t){t=this.getRelativeContextElement(t);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},c.prototype.getRelativeContextElement=function(t){if(!t||!s.hasRelativeStackingContext())return null;for(var e=this.nativeElement(t).parentElement;e;){if("none"!==window.getComputedStyle(e).transform)return e;e=e.parentElement}return null},c.prototype.useRelativePosition=function(t){return!!this.getRelativeContextElement(t)},c.prototype.windowViewPort=function(t){return r.getWindowViewPort(this.nativeElement(t))},c.prototype.zIndex=function(t,e){return s.zIndex(t,this.nativeElement(e))},c.prototype.zoomLevel=function(){return a.isDocumentAvailable()&&s.isWindowAvailable()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},c.prototype.isZoomed=function(){return 1<this.zoomLevel()},o.__decorate([i.Injectable()],c));function c(){}e.DOMService=n},function(t,e){t.exports=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n=n(0);e.SCALE=new n.InjectionToken("Popup Document Scale")},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),c=n(0),i=n(20),r=n(4),s=n(19),a=n(18),p=n(17),l=n(16),u=n(3),d=n(2),f=n(5),h=n(14),m=n(13),v={left:-1e4,top:0},n=(y.prototype.ngOnInit=function(){this.reposition=this.reposition.bind(this),this._resizeService.subscribe(this.reposition),this.animationSubscriptions=this.animationService.start.subscribe(this.onAnimationStart.bind(this)),this.animationSubscriptions.add(this.animationService.end.subscribe(this.onAnimationEnd.bind(this))),this._scrollableService.forElement(this.domService.nativeElement(this.anchor)||this.container.nativeElement).subscribe(this.onScroll.bind(this)),this.currentOffset=v,this.setZIndex(),this.copyFontStyles(),this.updateFixedClass(),this.reposition()},y.prototype.ngOnChanges=function(t){t.copyAnchorStyles&&this.copyFontStyles(),t.positionMode&&this.updateFixedClass()},y.prototype.ngAfterViewInit=function(){var t=this;this.animate||this.resolvedPromise.then(function(){t.onAnimationEnd()})},y.prototype.ngAfterViewChecked=function(){var t=this;this.initialCheck?this.initialCheck=!1:this._zone.runOutsideAngular(function(){t.unsubscribeReposition(),t.repositionSubscription=f.from(t.resolvedPromise).subscribe(t.reposition)})},y.prototype.ngOnDestroy=function(){this.anchorViewportLeave.complete(),this.positionChange.complete(),this.close.emit(),this.close.complete(),this._resizeService.unsubscribe(),this._scrollableService.unsubscribe(),this.animationSubscriptions.unsubscribe(),this.unsubscribeReposition()},y.prototype.onResize=function(){this.reposition()},y.prototype.onAnimationStart=function(){this._renderer.removeClass(this.container.nativeElement,"k-animation-container-shown")},y.prototype.onAnimationEnd=function(){this._renderer.addClass(this.container.nativeElement,"k-animation-container-shown"),this.open.emit(),this.open.complete()},Object.defineProperty(y.prototype,"currentOffset",{get:function(){return this._currentOffset},set:function(t){this.setContainerStyle("left",t.left+"px"),this.setContainerStyle("top",t.top+"px"),this._currentOffset=t},enumerable:!0,configurable:!0}),y.prototype.setZIndex=function(){this.anchor&&this.setContainerStyle("z-index",String(this.domService.zIndex(this.domService.nativeElement(this.anchor),this.container)))},y.prototype.reposition=function(){var t,e,n,o=this;d.isDocumentAvailable()&&(t=this.position(),e=t.flip,n=t.offset,this.currentOffset&&!u.isDifferentOffset(this.currentOffset,n)||(this.currentOffset=n,d.hasObservers(this.positionChange)&&this._zone.run(function(){return o.positionChange.emit({offset:n,flip:e})})),this.animate&&this.animationService.play(this.contentContainer.nativeElement,this.animate,e),this.resizeSensor.acceptSize())},y.prototype.position=function(){var t=this._alignService.alignElement({anchor:this.domService.nativeElement(this.anchor),anchorAlign:this.anchorAlign,element:this.container,elementAlign:this.popupAlign,margin:this.margin,offset:this.offset,positionMode:this.positionMode});return this._positionService.positionElement({anchor:this.domService.nativeElement(this.anchor),anchorAlign:this.anchorAlign,collisions:this.collision,currentLocation:t,element:this.container,elementAlign:this.popupAlign,margin:this.margin})},y.prototype.onScroll=function(t){var e=this,n=d.hasObservers(this.anchorViewportLeave);t||!n?this.reposition():n&&this._zone.run(function(){e.anchorViewportLeave.emit()})},y.prototype.copyFontStyles=function(){var e=this;this.anchor&&this.copyAnchorStyles&&this.domService.getFontStyles(this.domService.nativeElement(this.anchor)).forEach(function(t){return e.setContainerStyle(t.key,t.value)})},y.prototype.updateFixedClass=function(){var t="fixed"===this.positionMode?"addClass":"removeClass";this._renderer[t](this.container.nativeElement,"k-animation-container-fixed")},y.prototype.setContainerStyle=function(t,e){this._renderer.setStyle(this.container.nativeElement,t,e)},y.prototype.unsubscribeReposition=function(){this.repositionSubscription&&this.repositionSubscription.unsubscribe()},o.__decorate([c.Input(),o.__metadata("design:type",Object)],y.prototype,"animate",void 0),o.__decorate([c.Input(),o.__metadata("design:type",Object)],y.prototype,"anchor",void 0),o.__decorate([c.Input(),o.__metadata("design:type",Object)],y.prototype,"anchorAlign",void 0),o.__decorate([c.Input(),o.__metadata("design:type",Object)],y.prototype,"collision",void 0),o.__decorate([c.Input(),o.__metadata("design:type",Object)],y.prototype,"popupAlign",void 0),o.__decorate([c.Input(),o.__metadata("design:type",Boolean)],y.prototype,"copyAnchorStyles",void 0),o.__decorate([c.Input(),o.__metadata("design:type",Object)],y.prototype,"popupClass",void 0),o.__decorate([c.Input(),o.__metadata("design:type",String)],y.prototype,"positionMode",void 0),o.__decorate([c.Input(),o.__metadata("design:type",Object)],y.prototype,"offset",void 0),o.__decorate([c.Input(),o.__metadata("design:type",Object)],y.prototype,"margin",void 0),o.__decorate([c.Output(),o.__metadata("design:type",c.EventEmitter)],y.prototype,"anchorViewportLeave",void 0),o.__decorate([c.Output(),o.__metadata("design:type",c.EventEmitter)],y.prototype,"close",void 0),o.__decorate([c.Output(),o.__metadata("design:type",c.EventEmitter)],y.prototype,"open",void 0),o.__decorate([c.Output(),o.__metadata("design:type",c.EventEmitter)],y.prototype,"positionChange",void 0),o.__decorate([c.ViewChild("container",{static:!0}),o.__metadata("design:type",c.ElementRef)],y.prototype,"contentContainer",void 0),o.__decorate([c.ViewChild(d.ResizeSensorComponent,{static:!0}),o.__metadata("design:type",d.ResizeSensorComponent)],y.prototype,"resizeSensor",void 0),o.__decorate([c.Component({exportAs:"kendo-popup",providers:[i.AlignService,l.AnimationService,r.DOMService,s.PositionService,a.ResizeService,p.ScrollableService],selector:"kendo-popup",template:'\n <div class="k-popup" [ngClass]="popupClass" #container>\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]="content" [ngIf]="content"></ng-template>\n <kendo-resize-sensor [rateLimit]="100" (resize)="onResize()">\n </kendo-resize-sensor>\n </div>\n '}),o.__metadata("design:paramtypes",[c.ElementRef,i.AlignService,r.DOMService,s.PositionService,a.ResizeService,p.ScrollableService,l.AnimationService,c.Renderer2,c.NgZone])],y));function y(t,e,n,o,i,r,s,a,p){this.container=t,this._alignService=e,this.domService=n,this._positionService=o,this._resizeService=i,this._scrollableService=r,this.animationService=s,this._renderer=a,this._zone=p,this.animate=!0,this.anchorAlign={horizontal:"left",vertical:"bottom"},this.collision={horizontal:"fit",vertical:"flip"},this.popupAlign={horizontal:"left",vertical:"top"},this.copyAnchorStyles=!1,this.positionMode="fixed",this.offset=v,this.anchorViewportLeave=new c.EventEmitter,this.close=new c.EventEmitter,this.open=new c.EventEmitter,this.positionChange=new c.EventEmitter,this.resolvedPromise=Promise.resolve(null),this.initialCheck=!0,h.validatePackage(m.packageMetadata),this._renderer.addClass(t.nativeElement,"k-animation-container"),this.updateFixedClass()}e.PopupComponent=n},function(t,e){t.exports=f},function(t,e){t.exports=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(7),n=(e.POPUP_CONTAINER=new i.InjectionToken("Popup Container"),Object.defineProperty(s.prototype,"rootViewContainer",{get:function(){var t=this.applicationRef.components||[];if(t[0])return t[0];throw new Error("\n View Container not found! Inject the POPUP_CONTAINER or define a specific ViewContainerRef via the appendTo option.\n See http://www.telerik.com/kendo-angular-ui/components/popup/api/POPUP_CONTAINER/ for more details.\n ")},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rootViewContainerNode",{get:function(){return this.container?this.container.nativeElement:this.getComponentRootNode(this.rootViewContainer)},enumerable:!0,configurable:!0}),s.prototype.open=function(t){var e=this.contentFrom((t=void 0===t?{}:t).content),n=e.component,e=e.nodes,o=this.appendPopup(e,t.appendTo),e=o.instance,i=(this.projectComponentInputs(o,t),o.changeDetectorRef.detectChanges(),n&&n.changeDetectorRef.detectChanges(),this.getComponentRootNode(o));return{close:function(){var t;n&&n.destroy(),o.destroy(),(t=i)&&t.parentNode&&t.parentNode.removeChild(t)},content:n,popup:o,popupAnchorViewportLeave:e.anchorViewportLeave,popupClose:e.close,popupElement:i,popupOpen:e.open,popupPositionChange:e.positionChange}},s.prototype.appendPopup=function(t,e){t=this.createComponent(r.PopupComponent,t,e);return e||this.rootViewContainerNode.appendChild(this.getComponentRootNode(t)),t},s.prototype.getComponentRootNode=function(t){return t.location.nativeElement},s.prototype.getComponentFactory=function(t){return this.componentFactoryResolver.resolveComponentFactory(t)},s.prototype.createComponent=function(t,e,n){t=this.getComponentFactory(t);if(n)return n.createComponent(t,void 0,this.injector,e);n=t.create(this.injector,e);return this.applicationRef.attachView(n.hostView),n},s.prototype.projectComponentInputs=function(e,n){return Object.getOwnPropertyNames(n).filter(function(t){return"content"!==t||n.content instanceof i.TemplateRef}).map(function(t){e.instance[t]=n[t]}),e},s.prototype.contentFrom=function(t){if(!t||t instanceof i.TemplateRef)return{component:null,nodes:[[]]};t=this.createComponent(t);return{component:t,nodes:[t?[t.location.nativeElement]:[]]}},o.__decorate([i.Injectable(),o.__param(3,i.Inject(e.POPUP_CONTAINER)),o.__param(3,i.Optional()),o.__metadata("design:paramtypes",[i.ApplicationRef,i.ComponentFactoryResolver,i.Injector,i.ElementRef])],s));function s(t,e,n,o){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=n,this.container=o}e.PopupService=n},function(t,e){t.exports=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(11),s=n(7),a=n(2),n=n(10),s=[s.PopupComponent],o=o.__decorate([i.NgModule({declarations:[s],entryComponents:[s],exports:[s],imports:[r.CommonModule,a.ResizeSensorModule],providers:[n.PopupService]})],p);function p(){}e.PopupModule=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.packageMetadata={name:"@progress/kendo-angular-popup",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1648554200,version:"",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"}},function(t,e){t.exports=u},function(t,e){t.exports=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(0),i=n(15),s={expand:function(t){var e="up"===t||"down"===t?"scaleY":"scaleX";return{start:{transform:e+"(0)",transformOrigin:"down"===t?"top":"left"===t?"right":"right"===t?"left":"bottom"},end:{transform:e+"(1)"}}},slide:function(t){var e="left"===t||"right"===t?"translateX":"translateY";return{start:{transform:e+"("+("right"===t||"down"===t?-100:100)+"%)"},end:{transform:e+"(0%)"}}},fade:function(){return{start:{opacity:0},end:{opacity:1}}},zoom:function(){return{start:{transform:"scale(0)"},end:{transform:"scale(1)"}}}},n=(a.prototype.play=function(t,e,n){if(!this.flip||this.flip.horizontal!==n.horizontal||this.flip.vertical!==n.vertical){this.flip=n;var o=e.type||"slide",i=s[o];if(i){i=i(this.getDirection(n,e));this.playStates(t,i,e)}else if(r.isDevMode())throw new Error('Unsupported animation type: "'+o+'". The supported types are slide, expand, fade and zoom.')}},a.prototype.ngOnDestroy=function(){this.stopPlayer()},a.prototype.playStates=function(t,e,n){var o=this,n=(this.stopPlayer(),n.duration||100),n=this.animationBuilder.build([i.style(e.start),i.animate(n+"ms ease-in",i.style(e.end))]),e=this.player=n.create(t);e.onDone(function(){o.end.emit(),o.stopPlayer()}),this.start.emit(),e.play()},a.prototype.getDirection=function(t,e){e=e.direction||"down";return t.horizontal&&("left"===e?e="right":"right"===e&&(e="left")),t.vertical&&("down"===e?e="up":"up"===e&&(e="down")),e},a.prototype.stopPlayer=function(){this.player&&(this.player.destroy(),this.player=null)},o.__decorate([r.Injectable(),o.__metadata("design:paramtypes",[i.AnimationBuilder])],a));function a(t){this.animationBuilder=t,this.start=new r.EventEmitter,this.end=new r.EventEmitter}e.AnimationService=n},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e(1),i=e(0),a=e(5),p=e(8),c=e(2),r=e(4),l=e(3),e=(n.THRESHOLD_DIFF=1,s.prototype.forElement=function(t){return this.unsubscribe(),this.element=t,this},s.prototype.subscribe=function(i){var r,s=this;i&&c.isDocumentAvailable()&&this.element&&(r=this._dom.scrollableParents(this.element),this._zone.runOutsideAngular(function(){var t=r.map(function(t){return a.fromEvent(t,"scroll").pipe(p.auditTime(l.FRAME_DURATION))});s.subscription=a.merge.apply(void 0,t).subscribe(function(t){var e=t.target,t=0<r.filter(function(t){return t===e}).length,n=e===document,o=e===window;(t||n||o)&&i(s.isVisible(s.element,e))})}))},s.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},s.prototype.isVisible=function(t,e){t=this._dom.boundingOffset(t),e=this._dom.boundingOffset(this._dom.nativeElement(e));return!(n.THRESHOLD_DIFF<e.top-t.bottom||n.THRESHOLD_DIFF<t.top-e.bottom||n.THRESHOLD_DIFF<t.left-e.right||n.THRESHOLD_DIFF<e.left-t.right)},o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[r.DOMService,i.NgZone])],s));function s(t,e){this._dom=t,this._zone=e}n.ScrollableService=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(5),s=n(8),a=n(2),p=n(3),n=n(4),o=(c.prototype.subscribe=function(t){var e=this;a.isDocumentAvailable()&&this._zone.runOutsideAngular(function(){e.subscription=r.fromEvent(e._dom.getWindow(),"resize").pipe(s.auditTime(p.FRAME_DURATION)).subscribe(function(){return t()})})},c.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},c.prototype.isUnsubscribed=function(){return this.subscription&&this.subscription.closed},o.__decorate([i.Injectable(),o.__metadata("design:paramtypes",[n.DOMService,i.NgZone])],c));function c(t,e){this._dom=t,this._zone=e}e.ResizeService=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(4),u=n(3),n=n(6),n=(s.prototype.positionElement=function(t){var e=t.anchor,n=t.currentLocation,o=t.element,i=t.anchorAlign,r=t.elementAlign,s=t.collisions,a=t.margin,p=this._dom,c=this.scale||1,l=p.offsetAtPoint(o,n),l=u.scaleRect(l,c),e=u.scaleRect(p.offset(e),c),e=u.eitherRect(e,n),t=t.viewPort||p.windowViewPort(o),o=(t.width=t.width/c,t.height=t.height/c,p.restrictToView({anchorAlign:i,anchorRect:e,collisions:s,elementAlign:r,elementRect:l,margin:a,viewPort:t})),c=p.addOffset(n,o.offset);return{flip:o.flip,flipped:o.flipped,offset:c}},o.__decorate([i.Injectable(),o.__param(1,i.Inject(n.SCALE)),o.__param(1,i.Optional()),o.__metadata("design:paramtypes",[r.DOMService,Number])],s));function s(t,e){void 0===e&&(e=1),this._dom=t,this.scale=e}e.PositionService=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(4),p=n(3),n=n(6),n=(s.prototype.alignElement=function(t){var e=t.anchor,n=t.element,o=t.anchorAlign,i=t.elementAlign,r=t.margin,s=t.offset,t=t.positionMode,a=this.scale||1,t="fixed"!==t&&this._dom.hasOffsetParent(n)?this.relativeRect(e,n,s,a):this.absoluteRect(e,n,s,a),e=p.scaleRect(this._dom.offset(n.nativeElement),a);return this._dom.align({anchorAlign:o,anchorRect:t,elementAlign:i,elementRect:e,margin:r})},s.prototype.absoluteRect=function(t,e,n,o){var i=this.elementScrollPosition(t,e),t=p.eitherRect(this._dom.offset(t),n),n=2*o,r=this._dom.stackingElementScroll(e),e=(1!==o&&r&&(r.x/=n,r.y/=n),this._dom.stackingElementOffset(e));return 1!==o&&e&&(e.left/=n,e.top/=n),this._dom.removeScroll(this._dom.addScroll(p.removeStackingOffset(p.scaleRect(t,o),e),r),i)},s.prototype.elementScrollPosition=function(t,e){return t?{x:0,y:0}:this._dom.scrollPosition(e)},s.prototype.relativeRect=function(t,e,n,o){t=p.eitherRect(this._dom.position(t,e,o),n);return p.scaleRect(t,o)},o.__decorate([i.Injectable(),o.__param(1,i.Inject(n.SCALE)),o.__param(1,i.Optional()),o.__metadata("design:paramtypes",[r.DOMService,Number])],s));function s(t,e){void 0===e&&(e=1),this._dom=t,this.scale=e}e.AlignService=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(10),i=(e.PopupService=i.PopupService,e.POPUP_CONTAINER=i.POPUP_CONTAINER,n(7)),i=(e.PopupComponent=i.PopupComponent,n(12)),i=(e.PopupModule=i.PopupModule,n(6)),r=(e.SCALE=i.SCALE,e);for(o in r)s(o,r[o])}],i={},o.m=n,o.c=i,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=21)}}});
|