@webx-ui/core 0.1.0 → 0.2.0
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/components/Pagination/Pagination.d.ts +45 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/types.d.ts +29 -0
- package/dist/components/Table/Table.d.ts +34 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/types.d.ts +142 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +1849 -1193
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VueDatePicker as
|
|
3
|
-
import { colorToHex as
|
|
4
|
-
import { useEditor as
|
|
5
|
-
import
|
|
6
|
-
import { TableKit as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as J, computed as d, openBlock as l, createBlock as ie, resolveDynamicComponent as Ge, mergeProps as te, withCtx as Y, createElementBlock as u, renderSlot as N, createCommentVNode as C, useSlots as qe, normalizeClass as F, createElementVNode as x, createTextVNode as ae, toDisplayString as D, inject as ce, provide as xe, useModel as G, ref as q, onMounted as Ce, watch as ne, unref as b, mergeModels as R, Fragment as K, renderList as X, createVNode as O, normalizeStyle as ee, withModifiers as de, createSlots as ge, normalizeProps as ke, guardReactiveProps as we, toRef as me, withDirectives as ma, withKeys as pa, vModelText as ha, onBeforeUnmount as ya, nextTick as Ue } from "vue";
|
|
2
|
+
import { VueDatePicker as Ye } from "@vuepic/vue-datepicker";
|
|
3
|
+
import { colorToHex as Ee, getAreaBackgroundStyle as xa, getSliderBackgroundStyle as ga, PopoverRoot as ka, PopoverAnchor as wa, PopoverPortal as $a, PopoverContent as _a, ColorAreaRoot as Ba, ColorAreaArea as Ma, ColorAreaThumb as Ca, ColorSliderRoot as Sa, ColorSliderTrack as Ta, ColorSliderThumb as Ia, convertToHsb as Oe, parseColor as Va, ComboboxRoot as za, ComboboxAnchor as Pa, ComboboxInput as Wa, ComboboxTrigger as Aa, ComboboxPortal as La, ComboboxContent as Ra, ComboboxViewport as Fa, ComboboxEmpty as Ha, ComboboxItem as Da, ComboboxItemIndicator as Na, SliderRoot as Ua, SliderTrack as Ea, SliderRange as Oa, SliderThumb as ja } from "reka-ui";
|
|
4
|
+
import { useEditor as Ka, EditorContent as Ga } from "@tiptap/vue-3";
|
|
5
|
+
import qa from "@tiptap/starter-kit";
|
|
6
|
+
import { TableKit as Ya } from "@tiptap/extension-table";
|
|
7
|
+
import Xa from "@tiptap/extension-image";
|
|
8
|
+
import Ja from "@tiptap/extension-youtube";
|
|
9
|
+
import Za from "@tiptap/extension-file-handler";
|
|
10
|
+
const Qa = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "wx-button__spinner",
|
|
13
13
|
"aria-hidden": "true"
|
|
14
|
-
},
|
|
14
|
+
}, et = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "wx-button__icon"
|
|
17
|
-
},
|
|
17
|
+
}, at = {
|
|
18
18
|
key: 2,
|
|
19
19
|
class: "wx-button__label"
|
|
20
|
-
},
|
|
20
|
+
}, tt = /* @__PURE__ */ J({
|
|
21
21
|
name: "WxButton",
|
|
22
22
|
inheritAttrs: !1,
|
|
23
23
|
__name: "Button",
|
|
@@ -34,8 +34,8 @@ const ca = {
|
|
|
34
34
|
nativeType: { default: "button" }
|
|
35
35
|
},
|
|
36
36
|
emits: ["click"],
|
|
37
|
-
setup(e, { emit:
|
|
38
|
-
const a = e,
|
|
37
|
+
setup(e, { emit: _ }) {
|
|
38
|
+
const a = e, n = _, s = d(() => a.disabled || a.loading), t = d(() => a.href ? "a" : "button"), o = d(() => [
|
|
39
39
|
"wx-button",
|
|
40
40
|
`wx-button--${a.type}`,
|
|
41
41
|
`wx-button--${a.variant}`,
|
|
@@ -44,61 +44,61 @@ const ca = {
|
|
|
44
44
|
"wx-button--block": a.block,
|
|
45
45
|
"wx-button--round": a.round,
|
|
46
46
|
"wx-button--loading": a.loading,
|
|
47
|
-
"is-disabled":
|
|
47
|
+
"is-disabled": s.value
|
|
48
48
|
}
|
|
49
|
-
]),
|
|
49
|
+
]), c = d(
|
|
50
50
|
() => a.href ? {
|
|
51
|
-
href:
|
|
51
|
+
href: s.value ? void 0 : a.href,
|
|
52
52
|
target: a.target,
|
|
53
53
|
role: "button",
|
|
54
|
-
"aria-disabled":
|
|
55
|
-
tabindex:
|
|
54
|
+
"aria-disabled": s.value ? "true" : void 0,
|
|
55
|
+
tabindex: s.value ? -1 : void 0
|
|
56
56
|
} : {
|
|
57
57
|
type: a.nativeType,
|
|
58
|
-
disabled:
|
|
58
|
+
disabled: s.value
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
|
-
function
|
|
62
|
-
if (
|
|
63
|
-
|
|
61
|
+
function p(h) {
|
|
62
|
+
if (s.value) {
|
|
63
|
+
h.preventDefault(), h.stopPropagation();
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
n("click", h);
|
|
67
67
|
}
|
|
68
|
-
return (
|
|
68
|
+
return (h, f) => (l(), ie(Ge(t.value), te({ ...c.value, ...h.$attrs }, {
|
|
69
69
|
class: o.value,
|
|
70
70
|
"aria-busy": e.loading || void 0,
|
|
71
|
-
onClick:
|
|
71
|
+
onClick: p
|
|
72
72
|
}), {
|
|
73
|
-
default:
|
|
74
|
-
e.loading ? (
|
|
75
|
-
|
|
76
|
-
])) :
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
])) :
|
|
73
|
+
default: Y(() => [
|
|
74
|
+
e.loading ? (l(), u("span", Qa)) : h.$slots.icon ? (l(), u("span", et, [
|
|
75
|
+
N(h.$slots, "icon", {}, void 0, !0)
|
|
76
|
+
])) : C("", !0),
|
|
77
|
+
h.$slots.default ? (l(), u("span", at, [
|
|
78
|
+
N(h.$slots, "default", {}, void 0, !0)
|
|
79
|
+
])) : C("", !0)
|
|
80
80
|
]),
|
|
81
81
|
_: 3
|
|
82
82
|
}, 16, ["class", "aria-busy"]));
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
84
|
+
}), Q = (e, _) => {
|
|
85
85
|
const a = e.__vccOpts || e;
|
|
86
|
-
for (const [
|
|
87
|
-
a[
|
|
86
|
+
for (const [n, s] of _)
|
|
87
|
+
a[n] = s;
|
|
88
88
|
return a;
|
|
89
|
-
},
|
|
89
|
+
}, lt = /* @__PURE__ */ Q(tt, [["__scopeId", "data-v-11c2b24d"]]), ot = {
|
|
90
90
|
key: 0,
|
|
91
91
|
class: "wx-card__header"
|
|
92
|
-
},
|
|
92
|
+
}, it = { class: "wx-card__title" }, nt = {
|
|
93
93
|
key: 0,
|
|
94
94
|
class: "wx-card__extra"
|
|
95
|
-
},
|
|
95
|
+
}, st = { class: "wx-card__body" }, ut = {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: "wx-card__layout"
|
|
98
|
-
},
|
|
98
|
+
}, dt = { class: "wx-card__sidebar" }, rt = { class: "wx-card__content" }, ct = {
|
|
99
99
|
key: 1,
|
|
100
100
|
class: "wx-card__footer"
|
|
101
|
-
},
|
|
101
|
+
}, vt = /* @__PURE__ */ J({
|
|
102
102
|
name: "WxCard",
|
|
103
103
|
__name: "Card",
|
|
104
104
|
props: {
|
|
@@ -108,88 +108,88 @@ const ca = {
|
|
|
108
108
|
bordered: { type: Boolean, default: !1 }
|
|
109
109
|
},
|
|
110
110
|
setup(e) {
|
|
111
|
-
const
|
|
111
|
+
const _ = e, a = qe(), n = d(() => !!(_.title || a.header || a.extra)), s = d(() => !!a.sidebar), t = d(() => [
|
|
112
112
|
"wx-card",
|
|
113
|
-
`wx-card--shadow-${
|
|
114
|
-
`wx-card--padding-${
|
|
113
|
+
`wx-card--shadow-${_.shadow}`,
|
|
114
|
+
`wx-card--padding-${_.padding}`,
|
|
115
115
|
{
|
|
116
|
-
"wx-card--bordered":
|
|
117
|
-
"wx-card--with-sidebar":
|
|
116
|
+
"wx-card--bordered": _.bordered,
|
|
117
|
+
"wx-card--with-sidebar": s.value
|
|
118
118
|
}
|
|
119
119
|
]);
|
|
120
|
-
return (o,
|
|
121
|
-
class:
|
|
120
|
+
return (o, c) => (l(), u("section", {
|
|
121
|
+
class: F(t.value)
|
|
122
122
|
}, [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
n.value ? (l(), u("header", ot, [
|
|
124
|
+
x("div", it, [
|
|
125
|
+
N(o.$slots, "header", {}, () => [
|
|
126
|
+
ae(D(e.title), 1)
|
|
127
127
|
], !0)
|
|
128
128
|
]),
|
|
129
|
-
o.$slots.extra ? (
|
|
130
|
-
|
|
131
|
-
])) :
|
|
132
|
-
])) :
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
o.$slots.extra ? (l(), u("div", nt, [
|
|
130
|
+
N(o.$slots, "extra", {}, void 0, !0)
|
|
131
|
+
])) : C("", !0)
|
|
132
|
+
])) : C("", !0),
|
|
133
|
+
x("div", st, [
|
|
134
|
+
s.value ? (l(), u("div", ut, [
|
|
135
|
+
x("aside", dt, [
|
|
136
|
+
N(o.$slots, "sidebar", {}, void 0, !0)
|
|
137
137
|
]),
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
x("div", rt, [
|
|
139
|
+
N(o.$slots, "default", {}, void 0, !0)
|
|
140
140
|
])
|
|
141
|
-
])) :
|
|
141
|
+
])) : N(o.$slots, "default", {}, void 0, !0, 1)
|
|
142
142
|
]),
|
|
143
|
-
o.$slots.footer ? (
|
|
144
|
-
|
|
145
|
-
])) :
|
|
143
|
+
o.$slots.footer ? (l(), u("footer", ct, [
|
|
144
|
+
N(o.$slots, "footer", {}, void 0, !0)
|
|
145
|
+
])) : C("", !0)
|
|
146
146
|
], 2));
|
|
147
147
|
}
|
|
148
|
-
}),
|
|
149
|
-
let
|
|
150
|
-
function
|
|
151
|
-
return
|
|
148
|
+
}), ft = /* @__PURE__ */ Q(vt, [["__scopeId", "data-v-604cd918"]]), Se = /* @__PURE__ */ Symbol("wx-form"), Xe = /* @__PURE__ */ Symbol("wx-form-item");
|
|
149
|
+
let je = 0;
|
|
150
|
+
function Te(e = "wx") {
|
|
151
|
+
return je += 1, `${e}-${je}`;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
const
|
|
155
|
-
() => e.disabled || a?.disabled.value ||
|
|
156
|
-
), o =
|
|
157
|
-
() => e.size ?? a?.size.value ??
|
|
158
|
-
),
|
|
159
|
-
return { id:
|
|
153
|
+
function le(e) {
|
|
154
|
+
const _ = ce(Se, null), a = ce(Xe, null), n = Te("wx-control"), s = d(() => e.id ?? a?.id.value ?? n), t = d(
|
|
155
|
+
() => e.disabled || a?.disabled.value || _?.disabled.value || !1
|
|
156
|
+
), o = d(
|
|
157
|
+
() => e.size ?? a?.size.value ?? _?.size.value ?? "md"
|
|
158
|
+
), c = d(() => e.status && e.status !== "default" ? e.status : a?.status.value ?? "default"), p = d(() => a?.describedBy.value);
|
|
159
|
+
return { id: s, disabled: t, size: o, status: c, describedBy: p, form: _, item: a };
|
|
160
160
|
}
|
|
161
|
-
const
|
|
162
|
-
function
|
|
163
|
-
|
|
161
|
+
const Je = /* @__PURE__ */ Symbol("wx-checkbox-group"), Ze = /* @__PURE__ */ Symbol("wx-radio-group");
|
|
162
|
+
function bt(e) {
|
|
163
|
+
xe(Xe, e);
|
|
164
164
|
}
|
|
165
|
-
const
|
|
165
|
+
const mt = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], pt = {
|
|
166
166
|
class: "wx-checkbox__box",
|
|
167
167
|
"aria-hidden": "true"
|
|
168
|
-
},
|
|
168
|
+
}, ht = {
|
|
169
169
|
class: "wx-checkbox__mark",
|
|
170
170
|
viewBox: "0 0 16 16",
|
|
171
171
|
fill: "none"
|
|
172
|
-
},
|
|
172
|
+
}, yt = {
|
|
173
173
|
key: 0,
|
|
174
174
|
d: "M4 8h8",
|
|
175
175
|
stroke: "currentColor",
|
|
176
176
|
"stroke-width": "2",
|
|
177
177
|
"stroke-linecap": "round"
|
|
178
|
-
},
|
|
178
|
+
}, xt = {
|
|
179
179
|
key: 1,
|
|
180
180
|
d: "M3.5 8.5l3 3 6-6",
|
|
181
181
|
stroke: "currentColor",
|
|
182
182
|
"stroke-width": "2",
|
|
183
183
|
"stroke-linecap": "round",
|
|
184
184
|
"stroke-linejoin": "round"
|
|
185
|
-
},
|
|
185
|
+
}, gt = {
|
|
186
186
|
key: 0,
|
|
187
187
|
class: "wx-checkbox__label"
|
|
188
|
-
},
|
|
188
|
+
}, kt = /* @__PURE__ */ J({
|
|
189
189
|
name: "WxCheckbox",
|
|
190
190
|
inheritAttrs: !1,
|
|
191
191
|
__name: "Checkbox",
|
|
192
|
-
props: /* @__PURE__ */
|
|
192
|
+
props: /* @__PURE__ */ R({
|
|
193
193
|
value: { type: [String, Number, Boolean, null], default: void 0 },
|
|
194
194
|
label: { default: void 0 },
|
|
195
195
|
indeterminate: { type: Boolean, default: !1 },
|
|
@@ -202,60 +202,60 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
202
202
|
modelValue: { type: Boolean, default: !1 },
|
|
203
203
|
modelModifiers: {}
|
|
204
204
|
}),
|
|
205
|
-
emits: /* @__PURE__ */
|
|
206
|
-
setup(e, { emit:
|
|
207
|
-
const a = e,
|
|
208
|
-
() =>
|
|
209
|
-
),
|
|
205
|
+
emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
|
|
206
|
+
setup(e, { emit: _ }) {
|
|
207
|
+
const a = e, n = _, s = G(e, "modelValue"), t = ce(Je, null), o = le(a), c = q(null), p = d(
|
|
208
|
+
() => t ? t.modelValue.value.includes(a.value ?? null) : s.value === !0
|
|
209
|
+
), h = d(() => a.disabled || t?.disabled.value || o.disabled.value), f = d(() => a.size ?? t?.size.value ?? o.size.value), m = d(() => [
|
|
210
210
|
"wx-checkbox",
|
|
211
|
-
`wx-checkbox--${
|
|
211
|
+
`wx-checkbox--${f.value}`,
|
|
212
212
|
{
|
|
213
|
-
"is-checked":
|
|
214
|
-
"is-indeterminate": a.indeterminate && !
|
|
215
|
-
"is-disabled":
|
|
213
|
+
"is-checked": p.value,
|
|
214
|
+
"is-indeterminate": a.indeterminate && !p.value,
|
|
215
|
+
"is-disabled": h.value
|
|
216
216
|
}
|
|
217
217
|
]);
|
|
218
|
-
function
|
|
219
|
-
|
|
218
|
+
function g() {
|
|
219
|
+
c.value && (c.value.indeterminate = a.indeterminate && !p.value);
|
|
220
220
|
}
|
|
221
|
-
|
|
222
|
-
function
|
|
223
|
-
const
|
|
224
|
-
|
|
221
|
+
Ce(g), ne([() => a.indeterminate, p], g);
|
|
222
|
+
function y(P) {
|
|
223
|
+
const V = P.target.checked;
|
|
224
|
+
t ? t.toggle(a.value ?? null, V) : s.value = V, n("change", V);
|
|
225
225
|
}
|
|
226
|
-
return (
|
|
227
|
-
class:
|
|
226
|
+
return (P, V) => (l(), u("label", {
|
|
227
|
+
class: F(m.value)
|
|
228
228
|
}, [
|
|
229
|
-
|
|
230
|
-
id:
|
|
229
|
+
x("input", te({
|
|
230
|
+
id: b(o).id.value,
|
|
231
231
|
ref_key: "inputRef",
|
|
232
|
-
ref:
|
|
233
|
-
},
|
|
232
|
+
ref: c
|
|
233
|
+
}, P.$attrs, {
|
|
234
234
|
class: "wx-checkbox__native",
|
|
235
235
|
type: "checkbox",
|
|
236
|
-
name: e.name ??
|
|
237
|
-
checked:
|
|
238
|
-
disabled:
|
|
236
|
+
name: e.name ?? b(t)?.name.value,
|
|
237
|
+
checked: p.value,
|
|
238
|
+
disabled: h.value,
|
|
239
239
|
"aria-label": e.ariaLabel,
|
|
240
|
-
"aria-describedby":
|
|
241
|
-
onChange:
|
|
242
|
-
}), null, 16,
|
|
243
|
-
|
|
244
|
-
(
|
|
245
|
-
e.indeterminate && !
|
|
240
|
+
"aria-describedby": b(o).describedBy.value,
|
|
241
|
+
onChange: y
|
|
242
|
+
}), null, 16, mt),
|
|
243
|
+
x("span", pt, [
|
|
244
|
+
(l(), u("svg", ht, [
|
|
245
|
+
e.indeterminate && !p.value ? (l(), u("path", yt)) : (l(), u("path", xt))
|
|
246
246
|
]))
|
|
247
247
|
]),
|
|
248
|
-
e.label ||
|
|
249
|
-
P
|
|
250
|
-
|
|
248
|
+
e.label || P.$slots.default ? (l(), u("span", gt, [
|
|
249
|
+
N(P.$slots, "default", {}, () => [
|
|
250
|
+
ae(D(e.label), 1)
|
|
251
251
|
], !0)
|
|
252
|
-
])) :
|
|
252
|
+
])) : C("", !0)
|
|
253
253
|
], 2));
|
|
254
254
|
}
|
|
255
|
-
}),
|
|
255
|
+
}), ye = /* @__PURE__ */ Q(kt, [["__scopeId", "data-v-c35cc837"]]), wt = ["aria-labelledby", "aria-describedby"], $t = /* @__PURE__ */ J({
|
|
256
256
|
name: "WxCheckboxGroup",
|
|
257
257
|
__name: "CheckboxGroup",
|
|
258
|
-
props: /* @__PURE__ */
|
|
258
|
+
props: /* @__PURE__ */ R({
|
|
259
259
|
options: { default: void 0 },
|
|
260
260
|
disabled: { type: Boolean, default: void 0 },
|
|
261
261
|
size: { default: void 0 },
|
|
@@ -267,52 +267,52 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
267
267
|
modelValue: { default: () => [] },
|
|
268
268
|
modelModifiers: {}
|
|
269
269
|
}),
|
|
270
|
-
emits: /* @__PURE__ */
|
|
271
|
-
setup(e, { emit:
|
|
272
|
-
const a = e,
|
|
273
|
-
|
|
274
|
-
const o =
|
|
275
|
-
function
|
|
276
|
-
const
|
|
277
|
-
if (
|
|
278
|
-
if (
|
|
279
|
-
|
|
270
|
+
emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
|
|
271
|
+
setup(e, { emit: _ }) {
|
|
272
|
+
const a = e, n = _, s = G(e, "modelValue"), t = le(a);
|
|
273
|
+
t.item?.registerLabelTarget(void 0);
|
|
274
|
+
const o = d(() => a.disabled ?? t.disabled.value), c = d(() => a.size ?? t.size.value);
|
|
275
|
+
function p(h, f) {
|
|
276
|
+
const m = s.value ?? [];
|
|
277
|
+
if (f) {
|
|
278
|
+
if (m.includes(h) || a.max !== void 0 && m.length >= a.max) return;
|
|
279
|
+
s.value = [...m, h];
|
|
280
280
|
} else {
|
|
281
|
-
if (a.min !== void 0 &&
|
|
282
|
-
|
|
281
|
+
if (a.min !== void 0 && m.length <= a.min) return;
|
|
282
|
+
s.value = m.filter((g) => g !== h);
|
|
283
283
|
}
|
|
284
|
-
|
|
284
|
+
n("change", s.value);
|
|
285
285
|
}
|
|
286
|
-
return
|
|
287
|
-
name:
|
|
288
|
-
modelValue:
|
|
286
|
+
return xe(Je, {
|
|
287
|
+
name: d(() => a.name),
|
|
288
|
+
modelValue: d(() => s.value ?? []),
|
|
289
289
|
disabled: o,
|
|
290
|
-
size:
|
|
291
|
-
toggle:
|
|
292
|
-
}), (
|
|
293
|
-
class:
|
|
290
|
+
size: c,
|
|
291
|
+
toggle: p
|
|
292
|
+
}), (h, f) => (l(), u("div", {
|
|
293
|
+
class: F(["wx-checkbox-group", { "wx-checkbox-group--inline": e.inline }]),
|
|
294
294
|
role: "group",
|
|
295
|
-
"aria-labelledby":
|
|
296
|
-
"aria-describedby":
|
|
295
|
+
"aria-labelledby": b(t).item ? `${b(t).item.id.value}-label` : void 0,
|
|
296
|
+
"aria-describedby": b(t).describedBy.value
|
|
297
297
|
}, [
|
|
298
|
-
|
|
299
|
-
(
|
|
300
|
-
key: String(
|
|
301
|
-
value:
|
|
302
|
-
label:
|
|
303
|
-
disabled:
|
|
298
|
+
N(h.$slots, "default", {}, () => [
|
|
299
|
+
(l(!0), u(K, null, X(e.options, (m) => (l(), ie(ye, {
|
|
300
|
+
key: String(m.value),
|
|
301
|
+
value: m.value,
|
|
302
|
+
label: m.label,
|
|
303
|
+
disabled: m.disabled
|
|
304
304
|
}, null, 8, ["value", "label", "disabled"]))), 128))
|
|
305
305
|
], !0)
|
|
306
|
-
], 10,
|
|
306
|
+
], 10, wt));
|
|
307
307
|
}
|
|
308
|
-
}),
|
|
308
|
+
}), _t = /* @__PURE__ */ Q($t, [["__scopeId", "data-v-8a0c916b"]]), Bt = ["disabled", "aria-label"], Mt = ["id", "value", "name", "placeholder", "disabled", "readonly", "aria-label", "aria-describedby", "aria-invalid"], Ct = {
|
|
309
309
|
key: 0,
|
|
310
310
|
class: "wx-color-picker__presets"
|
|
311
|
-
},
|
|
311
|
+
}, St = ["aria-label", "aria-pressed", "onClick"], Tt = /* @__PURE__ */ J({
|
|
312
312
|
name: "WxColorPicker",
|
|
313
313
|
inheritAttrs: !1,
|
|
314
314
|
__name: "ColorPicker",
|
|
315
|
-
props: /* @__PURE__ */
|
|
315
|
+
props: /* @__PURE__ */ R({
|
|
316
316
|
presets: { default: () => [] },
|
|
317
317
|
clearable: { type: Boolean, default: !1 },
|
|
318
318
|
placeholder: { default: "#000000" },
|
|
@@ -328,174 +328,174 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
328
328
|
modelValue: { default: null },
|
|
329
329
|
modelModifiers: {}
|
|
330
330
|
}),
|
|
331
|
-
emits: /* @__PURE__ */
|
|
332
|
-
setup(e, { emit:
|
|
333
|
-
const a = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i,
|
|
334
|
-
|
|
335
|
-
|
|
331
|
+
emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
|
|
332
|
+
setup(e, { emit: _ }) {
|
|
333
|
+
const a = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i, n = e, s = _, t = G(e, "modelValue"), o = le(n), c = q(!1), p = q(t.value ?? "");
|
|
334
|
+
ne(t, (M) => {
|
|
335
|
+
p.value = M ?? "";
|
|
336
336
|
});
|
|
337
|
-
function
|
|
338
|
-
return
|
|
337
|
+
function h(M) {
|
|
338
|
+
return Oe(Va(M));
|
|
339
339
|
}
|
|
340
|
-
const
|
|
341
|
-
|
|
340
|
+
const f = q(
|
|
341
|
+
h(t.value && a.test(t.value) ? t.value : "#427edd")
|
|
342
342
|
);
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
!
|
|
343
|
+
ne(t, (M) => {
|
|
344
|
+
const w = M && a.test(M) ? M : null;
|
|
345
|
+
!w || w === Ee(f.value).toLowerCase() || (f.value = h(w));
|
|
346
346
|
});
|
|
347
|
-
const
|
|
348
|
-
() =>
|
|
349
|
-
),
|
|
347
|
+
const m = d(
|
|
348
|
+
() => xa(f.value, "saturation", "brightness", "hsb")
|
|
349
|
+
), g = d(() => ga(f.value, "hue", "hsb")), y = d(() => t.value && a.test(t.value) ? t.value : null), P = d(() => [
|
|
350
350
|
"wx-color-picker",
|
|
351
351
|
`wx-color-picker--${o.size.value}`,
|
|
352
352
|
{
|
|
353
353
|
[`wx-color-picker--${o.status.value}`]: o.status.value !== "default",
|
|
354
|
-
"is-open":
|
|
354
|
+
"is-open": c.value,
|
|
355
355
|
"is-disabled": o.disabled.value
|
|
356
356
|
}
|
|
357
357
|
]);
|
|
358
|
-
function M
|
|
359
|
-
|
|
358
|
+
function V(M) {
|
|
359
|
+
t.value !== M && (t.value = M, s("change", M));
|
|
360
360
|
}
|
|
361
|
-
function
|
|
362
|
-
const
|
|
363
|
-
|
|
361
|
+
function B(M) {
|
|
362
|
+
const w = M.target.value;
|
|
363
|
+
p.value = w, a.test(w) ? V(w.toLowerCase()) : w === "" && V(null);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
if (
|
|
367
|
-
|
|
365
|
+
function $() {
|
|
366
|
+
if (p.value === "") {
|
|
367
|
+
V(null);
|
|
368
368
|
return;
|
|
369
369
|
}
|
|
370
|
-
const
|
|
371
|
-
a.test(
|
|
370
|
+
const M = p.value.startsWith("#") ? p.value : `#${p.value}`;
|
|
371
|
+
a.test(M) ? (V(M.toLowerCase()), p.value = M.toLowerCase()) : p.value = t.value ?? "";
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
|
|
373
|
+
function r(M) {
|
|
374
|
+
f.value = Oe(M), V(Ee(M).toLowerCase());
|
|
375
375
|
}
|
|
376
|
-
function
|
|
377
|
-
const
|
|
378
|
-
|
|
376
|
+
function S(M) {
|
|
377
|
+
const w = M.toLowerCase();
|
|
378
|
+
f.value = h(w), V(w);
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
|
|
380
|
+
function z() {
|
|
381
|
+
V(null), p.value = "";
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
!o.disabled.value && !
|
|
383
|
+
function H() {
|
|
384
|
+
!o.disabled.value && !n.readonly && (c.value = !0);
|
|
385
385
|
}
|
|
386
|
-
return (
|
|
387
|
-
open:
|
|
388
|
-
"onUpdate:open":
|
|
386
|
+
return (M, w) => (l(), ie(b(ka), {
|
|
387
|
+
open: c.value,
|
|
388
|
+
"onUpdate:open": w[0] || (w[0] = (E) => c.value = E)
|
|
389
389
|
}, {
|
|
390
|
-
default:
|
|
391
|
-
|
|
392
|
-
class:
|
|
390
|
+
default: Y(() => [
|
|
391
|
+
x("div", {
|
|
392
|
+
class: F(P.value)
|
|
393
393
|
}, [
|
|
394
|
-
|
|
395
|
-
default:
|
|
396
|
-
|
|
394
|
+
O(b(wa), { "as-child": "" }, {
|
|
395
|
+
default: Y(() => [
|
|
396
|
+
x("div", {
|
|
397
397
|
class: "wx-color-picker__field",
|
|
398
|
-
onClick:
|
|
398
|
+
onClick: H
|
|
399
399
|
}, [
|
|
400
|
-
|
|
401
|
-
class:
|
|
400
|
+
x("button", {
|
|
401
|
+
class: F(["wx-color-picker__swatch", { "is-empty": !y.value }]),
|
|
402
402
|
type: "button",
|
|
403
|
-
disabled:
|
|
403
|
+
disabled: b(o).disabled.value,
|
|
404
404
|
"aria-label": e.ariaLabel ?? "Pick a colour",
|
|
405
|
-
style:
|
|
406
|
-
}, null, 14,
|
|
407
|
-
|
|
408
|
-
id:
|
|
409
|
-
},
|
|
405
|
+
style: ee(y.value ? { background: y.value } : void 0)
|
|
406
|
+
}, null, 14, Bt),
|
|
407
|
+
x("input", te({
|
|
408
|
+
id: b(o).id.value
|
|
409
|
+
}, M.$attrs, {
|
|
410
410
|
class: "wx-color-picker__input",
|
|
411
411
|
type: "text",
|
|
412
412
|
autocomplete: "off",
|
|
413
413
|
spellcheck: "false",
|
|
414
|
-
value:
|
|
414
|
+
value: p.value,
|
|
415
415
|
name: e.name,
|
|
416
416
|
placeholder: e.placeholder,
|
|
417
|
-
disabled:
|
|
417
|
+
disabled: b(o).disabled.value,
|
|
418
418
|
readonly: e.readonly,
|
|
419
419
|
"aria-label": e.ariaLabel,
|
|
420
|
-
"aria-describedby":
|
|
421
|
-
"aria-invalid":
|
|
422
|
-
onInput:
|
|
423
|
-
onBlur:
|
|
424
|
-
}), null, 16,
|
|
425
|
-
e.clearable &&
|
|
420
|
+
"aria-describedby": b(o).describedBy.value,
|
|
421
|
+
"aria-invalid": b(o).status.value === "error" || void 0,
|
|
422
|
+
onInput: B,
|
|
423
|
+
onBlur: $
|
|
424
|
+
}), null, 16, Mt),
|
|
425
|
+
e.clearable && y.value && !b(o).disabled.value ? (l(), u("button", {
|
|
426
426
|
key: 0,
|
|
427
427
|
class: "wx-color-picker__clear",
|
|
428
428
|
type: "button",
|
|
429
429
|
tabindex: "-1",
|
|
430
430
|
"aria-label": "Clear",
|
|
431
|
-
onClick:
|
|
432
|
-
}, " ✕ ")) :
|
|
431
|
+
onClick: de(z, ["stop"])
|
|
432
|
+
}, " ✕ ")) : C("", !0)
|
|
433
433
|
])
|
|
434
434
|
]),
|
|
435
435
|
_: 1
|
|
436
436
|
}),
|
|
437
|
-
|
|
437
|
+
O(b($a), {
|
|
438
438
|
disabled: !e.teleport
|
|
439
439
|
}, {
|
|
440
|
-
default:
|
|
441
|
-
|
|
440
|
+
default: Y(() => [
|
|
441
|
+
O(b(_a), {
|
|
442
442
|
class: "wx-color-picker__panel",
|
|
443
443
|
"side-offset": 4,
|
|
444
444
|
align: "start"
|
|
445
445
|
}, {
|
|
446
|
-
default:
|
|
447
|
-
|
|
446
|
+
default: Y(() => [
|
|
447
|
+
O(b(Ba), {
|
|
448
448
|
class: "wx-color-picker__area",
|
|
449
449
|
"color-space": "hsb",
|
|
450
450
|
"x-channel": "saturation",
|
|
451
451
|
"y-channel": "brightness",
|
|
452
|
-
"model-value":
|
|
453
|
-
"onUpdate:color":
|
|
452
|
+
"model-value": f.value,
|
|
453
|
+
"onUpdate:color": r
|
|
454
454
|
}, {
|
|
455
|
-
default:
|
|
456
|
-
|
|
455
|
+
default: Y(() => [
|
|
456
|
+
O(b(Ma), {
|
|
457
457
|
class: "wx-color-picker__area-surface",
|
|
458
|
-
style:
|
|
458
|
+
style: ee(m.value)
|
|
459
459
|
}, {
|
|
460
|
-
default:
|
|
461
|
-
|
|
460
|
+
default: Y(() => [
|
|
461
|
+
O(b(Ca), { class: "wx-color-picker__thumb" })
|
|
462
462
|
]),
|
|
463
463
|
_: 1
|
|
464
464
|
}, 8, ["style"])
|
|
465
465
|
]),
|
|
466
466
|
_: 1
|
|
467
467
|
}, 8, ["model-value"]),
|
|
468
|
-
|
|
468
|
+
O(b(Sa), {
|
|
469
469
|
class: "wx-color-picker__hue",
|
|
470
470
|
"color-space": "hsb",
|
|
471
471
|
channel: "hue",
|
|
472
|
-
"model-value":
|
|
473
|
-
"onUpdate:color":
|
|
472
|
+
"model-value": f.value,
|
|
473
|
+
"onUpdate:color": r
|
|
474
474
|
}, {
|
|
475
|
-
default:
|
|
476
|
-
|
|
475
|
+
default: Y(() => [
|
|
476
|
+
O(b(Ta), {
|
|
477
477
|
class: "wx-color-picker__hue-track",
|
|
478
|
-
style:
|
|
478
|
+
style: ee(g.value)
|
|
479
479
|
}, {
|
|
480
|
-
default:
|
|
481
|
-
|
|
480
|
+
default: Y(() => [
|
|
481
|
+
O(b(Ia), { class: "wx-color-picker__thumb" })
|
|
482
482
|
]),
|
|
483
483
|
_: 1
|
|
484
484
|
}, 8, ["style"])
|
|
485
485
|
]),
|
|
486
486
|
_: 1
|
|
487
487
|
}, 8, ["model-value"]),
|
|
488
|
-
e.presets.length ? (
|
|
489
|
-
(
|
|
490
|
-
key:
|
|
488
|
+
e.presets.length ? (l(), u("div", Ct, [
|
|
489
|
+
(l(!0), u(K, null, X(e.presets, (E) => (l(), u("button", {
|
|
490
|
+
key: E,
|
|
491
491
|
class: "wx-color-picker__preset",
|
|
492
492
|
type: "button",
|
|
493
|
-
style:
|
|
494
|
-
"aria-label":
|
|
495
|
-
"aria-pressed":
|
|
496
|
-
onClick: (
|
|
497
|
-
}, null, 12,
|
|
498
|
-
])) :
|
|
493
|
+
style: ee({ background: E }),
|
|
494
|
+
"aria-label": E,
|
|
495
|
+
"aria-pressed": t.value === E,
|
|
496
|
+
onClick: (Z) => S(E)
|
|
497
|
+
}, null, 12, St))), 128))
|
|
498
|
+
])) : C("", !0)
|
|
499
499
|
]),
|
|
500
500
|
_: 1
|
|
501
501
|
})
|
|
@@ -507,11 +507,11 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
507
507
|
_: 1
|
|
508
508
|
}, 8, ["open"]));
|
|
509
509
|
}
|
|
510
|
-
}),
|
|
510
|
+
}), It = /* @__PURE__ */ Q(Tt, [["__scopeId", "data-v-aab2d65f"]]), Ie = /* @__PURE__ */ J({
|
|
511
511
|
name: "WxDatePicker",
|
|
512
512
|
inheritAttrs: !1,
|
|
513
513
|
__name: "DatePicker",
|
|
514
|
-
props: /* @__PURE__ */
|
|
514
|
+
props: /* @__PURE__ */ R({
|
|
515
515
|
type: { default: "date" },
|
|
516
516
|
valueFormat: { default: void 0 },
|
|
517
517
|
format: { default: void 0 },
|
|
@@ -537,53 +537,53 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
537
537
|
modelValue: { default: null },
|
|
538
538
|
modelModifiers: {}
|
|
539
539
|
}),
|
|
540
|
-
emits: /* @__PURE__ */
|
|
541
|
-
setup(e, { emit:
|
|
542
|
-
const a = e,
|
|
540
|
+
emits: /* @__PURE__ */ R(["change", "clear", "open", "close"], ["update:modelValue"]),
|
|
541
|
+
setup(e, { emit: _ }) {
|
|
542
|
+
const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = d(() => a.type !== "date"), c = d(() => {
|
|
543
543
|
if (a.valueFormat !== "date")
|
|
544
544
|
return a.valueFormat ? a.valueFormat : a.type === "time" ? a.seconds ? "HH:mm:ss" : "HH:mm" : a.type === "datetime" ? a.seconds ? "yyyy-MM-dd HH:mm:ss" : "yyyy-MM-dd HH:mm" : "yyyy-MM-dd";
|
|
545
|
-
}),
|
|
545
|
+
}), p = d(() => {
|
|
546
546
|
if (a.format) return a.format;
|
|
547
|
-
const
|
|
548
|
-
return a.type === "time" ?
|
|
549
|
-
}),
|
|
547
|
+
const V = a.seconds ? "HH:mm:ss" : "HH:mm";
|
|
548
|
+
return a.type === "time" ? V : a.type === "datetime" ? `dd.MM.yyyy ${V}` : "dd.MM.yyyy";
|
|
549
|
+
}), h = d(() => a.type === "time" ? { modeHeight: 125 } : void 0), f = d(() => ({
|
|
550
550
|
enableTimePicker: o.value,
|
|
551
551
|
enableSeconds: a.seconds,
|
|
552
552
|
is24: a.is24,
|
|
553
553
|
minutesIncrement: a.minutesIncrement
|
|
554
|
-
})),
|
|
555
|
-
id:
|
|
554
|
+
})), m = d(() => ({
|
|
555
|
+
id: t.id.value,
|
|
556
556
|
name: a.name,
|
|
557
557
|
clearable: a.clearable,
|
|
558
558
|
// The library reads `state: false` as invalid; leaving it undefined means neutral.
|
|
559
|
-
state:
|
|
559
|
+
state: t.status.value === "error" ? !1 : void 0,
|
|
560
560
|
"aria-label": a.ariaLabel,
|
|
561
|
-
"aria-describedby":
|
|
562
|
-
})),
|
|
561
|
+
"aria-describedby": t.describedBy.value
|
|
562
|
+
})), g = d(() => [
|
|
563
563
|
"wx-datepicker",
|
|
564
|
-
`wx-datepicker--${
|
|
564
|
+
`wx-datepicker--${t.size.value}`,
|
|
565
565
|
{
|
|
566
|
-
[`wx-datepicker--${
|
|
567
|
-
"is-disabled":
|
|
566
|
+
[`wx-datepicker--${t.status.value}`]: t.status.value !== "default",
|
|
567
|
+
"is-disabled": t.disabled.value
|
|
568
568
|
}
|
|
569
569
|
]);
|
|
570
|
-
function
|
|
571
|
-
|
|
570
|
+
function y(V) {
|
|
571
|
+
s.value = V, n("change", V);
|
|
572
572
|
}
|
|
573
|
-
function
|
|
574
|
-
|
|
573
|
+
function P() {
|
|
574
|
+
s.value = null, n("change", null), n("clear");
|
|
575
575
|
}
|
|
576
|
-
return (
|
|
577
|
-
class:
|
|
576
|
+
return (V, B) => (l(), u("div", {
|
|
577
|
+
class: F(g.value)
|
|
578
578
|
}, [
|
|
579
|
-
|
|
580
|
-
"model-value":
|
|
581
|
-
"model-type":
|
|
582
|
-
formats: { input:
|
|
579
|
+
O(b(Ye), te({
|
|
580
|
+
"model-value": s.value,
|
|
581
|
+
"model-type": c.value,
|
|
582
|
+
formats: { input: p.value },
|
|
583
583
|
"time-picker": e.type === "time",
|
|
584
|
-
"time-config":
|
|
585
|
-
config:
|
|
586
|
-
"input-attrs":
|
|
584
|
+
"time-config": f.value,
|
|
585
|
+
config: h.value,
|
|
586
|
+
"input-attrs": m.value,
|
|
587
587
|
ui: { input: "wx-datepicker__input", menu: "wx-datepicker__menu" },
|
|
588
588
|
placeholder: e.placeholder,
|
|
589
589
|
"min-date": e.minDate,
|
|
@@ -592,28 +592,28 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
592
592
|
"auto-apply": e.autoApply,
|
|
593
593
|
"text-input": e.textInput,
|
|
594
594
|
teleport: e.teleport,
|
|
595
|
-
disabled:
|
|
595
|
+
disabled: b(t).disabled.value,
|
|
596
596
|
readonly: e.readonly
|
|
597
|
-
},
|
|
598
|
-
"onUpdate:modelValue":
|
|
599
|
-
onCleared:
|
|
600
|
-
onOpen:
|
|
601
|
-
onClosed:
|
|
602
|
-
}),
|
|
603
|
-
|
|
604
|
-
name:
|
|
605
|
-
fn:
|
|
606
|
-
|
|
597
|
+
}, V.$attrs, {
|
|
598
|
+
"onUpdate:modelValue": y,
|
|
599
|
+
onCleared: P,
|
|
600
|
+
onOpen: B[0] || (B[0] = ($) => n("open")),
|
|
601
|
+
onClosed: B[1] || (B[1] = ($) => n("close"))
|
|
602
|
+
}), ge({ _: 2 }, [
|
|
603
|
+
X(V.$slots, ($, r) => ({
|
|
604
|
+
name: r,
|
|
605
|
+
fn: Y((S) => [
|
|
606
|
+
N(V.$slots, r, ke(we(S ?? {})))
|
|
607
607
|
])
|
|
608
608
|
}))
|
|
609
609
|
]), 1040, ["model-value", "model-type", "formats", "time-picker", "time-config", "config", "input-attrs", "placeholder", "min-date", "max-date", "week-start", "auto-apply", "text-input", "teleport", "disabled", "readonly"])
|
|
610
610
|
], 2));
|
|
611
611
|
}
|
|
612
|
-
}),
|
|
612
|
+
}), Vt = /* @__PURE__ */ J({
|
|
613
613
|
name: "WxDateRangePicker",
|
|
614
614
|
inheritAttrs: !1,
|
|
615
615
|
__name: "DateRangePicker",
|
|
616
|
-
props: /* @__PURE__ */
|
|
616
|
+
props: /* @__PURE__ */ R({
|
|
617
617
|
valueFormat: { default: void 0 },
|
|
618
618
|
format: { default: void 0 },
|
|
619
619
|
placeholder: { default: void 0 },
|
|
@@ -636,42 +636,42 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
636
636
|
modelValue: { default: null },
|
|
637
637
|
modelModifiers: {}
|
|
638
638
|
}),
|
|
639
|
-
emits: /* @__PURE__ */
|
|
640
|
-
setup(e, { emit:
|
|
641
|
-
const a = e,
|
|
639
|
+
emits: /* @__PURE__ */ R(["change", "clear", "open", "close"], ["update:modelValue"]),
|
|
640
|
+
setup(e, { emit: _ }) {
|
|
641
|
+
const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = d(
|
|
642
642
|
() => a.valueFormat === "date" ? void 0 : a.valueFormat ?? "yyyy-MM-dd"
|
|
643
|
-
),
|
|
644
|
-
id:
|
|
643
|
+
), c = d(() => a.format ?? "dd.MM.yyyy"), p = d(() => ({
|
|
644
|
+
id: t.id.value,
|
|
645
645
|
name: a.name,
|
|
646
646
|
clearable: a.clearable,
|
|
647
|
-
state:
|
|
647
|
+
state: t.status.value === "error" ? !1 : void 0,
|
|
648
648
|
"aria-label": a.ariaLabel,
|
|
649
|
-
"aria-describedby":
|
|
650
|
-
})),
|
|
649
|
+
"aria-describedby": t.describedBy.value
|
|
650
|
+
})), h = d(() => [
|
|
651
651
|
"wx-datepicker",
|
|
652
652
|
"wx-datepicker--range",
|
|
653
|
-
`wx-datepicker--${
|
|
653
|
+
`wx-datepicker--${t.size.value}`,
|
|
654
654
|
{
|
|
655
|
-
[`wx-datepicker--${
|
|
656
|
-
"is-disabled":
|
|
655
|
+
[`wx-datepicker--${t.status.value}`]: t.status.value !== "default",
|
|
656
|
+
"is-disabled": t.disabled.value
|
|
657
657
|
}
|
|
658
658
|
]);
|
|
659
|
-
function
|
|
660
|
-
|
|
659
|
+
function f(g) {
|
|
660
|
+
s.value = g, n("change", g);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
|
|
662
|
+
function m() {
|
|
663
|
+
s.value = null, n("change", null), n("clear");
|
|
664
664
|
}
|
|
665
|
-
return (
|
|
666
|
-
class:
|
|
665
|
+
return (g, y) => (l(), u("div", {
|
|
666
|
+
class: F(h.value)
|
|
667
667
|
}, [
|
|
668
|
-
|
|
668
|
+
O(b(Ye), te({
|
|
669
669
|
range: "",
|
|
670
|
-
"model-value":
|
|
670
|
+
"model-value": s.value,
|
|
671
671
|
"model-type": o.value,
|
|
672
|
-
formats: { input:
|
|
672
|
+
formats: { input: c.value },
|
|
673
673
|
"multi-calendars": e.months,
|
|
674
|
-
"input-attrs":
|
|
674
|
+
"input-attrs": p.value,
|
|
675
675
|
ui: { input: "wx-datepicker__input", menu: "wx-datepicker__menu" },
|
|
676
676
|
placeholder: e.placeholder,
|
|
677
677
|
"min-date": e.minDate,
|
|
@@ -680,27 +680,27 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
680
680
|
"auto-apply": e.autoApply,
|
|
681
681
|
"text-input": e.textInput,
|
|
682
682
|
teleport: e.teleport,
|
|
683
|
-
disabled:
|
|
683
|
+
disabled: b(t).disabled.value,
|
|
684
684
|
readonly: e.readonly
|
|
685
|
-
},
|
|
686
|
-
"onUpdate:modelValue":
|
|
687
|
-
onCleared:
|
|
688
|
-
onOpen:
|
|
689
|
-
onClosed:
|
|
690
|
-
}),
|
|
691
|
-
|
|
692
|
-
name:
|
|
693
|
-
fn:
|
|
694
|
-
|
|
685
|
+
}, g.$attrs, {
|
|
686
|
+
"onUpdate:modelValue": f,
|
|
687
|
+
onCleared: m,
|
|
688
|
+
onOpen: y[0] || (y[0] = (P) => n("open")),
|
|
689
|
+
onClosed: y[1] || (y[1] = (P) => n("close"))
|
|
690
|
+
}), ge({ _: 2 }, [
|
|
691
|
+
X(g.$slots, (P, V) => ({
|
|
692
|
+
name: V,
|
|
693
|
+
fn: Y((B) => [
|
|
694
|
+
N(g.$slots, V, ke(we(B ?? {})))
|
|
695
695
|
])
|
|
696
696
|
}))
|
|
697
697
|
]), 1040, ["model-value", "model-type", "formats", "multi-calendars", "input-attrs", "placeholder", "min-date", "max-date", "week-start", "auto-apply", "text-input", "teleport", "disabled", "readonly"])
|
|
698
698
|
], 2));
|
|
699
699
|
}
|
|
700
|
-
}),
|
|
700
|
+
}), zt = /* @__PURE__ */ J({
|
|
701
701
|
name: "WxDateTimePicker",
|
|
702
702
|
__name: "DateTimePicker",
|
|
703
|
-
props: /* @__PURE__ */
|
|
703
|
+
props: /* @__PURE__ */ R({
|
|
704
704
|
valueFormat: { default: void 0 },
|
|
705
705
|
format: { default: void 0 },
|
|
706
706
|
placeholder: { default: void 0 },
|
|
@@ -727,21 +727,21 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
727
727
|
}),
|
|
728
728
|
emits: ["update:modelValue"],
|
|
729
729
|
setup(e) {
|
|
730
|
-
const
|
|
731
|
-
return (a,
|
|
732
|
-
modelValue:
|
|
733
|
-
"onUpdate:modelValue":
|
|
730
|
+
const _ = G(e, "modelValue");
|
|
731
|
+
return (a, n) => (l(), ie(Ie, te({
|
|
732
|
+
modelValue: _.value,
|
|
733
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => _.value = s),
|
|
734
734
|
type: "datetime"
|
|
735
|
-
}, a.$props),
|
|
736
|
-
|
|
737
|
-
name:
|
|
738
|
-
fn:
|
|
739
|
-
|
|
735
|
+
}, a.$props), ge({ _: 2 }, [
|
|
736
|
+
X(a.$slots, (s, t) => ({
|
|
737
|
+
name: t,
|
|
738
|
+
fn: Y((o) => [
|
|
739
|
+
N(a.$slots, t, ke(we(o ?? {})))
|
|
740
740
|
])
|
|
741
741
|
}))
|
|
742
742
|
]), 1040, ["modelValue"]));
|
|
743
743
|
}
|
|
744
|
-
}),
|
|
744
|
+
}), Pt = /* @__PURE__ */ J({
|
|
745
745
|
name: "WxForm",
|
|
746
746
|
__name: "Form",
|
|
747
747
|
props: {
|
|
@@ -753,39 +753,39 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
753
753
|
gap: { default: "md" }
|
|
754
754
|
},
|
|
755
755
|
emits: ["submit", "reset"],
|
|
756
|
-
setup(e, { emit:
|
|
757
|
-
const a = e,
|
|
758
|
-
|
|
759
|
-
errors:
|
|
760
|
-
disabled:
|
|
761
|
-
size:
|
|
762
|
-
labelPosition:
|
|
763
|
-
labelWidth:
|
|
756
|
+
setup(e, { emit: _ }) {
|
|
757
|
+
const a = e, n = _, s = d(() => a.errors ?? {});
|
|
758
|
+
xe(Se, {
|
|
759
|
+
errors: s,
|
|
760
|
+
disabled: me(a, "disabled"),
|
|
761
|
+
size: me(a, "size"),
|
|
762
|
+
labelPosition: me(a, "labelPosition"),
|
|
763
|
+
labelWidth: me(a, "labelWidth")
|
|
764
764
|
});
|
|
765
|
-
function
|
|
766
|
-
|
|
765
|
+
function t(c) {
|
|
766
|
+
c.preventDefault(), n("submit", c);
|
|
767
767
|
}
|
|
768
|
-
function o(
|
|
769
|
-
|
|
768
|
+
function o(c) {
|
|
769
|
+
n("reset", c);
|
|
770
770
|
}
|
|
771
|
-
return (
|
|
772
|
-
class:
|
|
771
|
+
return (c, p) => (l(), u("form", {
|
|
772
|
+
class: F(["wx-form", `wx-form--gap-${e.gap}`, `wx-form--label-${e.labelPosition}`]),
|
|
773
773
|
novalidate: "",
|
|
774
|
-
onSubmit:
|
|
774
|
+
onSubmit: t,
|
|
775
775
|
onReset: o
|
|
776
776
|
}, [
|
|
777
|
-
|
|
777
|
+
N(c.$slots, "default", {}, void 0, !0)
|
|
778
778
|
], 34));
|
|
779
779
|
}
|
|
780
|
-
}),
|
|
780
|
+
}), Wt = /* @__PURE__ */ Q(Pt, [["__scopeId", "data-v-bfab857f"]]), At = {
|
|
781
781
|
key: 0,
|
|
782
782
|
class: "wx-form-item__required",
|
|
783
783
|
"aria-hidden": "true"
|
|
784
|
-
},
|
|
784
|
+
}, Lt = { class: "wx-form-item__control" }, Rt = {
|
|
785
785
|
key: 2,
|
|
786
786
|
class: "wx-form-item__error",
|
|
787
787
|
"aria-hidden": "true"
|
|
788
|
-
},
|
|
788
|
+
}, Ft = /* @__PURE__ */ J({
|
|
789
789
|
name: "WxFormItem",
|
|
790
790
|
__name: "FormItem",
|
|
791
791
|
props: {
|
|
@@ -799,73 +799,73 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
799
799
|
labelWidth: { default: void 0 },
|
|
800
800
|
reserveErrorSpace: { type: Boolean, default: !1 }
|
|
801
801
|
},
|
|
802
|
-
setup(e, { expose:
|
|
803
|
-
const a = e,
|
|
804
|
-
function
|
|
805
|
-
if (
|
|
806
|
-
|
|
802
|
+
setup(e, { expose: _ }) {
|
|
803
|
+
const a = e, n = ce(Se, null), s = Te("wx-field"), t = `${s}-error`, o = `${s}-help`, c = q("control"), p = q(s);
|
|
804
|
+
function h(r) {
|
|
805
|
+
if (r === void 0) {
|
|
806
|
+
c.value = "group";
|
|
807
807
|
return;
|
|
808
808
|
}
|
|
809
|
-
|
|
810
|
-
}
|
|
811
|
-
const
|
|
812
|
-
return
|
|
813
|
-
id:
|
|
814
|
-
describedBy:
|
|
815
|
-
status:
|
|
816
|
-
disabled:
|
|
817
|
-
size:
|
|
818
|
-
registerLabelTarget:
|
|
819
|
-
}),
|
|
820
|
-
class:
|
|
809
|
+
c.value = "control", p.value = r;
|
|
810
|
+
}
|
|
811
|
+
const f = d(() => a.error !== void 0 ? Array.isArray(a.error) ? a.error : [a.error] : a.name && n ? n.errors.value[a.name] ?? [] : []), m = d(() => f.value.length > 0), g = d(() => m.value ? "error" : "default"), y = d(() => m.value ? t : a.help ? o : void 0), P = d(() => a.size), V = d(() => a.disabled), B = d(() => a.labelWidth ?? n?.labelWidth.value), $ = d(() => n?.labelPosition.value === "left");
|
|
812
|
+
return bt({
|
|
813
|
+
id: d(() => s),
|
|
814
|
+
describedBy: y,
|
|
815
|
+
status: g,
|
|
816
|
+
disabled: V,
|
|
817
|
+
size: P,
|
|
818
|
+
registerLabelTarget: h
|
|
819
|
+
}), _({ messages: f, hasError: m }), (r, S) => (l(), u("div", {
|
|
820
|
+
class: F([
|
|
821
821
|
"wx-form-item",
|
|
822
|
-
{ "wx-form-item--inline":
|
|
822
|
+
{ "wx-form-item--inline": $.value, "is-error": m.value, "is-required": e.required }
|
|
823
823
|
]),
|
|
824
|
-
style:
|
|
824
|
+
style: ee($.value && B.value ? { "--wx-form-item-label-width": B.value } : void 0)
|
|
825
825
|
}, [
|
|
826
|
-
e.label ||
|
|
826
|
+
e.label || r.$slots.label ? (l(), ie(Ge(c.value === "group" ? "span" : "label"), {
|
|
827
827
|
key: 0,
|
|
828
|
-
id: `${s
|
|
828
|
+
id: `${b(s)}-label`,
|
|
829
829
|
class: "wx-form-item__label",
|
|
830
|
-
for:
|
|
830
|
+
for: c.value === "group" ? void 0 : p.value
|
|
831
831
|
}, {
|
|
832
|
-
default:
|
|
833
|
-
|
|
834
|
-
|
|
832
|
+
default: Y(() => [
|
|
833
|
+
N(r.$slots, "label", {}, () => [
|
|
834
|
+
ae(D(e.label), 1)
|
|
835
835
|
], !0),
|
|
836
|
-
e.required ? (
|
|
836
|
+
e.required ? (l(), u("span", At, "*")) : C("", !0)
|
|
837
837
|
]),
|
|
838
838
|
_: 3
|
|
839
|
-
}, 8, ["id", "for"])) :
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
839
|
+
}, 8, ["id", "for"])) : C("", !0),
|
|
840
|
+
x("div", Lt, [
|
|
841
|
+
N(r.$slots, "default", {}, void 0, !0),
|
|
842
|
+
m.value ? (l(), u("p", {
|
|
843
843
|
key: 0,
|
|
844
|
-
id:
|
|
844
|
+
id: t,
|
|
845
845
|
class: "wx-form-item__error",
|
|
846
846
|
role: "alert"
|
|
847
|
-
},
|
|
847
|
+
}, D(f.value[0]), 1)) : e.help ? (l(), u("p", {
|
|
848
848
|
key: 1,
|
|
849
849
|
id: o,
|
|
850
850
|
class: "wx-form-item__help"
|
|
851
|
-
},
|
|
851
|
+
}, D(e.help), 1)) : e.reserveErrorSpace ? (l(), u("p", Rt, " ")) : C("", !0)
|
|
852
852
|
])
|
|
853
853
|
], 6));
|
|
854
854
|
}
|
|
855
|
-
}),
|
|
855
|
+
}), Ht = /* @__PURE__ */ Q(Ft, [["__scopeId", "data-v-0b8142de"]]), Dt = {
|
|
856
856
|
key: 0,
|
|
857
857
|
class: "wx-input__affix wx-input__affix--prefix"
|
|
858
|
-
},
|
|
858
|
+
}, Nt = ["id", "type", "value", "placeholder", "disabled", "readonly", "maxlength", "autocomplete", "aria-label", "aria-describedby", "aria-invalid"], Ut = {
|
|
859
859
|
key: 2,
|
|
860
860
|
class: "wx-input__count"
|
|
861
|
-
},
|
|
861
|
+
}, Et = {
|
|
862
862
|
key: 3,
|
|
863
863
|
class: "wx-input__affix wx-input__affix--suffix"
|
|
864
|
-
},
|
|
864
|
+
}, Ot = /* @__PURE__ */ J({
|
|
865
865
|
name: "WxInput",
|
|
866
866
|
inheritAttrs: !1,
|
|
867
867
|
__name: "Input",
|
|
868
|
-
props: /* @__PURE__ */
|
|
868
|
+
props: /* @__PURE__ */ R({
|
|
869
869
|
id: { default: void 0 },
|
|
870
870
|
type: { default: "text" },
|
|
871
871
|
size: { default: void 0 },
|
|
@@ -882,89 +882,89 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
882
882
|
modelValue: { default: "" },
|
|
883
883
|
modelModifiers: {}
|
|
884
884
|
}),
|
|
885
|
-
emits: /* @__PURE__ */
|
|
886
|
-
setup(e, { expose:
|
|
887
|
-
const
|
|
888
|
-
() =>
|
|
889
|
-
),
|
|
890
|
-
() =>
|
|
891
|
-
),
|
|
885
|
+
emits: /* @__PURE__ */ R(["input", "change", "focus", "blur", "clear"], ["update:modelValue"]),
|
|
886
|
+
setup(e, { expose: _, emit: a }) {
|
|
887
|
+
const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(null), p = q(!1), h = d(() => t.value == null ? "" : String(t.value)), f = d(
|
|
888
|
+
() => n.clearable && !o.disabled.value && !n.readonly && h.value.length > 0
|
|
889
|
+
), m = d(
|
|
890
|
+
() => n.showCount && n.maxlength ? `${h.value.length}/${n.maxlength}` : null
|
|
891
|
+
), g = d(() => [
|
|
892
892
|
"wx-input",
|
|
893
893
|
`wx-input--${o.size.value}`,
|
|
894
894
|
{
|
|
895
895
|
[`wx-input--${o.status.value}`]: o.status.value !== "default",
|
|
896
|
-
"is-focused":
|
|
896
|
+
"is-focused": p.value,
|
|
897
897
|
"is-disabled": o.disabled.value,
|
|
898
|
-
"is-readonly":
|
|
898
|
+
"is-readonly": n.readonly
|
|
899
899
|
}
|
|
900
900
|
]);
|
|
901
|
-
function
|
|
902
|
-
const
|
|
903
|
-
|
|
901
|
+
function y(r) {
|
|
902
|
+
const S = r.target.value;
|
|
903
|
+
t.value = S, s("input", S);
|
|
904
904
|
}
|
|
905
|
-
function
|
|
906
|
-
|
|
905
|
+
function P(r) {
|
|
906
|
+
s("change", r.target.value);
|
|
907
907
|
}
|
|
908
|
-
function
|
|
909
|
-
|
|
908
|
+
function V(r) {
|
|
909
|
+
p.value = !0, s("focus", r);
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
|
|
911
|
+
function B(r) {
|
|
912
|
+
p.value = !1, s("blur", r);
|
|
913
913
|
}
|
|
914
|
-
function
|
|
915
|
-
|
|
914
|
+
function $() {
|
|
915
|
+
t.value = "", s("input", ""), s("change", ""), s("clear"), c.value?.focus();
|
|
916
916
|
}
|
|
917
|
-
return
|
|
918
|
-
focus: () =>
|
|
919
|
-
blur: () =>
|
|
920
|
-
select: () =>
|
|
921
|
-
input:
|
|
922
|
-
}), (
|
|
923
|
-
class:
|
|
917
|
+
return _({
|
|
918
|
+
focus: () => c.value?.focus(),
|
|
919
|
+
blur: () => c.value?.blur(),
|
|
920
|
+
select: () => c.value?.select(),
|
|
921
|
+
input: c
|
|
922
|
+
}), (r, S) => (l(), u("div", {
|
|
923
|
+
class: F(g.value)
|
|
924
924
|
}, [
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
])) :
|
|
928
|
-
|
|
929
|
-
id:
|
|
925
|
+
r.$slots.prefix ? (l(), u("span", Dt, [
|
|
926
|
+
N(r.$slots, "prefix", {}, void 0, !0)
|
|
927
|
+
])) : C("", !0),
|
|
928
|
+
x("input", te({
|
|
929
|
+
id: b(o).id.value,
|
|
930
930
|
ref_key: "inputRef",
|
|
931
|
-
ref:
|
|
932
|
-
},
|
|
931
|
+
ref: c
|
|
932
|
+
}, r.$attrs, {
|
|
933
933
|
class: "wx-input__inner",
|
|
934
934
|
type: e.type,
|
|
935
|
-
value:
|
|
935
|
+
value: h.value,
|
|
936
936
|
placeholder: e.placeholder,
|
|
937
|
-
disabled:
|
|
937
|
+
disabled: b(o).disabled.value,
|
|
938
938
|
readonly: e.readonly,
|
|
939
939
|
maxlength: e.maxlength,
|
|
940
940
|
autocomplete: e.autocomplete,
|
|
941
941
|
"aria-label": e.ariaLabel,
|
|
942
|
-
"aria-describedby":
|
|
943
|
-
"aria-invalid":
|
|
944
|
-
onInput:
|
|
945
|
-
onChange:
|
|
946
|
-
onFocus:
|
|
947
|
-
onBlur:
|
|
948
|
-
}), null, 16,
|
|
949
|
-
|
|
942
|
+
"aria-describedby": b(o).describedBy.value,
|
|
943
|
+
"aria-invalid": b(o).status.value === "error" || void 0,
|
|
944
|
+
onInput: y,
|
|
945
|
+
onChange: P,
|
|
946
|
+
onFocus: V,
|
|
947
|
+
onBlur: B
|
|
948
|
+
}), null, 16, Nt),
|
|
949
|
+
f.value ? (l(), u("button", {
|
|
950
950
|
key: 1,
|
|
951
951
|
class: "wx-input__clear",
|
|
952
952
|
type: "button",
|
|
953
953
|
tabindex: "-1",
|
|
954
954
|
"aria-label": "Clear",
|
|
955
|
-
onClick:
|
|
956
|
-
}, " ✕ ")) :
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
])) :
|
|
955
|
+
onClick: $
|
|
956
|
+
}, " ✕ ")) : C("", !0),
|
|
957
|
+
m.value ? (l(), u("span", Ut, D(m.value), 1)) : C("", !0),
|
|
958
|
+
r.$slots.suffix ? (l(), u("span", Et, [
|
|
959
|
+
N(r.$slots, "suffix", {}, void 0, !0)
|
|
960
|
+
])) : C("", !0)
|
|
961
961
|
], 2));
|
|
962
962
|
}
|
|
963
|
-
}),
|
|
963
|
+
}), Qe = /* @__PURE__ */ Q(Ot, [["__scopeId", "data-v-82a546ac"]]), jt = ["disabled"], Kt = ["id", "name", "value", "placeholder", "disabled", "readonly", "aria-label", "aria-describedby", "aria-invalid", "aria-valuenow", "aria-valuemin", "aria-valuemax"], Gt = ["disabled"], qt = /* @__PURE__ */ J({
|
|
964
964
|
name: "WxInputNumber",
|
|
965
965
|
inheritAttrs: !1,
|
|
966
966
|
__name: "InputNumber",
|
|
967
|
-
props: /* @__PURE__ */
|
|
967
|
+
props: /* @__PURE__ */ R({
|
|
968
968
|
min: { default: void 0 },
|
|
969
969
|
max: { default: void 0 },
|
|
970
970
|
step: { default: 1 },
|
|
@@ -984,169 +984,309 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
984
984
|
modelValue: { default: null },
|
|
985
985
|
modelModifiers: {}
|
|
986
986
|
}),
|
|
987
|
-
emits: /* @__PURE__ */
|
|
988
|
-
setup(e, { expose:
|
|
989
|
-
const
|
|
990
|
-
if (
|
|
991
|
-
const [,
|
|
992
|
-
return
|
|
987
|
+
emits: /* @__PURE__ */ R(["change", "focus", "blur"], ["update:modelValue"]),
|
|
988
|
+
setup(e, { expose: _, emit: a }) {
|
|
989
|
+
const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(null), p = q(!1), h = d(() => {
|
|
990
|
+
if (n.precision !== void 0) return n.precision;
|
|
991
|
+
const [, W = ""] = String(n.step).split(".");
|
|
992
|
+
return W.length;
|
|
993
993
|
});
|
|
994
|
-
function
|
|
995
|
-
const
|
|
996
|
-
return Math.round((
|
|
997
|
-
}
|
|
998
|
-
function
|
|
999
|
-
let
|
|
1000
|
-
return
|
|
1001
|
-
}
|
|
1002
|
-
const
|
|
1003
|
-
() => typeof
|
|
1004
|
-
),
|
|
1005
|
-
|
|
1006
|
-
|
|
994
|
+
function f(W) {
|
|
995
|
+
const U = 10 ** h.value;
|
|
996
|
+
return Math.round((W + Number.EPSILON) * U) / U;
|
|
997
|
+
}
|
|
998
|
+
function m(W) {
|
|
999
|
+
let U = W;
|
|
1000
|
+
return n.min !== void 0 && (U = Math.max(U, n.min)), n.max !== void 0 && (U = Math.min(U, n.max)), f(U);
|
|
1001
|
+
}
|
|
1002
|
+
const g = d(
|
|
1003
|
+
() => typeof t.value == "number" && Number.isFinite(t.value) ? t.value : null
|
|
1004
|
+
), y = q(g.value === null ? "" : g.value.toFixed(h.value));
|
|
1005
|
+
ne(g, (W) => {
|
|
1006
|
+
p.value || (y.value = W === null ? "" : W.toFixed(h.value));
|
|
1007
1007
|
});
|
|
1008
|
-
const
|
|
1009
|
-
() => !
|
|
1010
|
-
),
|
|
1011
|
-
() => !
|
|
1012
|
-
),
|
|
1008
|
+
const P = d(() => o.disabled.value), V = d(
|
|
1009
|
+
() => !P.value && !n.readonly && (n.min === void 0 || (g.value ?? 0) > n.min)
|
|
1010
|
+
), B = d(
|
|
1011
|
+
() => !P.value && !n.readonly && (n.max === void 0 || (g.value ?? 0) < n.max)
|
|
1012
|
+
), $ = d(() => [
|
|
1013
1013
|
"wx-input-number",
|
|
1014
1014
|
`wx-input-number--${o.size.value}`,
|
|
1015
|
-
`wx-input-number--controls-${
|
|
1015
|
+
`wx-input-number--controls-${n.controls ? n.controlsPosition : "none"}`,
|
|
1016
1016
|
{
|
|
1017
1017
|
[`wx-input-number--${o.status.value}`]: o.status.value !== "default",
|
|
1018
|
-
"is-focused":
|
|
1019
|
-
"is-disabled":
|
|
1018
|
+
"is-focused": p.value,
|
|
1019
|
+
"is-disabled": P.value
|
|
1020
1020
|
}
|
|
1021
1021
|
]);
|
|
1022
|
-
function
|
|
1023
|
-
|
|
1024
|
-
}
|
|
1025
|
-
function
|
|
1026
|
-
if (
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1029
|
-
}
|
|
1030
|
-
function
|
|
1031
|
-
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1034
|
-
}
|
|
1035
|
-
function
|
|
1036
|
-
if (
|
|
1037
|
-
|
|
1022
|
+
function r(W) {
|
|
1023
|
+
t.value !== W && (t.value = W, s("change", W));
|
|
1024
|
+
}
|
|
1025
|
+
function S(W) {
|
|
1026
|
+
if (P.value || n.readonly) return;
|
|
1027
|
+
const U = g.value ?? m(0), T = m(U + W * n.step);
|
|
1028
|
+
r(T), y.value = T.toFixed(h.value);
|
|
1029
|
+
}
|
|
1030
|
+
function z(W) {
|
|
1031
|
+
y.value = W.target.value;
|
|
1032
|
+
const U = Number.parseFloat(y.value);
|
|
1033
|
+
y.value === "" ? r(null) : Number.isFinite(U) && r(f(U));
|
|
1034
|
+
}
|
|
1035
|
+
function H() {
|
|
1036
|
+
if (y.value.trim() === "") {
|
|
1037
|
+
r(null), y.value = "";
|
|
1038
1038
|
return;
|
|
1039
1039
|
}
|
|
1040
|
-
const
|
|
1041
|
-
if (!Number.isFinite(
|
|
1042
|
-
|
|
1040
|
+
const W = Number.parseFloat(y.value);
|
|
1041
|
+
if (!Number.isFinite(W)) {
|
|
1042
|
+
y.value = g.value === null ? "" : g.value.toFixed(h.value);
|
|
1043
1043
|
return;
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1045
|
+
const U = m(W);
|
|
1046
|
+
r(U), y.value = U.toFixed(h.value);
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1049
|
-
|
|
1048
|
+
function M(W) {
|
|
1049
|
+
p.value = !0, s("focus", W);
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1052
|
-
|
|
1051
|
+
function w(W) {
|
|
1052
|
+
p.value = !1, H(), s("blur", W);
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1055
|
-
!
|
|
1054
|
+
function E(W) {
|
|
1055
|
+
!n.wheel || !p.value || P.value || n.readonly || (W.preventDefault(), S(W.deltaY < 0 ? 1 : -1));
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1058
|
-
|
|
1057
|
+
function Z(W) {
|
|
1058
|
+
W.key === "ArrowUp" ? (W.preventDefault(), S(1)) : W.key === "ArrowDown" ? (W.preventDefault(), S(-1)) : W.key === "Enter" && H();
|
|
1059
1059
|
}
|
|
1060
|
-
return
|
|
1061
|
-
focus: () =>
|
|
1062
|
-
blur: () =>
|
|
1063
|
-
increase: () =>
|
|
1064
|
-
decrease: () =>
|
|
1065
|
-
input:
|
|
1066
|
-
}), (
|
|
1067
|
-
class:
|
|
1060
|
+
return _({
|
|
1061
|
+
focus: () => c.value?.focus(),
|
|
1062
|
+
blur: () => c.value?.blur(),
|
|
1063
|
+
increase: () => S(1),
|
|
1064
|
+
decrease: () => S(-1),
|
|
1065
|
+
input: c
|
|
1066
|
+
}), (W, U) => (l(), u("div", {
|
|
1067
|
+
class: F($.value)
|
|
1068
1068
|
}, [
|
|
1069
|
-
e.controls ? (
|
|
1069
|
+
e.controls ? (l(), u("button", {
|
|
1070
1070
|
key: 0,
|
|
1071
1071
|
class: "wx-input-number__button wx-input-number__button--decrease",
|
|
1072
1072
|
type: "button",
|
|
1073
1073
|
tabindex: "-1",
|
|
1074
1074
|
"aria-label": "Decrease",
|
|
1075
|
-
disabled: !
|
|
1076
|
-
onClick:
|
|
1077
|
-
}, [...
|
|
1078
|
-
|
|
1075
|
+
disabled: !V.value,
|
|
1076
|
+
onClick: U[0] || (U[0] = (T) => S(-1))
|
|
1077
|
+
}, [...U[2] || (U[2] = [
|
|
1078
|
+
x("svg", {
|
|
1079
1079
|
viewBox: "0 0 16 16",
|
|
1080
1080
|
fill: "none",
|
|
1081
1081
|
"aria-hidden": "true"
|
|
1082
1082
|
}, [
|
|
1083
|
-
|
|
1083
|
+
x("path", {
|
|
1084
1084
|
d: "M3.5 8h9",
|
|
1085
1085
|
stroke: "currentColor",
|
|
1086
1086
|
"stroke-width": "1.5",
|
|
1087
1087
|
"stroke-linecap": "round"
|
|
1088
1088
|
})
|
|
1089
1089
|
], -1)
|
|
1090
|
-
])], 8,
|
|
1091
|
-
|
|
1092
|
-
id:
|
|
1090
|
+
])], 8, jt)) : C("", !0),
|
|
1091
|
+
x("input", te({
|
|
1092
|
+
id: b(o).id.value,
|
|
1093
1093
|
ref_key: "inputRef",
|
|
1094
|
-
ref:
|
|
1095
|
-
},
|
|
1094
|
+
ref: c
|
|
1095
|
+
}, W.$attrs, {
|
|
1096
1096
|
class: "wx-input-number__inner",
|
|
1097
1097
|
type: "text",
|
|
1098
1098
|
inputmode: "decimal",
|
|
1099
1099
|
autocomplete: "off",
|
|
1100
1100
|
name: e.name,
|
|
1101
|
-
value:
|
|
1101
|
+
value: y.value,
|
|
1102
1102
|
placeholder: e.placeholder,
|
|
1103
|
-
disabled:
|
|
1103
|
+
disabled: P.value,
|
|
1104
1104
|
readonly: e.readonly,
|
|
1105
1105
|
"aria-label": e.ariaLabel,
|
|
1106
|
-
"aria-describedby":
|
|
1107
|
-
"aria-invalid":
|
|
1106
|
+
"aria-describedby": b(o).describedBy.value,
|
|
1107
|
+
"aria-invalid": b(o).status.value === "error" || void 0,
|
|
1108
1108
|
role: "spinbutton",
|
|
1109
|
-
"aria-valuenow":
|
|
1109
|
+
"aria-valuenow": g.value ?? void 0,
|
|
1110
1110
|
"aria-valuemin": e.min,
|
|
1111
1111
|
"aria-valuemax": e.max,
|
|
1112
|
-
onInput:
|
|
1113
|
-
onFocus:
|
|
1114
|
-
onBlur:
|
|
1115
|
-
onKeydown:
|
|
1116
|
-
onWheel:
|
|
1117
|
-
}), null, 16,
|
|
1118
|
-
e.controls ? (
|
|
1112
|
+
onInput: z,
|
|
1113
|
+
onFocus: M,
|
|
1114
|
+
onBlur: w,
|
|
1115
|
+
onKeydown: Z,
|
|
1116
|
+
onWheel: E
|
|
1117
|
+
}), null, 16, Kt),
|
|
1118
|
+
e.controls ? (l(), u("button", {
|
|
1119
1119
|
key: 1,
|
|
1120
1120
|
class: "wx-input-number__button wx-input-number__button--increase",
|
|
1121
1121
|
type: "button",
|
|
1122
1122
|
tabindex: "-1",
|
|
1123
1123
|
"aria-label": "Increase",
|
|
1124
|
-
disabled: !
|
|
1125
|
-
onClick:
|
|
1126
|
-
}, [...
|
|
1127
|
-
|
|
1124
|
+
disabled: !B.value,
|
|
1125
|
+
onClick: U[1] || (U[1] = (T) => S(1))
|
|
1126
|
+
}, [...U[3] || (U[3] = [
|
|
1127
|
+
x("svg", {
|
|
1128
1128
|
viewBox: "0 0 16 16",
|
|
1129
1129
|
fill: "none",
|
|
1130
1130
|
"aria-hidden": "true"
|
|
1131
1131
|
}, [
|
|
1132
|
-
|
|
1132
|
+
x("path", {
|
|
1133
1133
|
d: "M8 3.5v9M3.5 8h9",
|
|
1134
1134
|
stroke: "currentColor",
|
|
1135
1135
|
"stroke-width": "1.5",
|
|
1136
1136
|
"stroke-linecap": "round"
|
|
1137
1137
|
})
|
|
1138
1138
|
], -1)
|
|
1139
|
-
])], 8,
|
|
1139
|
+
])], 8, Gt)) : C("", !0)
|
|
1140
1140
|
], 2));
|
|
1141
1141
|
}
|
|
1142
|
-
}),
|
|
1142
|
+
}), Yt = /* @__PURE__ */ Q(qt, [["__scopeId", "data-v-1dcbf297"]]), Xt = ["aria-label"], Jt = {
|
|
1143
|
+
key: 0,
|
|
1144
|
+
class: "wx-pagination__total"
|
|
1145
|
+
}, Zt = { class: "wx-pagination__controls" }, Qt = {
|
|
1146
|
+
key: 0,
|
|
1147
|
+
class: "wx-pagination__per-page"
|
|
1148
|
+
}, el = ["value", "disabled"], al = ["value"], tl = { class: "wx-pagination__list" }, ll = ["disabled"], ol = {
|
|
1149
|
+
key: 0,
|
|
1150
|
+
class: "wx-pagination__gap",
|
|
1151
|
+
"aria-hidden": "true"
|
|
1152
|
+
}, il = ["disabled", "aria-current", "aria-label", "onClick"], nl = ["disabled"], sl = /* @__PURE__ */ J({
|
|
1153
|
+
name: "WxPagination",
|
|
1154
|
+
__name: "Pagination",
|
|
1155
|
+
props: /* @__PURE__ */ R({
|
|
1156
|
+
paginator: { default: null },
|
|
1157
|
+
total: { default: void 0 },
|
|
1158
|
+
lastPage: { default: void 0 },
|
|
1159
|
+
siblings: { default: 1 },
|
|
1160
|
+
perPageOptions: { default: () => [] },
|
|
1161
|
+
showTotal: { type: Boolean, default: !0 },
|
|
1162
|
+
disabled: { type: Boolean, default: !1 },
|
|
1163
|
+
size: { default: "md" },
|
|
1164
|
+
ariaLabel: { default: "Pagination" }
|
|
1165
|
+
}, {
|
|
1166
|
+
page: { default: void 0 },
|
|
1167
|
+
pageModifiers: {},
|
|
1168
|
+
perPage: { default: void 0 },
|
|
1169
|
+
perPageModifiers: {}
|
|
1170
|
+
}),
|
|
1171
|
+
emits: /* @__PURE__ */ R(["change"], ["update:page", "update:perPage"]),
|
|
1172
|
+
setup(e, { emit: _ }) {
|
|
1173
|
+
const a = e, n = _, s = G(e, "page"), t = G(e, "perPage"), o = d(() => t.value ?? a.paginator?.per_page ?? 15), c = d(() => a.total ?? a.paginator?.total ?? 0), p = d(() => a.lastPage !== void 0 ? Math.max(1, a.lastPage) : a.paginator ? Math.max(1, a.paginator.last_page) : Math.max(1, Math.ceil(c.value / o.value))), h = d(() => {
|
|
1174
|
+
const B = s.value ?? a.paginator?.current_page ?? 1;
|
|
1175
|
+
return Math.min(Math.max(1, B), p.value);
|
|
1176
|
+
}), f = d(() => a.paginator ? a.paginator.from : c.value === 0 ? null : (h.value - 1) * o.value + 1), m = d(() => a.paginator ? a.paginator.to : c.value === 0 ? null : Math.min(c.value, h.value * o.value)), g = d(() => {
|
|
1177
|
+
const B = p.value, $ = h.value, r = a.siblings, S = /* @__PURE__ */ new Set([1, B]);
|
|
1178
|
+
for (let w = $ - r; w <= $ + r; w++)
|
|
1179
|
+
w >= 1 && w <= B && S.add(w);
|
|
1180
|
+
const z = [...S].sort((w, E) => w - E), H = [];
|
|
1181
|
+
let M = 0;
|
|
1182
|
+
for (const w of z) {
|
|
1183
|
+
const E = w - M;
|
|
1184
|
+
M && E === 2 ? H.push({ type: "page", value: w - 1 }) : M && E > 2 && H.push({ type: "gap", value: `gap-${w}` }), H.push({ type: "page", value: w }), M = w;
|
|
1185
|
+
}
|
|
1186
|
+
return H;
|
|
1187
|
+
}), y = d(() => [
|
|
1188
|
+
"wx-pagination",
|
|
1189
|
+
`wx-pagination--${a.size}`,
|
|
1190
|
+
{ "is-disabled": a.disabled }
|
|
1191
|
+
]);
|
|
1192
|
+
function P(B) {
|
|
1193
|
+
const $ = Math.min(Math.max(1, B), p.value);
|
|
1194
|
+
a.disabled || $ === h.value || (s.value = $, n("change", { page: $, perPage: o.value }));
|
|
1195
|
+
}
|
|
1196
|
+
function V(B) {
|
|
1197
|
+
const $ = Number(B.target.value);
|
|
1198
|
+
!Number.isFinite($) || $ === o.value || (t.value = $, s.value = 1, n("change", { page: 1, perPage: $ }));
|
|
1199
|
+
}
|
|
1200
|
+
return (B, $) => (l(), u("nav", {
|
|
1201
|
+
class: F(y.value),
|
|
1202
|
+
"aria-label": e.ariaLabel
|
|
1203
|
+
}, [
|
|
1204
|
+
e.showTotal ? (l(), u("p", Jt, [
|
|
1205
|
+
N(B.$slots, "total", {
|
|
1206
|
+
from: f.value,
|
|
1207
|
+
to: m.value,
|
|
1208
|
+
total: c.value
|
|
1209
|
+
}, () => [
|
|
1210
|
+
f.value === null ? (l(), u(K, { key: 0 }, [
|
|
1211
|
+
ae("Nothing to show")
|
|
1212
|
+
], 64)) : (l(), u(K, { key: 1 }, [
|
|
1213
|
+
ae(D(f.value) + "–" + D(m.value) + " of " + D(c.value), 1)
|
|
1214
|
+
], 64))
|
|
1215
|
+
], !0)
|
|
1216
|
+
])) : C("", !0),
|
|
1217
|
+
x("div", Zt, [
|
|
1218
|
+
e.perPageOptions.length ? (l(), u("label", Qt, [
|
|
1219
|
+
$[2] || ($[2] = x("span", { class: "wx-pagination__per-page-label" }, "Per page", -1)),
|
|
1220
|
+
x("select", {
|
|
1221
|
+
class: "wx-pagination__select",
|
|
1222
|
+
value: o.value,
|
|
1223
|
+
disabled: e.disabled,
|
|
1224
|
+
onChange: V
|
|
1225
|
+
}, [
|
|
1226
|
+
(l(!0), u(K, null, X(e.perPageOptions, (r) => (l(), u("option", {
|
|
1227
|
+
key: r,
|
|
1228
|
+
value: r
|
|
1229
|
+
}, D(r), 9, al))), 128))
|
|
1230
|
+
], 40, el)
|
|
1231
|
+
])) : C("", !0),
|
|
1232
|
+
x("ul", tl, [
|
|
1233
|
+
x("li", null, [
|
|
1234
|
+
x("button", {
|
|
1235
|
+
class: "wx-pagination__button wx-pagination__button--arrow",
|
|
1236
|
+
type: "button",
|
|
1237
|
+
disabled: e.disabled || h.value <= 1,
|
|
1238
|
+
"aria-label": "Previous page",
|
|
1239
|
+
onClick: $[0] || ($[0] = (r) => P(h.value - 1))
|
|
1240
|
+
}, [...$[3] || ($[3] = [
|
|
1241
|
+
x("svg", {
|
|
1242
|
+
viewBox: "0 0 8 12",
|
|
1243
|
+
"aria-hidden": "true"
|
|
1244
|
+
}, [
|
|
1245
|
+
x("path", { d: "M6.5 1 1.5 6l5 5" })
|
|
1246
|
+
], -1)
|
|
1247
|
+
])], 8, ll)
|
|
1248
|
+
]),
|
|
1249
|
+
(l(!0), u(K, null, X(g.value, (r) => (l(), u("li", {
|
|
1250
|
+
key: r.value
|
|
1251
|
+
}, [
|
|
1252
|
+
r.type === "gap" ? (l(), u("span", ol, "…")) : (l(), u("button", {
|
|
1253
|
+
key: 1,
|
|
1254
|
+
class: F(["wx-pagination__button", { "is-current": r.value === h.value }]),
|
|
1255
|
+
type: "button",
|
|
1256
|
+
disabled: e.disabled,
|
|
1257
|
+
"aria-current": r.value === h.value ? "page" : void 0,
|
|
1258
|
+
"aria-label": `Page ${r.value}`,
|
|
1259
|
+
onClick: (S) => P(r.value)
|
|
1260
|
+
}, D(r.value), 11, il))
|
|
1261
|
+
]))), 128)),
|
|
1262
|
+
x("li", null, [
|
|
1263
|
+
x("button", {
|
|
1264
|
+
class: "wx-pagination__button wx-pagination__button--arrow",
|
|
1265
|
+
type: "button",
|
|
1266
|
+
disabled: e.disabled || h.value >= p.value,
|
|
1267
|
+
"aria-label": "Next page",
|
|
1268
|
+
onClick: $[1] || ($[1] = (r) => P(h.value + 1))
|
|
1269
|
+
}, [...$[4] || ($[4] = [
|
|
1270
|
+
x("svg", {
|
|
1271
|
+
viewBox: "0 0 8 12",
|
|
1272
|
+
"aria-hidden": "true"
|
|
1273
|
+
}, [
|
|
1274
|
+
x("path", { d: "M1.5 1 6.5 6l-5 5" })
|
|
1275
|
+
], -1)
|
|
1276
|
+
])], 8, nl)
|
|
1277
|
+
])
|
|
1278
|
+
])
|
|
1279
|
+
])
|
|
1280
|
+
], 10, Xt));
|
|
1281
|
+
}
|
|
1282
|
+
}), ea = /* @__PURE__ */ Q(sl, [["__scopeId", "data-v-5371c9ef"]]), ul = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], dl = {
|
|
1143
1283
|
key: 0,
|
|
1144
1284
|
class: "wx-radio__label"
|
|
1145
|
-
},
|
|
1285
|
+
}, rl = /* @__PURE__ */ J({
|
|
1146
1286
|
name: "WxRadio",
|
|
1147
1287
|
inheritAttrs: !1,
|
|
1148
1288
|
__name: "Radio",
|
|
1149
|
-
props: /* @__PURE__ */
|
|
1289
|
+
props: /* @__PURE__ */ R({
|
|
1150
1290
|
value: { type: [String, Number, Boolean, null] },
|
|
1151
1291
|
label: { default: void 0 },
|
|
1152
1292
|
disabled: { type: Boolean, default: void 0 },
|
|
@@ -1158,50 +1298,50 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1158
1298
|
modelValue: { type: [String, Number, Boolean, null], default: null },
|
|
1159
1299
|
modelModifiers: {}
|
|
1160
1300
|
}),
|
|
1161
|
-
emits: /* @__PURE__ */
|
|
1162
|
-
setup(e, { emit:
|
|
1163
|
-
const a = e,
|
|
1164
|
-
() =>
|
|
1165
|
-
),
|
|
1301
|
+
emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
|
|
1302
|
+
setup(e, { emit: _ }) {
|
|
1303
|
+
const a = e, n = _, s = G(e, "modelValue"), t = ce(Ze, null), o = le(a), c = d(
|
|
1304
|
+
() => t ? t.modelValue.value === a.value : s.value === a.value
|
|
1305
|
+
), p = d(() => a.disabled || t?.disabled.value || o.disabled.value), h = d(() => a.size ?? t?.size.value ?? o.size.value), f = d(() => [
|
|
1166
1306
|
"wx-radio",
|
|
1167
|
-
`wx-radio--${
|
|
1168
|
-
{ "is-checked":
|
|
1307
|
+
`wx-radio--${h.value}`,
|
|
1308
|
+
{ "is-checked": c.value, "is-disabled": p.value }
|
|
1169
1309
|
]);
|
|
1170
|
-
function
|
|
1171
|
-
|
|
1310
|
+
function m() {
|
|
1311
|
+
t ? t.toggle(a.value, !0) : s.value = a.value, n("change", a.value);
|
|
1172
1312
|
}
|
|
1173
|
-
return (
|
|
1174
|
-
class:
|
|
1313
|
+
return (g, y) => (l(), u("label", {
|
|
1314
|
+
class: F(f.value)
|
|
1175
1315
|
}, [
|
|
1176
|
-
|
|
1177
|
-
id:
|
|
1178
|
-
},
|
|
1316
|
+
x("input", te({
|
|
1317
|
+
id: b(o).id.value
|
|
1318
|
+
}, g.$attrs, {
|
|
1179
1319
|
class: "wx-radio__native",
|
|
1180
1320
|
type: "radio",
|
|
1181
|
-
name: e.name ??
|
|
1182
|
-
checked:
|
|
1183
|
-
disabled:
|
|
1321
|
+
name: e.name ?? b(t)?.name.value,
|
|
1322
|
+
checked: c.value,
|
|
1323
|
+
disabled: p.value,
|
|
1184
1324
|
"aria-label": e.ariaLabel,
|
|
1185
|
-
"aria-describedby":
|
|
1186
|
-
onChange:
|
|
1187
|
-
}), null, 16,
|
|
1188
|
-
|
|
1325
|
+
"aria-describedby": b(o).describedBy.value,
|
|
1326
|
+
onChange: m
|
|
1327
|
+
}), null, 16, ul),
|
|
1328
|
+
y[0] || (y[0] = x("span", {
|
|
1189
1329
|
class: "wx-radio__box",
|
|
1190
1330
|
"aria-hidden": "true"
|
|
1191
1331
|
}, [
|
|
1192
|
-
|
|
1332
|
+
x("span", { class: "wx-radio__dot" })
|
|
1193
1333
|
], -1)),
|
|
1194
|
-
e.label ||
|
|
1195
|
-
|
|
1196
|
-
|
|
1334
|
+
e.label || g.$slots.default ? (l(), u("span", dl, [
|
|
1335
|
+
N(g.$slots, "default", {}, () => [
|
|
1336
|
+
ae(D(e.label), 1)
|
|
1197
1337
|
], !0)
|
|
1198
|
-
])) :
|
|
1338
|
+
])) : C("", !0)
|
|
1199
1339
|
], 2));
|
|
1200
1340
|
}
|
|
1201
|
-
}),
|
|
1341
|
+
}), aa = /* @__PURE__ */ Q(rl, [["__scopeId", "data-v-a22bec4a"]]), cl = ["aria-labelledby", "aria-describedby"], vl = /* @__PURE__ */ J({
|
|
1202
1342
|
name: "WxRadioGroup",
|
|
1203
1343
|
__name: "RadioGroup",
|
|
1204
|
-
props: /* @__PURE__ */
|
|
1344
|
+
props: /* @__PURE__ */ R({
|
|
1205
1345
|
options: { default: void 0 },
|
|
1206
1346
|
disabled: { type: Boolean, default: void 0 },
|
|
1207
1347
|
size: { default: void 0 },
|
|
@@ -1211,44 +1351,44 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1211
1351
|
modelValue: { type: [String, Number, Boolean, null], default: null },
|
|
1212
1352
|
modelModifiers: {}
|
|
1213
1353
|
}),
|
|
1214
|
-
emits: /* @__PURE__ */
|
|
1215
|
-
setup(e, { emit:
|
|
1216
|
-
const a = e,
|
|
1217
|
-
|
|
1218
|
-
const
|
|
1219
|
-
function
|
|
1220
|
-
|
|
1221
|
-
}
|
|
1222
|
-
return
|
|
1223
|
-
name:
|
|
1224
|
-
modelValue:
|
|
1225
|
-
disabled:
|
|
1226
|
-
size:
|
|
1227
|
-
toggle:
|
|
1228
|
-
}), (
|
|
1229
|
-
class:
|
|
1354
|
+
emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
|
|
1355
|
+
setup(e, { emit: _ }) {
|
|
1356
|
+
const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = Te("wx-radio-group");
|
|
1357
|
+
t.item?.registerLabelTarget(void 0);
|
|
1358
|
+
const c = d(() => a.disabled ?? t.disabled.value), p = d(() => a.size ?? t.size.value), h = d(() => a.name ?? o);
|
|
1359
|
+
function f(m) {
|
|
1360
|
+
s.value !== m && (s.value = m, n("change", m));
|
|
1361
|
+
}
|
|
1362
|
+
return xe(Ze, {
|
|
1363
|
+
name: h,
|
|
1364
|
+
modelValue: d(() => s.value),
|
|
1365
|
+
disabled: c,
|
|
1366
|
+
size: p,
|
|
1367
|
+
toggle: f
|
|
1368
|
+
}), (m, g) => (l(), u("div", {
|
|
1369
|
+
class: F(["wx-radio-group", { "wx-radio-group--inline": e.inline }]),
|
|
1230
1370
|
role: "radiogroup",
|
|
1231
|
-
"aria-labelledby":
|
|
1232
|
-
"aria-describedby":
|
|
1371
|
+
"aria-labelledby": b(t).item ? `${b(t).item.id.value}-label` : void 0,
|
|
1372
|
+
"aria-describedby": b(t).describedBy.value
|
|
1233
1373
|
}, [
|
|
1234
|
-
|
|
1235
|
-
(
|
|
1236
|
-
key: String(
|
|
1237
|
-
value:
|
|
1238
|
-
label:
|
|
1239
|
-
disabled:
|
|
1374
|
+
N(m.$slots, "default", {}, () => [
|
|
1375
|
+
(l(!0), u(K, null, X(e.options, (y) => (l(), ie(aa, {
|
|
1376
|
+
key: String(y.value),
|
|
1377
|
+
value: y.value,
|
|
1378
|
+
label: y.label,
|
|
1379
|
+
disabled: y.disabled
|
|
1240
1380
|
}, null, 8, ["value", "label", "disabled"]))), 128))
|
|
1241
1381
|
], !0)
|
|
1242
|
-
], 10,
|
|
1382
|
+
], 10, cl));
|
|
1243
1383
|
}
|
|
1244
|
-
}),
|
|
1384
|
+
}), fl = /* @__PURE__ */ Q(vl, [["__scopeId", "data-v-dcd2686e"]]), bl = ["id", "tabindex", "aria-label", "aria-describedby", "aria-valuemax", "aria-valuenow", "aria-readonly", "aria-disabled"], ml = ["onClick", "onMousemove"], pl = {
|
|
1245
1385
|
key: 0,
|
|
1246
1386
|
class: "wx-rate__value"
|
|
1247
|
-
},
|
|
1387
|
+
}, hl = ["name", "value"], yl = /* @__PURE__ */ J({
|
|
1248
1388
|
name: "WxRate",
|
|
1249
1389
|
inheritAttrs: !1,
|
|
1250
1390
|
__name: "Rate",
|
|
1251
|
-
props: /* @__PURE__ */
|
|
1391
|
+
props: /* @__PURE__ */ R({
|
|
1252
1392
|
max: { default: 5 },
|
|
1253
1393
|
allowHalf: { type: Boolean, default: !1 },
|
|
1254
1394
|
clearable: { type: Boolean, default: !0 },
|
|
@@ -1263,65 +1403,65 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1263
1403
|
modelValue: { default: 0 },
|
|
1264
1404
|
modelModifiers: {}
|
|
1265
1405
|
}),
|
|
1266
|
-
emits: /* @__PURE__ */
|
|
1267
|
-
setup(e, { emit:
|
|
1268
|
-
const a = e,
|
|
1269
|
-
() => Array.from({ length: a.max }, (
|
|
1270
|
-
const
|
|
1271
|
-
return { position:
|
|
1406
|
+
emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
|
|
1407
|
+
setup(e, { emit: _ }) {
|
|
1408
|
+
const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = q(null), c = d(() => !t.disabled.value && !a.readonly), p = d(() => o.value ?? s.value ?? 0), h = d(
|
|
1409
|
+
() => Array.from({ length: a.max }, (B, $) => {
|
|
1410
|
+
const r = $ + 1, S = Math.min(Math.max(p.value - $, 0), 1);
|
|
1411
|
+
return { position: r, full: S >= 1, half: S > 0 && S < 1 };
|
|
1272
1412
|
})
|
|
1273
|
-
),
|
|
1413
|
+
), f = d(() => [
|
|
1274
1414
|
"wx-rate",
|
|
1275
|
-
`wx-rate--${
|
|
1276
|
-
{ "is-disabled":
|
|
1415
|
+
`wx-rate--${t.size.value}`,
|
|
1416
|
+
{ "is-disabled": t.disabled.value, "is-readonly": a.readonly }
|
|
1277
1417
|
]);
|
|
1278
|
-
function
|
|
1279
|
-
if (!a.allowHalf) return
|
|
1280
|
-
const
|
|
1281
|
-
return
|
|
1282
|
-
}
|
|
1283
|
-
function
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1286
|
-
}
|
|
1287
|
-
function
|
|
1288
|
-
|
|
1289
|
-
}
|
|
1290
|
-
function
|
|
1291
|
-
|
|
1292
|
-
}
|
|
1293
|
-
function
|
|
1294
|
-
if (!
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1297
|
-
}
|
|
1298
|
-
return (
|
|
1299
|
-
id:
|
|
1300
|
-
},
|
|
1301
|
-
class:
|
|
1418
|
+
function m(B, $) {
|
|
1419
|
+
if (!a.allowHalf) return B;
|
|
1420
|
+
const r = $.currentTarget, { left: S, width: z } = r.getBoundingClientRect();
|
|
1421
|
+
return $.clientX - S < z / 2 ? B - 0.5 : B;
|
|
1422
|
+
}
|
|
1423
|
+
function g(B, $ = !1) {
|
|
1424
|
+
const r = $ && a.clearable && s.value === B ? 0 : B;
|
|
1425
|
+
r !== s.value && (s.value = r, n("change", r));
|
|
1426
|
+
}
|
|
1427
|
+
function y(B, $) {
|
|
1428
|
+
c.value && g(m(B, $), !0);
|
|
1429
|
+
}
|
|
1430
|
+
function P(B, $) {
|
|
1431
|
+
c.value && (o.value = m(B, $));
|
|
1432
|
+
}
|
|
1433
|
+
function V(B) {
|
|
1434
|
+
if (!c.value) return;
|
|
1435
|
+
const $ = a.allowHalf ? 0.5 : 1, r = s.value ?? 0;
|
|
1436
|
+
B.key === "ArrowRight" || B.key === "ArrowUp" ? (B.preventDefault(), g(Math.min(r + $, a.max))) : B.key === "ArrowLeft" || B.key === "ArrowDown" ? (B.preventDefault(), g(Math.max(r - $, 0))) : B.key === "Home" ? (B.preventDefault(), g(0)) : B.key === "End" && (B.preventDefault(), g(a.max));
|
|
1437
|
+
}
|
|
1438
|
+
return (B, $) => (l(), u("div", te({
|
|
1439
|
+
id: b(t).id.value
|
|
1440
|
+
}, B.$attrs, {
|
|
1441
|
+
class: f.value,
|
|
1302
1442
|
role: "slider",
|
|
1303
|
-
tabindex:
|
|
1443
|
+
tabindex: c.value ? 0 : -1,
|
|
1304
1444
|
"aria-label": e.ariaLabel,
|
|
1305
|
-
"aria-describedby":
|
|
1445
|
+
"aria-describedby": b(t).describedBy.value,
|
|
1306
1446
|
"aria-valuemin": 0,
|
|
1307
1447
|
"aria-valuemax": e.max,
|
|
1308
|
-
"aria-valuenow":
|
|
1448
|
+
"aria-valuenow": s.value ?? 0,
|
|
1309
1449
|
"aria-readonly": e.readonly || void 0,
|
|
1310
|
-
"aria-disabled":
|
|
1311
|
-
onKeydown:
|
|
1312
|
-
onMouseleave:
|
|
1450
|
+
"aria-disabled": b(t).disabled.value || void 0,
|
|
1451
|
+
onKeydown: V,
|
|
1452
|
+
onMouseleave: $[0] || ($[0] = (r) => o.value = null)
|
|
1313
1453
|
}), [
|
|
1314
|
-
(
|
|
1315
|
-
key:
|
|
1316
|
-
class:
|
|
1317
|
-
onClick: (
|
|
1318
|
-
onMousemove: (
|
|
1319
|
-
}, [
|
|
1320
|
-
|
|
1454
|
+
(l(!0), u(K, null, X(h.value, (r) => (l(), u("span", {
|
|
1455
|
+
key: r.position,
|
|
1456
|
+
class: F(["wx-rate__star", { "is-full": r.full, "is-half": r.half }]),
|
|
1457
|
+
onClick: (S) => y(r.position, S),
|
|
1458
|
+
onMousemove: (S) => P(r.position, S)
|
|
1459
|
+
}, [...$[1] || ($[1] = [
|
|
1460
|
+
x("svg", {
|
|
1321
1461
|
viewBox: "0 0 24 24",
|
|
1322
1462
|
"aria-hidden": "true"
|
|
1323
1463
|
}, [
|
|
1324
|
-
|
|
1464
|
+
x("path", {
|
|
1325
1465
|
class: "wx-rate__outline",
|
|
1326
1466
|
d: "M12 3.5l2.6 5.3 5.9.9-4.2 4.1 1 5.8-5.3-2.8-5.3 2.8 1-5.8-4.2-4.1 5.9-.9z",
|
|
1327
1467
|
fill: "none",
|
|
@@ -1329,23 +1469,23 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1329
1469
|
"stroke-width": "1.5",
|
|
1330
1470
|
"stroke-linejoin": "round"
|
|
1331
1471
|
}),
|
|
1332
|
-
|
|
1472
|
+
x("path", {
|
|
1333
1473
|
class: "wx-rate__fill",
|
|
1334
1474
|
d: "M12 3.5l2.6 5.3 5.9.9-4.2 4.1 1 5.8-5.3-2.8-5.3 2.8 1-5.8-4.2-4.1 5.9-.9z",
|
|
1335
1475
|
fill: "currentColor"
|
|
1336
1476
|
})
|
|
1337
1477
|
], -1)
|
|
1338
|
-
])], 42,
|
|
1339
|
-
e.showValue ? (
|
|
1340
|
-
e.name ? (
|
|
1478
|
+
])], 42, ml))), 128)),
|
|
1479
|
+
e.showValue ? (l(), u("span", pl, D(s.value ?? 0), 1)) : C("", !0),
|
|
1480
|
+
e.name ? (l(), u("input", {
|
|
1341
1481
|
key: 1,
|
|
1342
1482
|
type: "hidden",
|
|
1343
1483
|
name: e.name,
|
|
1344
|
-
value:
|
|
1345
|
-
}, null, 8,
|
|
1484
|
+
value: s.value ?? 0
|
|
1485
|
+
}, null, 8, hl)) : C("", !0)
|
|
1346
1486
|
], 16, bl));
|
|
1347
1487
|
}
|
|
1348
|
-
}),
|
|
1488
|
+
}), xl = /* @__PURE__ */ Q(yl, [["__scopeId", "data-v-7cbc0034"]]), gl = {
|
|
1349
1489
|
bold: "M7 5h6a3.5 3.5 0 0 1 0 7H7zm0 7h7a3.5 3.5 0 0 1 0 7H7z",
|
|
1350
1490
|
italic: "M15 5h-5M14 19H9M13.5 5 10.5 19",
|
|
1351
1491
|
strike: "M5 12h14M8 8.5A3 3 0 0 1 11 6h2a3 3 0 0 1 3 2.5M16 15.5A3 3 0 0 1 13 18h-2a3 3 0 0 1-3-2.5",
|
|
@@ -1370,15 +1510,15 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1370
1510
|
mergeCells: "M4 6h16v12H4zM12 6v3M12 15v3M9 12h6M9 12l2-2M9 12l2 2",
|
|
1371
1511
|
check: "m5 13 4 4L19 7",
|
|
1372
1512
|
close: "M6 6l12 12M18 6 6 18"
|
|
1373
|
-
},
|
|
1513
|
+
}, kl = ["title", "aria-label", "aria-pressed", "disabled"], wl = {
|
|
1374
1514
|
key: 0,
|
|
1375
1515
|
viewBox: "0 0 24 24",
|
|
1376
1516
|
fill: "none",
|
|
1377
1517
|
"aria-hidden": "true"
|
|
1378
|
-
},
|
|
1518
|
+
}, $l = ["d"], _l = {
|
|
1379
1519
|
key: 1,
|
|
1380
1520
|
class: "wx-rich-text__tool-text"
|
|
1381
|
-
},
|
|
1521
|
+
}, Bl = /* @__PURE__ */ J({
|
|
1382
1522
|
name: "WxRichTextToolbarButton",
|
|
1383
1523
|
__name: "ToolbarButton",
|
|
1384
1524
|
props: {
|
|
@@ -1390,27 +1530,27 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1390
1530
|
},
|
|
1391
1531
|
emits: ["click"],
|
|
1392
1532
|
setup(e) {
|
|
1393
|
-
return (
|
|
1533
|
+
return (_, a) => (l(), u("button", {
|
|
1394
1534
|
type: "button",
|
|
1395
|
-
class:
|
|
1535
|
+
class: F(["wx-rich-text__tool", { "is-active": e.active }]),
|
|
1396
1536
|
title: e.label,
|
|
1397
1537
|
"aria-label": e.label,
|
|
1398
1538
|
"aria-pressed": e.active,
|
|
1399
1539
|
disabled: e.disabled,
|
|
1400
|
-
onClick: a[0] || (a[0] = (
|
|
1540
|
+
onClick: a[0] || (a[0] = (n) => _.$emit("click"))
|
|
1401
1541
|
}, [
|
|
1402
|
-
e.icon ? (
|
|
1403
|
-
|
|
1404
|
-
d:
|
|
1542
|
+
e.icon ? (l(), u("svg", wl, [
|
|
1543
|
+
x("path", {
|
|
1544
|
+
d: b(gl)[e.icon],
|
|
1405
1545
|
stroke: "currentColor",
|
|
1406
1546
|
"stroke-width": "1.7",
|
|
1407
1547
|
"stroke-linecap": "round",
|
|
1408
1548
|
"stroke-linejoin": "round"
|
|
1409
|
-
}, null, 8,
|
|
1410
|
-
])) : (
|
|
1411
|
-
], 10,
|
|
1549
|
+
}, null, 8, $l)
|
|
1550
|
+
])) : (l(), u("span", _l, D(e.text), 1))
|
|
1551
|
+
], 10, kl));
|
|
1412
1552
|
}
|
|
1413
|
-
}),
|
|
1553
|
+
}), pe = /* @__PURE__ */ Q(Bl, [["__scopeId", "data-v-c8c7e143"]]), Ml = [
|
|
1414
1554
|
"bold",
|
|
1415
1555
|
"italic",
|
|
1416
1556
|
"strike",
|
|
@@ -1432,13 +1572,13 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1432
1572
|
"divider",
|
|
1433
1573
|
"undo",
|
|
1434
1574
|
"redo"
|
|
1435
|
-
],
|
|
1575
|
+
], Cl = [
|
|
1436
1576
|
"image/png",
|
|
1437
1577
|
"image/jpeg",
|
|
1438
1578
|
"image/gif",
|
|
1439
1579
|
"image/webp",
|
|
1440
1580
|
"image/svg+xml"
|
|
1441
|
-
],
|
|
1581
|
+
], Me = {
|
|
1442
1582
|
bold: { label: "Bold", icon: "bold" },
|
|
1443
1583
|
italic: { label: "Italic", icon: "italic" },
|
|
1444
1584
|
strike: { label: "Strikethrough", icon: "strike" },
|
|
@@ -1456,7 +1596,7 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1456
1596
|
youtube: { label: "YouTube video", icon: "youtube" },
|
|
1457
1597
|
undo: { label: "Undo", icon: "undo" },
|
|
1458
1598
|
redo: { label: "Redo", icon: "redo" }
|
|
1459
|
-
},
|
|
1599
|
+
}, Sl = [
|
|
1460
1600
|
{ key: "addRowAfter", label: "Row below", icon: "rowAfter" },
|
|
1461
1601
|
{ key: "addRowBefore", label: "Row above", icon: "rowBefore" },
|
|
1462
1602
|
{ key: "addColumnAfter", label: "Column after", icon: "columnAfter" },
|
|
@@ -1465,24 +1605,24 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1465
1605
|
{ key: "deleteColumn", label: "Delete column", icon: "deleteColumn" },
|
|
1466
1606
|
{ key: "mergeOrSplit", label: "Merge or split cells", icon: "mergeCells" },
|
|
1467
1607
|
{ key: "deleteTable", label: "Delete table", icon: "deleteTable" }
|
|
1468
|
-
], Tl = ["aria-label"],
|
|
1608
|
+
], Tl = ["aria-label"], Il = {
|
|
1469
1609
|
key: 0,
|
|
1470
1610
|
class: "wx-rich-text__divider",
|
|
1471
1611
|
"aria-hidden": "true"
|
|
1472
|
-
},
|
|
1612
|
+
}, Vl = {
|
|
1473
1613
|
key: 0,
|
|
1474
1614
|
class: "wx-rich-text__uploading"
|
|
1475
|
-
},
|
|
1615
|
+
}, zl = {
|
|
1476
1616
|
key: 0,
|
|
1477
1617
|
class: "wx-rich-text__toolbar wx-rich-text__toolbar--table"
|
|
1478
|
-
},
|
|
1618
|
+
}, Pl = ["for"], Wl = ["id", "placeholder"], Al = {
|
|
1479
1619
|
key: 0,
|
|
1480
1620
|
class: "wx-rich-text__placeholder"
|
|
1481
|
-
},
|
|
1621
|
+
}, Ll = ["accept"], Rl = /* @__PURE__ */ J({
|
|
1482
1622
|
name: "WxRichText",
|
|
1483
1623
|
inheritAttrs: !1,
|
|
1484
1624
|
__name: "RichText",
|
|
1485
|
-
props: /* @__PURE__ */
|
|
1625
|
+
props: /* @__PURE__ */ R({
|
|
1486
1626
|
placeholder: { default: void 0 },
|
|
1487
1627
|
disabled: { type: Boolean, default: void 0 },
|
|
1488
1628
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -1491,292 +1631,292 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1491
1631
|
id: { default: void 0 },
|
|
1492
1632
|
ariaLabel: { default: void 0 },
|
|
1493
1633
|
minHeight: { default: "220px" },
|
|
1494
|
-
tools: { default: () =>
|
|
1634
|
+
tools: { default: () => Ml },
|
|
1495
1635
|
upload: { type: Function, default: void 0 },
|
|
1496
1636
|
pickImage: { type: Function, default: void 0 },
|
|
1497
|
-
accept: { default: () =>
|
|
1637
|
+
accept: { default: () => Cl }
|
|
1498
1638
|
}, {
|
|
1499
1639
|
modelValue: { default: "" },
|
|
1500
1640
|
modelModifiers: {}
|
|
1501
1641
|
}),
|
|
1502
|
-
emits: /* @__PURE__ */
|
|
1503
|
-
setup(e, { expose:
|
|
1504
|
-
const
|
|
1505
|
-
function
|
|
1506
|
-
const
|
|
1507
|
-
return !
|
|
1508
|
-
}
|
|
1509
|
-
const
|
|
1510
|
-
content:
|
|
1511
|
-
editable:
|
|
1642
|
+
emits: /* @__PURE__ */ R(["change", "focus", "blur", "uploadError"], ["update:modelValue"]),
|
|
1643
|
+
setup(e, { expose: _, emit: a }) {
|
|
1644
|
+
const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(!1), p = q(0), h = q(null), f = q(null), m = d(() => !o.disabled.value && !n.readonly);
|
|
1645
|
+
function g() {
|
|
1646
|
+
const T = y.value;
|
|
1647
|
+
return !T || T.isEmpty ? "" : T.getHTML();
|
|
1648
|
+
}
|
|
1649
|
+
const y = Ka({
|
|
1650
|
+
content: t.value ?? "",
|
|
1651
|
+
editable: m.value,
|
|
1512
1652
|
extensions: [
|
|
1513
|
-
|
|
1653
|
+
qa.configure({
|
|
1514
1654
|
link: {
|
|
1515
1655
|
openOnClick: !1,
|
|
1516
1656
|
autolink: !0,
|
|
1517
1657
|
HTMLAttributes: { rel: "noopener noreferrer nofollow", target: "_blank" }
|
|
1518
1658
|
}
|
|
1519
1659
|
}),
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
allowedMimeTypes:
|
|
1525
|
-
onDrop: (
|
|
1526
|
-
|
|
1660
|
+
Ya.configure({ table: { resizable: !0 } }),
|
|
1661
|
+
Xa.configure({ HTMLAttributes: { class: "wx-rich-text__image" } }),
|
|
1662
|
+
Ja.configure({ nocookie: !0, width: 640, height: 360 }),
|
|
1663
|
+
Za.configure({
|
|
1664
|
+
allowedMimeTypes: n.accept,
|
|
1665
|
+
onDrop: (T, A, I) => {
|
|
1666
|
+
r(A, I);
|
|
1527
1667
|
},
|
|
1528
|
-
onPaste: (
|
|
1529
|
-
|
|
1668
|
+
onPaste: (T, A) => {
|
|
1669
|
+
r(A);
|
|
1530
1670
|
}
|
|
1531
1671
|
})
|
|
1532
1672
|
],
|
|
1533
1673
|
onUpdate: () => {
|
|
1534
|
-
const
|
|
1535
|
-
|
|
1674
|
+
const T = g();
|
|
1675
|
+
t.value = T, s("change", T);
|
|
1536
1676
|
},
|
|
1537
1677
|
onFocus: () => {
|
|
1538
|
-
|
|
1678
|
+
c.value = !0, s("focus");
|
|
1539
1679
|
},
|
|
1540
1680
|
onBlur: () => {
|
|
1541
|
-
|
|
1681
|
+
c.value = !1, s("blur");
|
|
1542
1682
|
}
|
|
1543
1683
|
});
|
|
1544
|
-
|
|
1545
|
-
const
|
|
1546
|
-
|
|
1547
|
-
}),
|
|
1548
|
-
const
|
|
1684
|
+
ne(t, (T) => {
|
|
1685
|
+
const A = y.value;
|
|
1686
|
+
A && (T ?? "") !== g() && A.commands.setContent(T ?? "", { emitUpdate: !1 });
|
|
1687
|
+
}), ne(m, (T) => y.value?.setEditable(T));
|
|
1688
|
+
const P = d(() => y.value?.isEmpty ?? !0), V = d(() => y.value?.isActive("table") ?? !1), B = d(() => [
|
|
1549
1689
|
"wx-rich-text",
|
|
1550
1690
|
`wx-rich-text--${o.size.value}`,
|
|
1551
1691
|
{
|
|
1552
1692
|
[`wx-rich-text--${o.status.value}`]: o.status.value !== "default",
|
|
1553
|
-
"is-focused":
|
|
1693
|
+
"is-focused": c.value,
|
|
1554
1694
|
"is-disabled": o.disabled.value,
|
|
1555
|
-
"is-readonly":
|
|
1695
|
+
"is-readonly": n.readonly
|
|
1556
1696
|
}
|
|
1557
1697
|
]);
|
|
1558
|
-
function
|
|
1559
|
-
const
|
|
1560
|
-
if (!
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1563
|
-
}
|
|
1564
|
-
async function
|
|
1565
|
-
if (
|
|
1566
|
-
for (const
|
|
1567
|
-
|
|
1698
|
+
function $(T, A, I) {
|
|
1699
|
+
const oe = y.value;
|
|
1700
|
+
if (!oe) return;
|
|
1701
|
+
const ue = I ?? oe.state.selection.anchor;
|
|
1702
|
+
oe.chain().focus().insertContentAt(ue, { type: "image", attrs: { src: T, alt: A } }).run();
|
|
1703
|
+
}
|
|
1704
|
+
async function r(T, A) {
|
|
1705
|
+
if (n.upload)
|
|
1706
|
+
for (const I of T) {
|
|
1707
|
+
p.value += 1;
|
|
1568
1708
|
try {
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
} catch (
|
|
1572
|
-
|
|
1709
|
+
const oe = await n.upload(I);
|
|
1710
|
+
$(oe.url, oe.alt, A);
|
|
1711
|
+
} catch (oe) {
|
|
1712
|
+
s("uploadError", oe, I);
|
|
1573
1713
|
} finally {
|
|
1574
|
-
|
|
1714
|
+
p.value -= 1;
|
|
1575
1715
|
}
|
|
1576
1716
|
}
|
|
1577
1717
|
}
|
|
1578
|
-
async function
|
|
1579
|
-
if (
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1718
|
+
async function S() {
|
|
1719
|
+
if (n.pickImage) {
|
|
1720
|
+
const T = await n.pickImage();
|
|
1721
|
+
T && $(T);
|
|
1582
1722
|
return;
|
|
1583
1723
|
}
|
|
1584
|
-
|
|
1585
|
-
}
|
|
1586
|
-
function
|
|
1587
|
-
const
|
|
1588
|
-
|
|
1589
|
-
}
|
|
1590
|
-
function
|
|
1591
|
-
const
|
|
1592
|
-
|
|
1593
|
-
}
|
|
1594
|
-
function
|
|
1595
|
-
const
|
|
1596
|
-
if (!
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1599
|
-
}
|
|
1600
|
-
function
|
|
1601
|
-
return
|
|
1602
|
-
}
|
|
1603
|
-
const
|
|
1604
|
-
function
|
|
1605
|
-
const
|
|
1606
|
-
if (!
|
|
1607
|
-
switch (
|
|
1724
|
+
h.value?.click();
|
|
1725
|
+
}
|
|
1726
|
+
function z(T) {
|
|
1727
|
+
const A = T.target, I = Array.from(A.files ?? []);
|
|
1728
|
+
A.value = "", r(I);
|
|
1729
|
+
}
|
|
1730
|
+
function H(T) {
|
|
1731
|
+
const A = T === "link" ? y.value?.getAttributes("link").href ?? "" : "";
|
|
1732
|
+
f.value = { kind: T, value: String(A) };
|
|
1733
|
+
}
|
|
1734
|
+
function M() {
|
|
1735
|
+
const T = y.value, A = f.value;
|
|
1736
|
+
if (!T || !A) return;
|
|
1737
|
+
const I = A.value.trim();
|
|
1738
|
+
A.kind === "link" ? I ? T.chain().focus().extendMarkRange("link").setLink({ href: I }).run() : T.chain().focus().extendMarkRange("link").unsetLink().run() : I && T.commands.setYoutubeVideo({ src: I }), f.value = null;
|
|
1739
|
+
}
|
|
1740
|
+
function w(T) {
|
|
1741
|
+
return T === "image" ? !!(n.upload || n.pickImage) : !0;
|
|
1742
|
+
}
|
|
1743
|
+
const E = d(() => n.tools.filter(w));
|
|
1744
|
+
function Z(T) {
|
|
1745
|
+
const A = y.value;
|
|
1746
|
+
if (!A) return !1;
|
|
1747
|
+
switch (T) {
|
|
1608
1748
|
case "h2":
|
|
1609
|
-
return
|
|
1749
|
+
return A.isActive("heading", { level: 2 });
|
|
1610
1750
|
case "h3":
|
|
1611
|
-
return
|
|
1751
|
+
return A.isActive("heading", { level: 3 });
|
|
1612
1752
|
case "h4":
|
|
1613
|
-
return
|
|
1753
|
+
return A.isActive("heading", { level: 4 });
|
|
1614
1754
|
default:
|
|
1615
|
-
return
|
|
1755
|
+
return A.isActive(T);
|
|
1616
1756
|
}
|
|
1617
1757
|
}
|
|
1618
|
-
function
|
|
1619
|
-
const
|
|
1620
|
-
if (!
|
|
1621
|
-
const
|
|
1622
|
-
switch (
|
|
1758
|
+
function W(T) {
|
|
1759
|
+
const A = y.value;
|
|
1760
|
+
if (!A) return;
|
|
1761
|
+
const I = A.chain().focus();
|
|
1762
|
+
switch (T) {
|
|
1623
1763
|
case "bold":
|
|
1624
|
-
|
|
1764
|
+
I.toggleBold().run();
|
|
1625
1765
|
break;
|
|
1626
1766
|
case "italic":
|
|
1627
|
-
|
|
1767
|
+
I.toggleItalic().run();
|
|
1628
1768
|
break;
|
|
1629
1769
|
case "strike":
|
|
1630
|
-
|
|
1770
|
+
I.toggleStrike().run();
|
|
1631
1771
|
break;
|
|
1632
1772
|
case "code":
|
|
1633
|
-
|
|
1773
|
+
I.toggleCode().run();
|
|
1634
1774
|
break;
|
|
1635
1775
|
case "h2":
|
|
1636
|
-
|
|
1776
|
+
I.toggleHeading({ level: 2 }).run();
|
|
1637
1777
|
break;
|
|
1638
1778
|
case "h3":
|
|
1639
|
-
|
|
1779
|
+
I.toggleHeading({ level: 3 }).run();
|
|
1640
1780
|
break;
|
|
1641
1781
|
case "h4":
|
|
1642
|
-
|
|
1782
|
+
I.toggleHeading({ level: 4 }).run();
|
|
1643
1783
|
break;
|
|
1644
1784
|
case "bulletList":
|
|
1645
|
-
|
|
1785
|
+
I.toggleBulletList().run();
|
|
1646
1786
|
break;
|
|
1647
1787
|
case "orderedList":
|
|
1648
|
-
|
|
1788
|
+
I.toggleOrderedList().run();
|
|
1649
1789
|
break;
|
|
1650
1790
|
case "blockquote":
|
|
1651
|
-
|
|
1791
|
+
I.toggleBlockquote().run();
|
|
1652
1792
|
break;
|
|
1653
1793
|
case "hr":
|
|
1654
|
-
|
|
1794
|
+
I.setHorizontalRule().run();
|
|
1655
1795
|
break;
|
|
1656
1796
|
case "undo":
|
|
1657
|
-
|
|
1797
|
+
I.undo().run();
|
|
1658
1798
|
break;
|
|
1659
1799
|
case "redo":
|
|
1660
|
-
|
|
1800
|
+
I.redo().run();
|
|
1661
1801
|
break;
|
|
1662
1802
|
case "table":
|
|
1663
|
-
|
|
1803
|
+
I.insertTable({ rows: 3, cols: 3, withHeaderRow: !0 }).run();
|
|
1664
1804
|
break;
|
|
1665
1805
|
case "link":
|
|
1666
|
-
|
|
1806
|
+
H("link");
|
|
1667
1807
|
break;
|
|
1668
1808
|
case "youtube":
|
|
1669
|
-
|
|
1809
|
+
H("youtube");
|
|
1670
1810
|
break;
|
|
1671
1811
|
case "image":
|
|
1672
|
-
|
|
1812
|
+
S();
|
|
1673
1813
|
break;
|
|
1674
1814
|
}
|
|
1675
1815
|
}
|
|
1676
|
-
function
|
|
1677
|
-
const
|
|
1678
|
-
if (!
|
|
1679
|
-
|
|
1680
|
-
}
|
|
1681
|
-
return
|
|
1682
|
-
editor:
|
|
1683
|
-
focus: () =>
|
|
1684
|
-
clear: () =>
|
|
1685
|
-
}), (
|
|
1686
|
-
class:
|
|
1816
|
+
function U(T) {
|
|
1817
|
+
const A = y.value;
|
|
1818
|
+
if (!A) return;
|
|
1819
|
+
A.chain().focus()[T]().run();
|
|
1820
|
+
}
|
|
1821
|
+
return _({
|
|
1822
|
+
editor: y,
|
|
1823
|
+
focus: () => y.value?.commands.focus(),
|
|
1824
|
+
clear: () => y.value?.commands.clearContent(!0)
|
|
1825
|
+
}), (T, A) => (l(), u("div", {
|
|
1826
|
+
class: F(B.value)
|
|
1687
1827
|
}, [
|
|
1688
|
-
|
|
1828
|
+
x("div", {
|
|
1689
1829
|
class: "wx-rich-text__toolbar",
|
|
1690
1830
|
role: "toolbar",
|
|
1691
1831
|
"aria-label": e.ariaLabel ?? "Text formatting"
|
|
1692
1832
|
}, [
|
|
1693
|
-
(
|
|
1694
|
-
key: `${
|
|
1833
|
+
(l(!0), u(K, null, X(E.value, (I, oe) => (l(), u(K, {
|
|
1834
|
+
key: `${I}-${oe}`
|
|
1695
1835
|
}, [
|
|
1696
|
-
|
|
1836
|
+
I === "divider" ? (l(), u("span", Il)) : (l(), ie(pe, {
|
|
1697
1837
|
key: 1,
|
|
1698
|
-
icon:
|
|
1699
|
-
text:
|
|
1700
|
-
label:
|
|
1701
|
-
active:
|
|
1702
|
-
disabled: !
|
|
1703
|
-
onClick: (
|
|
1838
|
+
icon: b(Me)[I].icon,
|
|
1839
|
+
text: b(Me)[I].text,
|
|
1840
|
+
label: b(Me)[I].label,
|
|
1841
|
+
active: Z(I),
|
|
1842
|
+
disabled: !m.value,
|
|
1843
|
+
onClick: (ue) => W(I)
|
|
1704
1844
|
}, null, 8, ["icon", "text", "label", "active", "disabled", "onClick"]))
|
|
1705
1845
|
], 64))), 128)),
|
|
1706
|
-
|
|
1846
|
+
p.value > 0 ? (l(), u("span", Vl, "Uploading…")) : C("", !0)
|
|
1707
1847
|
], 8, Tl),
|
|
1708
|
-
|
|
1709
|
-
(
|
|
1710
|
-
key:
|
|
1711
|
-
icon:
|
|
1712
|
-
label:
|
|
1713
|
-
onClick: (
|
|
1848
|
+
V.value && m.value ? (l(), u("div", zl, [
|
|
1849
|
+
(l(!0), u(K, null, X(b(Sl), (I) => (l(), ie(pe, {
|
|
1850
|
+
key: I.key,
|
|
1851
|
+
icon: I.icon,
|
|
1852
|
+
label: I.label,
|
|
1853
|
+
onClick: (oe) => U(I.key)
|
|
1714
1854
|
}, null, 8, ["icon", "label", "onClick"]))), 128))
|
|
1715
|
-
])) :
|
|
1716
|
-
|
|
1855
|
+
])) : C("", !0),
|
|
1856
|
+
f.value ? (l(), u("form", {
|
|
1717
1857
|
key: 1,
|
|
1718
1858
|
class: "wx-rich-text__prompt",
|
|
1719
|
-
onSubmit:
|
|
1859
|
+
onSubmit: de(M, ["prevent"])
|
|
1720
1860
|
}, [
|
|
1721
|
-
|
|
1861
|
+
x("label", {
|
|
1722
1862
|
class: "wx-rich-text__prompt-label",
|
|
1723
|
-
for: `${
|
|
1724
|
-
},
|
|
1725
|
-
|
|
1726
|
-
id: `${
|
|
1727
|
-
"onUpdate:modelValue":
|
|
1863
|
+
for: `${b(o).id.value}-prompt`
|
|
1864
|
+
}, D(f.value.kind === "link" ? "Link address" : "YouTube URL"), 9, Pl),
|
|
1865
|
+
ma(x("input", {
|
|
1866
|
+
id: `${b(o).id.value}-prompt`,
|
|
1867
|
+
"onUpdate:modelValue": A[0] || (A[0] = (I) => f.value.value = I),
|
|
1728
1868
|
class: "wx-rich-text__prompt-input",
|
|
1729
1869
|
type: "url",
|
|
1730
|
-
placeholder:
|
|
1731
|
-
onKeydown:
|
|
1732
|
-
}, null, 40,
|
|
1733
|
-
[
|
|
1870
|
+
placeholder: f.value.kind === "link" ? "https://example.com" : "https://youtu.be/…",
|
|
1871
|
+
onKeydown: A[1] || (A[1] = pa((I) => f.value = null, ["esc"]))
|
|
1872
|
+
}, null, 40, Wl), [
|
|
1873
|
+
[ha, f.value.value]
|
|
1734
1874
|
]),
|
|
1735
|
-
|
|
1875
|
+
O(pe, {
|
|
1736
1876
|
icon: "check",
|
|
1737
1877
|
label: "Apply",
|
|
1738
|
-
onClick:
|
|
1878
|
+
onClick: M
|
|
1739
1879
|
}),
|
|
1740
|
-
|
|
1880
|
+
O(pe, {
|
|
1741
1881
|
icon: "close",
|
|
1742
1882
|
label: "Cancel",
|
|
1743
|
-
onClick:
|
|
1883
|
+
onClick: A[2] || (A[2] = (I) => f.value = null)
|
|
1744
1884
|
})
|
|
1745
|
-
], 32)) :
|
|
1746
|
-
|
|
1885
|
+
], 32)) : C("", !0),
|
|
1886
|
+
x("div", {
|
|
1747
1887
|
class: "wx-rich-text__body",
|
|
1748
|
-
style:
|
|
1888
|
+
style: ee({ minHeight: e.minHeight })
|
|
1749
1889
|
}, [
|
|
1750
|
-
e.placeholder &&
|
|
1751
|
-
|
|
1752
|
-
editor:
|
|
1890
|
+
e.placeholder && P.value ? (l(), u("span", Al, D(e.placeholder), 1)) : C("", !0),
|
|
1891
|
+
O(b(Ga), {
|
|
1892
|
+
editor: b(y),
|
|
1753
1893
|
class: "wx-rich-text__content",
|
|
1754
|
-
"aria-describedby":
|
|
1894
|
+
"aria-describedby": b(o).describedBy.value
|
|
1755
1895
|
}, null, 8, ["editor", "aria-describedby"])
|
|
1756
1896
|
], 4),
|
|
1757
|
-
e.upload && !e.pickImage ? (
|
|
1897
|
+
e.upload && !e.pickImage ? (l(), u("input", {
|
|
1758
1898
|
key: 2,
|
|
1759
1899
|
ref_key: "fileInput",
|
|
1760
|
-
ref:
|
|
1900
|
+
ref: h,
|
|
1761
1901
|
class: "wx-rich-text__file",
|
|
1762
1902
|
type: "file",
|
|
1763
1903
|
accept: e.accept.join(","),
|
|
1764
1904
|
multiple: "",
|
|
1765
|
-
onChange:
|
|
1766
|
-
}, null, 40,
|
|
1905
|
+
onChange: z
|
|
1906
|
+
}, null, 40, Ll)) : C("", !0)
|
|
1767
1907
|
], 2));
|
|
1768
1908
|
}
|
|
1769
|
-
}), Fl = /* @__PURE__ */
|
|
1909
|
+
}), Fl = /* @__PURE__ */ Q(Rl, [["__scopeId", "data-v-80be39db"]]), Hl = { class: "wx-select__value" }, Dl = ["aria-label", "onClick"], Nl = {
|
|
1770
1910
|
key: 0,
|
|
1771
1911
|
class: "wx-select__single"
|
|
1772
|
-
},
|
|
1912
|
+
}, Ul = {
|
|
1773
1913
|
key: 1,
|
|
1774
1914
|
class: "wx-select__placeholder"
|
|
1775
|
-
},
|
|
1915
|
+
}, El = { class: "wx-select__option-label" }, Ol = /* @__PURE__ */ J({
|
|
1776
1916
|
name: "WxSelect",
|
|
1777
1917
|
inheritAttrs: !1,
|
|
1778
1918
|
__name: "Select",
|
|
1779
|
-
props: /* @__PURE__ */
|
|
1919
|
+
props: /* @__PURE__ */ R({
|
|
1780
1920
|
options: { default: () => [] },
|
|
1781
1921
|
multiple: { type: Boolean, default: !1 },
|
|
1782
1922
|
filterable: { type: Boolean, default: !1 },
|
|
@@ -1794,132 +1934,132 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1794
1934
|
modelValue: { default: null },
|
|
1795
1935
|
modelModifiers: {}
|
|
1796
1936
|
}),
|
|
1797
|
-
emits: /* @__PURE__ */
|
|
1798
|
-
setup(e, { emit:
|
|
1799
|
-
const a = e,
|
|
1800
|
-
get: () => a.multiple ?
|
|
1801
|
-
set: (
|
|
1802
|
-
|
|
1937
|
+
emits: /* @__PURE__ */ R(["change", "clear", "open", "close", "search"], ["update:modelValue"]),
|
|
1938
|
+
setup(e, { emit: _ }) {
|
|
1939
|
+
const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = q(!1), c = q(""), p = d({
|
|
1940
|
+
get: () => a.multiple ? s.value ?? [] : s.value ?? null,
|
|
1941
|
+
set: (z) => {
|
|
1942
|
+
s.value = z, n("change", z);
|
|
1803
1943
|
}
|
|
1804
|
-
}),
|
|
1944
|
+
}), h = (z) => a.options.find((H) => H.value === z)?.label ?? String(z), f = d(() => a.multiple ? (s.value ?? []).map((z) => ({ value: z, label: h(z) })) : []), m = d(() => {
|
|
1805
1945
|
if (a.multiple) return "";
|
|
1806
|
-
const
|
|
1807
|
-
return
|
|
1808
|
-
}),
|
|
1809
|
-
() => a.multiple ?
|
|
1810
|
-
),
|
|
1946
|
+
const z = s.value;
|
|
1947
|
+
return z == null ? "" : h(z);
|
|
1948
|
+
}), g = d(
|
|
1949
|
+
() => a.multiple ? f.value.length > 0 : s.value !== null && s.value !== void 0 && s.value !== ""
|
|
1950
|
+
), y = d(() => a.clearable && !t.disabled.value && g.value), P = d(() => [
|
|
1811
1951
|
"wx-select",
|
|
1812
|
-
`wx-select--${
|
|
1952
|
+
`wx-select--${t.size.value}`,
|
|
1813
1953
|
{
|
|
1814
|
-
[`wx-select--${
|
|
1954
|
+
[`wx-select--${t.status.value}`]: t.status.value !== "default",
|
|
1815
1955
|
"is-open": o.value,
|
|
1816
|
-
"is-disabled":
|
|
1956
|
+
"is-disabled": t.disabled.value,
|
|
1817
1957
|
"is-multiple": a.multiple
|
|
1818
1958
|
}
|
|
1819
1959
|
]);
|
|
1820
|
-
|
|
1821
|
-
() =>
|
|
1960
|
+
ne(
|
|
1961
|
+
() => s.value,
|
|
1822
1962
|
() => {
|
|
1823
|
-
|
|
1963
|
+
c.value = a.multiple ? "" : m.value;
|
|
1824
1964
|
},
|
|
1825
1965
|
{ immediate: !0 }
|
|
1826
|
-
),
|
|
1827
|
-
if (
|
|
1828
|
-
|
|
1966
|
+
), ne(o, (z) => {
|
|
1967
|
+
if (z) {
|
|
1968
|
+
n("open");
|
|
1829
1969
|
return;
|
|
1830
1970
|
}
|
|
1831
|
-
|
|
1971
|
+
c.value = a.multiple ? "" : m.value, n("close");
|
|
1832
1972
|
});
|
|
1833
|
-
function
|
|
1834
|
-
|
|
1973
|
+
function V() {
|
|
1974
|
+
t.disabled.value || (o.value = !0);
|
|
1835
1975
|
}
|
|
1836
|
-
function
|
|
1837
|
-
return
|
|
1976
|
+
function B(z) {
|
|
1977
|
+
return z == null ? "" : h(z);
|
|
1838
1978
|
}
|
|
1839
|
-
function
|
|
1840
|
-
|
|
1979
|
+
function $(z) {
|
|
1980
|
+
n("search", z.target.value);
|
|
1841
1981
|
}
|
|
1842
|
-
function
|
|
1843
|
-
|
|
1982
|
+
function r() {
|
|
1983
|
+
s.value = a.multiple ? [] : null, n("change", s.value), n("clear");
|
|
1844
1984
|
}
|
|
1845
|
-
function
|
|
1846
|
-
const
|
|
1847
|
-
|
|
1985
|
+
function S(z) {
|
|
1986
|
+
const H = (s.value ?? []).filter((M) => M !== z);
|
|
1987
|
+
s.value = H, n("change", H);
|
|
1848
1988
|
}
|
|
1849
|
-
return (
|
|
1850
|
-
modelValue:
|
|
1851
|
-
"onUpdate:modelValue":
|
|
1989
|
+
return (z, H) => (l(), ie(b(za), {
|
|
1990
|
+
modelValue: p.value,
|
|
1991
|
+
"onUpdate:modelValue": H[1] || (H[1] = (M) => p.value = M),
|
|
1852
1992
|
open: o.value,
|
|
1853
|
-
"onUpdate:open":
|
|
1993
|
+
"onUpdate:open": H[2] || (H[2] = (M) => o.value = M),
|
|
1854
1994
|
multiple: e.multiple,
|
|
1855
|
-
disabled:
|
|
1995
|
+
disabled: b(t).disabled.value,
|
|
1856
1996
|
name: e.name,
|
|
1857
1997
|
"ignore-filter": !e.filterable,
|
|
1858
1998
|
"open-on-click": !0,
|
|
1859
|
-
class:
|
|
1999
|
+
class: F(P.value),
|
|
1860
2000
|
as: "div"
|
|
1861
2001
|
}, {
|
|
1862
|
-
default:
|
|
1863
|
-
|
|
2002
|
+
default: Y(() => [
|
|
2003
|
+
O(b(Pa), {
|
|
1864
2004
|
class: "wx-select__anchor",
|
|
1865
2005
|
as: "div",
|
|
1866
|
-
onClick:
|
|
2006
|
+
onClick: V
|
|
1867
2007
|
}, {
|
|
1868
|
-
default:
|
|
1869
|
-
|
|
1870
|
-
e.multiple ? (
|
|
1871
|
-
key: String(
|
|
2008
|
+
default: Y(() => [
|
|
2009
|
+
x("div", Hl, [
|
|
2010
|
+
e.multiple ? (l(!0), u(K, { key: 0 }, X(f.value, (M) => (l(), u("span", {
|
|
2011
|
+
key: String(M.value),
|
|
1872
2012
|
class: "wx-select__tag"
|
|
1873
2013
|
}, [
|
|
1874
|
-
|
|
1875
|
-
|
|
2014
|
+
ae(D(M.label) + " ", 1),
|
|
2015
|
+
b(t).disabled.value ? C("", !0) : (l(), u("button", {
|
|
1876
2016
|
key: 0,
|
|
1877
2017
|
class: "wx-select__tag-remove",
|
|
1878
2018
|
type: "button",
|
|
1879
2019
|
tabindex: "-1",
|
|
1880
|
-
"aria-label": `Remove ${
|
|
1881
|
-
onClick:
|
|
1882
|
-
}, " ✕ ", 8,
|
|
1883
|
-
]))), 128)) :
|
|
1884
|
-
e.filterable ? (
|
|
2020
|
+
"aria-label": `Remove ${M.label}`,
|
|
2021
|
+
onClick: de((w) => S(M.value), ["stop"])
|
|
2022
|
+
}, " ✕ ", 8, Dl))
|
|
2023
|
+
]))), 128)) : C("", !0),
|
|
2024
|
+
e.filterable ? (l(), ie(b(Wa), te({
|
|
1885
2025
|
key: 1,
|
|
1886
|
-
id:
|
|
1887
|
-
},
|
|
1888
|
-
modelValue:
|
|
1889
|
-
"onUpdate:modelValue":
|
|
2026
|
+
id: b(t).id.value
|
|
2027
|
+
}, z.$attrs, {
|
|
2028
|
+
modelValue: c.value,
|
|
2029
|
+
"onUpdate:modelValue": H[0] || (H[0] = (M) => c.value = M),
|
|
1890
2030
|
class: "wx-select__input",
|
|
1891
2031
|
placeholder: e.placeholder,
|
|
1892
2032
|
"aria-label": e.ariaLabel,
|
|
1893
|
-
"aria-describedby":
|
|
1894
|
-
"aria-invalid":
|
|
1895
|
-
"display-value": e.multiple ? void 0 :
|
|
2033
|
+
"aria-describedby": b(t).describedBy.value,
|
|
2034
|
+
"aria-invalid": b(t).status.value === "error" || void 0,
|
|
2035
|
+
"display-value": e.multiple ? void 0 : B,
|
|
1896
2036
|
"auto-focus": "",
|
|
1897
|
-
onInput:
|
|
1898
|
-
}), null, 16, ["id", "modelValue", "placeholder", "aria-label", "aria-describedby", "aria-invalid", "display-value"])) : (
|
|
1899
|
-
!e.multiple &&
|
|
2037
|
+
onInput: $
|
|
2038
|
+
}), null, 16, ["id", "modelValue", "placeholder", "aria-label", "aria-describedby", "aria-invalid", "display-value"])) : (l(), u(K, { key: 2 }, [
|
|
2039
|
+
!e.multiple && g.value ? (l(), u("span", Nl, D(m.value), 1)) : g.value ? C("", !0) : (l(), u("span", Ul, D(e.placeholder), 1))
|
|
1900
2040
|
], 64))
|
|
1901
2041
|
]),
|
|
1902
|
-
|
|
2042
|
+
y.value ? (l(), u("button", {
|
|
1903
2043
|
key: 0,
|
|
1904
2044
|
class: "wx-select__clear",
|
|
1905
2045
|
type: "button",
|
|
1906
2046
|
tabindex: "-1",
|
|
1907
2047
|
"aria-label": "Clear",
|
|
1908
|
-
onClick:
|
|
1909
|
-
}, " ✕ ")) :
|
|
1910
|
-
|
|
1911
|
-
id: e.filterable ? void 0 :
|
|
2048
|
+
onClick: de(r, ["stop"])
|
|
2049
|
+
}, " ✕ ")) : C("", !0),
|
|
2050
|
+
O(b(Aa), {
|
|
2051
|
+
id: e.filterable ? void 0 : b(t).id.value,
|
|
1912
2052
|
class: "wx-select__toggle",
|
|
1913
2053
|
"aria-label": e.ariaLabel,
|
|
1914
|
-
"aria-describedby":
|
|
2054
|
+
"aria-describedby": b(t).describedBy.value
|
|
1915
2055
|
}, {
|
|
1916
|
-
default:
|
|
1917
|
-
|
|
2056
|
+
default: Y(() => [...H[3] || (H[3] = [
|
|
2057
|
+
x("svg", {
|
|
1918
2058
|
viewBox: "0 0 16 16",
|
|
1919
2059
|
fill: "none",
|
|
1920
2060
|
"aria-hidden": "true"
|
|
1921
2061
|
}, [
|
|
1922
|
-
|
|
2062
|
+
x("path", {
|
|
1923
2063
|
d: "m4 6 4 4 4-4",
|
|
1924
2064
|
stroke: "currentColor",
|
|
1925
2065
|
"stroke-width": "1.6",
|
|
@@ -1933,41 +2073,41 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1933
2073
|
]),
|
|
1934
2074
|
_: 1
|
|
1935
2075
|
}),
|
|
1936
|
-
|
|
2076
|
+
O(b(La), {
|
|
1937
2077
|
disabled: !e.teleport
|
|
1938
2078
|
}, {
|
|
1939
|
-
default:
|
|
1940
|
-
|
|
2079
|
+
default: Y(() => [
|
|
2080
|
+
O(b(Ra), {
|
|
1941
2081
|
class: "wx-select__content",
|
|
1942
2082
|
position: "popper",
|
|
1943
2083
|
"side-offset": 4
|
|
1944
2084
|
}, {
|
|
1945
|
-
default:
|
|
1946
|
-
|
|
1947
|
-
default:
|
|
1948
|
-
|
|
1949
|
-
default:
|
|
1950
|
-
|
|
2085
|
+
default: Y(() => [
|
|
2086
|
+
O(b(Fa), { class: "wx-select__viewport" }, {
|
|
2087
|
+
default: Y(() => [
|
|
2088
|
+
O(b(Ha), { class: "wx-select__empty" }, {
|
|
2089
|
+
default: Y(() => [
|
|
2090
|
+
ae(D(e.emptyText), 1)
|
|
1951
2091
|
]),
|
|
1952
2092
|
_: 1
|
|
1953
2093
|
}),
|
|
1954
|
-
|
|
1955
|
-
(
|
|
1956
|
-
key: String(
|
|
2094
|
+
N(z.$slots, "default", {}, () => [
|
|
2095
|
+
(l(!0), u(K, null, X(e.options, (M) => (l(), ie(b(Da), {
|
|
2096
|
+
key: String(M.value),
|
|
1957
2097
|
class: "wx-select__option",
|
|
1958
|
-
value:
|
|
1959
|
-
disabled:
|
|
2098
|
+
value: M.value,
|
|
2099
|
+
disabled: M.disabled
|
|
1960
2100
|
}, {
|
|
1961
|
-
default:
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
default:
|
|
1965
|
-
|
|
2101
|
+
default: Y(() => [
|
|
2102
|
+
x("span", El, D(M.label), 1),
|
|
2103
|
+
O(b(Na), { class: "wx-select__check" }, {
|
|
2104
|
+
default: Y(() => [...H[4] || (H[4] = [
|
|
2105
|
+
x("svg", {
|
|
1966
2106
|
viewBox: "0 0 16 16",
|
|
1967
2107
|
fill: "none",
|
|
1968
2108
|
"aria-hidden": "true"
|
|
1969
2109
|
}, [
|
|
1970
|
-
|
|
2110
|
+
x("path", {
|
|
1971
2111
|
d: "m3.5 8.5 3 3 6-6",
|
|
1972
2112
|
stroke: "currentColor",
|
|
1973
2113
|
"stroke-width": "2",
|
|
@@ -1995,18 +2135,18 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
1995
2135
|
_: 3
|
|
1996
2136
|
}, 8, ["modelValue", "open", "multiple", "disabled", "name", "ignore-filter", "class"]));
|
|
1997
2137
|
}
|
|
1998
|
-
}),
|
|
2138
|
+
}), jl = /* @__PURE__ */ Q(Ol, [["__scopeId", "data-v-c4893d5b"]]), Kl = { class: "wx-slider__row" }, Gl = {
|
|
1999
2139
|
key: 0,
|
|
2000
2140
|
class: "wx-slider__value"
|
|
2001
|
-
},
|
|
2141
|
+
}, ql = {
|
|
2002
2142
|
key: 0,
|
|
2003
2143
|
class: "wx-slider__marks",
|
|
2004
2144
|
"aria-hidden": "true"
|
|
2005
|
-
},
|
|
2145
|
+
}, Yl = /* @__PURE__ */ J({
|
|
2006
2146
|
name: "WxSlider",
|
|
2007
2147
|
inheritAttrs: !1,
|
|
2008
2148
|
__name: "Slider",
|
|
2009
|
-
props: /* @__PURE__ */
|
|
2149
|
+
props: /* @__PURE__ */ R({
|
|
2010
2150
|
min: { default: 0 },
|
|
2011
2151
|
max: { default: 100 },
|
|
2012
2152
|
step: { default: 1 },
|
|
@@ -2023,83 +2163,83 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
2023
2163
|
modelValue: { default: null },
|
|
2024
2164
|
modelModifiers: {}
|
|
2025
2165
|
}),
|
|
2026
|
-
emits: /* @__PURE__ */
|
|
2027
|
-
setup(e, { emit:
|
|
2028
|
-
const a = e,
|
|
2166
|
+
emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
|
|
2167
|
+
setup(e, { emit: _ }) {
|
|
2168
|
+
const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = d(() => {
|
|
2029
2169
|
if (a.range) {
|
|
2030
|
-
const
|
|
2031
|
-
return [
|
|
2170
|
+
const m = Array.isArray(s.value) ? s.value : [];
|
|
2171
|
+
return [m[0] ?? a.min, m[1] ?? a.max];
|
|
2032
2172
|
}
|
|
2033
|
-
return [(Array.isArray(
|
|
2173
|
+
return [(Array.isArray(s.value) ? s.value[0] : s.value) ?? a.min];
|
|
2034
2174
|
});
|
|
2035
|
-
function
|
|
2036
|
-
if (!
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2039
|
-
}
|
|
2040
|
-
const
|
|
2041
|
-
() => Object.entries(a.marks ?? {}).map(([
|
|
2042
|
-
value: Number(
|
|
2043
|
-
label:
|
|
2044
|
-
offset: (Number(
|
|
2175
|
+
function c(f) {
|
|
2176
|
+
if (!f) return;
|
|
2177
|
+
const m = a.range ? [...f] : f[0];
|
|
2178
|
+
s.value = m, n("change", m);
|
|
2179
|
+
}
|
|
2180
|
+
const p = d(
|
|
2181
|
+
() => Object.entries(a.marks ?? {}).map(([f, m]) => ({
|
|
2182
|
+
value: Number(f),
|
|
2183
|
+
label: m,
|
|
2184
|
+
offset: (Number(f) - a.min) / (a.max - a.min) * 100
|
|
2045
2185
|
}))
|
|
2046
|
-
),
|
|
2186
|
+
), h = d(() => [
|
|
2047
2187
|
"wx-slider",
|
|
2048
|
-
`wx-slider--${
|
|
2049
|
-
{ "is-disabled":
|
|
2188
|
+
`wx-slider--${t.size.value}`,
|
|
2189
|
+
{ "is-disabled": t.disabled.value, "is-range": a.range }
|
|
2050
2190
|
]);
|
|
2051
|
-
return (
|
|
2052
|
-
class:
|
|
2191
|
+
return (f, m) => (l(), u("div", {
|
|
2192
|
+
class: F(h.value)
|
|
2053
2193
|
}, [
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
id:
|
|
2057
|
-
},
|
|
2194
|
+
x("div", Kl, [
|
|
2195
|
+
O(b(Ua), te({
|
|
2196
|
+
id: b(t).id.value
|
|
2197
|
+
}, f.$attrs, {
|
|
2058
2198
|
class: "wx-slider__root",
|
|
2059
2199
|
"model-value": o.value,
|
|
2060
2200
|
min: e.min,
|
|
2061
2201
|
max: e.max,
|
|
2062
2202
|
step: e.step,
|
|
2063
|
-
disabled:
|
|
2203
|
+
disabled: b(t).disabled.value,
|
|
2064
2204
|
"min-steps-between-thumbs": e.minStepsBetweenThumbs,
|
|
2065
2205
|
name: e.name,
|
|
2066
|
-
"onUpdate:modelValue":
|
|
2206
|
+
"onUpdate:modelValue": c
|
|
2067
2207
|
}), {
|
|
2068
|
-
default:
|
|
2069
|
-
|
|
2070
|
-
default:
|
|
2071
|
-
|
|
2208
|
+
default: Y(() => [
|
|
2209
|
+
O(b(Ea), { class: "wx-slider__track" }, {
|
|
2210
|
+
default: Y(() => [
|
|
2211
|
+
O(b(Oa), { class: "wx-slider__range" })
|
|
2072
2212
|
]),
|
|
2073
2213
|
_: 1
|
|
2074
2214
|
}),
|
|
2075
|
-
(
|
|
2076
|
-
key:
|
|
2215
|
+
(l(!0), u(K, null, X(o.value.length, (g) => (l(), ie(b(ja), {
|
|
2216
|
+
key: g,
|
|
2077
2217
|
class: "wx-slider__thumb",
|
|
2078
2218
|
"aria-label": e.ariaLabel,
|
|
2079
|
-
"aria-describedby":
|
|
2219
|
+
"aria-describedby": b(t).describedBy.value
|
|
2080
2220
|
}, null, 8, ["aria-label", "aria-describedby"]))), 128))
|
|
2081
2221
|
]),
|
|
2082
2222
|
_: 1
|
|
2083
2223
|
}, 16, ["id", "model-value", "min", "max", "step", "disabled", "min-steps-between-thumbs", "name"]),
|
|
2084
|
-
e.showValue ? (
|
|
2224
|
+
e.showValue ? (l(), u("span", Gl, D(e.range ? `${o.value[0]} — ${o.value[1]}` : o.value[0]), 1)) : C("", !0)
|
|
2085
2225
|
]),
|
|
2086
|
-
|
|
2087
|
-
(
|
|
2088
|
-
key:
|
|
2226
|
+
p.value.length ? (l(), u("div", ql, [
|
|
2227
|
+
(l(!0), u(K, null, X(p.value, (g) => (l(), u("span", {
|
|
2228
|
+
key: g.value,
|
|
2089
2229
|
class: "wx-slider__mark",
|
|
2090
|
-
style:
|
|
2091
|
-
},
|
|
2092
|
-
])) :
|
|
2230
|
+
style: ee({ left: `${g.offset}%` })
|
|
2231
|
+
}, D(g.label), 5))), 128))
|
|
2232
|
+
])) : C("", !0)
|
|
2093
2233
|
], 2));
|
|
2094
2234
|
}
|
|
2095
|
-
}),
|
|
2235
|
+
}), Xl = /* @__PURE__ */ Q(Yl, [["__scopeId", "data-v-49653b8d"]]), Jl = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby"], Zl = {
|
|
2096
2236
|
key: 0,
|
|
2097
2237
|
class: "wx-switch__label"
|
|
2098
|
-
},
|
|
2238
|
+
}, Ql = /* @__PURE__ */ J({
|
|
2099
2239
|
name: "WxSwitch",
|
|
2100
2240
|
inheritAttrs: !1,
|
|
2101
2241
|
__name: "Switch",
|
|
2102
|
-
props: /* @__PURE__ */
|
|
2242
|
+
props: /* @__PURE__ */ R({
|
|
2103
2243
|
activeValue: { type: [String, Number, Boolean, null], default: !0 },
|
|
2104
2244
|
inactiveValue: { type: [String, Number, Boolean, null], default: !1 },
|
|
2105
2245
|
label: { default: void 0 },
|
|
@@ -2112,55 +2252,567 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
2112
2252
|
modelValue: { type: [String, Number, Boolean, null], default: !1 },
|
|
2113
2253
|
modelModifiers: {}
|
|
2114
2254
|
}),
|
|
2115
|
-
emits: /* @__PURE__ */
|
|
2116
|
-
setup(e, { emit:
|
|
2117
|
-
const a = e,
|
|
2255
|
+
emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
|
|
2256
|
+
setup(e, { emit: _ }) {
|
|
2257
|
+
const a = e, n = _, s = G(e, "modelValue"), t = le(a), o = d(() => s.value === a.activeValue), c = d(() => a.size ?? t.size.value), p = d(() => [
|
|
2118
2258
|
"wx-switch",
|
|
2119
|
-
`wx-switch--${
|
|
2120
|
-
{ "is-checked": o.value, "is-disabled":
|
|
2259
|
+
`wx-switch--${c.value}`,
|
|
2260
|
+
{ "is-checked": o.value, "is-disabled": t.disabled.value }
|
|
2121
2261
|
]);
|
|
2122
|
-
function
|
|
2123
|
-
const
|
|
2124
|
-
|
|
2262
|
+
function h(f) {
|
|
2263
|
+
const m = f.target.checked ? a.activeValue : a.inactiveValue;
|
|
2264
|
+
s.value = m, n("change", m);
|
|
2125
2265
|
}
|
|
2126
|
-
return (
|
|
2127
|
-
class:
|
|
2266
|
+
return (f, m) => (l(), u("label", {
|
|
2267
|
+
class: F(p.value)
|
|
2128
2268
|
}, [
|
|
2129
|
-
|
|
2130
|
-
id:
|
|
2131
|
-
},
|
|
2269
|
+
x("input", te({
|
|
2270
|
+
id: b(t).id.value
|
|
2271
|
+
}, f.$attrs, {
|
|
2132
2272
|
class: "wx-switch__native",
|
|
2133
2273
|
type: "checkbox",
|
|
2134
2274
|
role: "switch",
|
|
2135
2275
|
name: e.name,
|
|
2136
2276
|
checked: o.value,
|
|
2137
|
-
disabled:
|
|
2277
|
+
disabled: b(t).disabled.value,
|
|
2138
2278
|
"aria-label": e.ariaLabel,
|
|
2139
|
-
"aria-describedby":
|
|
2140
|
-
onChange:
|
|
2279
|
+
"aria-describedby": b(t).describedBy.value,
|
|
2280
|
+
onChange: h
|
|
2141
2281
|
}), null, 16, Jl),
|
|
2142
|
-
|
|
2282
|
+
m[0] || (m[0] = x("span", {
|
|
2143
2283
|
class: "wx-switch__track",
|
|
2144
2284
|
"aria-hidden": "true"
|
|
2145
2285
|
}, [
|
|
2146
|
-
|
|
2286
|
+
x("span", { class: "wx-switch__thumb" })
|
|
2147
2287
|
], -1)),
|
|
2148
|
-
e.label ||
|
|
2149
|
-
|
|
2150
|
-
|
|
2288
|
+
e.label || f.$slots.default ? (l(), u("span", Zl, [
|
|
2289
|
+
N(f.$slots, "default", {}, () => [
|
|
2290
|
+
ae(D(e.label), 1)
|
|
2291
|
+
], !0)
|
|
2292
|
+
])) : C("", !0)
|
|
2293
|
+
], 2));
|
|
2294
|
+
}
|
|
2295
|
+
}), eo = /* @__PURE__ */ Q(Ql, [["__scopeId", "data-v-b9a90e4d"]]), ao = {
|
|
2296
|
+
key: 0,
|
|
2297
|
+
class: "wx-table__header"
|
|
2298
|
+
}, to = { class: "wx-table__title" }, lo = { class: "wx-table__tools" }, oo = {
|
|
2299
|
+
key: 0,
|
|
2300
|
+
class: "wx-table__search"
|
|
2301
|
+
}, io = ["aria-label", "aria-busy"], no = { class: "wx-table__head" }, so = ["aria-sort"], uo = ["onClick"], ro = { class: "wx-table__body" }, co = ["onClick"], vo = ["aria-expanded", "aria-label", "onClick"], fo = {
|
|
2302
|
+
key: 0,
|
|
2303
|
+
class: "wx-table__row--expansion"
|
|
2304
|
+
}, bo = ["colspan"], mo = {
|
|
2305
|
+
key: 0,
|
|
2306
|
+
class: "wx-table__row wx-table__row--empty"
|
|
2307
|
+
}, po = ["colspan"], ho = {
|
|
2308
|
+
key: 0,
|
|
2309
|
+
class: "wx-table__foot"
|
|
2310
|
+
}, yo = ["colspan"], xo = {
|
|
2311
|
+
key: 0,
|
|
2312
|
+
class: "wx-table__footer-row"
|
|
2313
|
+
}, go = ["colspan"], ko = {
|
|
2314
|
+
key: 1,
|
|
2315
|
+
class: "wx-table__loading"
|
|
2316
|
+
}, he = 44, Ke = "wx-table:", wo = /* @__PURE__ */ J({
|
|
2317
|
+
name: "WxTable",
|
|
2318
|
+
__name: "Table",
|
|
2319
|
+
props: /* @__PURE__ */ R({
|
|
2320
|
+
data: { default: null },
|
|
2321
|
+
columns: {},
|
|
2322
|
+
rowKey: { type: [String, Function], default: "id" },
|
|
2323
|
+
title: { default: void 0 },
|
|
2324
|
+
searchable: { type: Boolean, default: !1 },
|
|
2325
|
+
searchPlaceholder: { default: "Search" },
|
|
2326
|
+
searchDebounce: { default: 300 },
|
|
2327
|
+
loading: { type: Boolean, default: !1 },
|
|
2328
|
+
emptyText: { default: "Nothing to show" },
|
|
2329
|
+
stripe: { type: Boolean, default: !1 },
|
|
2330
|
+
bordered: { type: Boolean, default: !1 },
|
|
2331
|
+
hover: { type: Boolean, default: !0 },
|
|
2332
|
+
size: { default: "md" },
|
|
2333
|
+
selectable: { type: Boolean, default: !1 },
|
|
2334
|
+
selectableIf: { type: Function, default: void 0 },
|
|
2335
|
+
expandable: { type: Boolean, default: !1 },
|
|
2336
|
+
expandableIf: { type: Function, default: void 0 },
|
|
2337
|
+
summary: { default: () => [] },
|
|
2338
|
+
pagination: { type: Boolean, default: void 0 },
|
|
2339
|
+
perPageOptions: { default: () => [] },
|
|
2340
|
+
persist: { default: void 0 },
|
|
2341
|
+
maxHeight: { default: void 0 },
|
|
2342
|
+
rowClass: { type: Function, default: void 0 },
|
|
2343
|
+
layout: { default: "auto" },
|
|
2344
|
+
ariaLabel: { default: void 0 }
|
|
2345
|
+
}, {
|
|
2346
|
+
selected: { default: () => [] },
|
|
2347
|
+
selectedModifiers: {},
|
|
2348
|
+
expanded: { default: () => [] },
|
|
2349
|
+
expandedModifiers: {},
|
|
2350
|
+
sort: { default: null },
|
|
2351
|
+
sortModifiers: {},
|
|
2352
|
+
search: { default: "" },
|
|
2353
|
+
searchModifiers: {},
|
|
2354
|
+
page: { default: 1 },
|
|
2355
|
+
pageModifiers: {},
|
|
2356
|
+
perPage: { default: 15 },
|
|
2357
|
+
perPageModifiers: {}
|
|
2358
|
+
}),
|
|
2359
|
+
emits: /* @__PURE__ */ R(["row-click", "sort-change", "selection-change", "expand-change", "search", "state-change"], ["update:selected", "update:expanded", "update:sort", "update:search", "update:page", "update:perPage"]),
|
|
2360
|
+
setup(e, { emit: _ }) {
|
|
2361
|
+
const a = e, n = _, s = G(e, "selected"), t = G(e, "expanded"), o = G(e, "sort"), c = G(e, "search"), p = G(e, "page"), h = G(e, "perPage"), f = d(() => {
|
|
2362
|
+
const i = a.data;
|
|
2363
|
+
return i ? Array.isArray(i) ? i : i.data ?? [] : [];
|
|
2364
|
+
}), m = d(() => a.data && !Array.isArray(a.data) ? a.data : null), g = d(() => a.pagination ?? !!m.value), y = d(() => a.columns.filter((i) => !i.hidden)), P = d(() => (a.expandable ? 1 : 0) + (a.selectable ? 1 : 0)), V = d(() => y.value.length + P.value), B = qe(), $ = d(
|
|
2365
|
+
() => !!(a.title || a.searchable || B.title || B.actions)
|
|
2366
|
+
), r = d(() => [
|
|
2367
|
+
"wx-table",
|
|
2368
|
+
`wx-table--${a.size}`,
|
|
2369
|
+
{
|
|
2370
|
+
"wx-table--stripe": a.stripe,
|
|
2371
|
+
"wx-table--bordered": a.bordered,
|
|
2372
|
+
"wx-table--hover": a.hover,
|
|
2373
|
+
"wx-table--sticky": a.maxHeight !== void 0,
|
|
2374
|
+
"is-loading": a.loading
|
|
2375
|
+
}
|
|
2376
|
+
]), S = d(
|
|
2377
|
+
() => a.maxHeight === void 0 ? void 0 : { maxHeight: z(a.maxHeight) }
|
|
2378
|
+
);
|
|
2379
|
+
function z(i) {
|
|
2380
|
+
return typeof i == "number" ? `${i}px` : i;
|
|
2381
|
+
}
|
|
2382
|
+
function H(i) {
|
|
2383
|
+
if (typeof i.width == "number") return i.width;
|
|
2384
|
+
if (typeof i.width == "string") {
|
|
2385
|
+
const k = Number.parseFloat(i.width);
|
|
2386
|
+
return Number.isFinite(k) ? k : 0;
|
|
2387
|
+
}
|
|
2388
|
+
return 0;
|
|
2389
|
+
}
|
|
2390
|
+
function M(i) {
|
|
2391
|
+
return {
|
|
2392
|
+
width: i.width === void 0 ? void 0 : z(i.width),
|
|
2393
|
+
minWidth: i.minWidth === void 0 ? void 0 : z(i.minWidth)
|
|
2394
|
+
};
|
|
2395
|
+
}
|
|
2396
|
+
const w = d(() => {
|
|
2397
|
+
const i = /* @__PURE__ */ new Map();
|
|
2398
|
+
let k = P.value * he;
|
|
2399
|
+
const v = y.value.filter((se) => se.fixed === "left");
|
|
2400
|
+
v.forEach((se, be) => {
|
|
2401
|
+
i.set(se.key, { side: "left", offset: k, edge: be === v.length - 1 }), k += H(se);
|
|
2402
|
+
});
|
|
2403
|
+
let L = 0;
|
|
2404
|
+
const j = y.value.filter((se) => se.fixed === "right");
|
|
2405
|
+
for (let se = j.length - 1; se >= 0; se--) {
|
|
2406
|
+
const be = j[se];
|
|
2407
|
+
i.set(be.key, { side: "right", offset: L, edge: se === 0 }), L += H(be);
|
|
2408
|
+
}
|
|
2409
|
+
return i;
|
|
2410
|
+
}), E = d(() => y.value.some((i) => i.fixed === "left")), Z = d(() => w.value.size > 0);
|
|
2411
|
+
function W(i) {
|
|
2412
|
+
const k = w.value.get(i.key);
|
|
2413
|
+
if (k)
|
|
2414
|
+
return { [`--wx-pin-${k.side}`]: `${k.offset}px` };
|
|
2415
|
+
}
|
|
2416
|
+
function U(i) {
|
|
2417
|
+
const k = w.value.get(i.key);
|
|
2418
|
+
if (k)
|
|
2419
|
+
return [`is-fixed-${k.side}`, { "is-fixed-edge": k.edge }];
|
|
2420
|
+
}
|
|
2421
|
+
function T(i) {
|
|
2422
|
+
return Z.value ? { "--wx-pin-left": `${i === "select" && a.expandable ? he : 0}px` } : void 0;
|
|
2423
|
+
}
|
|
2424
|
+
const A = d(
|
|
2425
|
+
() => Z.value ? ["is-fixed-left", { "is-fixed-edge": !E.value }] : void 0
|
|
2426
|
+
);
|
|
2427
|
+
function I(i, k) {
|
|
2428
|
+
return k.includes(".") ? k.split(".").reduce((v, L) => {
|
|
2429
|
+
if (!(v === null || typeof v != "object"))
|
|
2430
|
+
return v[L];
|
|
2431
|
+
}, i) : i[k];
|
|
2432
|
+
}
|
|
2433
|
+
function oe(i, k, v) {
|
|
2434
|
+
const L = I(k, i.key);
|
|
2435
|
+
return i.formatter ? i.formatter(L, k, v) : L == null ? "" : String(L);
|
|
2436
|
+
}
|
|
2437
|
+
function ue(i, k) {
|
|
2438
|
+
if (typeof a.rowKey == "function") return a.rowKey(i, k);
|
|
2439
|
+
const v = I(i, a.rowKey);
|
|
2440
|
+
return typeof v == "string" || typeof v == "number" ? v : k;
|
|
2441
|
+
}
|
|
2442
|
+
function Ve(i) {
|
|
2443
|
+
return a.selectableIf ? a.selectableIf(i) : !0;
|
|
2444
|
+
}
|
|
2445
|
+
function ze(i) {
|
|
2446
|
+
return a.expandableIf ? a.expandableIf(i) : !0;
|
|
2447
|
+
}
|
|
2448
|
+
const ta = d(() => f.value.filter(Ve)), re = d(
|
|
2449
|
+
() => ta.value.map((i) => ue(i, f.value.indexOf(i)))
|
|
2450
|
+
), Pe = d(
|
|
2451
|
+
() => re.value.filter((i) => s.value.includes(i)).length
|
|
2452
|
+
), We = d(
|
|
2453
|
+
() => re.value.length > 0 && Pe.value === re.value.length
|
|
2454
|
+
), la = d(() => Pe.value > 0 && !We.value);
|
|
2455
|
+
function Ae(i) {
|
|
2456
|
+
return f.value.filter((k, v) => i.includes(ue(k, v)));
|
|
2457
|
+
}
|
|
2458
|
+
function ve(i) {
|
|
2459
|
+
s.value = i, n("selection-change", i, Ae(i));
|
|
2460
|
+
}
|
|
2461
|
+
function oa(i) {
|
|
2462
|
+
const k = re.value;
|
|
2463
|
+
ve(i ? [...s.value, ...k.filter((v) => !s.value.includes(v))] : s.value.filter((v) => !k.includes(v)));
|
|
2464
|
+
}
|
|
2465
|
+
function ia(i, k, v) {
|
|
2466
|
+
const L = ue(i, k);
|
|
2467
|
+
v ? s.value.includes(L) || ve([...s.value, L]) : ve(s.value.filter((j) => j !== L));
|
|
2468
|
+
}
|
|
2469
|
+
function Le(i, k) {
|
|
2470
|
+
return s.value.includes(ue(i, k));
|
|
2471
|
+
}
|
|
2472
|
+
function fe(i, k) {
|
|
2473
|
+
return t.value.includes(ue(i, k));
|
|
2474
|
+
}
|
|
2475
|
+
function na(i, k) {
|
|
2476
|
+
if (!ze(i)) return;
|
|
2477
|
+
const v = ue(i, k), L = t.value.includes(v) ? t.value.filter((j) => j !== v) : [...t.value, v];
|
|
2478
|
+
t.value = L, n("expand-change", L, Ae(L));
|
|
2479
|
+
}
|
|
2480
|
+
function sa(i) {
|
|
2481
|
+
if (!i.sortable) return;
|
|
2482
|
+
const k = o.value;
|
|
2483
|
+
let v;
|
|
2484
|
+
k?.key !== i.key ? v = { key: i.key, order: "asc" } : k.order === "asc" ? v = { key: i.key, order: "desc" } : v = null, o.value = v, p.value = 1, n("sort-change", v);
|
|
2485
|
+
}
|
|
2486
|
+
function ua(i) {
|
|
2487
|
+
if (i.sortable)
|
|
2488
|
+
return o.value?.key !== i.key ? "none" : o.value.order === "asc" ? "ascending" : "descending";
|
|
2489
|
+
}
|
|
2490
|
+
function Re(i) {
|
|
2491
|
+
return o.value?.key === i.key ? o.value.order : null;
|
|
2492
|
+
}
|
|
2493
|
+
function $e(i) {
|
|
2494
|
+
return i.align && i.align !== "left" ? `wx-table__cell--${i.align}` : void 0;
|
|
2495
|
+
}
|
|
2496
|
+
let _e;
|
|
2497
|
+
const Be = q(c.value);
|
|
2498
|
+
function da(i) {
|
|
2499
|
+
c.value = i === void 0 ? "" : String(i);
|
|
2500
|
+
}
|
|
2501
|
+
function ra(i) {
|
|
2502
|
+
clearTimeout(_e);
|
|
2503
|
+
const k = () => {
|
|
2504
|
+
Be.value = i, p.value = 1, n("search", i);
|
|
2505
|
+
};
|
|
2506
|
+
a.searchDebounce ? _e = setTimeout(k, a.searchDebounce) : k();
|
|
2507
|
+
}
|
|
2508
|
+
ya(() => clearTimeout(_e));
|
|
2509
|
+
const Fe = d(() => ({
|
|
2510
|
+
page: p.value,
|
|
2511
|
+
perPage: h.value,
|
|
2512
|
+
sort: o.value,
|
|
2513
|
+
search: Be.value
|
|
2514
|
+
}));
|
|
2515
|
+
function ca() {
|
|
2516
|
+
if (!a.persist) return;
|
|
2517
|
+
let i = null;
|
|
2518
|
+
try {
|
|
2519
|
+
const k = window.localStorage.getItem(Ke + a.persist);
|
|
2520
|
+
i = k ? JSON.parse(k) : null;
|
|
2521
|
+
} catch {
|
|
2522
|
+
return;
|
|
2523
|
+
}
|
|
2524
|
+
i && (typeof i.page == "number" && i.page > 0 && (p.value = i.page), typeof i.perPage == "number" && i.perPage > 0 && (h.value = i.perPage), typeof i.search == "string" && (c.value = i.search), i.sort === null ? o.value = null : i.sort && typeof i.sort.key == "string" && (o.value = { key: i.sort.key, order: i.sort.order === "desc" ? "desc" : "asc" }));
|
|
2525
|
+
}
|
|
2526
|
+
function va(i) {
|
|
2527
|
+
if (a.persist)
|
|
2528
|
+
try {
|
|
2529
|
+
window.localStorage.setItem(Ke + a.persist, JSON.stringify(i));
|
|
2530
|
+
} catch {
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
Ce(() => {
|
|
2534
|
+
ca(), Be.value = c.value, n("state-change", Fe.value), ne(c, ra), ne(Fe, (i) => {
|
|
2535
|
+
va(i), n("state-change", i);
|
|
2536
|
+
});
|
|
2537
|
+
});
|
|
2538
|
+
function He(i) {
|
|
2539
|
+
const k = i.cells ?? {}, v = y.value.findIndex((L) => L.key in k);
|
|
2540
|
+
return v === -1 ? y.value.length : v;
|
|
2541
|
+
}
|
|
2542
|
+
function De(i) {
|
|
2543
|
+
return P.value + He(i);
|
|
2544
|
+
}
|
|
2545
|
+
function fa(i) {
|
|
2546
|
+
return y.value.slice(He(i));
|
|
2547
|
+
}
|
|
2548
|
+
function Ne(i, k) {
|
|
2549
|
+
return i.cells?.[k.key];
|
|
2550
|
+
}
|
|
2551
|
+
function ba(i, k) {
|
|
2552
|
+
const v = Ne(i, k);
|
|
2553
|
+
return v == null ? "" : String(v);
|
|
2554
|
+
}
|
|
2555
|
+
return (i, k) => (l(), u("div", {
|
|
2556
|
+
class: F(r.value)
|
|
2557
|
+
}, [
|
|
2558
|
+
$.value ? (l(), u("header", ao, [
|
|
2559
|
+
x("div", to, [
|
|
2560
|
+
N(i.$slots, "title", {}, () => [
|
|
2561
|
+
ae(D(e.title), 1)
|
|
2562
|
+
], !0)
|
|
2563
|
+
]),
|
|
2564
|
+
x("div", lo, [
|
|
2565
|
+
N(i.$slots, "actions", {}, void 0, !0),
|
|
2566
|
+
e.searchable ? (l(), u("div", oo, [
|
|
2567
|
+
O(Qe, {
|
|
2568
|
+
type: "search",
|
|
2569
|
+
"model-value": c.value,
|
|
2570
|
+
placeholder: e.searchPlaceholder,
|
|
2571
|
+
size: e.size,
|
|
2572
|
+
clearable: "",
|
|
2573
|
+
"aria-label": e.searchPlaceholder,
|
|
2574
|
+
"onUpdate:modelValue": da
|
|
2575
|
+
}, null, 8, ["model-value", "placeholder", "size", "aria-label"])
|
|
2576
|
+
])) : C("", !0)
|
|
2577
|
+
])
|
|
2578
|
+
])) : C("", !0),
|
|
2579
|
+
x("div", {
|
|
2580
|
+
class: "wx-table__scroll",
|
|
2581
|
+
style: ee(S.value)
|
|
2582
|
+
}, [
|
|
2583
|
+
x("table", {
|
|
2584
|
+
class: F(["wx-table__table", { "wx-table__table--fixed": e.layout === "fixed" }]),
|
|
2585
|
+
"aria-label": e.ariaLabel,
|
|
2586
|
+
"aria-busy": e.loading || void 0
|
|
2587
|
+
}, [
|
|
2588
|
+
x("colgroup", null, [
|
|
2589
|
+
e.expandable ? (l(), u("col", {
|
|
2590
|
+
key: 0,
|
|
2591
|
+
style: ee({ width: `${he}px` })
|
|
2592
|
+
}, null, 4)) : C("", !0),
|
|
2593
|
+
e.selectable ? (l(), u("col", {
|
|
2594
|
+
key: 1,
|
|
2595
|
+
style: ee({ width: `${he}px` })
|
|
2596
|
+
}, null, 4)) : C("", !0),
|
|
2597
|
+
(l(!0), u(K, null, X(y.value, (v) => (l(), u("col", {
|
|
2598
|
+
key: v.key,
|
|
2599
|
+
style: ee(M(v))
|
|
2600
|
+
}, null, 4))), 128))
|
|
2601
|
+
]),
|
|
2602
|
+
x("thead", no, [
|
|
2603
|
+
x("tr", null, [
|
|
2604
|
+
e.expandable ? (l(), u("th", {
|
|
2605
|
+
key: 0,
|
|
2606
|
+
scope: "col",
|
|
2607
|
+
class: F(["wx-table__cell wx-table__cell--utility", A.value]),
|
|
2608
|
+
style: ee(T("expand"))
|
|
2609
|
+
}, [...k[4] || (k[4] = [
|
|
2610
|
+
x("span", { class: "wx-table__sr-only" }, "Expand", -1)
|
|
2611
|
+
])], 6)) : C("", !0),
|
|
2612
|
+
e.selectable ? (l(), u("th", {
|
|
2613
|
+
key: 1,
|
|
2614
|
+
scope: "col",
|
|
2615
|
+
class: F(["wx-table__cell wx-table__cell--utility", A.value]),
|
|
2616
|
+
style: ee(T("select"))
|
|
2617
|
+
}, [
|
|
2618
|
+
O(ye, {
|
|
2619
|
+
"model-value": We.value,
|
|
2620
|
+
indeterminate: la.value,
|
|
2621
|
+
disabled: !re.value.length,
|
|
2622
|
+
"aria-label": "Select every row on this page",
|
|
2623
|
+
"onUpdate:modelValue": oa
|
|
2624
|
+
}, null, 8, ["model-value", "indeterminate", "disabled"])
|
|
2625
|
+
], 6)) : C("", !0),
|
|
2626
|
+
(l(!0), u(K, null, X(y.value, (v) => (l(), u("th", {
|
|
2627
|
+
key: v.key,
|
|
2628
|
+
scope: "col",
|
|
2629
|
+
class: F(["wx-table__cell", [$e(v), U(v), v.headerClass]]),
|
|
2630
|
+
style: ee(W(v)),
|
|
2631
|
+
"aria-sort": ua(v)
|
|
2632
|
+
}, [
|
|
2633
|
+
v.sortable ? (l(), u("button", {
|
|
2634
|
+
key: 0,
|
|
2635
|
+
class: "wx-table__sort",
|
|
2636
|
+
type: "button",
|
|
2637
|
+
onClick: (L) => sa(v)
|
|
2638
|
+
}, [
|
|
2639
|
+
N(i.$slots, `header-${v.key}`, { column: v }, () => [
|
|
2640
|
+
ae(D(v.label ?? v.key), 1)
|
|
2641
|
+
], !0),
|
|
2642
|
+
(l(), u("svg", {
|
|
2643
|
+
class: F(["wx-table__sort-icon", Re(v) ? `is-${Re(v)}` : void 0]),
|
|
2644
|
+
viewBox: "0 0 8 12",
|
|
2645
|
+
"aria-hidden": "true"
|
|
2646
|
+
}, [...k[5] || (k[5] = [
|
|
2647
|
+
x("path", {
|
|
2648
|
+
class: "wx-table__sort-up",
|
|
2649
|
+
d: "M4 1 7 5 1 5Z"
|
|
2650
|
+
}, null, -1),
|
|
2651
|
+
x("path", {
|
|
2652
|
+
class: "wx-table__sort-down",
|
|
2653
|
+
d: "M4 11 1 7 7 7Z"
|
|
2654
|
+
}, null, -1)
|
|
2655
|
+
])], 2))
|
|
2656
|
+
], 8, uo)) : N(i.$slots, `header-${v.key}`, { column: v }, () => [
|
|
2657
|
+
ae(D(v.label ?? v.key), 1)
|
|
2658
|
+
], !0, 1)
|
|
2659
|
+
], 14, so))), 128))
|
|
2660
|
+
])
|
|
2661
|
+
]),
|
|
2662
|
+
x("tbody", ro, [
|
|
2663
|
+
(l(!0), u(K, null, X(f.value, (v, L) => (l(), u(K, {
|
|
2664
|
+
key: ue(v, L)
|
|
2665
|
+
}, [
|
|
2666
|
+
x("tr", {
|
|
2667
|
+
class: F(["wx-table__row", [
|
|
2668
|
+
e.rowClass?.(v, L),
|
|
2669
|
+
{
|
|
2670
|
+
"is-striped": L % 2 === 1,
|
|
2671
|
+
"is-selected": e.selectable && Le(v, L),
|
|
2672
|
+
"is-expanded": e.expandable && fe(v, L)
|
|
2673
|
+
}
|
|
2674
|
+
]]),
|
|
2675
|
+
onClick: (j) => n("row-click", v, L, j)
|
|
2676
|
+
}, [
|
|
2677
|
+
e.expandable ? (l(), u("td", {
|
|
2678
|
+
key: 0,
|
|
2679
|
+
class: F(["wx-table__cell wx-table__cell--utility", A.value]),
|
|
2680
|
+
style: ee(T("expand")),
|
|
2681
|
+
onClick: k[0] || (k[0] = de(() => {
|
|
2682
|
+
}, ["stop"]))
|
|
2683
|
+
}, [
|
|
2684
|
+
ze(v) ? (l(), u("button", {
|
|
2685
|
+
key: 0,
|
|
2686
|
+
class: "wx-table__expander",
|
|
2687
|
+
type: "button",
|
|
2688
|
+
"aria-expanded": fe(v, L),
|
|
2689
|
+
"aria-label": fe(v, L) ? "Collapse row" : "Expand row",
|
|
2690
|
+
onClick: (j) => na(v, L)
|
|
2691
|
+
}, [...k[6] || (k[6] = [
|
|
2692
|
+
x("svg", {
|
|
2693
|
+
viewBox: "0 0 12 12",
|
|
2694
|
+
"aria-hidden": "true"
|
|
2695
|
+
}, [
|
|
2696
|
+
x("path", { d: "M4.5 2 8.5 6l-4 4" })
|
|
2697
|
+
], -1)
|
|
2698
|
+
])], 8, vo)) : C("", !0)
|
|
2699
|
+
], 6)) : C("", !0),
|
|
2700
|
+
e.selectable ? (l(), u("td", {
|
|
2701
|
+
key: 1,
|
|
2702
|
+
class: F(["wx-table__cell wx-table__cell--utility", A.value]),
|
|
2703
|
+
style: ee(T("select")),
|
|
2704
|
+
onClick: k[1] || (k[1] = de(() => {
|
|
2705
|
+
}, ["stop"]))
|
|
2706
|
+
}, [
|
|
2707
|
+
O(ye, {
|
|
2708
|
+
"model-value": Le(v, L),
|
|
2709
|
+
disabled: !Ve(v),
|
|
2710
|
+
"aria-label": "Select row",
|
|
2711
|
+
"onUpdate:modelValue": (j) => ia(v, L, j)
|
|
2712
|
+
}, null, 8, ["model-value", "disabled", "onUpdate:modelValue"])
|
|
2713
|
+
], 6)) : C("", !0),
|
|
2714
|
+
(l(!0), u(K, null, X(y.value, (j) => (l(), u("td", {
|
|
2715
|
+
key: j.key,
|
|
2716
|
+
class: F(["wx-table__cell", [$e(j), U(j), j.cellClass]]),
|
|
2717
|
+
style: ee(W(j))
|
|
2718
|
+
}, [
|
|
2719
|
+
N(i.$slots, `cell-${j.key}`, {
|
|
2720
|
+
row: v,
|
|
2721
|
+
value: I(v, j.key),
|
|
2722
|
+
index: L,
|
|
2723
|
+
column: j
|
|
2724
|
+
}, () => [
|
|
2725
|
+
ae(D(oe(j, v, L)), 1)
|
|
2726
|
+
], !0)
|
|
2727
|
+
], 6))), 128))
|
|
2728
|
+
], 10, co),
|
|
2729
|
+
e.expandable && fe(v, L) ? (l(), u("tr", fo, [
|
|
2730
|
+
x("td", {
|
|
2731
|
+
class: "wx-table__cell wx-table__expansion",
|
|
2732
|
+
colspan: V.value
|
|
2733
|
+
}, [
|
|
2734
|
+
N(i.$slots, "expanded", {
|
|
2735
|
+
row: v,
|
|
2736
|
+
index: L
|
|
2737
|
+
}, void 0, !0)
|
|
2738
|
+
], 8, bo)
|
|
2739
|
+
])) : C("", !0)
|
|
2740
|
+
], 64))), 128)),
|
|
2741
|
+
!f.value.length && !e.loading ? (l(), u("tr", mo, [
|
|
2742
|
+
x("td", {
|
|
2743
|
+
class: "wx-table__cell wx-table__empty",
|
|
2744
|
+
colspan: V.value
|
|
2745
|
+
}, [
|
|
2746
|
+
N(i.$slots, "empty", {}, () => [
|
|
2747
|
+
ae(D(e.emptyText), 1)
|
|
2748
|
+
], !0)
|
|
2749
|
+
], 8, po)
|
|
2750
|
+
])) : C("", !0)
|
|
2751
|
+
]),
|
|
2752
|
+
e.summary.length || i.$slots.footer || g.value ? (l(), u("tfoot", ho, [
|
|
2753
|
+
(l(!0), u(K, null, X(e.summary, (v, L) => (l(), u("tr", {
|
|
2754
|
+
key: L,
|
|
2755
|
+
class: F(["wx-table__summary", [v.class, { "is-strong": v.strong }]])
|
|
2756
|
+
}, [
|
|
2757
|
+
De(v) > 0 ? (l(), u("td", {
|
|
2758
|
+
key: 0,
|
|
2759
|
+
class: "wx-table__cell wx-table__summary-label",
|
|
2760
|
+
colspan: De(v)
|
|
2761
|
+
}, D(v.label), 9, yo)) : C("", !0),
|
|
2762
|
+
(l(!0), u(K, null, X(fa(v), (j) => (l(), u("td", {
|
|
2763
|
+
key: j.key,
|
|
2764
|
+
class: F(["wx-table__cell", $e(j)])
|
|
2765
|
+
}, [
|
|
2766
|
+
N(i.$slots, `summary-${j.key}`, {
|
|
2767
|
+
row: v,
|
|
2768
|
+
value: Ne(v, j)
|
|
2769
|
+
}, () => [
|
|
2770
|
+
ae(D(ba(v, j)), 1)
|
|
2771
|
+
], !0)
|
|
2772
|
+
], 2))), 128))
|
|
2773
|
+
], 2))), 128)),
|
|
2774
|
+
i.$slots.footer || g.value ? (l(), u("tr", xo, [
|
|
2775
|
+
x("td", {
|
|
2776
|
+
class: "wx-table__cell",
|
|
2777
|
+
colspan: V.value
|
|
2778
|
+
}, [
|
|
2779
|
+
N(i.$slots, "footer", {}, () => [
|
|
2780
|
+
O(ea, {
|
|
2781
|
+
page: p.value,
|
|
2782
|
+
"onUpdate:page": k[2] || (k[2] = (v) => p.value = v),
|
|
2783
|
+
"per-page": h.value,
|
|
2784
|
+
"onUpdate:perPage": k[3] || (k[3] = (v) => h.value = v),
|
|
2785
|
+
paginator: m.value,
|
|
2786
|
+
"per-page-options": e.perPageOptions,
|
|
2787
|
+
size: e.size,
|
|
2788
|
+
disabled: e.loading
|
|
2789
|
+
}, null, 8, ["page", "per-page", "paginator", "per-page-options", "size", "disabled"])
|
|
2790
|
+
], !0)
|
|
2791
|
+
], 8, go)
|
|
2792
|
+
])) : C("", !0)
|
|
2793
|
+
])) : C("", !0)
|
|
2794
|
+
], 10, io)
|
|
2795
|
+
], 4),
|
|
2796
|
+
e.loading ? (l(), u("div", ko, [
|
|
2797
|
+
N(i.$slots, "loading", {}, () => [
|
|
2798
|
+
k[7] || (k[7] = x("span", {
|
|
2799
|
+
class: "wx-table__spinner",
|
|
2800
|
+
"aria-hidden": "true"
|
|
2801
|
+
}, null, -1)),
|
|
2802
|
+
k[8] || (k[8] = x("span", { class: "wx-table__loading-text" }, "Loading", -1))
|
|
2151
2803
|
], !0)
|
|
2152
|
-
])) :
|
|
2804
|
+
])) : C("", !0)
|
|
2153
2805
|
], 2));
|
|
2154
2806
|
}
|
|
2155
|
-
}),
|
|
2807
|
+
}), $o = /* @__PURE__ */ Q(wo, [["__scopeId", "data-v-8fdfcfc9"]]), _o = ["aria-label", "onClick"], Bo = ["id", "value", "placeholder", "disabled", "aria-label", "aria-describedby", "aria-invalid", "aria-expanded"], Mo = {
|
|
2156
2808
|
key: 0,
|
|
2157
2809
|
class: "wx-tags-input__list",
|
|
2158
2810
|
role: "listbox"
|
|
2159
|
-
},
|
|
2811
|
+
}, Co = ["aria-selected", "onMousedown", "onMousemove"], So = ["name"], To = ["value"], Io = /* @__PURE__ */ J({
|
|
2160
2812
|
name: "WxTagsInput",
|
|
2161
2813
|
inheritAttrs: !1,
|
|
2162
2814
|
__name: "TagsInput",
|
|
2163
|
-
props: /* @__PURE__ */
|
|
2815
|
+
props: /* @__PURE__ */ R({
|
|
2164
2816
|
suggestions: { default: () => [] },
|
|
2165
2817
|
placeholder: { default: void 0 },
|
|
2166
2818
|
emptyText: { default: "Nothing found" },
|
|
@@ -2177,120 +2829,120 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
2177
2829
|
modelValue: { default: () => [] },
|
|
2178
2830
|
modelModifiers: {}
|
|
2179
2831
|
}),
|
|
2180
|
-
emits: /* @__PURE__ */
|
|
2181
|
-
setup(e, { expose:
|
|
2182
|
-
const
|
|
2183
|
-
() =>
|
|
2184
|
-
),
|
|
2832
|
+
emits: /* @__PURE__ */ R(["change", "search"], ["update:modelValue"]),
|
|
2833
|
+
setup(e, { expose: _, emit: a }) {
|
|
2834
|
+
const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(null), p = q(""), h = q(!1), f = q(-1), m = q(-1), g = d(() => t.value ?? []), y = d(
|
|
2835
|
+
() => n.suggestions.filter((w) => !g.value.includes(w))
|
|
2836
|
+
), P = d(() => h.value && y.value.length > 0), V = d(() => n.max !== void 0 && g.value.length >= n.max), B = d(() => [
|
|
2185
2837
|
"wx-tags-input",
|
|
2186
2838
|
`wx-tags-input--${o.size.value}`,
|
|
2187
2839
|
{
|
|
2188
2840
|
[`wx-tags-input--${o.status.value}`]: o.status.value !== "default",
|
|
2189
|
-
"is-open":
|
|
2841
|
+
"is-open": P.value,
|
|
2190
2842
|
"is-disabled": o.disabled.value
|
|
2191
2843
|
}
|
|
2192
2844
|
]);
|
|
2193
|
-
|
|
2194
|
-
|
|
2845
|
+
ne(y, () => {
|
|
2846
|
+
f.value = -1;
|
|
2195
2847
|
});
|
|
2196
|
-
function
|
|
2197
|
-
|
|
2198
|
-
}
|
|
2199
|
-
function
|
|
2200
|
-
const
|
|
2201
|
-
if (!(!
|
|
2202
|
-
if (!
|
|
2203
|
-
|
|
2848
|
+
function $(w) {
|
|
2849
|
+
t.value = w, s("change", w);
|
|
2850
|
+
}
|
|
2851
|
+
function r(w) {
|
|
2852
|
+
const E = w.trim();
|
|
2853
|
+
if (!(!E || V.value)) {
|
|
2854
|
+
if (!n.duplicates && g.value.includes(E)) {
|
|
2855
|
+
p.value = "";
|
|
2204
2856
|
return;
|
|
2205
2857
|
}
|
|
2206
|
-
|
|
2858
|
+
$([...g.value, E]), p.value = "", h.value = !1, m.value = -1;
|
|
2207
2859
|
}
|
|
2208
2860
|
}
|
|
2209
|
-
function
|
|
2210
|
-
|
|
2861
|
+
function S(w) {
|
|
2862
|
+
$(g.value.filter((E, Z) => Z !== w)), m.value = -1;
|
|
2211
2863
|
}
|
|
2212
|
-
function
|
|
2213
|
-
const
|
|
2214
|
-
|
|
2864
|
+
function z(w) {
|
|
2865
|
+
const E = w.target.value;
|
|
2866
|
+
p.value = E, m.value = -1, f.value = -1, E && (h.value = !0), s("search", E);
|
|
2215
2867
|
}
|
|
2216
|
-
function
|
|
2217
|
-
if (
|
|
2218
|
-
|
|
2868
|
+
function H(w) {
|
|
2869
|
+
if (w.key === "Escape") {
|
|
2870
|
+
h.value = !1, m.value = -1;
|
|
2219
2871
|
return;
|
|
2220
2872
|
}
|
|
2221
|
-
if (
|
|
2222
|
-
|
|
2873
|
+
if (w.key === "Backspace" && p.value === "" && g.value.length > 0) {
|
|
2874
|
+
w.preventDefault(), m.value === g.value.length - 1 ? S(m.value) : m.value = g.value.length - 1;
|
|
2223
2875
|
return;
|
|
2224
2876
|
}
|
|
2225
|
-
if (
|
|
2226
|
-
|
|
2877
|
+
if (w.key === "ArrowDown" && P.value) {
|
|
2878
|
+
w.preventDefault(), f.value = (f.value + 1) % y.value.length;
|
|
2227
2879
|
return;
|
|
2228
2880
|
}
|
|
2229
|
-
if (
|
|
2230
|
-
|
|
2881
|
+
if (w.key === "ArrowUp" && P.value) {
|
|
2882
|
+
w.preventDefault(), f.value = f.value <= 0 ? y.value.length - 1 : f.value - 1;
|
|
2231
2883
|
return;
|
|
2232
2884
|
}
|
|
2233
|
-
|
|
2885
|
+
w.key === "Enter" && (w.preventDefault(), P.value && f.value >= 0 ? r(y.value[f.value]) : n.allowCreate && r(p.value));
|
|
2234
2886
|
}
|
|
2235
|
-
function
|
|
2236
|
-
|
|
2237
|
-
|
|
2887
|
+
function M() {
|
|
2888
|
+
m.value = -1, window.setTimeout(() => {
|
|
2889
|
+
h.value = !1;
|
|
2238
2890
|
}, 120);
|
|
2239
2891
|
}
|
|
2240
|
-
return
|
|
2241
|
-
class:
|
|
2892
|
+
return _({ focus: () => c.value?.focus() }), (w, E) => (l(), u("div", {
|
|
2893
|
+
class: F(B.value)
|
|
2242
2894
|
}, [
|
|
2243
|
-
|
|
2895
|
+
x("div", {
|
|
2244
2896
|
class: "wx-tags-input__anchor",
|
|
2245
|
-
onClick:
|
|
2897
|
+
onClick: E[1] || (E[1] = (Z) => c.value?.focus())
|
|
2246
2898
|
}, [
|
|
2247
|
-
(
|
|
2248
|
-
key:
|
|
2249
|
-
class:
|
|
2899
|
+
(l(!0), u(K, null, X(g.value, (Z, W) => (l(), u("span", {
|
|
2900
|
+
key: Z,
|
|
2901
|
+
class: F(["wx-tags-input__tag", { "is-armed": W === m.value }])
|
|
2250
2902
|
}, [
|
|
2251
|
-
|
|
2252
|
-
|
|
2903
|
+
ae(D(Z) + " ", 1),
|
|
2904
|
+
b(o).disabled.value ? C("", !0) : (l(), u("button", {
|
|
2253
2905
|
key: 0,
|
|
2254
2906
|
class: "wx-tags-input__remove",
|
|
2255
2907
|
type: "button",
|
|
2256
2908
|
tabindex: "-1",
|
|
2257
|
-
"aria-label": `Remove ${
|
|
2258
|
-
onClick:
|
|
2259
|
-
}, " ✕ ", 8,
|
|
2909
|
+
"aria-label": `Remove ${Z}`,
|
|
2910
|
+
onClick: de((U) => S(W), ["stop"])
|
|
2911
|
+
}, " ✕ ", 8, _o))
|
|
2260
2912
|
], 2))), 128)),
|
|
2261
|
-
|
|
2262
|
-
id:
|
|
2913
|
+
x("input", te({
|
|
2914
|
+
id: b(o).id.value,
|
|
2263
2915
|
ref_key: "inputRef",
|
|
2264
|
-
ref:
|
|
2265
|
-
},
|
|
2916
|
+
ref: c
|
|
2917
|
+
}, w.$attrs, {
|
|
2266
2918
|
class: "wx-tags-input__field",
|
|
2267
2919
|
type: "text",
|
|
2268
2920
|
role: "combobox",
|
|
2269
2921
|
autocomplete: "off",
|
|
2270
|
-
value:
|
|
2922
|
+
value: p.value,
|
|
2271
2923
|
placeholder: e.placeholder,
|
|
2272
|
-
disabled:
|
|
2924
|
+
disabled: b(o).disabled.value,
|
|
2273
2925
|
"aria-label": e.ariaLabel,
|
|
2274
|
-
"aria-describedby":
|
|
2275
|
-
"aria-invalid":
|
|
2276
|
-
"aria-expanded":
|
|
2277
|
-
onInput:
|
|
2278
|
-
onKeydown:
|
|
2279
|
-
onFocus:
|
|
2280
|
-
onBlur:
|
|
2281
|
-
}), null, 16,
|
|
2282
|
-
|
|
2283
|
-
(
|
|
2284
|
-
key:
|
|
2285
|
-
class:
|
|
2926
|
+
"aria-describedby": b(o).describedBy.value,
|
|
2927
|
+
"aria-invalid": b(o).status.value === "error" || void 0,
|
|
2928
|
+
"aria-expanded": P.value,
|
|
2929
|
+
onInput: z,
|
|
2930
|
+
onKeydown: H,
|
|
2931
|
+
onFocus: E[0] || (E[0] = (Z) => h.value = !0),
|
|
2932
|
+
onBlur: M
|
|
2933
|
+
}), null, 16, Bo),
|
|
2934
|
+
P.value ? (l(), u("ul", Mo, [
|
|
2935
|
+
(l(!0), u(K, null, X(y.value, (Z, W) => (l(), u("li", {
|
|
2936
|
+
key: Z,
|
|
2937
|
+
class: F(["wx-tags-input__option", { "is-highlighted": W === f.value }]),
|
|
2286
2938
|
role: "option",
|
|
2287
|
-
"aria-selected":
|
|
2288
|
-
onMousedown:
|
|
2289
|
-
onMousemove: (
|
|
2290
|
-
},
|
|
2291
|
-
])) :
|
|
2939
|
+
"aria-selected": W === f.value,
|
|
2940
|
+
onMousedown: de((U) => r(Z), ["prevent"]),
|
|
2941
|
+
onMousemove: (U) => f.value = W
|
|
2942
|
+
}, D(Z), 43, Co))), 128))
|
|
2943
|
+
])) : C("", !0)
|
|
2292
2944
|
]),
|
|
2293
|
-
e.name ? (
|
|
2945
|
+
e.name ? (l(), u("select", {
|
|
2294
2946
|
key: 0,
|
|
2295
2947
|
class: "wx-sr-only",
|
|
2296
2948
|
name: e.name,
|
|
@@ -2298,22 +2950,22 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
2298
2950
|
tabindex: "-1",
|
|
2299
2951
|
"aria-hidden": "true"
|
|
2300
2952
|
}, [
|
|
2301
|
-
(
|
|
2302
|
-
key:
|
|
2303
|
-
value:
|
|
2953
|
+
(l(!0), u(K, null, X(g.value, (Z) => (l(), u("option", {
|
|
2954
|
+
key: Z,
|
|
2955
|
+
value: Z,
|
|
2304
2956
|
selected: ""
|
|
2305
|
-
},
|
|
2306
|
-
], 8,
|
|
2957
|
+
}, D(Z), 9, To))), 128))
|
|
2958
|
+
], 8, So)) : C("", !0)
|
|
2307
2959
|
], 2));
|
|
2308
2960
|
}
|
|
2309
|
-
}),
|
|
2961
|
+
}), Vo = /* @__PURE__ */ Q(Io, [["__scopeId", "data-v-fcf7fe37"]]), zo = ["id", "value", "rows", "placeholder", "disabled", "readonly", "maxlength", "aria-label", "aria-describedby", "aria-invalid"], Po = {
|
|
2310
2962
|
key: 0,
|
|
2311
2963
|
class: "wx-textarea__count"
|
|
2312
|
-
},
|
|
2964
|
+
}, Wo = /* @__PURE__ */ J({
|
|
2313
2965
|
name: "WxTextarea",
|
|
2314
2966
|
inheritAttrs: !1,
|
|
2315
2967
|
__name: "Textarea",
|
|
2316
|
-
props: /* @__PURE__ */
|
|
2968
|
+
props: /* @__PURE__ */ R({
|
|
2317
2969
|
size: { default: void 0 },
|
|
2318
2970
|
status: { default: void 0 },
|
|
2319
2971
|
id: { default: void 0 },
|
|
@@ -2330,81 +2982,81 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
2330
2982
|
modelValue: { default: "" },
|
|
2331
2983
|
modelModifiers: {}
|
|
2332
2984
|
}),
|
|
2333
|
-
emits: /* @__PURE__ */
|
|
2334
|
-
setup(e, { expose:
|
|
2335
|
-
const
|
|
2336
|
-
() =>
|
|
2337
|
-
),
|
|
2338
|
-
() =>
|
|
2339
|
-
),
|
|
2985
|
+
emits: /* @__PURE__ */ R(["input", "change", "focus", "blur"], ["update:modelValue"]),
|
|
2986
|
+
setup(e, { expose: _, emit: a }) {
|
|
2987
|
+
const n = e, s = a, t = G(e, "modelValue"), o = le(n), c = q(null), p = q(!1), h = d(() => t.value ?? ""), f = d(
|
|
2988
|
+
() => n.showCount && n.maxlength ? `${h.value.length}/${n.maxlength}` : null
|
|
2989
|
+
), m = d(
|
|
2990
|
+
() => n.autosize === !0 ? {} : n.autosize === !1 ? null : n.autosize
|
|
2991
|
+
), g = d(() => [
|
|
2340
2992
|
"wx-textarea",
|
|
2341
2993
|
`wx-textarea--${o.size.value}`,
|
|
2342
2994
|
{
|
|
2343
2995
|
[`wx-textarea--${o.status.value}`]: o.status.value !== "default",
|
|
2344
|
-
"is-focused":
|
|
2996
|
+
"is-focused": p.value,
|
|
2345
2997
|
"is-disabled": o.disabled.value,
|
|
2346
|
-
"is-readonly":
|
|
2347
|
-
"is-autosize": !!
|
|
2998
|
+
"is-readonly": n.readonly,
|
|
2999
|
+
"is-autosize": !!m.value
|
|
2348
3000
|
}
|
|
2349
3001
|
]);
|
|
2350
|
-
function
|
|
2351
|
-
const
|
|
2352
|
-
if (!
|
|
2353
|
-
|
|
2354
|
-
const
|
|
2355
|
-
let
|
|
2356
|
-
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
function
|
|
2360
|
-
const
|
|
2361
|
-
|
|
2362
|
-
}
|
|
2363
|
-
function
|
|
2364
|
-
|
|
2365
|
-
}
|
|
2366
|
-
function
|
|
2367
|
-
|
|
2368
|
-
}
|
|
2369
|
-
function
|
|
2370
|
-
|
|
2371
|
-
}
|
|
2372
|
-
return
|
|
2373
|
-
focus: () =>
|
|
2374
|
-
blur: () =>
|
|
2375
|
-
select: () =>
|
|
2376
|
-
textarea:
|
|
2377
|
-
}), (
|
|
2378
|
-
class:
|
|
3002
|
+
function y() {
|
|
3003
|
+
const r = m.value, S = c.value;
|
|
3004
|
+
if (!r || !S) return;
|
|
3005
|
+
S.style.height = "auto";
|
|
3006
|
+
const z = getComputedStyle(S), H = Number.parseFloat(z.lineHeight) || 20, M = Number.parseFloat(z.paddingTop) + Number.parseFloat(z.paddingBottom) + Number.parseFloat(z.borderTopWidth) + Number.parseFloat(z.borderBottomWidth);
|
|
3007
|
+
let w = S.scrollHeight;
|
|
3008
|
+
r.minRows && (w = Math.max(w, r.minRows * H + M)), r.maxRows && (w = Math.min(w, r.maxRows * H + M)), S.style.height = `${w}px`, S.style.overflowY = r.maxRows && S.scrollHeight > w ? "auto" : "hidden";
|
|
3009
|
+
}
|
|
3010
|
+
Ce(() => Ue(y)), ne([h, m], () => Ue(y));
|
|
3011
|
+
function P(r) {
|
|
3012
|
+
const S = r.target.value;
|
|
3013
|
+
t.value = S, s("input", S);
|
|
3014
|
+
}
|
|
3015
|
+
function V(r) {
|
|
3016
|
+
s("change", r.target.value);
|
|
3017
|
+
}
|
|
3018
|
+
function B(r) {
|
|
3019
|
+
p.value = !0, s("focus", r);
|
|
3020
|
+
}
|
|
3021
|
+
function $(r) {
|
|
3022
|
+
p.value = !1, s("blur", r);
|
|
3023
|
+
}
|
|
3024
|
+
return _({
|
|
3025
|
+
focus: () => c.value?.focus(),
|
|
3026
|
+
blur: () => c.value?.blur(),
|
|
3027
|
+
select: () => c.value?.select(),
|
|
3028
|
+
textarea: c
|
|
3029
|
+
}), (r, S) => (l(), u("div", {
|
|
3030
|
+
class: F(g.value)
|
|
2379
3031
|
}, [
|
|
2380
|
-
|
|
2381
|
-
id:
|
|
3032
|
+
x("textarea", te({
|
|
3033
|
+
id: b(o).id.value,
|
|
2382
3034
|
ref_key: "textareaRef",
|
|
2383
|
-
ref:
|
|
2384
|
-
},
|
|
3035
|
+
ref: c
|
|
3036
|
+
}, r.$attrs, {
|
|
2385
3037
|
class: "wx-textarea__inner",
|
|
2386
|
-
value:
|
|
3038
|
+
value: h.value,
|
|
2387
3039
|
rows: e.rows,
|
|
2388
3040
|
placeholder: e.placeholder,
|
|
2389
|
-
disabled:
|
|
3041
|
+
disabled: b(o).disabled.value,
|
|
2390
3042
|
readonly: e.readonly,
|
|
2391
3043
|
maxlength: e.maxlength,
|
|
2392
3044
|
"aria-label": e.ariaLabel,
|
|
2393
|
-
"aria-describedby":
|
|
2394
|
-
"aria-invalid":
|
|
3045
|
+
"aria-describedby": b(o).describedBy.value,
|
|
3046
|
+
"aria-invalid": b(o).status.value === "error" || void 0,
|
|
2395
3047
|
style: { resize: e.resize },
|
|
2396
|
-
onInput:
|
|
2397
|
-
onChange:
|
|
2398
|
-
onFocus:
|
|
2399
|
-
onBlur:
|
|
2400
|
-
}), null, 16,
|
|
2401
|
-
|
|
3048
|
+
onInput: P,
|
|
3049
|
+
onChange: V,
|
|
3050
|
+
onFocus: B,
|
|
3051
|
+
onBlur: $
|
|
3052
|
+
}), null, 16, zo),
|
|
3053
|
+
f.value ? (l(), u("span", Po, D(f.value), 1)) : C("", !0)
|
|
2402
3054
|
], 2));
|
|
2403
3055
|
}
|
|
2404
|
-
}),
|
|
3056
|
+
}), Ao = /* @__PURE__ */ Q(Wo, [["__scopeId", "data-v-bbca9693"]]), Lo = /* @__PURE__ */ J({
|
|
2405
3057
|
name: "WxTimePicker",
|
|
2406
3058
|
__name: "TimePicker",
|
|
2407
|
-
props: /* @__PURE__ */
|
|
3059
|
+
props: /* @__PURE__ */ R({
|
|
2408
3060
|
valueFormat: { default: void 0 },
|
|
2409
3061
|
format: { default: void 0 },
|
|
2410
3062
|
placeholder: { default: void 0 },
|
|
@@ -2431,77 +3083,81 @@ const Ca = ["id", "name", "checked", "disabled", "aria-label", "aria-describedby
|
|
|
2431
3083
|
}),
|
|
2432
3084
|
emits: ["update:modelValue"],
|
|
2433
3085
|
setup(e) {
|
|
2434
|
-
const
|
|
2435
|
-
return (a,
|
|
2436
|
-
modelValue:
|
|
2437
|
-
"onUpdate:modelValue":
|
|
3086
|
+
const _ = G(e, "modelValue");
|
|
3087
|
+
return (a, n) => (l(), ie(Ie, te({
|
|
3088
|
+
modelValue: _.value,
|
|
3089
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => _.value = s),
|
|
2438
3090
|
type: "time"
|
|
2439
|
-
}, a.$props),
|
|
2440
|
-
|
|
2441
|
-
name:
|
|
2442
|
-
fn:
|
|
2443
|
-
|
|
3091
|
+
}, a.$props), ge({ _: 2 }, [
|
|
3092
|
+
X(a.$slots, (s, t) => ({
|
|
3093
|
+
name: t,
|
|
3094
|
+
fn: Y((o) => [
|
|
3095
|
+
N(a.$slots, t, ke(we(o ?? {})))
|
|
2444
3096
|
])
|
|
2445
3097
|
}))
|
|
2446
3098
|
]), 1040, ["modelValue"]));
|
|
2447
3099
|
}
|
|
2448
|
-
}),
|
|
3100
|
+
}), Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2449
3101
|
__proto__: null,
|
|
2450
|
-
WxButton:
|
|
2451
|
-
WxCard:
|
|
2452
|
-
WxCheckbox:
|
|
2453
|
-
WxCheckboxGroup:
|
|
2454
|
-
WxColorPicker:
|
|
2455
|
-
WxDatePicker:
|
|
2456
|
-
WxDateRangePicker:
|
|
2457
|
-
WxDateTimePicker:
|
|
2458
|
-
WxForm:
|
|
2459
|
-
WxFormItem:
|
|
2460
|
-
WxInput:
|
|
2461
|
-
WxInputNumber:
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
3102
|
+
WxButton: lt,
|
|
3103
|
+
WxCard: ft,
|
|
3104
|
+
WxCheckbox: ye,
|
|
3105
|
+
WxCheckboxGroup: _t,
|
|
3106
|
+
WxColorPicker: It,
|
|
3107
|
+
WxDatePicker: Ie,
|
|
3108
|
+
WxDateRangePicker: Vt,
|
|
3109
|
+
WxDateTimePicker: zt,
|
|
3110
|
+
WxForm: Wt,
|
|
3111
|
+
WxFormItem: Ht,
|
|
3112
|
+
WxInput: Qe,
|
|
3113
|
+
WxInputNumber: Yt,
|
|
3114
|
+
WxPagination: ea,
|
|
3115
|
+
WxRadio: aa,
|
|
3116
|
+
WxRadioGroup: fl,
|
|
3117
|
+
WxRate: xl,
|
|
2465
3118
|
WxRichText: Fl,
|
|
2466
|
-
WxSelect:
|
|
2467
|
-
WxSlider:
|
|
2468
|
-
WxSwitch:
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
3119
|
+
WxSelect: jl,
|
|
3120
|
+
WxSlider: Xl,
|
|
3121
|
+
WxSwitch: eo,
|
|
3122
|
+
WxTable: $o,
|
|
3123
|
+
WxTagsInput: Vo,
|
|
3124
|
+
WxTextarea: Ao,
|
|
3125
|
+
WxTimePicker: Lo
|
|
3126
|
+
}, Symbol.toStringTag, { value: "Module" })), Go = {
|
|
3127
|
+
install(e, _ = {}) {
|
|
3128
|
+
const { prefix: a = "Wx" } = _;
|
|
3129
|
+
for (const [n, s] of Object.entries(Ro)) {
|
|
3130
|
+
if (!n.startsWith("Wx")) continue;
|
|
3131
|
+
const t = a === "Wx" ? n : `${a}${n.slice(2)}`;
|
|
3132
|
+
e.component(t, s);
|
|
2479
3133
|
}
|
|
2480
3134
|
}
|
|
2481
3135
|
};
|
|
2482
3136
|
export {
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
3137
|
+
Go as WebxUI,
|
|
3138
|
+
lt as WxButton,
|
|
3139
|
+
ft as WxCard,
|
|
3140
|
+
ye as WxCheckbox,
|
|
3141
|
+
_t as WxCheckboxGroup,
|
|
3142
|
+
It as WxColorPicker,
|
|
3143
|
+
Ie as WxDatePicker,
|
|
3144
|
+
Vt as WxDateRangePicker,
|
|
3145
|
+
zt as WxDateTimePicker,
|
|
3146
|
+
Wt as WxForm,
|
|
3147
|
+
Ht as WxFormItem,
|
|
3148
|
+
Qe as WxInput,
|
|
3149
|
+
Yt as WxInputNumber,
|
|
3150
|
+
ea as WxPagination,
|
|
3151
|
+
aa as WxRadio,
|
|
3152
|
+
fl as WxRadioGroup,
|
|
3153
|
+
xl as WxRate,
|
|
2499
3154
|
Fl as WxRichText,
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
3155
|
+
jl as WxSelect,
|
|
3156
|
+
Xl as WxSlider,
|
|
3157
|
+
eo as WxSwitch,
|
|
3158
|
+
$o as WxTable,
|
|
3159
|
+
Vo as WxTagsInput,
|
|
3160
|
+
Ao as WxTextarea,
|
|
3161
|
+
Lo as WxTimePicker
|
|
2506
3162
|
};
|
|
2507
3163
|
//# sourceMappingURL=index.js.map
|