@progress/kendo-vue-popup 3.6.4 → 3.6.5-dev.202210181442
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/dist/cdn/js/kendo-vue-popup.js +1 -1
- package/dist/es/Popup.js +19 -53
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/util.js +4 -48
- package/dist/esm/Popup.js +19 -53
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/util.js +4 -48
- package/dist/npm/Popup.js +21 -64
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/util.js +4 -61
- package/package.json +3 -3
package/dist/npm/util.js
CHANGED
|
@@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.throttle = exports.AlignPoint = exports.CollisionType = exports.zIndex = exports.HAS_RELATIVE_STACKING_CONTEXT = exports.hasRelativeStackingContext = exports.FRAME_DURATION = exports.scrollableParents = exports.OVERFLOW_REGEXP = exports.hasBoundingRect = exports.isWindowAvailable = exports.isDocumentAvailable = exports.isDifferentOffset = exports.removeStackingOffset = exports.replaceOffset = exports.eitherRect = void 0;
|
|
7
|
-
|
|
8
7
|
var kendo_popup_common_1 = require("@progress/kendo-popup-common");
|
|
9
8
|
/**
|
|
10
9
|
* @hidden
|
|
11
10
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
11
|
var eitherRect = function eitherRect(rect, offset) {
|
|
15
12
|
if (!rect) {
|
|
16
13
|
return {
|
|
@@ -20,20 +17,16 @@ var eitherRect = function eitherRect(rect, offset) {
|
|
|
20
17
|
width: 0
|
|
21
18
|
};
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
return rect;
|
|
25
21
|
};
|
|
26
|
-
|
|
27
22
|
exports.eitherRect = eitherRect;
|
|
28
23
|
/**
|
|
29
24
|
* @hidden
|
|
30
25
|
*/
|
|
31
|
-
|
|
32
26
|
var replaceOffset = function replaceOffset(rect, offset) {
|
|
33
27
|
if (!offset) {
|
|
34
28
|
return rect;
|
|
35
29
|
}
|
|
36
|
-
|
|
37
30
|
var result = {
|
|
38
31
|
height: rect.height,
|
|
39
32
|
left: offset.left,
|
|
@@ -42,17 +35,14 @@ var replaceOffset = function replaceOffset(rect, offset) {
|
|
|
42
35
|
};
|
|
43
36
|
return result;
|
|
44
37
|
};
|
|
45
|
-
|
|
46
38
|
exports.replaceOffset = replaceOffset;
|
|
47
39
|
/**
|
|
48
40
|
* @hidden
|
|
49
41
|
*/
|
|
50
|
-
|
|
51
42
|
var removeStackingOffset = function removeStackingOffset(rect, stackingOffset) {
|
|
52
43
|
if (!stackingOffset) {
|
|
53
44
|
return rect;
|
|
54
45
|
}
|
|
55
|
-
|
|
56
46
|
var result = {
|
|
57
47
|
height: rect.height,
|
|
58
48
|
left: rect.left - stackingOffset.left,
|
|
@@ -61,57 +51,46 @@ var removeStackingOffset = function removeStackingOffset(rect, stackingOffset) {
|
|
|
61
51
|
};
|
|
62
52
|
return result;
|
|
63
53
|
};
|
|
64
|
-
|
|
65
54
|
exports.removeStackingOffset = removeStackingOffset;
|
|
66
55
|
/**
|
|
67
56
|
* @hidden
|
|
68
57
|
*/
|
|
69
|
-
|
|
70
58
|
var isDifferentOffset = function isDifferentOffset(oldOffset, newOffset) {
|
|
71
59
|
var oldLeft = oldOffset.left,
|
|
72
|
-
|
|
60
|
+
oldTop = oldOffset.top;
|
|
73
61
|
var newLeft = newOffset.left,
|
|
74
|
-
|
|
62
|
+
newTop = newOffset.top;
|
|
75
63
|
return Math.abs(oldLeft - newLeft) >= 1 || Math.abs(oldTop - newTop) >= 1;
|
|
76
64
|
};
|
|
77
|
-
|
|
78
65
|
exports.isDifferentOffset = isDifferentOffset;
|
|
79
66
|
/**
|
|
80
67
|
* @hidden
|
|
81
68
|
*/
|
|
82
|
-
|
|
83
69
|
var isDocumentAvailable = function isDocumentAvailable() {
|
|
84
70
|
return typeof document !== 'undefined' && !!document.body;
|
|
85
71
|
};
|
|
86
|
-
|
|
87
72
|
exports.isDocumentAvailable = isDocumentAvailable;
|
|
88
73
|
/**
|
|
89
74
|
* @hidden
|
|
90
75
|
*/
|
|
91
|
-
|
|
92
76
|
var isWindowAvailable = function isWindowAvailable() {
|
|
93
77
|
return typeof window !== 'undefined';
|
|
94
78
|
};
|
|
95
|
-
|
|
96
79
|
exports.isWindowAvailable = isWindowAvailable;
|
|
97
80
|
/**
|
|
98
81
|
* @hidden
|
|
99
82
|
*/
|
|
100
|
-
|
|
101
83
|
var hasBoundingRect = function hasBoundingRect(elem) {
|
|
102
84
|
return !!elem.getBoundingClientRect;
|
|
103
85
|
};
|
|
104
|
-
|
|
105
86
|
exports.hasBoundingRect = hasBoundingRect;
|
|
106
87
|
/**
|
|
107
88
|
* @hidden
|
|
108
89
|
*/
|
|
109
|
-
|
|
110
90
|
exports.OVERFLOW_REGEXP = /auto|scroll/;
|
|
111
91
|
/**
|
|
112
92
|
* @hidden
|
|
113
93
|
*/
|
|
114
|
-
|
|
115
94
|
var overflowStyle = function overflowStyle(element) {
|
|
116
95
|
var styles = window.getComputedStyle(element);
|
|
117
96
|
return "".concat(styles.overflow).concat(styles.overflowX).concat(styles.overflowY);
|
|
@@ -119,83 +98,63 @@ var overflowStyle = function overflowStyle(element) {
|
|
|
119
98
|
/**
|
|
120
99
|
* @hidden
|
|
121
100
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
101
|
var scrollableParents = function scrollableParents(element) {
|
|
125
102
|
var parentElements = [];
|
|
126
|
-
|
|
127
103
|
if (!(0, exports.isDocumentAvailable)() || !(0, exports.isWindowAvailable)()) {
|
|
128
104
|
return parentElements;
|
|
129
105
|
}
|
|
130
|
-
|
|
131
106
|
var parent = element.parentElement;
|
|
132
|
-
|
|
133
107
|
while (parent) {
|
|
134
108
|
if (exports.OVERFLOW_REGEXP.test(overflowStyle(parent))) {
|
|
135
109
|
parentElements.push(parent);
|
|
136
110
|
}
|
|
137
|
-
|
|
138
111
|
parent = parent.parentElement;
|
|
139
112
|
}
|
|
140
|
-
|
|
141
113
|
parentElements.push(window);
|
|
142
114
|
return parentElements;
|
|
143
115
|
};
|
|
144
|
-
|
|
145
116
|
exports.scrollableParents = scrollableParents;
|
|
146
117
|
/**
|
|
147
118
|
* @hidden
|
|
148
119
|
*/
|
|
149
|
-
|
|
150
120
|
exports.FRAME_DURATION = 1000 / 60; // 1000ms divided by 60fps
|
|
151
|
-
|
|
152
121
|
/**
|
|
153
122
|
* @hidden
|
|
154
123
|
*/
|
|
155
|
-
|
|
156
124
|
var hasRelativeStackingContext = function hasRelativeStackingContext() {
|
|
157
125
|
if (!(0, exports.isDocumentAvailable)()) {
|
|
158
126
|
return false;
|
|
159
127
|
}
|
|
160
|
-
|
|
161
128
|
var top = 10;
|
|
162
129
|
var parent = document.createElement('div');
|
|
163
130
|
parent.style.transform = 'matrix(10, 0, 0, 10, 0, 0)';
|
|
164
131
|
parent.innerHTML = "<div>child</div>";
|
|
165
132
|
document.body.appendChild(parent);
|
|
166
|
-
|
|
167
133
|
if (parent && parent.firstChild) {
|
|
168
134
|
var firstChild = parent.firstChild;
|
|
169
135
|
firstChild.style.position = 'fixed';
|
|
170
136
|
firstChild.style.top = "".concat(top, "px");
|
|
171
137
|
}
|
|
172
|
-
|
|
173
138
|
var isDifferent = parent.children[0].getBoundingClientRect().top !== top;
|
|
174
139
|
document.body.removeChild(parent);
|
|
175
140
|
return isDifferent;
|
|
176
141
|
};
|
|
177
|
-
|
|
178
142
|
exports.hasRelativeStackingContext = hasRelativeStackingContext;
|
|
179
143
|
/**
|
|
180
144
|
* @hidden
|
|
181
145
|
*/
|
|
182
|
-
|
|
183
146
|
exports.HAS_RELATIVE_STACKING_CONTEXT = (0, exports.hasRelativeStackingContext)();
|
|
184
147
|
/**
|
|
185
148
|
* @hidden
|
|
186
149
|
*/
|
|
187
|
-
|
|
188
150
|
var zIndex = function zIndex(anchor, container) {
|
|
189
151
|
if (!anchor || !(0, exports.isDocumentAvailable)() || !(0, exports.isWindowAvailable)()) {
|
|
190
152
|
return null;
|
|
191
153
|
}
|
|
192
|
-
|
|
193
154
|
var sibling = (0, kendo_popup_common_1.siblingContainer)(anchor, container);
|
|
194
|
-
|
|
195
155
|
if (!sibling) {
|
|
196
156
|
return null;
|
|
197
157
|
}
|
|
198
|
-
|
|
199
158
|
var result = [anchor].concat((0, kendo_popup_common_1.parents)(anchor, sibling)).reduce(function (index, p) {
|
|
200
159
|
var zIndexStyle = p.style.zIndex || window.getComputedStyle(p).zIndex;
|
|
201
160
|
var current = parseInt(zIndexStyle, 10);
|
|
@@ -203,12 +162,10 @@ var zIndex = function zIndex(anchor, container) {
|
|
|
203
162
|
}, 0);
|
|
204
163
|
return result ? result + 1 : null;
|
|
205
164
|
};
|
|
206
|
-
|
|
207
165
|
exports.zIndex = zIndex;
|
|
208
166
|
/**
|
|
209
167
|
* @hidden
|
|
210
168
|
*/
|
|
211
|
-
|
|
212
169
|
exports.CollisionType = {
|
|
213
170
|
fit: 'fit',
|
|
214
171
|
flip: 'flip'
|
|
@@ -216,7 +173,6 @@ exports.CollisionType = {
|
|
|
216
173
|
/**
|
|
217
174
|
* @hidden
|
|
218
175
|
*/
|
|
219
|
-
|
|
220
176
|
exports.AlignPoint = {
|
|
221
177
|
left: 'left',
|
|
222
178
|
center: 'center',
|
|
@@ -227,58 +183,45 @@ exports.AlignPoint = {
|
|
|
227
183
|
/**
|
|
228
184
|
* @hidden
|
|
229
185
|
*/
|
|
230
|
-
|
|
231
186
|
var throttle = function throttle(func, wait, options) {
|
|
232
187
|
if (options === void 0) {
|
|
233
188
|
options = {};
|
|
234
189
|
}
|
|
235
|
-
|
|
236
190
|
var timeout, context, args, result;
|
|
237
191
|
var previous = 0;
|
|
238
192
|
options = options || {};
|
|
239
|
-
|
|
240
193
|
var later = function later() {
|
|
241
194
|
previous = options.leading === false ? 0 : new Date().getTime();
|
|
242
195
|
timeout = null;
|
|
243
196
|
result = func.apply(context, args);
|
|
244
|
-
|
|
245
197
|
if (!timeout) {
|
|
246
198
|
context = args = null;
|
|
247
199
|
}
|
|
248
200
|
};
|
|
249
|
-
|
|
250
201
|
var throttled = function throttled() {
|
|
251
202
|
var now = new Date().getTime();
|
|
252
|
-
|
|
253
203
|
if (!previous && options.leading === false) {
|
|
254
204
|
previous = now;
|
|
255
205
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
206
|
+
var remaining = wait - (now - previous);
|
|
207
|
+
// @ts-ignore
|
|
259
208
|
context = this;
|
|
260
209
|
args = arguments;
|
|
261
|
-
|
|
262
210
|
if (remaining <= 0 || remaining > wait) {
|
|
263
211
|
if (timeout) {
|
|
264
212
|
clearTimeout(timeout);
|
|
265
213
|
timeout = null;
|
|
266
214
|
}
|
|
267
|
-
|
|
268
215
|
previous = now;
|
|
269
216
|
result = func.apply(context, args);
|
|
270
|
-
|
|
271
217
|
if (!timeout) {
|
|
272
218
|
context = args = null;
|
|
273
219
|
}
|
|
274
220
|
} else if (!timeout && options.trailing !== false) {
|
|
275
221
|
timeout = setTimeout(later, remaining);
|
|
276
222
|
}
|
|
277
|
-
|
|
278
223
|
return result;
|
|
279
224
|
};
|
|
280
|
-
|
|
281
225
|
return throttled;
|
|
282
226
|
};
|
|
283
|
-
|
|
284
227
|
exports.throttle = throttle;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-popup",
|
|
3
3
|
"description": "Kendo UI for Vue Popup package",
|
|
4
|
-
"version": "3.6.
|
|
4
|
+
"version": "3.6.5-dev.202210181442",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-vue.git"
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@progress/kendo-popup-common": "^1.6.1",
|
|
36
|
-
"@progress/kendo-vue-animation": "3.6.
|
|
37
|
-
"@progress/kendo-vue-common": "3.6.
|
|
36
|
+
"@progress/kendo-vue-animation": "3.6.5-dev.202210181442",
|
|
37
|
+
"@progress/kendo-vue-common": "3.6.5-dev.202210181442"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@progress/kendo-licensing": "^1.1.0"
|