@pennsieve-viz/tsviewer 1.1.11 → 1.1.13
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/{BFLibraryButton-xRreF1qz.cjs → BFLibraryButton-B_TaDdTw.cjs} +1 -1
- package/dist/{BFLibraryButton-Dyws9SHi.js → BFLibraryButton-DTcYY6VD.js} +14 -14
- package/dist/{IconSelection-Cu7rNGza.cjs → IconSelection-BPTLv8Go.cjs} +1 -1
- package/dist/{IconSelection-BXkQ-HI2.js → IconSelection-BocyglLO.js} +3 -3
- package/dist/{TSAnnotationCanvas-vq4ZhQlM.js → TSAnnotationCanvas-DErBDH0Y.js} +4 -4
- package/dist/{TSAnnotationCanvas-DT1-oLwQ.cjs → TSAnnotationCanvas-DaDdtIB4.cjs} +1 -1
- package/dist/{TSAnnotationModal-BIihkWMN.js → TSAnnotationModal-B3OSl05U.js} +13 -13
- package/dist/{TSAnnotationModal-yiS6Inu7.cjs → TSAnnotationModal-DevUUWys.cjs} +1 -1
- package/dist/{TSFilterModal-Bg3Vl8ld.js → TSFilterModal-DHBpbDNp.js} +8 -8
- package/dist/{TSFilterModal-B9DK2z2R.cjs → TSFilterModal-DoqvKSUT.cjs} +1 -1
- package/dist/{TSScrubber-CRfsVW3j.cjs → TSScrubber-E03DDcMn.cjs} +1 -1
- package/dist/{TSScrubber-Dz4oujge.js → TSScrubber-hN5JY-DA.js} +3 -3
- package/dist/{TSViewerCanvas-B-uFOBba.js → TSViewerCanvas-2Jz9ZgqW.js} +1482 -1481
- package/dist/{TSViewerCanvas-5xGT95ay.cjs → TSViewerCanvas-Dc5cwQzK.cjs} +9 -9
- package/dist/{TSViewerLayerWindow-Ch0_2TBh.js → TSViewerLayerWindow-CalBmhT6.js} +6 -6
- package/dist/{TSViewerLayerWindow-yUINAqI2.cjs → TSViewerLayerWindow-PAfR31ZO.cjs} +1 -1
- package/dist/{TSViewerToolbar-WhD8V4Ex.cjs → TSViewerToolbar-C1wTQDPC.cjs} +1 -1
- package/dist/{TSViewerToolbar-BzM9uh9P.js → TSViewerToolbar-DL9XKYbV.js} +9 -9
- package/dist/{TsAnnotationDeleteDialog-CLRHSeYL.cjs → TsAnnotationDeleteDialog-Cv3z3dFh.cjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-2EHUvGW1.js → TsAnnotationDeleteDialog-DXgN07Wj.js} +5 -5
- package/dist/{base-CEBDkSsZ.cjs → base-BQSnEcNP.cjs} +1 -1
- package/dist/{base-B8HYDRlA.js → base-VCnLhxie.js} +9 -9
- package/dist/{el-input-DFAVTpkr.cjs → el-input-BDEG_6zp.cjs} +1 -1
- package/dist/{el-input-v5gK8U8C.js → el-input-Ct4WOqYx.js} +10 -10
- package/dist/{el-input-number-F_eDnZFO.cjs → el-input-number-B_bFGgma.cjs} +1 -1
- package/dist/{el-input-number-DSVzNAfT.js → el-input-number-DXBs74eH.js} +6 -6
- package/dist/{el-overlay-4ljdPakB.js → el-overlay-BMUWCEw_.js} +14 -14
- package/dist/{el-overlay-DFtIA0N9.cjs → el-overlay-D192MFpl.cjs} +1 -1
- package/dist/{index-BJOVbX31.js → index-BAtTJnp_.js} +1 -1
- package/dist/{index-qrig8S0H.js → index-BsH36ax4.js} +504 -503
- package/dist/{index-2QS1iKBu.cjs → index-TDc5sP-n.cjs} +1 -1
- package/dist/index-yiwCKzNX.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index-CQTgJYdx.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { watch as x, ref as _, inject as ne, computed as y, unref as v, getCurrentInstance as Qe, onMounted as De, toRef as Ue, onUnmounted as ja, shallowRef as Lt, nextTick as ie, defineComponent as Q, useAttrs as Ka, useSlots as Ua,
|
|
2
|
-
import { M as ls, O as Bt, P as en, Q as St, R as Sr, S as is, T as Qt, V as Cn, W as us, X as ut, Y as mn, Z as Xn, $ as gn, a0 as Er, a1 as zt, a2 as eo, a3 as In, a4 as Tr, a5 as gt, a6 as Cr, a7 as An, a8 as
|
|
1
|
+
import { watch as x, ref as _, inject as ne, computed as y, unref as v, getCurrentInstance as Qe, onMounted as De, toRef as Ue, onUnmounted as ja, shallowRef as Lt, nextTick as ie, defineComponent as Q, useAttrs as Ka, useSlots as Ua, createElementBlock as V, openBlock as $, normalizeStyle as Ie, normalizeClass as L, createCommentVNode as D, Fragment as ht, createElementVNode as Y, renderSlot as G, createBlock as q, withCtx as W, resolveDynamicComponent as st, mergeProps as Yt, withModifiers as ve, createVNode as le, toDisplayString as me, onBeforeUnmount as Ot, Transition as Zn, withDirectives as lt, vShow as Xt, provide as it, reactive as _t, onActivated as Ga, onUpdated as qa, cloneVNode as Ya, Text as Qa, Comment as Za, onBeforeMount as Ja, readonly as Xa, onDeactivated as es, toRaw as ts, toRefs as Jn, watchEffect as ns, resolveComponent as mt, resolveDirective as os, toHandlerKey as rs, renderList as Ao, createTextVNode as Po, withKeys as Wt, vModelText as as, isVNode as ss } from "vue";
|
|
2
|
+
import { M as ls, O as Bt, P as en, Q as St, R as Sr, S as is, T as Qt, V as Cn, W as us, X as ut, Y as mn, Z as Xn, $ as gn, a0 as Er, a1 as zt, a2 as eo, a3 as In, a4 as Tr, a5 as gt, a6 as Cr, a7 as An, a8 as Ne, a9 as cs, aa as Ir, ab as kn, ac as Ar, ad as fs, ae as ds, af as to, b as re, H as ge, e as Fe, i as _e, h as dn, U as je, j, k as hn, ag as zn, ah as Pn, ai as bt, aj as Vn, _ as ce, c as ue, ak as Pr, al as ps, am as vs, a as no, E as rt, N as bn, s as Rr, an as we, C as yn, I as Ro, w as Vt, t as $r, K as $o, ao as ms, ap as gs, aq as hs, y as pn, J as Mr, q as Be, ar as bs, as as ys, at as ws, au as Os, av as Ss, aw as Mo, u as Es, d as un, ax as Ts, ay as Cs, f as Is, az as As, n as Lr } from "./base-VCnLhxie.js";
|
|
3
3
|
var Ps = /\s/;
|
|
4
4
|
function Rs(e) {
|
|
5
5
|
for (var t = e.length; t-- && Ps.test(e.charAt(t)); )
|
|
@@ -629,18 +629,18 @@ var fu = Gl(function(e, t) {
|
|
|
629
629
|
});
|
|
630
630
|
function Ge(e) {
|
|
631
631
|
var t;
|
|
632
|
-
const n =
|
|
632
|
+
const n = Ir(e);
|
|
633
633
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
634
634
|
}
|
|
635
635
|
const $n = Ne ? window : void 0;
|
|
636
636
|
function Le(...e) {
|
|
637
637
|
let t, n, o, r;
|
|
638
|
-
if (
|
|
639
|
-
return
|
|
638
|
+
if (fs(e[0]) || Array.isArray(e[0]) ? ([n, o, r] = e, t = $n) : [t, n, o, r] = e, !t)
|
|
639
|
+
return Ar;
|
|
640
640
|
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
|
|
641
641
|
const s = [], a = () => {
|
|
642
642
|
s.forEach((p) => p()), s.length = 0;
|
|
643
|
-
}, l = (p, f, d, c) => (p.addEventListener(f, d, c), () => p.removeEventListener(f, d, c)), i = x(() => [Ge(t),
|
|
643
|
+
}, l = (p, f, d, c) => (p.addEventListener(f, d, c), () => p.removeEventListener(f, d, c)), i = x(() => [Ge(t), Ir(r)], ([p, f]) => {
|
|
644
644
|
a(), p && s.push(...n.flatMap((d) => o.map((c) => l(p, d, c, f))));
|
|
645
645
|
}, { immediate: !0, flush: "post" }), u = () => {
|
|
646
646
|
i(), a();
|
|
@@ -652,7 +652,7 @@ function du(e, t, n = {}) {
|
|
|
652
652
|
const { window: o = $n, ignore: r = [], capture: s = !0, detectIframe: a = !1 } = n;
|
|
653
653
|
if (!o)
|
|
654
654
|
return;
|
|
655
|
-
kn && !Xo && (Xo = !0, Array.from(o.document.body.children).forEach((d) => d.addEventListener("click",
|
|
655
|
+
kn && !Xo && (Xo = !0, Array.from(o.document.body.children).forEach((d) => d.addEventListener("click", Ar)));
|
|
656
656
|
let l = !0;
|
|
657
657
|
const i = (d) => r.some((c) => {
|
|
658
658
|
if (typeof c == "string")
|
|
@@ -686,7 +686,7 @@ function du(e, t, n = {}) {
|
|
|
686
686
|
}
|
|
687
687
|
function jr(e, t = !1) {
|
|
688
688
|
const n = _(), o = () => n.value = !!e();
|
|
689
|
-
return o(),
|
|
689
|
+
return o(), cs(o, t), n;
|
|
690
690
|
}
|
|
691
691
|
const er = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, tr = "__vueuse_ssr_handlers__";
|
|
692
692
|
er[tr] = er[tr] || {};
|
|
@@ -4657,7 +4657,7 @@ export {
|
|
|
4657
4657
|
yo as T,
|
|
4658
4658
|
Fd as a,
|
|
4659
4659
|
Dd as b,
|
|
4660
|
-
|
|
4660
|
+
Ur as c,
|
|
4661
4661
|
Gr as d,
|
|
4662
4662
|
lo as e,
|
|
4663
4663
|
Qr as f,
|
|
@@ -4675,5 +4675,5 @@ export {
|
|
|
4675
4675
|
Ul as r,
|
|
4676
4676
|
Kr as s,
|
|
4677
4677
|
qr as t,
|
|
4678
|
-
|
|
4678
|
+
tn as u
|
|
4679
4679
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),N=require("./el-input-
|
|
1
|
+
"use strict";const e=require("vue"),N=require("./el-input-BDEG_6zp.cjs"),r=require("./base-BQSnEcNP.cjs"),U=require("./index-TDc5sP-n.cjs"),W=r.buildProps({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:N.useSizeProp,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:i=>i===null||r.isNumber(i)||["min","max"].includes(i),default:null},name:String,placeholder:String,precision:{type:Number,validator:i=>i>=0&&i===Number.parseInt(`${i}`,10)},validateEvent:{type:Boolean,default:!0},...N.useAriaProps(["ariaLabel"])}),G={[r.CHANGE_EVENT]:(i,I)=>I!==i,blur:i=>i instanceof FocusEvent,focus:i=>i instanceof FocusEvent,[r.INPUT_EVENT]:i=>r.isNumber(i)||r.isNil(i),[r.UPDATE_MODEL_EVENT]:i=>r.isNumber(i)||r.isNil(i)},R=e.defineComponent({name:"ElInputNumber"}),H=e.defineComponent({...R,props:W,emits:G,setup(i,{expose:I,emit:d}){const l=i,{t:S}=r.useLocale(),m=r.useNamespace("input-number"),p=e.ref(),a=e.reactive({currentValue:l.modelValue,userInput:null}),{formItem:b}=N.useFormItem(),k=e.computed(()=>r.isNumber(l.modelValue)&&l.modelValue<=l.min),B=e.computed(()=>r.isNumber(l.modelValue)&&l.modelValue>=l.max),x=e.computed(()=>{const n=D(l.step);return r.isUndefined(l.precision)?Math.max(D(l.modelValue),n):(n>l.precision&&r.debugWarn("InputNumber","precision should not be less than the decimal places of step"),l.precision)}),y=e.computed(()=>l.controls&&l.controlsPosition==="right"),C=N.useFormSize(),v=N.useFormDisabled(),w=e.computed(()=>{if(a.userInput!==null)return a.userInput;let n=a.currentValue;if(r.isNil(n))return"";if(r.isNumber(n)){if(Number.isNaN(n))return"";r.isUndefined(l.precision)||(n=n.toFixed(l.precision))}return n}),_=(n,t)=>{if(r.isUndefined(t)&&(t=x.value),t===0)return Math.round(n);let u=String(n);const o=u.indexOf(".");if(o===-1||!u.replace(".","").split("")[o+t])return n;const V=u.length;return u.charAt(V-1)==="5"&&(u=`${u.slice(0,Math.max(0,V-1))}6`),Number.parseFloat(Number(u).toFixed(t))},D=n=>{if(r.isNil(n))return 0;const t=n.toString(),u=t.indexOf(".");let o=0;return u!==-1&&(o=t.length-u-1),o},A=(n,t=1)=>r.isNumber(n)?_(n+l.step*t):a.currentValue,g=()=>{if(l.readonly||v.value||B.value)return;const n=Number(w.value)||0,t=A(n);E(t),d(r.INPUT_EVENT,a.currentValue),P()},T=()=>{if(l.readonly||v.value||k.value)return;const n=Number(w.value)||0,t=A(n,-1);E(t),d(r.INPUT_EVENT,a.currentValue),P()},M=(n,t)=>{const{max:u,min:o,step:s,precision:f,stepStrictly:V,valueOnClear:h}=l;u<o&&r.throwError("InputNumber","min should not be greater than max.");let c=Number(n);if(r.isNil(n)||Number.isNaN(c))return null;if(n===""){if(h===null)return null;c=r.isString(h)?{min:o,max:u}[h]:h}return V&&(c=_(Math.round(c/s)*s,f),c!==n&&t&&d(r.UPDATE_MODEL_EVENT,c)),r.isUndefined(f)||(c=_(c,f)),(c>u||c<o)&&(c=c>u?u:o,t&&d(r.UPDATE_MODEL_EVENT,c)),c},E=(n,t=!0)=>{var u;const o=a.currentValue,s=M(n);if(!t){d(r.UPDATE_MODEL_EVENT,s);return}o===s&&n||(a.userInput=null,d(r.UPDATE_MODEL_EVENT,s),o!==s&&d(r.CHANGE_EVENT,s,o),l.validateEvent&&((u=b==null?void 0:b.validate)==null||u.call(b,"change").catch(f=>r.debugWarn(f))),a.currentValue=s)},F=n=>{a.userInput=n;const t=n===""?null:Number(n);d(r.INPUT_EVENT,t),E(t,!1)},O=n=>{const t=n!==""?Number(n):"";(r.isNumber(t)&&!Number.isNaN(t)||n==="")&&E(t),P(),a.userInput=null},K=()=>{var n,t;(t=(n=p.value)==null?void 0:n.focus)==null||t.call(n)},L=()=>{var n,t;(t=(n=p.value)==null?void 0:n.blur)==null||t.call(n)},z=n=>{d("focus",n)},$=n=>{var t,u;a.userInput=null,a.currentValue===null&&((t=p.value)!=null&&t.input)&&(p.value.input.value=""),d("blur",n),l.validateEvent&&((u=b==null?void 0:b.validate)==null||u.call(b,"blur").catch(o=>r.debugWarn(o)))},P=()=>{a.currentValue!==l.modelValue&&(a.currentValue=l.modelValue)},q=n=>{document.activeElement===n.target&&n.preventDefault()};return e.watch(()=>l.modelValue,(n,t)=>{const u=M(n,!0);a.userInput===null&&u!==t&&(a.currentValue=u)},{immediate:!0}),e.onMounted(()=>{var n;const{min:t,max:u,modelValue:o}=l,s=(n=p.value)==null?void 0:n.input;if(s.setAttribute("role","spinbutton"),Number.isFinite(u)?s.setAttribute("aria-valuemax",String(u)):s.removeAttribute("aria-valuemax"),Number.isFinite(t)?s.setAttribute("aria-valuemin",String(t)):s.removeAttribute("aria-valuemin"),s.setAttribute("aria-valuenow",a.currentValue||a.currentValue===0?String(a.currentValue):""),s.setAttribute("aria-disabled",String(v.value)),!r.isNumber(o)&&o!=null){let f=Number(o);Number.isNaN(f)&&(f=null),d(r.UPDATE_MODEL_EVENT,f)}s.addEventListener("wheel",q,{passive:!1})}),e.onUpdated(()=>{var n,t;const u=(n=p.value)==null?void 0:n.input;u==null||u.setAttribute("aria-valuenow",`${(t=a.currentValue)!=null?t:""}`)}),I({focus:K,blur:L}),(n,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(m).b(),e.unref(m).m(e.unref(C)),e.unref(m).is("disabled",e.unref(v)),e.unref(m).is("without-controls",!n.controls),e.unref(m).is("controls-right",e.unref(y))]),onDragstart:e.withModifiers(()=>{},["prevent"])},[n.controls?e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:0,role:"button","aria-label":e.unref(S)("el.inputNumber.decrease"),class:e.normalizeClass([e.unref(m).e("decrease"),e.unref(m).is("disabled",e.unref(k))]),onKeydown:e.withKeys(T,["enter"])},[e.renderSlot(n.$slots,"decrease-icon",{},()=>[e.createVNode(e.unref(r.ElIcon),null,{default:e.withCtx(()=>[e.unref(y)?(e.openBlock(),e.createBlock(e.unref(r.arrow_down_default),{key:0})):(e.openBlock(),e.createBlock(e.unref(r.minus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[e.unref(U.vRepeatClick),T]]):e.createCommentVNode("v-if",!0),n.controls?e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:1,role:"button","aria-label":e.unref(S)("el.inputNumber.increase"),class:e.normalizeClass([e.unref(m).e("increase"),e.unref(m).is("disabled",e.unref(B))]),onKeydown:e.withKeys(g,["enter"])},[e.renderSlot(n.$slots,"increase-icon",{},()=>[e.createVNode(e.unref(r.ElIcon),null,{default:e.withCtx(()=>[e.unref(y)?(e.openBlock(),e.createBlock(e.unref(r.arrow_up_default),{key:0})):(e.openBlock(),e.createBlock(e.unref(r.plus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[e.unref(U.vRepeatClick),g]]):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(N.ElInput),{id:n.id,ref_key:"input",ref:p,type:"number",step:n.step,"model-value":e.unref(w),placeholder:n.placeholder,readonly:n.readonly,disabled:e.unref(v),size:e.unref(C),max:n.max,min:n.min,name:n.name,"aria-label":n.ariaLabel,"validate-event":!1,onKeydown:[e.withKeys(e.withModifiers(g,["prevent"]),["up"]),e.withKeys(e.withModifiers(T,["prevent"]),["down"])],onBlur:$,onFocus:z,onInput:F,onChange:O},e.createSlots({_:2},[n.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"prefix")])}:void 0,n.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var Y=r._export_sfc(H,[["__file","input-number.vue"]]);const j=r.withInstall(Y);exports.ElInputNumber=j;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as Z, ref as oe, reactive as ce, computed as h, watch as de, onMounted as me, onUpdated as pe,
|
|
2
|
-
import { u as be, c as ve, d as Ne, e as Ve, f as he, g as ye } from "./el-input-
|
|
3
|
-
import {
|
|
4
|
-
import { v as X } from "./index-
|
|
1
|
+
import { defineComponent as Z, ref as oe, reactive as ce, computed as h, watch as de, onMounted as me, onUpdated as pe, createElementBlock as M, openBlock as b, withModifiers as z, normalizeClass as K, unref as r, withDirectives as q, createCommentVNode as J, createVNode as O, withKeys as E, renderSlot as _, withCtx as S, createBlock as P, createSlots as fe } from "vue";
|
|
2
|
+
import { u as be, c as ve, d as Ne, e as Ve, f as he, g as ye } from "./el-input-Ct4WOqYx.js";
|
|
3
|
+
import { i as p, a as y, b as Ie, U as N, I as F, C as ee, u as ge, c as we, d as A, e as L, E as Q, f as Ee, m as _e, g as Se, p as Pe, t as Ae, h as Fe, _ as Ce, w as ke } from "./base-VCnLhxie.js";
|
|
4
|
+
import { v as X } from "./index-BAtTJnp_.js";
|
|
5
5
|
const xe = Ie({
|
|
6
6
|
id: {
|
|
7
7
|
type: String,
|
|
@@ -25,7 +25,7 @@ const xe = Ie({
|
|
|
25
25
|
},
|
|
26
26
|
readonly: Boolean,
|
|
27
27
|
disabled: Boolean,
|
|
28
|
-
size:
|
|
28
|
+
size: ve,
|
|
29
29
|
controls: {
|
|
30
30
|
type: Boolean,
|
|
31
31
|
default: !0
|
|
@@ -50,7 +50,7 @@ const xe = Ie({
|
|
|
50
50
|
type: Boolean,
|
|
51
51
|
default: !0
|
|
52
52
|
},
|
|
53
|
-
...
|
|
53
|
+
...be(["ariaLabel"])
|
|
54
54
|
}), Be = {
|
|
55
55
|
[ee]: (l, C) => C !== l,
|
|
56
56
|
blur: (l) => l instanceof FocusEvent,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getCurrentInstance as te, inject as X,
|
|
2
|
-
import { e as Pe, N as V,
|
|
1
|
+
import { getCurrentInstance as te, inject as X, ref as P, computed as M, watch as z, unref as o, defineComponent as Y, createVNode as N, h as ve, renderSlot as S, onMounted as ne, watchEffect as me, onBeforeUnmount as ye, createElementBlock as K, openBlock as O, normalizeStyle as se, normalizeClass as T, createElementVNode as R, createCommentVNode as j, toDisplayString as pe, withCtx as I, createBlock as U, resolveDynamicComponent as ge, isRef as Ce, onScopeDispose as be, nextTick as he, useSlots as we, provide as Ee, Transition as ke, withDirectives as Se, mergeProps as Me, createSlots as Te, vShow as Ie } from "vue";
|
|
2
|
+
import { e as Pe, N as V, b as G, c as J, aA as W, j as q, k as Le, K as _, H as Be, _ as le, u as De, aB as $e, E as Ae, aC as Fe, J as Oe, U as ae, aq as ze, t as Ne, a8 as ie, A as Q, aD as Ye, aE as He, z as Re, aF as Ke, ao as Ve, ah as x, aG as We, aH as ee, au as Xe, ap as je, w as Ue } from "./base-VCnLhxie.js";
|
|
3
3
|
const qe = Symbol(), oe = P();
|
|
4
4
|
function _e(e, t = void 0) {
|
|
5
5
|
const n = te() ? X(qe, oe) : oe;
|
|
@@ -27,7 +27,7 @@ For more detail, please visit: ${s}
|
|
|
27
27
|
}, onMouseup: (a) => {
|
|
28
28
|
n = a.target === a.currentTarget;
|
|
29
29
|
} };
|
|
30
|
-
}, Je =
|
|
30
|
+
}, Je = G({
|
|
31
31
|
mask: {
|
|
32
32
|
type: Boolean,
|
|
33
33
|
default: !0
|
|
@@ -51,7 +51,7 @@ var xe = Y({
|
|
|
51
51
|
props: Je,
|
|
52
52
|
emits: Ze,
|
|
53
53
|
setup(e, { slots: t, emit: n }) {
|
|
54
|
-
const c =
|
|
54
|
+
const c = J(Qe), s = (i) => {
|
|
55
55
|
n("click", i);
|
|
56
56
|
}, { onClick: u, onMousedown: a, onMouseup: f } = re(e.customMaskEvent ? void 0 : s);
|
|
57
57
|
return () => e.mask ? N("div", {
|
|
@@ -75,7 +75,7 @@ var xe = Y({
|
|
|
75
75
|
}, [S(t, "default")]);
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
const eo = xe, ue = Symbol("dialogInjectionKey"), ce =
|
|
78
|
+
const eo = xe, ue = Symbol("dialogInjectionKey"), ce = G({
|
|
79
79
|
center: Boolean,
|
|
80
80
|
alignCenter: Boolean,
|
|
81
81
|
closeIcon: {
|
|
@@ -186,11 +186,11 @@ const eo = xe, ue = Symbol("dialogInjectionKey"), ce = J({
|
|
|
186
186
|
class: T(o(i).e("close"))
|
|
187
187
|
}, {
|
|
188
188
|
default: I(() => [
|
|
189
|
-
(O(),
|
|
189
|
+
(O(), U(ge(r.closeIcon || o(s))))
|
|
190
190
|
]),
|
|
191
191
|
_: 1
|
|
192
192
|
}, 8, ["class"])
|
|
193
|
-
], 10, ["aria-label", "onClick"])) :
|
|
193
|
+
], 10, ["aria-label", "onClick"])) : j("v-if", !0)
|
|
194
194
|
], 2),
|
|
195
195
|
R("div", {
|
|
196
196
|
id: o(f),
|
|
@@ -203,12 +203,12 @@ const eo = xe, ue = Symbol("dialogInjectionKey"), ce = J({
|
|
|
203
203
|
class: T([o(i).e("footer"), r.footerClass])
|
|
204
204
|
}, [
|
|
205
205
|
S(r.$slots, "footer")
|
|
206
|
-
], 2)) :
|
|
206
|
+
], 2)) : j("v-if", !0)
|
|
207
207
|
], 6));
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
var ao = /* @__PURE__ */ le(lo, [["__file", "dialog-content.vue"]]);
|
|
211
|
-
const io =
|
|
211
|
+
const io = G({
|
|
212
212
|
...ce,
|
|
213
213
|
appendToBody: Boolean,
|
|
214
214
|
appendTo: {
|
|
@@ -272,7 +272,7 @@ const io = J({
|
|
|
272
272
|
closeAutoFocus: () => !0
|
|
273
273
|
}, uo = (e, t = {}) => {
|
|
274
274
|
Ce(e) || Ne("[useLockscreen]", "You need to pass a ref param to this function");
|
|
275
|
-
const n = t.ns ||
|
|
275
|
+
const n = t.ns || J("popup"), c = M(() => n.bm("parent", "hidden"));
|
|
276
276
|
if (!ie || Q(document.body, c.value))
|
|
277
277
|
return;
|
|
278
278
|
let s = 0, u = !1, a = "0";
|
|
@@ -393,7 +393,7 @@ const io = J({
|
|
|
393
393
|
version: "3.0.0",
|
|
394
394
|
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
395
395
|
}, M(() => !!c.title));
|
|
396
|
-
const s =
|
|
396
|
+
const s = J("dialog"), u = P(), a = P(), f = P(), {
|
|
397
397
|
visible: i,
|
|
398
398
|
titleId: v,
|
|
399
399
|
bodyId: g,
|
|
@@ -428,7 +428,7 @@ const io = J({
|
|
|
428
428
|
(l = f.value) == null || l.resetPosition();
|
|
429
429
|
},
|
|
430
430
|
handleClose: w
|
|
431
|
-
}), (l, Z) => (O(),
|
|
431
|
+
}), (l, Z) => (O(), U(o(Xe), {
|
|
432
432
|
to: l.appendTo,
|
|
433
433
|
disabled: l.appendTo !== "body" ? !1 : !l.appendToBody
|
|
434
434
|
}, {
|
|
@@ -470,7 +470,7 @@ const io = J({
|
|
|
470
470
|
onReleaseRequested: o(D)
|
|
471
471
|
}, {
|
|
472
472
|
default: I(() => [
|
|
473
|
-
o(y) ? (O(),
|
|
473
|
+
o(y) ? (O(), U(ao, Me({
|
|
474
474
|
key: 0,
|
|
475
475
|
ref_key: "dialogContentRef",
|
|
476
476
|
ref: f
|
|
@@ -508,7 +508,7 @@ const io = J({
|
|
|
508
508
|
S(l.$slots, "footer")
|
|
509
509
|
])
|
|
510
510
|
} : void 0
|
|
511
|
-
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) :
|
|
511
|
+
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : j("v-if", !0)
|
|
512
512
|
]),
|
|
513
513
|
_: 3
|
|
514
514
|
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),t=require("./base-
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./base-BQSnEcNP.cjs"),U=Symbol(),F=e.ref();function O(o,n=void 0){const l=e.getCurrentInstance()?e.inject(U,F):F;return o?e.computed(()=>{var d,s;return(s=(d=l.value)==null?void 0:d[o])!=null?s:n}):l}const $=({from:o,replacement:n,scope:l,version:d,ref:s,type:c="API"},r)=>{e.watch(()=>e.unref(r),m=>{m&&t.debugWarn(l,`[${c}] ${o} is about to be deprecated in version ${d}, please use ${n} instead.
|
|
2
2
|
For more detail, please visit: ${s}
|
|
3
3
|
`)},{immediate:!0})},z=o=>{if(!o)return{onClick:t.NOOP,onMousedown:t.NOOP,onMouseup:t.NOOP};let n=!1,l=!1;return{onClick:r=>{n&&l&&o(r),n=l=!1},onMousedown:r=>{n=r.target===r.currentTarget},onMouseup:r=>{l=r.target===r.currentTarget}}},_=t.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:t.definePropType([String,Array,Object])},zIndex:{type:t.definePropType([String,Number])}}),j={click:o=>o instanceof MouseEvent},H="overlay";var W=e.defineComponent({name:"ElOverlay",props:_,emits:j,setup(o,{slots:n,emit:l}){const d=t.useNamespace(H),s=i=>{l("click",i)},{onClick:c,onMousedown:r,onMouseup:m}=z(o.customMaskEvent?void 0:s);return()=>o.mask?e.createVNode("div",{class:[d.b(),o.overlayClass],style:{zIndex:o.zIndex},onClick:c,onMousedown:r,onMouseup:m},[e.renderSlot(n,"default")],t.PatchFlags.STYLE|t.PatchFlags.CLASS|t.PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):e.h("div",{class:o.overlayClass,style:{zIndex:o.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[e.renderSlot(n,"default")])}});const X=W,A=Symbol("dialogInjectionKey"),V=t.buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:t.iconPropType},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),q={close:()=>!0},x=(o,n,l,d)=>{const s={offsetX:0,offsetY:0},c=(f,p)=>{if(o.value){const{offsetX:y,offsetY:h}=s,b=o.value.getBoundingClientRect(),w=b.left,u=b.top,E=b.width,S=b.height,P=document.documentElement.clientWidth,B=document.documentElement.clientHeight,T=-w+y,M=-u+h,I=P-w-E+y,D=B-u-(S<B?S:0)+h;d!=null&&d.value||(f=Math.min(Math.max(f,T),I),p=Math.min(Math.max(p,M),D)),s.offsetX=f,s.offsetY=p,o.value.style.transform=`translate(${t.addUnit(f)}, ${t.addUnit(p)})`}},r=f=>{const p=f.clientX,y=f.clientY,{offsetX:h,offsetY:b}=s,w=E=>{const S=h+E.clientX-p,P=b+E.clientY-y;c(S,P)},u=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",w),document.addEventListener("mouseup",u)},m=()=>{n.value&&o.value&&(n.value.addEventListener("mousedown",r),window.addEventListener("resize",g))},i=()=>{n.value&&o.value&&(n.value.removeEventListener("mousedown",r),window.removeEventListener("resize",g))},v=()=>{s.offsetX=0,s.offsetY=0,o.value&&(o.value.style.transform="")},g=()=>{const{offsetX:f,offsetY:p}=s;c(f,p)};return e.onMounted(()=>{e.watchEffect(()=>{l.value?m():i()})}),e.onBeforeUnmount(()=>{i()}),{resetPosition:v,updatePosition:g}},K=(...o)=>n=>{o.forEach(l=>{t.isFunction(l)?l(n):l.value=n})},G=e.defineComponent({name:"ElDialogContent"}),Z=e.defineComponent({...G,props:V,emits:q,setup(o,{expose:n}){const l=o,{t:d}=t.useLocale(),{Close:s}=t.CloseComponents,{dialogRef:c,headerRef:r,bodyId:m,ns:i,style:v}=e.inject(A),{focusTrapRef:g}=e.inject(t.FOCUS_TRAP_INJECTION_KEY),f=e.computed(()=>[i.b(),i.is("fullscreen",l.fullscreen),i.is("draggable",l.draggable),i.is("align-center",l.alignCenter),{[i.m("center")]:l.center}]),p=K(g,c),y=e.computed(()=>l.draggable),h=e.computed(()=>l.overflow),{resetPosition:b,updatePosition:w}=x(c,r,y,h);return n({resetPosition:b,updatePosition:w}),(u,E)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(p),class:e.normalizeClass(e.unref(f)),style:e.normalizeStyle(e.unref(v)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:r,class:e.normalizeClass([e.unref(i).e("header"),u.headerClass,{"show-close":u.showClose}])},[e.renderSlot(u.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":u.ariaLevel,class:e.normalizeClass(e.unref(i).e("title"))},e.toDisplayString(u.title),11,["aria-level"])]),u.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(d)("el.dialog.close"),class:e.normalizeClass(e.unref(i).e("headerbtn")),type:"button",onClick:S=>u.$emit("close")},[e.createVNode(e.unref(t.ElIcon),{class:e.normalizeClass(e.unref(i).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.closeIcon||e.unref(s))))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(m),class:e.normalizeClass([e.unref(i).e("body"),u.bodyClass])},[e.renderSlot(u.$slots,"default")],10,["id"]),u.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass([e.unref(i).e("footer"),u.footerClass])},[e.renderSlot(u.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var J=t._export_sfc(Z,[["__file","dialog-content.vue"]]);const Q=t.buildProps({...V,appendToBody:Boolean,appendTo:{type:t.teleportProps.to.type,default:"body"},beforeClose:{type:t.definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),ee={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[t.UPDATE_MODEL_EVENT]:o=>t.isBoolean(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},oe=(o,n={})=>{e.isRef(o)||t.throwError("[useLockscreen]","You need to pass a ref param to this function");const l=n.ns||t.useNamespace("popup"),d=e.computed(()=>l.bm("parent","hidden"));if(!t.isClient||t.hasClass(document.body,d.value))return;let s=0,c=!1,r="0";const m=()=>{setTimeout(()=>{typeof document>"u"||c&&document&&(document.body.style.width=r,t.removeClass(document.body,d.value))},200)};e.watch(o,i=>{if(!i){m();return}c=!t.hasClass(document.body,d.value),c&&(r=document.body.style.width,t.addClass(document.body,d.value)),s=t.getScrollBarWidth(l.namespace.value);const v=document.documentElement.clientHeight<document.body.scrollHeight,g=t.getStyle(document.body,"overflowY");s>0&&(v||g==="scroll")&&c&&(document.body.style.width=`calc(100% - ${s}px)`)}),e.onScopeDispose(()=>m())},te=(o,n)=>{var l;const s=e.getCurrentInstance().emit,{nextZIndex:c}=t.useZIndex();let r="";const m=t.useId(),i=t.useId(),v=e.ref(!1),g=e.ref(!1),f=e.ref(!1),p=e.ref((l=o.zIndex)!=null?l:c());let y,h;const b=O("namespace",t.defaultNamespace),w=e.computed(()=>{const C={},k=`--${b.value}-dialog`;return o.fullscreen||(o.top&&(C[`${k}-margin-top`]=o.top),o.width&&(C[`${k}-width`]=t.addUnit(o.width))),C}),u=e.computed(()=>o.alignCenter?{display:"flex"}:{});function E(){s("opened")}function S(){s("closed"),s(t.UPDATE_MODEL_EVENT,!1),o.destroyOnClose&&(f.value=!1)}function P(){s("close")}function B(){h==null||h(),y==null||y(),o.openDelay&&o.openDelay>0?{stop:y}=t.useTimeoutFn(()=>D(),o.openDelay):D()}function T(){y==null||y(),h==null||h(),o.closeDelay&&o.closeDelay>0?{stop:h}=t.useTimeoutFn(()=>L(),o.closeDelay):L()}function M(){function C(k){k||(g.value=!0,v.value=!1)}o.beforeClose?o.beforeClose(C):T()}function I(){o.closeOnClickModal&&M()}function D(){t.isClient&&(v.value=!0)}function L(){v.value=!1}function a(){s("openAutoFocus")}function N(){s("closeAutoFocus")}function Y(C){var k;((k=C.detail)==null?void 0:k.focusReason)==="pointer"&&C.preventDefault()}o.lockScroll&&oe(v);function R(){o.closeOnPressEscape&&M()}return e.watch(()=>o.zIndex,()=>{var C;p.value=(C=o.zIndex)!=null?C:c()}),e.watch(()=>o.modelValue,C=>{var k;C?(g.value=!1,B(),f.value=!0,p.value=(k=o.zIndex)!=null?k:c(),e.nextTick(()=>{s("open"),n.value&&(n.value.parentElement.scrollTop=0,n.value.parentElement.scrollLeft=0,n.value.scrollTop=0)})):v.value&&T()}),e.watch(()=>o.fullscreen,C=>{n.value&&(C?(r=n.value.style.transform,n.value.style.transform=""):n.value.style.transform=r)}),e.onMounted(()=>{o.modelValue&&(v.value=!0,f.value=!0,B())}),{afterEnter:E,afterLeave:S,beforeLeave:P,handleClose:M,onModalClick:I,close:T,doClose:L,onOpenAutoFocus:a,onCloseAutoFocus:N,onCloseRequested:R,onFocusoutPrevented:Y,titleId:m,bodyId:i,closed:g,style:w,overlayDialogStyle:u,rendered:f,visible:v,zIndex:p}},ne=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),le=e.defineComponent({...ne,props:Q,emits:ee,setup(o,{expose:n}){const l=o,d=e.useSlots();$({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},e.computed(()=>!!d.title));const s=t.useNamespace("dialog"),c=e.ref(),r=e.ref(),m=e.ref(),{visible:i,titleId:v,bodyId:g,style:f,overlayDialogStyle:p,rendered:y,zIndex:h,afterEnter:b,afterLeave:w,beforeLeave:u,handleClose:E,onModalClick:S,onOpenAutoFocus:P,onCloseAutoFocus:B,onCloseRequested:T,onFocusoutPrevented:M}=te(l,c);e.provide(A,{dialogRef:c,headerRef:r,bodyId:g,ns:s,rendered:y,style:f});const I=z(S),D=e.computed(()=>l.draggable&&!l.fullscreen);return n({visible:i,dialogContentRef:m,resetPosition:()=>{var a;(a=m.value)==null||a.resetPosition()},handleClose:E}),(a,N)=>(e.openBlock(),e.createBlock(e.unref(t.ElTeleport),{to:a.appendTo,disabled:a.appendTo!=="body"?!1:!a.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"dialog-fade",onAfterEnter:e.unref(b),onAfterLeave:e.unref(w),onBeforeLeave:e.unref(u),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(X),{"custom-mask-event":"",mask:a.modal,"overlay-class":a.modalClass,"z-index":e.unref(h)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":a.title||void 0,"aria-labelledby":a.title?void 0:e.unref(v),"aria-describedby":e.unref(g),class:e.normalizeClass(`${e.unref(s).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(p)),onClick:e.unref(I).onClick,onMousedown:e.unref(I).onMousedown,onMouseup:e.unref(I).onMouseup},[e.createVNode(e.unref(t.ElFocusTrap),{loop:"",trapped:e.unref(i),"focus-start-el":"container",onFocusAfterTrapped:e.unref(P),onFocusAfterReleased:e.unref(B),onFocusoutPrevented:e.unref(M),onReleaseRequested:e.unref(T)},{default:e.withCtx(()=>[e.unref(y)?(e.openBlock(),e.createBlock(J,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:m},a.$attrs,{center:a.center,"align-center":a.alignCenter,"close-icon":a.closeIcon,draggable:e.unref(D),overflow:a.overflow,fullscreen:a.fullscreen,"header-class":a.headerClass,"body-class":a.bodyClass,"footer-class":a.footerClass,"show-close":a.showClose,title:a.title,"aria-level":a.headerAriaLevel,onClose:e.unref(E)}),e.createSlots({header:e.withCtx(()=>[a.$slots.title?e.renderSlot(a.$slots,"title",{key:1}):e.renderSlot(a.$slots,"header",{key:0,close:e.unref(E),titleId:e.unref(v),titleClass:e.unref(s).e("title")})]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[a.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):e.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[e.vShow,e.unref(i)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var se=t._export_sfc(le,[["__file","dialog.vue"]]);const ae=t.withInstall(se);exports.ElDialog=ae;exports.useDeprecated=$;exports.useGlobalConfig=O;
|