@progress/kendo-vue-popup 8.1.0-develop.5 → 8.1.0-develop.7
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/Popup.d.ts +8 -4
- package/Popup.js +2 -2
- package/Popup.mjs +45 -32
- package/dist/cdn/js/kendo-vue-popup.js +1 -1
- package/models/Events.d.ts +17 -0
- package/models/PopupSettings.d.ts +10 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +4 -4
package/Popup.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { PropType } from 'vue';
|
|
9
9
|
import { Position } from './models/Position';
|
|
10
10
|
import { PopupProps } from './models/PopupProps';
|
|
11
|
+
import { MouseDownOutsideEvent } from './models/Events';
|
|
11
12
|
/**
|
|
12
13
|
* @hidden
|
|
13
14
|
*/
|
|
@@ -63,11 +64,13 @@ declare const Popup: import('vue').DefineComponent<import('vue').ExtractPropType
|
|
|
63
64
|
type: PropType<string>;
|
|
64
65
|
default: string;
|
|
65
66
|
};
|
|
66
|
-
onOpen: PropType<(event: import('
|
|
67
|
-
onClose: PropType<(event: import('
|
|
67
|
+
onOpen: PropType<(event: import('./models/Events').OpenEvent) => void>;
|
|
68
|
+
onClose: PropType<(event: import('./models/Events').CloseEvent) => void>;
|
|
69
|
+
onMousedownoutside: PropType<(event: MouseDownOutsideEvent) => void>;
|
|
68
70
|
}>, {}, {
|
|
69
71
|
hasMounted: boolean;
|
|
70
72
|
}, {}, {
|
|
73
|
+
handleMouseDown(event: MouseEvent): void;
|
|
71
74
|
onOpened(): void;
|
|
72
75
|
onClosing(): void;
|
|
73
76
|
onClosed(): void;
|
|
@@ -134,8 +137,9 @@ declare const Popup: import('vue').DefineComponent<import('vue').ExtractPropType
|
|
|
134
137
|
type: PropType<string>;
|
|
135
138
|
default: string;
|
|
136
139
|
};
|
|
137
|
-
onOpen: PropType<(event: import('
|
|
138
|
-
onClose: PropType<(event: import('
|
|
140
|
+
onOpen: PropType<(event: import('./models/Events').OpenEvent) => void>;
|
|
141
|
+
onClose: PropType<(event: import('./models/Events').CloseEvent) => void>;
|
|
142
|
+
onMousedownoutside: PropType<(event: MouseDownOutsideEvent) => void>;
|
|
139
143
|
}>> & Readonly<{}>, {
|
|
140
144
|
animate: boolean;
|
|
141
145
|
anchor: string;
|
package/Popup.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),_=require("@progress/kendo-vue-animation"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),_=require("@progress/kendo-vue-animation"),l=require("./util.js"),w=require("./services/alignService.js"),A=require("./services/domService.js"),v=require("./services/positionService.js"),p=require("@progress/kendo-vue-common"),C=require("./package-metadata.js");function S(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c.isVNode(t)}const E=100,$=1,y={left:-1e3,top:0},m="k-animation-container-shown",g="k-popup",P=c.defineComponent({name:"Popup",props:{appendTo:{type:String,default:""},anchor:{type:[String,Object],default:""},className:String,id:String,popupClass:String,collision:{type:Object,default:function(){return{horizontal:l.CollisionType.fit,vertical:l.CollisionType.flip}}},anchorAlign:{type:Object,default:function(){return{horizontal:l.AlignPoint.left,vertical:l.AlignPoint.bottom}}},popupAlign:{type:Object,default:function(){return{horizontal:l.AlignPoint.left,vertical:l.AlignPoint.top}}},offset:{type:Object,default:function(){return y}},show:{type:Boolean,default:!1},animate:{type:[Boolean,Object],default:!0},direction:{type:String,default:"down"},onOpen:Function,onClose:Function,onMousedownoutside:Function},inject:{kCurrentZIndex:{default:null}},data(){return{hasMounted:!1}},created(){p.validatePackage(C.packageMetadata),this.mountedAppendTo=void 0,this.mountedAnchor=void 0,this._clonedElement=void 0,this._flipped=!1,this._offsetTop=0,this._offsetLeft=-1e3,this._exitingAnimation=!1,this._prevShow=!1,this._prevShow=this.$props.show,this._domService=new A.DOMService,this._alignService=new w.AlignService(this._domService),this._positionService=new v.PositionService(this._domService),this.reposition=l.throttle(this.reposition.bind(this),l.FRAME_DURATION)},mounted(){p.canUseDOM&&(this.mountedAppendTo=this.appendTo?this.getParentRef(this.appendTo):document.body,this.mountedAnchor=this.anchor?this.getParentRef(this.anchor,!0):document.body),this._parentElement=this.$el.parentElement,this._clonedElement=this.$el.cloneNode(!0),this.hasMounted=!0,this.mountedAppendTo.appendChild(this.$el)},updated(){this._prevShow=this.$props.show},unmounted(){this.detachRepositionHandlers(),window==null||window.removeEventListener("mousedown",this.handleMouseDown)},beforeUnmount(){this._parentElement&&this._parentElement.appendChild(this.$el)},methods:{handleMouseDown(t){var n,s;const i=((n=t==null?void 0:t.target)==null?void 0:n.closest(".k-animation-container"))===null,e=((s=this.mountedAnchor)==null?void 0:s.contains(t==null?void 0:t.target))||!1;if(i){const r={target:this,event:t,isAnchorClicked:e};this.$emit("mousedownoutside",r),window==null||window.removeEventListener("mousedown",this.handleMouseDown)}},onOpened(){const t=this.$el;window==null||window.addEventListener("mousedown",this.handleMouseDown),this.$props.show&&t.classList.add(m),this.attachRepositionHandlers(t),this.$emit("open",{target:this})},onClosing(){this.$props.show||this.$el.classList.remove(m),this.detachRepositionHandlers()},onClosed(){this._exitingAnimation&&(this._exitingAnimation=!1,this.$forceUpdate()),this.$emit("close",{target:this})},transitionDuration(){const t=this.$props.animate;let i=0,e=0;return t&&(t===!0?i=e=void 0:(i=t.openDuration,e=t.closeDuration)),{transitionEnterDuration:i,transitionExitDuration:e}},getParentRef(t,i){let e=this.$parent;for(;!e.$refs[t];){if(e&&e.kendoAnchorRef&&i)return e.kendoAnchorRef;if(e=e.$parent,!e&&p.canUseDOM)return document.getElementById(t)||document.body}return e.$refs[t].$el||e.$refs[t]},position(t,i,e){const{anchorAlign:n,popupAlign:s,collision:r,offset:d}=t,o=e?this.mountedAnchor:document.body,a=this._alignService.alignElement({anchor:e?o:void 0,element:i,elementAlign:s,anchorAlign:n,offset:d});return this._positionService.positionElement({anchor:o,anchorAlign:n,collisions:r,element:i,currentLocation:a,elementAlign:s})},calculatePosition(t,i){if(!i||!l.isWindowAvailable()||!p.canUseDOM)return{flipped:!1,offset:t.offset};const e=p.getDefaultSlots(this),n=document.createElement("div"),s=this.$el&&this.$el.firstChild&&this.$el.firstChild.firstChild?this.$el.firstChild.firstChild.cloneNode(!0):null,r=s&&s.getBoundingClientRect?s:this._clonedElement;if(r)n.appendChild(r);else{const o=e&&e[0].props?e[0].props.class:"",a=this.$props.popupClass;n.innerHTML=`<div class="k-animation-container k-animation-container-relative">
|
|
9
9
|
<div class="k-popup k-animation-container k-animation-container-relative">
|
|
10
10
|
<div class="${o} ${a}" >
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
|
-
</div>`}if(i.appendChild(n),n&&n.firstChild){const o=n.firstChild;o.style.position="absolute",o.style.visibility="hidden",o.style.display="block",o.style.left="-1000",o.style.top="0";const a=e&&e[0].props?e[0].props.style:{};if(a)for(const[h,f]of Object.entries(a))o.style[h]=f}const
|
|
13
|
+
</div>`}if(i.appendChild(n),n&&n.firstChild){const o=n.firstChild;o.style.position="absolute",o.style.visibility="hidden",o.style.display="block",o.style.left="-1000",o.style.top="0";const a=e&&e[0].props?e[0].props.style:{};if(a)for(const[h,f]of Object.entries(a))o.style[h]=f}const d=this.position(t,n.firstChild,this.$props.anchor);return n.parentNode.removeChild(n),d},attachRepositionHandlers(t){this.detachRepositionHandlers(),this._scrollableParents=this._domService.scrollableParents(this.$props.anchor?this.mountedAnchor:t),this._scrollableParents.map(i=>i.addEventListener("scroll",this.reposition)),window.addEventListener("resize",this.reposition)},detachRepositionHandlers(){this._scrollableParents&&(this._scrollableParents.map(t=>t.removeEventListener("scroll",this.reposition)),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},reposition(){this._clonedElement=this.$el.cloneNode(!0),this.$forceUpdate()},getCurrentZIndex(){return this.kCurrentZIndex?this.kCurrentZIndex+$:E}},render(){const{className:t,popupClass:i,show:e,id:n}=this.$props,s=p.getDefaultSlots(this),r=s,d=l.isWindowAvailable()?this.$props.appendTo?this.mountedAppendTo||this.getParentRef(this.$props.appendTo):document.body:void 0;if(this.$props.show){const u=this.calculatePosition(this.$props,d);this._offsetLeft=u.offset.left,this._offsetTop=u.offset.top,this._flipped=!!u.flipped}const o=this.$props.direction==="down"?this._flipped?"up":"down":this._flipped?"down":"up",{transitionEnterDuration:a,transitionExitDuration:h}=this.transitionDuration(),f=this.getCurrentZIndex();return this._exitingAnimation=this._exitingAnimation||this._prevShow&&!e,this.hasMounted?e||this._exitingAnimation&&d?c.createVNode(_.Slide,{id:n,role:this.appendTo?"":"region",componentChildClassName:[i,g],className:t,onEntered:this.onOpened,onExiting:this.onClosing,onExited:this.onClosed,direction:o,style:{zIndex:f,position:"absolute",top:this._offsetTop+"px",left:this._offsetLeft+"px"},transitionEnterDuration:a,transitionExitDuration:h,appear:e},S(r)?r:{default:()=>[r]}):null:c.createVNode("div",{style:{display:"none"},class:t},[c.createVNode("div",{class:[i,g]},[s])])}});exports.Popup=P;
|
package/Popup.mjs
CHANGED
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
8
|
+
import { defineComponent as v, createVNode as u, isVNode as C } from "vue";
|
|
9
9
|
import { Slide as E } from "@progress/kendo-vue-animation";
|
|
10
|
-
import { isWindowAvailable as m, throttle as
|
|
11
|
-
import { AlignService as
|
|
10
|
+
import { isWindowAvailable as m, throttle as $, AlignPoint as h, CollisionType as _, FRAME_DURATION as y } from "./util.mjs";
|
|
11
|
+
import { AlignService as S } from "./services/alignService.mjs";
|
|
12
12
|
import { DOMService as P } from "./services/domService.mjs";
|
|
13
|
-
import { PositionService as
|
|
14
|
-
import { getDefaultSlots as g, canUseDOM as
|
|
15
|
-
import { packageMetadata as
|
|
16
|
-
function
|
|
13
|
+
import { PositionService as b } from "./services/positionService.mjs";
|
|
14
|
+
import { getDefaultSlots as g, canUseDOM as f, validatePackage as O } from "@progress/kendo-vue-common";
|
|
15
|
+
import { packageMetadata as D } from "./package-metadata.mjs";
|
|
16
|
+
function T(t) {
|
|
17
17
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !C(t);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const x = 100, k = 1, N = {
|
|
20
20
|
left: -1e3,
|
|
21
21
|
top: 0
|
|
22
|
-
},
|
|
22
|
+
}, w = "k-animation-container-shown", A = "k-popup", Z = /* @__PURE__ */ v({
|
|
23
23
|
name: "Popup",
|
|
24
24
|
props: {
|
|
25
25
|
appendTo: {
|
|
@@ -63,7 +63,7 @@ const D = 100, N = 1, k = {
|
|
|
63
63
|
offset: {
|
|
64
64
|
type: Object,
|
|
65
65
|
default: function() {
|
|
66
|
-
return
|
|
66
|
+
return N;
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
show: {
|
|
@@ -79,7 +79,8 @@ const D = 100, N = 1, k = {
|
|
|
79
79
|
default: "down"
|
|
80
80
|
},
|
|
81
81
|
onOpen: Function,
|
|
82
|
-
onClose: Function
|
|
82
|
+
onClose: Function,
|
|
83
|
+
onMousedownoutside: Function
|
|
83
84
|
},
|
|
84
85
|
inject: {
|
|
85
86
|
kCurrentZIndex: {
|
|
@@ -92,29 +93,41 @@ const D = 100, N = 1, k = {
|
|
|
92
93
|
};
|
|
93
94
|
},
|
|
94
95
|
created() {
|
|
95
|
-
O(
|
|
96
|
+
O(D), this.mountedAppendTo = void 0, this.mountedAnchor = void 0, this._clonedElement = void 0, this._flipped = !1, this._offsetTop = 0, this._offsetLeft = -1e3, this._exitingAnimation = !1, this._prevShow = !1, this._prevShow = this.$props.show, this._domService = new P(), this._alignService = new S(this._domService), this._positionService = new b(this._domService), this.reposition = $(this.reposition.bind(this), y);
|
|
96
97
|
},
|
|
97
98
|
mounted() {
|
|
98
|
-
|
|
99
|
+
f && (this.mountedAppendTo = this.appendTo ? this.getParentRef(this.appendTo) : document.body, this.mountedAnchor = this.anchor ? this.getParentRef(this.anchor, !0) : document.body), this._parentElement = this.$el.parentElement, this._clonedElement = this.$el.cloneNode(!0), this.hasMounted = !0, this.mountedAppendTo.appendChild(this.$el);
|
|
99
100
|
},
|
|
100
101
|
updated() {
|
|
101
102
|
this._prevShow = this.$props.show;
|
|
102
103
|
},
|
|
103
104
|
unmounted() {
|
|
104
|
-
this.detachRepositionHandlers();
|
|
105
|
+
this.detachRepositionHandlers(), window == null || window.removeEventListener("mousedown", this.handleMouseDown);
|
|
105
106
|
},
|
|
106
107
|
beforeUnmount() {
|
|
107
108
|
this._parentElement && this._parentElement.appendChild(this.$el);
|
|
108
109
|
},
|
|
109
110
|
methods: {
|
|
111
|
+
handleMouseDown(t) {
|
|
112
|
+
var n, s;
|
|
113
|
+
const i = ((n = t == null ? void 0 : t.target) == null ? void 0 : n.closest(".k-animation-container")) === null, e = ((s = this.mountedAnchor) == null ? void 0 : s.contains(t == null ? void 0 : t.target)) || !1;
|
|
114
|
+
if (i) {
|
|
115
|
+
const r = {
|
|
116
|
+
target: this,
|
|
117
|
+
event: t,
|
|
118
|
+
isAnchorClicked: e
|
|
119
|
+
};
|
|
120
|
+
this.$emit("mousedownoutside", r), window == null || window.removeEventListener("mousedown", this.handleMouseDown);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
110
123
|
onOpened() {
|
|
111
124
|
const t = this.$el;
|
|
112
|
-
this.$props.show && t.classList.add(
|
|
125
|
+
window == null || window.addEventListener("mousedown", this.handleMouseDown), this.$props.show && t.classList.add(w), this.attachRepositionHandlers(t), this.$emit("open", {
|
|
113
126
|
target: this
|
|
114
127
|
});
|
|
115
128
|
},
|
|
116
129
|
onClosing() {
|
|
117
|
-
this.$props.show || this.$el.classList.remove(
|
|
130
|
+
this.$props.show || this.$el.classList.remove(w), this.detachRepositionHandlers();
|
|
118
131
|
},
|
|
119
132
|
onClosed() {
|
|
120
133
|
this._exitingAnimation && (this._exitingAnimation = !1, this.$forceUpdate()), this.$emit("close", {
|
|
@@ -134,7 +147,7 @@ const D = 100, N = 1, k = {
|
|
|
134
147
|
for (; !e.$refs[t]; ) {
|
|
135
148
|
if (e && e.kendoAnchorRef && i)
|
|
136
149
|
return e.kendoAnchorRef;
|
|
137
|
-
if (e = e.$parent, !e &&
|
|
150
|
+
if (e = e.$parent, !e && f)
|
|
138
151
|
return document.getElementById(t) || document.body;
|
|
139
152
|
}
|
|
140
153
|
return e.$refs[t].$el || e.$refs[t];
|
|
@@ -162,7 +175,7 @@ const D = 100, N = 1, k = {
|
|
|
162
175
|
});
|
|
163
176
|
},
|
|
164
177
|
calculatePosition(t, i) {
|
|
165
|
-
if (!i || !m() || !
|
|
178
|
+
if (!i || !m() || !f)
|
|
166
179
|
return {
|
|
167
180
|
flipped: !1,
|
|
168
181
|
offset: t.offset
|
|
@@ -184,8 +197,8 @@ const D = 100, N = 1, k = {
|
|
|
184
197
|
o.style.position = "absolute", o.style.visibility = "hidden", o.style.display = "block", o.style.left = "-1000", o.style.top = "0";
|
|
185
198
|
const l = e && e[0].props ? e[0].props.style : {};
|
|
186
199
|
if (l)
|
|
187
|
-
for (const [
|
|
188
|
-
o.style[
|
|
200
|
+
for (const [d, c] of Object.entries(l))
|
|
201
|
+
o.style[d] = c;
|
|
189
202
|
}
|
|
190
203
|
const a = this.position(t, n.firstChild, this.$props.anchor);
|
|
191
204
|
return n.parentNode.removeChild(n), a;
|
|
@@ -200,7 +213,7 @@ const D = 100, N = 1, k = {
|
|
|
200
213
|
this._clonedElement = this.$el.cloneNode(!0), this.$forceUpdate();
|
|
201
214
|
},
|
|
202
215
|
getCurrentZIndex() {
|
|
203
|
-
return this.kCurrentZIndex ? this.kCurrentZIndex +
|
|
216
|
+
return this.kCurrentZIndex ? this.kCurrentZIndex + k : x;
|
|
204
217
|
}
|
|
205
218
|
},
|
|
206
219
|
render() {
|
|
@@ -211,17 +224,17 @@ const D = 100, N = 1, k = {
|
|
|
211
224
|
id: n
|
|
212
225
|
} = this.$props, s = g(this), r = s, a = m() ? this.$props.appendTo ? this.mountedAppendTo || this.getParentRef(this.$props.appendTo) : document.body : void 0;
|
|
213
226
|
if (this.$props.show) {
|
|
214
|
-
const
|
|
215
|
-
this._offsetLeft =
|
|
227
|
+
const p = this.calculatePosition(this.$props, a);
|
|
228
|
+
this._offsetLeft = p.offset.left, this._offsetTop = p.offset.top, this._flipped = !!p.flipped;
|
|
216
229
|
}
|
|
217
230
|
const o = this.$props.direction === "down" ? this._flipped ? "up" : "down" : this._flipped ? "down" : "up", {
|
|
218
231
|
transitionEnterDuration: l,
|
|
219
|
-
transitionExitDuration:
|
|
232
|
+
transitionExitDuration: d
|
|
220
233
|
} = this.transitionDuration(), c = this.getCurrentZIndex();
|
|
221
|
-
return this._exitingAnimation = this._exitingAnimation || this._prevShow && !e, this.hasMounted ? e || this._exitingAnimation && a ?
|
|
234
|
+
return this._exitingAnimation = this._exitingAnimation || this._prevShow && !e, this.hasMounted ? e || this._exitingAnimation && a ? u(E, {
|
|
222
235
|
id: n,
|
|
223
236
|
role: this.appendTo ? "" : "region",
|
|
224
|
-
componentChildClassName: [i,
|
|
237
|
+
componentChildClassName: [i, A],
|
|
225
238
|
className: t,
|
|
226
239
|
onEntered: this.onOpened,
|
|
227
240
|
onExiting: this.onClosing,
|
|
@@ -234,20 +247,20 @@ const D = 100, N = 1, k = {
|
|
|
234
247
|
left: this._offsetLeft + "px"
|
|
235
248
|
},
|
|
236
249
|
transitionEnterDuration: l,
|
|
237
|
-
transitionExitDuration:
|
|
250
|
+
transitionExitDuration: d,
|
|
238
251
|
appear: e
|
|
239
|
-
},
|
|
252
|
+
}, T(r) ? r : {
|
|
240
253
|
default: () => [r]
|
|
241
|
-
}) : null :
|
|
254
|
+
}) : null : u("div", {
|
|
242
255
|
style: {
|
|
243
256
|
display: "none"
|
|
244
257
|
},
|
|
245
258
|
class: t
|
|
246
|
-
}, [
|
|
247
|
-
class: [i,
|
|
259
|
+
}, [u("div", {
|
|
260
|
+
class: [i, A]
|
|
248
261
|
}, [s])]);
|
|
249
262
|
}
|
|
250
263
|
});
|
|
251
264
|
export {
|
|
252
|
-
|
|
265
|
+
Z as Popup
|
|
253
266
|
};
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue"),require("@progress/kendo-vue-animation"),require("@progress/kendo-popup-common"),require("@progress/kendo-vue-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-animation","@progress/kendo-popup-common","@progress/kendo-vue-common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).KendoVuePopup={},t.Vue,t.KendoVueAnimation,t.KendoPopupCommon,t.KendoVueCommon)}(this,function(t,e,n,o,i){"use strict";const s=(t,e)=>t||{height:0,left:e.left,top:e.top,width:0},r=()=>"undefined"!=typeof document&&!!document.body,l=()=>"undefined"!=typeof window,d=/auto|scroll/,a=t=>{const e=window.getComputedStyle(t);return`${e.overflow}${e.overflowX}${e.overflowY}`},p=1e3/60,c=(()=>{if(!r())return!1;const t=document.createElement("div");if(t.style.transform="matrix(10, 0, 0, 10, 0, 0)",t.innerHTML="<div>child</div>",document.body.appendChild(t),t&&t.firstChild){const e=t.firstChild;e.style.position="fixed",e.style.top="10px"}const e=10!==t.children[0].getBoundingClientRect().top;return document.body.removeChild(t),e})(),h="fit",u="flip",f="left",m="bottom",g="top";class v{constructor(t){this._dom=t}alignElement(t){const{anchor:e,element:n,anchorAlign:o,elementAlign:i,offset:s}=t,r=this._dom.hasOffsetParent(n)?this.relativeRect(e,n,s):this.absoluteRect(e,n,s);return this._dom.align({anchorAlign:o,anchorRect:r,elementAlign:i,elementRect:this._dom.offset(n)})}absoluteRect(t,e,n){const o=this._dom,i=((t,e)=>e?{height:t.height,left:t.left-e.left,top:t.top-e.top,width:t.width}:t)(s(o.offset(t),n),o.stackingElementOffset(e)),r=o.stackingElementScroll(e),l=o.addScroll(i,r),d=this.elementScrollPosition(t,e),a=o.removeScroll(l,d);return a.left+=window.scrollX||window.pageXOffset,a.top+=window.scrollY||window.pageYOffset,a}elementScrollPosition(t,e){return t?{x:0,y:0}:this._dom.scrollPosition(e)}relativeRect(t,e,n){return s(this._dom.position(t,e),n)}}class w{addOffset(t,e){return{left:t.left+e.left,top:t.top+e.top}}align(t){return o.align(t)}boundingOffset(t){return o.boundingOffset(t)}getWindow(){return l()?window:null}isBodyOffset(t){return o.isBodyOffset(t)}hasOffsetParent(t){if(!t)return!1;const e=t.offsetParent;return e&&!("BODY"===e.nodeName&&"static"===window.getComputedStyle(e).position)}offset(t){return t?o.offset(t):null}staticOffset(t){if(!t)return null;const{left:e,top:n}=t.style;t.style.left="0px",t.style.top="0px";const i=o.offset(t);return t.style.left=e,t.style.top=n,i}position(t,e){if(!t||!e)return null;const n=o.siblingContainer(t,e);return o.positionWithScroll(t,n)}relativeOffset(t,e){return o.applyLocationOffset(this.offset(t),e,this.isBodyOffset(t))}addScroll(t,e){return o.addScroll(t,e)}removeScroll(t,e){return o.removeScroll(t,e)}restrictToView(t){return o.restrictToView(t)}scrollPosition(t){return o.scrollPosition(t)}scrollableParents(t){return(t=>{const e=[];if(!r()||!l())return e;let n=t.parentElement;for(;n;)d.test(a(n))&&e.push(n),n=n.parentElement;return e.push(window),e})(t)}stackingElementOffset(t){const e=this.getRelativeContextElement(t);return e?o.offset(e):null}stackingElementScroll(t){const e=this.getRelativeContextElement(t);return e?{x:e.scrollLeft,y:e.scrollTop}:{x:0,y:0}}stackingElementViewPort(t){const e=this.getRelativeContextElement(t);return e?{height:e.scrollHeight,width:e.scrollWidth}:null}getRelativeContextElement(t){if(!t||!c)return null;let e=t.parentElement;for(;e;){if("none"!==window.getComputedStyle(e).transform)return e;e=e.parentElement}return null}useRelativePosition(t){return!!this.getRelativeContextElement(t)}windowViewPort(t){return o.getWindowViewPort(t)}zIndex(t,e){return((t,e)=>{if(!t||!r()||!l())return null;const n=o.siblingContainer(t,e);if(!n)return null;const i=[t].concat(o.parents(t,n)).reduce((t,e)=>{const n=e.style.zIndex||window.getComputedStyle(e).zIndex,o=parseInt(n,10);return o>t?o:t},0);return i?i+1:null})(t,e)}zoomLevel(){return r()&&l()?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2)):1}isZoomed(){return this.zoomLevel()>1}}class y{constructor(t){this._dom=t}positionElement(t){const{anchor:e,currentLocation:n,element:o,anchorAlign:i,elementAlign:r,collisions:l}=t,d=this._dom,a=t.viewPort||d.stackingElementViewPort(o)||d.windowViewPort(o),p=s(d.offset(e),n),c=((t,e)=>e?{height:t.height,left:e.left,top:e.top,width:t.width}:t)(d.staticOffset(o),n),h=this.elementRect(o,c),u=d.restrictToView({anchorAlign:i,anchorRect:p,collisions:l,elementAlign:r,elementRect:h,viewPort:a});return{flipped:u.flipped,offset:d.addOffset(c,u.offset)}}elementRect(t,e){return this._dom.removeScroll(e,this._dom.scrollPosition(t))}}const _={name:"@progress/kendo-vue-popup",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1657007252,version:"8.1.0-develop.5",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};const C={left:-1e3,top:0},E="k-animation-container-shown",b="k-popup",$=e.defineComponent({name:"Popup",props:{appendTo:{type:String,default:""},anchor:{type:[String,Object],default:""},className:String,id:String,popupClass:String,collision:{type:Object,default:function(){return{horizontal:h,vertical:u}}},anchorAlign:{type:Object,default:function(){return{horizontal:f,vertical:m}}},popupAlign:{type:Object,default:function(){return{horizontal:f,vertical:g}}},offset:{type:Object,default:function(){return C}},show:{type:Boolean,default:!1},animate:{type:[Boolean,Object],default:!0},direction:{type:String,default:"down"},onOpen:Function,onClose:Function},inject:{kCurrentZIndex:{default:null}},data:()=>({hasMounted:!1}),created(){i.validatePackage(_),this.mountedAppendTo=void 0,this.mountedAnchor=void 0,this._clonedElement=void 0,this._flipped=!1,this._offsetTop=0,this._offsetLeft=-1e3,this._exitingAnimation=!1,this._prevShow=!1,this._prevShow=this.$props.show,this._domService=new w,this._alignService=new v(this._domService),this._positionService=new y(this._domService),this.reposition=function(t,e,n={}){let o,i,s,r,l=0;n=n||{};const d=function(){l=!1===n.leading?0:(new Date).getTime(),o=null,r=t.apply(i,s),o||(i=s=null)};return function(){const a=(new Date).getTime();!l&&!1===n.leading&&(l=a);const p=e-(a-l);return i=this,s=arguments,p<=0||p>e?(o&&(clearTimeout(o),o=null),l=a,r=t.apply(i,s),o||(i=s=null)):!o&&!1!==n.trailing&&(o=setTimeout(d,p)),r}}(this.reposition.bind(this),p)},mounted(){i.canUseDOM&&(this.mountedAppendTo=this.appendTo?this.getParentRef(this.appendTo):document.body,this.mountedAnchor=this.anchor?this.getParentRef(this.anchor,!0):document.body),this._parentElement=this.$el.parentElement,this._clonedElement=this.$el.cloneNode(!0),this.hasMounted=!0,this.mountedAppendTo.appendChild(this.$el)},updated(){this._prevShow=this.$props.show},unmounted(){this.detachRepositionHandlers()},beforeUnmount(){this._parentElement&&this._parentElement.appendChild(this.$el)},methods:{onOpened(){const t=this.$el;this.$props.show&&t.classList.add(E),this.attachRepositionHandlers(t),this.$emit("open",{target:this})},onClosing(){this.$props.show||this.$el.classList.remove(E),this.detachRepositionHandlers()},onClosed(){this._exitingAnimation&&(this._exitingAnimation=!1,this.$forceUpdate()),this.$emit("close",{target:this})},transitionDuration(){const t=this.$props.animate;let e=0,n=0;return t&&(!0===t?e=n=void 0:(e=t.openDuration,n=t.closeDuration)),{transitionEnterDuration:e,transitionExitDuration:n}},getParentRef(t,e){let n=this.$parent;for(;!n.$refs[t];){if(n&&n.kendoAnchorRef&&e)return n.kendoAnchorRef;if(n=n.$parent,!n&&i.canUseDOM)return document.getElementById(t)||document.body}return n.$refs[t].$el||n.$refs[t]},position(t,e,n){const{anchorAlign:o,popupAlign:i,collision:s,offset:r}=t,l=n?this.mountedAnchor:document.body,d=this._alignService.alignElement({anchor:n?l:void 0,element:e,elementAlign:i,anchorAlign:o,offset:r});return this._positionService.positionElement({anchor:l,anchorAlign:o,collisions:s,element:e,currentLocation:d,elementAlign:i})},calculatePosition(t,e){if(!e||!l()||!i.canUseDOM)return{flipped:!1,offset:t.offset};const n=i.getDefaultSlots(this),o=document.createElement("div"),s=this.$el&&this.$el.firstChild&&this.$el.firstChild.firstChild?this.$el.firstChild.firstChild.cloneNode(!0):null,r=s&&s.getBoundingClientRect?s:this._clonedElement;if(r)o.appendChild(r);else{const t=n&&n[0].props?n[0].props.class:"",e=this.$props.popupClass;o.innerHTML=`<div class="k-animation-container k-animation-container-relative">\n <div class="k-popup k-animation-container k-animation-container-relative">\n <div class="${t} ${e}" >\n </div>\n </div>\n </div>`}if(e.appendChild(o),o&&o.firstChild){const t=o.firstChild;t.style.position="absolute",t.style.visibility="hidden",t.style.display="block",t.style.left="-1000",t.style.top="0";const e=n&&n[0].props?n[0].props.style:{};if(e)for(const[n,o]of Object.entries(e))t.style[n]=o}const d=this.position(t,o.firstChild,this.$props.anchor);return o.parentNode.removeChild(o),d},attachRepositionHandlers(t){this.detachRepositionHandlers(),this._scrollableParents=this._domService.scrollableParents(this.$props.anchor?this.mountedAnchor:t),this._scrollableParents.map(t=>t.addEventListener("scroll",this.reposition)),window.addEventListener("resize",this.reposition)},detachRepositionHandlers(){this._scrollableParents&&(this._scrollableParents.map(t=>t.removeEventListener("scroll",this.reposition)),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},reposition(){this._clonedElement=this.$el.cloneNode(!0),this.$forceUpdate()},getCurrentZIndex(){return this.kCurrentZIndex?this.kCurrentZIndex+1:100}},render(){const{className:t,popupClass:o,show:s,id:r}=this.$props,d=i.getDefaultSlots(this),a=d,p=l()?this.$props.appendTo?this.mountedAppendTo||this.getParentRef(this.$props.appendTo):document.body:void 0;if(this.$props.show){const t=this.calculatePosition(this.$props,p);this._offsetLeft=t.offset.left,this._offsetTop=t.offset.top,this._flipped=!!t.flipped}const c="down"===this.$props.direction?this._flipped?"up":"down":this._flipped?"down":"up",{transitionEnterDuration:h,transitionExitDuration:u}=this.transitionDuration(),f=this.getCurrentZIndex();return this._exitingAnimation=this._exitingAnimation||this._prevShow&&!s,this.hasMounted?s||this._exitingAnimation&&p?e.createVNode(n.Slide,{id:r,role:this.appendTo?"":"region",componentChildClassName:[o,b],className:t,onEntered:this.onOpened,onExiting:this.onClosing,onExited:this.onClosed,direction:c,style:{zIndex:f,position:"absolute",top:this._offsetTop+"px",left:this._offsetLeft+"px"},transitionEnterDuration:h,transitionExitDuration:u,appear:s},function(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!e.isVNode(t)}(a)?a:{default:()=>[a]}):null:e.createVNode("div",{style:{display:"none"},class:t},[e.createVNode("div",{class:[o,b]},[d])])}});t.Popup=$});
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-animation"),require("@progress/kendo-popup-common"),require("@progress/kendo-vue-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-animation","@progress/kendo-popup-common","@progress/kendo-vue-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVuePopup={},e.Vue,e.KendoVueAnimation,e.KendoPopupCommon,e.KendoVueCommon)}(this,function(e,t,n,o,i){"use strict";const s=(e,t)=>e||{height:0,left:t.left,top:t.top,width:0},r=()=>"undefined"!=typeof document&&!!document.body,l=()=>"undefined"!=typeof window,d=/auto|scroll/,a=e=>{const t=window.getComputedStyle(e);return`${t.overflow}${t.overflowX}${t.overflowY}`},c=1e3/60,p=(()=>{if(!r())return!1;const e=document.createElement("div");if(e.style.transform="matrix(10, 0, 0, 10, 0, 0)",e.innerHTML="<div>child</div>",document.body.appendChild(e),e&&e.firstChild){const t=e.firstChild;t.style.position="fixed",t.style.top="10px"}const t=10!==e.children[0].getBoundingClientRect().top;return document.body.removeChild(e),t})(),h="fit",u="flip",f="left",m="bottom",g="top";let w=class{constructor(e){this._dom=e}alignElement(e){const{anchor:t,element:n,anchorAlign:o,elementAlign:i,offset:s}=e,r=this._dom.hasOffsetParent(n)?this.relativeRect(t,n,s):this.absoluteRect(t,n,s);return this._dom.align({anchorAlign:o,anchorRect:r,elementAlign:i,elementRect:this._dom.offset(n)})}absoluteRect(e,t,n){const o=this._dom,i=((e,t)=>t?{height:e.height,left:e.left-t.left,top:e.top-t.top,width:e.width}:e)(s(o.offset(e),n),o.stackingElementOffset(t)),r=o.stackingElementScroll(t),l=o.addScroll(i,r),d=this.elementScrollPosition(e,t),a=o.removeScroll(l,d);return a.left+=window.scrollX||window.pageXOffset,a.top+=window.scrollY||window.pageYOffset,a}elementScrollPosition(e,t){return e?{x:0,y:0}:this._dom.scrollPosition(t)}relativeRect(e,t,n){return s(this._dom.position(e,t),n)}};class v{addOffset(e,t){return{left:e.left+t.left,top:e.top+t.top}}align(e){return o.align(e)}boundingOffset(e){return o.boundingOffset(e)}getWindow(){return l()?window:null}isBodyOffset(e){return o.isBodyOffset(e)}hasOffsetParent(e){if(!e)return!1;const t=e.offsetParent;return t&&!("BODY"===t.nodeName&&"static"===window.getComputedStyle(t).position)}offset(e){return e?o.offset(e):null}staticOffset(e){if(!e)return null;const{left:t,top:n}=e.style;e.style.left="0px",e.style.top="0px";const i=o.offset(e);return e.style.left=t,e.style.top=n,i}position(e,t){if(!e||!t)return null;const n=o.siblingContainer(e,t);return o.positionWithScroll(e,n)}relativeOffset(e,t){return o.applyLocationOffset(this.offset(e),t,this.isBodyOffset(e))}addScroll(e,t){return o.addScroll(e,t)}removeScroll(e,t){return o.removeScroll(e,t)}restrictToView(e){return o.restrictToView(e)}scrollPosition(e){return o.scrollPosition(e)}scrollableParents(e){return(e=>{const t=[];if(!r()||!l())return t;let n=e.parentElement;for(;n;)d.test(a(n))&&t.push(n),n=n.parentElement;return t.push(window),t})(e)}stackingElementOffset(e){const t=this.getRelativeContextElement(e);return t?o.offset(t):null}stackingElementScroll(e){const t=this.getRelativeContextElement(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}}stackingElementViewPort(e){const t=this.getRelativeContextElement(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null}getRelativeContextElement(e){if(!e||!p)return null;let t=e.parentElement;for(;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null}useRelativePosition(e){return!!this.getRelativeContextElement(e)}windowViewPort(e){return o.getWindowViewPort(e)}zIndex(e,t){return((e,t)=>{if(!e||!r()||!l())return null;const n=o.siblingContainer(e,t);if(!n)return null;const i=[e].concat(o.parents(e,n)).reduce((e,t)=>{const n=t.style.zIndex||window.getComputedStyle(t).zIndex,o=parseInt(n,10);return o>e?o:e},0);return i?i+1:null})(e,t)}zoomLevel(){return r()&&l()?parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2)):1}isZoomed(){return this.zoomLevel()>1}}class y{constructor(e){this._dom=e}positionElement(e){const{anchor:t,currentLocation:n,element:o,anchorAlign:i,elementAlign:r,collisions:l}=e,d=this._dom,a=e.viewPort||d.stackingElementViewPort(o)||d.windowViewPort(o),c=s(d.offset(t),n),p=((e,t)=>t?{height:e.height,left:t.left,top:t.top,width:e.width}:e)(d.staticOffset(o),n),h=this.elementRect(o,p),u=d.restrictToView({anchorAlign:i,anchorRect:c,collisions:l,elementAlign:r,elementRect:h,viewPort:a});return{flipped:u.flipped,offset:d.addOffset(p,u.offset)}}elementRect(e,t){return this._dom.removeScroll(t,this._dom.scrollPosition(e))}}const _={name:"@progress/kendo-vue-popup",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1657007252,version:"8.1.0-develop.7",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};const E={left:-1e3,top:0},C="k-animation-container-shown",b="k-popup",$=t.defineComponent({name:"Popup",props:{appendTo:{type:String,default:""},anchor:{type:[String,Object],default:""},className:String,id:String,popupClass:String,collision:{type:Object,default:function(){return{horizontal:h,vertical:u}}},anchorAlign:{type:Object,default:function(){return{horizontal:f,vertical:m}}},popupAlign:{type:Object,default:function(){return{horizontal:f,vertical:g}}},offset:{type:Object,default:function(){return E}},show:{type:Boolean,default:!1},animate:{type:[Boolean,Object],default:!0},direction:{type:String,default:"down"},onOpen:Function,onClose:Function,onMousedownoutside:Function},inject:{kCurrentZIndex:{default:null}},data:()=>({hasMounted:!1}),created(){i.validatePackage(_),this.mountedAppendTo=void 0,this.mountedAnchor=void 0,this._clonedElement=void 0,this._flipped=!1,this._offsetTop=0,this._offsetLeft=-1e3,this._exitingAnimation=!1,this._prevShow=!1,this._prevShow=this.$props.show,this._domService=new v,this._alignService=new w(this._domService),this._positionService=new y(this._domService),this.reposition=function(e,t,n={}){let o,i,s,r,l=0;n=n||{};const d=function(){l=!1===n.leading?0:(new Date).getTime(),o=null,r=e.apply(i,s),o||(i=s=null)};return function(){const a=(new Date).getTime();!l&&!1===n.leading&&(l=a);const c=t-(a-l);return i=this,s=arguments,c<=0||c>t?(o&&(clearTimeout(o),o=null),l=a,r=e.apply(i,s),o||(i=s=null)):!o&&!1!==n.trailing&&(o=setTimeout(d,c)),r}}(this.reposition.bind(this),c)},mounted(){i.canUseDOM&&(this.mountedAppendTo=this.appendTo?this.getParentRef(this.appendTo):document.body,this.mountedAnchor=this.anchor?this.getParentRef(this.anchor,!0):document.body),this._parentElement=this.$el.parentElement,this._clonedElement=this.$el.cloneNode(!0),this.hasMounted=!0,this.mountedAppendTo.appendChild(this.$el)},updated(){this._prevShow=this.$props.show},unmounted(){this.detachRepositionHandlers(),null==window||window.removeEventListener("mousedown",this.handleMouseDown)},beforeUnmount(){this._parentElement&&this._parentElement.appendChild(this.$el)},methods:{handleMouseDown(e){var t,n;const o=null===(null==(t=null==e?void 0:e.target)?void 0:t.closest(".k-animation-container")),i=(null==(n=this.mountedAnchor)?void 0:n.contains(null==e?void 0:e.target))||!1;if(o){const t={target:this,event:e,isAnchorClicked:i};this.$emit("mousedownoutside",t),null==window||window.removeEventListener("mousedown",this.handleMouseDown)}},onOpened(){const e=this.$el;null==window||window.addEventListener("mousedown",this.handleMouseDown),this.$props.show&&e.classList.add(C),this.attachRepositionHandlers(e),this.$emit("open",{target:this})},onClosing(){this.$props.show||this.$el.classList.remove(C),this.detachRepositionHandlers()},onClosed(){this._exitingAnimation&&(this._exitingAnimation=!1,this.$forceUpdate()),this.$emit("close",{target:this})},transitionDuration(){const e=this.$props.animate;let t=0,n=0;return e&&(!0===e?t=n=void 0:(t=e.openDuration,n=e.closeDuration)),{transitionEnterDuration:t,transitionExitDuration:n}},getParentRef(e,t){let n=this.$parent;for(;!n.$refs[e];){if(n&&n.kendoAnchorRef&&t)return n.kendoAnchorRef;if(n=n.$parent,!n&&i.canUseDOM)return document.getElementById(e)||document.body}return n.$refs[e].$el||n.$refs[e]},position(e,t,n){const{anchorAlign:o,popupAlign:i,collision:s,offset:r}=e,l=n?this.mountedAnchor:document.body,d=this._alignService.alignElement({anchor:n?l:void 0,element:t,elementAlign:i,anchorAlign:o,offset:r});return this._positionService.positionElement({anchor:l,anchorAlign:o,collisions:s,element:t,currentLocation:d,elementAlign:i})},calculatePosition(e,t){if(!t||!l()||!i.canUseDOM)return{flipped:!1,offset:e.offset};const n=i.getDefaultSlots(this),o=document.createElement("div"),s=this.$el&&this.$el.firstChild&&this.$el.firstChild.firstChild?this.$el.firstChild.firstChild.cloneNode(!0):null,r=s&&s.getBoundingClientRect?s:this._clonedElement;if(r)o.appendChild(r);else{const e=n&&n[0].props?n[0].props.class:"",t=this.$props.popupClass;o.innerHTML=`<div class="k-animation-container k-animation-container-relative">\n <div class="k-popup k-animation-container k-animation-container-relative">\n <div class="${e} ${t}" >\n </div>\n </div>\n </div>`}if(t.appendChild(o),o&&o.firstChild){const e=o.firstChild;e.style.position="absolute",e.style.visibility="hidden",e.style.display="block",e.style.left="-1000",e.style.top="0";const t=n&&n[0].props?n[0].props.style:{};if(t)for(const[n,o]of Object.entries(t))e.style[n]=o}const d=this.position(e,o.firstChild,this.$props.anchor);return o.parentNode.removeChild(o),d},attachRepositionHandlers(e){this.detachRepositionHandlers(),this._scrollableParents=this._domService.scrollableParents(this.$props.anchor?this.mountedAnchor:e),this._scrollableParents.map(e=>e.addEventListener("scroll",this.reposition)),window.addEventListener("resize",this.reposition)},detachRepositionHandlers(){this._scrollableParents&&(this._scrollableParents.map(e=>e.removeEventListener("scroll",this.reposition)),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},reposition(){this._clonedElement=this.$el.cloneNode(!0),this.$forceUpdate()},getCurrentZIndex(){return this.kCurrentZIndex?this.kCurrentZIndex+1:100}},render(){const{className:e,popupClass:o,show:s,id:r}=this.$props,d=i.getDefaultSlots(this),a=d,c=l()?this.$props.appendTo?this.mountedAppendTo||this.getParentRef(this.$props.appendTo):document.body:void 0;if(this.$props.show){const e=this.calculatePosition(this.$props,c);this._offsetLeft=e.offset.left,this._offsetTop=e.offset.top,this._flipped=!!e.flipped}const p="down"===this.$props.direction?this._flipped?"up":"down":this._flipped?"down":"up",{transitionEnterDuration:h,transitionExitDuration:u}=this.transitionDuration(),f=this.getCurrentZIndex();return this._exitingAnimation=this._exitingAnimation||this._prevShow&&!s,this.hasMounted?s||this._exitingAnimation&&c?t.createVNode(n.Slide,{id:r,role:this.appendTo?"":"region",componentChildClassName:[o,b],className:e,onEntered:this.onOpened,onExiting:this.onClosing,onExited:this.onClosed,direction:p,style:{zIndex:f,position:"absolute",top:this._offsetTop+"px",left:this._offsetLeft+"px"},transitionEnterDuration:h,transitionExitDuration:u,appear:s},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(a)?a:{default:()=>[a]}):null:t.createVNode("div",{style:{display:"none"},class:e},[t.createVNode("div",{class:[o,b]},[d])])}});e.Popup=$});
|
package/models/Events.d.ts
CHANGED
|
@@ -23,3 +23,20 @@ export interface CloseEvent {
|
|
|
23
23
|
*/
|
|
24
24
|
target: any;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Represents the object of the `MouseDownOutside` Popup event.
|
|
28
|
+
*/
|
|
29
|
+
export interface MouseDownOutsideEvent {
|
|
30
|
+
/**
|
|
31
|
+
* An event target.
|
|
32
|
+
*/
|
|
33
|
+
target: any;
|
|
34
|
+
/**
|
|
35
|
+
* The event object.
|
|
36
|
+
*/
|
|
37
|
+
event: MouseEvent;
|
|
38
|
+
/**
|
|
39
|
+
* Indicates if the MouseDown event is triggered over the anchor of the Popup.
|
|
40
|
+
*/
|
|
41
|
+
isAnchorClicked: boolean;
|
|
42
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { OpenEvent, CloseEvent } from './Events';
|
|
8
|
+
import { OpenEvent, CloseEvent, MouseDownOutsideEvent } from './Events';
|
|
9
9
|
import { Offset } from './Offset';
|
|
10
10
|
import { PopupAnimation } from './PopupAnimation';
|
|
11
11
|
/**
|
|
@@ -60,6 +60,15 @@ export interface PopupSettings {
|
|
|
60
60
|
* Specifies the absolute position of the element ([see example]({% slug alignmentpositioning_popup %})). The Popup opens next to that point. The pivot point of the Popup is defined by the `popupAlign` configuration option. The boundary detection is applied by using the window viewport.
|
|
61
61
|
*/
|
|
62
62
|
offset?: Offset;
|
|
63
|
+
/**
|
|
64
|
+
* Fires when the mousedown event is triggered outside the Popup.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```jsx
|
|
68
|
+
* <Popup onMousedownoutside={(event) => console.log('onMousedownoutside')} />
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
onMousedownoutside?: (event: MouseDownOutsideEvent) => void;
|
|
63
72
|
/**
|
|
64
73
|
* Fires after the Popup is opened and the opening animation ends.
|
|
65
74
|
*/
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-popup",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-popup",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1775028444,version:"8.1.0-develop.7",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "8.1.0-develop.
|
|
13
|
+
publishDate: 1775028444,
|
|
14
|
+
version: "8.1.0-develop.7",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-popup",
|
|
3
|
-
"version": "8.1.0-develop.
|
|
3
|
+
"version": "8.1.0-develop.7",
|
|
4
4
|
"description": "Kendo UI for Vue Popup package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-vue-animation": "8.1.0-develop.
|
|
30
|
-
"@progress/kendo-vue-common": "8.1.0-develop.
|
|
29
|
+
"@progress/kendo-vue-animation": "8.1.0-develop.7",
|
|
30
|
+
"@progress/kendo-vue-common": "8.1.0-develop.7",
|
|
31
31
|
"vue": "^3.0.2"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"package": {
|
|
46
46
|
"productName": "Kendo UI for Vue",
|
|
47
47
|
"productCode": "KENDOUIVUE",
|
|
48
|
-
"publishDate":
|
|
48
|
+
"publishDate": 1775028444,
|
|
49
49
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
50
50
|
}
|
|
51
51
|
},
|