@progress/kendo-angular-grid 7.2.0 → 7.2.2-dev.202207181238

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.
@@ -34,8 +34,10 @@ export declare class SinglePopupService implements OnDestroy {
34
34
  */
35
35
  readonly onClose: Subject<PopupCloseEvent>;
36
36
  private removeClick;
37
+ private pointerEventsSub;
37
38
  private popupRef;
38
39
  private scrollSubscription;
40
+ private canClosePopup;
39
41
  constructor(popupService: PopupService, renderer: Renderer2, ngZone: NgZone, scrollSyncService: ScrollSyncService, localization: LocalizationService);
40
42
  /**
41
43
  * @hidden
@@ -48,6 +50,7 @@ export declare class SinglePopupService implements OnDestroy {
48
50
  ngOnDestroy(): void;
49
51
  private detachClose;
50
52
  private attachClose;
53
+ private attachMouseListeners;
51
54
  static ɵfac: i0.ɵɵFactoryDeclaration<SinglePopupService, never>;
52
55
  static ɵprov: i0.ɵɵInjectableDeclaration<SinglePopupService>;
53
56
  }
@@ -5,7 +5,7 @@
5
5
  import { Injectable } from '@angular/core';
6
6
  import { isPresent } from '../utils';
7
7
  import { PreventableEvent } from './preventable-event';
8
- import { Subject } from 'rxjs';
8
+ import { Subject, Subscription } from 'rxjs';
9
9
  import * as i0 from "@angular/core";
10
10
  import * as i1 from "@progress/kendo-angular-popup";
11
11
  import * as i2 from "../scrolling/scroll-sync.service";
@@ -44,12 +44,14 @@ export class SinglePopupService {
44
44
  * Used to prevent the popup from closing.
45
45
  */
46
46
  this.onClose = new Subject();
47
+ this.pointerEventsSub = new Subscription();
47
48
  this.scrollSubscription = scrollSyncService.changes.subscribe(() => this.destroy());
48
49
  }
49
50
  /**
50
51
  * @hidden
51
52
  */
