@progress/kendo-angular-popup 24.2.2 → 25.0.0-develop.12
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/fesm2022/progress-kendo-angular-popup.mjs +105 -103
- package/index.d.ts +699 -13
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/directives.d.ts +0 -23
- package/models/align-element-settings.interface.d.ts +0 -19
- package/models/align.interface.d.ts +0 -28
- package/models/collision.interface.d.ts +0 -18
- package/models/collision.type.d.ts +0 -11
- package/models/margin.interface.d.ts +0 -18
- package/models/offset.interface.d.ts +0 -18
- package/models/popup-animation.interface.d.ts +0 -32
- package/models/popup-ref.d.ts +0 -44
- package/models/popup-settings.d.ts +0 -65
- package/models/position-element-settings.interface.d.ts +0 -21
- package/models/position-mode.d.ts +0 -8
- package/models/position.interface.d.ts +0 -13
- package/package-metadata.d.ts +0 -9
- package/popup.component.d.ts +0 -157
- package/popup.module.d.ts +0 -41
- package/popup.service.d.ts +0 -128
- package/scale.d.ts +0 -13
- package/services/align.service.d.ts +0 -22
- package/services/animation.service.d.ts +0 -25
- package/services/dom.service.d.ts +0 -39
- package/services/position.service.d.ts +0 -19
- package/services/resize.service.d.ts +0 -21
- package/services/scrollable.service.d.ts +0 -27
- package/util.d.ts +0 -53
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Injectable, InjectionToken, Inject, Optional, EventEmitter, isDevMode, ViewChild, Output, Input, Component, EnvironmentInjector, createComponent, TemplateRef, NgModule } from '@angular/core';
|
|
6
|
+
import { Injectable, InjectionToken, Inject, Optional, EventEmitter, isDevMode, signal, afterNextRender, afterEveryRender, ViewChild, Output, Input, ChangeDetectionStrategy, Component, EnvironmentInjector, createComponent, TemplateRef, NgModule } from '@angular/core';
|
|
7
7
|
import { siblingContainer, parents, addScroll, align, boundingOffset, offset, positionWithScroll, removeScroll, restrictToView, scrollPosition, getWindowViewPort } from '@progress/kendo-popup-common';
|
|
8
8
|
import * as i1$1 from '@progress/kendo-angular-common';
|
|
9
9
|
import { isDocumentAvailable, hasObservers, ResizeSensorComponent, KENDO_RESIZESENSOR, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
10
|
-
import { fromEvent, merge
|
|
10
|
+
import { fromEvent, merge } from 'rxjs';
|
|
11
11
|
import { auditTime } from 'rxjs/operators';
|
|
12
12
|
import * as i1 from '@angular/animations';
|
|
13
13
|
import { style, animate } from '@angular/animations';
|
|
@@ -322,10 +322,10 @@ class DOMService {
|
|
|
322
322
|
isZoomed() {
|
|
323
323
|
return this.zoomLevel() > 1;
|
|
324
324
|
}
|
|
325
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
326
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DOMService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
326
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DOMService });
|
|
327
327
|
}
|
|
328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DOMService, decorators: [{
|
|
329
329
|
type: Injectable
|
|
330
330
|
}] });
|
|
331
331
|
|
|
@@ -386,10 +386,10 @@ class AlignService {
|
|
|
386
386
|
const rect = eitherRect(this._dom.position(anchor, element, scale), offset);
|
|
387
387
|
return scaleRect(rect, scale);
|
|
388
388
|
}
|
|
389
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
390
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
389
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AlignService, deps: [{ token: DOMService }, { token: SCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
390
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AlignService });
|
|
391
391
|
}
|
|
392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AlignService, decorators: [{
|
|
393
393
|
type: Injectable
|
|
394
394
|
}], ctorParameters: () => [{ type: DOMService }, { type: undefined, decorators: [{
|
|
395
395
|
type: Inject,
|
|
@@ -435,10 +435,10 @@ class PositionService {
|
|
|
435
435
|
offset: offset
|
|
436
436
|
};
|
|
437
437
|
}
|
|
438
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
439
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PositionService, deps: [{ token: DOMService }, { token: SCALE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
439
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PositionService });
|
|
440
440
|
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PositionService, decorators: [{
|
|
442
442
|
type: Injectable
|
|
443
443
|
}], ctorParameters: () => [{ type: DOMService }, { type: undefined, decorators: [{
|
|
444
444
|
type: Inject,
|
|
@@ -452,18 +452,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
452
452
|
*/
|
|
453
453
|
class ResizeService {
|
|
454
454
|
_dom;
|
|
455
|
-
|
|
455
|
+
zone;
|
|
456
456
|
subscription;
|
|
457
|
-
constructor(_dom,
|
|
457
|
+
constructor(_dom, zone) {
|
|
458
458
|
this._dom = _dom;
|
|
459
|
-
this.
|
|
459
|
+
this.zone = zone;
|
|
460
460
|
}
|
|
461
461
|
subscribe(callback) {
|
|
462
462
|
if (!isDocumentAvailable()) {
|
|
463
463
|
return;
|
|
464
464
|
}
|
|
465
|
-
this.
|
|
466
|
-
this.subscription = fromEvent(this._dom.getWindow(),
|
|
465
|
+
this.zone.runOutsideAngular(() => {
|
|
466
|
+
this.subscription = fromEvent(this._dom.getWindow(), 'resize')
|
|
467
467
|
.pipe(auditTime(FRAME_DURATION))
|
|
468
468
|
.subscribe(() => callback());
|
|
469
469
|
});
|
|
@@ -477,10 +477,10 @@ class ResizeService {
|
|
|
477
477
|
isUnsubscribed() {
|
|
478
478
|
return this.subscription && this.subscription.closed;
|
|
479
479
|
}
|
|
480
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
481
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
480
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ResizeService, deps: [{ token: DOMService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
481
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ResizeService });
|
|
482
482
|
}
|
|
483
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ResizeService, decorators: [{
|
|
484
484
|
type: Injectable
|
|
485
485
|
}], ctorParameters: () => [{ type: DOMService }, { type: i0.NgZone }] });
|
|
486
486
|
|
|
@@ -493,12 +493,12 @@ const THRESHOLD_DIFF = 1;
|
|
|
493
493
|
*/
|
|
494
494
|
class ScrollableService {
|
|
495
495
|
_dom;
|
|
496
|
-
|
|
496
|
+
zone;
|
|
497
497
|
element;
|
|
498
498
|
subscription;
|
|
499
|
-
constructor(_dom,
|
|
499
|
+
constructor(_dom, zone) {
|
|
500
500
|
this._dom = _dom;
|
|
501
|
-
this.
|
|
501
|
+
this.zone = zone;
|
|
502
502
|
}
|
|
503
503
|
forElement(element) {
|
|
504
504
|
this.unsubscribe();
|
|
@@ -510,7 +510,7 @@ class ScrollableService {
|
|
|
510
510
|
return;
|
|
511
511
|
}
|
|
512
512
|
const parents = this._dom.scrollableParents(this.element);
|
|
513
|
-
this.
|
|
513
|
+
this.zone.runOutsideAngular(() => {
|
|
514
514
|
const observables = parents.map(p => fromEvent(p, "scroll").pipe(auditTime(FRAME_DURATION)));
|
|
515
515
|
const subscriber = (e) => {
|
|
516
516
|
const target = e.target;
|
|
@@ -547,10 +547,10 @@ class ScrollableService {
|
|
|
547
547
|
}
|
|
548
548
|
return true;
|
|
549
549
|
}
|
|
550
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
551
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
550
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ScrollableService, deps: [{ token: DOMService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
551
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ScrollableService });
|
|
552
552
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ScrollableService, decorators: [{
|
|
554
554
|
type: Injectable
|
|
555
555
|
}], ctorParameters: () => [{ type: DOMService }, { type: i0.NgZone }] });
|
|
556
556
|
|
|
@@ -678,10 +678,10 @@ class AnimationService {
|
|
|
678
678
|
this.player = null;
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
682
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
681
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AnimationService, deps: [{ token: i1.AnimationBuilder }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
682
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AnimationService });
|
|
683
683
|
}
|
|
684
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AnimationService, decorators: [{
|
|
685
685
|
type: Injectable
|
|
686
686
|
}], ctorParameters: () => [{ type: i1.AnimationBuilder }] });
|
|
687
687
|
|
|
@@ -693,8 +693,8 @@ const packageMetadata = {
|
|
|
693
693
|
productName: 'Kendo UI for Angular',
|
|
694
694
|
productCode: 'KENDOUIANGULAR',
|
|
695
695
|
productCodes: ['KENDOUIANGULAR'],
|
|
696
|
-
publishDate:
|
|
697
|
-
version: '
|
|
696
|
+
publishDate: 1785317748,
|
|
697
|
+
version: '25.0.0-develop.12',
|
|
698
698
|
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'
|
|
699
699
|
};
|
|
700
700
|
|
|
@@ -723,59 +723,70 @@ class PopupComponent {
|
|
|
723
723
|
_scrollableService;
|
|
724
724
|
animationService;
|
|
725
725
|
_renderer;
|
|
726
|
-
|
|
726
|
+
zone;
|
|
727
|
+
injector;
|
|
727
728
|
/**
|
|
728
729
|
* Controls the Popup animation. By default, the opening and closing animations are enabled ([see example](https://www.telerik.com/kendo-angular-ui/components/popup/animations)).
|
|
729
730
|
* @default true
|
|
730
731
|
*/
|
|
731
|
-
animate
|
|
732
|
+
set animate(value) { this._animate.set(value); }
|
|
733
|
+
get animate() { return this._animate(); }
|
|
732
734
|
/**
|
|
733
735
|
* Sets the element to use as an anchor. The Popup opens next to this element. ([See example](https://www.telerik.com/kendo-angular-ui/components/popup/aligning-positioning#aligning-to-components)).
|
|
734
736
|
*/
|
|
735
|
-
anchor;
|
|
737
|
+
set anchor(value) { this._anchor.set(value); }
|
|
738
|
+
get anchor() { return this._anchor(); }
|
|
736
739
|
/**
|
|
737
740
|
* Sets the anchor pivot point ([see example](https://www.telerik.com/kendo-angular-ui/components/popup/aligning-positioning#positioning)).
|
|
738
741
|
* @default '{ horizontal: "left", vertical: "bottom" }'
|
|
739
742
|
*/
|
|
740
|
-
anchorAlign
|
|
743
|
+
set anchorAlign(value) { this._anchorAlign.set(value); }
|
|
744
|
+
get anchorAlign() { return this._anchorAlign(); }
|
|
741
745
|
/**
|
|
742
746
|
* Sets the collision behavior of the Popup ([see example](https://www.telerik.com/kendo-angular-ui/components/popup/viewport-boundary-detection)).
|
|
743
747
|
* @default '{ horizontal: "fit", vertical: "flip" }'
|
|
744
748
|
*/
|
|
745
|
-
collision
|
|
749
|
+
set collision(value) { this._collision.set(value); }
|
|
750
|
+
get collision() { return this._collision(); }
|
|
746
751
|
/**
|
|
747
752
|
* Sets the pivot point of the Popup ([see example](https://www.telerik.com/kendo-angular-ui/components/popup/aligning-positioning#positioning)).
|
|
748
753
|
* @default '{ horizontal: "left", vertical: "top" }'
|
|
749
754
|
*/
|
|
750
|
-
popupAlign
|
|
755
|
+
set popupAlign(value) { this._popupAlign.set(value); }
|
|
756
|
+
get popupAlign() { return this._popupAlign(); }
|
|
751
757
|
/**
|
|
752
758
|
* Controls whether the component copies the `anchor` font styles.
|
|
753
759
|
* @default false
|
|
754
760
|
*/
|
|
755
|
-
copyAnchorStyles
|
|
761
|
+
set copyAnchorStyles(value) { this._copyAnchorStyles.set(value); }
|
|
762
|
+
get copyAnchorStyles() { return this._copyAnchorStyles(); }
|
|
756
763
|
/**
|
|
757
764
|
* Sets a list of CSS classes to add to the internal animated element ([see example](https://www.telerik.com/kendo-angular-ui/components/popup/styling)).
|
|
758
765
|
*
|
|
759
766
|
* > To style the content of the Popup, use this property binding.
|
|
760
767
|
*/
|
|
761
|
-
popupClass;
|
|
768
|
+
set popupClass(value) { this._popupClass.set(value); }
|
|
769
|
+
get popupClass() { return this._popupClass(); }
|
|
762
770
|
/**
|
|
763
771
|
* Sets the position mode of the component. By default, the Popup uses fixed positioning. To use absolute positioning, set this option to `absolute`.
|
|
764
772
|
*
|
|
765
773
|
* To support mobile browsers with the zoom option, use the `absolute` positioning of the Popup.
|
|
766
774
|
* @default 'fixed'
|
|
767
775
|
*/
|
|
768
|
-
positionMode
|
|
776
|
+
set positionMode(value) { this._positionMode.set(value); }
|
|
777
|
+
get positionMode() { return this._positionMode(); }
|
|
769
778
|
/**
|
|
770
779
|
* Sets the absolute position of the element ([see example](https://www.telerik.com/kendo-angular-ui/components/popup/aligning-positioning#aligning-to-absolute-points)).
|
|
771
780
|
* The Popup opens next to this point. The Popup pivot point is defined by the `popupAlign` option. The boundary detection uses the window viewport.
|
|
772
781
|
* @default '{ left: -10000, top: 0 }'
|
|
773
782
|
*/
|
|
774
|
-
offset
|
|
783
|
+
set offset(value) { this._offset.set(value); }
|
|
784
|
+
get offset() { return this._offset(); }
|
|
775
785
|
/**
|
|
776
786
|
* Sets the margin value in pixels. Adds blank space between the Popup and the anchor ([see example](https://www.telerik.com/kendo-angular-ui/components/popup/aligning-positioning#adding-a-margin)).
|
|
777
787
|
*/
|
|
778
|
-
margin;
|
|
788
|
+
set margin(value) { this._margin.set(value); }
|
|
789
|
+
get margin() { return this._margin(); }
|
|
779
790
|
/**
|
|
780
791
|
* Fires when the anchor scrolls outside the screen boundaries. ([See example](https://www.telerik.com/kendo-angular-ui/components/popup/closing)).
|
|
781
792
|
*/
|
|
@@ -808,12 +819,20 @@ class PopupComponent {
|
|
|
808
819
|
* @hidden
|
|
809
820
|
*/
|
|
810
821
|
renderDefaultClass = true;
|
|
811
|
-
|
|
812
|
-
|
|
822
|
+
_animate = signal(true, ...(ngDevMode ? [{ debugName: "_animate" }] : []));
|
|
823
|
+
_anchor = signal(undefined, ...(ngDevMode ? [{ debugName: "_anchor" }] : []));
|
|
824
|
+
_anchorAlign = signal({ horizontal: 'left', vertical: 'bottom' }, ...(ngDevMode ? [{ debugName: "_anchorAlign" }] : []));
|
|
825
|
+
_collision = signal({ horizontal: 'fit', vertical: 'flip' }, ...(ngDevMode ? [{ debugName: "_collision" }] : []));
|
|
826
|
+
_popupAlign = signal({ horizontal: 'left', vertical: 'top' }, ...(ngDevMode ? [{ debugName: "_popupAlign" }] : []));
|
|
827
|
+
_copyAnchorStyles = signal(false, ...(ngDevMode ? [{ debugName: "_copyAnchorStyles" }] : []));
|
|
828
|
+
_popupClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_popupClass" }] : []));
|
|
829
|
+
_positionMode = signal('fixed', ...(ngDevMode ? [{ debugName: "_positionMode" }] : []));
|
|
830
|
+
_offset = signal(DEFAULT_OFFSET, ...(ngDevMode ? [{ debugName: "_offset" }] : []));
|
|
831
|
+
_margin = signal(undefined, ...(ngDevMode ? [{ debugName: "_margin" }] : []));
|
|
832
|
+
_currentOffset = signal(undefined, ...(ngDevMode ? [{ debugName: "_currentOffset" }] : []));
|
|
813
833
|
animationSubscriptions;
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
constructor(container, _alignService, domService, _positionService, _resizeService, _scrollableService, animationService, _renderer, _zone) {
|
|
834
|
+
resolvedPromise = Promise.resolve(null);
|
|
835
|
+
constructor(container, _alignService, domService, _positionService, _resizeService, _scrollableService, animationService, _renderer, zone, injector) {
|
|
817
836
|
this.container = container;
|
|
818
837
|
this._alignService = _alignService;
|
|
819
838
|
this.domService = domService;
|
|
@@ -822,7 +841,8 @@ class PopupComponent {
|
|
|
822
841
|
this._scrollableService = _scrollableService;
|
|
823
842
|
this.animationService = animationService;
|
|
824
843
|
this._renderer = _renderer;
|
|
825
|
-
this.
|
|
844
|
+
this.zone = zone;
|
|
845
|
+
this.injector = injector;
|
|
826
846
|
validatePackage(packageMetadata);
|
|
827
847
|
this._renderer.addClass(container.nativeElement, ANIMATION_CONTAINER);
|
|
828
848
|
this.updateFixedClass();
|
|
@@ -839,7 +859,7 @@ class PopupComponent {
|
|
|
839
859
|
this.setZIndex();
|
|
840
860
|
this.copyFontStyles();
|
|
841
861
|
this.updateFixedClass();
|
|
842
|
-
this.reposition();
|
|
862
|
+
afterNextRender(() => this.reposition(), { injector: this.injector });
|
|
843
863
|
}
|
|
844
864
|
ngOnChanges(changes) {
|
|
845
865
|
if (changes.copyAnchorStyles) {
|
|
@@ -858,18 +878,7 @@ class PopupComponent {
|
|
|
858
878
|
this.reposition();
|
|
859
879
|
}
|
|
860
880
|
ngAfterViewChecked() {
|
|
861
|
-
|
|
862
|
-
this.initialCheck = false;
|
|
863
|
-
return;
|
|
864
|
-
}
|
|
865
|
-
this._zone.runOutsideAngular(() => {
|
|
866
|
-
// workarounds https://github.com/angular/angular/issues/19094
|
|
867
|
-
// uses promise because it is executed synchronously after the content is updated
|
|
868
|
-
// does not use onStable in case the current zone is not the angular one.
|
|
869
|
-
this.unsubscribeReposition();
|
|
870
|
-
this.repositionSubscription = from(this.resolvedPromise)
|
|
871
|
-
.subscribe(this.reposition);
|
|
872
|
-
});
|
|
881
|
+
afterEveryRender(() => this.reposition(), { injector: this.injector });
|
|
873
882
|
}
|
|
874
883
|
ngOnDestroy() {
|
|
875
884
|
this.anchorViewportLeave.complete();
|
|
@@ -879,7 +888,6 @@ class PopupComponent {
|
|
|
879
888
|
this._resizeService.unsubscribe();
|
|
880
889
|
this._scrollableService.unsubscribe();
|
|
881
890
|
this.animationSubscriptions.unsubscribe();
|
|
882
|
-
this.unsubscribeReposition();
|
|
883
891
|
}
|
|
884
892
|
/**
|
|
885
893
|
* @hidden
|
|
@@ -896,13 +904,13 @@ class PopupComponent {
|
|
|
896
904
|
this.open.complete();
|
|
897
905
|
}
|
|
898
906
|
get currentOffset() {
|
|
899
|
-
return this._currentOffset;
|
|
907
|
+
return this._currentOffset();
|
|
900
908
|
}
|
|
901
909
|
set currentOffset(offset) {
|
|
902
910
|
this.setContainerStyle('left', `${offset.left}px`);
|
|
903
911
|
this.setContainerStyle('top', `${offset.top}px`);
|
|
904
912
|
this.setContainerStyle('margin', this.hasCustomOffset ? '0' : null);
|
|
905
|
-
this._currentOffset
|
|
913
|
+
this._currentOffset.set(offset);
|
|
906
914
|
}
|
|
907
915
|
setZIndex() {
|
|
908
916
|
if (this.anchor) {
|
|
@@ -917,7 +925,7 @@ class PopupComponent {
|
|
|
917
925
|
if (!this.currentOffset || isDifferentOffset(this.currentOffset, offset)) {
|
|
918
926
|
this.currentOffset = offset;
|
|
919
927
|
if (hasObservers(this.positionChange)) {
|
|
920
|
-
this.
|
|
928
|
+
this.zone.run(() => this.positionChange.emit({ offset, flip }));
|
|
921
929
|
}
|
|
922
930
|
}
|
|
923
931
|
if (this.animate) {
|
|
@@ -951,7 +959,7 @@ class PopupComponent {
|
|
|
951
959
|
this.reposition();
|
|
952
960
|
}
|
|
953
961
|
else if (hasLeaveObservers) {
|
|
954
|
-
this.
|
|
962
|
+
this.zone.run(() => {
|
|
955
963
|
this.anchorViewportLeave.emit();
|
|
956
964
|
});
|
|
957
965
|
}
|
|
@@ -974,50 +982,44 @@ class PopupComponent {
|
|
|
974
982
|
}
|
|
975
983
|
this._renderer.setStyle(this.container.nativeElement, name, value);
|
|
976
984
|
}
|
|
977
|
-
unsubscribeReposition() {
|
|
978
|
-
if (this.repositionSubscription) {
|
|
979
|
-
this.repositionSubscription.unsubscribe();
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
985
|
get hasCustomOffset() {
|
|
983
986
|
return this.offset.left !== DEFAULT_OFFSET.left || this.offset.top !== DEFAULT_OFFSET.top;
|
|
984
987
|
}
|
|
985
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
986
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
988
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", 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 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
989
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: PopupComponent, isStandalone: true, 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: `
|
|
987
990
|
<div class="k-child-animation-container">
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
</
|
|
995
|
-
</div>
|
|
991
|
+
<div [class.k-popup]="renderDefaultClass" [ngClass]="popupClass" #container>
|
|
992
|
+
<ng-content></ng-content>
|
|
993
|
+
@if (content) {
|
|
994
|
+
<ng-template [ngTemplateOutlet]="content"></ng-template>
|
|
995
|
+
}
|
|
996
|
+
<kendo-resize-sensor [rateLimit]="100" (resize)="onResize()"></kendo-resize-sensor>
|
|
997
|
+
</div>
|
|
996
998
|
</div>
|
|
997
|
-
|
|
999
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
998
1000
|
}
|
|
999
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1001
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PopupComponent, decorators: [{
|
|
1000
1002
|
type: Component,
|
|
1001
1003
|
args: [{
|
|
1004
|
+
selector: 'kendo-popup',
|
|
1002
1005
|
exportAs: 'kendo-popup',
|
|
1006
|
+
imports: [NgClass, NgTemplateOutlet, ResizeSensorComponent],
|
|
1003
1007
|
providers: [AlignService, AnimationService, DOMService, PositionService, ResizeService, ScrollableService],
|
|
1004
|
-
selector: 'kendo-popup',
|
|
1005
1008
|
template: `
|
|
1006
1009
|
<div class="k-child-animation-container">
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
</
|
|
1014
|
-
</div>
|
|
1010
|
+
<div [class.k-popup]="renderDefaultClass" [ngClass]="popupClass" #container>
|
|
1011
|
+
<ng-content></ng-content>
|
|
1012
|
+
@if (content) {
|
|
1013
|
+
<ng-template [ngTemplateOutlet]="content"></ng-template>
|
|
1014
|
+
}
|
|
1015
|
+
<kendo-resize-sensor [rateLimit]="100" (resize)="onResize()"></kendo-resize-sensor>
|
|
1016
|
+
</div>
|
|
1015
1017
|
</div>
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1018
|
+
`,
|
|
1019
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1020
|
+
standalone: true
|
|
1019
1021
|
}]
|
|
1020
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: AlignService }, { type: DOMService }, { type: PositionService }, { type: ResizeService }, { type: ScrollableService }, { type: AnimationService }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { animate: [{
|
|
1022
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: AlignService }, { type: DOMService }, { type: PositionService }, { type: ResizeService }, { type: ScrollableService }, { type: AnimationService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.Injector }], propDecorators: { animate: [{
|
|
1021
1023
|
type: Input
|
|
1022
1024
|
}], anchor: [{
|
|
1023
1025
|
type: Input
|
|
@@ -1262,10 +1264,10 @@ class PopupService {
|
|
|
1262
1264
|
]
|
|
1263
1265
|
};
|
|
1264
1266
|
}
|
|
1265
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1266
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1267
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PopupService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: POPUP_CONTAINER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1268
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PopupService, providedIn: 'root' });
|
|
1267
1269
|
}
|
|
1268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PopupService, decorators: [{
|
|
1269
1271
|
type: Injectable,
|
|
1270
1272
|
args: [{
|
|
1271
1273
|
providedIn: 'root'
|
|
@@ -1329,11 +1331,11 @@ const KENDO_POPUP = [
|
|
|
1329
1331
|
* ```
|
|
1330
1332
|
*/
|
|
1331
1333
|
class PopupModule {
|
|
1332
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1333
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1334
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PopupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1335
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: PopupModule, imports: [i1$1.ResizeSensorComponent, PopupComponent], exports: [PopupComponent] });
|
|
1336
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PopupModule, providers: [PopupService, ResizeBatchService], imports: [KENDO_RESIZESENSOR, KENDO_POPUP] });
|
|
1335
1337
|
}
|
|
1336
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PopupModule, decorators: [{
|
|
1337
1339
|
type: NgModule,
|
|
1338
1340
|
args: [{
|
|
1339
1341
|
exports: [...KENDO_POPUP],
|