@pennsieve-viz/tsviewer 1.0.0 → 1.0.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.
Files changed (50) hide show
  1. package/dist/{BFLibraryButton-BiLkvU6m.cjs → BFLibraryButton-BI_luZjc.cjs} +1 -1
  2. package/dist/{BFLibraryButton-C6aAhW1T.js → BFLibraryButton-BP-P5nDS.js} +1 -1
  3. package/dist/{IconSelection-DGTELjPb.cjs → IconSelection-B3B4x81f.cjs} +1 -1
  4. package/dist/{IconSelection-Bud2XLOy.js → IconSelection-DkGAJih_.js} +1 -1
  5. package/dist/{TSAnnotationCanvas-CMZHn8mY.js → TSAnnotationCanvas-CPNo-Z2t.js} +6 -5
  6. package/dist/TSAnnotationCanvas-Cq5fLEeQ.cjs +1 -0
  7. package/dist/TSAnnotationModal-BfpdK288.js +4429 -0
  8. package/dist/TSAnnotationModal-BvPKePsi.cjs +1 -0
  9. package/dist/{TSFilterModal-BtLOK_nq.js → TSFilterModal-BUuabfh0.js} +59 -55
  10. package/dist/TSFilterModal-DXfg6Vbt.cjs +1 -0
  11. package/dist/{TSScrubber-CTjzX-Xq.js → TSScrubber-BWay2z2E.js} +1 -1
  12. package/dist/{TSScrubber-DAnIUBuC.cjs → TSScrubber-DuOBdGF2.cjs} +1 -1
  13. package/dist/TSViewerCanvas-BDAfmQM_.cjs +11 -0
  14. package/dist/{TSViewerCanvas-DkKV70m8.js → TSViewerCanvas-DjV4CQ2G.js} +205 -209
  15. package/dist/{TSViewerLayerWindow-zI_48DIx.js → TSViewerLayerWindow-BuXB_NVG.js} +39 -36
  16. package/dist/TSViewerLayerWindow-C40On1cL.cjs +1 -0
  17. package/dist/TSViewerToolbar-CGLoEe3Z.cjs +1 -0
  18. package/dist/{TSViewerToolbar-BMZIlD4q.js → TSViewerToolbar-gOCiS_4U.js} +92 -88
  19. package/dist/{TsAnnotationDeleteDialog-Iwpo79Pe.js → TsAnnotationDeleteDialog-C3P2teV8.js} +82 -80
  20. package/dist/TsAnnotationDeleteDialog-Dr6JB0ms.cjs +1 -0
  21. package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
  22. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  23. package/dist/base-C3K_VdPK.cjs +12 -0
  24. package/dist/base-Dd-o8fN6.js +1413 -0
  25. package/dist/el-button-B3mito7d.cjs +1 -0
  26. package/dist/el-button-DVykS1Of.js +769 -0
  27. package/dist/el-input-BQKTli-S.cjs +1 -0
  28. package/dist/el-input-BxM2cCbI.js +4667 -0
  29. package/dist/el-input-number-8Z4UFuyU.cjs +1 -0
  30. package/dist/el-input-number-DtWxZ2F-.js +265 -0
  31. package/dist/el-overlay-BJQNirx2.cjs +1 -0
  32. package/dist/el-overlay-DfCO_8B5.js +517 -0
  33. package/dist/{index-CGSfhm_E.cjs → index-CW1sKrzq.cjs} +1 -1
  34. package/dist/index-CiwHOd9w.cjs +1 -0
  35. package/dist/index-CtMh8Ff9.js +22 -0
  36. package/dist/{index-Cexzl5Xu.js → index-D41jNOo7.js} +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/{pathOr-Do2dduwx.js → pathOr-CSuna3IF.js} +1 -1
  40. package/dist/{pathOr-D0158Gk1.cjs → pathOr-DWeJPuhG.cjs} +1 -1
  41. package/dist/style.css +1 -1
  42. package/package.json +4 -4
  43. package/dist/TSAnnotationCanvas-C3-VI46n.cjs +0 -1
  44. package/dist/TSAnnotationModal-BcqWVXP_.js +0 -199
  45. package/dist/TSAnnotationModal-DskdoFo4.cjs +0 -1
  46. package/dist/TSFilterModal-DEOWfIi6.cjs +0 -1
  47. package/dist/TSViewerCanvas-Jbu-Kh9F.cjs +0 -11
  48. package/dist/TSViewerLayerWindow-wHkjTl6e.cjs +0 -1
  49. package/dist/TSViewerToolbar-C6yy7GJr.cjs +0 -1
  50. package/dist/TsAnnotationDeleteDialog-Be3AJIyo.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),N=require("./el-input-BQKTli-S.cjs"),r=require("./base-C3K_VdPK.cjs"),U=require("./index-CiwHOd9w.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;
@@ -0,0 +1,265 @@
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-BxM2cCbI.js";
3
+ import { i as p, a as y, b as Ie, U as N, I as F, C as ee, _ as ge, u as we, c as Ee, d as A, e as L, E as Q, f as _e, m as Se, g as Pe, p as Ae, t as Fe, h as Ce, w as ke } from "./base-Dd-o8fN6.js";
4
+ import { v as X } from "./index-CtMh8Ff9.js";
5
+ const xe = Ie({
6
+ id: {
7
+ type: String,
8
+ default: void 0
9
+ },
10
+ step: {
11
+ type: Number,
12
+ default: 1
13
+ },
14
+ stepStrictly: Boolean,
15
+ max: {
16
+ type: Number,
17
+ default: Number.POSITIVE_INFINITY
18
+ },
19
+ min: {
20
+ type: Number,
21
+ default: Number.NEGATIVE_INFINITY
22
+ },
23
+ modelValue: {
24
+ type: [Number, null]
25
+ },
26
+ readonly: Boolean,
27
+ disabled: Boolean,
28
+ size: ve,
29
+ controls: {
30
+ type: Boolean,
31
+ default: !0
32
+ },
33
+ controlsPosition: {
34
+ type: String,
35
+ default: "",
36
+ values: ["", "right"]
37
+ },
38
+ valueOnClear: {
39
+ type: [String, Number, null],
40
+ validator: (l) => l === null || p(l) || ["min", "max"].includes(l),
41
+ default: null
42
+ },
43
+ name: String,
44
+ placeholder: String,
45
+ precision: {
46
+ type: Number,
47
+ validator: (l) => l >= 0 && l === Number.parseInt(`${l}`, 10)
48
+ },
49
+ validateEvent: {
50
+ type: Boolean,
51
+ default: !0
52
+ },
53
+ ...be(["ariaLabel"])
54
+ }), Be = {
55
+ [ee]: (l, C) => C !== l,
56
+ blur: (l) => l instanceof FocusEvent,
57
+ focus: (l) => l instanceof FocusEvent,
58
+ [F]: (l) => p(l) || y(l),
59
+ [N]: (l) => p(l) || y(l)
60
+ }, De = Z({
61
+ name: "ElInputNumber"
62
+ }), Te = /* @__PURE__ */ Z({
63
+ ...De,
64
+ props: xe,
65
+ emits: Be,
66
+ setup(l, { expose: C, emit: c }) {
67
+ const a = l, { t: U } = we(), m = Ee("input-number"), f = oe(), u = ce({
68
+ currentValue: a.modelValue,
69
+ userInput: null
70
+ }), { formItem: v } = Ne(), G = h(() => p(a.modelValue) && a.modelValue <= a.min), R = h(() => p(a.modelValue) && a.modelValue >= a.max), ne = h(() => {
71
+ const e = Y(a.step);
72
+ return A(a.precision) ? Math.max(Y(a.modelValue), e) : (e > a.precision && L("InputNumber", "precision should not be less than the decimal places of step"), a.precision);
73
+ }), k = h(() => a.controls && a.controlsPosition === "right"), W = Ve(), V = he(), x = h(() => {
74
+ if (u.userInput !== null)
75
+ return u.userInput;
76
+ let e = u.currentValue;
77
+ if (y(e))
78
+ return "";
79
+ if (p(e)) {
80
+ if (Number.isNaN(e))
81
+ return "";
82
+ A(a.precision) || (e = e.toFixed(a.precision));
83
+ }
84
+ return e;
85
+ }), B = (e, n) => {
86
+ if (A(n) && (n = ne.value), n === 0)
87
+ return Math.round(e);
88
+ let t = String(e);
89
+ const s = t.indexOf(".");
90
+ if (s === -1 || !t.replace(".", "").split("")[s + n])
91
+ return e;
92
+ const g = t.length;
93
+ return t.charAt(g - 1) === "5" && (t = `${t.slice(0, Math.max(0, g - 1))}6`), Number.parseFloat(Number(t).toFixed(n));
94
+ }, Y = (e) => {
95
+ if (y(e))
96
+ return 0;
97
+ const n = e.toString(), t = n.indexOf(".");
98
+ let s = 0;
99
+ return t !== -1 && (s = n.length - t - 1), s;
100
+ }, H = (e, n = 1) => p(e) ? B(e + a.step * n) : u.currentValue, D = () => {
101
+ if (a.readonly || V.value || R.value)
102
+ return;
103
+ const e = Number(x.value) || 0, n = H(e);
104
+ I(n), c(F, u.currentValue), $();
105
+ }, T = () => {
106
+ if (a.readonly || V.value || G.value)
107
+ return;
108
+ const e = Number(x.value) || 0, n = H(e, -1);
109
+ I(n), c(F, u.currentValue), $();
110
+ }, j = (e, n) => {
111
+ const { max: t, min: s, step: i, precision: d, stepStrictly: g, valueOnClear: w } = a;
112
+ t < s && Fe("InputNumber", "min should not be greater than max.");
113
+ let o = Number(e);
114
+ if (y(e) || Number.isNaN(o))
115
+ return null;
116
+ if (e === "") {
117
+ if (w === null)
118
+ return null;
119
+ o = Ce(w) ? { min: s, max: t }[w] : w;
120
+ }
121
+ return g && (o = B(Math.round(o / i) * i, d), o !== e && n && c(N, o)), A(d) || (o = B(o, d)), (o > t || o < s) && (o = o > t ? t : s, n && c(N, o)), o;
122
+ }, I = (e, n = !0) => {
123
+ var t;
124
+ const s = u.currentValue, i = j(e);
125
+ if (!n) {
126
+ c(N, i);
127
+ return;
128
+ }
129
+ s === i && e || (u.userInput = null, c(N, i), s !== i && c(ee, i, s), a.validateEvent && ((t = v == null ? void 0 : v.validate) == null || t.call(v, "change").catch((d) => L(d))), u.currentValue = i);
130
+ }, te = (e) => {
131
+ u.userInput = e;
132
+ const n = e === "" ? null : Number(e);
133
+ c(F, n), I(n, !1);
134
+ }, re = (e) => {
135
+ const n = e !== "" ? Number(e) : "";
136
+ (p(n) && !Number.isNaN(n) || e === "") && I(n), $(), u.userInput = null;
137
+ }, ae = () => {
138
+ var e, n;
139
+ (n = (e = f.value) == null ? void 0 : e.focus) == null || n.call(e);
140
+ }, le = () => {
141
+ var e, n;
142
+ (n = (e = f.value) == null ? void 0 : e.blur) == null || n.call(e);
143
+ }, ue = (e) => {
144
+ c("focus", e);
145
+ }, se = (e) => {
146
+ var n, t;
147
+ u.userInput = null, u.currentValue === null && ((n = f.value) != null && n.input) && (f.value.input.value = ""), c("blur", e), a.validateEvent && ((t = v == null ? void 0 : v.validate) == null || t.call(v, "blur").catch((s) => L(s)));
148
+ }, $ = () => {
149
+ u.currentValue !== a.modelValue && (u.currentValue = a.modelValue);
150
+ }, ie = (e) => {
151
+ document.activeElement === e.target && e.preventDefault();
152
+ };
153
+ return de(() => a.modelValue, (e, n) => {
154
+ const t = j(e, !0);
155
+ u.userInput === null && t !== n && (u.currentValue = t);
156
+ }, { immediate: !0 }), me(() => {
157
+ var e;
158
+ const { min: n, max: t, modelValue: s } = a, i = (e = f.value) == null ? void 0 : e.input;
159
+ if (i.setAttribute("role", "spinbutton"), Number.isFinite(t) ? i.setAttribute("aria-valuemax", String(t)) : i.removeAttribute("aria-valuemax"), Number.isFinite(n) ? i.setAttribute("aria-valuemin", String(n)) : i.removeAttribute("aria-valuemin"), i.setAttribute("aria-valuenow", u.currentValue || u.currentValue === 0 ? String(u.currentValue) : ""), i.setAttribute("aria-disabled", String(V.value)), !p(s) && s != null) {
160
+ let d = Number(s);
161
+ Number.isNaN(d) && (d = null), c(N, d);
162
+ }
163
+ i.addEventListener("wheel", ie, { passive: !1 });
164
+ }), pe(() => {
165
+ var e, n;
166
+ const t = (e = f.value) == null ? void 0 : e.input;
167
+ t == null || t.setAttribute("aria-valuenow", `${(n = u.currentValue) != null ? n : ""}`);
168
+ }), C({
169
+ focus: ae,
170
+ blur: le
171
+ }), (e, n) => (b(), M("div", {
172
+ class: K([
173
+ r(m).b(),
174
+ r(m).m(r(W)),
175
+ r(m).is("disabled", r(V)),
176
+ r(m).is("without-controls", !e.controls),
177
+ r(m).is("controls-right", r(k))
178
+ ]),
179
+ onDragstart: z(() => {
180
+ }, ["prevent"])
181
+ }, [
182
+ e.controls ? q((b(), M("span", {
183
+ key: 0,
184
+ role: "button",
185
+ "aria-label": r(U)("el.inputNumber.decrease"),
186
+ class: K([r(m).e("decrease"), r(m).is("disabled", r(G))]),
187
+ onKeydown: E(T, ["enter"])
188
+ }, [
189
+ _(e.$slots, "decrease-icon", {}, () => [
190
+ O(r(Q), null, {
191
+ default: S(() => [
192
+ r(k) ? (b(), P(r(_e), { key: 0 })) : (b(), P(r(Se), { key: 1 }))
193
+ ]),
194
+ _: 1
195
+ })
196
+ ])
197
+ ], 42, ["aria-label", "onKeydown"])), [
198
+ [r(X), T]
199
+ ]) : J("v-if", !0),
200
+ e.controls ? q((b(), M("span", {
201
+ key: 1,
202
+ role: "button",
203
+ "aria-label": r(U)("el.inputNumber.increase"),
204
+ class: K([r(m).e("increase"), r(m).is("disabled", r(R))]),
205
+ onKeydown: E(D, ["enter"])
206
+ }, [
207
+ _(e.$slots, "increase-icon", {}, () => [
208
+ O(r(Q), null, {
209
+ default: S(() => [
210
+ r(k) ? (b(), P(r(Pe), { key: 0 })) : (b(), P(r(Ae), { key: 1 }))
211
+ ]),
212
+ _: 1
213
+ })
214
+ ])
215
+ ], 42, ["aria-label", "onKeydown"])), [
216
+ [r(X), D]
217
+ ]) : J("v-if", !0),
218
+ O(r(ye), {
219
+ id: e.id,
220
+ ref_key: "input",
221
+ ref: f,
222
+ type: "number",
223
+ step: e.step,
224
+ "model-value": r(x),
225
+ placeholder: e.placeholder,
226
+ readonly: e.readonly,
227
+ disabled: r(V),
228
+ size: r(W),
229
+ max: e.max,
230
+ min: e.min,
231
+ name: e.name,
232
+ "aria-label": e.ariaLabel,
233
+ "validate-event": !1,
234
+ onKeydown: [
235
+ E(z(D, ["prevent"]), ["up"]),
236
+ E(z(T, ["prevent"]), ["down"])
237
+ ],
238
+ onBlur: se,
239
+ onFocus: ue,
240
+ onInput: te,
241
+ onChange: re
242
+ }, fe({
243
+ _: 2
244
+ }, [
245
+ e.$slots.prefix ? {
246
+ name: "prefix",
247
+ fn: S(() => [
248
+ _(e.$slots, "prefix")
249
+ ])
250
+ } : void 0,
251
+ e.$slots.suffix ? {
252
+ name: "suffix",
253
+ fn: S(() => [
254
+ _(e.$slots, "suffix")
255
+ ])
256
+ } : void 0
257
+ ]), 1032, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "onKeydown"])
258
+ ], 42, ["onDragstart"]));
259
+ }
260
+ });
261
+ var $e = /* @__PURE__ */ ge(Te, [["__file", "input-number.vue"]]);
262
+ const Le = ke($e);
263
+ export {
264
+ Le as E
265
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),t=require("./base-C3K_VdPK.cjs"),O=o=>{if(!o)return{onClick:t.NOOP,onMousedown:t.NOOP,onMouseup:t.NOOP};let l=!1,s=!1;return{onClick:i=>{l&&s&&o(i),l=s=!1},onMousedown:i=>{l=i.target===i.currentTarget},onMouseup:i=>{s=i.target===i.currentTarget}}},V=t.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:t.definePropType([String,Array,Object])},zIndex:{type:t.definePropType([String,Number])}}),Y={click:o=>o instanceof MouseEvent},R="overlay";var U=e.defineComponent({name:"ElOverlay",props:V,emits:Y,setup(o,{slots:l,emit:s}){const v=t.useNamespace(R),a=r=>{s("click",r)},{onClick:c,onMousedown:i,onMouseup:C}=O(o.customMaskEvent?void 0:a);return()=>o.mask?e.createVNode("div",{class:[v.b(),o.overlayClass],style:{zIndex:o.zIndex},onClick:c,onMousedown:i,onMouseup:C},[e.renderSlot(l,"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(l,"default")])}});const H=U,z=Symbol("dialogInjectionKey"),F=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"}}),X={close:()=>!0},j=(o,l,s,v)=>{const a={offsetX:0,offsetY:0},c=(d,m)=>{if(o.value){const{offsetX:p,offsetY:h}=a,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+p,M=-u+h,I=P-w-E+p,L=B-u-(S<B?S:0)+h;v!=null&&v.value||(d=Math.min(Math.max(d,T),I),m=Math.min(Math.max(m,M),L)),a.offsetX=d,a.offsetY=m,o.value.style.transform=`translate(${t.addUnit(d)}, ${t.addUnit(m)})`}},i=d=>{const m=d.clientX,p=d.clientY,{offsetX:h,offsetY:b}=a,w=E=>{const S=h+E.clientX-m,P=b+E.clientY-p;c(S,P)},u=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",u)};document.addEventListener("mousemove",w),document.addEventListener("mouseup",u)},C=()=>{l.value&&o.value&&(l.value.addEventListener("mousedown",i),window.addEventListener("resize",g))},r=()=>{l.value&&o.value&&(l.value.removeEventListener("mousedown",i),window.removeEventListener("resize",g))},f=()=>{a.offsetX=0,a.offsetY=0,o.value&&(o.value.style.transform="")},g=()=>{const{offsetX:d,offsetY:m}=a;c(d,m)};return e.onMounted(()=>{e.watchEffect(()=>{s.value?C():r()})}),e.onBeforeUnmount(()=>{r()}),{resetPosition:f,updatePosition:g}},q=(...o)=>l=>{o.forEach(s=>{t.isFunction(s)?s(l):s.value=l})},W=e.defineComponent({name:"ElDialogContent"}),_=e.defineComponent({...W,props:F,emits:X,setup(o,{expose:l}){const s=o,{t:v}=t.useLocale(),{Close:a}=t.CloseComponents,{dialogRef:c,headerRef:i,bodyId:C,ns:r,style:f}=e.inject(z),{focusTrapRef:g}=e.inject(t.FOCUS_TRAP_INJECTION_KEY),d=e.computed(()=>[r.b(),r.is("fullscreen",s.fullscreen),r.is("draggable",s.draggable),r.is("align-center",s.alignCenter),{[r.m("center")]:s.center}]),m=q(g,c),p=e.computed(()=>s.draggable),h=e.computed(()=>s.overflow),{resetPosition:b,updatePosition:w}=j(c,i,p,h);return l({resetPosition:b,updatePosition:w}),(u,E)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(m),class:e.normalizeClass(e.unref(d)),style:e.normalizeStyle(e.unref(f)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:i,class:e.normalizeClass([e.unref(r).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(r).e("title"))},e.toDisplayString(u.title),11,["aria-level"])]),u.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(v)("el.dialog.close"),class:e.normalizeClass(e.unref(r).e("headerbtn")),type:"button",onClick:S=>u.$emit("close")},[e.createVNode(e.unref(t.ElIcon),{class:e.normalizeClass(e.unref(r).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.closeIcon||e.unref(a))))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(C),class:e.normalizeClass([e.unref(r).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(r).e("footer"),u.footerClass])},[e.renderSlot(u.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var x=t._export_sfc(_,[["__file","dialog-content.vue"]]);const K=t.buildProps({...F,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"}}),Z={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[t.UPDATE_MODEL_EVENT]:o=>t.isBoolean(o),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},G=(o,l={})=>{e.isRef(o)||t.throwError("[useLockscreen]","You need to pass a ref param to this function");const s=l.ns||t.useNamespace("popup"),v=e.computed(()=>s.bm("parent","hidden"));if(!t.isClient||t.hasClass(document.body,v.value))return;let a=0,c=!1,i="0";const C=()=>{setTimeout(()=>{typeof document>"u"||c&&document&&(document.body.style.width=i,t.removeClass(document.body,v.value))},200)};e.watch(o,r=>{if(!r){C();return}c=!t.hasClass(document.body,v.value),c&&(i=document.body.style.width,t.addClass(document.body,v.value)),a=t.getScrollBarWidth(s.namespace.value);const f=document.documentElement.clientHeight<document.body.scrollHeight,g=t.getStyle(document.body,"overflowY");a>0&&(f||g==="scroll")&&c&&(document.body.style.width=`calc(100% - ${a}px)`)}),e.onScopeDispose(()=>C())},J=(o,l)=>{var s;const a=e.getCurrentInstance().emit,{nextZIndex:c}=t.useZIndex();let i="";const C=t.useId(),r=t.useId(),f=e.ref(!1),g=e.ref(!1),d=e.ref(!1),m=e.ref((s=o.zIndex)!=null?s:c());let p,h;const b=t.useGlobalConfig("namespace",t.defaultNamespace),w=e.computed(()=>{const y={},k=`--${b.value}-dialog`;return o.fullscreen||(o.top&&(y[`${k}-margin-top`]=o.top),o.width&&(y[`${k}-width`]=t.addUnit(o.width))),y}),u=e.computed(()=>o.alignCenter?{display:"flex"}:{});function E(){a("opened")}function S(){a("closed"),a(t.UPDATE_MODEL_EVENT,!1),o.destroyOnClose&&(d.value=!1)}function P(){a("close")}function B(){h==null||h(),p==null||p(),o.openDelay&&o.openDelay>0?{stop:p}=t.useTimeoutFn(()=>L(),o.openDelay):L()}function T(){p==null||p(),h==null||h(),o.closeDelay&&o.closeDelay>0?{stop:h}=t.useTimeoutFn(()=>D(),o.closeDelay):D()}function M(){function y(k){k||(g.value=!0,f.value=!1)}o.beforeClose?o.beforeClose(y):T()}function I(){o.closeOnClickModal&&M()}function L(){t.isClient&&(f.value=!0)}function D(){f.value=!1}function n(){a("openAutoFocus")}function N(){a("closeAutoFocus")}function A(y){var k;((k=y.detail)==null?void 0:k.focusReason)==="pointer"&&y.preventDefault()}o.lockScroll&&G(f);function $(){o.closeOnPressEscape&&M()}return e.watch(()=>o.zIndex,()=>{var y;m.value=(y=o.zIndex)!=null?y:c()}),e.watch(()=>o.modelValue,y=>{var k;y?(g.value=!1,B(),d.value=!0,m.value=(k=o.zIndex)!=null?k:c(),e.nextTick(()=>{a("open"),l.value&&(l.value.parentElement.scrollTop=0,l.value.parentElement.scrollLeft=0,l.value.scrollTop=0)})):f.value&&T()}),e.watch(()=>o.fullscreen,y=>{l.value&&(y?(i=l.value.style.transform,l.value.style.transform=""):l.value.style.transform=i)}),e.onMounted(()=>{o.modelValue&&(f.value=!0,d.value=!0,B())}),{afterEnter:E,afterLeave:S,beforeLeave:P,handleClose:M,onModalClick:I,close:T,doClose:D,onOpenAutoFocus:n,onCloseAutoFocus:N,onCloseRequested:$,onFocusoutPrevented:A,titleId:C,bodyId:r,closed:g,style:w,overlayDialogStyle:u,rendered:d,visible:f,zIndex:m}},Q=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),ee=e.defineComponent({...Q,props:K,emits:Z,setup(o,{expose:l}){const s=o,v=e.useSlots();t.useDeprecated({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(()=>!!v.title));const a=t.useNamespace("dialog"),c=e.ref(),i=e.ref(),C=e.ref(),{visible:r,titleId:f,bodyId:g,style:d,overlayDialogStyle:m,rendered:p,zIndex:h,afterEnter:b,afterLeave:w,beforeLeave:u,handleClose:E,onModalClick:S,onOpenAutoFocus:P,onCloseAutoFocus:B,onCloseRequested:T,onFocusoutPrevented:M}=J(s,c);e.provide(z,{dialogRef:c,headerRef:i,bodyId:g,ns:a,rendered:p,style:d});const I=O(S),L=e.computed(()=>s.draggable&&!s.fullscreen);return l({visible:r,dialogContentRef:C,resetPosition:()=>{var n;(n=C.value)==null||n.resetPosition()},handleClose:E}),(n,N)=>(e.openBlock(),e.createBlock(e.unref(t.ElTeleport),{to:n.appendTo,disabled:n.appendTo!=="body"?!1:!n.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(H),{"custom-mask-event":"",mask:n.modal,"overlay-class":n.modalClass,"z-index":e.unref(h)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":n.title||void 0,"aria-labelledby":n.title?void 0:e.unref(f),"aria-describedby":e.unref(g),class:e.normalizeClass(`${e.unref(a).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(m)),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(r),"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(p)?(e.openBlock(),e.createBlock(x,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:C},n.$attrs,{center:n.center,"align-center":n.alignCenter,"close-icon":n.closeIcon,draggable:e.unref(L),overflow:n.overflow,fullscreen:n.fullscreen,"header-class":n.headerClass,"body-class":n.bodyClass,"footer-class":n.footerClass,"show-close":n.showClose,title:n.title,"aria-level":n.headerAriaLevel,onClose:e.unref(E)}),e.createSlots({header:e.withCtx(()=>[n.$slots.title?e.renderSlot(n.$slots,"title",{key:1}):e.renderSlot(n.$slots,"header",{key:0,close:e.unref(E),titleId:e.unref(f),titleClass:e.unref(a).e("title")})]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:2},[n.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(n.$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(r)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var oe=t._export_sfc(ee,[["__file","dialog.vue"]]);const te=t.withInstall(oe);exports.ElDialog=te;