52
53
  open(anchor, template, popupRef, popupClass = DEFAULT_POPUP_CLASS) {
54
+ var _a;
53
55
  const toggle = isPresent(popupRef) && this.popupRef === popupRef;
54
56
  this.destroy();
55
57
  if (!toggle) {
@@ -65,6 +67,10 @@ export class SinglePopupService {
65
67
  this.renderer.setAttribute(this.popupRef.popupElement, 'dir', this.localization.rtl ? 'rtl' : 'ltr');
66
68
  this.attachClose(anchor);
67
69
  }
70
+ const popupEl = (_a = this.popupRef) === null || _a === void 0 ? void 0 : _a.popupElement;
71
+ if (popupEl) {
72
+ this.attachMouseListeners(popupEl);
73
+ }
68
74
  return this.popupRef;
69
75
  }
70
76
  /**
@@ -73,6 +79,8 @@ export class SinglePopupService {
73
79
  destroy() {
74
80
  if (this.popupRef) {
75
81
  this.detachClose();
82
+ this.pointerEventsSub.unsubscribe();
83
+ this.pointerEventsSub = null;
76
84
  this.popupRef.close();
77
85
  this.popupRef = null;
78
86
  }
@@ -88,16 +96,29 @@ export class SinglePopupService {
88
96
  }
89
97
  attachClose(skipElement) {
90
98
  this.detachClose();
91
- this.ngZone.runOutsideAngular(() => this.removeClick = this.renderer.listen("document", "click", (e) => {
99
+ this.ngZone.runOutsideAngular(() => this.removeClick = this.renderer.listen('document', 'click', (e) => {
92
100
  if (!contains(e.target, x => this.popupRef.popupElement === x || x === skipElement)) {
93
101
  const args = new PopupCloseEvent(e);
94
102
  this.onClose.next(args);
95
- if (!args.isDefaultPrevented()) {
103
+ if (!args.isDefaultPrevented() && this.canClosePopup) {
96
104
  this.destroy();
97
105
  }
106
+ this.canClosePopup = true;
98
107
  }
99
108
  }));
100
109
  }
110
+ attachMouseListeners(el) {
111
+ this.pointerEventsSub = new Subscription();
112
+ this.ngZone.runOutsideAngular(() => {
113
+ this.pointerEventsSub.add(this.renderer.listen(el, 'pointerdown', (e) => {
114
+ e.stopImmediatePropagation();
115
+ this.canClosePopup = false;
116
+ }));
117
+ this.pointerEventsSub.add(this.renderer.listen(el, 'pointerup', () => {
118
+ this.canClosePopup = true;
119
+ }));
120
+ });
121
+ }
101
122
  }
102
123
  SinglePopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService, deps: [{ token: i1.PopupService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i2.ScrollSyncService }, { token: i3.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
103
124
  SinglePopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService });
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-grid',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1655880458,
12
+ publishDate: 1658147761,
13
13
  version: '',
14
14
  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'
15
15
  };
@@ -426,7 +426,7 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
426
426
  *ngFor="let g of groups">
427
427
  </th>
428
428
  <th class="k-hierarchy-cell k-header"
429
- role="presentation"
429
+ role="gridcell"
430
430
  *ngIf="detailTemplate?.templateRef"
431
431
  kendoGridLogicalCell
432
432
  [logicalRowIndex]="levelIndex"
@@ -634,7 +634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
634
634
  *ngFor="let g of groups">
635
635
  </th>
636
636
  <th class="k-hierarchy-cell k-header"
637
- role="presentation"
637
+ role="gridcell"
638
638
  *ngIf="detailTemplate?.templateRef"
639
639
  kendoGridLogicalCell
640
640
  [logicalRowIndex]="levelIndex"
@@ -458,7 +458,7 @@ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
458
458
  [dataItem]="item.data"
459
459
  [detailExpandCell]="true"
460
460
  aria-selected="false"
461
- >
461
+ role="gridcell">
462
462
  <a class="k-icon"
463
463
  *ngIf="detailTemplate.showIf(item.data, $any(item).index)"
464
464
  [ngClass]="detailButtonStyles(item)"
@@ -677,7 +677,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
677
677
  [dataItem]="item.data"
678
678
  [detailExpandCell]="true"
679
679
  aria-selected="false"
680
- >
680
+ role="gridcell">
681
681
  <a class="k-icon"
682
682
  *ngIf="detailTemplate.showIf(item.data, $any(item).index)"
683
683
  [ngClass]="detailButtonStyles(item)"
@@ -2835,7 +2835,7 @@ const packageMetadata = {
2835
2835
  name: '@progress/kendo-angular-grid',
2836
2836
  productName: 'Kendo UI for Angular',
2837
2837
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
2838
- publishDate: 1655880458,
2838
+ publishDate: 1658147761,
2839
2839
  version: '',
2840
2840
  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'
2841
2841
  };
@@ -5999,12 +5999,14 @@ class SinglePopupService {
5999
5999
  * Used to prevent the popup from closing.
6000
6000
  */
6001
6001
  this.onClose = new Subject();
6002
+ this.pointerEventsSub = new Subscription();
6002
6003
  this.scrollSubscription = scrollSyncService.changes.subscribe(() => this.destroy());
6003
6004
  }
6004
6005
  /**
6005
6006
  * @hidden
6006
6007
  */
