@progress/kendo-angular-grid 7.2.0 → 7.2.1-dev.202206301340
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(
|
|
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:
|
|
12
|
+
publishDate: 1656596315,
|
|
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
|
};
|
|
@@ -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:
|
|
2838
|
+
publishDate: 1656596315,
|
|
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(
|
|
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 });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-grid",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.1-dev.202206301340",
|
|
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",
|