@progress/kendo-angular-common 11.6.0 → 12.0.0-develop.10
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/dom-queries/closest-by-selector.d.ts +5 -0
- package/dom-queries.d.ts +1 -0
- package/esm2020/dom-queries/closest-by-selector.mjs +20 -0
- package/esm2020/dom-queries.mjs +1 -0
- package/fesm2015/progress-kendo-angular-common.mjs +18 -1
- package/fesm2020/progress-kendo-angular-common.mjs +18 -1
- package/package.json +2 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export declare function closestBySelector(element: any, selector: string): any;
|
package/dom-queries.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export { isVisible } from './dom-queries/is-visible';
|
|
|
15
15
|
export { matchesClasses } from './dom-queries/matches-classes';
|
|
16
16
|
export { matchesNodeName } from './dom-queries/matches-node-name';
|
|
17
17
|
export { rtlScrollPosition } from './dom-queries/rtl-scroll-position';
|
|
18
|
+
export { closestBySelector } from './dom-queries/closest-by-selector';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export function closestBySelector(element, selector) {
|
|
6
|
+
if (element.closest) {
|
|
7
|
+
return element.closest(selector);
|
|
8
|
+
}
|
|
9
|
+
const matches = Element.prototype.matches ?
|
|
10
|
+
(el, sel) => el.matches(sel)
|
|
11
|
+
: (el, sel) => el.msMatchesSelector(sel);
|
|
12
|
+
let node = element;
|
|
13
|
+
while (node && !isDocumentNode(node)) {
|
|
14
|
+
if (matches(node, selector)) {
|
|
15
|
+
return node;
|
|
16
|
+
}
|
|
17
|
+
node = node.parentNode;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const isDocumentNode = (container) => container.nodeType === 9;
|
package/esm2020/dom-queries.mjs
CHANGED
|
@@ -15,3 +15,4 @@ export { isVisible } from './dom-queries/is-visible';
|
|
|
15
15
|
export { matchesClasses } from './dom-queries/matches-classes';
|
|
16
16
|
export { matchesNodeName } from './dom-queries/matches-node-name';
|
|
17
17
|
export { rtlScrollPosition } from './dom-queries/rtl-scroll-position';
|
|
18
|
+
export { closestBySelector } from './dom-queries/closest-by-selector';
|
|
@@ -254,6 +254,23 @@ function rtlScrollPosition(position, element, initial) {
|
|
|
254
254
|
return result;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
function closestBySelector(element, selector) {
|
|
258
|
+
if (element.closest) {
|
|
259
|
+
return element.closest(selector);
|
|
260
|
+
}
|
|
261
|
+
const matches = Element.prototype.matches ?
|
|
262
|
+
(el, sel) => el.matches(sel)
|
|
263
|
+
: (el, sel) => el.msMatchesSelector(sel);
|
|
264
|
+
let node = element;
|
|
265
|
+
while (node && !isDocumentNode(node)) {
|
|
266
|
+
if (matches(node, selector)) {
|
|
267
|
+
return node;
|
|
268
|
+
}
|
|
269
|
+
node = node.parentNode;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const isDocumentNode = (container) => container.nodeType === 9;
|
|
273
|
+
|
|
257
274
|
/**
|
|
258
275
|
* @hidden
|
|
259
276
|
*/
|
|
@@ -849,5 +866,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
849
866
|
* Generated bundle index. Do not edit.
|
|
850
867
|
*/
|
|
851
868
|
|
|
852
|
-
export { DraggableDirective, DraggableModule, EventsModule, EventsOutsideAngularDirective, KendoInput, Keys, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ResizeSensorModule, ScrollbarWidthService, anyChanged, closest, closestInScope, contains, findElement, findFocusable, findFocusableChild, focusableSelector, guid, hasClasses, hasObservers, isChanged, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isPresent, isSafari, isString, isVisible, matchesClasses, matchesNodeName, parseCSSClassNames, rtlScrollPosition, scrollbarWidth, splitStringToArray };
|
|
869
|
+
export { DraggableDirective, DraggableModule, EventsModule, EventsOutsideAngularDirective, KendoInput, Keys, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ResizeSensorModule, ScrollbarWidthService, anyChanged, closest, closestBySelector, closestInScope, contains, findElement, findFocusable, findFocusableChild, focusableSelector, guid, hasClasses, hasObservers, isChanged, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isPresent, isSafari, isString, isVisible, matchesClasses, matchesNodeName, parseCSSClassNames, rtlScrollPosition, scrollbarWidth, splitStringToArray };
|
|
853
870
|
|
|
@@ -254,6 +254,23 @@ function rtlScrollPosition(position, element, initial) {
|
|
|
254
254
|
return result;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
+
function closestBySelector(element, selector) {
|
|
258
|
+
if (element.closest) {
|
|
259
|
+
return element.closest(selector);
|
|
260
|
+
}
|
|
261
|
+
const matches = Element.prototype.matches ?
|
|
262
|
+
(el, sel) => el.matches(sel)
|
|
263
|
+
: (el, sel) => el.msMatchesSelector(sel);
|
|
264
|
+
let node = element;
|
|
265
|
+
while (node && !isDocumentNode(node)) {
|
|
266
|
+
if (matches(node, selector)) {
|
|
267
|
+
return node;
|
|
268
|
+
}
|
|
269
|
+
node = node.parentNode;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const isDocumentNode = (container) => container.nodeType === 9;
|
|
273
|
+
|
|
257
274
|
/**
|
|
258
275
|
* @hidden
|
|
259
276
|
*/
|
|
@@ -845,5 +862,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
845
862
|
* Generated bundle index. Do not edit.
|
|
846
863
|
*/
|
|
847
864
|
|
|
848
|
-
export { DraggableDirective, DraggableModule, EventsModule, EventsOutsideAngularDirective, KendoInput, Keys, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ResizeSensorModule, ScrollbarWidthService, anyChanged, closest, closestInScope, contains, findElement, findFocusable, findFocusableChild, focusableSelector, guid, hasClasses, hasObservers, isChanged, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isPresent, isSafari, isString, isVisible, matchesClasses, matchesNodeName, parseCSSClassNames, rtlScrollPosition, scrollbarWidth, splitStringToArray };
|
|
865
|
+
export { DraggableDirective, DraggableModule, EventsModule, EventsOutsideAngularDirective, KendoInput, Keys, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ResizeSensorModule, ScrollbarWidthService, anyChanged, closest, closestBySelector, closestInScope, contains, findElement, findFocusable, findFocusableChild, focusableSelector, guid, hasClasses, hasObservers, isChanged, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isPresent, isSafari, isString, isVisible, matchesClasses, matchesNodeName, parseCSSClassNames, rtlScrollPosition, scrollbarWidth, splitStringToArray };
|
|
849
866
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0-develop.10",
|
|
4
4
|
"description": "Kendo UI for Angular - Utility Package",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@progress/kendo-common": "^0.2.1",
|
|
24
24
|
"@progress/kendo-draggable": "^3.0.2",
|
|
25
25
|
"tslib": "^2.3.1",
|
|
26
|
-
"@progress/kendo-angular-schematics": "
|
|
26
|
+
"@progress/kendo-angular-schematics": "12.0.0-develop.10"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|