6007
6008
  open(anchor, template, popupRef, popupClass = DEFAULT_POPUP_CLASS) {
6009
+ var _a;
6008
6010
  const toggle = isPresent(popupRef) && this.popupRef === popupRef;
6009
6011
  this.destroy();
6010
6012
  if (!toggle) {
@@ -6020,6 +6022,10 @@ class SinglePopupService {
6020
6022
  this.renderer.setAttribute(this.popupRef.popupElement, 'dir', this.localization.rtl ? 'rtl' : 'ltr');
6021
6023
  this.attachClose(anchor);
6022
6024
  }
6025
+ const popupEl = (_a = this.popupRef) === null || _a === void 0 ? void 0 : _a.popupElement;
6026
+ if (popupEl) {
6027
+ this.attachMouseListeners(popupEl);
6028
+ }
6023
6029
  return this.popupRef;
6024
6030
  }
6025
6031
  /**
@@ -6028,6 +6034,8 @@ class SinglePopupService {
6028
6034
  destroy() {
6029
6035
  if (this.popupRef) {
6030
6036
  this.detachClose();
6037
+ this.pointerEventsSub.unsubscribe();
6038
+ this.pointerEventsSub = null;
6031
6039
  this.popupRef.close();
6032
6040
  this.popupRef = null;
6033
6041
  }
@@ -6043,16 +6051,29 @@ class SinglePopupService {
6043
6051
  }
6044
6052
  attachClose(skipElement) {
6045
6053
  this.detachClose();
6046
- this.ngZone.runOutsideAngular(() => this.removeClick = this.renderer.listen("document", "click", (e) => {
6054
+ this.ngZone.runOutsideAngular(() => this.removeClick = this.renderer.listen('document', 'click', (e) => {
6047
6055
  if (!contains$1(e.target, x => this.popupRef.popupElement === x || x === skipElement)) {
6048
6056
  const args = new PopupCloseEvent(e);
6049
6057
  this.onClose.next(args);
6050
- if (!args.isDefaultPrevented()) {
6058
+ if (!args.isDefaultPrevented() && this.canClosePopup) {
6051
6059
  this.destroy();
6052
6060
  }
6061
+ this.canClosePopup = true;
6053
6062
  }
6054
6063
  }));
6055
6064
  }
6065
+ attachMouseListeners(el) {
6066
+ this.pointerEventsSub = new Subscription();
6067
+ this.ngZone.runOutsideAngular(() => {
6068
+ this.pointerEventsSub.add(this.renderer.listen(el, 'pointerdown', (e) => {
6069
+ e.stopImmediatePropagation();
6070
+ this.canClosePopup = false;
6071
+ }));
6072
+ this.pointerEventsSub.add(this.renderer.listen(el, 'pointerup', () => {
6073
+ this.canClosePopup = true;
6074
+ }));
6075
+ });
6076
+ }
6056
6077
  }
6057
6078
  SinglePopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService, deps: [{ token: i1$2.PopupService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: ScrollSyncService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
6058
6079
  SinglePopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SinglePopupService });
@@ -14535,7 +14556,7 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
14535
14556
  *ngFor="let g of groups">
14536
14557
  </th>
14537
14558
  <th class="k-hierarchy-cell k-header"
14538
- role="presentation"
14559
+ role="gridcell"
14539
14560
  *ngIf="detailTemplate?.templateRef"
14540
14561
  kendoGridLogicalCell
14541
14562
  [logicalRowIndex]="levelIndex"
@@ -14743,7 +14764,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
14743
14764
  *ngFor="let g of groups">
14744
14765
  </th>
14745
14766
  <th class="k-hierarchy-cell k-header"
14746
- role="presentation"
14767
+ role="gridcell"
14747
14768
  *ngIf="detailTemplate?.templateRef"
14748
14769
  kendoGridLogicalCell
14749
14770
  [logicalRowIndex]="levelIndex"
@@ -16375,7 +16396,7 @@ TableBodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
16375
16396
  [dataItem]="item.data"
16376
16397
  [detailExpandCell]="true"
16377
16398
  aria-selected="false"
16378
- >
16399
+ role="gridcell">
16379
16400
  <a class="k-icon"
16380
16401
  *ngIf="detailTemplate.showIf(item.data, $any(item).index)"
16381
16402
  [ngClass]="detailButtonStyles(item)"
@@ -16594,7 +16615,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
16594
16615
  [dataItem]="item.data"
16595
16616
  [detailExpandCell]="true"
16596
16617
  aria-selected="false"
16597
- >
16618
+ role="gridcell">
16598
16619
  <a class="k-icon"
16599
16620
  *ngIf="detailTemplate.showIf(item.data, $any(item).index)"
16600
16621
  [ngClass]="detailButtonStyles(item)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "7.2.0",
3
+ "version": "7.2.2-dev.202207181238",
4
4
  "description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",