@svar-ui/react-core 2.5.1 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +1943 -1694
- package/dist/index.es.js.map +1 -1
- package/dist-full/index.css +1 -1
- package/package.json +3 -3
- package/types/index.d.ts +72 -7
package/dist/index.es.js
CHANGED
|
@@ -1,306 +1,313 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as fe, useContext as
|
|
3
|
-
import { useWritableProp as
|
|
4
|
-
import { uid as
|
|
5
|
-
import { locale as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import { en as
|
|
8
|
-
import { en as
|
|
9
|
-
const ie = fe(""),
|
|
1
|
+
import { jsx as r, jsxs as C, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as fe, useContext as X, useState as O, useCallback as V, useRef as S, useEffect as J, useMemo as E, useLayoutEffect as pe, memo as Xe, useId as et, forwardRef as tt, useImperativeHandle as nt } from "react";
|
|
3
|
+
import { useWritableProp as U, snippet as oe, useHotkeys as rt } from "@svar-ui/lib-react";
|
|
4
|
+
import { uid as ae, env as ge, calculatePosition as We, getAbsParent as Ye, clickOutside as Ne, locale as je, locateID as lt, getDuodecade as Je, dateToString as re, delegateClick as Ge, setEnv as st } from "@svar-ui/lib-dom";
|
|
5
|
+
import { locale as Mn } from "@svar-ui/lib-dom";
|
|
6
|
+
import { createPortal as ct } from "react-dom";
|
|
7
|
+
import { en as _e } from "@svar-ui/core-locales";
|
|
8
|
+
import { en as Cn } from "@svar-ui/core-locales";
|
|
9
|
+
const ie = fe(""), Ue = fe({}), K = fe(null), ue = fe(null), qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10
10
|
__proto__: null,
|
|
11
11
|
fieldId: ue,
|
|
12
|
-
helpers:
|
|
13
|
-
i18n:
|
|
12
|
+
helpers: Ue,
|
|
13
|
+
i18n: K,
|
|
14
14
|
theme: ie
|
|
15
15
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16
|
-
function
|
|
17
|
-
const n =
|
|
16
|
+
function te(e) {
|
|
17
|
+
const n = X(ue), [t] = O(() => e || n || ae());
|
|
18
18
|
return t;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Kt({
|
|
21
21
|
value: e = "",
|
|
22
22
|
id: n,
|
|
23
23
|
placeholder: t = "",
|
|
24
24
|
title: s = "",
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
tooltip: l,
|
|
26
|
+
disabled: i = !1,
|
|
27
|
+
error: a = !1,
|
|
28
|
+
readonly: o = !1,
|
|
29
|
+
css: c = "",
|
|
30
|
+
onChange: u
|
|
29
31
|
}) {
|
|
30
|
-
const
|
|
31
|
-
(
|
|
32
|
-
const
|
|
33
|
-
w(
|
|
32
|
+
const d = te(n), [p, w] = U(e), h = V(
|
|
33
|
+
(f) => {
|
|
34
|
+
const x = f.target.value;
|
|
35
|
+
w(x), u && u({ value: x, input: !0 });
|
|
34
36
|
},
|
|
35
|
-
[
|
|
36
|
-
),
|
|
37
|
-
(
|
|
38
|
-
const
|
|
39
|
-
w(
|
|
37
|
+
[u]
|
|
38
|
+
), v = V(
|
|
39
|
+
(f) => {
|
|
40
|
+
const x = f.target.value;
|
|
41
|
+
w(x), u && u({ value: x });
|
|
40
42
|
},
|
|
41
|
-
[
|
|
42
|
-
),
|
|
43
|
-
return
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
|
|
43
|
+
[u]
|
|
44
|
+
), N = S(null);
|
|
45
|
+
return J(() => {
|
|
46
|
+
const f = v, x = N.current;
|
|
47
|
+
return x.addEventListener("change", f), () => {
|
|
48
|
+
x && x.removeEventListener("change", f);
|
|
47
49
|
};
|
|
48
|
-
}, [
|
|
50
|
+
}, [v]), /* @__PURE__ */ r(
|
|
49
51
|
"textarea",
|
|
50
52
|
{
|
|
51
|
-
className: `wx-3yFVAC wx-textarea ${
|
|
52
|
-
id:
|
|
53
|
-
disabled:
|
|
53
|
+
className: `wx-3yFVAC wx-textarea ${c} ${a ? "wx-error" : ""}`,
|
|
54
|
+
id: d,
|
|
55
|
+
disabled: i,
|
|
54
56
|
placeholder: t,
|
|
55
|
-
readOnly:
|
|
57
|
+
readOnly: o,
|
|
56
58
|
title: s,
|
|
57
|
-
value:
|
|
58
|
-
onInput:
|
|
59
|
-
ref:
|
|
59
|
+
value: p,
|
|
60
|
+
onInput: h,
|
|
61
|
+
ref: N,
|
|
62
|
+
"data-tooltip-text": l
|
|
60
63
|
}
|
|
61
64
|
);
|
|
62
65
|
}
|
|
63
|
-
function
|
|
66
|
+
function le({
|
|
64
67
|
type: e = "",
|
|
65
68
|
css: n = "",
|
|
66
69
|
icon: t = "",
|
|
67
70
|
disabled: s = !1,
|
|
68
|
-
title:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
title: l = "",
|
|
72
|
+
tooltip: i,
|
|
73
|
+
text: a = "",
|
|
74
|
+
children: o,
|
|
71
75
|
onClick: c
|
|
72
76
|
}) {
|
|
73
|
-
const
|
|
74
|
-
let
|
|
75
|
-
return n + (n ? " " : "") +
|
|
76
|
-
}, [e, n]),
|
|
77
|
-
c && c(
|
|
77
|
+
const u = E(() => {
|
|
78
|
+
let p = e ? e.split(" ").filter((w) => w !== "").map((w) => "wx-" + w).join(" ") : "";
|
|
79
|
+
return n + (n ? " " : "") + p;
|
|
80
|
+
}, [e, n]), d = (p) => {
|
|
81
|
+
c && c(p);
|
|
78
82
|
};
|
|
79
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ C(
|
|
80
84
|
"button",
|
|
81
85
|
{
|
|
82
|
-
title:
|
|
83
|
-
className: `wx-2ZWgb4 wx-button ${
|
|
86
|
+
title: l,
|
|
87
|
+
className: `wx-2ZWgb4 wx-button ${u} ${t && !o ? "wx-icon" : ""}`,
|
|
84
88
|
disabled: s,
|
|
85
|
-
onClick:
|
|
89
|
+
onClick: d,
|
|
90
|
+
"data-tooltip-text": i,
|
|
86
91
|
children: [
|
|
87
|
-
t && /* @__PURE__ */
|
|
88
|
-
|
|
92
|
+
t && /* @__PURE__ */ r("i", { className: "wx-2ZWgb4 " + t }),
|
|
93
|
+
o || a || " "
|
|
89
94
|
]
|
|
90
95
|
}
|
|
91
96
|
);
|
|
92
97
|
}
|
|
93
|
-
function
|
|
98
|
+
function Ze({
|
|
94
99
|
id: e,
|
|
95
100
|
label: n = "",
|
|
96
101
|
inputValue: t = "",
|
|
97
102
|
value: s = !1,
|
|
98
|
-
onChange:
|
|
99
|
-
disabled:
|
|
100
|
-
|
|
103
|
+
onChange: l,
|
|
104
|
+
disabled: i = !1,
|
|
105
|
+
css: a = ""
|
|
101
106
|
}) {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
const o = te(e), [c, u] = U(s), d = ({ target: p }) => {
|
|
108
|
+
const w = p.checked;
|
|
109
|
+
u(w), l && l({ value: w, inputValue: t });
|
|
110
|
+
};
|
|
111
|
+
return /* @__PURE__ */ C("div", { className: `wx-2IvefP wx-checkbox ${a}`, children: [
|
|
112
|
+
/* @__PURE__ */ r(
|
|
105
113
|
"input",
|
|
106
114
|
{
|
|
107
115
|
type: "checkbox",
|
|
108
|
-
id:
|
|
109
|
-
disabled:
|
|
116
|
+
id: o,
|
|
117
|
+
disabled: i,
|
|
110
118
|
className: "wx-2IvefP wx-check",
|
|
111
|
-
checked:
|
|
119
|
+
checked: c,
|
|
112
120
|
value: t,
|
|
113
|
-
onChange:
|
|
114
|
-
const p = d.checked;
|
|
115
|
-
o(p), r && r({ value: p, inputValue: t });
|
|
116
|
-
}
|
|
121
|
+
onChange: d
|
|
117
122
|
}
|
|
118
123
|
),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
n && /* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ C("label", { htmlFor: o, className: "wx-2IvefP wx-label", children: [
|
|
125
|
+
/* @__PURE__ */ r("span", { className: "wx-2IvefP wx-before" }),
|
|
126
|
+
n && /* @__PURE__ */ r("span", { className: "wx-2IvefP wx-after", children: n })
|
|
122
127
|
] })
|
|
123
128
|
] });
|
|
124
129
|
}
|
|
125
|
-
function
|
|
130
|
+
function Xt({
|
|
126
131
|
options: e = [],
|
|
127
132
|
value: n = [],
|
|
128
133
|
type: t = "",
|
|
129
|
-
|
|
134
|
+
css: s = "",
|
|
135
|
+
onChange: l
|
|
130
136
|
}) {
|
|
131
|
-
const
|
|
132
|
-
(
|
|
133
|
-
let
|
|
134
|
-
|
|
137
|
+
const i = V(
|
|
138
|
+
(a) => {
|
|
139
|
+
let o;
|
|
140
|
+
a.value ? o = [...n, a.inputValue] : o = n.filter((c) => c !== a.inputValue), l && l({ value: o });
|
|
135
141
|
},
|
|
136
|
-
[n,
|
|
142
|
+
[n, l]
|
|
137
143
|
);
|
|
138
|
-
return /* @__PURE__ */
|
|
139
|
-
|
|
144
|
+
return /* @__PURE__ */ r(ue.Provider, { value: null, children: /* @__PURE__ */ r("div", { className: `wx-q8xwRD wx-checkboxgroup ${t && `wx-${t}`} ${s}`, children: e.map((a) => /* @__PURE__ */ r("div", { className: "wx-q8xwRD wx-item", children: /* @__PURE__ */ r(
|
|
145
|
+
Ze,
|
|
140
146
|
{
|
|
141
|
-
label:
|
|
142
|
-
inputValue:
|
|
143
|
-
value: n.includes(
|
|
144
|
-
onChange:
|
|
147
|
+
label: a.label,
|
|
148
|
+
inputValue: a.id,
|
|
149
|
+
value: n.includes(a.id),
|
|
150
|
+
onChange: i
|
|
145
151
|
}
|
|
146
|
-
) },
|
|
152
|
+
) }, a.id)) }) });
|
|
147
153
|
}
|
|
148
|
-
function
|
|
149
|
-
const s =
|
|
154
|
+
function Qe({ theme: e = "", target: n, children: t }) {
|
|
155
|
+
const s = S(null), l = S(null), [i, a] = O(null);
|
|
150
156
|
s.current || (s.current = document.createElement("div"));
|
|
151
|
-
const
|
|
152
|
-
return
|
|
153
|
-
|
|
154
|
-
n ||
|
|
157
|
+
const o = X(ie);
|
|
158
|
+
return J(() => {
|
|
159
|
+
a(
|
|
160
|
+
n || ot(l.current) || ge.getTopNode(l.current)
|
|
155
161
|
);
|
|
156
|
-
}, [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
|
|
159
|
-
/* @__PURE__ */
|
|
162
|
+
}, [l.current]), /* @__PURE__ */ C(Q, { children: [
|
|
163
|
+
/* @__PURE__ */ r("span", { ref: l, style: { display: "none" } }),
|
|
164
|
+
l.current && i ? ct(
|
|
165
|
+
/* @__PURE__ */ r(
|
|
160
166
|
"div",
|
|
161
167
|
{
|
|
162
|
-
className: `wx-3ZWsT0 wx-${e ||
|
|
168
|
+
className: `wx-3ZWsT0 wx-${e || o}-theme`,
|
|
163
169
|
children: t
|
|
164
170
|
}
|
|
165
171
|
),
|
|
166
|
-
|
|
172
|
+
i
|
|
167
173
|
) : null
|
|
168
174
|
] });
|
|
169
175
|
}
|
|
170
|
-
function
|
|
171
|
-
const n =
|
|
176
|
+
function ot(e) {
|
|
177
|
+
const n = ge.getTopNode(e);
|
|
172
178
|
for (; e && e !== n && !e.getAttribute("data-wx-portal-root"); )
|
|
173
179
|
e = e.parentNode;
|
|
174
180
|
return e;
|
|
175
181
|
}
|
|
176
|
-
function
|
|
182
|
+
function at({
|
|
177
183
|
left: e = 0,
|
|
178
184
|
top: n = 0,
|
|
179
185
|
at: t = "bottom",
|
|
180
186
|
parent: s = null,
|
|
181
|
-
width:
|
|
182
|
-
css:
|
|
183
|
-
onCancel:
|
|
184
|
-
children:
|
|
185
|
-
trackScroll:
|
|
187
|
+
width: l = "auto",
|
|
188
|
+
css: i = "",
|
|
189
|
+
onCancel: a,
|
|
190
|
+
children: o,
|
|
191
|
+
trackScroll: c = !1
|
|
186
192
|
}) {
|
|
187
|
-
const [
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}, [
|
|
191
|
-
function b
|
|
192
|
-
return s && (
|
|
193
|
+
const [u, d] = O(0), [p, w] = O(0), [h, v] = O("auto"), [N, f] = O(!1), x = S(null), m = S(null), g = S(a);
|
|
194
|
+
J(() => {
|
|
195
|
+
g.current = a;
|
|
196
|
+
}, [a]);
|
|
197
|
+
function T(b) {
|
|
198
|
+
return s && (l + "").indexOf("%") > -1 ? l.replace(/(\d+)%/, (y, A) => (A = A * s.offsetWidth / 100 + "px", l.replace(y, A))) : l && l !== "auto" ? l : b;
|
|
193
199
|
}
|
|
194
|
-
const
|
|
195
|
-
if (!
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
}, [
|
|
199
|
-
return
|
|
200
|
-
const
|
|
201
|
-
|
|
200
|
+
const k = V(() => {
|
|
201
|
+
if (!x.current) return;
|
|
202
|
+
const b = We(x.current, s, t, e, n);
|
|
203
|
+
b && (d(b.x), w(b.y), v(T(b.width)));
|
|
204
|
+
}, [x, s, t, e, n, l]);
|
|
205
|
+
return pe(() => {
|
|
206
|
+
const b = (A) => {
|
|
207
|
+
g.current && A.target !== m.current && x.current && !x.current.contains(A.target) && g.current(A);
|
|
202
208
|
};
|
|
209
|
+
let y;
|
|
203
210
|
return requestAnimationFrame(() => {
|
|
204
|
-
|
|
211
|
+
k(), f(!0), c && x.current && (m.current = Ye(x.current), m.current && m.current.addEventListener("scroll", b, !0)), s && (y = new ResizeObserver(k), y.observe(s));
|
|
205
212
|
}), () => {
|
|
206
|
-
|
|
213
|
+
c && m.current && m.current.removeEventListener("scroll", b, !0), y?.disconnect();
|
|
207
214
|
};
|
|
208
|
-
}, []),
|
|
209
|
-
|
|
210
|
-
}, [s, t, e, n]),
|
|
211
|
-
const
|
|
212
|
-
|
|
215
|
+
}, []), pe(() => {
|
|
216
|
+
k();
|
|
217
|
+
}, [s, t, e, n]), J(() => {
|
|
218
|
+
const b = (y) => {
|
|
219
|
+
g.current && g.current(y);
|
|
213
220
|
};
|
|
214
|
-
if (
|
|
215
|
-
return
|
|
216
|
-
}, []), /* @__PURE__ */
|
|
221
|
+
if (x.current)
|
|
222
|
+
return Ne(x.current, { callback: b, parent: () => s }).destroy;
|
|
223
|
+
}, [s]), /* @__PURE__ */ r(
|
|
217
224
|
"div",
|
|
218
225
|
{
|
|
219
|
-
ref:
|
|
220
|
-
className: ["wx-37M6Fj", "wx-popup",
|
|
226
|
+
ref: x,
|
|
227
|
+
className: ["wx-37M6Fj", "wx-popup", i].filter(Boolean).join(" "),
|
|
221
228
|
style: {
|
|
222
229
|
position: "absolute",
|
|
223
|
-
visibility:
|
|
224
|
-
top:
|
|
225
|
-
left:
|
|
226
|
-
width:
|
|
230
|
+
visibility: N ? "visible" : "hidden",
|
|
231
|
+
top: p + "px",
|
|
232
|
+
left: u + "px",
|
|
233
|
+
width: h
|
|
227
234
|
},
|
|
228
|
-
children:
|
|
235
|
+
children: o
|
|
229
236
|
}
|
|
230
237
|
);
|
|
231
238
|
}
|
|
232
|
-
function
|
|
239
|
+
function it({
|
|
233
240
|
position: e = "bottom",
|
|
234
241
|
align: n = "start",
|
|
235
242
|
autoFit: t = !0,
|
|
236
243
|
onCancel: s = null,
|
|
237
|
-
width:
|
|
238
|
-
css:
|
|
239
|
-
children:
|
|
244
|
+
width: l = "100%",
|
|
245
|
+
css: i = "",
|
|
246
|
+
children: a
|
|
240
247
|
}) {
|
|
241
|
-
const
|
|
242
|
-
return
|
|
243
|
-
|
|
244
|
-
}, [s]),
|
|
248
|
+
const o = S(null), [c, u] = O(e), [d, p] = O(n), w = S(s);
|
|
249
|
+
return J(() => {
|
|
250
|
+
w.current = s;
|
|
251
|
+
}, [s]), J(() => {
|
|
245
252
|
if (t) {
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
const
|
|
249
|
-
|
|
253
|
+
const h = o.current;
|
|
254
|
+
if (h) {
|
|
255
|
+
const v = h.getBoundingClientRect(), N = document.body.getBoundingClientRect();
|
|
256
|
+
v.right >= N.right && p("end"), v.bottom >= N.bottom && u("top");
|
|
250
257
|
}
|
|
251
258
|
}
|
|
252
|
-
}, []),
|
|
253
|
-
if (
|
|
254
|
-
const
|
|
255
|
-
|
|
259
|
+
}, []), J(() => {
|
|
260
|
+
if (o.current) {
|
|
261
|
+
const h = (v) => {
|
|
262
|
+
w.current && w.current(v);
|
|
256
263
|
};
|
|
257
|
-
return
|
|
264
|
+
return Ne(o.current, h).destroy;
|
|
258
265
|
}
|
|
259
|
-
}, []), /* @__PURE__ */
|
|
266
|
+
}, []), /* @__PURE__ */ r(
|
|
260
267
|
"div",
|
|
261
268
|
{
|
|
262
|
-
ref:
|
|
269
|
+
ref: o,
|
|
263
270
|
className: [
|
|
264
271
|
"wx-dropdown",
|
|
265
|
-
`wx-${
|
|
266
|
-
|
|
272
|
+
`wx-${c}-${d}`,
|
|
273
|
+
i || "",
|
|
267
274
|
"wx-aaaVytZW"
|
|
268
275
|
].filter(Boolean).join(" "),
|
|
269
|
-
style: { width:
|
|
270
|
-
children:
|
|
276
|
+
style: { width: l },
|
|
277
|
+
children: a
|
|
271
278
|
}
|
|
272
279
|
);
|
|
273
280
|
}
|
|
274
|
-
function
|
|
281
|
+
function se({
|
|
275
282
|
position: e = "bottom",
|
|
276
283
|
align: n = "start",
|
|
277
284
|
autoFit: t = !0,
|
|
278
285
|
inline: s = !1,
|
|
279
|
-
onCancel:
|
|
280
|
-
width:
|
|
281
|
-
children:
|
|
282
|
-
...
|
|
286
|
+
onCancel: l,
|
|
287
|
+
width: i = "100%",
|
|
288
|
+
children: a,
|
|
289
|
+
...o
|
|
283
290
|
}) {
|
|
284
|
-
const [
|
|
285
|
-
return
|
|
286
|
-
|
|
287
|
-
}, []), /* @__PURE__ */
|
|
288
|
-
|
|
289
|
-
|
|
291
|
+
const [c, u] = O(void 0), d = S(null), p = E(() => `${e}-${n}`, [e, n]);
|
|
292
|
+
return pe(() => {
|
|
293
|
+
d.current && u(d.current.parentNode);
|
|
294
|
+
}, []), /* @__PURE__ */ C(Q, { children: [
|
|
295
|
+
c && (s ? /* @__PURE__ */ r(
|
|
296
|
+
it,
|
|
290
297
|
{
|
|
291
|
-
onCancel:
|
|
298
|
+
onCancel: l,
|
|
292
299
|
position: e,
|
|
293
300
|
align: n,
|
|
294
301
|
autoFit: t,
|
|
295
|
-
width:
|
|
296
|
-
...
|
|
297
|
-
children:
|
|
302
|
+
width: i,
|
|
303
|
+
...o,
|
|
304
|
+
children: a
|
|
298
305
|
}
|
|
299
|
-
) : /* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */
|
|
306
|
+
) : /* @__PURE__ */ r(Qe, { children: /* @__PURE__ */ r(at, { parent: c, at: p, onCancel: l, width: i, ...o, children: a }) })),
|
|
307
|
+
/* @__PURE__ */ r("span", { ref: d, className: "wx-portal-node wx-32GZ52" })
|
|
301
308
|
] });
|
|
302
309
|
}
|
|
303
|
-
const
|
|
310
|
+
const ut = [
|
|
304
311
|
"#00a037",
|
|
305
312
|
"#37a9ef",
|
|
306
313
|
"#f5a623",
|
|
@@ -309,93 +316,103 @@ const st = [
|
|
|
309
316
|
"#000000",
|
|
310
317
|
"#ffffff"
|
|
311
318
|
];
|
|
312
|
-
function
|
|
313
|
-
colors: e =
|
|
319
|
+
function en({
|
|
320
|
+
colors: e = ut,
|
|
314
321
|
value: n = "",
|
|
315
322
|
onChange: t,
|
|
316
323
|
id: s,
|
|
317
|
-
clear:
|
|
318
|
-
placeholder:
|
|
319
|
-
title:
|
|
324
|
+
clear: l = !1,
|
|
325
|
+
placeholder: i = "",
|
|
326
|
+
title: a = "",
|
|
327
|
+
tooltip: o,
|
|
320
328
|
disabled: c = !1,
|
|
321
|
-
error:
|
|
322
|
-
|
|
329
|
+
error: u = !1,
|
|
330
|
+
css: d = "",
|
|
331
|
+
dropdown: p = {}
|
|
323
332
|
}) {
|
|
324
|
-
const w =
|
|
325
|
-
(
|
|
326
|
-
|
|
333
|
+
const w = te(s), [h, v] = O(n), [N, f] = O(!1), x = V(
|
|
334
|
+
(T, k) => {
|
|
335
|
+
T.stopPropagation(), v(k), f(!1), t && t({ value: k });
|
|
327
336
|
},
|
|
328
337
|
[t]
|
|
329
|
-
),
|
|
330
|
-
(
|
|
331
|
-
|
|
338
|
+
), m = V(
|
|
339
|
+
(T) => {
|
|
340
|
+
T.stopPropagation(), v(""), t && t({ value: "" });
|
|
332
341
|
},
|
|
333
342
|
[t]
|
|
334
|
-
),
|
|
343
|
+
), g = V(() => {
|
|
335
344
|
if (c) return !1;
|
|
336
|
-
|
|
345
|
+
f(!0);
|
|
337
346
|
}, [c]);
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
347
|
+
return /* @__PURE__ */ C(
|
|
348
|
+
"div",
|
|
349
|
+
{
|
|
350
|
+
className: "wx-121TgJ wx-colorselect " + d,
|
|
351
|
+
onClick: g,
|
|
352
|
+
"data-tooltip-text": o,
|
|
353
|
+
children: [
|
|
354
|
+
/* @__PURE__ */ r(
|
|
355
|
+
"input",
|
|
356
|
+
{
|
|
357
|
+
className: "wx-121TgJ wx-input" + (u ? " wx-error" : "") + (N ? " wx-focus" : ""),
|
|
358
|
+
title: a,
|
|
359
|
+
value: h,
|
|
360
|
+
readOnly: !0,
|
|
361
|
+
id: w,
|
|
362
|
+
placeholder: i,
|
|
363
|
+
disabled: c
|
|
364
|
+
}
|
|
365
|
+
),
|
|
366
|
+
l && h && !c && /* @__PURE__ */ r("i", { className: "wx-121TgJ wx-clear wxi-close", onClick: m }),
|
|
367
|
+
h ? /* @__PURE__ */ r(
|
|
368
|
+
"div",
|
|
369
|
+
{
|
|
370
|
+
className: "wx-121TgJ wx-color wx-selected",
|
|
371
|
+
style: { backgroundColor: h || "#00a037" }
|
|
372
|
+
}
|
|
373
|
+
) : /* @__PURE__ */ r("div", { className: "wx-121TgJ wx-empty wx-selected" }),
|
|
374
|
+
N && /* @__PURE__ */ r(se, { onCancel: () => f(!1), ...p, children: /* @__PURE__ */ C("div", { className: "wx-121TgJ wx-colors", children: [
|
|
375
|
+
/* @__PURE__ */ r(
|
|
376
|
+
"div",
|
|
377
|
+
{
|
|
378
|
+
className: "wx-121TgJ wx-empty",
|
|
379
|
+
onClick: (T) => x(T, "")
|
|
380
|
+
}
|
|
381
|
+
),
|
|
382
|
+
e.map((T, k) => /* @__PURE__ */ r(
|
|
383
|
+
"div",
|
|
384
|
+
{
|
|
385
|
+
className: "wx-121TgJ wx-color",
|
|
386
|
+
style: { backgroundColor: T },
|
|
387
|
+
onClick: (b) => x(b, T)
|
|
388
|
+
},
|
|
389
|
+
k
|
|
390
|
+
))
|
|
391
|
+
] }) })
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
);
|
|
378
395
|
}
|
|
379
|
-
function
|
|
380
|
-
const t = e.firstChild, { moveBlockSlider: s, moveLineSlider:
|
|
381
|
-
function
|
|
382
|
-
|
|
396
|
+
function $e(e, n) {
|
|
397
|
+
const t = e.firstChild, { moveBlockSlider: s, moveLineSlider: l } = n || {};
|
|
398
|
+
function i(c) {
|
|
399
|
+
a(c), t.focus(), window.addEventListener("mousemove", a), window.addEventListener("mouseup", o);
|
|
383
400
|
}
|
|
384
|
-
function
|
|
385
|
-
let
|
|
386
|
-
const
|
|
387
|
-
|
|
401
|
+
function a(c) {
|
|
402
|
+
let u, d, p, w;
|
|
403
|
+
const h = e.getBoundingClientRect();
|
|
404
|
+
u = h.left, d = h.top, p = c.clientX - u, w = c.clientY - d, s && n.moveBlockSlider(p, w), l && n.moveLineSlider(p);
|
|
388
405
|
}
|
|
389
|
-
function
|
|
390
|
-
t.blur(), window.removeEventListener("mousemove",
|
|
406
|
+
function o() {
|
|
407
|
+
t.blur(), window.removeEventListener("mousemove", a), window.removeEventListener("mouseup", o);
|
|
391
408
|
}
|
|
392
|
-
return e.addEventListener("mousedown",
|
|
409
|
+
return e.addEventListener("mousedown", i), {
|
|
393
410
|
destroy() {
|
|
394
|
-
e.removeEventListener("mousedown",
|
|
411
|
+
e.removeEventListener("mousedown", i);
|
|
395
412
|
}
|
|
396
413
|
};
|
|
397
414
|
}
|
|
398
|
-
const
|
|
415
|
+
const ce = {
|
|
399
416
|
_toHex: [
|
|
400
417
|
"0",
|
|
401
418
|
"1",
|
|
@@ -433,38 +450,38 @@ const se = {
|
|
|
433
450
|
hexToRgb(e) {
|
|
434
451
|
e = e.charAt(0) === "#" ? e.slice(1) : e;
|
|
435
452
|
const n = e.match(/.{1,2}/g);
|
|
436
|
-
let [t, s,
|
|
437
|
-
return t = this.hexToDec(t), s = this.hexToDec(s),
|
|
453
|
+
let [t, s, l] = n;
|
|
454
|
+
return t = this.hexToDec(t), s = this.hexToDec(s), l = this.hexToDec(l), [t, s, l];
|
|
438
455
|
},
|
|
439
456
|
hsvToRgb(e, n, t) {
|
|
440
|
-
let s,
|
|
441
|
-
switch (s = Math.floor(e / 60) % 6,
|
|
457
|
+
let s, l, i, a, o, c, u, d;
|
|
458
|
+
switch (s = Math.floor(e / 60) % 6, l = e / 60 - s, i = t * (1 - n), a = t * (1 - l * n), o = t * (1 - (1 - l) * n), c = 0, u = 0, d = 0, s) {
|
|
442
459
|
case 0:
|
|
443
|
-
|
|
460
|
+
c = t, u = o, d = i;
|
|
444
461
|
break;
|
|
445
462
|
case 1:
|
|
446
|
-
|
|
463
|
+
c = a, u = t, d = i;
|
|
447
464
|
break;
|
|
448
465
|
case 2:
|
|
449
|
-
|
|
466
|
+
c = i, u = t, d = o;
|
|
450
467
|
break;
|
|
451
468
|
case 3:
|
|
452
|
-
|
|
469
|
+
c = i, u = a, d = t;
|
|
453
470
|
break;
|
|
454
471
|
case 4:
|
|
455
|
-
|
|
472
|
+
c = o, u = i, d = t;
|
|
456
473
|
break;
|
|
457
474
|
case 5:
|
|
458
|
-
|
|
475
|
+
c = t, u = i, d = a;
|
|
459
476
|
break;
|
|
460
477
|
}
|
|
461
|
-
return
|
|
478
|
+
return c = Math.floor(c * 255), u = Math.floor(u * 255), d = Math.floor(d * 255), [c, u, d];
|
|
462
479
|
},
|
|
463
480
|
rgbToHsv(e, n, t) {
|
|
464
|
-
let s,
|
|
481
|
+
let s, l, i;
|
|
465
482
|
e /= 255, n /= 255, t /= 255;
|
|
466
|
-
let
|
|
467
|
-
return
|
|
483
|
+
let a = Math.min(e, n, t), o = Math.max(e, n, t);
|
|
484
|
+
return l = 0, s = o === 0 ? 0 : 1 - a / o, i = o, o === a ? l = 0 : o === e && n >= t ? l = 60 * (n - t) / (o - a) + 0 : o === e && n < t ? l = 60 * (n - t) / (o - a) + 360 : o === n ? l = 60 * (t - e) / (o - a) + 120 : o === t && (l = 60 * (e - n) / (o - a) + 240), [l, s, i];
|
|
468
485
|
},
|
|
469
486
|
hexToHvs(e) {
|
|
470
487
|
const n = this.hexToRgb(e);
|
|
@@ -474,83 +491,84 @@ const se = {
|
|
|
474
491
|
const s = this.hsvToRgb(e, n, t);
|
|
475
492
|
return "#" + this.rgbToHex(s).toUpperCase();
|
|
476
493
|
}
|
|
477
|
-
},
|
|
478
|
-
function
|
|
479
|
-
return e ? (e = e.toString(16), e.charAt(0) === "#" && (e = e.slice(1)),
|
|
494
|
+
}, dt = (e) => /^([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
|
|
495
|
+
function Te(e) {
|
|
496
|
+
return e ? (e = e.toString(16), e.charAt(0) === "#" && (e = e.slice(1)), dt(e) ? (e.length === 3 && (e = e.slice(0, 3).split("").reduce((n, t) => n + t + t, "")), `#${e.toUpperCase()}`) : null) : null;
|
|
480
497
|
}
|
|
481
|
-
function
|
|
482
|
-
return
|
|
498
|
+
function ne() {
|
|
499
|
+
return je(_e);
|
|
483
500
|
}
|
|
484
501
|
const Ve = "Block", Re = "Line";
|
|
485
|
-
function
|
|
502
|
+
function ft({
|
|
486
503
|
value: e = "#65D3B3",
|
|
487
504
|
button: n = !1,
|
|
488
|
-
|
|
505
|
+
css: t = "",
|
|
506
|
+
onChange: s
|
|
489
507
|
}) {
|
|
490
|
-
const
|
|
491
|
-
() =>
|
|
492
|
-
[
|
|
493
|
-
),
|
|
494
|
-
(L,
|
|
495
|
-
const { width:
|
|
496
|
-
|
|
497
|
-
let
|
|
498
|
-
const I =
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
508
|
+
const l = (X(K) || ne()).getGroup("core"), i = S(null), a = S(null), [o, c] = O(), [u, d] = O(), [p, w] = O(), [h, v] = O(), [N, f] = U(e), [x, m] = O(e), g = S(null), T = S(null), k = E(() => Te(N) || "#65D3B3", [N]), b = E(
|
|
509
|
+
() => ce.hvsToHex(p || 0, 1, 1),
|
|
510
|
+
[p]
|
|
511
|
+
), y = V(
|
|
512
|
+
(L, B) => {
|
|
513
|
+
const { width: _, height: Z } = i.current.getBoundingClientRect();
|
|
514
|
+
B < 0 ? B = 0 : B > Z && (B = Z), L < 0 ? L = 0 : L > _ && (L = _), c(B), d(L);
|
|
515
|
+
let F, j;
|
|
516
|
+
const I = _ / 100, $ = Z / 100;
|
|
517
|
+
F = Math.ceil(L / I) / 100, j = Math.ceil(Math.abs(B / $ - 100)) / 100;
|
|
518
|
+
const M = ce.hvsToHex(
|
|
519
|
+
p,
|
|
520
|
+
F,
|
|
521
|
+
j
|
|
504
522
|
);
|
|
505
|
-
f(
|
|
523
|
+
f(M), m(M), s && s({ value: M, input: !0 });
|
|
506
524
|
},
|
|
507
|
-
[
|
|
508
|
-
),
|
|
525
|
+
[k, p, s]
|
|
526
|
+
), A = V(
|
|
509
527
|
(L) => {
|
|
510
|
-
const
|
|
511
|
-
L < 0 ? L = 0 : L >
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
let
|
|
515
|
-
[,
|
|
516
|
-
const I =
|
|
517
|
-
f(I), m(I),
|
|
528
|
+
const B = a.current.getBoundingClientRect().width;
|
|
529
|
+
L < 0 ? L = 0 : L > B && (L = B);
|
|
530
|
+
const _ = Math.round(L * 359 / B), Z = Math.max(Math.min(_, 359), 0);
|
|
531
|
+
w(Z), v(L);
|
|
532
|
+
let F, j;
|
|
533
|
+
[, F, j] = ce.hexToHvs(k);
|
|
534
|
+
const I = ce.hvsToHex(Z, F, j);
|
|
535
|
+
f(I), m(I), s && s({ value: I, input: !0 });
|
|
518
536
|
},
|
|
519
|
-
[
|
|
537
|
+
[k, s]
|
|
520
538
|
);
|
|
521
|
-
g.current =
|
|
522
|
-
const
|
|
523
|
-
const [
|
|
524
|
-
if (
|
|
525
|
-
const { width:
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
),
|
|
539
|
+
g.current = y, T.current = A;
|
|
540
|
+
const P = V((L) => {
|
|
541
|
+
const [B, _, Z] = ce.hexToHvs(L || k);
|
|
542
|
+
if (w(B), i.current) {
|
|
543
|
+
const { width: F, height: j } = i.current.getBoundingClientRect();
|
|
544
|
+
a.current && v(
|
|
545
|
+
B * a.current.getBoundingClientRect().width / 359
|
|
546
|
+
), d(_ * F), c(Math.abs(j * (Z - 1)));
|
|
529
547
|
}
|
|
530
|
-
}, [
|
|
548
|
+
}, [k]), R = V(
|
|
531
549
|
({ target: L }) => {
|
|
532
|
-
const
|
|
533
|
-
m(L.value),
|
|
550
|
+
const B = Te(L.value);
|
|
551
|
+
m(L.value), B && (f(B), s && s({ value: B, input: !0 }), P(B));
|
|
534
552
|
},
|
|
535
|
-
[
|
|
536
|
-
),
|
|
553
|
+
[s, P]
|
|
554
|
+
), Y = V(
|
|
537
555
|
(L) => {
|
|
538
|
-
L.stopPropagation(),
|
|
556
|
+
L.stopPropagation(), s && s({ value: k });
|
|
539
557
|
},
|
|
540
|
-
[
|
|
541
|
-
),
|
|
558
|
+
[k, s]
|
|
559
|
+
), G = V(
|
|
542
560
|
(L) => {
|
|
543
|
-
const
|
|
544
|
-
let
|
|
545
|
-
const
|
|
546
|
-
if (
|
|
547
|
-
switch (
|
|
561
|
+
const B = L.target, _ = B.getAttribute("data-slider") === Ve, Z = B.getAttribute("data-slider") === Re;
|
|
562
|
+
let F = window.getComputedStyle(B), j = parseFloat(F.left), I = parseFloat(F.top);
|
|
563
|
+
const $ = L.code;
|
|
564
|
+
if (_) {
|
|
565
|
+
switch ($) {
|
|
548
566
|
case "ArrowLeft": {
|
|
549
|
-
|
|
567
|
+
j--;
|
|
550
568
|
break;
|
|
551
569
|
}
|
|
552
570
|
case "ArrowRight": {
|
|
553
|
-
|
|
571
|
+
j++;
|
|
554
572
|
break;
|
|
555
573
|
}
|
|
556
574
|
case "ArrowDown": {
|
|
@@ -564,788 +582,804 @@ function ot({
|
|
|
564
582
|
default:
|
|
565
583
|
return;
|
|
566
584
|
}
|
|
567
|
-
|
|
585
|
+
y(j, I);
|
|
568
586
|
}
|
|
569
|
-
if (
|
|
570
|
-
if (
|
|
571
|
-
else if (
|
|
587
|
+
if (Z) {
|
|
588
|
+
if ($ === "ArrowLeft" || $ === "ArrowDown") j--;
|
|
589
|
+
else if ($ === "ArrowRight" || $ === "ArrowUp") j++;
|
|
572
590
|
else return;
|
|
573
|
-
|
|
591
|
+
A(j);
|
|
574
592
|
}
|
|
575
593
|
L.preventDefault();
|
|
576
594
|
},
|
|
577
|
-
[
|
|
595
|
+
[y, A]
|
|
578
596
|
);
|
|
579
|
-
|
|
597
|
+
J(() => {
|
|
580
598
|
const L = [];
|
|
581
|
-
return
|
|
582
|
-
|
|
583
|
-
moveBlockSlider: (
|
|
584
|
-
g.current?.(
|
|
599
|
+
return i.current && L.push(
|
|
600
|
+
$e(i.current, {
|
|
601
|
+
moveBlockSlider: (B, _) => {
|
|
602
|
+
g.current?.(B, _);
|
|
585
603
|
}
|
|
586
604
|
}).destroy
|
|
587
|
-
),
|
|
588
|
-
|
|
589
|
-
moveLineSlider: (
|
|
590
|
-
|
|
605
|
+
), a.current && L.push(
|
|
606
|
+
$e(a.current, {
|
|
607
|
+
moveLineSlider: (B) => {
|
|
608
|
+
T.current?.(B);
|
|
591
609
|
}
|
|
592
610
|
}).destroy
|
|
593
|
-
), requestAnimationFrame(() =>
|
|
594
|
-
L.forEach((
|
|
611
|
+
), requestAnimationFrame(() => P()), () => {
|
|
612
|
+
L.forEach((B) => B());
|
|
595
613
|
};
|
|
596
614
|
}, []);
|
|
597
|
-
const
|
|
598
|
-
return /* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */
|
|
615
|
+
const W = "wx-1yoKzq";
|
|
616
|
+
return /* @__PURE__ */ C("div", { className: W + " wx-colorboard " + t, children: [
|
|
617
|
+
/* @__PURE__ */ r(
|
|
600
618
|
"div",
|
|
601
619
|
{
|
|
602
|
-
className:
|
|
603
|
-
style: { background:
|
|
604
|
-
ref:
|
|
605
|
-
children: /* @__PURE__ */
|
|
620
|
+
className: W + " wx-color-block",
|
|
621
|
+
style: { background: b },
|
|
622
|
+
ref: i,
|
|
623
|
+
children: /* @__PURE__ */ r(
|
|
606
624
|
"div",
|
|
607
625
|
{
|
|
608
|
-
className:
|
|
626
|
+
className: W + " wx-color-block-slider wx-slider",
|
|
609
627
|
style: {
|
|
610
|
-
background:
|
|
611
|
-
top:
|
|
612
|
-
left:
|
|
628
|
+
background: k,
|
|
629
|
+
top: o + "px",
|
|
630
|
+
left: u + "px"
|
|
613
631
|
},
|
|
614
632
|
tabIndex: 0,
|
|
615
633
|
"data-slider": Ve,
|
|
616
|
-
onKeyDown:
|
|
634
|
+
onKeyDown: G
|
|
617
635
|
}
|
|
618
636
|
)
|
|
619
637
|
}
|
|
620
638
|
),
|
|
621
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ r("div", { className: W + " wx-color-line", ref: a, children: /* @__PURE__ */ r(
|
|
622
640
|
"div",
|
|
623
641
|
{
|
|
624
|
-
className:
|
|
625
|
-
style: { background:
|
|
642
|
+
className: W + " wx-color-line-slider wx-slider",
|
|
643
|
+
style: { background: b, left: h + "px" },
|
|
626
644
|
tabIndex: 0,
|
|
627
645
|
"data-slider": Re,
|
|
628
|
-
onKeyDown:
|
|
646
|
+
onKeyDown: G
|
|
629
647
|
}
|
|
630
648
|
) }),
|
|
631
|
-
/* @__PURE__ */
|
|
632
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ C("div", { className: W + " wx-color-controls", children: [
|
|
650
|
+
/* @__PURE__ */ r(
|
|
633
651
|
"div",
|
|
634
652
|
{
|
|
635
|
-
className:
|
|
636
|
-
style: { background:
|
|
653
|
+
className: W + " wx-color",
|
|
654
|
+
style: { background: k }
|
|
637
655
|
}
|
|
638
656
|
),
|
|
639
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ r(
|
|
640
658
|
"input",
|
|
641
659
|
{
|
|
642
660
|
type: "text",
|
|
643
|
-
className:
|
|
644
|
-
value:
|
|
661
|
+
className: W + " wx-text",
|
|
662
|
+
value: x,
|
|
645
663
|
onChange: R
|
|
646
664
|
}
|
|
647
665
|
)
|
|
648
666
|
] }),
|
|
649
|
-
n && /* @__PURE__ */
|
|
667
|
+
n && /* @__PURE__ */ r(le, { onClick: Y, type: "secondary", children: l("select") })
|
|
650
668
|
] });
|
|
651
669
|
}
|
|
652
|
-
function
|
|
670
|
+
function tn({
|
|
653
671
|
value: e = "",
|
|
654
672
|
id: n,
|
|
655
673
|
placeholder: t = "",
|
|
656
674
|
title: s = "",
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
675
|
+
tooltip: l,
|
|
676
|
+
disabled: i = !1,
|
|
677
|
+
error: a = !1,
|
|
678
|
+
clear: o = !1,
|
|
679
|
+
css: c = "",
|
|
680
|
+
onChange: u,
|
|
681
|
+
dropdown: d = {}
|
|
662
682
|
}) {
|
|
663
|
-
const
|
|
664
|
-
let [w,
|
|
665
|
-
const [
|
|
666
|
-
function
|
|
667
|
-
if (
|
|
668
|
-
|
|
683
|
+
const p = te(n);
|
|
684
|
+
let [w, h] = U(e);
|
|
685
|
+
const [v, N] = O(!1);
|
|
686
|
+
function f() {
|
|
687
|
+
if (i) return !1;
|
|
688
|
+
N(!0);
|
|
669
689
|
}
|
|
670
|
-
function
|
|
671
|
-
if (
|
|
672
|
-
|
|
673
|
-
const
|
|
674
|
-
|
|
690
|
+
function x(g) {
|
|
691
|
+
if (g.input) return;
|
|
692
|
+
N(!1);
|
|
693
|
+
const T = g.value;
|
|
694
|
+
h(T), u && u({ value: T });
|
|
675
695
|
}
|
|
676
|
-
function
|
|
677
|
-
|
|
696
|
+
function m(g) {
|
|
697
|
+
g.stopPropagation(), h(""), u && u({ value: "" });
|
|
678
698
|
}
|
|
679
|
-
return /* @__PURE__ */
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
699
|
+
return /* @__PURE__ */ C(
|
|
700
|
+
"div",
|
|
701
|
+
{
|
|
702
|
+
className: "wx-mmT8WH wx-colorpicker " + c,
|
|
703
|
+
onClick: f,
|
|
704
|
+
"data-tooltip-text": l,
|
|
705
|
+
children: [
|
|
706
|
+
/* @__PURE__ */ r(
|
|
707
|
+
"input",
|
|
708
|
+
{
|
|
709
|
+
className: "wx-mmT8WH wx-input" + (a ? " wx-error" : "") + (v ? " wx-focus" : ""),
|
|
710
|
+
title: s,
|
|
711
|
+
value: w,
|
|
712
|
+
readOnly: !0,
|
|
713
|
+
id: p,
|
|
714
|
+
placeholder: t,
|
|
715
|
+
disabled: i
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
/* @__PURE__ */ r("div", { className: "wx-mmT8WH wx-color", style: { background: w } }),
|
|
719
|
+
o && !i && w && /* @__PURE__ */ r("i", { className: "wx-mmT8WH wxi-close", onClick: m }),
|
|
720
|
+
v && /* @__PURE__ */ r(se, { onCancel: () => N(!1), ...d, children: /* @__PURE__ */ r(ft, { value: w, button: "true", onChange: x }) })
|
|
721
|
+
]
|
|
722
|
+
}
|
|
723
|
+
);
|
|
696
724
|
}
|
|
697
|
-
function
|
|
698
|
-
let e = null, n = !1, t = !1, s,
|
|
699
|
-
const
|
|
700
|
-
s =
|
|
701
|
-
},
|
|
702
|
-
e =
|
|
703
|
-
},
|
|
704
|
-
if (!t &&
|
|
705
|
-
const
|
|
706
|
-
|
|
725
|
+
function wt() {
|
|
726
|
+
let e = null, n = !1, t = !1, s, l, i, a;
|
|
727
|
+
const o = (h, v, N, f, x) => {
|
|
728
|
+
s = h, l = v, i = N, a = f, t = x;
|
|
729
|
+
}, c = (h) => {
|
|
730
|
+
e = h, n = e !== null, i(e);
|
|
731
|
+
}, u = (h, v) => {
|
|
732
|
+
if (!t && h !== null && s) {
|
|
733
|
+
const N = s.querySelectorAll(".wx-list > .wx-item")[h];
|
|
734
|
+
N && (N.scrollIntoView({ block: "nearest" }), v && v.preventDefault());
|
|
707
735
|
}
|
|
708
|
-
},
|
|
709
|
-
const
|
|
710
|
-
|
|
736
|
+
}, d = (h, v) => {
|
|
737
|
+
const N = h === null ? null : Math.max(0, Math.min(e + h, l.length - 1));
|
|
738
|
+
N !== e && (c(N), s ? u(N, v) : requestAnimationFrame(() => u(N, v)));
|
|
711
739
|
};
|
|
712
|
-
return { move: (
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
}, keydown: (
|
|
716
|
-
switch (
|
|
740
|
+
return { move: (h) => {
|
|
741
|
+
const v = lt(h), N = l.findIndex((f) => f.id === v);
|
|
742
|
+
N !== e && c(N);
|
|
743
|
+
}, keydown: (h, v) => {
|
|
744
|
+
switch (h.code) {
|
|
717
745
|
case "Enter":
|
|
718
|
-
n ?
|
|
746
|
+
n ? a() : c(0);
|
|
719
747
|
break;
|
|
720
748
|
case "Space":
|
|
721
|
-
n ||
|
|
749
|
+
n || c(0);
|
|
722
750
|
break;
|
|
723
751
|
case "Escape":
|
|
724
|
-
|
|
752
|
+
i(e = null);
|
|
725
753
|
break;
|
|
726
754
|
case "Tab":
|
|
727
|
-
|
|
755
|
+
i(e = null);
|
|
728
756
|
break;
|
|
729
757
|
case "ArrowDown":
|
|
730
|
-
|
|
758
|
+
d(n ? 1 : v || 0, h);
|
|
731
759
|
break;
|
|
732
760
|
case "ArrowUp":
|
|
733
|
-
|
|
761
|
+
d(n ? -1 : v || 0, h);
|
|
734
762
|
break;
|
|
735
763
|
}
|
|
736
|
-
}, init:
|
|
764
|
+
}, init: o, navigate: d };
|
|
737
765
|
}
|
|
738
|
-
const
|
|
739
|
-
return /* @__PURE__ */
|
|
740
|
-
t && /* @__PURE__ */
|
|
741
|
-
|
|
766
|
+
const Me = 10, xt = Xe(function({ data: n, checkboxes: t, itemTemplate: s, value: l }) {
|
|
767
|
+
return /* @__PURE__ */ C(Q, { children: [
|
|
768
|
+
t && /* @__PURE__ */ r(
|
|
769
|
+
Ze,
|
|
742
770
|
{
|
|
743
771
|
id: n.id,
|
|
744
|
-
|
|
745
|
-
value:
|
|
772
|
+
css: "wx-list-checkbox",
|
|
773
|
+
value: l && l.includes(n.id)
|
|
746
774
|
}
|
|
747
775
|
),
|
|
748
|
-
s ?
|
|
776
|
+
s ? oe(s, { option: n }) : n.label
|
|
749
777
|
] });
|
|
750
778
|
});
|
|
751
|
-
function
|
|
779
|
+
function Ie({
|
|
752
780
|
visibleItems: e,
|
|
753
781
|
visibleRange: n,
|
|
754
782
|
navIndex: t,
|
|
755
783
|
checkboxes: s,
|
|
756
|
-
|
|
757
|
-
value:
|
|
758
|
-
measureRefCallback:
|
|
784
|
+
itemTemplate: l,
|
|
785
|
+
value: i,
|
|
786
|
+
measureRefCallback: a
|
|
759
787
|
}) {
|
|
760
|
-
return e.map((
|
|
761
|
-
const
|
|
762
|
-
return /* @__PURE__ */
|
|
788
|
+
return e.map((o, c) => {
|
|
789
|
+
const u = n.start + c;
|
|
790
|
+
return /* @__PURE__ */ r(
|
|
763
791
|
"div",
|
|
764
792
|
{
|
|
765
|
-
ref:
|
|
766
|
-
className: `wx-233fr7 wx-item ${
|
|
767
|
-
"data-id":
|
|
768
|
-
children: /* @__PURE__ */
|
|
769
|
-
|
|
793
|
+
ref: c === 0 ? a : void 0,
|
|
794
|
+
className: `wx-233fr7 wx-item ${u === t ? "wx-focus" : ""}`,
|
|
795
|
+
"data-id": o.id,
|
|
796
|
+
children: /* @__PURE__ */ r(
|
|
797
|
+
xt,
|
|
770
798
|
{
|
|
771
|
-
data:
|
|
799
|
+
data: o,
|
|
772
800
|
checkboxes: s,
|
|
773
|
-
|
|
774
|
-
value:
|
|
801
|
+
itemTemplate: l,
|
|
802
|
+
value: i
|
|
775
803
|
}
|
|
776
804
|
)
|
|
777
805
|
},
|
|
778
|
-
|
|
806
|
+
o.id
|
|
779
807
|
);
|
|
780
808
|
});
|
|
781
809
|
}
|
|
782
|
-
function
|
|
810
|
+
function ke({
|
|
783
811
|
items: e = [],
|
|
784
812
|
children: n,
|
|
785
813
|
onSelect: t,
|
|
786
814
|
onReady: s,
|
|
787
|
-
virtualized:
|
|
788
|
-
checkboxes:
|
|
789
|
-
multiselect:
|
|
790
|
-
value:
|
|
791
|
-
...
|
|
815
|
+
virtualized: l = !1,
|
|
816
|
+
checkboxes: i,
|
|
817
|
+
multiselect: a,
|
|
818
|
+
value: o,
|
|
819
|
+
...c
|
|
792
820
|
}) {
|
|
793
|
-
const
|
|
794
|
-
|
|
795
|
-
|
|
821
|
+
const u = S(), d = S(!1), p = S(wt()), [w, h] = O(null), v = S(w), [N, f] = O(0), [x, m] = O(24), g = S(!1), T = (X(K) || ne()).getGroup("core"), k = S(e);
|
|
822
|
+
J(() => {
|
|
823
|
+
k.current = e;
|
|
796
824
|
}, [e]);
|
|
797
|
-
const
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
}, [
|
|
801
|
-
const
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
}, [
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
const
|
|
808
|
-
let
|
|
809
|
-
const
|
|
810
|
-
|
|
811
|
-
}, [
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
}, [
|
|
815
|
-
const
|
|
816
|
-
if (
|
|
817
|
-
let
|
|
818
|
-
|
|
825
|
+
const b = S(o);
|
|
826
|
+
J(() => {
|
|
827
|
+
b.current = o;
|
|
828
|
+
}, [o]);
|
|
829
|
+
const y = S(0);
|
|
830
|
+
J(() => {
|
|
831
|
+
y.current = x;
|
|
832
|
+
}, [x]);
|
|
833
|
+
const A = V((M) => {
|
|
834
|
+
M && M.stopPropagation();
|
|
835
|
+
const D = k.current, H = b.current, ee = v.current;
|
|
836
|
+
let z;
|
|
837
|
+
const q = D[ee]?.id;
|
|
838
|
+
a ? H && H.includes(q) ? z = H.filter((we) => we !== q) : z = [...H || [], q] : z = q, t && t({ id: z });
|
|
839
|
+
}, [a, t]), P = S(A);
|
|
840
|
+
J(() => {
|
|
841
|
+
P.current = A;
|
|
842
|
+
}, [A]);
|
|
843
|
+
const R = V((M) => {
|
|
844
|
+
if (u.current) {
|
|
845
|
+
let D = M * y.current - u.current.clientHeight + y.current;
|
|
846
|
+
f(D), u.current.scrollTop = D;
|
|
819
847
|
}
|
|
820
|
-
}, [
|
|
821
|
-
(
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
}),
|
|
848
|
+
}, [y.current]), Y = V(
|
|
849
|
+
(M) => {
|
|
850
|
+
u.current = M, l && (M && !d.current && v.current !== null && requestAnimationFrame(() => {
|
|
851
|
+
u.current && (R(v.current), d.current = !0);
|
|
852
|
+
}), M || (d.current = !1));
|
|
825
853
|
},
|
|
826
|
-
[
|
|
827
|
-
),
|
|
828
|
-
if (!
|
|
829
|
-
const
|
|
830
|
-
|
|
854
|
+
[R]
|
|
855
|
+
), G = V((M) => {
|
|
856
|
+
if (!M || g.current) return;
|
|
857
|
+
const D = M.getBoundingClientRect().height;
|
|
858
|
+
D && (m(D), y.current = D, g.current = !0);
|
|
831
859
|
}, []);
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
860
|
+
J(() => {
|
|
861
|
+
p.current.init(
|
|
862
|
+
u.current,
|
|
835
863
|
e,
|
|
836
|
-
(
|
|
837
|
-
|
|
864
|
+
(M) => {
|
|
865
|
+
h(M), v.current = M;
|
|
838
866
|
},
|
|
839
|
-
(
|
|
840
|
-
|
|
867
|
+
(M) => P.current(M),
|
|
868
|
+
l
|
|
841
869
|
);
|
|
842
|
-
}, [e,
|
|
843
|
-
const
|
|
844
|
-
|
|
845
|
-
},
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
848
|
-
const we =
|
|
849
|
-
we ?
|
|
870
|
+
}, [e, u.current, l]), J(() => {
|
|
871
|
+
const M = (H, ee) => {
|
|
872
|
+
p.current.navigate(H, ee), R(v.current);
|
|
873
|
+
}, D = (H, ee) => {
|
|
874
|
+
const z = v.current, q = k.current;
|
|
875
|
+
if (z !== 0 && z !== q.length - 1 && (H.key === "ArrowDown" || H.key === "ArrowUp") && H.preventDefault(), p.current.keydown(H, ee), u.current) {
|
|
876
|
+
const we = u.current.scrollTop <= v.current * y.current, Ke = u.current.scrollTop + u.current.clientHeight >= v.current * y.current + y.current;
|
|
877
|
+
we ? Ke || R(v.current) : (u.current.scrollTop = v.current * y.current, f(u.current.scrollTop));
|
|
850
878
|
}
|
|
851
879
|
};
|
|
852
880
|
s && s({
|
|
853
|
-
navigate:
|
|
854
|
-
keydown:
|
|
855
|
-
move:
|
|
881
|
+
navigate: l ? M : p.current.navigate,
|
|
882
|
+
keydown: l ? D : p.current.keydown,
|
|
883
|
+
move: p.current.move
|
|
856
884
|
});
|
|
857
885
|
}, []);
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
const
|
|
861
|
-
|
|
862
|
-
}, [
|
|
863
|
-
|
|
864
|
-
}, [
|
|
865
|
-
() => Math.ceil((
|
|
866
|
-
[
|
|
867
|
-
),
|
|
868
|
-
if (!
|
|
886
|
+
const W = S(0), L = S(e);
|
|
887
|
+
L.current !== e && (L.current = e, W.current += 1);
|
|
888
|
+
const B = V(() => {
|
|
889
|
+
p.current.navigate(null);
|
|
890
|
+
}, [p]), _ = V((M) => {
|
|
891
|
+
l && f(M.target.scrollTop);
|
|
892
|
+
}, [l]), Z = E(
|
|
893
|
+
() => Math.ceil((u.current?.clientHeight || 0) / x),
|
|
894
|
+
[x, N]
|
|
895
|
+
), F = E(() => {
|
|
896
|
+
if (!l) return { start: 0, end: e.length };
|
|
869
897
|
if (!e.length) return { start: 0, end: 0 };
|
|
870
|
-
const
|
|
898
|
+
const M = Math.floor(N / x), D = M + Z;
|
|
871
899
|
return {
|
|
872
|
-
start: Math.max(0,
|
|
873
|
-
end: Math.min(e.length,
|
|
900
|
+
start: Math.max(0, M - Me),
|
|
901
|
+
end: Math.min(e.length, D + Me)
|
|
874
902
|
};
|
|
875
|
-
}, [
|
|
876
|
-
if (!
|
|
877
|
-
const { start:
|
|
878
|
-
return e.slice(
|
|
879
|
-
...
|
|
903
|
+
}, [l, e, N, x, Z]), j = E(() => {
|
|
904
|
+
if (!l) return e;
|
|
905
|
+
const { start: M, end: D } = F;
|
|
906
|
+
return e.slice(M, D).map((H) => ({
|
|
907
|
+
...H
|
|
880
908
|
}));
|
|
881
|
-
}, [
|
|
882
|
-
return
|
|
883
|
-
|
|
884
|
-
}, [
|
|
909
|
+
}, [l, e, F]), I = F.start * x, $ = e.length * x;
|
|
910
|
+
return J(() => {
|
|
911
|
+
l && f(0);
|
|
912
|
+
}, [e, l]), J(() => {
|
|
913
|
+
w === null && (d.current = !1);
|
|
914
|
+
}, [w]), w === null ? null : /* @__PURE__ */ r(se, { onCancel: B, ...c, children: /* @__PURE__ */ r(
|
|
885
915
|
"div",
|
|
886
916
|
{
|
|
887
917
|
className: "wx-233fr7 wx-list",
|
|
888
|
-
ref:
|
|
889
|
-
onClick:
|
|
890
|
-
onMouseMove:
|
|
891
|
-
onScroll:
|
|
892
|
-
children: e.length ?
|
|
918
|
+
ref: Y,
|
|
919
|
+
onClick: A,
|
|
920
|
+
onMouseMove: p.current.move,
|
|
921
|
+
onScroll: _,
|
|
922
|
+
children: e.length ? l ? /* @__PURE__ */ r(
|
|
893
923
|
"div",
|
|
894
924
|
{
|
|
895
925
|
className: "wx-233fr7 wx-list-wrapper",
|
|
896
|
-
style: { height: `${
|
|
897
|
-
children: /* @__PURE__ */
|
|
926
|
+
style: { height: `${$}px` },
|
|
927
|
+
children: /* @__PURE__ */ r(
|
|
898
928
|
"div",
|
|
899
929
|
{
|
|
900
930
|
className: "wx-233fr7 wx-list-content",
|
|
901
|
-
style: { transform: `translateY(${
|
|
902
|
-
children: /* @__PURE__ */
|
|
903
|
-
|
|
931
|
+
style: { transform: `translateY(${I}px)` },
|
|
932
|
+
children: /* @__PURE__ */ r(
|
|
933
|
+
Ie,
|
|
904
934
|
{
|
|
905
|
-
visibleRange:
|
|
906
|
-
visibleItems:
|
|
907
|
-
navIndex:
|
|
908
|
-
measureRefCallback:
|
|
909
|
-
checkboxes:
|
|
910
|
-
|
|
911
|
-
value:
|
|
935
|
+
visibleRange: F,
|
|
936
|
+
visibleItems: j,
|
|
937
|
+
navIndex: w,
|
|
938
|
+
measureRefCallback: G,
|
|
939
|
+
checkboxes: i,
|
|
940
|
+
itemTemplate: n,
|
|
941
|
+
value: o
|
|
912
942
|
}
|
|
913
943
|
)
|
|
914
944
|
}
|
|
915
945
|
)
|
|
916
946
|
}
|
|
917
|
-
) : /* @__PURE__ */
|
|
918
|
-
|
|
947
|
+
) : /* @__PURE__ */ r(
|
|
948
|
+
Ie,
|
|
919
949
|
{
|
|
920
|
-
visibleRange:
|
|
921
|
-
visibleItems:
|
|
922
|
-
navIndex:
|
|
923
|
-
measureRefCallback:
|
|
924
|
-
checkboxes:
|
|
925
|
-
|
|
926
|
-
value:
|
|
950
|
+
visibleRange: F,
|
|
951
|
+
visibleItems: j,
|
|
952
|
+
navIndex: w,
|
|
953
|
+
measureRefCallback: G,
|
|
954
|
+
checkboxes: i,
|
|
955
|
+
itemTemplate: n,
|
|
956
|
+
value: o
|
|
927
957
|
}
|
|
928
|
-
) : /* @__PURE__ */
|
|
958
|
+
) : /* @__PURE__ */ r("div", { className: "wx-233fr7 wx-no-data", children: T("No data") })
|
|
929
959
|
}
|
|
930
|
-
) },
|
|
960
|
+
) }, W.current);
|
|
931
961
|
}
|
|
932
|
-
function
|
|
962
|
+
function nn({
|
|
933
963
|
value: e = "",
|
|
934
964
|
id: n,
|
|
935
965
|
options: t = [],
|
|
936
966
|
textOptions: s = null,
|
|
937
|
-
textField:
|
|
938
|
-
placeholder:
|
|
939
|
-
title:
|
|
967
|
+
textField: l = "label",
|
|
968
|
+
placeholder: i = "",
|
|
969
|
+
title: a = "",
|
|
970
|
+
tooltip: o,
|
|
940
971
|
disabled: c = !1,
|
|
941
|
-
error:
|
|
942
|
-
clear:
|
|
972
|
+
error: u = !1,
|
|
973
|
+
clear: d = !1,
|
|
974
|
+
css: p = "",
|
|
943
975
|
children: w,
|
|
944
|
-
onChange:
|
|
945
|
-
dropdown:
|
|
976
|
+
onChange: h,
|
|
977
|
+
dropdown: v = {}
|
|
946
978
|
}) {
|
|
947
|
-
const
|
|
948
|
-
if (
|
|
949
|
-
if (
|
|
950
|
-
const
|
|
951
|
-
if (
|
|
979
|
+
const N = te(n), f = S(null), x = S(null), [m, g] = U(e), [T, k] = O(!1), [b, y] = O(""), A = S(null), P = S(!1), R = E(() => {
|
|
980
|
+
if (T) return b;
|
|
981
|
+
if (m || m === 0) {
|
|
982
|
+
const $ = (s || t).find((M) => M.id === m);
|
|
983
|
+
if ($) return $[l];
|
|
952
984
|
}
|
|
953
985
|
return "";
|
|
954
|
-
}, [
|
|
955
|
-
(
|
|
956
|
-
), [
|
|
957
|
-
() =>
|
|
958
|
-
[
|
|
959
|
-
),
|
|
960
|
-
|
|
961
|
-
}, []),
|
|
962
|
-
(
|
|
963
|
-
if (
|
|
964
|
-
let
|
|
965
|
-
if (
|
|
966
|
-
const
|
|
967
|
-
|
|
986
|
+
}, [T, b, m, s, t, l]), Y = E(() => !R || !T ? t : t.filter(
|
|
987
|
+
($) => $[l].toLowerCase().includes(R.toLowerCase())
|
|
988
|
+
), [R, T, t, l]), G = V(
|
|
989
|
+
() => Y.findIndex(($) => $.id === m),
|
|
990
|
+
[Y, m]
|
|
991
|
+
), W = V(($) => {
|
|
992
|
+
f.current = $.navigate, x.current = $.keydown;
|
|
993
|
+
}, []), L = V(
|
|
994
|
+
($, M) => {
|
|
995
|
+
if ($ || $ === 0) {
|
|
996
|
+
let D = t.find((H) => H.id === $);
|
|
997
|
+
if (k(!1), M && f.current(null), D && m !== D.id) {
|
|
998
|
+
const H = D.id;
|
|
999
|
+
g(H), h && h({ value: H });
|
|
968
1000
|
}
|
|
969
1001
|
}
|
|
970
|
-
!
|
|
1002
|
+
!P.current && M && A.current.focus();
|
|
971
1003
|
},
|
|
972
|
-
[t,
|
|
973
|
-
),
|
|
974
|
-
({ id:
|
|
975
|
-
|
|
1004
|
+
[t, m, h]
|
|
1005
|
+
), B = V(
|
|
1006
|
+
({ id: $ }) => {
|
|
1007
|
+
L($, !0);
|
|
976
1008
|
},
|
|
977
|
-
[
|
|
978
|
-
),
|
|
979
|
-
(
|
|
980
|
-
|
|
1009
|
+
[L]
|
|
1010
|
+
), _ = V(
|
|
1011
|
+
($) => {
|
|
1012
|
+
$ && $.stopPropagation(), g(""), k(!1), h && h({ value: "" });
|
|
981
1013
|
},
|
|
982
|
-
[
|
|
983
|
-
),
|
|
984
|
-
(
|
|
1014
|
+
[h]
|
|
1015
|
+
), Z = V(
|
|
1016
|
+
($) => {
|
|
985
1017
|
if (!t.length) return;
|
|
986
|
-
if (
|
|
987
|
-
|
|
1018
|
+
if ($ === "" && d) {
|
|
1019
|
+
_();
|
|
988
1020
|
return;
|
|
989
1021
|
}
|
|
990
|
-
let
|
|
991
|
-
|
|
992
|
-
(
|
|
1022
|
+
let M = t.find((H) => H[l] === $);
|
|
1023
|
+
M || (M = t.find(
|
|
1024
|
+
(H) => H[l].toLowerCase().includes($.toLowerCase())
|
|
993
1025
|
));
|
|
994
|
-
const
|
|
995
|
-
|
|
1026
|
+
const D = M ? M.id : m || t[0].id;
|
|
1027
|
+
L(D, !1);
|
|
996
1028
|
},
|
|
997
|
-
[t,
|
|
998
|
-
),
|
|
999
|
-
y(
|
|
1000
|
-
}, [
|
|
1001
|
-
|
|
1002
|
-
}, []),
|
|
1003
|
-
|
|
1004
|
-
|
|
1029
|
+
[t, l, d, m, L, _]
|
|
1030
|
+
), F = V(() => {
|
|
1031
|
+
y(A.current.value), k(!0), Y.length && f.current(0);
|
|
1032
|
+
}, [Y.length, f]), j = V(() => {
|
|
1033
|
+
P.current = !0;
|
|
1034
|
+
}, []), I = V(() => {
|
|
1035
|
+
P.current = !1, setTimeout(() => {
|
|
1036
|
+
P.current || Z(R);
|
|
1005
1037
|
}, 200);
|
|
1006
|
-
}, [
|
|
1007
|
-
return /* @__PURE__ */
|
|
1038
|
+
}, [Z, R]);
|
|
1039
|
+
return /* @__PURE__ */ C(
|
|
1008
1040
|
"div",
|
|
1009
1041
|
{
|
|
1010
|
-
className: "wx-1j11Jk wx-combo",
|
|
1011
|
-
onClick: () =>
|
|
1012
|
-
onKeyDown: (
|
|
1013
|
-
title:
|
|
1042
|
+
className: "wx-1j11Jk wx-combo " + p,
|
|
1043
|
+
onClick: () => f.current(G()),
|
|
1044
|
+
onKeyDown: ($) => x.current($, G()),
|
|
1045
|
+
title: a,
|
|
1046
|
+
"data-tooltip-text": o,
|
|
1014
1047
|
children: [
|
|
1015
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ r(
|
|
1016
1049
|
"input",
|
|
1017
1050
|
{
|
|
1018
|
-
className: "wx-1j11Jk wx-input " + (
|
|
1019
|
-
id:
|
|
1020
|
-
ref:
|
|
1021
|
-
value:
|
|
1051
|
+
className: "wx-1j11Jk wx-input " + (u ? "wx-error" : ""),
|
|
1052
|
+
id: N,
|
|
1053
|
+
ref: A,
|
|
1054
|
+
value: R,
|
|
1022
1055
|
disabled: c,
|
|
1023
|
-
placeholder:
|
|
1024
|
-
onFocus:
|
|
1025
|
-
onBlur:
|
|
1026
|
-
onInput:
|
|
1056
|
+
placeholder: i,
|
|
1057
|
+
onFocus: j,
|
|
1058
|
+
onBlur: I,
|
|
1059
|
+
onInput: F
|
|
1027
1060
|
}
|
|
1028
1061
|
),
|
|
1029
|
-
|
|
1030
|
-
!c && /* @__PURE__ */
|
|
1062
|
+
d && !c && m ? /* @__PURE__ */ r("i", { className: "wx-1j11Jk wx-icon wxi-close", onClick: _ }) : /* @__PURE__ */ r("i", { className: "wx-1j11Jk wx-icon wxi-angle-down" }),
|
|
1063
|
+
!c && /* @__PURE__ */ r(ke, { items: Y, onReady: W, onSelect: B, ...v, children: ({ option: $ }) => /* @__PURE__ */ r(Q, { children: w ? w({ option: $ }) : $[l] }) })
|
|
1031
1064
|
]
|
|
1032
1065
|
}
|
|
1033
1066
|
);
|
|
1034
1067
|
}
|
|
1035
|
-
function
|
|
1068
|
+
function ye({
|
|
1036
1069
|
value: e = "",
|
|
1037
1070
|
id: n,
|
|
1038
1071
|
readonly: t = !1,
|
|
1039
1072
|
focus: s = !1,
|
|
1040
|
-
select:
|
|
1041
|
-
type:
|
|
1042
|
-
placeholder:
|
|
1043
|
-
disabled:
|
|
1044
|
-
error:
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
css:
|
|
1048
|
-
icon:
|
|
1049
|
-
clear:
|
|
1050
|
-
onChange:
|
|
1073
|
+
select: l = !1,
|
|
1074
|
+
type: i = "text",
|
|
1075
|
+
placeholder: a = "",
|
|
1076
|
+
disabled: o = !1,
|
|
1077
|
+
error: c = !1,
|
|
1078
|
+
title: u = "",
|
|
1079
|
+
tooltip: d,
|
|
1080
|
+
css: p = "",
|
|
1081
|
+
icon: w = "",
|
|
1082
|
+
clear: h = !1,
|
|
1083
|
+
onChange: v
|
|
1051
1084
|
}) {
|
|
1052
|
-
const
|
|
1053
|
-
() =>
|
|
1054
|
-
[
|
|
1055
|
-
),
|
|
1056
|
-
() =>
|
|
1057
|
-
[
|
|
1085
|
+
const N = te(n), [f, x] = U(e), m = S(null), g = E(
|
|
1086
|
+
() => w && p.indexOf("wx-icon-left") === -1 ? "wx-icon-right " + p : p,
|
|
1087
|
+
[w, p]
|
|
1088
|
+
), T = E(
|
|
1089
|
+
() => w && p.indexOf("wx-icon-left") !== -1,
|
|
1090
|
+
[w, p]
|
|
1058
1091
|
);
|
|
1059
|
-
|
|
1060
|
-
const
|
|
1061
|
-
s &&
|
|
1092
|
+
J(() => {
|
|
1093
|
+
const P = setTimeout(() => {
|
|
1094
|
+
s && m.current && m.current.focus(), l && m.current && m.current.select();
|
|
1062
1095
|
}, 1);
|
|
1063
|
-
return () => clearTimeout(
|
|
1064
|
-
}, [s,
|
|
1065
|
-
const
|
|
1066
|
-
(
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1096
|
+
return () => clearTimeout(P);
|
|
1097
|
+
}, [s, l]);
|
|
1098
|
+
const k = V(
|
|
1099
|
+
(P) => {
|
|
1100
|
+
const R = P.target.value;
|
|
1101
|
+
x(R), v && v({ value: R, input: !0 });
|
|
1069
1102
|
},
|
|
1070
|
-
[
|
|
1071
|
-
),
|
|
1072
|
-
(
|
|
1073
|
-
[
|
|
1103
|
+
[v]
|
|
1104
|
+
), b = V(
|
|
1105
|
+
(P) => v && v({ value: P.target.value }),
|
|
1106
|
+
[v]
|
|
1074
1107
|
);
|
|
1075
|
-
function
|
|
1076
|
-
|
|
1108
|
+
function y(P) {
|
|
1109
|
+
P.stopPropagation(), x(""), v && v({ value: "" });
|
|
1077
1110
|
}
|
|
1078
|
-
let
|
|
1079
|
-
return
|
|
1080
|
-
const
|
|
1081
|
-
return
|
|
1082
|
-
|
|
1111
|
+
let A = i;
|
|
1112
|
+
return i !== "password" && i !== "number" && (A = "text"), J(() => {
|
|
1113
|
+
const P = b, R = m.current;
|
|
1114
|
+
return R.addEventListener("change", P), () => {
|
|
1115
|
+
R && R.removeEventListener("change", P);
|
|
1083
1116
|
};
|
|
1084
|
-
}, [
|
|
1117
|
+
}, [b]), /* @__PURE__ */ C(
|
|
1085
1118
|
"div",
|
|
1086
1119
|
{
|
|
1087
|
-
className: `wx-hQ64J4 wx-text ${
|
|
1120
|
+
className: `wx-hQ64J4 wx-text ${g} ${c ? "wx-error" : ""} ${o ? "wx-disabled" : ""} ${h ? "wx-clear" : ""}`,
|
|
1121
|
+
"data-tooltip-text": d,
|
|
1088
1122
|
children: [
|
|
1089
|
-
/* @__PURE__ */
|
|
1123
|
+
/* @__PURE__ */ r(
|
|
1090
1124
|
"input",
|
|
1091
1125
|
{
|
|
1092
1126
|
className: "wx-hQ64J4 wx-input",
|
|
1093
|
-
ref:
|
|
1094
|
-
id:
|
|
1127
|
+
ref: m,
|
|
1128
|
+
id: N,
|
|
1095
1129
|
readOnly: t,
|
|
1096
|
-
disabled:
|
|
1097
|
-
placeholder:
|
|
1098
|
-
type:
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
onInput: y
|
|
1130
|
+
disabled: o,
|
|
1131
|
+
placeholder: a,
|
|
1132
|
+
type: A,
|
|
1133
|
+
title: u,
|
|
1134
|
+
value: f,
|
|
1135
|
+
onInput: k
|
|
1103
1136
|
}
|
|
1104
1137
|
),
|
|
1105
|
-
|
|
1106
|
-
/* @__PURE__ */
|
|
1107
|
-
|
|
1108
|
-
] }) :
|
|
1138
|
+
h && !o && f ? /* @__PURE__ */ C(Q, { children: [
|
|
1139
|
+
/* @__PURE__ */ r("i", { className: "wx-hQ64J4 wx-icon wxi-close", onClick: y }),
|
|
1140
|
+
T && /* @__PURE__ */ r("i", { className: `wx-hQ64J4 wx-icon ${w}` })
|
|
1141
|
+
] }) : w ? /* @__PURE__ */ r("i", { className: `wx-hQ64J4 wx-icon ${w}` }) : null
|
|
1109
1142
|
]
|
|
1110
1143
|
}
|
|
1111
1144
|
);
|
|
1112
1145
|
}
|
|
1113
|
-
function
|
|
1114
|
-
const { calendar:
|
|
1146
|
+
function mt({ date: e, type: n, part: t, onShift: s }) {
|
|
1147
|
+
const { calendar: l, formats: i } = X(K).getRaw(), a = e.getFullYear(), o = E(() => {
|
|
1115
1148
|
switch (n) {
|
|
1116
1149
|
case "month":
|
|
1117
|
-
return
|
|
1150
|
+
return re(i.monthYearFormat, l)(e);
|
|
1118
1151
|
case "year":
|
|
1119
|
-
return
|
|
1152
|
+
return re(i.yearFormat, l)(e);
|
|
1120
1153
|
case "duodecade": {
|
|
1121
|
-
const { start:
|
|
1122
|
-
return `${
|
|
1154
|
+
const { start: u, end: d } = Je(a), p = re(i.yearFormat, l);
|
|
1155
|
+
return `${p(new Date(u, 0, 1))} - ${p(new Date(d, 11, 31))}`;
|
|
1123
1156
|
}
|
|
1124
1157
|
default:
|
|
1125
1158
|
return "";
|
|
1126
1159
|
}
|
|
1127
|
-
}, [e, n,
|
|
1128
|
-
function
|
|
1160
|
+
}, [e, n, a, l, i]);
|
|
1161
|
+
function c() {
|
|
1129
1162
|
s && s({ diff: 0, type: n });
|
|
1130
1163
|
}
|
|
1131
|
-
return /* @__PURE__ */
|
|
1132
|
-
t !== "right" ? /* @__PURE__ */
|
|
1164
|
+
return /* @__PURE__ */ C("div", { className: "wx-8HQVQV wx-header", children: [
|
|
1165
|
+
t !== "right" ? /* @__PURE__ */ r(
|
|
1133
1166
|
"i",
|
|
1134
1167
|
{
|
|
1135
1168
|
className: "wx-8HQVQV wx-pager wxi-angle-left",
|
|
1136
1169
|
onClick: () => s && s({ diff: -1, type: n })
|
|
1137
1170
|
}
|
|
1138
|
-
) : /* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
t !== "left" ? /* @__PURE__ */
|
|
1171
|
+
) : /* @__PURE__ */ r("span", { className: "wx-8HQVQV wx-spacer" }),
|
|
1172
|
+
/* @__PURE__ */ r("span", { className: "wx-8HQVQV wx-label", onClick: c, children: o }),
|
|
1173
|
+
t !== "left" ? /* @__PURE__ */ r(
|
|
1141
1174
|
"i",
|
|
1142
1175
|
{
|
|
1143
1176
|
className: "wx-8HQVQV wx-pager wxi-angle-right",
|
|
1144
1177
|
onClick: () => s && s({ diff: 1, type: n })
|
|
1145
1178
|
}
|
|
1146
|
-
) : /* @__PURE__ */
|
|
1179
|
+
) : /* @__PURE__ */ r("span", { className: "wx-8HQVQV wx-spacer" })
|
|
1147
1180
|
] });
|
|
1148
1181
|
}
|
|
1149
|
-
function
|
|
1150
|
-
return /* @__PURE__ */
|
|
1182
|
+
function be({ onClick: e, children: n }) {
|
|
1183
|
+
return /* @__PURE__ */ r("button", { className: "wx-3s8W4d wx-button", onClick: e, children: n });
|
|
1151
1184
|
}
|
|
1152
|
-
function
|
|
1185
|
+
function ht({
|
|
1153
1186
|
value: e,
|
|
1154
1187
|
current: n,
|
|
1155
1188
|
part: t = "",
|
|
1156
1189
|
markers: s = null,
|
|
1157
|
-
|
|
1158
|
-
|
|
1190
|
+
css: l = "",
|
|
1191
|
+
onCancel: i,
|
|
1192
|
+
onChange: a
|
|
1159
1193
|
}) {
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1194
|
+
const o = (X(K) || ne()).getRaw().calendar, c = (o.weekStart || 7) % 7, u = o.dayShort.slice(c).concat(o.dayShort.slice(0, c)), d = (k, b, y) => new Date(
|
|
1195
|
+
k.getFullYear(),
|
|
1196
|
+
k.getMonth() + (b || 0),
|
|
1197
|
+
k.getDate() + (y || 0)
|
|
1164
1198
|
);
|
|
1165
|
-
let
|
|
1166
|
-
function
|
|
1167
|
-
const
|
|
1168
|
-
return
|
|
1199
|
+
let p = t !== "normal";
|
|
1200
|
+
function w(k) {
|
|
1201
|
+
const b = k.getDay();
|
|
1202
|
+
return b === 0 || b === 6;
|
|
1169
1203
|
}
|
|
1170
|
-
function
|
|
1171
|
-
const
|
|
1172
|
-
return
|
|
1204
|
+
function h() {
|
|
1205
|
+
const k = d(n, 0, 1 - n.getDate());
|
|
1206
|
+
return k.setDate(k.getDate() - (k.getDay() - (c - 7)) % 7), k;
|
|
1173
1207
|
}
|
|
1174
1208
|
function v() {
|
|
1175
|
-
const
|
|
1176
|
-
return
|
|
1209
|
+
const k = d(n, 1, -n.getDate());
|
|
1210
|
+
return k.setDate(k.getDate() + (6 - k.getDay() + c) % 7), k;
|
|
1177
1211
|
}
|
|
1178
|
-
const
|
|
1179
|
-
function f(
|
|
1180
|
-
|
|
1212
|
+
const N = S(0);
|
|
1213
|
+
function f(k, b) {
|
|
1214
|
+
b.timeStamp !== N.current && (N.current = b.timeStamp, b.stopPropagation(), a && a(new Date(k)), i && i());
|
|
1181
1215
|
}
|
|
1182
|
-
const
|
|
1183
|
-
e.start ?
|
|
1184
|
-
e.end ?
|
|
1185
|
-
] : [0, 0], [t, e]), m =
|
|
1186
|
-
const
|
|
1187
|
-
let
|
|
1188
|
-
for (let
|
|
1216
|
+
const x = E(() => t == "normal" ? [e ? d(e).valueOf() : 0] : e ? [
|
|
1217
|
+
e.start ? d(e.start).valueOf() : 0,
|
|
1218
|
+
e.end ? d(e.end).valueOf() : 0
|
|
1219
|
+
] : [0, 0], [t, e]), m = E(() => {
|
|
1220
|
+
const k = h(), b = v(), y = n.getMonth();
|
|
1221
|
+
let A = [];
|
|
1222
|
+
for (let P = k; P <= b; P.setDate(P.getDate() + 1)) {
|
|
1189
1223
|
const R = {
|
|
1190
|
-
day:
|
|
1191
|
-
in:
|
|
1192
|
-
date:
|
|
1224
|
+
day: P.getDate(),
|
|
1225
|
+
in: P.getMonth() === y,
|
|
1226
|
+
date: P.valueOf()
|
|
1193
1227
|
};
|
|
1194
|
-
let
|
|
1195
|
-
if (
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1228
|
+
let Y = "";
|
|
1229
|
+
if (Y += R.in ? "" : " wx-inactive", Y += x.indexOf(R.date) > -1 ? " wx-selected" : "", p) {
|
|
1230
|
+
const G = R.date == x[0], W = R.date == x[1];
|
|
1231
|
+
G && !W ? Y += " wx-left" : W && !G && (Y += " wx-right"), R.date > x[0] && R.date < x[1] && (Y += " wx-inrange");
|
|
1198
1232
|
}
|
|
1199
|
-
if (
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1233
|
+
if (Y += w(P) ? " wx-weekend" : "", s) {
|
|
1234
|
+
const G = s(P);
|
|
1235
|
+
G && (Y += " " + G);
|
|
1202
1236
|
}
|
|
1203
|
-
|
|
1237
|
+
A.push({ ...R, css: Y });
|
|
1204
1238
|
}
|
|
1205
|
-
return
|
|
1206
|
-
}, [n,
|
|
1207
|
-
let
|
|
1208
|
-
return
|
|
1209
|
-
|
|
1210
|
-
}, []), /* @__PURE__ */
|
|
1211
|
-
/* @__PURE__ */
|
|
1212
|
-
/* @__PURE__ */
|
|
1239
|
+
return A;
|
|
1240
|
+
}, [n, x, p, s]), g = S(null);
|
|
1241
|
+
let T = S({});
|
|
1242
|
+
return T.current.click = f, J(() => {
|
|
1243
|
+
Ge(g.current, T.current);
|
|
1244
|
+
}, []), /* @__PURE__ */ C("div", { className: `wx-398RBS wx-month ${l}`, children: [
|
|
1245
|
+
/* @__PURE__ */ r("div", { className: "wx-398RBS wx-weekdays", children: u.map((k) => /* @__PURE__ */ r("div", { className: "wx-398RBS wx-weekday", children: k }, k)) }),
|
|
1246
|
+
/* @__PURE__ */ r("div", { className: "wx-398RBS wx-days", ref: g, children: m.map((k) => /* @__PURE__ */ r(
|
|
1213
1247
|
"div",
|
|
1214
1248
|
{
|
|
1215
|
-
className: `wx-398RBS wx-day ${
|
|
1216
|
-
"data-id":
|
|
1217
|
-
children:
|
|
1249
|
+
className: `wx-398RBS wx-day ${k.css} ${k.in ? "" : "wx-out"}`,
|
|
1250
|
+
"data-id": k.date,
|
|
1251
|
+
children: k.day
|
|
1218
1252
|
},
|
|
1219
|
-
|
|
1253
|
+
k.date
|
|
1220
1254
|
)) })
|
|
1221
1255
|
] });
|
|
1222
1256
|
}
|
|
1223
|
-
function
|
|
1257
|
+
function pt({
|
|
1224
1258
|
value: e,
|
|
1225
1259
|
current: n,
|
|
1226
1260
|
part: t,
|
|
1227
1261
|
onCancel: s,
|
|
1228
|
-
onChange:
|
|
1229
|
-
onShift:
|
|
1262
|
+
onChange: l,
|
|
1263
|
+
onShift: i
|
|
1230
1264
|
}) {
|
|
1231
|
-
const
|
|
1232
|
-
(
|
|
1233
|
-
if (
|
|
1234
|
-
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1265
|
+
const a = S(/* @__PURE__ */ new Date()), [o, c] = U(e || a.current), [u, d] = U(n || a.current), p = X(K).getRaw().calendar, w = p.monthShort || [], h = E(() => u.getMonth(), [u]), v = V(
|
|
1266
|
+
(x, m) => {
|
|
1267
|
+
if (x != null) {
|
|
1268
|
+
m.stopPropagation();
|
|
1269
|
+
const g = new Date(u);
|
|
1270
|
+
g.setMonth(x), d(g), i && i({ current: g });
|
|
1237
1271
|
}
|
|
1238
|
-
t === "normal" &&
|
|
1272
|
+
t === "normal" && c(new Date(u)), s && s();
|
|
1239
1273
|
},
|
|
1240
|
-
[
|
|
1241
|
-
),
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1244
|
-
}, [
|
|
1245
|
-
(
|
|
1246
|
-
const
|
|
1247
|
-
if (
|
|
1248
|
-
const
|
|
1249
|
-
|
|
1274
|
+
[u, t, i, s]
|
|
1275
|
+
), N = V(() => {
|
|
1276
|
+
const x = new Date(ze(o, t) || u);
|
|
1277
|
+
x.setMonth(u.getMonth()), x.setFullYear(u.getFullYear()), l && l(x);
|
|
1278
|
+
}, [o, u, t, l]), f = V(
|
|
1279
|
+
(x) => {
|
|
1280
|
+
const m = x.target.closest("[data-id]");
|
|
1281
|
+
if (m) {
|
|
1282
|
+
const g = parseInt(m.getAttribute("data-id"), 10);
|
|
1283
|
+
v(g, x);
|
|
1250
1284
|
}
|
|
1251
1285
|
},
|
|
1252
|
-
[
|
|
1286
|
+
[v]
|
|
1253
1287
|
);
|
|
1254
|
-
return /* @__PURE__ */
|
|
1255
|
-
/* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ C(Q, { children: [
|
|
1289
|
+
/* @__PURE__ */ r("div", { className: "wx-34U8T8 wx-months", onClick: f, children: w.map((x, m) => /* @__PURE__ */ r(
|
|
1256
1290
|
"div",
|
|
1257
1291
|
{
|
|
1258
|
-
className: "wx-34U8T8 wx-month" + (
|
|
1259
|
-
"data-id":
|
|
1260
|
-
children:
|
|
1292
|
+
className: "wx-34U8T8 wx-month" + (h === m ? " wx-current" : ""),
|
|
1293
|
+
"data-id": m,
|
|
1294
|
+
children: x
|
|
1261
1295
|
},
|
|
1262
|
-
|
|
1296
|
+
m
|
|
1263
1297
|
)) }),
|
|
1264
|
-
/* @__PURE__ */
|
|
1298
|
+
/* @__PURE__ */ r("div", { className: "wx-34U8T8 wx-buttons", children: /* @__PURE__ */ r(be, { onClick: N, children: p.done }) })
|
|
1265
1299
|
] });
|
|
1266
1300
|
}
|
|
1267
|
-
const xe = "wx-1XEF33",
|
|
1268
|
-
const
|
|
1269
|
-
const { start:
|
|
1270
|
-
for (let
|
|
1271
|
-
|
|
1272
|
-
return
|
|
1273
|
-
}, [
|
|
1274
|
-
click:
|
|
1301
|
+
const xe = "wx-1XEF33", vt = ({ value: e, current: n, onCancel: t, onChange: s, onShift: l, part: i }) => {
|
|
1302
|
+
const a = X(K).getRaw().calendar, [o, c] = U(n), [u, d] = U(e), p = E(() => o.getFullYear(), [o]), w = E(() => {
|
|
1303
|
+
const { start: x, end: m } = Je(p), g = [];
|
|
1304
|
+
for (let T = x; T <= m; ++T)
|
|
1305
|
+
g.push(T);
|
|
1306
|
+
return g;
|
|
1307
|
+
}, [p]), h = {
|
|
1308
|
+
click: v
|
|
1275
1309
|
};
|
|
1276
|
-
function x
|
|
1277
|
-
if (
|
|
1278
|
-
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1310
|
+
function v(x, m) {
|
|
1311
|
+
if (x) {
|
|
1312
|
+
m.stopPropagation();
|
|
1313
|
+
const g = new Date(o);
|
|
1314
|
+
g.setFullYear(x), c(g), l && l({ current: g });
|
|
1281
1315
|
}
|
|
1282
|
-
|
|
1316
|
+
i === "normal" && d(new Date(o)), t && t();
|
|
1283
1317
|
}
|
|
1284
|
-
function
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1318
|
+
function N() {
|
|
1319
|
+
const x = new Date(ze(u, i) || o);
|
|
1320
|
+
x.setFullYear(o.getFullYear()), s && s(x);
|
|
1287
1321
|
}
|
|
1288
|
-
const
|
|
1289
|
-
return
|
|
1290
|
-
|
|
1291
|
-
}, []), /* @__PURE__ */
|
|
1292
|
-
/* @__PURE__ */
|
|
1322
|
+
const f = S(null);
|
|
1323
|
+
return J(() => {
|
|
1324
|
+
f.current && Ge(f.current, h);
|
|
1325
|
+
}, []), /* @__PURE__ */ C(Q, { children: [
|
|
1326
|
+
/* @__PURE__ */ r("div", { className: xe + " wx-years", ref: f, children: w.map((x, m) => /* @__PURE__ */ r(
|
|
1293
1327
|
"div",
|
|
1294
1328
|
{
|
|
1295
|
-
className: xe + ` wx-year ${
|
|
1296
|
-
"data-id":
|
|
1297
|
-
children:
|
|
1329
|
+
className: xe + ` wx-year ${p == x ? "wx-current" : ""} ${m === 0 ? "wx-prev-decade" : ""} ${m === 11 ? "wx-next-decade" : ""}`,
|
|
1330
|
+
"data-id": x,
|
|
1331
|
+
children: x
|
|
1298
1332
|
},
|
|
1299
|
-
|
|
1333
|
+
m
|
|
1300
1334
|
)) }),
|
|
1301
|
-
/* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ r("div", { className: xe + " wx-buttons", children: /* @__PURE__ */ r(be, { onClick: N, children: a.done }) })
|
|
1302
1336
|
] });
|
|
1303
|
-
},
|
|
1337
|
+
}, Ce = {
|
|
1304
1338
|
month: {
|
|
1305
|
-
component:
|
|
1306
|
-
next:
|
|
1307
|
-
prev:
|
|
1339
|
+
component: ht,
|
|
1340
|
+
next: Nt,
|
|
1341
|
+
prev: gt
|
|
1308
1342
|
},
|
|
1309
1343
|
year: {
|
|
1310
|
-
component:
|
|
1311
|
-
next:
|
|
1312
|
-
prev:
|
|
1344
|
+
component: pt,
|
|
1345
|
+
next: yt,
|
|
1346
|
+
prev: kt
|
|
1313
1347
|
},
|
|
1314
1348
|
duodecade: {
|
|
1315
|
-
component:
|
|
1316
|
-
next:
|
|
1317
|
-
prev:
|
|
1349
|
+
component: vt,
|
|
1350
|
+
next: Dt,
|
|
1351
|
+
prev: bt
|
|
1318
1352
|
}
|
|
1319
1353
|
};
|
|
1320
|
-
function
|
|
1354
|
+
function gt(e) {
|
|
1321
1355
|
return e = new Date(e), e.setMonth(e.getMonth() - 1), e;
|
|
1322
1356
|
}
|
|
1323
|
-
function
|
|
1357
|
+
function Nt(e) {
|
|
1324
1358
|
return e = new Date(e), e.setMonth(e.getMonth() + 1), e;
|
|
1325
1359
|
}
|
|
1326
|
-
function
|
|
1360
|
+
function kt(e) {
|
|
1327
1361
|
return e = new Date(e), e.setFullYear(e.getFullYear() - 1), e;
|
|
1328
1362
|
}
|
|
1329
|
-
function
|
|
1363
|
+
function yt(e) {
|
|
1330
1364
|
return e = new Date(e), e.setFullYear(e.getFullYear() + 1), e;
|
|
1331
1365
|
}
|
|
1332
|
-
function
|
|
1366
|
+
function bt(e) {
|
|
1333
1367
|
return e = new Date(e), e.setFullYear(e.getFullYear() - 10), e;
|
|
1334
1368
|
}
|
|
1335
|
-
function
|
|
1369
|
+
function Dt(e) {
|
|
1336
1370
|
return e = new Date(e), e.setFullYear(e.getFullYear() + 10), e;
|
|
1337
1371
|
}
|
|
1338
|
-
function
|
|
1372
|
+
function ze(e, n) {
|
|
1339
1373
|
let t;
|
|
1340
1374
|
if (n === "normal") t = e;
|
|
1341
1375
|
else {
|
|
1342
|
-
const { start: s, end:
|
|
1343
|
-
n === "left" ? t = s : n == "right" ? t =
|
|
1376
|
+
const { start: s, end: l } = e;
|
|
1377
|
+
n === "left" ? t = s : n == "right" ? t = l : t = s && l;
|
|
1344
1378
|
}
|
|
1345
1379
|
return t;
|
|
1346
1380
|
}
|
|
1347
|
-
const
|
|
1348
|
-
function
|
|
1381
|
+
const $t = ["clear", "today"];
|
|
1382
|
+
function Tt(e) {
|
|
1349
1383
|
if (e === "done") return -1;
|
|
1350
1384
|
if (e === "clear") return null;
|
|
1351
1385
|
if (e === "today") return /* @__PURE__ */ new Date();
|
|
@@ -1355,54 +1389,55 @@ function de({
|
|
|
1355
1389
|
current: n,
|
|
1356
1390
|
onCurrentChange: t,
|
|
1357
1391
|
part: s = "normal",
|
|
1358
|
-
markers:
|
|
1359
|
-
buttons:
|
|
1360
|
-
|
|
1392
|
+
markers: l = null,
|
|
1393
|
+
buttons: i,
|
|
1394
|
+
css: a = "",
|
|
1395
|
+
onShift: o,
|
|
1361
1396
|
onChange: c
|
|
1362
1397
|
}) {
|
|
1363
|
-
const
|
|
1398
|
+
const u = X(K).getGroup("calendar"), [d, p] = O("month"), w = Array.isArray(i) ? i : i ? $t : [], h = (m, g) => {
|
|
1364
1399
|
m.preventDefault(), c && c({ value: g });
|
|
1365
1400
|
}, v = () => {
|
|
1366
|
-
|
|
1367
|
-
},
|
|
1368
|
-
const { diff: g, current:
|
|
1401
|
+
d === "duodecade" ? p("year") : d === "year" && p("month");
|
|
1402
|
+
}, N = (m) => {
|
|
1403
|
+
const { diff: g, current: T } = m;
|
|
1369
1404
|
if (g === 0) {
|
|
1370
|
-
|
|
1405
|
+
d === "month" ? p("year") : d === "year" && p("duodecade");
|
|
1371
1406
|
return;
|
|
1372
1407
|
}
|
|
1373
1408
|
if (g) {
|
|
1374
|
-
const
|
|
1375
|
-
t(g > 0 ?
|
|
1376
|
-
} else
|
|
1377
|
-
|
|
1409
|
+
const k = Ce[d];
|
|
1410
|
+
t(g > 0 ? k.next(n) : k.prev(n));
|
|
1411
|
+
} else T && t(T);
|
|
1412
|
+
o && o();
|
|
1378
1413
|
}, f = (m) => {
|
|
1379
|
-
|
|
1380
|
-
},
|
|
1381
|
-
return /* @__PURE__ */
|
|
1414
|
+
p("month"), c && c({ select: !0, value: m });
|
|
1415
|
+
}, x = E(() => Ce[d].component, [d]);
|
|
1416
|
+
return /* @__PURE__ */ r(
|
|
1382
1417
|
"div",
|
|
1383
1418
|
{
|
|
1384
|
-
className: `wx-2Gr4AS wx-calendar ${s !== "normal" && s !== "both" ? "wx-part" : ""}`,
|
|
1385
|
-
children: /* @__PURE__ */
|
|
1386
|
-
/* @__PURE__ */
|
|
1387
|
-
/* @__PURE__ */
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
|
|
1419
|
+
className: `wx-2Gr4AS wx-calendar ${s !== "normal" && s !== "both" ? "wx-part" : ""} ${a}`,
|
|
1420
|
+
children: /* @__PURE__ */ C("div", { className: "wx-2Gr4AS wx-wrap", children: [
|
|
1421
|
+
/* @__PURE__ */ r(mt, { date: n, part: s, type: d, onShift: N }),
|
|
1422
|
+
/* @__PURE__ */ C("div", { children: [
|
|
1423
|
+
/* @__PURE__ */ r(
|
|
1424
|
+
x,
|
|
1390
1425
|
{
|
|
1391
1426
|
value: e,
|
|
1392
1427
|
current: n,
|
|
1393
1428
|
onCurrentChange: t,
|
|
1394
1429
|
part: s,
|
|
1395
|
-
markers:
|
|
1430
|
+
markers: l,
|
|
1396
1431
|
onCancel: v,
|
|
1397
1432
|
onChange: f,
|
|
1398
|
-
onShift:
|
|
1433
|
+
onShift: N
|
|
1399
1434
|
}
|
|
1400
1435
|
),
|
|
1401
|
-
|
|
1402
|
-
|
|
1436
|
+
d === "month" && w.length > 0 && /* @__PURE__ */ r("div", { className: "wx-2Gr4AS wx-buttons", children: w.map((m) => /* @__PURE__ */ r("div", { className: "wx-2Gr4AS wx-button-item", children: /* @__PURE__ */ r(
|
|
1437
|
+
be,
|
|
1403
1438
|
{
|
|
1404
|
-
onClick: (g) =>
|
|
1405
|
-
children:
|
|
1439
|
+
onClick: (g) => h(g, Tt(m)),
|
|
1440
|
+
children: u(m)
|
|
1406
1441
|
}
|
|
1407
1442
|
) }, m)) })
|
|
1408
1443
|
] })
|
|
@@ -1410,320 +1445,316 @@ function de({
|
|
|
1410
1445
|
}
|
|
1411
1446
|
);
|
|
1412
1447
|
}
|
|
1413
|
-
function
|
|
1414
|
-
let { words: n = null, optional: t = !1, children: s } = e,
|
|
1415
|
-
const
|
|
1416
|
-
let
|
|
1417
|
-
return (!
|
|
1418
|
-
}, [n, t,
|
|
1419
|
-
return /* @__PURE__ */
|
|
1448
|
+
function ve(e) {
|
|
1449
|
+
let { words: n = null, optional: t = !1, children: s } = e, l = X(K);
|
|
1450
|
+
const i = E(() => {
|
|
1451
|
+
let a = l;
|
|
1452
|
+
return (!a || !a.extend) && (a = je(_e)), n !== null && (a = a.extend(n, t)), a;
|
|
1453
|
+
}, [n, t, l]);
|
|
1454
|
+
return /* @__PURE__ */ r(K.Provider, { value: i, children: s });
|
|
1420
1455
|
}
|
|
1421
|
-
function
|
|
1456
|
+
function Le(e, n, t, s) {
|
|
1422
1457
|
if (!e || s) {
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1458
|
+
const l = n ? new Date(n) : /* @__PURE__ */ new Date();
|
|
1459
|
+
l.setDate(1), t(l);
|
|
1425
1460
|
} else if (e.getDate() !== 1) {
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1461
|
+
const l = new Date(e);
|
|
1462
|
+
l.setDate(1), t(l);
|
|
1428
1463
|
}
|
|
1429
1464
|
}
|
|
1430
|
-
const
|
|
1431
|
-
function
|
|
1465
|
+
const Vt = ["clear", "today"];
|
|
1466
|
+
function Rt({
|
|
1432
1467
|
value: e,
|
|
1433
1468
|
current: n,
|
|
1434
1469
|
markers: t = null,
|
|
1435
|
-
buttons: s =
|
|
1436
|
-
|
|
1470
|
+
buttons: s = Vt,
|
|
1471
|
+
css: l = "",
|
|
1472
|
+
onChange: i
|
|
1437
1473
|
}) {
|
|
1438
|
-
const [
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
}, [
|
|
1442
|
-
const
|
|
1443
|
-
(
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1474
|
+
const [a, o] = U(e), [c, u] = U(n);
|
|
1475
|
+
J(() => {
|
|
1476
|
+
Le(c, a, u, !1);
|
|
1477
|
+
}, [a, c]);
|
|
1478
|
+
const d = V(
|
|
1479
|
+
(w) => {
|
|
1480
|
+
const h = w.value;
|
|
1481
|
+
h ? (o(new Date(h)), Le(c, new Date(h), u, !0)) : o(null), i && i({ value: h ? new Date(h) : null });
|
|
1446
1482
|
},
|
|
1447
|
-
[
|
|
1448
|
-
),
|
|
1449
|
-
(
|
|
1450
|
-
|
|
1483
|
+
[i, c]
|
|
1484
|
+
), p = V(
|
|
1485
|
+
(w) => {
|
|
1486
|
+
u(w);
|
|
1451
1487
|
},
|
|
1452
|
-
[
|
|
1488
|
+
[u]
|
|
1453
1489
|
);
|
|
1454
|
-
return c ? /* @__PURE__ */
|
|
1490
|
+
return c ? /* @__PURE__ */ r(ve, { children: /* @__PURE__ */ r(
|
|
1455
1491
|
de,
|
|
1456
1492
|
{
|
|
1457
|
-
value:
|
|
1493
|
+
value: a,
|
|
1458
1494
|
current: c,
|
|
1459
1495
|
markers: t,
|
|
1460
1496
|
buttons: s,
|
|
1461
|
-
|
|
1462
|
-
|
|
1497
|
+
css: l,
|
|
1498
|
+
onChange: d,
|
|
1499
|
+
onCurrentChange: p
|
|
1463
1500
|
}
|
|
1464
1501
|
) }) : null;
|
|
1465
1502
|
}
|
|
1466
|
-
function
|
|
1503
|
+
function De(e) {
|
|
1467
1504
|
return e || (e = {}), e.width || (e.width = "unset"), e;
|
|
1468
1505
|
}
|
|
1469
|
-
const
|
|
1470
|
-
function
|
|
1506
|
+
const Mt = ["clear", "today"];
|
|
1507
|
+
function rn({
|
|
1471
1508
|
value: e,
|
|
1472
1509
|
id: n,
|
|
1473
1510
|
disabled: t = !1,
|
|
1474
1511
|
error: s = !1,
|
|
1475
|
-
placeholder:
|
|
1476
|
-
format:
|
|
1477
|
-
buttons:
|
|
1478
|
-
css:
|
|
1479
|
-
title:
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1512
|
+
placeholder: l = "",
|
|
1513
|
+
format: i = "",
|
|
1514
|
+
buttons: a = Mt,
|
|
1515
|
+
css: o = "",
|
|
1516
|
+
title: c = "",
|
|
1517
|
+
tooltip: u,
|
|
1518
|
+
editable: d = !1,
|
|
1519
|
+
clear: p = !1,
|
|
1520
|
+
onChange: w,
|
|
1521
|
+
dropdown: h = {}
|
|
1484
1522
|
}) {
|
|
1485
|
-
const { calendar: v, formats:
|
|
1486
|
-
let
|
|
1487
|
-
const [m, g] =
|
|
1488
|
-
|
|
1523
|
+
const { calendar: v, formats: N } = (X(K) || ne()).getRaw(), f = i || N?.dateFormat;
|
|
1524
|
+
let x = typeof f == "function" ? f : re(f, v);
|
|
1525
|
+
const [m, g] = O(e), [T, k] = O(!1);
|
|
1526
|
+
J(() => {
|
|
1489
1527
|
g(e);
|
|
1490
1528
|
}, [e]);
|
|
1491
|
-
function
|
|
1492
|
-
|
|
1529
|
+
function b() {
|
|
1530
|
+
k(!1);
|
|
1493
1531
|
}
|
|
1494
|
-
function
|
|
1495
|
-
const
|
|
1496
|
-
g(R),
|
|
1532
|
+
function y(R) {
|
|
1533
|
+
const Y = R === m || R && m && R.valueOf() === m.valueOf() || !R && !m;
|
|
1534
|
+
g(R), Y || w && w({ value: R }), setTimeout(b, 1);
|
|
1497
1535
|
}
|
|
1498
|
-
const
|
|
1499
|
-
() => m ?
|
|
1500
|
-
[m,
|
|
1536
|
+
const A = E(
|
|
1537
|
+
() => m ? x(m) : "",
|
|
1538
|
+
[m, x]
|
|
1501
1539
|
);
|
|
1502
|
-
function
|
|
1503
|
-
if (!
|
|
1504
|
-
let
|
|
1505
|
-
|
|
1540
|
+
function P({ value: R, input: Y }) {
|
|
1541
|
+
if (!d && !p || Y) return;
|
|
1542
|
+
let G = typeof d == "function" ? d(R) : R ? new Date(R) : null;
|
|
1543
|
+
G = isNaN(G) ? m || null : G || null, y(G);
|
|
1506
1544
|
}
|
|
1507
|
-
return
|
|
1508
|
-
const R =
|
|
1545
|
+
return J(() => {
|
|
1546
|
+
const R = b;
|
|
1509
1547
|
return window.addEventListener("scroll", R), () => window.removeEventListener("scroll", R);
|
|
1510
|
-
}, []), /* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
|
|
1548
|
+
}, []), /* @__PURE__ */ C("div", { className: "wx-1lKOFG wx-datepicker", onClick: () => k(!0), children: [
|
|
1549
|
+
/* @__PURE__ */ r(
|
|
1550
|
+
ye,
|
|
1513
1551
|
{
|
|
1514
|
-
css:
|
|
1515
|
-
title:
|
|
1516
|
-
|
|
1552
|
+
css: `wx-date-input ${o}`,
|
|
1553
|
+
title: c,
|
|
1554
|
+
tooltip: u,
|
|
1555
|
+
value: A,
|
|
1517
1556
|
id: n,
|
|
1518
|
-
readonly: !
|
|
1557
|
+
readonly: !d,
|
|
1519
1558
|
disabled: t,
|
|
1520
1559
|
error: s,
|
|
1521
|
-
placeholder:
|
|
1522
|
-
onInput:
|
|
1523
|
-
onChange:
|
|
1560
|
+
placeholder: l,
|
|
1561
|
+
onInput: b,
|
|
1562
|
+
onChange: P,
|
|
1524
1563
|
icon: "wxi-calendar",
|
|
1525
|
-
|
|
1526
|
-
cursor: "pointer",
|
|
1527
|
-
width: "100%",
|
|
1528
|
-
paddingRight: "calc(var(--wx-input-icon-size) + var(--wx-input-icon-indent) * 2)"
|
|
1529
|
-
},
|
|
1530
|
-
clear: w
|
|
1564
|
+
clear: p
|
|
1531
1565
|
}
|
|
1532
1566
|
),
|
|
1533
|
-
|
|
1534
|
-
|
|
1567
|
+
T && !t && /* @__PURE__ */ r(
|
|
1568
|
+
se,
|
|
1535
1569
|
{
|
|
1536
|
-
onCancel:
|
|
1537
|
-
...
|
|
1538
|
-
children: /* @__PURE__ */
|
|
1539
|
-
|
|
1570
|
+
onCancel: b,
|
|
1571
|
+
...De(h),
|
|
1572
|
+
children: /* @__PURE__ */ r(
|
|
1573
|
+
Rt,
|
|
1540
1574
|
{
|
|
1541
|
-
buttons:
|
|
1575
|
+
buttons: a,
|
|
1542
1576
|
value: m,
|
|
1543
|
-
onChange: (R) =>
|
|
1577
|
+
onChange: (R) => y(R.value)
|
|
1544
1578
|
}
|
|
1545
1579
|
)
|
|
1546
1580
|
}
|
|
1547
1581
|
)
|
|
1548
1582
|
] });
|
|
1549
1583
|
}
|
|
1550
|
-
const
|
|
1584
|
+
const It = ["clear", "today"], me = (e, n, t) => {
|
|
1585
|
+
const s = new Date(e);
|
|
1586
|
+
return s.setMonth(s.getMonth() + n), s;
|
|
1587
|
+
}, Se = (e, n) => {
|
|
1588
|
+
const t = new Date(e || n || /* @__PURE__ */ new Date());
|
|
1589
|
+
return t.setDate(1), t;
|
|
1590
|
+
}, Ct = ({
|
|
1551
1591
|
start: e,
|
|
1552
1592
|
end: n,
|
|
1553
1593
|
current: t,
|
|
1554
1594
|
months: s = 2,
|
|
1555
|
-
markers:
|
|
1556
|
-
buttons:
|
|
1557
|
-
|
|
1595
|
+
markers: l = null,
|
|
1596
|
+
buttons: i = It,
|
|
1597
|
+
css: a = "",
|
|
1598
|
+
onChange: o
|
|
1558
1599
|
}) => {
|
|
1559
|
-
const [c,
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
d || h(y ? new Date(y) : t || /* @__PURE__ */ new Date());
|
|
1582
|
-
}, [c, t, d, h]);
|
|
1583
|
-
const g = D(
|
|
1584
|
-
(y) => {
|
|
1585
|
-
const N = y.value;
|
|
1586
|
-
let M = c, T = o;
|
|
1587
|
-
const R = N === -1;
|
|
1588
|
-
return R || (y.select ? !c || o ? (a(M = N), w(T = null)) : c > N ? (w(T = c), a(M = N)) : w(T = N) : N ? (a(M = new Date(N)), w(T = new Date(N))) : (a(M = null), w(T = null))), (R || !u.includes("done")) && i && i({ start: M, end: T }), [M, T];
|
|
1600
|
+
const [c, u] = U(e), [d, p] = U(n), [w, h] = O(() => Se(c, t)), [v, N] = O(
|
|
1601
|
+
() => me(Se(c, t), 1)
|
|
1602
|
+
), f = V((k) => {
|
|
1603
|
+
h(() => {
|
|
1604
|
+
const b = new Date(k);
|
|
1605
|
+
return b.setDate(1), N(me(b, 1)), b;
|
|
1606
|
+
});
|
|
1607
|
+
}, []), x = V((k) => {
|
|
1608
|
+
N(() => {
|
|
1609
|
+
const b = new Date(k);
|
|
1610
|
+
return b.setDate(1), h(me(b, -1)), b;
|
|
1611
|
+
});
|
|
1612
|
+
}, []);
|
|
1613
|
+
J(() => {
|
|
1614
|
+
f(c ? new Date(c) : t || /* @__PURE__ */ new Date());
|
|
1615
|
+
}, [c, t, f]);
|
|
1616
|
+
const m = V(
|
|
1617
|
+
(k) => {
|
|
1618
|
+
const b = k.value;
|
|
1619
|
+
let y = c, A = d;
|
|
1620
|
+
const P = b === -1;
|
|
1621
|
+
return P || (k.select ? !c || d ? (u(y = b), p(A = null)) : c > b ? (p(A = c), u(y = b)) : p(A = b) : b ? (u(y = new Date(b)), p(A = new Date(b))) : (u(y = null), p(A = null))), (P || !i.includes("done")) && o && o({ start: y, end: A }), [y, A];
|
|
1589
1622
|
},
|
|
1590
|
-
[c,
|
|
1591
|
-
),
|
|
1592
|
-
(
|
|
1593
|
-
const [
|
|
1594
|
-
|
|
1623
|
+
[c, d, i, o]
|
|
1624
|
+
), g = V(
|
|
1625
|
+
(k) => {
|
|
1626
|
+
const [b] = m(k);
|
|
1627
|
+
b && f(new Date(b));
|
|
1595
1628
|
},
|
|
1596
|
-
[
|
|
1597
|
-
),
|
|
1598
|
-
(
|
|
1599
|
-
const [,
|
|
1600
|
-
|
|
1629
|
+
[f, c, d]
|
|
1630
|
+
), T = V(
|
|
1631
|
+
(k) => {
|
|
1632
|
+
const [, b] = m(k);
|
|
1633
|
+
b && x(new Date(b));
|
|
1601
1634
|
},
|
|
1602
|
-
[
|
|
1635
|
+
[x, c, d]
|
|
1603
1636
|
);
|
|
1604
|
-
return
|
|
1637
|
+
return s === 1 ? /* @__PURE__ */ r(ve, { children: /* @__PURE__ */ r(
|
|
1605
1638
|
de,
|
|
1606
1639
|
{
|
|
1607
|
-
value: { start: c, end:
|
|
1608
|
-
current:
|
|
1609
|
-
markers:
|
|
1610
|
-
buttons:
|
|
1640
|
+
value: { start: c, end: d },
|
|
1641
|
+
current: w,
|
|
1642
|
+
markers: l,
|
|
1643
|
+
buttons: i,
|
|
1644
|
+
css: a,
|
|
1611
1645
|
part: "both",
|
|
1612
|
-
onChange:
|
|
1613
|
-
onCurrentChange:
|
|
1646
|
+
onChange: g,
|
|
1647
|
+
onCurrentChange: f
|
|
1614
1648
|
}
|
|
1615
|
-
) }) : /* @__PURE__ */
|
|
1616
|
-
/* @__PURE__ */
|
|
1649
|
+
) }) : /* @__PURE__ */ r(ve, { children: /* @__PURE__ */ C("div", { className: `wx-p2jCaW wx-rangecalendar ${a}`, children: [
|
|
1650
|
+
/* @__PURE__ */ r("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ r(
|
|
1617
1651
|
de,
|
|
1618
1652
|
{
|
|
1619
|
-
value: { start: c, end:
|
|
1620
|
-
current:
|
|
1621
|
-
markers:
|
|
1653
|
+
value: { start: c, end: d },
|
|
1654
|
+
current: w,
|
|
1655
|
+
markers: l,
|
|
1622
1656
|
buttons: !1,
|
|
1623
1657
|
part: "left",
|
|
1624
|
-
onChange:
|
|
1625
|
-
onCurrentChange:
|
|
1658
|
+
onChange: g,
|
|
1659
|
+
onCurrentChange: f
|
|
1626
1660
|
}
|
|
1627
1661
|
) }),
|
|
1628
|
-
/* @__PURE__ */
|
|
1662
|
+
/* @__PURE__ */ r("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ r(
|
|
1629
1663
|
de,
|
|
1630
1664
|
{
|
|
1631
|
-
value: { start: c, end:
|
|
1665
|
+
value: { start: c, end: d },
|
|
1632
1666
|
current: v,
|
|
1633
|
-
markers:
|
|
1634
|
-
buttons:
|
|
1667
|
+
markers: l,
|
|
1668
|
+
buttons: i,
|
|
1635
1669
|
part: "right",
|
|
1636
|
-
onChange:
|
|
1637
|
-
onCurrentChange:
|
|
1670
|
+
onChange: T,
|
|
1671
|
+
onCurrentChange: x
|
|
1638
1672
|
}
|
|
1639
1673
|
) })
|
|
1640
1674
|
] }) });
|
|
1641
|
-
},
|
|
1675
|
+
}, Lt = ["clear", "today"], ln = ({
|
|
1642
1676
|
value: e,
|
|
1643
1677
|
onChange: n,
|
|
1644
1678
|
id: t,
|
|
1645
1679
|
disabled: s = !1,
|
|
1646
|
-
error:
|
|
1647
|
-
placeholder:
|
|
1648
|
-
css:
|
|
1649
|
-
title:
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1680
|
+
error: l = !1,
|
|
1681
|
+
placeholder: i = "",
|
|
1682
|
+
css: a = "",
|
|
1683
|
+
title: o = "",
|
|
1684
|
+
tooltip: c,
|
|
1685
|
+
format: u = "",
|
|
1686
|
+
months: d = 2,
|
|
1687
|
+
buttons: p = Lt,
|
|
1688
|
+
editable: w = !1,
|
|
1689
|
+
clear: h = !1,
|
|
1655
1690
|
dropdown: v
|
|
1656
1691
|
}) => {
|
|
1657
|
-
const [
|
|
1658
|
-
|
|
1659
|
-
}, []),
|
|
1660
|
-
(
|
|
1661
|
-
const L =
|
|
1662
|
-
f && f(L), (
|
|
1692
|
+
const [N, f] = U(e), { calendar: x, formats: m } = (X(K) || ne()).getRaw(), g = u || m?.dateFormat, T = typeof g == "function" ? g : re(g, x), [k, b] = O(!1), y = V(() => {
|
|
1693
|
+
b(!1);
|
|
1694
|
+
}, []), A = E(() => N ? N.start ? T(N.start) + (N.end ? ` - ${T(N.end)}` : "") : T(N) : "", [N, T]), P = E(() => N && N.start || null, [N]), R = E(() => N && N.end || null, [N]), Y = V(
|
|
1695
|
+
(W) => {
|
|
1696
|
+
const L = W.start || W.end ? { start: W.start, end: W.end } : null;
|
|
1697
|
+
f && f(L), (W.start && W.end || !W.start && !W.end) && (n && n({ value: L }), setTimeout(y, 1));
|
|
1663
1698
|
},
|
|
1664
|
-
[n,
|
|
1665
|
-
),
|
|
1666
|
-
(
|
|
1667
|
-
if (!
|
|
1668
|
-
const { value: L, input:
|
|
1669
|
-
if (
|
|
1670
|
-
const [
|
|
1671
|
-
const I =
|
|
1672
|
-
let
|
|
1673
|
-
return isNaN(
|
|
1699
|
+
[n, y, f]
|
|
1700
|
+
), G = V(
|
|
1701
|
+
(W) => {
|
|
1702
|
+
if (!w && !h) return;
|
|
1703
|
+
const { value: L, input: B } = W;
|
|
1704
|
+
if (B) return;
|
|
1705
|
+
const [_, Z] = L.split(" -").map((F, j) => {
|
|
1706
|
+
const I = F.trim();
|
|
1707
|
+
let $ = typeof w == "function" ? w(I) : I ? new Date(I) : null, M = j === 0 ? P : R;
|
|
1708
|
+
return isNaN($) ? M || null : $ || null;
|
|
1674
1709
|
});
|
|
1675
|
-
|
|
1710
|
+
Y({ start: _, end: Z });
|
|
1676
1711
|
},
|
|
1677
|
-
[
|
|
1712
|
+
[w, h, P, R, Y]
|
|
1678
1713
|
);
|
|
1679
|
-
return
|
|
1680
|
-
const
|
|
1681
|
-
|
|
1714
|
+
return J(() => {
|
|
1715
|
+
const W = () => {
|
|
1716
|
+
y();
|
|
1682
1717
|
};
|
|
1683
|
-
return window.addEventListener("scroll",
|
|
1684
|
-
window.removeEventListener("scroll",
|
|
1718
|
+
return window.addEventListener("scroll", W), () => {
|
|
1719
|
+
window.removeEventListener("scroll", W);
|
|
1685
1720
|
};
|
|
1686
|
-
}, [
|
|
1721
|
+
}, [y]), /* @__PURE__ */ C(
|
|
1687
1722
|
"div",
|
|
1688
1723
|
{
|
|
1689
|
-
className: `wx-1b0WDQ wx-daterangepicker ${s ? "wx-disabled" : ""} ${
|
|
1690
|
-
onClick: () =>
|
|
1724
|
+
className: `wx-1b0WDQ wx-daterangepicker ${s ? "wx-disabled" : ""} ${l ? "wx-error" : ""}`,
|
|
1725
|
+
onClick: () => b(!0),
|
|
1691
1726
|
children: [
|
|
1692
|
-
/* @__PURE__ */
|
|
1693
|
-
|
|
1727
|
+
/* @__PURE__ */ r(
|
|
1728
|
+
ye,
|
|
1694
1729
|
{
|
|
1695
|
-
css:
|
|
1696
|
-
title:
|
|
1697
|
-
|
|
1730
|
+
css: `wx-date-input ${a}`,
|
|
1731
|
+
title: o,
|
|
1732
|
+
tooltip: c,
|
|
1733
|
+
value: A,
|
|
1698
1734
|
id: t,
|
|
1699
|
-
readonly: !
|
|
1735
|
+
readonly: !w,
|
|
1700
1736
|
disabled: s,
|
|
1701
|
-
placeholder:
|
|
1702
|
-
error:
|
|
1703
|
-
onChange:
|
|
1737
|
+
placeholder: i,
|
|
1738
|
+
error: l,
|
|
1739
|
+
onChange: G,
|
|
1704
1740
|
icon: "wxi-calendar",
|
|
1705
|
-
|
|
1706
|
-
cursor: "pointer",
|
|
1707
|
-
width: "100%",
|
|
1708
|
-
paddingRight: "calc(var(--wx-input-icon-size) + var(--wx-input-icon-indent) * 2)"
|
|
1709
|
-
},
|
|
1710
|
-
clear: p
|
|
1741
|
+
clear: h
|
|
1711
1742
|
}
|
|
1712
1743
|
),
|
|
1713
|
-
|
|
1714
|
-
|
|
1744
|
+
k && !s && /* @__PURE__ */ r(
|
|
1745
|
+
se,
|
|
1715
1746
|
{
|
|
1716
|
-
onCancel:
|
|
1717
|
-
...
|
|
1718
|
-
children: /* @__PURE__ */
|
|
1719
|
-
|
|
1747
|
+
onCancel: y,
|
|
1748
|
+
...De(v),
|
|
1749
|
+
children: /* @__PURE__ */ r(
|
|
1750
|
+
Ct,
|
|
1720
1751
|
{
|
|
1721
|
-
onCancel:
|
|
1722
|
-
buttons:
|
|
1723
|
-
start:
|
|
1752
|
+
onCancel: y,
|
|
1753
|
+
buttons: p,
|
|
1754
|
+
start: P,
|
|
1724
1755
|
end: R,
|
|
1725
|
-
months:
|
|
1726
|
-
onChange:
|
|
1756
|
+
months: d,
|
|
1757
|
+
onChange: Y
|
|
1727
1758
|
}
|
|
1728
1759
|
)
|
|
1729
1760
|
}
|
|
@@ -1732,583 +1763,620 @@ const Rt = ["clear", "today"], Tt = ({
|
|
|
1732
1763
|
}
|
|
1733
1764
|
);
|
|
1734
1765
|
};
|
|
1735
|
-
function
|
|
1766
|
+
function sn({
|
|
1736
1767
|
hotkey: e = null,
|
|
1737
1768
|
toggleButton: n,
|
|
1738
1769
|
children: t
|
|
1739
1770
|
}) {
|
|
1740
|
-
const s =
|
|
1741
|
-
() => `wxi-${
|
|
1742
|
-
[
|
|
1743
|
-
),
|
|
1744
|
-
return
|
|
1745
|
-
const
|
|
1746
|
-
!
|
|
1747
|
-
},
|
|
1748
|
-
const
|
|
1749
|
-
|
|
1771
|
+
const s = S(null), [l, i] = O(!1), a = E(
|
|
1772
|
+
() => `wxi-${l ? "collapse" : "expand"}`,
|
|
1773
|
+
[l]
|
|
1774
|
+
), o = S(null);
|
|
1775
|
+
return o.current = () => {
|
|
1776
|
+
const c = s.current;
|
|
1777
|
+
!l && c ? c.requestFullscreen() : l && document.exitFullscreen(), i((u) => !u);
|
|
1778
|
+
}, rt({ [e]: () => o.current() }, s), J(() => {
|
|
1779
|
+
const c = () => {
|
|
1780
|
+
i(document.fullscreenElement === s.current);
|
|
1750
1781
|
};
|
|
1751
|
-
return document.addEventListener("fullscreenchange",
|
|
1752
|
-
document.removeEventListener("fullscreenchange",
|
|
1782
|
+
return document.addEventListener("fullscreenchange", c), () => {
|
|
1783
|
+
document.removeEventListener("fullscreenchange", c);
|
|
1753
1784
|
};
|
|
1754
|
-
}, []), /* @__PURE__ */
|
|
1785
|
+
}, []), /* @__PURE__ */ C("div", { className: "wx-13aa5W wx-fullscreen", ref: s, tabIndex: -1, children: [
|
|
1755
1786
|
t,
|
|
1756
|
-
n ? n(
|
|
1787
|
+
n ? n(o.current, l) : /* @__PURE__ */ r(le, { css: "wx-13aa5W wx-fullscreen-button", onClick: o.current, children: /* @__PURE__ */ r("i", { className: `wx-13aa5W ${a} wx-fullscreen-icon`, children: " " }) })
|
|
1757
1788
|
] });
|
|
1758
1789
|
}
|
|
1759
|
-
function
|
|
1760
|
-
return
|
|
1790
|
+
function cn({ css: e = "", title: n = "", tooltip: t, children: s, onClick: l }) {
|
|
1791
|
+
return s ? /* @__PURE__ */ r(
|
|
1761
1792
|
"i",
|
|
1762
1793
|
{
|
|
1763
1794
|
title: n,
|
|
1764
1795
|
role: "img",
|
|
1765
1796
|
className: `wx-mdnST1 wx-icon ${e}`,
|
|
1766
|
-
onClick:
|
|
1767
|
-
|
|
1797
|
+
onClick: l,
|
|
1798
|
+
"data-tooltip-text": t,
|
|
1799
|
+
children: s
|
|
1768
1800
|
}
|
|
1769
|
-
) : /* @__PURE__ */
|
|
1801
|
+
) : /* @__PURE__ */ r(
|
|
1770
1802
|
"i",
|
|
1771
1803
|
{
|
|
1772
1804
|
title: n,
|
|
1773
1805
|
className: `wx-mdnST1 wx-icon ${e}`,
|
|
1774
|
-
onClick:
|
|
1806
|
+
onClick: l,
|
|
1807
|
+
"data-tooltip-text": t
|
|
1775
1808
|
}
|
|
1776
1809
|
);
|
|
1777
1810
|
}
|
|
1778
|
-
const
|
|
1779
|
-
function
|
|
1811
|
+
const St = [];
|
|
1812
|
+
function on({
|
|
1780
1813
|
id: e,
|
|
1781
|
-
value: n =
|
|
1814
|
+
value: n = St,
|
|
1782
1815
|
options: t = [],
|
|
1783
1816
|
textOptions: s = null,
|
|
1784
|
-
textField:
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1817
|
+
textField: l = "label",
|
|
1818
|
+
keepText: i = !1,
|
|
1819
|
+
placeholder: a = "",
|
|
1820
|
+
title: o = "",
|
|
1821
|
+
tooltip: c,
|
|
1822
|
+
disabled: u = !1,
|
|
1823
|
+
error: d = !1,
|
|
1824
|
+
checkboxes: p = !1,
|
|
1825
|
+
css: w = "",
|
|
1826
|
+
onChange: h,
|
|
1827
|
+
children: v,
|
|
1828
|
+
dropdown: N = {}
|
|
1793
1829
|
}) {
|
|
1794
|
-
const
|
|
1795
|
-
const
|
|
1796
|
-
return
|
|
1797
|
-
}, [
|
|
1798
|
-
x.current =
|
|
1799
|
-
}, []),
|
|
1800
|
-
|
|
1801
|
-
}, [
|
|
1802
|
-
(
|
|
1803
|
-
const { id:
|
|
1804
|
-
|
|
1830
|
+
const f = te(e), x = S(null), m = S(null), [g, T] = U(n), [k, b] = O(""), [y, A] = O(!1), P = S(null), R = E(() => g ? (s || t).filter((F) => g.includes(F.id)) : [], [g, s, t]), Y = E(() => {
|
|
1831
|
+
const F = t;
|
|
1832
|
+
return k ? F.filter((j) => j[l].toLowerCase().includes(k.toLowerCase())) : F;
|
|
1833
|
+
}, [k, t, l]), G = V((F) => {
|
|
1834
|
+
x.current = F.navigate, m.current = F.keydown;
|
|
1835
|
+
}, []), W = V(() => {
|
|
1836
|
+
Y.length ? x.current(0) : x.current(null);
|
|
1837
|
+
}, [Y]), L = V(
|
|
1838
|
+
(F) => {
|
|
1839
|
+
const { id: j } = F;
|
|
1840
|
+
j && (T(j), i || b(""), h && h({ value: j }), P.current.focus());
|
|
1805
1841
|
},
|
|
1806
|
-
[
|
|
1807
|
-
),
|
|
1808
|
-
(
|
|
1809
|
-
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1842
|
+
[h, i]
|
|
1843
|
+
), B = V(
|
|
1844
|
+
(F, j) => {
|
|
1845
|
+
j && j.stopPropagation();
|
|
1846
|
+
const I = g.filter(($) => $ !== F);
|
|
1847
|
+
T(I), h && h({ value: I });
|
|
1812
1848
|
},
|
|
1813
|
-
[
|
|
1814
|
-
),
|
|
1815
|
-
() =>
|
|
1816
|
-
[
|
|
1817
|
-
),
|
|
1818
|
-
|
|
1819
|
-
}, [
|
|
1820
|
-
return /* @__PURE__ */
|
|
1849
|
+
[g, h]
|
|
1850
|
+
), _ = V(
|
|
1851
|
+
() => g && g.length ? Y.findIndex((F) => F.id === g[0]) : 0,
|
|
1852
|
+
[g, Y]
|
|
1853
|
+
), Z = V(() => {
|
|
1854
|
+
u || (P.current.focus(), x.current(_()));
|
|
1855
|
+
}, [u, _]);
|
|
1856
|
+
return /* @__PURE__ */ C(
|
|
1821
1857
|
"div",
|
|
1822
1858
|
{
|
|
1823
|
-
title:
|
|
1824
|
-
className: `wx-12Wj21 wx-multicombo ${
|
|
1825
|
-
onClick:
|
|
1826
|
-
onKeyDown: (
|
|
1859
|
+
title: o,
|
|
1860
|
+
className: `wx-12Wj21 wx-multicombo ${w} ${d ? "wx-error" : ""} ${u ? "wx-disabled" : ""} ${R.length ? "wx-not-empty" : ""} ${y && !u ? "wx-focus" : ""}`,
|
|
1861
|
+
onClick: Z,
|
|
1862
|
+
onKeyDown: (F) => m.current(F, _()),
|
|
1863
|
+
"data-tooltip-text": c,
|
|
1827
1864
|
children: [
|
|
1828
|
-
/* @__PURE__ */
|
|
1829
|
-
/* @__PURE__ */
|
|
1830
|
-
|
|
1831
|
-
!
|
|
1865
|
+
/* @__PURE__ */ C("div", { className: "wx-12Wj21 wx-wrapper", children: [
|
|
1866
|
+
/* @__PURE__ */ r("div", { className: "wx-12Wj21 wx-tags", children: R.map((F) => /* @__PURE__ */ C("div", { className: "wx-12Wj21 wx-tag", children: [
|
|
1867
|
+
v ? oe(v, { option: F }) : F[l],
|
|
1868
|
+
!u && /* @__PURE__ */ r(
|
|
1832
1869
|
"i",
|
|
1833
1870
|
{
|
|
1834
1871
|
className: "wx-12Wj21 wx-icon wxi-close",
|
|
1835
|
-
onClick: (
|
|
1872
|
+
onClick: (j) => B(F.id, j)
|
|
1836
1873
|
}
|
|
1837
1874
|
)
|
|
1838
|
-
] },
|
|
1839
|
-
/* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
1875
|
+
] }, F.id)) }),
|
|
1876
|
+
/* @__PURE__ */ C("div", { className: "wx-12Wj21 wx-select", children: [
|
|
1877
|
+
/* @__PURE__ */ r(
|
|
1841
1878
|
"input",
|
|
1842
1879
|
{
|
|
1843
1880
|
className: "wx-12Wj21 wx-input",
|
|
1844
|
-
id:
|
|
1881
|
+
id: f,
|
|
1845
1882
|
type: "text",
|
|
1846
|
-
value:
|
|
1847
|
-
onChange: (
|
|
1848
|
-
onInput:
|
|
1849
|
-
placeholder:
|
|
1850
|
-
disabled:
|
|
1851
|
-
onFocus: () =>
|
|
1852
|
-
onBlur: () =>
|
|
1853
|
-
ref:
|
|
1883
|
+
value: k,
|
|
1884
|
+
onChange: (F) => b(F.target.value),
|
|
1885
|
+
onInput: W,
|
|
1886
|
+
placeholder: a,
|
|
1887
|
+
disabled: u,
|
|
1888
|
+
onFocus: () => A(!0),
|
|
1889
|
+
onBlur: () => A(!1),
|
|
1890
|
+
ref: P
|
|
1854
1891
|
}
|
|
1855
1892
|
),
|
|
1856
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ r("i", { className: "wx-12Wj21 wx-icon wxi-angle-down" })
|
|
1857
1894
|
] })
|
|
1858
1895
|
] }),
|
|
1859
|
-
!
|
|
1860
|
-
|
|
1896
|
+
!u && /* @__PURE__ */ r(
|
|
1897
|
+
ke,
|
|
1861
1898
|
{
|
|
1862
|
-
items:
|
|
1899
|
+
items: Y,
|
|
1863
1900
|
multiselect: !0,
|
|
1864
|
-
onReady:
|
|
1865
|
-
onSelect:
|
|
1866
|
-
checkboxes:
|
|
1867
|
-
value:
|
|
1868
|
-
...
|
|
1869
|
-
children: ({ option:
|
|
1901
|
+
onReady: G,
|
|
1902
|
+
onSelect: L,
|
|
1903
|
+
checkboxes: p,
|
|
1904
|
+
value: g,
|
|
1905
|
+
...N,
|
|
1906
|
+
children: ({ option: F }) => /* @__PURE__ */ r(Q, { children: v ? oe(v, { option: F }) : F[l] })
|
|
1870
1907
|
}
|
|
1871
1908
|
)
|
|
1872
1909
|
]
|
|
1873
1910
|
}
|
|
1874
1911
|
);
|
|
1875
1912
|
}
|
|
1876
|
-
const
|
|
1913
|
+
const an = ({
|
|
1877
1914
|
total: e = 0,
|
|
1878
1915
|
pageSize: n = 20,
|
|
1879
1916
|
value: t = 1,
|
|
1880
|
-
|
|
1917
|
+
css: s = "",
|
|
1918
|
+
onChange: l
|
|
1881
1919
|
}) => {
|
|
1882
|
-
const [
|
|
1883
|
-
Number.isNaN(f) || (
|
|
1884
|
-
|
|
1920
|
+
const [i, a] = U(n), [o, c] = U(t), u = (X(K) || ne()).getGroup("core"), d = Math.ceil(e / i), p = (o - 1) * i, w = Math.min(o * i, e), h = (f, x) => {
|
|
1921
|
+
Number.isNaN(f) || (x || c(f), f = Math.max(1, Math.min(f, d)), x && c(f), f !== o && setTimeout(() => {
|
|
1922
|
+
l && l({
|
|
1885
1923
|
value: f,
|
|
1886
|
-
from: (f - 1) *
|
|
1887
|
-
to: Math.min(f *
|
|
1888
|
-
pageSize:
|
|
1924
|
+
from: (f - 1) * i,
|
|
1925
|
+
to: Math.min(f * i, e),
|
|
1926
|
+
pageSize: i
|
|
1889
1927
|
});
|
|
1890
1928
|
}));
|
|
1891
1929
|
};
|
|
1892
1930
|
function v(f) {
|
|
1893
1931
|
switch (f) {
|
|
1894
1932
|
case "first":
|
|
1895
|
-
|
|
1933
|
+
h(1);
|
|
1896
1934
|
break;
|
|
1897
1935
|
case "prev":
|
|
1898
|
-
|
|
1936
|
+
h(o - 1);
|
|
1899
1937
|
break;
|
|
1900
1938
|
case "next":
|
|
1901
|
-
|
|
1939
|
+
h(o + 1);
|
|
1902
1940
|
break;
|
|
1903
1941
|
case "last":
|
|
1904
|
-
|
|
1942
|
+
h(d);
|
|
1905
1943
|
break;
|
|
1906
1944
|
}
|
|
1907
1945
|
}
|
|
1908
|
-
const
|
|
1909
|
-
const
|
|
1910
|
-
Number.isNaN(
|
|
1946
|
+
const N = (f) => {
|
|
1947
|
+
const x = f.target.value * 1;
|
|
1948
|
+
Number.isNaN(x) || (a(x), l && l({ value: o, from: p, to: w, pageSize: x }));
|
|
1911
1949
|
};
|
|
1912
|
-
return /* @__PURE__ */
|
|
1913
|
-
/* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
|
|
1950
|
+
return /* @__PURE__ */ C("div", { className: `wx-35Np0p wx-pager ${s}`, children: [
|
|
1951
|
+
/* @__PURE__ */ C("div", { className: "wx-35Np0p wx-left", children: [
|
|
1952
|
+
/* @__PURE__ */ C("span", { children: [
|
|
1953
|
+
u("Rows per page"),
|
|
1916
1954
|
": "
|
|
1917
1955
|
] }),
|
|
1918
|
-
/* @__PURE__ */
|
|
1956
|
+
/* @__PURE__ */ r(
|
|
1919
1957
|
"input",
|
|
1920
1958
|
{
|
|
1921
1959
|
type: "number",
|
|
1922
1960
|
min: 1,
|
|
1923
1961
|
className: "wx-35Np0p wx-input",
|
|
1924
|
-
value:
|
|
1925
|
-
onChange:
|
|
1962
|
+
value: i,
|
|
1963
|
+
onChange: N
|
|
1926
1964
|
}
|
|
1927
1965
|
)
|
|
1928
1966
|
] }),
|
|
1929
|
-
/* @__PURE__ */
|
|
1930
|
-
/* @__PURE__ */
|
|
1967
|
+
/* @__PURE__ */ C("div", { className: "wx-35Np0p wx-center", children: [
|
|
1968
|
+
/* @__PURE__ */ r(
|
|
1931
1969
|
"i",
|
|
1932
1970
|
{
|
|
1933
|
-
className: "wx-35Np0p wx-icon wxi-angle-dbl-left" + (
|
|
1971
|
+
className: "wx-35Np0p wx-icon wxi-angle-dbl-left" + (o === 1 ? " wx-disabled" : ""),
|
|
1934
1972
|
onClick: () => v("first")
|
|
1935
1973
|
}
|
|
1936
1974
|
),
|
|
1937
|
-
/* @__PURE__ */
|
|
1975
|
+
/* @__PURE__ */ r(
|
|
1938
1976
|
"i",
|
|
1939
1977
|
{
|
|
1940
|
-
className: "wx-35Np0p wx-icon wxi-angle-left" + (
|
|
1978
|
+
className: "wx-35Np0p wx-icon wxi-angle-left" + (o === 1 ? " wx-disabled" : ""),
|
|
1941
1979
|
onClick: () => v("prev")
|
|
1942
1980
|
}
|
|
1943
1981
|
),
|
|
1944
|
-
/* @__PURE__ */
|
|
1982
|
+
/* @__PURE__ */ r(
|
|
1945
1983
|
"input",
|
|
1946
1984
|
{
|
|
1947
1985
|
type: "text",
|
|
1948
|
-
value:
|
|
1986
|
+
value: o,
|
|
1949
1987
|
className: "wx-35Np0p wx-input",
|
|
1950
|
-
onChange: (f) =>
|
|
1951
|
-
onBlur: (f) =>
|
|
1988
|
+
onChange: (f) => h(f.target.value * 1),
|
|
1989
|
+
onBlur: (f) => h(f.target.value * 1, !0)
|
|
1952
1990
|
}
|
|
1953
1991
|
),
|
|
1954
|
-
/* @__PURE__ */
|
|
1992
|
+
/* @__PURE__ */ r(
|
|
1955
1993
|
"i",
|
|
1956
1994
|
{
|
|
1957
|
-
className: "wx-35Np0p wx-icon wxi-angle-right" + (
|
|
1995
|
+
className: "wx-35Np0p wx-icon wxi-angle-right" + (o === d ? " wx-disabled" : ""),
|
|
1958
1996
|
onClick: () => v("next")
|
|
1959
1997
|
}
|
|
1960
1998
|
),
|
|
1961
|
-
/* @__PURE__ */
|
|
1999
|
+
/* @__PURE__ */ r(
|
|
1962
2000
|
"i",
|
|
1963
2001
|
{
|
|
1964
|
-
className: "wx-35Np0p wx-icon wxi-angle-dbl-right" + (
|
|
2002
|
+
className: "wx-35Np0p wx-icon wxi-angle-dbl-right" + (o === d ? " wx-disabled" : ""),
|
|
1965
2003
|
onClick: () => v("last")
|
|
1966
2004
|
}
|
|
1967
2005
|
)
|
|
1968
2006
|
] }),
|
|
1969
|
-
/* @__PURE__ */
|
|
1970
|
-
|
|
2007
|
+
/* @__PURE__ */ C("div", { className: "wx-35Np0p wx-right", children: [
|
|
2008
|
+
u("Total pages"),
|
|
1971
2009
|
": ",
|
|
1972
|
-
|
|
2010
|
+
d
|
|
1973
2011
|
] })
|
|
1974
2012
|
] });
|
|
1975
2013
|
};
|
|
1976
|
-
function
|
|
2014
|
+
function Ft({
|
|
1977
2015
|
id: e,
|
|
1978
2016
|
label: n = "",
|
|
1979
2017
|
value: t,
|
|
1980
2018
|
name: s = "",
|
|
1981
|
-
inputValue:
|
|
1982
|
-
disabled:
|
|
1983
|
-
|
|
2019
|
+
inputValue: l = "",
|
|
2020
|
+
disabled: i = !1,
|
|
2021
|
+
css: a = "",
|
|
2022
|
+
onChange: o
|
|
1984
2023
|
}) {
|
|
1985
|
-
const c =
|
|
1986
|
-
function v(
|
|
1987
|
-
const f =
|
|
1988
|
-
|
|
2024
|
+
const c = et(), u = te(e) || c, [d, p] = O(!1), w = t !== void 0, h = w ? t : d;
|
|
2025
|
+
function v(N) {
|
|
2026
|
+
const f = N.target.checked;
|
|
2027
|
+
w || p(f), f && o && o({ value: !0, inputValue: l });
|
|
1989
2028
|
}
|
|
1990
|
-
return /* @__PURE__ */
|
|
1991
|
-
/* @__PURE__ */
|
|
2029
|
+
return /* @__PURE__ */ C("div", { className: `wx-3lDF1s wx-radio ${a}`, children: [
|
|
2030
|
+
/* @__PURE__ */ r(
|
|
1992
2031
|
"input",
|
|
1993
2032
|
{
|
|
1994
2033
|
type: "radio",
|
|
1995
2034
|
className: "wx-3lDF1s wx-input",
|
|
1996
|
-
id:
|
|
1997
|
-
disabled:
|
|
2035
|
+
id: u,
|
|
2036
|
+
disabled: i,
|
|
1998
2037
|
name: s,
|
|
1999
|
-
value:
|
|
2000
|
-
checked:
|
|
2038
|
+
value: l,
|
|
2039
|
+
checked: h,
|
|
2001
2040
|
onChange: v
|
|
2002
2041
|
}
|
|
2003
2042
|
),
|
|
2004
|
-
/* @__PURE__ */
|
|
2005
|
-
/* @__PURE__ */
|
|
2006
|
-
n && /* @__PURE__ */
|
|
2043
|
+
/* @__PURE__ */ C("label", { htmlFor: u, className: "wx-3lDF1s wx-label", children: [
|
|
2044
|
+
/* @__PURE__ */ r("span", { className: "wx-3lDF1s wx-circle" }),
|
|
2045
|
+
n && /* @__PURE__ */ r("span", { className: "wx-3lDF1s wx-radio-text", children: n })
|
|
2007
2046
|
] })
|
|
2008
2047
|
] });
|
|
2009
2048
|
}
|
|
2010
|
-
function
|
|
2049
|
+
function un({
|
|
2011
2050
|
options: e = [{}],
|
|
2012
2051
|
value: n = "",
|
|
2013
2052
|
onChange: t,
|
|
2014
|
-
type: s = ""
|
|
2053
|
+
type: s = "",
|
|
2054
|
+
css: l = ""
|
|
2015
2055
|
}) {
|
|
2016
|
-
const
|
|
2017
|
-
|
|
2018
|
-
|
|
2056
|
+
const i = ae(), [a, o] = O(n);
|
|
2057
|
+
J(() => {
|
|
2058
|
+
o(n);
|
|
2019
2059
|
}, [n]);
|
|
2020
|
-
function c(
|
|
2021
|
-
const
|
|
2022
|
-
|
|
2060
|
+
function c(u) {
|
|
2061
|
+
const d = u.inputValue;
|
|
2062
|
+
o(d), t && t({ value: d });
|
|
2023
2063
|
}
|
|
2024
|
-
return /* @__PURE__ */
|
|
2025
|
-
|
|
2064
|
+
return /* @__PURE__ */ r(ue.Provider, { value: null, children: /* @__PURE__ */ r("div", { className: `wx-38w70j wx-radiogroup ${s && `wx-${s}`} ${l}`, children: e.map((u) => /* @__PURE__ */ r("div", { className: "wx-38w70j wx-item", children: /* @__PURE__ */ r(
|
|
2065
|
+
Ft,
|
|
2026
2066
|
{
|
|
2027
|
-
label:
|
|
2028
|
-
inputValue:
|
|
2029
|
-
value:
|
|
2030
|
-
name:
|
|
2067
|
+
label: u.label,
|
|
2068
|
+
inputValue: u.id,
|
|
2069
|
+
value: a === u.id,
|
|
2070
|
+
name: i,
|
|
2031
2071
|
onChange: c
|
|
2032
2072
|
}
|
|
2033
|
-
) },
|
|
2073
|
+
) }, u.id)) }) });
|
|
2034
2074
|
}
|
|
2035
|
-
function
|
|
2075
|
+
function dn({
|
|
2036
2076
|
value: e = "",
|
|
2037
2077
|
options: n = [],
|
|
2038
2078
|
textOptions: t = null,
|
|
2039
2079
|
placeholder: s = "",
|
|
2040
|
-
disabled:
|
|
2041
|
-
error:
|
|
2042
|
-
title:
|
|
2080
|
+
disabled: l = !1,
|
|
2081
|
+
error: i = !1,
|
|
2082
|
+
title: a = "",
|
|
2083
|
+
tooltip: o,
|
|
2043
2084
|
textField: c = "label",
|
|
2044
|
-
clear:
|
|
2045
|
-
|
|
2085
|
+
clear: u = !1,
|
|
2086
|
+
css: d = "",
|
|
2087
|
+
children: p,
|
|
2046
2088
|
onChange: w,
|
|
2047
|
-
dropdown:
|
|
2089
|
+
dropdown: h = {}
|
|
2048
2090
|
}) {
|
|
2049
|
-
const
|
|
2050
|
-
let [
|
|
2051
|
-
function
|
|
2052
|
-
|
|
2091
|
+
const v = S(null), N = S(null);
|
|
2092
|
+
let [f, x] = U(e);
|
|
2093
|
+
function m(y) {
|
|
2094
|
+
v.current = y.navigate, N.current = y.keydown;
|
|
2053
2095
|
}
|
|
2054
|
-
const
|
|
2096
|
+
const g = E(() => f || f === 0 ? (t || n).find((y) => y.id === f) : null, [f, t, n]), T = V(
|
|
2055
2097
|
({ id: y }) => {
|
|
2056
|
-
(y || y === 0) && (
|
|
2098
|
+
(y || y === 0) && (x(y), v.current(null), w && w({ value: y }));
|
|
2057
2099
|
},
|
|
2058
|
-
[
|
|
2059
|
-
),
|
|
2100
|
+
[x, w]
|
|
2101
|
+
), k = V(
|
|
2060
2102
|
(y) => {
|
|
2061
|
-
y.stopPropagation(),
|
|
2103
|
+
y.stopPropagation(), x(""), w && w({ value: "" });
|
|
2062
2104
|
},
|
|
2063
|
-
[
|
|
2064
|
-
), b =
|
|
2065
|
-
return /* @__PURE__ */
|
|
2105
|
+
[x, w]
|
|
2106
|
+
), b = V(() => n.findIndex((y) => y.id === f), [n, f]);
|
|
2107
|
+
return /* @__PURE__ */ C(
|
|
2066
2108
|
"div",
|
|
2067
2109
|
{
|
|
2068
|
-
className: `wx-2YgblL wx-richselect ${
|
|
2069
|
-
title:
|
|
2070
|
-
onClick: () =>
|
|
2071
|
-
onKeyDown: (y) =>
|
|
2110
|
+
className: `wx-2YgblL wx-richselect ${d} ${i ? "wx-2YgblL wx-error" : ""} ${l ? "wx-2YgblL wx-disabled" : ""} ${p ? "" : "wx-2YgblL wx-nowrap"}`,
|
|
2111
|
+
title: a,
|
|
2112
|
+
onClick: () => v.current(b()),
|
|
2113
|
+
onKeyDown: (y) => N.current(y, b()),
|
|
2072
2114
|
tabIndex: 0,
|
|
2115
|
+
"data-tooltip-text": o,
|
|
2073
2116
|
children: [
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
|
|
2076
|
-
!
|
|
2117
|
+
/* @__PURE__ */ r("div", { className: "wx-2YgblL wx-label", children: g ? p ? p(g) : g[c] : s ? /* @__PURE__ */ r("span", { className: "wx-2YgblL wx-placeholder", children: s }) : " " }),
|
|
2118
|
+
u && !l && f ? /* @__PURE__ */ r("i", { className: "wx-2YgblL wx-icon wxi-close", onClick: k }) : /* @__PURE__ */ r("i", { className: "wx-2YgblL wx-icon wxi-angle-down" }),
|
|
2119
|
+
!l && /* @__PURE__ */ r(ke, { items: n, onReady: m, onSelect: T, ...h, children: ({ option: y }) => p ? p(y) : y[c] })
|
|
2077
2120
|
]
|
|
2078
2121
|
}
|
|
2079
2122
|
);
|
|
2080
2123
|
}
|
|
2081
|
-
const
|
|
2124
|
+
const fn = ({
|
|
2082
2125
|
options: e = [],
|
|
2083
2126
|
value: n = "",
|
|
2084
2127
|
css: t = "",
|
|
2085
2128
|
children: s,
|
|
2086
|
-
onChange:
|
|
2129
|
+
onChange: l
|
|
2087
2130
|
}) => {
|
|
2088
|
-
const [
|
|
2089
|
-
|
|
2131
|
+
const [i, a] = O(n), o = (c) => {
|
|
2132
|
+
a(c), l && l({ value: c });
|
|
2090
2133
|
};
|
|
2091
|
-
return
|
|
2092
|
-
|
|
2093
|
-
}, [n]), /* @__PURE__ */
|
|
2134
|
+
return J(() => {
|
|
2135
|
+
a(n);
|
|
2136
|
+
}, [n]), /* @__PURE__ */ r("div", { className: `wx-0hMO7P wx-segmented ${t}`, children: e.map((c) => /* @__PURE__ */ r(
|
|
2094
2137
|
"button",
|
|
2095
2138
|
{
|
|
2096
|
-
className: `wx-0hMO7P wx-segment ${
|
|
2097
|
-
title:
|
|
2098
|
-
onClick: () => c
|
|
2099
|
-
|
|
2100
|
-
|
|
2139
|
+
className: `wx-0hMO7P wx-segment ${c.css} ${c.id === i ? "wx-selected" : ""}`,
|
|
2140
|
+
title: c.title,
|
|
2141
|
+
onClick: () => o(c.id),
|
|
2142
|
+
"data-tooltip-text": c.tooltip,
|
|
2143
|
+
children: s ? oe(s, { option: c }) : /* @__PURE__ */ C(Q, { children: [
|
|
2144
|
+
c.icon && /* @__PURE__ */ r(
|
|
2101
2145
|
"i",
|
|
2102
2146
|
{
|
|
2103
|
-
className: `wx-0hMO7P wx-icon ${
|
|
2147
|
+
className: `wx-0hMO7P wx-icon ${c.icon} ${c.label ? "" : "wx-only"}`
|
|
2104
2148
|
}
|
|
2105
2149
|
),
|
|
2106
|
-
|
|
2150
|
+
c.label && /* @__PURE__ */ r("span", { className: "wx-0hMO7P wx-label", children: c.label })
|
|
2107
2151
|
] })
|
|
2108
2152
|
},
|
|
2109
|
-
|
|
2153
|
+
c.id
|
|
2110
2154
|
)) });
|
|
2111
2155
|
};
|
|
2112
|
-
function
|
|
2156
|
+
function wn({
|
|
2113
2157
|
value: e,
|
|
2114
2158
|
options: n = [],
|
|
2115
2159
|
placeholder: t = "",
|
|
2116
2160
|
title: s = "",
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2161
|
+
tooltip: l,
|
|
2162
|
+
disabled: i = !1,
|
|
2163
|
+
error: a = !1,
|
|
2164
|
+
textField: o = "label",
|
|
2120
2165
|
clear: c = !1,
|
|
2121
|
-
id:
|
|
2122
|
-
|
|
2166
|
+
id: u,
|
|
2167
|
+
css: d = "",
|
|
2168
|
+
onChange: p
|
|
2123
2169
|
}) {
|
|
2124
|
-
const w =
|
|
2125
|
-
(
|
|
2126
|
-
const
|
|
2127
|
-
|
|
2170
|
+
const w = te(u), [h, v] = O(e || ""), N = V(
|
|
2171
|
+
(x) => {
|
|
2172
|
+
const m = x.target.value;
|
|
2173
|
+
v(m), p && p({ value: m });
|
|
2128
2174
|
},
|
|
2129
|
-
[
|
|
2130
|
-
),
|
|
2131
|
-
|
|
2132
|
-
}, [
|
|
2133
|
-
return /* @__PURE__ */
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2175
|
+
[p]
|
|
2176
|
+
), f = V(() => {
|
|
2177
|
+
v(""), p && p({ value: "" });
|
|
2178
|
+
}, [p]);
|
|
2179
|
+
return /* @__PURE__ */ C(
|
|
2180
|
+
"div",
|
|
2181
|
+
{
|
|
2182
|
+
className: "wx-2yx1Fo wx-select-box " + d,
|
|
2183
|
+
"data-tooltip-text": l,
|
|
2184
|
+
children: [
|
|
2185
|
+
/* @__PURE__ */ C(
|
|
2186
|
+
"select",
|
|
2187
|
+
{
|
|
2188
|
+
id: w,
|
|
2189
|
+
value: h,
|
|
2190
|
+
disabled: i,
|
|
2191
|
+
className: `wx-2yx1Fo wx-select ${a ? "wx-2yx1Fo wx-error" : ""}`,
|
|
2192
|
+
title: s,
|
|
2193
|
+
onChange: N,
|
|
2194
|
+
children: [
|
|
2195
|
+
/* @__PURE__ */ r("option", { value: "", children: t }),
|
|
2196
|
+
n.map((x) => /* @__PURE__ */ r("option", { value: x.id, children: x[o] }, x.id))
|
|
2197
|
+
]
|
|
2198
|
+
}
|
|
2199
|
+
),
|
|
2200
|
+
c && !i && h ? /* @__PURE__ */ r("i", { className: "wx-2yx1Fo wx-icon wxi-close", onClick: f }) : /* @__PURE__ */ r("i", { className: "wx-2yx1Fo wx-icon wxi-angle-down" })
|
|
2201
|
+
]
|
|
2202
|
+
}
|
|
2203
|
+
);
|
|
2151
2204
|
}
|
|
2152
|
-
function
|
|
2205
|
+
function Fe({
|
|
2153
2206
|
id: e,
|
|
2154
2207
|
label: n = "",
|
|
2155
2208
|
css: t = "",
|
|
2156
2209
|
min: s = 0,
|
|
2157
|
-
max:
|
|
2158
|
-
value:
|
|
2159
|
-
step:
|
|
2160
|
-
title:
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2210
|
+
max: l = 100,
|
|
2211
|
+
value: i = 0,
|
|
2212
|
+
step: a = 1,
|
|
2213
|
+
title: o = "",
|
|
2214
|
+
tooltip: c,
|
|
2215
|
+
disabled: u = !1,
|
|
2216
|
+
onChange: d,
|
|
2217
|
+
width: p = ""
|
|
2164
2218
|
}) {
|
|
2165
|
-
const
|
|
2166
|
-
() => (
|
|
2167
|
-
[
|
|
2168
|
-
),
|
|
2169
|
-
function m({ target:
|
|
2170
|
-
const
|
|
2171
|
-
v(
|
|
2172
|
-
value:
|
|
2173
|
-
previous:
|
|
2219
|
+
const w = te(e), [h, v] = U(i), N = S({ value: h, input: h }), f = E(
|
|
2220
|
+
() => (h - s) / (l - s) * 100 + "%",
|
|
2221
|
+
[h, s, l]
|
|
2222
|
+
), x = E(() => u ? "" : `linear-gradient(90deg, var(--wx-slider-primary) 0% ${f}, var(--wx-slider-background) ${f} 100%)`, [u, f]);
|
|
2223
|
+
function m({ target: b }) {
|
|
2224
|
+
const y = b.value * 1;
|
|
2225
|
+
v(y), d && d({
|
|
2226
|
+
value: y,
|
|
2227
|
+
previous: N.current.input,
|
|
2174
2228
|
input: !0
|
|
2175
|
-
}),
|
|
2229
|
+
}), N.current.input = y;
|
|
2176
2230
|
}
|
|
2177
|
-
function g({ target:
|
|
2178
|
-
const
|
|
2179
|
-
v(
|
|
2231
|
+
function g({ target: b }) {
|
|
2232
|
+
const y = b.value * 1;
|
|
2233
|
+
v(y), d && d({ value: y, previous: N.current.value }), N.current.value = y;
|
|
2180
2234
|
}
|
|
2181
|
-
|
|
2182
|
-
v(
|
|
2183
|
-
}, [
|
|
2184
|
-
const
|
|
2185
|
-
|
|
2186
|
-
if (
|
|
2187
|
-
return
|
|
2188
|
-
|
|
2235
|
+
J(() => {
|
|
2236
|
+
v(i);
|
|
2237
|
+
}, [i]);
|
|
2238
|
+
const T = S(null);
|
|
2239
|
+
J(() => {
|
|
2240
|
+
if (T.current)
|
|
2241
|
+
return T.current.addEventListener("change", g), () => {
|
|
2242
|
+
T.current && T.current.removeEventListener("change", g);
|
|
2189
2243
|
};
|
|
2190
|
-
}, [
|
|
2191
|
-
const
|
|
2192
|
-
return /* @__PURE__ */
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2244
|
+
}, [T, g]);
|
|
2245
|
+
const k = { ...p && { width: p } };
|
|
2246
|
+
return /* @__PURE__ */ C(
|
|
2247
|
+
"div",
|
|
2248
|
+
{
|
|
2249
|
+
className: `wx-2EDJ8G wx-slider ${t}`,
|
|
2250
|
+
style: k,
|
|
2251
|
+
title: o,
|
|
2252
|
+
"data-tooltip-text": c,
|
|
2253
|
+
children: [
|
|
2254
|
+
n && /* @__PURE__ */ r("label", { className: "wx-2EDJ8G wx-label", htmlFor: w, children: n }),
|
|
2255
|
+
/* @__PURE__ */ r("div", { className: "wx-2EDJ8G wx-inner", children: /* @__PURE__ */ r(
|
|
2256
|
+
"input",
|
|
2257
|
+
{
|
|
2258
|
+
id: w,
|
|
2259
|
+
className: "wx-2EDJ8G wx-input",
|
|
2260
|
+
type: "range",
|
|
2261
|
+
min: s,
|
|
2262
|
+
max: l,
|
|
2263
|
+
step: a,
|
|
2264
|
+
disabled: u,
|
|
2265
|
+
value: h,
|
|
2266
|
+
onInput: m,
|
|
2267
|
+
style: { background: x },
|
|
2268
|
+
ref: T
|
|
2269
|
+
}
|
|
2270
|
+
) })
|
|
2271
|
+
]
|
|
2272
|
+
}
|
|
2273
|
+
);
|
|
2211
2274
|
}
|
|
2212
|
-
function
|
|
2275
|
+
function xn({
|
|
2213
2276
|
id: e,
|
|
2214
2277
|
value: n = !1,
|
|
2215
2278
|
disabled: t = !1,
|
|
2216
|
-
|
|
2279
|
+
css: s = "",
|
|
2280
|
+
onChange: l
|
|
2217
2281
|
}) {
|
|
2218
|
-
const
|
|
2219
|
-
(
|
|
2220
|
-
const
|
|
2221
|
-
|
|
2282
|
+
const i = te(e), [a, o] = U(n), c = V(
|
|
2283
|
+
(u) => {
|
|
2284
|
+
const d = u.target.checked;
|
|
2285
|
+
o(d), l && l({ value: d });
|
|
2222
2286
|
},
|
|
2223
|
-
[
|
|
2287
|
+
[l]
|
|
2224
2288
|
);
|
|
2225
|
-
return /* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2289
|
+
return /* @__PURE__ */ C("label", { className: `wx-2dAR5c wx-switch ${s}`, children: [
|
|
2290
|
+
/* @__PURE__ */ r(
|
|
2227
2291
|
"input",
|
|
2228
2292
|
{
|
|
2229
2293
|
className: "wx-2dAR5c wx-input",
|
|
2230
2294
|
type: "checkbox",
|
|
2231
|
-
checked:
|
|
2295
|
+
checked: a,
|
|
2232
2296
|
onChange: c,
|
|
2233
2297
|
disabled: t,
|
|
2234
|
-
id:
|
|
2298
|
+
id: i
|
|
2235
2299
|
}
|
|
2236
2300
|
),
|
|
2237
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ r("span", { className: "wx-2dAR5c wx-box" })
|
|
2238
2302
|
] });
|
|
2239
2303
|
}
|
|
2240
|
-
const
|
|
2304
|
+
const mn = ({
|
|
2241
2305
|
options: e = [],
|
|
2242
2306
|
value: n = "",
|
|
2243
2307
|
type: t = "top",
|
|
2244
2308
|
css: s = "",
|
|
2245
|
-
onChange:
|
|
2309
|
+
onChange: l
|
|
2246
2310
|
}) => {
|
|
2247
|
-
const [
|
|
2248
|
-
|
|
2311
|
+
const [i, a] = U(n), o = (c) => {
|
|
2312
|
+
a(c), l && l({ value: c });
|
|
2249
2313
|
};
|
|
2250
|
-
return /* @__PURE__ */
|
|
2314
|
+
return /* @__PURE__ */ r("div", { className: `wx-138fWJ wx-tabs wx-${t} ${s}`, children: e.map((c) => /* @__PURE__ */ C(
|
|
2251
2315
|
"button",
|
|
2252
2316
|
{
|
|
2253
|
-
className: `wx-138fWJ wx-tab ${
|
|
2254
|
-
title:
|
|
2255
|
-
onClick: () => c
|
|
2317
|
+
className: `wx-138fWJ wx-tab ${c.css} ${c.id === i ? "wx-active" : ""}`,
|
|
2318
|
+
title: c.title,
|
|
2319
|
+
onClick: () => o(c.id),
|
|
2320
|
+
"data-tooltip-text": c.tooltip,
|
|
2256
2321
|
children: [
|
|
2257
|
-
|
|
2322
|
+
c.icon && /* @__PURE__ */ r(
|
|
2258
2323
|
"i",
|
|
2259
2324
|
{
|
|
2260
|
-
className: `wx-138fWJ wx-icon ${
|
|
2325
|
+
className: `wx-138fWJ wx-icon ${c.icon} ${c.label ? "" : "wx-only"}`
|
|
2261
2326
|
}
|
|
2262
2327
|
),
|
|
2263
|
-
|
|
2328
|
+
c.label && /* @__PURE__ */ r("span", { className: "wx-138fWJ wx-label", children: c.label })
|
|
2264
2329
|
]
|
|
2265
2330
|
},
|
|
2266
|
-
|
|
2331
|
+
c.id
|
|
2267
2332
|
)) });
|
|
2268
|
-
},
|
|
2333
|
+
}, hn = ({
|
|
2269
2334
|
id: e,
|
|
2270
2335
|
value: n = 0,
|
|
2271
2336
|
step: t = 1,
|
|
2272
2337
|
min: s = 0,
|
|
2273
|
-
max:
|
|
2274
|
-
error:
|
|
2275
|
-
disabled:
|
|
2276
|
-
readonly:
|
|
2277
|
-
|
|
2338
|
+
max: l = 1 / 0,
|
|
2339
|
+
error: i = !1,
|
|
2340
|
+
disabled: a = !1,
|
|
2341
|
+
readonly: o = !1,
|
|
2342
|
+
css: c = "",
|
|
2343
|
+
tooltip: u,
|
|
2344
|
+
onChange: d
|
|
2278
2345
|
}) => {
|
|
2279
|
-
const
|
|
2280
|
-
if (
|
|
2281
|
-
const
|
|
2282
|
-
|
|
2283
|
-
}, [w,
|
|
2284
|
-
if (
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2287
|
-
}, [w,
|
|
2288
|
-
if (!
|
|
2289
|
-
const
|
|
2290
|
-
|
|
2346
|
+
const p = te(e), [w, h] = U(n), v = V(() => {
|
|
2347
|
+
if (o || w <= s) return;
|
|
2348
|
+
const m = w - t;
|
|
2349
|
+
h(m), d && d({ value: m });
|
|
2350
|
+
}, [w, o, s, t, d]), N = V(() => {
|
|
2351
|
+
if (o || w >= l) return;
|
|
2352
|
+
const m = w + t;
|
|
2353
|
+
h(m), d && d({ value: m });
|
|
2354
|
+
}, [w, o, l, t, d]), f = V(() => {
|
|
2355
|
+
if (!o) {
|
|
2356
|
+
const m = Math.round(Math.min(l, Math.max(w, s)) / t) * t, g = isNaN(m) ? Math.max(s, 0) : m;
|
|
2357
|
+
h(g), d && d({ value: g });
|
|
2291
2358
|
}
|
|
2292
|
-
}, [
|
|
2293
|
-
(
|
|
2294
|
-
const
|
|
2295
|
-
|
|
2359
|
+
}, [o, w, l, s, t, d]), x = V(
|
|
2360
|
+
(m) => {
|
|
2361
|
+
const g = m.target.value * 1;
|
|
2362
|
+
h(g), d && d({ value: g, input: !0 });
|
|
2296
2363
|
},
|
|
2297
|
-
[
|
|
2364
|
+
[d]
|
|
2298
2365
|
);
|
|
2299
|
-
return /* @__PURE__ */
|
|
2366
|
+
return /* @__PURE__ */ C(
|
|
2300
2367
|
"div",
|
|
2301
2368
|
{
|
|
2302
|
-
className: `wx-22t21n wx-counter ${
|
|
2369
|
+
className: `wx-22t21n wx-counter ${c} ${a ? "wx-disabled" : ""} ${o ? "wx-readonly" : ""} ${i ? "wx-error" : ""}`,
|
|
2370
|
+
"data-tooltip-text": u,
|
|
2303
2371
|
children: [
|
|
2304
|
-
/* @__PURE__ */
|
|
2372
|
+
/* @__PURE__ */ r(
|
|
2305
2373
|
"button",
|
|
2306
2374
|
{
|
|
2307
2375
|
"aria-label": "-",
|
|
2308
2376
|
className: "wx-22t21n wx-btn wx-btn-dec",
|
|
2309
|
-
disabled:
|
|
2310
|
-
onClick:
|
|
2311
|
-
children: /* @__PURE__ */
|
|
2377
|
+
disabled: a,
|
|
2378
|
+
onClick: v,
|
|
2379
|
+
children: /* @__PURE__ */ r(
|
|
2312
2380
|
"svg",
|
|
2313
2381
|
{
|
|
2314
2382
|
className: "wx-22t21n wx-dec",
|
|
@@ -2317,33 +2385,33 @@ const un = ({
|
|
|
2317
2385
|
viewBox: "0 0 12 2",
|
|
2318
2386
|
fill: "none",
|
|
2319
2387
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2320
|
-
children: /* @__PURE__ */
|
|
2388
|
+
children: /* @__PURE__ */ r("path", { d: "M11.2501 1.74994H0.750092V0.249939H11.2501V1.74994Z" })
|
|
2321
2389
|
}
|
|
2322
2390
|
)
|
|
2323
2391
|
}
|
|
2324
2392
|
),
|
|
2325
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ r(
|
|
2326
2394
|
"input",
|
|
2327
2395
|
{
|
|
2328
|
-
id:
|
|
2396
|
+
id: p,
|
|
2329
2397
|
type: "text",
|
|
2330
2398
|
className: "wx-22t21n wx-input",
|
|
2331
|
-
disabled:
|
|
2332
|
-
readOnly:
|
|
2399
|
+
disabled: a,
|
|
2400
|
+
readOnly: o,
|
|
2333
2401
|
required: !0,
|
|
2334
2402
|
value: w,
|
|
2335
|
-
onBlur:
|
|
2336
|
-
onInput:
|
|
2403
|
+
onBlur: f,
|
|
2404
|
+
onInput: x
|
|
2337
2405
|
}
|
|
2338
2406
|
),
|
|
2339
|
-
/* @__PURE__ */
|
|
2407
|
+
/* @__PURE__ */ r(
|
|
2340
2408
|
"button",
|
|
2341
2409
|
{
|
|
2342
2410
|
"aria-label": "-",
|
|
2343
2411
|
className: "wx-22t21n wx-btn wx-btn-inc",
|
|
2344
|
-
disabled:
|
|
2345
|
-
onClick:
|
|
2346
|
-
children: /* @__PURE__ */
|
|
2412
|
+
disabled: a,
|
|
2413
|
+
onClick: N,
|
|
2414
|
+
children: /* @__PURE__ */ r(
|
|
2347
2415
|
"svg",
|
|
2348
2416
|
{
|
|
2349
2417
|
className: "wx-22t21n wx-inc",
|
|
@@ -2352,7 +2420,7 @@ const un = ({
|
|
|
2352
2420
|
viewBox: "0 0 12 12",
|
|
2353
2421
|
fill: "none",
|
|
2354
2422
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2355
|
-
children: /* @__PURE__ */
|
|
2423
|
+
children: /* @__PURE__ */ r(
|
|
2356
2424
|
"path",
|
|
2357
2425
|
{
|
|
2358
2426
|
d: `M11.2501
|
|
@@ -2367,102 +2435,103 @@ const un = ({
|
|
|
2367
2435
|
}
|
|
2368
2436
|
);
|
|
2369
2437
|
};
|
|
2370
|
-
function
|
|
2438
|
+
function Pt({ notice: e = {} }) {
|
|
2371
2439
|
function n() {
|
|
2372
2440
|
e.remove && e.remove();
|
|
2373
2441
|
}
|
|
2374
|
-
return /* @__PURE__ */
|
|
2442
|
+
return /* @__PURE__ */ C(
|
|
2375
2443
|
"div",
|
|
2376
2444
|
{
|
|
2377
2445
|
className: `wx-11sNg5 wx-notice wx-${e.type ? e.type : ""}`,
|
|
2378
2446
|
role: "status",
|
|
2379
2447
|
"aria-live": "polite",
|
|
2380
2448
|
children: [
|
|
2381
|
-
/* @__PURE__ */
|
|
2382
|
-
/* @__PURE__ */
|
|
2449
|
+
/* @__PURE__ */ r("div", { className: "wx-11sNg5 wx-text", children: e.text }),
|
|
2450
|
+
/* @__PURE__ */ r("div", { className: "wx-11sNg5 wx-button", children: /* @__PURE__ */ r("i", { className: "wx-11sNg5 wxi-close", onClick: n }) })
|
|
2383
2451
|
]
|
|
2384
2452
|
}
|
|
2385
2453
|
);
|
|
2386
2454
|
}
|
|
2387
|
-
function
|
|
2388
|
-
return /* @__PURE__ */
|
|
2455
|
+
function Ht({ data: e = [] }) {
|
|
2456
|
+
return /* @__PURE__ */ r("div", { className: "wx-3nwoO9 wx-notices", children: e.map((n) => /* @__PURE__ */ r(Pt, { notice: n }, n.id)) });
|
|
2389
2457
|
}
|
|
2390
|
-
function
|
|
2458
|
+
function At({
|
|
2391
2459
|
title: e = "",
|
|
2392
2460
|
buttons: n = ["cancel", "ok"],
|
|
2393
2461
|
header: t,
|
|
2394
2462
|
children: s,
|
|
2395
|
-
footer:
|
|
2396
|
-
|
|
2397
|
-
|
|
2463
|
+
footer: l,
|
|
2464
|
+
css: i = "",
|
|
2465
|
+
onConfirm: a,
|
|
2466
|
+
onCancel: o
|
|
2398
2467
|
}) {
|
|
2399
|
-
const c = (K
|
|
2400
|
-
|
|
2401
|
-
|
|
2468
|
+
const c = (X(K) || ne()).getGroup("core"), u = S(null);
|
|
2469
|
+
J(() => {
|
|
2470
|
+
u.current?.focus();
|
|
2402
2471
|
}, []);
|
|
2403
|
-
function
|
|
2404
|
-
switch (
|
|
2472
|
+
function d(w) {
|
|
2473
|
+
switch (w.code) {
|
|
2405
2474
|
case "Enter": {
|
|
2406
|
-
const
|
|
2407
|
-
if (
|
|
2408
|
-
|
|
2475
|
+
const h = w.target.tagName;
|
|
2476
|
+
if (h === "TEXTAREA" || h === "BUTTON") return;
|
|
2477
|
+
a && a({ event: w });
|
|
2409
2478
|
break;
|
|
2410
2479
|
}
|
|
2411
2480
|
case "Escape":
|
|
2412
|
-
|
|
2481
|
+
o && o({ event: w });
|
|
2413
2482
|
break;
|
|
2414
2483
|
}
|
|
2415
2484
|
}
|
|
2416
|
-
function w
|
|
2417
|
-
const v = { event:
|
|
2418
|
-
|
|
2485
|
+
function p(w, h) {
|
|
2486
|
+
const v = { event: w, button: h };
|
|
2487
|
+
h === "cancel" ? o && o(v) : a && a(v);
|
|
2419
2488
|
}
|
|
2420
|
-
return /* @__PURE__ */
|
|
2489
|
+
return /* @__PURE__ */ r(
|
|
2421
2490
|
"div",
|
|
2422
2491
|
{
|
|
2423
|
-
className:
|
|
2424
|
-
ref:
|
|
2492
|
+
className: `wx-1FxkZa wx-modal ${i}`,
|
|
2493
|
+
ref: u,
|
|
2425
2494
|
tabIndex: 0,
|
|
2426
|
-
onKeyDown:
|
|
2427
|
-
children: /* @__PURE__ */
|
|
2428
|
-
t || (e ? /* @__PURE__ */
|
|
2429
|
-
/* @__PURE__ */
|
|
2430
|
-
|
|
2431
|
-
|
|
2495
|
+
onKeyDown: d,
|
|
2496
|
+
children: /* @__PURE__ */ C("div", { className: "wx-1FxkZa wx-window", children: [
|
|
2497
|
+
t || (e ? /* @__PURE__ */ r("div", { className: "wx-1FxkZa wx-header", children: e }) : null),
|
|
2498
|
+
/* @__PURE__ */ r("div", { children: s }),
|
|
2499
|
+
l || n && /* @__PURE__ */ r("div", { className: "wx-1FxkZa wx-buttons", children: n.map((w) => /* @__PURE__ */ r("div", { className: "wx-1FxkZa wx-button", children: /* @__PURE__ */ r(
|
|
2500
|
+
le,
|
|
2432
2501
|
{
|
|
2433
|
-
type: `block ${
|
|
2434
|
-
onClick: (
|
|
2435
|
-
children: c(
|
|
2502
|
+
type: `block ${w === "ok" ? "primary" : "secondary"}`,
|
|
2503
|
+
onClick: (h) => p(h, w),
|
|
2504
|
+
children: c(w)
|
|
2436
2505
|
}
|
|
2437
|
-
) },
|
|
2506
|
+
) }, w)) })
|
|
2438
2507
|
] })
|
|
2439
2508
|
}
|
|
2440
2509
|
);
|
|
2441
2510
|
}
|
|
2442
|
-
function
|
|
2443
|
-
const [t, s] =
|
|
2444
|
-
return
|
|
2511
|
+
function Bt({ children: e }, n) {
|
|
2512
|
+
const [t, s] = O(null), [l, i] = O([]);
|
|
2513
|
+
return nt(
|
|
2445
2514
|
n,
|
|
2446
2515
|
() => ({
|
|
2447
|
-
showModal: (
|
|
2448
|
-
const
|
|
2449
|
-
return s(
|
|
2450
|
-
|
|
2451
|
-
s(null),
|
|
2452
|
-
},
|
|
2453
|
-
s(null),
|
|
2516
|
+
showModal: (a) => {
|
|
2517
|
+
const o = { ...a };
|
|
2518
|
+
return s(o), new Promise((c, u) => {
|
|
2519
|
+
o.resolve = (d) => {
|
|
2520
|
+
s(null), c(d);
|
|
2521
|
+
}, o.reject = (d) => {
|
|
2522
|
+
s(null), u(d);
|
|
2454
2523
|
};
|
|
2455
2524
|
});
|
|
2456
2525
|
},
|
|
2457
|
-
showNotice: (
|
|
2458
|
-
|
|
2526
|
+
showNotice: (a) => {
|
|
2527
|
+
a = { ...a }, a.id = a.id || ae(), a.remove = () => i((o) => o.filter((c) => c.id !== a.id)), a.expire != -1 && setTimeout(a.remove, a.expire || 5100), i((o) => [...o, a]);
|
|
2459
2528
|
}
|
|
2460
2529
|
}),
|
|
2461
2530
|
[]
|
|
2462
|
-
), /* @__PURE__ */
|
|
2531
|
+
), /* @__PURE__ */ C(Q, { children: [
|
|
2463
2532
|
e,
|
|
2464
|
-
t && /* @__PURE__ */
|
|
2465
|
-
|
|
2533
|
+
t && /* @__PURE__ */ r(
|
|
2534
|
+
At,
|
|
2466
2535
|
{
|
|
2467
2536
|
title: t.title,
|
|
2468
2537
|
buttons: t.buttons,
|
|
@@ -2471,218 +2540,220 @@ function Ft({ children: e }, n) {
|
|
|
2471
2540
|
children: t.message
|
|
2472
2541
|
}
|
|
2473
2542
|
),
|
|
2474
|
-
/* @__PURE__ */
|
|
2543
|
+
/* @__PURE__ */ r(Ht, { data: l })
|
|
2475
2544
|
] });
|
|
2476
2545
|
}
|
|
2477
|
-
const
|
|
2478
|
-
function
|
|
2479
|
-
let { children: n } = e, t =
|
|
2480
|
-
const s =
|
|
2481
|
-
showNotice: (
|
|
2482
|
-
showModal: (
|
|
2546
|
+
const Et = tt(Bt);
|
|
2547
|
+
function pn(e) {
|
|
2548
|
+
let { children: n } = e, t = S();
|
|
2549
|
+
const s = E(() => ({
|
|
2550
|
+
showNotice: (l) => t.current.showNotice(l),
|
|
2551
|
+
showModal: (l) => t.current.showModal(l)
|
|
2483
2552
|
}), []);
|
|
2484
|
-
return /* @__PURE__ */
|
|
2553
|
+
return /* @__PURE__ */ r(Ue.Provider, { value: s, children: /* @__PURE__ */ r(Et, { ref: t, children: n }) });
|
|
2485
2554
|
}
|
|
2486
|
-
function
|
|
2555
|
+
function Pe({
|
|
2487
2556
|
label: e = "",
|
|
2488
2557
|
position: n = "",
|
|
2489
2558
|
error: t = !1,
|
|
2490
2559
|
type: s = "",
|
|
2491
|
-
required:
|
|
2492
|
-
id:
|
|
2493
|
-
|
|
2560
|
+
required: l = !1,
|
|
2561
|
+
id: i,
|
|
2562
|
+
css: a = "",
|
|
2563
|
+
children: o,
|
|
2494
2564
|
width: c = ""
|
|
2495
2565
|
}) {
|
|
2496
|
-
const
|
|
2497
|
-
return /* @__PURE__ */
|
|
2566
|
+
const u = E(() => i === void 0 ? ae() : i, [i]), d = { ...c && { width: c } };
|
|
2567
|
+
return /* @__PURE__ */ r(ue.Provider, { value: u, children: /* @__PURE__ */ C(
|
|
2498
2568
|
"div",
|
|
2499
2569
|
{
|
|
2500
|
-
style:
|
|
2501
|
-
className: `wx-2oVUvC wx-field wx-${n} ${t ? "wx-error" : ""} ${
|
|
2570
|
+
style: d,
|
|
2571
|
+
className: `wx-2oVUvC wx-field wx-${n} ${a} ${t ? "wx-error" : ""} ${l ? "wx-required" : ""}`.trim(),
|
|
2502
2572
|
children: [
|
|
2503
|
-
e && (
|
|
2504
|
-
/* @__PURE__ */
|
|
2573
|
+
e && (u ? /* @__PURE__ */ r("label", { className: "wx-2oVUvC wx-label", htmlFor: u, children: e }) : /* @__PURE__ */ r("div", { className: "wx-2oVUvC wx-label", children: e })),
|
|
2574
|
+
/* @__PURE__ */ r("div", { className: `wx-2oVUvC wx-field-control wx-${s}`, children: o })
|
|
2505
2575
|
]
|
|
2506
2576
|
}
|
|
2507
2577
|
) });
|
|
2508
2578
|
}
|
|
2509
|
-
const
|
|
2579
|
+
const Ot = ({
|
|
2510
2580
|
value: e = !1,
|
|
2511
2581
|
type: n = "",
|
|
2512
2582
|
icon: t = "",
|
|
2513
2583
|
disabled: s = !1,
|
|
2514
|
-
iconActive:
|
|
2515
|
-
onClick:
|
|
2516
|
-
title:
|
|
2584
|
+
iconActive: l = "",
|
|
2585
|
+
onClick: i,
|
|
2586
|
+
title: a = "",
|
|
2587
|
+
tooltip: o,
|
|
2517
2588
|
css: c = "",
|
|
2518
|
-
text:
|
|
2519
|
-
textActive:
|
|
2520
|
-
children:
|
|
2521
|
-
active:
|
|
2522
|
-
onChange:
|
|
2589
|
+
text: u = "",
|
|
2590
|
+
textActive: d = "",
|
|
2591
|
+
children: p,
|
|
2592
|
+
active: w,
|
|
2593
|
+
onChange: h
|
|
2523
2594
|
}) => {
|
|
2524
|
-
const [v,
|
|
2595
|
+
const [v, N] = U(e), f = E(() => (v ? "pressed" : "") + (n ? " " + n : ""), [v, n]), x = V(
|
|
2525
2596
|
(m) => {
|
|
2526
2597
|
let g = !v;
|
|
2527
|
-
|
|
2598
|
+
i && i(m), m.defaultPrevented || (N(g), h && h({ value: g }));
|
|
2528
2599
|
},
|
|
2529
|
-
[v,
|
|
2600
|
+
[v, i, h]
|
|
2530
2601
|
);
|
|
2531
|
-
return v &&
|
|
2532
|
-
|
|
2602
|
+
return v && w ? /* @__PURE__ */ r(
|
|
2603
|
+
le,
|
|
2533
2604
|
{
|
|
2534
|
-
title:
|
|
2535
|
-
|
|
2605
|
+
title: a,
|
|
2606
|
+
tooltip: o,
|
|
2607
|
+
text: v && d || u,
|
|
2536
2608
|
css: c,
|
|
2537
2609
|
type: f,
|
|
2538
|
-
icon: v &&
|
|
2539
|
-
onClick:
|
|
2610
|
+
icon: v && l || t,
|
|
2611
|
+
onClick: x,
|
|
2540
2612
|
disabled: s,
|
|
2541
|
-
children:
|
|
2613
|
+
children: oe(w, { value: v })
|
|
2542
2614
|
}
|
|
2543
|
-
) :
|
|
2544
|
-
|
|
2615
|
+
) : p ? /* @__PURE__ */ r(
|
|
2616
|
+
le,
|
|
2545
2617
|
{
|
|
2546
|
-
title:
|
|
2547
|
-
|
|
2618
|
+
title: a,
|
|
2619
|
+
tooltip: o,
|
|
2620
|
+
text: v && d || u,
|
|
2548
2621
|
css: c,
|
|
2549
2622
|
type: f,
|
|
2550
|
-
icon: v &&
|
|
2551
|
-
onClick:
|
|
2623
|
+
icon: v && l || t,
|
|
2624
|
+
onClick: x,
|
|
2552
2625
|
disabled: s,
|
|
2553
|
-
children:
|
|
2626
|
+
children: p
|
|
2554
2627
|
}
|
|
2555
|
-
) : /* @__PURE__ */
|
|
2556
|
-
|
|
2628
|
+
) : /* @__PURE__ */ r(
|
|
2629
|
+
le,
|
|
2557
2630
|
{
|
|
2558
|
-
title:
|
|
2559
|
-
|
|
2631
|
+
title: a,
|
|
2632
|
+
tooltip: o,
|
|
2633
|
+
text: v && d || u,
|
|
2560
2634
|
css: c,
|
|
2561
2635
|
type: f,
|
|
2562
|
-
icon: v &&
|
|
2563
|
-
onClick:
|
|
2636
|
+
icon: v && l || t,
|
|
2637
|
+
onClick: x,
|
|
2564
2638
|
disabled: s
|
|
2565
2639
|
}
|
|
2566
2640
|
);
|
|
2567
|
-
},
|
|
2568
|
-
function
|
|
2569
|
-
value: e =
|
|
2641
|
+
}, He = new Date(0, 0, 0, 0, 0);
|
|
2642
|
+
function vn({
|
|
2643
|
+
value: e = He,
|
|
2570
2644
|
id: n,
|
|
2571
2645
|
title: t = "",
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2646
|
+
tooltip: s,
|
|
2647
|
+
css: l = "",
|
|
2648
|
+
disabled: i = !1,
|
|
2649
|
+
error: a = !1,
|
|
2650
|
+
format: o = "",
|
|
2576
2651
|
onChange: c,
|
|
2577
|
-
dropdown:
|
|
2652
|
+
dropdown: u
|
|
2578
2653
|
}) {
|
|
2579
|
-
let [
|
|
2580
|
-
const { calendar:
|
|
2581
|
-
const
|
|
2582
|
-
return typeof
|
|
2583
|
-
}, [
|
|
2584
|
-
() =>
|
|
2585
|
-
[
|
|
2586
|
-
),
|
|
2587
|
-
|
|
2588
|
-
}, []),
|
|
2589
|
-
const
|
|
2590
|
-
|
|
2591
|
-
}, [R,
|
|
2592
|
-
({ value:
|
|
2593
|
-
if (R.getHours() ===
|
|
2594
|
-
const
|
|
2595
|
-
|
|
2654
|
+
let [d, p] = U(e);
|
|
2655
|
+
const { calendar: w, formats: h } = (X(K) || ne()).getRaw(), v = w.clockFormat == 12, N = 23, f = 59, x = E(() => {
|
|
2656
|
+
const D = o || h?.timeFormat;
|
|
2657
|
+
return typeof D == "function" ? D : re(D, w);
|
|
2658
|
+
}, [o, h, w]), m = E(() => x(new Date(0, 0, 0, 1)).indexOf("01") != -1, [x]), g = (D, H) => (D < 10 && H ? `0${D}` : `${D}`).slice(-2), T = (D) => g(D, !0), k = (D) => `${D}`.replace(/[^\d]/g, "") || 0, b = (D) => v && (D = D % 12, D === 0) ? "12" : g(D, m), y = V((D, H) => (D = k(D), Math.min(D, H)), []), [A, P] = O(null), R = d || He, Y = y(R.getHours(), N), G = y(R.getMinutes(), f), W = Y > 12, L = b(Y), B = T(G), _ = E(
|
|
2659
|
+
() => x(new Date(0, 0, 0, Y, G)),
|
|
2660
|
+
[Y, G, x]
|
|
2661
|
+
), Z = V(() => {
|
|
2662
|
+
P(!0);
|
|
2663
|
+
}, []), F = V(() => {
|
|
2664
|
+
const D = new Date(R);
|
|
2665
|
+
D.setHours(D.getHours() + (W ? -12 : 12)), p(D), c && c({ value: D });
|
|
2666
|
+
}, [R, W, c]), j = V(
|
|
2667
|
+
({ value: D }) => {
|
|
2668
|
+
if (R.getHours() === D) return;
|
|
2669
|
+
const H = new Date(R);
|
|
2670
|
+
H.setHours(D), p(H), c && c({ value: H });
|
|
2596
2671
|
},
|
|
2597
2672
|
[R, c]
|
|
2598
|
-
), I =
|
|
2599
|
-
({ value:
|
|
2600
|
-
if (R.getMinutes() ===
|
|
2601
|
-
const
|
|
2602
|
-
|
|
2673
|
+
), I = V(
|
|
2674
|
+
({ value: D }) => {
|
|
2675
|
+
if (R.getMinutes() === D) return;
|
|
2676
|
+
const H = new Date(R);
|
|
2677
|
+
H.setMinutes(D), p(H), c && c({ value: H });
|
|
2603
2678
|
},
|
|
2604
2679
|
[R, c]
|
|
2605
|
-
),
|
|
2606
|
-
(
|
|
2607
|
-
[
|
|
2608
|
-
),
|
|
2609
|
-
|
|
2680
|
+
), $ = V(
|
|
2681
|
+
(D) => (D = y(D, N), v && (D = D * 1, D === 12 && (D = 0), W && (D += 12)), D),
|
|
2682
|
+
[y, v, W]
|
|
2683
|
+
), M = V(() => {
|
|
2684
|
+
P(null);
|
|
2610
2685
|
}, []);
|
|
2611
|
-
return /* @__PURE__ */
|
|
2686
|
+
return /* @__PURE__ */ C(
|
|
2612
2687
|
"div",
|
|
2613
2688
|
{
|
|
2614
|
-
className: `wx-7f497i wx-timepicker ${
|
|
2615
|
-
onClick:
|
|
2616
|
-
style: { cursor:
|
|
2689
|
+
className: `wx-7f497i wx-timepicker ${a ? "wx-7f497i wx-error" : ""} ${i ? "wx-7f497i wx-disabled" : ""}`,
|
|
2690
|
+
onClick: i ? void 0 : Z,
|
|
2691
|
+
style: { cursor: i ? "default" : "pointer" },
|
|
2617
2692
|
children: [
|
|
2618
|
-
/* @__PURE__ */
|
|
2619
|
-
|
|
2693
|
+
/* @__PURE__ */ r(
|
|
2694
|
+
ye,
|
|
2620
2695
|
{
|
|
2621
2696
|
id: n,
|
|
2622
|
-
css:
|
|
2697
|
+
css: `wx-date-input ${l}`,
|
|
2623
2698
|
title: t,
|
|
2624
|
-
|
|
2699
|
+
tooltip: s,
|
|
2700
|
+
value: _,
|
|
2625
2701
|
readonly: !0,
|
|
2626
|
-
disabled:
|
|
2627
|
-
error:
|
|
2628
|
-
icon: "wxi-clock"
|
|
2629
|
-
inputStyle: {
|
|
2630
|
-
cursor: "pointer",
|
|
2631
|
-
width: "100%",
|
|
2632
|
-
paddingRight: "calc(var(--wx-input-icon-size) + var(--wx-input-icon-indent) * 2)"
|
|
2633
|
-
}
|
|
2702
|
+
disabled: i,
|
|
2703
|
+
error: a,
|
|
2704
|
+
icon: "wxi-clock"
|
|
2634
2705
|
}
|
|
2635
2706
|
),
|
|
2636
|
-
|
|
2637
|
-
/* @__PURE__ */
|
|
2638
|
-
/* @__PURE__ */
|
|
2707
|
+
A && !i && /* @__PURE__ */ r(se, { onCancel: M, ...De(u), children: /* @__PURE__ */ C("div", { className: "wx-7f497i wx-wrapper", children: [
|
|
2708
|
+
/* @__PURE__ */ C("div", { className: "wx-7f497i wx-timer", children: [
|
|
2709
|
+
/* @__PURE__ */ r(
|
|
2639
2710
|
"input",
|
|
2640
2711
|
{
|
|
2641
2712
|
className: "wx-7f497i wx-digit",
|
|
2642
2713
|
value: L,
|
|
2643
|
-
onChange: (
|
|
2644
|
-
const
|
|
2645
|
-
|
|
2714
|
+
onChange: (D) => {
|
|
2715
|
+
const H = $(D.target.value);
|
|
2716
|
+
j({ value: H });
|
|
2646
2717
|
}
|
|
2647
2718
|
}
|
|
2648
2719
|
),
|
|
2649
|
-
/* @__PURE__ */
|
|
2650
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ r("div", { className: "wx-7f497i wx-separator", children: ":" }),
|
|
2721
|
+
/* @__PURE__ */ r(
|
|
2651
2722
|
"input",
|
|
2652
2723
|
{
|
|
2653
2724
|
className: "wx-7f497i wx-digit",
|
|
2654
|
-
value:
|
|
2655
|
-
onChange: (
|
|
2656
|
-
const
|
|
2657
|
-
I({ value:
|
|
2725
|
+
value: B,
|
|
2726
|
+
onChange: (D) => {
|
|
2727
|
+
const H = y(D.target.value, f);
|
|
2728
|
+
I({ value: H });
|
|
2658
2729
|
}
|
|
2659
2730
|
}
|
|
2660
2731
|
),
|
|
2661
|
-
v && /* @__PURE__ */
|
|
2662
|
-
|
|
2732
|
+
v && /* @__PURE__ */ r(
|
|
2733
|
+
Ot,
|
|
2663
2734
|
{
|
|
2664
|
-
value:
|
|
2665
|
-
onClick:
|
|
2666
|
-
active: () => /* @__PURE__ */
|
|
2667
|
-
children: /* @__PURE__ */
|
|
2735
|
+
value: W,
|
|
2736
|
+
onClick: F,
|
|
2737
|
+
active: () => /* @__PURE__ */ r("span", { children: "pm" }),
|
|
2738
|
+
children: /* @__PURE__ */ r("span", { children: "am" })
|
|
2668
2739
|
}
|
|
2669
2740
|
)
|
|
2670
2741
|
] }),
|
|
2671
|
-
/* @__PURE__ */
|
|
2672
|
-
|
|
2742
|
+
/* @__PURE__ */ r(Pe, { width: "unset", children: /* @__PURE__ */ r(
|
|
2743
|
+
Fe,
|
|
2673
2744
|
{
|
|
2674
|
-
label:
|
|
2675
|
-
value:
|
|
2745
|
+
label: w.hours,
|
|
2746
|
+
value: Y,
|
|
2676
2747
|
width: "unset",
|
|
2677
|
-
onChange:
|
|
2678
|
-
max:
|
|
2748
|
+
onChange: j,
|
|
2749
|
+
max: N
|
|
2679
2750
|
}
|
|
2680
2751
|
) }),
|
|
2681
|
-
/* @__PURE__ */
|
|
2682
|
-
|
|
2752
|
+
/* @__PURE__ */ r(Pe, { width: "unset", children: /* @__PURE__ */ r(
|
|
2753
|
+
Fe,
|
|
2683
2754
|
{
|
|
2684
|
-
label:
|
|
2685
|
-
value:
|
|
2755
|
+
label: w.minutes,
|
|
2756
|
+
value: G,
|
|
2686
2757
|
width: "unset",
|
|
2687
2758
|
onChange: I,
|
|
2688
2759
|
max: f
|
|
@@ -2693,85 +2764,262 @@ function wn({
|
|
|
2693
2764
|
}
|
|
2694
2765
|
);
|
|
2695
2766
|
}
|
|
2696
|
-
function
|
|
2697
|
-
return
|
|
2767
|
+
function Ae(e) {
|
|
2768
|
+
return e === "point" ? "point" : e.split("-")[0];
|
|
2698
2769
|
}
|
|
2699
|
-
function
|
|
2700
|
-
|
|
2701
|
-
|
|
2770
|
+
function Wt(e) {
|
|
2771
|
+
if (e === "point") return "center";
|
|
2772
|
+
const n = e.split("-");
|
|
2773
|
+
return n.length === 1 ? "center" : n[1];
|
|
2702
2774
|
}
|
|
2703
|
-
|
|
2704
|
-
|
|
2775
|
+
function he(e, n, t) {
|
|
2776
|
+
const s = getComputedStyle(e).getPropertyValue(n);
|
|
2777
|
+
return parseInt(s) || t;
|
|
2778
|
+
}
|
|
2779
|
+
function gn(e) {
|
|
2780
|
+
const {
|
|
2781
|
+
at: n = "top-center",
|
|
2782
|
+
arrow: t = !1,
|
|
2783
|
+
touch: s = !1,
|
|
2784
|
+
overflow: l = !1,
|
|
2785
|
+
delay: i = 300,
|
|
2786
|
+
content: a = null,
|
|
2787
|
+
children: o,
|
|
2788
|
+
css: c = ""
|
|
2789
|
+
} = e;
|
|
2790
|
+
function u(I) {
|
|
2791
|
+
if (l && I.scrollWidth <= I.clientWidth) return null;
|
|
2792
|
+
const $ = I.getAttribute?.("data-tooltip-text");
|
|
2793
|
+
return $ || null;
|
|
2794
|
+
}
|
|
2795
|
+
const d = e.resolver || u, p = E(() => Ae(n), [n]), w = E(() => Wt(n), [n]), h = E(() => n === "point" ? "point" : `${p}-${w}`, [n, p, w]), v = S(null), N = S(!1), [f, x] = O(null), [m, g] = O(null), [T, k] = O(null), [b, y] = O(!1), A = S(m);
|
|
2796
|
+
J(() => {
|
|
2797
|
+
A.current = m;
|
|
2798
|
+
}, [m]);
|
|
2799
|
+
const P = E(
|
|
2800
|
+
() => m !== null && (!!m.result || a != null),
|
|
2801
|
+
[m, a]
|
|
2802
|
+
);
|
|
2803
|
+
function R() {
|
|
2804
|
+
return he(f, "--wx-tooltip-point-offset", 14);
|
|
2805
|
+
}
|
|
2806
|
+
function Y() {
|
|
2807
|
+
return he(f, "--wx-tooltip-arrow-size", 6);
|
|
2808
|
+
}
|
|
2809
|
+
function G(I, $, M, D) {
|
|
2810
|
+
if (p === "point") return "50%";
|
|
2811
|
+
const H = D?.getBoundingClientRect() ?? { top: 0, left: 0 }, ee = I / 2;
|
|
2812
|
+
let z, q;
|
|
2813
|
+
return p === "top" || p === "bottom" ? (q = $.x - (D?.scrollLeft ?? 0) + H.left, w === "start" ? z = M.left + I + ee : w === "end" ? z = M.right - I - ee : z = M.left + M.width / 2) : (q = $.y - (D?.scrollTop ?? 0) + H.top, w === "start" ? z = M.top + I + ee : w === "end" ? z = M.bottom - I - ee : z = M.top + M.height / 2), `${z - q}px`;
|
|
2814
|
+
}
|
|
2815
|
+
J(() => {
|
|
2816
|
+
if (!f || !m) return void k(null);
|
|
2817
|
+
const I = n === "point" ? R() : 0, $ = We(
|
|
2818
|
+
f,
|
|
2819
|
+
m.anchor,
|
|
2820
|
+
h,
|
|
2821
|
+
m.mouseX + I,
|
|
2822
|
+
m.mouseY + I
|
|
2823
|
+
);
|
|
2824
|
+
if ($ === null) return void k(null);
|
|
2825
|
+
const M = m.anchor.getBoundingClientRect(), D = Ye(f), H = Ae($.at);
|
|
2826
|
+
let ee = "50%";
|
|
2827
|
+
if ($ && t && n !== "point") {
|
|
2828
|
+
const q = Y();
|
|
2829
|
+
H === "top" ? $.y -= q : H === "bottom" ? $.y += q : H === "left" ? $.x -= q : H === "right" && ($.x += q), ee = G(q, $, M, D);
|
|
2830
|
+
}
|
|
2831
|
+
const z = he(f, "--wx-tooltip-z-index", 1002);
|
|
2832
|
+
k({
|
|
2833
|
+
x: Math.round($.x),
|
|
2834
|
+
y: Math.round($.y),
|
|
2835
|
+
z: Math.max($.z, z),
|
|
2836
|
+
side: H,
|
|
2837
|
+
arrowOffset: ee
|
|
2838
|
+
});
|
|
2839
|
+
}, [f, m, n, t, p, w, h]);
|
|
2840
|
+
function W(I, $) {
|
|
2841
|
+
if (!N.current || ("ontouchstart" in window || window.navigator.maxTouchPoints > 0) && !s) return null;
|
|
2842
|
+
for (; I && I !== v.current; I = I.parentNode) {
|
|
2843
|
+
if (I.nodeType !== window.Node.ELEMENT_NODE) continue;
|
|
2844
|
+
const D = d(I, $);
|
|
2845
|
+
if (D != null)
|
|
2846
|
+
return {
|
|
2847
|
+
result: D,
|
|
2848
|
+
anchor: I,
|
|
2849
|
+
mouseX: $.clientX,
|
|
2850
|
+
mouseY: $.clientY
|
|
2851
|
+
};
|
|
2852
|
+
}
|
|
2853
|
+
return null;
|
|
2854
|
+
}
|
|
2855
|
+
const L = S(void 0), B = S(!1);
|
|
2856
|
+
function _(I, ...$) {
|
|
2857
|
+
clearTimeout(L.current), L.current = setTimeout(I, i, ...$);
|
|
2858
|
+
}
|
|
2859
|
+
function Z(I) {
|
|
2860
|
+
if (I.target.closest(".wx-tooltip-area") !== v.current) {
|
|
2861
|
+
N.current = !1, g(null), clearTimeout(L.current);
|
|
2862
|
+
return;
|
|
2863
|
+
}
|
|
2864
|
+
N.current = !0;
|
|
2865
|
+
const $ = A.current;
|
|
2866
|
+
if ($?.anchor?.contains(I.target)) {
|
|
2867
|
+
clearTimeout(L.current), B.current = !1;
|
|
2868
|
+
const M = d(I.target, I);
|
|
2869
|
+
if (M != null) {
|
|
2870
|
+
g({
|
|
2871
|
+
result: M,
|
|
2872
|
+
anchor: I.target,
|
|
2873
|
+
mouseX: I.clientX,
|
|
2874
|
+
mouseY: I.clientY
|
|
2875
|
+
});
|
|
2876
|
+
return;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
if ($ !== null) {
|
|
2880
|
+
const M = W(I.target, I);
|
|
2881
|
+
M ? (clearTimeout(L.current), B.current = !1, g(M), y(!1)) : B.current || (B.current = !0, _(() => {
|
|
2882
|
+
B.current = !1, g(null);
|
|
2883
|
+
}));
|
|
2884
|
+
} else
|
|
2885
|
+
_(() => {
|
|
2886
|
+
g(W(I.target, I)), y(!0);
|
|
2887
|
+
});
|
|
2888
|
+
}
|
|
2889
|
+
function F() {
|
|
2890
|
+
_(() => {
|
|
2891
|
+
B.current = !1, N.current = !1, g(null);
|
|
2892
|
+
});
|
|
2893
|
+
}
|
|
2894
|
+
J(() => {
|
|
2895
|
+
function I() {
|
|
2896
|
+
clearTimeout(L.current), g(null);
|
|
2897
|
+
}
|
|
2898
|
+
return window.addEventListener("scroll", I, {
|
|
2899
|
+
capture: !0,
|
|
2900
|
+
passive: !0
|
|
2901
|
+
}), () => {
|
|
2902
|
+
clearTimeout(L.current), window.removeEventListener("scroll", I, { capture: !0 });
|
|
2903
|
+
};
|
|
2904
|
+
}, []);
|
|
2905
|
+
const j = [
|
|
2906
|
+
"wx-tooltip",
|
|
2907
|
+
c,
|
|
2908
|
+
t && T?.side === "top" ? "wx-arrow-top" : "",
|
|
2909
|
+
t && T?.side === "bottom" ? "wx-arrow-bottom" : "",
|
|
2910
|
+
t && T?.side === "left" ? "wx-arrow-left" : "",
|
|
2911
|
+
t && T?.side === "right" ? "wx-arrow-right" : "",
|
|
2912
|
+
b ? "" : "wx-tooltip-transition",
|
|
2913
|
+
"wx-aab5ZNfz"
|
|
2914
|
+
].filter(Boolean).join(" ");
|
|
2915
|
+
return /* @__PURE__ */ C(
|
|
2916
|
+
"div",
|
|
2917
|
+
{
|
|
2918
|
+
ref: v,
|
|
2919
|
+
className: "wx-tooltip-area wx-aab5ZNfz",
|
|
2920
|
+
role: "none",
|
|
2921
|
+
onMouseMove: Z,
|
|
2922
|
+
onMouseLeave: F,
|
|
2923
|
+
children: [
|
|
2924
|
+
P ? /* @__PURE__ */ r(Qe, { children: /* @__PURE__ */ r(
|
|
2925
|
+
"div",
|
|
2926
|
+
{
|
|
2927
|
+
className: j,
|
|
2928
|
+
role: "tooltip",
|
|
2929
|
+
ref: x,
|
|
2930
|
+
style: {
|
|
2931
|
+
translate: `${T?.x ?? 0}px ${T?.y ?? 0}px`,
|
|
2932
|
+
zIndex: T?.z ?? 20,
|
|
2933
|
+
visibility: T ? void 0 : "hidden",
|
|
2934
|
+
"--wx-arrow-offset": T?.arrowOffset ?? "50%"
|
|
2935
|
+
},
|
|
2936
|
+
children: /* @__PURE__ */ r("div", { className: "wx-tooltip-wrapper wx-aab5ZNfz", children: /* @__PURE__ */ r("div", { className: "wx-tooltip-inner wx-aab5ZNfz", children: typeof m.result == "string" ? a ? /* @__PURE__ */ r(a, { data: m.result }) : /* @__PURE__ */ r("div", { className: "wx-tooltip-text wx-aab5ZNfz", children: m.result }) : a ? /* @__PURE__ */ r(a, { ...m.result }) : /* @__PURE__ */ r("div", { className: "wx-tooltip-text wx-aab5ZNfz", children: m.result?.data }) }) })
|
|
2937
|
+
}
|
|
2938
|
+
) }) : null,
|
|
2939
|
+
o
|
|
2940
|
+
]
|
|
2941
|
+
}
|
|
2942
|
+
);
|
|
2943
|
+
}
|
|
2944
|
+
function Nn({ children: e }) {
|
|
2945
|
+
return /* @__PURE__ */ r("div", { className: "wx-KgpO9N wx-modal", children: /* @__PURE__ */ r("div", { className: "wx-KgpO9N wx-window", children: e }) });
|
|
2946
|
+
}
|
|
2947
|
+
function kn({ position: e = "right", css: n = "", children: t, onCancel: s }) {
|
|
2948
|
+
const l = S(null);
|
|
2949
|
+
return J(() => Ne(l.current, s).destroy, []), /* @__PURE__ */ r("div", { ref: l, className: `wx-2L733M wx-sidearea wx-pos-${e} ${n}`, children: t });
|
|
2950
|
+
}
|
|
2951
|
+
const Be = "#dfe2e6", Ee = "#2c2f3c", Yt = 0.75;
|
|
2952
|
+
function Oe(e) {
|
|
2705
2953
|
if (e = e?.trim() || "", !e) return "";
|
|
2706
2954
|
const n = e.split(/\s+/);
|
|
2707
2955
|
return (n[0][0] + (n[1]?.[0] || "")).toUpperCase().slice(0, 2);
|
|
2708
2956
|
}
|
|
2709
|
-
function
|
|
2957
|
+
function jt(e) {
|
|
2710
2958
|
let n = e.replace("#", "");
|
|
2711
|
-
if (n.length === 3 && (n = n[0] + n[0] + n[1] + n[1] + n[2] + n[2]), n.length !== 6) return
|
|
2712
|
-
const t = parseInt(n.slice(0, 2), 16) / 255, s = parseInt(n.slice(2, 4), 16) / 255,
|
|
2713
|
-
return 0.299 * t + 0.587 * s + 0.114 *
|
|
2959
|
+
if (n.length === 3 && (n = n[0] + n[0] + n[1] + n[1] + n[2] + n[2]), n.length !== 6) return Ee;
|
|
2960
|
+
const t = parseInt(n.slice(0, 2), 16) / 255, s = parseInt(n.slice(2, 4), 16) / 255, l = parseInt(n.slice(4, 6), 16) / 255;
|
|
2961
|
+
return 0.299 * t + 0.587 * s + 0.114 * l > 0.5 ? Ee : "#ffffff";
|
|
2714
2962
|
}
|
|
2715
|
-
function
|
|
2716
|
-
const { value: n, size: t = 32, limit: s } = e,
|
|
2717
|
-
if (
|
|
2963
|
+
function yn(e) {
|
|
2964
|
+
const { value: n, size: t = 32, limit: s, css: l = "" } = e, i = S(null), [a, o] = O(null), c = E(() => n ? Array.isArray(n) ? n : [n] : [], [n]), u = E(() => {
|
|
2965
|
+
if (a == null || a <= 0)
|
|
2718
2966
|
return null;
|
|
2719
|
-
const f = 1 + (
|
|
2967
|
+
const f = 1 + (a / t - 1) / Yt;
|
|
2720
2968
|
return Math.max(1, Math.floor(f));
|
|
2721
|
-
}, [
|
|
2969
|
+
}, [a, t]), d = E(() => {
|
|
2722
2970
|
const f = s != null ? Math.min(c.length, s) : c.length;
|
|
2723
|
-
return
|
|
2724
|
-
}, [c, s,
|
|
2725
|
-
|
|
2726
|
-
const f =
|
|
2971
|
+
return u != null ? Math.min(f, u) : f;
|
|
2972
|
+
}, [c, s, u]), p = E(() => c.slice(0, d), [c, d]), w = E(() => Math.max(0, c.length - d), [c, d]);
|
|
2973
|
+
J(() => {
|
|
2974
|
+
const f = i.current;
|
|
2727
2975
|
if (!f) return;
|
|
2728
|
-
const
|
|
2976
|
+
const x = new ResizeObserver((m) => {
|
|
2729
2977
|
const g = m[0];
|
|
2730
|
-
g &&
|
|
2978
|
+
g && o(g.contentRect.width);
|
|
2731
2979
|
});
|
|
2732
|
-
return
|
|
2980
|
+
return x.observe(f), () => x.disconnect();
|
|
2733
2981
|
}, []);
|
|
2734
|
-
const
|
|
2982
|
+
const h = Math.round(t * 0.4), v = {
|
|
2735
2983
|
width: t + "px",
|
|
2736
2984
|
height: t + "px",
|
|
2737
2985
|
minWidth: t + "px",
|
|
2738
2986
|
minHeight: t + "px",
|
|
2739
|
-
fontSize:
|
|
2987
|
+
fontSize: h + "px"
|
|
2740
2988
|
};
|
|
2741
|
-
function
|
|
2742
|
-
const m =
|
|
2743
|
-
return { marginLeft: m, backgroundColor: g, color:
|
|
2989
|
+
function N(f, x) {
|
|
2990
|
+
const m = x === 0 ? "0" : `${t * -0.25}px`, g = f.avatar ? "transparent" : f.color || Be, T = f.avatar ? "transparent" : jt(f.color || Be);
|
|
2991
|
+
return { marginLeft: m, backgroundColor: g, color: T };
|
|
2744
2992
|
}
|
|
2745
|
-
return /* @__PURE__ */
|
|
2993
|
+
return /* @__PURE__ */ r("div", { className: `wx-avatar-root wx-aadkRiRf ${l}`, ref: i, children: p.length > 0 && /* @__PURE__ */ r("div", { className: "wx-avatar-stack wx-aadkRiRf", children: p.map((f, x) => /* @__PURE__ */ C(
|
|
2746
2994
|
"div",
|
|
2747
2995
|
{
|
|
2748
2996
|
className: [
|
|
2749
2997
|
"wx-avatar",
|
|
2750
2998
|
"wx-avatar-item",
|
|
2751
|
-
|
|
2999
|
+
x === p.length - 1 && w > 0 ? "wx-avatar-overflow" : "",
|
|
2752
3000
|
"wx-aadkRiRf"
|
|
2753
3001
|
].filter(Boolean).join(" "),
|
|
2754
|
-
style: { ...v, ...
|
|
3002
|
+
style: { ...v, ...N(f, x) },
|
|
2755
3003
|
children: [
|
|
2756
|
-
f.avatar ? /* @__PURE__ */
|
|
2757
|
-
|
|
3004
|
+
f.avatar ? /* @__PURE__ */ r("img", { src: f.avatar, alt: "", loading: "lazy" }) : Oe(f.name) ? /* @__PURE__ */ r("span", { className: "wx-aadkRiRf", children: Oe(f.name) }) : null,
|
|
3005
|
+
x === p.length - 1 && w > 0 && /* @__PURE__ */ C("span", { className: "wx-avatar-overflow-badge wx-aadkRiRf", children: [
|
|
2758
3006
|
"+",
|
|
2759
|
-
|
|
3007
|
+
w
|
|
2760
3008
|
] })
|
|
2761
3009
|
]
|
|
2762
3010
|
},
|
|
2763
3011
|
f.id
|
|
2764
3012
|
)) }) });
|
|
2765
3013
|
}
|
|
2766
|
-
function
|
|
2767
|
-
return /* @__PURE__ */
|
|
3014
|
+
function Jt() {
|
|
3015
|
+
return /* @__PURE__ */ r(Q, {});
|
|
2768
3016
|
}
|
|
2769
|
-
function
|
|
3017
|
+
function bn(e) {
|
|
2770
3018
|
const { fonts: n = !0, children: t } = e;
|
|
2771
|
-
return /* @__PURE__ */
|
|
2772
|
-
t && /* @__PURE__ */
|
|
2773
|
-
n && /* @__PURE__ */
|
|
2774
|
-
/* @__PURE__ */
|
|
3019
|
+
return /* @__PURE__ */ r(ie.Provider, { value: "material", children: /* @__PURE__ */ C(Q, { children: [
|
|
3020
|
+
t && /* @__PURE__ */ r("div", { className: "wx-theme wx-material-theme", children: t }),
|
|
3021
|
+
n && /* @__PURE__ */ C(Q, { children: [
|
|
3022
|
+
/* @__PURE__ */ r(
|
|
2775
3023
|
"link",
|
|
2776
3024
|
{
|
|
2777
3025
|
rel: "preconnect",
|
|
@@ -2779,8 +3027,8 @@ function pn(e) {
|
|
|
2779
3027
|
crossOrigin: "true"
|
|
2780
3028
|
}
|
|
2781
3029
|
),
|
|
2782
|
-
/* @__PURE__ */
|
|
2783
|
-
/* @__PURE__ */
|
|
3030
|
+
/* @__PURE__ */ r(Jt, {}),
|
|
3031
|
+
/* @__PURE__ */ r(
|
|
2784
3032
|
"link",
|
|
2785
3033
|
{
|
|
2786
3034
|
rel: "stylesheet",
|
|
@@ -2790,15 +3038,15 @@ function pn(e) {
|
|
|
2790
3038
|
] })
|
|
2791
3039
|
] }) });
|
|
2792
3040
|
}
|
|
2793
|
-
function
|
|
2794
|
-
return /* @__PURE__ */
|
|
3041
|
+
function qe() {
|
|
3042
|
+
return /* @__PURE__ */ r(Q, {});
|
|
2795
3043
|
}
|
|
2796
|
-
function
|
|
3044
|
+
function Dn(e) {
|
|
2797
3045
|
const { fonts: n = !0, children: t } = e;
|
|
2798
|
-
return /* @__PURE__ */
|
|
2799
|
-
t && t && /* @__PURE__ */
|
|
2800
|
-
n && /* @__PURE__ */
|
|
2801
|
-
/* @__PURE__ */
|
|
3046
|
+
return /* @__PURE__ */ r(ie.Provider, { value: "willow", children: /* @__PURE__ */ C(Q, { children: [
|
|
3047
|
+
t && t && /* @__PURE__ */ r("div", { className: "wx-theme wx-willow-theme", children: t }),
|
|
3048
|
+
n && /* @__PURE__ */ C(Q, { children: [
|
|
3049
|
+
/* @__PURE__ */ r(
|
|
2802
3050
|
"link",
|
|
2803
3051
|
{
|
|
2804
3052
|
rel: "preconnect",
|
|
@@ -2806,8 +3054,8 @@ function vn(e) {
|
|
|
2806
3054
|
crossOrigin: "true"
|
|
2807
3055
|
}
|
|
2808
3056
|
),
|
|
2809
|
-
/* @__PURE__ */
|
|
2810
|
-
/* @__PURE__ */
|
|
3057
|
+
/* @__PURE__ */ r(qe, {}),
|
|
3058
|
+
/* @__PURE__ */ r(
|
|
2811
3059
|
"link",
|
|
2812
3060
|
{
|
|
2813
3061
|
rel: "stylesheet",
|
|
@@ -2817,12 +3065,12 @@ function vn(e) {
|
|
|
2817
3065
|
] })
|
|
2818
3066
|
] }) });
|
|
2819
3067
|
}
|
|
2820
|
-
function
|
|
3068
|
+
function $n(e) {
|
|
2821
3069
|
const { fonts: n = !0, children: t } = e;
|
|
2822
|
-
return /* @__PURE__ */
|
|
2823
|
-
t && t && /* @__PURE__ */
|
|
2824
|
-
n && /* @__PURE__ */
|
|
2825
|
-
/* @__PURE__ */
|
|
3070
|
+
return /* @__PURE__ */ r(ie.Provider, { value: "willow-dark", children: /* @__PURE__ */ C(Q, { children: [
|
|
3071
|
+
t && t && /* @__PURE__ */ r("div", { className: "wx-theme wx-willow-dark-theme", children: t }),
|
|
3072
|
+
n && /* @__PURE__ */ C(Q, { children: [
|
|
3073
|
+
/* @__PURE__ */ r(
|
|
2826
3074
|
"link",
|
|
2827
3075
|
{
|
|
2828
3076
|
rel: "preconnect",
|
|
@@ -2830,8 +3078,8 @@ function gn(e) {
|
|
|
2830
3078
|
crossOrigin: "true"
|
|
2831
3079
|
}
|
|
2832
3080
|
),
|
|
2833
|
-
/* @__PURE__ */
|
|
2834
|
-
/* @__PURE__ */
|
|
3081
|
+
/* @__PURE__ */ r(qe, {}),
|
|
3082
|
+
/* @__PURE__ */ r(
|
|
2835
3083
|
"link",
|
|
2836
3084
|
{
|
|
2837
3085
|
rel: "stylesheet",
|
|
@@ -2841,58 +3089,59 @@ function gn(e) {
|
|
|
2841
3089
|
] })
|
|
2842
3090
|
] }) });
|
|
2843
3091
|
}
|
|
2844
|
-
function
|
|
2845
|
-
const n =
|
|
3092
|
+
function Tn(e) {
|
|
3093
|
+
const n = ae();
|
|
2846
3094
|
e.setAttribute("data-wx-portal-root", n);
|
|
2847
3095
|
}
|
|
2848
|
-
|
|
3096
|
+
st(ge);
|
|
2849
3097
|
export {
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
3098
|
+
yn as Avatar,
|
|
3099
|
+
le as Button,
|
|
3100
|
+
Rt as Calendar,
|
|
3101
|
+
Ze as Checkbox,
|
|
3102
|
+
Xt as CheckboxGroup,
|
|
3103
|
+
ft as ColorBoard,
|
|
3104
|
+
tn as ColorPicker,
|
|
3105
|
+
en as ColorSelect,
|
|
3106
|
+
nn as Combo,
|
|
3107
|
+
hn as Counter,
|
|
3108
|
+
rn as DatePicker,
|
|
3109
|
+
ln as DateRangePicker,
|
|
3110
|
+
se as Dropdown,
|
|
3111
|
+
Pe as Field,
|
|
3112
|
+
sn as Fullscreen,
|
|
3113
|
+
pn as Globals,
|
|
3114
|
+
cn as Icon,
|
|
3115
|
+
ve as Locale,
|
|
3116
|
+
bn as Material,
|
|
3117
|
+
At as Modal,
|
|
3118
|
+
Nn as ModalArea,
|
|
3119
|
+
ht as Month,
|
|
3120
|
+
on as MultiCombo,
|
|
3121
|
+
an as Pager,
|
|
3122
|
+
at as Popup,
|
|
3123
|
+
Qe as Portal,
|
|
3124
|
+
Ft as RadioButton,
|
|
3125
|
+
un as RadioButtonGroup,
|
|
3126
|
+
Ct as RangeCalendar,
|
|
3127
|
+
dn as RichSelect,
|
|
3128
|
+
fn as Segmented,
|
|
3129
|
+
wn as Select,
|
|
3130
|
+
kn as SideArea,
|
|
3131
|
+
Fe as Slider,
|
|
3132
|
+
ke as SuggestDropdown,
|
|
3133
|
+
xn as Switch,
|
|
3134
|
+
mn as Tabs,
|
|
3135
|
+
ye as Text,
|
|
3136
|
+
Kt as TextArea,
|
|
3137
|
+
vn as TimePicker,
|
|
3138
|
+
gn as Tooltip,
|
|
3139
|
+
Ot as TwoState,
|
|
3140
|
+
Dn as Willow,
|
|
3141
|
+
$n as WillowDark,
|
|
3142
|
+
qt as context,
|
|
3143
|
+
Cn as en,
|
|
3144
|
+
Mn as locale,
|
|
3145
|
+
Tn as popupContainer
|
|
2897
3146
|
};
|
|
2898
3147
|
//# sourceMappingURL=index.es.js.map
|