@progress/kendo-angular-tooltip 21.4.1 → 22.0.0-develop.1
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-tooltip.mjs +51 -51
- package/package.json +11 -19
- package/popover/directives-base.d.ts +1 -1
- package/esm2022/constants.mjs +0 -12
- package/esm2022/directives.mjs +0 -101
- package/esm2022/index.mjs +0 -22
- package/esm2022/localization/localized-messages.directive.mjs +0 -44
- package/esm2022/models/animation.model.mjs +0 -5
- package/esm2022/models/events.mjs +0 -87
- package/esm2022/models/functions.model.mjs +0 -5
- package/esm2022/models/popover-show-option.type.mjs +0 -5
- package/esm2022/models/position.type.mjs +0 -5
- package/esm2022/models/show.option.type.mjs +0 -5
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/popover/anchor.directive.mjs +0 -172
- package/esm2022/popover/container.directive.mjs +0 -190
- package/esm2022/popover/directives-base.mjs +0 -319
- package/esm2022/popover/popover.component.mjs +0 -562
- package/esm2022/popover/popover.service.mjs +0 -71
- package/esm2022/popover/template-directives/actions-template.directive.mjs +0 -38
- package/esm2022/popover/template-directives/body-template.directive.mjs +0 -38
- package/esm2022/popover/template-directives/title-template.directive.mjs +0 -38
- package/esm2022/popover.module.mjs +0 -47
- package/esm2022/progress-kendo-angular-tooltip.mjs +0 -8
- package/esm2022/tooltip/tooltip.content.component.mjs +0 -293
- package/esm2022/tooltip/tooltip.directive.mjs +0 -490
- package/esm2022/tooltip/tooltip.settings.mjs +0 -70
- package/esm2022/tooltip.module.mjs +0 -44
- package/esm2022/tooltips.module.mjs +0 -51
- package/esm2022/utils.mjs +0 -153
package/esm2022/utils.mjs
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { focusableSelector } from '@progress/kendo-angular-common';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
let idx = 0;
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
let popoverTitleIdx = 0;
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
let popoverBodyIdx = 0;
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
export const getId = (prefix, idSource) => {
|
|
22
|
-
switch (idSource) {
|
|
23
|
-
case 'popoverTitle':
|
|
24
|
-
return `${prefix}-${++popoverTitleIdx}`;
|
|
25
|
-
case 'popoverBody':
|
|
26
|
-
return `${prefix}-${++popoverBodyIdx}`;
|
|
27
|
-
default:
|
|
28
|
-
return `${prefix}-${++idx}`;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* @hidden
|
|
33
|
-
*/
|
|
34
|
-
export function align(position, offset) {
|
|
35
|
-
let anchorAlign = {};
|
|
36
|
-
let popupAlign = {};
|
|
37
|
-
let popupMargin = {};
|
|
38
|
-
switch (position) {
|
|
39
|
-
case 'top':
|
|
40
|
-
anchorAlign = { horizontal: 'center', vertical: 'top' };
|
|
41
|
-
popupAlign = { horizontal: 'center', vertical: 'bottom' };
|
|
42
|
-
popupMargin = { horizontal: 0, vertical: offset };
|
|
43
|
-
break;
|
|
44
|
-
case 'bottom':
|
|
45
|
-
anchorAlign = { horizontal: 'center', vertical: 'bottom' };
|
|
46
|
-
popupAlign = { horizontal: 'center', vertical: 'top' };
|
|
47
|
-
popupMargin = { horizontal: 0, vertical: offset };
|
|
48
|
-
break;
|
|
49
|
-
case 'right':
|
|
50
|
-
anchorAlign = { horizontal: 'right', vertical: 'center' };
|
|
51
|
-
popupAlign = { horizontal: 'left', vertical: 'center' };
|
|
52
|
-
popupMargin = { horizontal: offset, vertical: 0 };
|
|
53
|
-
break;
|
|
54
|
-
case 'left':
|
|
55
|
-
anchorAlign = { horizontal: 'left', vertical: 'center' };
|
|
56
|
-
popupAlign = { horizontal: 'right', vertical: 'center' };
|
|
57
|
-
popupMargin = { horizontal: offset, vertical: 0 };
|
|
58
|
-
break;
|
|
59
|
-
default: break;
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
anchorAlign,
|
|
63
|
-
popupAlign,
|
|
64
|
-
popupMargin
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @hidden
|
|
69
|
-
*/
|
|
70
|
-
export function collision(inputcollision, position) {
|
|
71
|
-
if (inputcollision) {
|
|
72
|
-
return inputcollision;
|
|
73
|
-
}
|
|
74
|
-
if (position === 'top' || position === 'bottom') {
|
|
75
|
-
return { horizontal: 'fit', vertical: 'flip' };
|
|
76
|
-
}
|
|
77
|
-
return { horizontal: 'flip', vertical: 'fit' };
|
|
78
|
-
}
|
|
79
|
-
function isDocumentNode(container) {
|
|
80
|
-
return container.nodeType === 9;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* @hidden
|
|
84
|
-
*/
|
|
85
|
-
export function closestBySelector(element, selector) {
|
|
86
|
-
if (element.closest) {
|
|
87
|
-
return element.closest(selector);
|
|
88
|
-
}
|
|
89
|
-
const matches = Element.prototype.matches ?
|
|
90
|
-
(el, sel) => el.matches(sel)
|
|
91
|
-
: (el, sel) => el.msMatchesSelector(sel);
|
|
92
|
-
let node = element;
|
|
93
|
-
while (node && !isDocumentNode(node)) {
|
|
94
|
-
if (matches(node, selector)) {
|
|
95
|
-
return node;
|
|
96
|
-
}
|
|
97
|
-
node = node.parentNode;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* @hidden
|
|
102
|
-
*/
|
|
103
|
-
export function contains(container, child) {
|
|
104
|
-
if (!container) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
if (isDocumentNode(container)) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
if (container.contains) {
|
|
111
|
-
return container.contains(child);
|
|
112
|
-
}
|
|
113
|
-
if (container.compareDocumentPosition) {
|
|
114
|
-
return !!(container.compareDocumentPosition(child) & Node.DOCUMENT_POSITION_CONTAINED_BY);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* @hidden
|
|
119
|
-
*/
|
|
120
|
-
export const hasParent = (node, parent) => {
|
|
121
|
-
while (node && node !== parent) {
|
|
122
|
-
node = node.parentNode;
|
|
123
|
-
}
|
|
124
|
-
return node;
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* @hidden
|
|
128
|
-
*/
|
|
129
|
-
export function getCenterOffset(item, dir, size) {
|
|
130
|
-
const rect = item.getBoundingClientRect();
|
|
131
|
-
return rect[dir] + (rect[size] / 2);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* @hidden
|
|
135
|
-
*/
|
|
136
|
-
export function containsItem(collection, item) {
|
|
137
|
-
return collection.indexOf(item) !== -1;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* @hidden
|
|
141
|
-
*/
|
|
142
|
-
export function getAllFocusableChildren(parent) {
|
|
143
|
-
return parent.querySelectorAll(focusableSelector);
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* @hidden
|
|
147
|
-
*/
|
|
148
|
-
export function getFirstAndLastFocusable(parent) {
|
|
149
|
-
const all = getAllFocusableChildren(parent);
|
|
150
|
-
const firstFocusable = all.length > 0 ? all[0] : parent;
|
|
151
|
-
const lastFocusable = all.length > 0 ? all[all.length - 1] : parent;
|
|
152
|
-
return [firstFocusable, lastFocusable];
|
|
153
|
-
}
|