@vunk/form 2.19.1 → 2.19.2
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/components/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/components/api-tables-select/index.cjs +1 -1
- package/components/api-tables-select/index.mjs +1 -1
- package/components/button/index.cjs +1 -1
- package/components/button/index.mjs +1 -1
- package/components/card-input-collection/index.cjs +1 -1
- package/components/card-input-collection/index.mjs +2 -2
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.mjs +1 -1
- package/components/cloneDeep-DE0l40hv.mjs +486 -0
- package/components/cloneDeep-DaYwfXwD.js +1 -0
- package/components/date-picker-range/index.cjs +1 -1
- package/components/date-picker-range/index.mjs +1 -1
- package/components/debounce-CliSPkvP.js +1 -0
- package/components/debounce-DIph5ENi.mjs +85 -0
- package/components/dialog-input-collection/index.cjs +1 -1
- package/components/dialog-input-collection/index.mjs +2 -2
- package/components/download-plus/index.cjs +1 -1
- package/components/download-plus/index.mjs +3 -3
- package/components/editable-text/index.cjs +1 -1
- package/components/editable-text/index.mjs +1 -1
- package/components/el-slider/index.cjs +1 -1
- package/components/el-slider/index.mjs +1 -1
- package/components/el-slider/src/composables/index.cjs +1 -1
- package/components/el-slider/src/composables/index.mjs +1 -1
- package/components/esri-input-geojson/index.cjs +1 -1
- package/components/esri-input-geojson/index.mjs +2 -2
- package/components/fieldset/index.cjs +1 -1
- package/components/fieldset/index.mjs +1 -1
- package/components/form/index.cjs +1 -1
- package/components/form/index.mjs +1 -1
- package/components/form-item/index.cjs +1 -1
- package/components/form-item/index.mjs +1 -1
- package/components/index-BCZuzyeO.mjs +317 -0
- package/components/index-DJv1MwwH.mjs +14 -0
- package/components/input/index.cjs +1 -1
- package/components/input/index.mjs +1 -1
- package/components/input-array/index.cjs +1 -1
- package/components/input-array/index.mjs +2 -2
- package/components/input-collection/index.cjs +1 -1
- package/components/input-collection/index.mjs +2 -2
- package/components/input-link/index.cjs +1 -1
- package/components/input-link/index.mjs +2 -2
- package/components/input-number/index.cjs +1 -1
- package/components/input-number/index.mjs +1 -1
- package/components/input-tag/index.cjs +1 -1
- package/components/input-tag/index.mjs +1 -1
- package/components/isObject-DQpnfMRp.mjs +34 -0
- package/components/monaco-editor/index.cjs +1 -1
- package/components/monaco-editor/index.mjs +1 -1
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.mjs +1 -1
- package/components/select/index.cjs +1 -1
- package/components/select/index.mjs +1 -1
- package/components/templates-default/index.cjs +1 -1
- package/components/templates-default/index.mjs +1 -1
- package/components/templates-element-plus/index.cjs +1 -1
- package/components/templates-element-plus/index.mjs +1 -1
- package/components/templates-esri/index.cjs +1 -1
- package/components/templates-esri/index.mjs +1 -1
- package/components/templates-layout/index.cjs +1 -1
- package/components/templates-layout/index.mjs +1 -1
- package/components/templates-variant/index.cjs +1 -1
- package/components/templates-variant/index.mjs +1 -1
- package/components/upload/index.cjs +1 -1
- package/components/upload/index.mjs +2 -2
- package/components/upload-plus/index.cjs +1 -1
- package/components/upload-plus/index.mjs +2 -2
- package/components/use-watch-Bfrz9pv_.js +1 -0
- package/components/use-watch-t49wP7jy.mjs +414 -0
- package/components/var-datetime-picker/index.cjs +1 -1
- package/components/var-datetime-picker/index.mjs +1 -1
- package/components/vditor/index.cjs +1 -1
- package/components/vditor/index.mjs +1 -1
- package/package.json +1 -1
- package/components/cloneDeep.cjs +0 -1
- package/components/debounce.cjs +0 -1
- package/components/use-watch.cjs +0 -1
- /package/components/{_plugin-vue_export-helper.cjs → _plugin-vue_export-helper-BHFhmbuH.js} +0 -0
- /package/components/{index2.cjs → index-BNPcMpOO.js} +0 -0
- /package/components/{index.cjs → index-DSyxYMB0.js} +0 -0
- /package/components/{isObject.cjs → isObject-fAvOGw_H.js} +0 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { watch as j, getCurrentScope as re, onScopeDispose as ce, computed as b, toValue as q, unref as fe, ref as R, onMounted as de, nextTick as J, watchEffect as ve, shallowRef as me, inject as ge } from "vue";
|
|
2
|
+
import { useFormItem as he, useFormDisabled as Ve, CHANGE_EVENT as be, UPDATE_MODEL_EVENT as I, INPUT_EVENT as ue, EVENT_CODE as N } from "element-plus";
|
|
3
|
+
import { t as Z, d as ne } from "./debounce-DIph5ENi.mjs";
|
|
4
|
+
import { noop as le } from "@vunk/shared/function";
|
|
5
|
+
function ye(e, t, l) {
|
|
6
|
+
return e === e && (l !== void 0 && (e = e <= l ? e : l), t !== void 0 && (e = e >= t ? e : t)), e;
|
|
7
|
+
}
|
|
8
|
+
function we(e, t, l) {
|
|
9
|
+
return l === void 0 && (l = t, t = void 0), l !== void 0 && (l = Z(l), l = l === l ? l : 0), t !== void 0 && (t = Z(t), t = t === t ? t : 0), ye(Z(e), t, l);
|
|
10
|
+
}
|
|
11
|
+
function ke(e) {
|
|
12
|
+
return re() ? (ce(e), !0) : !1;
|
|
13
|
+
}
|
|
14
|
+
const Se = typeof window < "u" && typeof document < "u";
|
|
15
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
16
|
+
const xe = Object.prototype.toString, Ee = (e) => xe.call(e) === "[object Object]";
|
|
17
|
+
function F(e) {
|
|
18
|
+
return Array.isArray(e) ? e : [e];
|
|
19
|
+
}
|
|
20
|
+
function Me(e, t, l) {
|
|
21
|
+
return j(
|
|
22
|
+
e,
|
|
23
|
+
t,
|
|
24
|
+
{
|
|
25
|
+
...l,
|
|
26
|
+
immediate: !0
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
const Ne = Se ? window : void 0;
|
|
31
|
+
function Pe(e) {
|
|
32
|
+
var t;
|
|
33
|
+
const l = q(e);
|
|
34
|
+
return (t = l == null ? void 0 : l.$el) != null ? t : l;
|
|
35
|
+
}
|
|
36
|
+
function ae(...e) {
|
|
37
|
+
const t = [], l = () => {
|
|
38
|
+
t.forEach((r) => r()), t.length = 0;
|
|
39
|
+
}, f = (r, d, n, c) => (r.addEventListener(d, n, c), () => r.removeEventListener(d, n, c)), i = b(() => {
|
|
40
|
+
const r = F(q(e[0])).filter((d) => d != null);
|
|
41
|
+
return r.every((d) => typeof d != "string") ? r : void 0;
|
|
42
|
+
}), u = Me(
|
|
43
|
+
() => {
|
|
44
|
+
var r, d;
|
|
45
|
+
return [
|
|
46
|
+
(d = (r = i.value) == null ? void 0 : r.map((n) => Pe(n))) != null ? d : [Ne].filter((n) => n != null),
|
|
47
|
+
F(q(i.value ? e[1] : e[0])),
|
|
48
|
+
F(fe(i.value ? e[2] : e[1])),
|
|
49
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
50
|
+
q(i.value ? e[3] : e[2])
|
|
51
|
+
];
|
|
52
|
+
},
|
|
53
|
+
([r, d, n, c]) => {
|
|
54
|
+
if (l(), !(r != null && r.length) || !(d != null && d.length) || !(n != null && n.length))
|
|
55
|
+
return;
|
|
56
|
+
const h = Ee(c) ? { ...c } : c;
|
|
57
|
+
t.push(
|
|
58
|
+
...r.flatMap(
|
|
59
|
+
(y) => d.flatMap(
|
|
60
|
+
(P) => n.map((A) => f(y, P, A, h))
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
},
|
|
65
|
+
{ flush: "post" }
|
|
66
|
+
), a = () => {
|
|
67
|
+
u(), l();
|
|
68
|
+
};
|
|
69
|
+
return ke(l), a;
|
|
70
|
+
}
|
|
71
|
+
const Ce = Symbol("sliderContextKey"), Ye = (e, t, l) => {
|
|
72
|
+
const f = R();
|
|
73
|
+
return de(async () => {
|
|
74
|
+
e.range ? (Array.isArray(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]) : (typeof e.modelValue != "number" || Number.isNaN(e.modelValue) ? t.firstValue = e.min : t.firstValue = Math.min(
|
|
75
|
+
e.max,
|
|
76
|
+
Math.max(e.min, e.modelValue)
|
|
77
|
+
), t.oldValue = t.firstValue), ae(window, "resize", l), await J(), l();
|
|
78
|
+
}), {
|
|
79
|
+
sliderWrapper: f
|
|
80
|
+
};
|
|
81
|
+
}, Ke = (e) => {
|
|
82
|
+
const t = b(() => e.marks ? Object.keys(e.marks).map(Number.parseFloat).sort((f, i) => f - i).filter((f) => f <= e.max && f >= e.min).map(
|
|
83
|
+
(f) => ({
|
|
84
|
+
point: f,
|
|
85
|
+
position: (f - e.min) * 100 / (e.max - e.min),
|
|
86
|
+
mark: e.marks[f]
|
|
87
|
+
})
|
|
88
|
+
) : []);
|
|
89
|
+
return ve(() => {
|
|
90
|
+
if (e.step === "mark" && !e.marks && console.warn("[ElSlider] marks prop must be provided when step is mark"), e.marks) {
|
|
91
|
+
const l = Object.keys(e.marks), f = t.value.map((u) => u.point), i = l.filter((u) => {
|
|
92
|
+
const a = Number.parseFloat(u);
|
|
93
|
+
return Number.isNaN(a) || !f.includes(a);
|
|
94
|
+
});
|
|
95
|
+
i.length > 0 && console.warn(
|
|
96
|
+
`[ElSlider] Some marks keys are invalid (not a number or out of [min, max]): [${i.map((u) => `'${u}'`).join(", ")}] and will be ignored.`
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
}), t;
|
|
100
|
+
}, Oe = (e, t, l, f) => {
|
|
101
|
+
const { formItem: i } = he(), u = me(), a = R(), r = R(), d = {
|
|
102
|
+
firstButton: a,
|
|
103
|
+
secondButton: r
|
|
104
|
+
}, n = Ve(), c = b(() => Math.min(t.firstValue, t.secondValue)), h = b(() => Math.max(t.firstValue, t.secondValue)), y = b(() => e.range ? `${100 * (h.value - c.value) / (e.max - e.min)}%` : `${100 * (t.firstValue - e.min) / (e.max - e.min)}%`), P = b(() => e.range ? `${100 * (c.value - e.min) / (e.max - e.min)}%` : "0%"), A = b(() => e.vertical ? { height: e.height } : {}), k = b(() => e.vertical ? {
|
|
105
|
+
height: y.value,
|
|
106
|
+
bottom: P.value
|
|
107
|
+
} : f.value ? {
|
|
108
|
+
width: y.value,
|
|
109
|
+
left: "auto",
|
|
110
|
+
right: P.value
|
|
111
|
+
} : {
|
|
112
|
+
width: y.value,
|
|
113
|
+
left: P.value
|
|
114
|
+
}), X = () => {
|
|
115
|
+
if (u.value) {
|
|
116
|
+
const s = u.value.getBoundingClientRect();
|
|
117
|
+
t.sliderSize = s[e.vertical ? "height" : "width"];
|
|
118
|
+
}
|
|
119
|
+
}, z = (s) => {
|
|
120
|
+
const v = e.min + s * (e.max - e.min) / 100;
|
|
121
|
+
if (!e.range)
|
|
122
|
+
return a;
|
|
123
|
+
let V;
|
|
124
|
+
return Math.abs(c.value - v) < Math.abs(h.value - v) ? V = t.firstValue < t.secondValue ? "firstButton" : "secondButton" : V = t.firstValue > t.secondValue ? "firstButton" : "secondButton", d[V];
|
|
125
|
+
}, Y = (s) => {
|
|
126
|
+
const v = z(s);
|
|
127
|
+
return v.value.setPosition(s), v;
|
|
128
|
+
}, Q = (s) => {
|
|
129
|
+
t.firstValue = s ?? e.min;
|
|
130
|
+
const v = e.range ? [c.value, h.value] : s ?? e.min;
|
|
131
|
+
O(v);
|
|
132
|
+
}, K = (s) => {
|
|
133
|
+
t.secondValue = s, e.range && O([c.value, h.value]);
|
|
134
|
+
}, O = (s) => {
|
|
135
|
+
l(I, s), l(ue, s);
|
|
136
|
+
}, C = async () => {
|
|
137
|
+
await J(), l(
|
|
138
|
+
be,
|
|
139
|
+
e.range ? [c.value, h.value] : e.modelValue
|
|
140
|
+
);
|
|
141
|
+
}, M = (s) => {
|
|
142
|
+
var V, U, G, _;
|
|
143
|
+
if (n.value || t.dragging) return;
|
|
144
|
+
X();
|
|
145
|
+
let v = 0;
|
|
146
|
+
if (e.vertical) {
|
|
147
|
+
const B = ((U = (V = s.touches) == null ? void 0 : V.item(0)) == null ? void 0 : U.clientY) ?? s.clientY;
|
|
148
|
+
v = (u.value.getBoundingClientRect().bottom - B) / t.sliderSize * 100;
|
|
149
|
+
} else {
|
|
150
|
+
const B = ((_ = (G = s.touches) == null ? void 0 : G.item(0)) == null ? void 0 : _.clientX) ?? s.clientX, $ = u.value.getBoundingClientRect();
|
|
151
|
+
f.value ? v = ($.right - B) / t.sliderSize * 100 : v = (B - $.left) / t.sliderSize * 100;
|
|
152
|
+
}
|
|
153
|
+
if (!(v < 0 || v > 100))
|
|
154
|
+
return Y(v);
|
|
155
|
+
};
|
|
156
|
+
return {
|
|
157
|
+
elFormItem: i,
|
|
158
|
+
slider: u,
|
|
159
|
+
firstButton: a,
|
|
160
|
+
secondButton: r,
|
|
161
|
+
sliderDisabled: n,
|
|
162
|
+
minValue: c,
|
|
163
|
+
maxValue: h,
|
|
164
|
+
runwayStyle: A,
|
|
165
|
+
barStyle: k,
|
|
166
|
+
resetSize: X,
|
|
167
|
+
setPosition: Y,
|
|
168
|
+
emitChange: C,
|
|
169
|
+
onSliderWrapperPrevent: (s) => {
|
|
170
|
+
var v, V;
|
|
171
|
+
((v = d.firstButton.value) != null && v.dragging || (V = d.secondButton.value) != null && V.dragging) && s.preventDefault();
|
|
172
|
+
},
|
|
173
|
+
onSliderClick: (s) => {
|
|
174
|
+
M(s) && C();
|
|
175
|
+
},
|
|
176
|
+
onSliderDown: async (s) => {
|
|
177
|
+
const v = M(s);
|
|
178
|
+
v && (await J(), v.value.onButtonDown(s));
|
|
179
|
+
},
|
|
180
|
+
onSliderMarkerDown: (s) => {
|
|
181
|
+
if (n.value || t.dragging) return;
|
|
182
|
+
Y(s) && C();
|
|
183
|
+
},
|
|
184
|
+
setFirstValue: Q,
|
|
185
|
+
setSecondValue: K
|
|
186
|
+
};
|
|
187
|
+
}, Le = (e) => e.code || e.key, Be = (e, t, l) => {
|
|
188
|
+
const f = R(), i = R(!1), u = b(() => t.value instanceof Function), a = b(() => u.value && t.value(e.modelValue) || e.modelValue), r = ne(() => {
|
|
189
|
+
l.value && (i.value = !0);
|
|
190
|
+
}, 50), d = ne(() => {
|
|
191
|
+
l.value && (i.value = !1);
|
|
192
|
+
}, 50);
|
|
193
|
+
return {
|
|
194
|
+
tooltip: f,
|
|
195
|
+
tooltipVisible: i,
|
|
196
|
+
formatValue: a,
|
|
197
|
+
displayTooltip: r,
|
|
198
|
+
hideTooltip: d
|
|
199
|
+
};
|
|
200
|
+
}, We = (e, t, l) => {
|
|
201
|
+
const {
|
|
202
|
+
disabled: f,
|
|
203
|
+
min: i,
|
|
204
|
+
max: u,
|
|
205
|
+
step: a,
|
|
206
|
+
showTooltip: r,
|
|
207
|
+
persistent: d,
|
|
208
|
+
precision: n,
|
|
209
|
+
sliderSize: c,
|
|
210
|
+
formatTooltip: h,
|
|
211
|
+
emitChange: y,
|
|
212
|
+
resetSize: P,
|
|
213
|
+
updateDragging: A,
|
|
214
|
+
markList: k,
|
|
215
|
+
isRtl: X
|
|
216
|
+
} = ge(Ce), { tooltip: z, tooltipVisible: Y, formatValue: Q, displayTooltip: K, hideTooltip: O } = Be(e, h, r), C = R(), M = b(() => `${(e.modelValue - i.value) / (u.value - i.value) * 100}%`), D = b(() => e.vertical ? { bottom: M.value } : X.value ? { right: M.value } : { left: M.value }), W = b(() => a.value === "mark" && k.value.length > 0), p = () => {
|
|
217
|
+
t.hovering = !0, K();
|
|
218
|
+
}, ee = () => {
|
|
219
|
+
t.hovering = !1, t.dragging || O();
|
|
220
|
+
}, s = (o) => {
|
|
221
|
+
f.value || (o.preventDefault(), ie(o), window.addEventListener("mousemove", H), window.addEventListener("touchmove", H), window.addEventListener("mouseup", T), window.addEventListener("touchend", T), window.addEventListener("contextmenu", T), C.value.focus());
|
|
222
|
+
}, v = (o) => {
|
|
223
|
+
f.value || (t.newPosition = Number.parseFloat(M.value) + o / (u.value - i.value) * 100, L(t.newPosition), y());
|
|
224
|
+
}, V = (o) => {
|
|
225
|
+
if (f.value || !k.value.length) return;
|
|
226
|
+
const m = e.modelValue, g = Number.EPSILON, S = Math.abs(o);
|
|
227
|
+
let w;
|
|
228
|
+
if (o > 0) {
|
|
229
|
+
const E = k.value.findIndex(
|
|
230
|
+
(x) => x.point > m + g
|
|
231
|
+
);
|
|
232
|
+
if (E !== -1) {
|
|
233
|
+
const x = Math.min(
|
|
234
|
+
E + S - 1,
|
|
235
|
+
k.value.length - 1
|
|
236
|
+
);
|
|
237
|
+
w = k.value[x].point;
|
|
238
|
+
}
|
|
239
|
+
} else {
|
|
240
|
+
let E = -1;
|
|
241
|
+
for (let x = k.value.length - 1; x >= 0; x--)
|
|
242
|
+
if (k.value[x].point < m - g) {
|
|
243
|
+
E = x;
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
if (E !== -1) {
|
|
247
|
+
const x = Math.max(E - (S - 1), 0);
|
|
248
|
+
w = k.value[x].point;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (w !== void 0 && w !== m) {
|
|
252
|
+
const E = (w - i.value) / (u.value - i.value) * 100;
|
|
253
|
+
L(E), y();
|
|
254
|
+
}
|
|
255
|
+
}, U = () => {
|
|
256
|
+
W.value ? V(-1) : typeof a.value == "number" && v(-a.value);
|
|
257
|
+
}, G = () => {
|
|
258
|
+
W.value ? V(1) : typeof a.value == "number" && v(a.value);
|
|
259
|
+
}, _ = () => {
|
|
260
|
+
W.value ? V(-4) : typeof a.value == "number" && v(-a.value * 4);
|
|
261
|
+
}, B = () => {
|
|
262
|
+
W.value ? V(4) : typeof a.value == "number" && v(a.value * 4);
|
|
263
|
+
}, $ = () => {
|
|
264
|
+
f.value || (L(0), y());
|
|
265
|
+
}, oe = () => {
|
|
266
|
+
f.value || (L(100), y());
|
|
267
|
+
}, se = (o) => {
|
|
268
|
+
const m = Le(o);
|
|
269
|
+
let g = !0;
|
|
270
|
+
switch (m) {
|
|
271
|
+
case N.left:
|
|
272
|
+
case N.down:
|
|
273
|
+
U();
|
|
274
|
+
break;
|
|
275
|
+
case N.right:
|
|
276
|
+
case N.up:
|
|
277
|
+
G();
|
|
278
|
+
break;
|
|
279
|
+
case N.home:
|
|
280
|
+
$();
|
|
281
|
+
break;
|
|
282
|
+
case N.end:
|
|
283
|
+
oe();
|
|
284
|
+
break;
|
|
285
|
+
case N.pageDown:
|
|
286
|
+
_();
|
|
287
|
+
break;
|
|
288
|
+
case N.pageUp:
|
|
289
|
+
B();
|
|
290
|
+
break;
|
|
291
|
+
default:
|
|
292
|
+
g = !1;
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
g && o.preventDefault();
|
|
296
|
+
}, te = (o) => {
|
|
297
|
+
let m, g;
|
|
298
|
+
return o.type.startsWith("touch") ? (g = o.touches[0].clientY, m = o.touches[0].clientX) : (g = o.clientY, m = o.clientX), {
|
|
299
|
+
clientX: m,
|
|
300
|
+
clientY: g
|
|
301
|
+
};
|
|
302
|
+
}, ie = (o) => {
|
|
303
|
+
t.dragging = !0, t.isClick = !0;
|
|
304
|
+
const { clientX: m, clientY: g } = te(o);
|
|
305
|
+
e.vertical ? t.startY = g : t.startX = m, t.startPosition = Number.parseFloat(M.value), t.newPosition = t.startPosition;
|
|
306
|
+
}, H = (o) => {
|
|
307
|
+
if (t.dragging) {
|
|
308
|
+
t.isClick = !1, K(), P();
|
|
309
|
+
let m;
|
|
310
|
+
const { clientX: g, clientY: S } = te(o);
|
|
311
|
+
if (e.vertical)
|
|
312
|
+
t.currentY = S, m = (t.startY - t.currentY) / c.value * 100;
|
|
313
|
+
else {
|
|
314
|
+
t.currentX = g;
|
|
315
|
+
const w = (t.currentX - t.startX) / c.value * 100;
|
|
316
|
+
m = X.value ? -w : w;
|
|
317
|
+
}
|
|
318
|
+
t.newPosition = t.startPosition + m, L(t.newPosition);
|
|
319
|
+
}
|
|
320
|
+
}, T = () => {
|
|
321
|
+
t.dragging && (setTimeout(() => {
|
|
322
|
+
t.dragging = !1, t.hovering || O(), t.isClick || L(t.newPosition), y();
|
|
323
|
+
}, 0), window.removeEventListener("mousemove", H), window.removeEventListener("touchmove", H), window.removeEventListener("mouseup", T), window.removeEventListener("touchend", T), window.removeEventListener("contextmenu", T));
|
|
324
|
+
}, L = async (o) => {
|
|
325
|
+
if (o === null || Number.isNaN(+o)) return;
|
|
326
|
+
o = we(o, 0, 100);
|
|
327
|
+
let m;
|
|
328
|
+
if (a.value === "mark")
|
|
329
|
+
k.value.length === 0 ? m = o <= 50 ? i.value : u.value : m = k.value.reduce((S, w) => Math.abs(w.position - o) < Math.abs(S.position - o) ? w : S).point;
|
|
330
|
+
else {
|
|
331
|
+
const g = Math.floor((u.value - i.value) / a.value), S = g * a.value / (u.value - i.value) * 100, w = S + (100 - S) / 2;
|
|
332
|
+
if (o < S) {
|
|
333
|
+
const E = S / g, x = Math.round(o / E);
|
|
334
|
+
m = i.value + x * a.value;
|
|
335
|
+
} else o < w ? m = i.value + g * a.value : m = u.value;
|
|
336
|
+
m = Number.parseFloat(m.toFixed(n.value));
|
|
337
|
+
}
|
|
338
|
+
m !== e.modelValue && l(I, m), !t.dragging && e.modelValue !== t.oldValue && (t.oldValue = e.modelValue), await J(), t.dragging && K(), z.value.updatePopper();
|
|
339
|
+
};
|
|
340
|
+
return j(
|
|
341
|
+
() => t.dragging,
|
|
342
|
+
(o) => {
|
|
343
|
+
A(o);
|
|
344
|
+
}
|
|
345
|
+
), ae(C, "touchstart", s, { passive: !1 }), {
|
|
346
|
+
disabled: f,
|
|
347
|
+
button: C,
|
|
348
|
+
tooltip: z,
|
|
349
|
+
tooltipVisible: Y,
|
|
350
|
+
showTooltip: r,
|
|
351
|
+
persistent: d,
|
|
352
|
+
wrapperStyle: D,
|
|
353
|
+
formatValue: Q,
|
|
354
|
+
handleMouseEnter: p,
|
|
355
|
+
handleMouseLeave: ee,
|
|
356
|
+
onButtonDown: s,
|
|
357
|
+
onKeyDown: se,
|
|
358
|
+
setPosition: L
|
|
359
|
+
};
|
|
360
|
+
}, $e = (e, t, l, f, i) => ({
|
|
361
|
+
stops: b(() => {
|
|
362
|
+
if (!e.showStops || e.min > e.max) return [];
|
|
363
|
+
if (e.step === "mark" || e.step === 0)
|
|
364
|
+
return e.step === 0 && console.warn("[ElSlider] step should not be 0."), [];
|
|
365
|
+
const r = Math.ceil((e.max - e.min) / e.step), d = 100 * e.step / (e.max - e.min), n = Array.from({ length: r - 1 }).map(
|
|
366
|
+
(c, h) => (h + 1) * d
|
|
367
|
+
);
|
|
368
|
+
return e.range ? n.filter((c) => c < 100 * (l.value - e.min) / (e.max - e.min) || c > 100 * (f.value - e.min) / (e.max - e.min)) : n.filter(
|
|
369
|
+
(c) => c > 100 * (t.firstValue - e.min) / (e.max - e.min)
|
|
370
|
+
);
|
|
371
|
+
}),
|
|
372
|
+
getStopStyle: (r) => e.vertical ? { bottom: `${r}%` } : i.value ? { right: `${r}%` } : { left: `${r}%` }
|
|
373
|
+
}), je = (e, t, l, f, i, u) => {
|
|
374
|
+
const a = (n) => {
|
|
375
|
+
i(I, n), i(ue, n);
|
|
376
|
+
}, r = () => e.range ? ![l.value, f.value].every(
|
|
377
|
+
(n, c) => n === t.oldValue[c]
|
|
378
|
+
) : e.modelValue !== t.oldValue, d = () => {
|
|
379
|
+
var c, h;
|
|
380
|
+
if (e.min > e.max)
|
|
381
|
+
throw new Error("[Element Plus Slider] props.min should not be greater than props.max.");
|
|
382
|
+
const n = e.modelValue;
|
|
383
|
+
e.range && Array.isArray(n) ? n[1] < e.min ? a([e.min, e.min]) : n[0] > e.max ? a([e.max, e.max]) : n[0] < e.min ? a([e.min, n[1]]) : n[1] > e.max ? a([n[0], e.max]) : (t.firstValue = n[0], t.secondValue = n[1], r() && (e.validateEvent && ((c = u == null ? void 0 : u.validate) == null || c.call(u, "change").catch(le)), t.oldValue = n.slice())) : !e.range && typeof n == "number" && !Number.isNaN(n) && (n < e.min ? a(e.min) : n > e.max ? a(e.max) : (t.firstValue = n, r() && (e.validateEvent && ((h = u == null ? void 0 : u.validate) == null || h.call(u, "change").catch(le)), t.oldValue = n)));
|
|
384
|
+
};
|
|
385
|
+
d(), j(
|
|
386
|
+
() => t.dragging,
|
|
387
|
+
(n) => {
|
|
388
|
+
n || d();
|
|
389
|
+
}
|
|
390
|
+
), j(
|
|
391
|
+
() => e.modelValue,
|
|
392
|
+
(n, c) => {
|
|
393
|
+
t.dragging || Array.isArray(n) && Array.isArray(c) && n.every((h, y) => h === c[y]) && t.firstValue === n[0] && t.secondValue === n[1] || d();
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
deep: !0
|
|
397
|
+
}
|
|
398
|
+
), j(
|
|
399
|
+
() => [e.min, e.max],
|
|
400
|
+
() => {
|
|
401
|
+
d();
|
|
402
|
+
}
|
|
403
|
+
);
|
|
404
|
+
};
|
|
405
|
+
export {
|
|
406
|
+
Ke as a,
|
|
407
|
+
Oe as b,
|
|
408
|
+
We as c,
|
|
409
|
+
$e as d,
|
|
410
|
+
je as e,
|
|
411
|
+
ae as f,
|
|
412
|
+
Ce as s,
|
|
413
|
+
Ye as u
|
|
414
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const V=require("@vunk/form/components/form-item"),t=require("vue"),C=require("@vunk/form/composables"),F=require("@vunk/form/composables/element-plus"),w=require("vant"),b=require("@varlet/ui"),n=require("element-plus");require("vant/es/popup/style");require("@varlet/ui/es/date-picker/date-picker.css");require("@varlet/ui/es/time-picker/timePicker.css");const R=require("../_plugin-vue_export-helper.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const V=require("@vunk/form/components/form-item"),t=require("vue"),C=require("@vunk/form/composables"),F=require("@vunk/form/composables/element-plus"),w=require("vant"),b=require("@varlet/ui"),n=require("element-plus");require("vant/es/popup/style");require("@varlet/ui/es/date-picker/date-picker.css");require("@varlet/ui/es/time-picker/timePicker.css");const R=require("../_plugin-vue_export-helper-BHFhmbuH.js"),Y={...V._VkfFormItemCtx.props,modelValue:null,readonly:Boolean,type:{type:String,default:"month"},allowedDates:{type:Function,default:void 0},useSeconds:Boolean,valueFormat:{type:String,default:"YYYY-MM-DD HH:mm"}},E={"update:modelValue":null},M=[{label:"日期",value:"date",format:"YYYY-MM-DD"},{label:"年",value:"year",format:"YYYY"},{label:"月",value:"month",format:"YYYY-MM"}],B=M.reduce((e,a)=>(e[a.value]=a,e),{}),I=[{label:"日期",value:"date",varDatePickerType:"date",isRange:!1},{label:"年",value:"year",varDatePickerType:"year",isRange:!1},{label:"月",value:"month",varDatePickerType:"month",isRange:!1},{value:"dates",label:"多选日期",varDatePickerType:"date",isRange:!1},{value:"week",label:"周",varDatePickerType:"date",isRange:!1},{value:"datetime",label:"日期时间",varDatePickerType:"date",isRange:!1,hasTime:!0},{value:"datetimerange",label:"日期时间范围",varDatePickerType:"date",isRange:!1,hasTime:!0},{value:"daterange",label:"日期范围",varDatePickerType:"date",isRange:!0},{value:"monthrange",label:"月范围",varDatePickerType:"month",isRange:!0}],k=I.reduce((e,a)=>(e[a.value]=a,e),{}),S=t.defineComponent({name:"VkfVarDatetimePicker",components:{VkfFormItem:V.VkfFormItem,ElDatePicker:n.ElDatePicker,DatePicker:b.DatePicker,TimePicker:b.TimePicker,Popup:w.Popup,ElTabPane:n.ElTabPane,ElTabs:n.ElTabs},props:Y,emits:E,setup(e,{emit:a}){const y=V._VkfFormItemCtx.createBindProps(e),{tr:P}=F.useLocale(),s=t.computed(()=>k[e.type].varDatePickerType),i=t.computed(()=>B[s.value].format),d=t.computed(()=>!!k[e.type].isRange),u=t.computed(()=>!!k[e.type].hasTime),m=()=>e.modelValue?n.dayjs(e.modelValue).format(i.value):"",c=()=>e.modelValue?n.dayjs(e.modelValue).format(e.useSeconds?"HH:mm:ss":"HH:mm"):"",p=r=>{if(!r)return"";const o=n.dayjs(r,i.value);return e.modelValue?n.dayjs(e.modelValue).year(o.year()).month(o.month()).date(o.date()).format(e.valueFormat):o.format(e.valueFormat)},v=r=>{if(!r)return"";const o=n.dayjs(r,e.useSeconds?"HH:mm:ss":"HH:mm");return e.modelValue?n.dayjs(e.modelValue).hour(o.hour()).minute(o.minute()).second(o.second()).format(e.valueFormat):o.format(e.valueFormat)},f=t.computed({get(){return m()},set(r){const o=p(r);a("update:modelValue",o)}}),l=t.computed({get(){return c()},set(r){const o=v(r);a("update:modelValue",o)}}),h=C.useComputedReadonly(e),T=t.ref(!1),D=t.ref("date");return{preInput:()=>{h.value||(e.modelValue&&u.value&&(D.value="time"),T.value=!0)},inputBlur:r=>{r.target.blur()},popupShow:T,formItemBindProps:y,varDatePickerType:s,isRange:d,hasTime:u,currentTab:D,valueTime:l,valueDate:f,tr:P}}});function q(e,a,y,P,s,i){const d=t.resolveComponent("ElDatePicker"),u=t.resolveComponent("DatePicker"),m=t.resolveComponent("ElTabPane"),c=t.resolveComponent("TimePicker"),p=t.resolveComponent("ElTabs"),v=t.resolveComponent("Popup"),f=t.resolveComponent("VkfFormItem");return t.openBlock(),t.createBlock(f,t.normalizeProps(t.guardReactiveProps(e.formItemBindProps)),{default:t.withCtx(()=>[t.createElementVNode("div",{onClickCapture:a[0]||(a[0]=(...l)=>e.preInput&&e.preInput(...l))},[t.createVNode(d,{"popper-class":"var-datetime-picker-el-popover","model-value":e.modelValue,type:e.type,readonly:!0,"value-format":e.valueFormat,onFocus:e.inputBlur},null,8,["model-value","type","value-format","onFocus"])],32),t.createVNode(v,{show:e.popupShow,"onUpdate:show":a[4]||(a[4]=l=>e.popupShow=l),position:"bottom",round:""},{default:t.withCtx(()=>[t.createVNode(p,{modelValue:e.currentTab,"onUpdate:modelValue":a[3]||(a[3]=l=>e.currentTab=l),class:t.normalizeClass(["var-datetime-picker-el-tabs",{"is-hidden":!e.hasTime}])},{default:t.withCtx(()=>[t.createVNode(m,{label:e.valueDate||e.tr("el.datepicker.selectDate","选择日期"),name:"date"},{default:t.withCtx(()=>[t.createVNode(u,{modelValue:e.valueDate,"onUpdate:modelValue":a[1]||(a[1]=l=>e.valueDate=l),type:e.varDatePickerType,range:e.isRange,"allowed-dates":e.allowedDates},null,8,["modelValue","type","range","allowed-dates"])]),_:1},8,["label"]),e.hasTime?(t.openBlock(),t.createBlock(m,{key:0,label:e.valueTime||e.tr("el.datepicker.selectTime","选择时间"),name:"time"},{default:t.withCtx(()=>[t.createVNode(c,{modelValue:e.valueTime,"onUpdate:modelValue":a[2]||(a[2]=l=>e.valueTime=l),format:"24hr"},null,8,["modelValue"])]),_:1},8,["label"])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","class"])]),_:1},8,["show"])]),_:1},16)}const g=R._export_sfc(S,[["render",q]]),H=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfVarDatetimePicker=g;exports.__VkfVarDatetimePicker=H;exports.default=g;
|
|
@@ -8,7 +8,7 @@ import { ElTabs as N, ElTabPane as L, ElDatePicker as _, dayjs as m } from "elem
|
|
|
8
8
|
import "vant/es/popup/style";
|
|
9
9
|
import "@varlet/ui/es/date-picker/date-picker.css";
|
|
10
10
|
import "@varlet/ui/es/time-picker/timePicker.css";
|
|
11
|
-
import { _ as q } from "../_plugin-vue_export-helper.
|
|
11
|
+
import { _ as q } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
12
12
|
const A = {
|
|
13
13
|
...Y.props,
|
|
14
14
|
modelValue: null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("@vunk/plus/components/vditor"),r=require("@vunk/form/components/form-item"),l=require("@vunk/form/composables"),u=require("../_plugin-vue_export-helper.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("@vunk/plus/components/vditor"),r=require("@vunk/form/components/form-item"),l=require("@vunk/form/composables"),u=require("../_plugin-vue_export-helper-BHFhmbuH.js"),a={...r._VkfFormItemCtx.props,...t._VkVditorCtx.props,readonly:{type:Boolean,default:void 0}},f={...t._VkVditorCtx.emits},_=e.defineComponent({name:"VkfVditor",components:{VkfFormItem:r.VkfFormItem,VkVditor:t.VkVditor},props:a,emits:f,setup(o,{emit:n}){const s=t._VkVditorCtx.createBindProps(o),i=t._VkVditorCtx.createOnEmits(n),c=r._VkfFormItemCtx.createBindProps(o),d=l.useComputedReadonly(o);return{formItemBindProps:c,coreProps:s,coreEmits:i,readonly:d}}});function k(o,n,s,i,c,d){const p=e.resolveComponent("VkVditor"),V=e.resolveComponent("VkfFormItem");return e.openBlock(),e.createBlock(V,e.normalizeProps(e.guardReactiveProps(o.formItemBindProps)),{default:e.withCtx(()=>[e.createVNode(p,e.mergeProps(o.coreProps,e.toHandlers(o.coreEmits)),{footer:e.withCtx(()=>[e.renderSlot(o.$slots,"footer")]),_:3},16)]),_:3},16)}const m=u._export_sfc(_,[["render",k]]),C=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));exports.VkfVditor=m;exports.__VkfVditor=C;exports.default=m;
|
|
@@ -2,7 +2,7 @@ import { defineComponent as f, resolveComponent as p, openBlock as l, createBloc
|
|
|
2
2
|
import { _VkVditorCtx as e, VkVditor as C } from "@vunk/plus/components/vditor";
|
|
3
3
|
import { _VkfFormItemCtx as i, VkfFormItem as I } from "@vunk/form/components/form-item";
|
|
4
4
|
import { useComputedReadonly as $ } from "@vunk/form/composables";
|
|
5
|
-
import { _ as g } from "../_plugin-vue_export-helper.
|
|
5
|
+
import { _ as g } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
6
|
const v = {
|
|
7
7
|
...i.props,
|
|
8
8
|
...e.props,
|
package/package.json
CHANGED
package/components/cloneDeep.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./isObject.cjs");var F=Array.isArray,Tt="[object AsyncFunction]",vt="[object Function]",$t="[object GeneratorFunction]",At="[object Proxy]";function it(t){if(!o.isObject(t))return!1;var e=o.baseGetTag(t);return e==vt||e==$t||e==Tt||e==At}var C=o.root["__core-js_shared__"],L=function(){var t=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function wt(t){return!!L&&L in t}var Ot=Function.prototype,mt=Ot.toString;function y(t){if(t!=null){try{return mt.call(t)}catch{}try{return t+""}catch{}}return""}var St=/[\\^$.*+?()[\]{}|]/g,Pt=/^\[object .+?Constructor\]$/,Ct=Function.prototype,xt=Object.prototype,Et=Ct.toString,It=xt.hasOwnProperty,Mt=RegExp("^"+Et.call(It).replace(St,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Dt(t){if(!o.isObject(t)||wt(t))return!1;var e=it(t)?Mt:Pt;return e.test(y(t))}function Ft(t,e){return t==null?void 0:t[e]}function _(t,e){var r=Ft(t,e);return Dt(r)?r:void 0}var E=_(o.root,"WeakMap"),N=Object.create,Bt=function(){function t(){}return function(e){if(!o.isObject(e))return{};if(N)return N(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),R=function(){try{var t=_(Object,"defineProperty");return t({},"",{}),t}catch{}}();function Ut(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var zt=9007199254740991,Gt=/^(?:0|[1-9]\d*)$/;function Lt(t,e){var r=typeof t;return e=e??zt,!!e&&(r=="number"||r!="symbol"&&Gt.test(t))&&t>-1&&t%1==0&&t<e}function Nt(t,e,r){e=="__proto__"&&R?R(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function st(t,e){return t===e||t!==t&&e!==e}var Rt=Object.prototype,Vt=Rt.hasOwnProperty;function Ht(t,e,r){var n=t[e];(!(Vt.call(t,e)&&st(n,r))||r===void 0&&!(e in t))&&Nt(t,e,r)}var Kt=9007199254740991;function ct(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Kt}function Wt(t){return t!=null&&ct(t.length)&&!it(t)}var qt=Object.prototype;function ut(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||qt;return t===r}function Xt(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Yt="[object Arguments]";function V(t){return o.isObjectLike(t)&&o.baseGetTag(t)==Yt}var ft=Object.prototype,Jt=ft.hasOwnProperty,Zt=ft.propertyIsEnumerable,Qt=V(function(){return arguments}())?V:function(t){return o.isObjectLike(t)&&Jt.call(t,"callee")&&!Zt.call(t,"callee")};function kt(){return!1}var pt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,H=pt&&typeof module=="object"&&module&&!module.nodeType&&module,te=H&&H.exports===pt,K=te?o.root.Buffer:void 0,ee=K?K.isBuffer:void 0,bt=ee||kt,re="[object Arguments]",ne="[object Array]",ae="[object Boolean]",oe="[object Date]",ie="[object Error]",se="[object Function]",ce="[object Map]",ue="[object Number]",fe="[object Object]",pe="[object RegExp]",be="[object Set]",ge="[object String]",le="[object WeakMap]",he="[object ArrayBuffer]",de="[object DataView]",ye="[object Float32Array]",_e="[object Float64Array]",je="[object Int8Array]",Te="[object Int16Array]",ve="[object Int32Array]",$e="[object Uint8Array]",Ae="[object Uint8ClampedArray]",we="[object Uint16Array]",Oe="[object Uint32Array]",i={};i[ye]=i[_e]=i[je]=i[Te]=i[ve]=i[$e]=i[Ae]=i[we]=i[Oe]=!0;i[re]=i[ne]=i[he]=i[ae]=i[de]=i[oe]=i[ie]=i[se]=i[ce]=i[ue]=i[fe]=i[pe]=i[be]=i[ge]=i[le]=!1;function me(t){return o.isObjectLike(t)&&ct(t.length)&&!!i[o.baseGetTag(t)]}function B(t){return function(e){return t(e)}}var gt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,A=gt&&typeof module=="object"&&module&&!module.nodeType&&module,Se=A&&A.exports===gt,x=Se&&o.freeGlobal.process,T=function(){try{var t=A&&A.require&&A.require("util").types;return t||x&&x.binding&&x.binding("util")}catch{}}(),W=T&&T.isTypedArray,Pe=W?B(W):me,Ce=Object.prototype,xe=Ce.hasOwnProperty;function Ee(t,e){var r=F(t),n=!r&&Qt(t),f=!r&&!n&&bt(t),c=!r&&!n&&!f&&Pe(t),s=r||n||f||c,j=s?Xt(t.length,String):[],g=j.length;for(var u in t)xe.call(t,u)&&!(s&&(u=="length"||f&&(u=="offset"||u=="parent")||c&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Lt(u,g)))&&j.push(u);return j}function lt(t,e){return function(r){return t(e(r))}}var Ie=lt(Object.keys,Object),Me=Object.prototype,De=Me.hasOwnProperty;function Fe(t){if(!ut(t))return Ie(t);var e=[];for(var r in Object(t))De.call(t,r)&&r!="constructor"&&e.push(r);return e}function Be(t){return Wt(t)?Ee(t):Fe(t)}var w=_(Object,"create");function Ue(){this.__data__=w?w(null):{},this.size=0}function ze(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Ge="__lodash_hash_undefined__",Le=Object.prototype,Ne=Le.hasOwnProperty;function Re(t){var e=this.__data__;if(w){var r=e[t];return r===Ge?void 0:r}return Ne.call(e,t)?e[t]:void 0}var Ve=Object.prototype,He=Ve.hasOwnProperty;function Ke(t){var e=this.__data__;return w?e[t]!==void 0:He.call(e,t)}var We="__lodash_hash_undefined__";function qe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=w&&e===void 0?We:e,this}function d(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}d.prototype.clear=Ue;d.prototype.delete=ze;d.prototype.get=Re;d.prototype.has=Ke;d.prototype.set=qe;function Xe(){this.__data__=[],this.size=0}function S(t,e){for(var r=t.length;r--;)if(st(t[r][0],e))return r;return-1}var Ye=Array.prototype,Je=Ye.splice;function Ze(t){var e=this.__data__,r=S(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Je.call(e,r,1),--this.size,!0}function Qe(t){var e=this.__data__,r=S(e,t);return r<0?void 0:e[r][1]}function ke(t){return S(this.__data__,t)>-1}function tr(t,e){var r=this.__data__,n=S(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function b(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}b.prototype.clear=Xe;b.prototype.delete=Ze;b.prototype.get=Qe;b.prototype.has=ke;b.prototype.set=tr;var O=_(o.root,"Map");function er(){this.size=0,this.__data__={hash:new d,map:new(O||b),string:new d}}function rr(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function P(t,e){var r=t.__data__;return rr(e)?r[typeof e=="string"?"string":"hash"]:r.map}function nr(t){var e=P(this,t).delete(t);return this.size-=e?1:0,e}function ar(t){return P(this,t).get(t)}function or(t){return P(this,t).has(t)}function ir(t,e){var r=P(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function v(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}v.prototype.clear=er;v.prototype.delete=nr;v.prototype.get=ar;v.prototype.has=or;v.prototype.set=ir;function sr(t,e){for(var r=-1,n=e.length,f=t.length;++r<n;)t[f+r]=e[r];return t}var cr=lt(Object.getPrototypeOf,Object);function ur(){this.__data__=new b,this.size=0}function fr(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function pr(t){return this.__data__.get(t)}function br(t){return this.__data__.has(t)}var gr=200;function lr(t,e){var r=this.__data__;if(r instanceof b){var n=r.__data__;if(!O||n.length<gr-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new v(n)}return r.set(t,e),this.size=r.size,this}function $(t){var e=this.__data__=new b(t);this.size=e.size}$.prototype.clear=ur;$.prototype.delete=fr;$.prototype.get=pr;$.prototype.has=br;$.prototype.set=lr;var ht=typeof exports=="object"&&exports&&!exports.nodeType&&exports,q=ht&&typeof module=="object"&&module&&!module.nodeType&&module,hr=q&&q.exports===ht,X=hr?o.root.Buffer:void 0;X&&X.allocUnsafe;function dr(t,e){return t.slice()}function yr(t,e){for(var r=-1,n=t==null?0:t.length,f=0,c=[];++r<n;){var s=t[r];e(s,r,t)&&(c[f++]=s)}return c}function _r(){return[]}var jr=Object.prototype,Tr=jr.propertyIsEnumerable,Y=Object.getOwnPropertySymbols,vr=Y?function(t){return t==null?[]:(t=Object(t),yr(Y(t),function(e){return Tr.call(t,e)}))}:_r;function $r(t,e,r){var n=e(t);return F(t)?n:sr(n,r(t))}function Ar(t){return $r(t,Be,vr)}var I=_(o.root,"DataView"),M=_(o.root,"Promise"),D=_(o.root,"Set"),J="[object Map]",wr="[object Object]",Z="[object Promise]",Q="[object Set]",k="[object WeakMap]",tt="[object DataView]",Or=y(I),mr=y(O),Sr=y(M),Pr=y(D),Cr=y(E),p=o.baseGetTag;(I&&p(new I(new ArrayBuffer(1)))!=tt||O&&p(new O)!=J||M&&p(M.resolve())!=Z||D&&p(new D)!=Q||E&&p(new E)!=k)&&(p=function(t){var e=o.baseGetTag(t),r=e==wr?t.constructor:void 0,n=r?y(r):"";if(n)switch(n){case Or:return tt;case mr:return J;case Sr:return Z;case Pr:return Q;case Cr:return k}return e});var xr=Object.prototype,Er=xr.hasOwnProperty;function Ir(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Er.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var et=o.root.Uint8Array;function U(t){var e=new t.constructor(t.byteLength);return new et(e).set(new et(t)),e}function Mr(t,e){var r=U(t.buffer);return new t.constructor(r,t.byteOffset,t.byteLength)}var Dr=/\w*$/;function Fr(t){var e=new t.constructor(t.source,Dr.exec(t));return e.lastIndex=t.lastIndex,e}var rt=o.Symbol?o.Symbol.prototype:void 0,nt=rt?rt.valueOf:void 0;function Br(t){return nt?Object(nt.call(t)):{}}function Ur(t,e){var r=U(t.buffer);return new t.constructor(r,t.byteOffset,t.length)}var zr="[object Boolean]",Gr="[object Date]",Lr="[object Map]",Nr="[object Number]",Rr="[object RegExp]",Vr="[object Set]",Hr="[object String]",Kr="[object Symbol]",Wr="[object ArrayBuffer]",qr="[object DataView]",Xr="[object Float32Array]",Yr="[object Float64Array]",Jr="[object Int8Array]",Zr="[object Int16Array]",Qr="[object Int32Array]",kr="[object Uint8Array]",tn="[object Uint8ClampedArray]",en="[object Uint16Array]",rn="[object Uint32Array]";function nn(t,e,r){var n=t.constructor;switch(e){case Wr:return U(t);case zr:case Gr:return new n(+t);case qr:return Mr(t);case Xr:case Yr:case Jr:case Zr:case Qr:case kr:case tn:case en:case rn:return Ur(t);case Lr:return new n;case Nr:case Hr:return new n(t);case Rr:return Fr(t);case Vr:return new n;case Kr:return Br(t)}}function an(t){return typeof t.constructor=="function"&&!ut(t)?Bt(cr(t)):{}}var on="[object Map]";function sn(t){return o.isObjectLike(t)&&p(t)==on}var at=T&&T.isMap,cn=at?B(at):sn,un="[object Set]";function fn(t){return o.isObjectLike(t)&&p(t)==un}var ot=T&&T.isSet,pn=ot?B(ot):fn,dt="[object Arguments]",bn="[object Array]",gn="[object Boolean]",ln="[object Date]",hn="[object Error]",yt="[object Function]",dn="[object GeneratorFunction]",yn="[object Map]",_n="[object Number]",_t="[object Object]",jn="[object RegExp]",Tn="[object Set]",vn="[object String]",$n="[object Symbol]",An="[object WeakMap]",wn="[object ArrayBuffer]",On="[object DataView]",mn="[object Float32Array]",Sn="[object Float64Array]",Pn="[object Int8Array]",Cn="[object Int16Array]",xn="[object Int32Array]",En="[object Uint8Array]",In="[object Uint8ClampedArray]",Mn="[object Uint16Array]",Dn="[object Uint32Array]",a={};a[dt]=a[bn]=a[wn]=a[On]=a[gn]=a[ln]=a[mn]=a[Sn]=a[Pn]=a[Cn]=a[xn]=a[yn]=a[_n]=a[_t]=a[jn]=a[Tn]=a[vn]=a[$n]=a[En]=a[In]=a[Mn]=a[Dn]=!0;a[hn]=a[yt]=a[An]=!1;function m(t,e,r,n,f,c){var s;if(s!==void 0)return s;if(!o.isObject(t))return t;var j=F(t);if(j)s=Ir(t);else{var g=p(t),u=g==yt||g==dn;if(bt(t))return dr(t);if(g==_t||g==dt||u&&!f)s=u?{}:an(t);else{if(!a[g])return f?t:{};s=nn(t,g)}}c||(c=new $);var z=c.get(t);if(z)return z;c.set(t,s),pn(t)?t.forEach(function(l){s.add(m(l,e,r,l,t,c))}):cn(t)&&t.forEach(function(l,h){s.set(h,m(l,e,r,h,t,c))});var jt=Ar,G=j?void 0:jt(t);return Ut(G||t,function(l,h){G&&(h=l,l=t[h]),Ht(s,h,m(l,e,r,h,t,c))}),s}var Fn=1,Bn=4;function Un(t){return m(t,Fn|Bn)}exports.cloneDeep=Un;
|
package/components/debounce.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./isObject.cjs");var N="[object Symbol]";function A(e){return typeof e=="symbol"||s.isObjectLike(e)&&s.baseGetTag(e)==N}var C=/\s/;function M(e){for(var t=e.length;t--&&C.test(e.charAt(t)););return t}var B=/^\s+/;function R(e){return e&&e.slice(0,M(e)+1).replace(B,"")}var k=NaN,$=/^[-+]0x[0-9a-f]+$/i,F=/^0b[01]+$/i,_=/^0o[0-7]+$/i,q=parseInt;function h(e){if(typeof e=="number")return e;if(A(e))return k;if(s.isObject(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=s.isObject(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=R(e);var r=F.test(e);return r||_.test(e)?q(e.slice(2),r?2:8):$.test(e)?k:+e}var I=function(){return s.root.Date.now()},D="Expected a function",G=Math.max,H=Math.min;function P(e,t,r){var u,o,b,c,i,f,d=0,v=!1,m=!1,T=!0;if(typeof e!="function")throw new TypeError(D);t=h(t)||0,s.isObject(r)&&(v=!!r.leading,m="maxWait"in r,b=m?G(h(r.maxWait)||0,t):b,T="trailing"in r?!!r.trailing:T);function y(n){var a=u,l=o;return u=o=void 0,d=n,c=e.apply(l,a),c}function S(n){return d=n,i=setTimeout(g,t),v?y(n):c}function j(n){var a=n-f,l=n-d,E=t-a;return m?H(E,b-l):E}function O(n){var a=n-f,l=n-d;return f===void 0||a>=t||a<0||m&&l>=b}function g(){var n=I();if(O(n))return p(n);i=setTimeout(g,j(n))}function p(n){return i=void 0,T&&u?y(n):(u=o=void 0,c)}function W(){i!==void 0&&clearTimeout(i),d=0,u=f=o=i=void 0}function L(){return i===void 0?c:p(I())}function x(){var n=I(),a=O(n);if(u=arguments,o=this,f=n,a){if(i===void 0)return S(f);if(m)return clearTimeout(i),i=setTimeout(g,t),y(f)}return i===void 0&&(i=setTimeout(g,t)),c}return x.cancel=W,x.flush=L,x}exports.debounce=P;exports.toNumber=h;
|
package/components/use-watch.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("vue"),E=require("element-plus"),W=require("./debounce.cjs"),D=require("@vunk/shared/function");function le(e,t,l){return e===e&&(l!==void 0&&(e=e<=l?e:l),t!==void 0&&(e=e>=t?e:t)),e}function ue(e,t,l){return l===void 0&&(l=t,t=void 0),l!==void 0&&(l=W.toNumber(l),l=l===l?l:0),t!==void 0&&(t=W.toNumber(t),t=t===t?t:0),le(W.toNumber(e),t,l)}function oe(e){return u.getCurrentScope()?(u.onScopeDispose(e),!0):!1}const ae=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const se=Object.prototype.toString,ie=e=>se.call(e)==="[object Object]";function H(e){return Array.isArray(e)?e:[e]}function re(e,t,l){return u.watch(e,t,{...l,immediate:!0})}const ce=ae?window:void 0;function de(e){var t;const l=u.toValue(e);return(t=l==null?void 0:l.$el)!=null?t:l}function J(...e){const t=[],l=()=>{t.forEach(c=>c()),t.length=0},f=(c,m,n,d)=>(c.addEventListener(m,n,d),()=>c.removeEventListener(m,n,d)),r=u.computed(()=>{const c=H(u.toValue(e[0])).filter(m=>m!=null);return c.every(m=>typeof m!="string")?c:void 0}),o=re(()=>{var c,m;return[(m=(c=r.value)==null?void 0:c.map(n=>de(n)))!=null?m:[ce].filter(n=>n!=null),H(u.toValue(r.value?e[1]:e[0])),H(u.unref(r.value?e[2]:e[1])),u.toValue(r.value?e[3]:e[2])]},([c,m,n,d])=>{if(l(),!(c!=null&&c.length)||!(m!=null&&m.length)||!(n!=null&&n.length))return;const V=ie(d)?{...d}:d;t.push(...c.flatMap(y=>m.flatMap(T=>n.map(O=>f(y,T,O,V)))))},{flush:"post"}),a=()=>{o(),l()};return oe(l),a}const p=Symbol("sliderContextKey"),fe=(e,t,l)=>{const f=u.ref();return u.onMounted(async()=>{e.range?(Array.isArray(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]):(typeof e.modelValue!="number"||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),J(window,"resize",l),await u.nextTick(),l()}),{sliderWrapper:f}},me=e=>{const t=u.computed(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((f,r)=>f-r).filter(f=>f<=e.max&&f>=e.min).map(f=>({point:f,position:(f-e.min)*100/(e.max-e.min),mark:e.marks[f]})):[]);return u.watchEffect(()=>{if(e.step==="mark"&&!e.marks&&console.warn("[ElSlider] marks prop must be provided when step is mark"),e.marks){const l=Object.keys(e.marks),f=t.value.map(o=>o.point),r=l.filter(o=>{const a=Number.parseFloat(o);return Number.isNaN(a)||!f.includes(a)});r.length>0&&console.warn(`[ElSlider] Some marks keys are invalid (not a number or out of [min, max]): [${r.map(o=>`'${o}'`).join(", ")}] and will be ignored.`)}}),t},ve=(e,t,l,f)=>{const{formItem:r}=E.useFormItem(),o=u.shallowRef(),a=u.ref(),c=u.ref(),m={firstButton:a,secondButton:c},n=E.useFormDisabled(),d=u.computed(()=>Math.min(t.firstValue,t.secondValue)),V=u.computed(()=>Math.max(t.firstValue,t.secondValue)),y=u.computed(()=>e.range?`${100*(V.value-d.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),T=u.computed(()=>e.range?`${100*(d.value-e.min)/(e.max-e.min)}%`:"0%"),O=u.computed(()=>e.vertical?{height:e.height}:{}),k=u.computed(()=>e.vertical?{height:y.value,bottom:T.value}:f.value?{width:y.value,left:"auto",right:T.value}:{width:y.value,left:T.value}),A=()=>{if(o.value){const i=o.value.getBoundingClientRect();t.sliderSize=i[e.vertical?"height":"width"]}},$=i=>{const v=e.min+i*(e.max-e.min)/100;if(!e.range)return a;let b;return Math.abs(d.value-v)<Math.abs(V.value-v)?b=t.firstValue<t.secondValue?"firstButton":"secondButton":b=t.firstValue>t.secondValue?"firstButton":"secondButton",m[b]},R=i=>{const v=$(i);return v.value.setPosition(i),v},G=i=>{t.firstValue=i??e.min;const v=e.range?[d.value,V.value]:i??e.min;K(v)},_=i=>{t.secondValue=i,e.range&&K([d.value,V.value])},K=i=>{l(E.UPDATE_MODEL_EVENT,i),l(E.INPUT_EVENT,i)},C=async()=>{await u.nextTick(),l(E.CHANGE_EVENT,e.range?[d.value,V.value]:e.modelValue)},M=i=>{var b,j,z,U;if(n.value||t.dragging)return;A();let v=0;if(e.vertical){const L=((j=(b=i.touches)==null?void 0:b.item(0))==null?void 0:j.clientY)??i.clientY;v=(o.value.getBoundingClientRect().bottom-L)/t.sliderSize*100}else{const L=((U=(z=i.touches)==null?void 0:z.item(0))==null?void 0:U.clientX)??i.clientX,Y=o.value.getBoundingClientRect();f.value?v=(Y.right-L)/t.sliderSize*100:v=(L-Y.left)/t.sliderSize*100}if(!(v<0||v>100))return R(v)};return{elFormItem:r,slider:o,firstButton:a,secondButton:c,sliderDisabled:n,minValue:d,maxValue:V,runwayStyle:O,barStyle:k,resetSize:A,setPosition:R,emitChange:C,onSliderWrapperPrevent:i=>{var v,b;((v=m.firstButton.value)!=null&&v.dragging||(b=m.secondButton.value)!=null&&b.dragging)&&i.preventDefault()},onSliderClick:i=>{M(i)&&C()},onSliderDown:async i=>{const v=M(i);v&&(await u.nextTick(),v.value.onButtonDown(i))},onSliderMarkerDown:i=>{if(n.value||t.dragging)return;R(i)&&C()},setFirstValue:G,setSecondValue:_}},ge=e=>e.code||e.key,he=(e,t,l)=>{const f=u.ref(),r=u.ref(!1),o=u.computed(()=>t.value instanceof Function),a=u.computed(()=>o.value&&t.value(e.modelValue)||e.modelValue),c=W.debounce(()=>{l.value&&(r.value=!0)},50),m=W.debounce(()=>{l.value&&(r.value=!1)},50);return{tooltip:f,tooltipVisible:r,formatValue:a,displayTooltip:c,hideTooltip:m}},Ve=(e,t,l)=>{const{disabled:f,min:r,max:o,step:a,showTooltip:c,persistent:m,precision:n,sliderSize:d,formatTooltip:V,emitChange:y,resetSize:T,updateDragging:O,markList:k,isRtl:A}=u.inject(p),{tooltip:$,tooltipVisible:R,formatValue:G,displayTooltip:_,hideTooltip:K}=he(e,V,c),C=u.ref(),M=u.computed(()=>`${(e.modelValue-r.value)/(o.value-r.value)*100}%`),Q=u.computed(()=>e.vertical?{bottom:M.value}:A.value?{right:M.value}:{left:M.value}),X=u.computed(()=>a.value==="mark"&&k.value.length>0),Z=()=>{t.hovering=!0,_()},F=()=>{t.hovering=!1,t.dragging||K()},i=s=>{f.value||(s.preventDefault(),ne(s),window.addEventListener("mousemove",q),window.addEventListener("touchmove",q),window.addEventListener("mouseup",B),window.addEventListener("touchend",B),window.addEventListener("contextmenu",B),C.value.focus())},v=s=>{f.value||(t.newPosition=Number.parseFloat(M.value)+s/(o.value-r.value)*100,P(t.newPosition),y())},b=s=>{if(f.value||!k.value.length)return;const g=e.modelValue,h=Number.EPSILON,S=Math.abs(s);let w;if(s>0){const N=k.value.findIndex(x=>x.point>g+h);if(N!==-1){const x=Math.min(N+S-1,k.value.length-1);w=k.value[x].point}}else{let N=-1;for(let x=k.value.length-1;x>=0;x--)if(k.value[x].point<g-h){N=x;break}if(N!==-1){const x=Math.max(N-(S-1),0);w=k.value[x].point}}if(w!==void 0&&w!==g){const N=(w-r.value)/(o.value-r.value)*100;P(N),y()}},j=()=>{X.value?b(-1):typeof a.value=="number"&&v(-a.value)},z=()=>{X.value?b(1):typeof a.value=="number"&&v(a.value)},U=()=>{X.value?b(-4):typeof a.value=="number"&&v(-a.value*4)},L=()=>{X.value?b(4):typeof a.value=="number"&&v(a.value*4)},Y=()=>{f.value||(P(0),y())},ee=()=>{f.value||(P(100),y())},te=s=>{const g=ge(s);let h=!0;switch(g){case E.EVENT_CODE.left:case E.EVENT_CODE.down:j();break;case E.EVENT_CODE.right:case E.EVENT_CODE.up:z();break;case E.EVENT_CODE.home:Y();break;case E.EVENT_CODE.end:ee();break;case E.EVENT_CODE.pageDown:U();break;case E.EVENT_CODE.pageUp:L();break;default:h=!1;break}h&&s.preventDefault()},I=s=>{let g,h;return s.type.startsWith("touch")?(h=s.touches[0].clientY,g=s.touches[0].clientX):(h=s.clientY,g=s.clientX),{clientX:g,clientY:h}},ne=s=>{t.dragging=!0,t.isClick=!0;const{clientX:g,clientY:h}=I(s);e.vertical?t.startY=h:t.startX=g,t.startPosition=Number.parseFloat(M.value),t.newPosition=t.startPosition},q=s=>{if(t.dragging){t.isClick=!1,_(),T();let g;const{clientX:h,clientY:S}=I(s);if(e.vertical)t.currentY=S,g=(t.startY-t.currentY)/d.value*100;else{t.currentX=h;const w=(t.currentX-t.startX)/d.value*100;g=A.value?-w:w}t.newPosition=t.startPosition+g,P(t.newPosition)}},B=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||K(),t.isClick||P(t.newPosition),y()},0),window.removeEventListener("mousemove",q),window.removeEventListener("touchmove",q),window.removeEventListener("mouseup",B),window.removeEventListener("touchend",B),window.removeEventListener("contextmenu",B))},P=async s=>{if(s===null||Number.isNaN(+s))return;s=ue(s,0,100);let g;if(a.value==="mark")k.value.length===0?g=s<=50?r.value:o.value:g=k.value.reduce((S,w)=>Math.abs(w.position-s)<Math.abs(S.position-s)?w:S).point;else{const h=Math.floor((o.value-r.value)/a.value),S=h*a.value/(o.value-r.value)*100,w=S+(100-S)/2;if(s<S){const N=S/h,x=Math.round(s/N);g=r.value+x*a.value}else s<w?g=r.value+h*a.value:g=o.value;g=Number.parseFloat(g.toFixed(n.value))}g!==e.modelValue&&l(E.UPDATE_MODEL_EVENT,g),!t.dragging&&e.modelValue!==t.oldValue&&(t.oldValue=e.modelValue),await u.nextTick(),t.dragging&&_(),$.value.updatePopper()};return u.watch(()=>t.dragging,s=>{O(s)}),J(C,"touchstart",i,{passive:!1}),{disabled:f,button:C,tooltip:$,tooltipVisible:R,showTooltip:c,persistent:m,wrapperStyle:Q,formatValue:G,handleMouseEnter:Z,handleMouseLeave:F,onButtonDown:i,onKeyDown:te,setPosition:P}},Ee=(e,t,l,f,r)=>({stops:u.computed(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step==="mark"||e.step===0)return e.step===0&&console.warn("[ElSlider] step should not be 0."),[];const c=Math.ceil((e.max-e.min)/e.step),m=100*e.step/(e.max-e.min),n=Array.from({length:c-1}).map((d,V)=>(V+1)*m);return e.range?n.filter(d=>d<100*(l.value-e.min)/(e.max-e.min)||d>100*(f.value-e.min)/(e.max-e.min)):n.filter(d=>d>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:c=>e.vertical?{bottom:`${c}%`}:r.value?{right:`${c}%`}:{left:`${c}%`}}),be=(e,t,l,f,r,o)=>{const a=n=>{r(E.UPDATE_MODEL_EVENT,n),r(E.INPUT_EVENT,n)},c=()=>e.range?![l.value,f.value].every((n,d)=>n===t.oldValue[d]):e.modelValue!==t.oldValue,m=()=>{var d,V;if(e.min>e.max)throw new Error("[Element Plus Slider] props.min should not be greater than props.max.");const n=e.modelValue;e.range&&Array.isArray(n)?n[1]<e.min?a([e.min,e.min]):n[0]>e.max?a([e.max,e.max]):n[0]<e.min?a([e.min,n[1]]):n[1]>e.max?a([n[0],e.max]):(t.firstValue=n[0],t.secondValue=n[1],c()&&(e.validateEvent&&((d=o==null?void 0:o.validate)==null||d.call(o,"change").catch(D.noop)),t.oldValue=n.slice())):!e.range&&typeof n=="number"&&!Number.isNaN(n)&&(n<e.min?a(e.min):n>e.max?a(e.max):(t.firstValue=n,c()&&(e.validateEvent&&((V=o==null?void 0:o.validate)==null||V.call(o,"change").catch(D.noop)),t.oldValue=n)))};m(),u.watch(()=>t.dragging,n=>{n||m()}),u.watch(()=>e.modelValue,(n,d)=>{t.dragging||Array.isArray(n)&&Array.isArray(d)&&n.every((V,y)=>V===d[y])&&t.firstValue===n[0]&&t.secondValue===n[1]||m()},{deep:!0}),u.watch(()=>[e.min,e.max],()=>{m()})};exports.sliderContextKey=p;exports.useEventListener=J;exports.useLifecycle=fe;exports.useMarks=me;exports.useSlide=ve;exports.useSliderButton=Ve;exports.useStops=Ee;exports.useWatch=be;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|