@progress/kendo-angular-popup 25.0.0-develop.17 → 25.0.0-develop.19

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.
@@ -518,7 +518,9 @@ class ScrollableService {
518
518
  const isDocument = target === document;
519
519
  const isWindow = target === window;
520
520
  if (isParent || isDocument || isWindow) {
521
- callback(this.isVisible(this.element, target));
521
+ const visible = this.isVisible(this.element, target);
522
+ const direction = visible ? undefined : this.getLeaveDirection(this.element, target);
523
+ callback(visible, direction);
522
524
  }
523
525
  };
524
526
  this.subscription = merge(...observables).subscribe(subscriber);
@@ -547,6 +549,15 @@ class ScrollableService {
547
549
  }
548
550
  return true;
549
551
  }
552
+ getLeaveDirection(elem, container) {
553
+ const elemRect = this._dom.boundingOffset(elem);
554
+ const containerRect = this._dom.boundingOffset(this._dom.nativeElement(container));
555
+ const vertical = THRESHOLD_DIFF < (containerRect.top - elemRect.bottom) ||
556
+ THRESHOLD_DIFF < (elemRect.top - containerRect.bottom);
557
+ const horizontal = THRESHOLD_DIFF < (elemRect.left - containerRect.right) ||
558
+ THRESHOLD_DIFF < (containerRect.left - elemRect.right);
559
+ return { horizontal, vertical };
560
+ }
550
561
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: ScrollableService, deps: [{ token: DOMService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
551
562
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: ScrollableService });
552
563
  }
@@ -693,8 +704,8 @@ const packageMetadata = {
693
704
  productName: 'Kendo UI for Angular',
694
705
  productCode: 'KENDOUIANGULAR',
695
706
  productCodes: ['KENDOUIANGULAR'],
696
- publishDate: 1785492985,
697
- version: '25.0.0-develop.17',
707
+ publishDate: 1785503183,
708
+ version: '25.0.0-develop.19',
698
709
  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
710
  };
700
711
 
@@ -953,14 +964,14 @@ class PopupComponent {
953
964
  margin: this.margin
954
965
  });
955
966
  }
956
- onScroll(isInViewPort) {
967
+ onScroll(isInViewPort, direction) {
957
968
  const hasLeaveObservers = hasObservers(this.anchorViewportLeave);
958
969
  if (isInViewPort || !hasLeaveObservers) {
959
970
  this.reposition();
960
971
  }
961
972
  else if (hasLeaveObservers) {
962
973
  this.zone.run(() => {
963
- this.anchorViewportLeave.emit();
974
+ this.anchorViewportLeave.emit(direction);
964
975
  });
965
976
  }
966
977
  }
package/index.d.ts CHANGED
@@ -283,6 +283,13 @@ declare class ResizeService {
283
283
  static ɵprov: i0.ɵɵInjectableDeclaration<ResizeService>;
284
284
  }
285
285
 
286
+ /**
287
+ * @hidden
288
+ */
289
+ interface ScrollableLeaveDirection {
290
+ horizontal: boolean;
291
+ vertical: boolean;
292
+ }
286
293
  /**
287
294
  * @hidden
288
295
  */
@@ -293,9 +300,10 @@ declare class ScrollableService {
293
300
  private subscription;
294
301
  constructor(_dom: DOMService, zone: NgZone);
295
302
  forElement(element: HTMLElement): ScrollableService;
296
- subscribe(callback: (visible: boolean) => void): void;
303
+ subscribe(callback: (visible: boolean, direction?: ScrollableLeaveDirection) => void): void;
297
304
  unsubscribe(): void;
298
305
  isVisible(elem: HTMLElement, container: any): boolean;
306
+ private getLeaveDirection;
299
307
  static ɵfac: i0.ɵɵFactoryDeclaration<ScrollableService, never>;
300
308
  static ɵprov: i0.ɵɵInjectableDeclaration<ScrollableService>;
301
309
  }
@@ -700,4 +708,4 @@ declare const SCALE: InjectionToken<number>;
700
708
  declare const KENDO_POPUP: readonly [typeof PopupComponent];
701
709
 
702
710
  export { KENDO_POPUP, POPUP_CONTAINER, PopupComponent, PopupModule, PopupService, SCALE };
703
- export type { Align, AnimationDirection, AnimationType, Collision, Margin, Offset, PopupAnimation, PopupRef, PopupSettings, PositionMode };
711
+ export type { Align, AnimationDirection, AnimationType, Collision, Margin, Offset, PopupAnimation, PopupRef, PopupSettings, PositionMode, ScrollableLeaveDirection };
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1785492985,
11
- "version": "25.0.0-develop.17",
10
+ "publishDate": 1785503183,
11
+ "version": "25.0.0-develop.19",
12
12
  "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"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-popup",
3
- "version": "25.0.0-develop.17",
3
+ "version": "25.0.0-develop.19",
4
4
  "description": "Kendo UI Angular Popup component - an easily customized popup from the most trusted provider of professional Angular components.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -34,7 +34,7 @@
34
34
  "package": {
35
35
  "productName": "Kendo UI for Angular",
36
36
  "productCode": "KENDOUIANGULAR",
37
- "publishDate": 1785492985,
37
+ "publishDate": 1785503183,
38
38
  "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"
39
39
  }
40
40
  },
@@ -43,14 +43,14 @@
43
43
  "@angular/common": "20 - 22",
44
44
  "@angular/core": "20 - 22",
45
45
  "@angular/platform-browser": "20 - 22",
46
- "@progress/kendo-angular-common": "25.0.0-develop.17",
46
+ "@progress/kendo-angular-common": "25.0.0-develop.19",
47
47
  "@progress/kendo-licensing": "^1.11.0",
48
48
  "rxjs": "^6.5.3 || ^7.0.0"
49
49
  },
50
50
  "dependencies": {
51
51
  "@progress/kendo-popup-common": "1.9.5",
52
52
  "tslib": "^2.3.1",
53
- "@progress/kendo-angular-schematics": "25.0.0-develop.17"
53
+ "@progress/kendo-angular-schematics": "25.0.0-develop.19"
54
54
  },
55
55
  "schematics": "./schematics/collection.json",
56
56
  "module": "fesm2022/progress-kendo-angular-popup.mjs",