@xtctwins/tctwins-bimx-engine 0.2.13 → 0.2.15
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/README.md +5 -5
- package/dist/{AnnotationTool-h6kLP4-J.mjs → AnnotationTool-C7K9wUXu.mjs} +32 -32
- package/dist/BIMX_Viewer_Lib.es.js +2 -2
- package/dist/BIMX_Viewer_Lib.umd.js +153 -151
- package/dist/{CommentTool-fEkFa5a4.mjs → CommentTool-Q03T0eRh.mjs} +44 -44
- package/dist/{HiddenTool-CHEX-LN8.mjs → HiddenTool-DPhsLeVn.mjs} +12 -12
- package/dist/{InspectorTool-Dp0nln8M.mjs → InspectorTool-xpaagssU.mjs} +25 -25
- package/dist/{MeasureTool-CIPDVGJ2.mjs → MeasureTool-CC7ByKQe.mjs} +36 -36
- package/dist/{NavigateTool-BTg74q73.mjs → NavigateTool-rX2EtTJm.mjs} +1 -1
- package/dist/{RoamTool-b-iVvgOg.mjs → RoamTool-CV51Zfk8.mjs} +19 -19
- package/dist/ScreenShotTool-CaJnfAGU.mjs +357 -0
- package/dist/{SectionTool-BmaWUeLw.mjs → SectionTool-DCBKDTuD.mjs} +55 -55
- package/dist/{SettingTool-WjB-y_2N.mjs → SettingTool-ZeE9Wi9d.mjs} +136 -136
- package/dist/{StructureTree-fQGdtbdW.mjs → StructureTree-C0ciwt0x.mjs} +241 -232
- package/dist/{alert-Byx6QRux.mjs → alert-BoGlpl1a.mjs} +3 -3
- package/dist/el-input-number-DC387stR.mjs +858 -0
- package/dist/{index-DUCjdjwm.mjs → index-Dbz1Z0EN.mjs} +47804 -45619
- package/dist/index.html +17 -17
- package/dist/{panel.vue_vue_type_style_index_0_lang-DN1hWNk5.mjs → panel.vue_vue_type_style_index_0_lang-0alZxKkz.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{tallPanel-CmihOwoA.mjs → tallPanel-kCOLfaS2.mjs} +16 -16
- package/package.json +66 -65
- package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +38 -10
- package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +37 -9
- package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +5 -7
- package/types/components/BCFComponents/BCFFilter.vue.d.ts +5 -7
- package/types/components/BCFComponents/BCFTool.vue.d.ts +4 -7
- package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +5 -7
- package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +5 -6
- package/types/components/BCFComponents/commentInput.vue.d.ts +38 -9
- package/types/components/BCFComponents/commentsView.vue.d.ts +38 -7
- package/types/components/BCFComponents/dialogPanel.vue.d.ts +5 -8
- package/types/components/BCFComponents/imageView.vue.d.ts +5 -7
- package/types/components/BCFComponents/imageZoomIn.vue.d.ts +5 -6
- package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/CommentTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/HiddenTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/RoamTool.vue.d.ts +1 -1
- package/types/components/BimViewerComponents/SettingTool.vue.d.ts +4 -6
- package/types/components/BimViewerComponents/StructureTree.vue.d.ts +3042 -1
- package/types/components/BimViewerComponents/Toolbar.vue.d.ts +1 -1
- package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +56 -0
- package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +55 -0
- package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +278 -0
- package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +255 -0
- package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +17 -0
- package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +54 -0
- package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +17 -0
- package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +12 -0
- package/types/components/bimxViewer.vue.d.ts +7 -12
- package/types/components/utilsComponents/alert.vue.d.ts +1 -1
- package/types/components/utilsComponents/closeButton.vue.d.ts +1 -1
- package/types/components/utilsComponents/closeButton_dark.vue.d.ts +32 -0
- package/types/components/utilsComponents/emptyPage.vue.d.ts +1 -1
- package/types/components/utilsComponents/loading.vue.d.ts +1 -1
- package/types/components/utilsComponents/panel.vue.d.ts +8 -2
- package/types/components/utilsComponents/rectangleButton.vue.d.ts +3 -1
- package/types/components/utilsComponents/tallPanel.vue.d.ts +13 -3
- package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +13 -3
- package/types/pages/viewerEntry.vue.d.ts +4 -51
- package/types/services/request/api.d.ts +3 -0
- package/types/services/request/index.d.ts +14 -0
- package/types/services/request/types.d.ts +12 -0
- package/types/store/bcfReflect.d.ts +2 -0
- package/types/tests/bcf.d.ts +8 -0
- package/dist/ScreenShotTool-Cei3hiGn.mjs +0 -357
- package/dist/el-input-number-6wp_0Clc.mjs +0 -818
- package/types/components/BCFComponents/BCFCommentNew.vue.d.ts +0 -22
- package/types/components/BimViewerComponents/emptyPage.vue.d.ts +0 -8
|
@@ -0,0 +1,858 @@
|
|
|
1
|
+
import { defineComponent as ne, ref as ee, reactive as Pe, computed as y, watch as de, onMounted as Ke, onUpdated as Ge, openBlock as B, createElementBlock as R, normalizeClass as Y, unref as n, withModifiers as Ve, withDirectives as Te, withKeys as ve, renderSlot as be, createVNode as ce, withCtx as le, createBlock as Z, createCommentVNode as ae, createSlots as Je, inject as qe, nextTick as ye, toRefs as Be, normalizeStyle as te, createElementVNode as re, toDisplayString as Qe, h as Ze, shallowRef as De, provide as en, Fragment as ge, renderList as ke } from "vue";
|
|
2
|
+
import { J as pe, M as xe, K as z, R as Ae, L as Se, a0 as D, a5 as me, U, o as Re, u as Ne, W as Ye, b as he, k as ue, N as Xe, P as nn, j as Fe, a6 as ze, x as tn, _ as Me, a3 as Ue, d as Ie, a7 as ln, w as We, $ as ie, a8 as Oe, a as fe, l as we, a9 as _e, m as G, aa as an, X as rn } from "./index-Dbz1Z0EN.mjs";
|
|
3
|
+
import { ArrowDown as un, Minus as on, ArrowUp as sn, Plus as dn } from "@element-plus/icons-vue";
|
|
4
|
+
const cn = pe({
|
|
5
|
+
id: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: void 0
|
|
8
|
+
},
|
|
9
|
+
step: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 1
|
|
12
|
+
},
|
|
13
|
+
stepStrictly: Boolean,
|
|
14
|
+
max: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: Number.POSITIVE_INFINITY
|
|
17
|
+
},
|
|
18
|
+
min: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: Number.NEGATIVE_INFINITY
|
|
21
|
+
},
|
|
22
|
+
modelValue: Number,
|
|
23
|
+
readonly: Boolean,
|
|
24
|
+
disabled: Boolean,
|
|
25
|
+
size: xe,
|
|
26
|
+
controls: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
},
|
|
30
|
+
controlsPosition: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "",
|
|
33
|
+
values: ["", "right"]
|
|
34
|
+
},
|
|
35
|
+
valueOnClear: {
|
|
36
|
+
type: [String, Number, null],
|
|
37
|
+
validator: (e) => e === null || z(e) || ["min", "max"].includes(e),
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
name: String,
|
|
41
|
+
placeholder: String,
|
|
42
|
+
precision: {
|
|
43
|
+
type: Number,
|
|
44
|
+
validator: (e) => e >= 0 && e === Number.parseInt(`${e}`, 10)
|
|
45
|
+
},
|
|
46
|
+
validateEvent: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !0
|
|
49
|
+
},
|
|
50
|
+
...Ae(["ariaLabel"])
|
|
51
|
+
}), mn = {
|
|
52
|
+
[Se]: (e, t) => t !== e,
|
|
53
|
+
blur: (e) => e instanceof FocusEvent,
|
|
54
|
+
focus: (e) => e instanceof FocusEvent,
|
|
55
|
+
[D]: (e) => z(e) || me(e),
|
|
56
|
+
[U]: (e) => z(e) || me(e)
|
|
57
|
+
}, fn = ne({
|
|
58
|
+
name: "ElInputNumber"
|
|
59
|
+
}), vn = /* @__PURE__ */ ne({
|
|
60
|
+
...fn,
|
|
61
|
+
props: cn,
|
|
62
|
+
emits: mn,
|
|
63
|
+
setup(e, { expose: t, emit: u }) {
|
|
64
|
+
const a = e, { t: v } = Re(), c = Ne("input-number"), s = ee(), o = Pe({
|
|
65
|
+
currentValue: a.modelValue,
|
|
66
|
+
userInput: null
|
|
67
|
+
}), { formItem: p } = Ye(), b = y(() => z(a.modelValue) && a.modelValue <= a.min), S = y(() => z(a.modelValue) && a.modelValue >= a.max), i = y(() => {
|
|
68
|
+
const l = $(a.step);
|
|
69
|
+
return he(a.precision) ? Math.max($(a.modelValue), l) : (l > a.precision && ue("InputNumber", "precision should not be less than the decimal places of step"), a.precision);
|
|
70
|
+
}), E = y(() => a.controls && a.controlsPosition === "right"), _ = Xe(), C = nn(), K = y(() => {
|
|
71
|
+
if (o.userInput !== null)
|
|
72
|
+
return o.userInput;
|
|
73
|
+
let l = o.currentValue;
|
|
74
|
+
if (me(l))
|
|
75
|
+
return "";
|
|
76
|
+
if (z(l)) {
|
|
77
|
+
if (Number.isNaN(l))
|
|
78
|
+
return "";
|
|
79
|
+
he(a.precision) || (l = l.toFixed(a.precision));
|
|
80
|
+
}
|
|
81
|
+
return l;
|
|
82
|
+
}), T = (l, r) => {
|
|
83
|
+
if (he(r) && (r = i.value), r === 0)
|
|
84
|
+
return Math.round(l);
|
|
85
|
+
let d = String(l);
|
|
86
|
+
const w = d.indexOf(".");
|
|
87
|
+
if (w === -1 || !d.replace(".", "").split("")[w + r])
|
|
88
|
+
return l;
|
|
89
|
+
const x = d.length;
|
|
90
|
+
return d.charAt(x - 1) === "5" && (d = `${d.slice(0, Math.max(0, x - 1))}6`), Number.parseFloat(Number(d).toFixed(r));
|
|
91
|
+
}, $ = (l) => {
|
|
92
|
+
if (me(l))
|
|
93
|
+
return 0;
|
|
94
|
+
const r = l.toString(), d = r.indexOf(".");
|
|
95
|
+
let w = 0;
|
|
96
|
+
return d !== -1 && (w = r.length - d - 1), w;
|
|
97
|
+
}, I = (l, r = 1) => z(l) ? T(l + a.step * r) : o.currentValue, L = () => {
|
|
98
|
+
if (a.readonly || C.value || S.value)
|
|
99
|
+
return;
|
|
100
|
+
const l = Number(K.value) || 0, r = I(l);
|
|
101
|
+
A(r), u(D, o.currentValue), k();
|
|
102
|
+
}, P = () => {
|
|
103
|
+
if (a.readonly || C.value || b.value)
|
|
104
|
+
return;
|
|
105
|
+
const l = Number(K.value) || 0, r = I(l, -1);
|
|
106
|
+
A(r), u(D, o.currentValue), k();
|
|
107
|
+
}, W = (l, r) => {
|
|
108
|
+
const { max: d, min: w, step: V, precision: N, stepStrictly: x, valueOnClear: f } = a;
|
|
109
|
+
d < w && Ue("InputNumber", "min should not be greater than max.");
|
|
110
|
+
let m = Number(l);
|
|
111
|
+
if (me(l) || Number.isNaN(m))
|
|
112
|
+
return null;
|
|
113
|
+
if (l === "") {
|
|
114
|
+
if (f === null)
|
|
115
|
+
return null;
|
|
116
|
+
m = Ie(f) ? { min: w, max: d }[f] : f;
|
|
117
|
+
}
|
|
118
|
+
return x && (m = T(Math.round(m / V) * V, N), m !== l && r && u(U, m)), he(N) || (m = T(m, N)), (m > d || m < w) && (m = m > d ? d : w, r && u(U, m)), m;
|
|
119
|
+
}, A = (l, r = !0) => {
|
|
120
|
+
var d;
|
|
121
|
+
const w = o.currentValue, V = W(l);
|
|
122
|
+
if (!r) {
|
|
123
|
+
u(U, V);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
w === V && l || (o.userInput = null, u(U, V), w !== V && u(Se, V, w), a.validateEvent && ((d = p == null ? void 0 : p.validate) == null || d.call(p, "change").catch((N) => ue(N))), o.currentValue = V);
|
|
127
|
+
}, j = (l) => {
|
|
128
|
+
o.userInput = l;
|
|
129
|
+
const r = l === "" ? null : Number(l);
|
|
130
|
+
u(D, r), A(r, !1);
|
|
131
|
+
}, J = (l) => {
|
|
132
|
+
const r = l !== "" ? Number(l) : "";
|
|
133
|
+
(z(r) && !Number.isNaN(r) || l === "") && A(r), k(), o.userInput = null;
|
|
134
|
+
}, X = () => {
|
|
135
|
+
var l, r;
|
|
136
|
+
(r = (l = s.value) == null ? void 0 : l.focus) == null || r.call(l);
|
|
137
|
+
}, q = () => {
|
|
138
|
+
var l, r;
|
|
139
|
+
(r = (l = s.value) == null ? void 0 : l.blur) == null || r.call(l);
|
|
140
|
+
}, O = (l) => {
|
|
141
|
+
u("focus", l);
|
|
142
|
+
}, g = (l) => {
|
|
143
|
+
var r, d;
|
|
144
|
+
o.userInput = null, ln() && o.currentValue === null && ((r = s.value) != null && r.input) && (s.value.input.value = ""), u("blur", l), a.validateEvent && ((d = p == null ? void 0 : p.validate) == null || d.call(p, "blur").catch((w) => ue(w)));
|
|
145
|
+
}, k = () => {
|
|
146
|
+
o.currentValue !== a.modelValue && (o.currentValue = a.modelValue);
|
|
147
|
+
}, M = (l) => {
|
|
148
|
+
document.activeElement === l.target && l.preventDefault();
|
|
149
|
+
};
|
|
150
|
+
return de(() => a.modelValue, (l, r) => {
|
|
151
|
+
const d = W(l, !0);
|
|
152
|
+
o.userInput === null && d !== r && (o.currentValue = d);
|
|
153
|
+
}, { immediate: !0 }), Ke(() => {
|
|
154
|
+
var l;
|
|
155
|
+
const { min: r, max: d, modelValue: w } = a, V = (l = s.value) == null ? void 0 : l.input;
|
|
156
|
+
if (V.setAttribute("role", "spinbutton"), Number.isFinite(d) ? V.setAttribute("aria-valuemax", String(d)) : V.removeAttribute("aria-valuemax"), Number.isFinite(r) ? V.setAttribute("aria-valuemin", String(r)) : V.removeAttribute("aria-valuemin"), V.setAttribute("aria-valuenow", o.currentValue || o.currentValue === 0 ? String(o.currentValue) : ""), V.setAttribute("aria-disabled", String(C.value)), !z(w) && w != null) {
|
|
157
|
+
let N = Number(w);
|
|
158
|
+
Number.isNaN(N) && (N = null), u(U, N);
|
|
159
|
+
}
|
|
160
|
+
V.addEventListener("wheel", M, { passive: !1 });
|
|
161
|
+
}), Ge(() => {
|
|
162
|
+
var l, r;
|
|
163
|
+
const d = (l = s.value) == null ? void 0 : l.input;
|
|
164
|
+
d == null || d.setAttribute("aria-valuenow", `${(r = o.currentValue) != null ? r : ""}`);
|
|
165
|
+
}), t({
|
|
166
|
+
focus: X,
|
|
167
|
+
blur: q
|
|
168
|
+
}), (l, r) => (B(), R("div", {
|
|
169
|
+
class: Y([
|
|
170
|
+
n(c).b(),
|
|
171
|
+
n(c).m(n(_)),
|
|
172
|
+
n(c).is("disabled", n(C)),
|
|
173
|
+
n(c).is("without-controls", !l.controls),
|
|
174
|
+
n(c).is("controls-right", n(E))
|
|
175
|
+
]),
|
|
176
|
+
onDragstart: Ve(() => {
|
|
177
|
+
}, ["prevent"])
|
|
178
|
+
}, [
|
|
179
|
+
l.controls ? Te((B(), R("span", {
|
|
180
|
+
key: 0,
|
|
181
|
+
role: "button",
|
|
182
|
+
"aria-label": n(v)("el.inputNumber.decrease"),
|
|
183
|
+
class: Y([n(c).e("decrease"), n(c).is("disabled", n(b))]),
|
|
184
|
+
onKeydown: ve(P, ["enter"])
|
|
185
|
+
}, [
|
|
186
|
+
be(l.$slots, "decrease-icon", {}, () => [
|
|
187
|
+
ce(n(Fe), null, {
|
|
188
|
+
default: le(() => [
|
|
189
|
+
n(E) ? (B(), Z(n(un), { key: 0 })) : (B(), Z(n(on), { key: 1 }))
|
|
190
|
+
]),
|
|
191
|
+
_: 1
|
|
192
|
+
})
|
|
193
|
+
])
|
|
194
|
+
], 42, ["aria-label", "onKeydown"])), [
|
|
195
|
+
[n(ze), P]
|
|
196
|
+
]) : ae("v-if", !0),
|
|
197
|
+
l.controls ? Te((B(), R("span", {
|
|
198
|
+
key: 1,
|
|
199
|
+
role: "button",
|
|
200
|
+
"aria-label": n(v)("el.inputNumber.increase"),
|
|
201
|
+
class: Y([n(c).e("increase"), n(c).is("disabled", n(S))]),
|
|
202
|
+
onKeydown: ve(L, ["enter"])
|
|
203
|
+
}, [
|
|
204
|
+
be(l.$slots, "increase-icon", {}, () => [
|
|
205
|
+
ce(n(Fe), null, {
|
|
206
|
+
default: le(() => [
|
|
207
|
+
n(E) ? (B(), Z(n(sn), { key: 0 })) : (B(), Z(n(dn), { key: 1 }))
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
})
|
|
211
|
+
])
|
|
212
|
+
], 42, ["aria-label", "onKeydown"])), [
|
|
213
|
+
[n(ze), L]
|
|
214
|
+
]) : ae("v-if", !0),
|
|
215
|
+
ce(n(tn), {
|
|
216
|
+
id: l.id,
|
|
217
|
+
ref_key: "input",
|
|
218
|
+
ref: s,
|
|
219
|
+
type: "number",
|
|
220
|
+
step: l.step,
|
|
221
|
+
"model-value": n(K),
|
|
222
|
+
placeholder: l.placeholder,
|
|
223
|
+
readonly: l.readonly,
|
|
224
|
+
disabled: n(C),
|
|
225
|
+
size: n(_),
|
|
226
|
+
max: l.max,
|
|
227
|
+
min: l.min,
|
|
228
|
+
name: l.name,
|
|
229
|
+
"aria-label": l.ariaLabel,
|
|
230
|
+
"validate-event": !1,
|
|
231
|
+
onKeydown: [
|
|
232
|
+
ve(Ve(L, ["prevent"]), ["up"]),
|
|
233
|
+
ve(Ve(P, ["prevent"]), ["down"])
|
|
234
|
+
],
|
|
235
|
+
onBlur: g,
|
|
236
|
+
onFocus: O,
|
|
237
|
+
onInput: j,
|
|
238
|
+
onChange: J
|
|
239
|
+
}, Je({
|
|
240
|
+
_: 2
|
|
241
|
+
}, [
|
|
242
|
+
l.$slots.prefix ? {
|
|
243
|
+
name: "prefix",
|
|
244
|
+
fn: le(() => [
|
|
245
|
+
be(l.$slots, "prefix")
|
|
246
|
+
])
|
|
247
|
+
} : void 0,
|
|
248
|
+
l.$slots.suffix ? {
|
|
249
|
+
name: "suffix",
|
|
250
|
+
fn: le(() => [
|
|
251
|
+
be(l.$slots, "suffix")
|
|
252
|
+
])
|
|
253
|
+
} : void 0
|
|
254
|
+
]), 1032, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "aria-label", "onKeydown"])
|
|
255
|
+
], 42, ["onDragstart"]));
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
var bn = /* @__PURE__ */ Me(vn, [["__file", "input-number.vue"]]);
|
|
259
|
+
const gn = We(bn), je = Symbol("sliderContextKey"), hn = pe({
|
|
260
|
+
modelValue: {
|
|
261
|
+
type: ie([Number, Array]),
|
|
262
|
+
default: 0
|
|
263
|
+
},
|
|
264
|
+
id: {
|
|
265
|
+
type: String,
|
|
266
|
+
default: void 0
|
|
267
|
+
},
|
|
268
|
+
min: {
|
|
269
|
+
type: Number,
|
|
270
|
+
default: 0
|
|
271
|
+
},
|
|
272
|
+
max: {
|
|
273
|
+
type: Number,
|
|
274
|
+
default: 100
|
|
275
|
+
},
|
|
276
|
+
step: {
|
|
277
|
+
type: Number,
|
|
278
|
+
default: 1
|
|
279
|
+
},
|
|
280
|
+
showInput: Boolean,
|
|
281
|
+
showInputControls: {
|
|
282
|
+
type: Boolean,
|
|
283
|
+
default: !0
|
|
284
|
+
},
|
|
285
|
+
size: xe,
|
|
286
|
+
inputSize: xe,
|
|
287
|
+
showStops: Boolean,
|
|
288
|
+
showTooltip: {
|
|
289
|
+
type: Boolean,
|
|
290
|
+
default: !0
|
|
291
|
+
},
|
|
292
|
+
formatTooltip: {
|
|
293
|
+
type: ie(Function),
|
|
294
|
+
default: void 0
|
|
295
|
+
},
|
|
296
|
+
disabled: Boolean,
|
|
297
|
+
range: Boolean,
|
|
298
|
+
vertical: Boolean,
|
|
299
|
+
height: String,
|
|
300
|
+
debounce: {
|
|
301
|
+
type: Number,
|
|
302
|
+
default: 300
|
|
303
|
+
},
|
|
304
|
+
rangeStartLabel: {
|
|
305
|
+
type: String,
|
|
306
|
+
default: void 0
|
|
307
|
+
},
|
|
308
|
+
rangeEndLabel: {
|
|
309
|
+
type: String,
|
|
310
|
+
default: void 0
|
|
311
|
+
},
|
|
312
|
+
formatValueText: {
|
|
313
|
+
type: ie(Function),
|
|
314
|
+
default: void 0
|
|
315
|
+
},
|
|
316
|
+
tooltipClass: {
|
|
317
|
+
type: String,
|
|
318
|
+
default: void 0
|
|
319
|
+
},
|
|
320
|
+
placement: {
|
|
321
|
+
type: String,
|
|
322
|
+
values: Oe,
|
|
323
|
+
default: "top"
|
|
324
|
+
},
|
|
325
|
+
marks: {
|
|
326
|
+
type: ie(Object)
|
|
327
|
+
},
|
|
328
|
+
validateEvent: {
|
|
329
|
+
type: Boolean,
|
|
330
|
+
default: !0
|
|
331
|
+
},
|
|
332
|
+
...Ae(["ariaLabel"])
|
|
333
|
+
}), Ee = (e) => z(e) || fe(e) && e.every(z), Vn = {
|
|
334
|
+
[U]: Ee,
|
|
335
|
+
[D]: Ee,
|
|
336
|
+
[Se]: Ee
|
|
337
|
+
}, yn = pe({
|
|
338
|
+
modelValue: {
|
|
339
|
+
type: Number,
|
|
340
|
+
default: 0
|
|
341
|
+
},
|
|
342
|
+
vertical: Boolean,
|
|
343
|
+
tooltipClass: String,
|
|
344
|
+
placement: {
|
|
345
|
+
type: String,
|
|
346
|
+
values: Oe,
|
|
347
|
+
default: "top"
|
|
348
|
+
}
|
|
349
|
+
}), wn = {
|
|
350
|
+
[U]: (e) => z(e)
|
|
351
|
+
}, pn = (e, t, u) => {
|
|
352
|
+
const a = ee(), v = ee(!1), c = y(() => t.value instanceof Function), s = y(() => c.value && t.value(e.modelValue) || e.modelValue), o = _e(() => {
|
|
353
|
+
u.value && (v.value = !0);
|
|
354
|
+
}, 50), p = _e(() => {
|
|
355
|
+
u.value && (v.value = !1);
|
|
356
|
+
}, 50);
|
|
357
|
+
return {
|
|
358
|
+
tooltip: a,
|
|
359
|
+
tooltipVisible: v,
|
|
360
|
+
formatValue: s,
|
|
361
|
+
displayTooltip: o,
|
|
362
|
+
hideTooltip: p
|
|
363
|
+
};
|
|
364
|
+
}, Sn = (e, t, u) => {
|
|
365
|
+
const {
|
|
366
|
+
disabled: a,
|
|
367
|
+
min: v,
|
|
368
|
+
max: c,
|
|
369
|
+
step: s,
|
|
370
|
+
showTooltip: o,
|
|
371
|
+
precision: p,
|
|
372
|
+
sliderSize: b,
|
|
373
|
+
formatTooltip: S,
|
|
374
|
+
emitChange: i,
|
|
375
|
+
resetSize: E,
|
|
376
|
+
updateDragging: _
|
|
377
|
+
} = qe(je), { tooltip: C, tooltipVisible: K, formatValue: T, displayTooltip: $, hideTooltip: I } = pn(e, S, o), L = ee(), P = y(() => `${(e.modelValue - v.value) / (c.value - v.value) * 100}%`), W = y(() => e.vertical ? { bottom: P.value } : { left: P.value }), A = () => {
|
|
378
|
+
t.hovering = !0, $();
|
|
379
|
+
}, j = () => {
|
|
380
|
+
t.hovering = !1, t.dragging || I();
|
|
381
|
+
}, J = (f) => {
|
|
382
|
+
a.value || (f.preventDefault(), w(f), window.addEventListener("mousemove", V), window.addEventListener("touchmove", V), window.addEventListener("mouseup", N), window.addEventListener("touchend", N), window.addEventListener("contextmenu", N), L.value.focus());
|
|
383
|
+
}, X = (f) => {
|
|
384
|
+
a.value || (t.newPosition = Number.parseFloat(P.value) + f / (c.value - v.value) * 100, x(t.newPosition), i());
|
|
385
|
+
}, q = () => {
|
|
386
|
+
X(-s.value);
|
|
387
|
+
}, O = () => {
|
|
388
|
+
X(s.value);
|
|
389
|
+
}, g = () => {
|
|
390
|
+
X(-s.value * 4);
|
|
391
|
+
}, k = () => {
|
|
392
|
+
X(s.value * 4);
|
|
393
|
+
}, M = () => {
|
|
394
|
+
a.value || (x(0), i());
|
|
395
|
+
}, l = () => {
|
|
396
|
+
a.value || (x(100), i());
|
|
397
|
+
}, r = (f) => {
|
|
398
|
+
let m = !0;
|
|
399
|
+
switch (f.code) {
|
|
400
|
+
case G.left:
|
|
401
|
+
case G.down:
|
|
402
|
+
q();
|
|
403
|
+
break;
|
|
404
|
+
case G.right:
|
|
405
|
+
case G.up:
|
|
406
|
+
O();
|
|
407
|
+
break;
|
|
408
|
+
case G.home:
|
|
409
|
+
M();
|
|
410
|
+
break;
|
|
411
|
+
case G.end:
|
|
412
|
+
l();
|
|
413
|
+
break;
|
|
414
|
+
case G.pageDown:
|
|
415
|
+
g();
|
|
416
|
+
break;
|
|
417
|
+
case G.pageUp:
|
|
418
|
+
k();
|
|
419
|
+
break;
|
|
420
|
+
default:
|
|
421
|
+
m = !1;
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
m && f.preventDefault();
|
|
425
|
+
}, d = (f) => {
|
|
426
|
+
let m, F;
|
|
427
|
+
return f.type.startsWith("touch") ? (F = f.touches[0].clientY, m = f.touches[0].clientX) : (F = f.clientY, m = f.clientX), {
|
|
428
|
+
clientX: m,
|
|
429
|
+
clientY: F
|
|
430
|
+
};
|
|
431
|
+
}, w = (f) => {
|
|
432
|
+
t.dragging = !0, t.isClick = !0;
|
|
433
|
+
const { clientX: m, clientY: F } = d(f);
|
|
434
|
+
e.vertical ? t.startY = F : t.startX = m, t.startPosition = Number.parseFloat(P.value), t.newPosition = t.startPosition;
|
|
435
|
+
}, V = (f) => {
|
|
436
|
+
if (t.dragging) {
|
|
437
|
+
t.isClick = !1, $(), E();
|
|
438
|
+
let m;
|
|
439
|
+
const { clientX: F, clientY: H } = d(f);
|
|
440
|
+
e.vertical ? (t.currentY = H, m = (t.startY - t.currentY) / b.value * 100) : (t.currentX = F, m = (t.currentX - t.startX) / b.value * 100), t.newPosition = t.startPosition + m, x(t.newPosition);
|
|
441
|
+
}
|
|
442
|
+
}, N = () => {
|
|
443
|
+
t.dragging && (setTimeout(() => {
|
|
444
|
+
t.dragging = !1, t.hovering || I(), t.isClick || x(t.newPosition), i();
|
|
445
|
+
}, 0), window.removeEventListener("mousemove", V), window.removeEventListener("touchmove", V), window.removeEventListener("mouseup", N), window.removeEventListener("touchend", N), window.removeEventListener("contextmenu", N));
|
|
446
|
+
}, x = async (f) => {
|
|
447
|
+
if (f === null || Number.isNaN(+f))
|
|
448
|
+
return;
|
|
449
|
+
f < 0 ? f = 0 : f > 100 && (f = 100);
|
|
450
|
+
const m = 100 / ((c.value - v.value) / s.value);
|
|
451
|
+
let H = Math.round(f / m) * m * (c.value - v.value) * 0.01 + v.value;
|
|
452
|
+
H = Number.parseFloat(H.toFixed(p.value)), H !== e.modelValue && u(U, H), !t.dragging && e.modelValue !== t.oldValue && (t.oldValue = e.modelValue), await ye(), t.dragging && $(), C.value.updatePopper();
|
|
453
|
+
};
|
|
454
|
+
return de(() => t.dragging, (f) => {
|
|
455
|
+
_(f);
|
|
456
|
+
}), we(L, "touchstart", J, { passive: !1 }), {
|
|
457
|
+
disabled: a,
|
|
458
|
+
button: L,
|
|
459
|
+
tooltip: C,
|
|
460
|
+
tooltipVisible: K,
|
|
461
|
+
showTooltip: o,
|
|
462
|
+
wrapperStyle: W,
|
|
463
|
+
formatValue: T,
|
|
464
|
+
handleMouseEnter: A,
|
|
465
|
+
handleMouseLeave: j,
|
|
466
|
+
onButtonDown: J,
|
|
467
|
+
onKeyDown: r,
|
|
468
|
+
setPosition: x
|
|
469
|
+
};
|
|
470
|
+
}, Nn = ne({
|
|
471
|
+
name: "ElSliderButton"
|
|
472
|
+
}), kn = /* @__PURE__ */ ne({
|
|
473
|
+
...Nn,
|
|
474
|
+
props: yn,
|
|
475
|
+
emits: wn,
|
|
476
|
+
setup(e, { expose: t, emit: u }) {
|
|
477
|
+
const a = e, v = Ne("slider"), c = Pe({
|
|
478
|
+
hovering: !1,
|
|
479
|
+
dragging: !1,
|
|
480
|
+
isClick: !1,
|
|
481
|
+
startX: 0,
|
|
482
|
+
currentX: 0,
|
|
483
|
+
startY: 0,
|
|
484
|
+
currentY: 0,
|
|
485
|
+
startPosition: 0,
|
|
486
|
+
newPosition: 0,
|
|
487
|
+
oldValue: a.modelValue
|
|
488
|
+
}), {
|
|
489
|
+
disabled: s,
|
|
490
|
+
button: o,
|
|
491
|
+
tooltip: p,
|
|
492
|
+
showTooltip: b,
|
|
493
|
+
tooltipVisible: S,
|
|
494
|
+
wrapperStyle: i,
|
|
495
|
+
formatValue: E,
|
|
496
|
+
handleMouseEnter: _,
|
|
497
|
+
handleMouseLeave: C,
|
|
498
|
+
onButtonDown: K,
|
|
499
|
+
onKeyDown: T,
|
|
500
|
+
setPosition: $
|
|
501
|
+
} = Sn(a, c, u), { hovering: I, dragging: L } = Be(c);
|
|
502
|
+
return t({
|
|
503
|
+
onButtonDown: K,
|
|
504
|
+
onKeyDown: T,
|
|
505
|
+
setPosition: $,
|
|
506
|
+
hovering: I,
|
|
507
|
+
dragging: L
|
|
508
|
+
}), (P, W) => (B(), R("div", {
|
|
509
|
+
ref_key: "button",
|
|
510
|
+
ref: o,
|
|
511
|
+
class: Y([n(v).e("button-wrapper"), { hover: n(I), dragging: n(L) }]),
|
|
512
|
+
style: te(n(i)),
|
|
513
|
+
tabindex: n(s) ? -1 : 0,
|
|
514
|
+
onMouseenter: n(_),
|
|
515
|
+
onMouseleave: n(C),
|
|
516
|
+
onMousedown: n(K),
|
|
517
|
+
onFocus: n(_),
|
|
518
|
+
onBlur: n(C),
|
|
519
|
+
onKeydown: n(T)
|
|
520
|
+
}, [
|
|
521
|
+
ce(n(an), {
|
|
522
|
+
ref_key: "tooltip",
|
|
523
|
+
ref: p,
|
|
524
|
+
visible: n(S),
|
|
525
|
+
placement: P.placement,
|
|
526
|
+
"fallback-placements": ["top", "bottom", "right", "left"],
|
|
527
|
+
"stop-popper-mouse-event": !1,
|
|
528
|
+
"popper-class": P.tooltipClass,
|
|
529
|
+
disabled: !n(b),
|
|
530
|
+
persistent: n(b)
|
|
531
|
+
}, {
|
|
532
|
+
content: le(() => [
|
|
533
|
+
re("span", null, Qe(n(E)), 1)
|
|
534
|
+
]),
|
|
535
|
+
default: le(() => [
|
|
536
|
+
re("div", {
|
|
537
|
+
class: Y([n(v).e("button"), { hover: n(I), dragging: n(L) }])
|
|
538
|
+
}, null, 2)
|
|
539
|
+
]),
|
|
540
|
+
_: 1
|
|
541
|
+
}, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
|
|
542
|
+
], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]));
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
var $e = /* @__PURE__ */ Me(kn, [["__file", "button.vue"]]);
|
|
546
|
+
const En = pe({
|
|
547
|
+
mark: {
|
|
548
|
+
type: ie([String, Object]),
|
|
549
|
+
default: void 0
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
var Bn = ne({
|
|
553
|
+
name: "ElSliderMarker",
|
|
554
|
+
props: En,
|
|
555
|
+
setup(e) {
|
|
556
|
+
const t = Ne("slider"), u = y(() => Ie(e.mark) ? e.mark : e.mark.label), a = y(() => Ie(e.mark) ? void 0 : e.mark.style);
|
|
557
|
+
return () => Ze("div", {
|
|
558
|
+
class: t.e("marks-text"),
|
|
559
|
+
style: a.value
|
|
560
|
+
}, u.value);
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
const xn = (e, t, u) => {
|
|
564
|
+
const { form: a, formItem: v } = Ye(), c = De(), s = ee(), o = ee(), p = {
|
|
565
|
+
firstButton: s,
|
|
566
|
+
secondButton: o
|
|
567
|
+
}, b = y(() => e.disabled || (a == null ? void 0 : a.disabled) || !1), S = y(() => Math.min(t.firstValue, t.secondValue)), i = y(() => Math.max(t.firstValue, t.secondValue)), E = y(() => e.range ? `${100 * (i.value - S.value) / (e.max - e.min)}%` : `${100 * (t.firstValue - e.min) / (e.max - e.min)}%`), _ = y(() => e.range ? `${100 * (S.value - e.min) / (e.max - e.min)}%` : "0%"), C = y(() => e.vertical ? { height: e.height } : {}), K = y(() => e.vertical ? {
|
|
568
|
+
height: E.value,
|
|
569
|
+
bottom: _.value
|
|
570
|
+
} : {
|
|
571
|
+
width: E.value,
|
|
572
|
+
left: _.value
|
|
573
|
+
}), T = () => {
|
|
574
|
+
c.value && (t.sliderSize = c.value[`client${e.vertical ? "Height" : "Width"}`]);
|
|
575
|
+
}, $ = (g) => {
|
|
576
|
+
const k = e.min + g * (e.max - e.min) / 100;
|
|
577
|
+
if (!e.range)
|
|
578
|
+
return s;
|
|
579
|
+
let M;
|
|
580
|
+
return Math.abs(S.value - k) < Math.abs(i.value - k) ? M = t.firstValue < t.secondValue ? "firstButton" : "secondButton" : M = t.firstValue > t.secondValue ? "firstButton" : "secondButton", p[M];
|
|
581
|
+
}, I = (g) => {
|
|
582
|
+
const k = $(g);
|
|
583
|
+
return k.value.setPosition(g), k;
|
|
584
|
+
}, L = (g) => {
|
|
585
|
+
t.firstValue = g ?? e.min, W(e.range ? [S.value, i.value] : g ?? e.min);
|
|
586
|
+
}, P = (g) => {
|
|
587
|
+
t.secondValue = g, e.range && W([S.value, i.value]);
|
|
588
|
+
}, W = (g) => {
|
|
589
|
+
u(U, g), u(D, g);
|
|
590
|
+
}, A = async () => {
|
|
591
|
+
await ye(), u(Se, e.range ? [S.value, i.value] : e.modelValue);
|
|
592
|
+
}, j = (g) => {
|
|
593
|
+
var k, M, l, r, d, w;
|
|
594
|
+
if (b.value || t.dragging)
|
|
595
|
+
return;
|
|
596
|
+
T();
|
|
597
|
+
let V = 0;
|
|
598
|
+
if (e.vertical) {
|
|
599
|
+
const N = (l = (M = (k = g.touches) == null ? void 0 : k.item(0)) == null ? void 0 : M.clientY) != null ? l : g.clientY;
|
|
600
|
+
V = (c.value.getBoundingClientRect().bottom - N) / t.sliderSize * 100;
|
|
601
|
+
} else {
|
|
602
|
+
const N = (w = (d = (r = g.touches) == null ? void 0 : r.item(0)) == null ? void 0 : d.clientX) != null ? w : g.clientX, x = c.value.getBoundingClientRect().left;
|
|
603
|
+
V = (N - x) / t.sliderSize * 100;
|
|
604
|
+
}
|
|
605
|
+
if (!(V < 0 || V > 100))
|
|
606
|
+
return I(V);
|
|
607
|
+
};
|
|
608
|
+
return {
|
|
609
|
+
elFormItem: v,
|
|
610
|
+
slider: c,
|
|
611
|
+
firstButton: s,
|
|
612
|
+
secondButton: o,
|
|
613
|
+
sliderDisabled: b,
|
|
614
|
+
minValue: S,
|
|
615
|
+
maxValue: i,
|
|
616
|
+
runwayStyle: C,
|
|
617
|
+
barStyle: K,
|
|
618
|
+
resetSize: T,
|
|
619
|
+
setPosition: I,
|
|
620
|
+
emitChange: A,
|
|
621
|
+
onSliderWrapperPrevent: (g) => {
|
|
622
|
+
var k, M;
|
|
623
|
+
((k = p.firstButton.value) != null && k.dragging || (M = p.secondButton.value) != null && M.dragging) && g.preventDefault();
|
|
624
|
+
},
|
|
625
|
+
onSliderClick: (g) => {
|
|
626
|
+
j(g) && A();
|
|
627
|
+
},
|
|
628
|
+
onSliderDown: async (g) => {
|
|
629
|
+
const k = j(g);
|
|
630
|
+
k && (await ye(), k.value.onButtonDown(g));
|
|
631
|
+
},
|
|
632
|
+
onSliderMarkerDown: (g) => {
|
|
633
|
+
b.value || t.dragging || I(g);
|
|
634
|
+
},
|
|
635
|
+
setFirstValue: L,
|
|
636
|
+
setSecondValue: P
|
|
637
|
+
};
|
|
638
|
+
}, In = (e, t, u, a) => ({
|
|
639
|
+
stops: y(() => {
|
|
640
|
+
if (!e.showStops || e.min > e.max)
|
|
641
|
+
return [];
|
|
642
|
+
if (e.step === 0)
|
|
643
|
+
return ue("ElSlider", "step should not be 0."), [];
|
|
644
|
+
const s = (e.max - e.min) / e.step, o = 100 * e.step / (e.max - e.min), p = Array.from({ length: s - 1 }).map((b, S) => (S + 1) * o);
|
|
645
|
+
return e.range ? p.filter((b) => b < 100 * (u.value - e.min) / (e.max - e.min) || b > 100 * (a.value - e.min) / (e.max - e.min)) : p.filter((b) => b > 100 * (t.firstValue - e.min) / (e.max - e.min));
|
|
646
|
+
}),
|
|
647
|
+
getStopStyle: (s) => e.vertical ? { bottom: `${s}%` } : { left: `${s}%` }
|
|
648
|
+
}), Pn = (e) => y(() => e.marks ? Object.keys(e.marks).map(Number.parseFloat).sort((u, a) => u - a).filter((u) => u <= e.max && u >= e.min).map((u) => ({
|
|
649
|
+
point: u,
|
|
650
|
+
position: (u - e.min) * 100 / (e.max - e.min),
|
|
651
|
+
mark: e.marks[u]
|
|
652
|
+
})) : []), Mn = (e, t, u, a, v, c) => {
|
|
653
|
+
const s = (b) => {
|
|
654
|
+
v(U, b), v(D, b);
|
|
655
|
+
}, o = () => e.range ? ![u.value, a.value].every((b, S) => b === t.oldValue[S]) : e.modelValue !== t.oldValue, p = () => {
|
|
656
|
+
var b, S;
|
|
657
|
+
e.min > e.max && Ue("Slider", "min should not be greater than max.");
|
|
658
|
+
const i = e.modelValue;
|
|
659
|
+
e.range && fe(i) ? i[1] < e.min ? s([e.min, e.min]) : i[0] > e.max ? s([e.max, e.max]) : i[0] < e.min ? s([e.min, i[1]]) : i[1] > e.max ? s([i[0], e.max]) : (t.firstValue = i[0], t.secondValue = i[1], o() && (e.validateEvent && ((b = c == null ? void 0 : c.validate) == null || b.call(c, "change").catch((E) => ue(E))), t.oldValue = i.slice())) : !e.range && z(i) && !Number.isNaN(i) && (i < e.min ? s(e.min) : i > e.max ? s(e.max) : (t.firstValue = i, o() && (e.validateEvent && ((S = c == null ? void 0 : c.validate) == null || S.call(c, "change").catch((E) => ue(E))), t.oldValue = i)));
|
|
660
|
+
};
|
|
661
|
+
p(), de(() => t.dragging, (b) => {
|
|
662
|
+
b || p();
|
|
663
|
+
}), de(() => e.modelValue, (b, S) => {
|
|
664
|
+
t.dragging || fe(b) && fe(S) && b.every((i, E) => i === S[E]) && t.firstValue === b[0] && t.secondValue === b[1] || p();
|
|
665
|
+
}, {
|
|
666
|
+
deep: !0
|
|
667
|
+
}), de(() => [e.min, e.max], () => {
|
|
668
|
+
p();
|
|
669
|
+
});
|
|
670
|
+
}, Cn = (e, t, u) => {
|
|
671
|
+
const a = ee();
|
|
672
|
+
return Ke(async () => {
|
|
673
|
+
e.range ? (fe(e.modelValue) ? (t.firstValue = Math.max(e.min, e.modelValue[0]), t.secondValue = Math.min(e.max, e.modelValue[1])) : (t.firstValue = e.min, t.secondValue = e.max), t.oldValue = [t.firstValue, t.secondValue]) : (!z(e.modelValue) || Number.isNaN(e.modelValue) ? t.firstValue = e.min : t.firstValue = Math.min(e.max, Math.max(e.min, e.modelValue)), t.oldValue = t.firstValue), we(window, "resize", u), await ye(), u();
|
|
674
|
+
}), {
|
|
675
|
+
sliderWrapper: a
|
|
676
|
+
};
|
|
677
|
+
}, Ln = ne({
|
|
678
|
+
name: "ElSlider"
|
|
679
|
+
}), Tn = /* @__PURE__ */ ne({
|
|
680
|
+
...Ln,
|
|
681
|
+
props: hn,
|
|
682
|
+
emits: Vn,
|
|
683
|
+
setup(e, { expose: t, emit: u }) {
|
|
684
|
+
const a = e, v = Ne("slider"), { t: c } = Re(), s = Pe({
|
|
685
|
+
firstValue: 0,
|
|
686
|
+
secondValue: 0,
|
|
687
|
+
oldValue: 0,
|
|
688
|
+
dragging: !1,
|
|
689
|
+
sliderSize: 1
|
|
690
|
+
}), {
|
|
691
|
+
elFormItem: o,
|
|
692
|
+
slider: p,
|
|
693
|
+
firstButton: b,
|
|
694
|
+
secondButton: S,
|
|
695
|
+
sliderDisabled: i,
|
|
696
|
+
minValue: E,
|
|
697
|
+
maxValue: _,
|
|
698
|
+
runwayStyle: C,
|
|
699
|
+
barStyle: K,
|
|
700
|
+
resetSize: T,
|
|
701
|
+
emitChange: $,
|
|
702
|
+
onSliderWrapperPrevent: I,
|
|
703
|
+
onSliderClick: L,
|
|
704
|
+
onSliderDown: P,
|
|
705
|
+
onSliderMarkerDown: W,
|
|
706
|
+
setFirstValue: A,
|
|
707
|
+
setSecondValue: j
|
|
708
|
+
} = xn(a, s, u), { stops: J, getStopStyle: X } = In(a, s, E, _), { inputId: q, isLabeledByFormItem: O } = rn(a, {
|
|
709
|
+
formItemContext: o
|
|
710
|
+
}), g = Xe(), k = y(() => a.inputSize || g.value), M = y(() => a.ariaLabel || c("el.slider.defaultLabel", {
|
|
711
|
+
min: a.min,
|
|
712
|
+
max: a.max
|
|
713
|
+
})), l = y(() => a.range ? a.rangeStartLabel || c("el.slider.defaultRangeStartLabel") : M.value), r = y(() => a.formatValueText ? a.formatValueText(m.value) : `${m.value}`), d = y(() => a.rangeEndLabel || c("el.slider.defaultRangeEndLabel")), w = y(() => a.formatValueText ? a.formatValueText(F.value) : `${F.value}`), V = y(() => [
|
|
714
|
+
v.b(),
|
|
715
|
+
v.m(g.value),
|
|
716
|
+
v.is("vertical", a.vertical),
|
|
717
|
+
{ [v.m("with-input")]: a.showInput }
|
|
718
|
+
]), N = Pn(a);
|
|
719
|
+
Mn(a, s, E, _, u, o);
|
|
720
|
+
const x = y(() => {
|
|
721
|
+
const h = [a.min, a.max, a.step].map((Ce) => {
|
|
722
|
+
const oe = `${Ce}`.split(".")[1];
|
|
723
|
+
return oe ? oe.length : 0;
|
|
724
|
+
});
|
|
725
|
+
return Math.max.apply(null, h);
|
|
726
|
+
}), { sliderWrapper: f } = Cn(a, s, T), { firstValue: m, secondValue: F, sliderSize: H } = Be(s), He = (h) => {
|
|
727
|
+
s.dragging = h;
|
|
728
|
+
};
|
|
729
|
+
return we(f, "touchstart", I, {
|
|
730
|
+
passive: !1
|
|
731
|
+
}), we(f, "touchmove", I, {
|
|
732
|
+
passive: !1
|
|
733
|
+
}), en(je, {
|
|
734
|
+
...Be(a),
|
|
735
|
+
sliderSize: H,
|
|
736
|
+
disabled: i,
|
|
737
|
+
precision: x,
|
|
738
|
+
emitChange: $,
|
|
739
|
+
resetSize: T,
|
|
740
|
+
updateDragging: He
|
|
741
|
+
}), t({
|
|
742
|
+
onSliderClick: L
|
|
743
|
+
}), (h, Ce) => {
|
|
744
|
+
var oe, Le;
|
|
745
|
+
return B(), R("div", {
|
|
746
|
+
id: h.range ? n(q) : void 0,
|
|
747
|
+
ref_key: "sliderWrapper",
|
|
748
|
+
ref: f,
|
|
749
|
+
class: Y(n(V)),
|
|
750
|
+
role: h.range ? "group" : void 0,
|
|
751
|
+
"aria-label": h.range && !n(O) ? n(M) : void 0,
|
|
752
|
+
"aria-labelledby": h.range && n(O) ? (oe = n(o)) == null ? void 0 : oe.labelId : void 0
|
|
753
|
+
}, [
|
|
754
|
+
re("div", {
|
|
755
|
+
ref_key: "slider",
|
|
756
|
+
ref: p,
|
|
757
|
+
class: Y([
|
|
758
|
+
n(v).e("runway"),
|
|
759
|
+
{ "show-input": h.showInput && !h.range },
|
|
760
|
+
n(v).is("disabled", n(i))
|
|
761
|
+
]),
|
|
762
|
+
style: te(n(C)),
|
|
763
|
+
onMousedown: n(P),
|
|
764
|
+
onTouchstartPassive: n(P)
|
|
765
|
+
}, [
|
|
766
|
+
re("div", {
|
|
767
|
+
class: Y(n(v).e("bar")),
|
|
768
|
+
style: te(n(K))
|
|
769
|
+
}, null, 6),
|
|
770
|
+
ce($e, {
|
|
771
|
+
id: h.range ? void 0 : n(q),
|
|
772
|
+
ref_key: "firstButton",
|
|
773
|
+
ref: b,
|
|
774
|
+
"model-value": n(m),
|
|
775
|
+
vertical: h.vertical,
|
|
776
|
+
"tooltip-class": h.tooltipClass,
|
|
777
|
+
placement: h.placement,
|
|
778
|
+
role: "slider",
|
|
779
|
+
"aria-label": h.range || !n(O) ? n(l) : void 0,
|
|
780
|
+
"aria-labelledby": !h.range && n(O) ? (Le = n(o)) == null ? void 0 : Le.labelId : void 0,
|
|
781
|
+
"aria-valuemin": h.min,
|
|
782
|
+
"aria-valuemax": h.range ? n(F) : h.max,
|
|
783
|
+
"aria-valuenow": n(m),
|
|
784
|
+
"aria-valuetext": n(r),
|
|
785
|
+
"aria-orientation": h.vertical ? "vertical" : "horizontal",
|
|
786
|
+
"aria-disabled": n(i),
|
|
787
|
+
"onUpdate:modelValue": n(A)
|
|
788
|
+
}, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
|
|
789
|
+
h.range ? (B(), Z($e, {
|
|
790
|
+
key: 0,
|
|
791
|
+
ref_key: "secondButton",
|
|
792
|
+
ref: S,
|
|
793
|
+
"model-value": n(F),
|
|
794
|
+
vertical: h.vertical,
|
|
795
|
+
"tooltip-class": h.tooltipClass,
|
|
796
|
+
placement: h.placement,
|
|
797
|
+
role: "slider",
|
|
798
|
+
"aria-label": n(d),
|
|
799
|
+
"aria-valuemin": n(m),
|
|
800
|
+
"aria-valuemax": h.max,
|
|
801
|
+
"aria-valuenow": n(F),
|
|
802
|
+
"aria-valuetext": n(w),
|
|
803
|
+
"aria-orientation": h.vertical ? "vertical" : "horizontal",
|
|
804
|
+
"aria-disabled": n(i),
|
|
805
|
+
"onUpdate:modelValue": n(j)
|
|
806
|
+
}, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : ae("v-if", !0),
|
|
807
|
+
h.showStops ? (B(), R("div", { key: 1 }, [
|
|
808
|
+
(B(!0), R(ge, null, ke(n(J), (Q, se) => (B(), R("div", {
|
|
809
|
+
key: se,
|
|
810
|
+
class: Y(n(v).e("stop")),
|
|
811
|
+
style: te(n(X)(Q))
|
|
812
|
+
}, null, 6))), 128))
|
|
813
|
+
])) : ae("v-if", !0),
|
|
814
|
+
n(N).length > 0 ? (B(), R(ge, { key: 2 }, [
|
|
815
|
+
re("div", null, [
|
|
816
|
+
(B(!0), R(ge, null, ke(n(N), (Q, se) => (B(), R("div", {
|
|
817
|
+
key: se,
|
|
818
|
+
style: te(n(X)(Q.position)),
|
|
819
|
+
class: Y([n(v).e("stop"), n(v).e("marks-stop")])
|
|
820
|
+
}, null, 6))), 128))
|
|
821
|
+
]),
|
|
822
|
+
re("div", {
|
|
823
|
+
class: Y(n(v).e("marks"))
|
|
824
|
+
}, [
|
|
825
|
+
(B(!0), R(ge, null, ke(n(N), (Q, se) => (B(), Z(n(Bn), {
|
|
826
|
+
key: se,
|
|
827
|
+
mark: Q.mark,
|
|
828
|
+
style: te(n(X)(Q.position)),
|
|
829
|
+
onMousedown: Ve((zn) => n(W)(Q.position), ["stop"])
|
|
830
|
+
}, null, 8, ["mark", "style", "onMousedown"]))), 128))
|
|
831
|
+
], 2)
|
|
832
|
+
], 64)) : ae("v-if", !0)
|
|
833
|
+
], 46, ["onMousedown", "onTouchstartPassive"]),
|
|
834
|
+
h.showInput && !h.range ? (B(), Z(n(gn), {
|
|
835
|
+
key: 0,
|
|
836
|
+
ref: "input",
|
|
837
|
+
"model-value": n(m),
|
|
838
|
+
class: Y(n(v).e("input")),
|
|
839
|
+
step: h.step,
|
|
840
|
+
disabled: n(i),
|
|
841
|
+
controls: h.showInputControls,
|
|
842
|
+
min: h.min,
|
|
843
|
+
max: h.max,
|
|
844
|
+
precision: n(x),
|
|
845
|
+
debounce: h.debounce,
|
|
846
|
+
size: n(k),
|
|
847
|
+
"onUpdate:modelValue": n(A),
|
|
848
|
+
onChange: n($)
|
|
849
|
+
}, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "precision", "debounce", "size", "onUpdate:modelValue", "onChange"])) : ae("v-if", !0)
|
|
850
|
+
], 10, ["id", "role", "aria-label", "aria-labelledby"]);
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
var Fn = /* @__PURE__ */ Me(Tn, [["__file", "slider.vue"]]);
|
|
855
|
+
const An = We(Fn);
|
|
856
|
+
export {
|
|
857
|
+
An as E
|
|
858
|
+
};
|