@ithinkdt/ui 4.0.6 → 4.0.8
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/{DataTable-D6hPSWvx.js → DataTable-DEb9CRCZ.js} +6 -5
- package/dist/{assets-_Fpf0gbI.js → assets-bJgPKDh1.js} +3 -1
- package/dist/components.js +185 -173
- package/dist/composables.js +2 -0
- package/dist/{directives-DXNnV4xc.js → directives-pwYPe_53.js} +11 -16
- package/dist/directives.js +1 -1
- package/dist/index.js +155 -141
- package/dist/page.js +184 -183
- package/dist/{use-i18n-Cmb7Xx7d.js → use-i18n-D1TTDOML.js} +3 -1
- package/dist/use-style.js +3 -1
- package/esm/page.d.ts +2 -2
- package/package.json +10 -10
- package/unocss-preset.js +1 -1
package/dist/components.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { n as e } from "./use-i18n-
|
|
1
|
+
import { n as e } from "./use-i18n-D1TTDOML.js";
|
|
2
2
|
import t, { cB as n, cE as r, useClsPrefix as i } from "./use-style.js";
|
|
3
|
-
import { i as a } from "./directives-
|
|
4
|
-
import { _ as o, a as s, c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S, v as C } from "./assets-
|
|
5
|
-
import { Fragment as w, computed as T, createTextVNode as E, createVNode as D, defineAsyncComponent as O, defineComponent as k, h as A, inject as ee, isVNode as j, markRaw as M, mergeProps as N, nextTick as te, reactive as P, ref as F, shallowRef as ne, toRaw as re, toRef as ie, toValue as
|
|
3
|
+
import { i as a } from "./directives-pwYPe_53.js";
|
|
4
|
+
import { _ as o, a as s, c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S, v as C } from "./assets-bJgPKDh1.js";
|
|
5
|
+
import { Fragment as w, computed as T, createTextVNode as E, createVNode as D, defineAsyncComponent as O, defineComponent as k, h as A, inject as ee, isVNode as j, markRaw as M, mergeProps as N, nextTick as te, reactive as P, ref as F, renderSlot as I, shallowRef as ne, toRaw as re, toRef as ie, toValue as L, unref as ae, watch as R, withDirectives as oe } from "vue";
|
|
6
6
|
import { until as se } from "@vueuse/core";
|
|
7
|
-
import { NAnchor as ce, NAnchorLink as le, NAvatar as
|
|
7
|
+
import { NAnchor as ce, NAnchorLink as le, NAvatar as z, NAvatarGroup as ue, NButton as B, NCard as de, NCheckbox as V, NCheckboxGroup as fe, NDropdown as pe, NEllipsis as me, NEmpty as he, NFlex as H, NForm as ge, NFormItem as _e, NGi as ve, NGrid as ye, NIcon as U, NInput as be, NList as xe, NListItem as Se, NPagination as Ce, NPopover as W, NRadio as we, NRadioButton as Te, NRadioGroup as Ee, NSelect as De, NSpin as Oe, NTag as ke, NText as G, NTooltip as Ae, NTransfer as je, NTree as Me, NTreeSelect as Ne, formProps as Pe, useDialog as Fe } from "ithinkdt-ui";
|
|
8
8
|
import { nanoid as Ie } from "nanoid";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { isNullish as Le, pickProps as K } from "@ithinkdt/common/object";
|
|
10
|
+
import { VOverflow as Re, VResizeObserver as ze } from "vueuc";
|
|
11
|
+
import { Sortable as Be } from "sortablejs/modular/sortable.core.esm.js";
|
|
12
12
|
import { useFormItem as Ve } from "ithinkdt-ui/es/_mixins";
|
|
13
13
|
import { measureText as He } from "@ithinkdt/common/string";
|
|
14
14
|
import { useFormModal as Ue } from "@ithinkdt/page";
|
|
15
15
|
import We from "ithinkdt-ui/es/_mixins/use-locale.mjs";
|
|
16
16
|
import { flattenTree as Ge, walkTree as Ke } from "@ithinkdt/common";
|
|
17
|
-
|
|
17
|
+
//#region src/components/Checkboxes.jsx
|
|
18
|
+
var qe = /* @__PURE__ */ k({
|
|
18
19
|
name: "Checkboxes",
|
|
19
20
|
inheritAttrs: !1,
|
|
20
21
|
props: {
|
|
@@ -69,7 +70,7 @@ const qe = k({
|
|
|
69
70
|
},
|
|
70
71
|
setup(t, { emit: n, attrs: r }) {
|
|
71
72
|
let { t: i } = e(), a = T(() => t.default ? t.default === !0 ? i("common.all") : typeof t.default == "string" ? t.default : t.default?.[t.labelField] ?? i("common.all") : ""), o = F([]);
|
|
72
|
-
|
|
73
|
+
R(() => t.modelValue, (e) => o.value = e, { immediate: !0 });
|
|
73
74
|
let s = (e) => {
|
|
74
75
|
n("update:modelValue", e), n("updateModelValue", e);
|
|
75
76
|
}, c = () => {
|
|
@@ -83,7 +84,7 @@ const qe = k({
|
|
|
83
84
|
size: t.gap ?? (t.vertical ? void 0 : "small"),
|
|
84
85
|
vertical: t.vertical,
|
|
85
86
|
style: !t.default && t.vertical ? { padding: "6px 0 0" } : {}
|
|
86
|
-
}, { default: () => [t.options?.map((e) => D(
|
|
87
|
+
}, { default: () => [t.options?.map((e) => D(V, {
|
|
87
88
|
value: e[t.valueField],
|
|
88
89
|
disabled: e[t.disabledField],
|
|
89
90
|
style: u.value
|
|
@@ -92,7 +93,7 @@ const qe = k({
|
|
|
92
93
|
size: t.gap ?? (t.vertical ? void 0 : "small"),
|
|
93
94
|
vertical: t.vertical,
|
|
94
95
|
style: t.vertical ? { padding: "6px 0 0" } : {}
|
|
95
|
-
}, { default: () => [D("span", null, [D(
|
|
96
|
+
}, { default: () => [D("span", null, [D(V, {
|
|
96
97
|
indeterminate: l.value,
|
|
97
98
|
checked: o.value?.length > 0,
|
|
98
99
|
onUpdateChecked: c,
|
|
@@ -100,7 +101,7 @@ const qe = k({
|
|
|
100
101
|
}, { default: () => [a.value] })]), e] }) : e;
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
|
-
}), Je = k({
|
|
104
|
+
}), Je = /* @__PURE__ */ k({
|
|
104
105
|
name: "DataActions",
|
|
105
106
|
props: { options: {
|
|
106
107
|
type: Array,
|
|
@@ -116,7 +117,7 @@ const qe = k({
|
|
|
116
117
|
}, l = () => {}, u = T(() => o.value === -1 ? [] : e.options.slice(o.value).map((e) => ({
|
|
117
118
|
...e,
|
|
118
119
|
key: e.text
|
|
119
|
-
}))), d = (e) => D(
|
|
120
|
+
}))), d = (e) => D(B, {
|
|
120
121
|
type: e.color === "danger" ? "error" : [
|
|
121
122
|
"default",
|
|
122
123
|
"tertiary",
|
|
@@ -130,7 +131,7 @@ const qe = k({
|
|
|
130
131
|
}, { default: () => [e.text] }), p = (e, t) => {
|
|
131
132
|
t.onClick?.();
|
|
132
133
|
};
|
|
133
|
-
return () => D(
|
|
134
|
+
return () => D(ze, { onResize: r }, { default: () => [D(Re, {
|
|
134
135
|
ref: t,
|
|
135
136
|
getCounter: a,
|
|
136
137
|
onUpdateCount: s,
|
|
@@ -138,7 +139,7 @@ const qe = k({
|
|
|
138
139
|
updateCounter: l,
|
|
139
140
|
style: "margin-top: 2px"
|
|
140
141
|
}, {
|
|
141
|
-
default: () => e.options.map((e) => D(
|
|
142
|
+
default: () => e.options.map((e) => D(B, {
|
|
142
143
|
quaternary: !0,
|
|
143
144
|
type: e.color === "danger" ? "error" : [
|
|
144
145
|
"default",
|
|
@@ -155,21 +156,23 @@ const qe = k({
|
|
|
155
156
|
counter: () => D("span", {
|
|
156
157
|
ref: i,
|
|
157
158
|
style: "position: absolute"
|
|
158
|
-
}, [D(
|
|
159
|
+
}, [D(pe, {
|
|
159
160
|
options: u.value,
|
|
160
161
|
renderLabel: d,
|
|
161
162
|
onSelect: p
|
|
162
|
-
}, { default: () => [D(
|
|
163
|
+
}, { default: () => [D(B, {
|
|
163
164
|
quaternary: !0,
|
|
164
165
|
size: "small"
|
|
165
166
|
}, { default: () => [D(f, { style: "font-size: 14px; color: #888" }, null)] })] })])
|
|
166
167
|
})] });
|
|
167
168
|
}
|
|
168
169
|
});
|
|
169
|
-
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/components/DataCustom.jsx
|
|
172
|
+
function q(e) {
|
|
170
173
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !j(e);
|
|
171
174
|
}
|
|
172
|
-
var Ye = k({
|
|
175
|
+
var Ye = /* @__PURE__ */ k({
|
|
173
176
|
name: "DataCustomRow",
|
|
174
177
|
props: {
|
|
175
178
|
label: [String, Function],
|
|
@@ -187,31 +190,30 @@ var Ye = k({
|
|
|
187
190
|
wrap: !1,
|
|
188
191
|
size: "small"
|
|
189
192
|
}, { default: () => [
|
|
190
|
-
D(
|
|
193
|
+
D(B, {
|
|
191
194
|
type: "primary",
|
|
192
195
|
text: !0,
|
|
193
196
|
class: "icon-drag"
|
|
194
|
-
}, { default: () => [D(
|
|
195
|
-
D(
|
|
197
|
+
}, { default: () => [D(U, { size: "18" }, { default: () => [D(b, null, null)] })] }),
|
|
198
|
+
D(V, {
|
|
196
199
|
checked: !e.hidden,
|
|
197
200
|
disabled: e.disabled,
|
|
198
201
|
onUpdateChecked: (e) => t("update-hidden", !e)
|
|
199
202
|
}, null),
|
|
200
|
-
D(
|
|
201
|
-
e.showFixed ? [D(
|
|
203
|
+
D(me, { style: "flex: 1 1 auto" }, q(n = L(e.label)) ? n : { default: () => [n] }),
|
|
204
|
+
e.showFixed ? [D(B, {
|
|
202
205
|
text: !0,
|
|
203
206
|
type: e.fixed === "left" ? "primary" : void 0,
|
|
204
207
|
onClick: () => t("update-fixed", e.fixed === "left" ? !1 : "left")
|
|
205
|
-
}, { default: () => [D(
|
|
208
|
+
}, { default: () => [D(U, null, { default: () => [D(h, null, null)] })] }), D(B, {
|
|
206
209
|
text: !0,
|
|
207
210
|
type: e.fixed === "right" ? "primary" : void 0,
|
|
208
211
|
onClick: () => t("update-fixed", e.fixed === "right" ? !1 : "right")
|
|
209
|
-
}, { default: () => [D(
|
|
212
|
+
}, { default: () => [D(U, null, { default: () => [D(o, null, null)] })] })] : void 0
|
|
210
213
|
] });
|
|
211
214
|
};
|
|
212
215
|
}
|
|
213
|
-
})
|
|
214
|
-
const Xe = k({
|
|
216
|
+
}), Xe = /* @__PURE__ */ k({
|
|
215
217
|
name: "DataCustom",
|
|
216
218
|
props: {
|
|
217
219
|
data: {
|
|
@@ -263,8 +265,8 @@ const Xe = k({
|
|
|
263
265
|
});
|
|
264
266
|
}
|
|
265
267
|
let o = F();
|
|
266
|
-
return
|
|
267
|
-
e.$el &&
|
|
268
|
+
return R(o, (e) => {
|
|
269
|
+
e.$el && Be.create(e.$el, {
|
|
268
270
|
animation: 150,
|
|
269
271
|
ghostClass: "ghost",
|
|
270
272
|
handle: ".icon-drag",
|
|
@@ -274,28 +276,28 @@ const Xe = k({
|
|
|
274
276
|
r.splice(e.newIndex, 0, i), n("custom", r);
|
|
275
277
|
}
|
|
276
278
|
});
|
|
277
|
-
}), () => D(
|
|
279
|
+
}), () => D(W, {
|
|
278
280
|
trigger: "click",
|
|
279
281
|
scrollable: !0,
|
|
280
282
|
placement: "left-start",
|
|
281
283
|
displayDirective: "show",
|
|
282
284
|
style: "max-height: 400px; width: 240px"
|
|
283
285
|
}, {
|
|
284
|
-
trigger: () => oe(D(
|
|
286
|
+
trigger: () => oe(D(B, {
|
|
285
287
|
text: !0,
|
|
286
288
|
type: t.type
|
|
287
|
-
}, { default: () => [D(
|
|
289
|
+
}, { default: () => [D(U, { size: t.size }, { default: () => [D(p, null, null)] })] }), [[a, t.tooltip ?? r("common.page.custom.tooltip")]]),
|
|
288
290
|
default: () => {
|
|
289
291
|
let e, a;
|
|
290
|
-
return D(H, { vertical: !0 }, { default: () => [D(H, { justify: "space-between" }, { default: () => [D("div", { style: "font-weight: bold" }, [t.tooltip ?? r("common.page.custom.tooltip")]), D(
|
|
292
|
+
return D(H, { vertical: !0 }, { default: () => [D(H, { justify: "space-between" }, { default: () => [D("div", { style: "font-weight: bold" }, [t.tooltip ?? r("common.page.custom.tooltip")]), D(B, {
|
|
291
293
|
text: !0,
|
|
292
294
|
type: "primary",
|
|
293
295
|
size: "small",
|
|
294
296
|
onClick: () => n("custom", !0)
|
|
295
|
-
},
|
|
297
|
+
}, q(e = r("common.page.custom.reset")) ? e : { default: () => [e] })] }), D(H, {
|
|
296
298
|
ref: o,
|
|
297
299
|
vertical: !0
|
|
298
|
-
},
|
|
300
|
+
}, q(a = t.data.filter((e) => e[t.visibleField] !== !1).map((e) => D(Ye, {
|
|
299
301
|
key: e[t.keyField],
|
|
300
302
|
label: e[t.labelField],
|
|
301
303
|
hidden: e[t.hiddenField],
|
|
@@ -308,15 +310,17 @@ const Xe = k({
|
|
|
308
310
|
});
|
|
309
311
|
}
|
|
310
312
|
});
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/components/DataDescriptions.jsx
|
|
311
315
|
function Ze(e) {
|
|
312
316
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !j(e);
|
|
313
317
|
}
|
|
314
|
-
function
|
|
318
|
+
function J(e, t) {
|
|
315
319
|
return typeof e == "function" ? e(t) : e;
|
|
316
320
|
}
|
|
317
321
|
function Qe(e, t) {
|
|
318
322
|
return e.isGroup ? (e.__children ??= e.children?.filter((e) => e.isGroup) ?? [], D(le, { href: `#${e.prop}` }, {
|
|
319
|
-
title: () =>
|
|
323
|
+
title: () => J(e.label, t),
|
|
320
324
|
default: e.__children?.length ? () => e.__children.map((e) => Qe(e, t)) : void 0
|
|
321
325
|
})) : null;
|
|
322
326
|
}
|
|
@@ -328,16 +332,16 @@ function et(e, t, n, r) {
|
|
|
328
332
|
key: e.prop,
|
|
329
333
|
class: `${r}__group`,
|
|
330
334
|
id: e.prop
|
|
331
|
-
}, [D("div", { class: `${r}__title` }, [
|
|
335
|
+
}, [D("div", { class: `${r}__title` }, [J(e.label, n)]), D("div", { class: `${r}__wrapper` }, [e.children?.map((e) => et(e, t, n, r))])]) : D("div", {
|
|
332
336
|
key: e.prop,
|
|
333
337
|
class: `${r}__item`,
|
|
334
338
|
style: {
|
|
335
339
|
"--descriptions-col-span": $e(e.colSpan, t, n) ?? 1,
|
|
336
340
|
"--descriptions-row-span": $e(e.rowSpan, t, n) ?? 1
|
|
337
341
|
}
|
|
338
|
-
}, [e.label ? D("div", { class: `${r}__label` }, [
|
|
342
|
+
}, [e.label ? D("div", { class: `${r}__label` }, [J(e.label, n)]) : void 0, D("div", { class: `${r}__content` }, [(n ? e.render ? e.render(n) : n[e.prop] : void 0) ?? D("span", { class: `${r}__nothing` }, [E("--")])])]);
|
|
339
343
|
}
|
|
340
|
-
|
|
344
|
+
var tt = /* @__PURE__ */ k({
|
|
341
345
|
name: "DataDescriptions",
|
|
342
346
|
props: {
|
|
343
347
|
cols: {
|
|
@@ -359,7 +363,7 @@ const tt = k({
|
|
|
359
363
|
let n = i(), r = `${n.value}-data-descriptions`;
|
|
360
364
|
t("-data-descriptions", nt, n);
|
|
361
365
|
let a = F();
|
|
362
|
-
|
|
366
|
+
R(() => e.items, () => {
|
|
363
367
|
location.hash && se(a).toBeTruthy().then((e) => {
|
|
364
368
|
e.scrollTo(location.hash);
|
|
365
369
|
});
|
|
@@ -371,7 +375,7 @@ const tt = k({
|
|
|
371
375
|
affix: !0
|
|
372
376
|
}, e.anchor && typeof e.anchor == "object" ? e.anchor : {}));
|
|
373
377
|
return () => {
|
|
374
|
-
let t, { cols: n, title: i, data: a, items: c, anchor: l } = e, u =
|
|
378
|
+
let t, { cols: n, title: i, data: a, items: c, anchor: l } = e, u = Le(i) ? void 0 : D("div", { class: `${r}__header` }, [typeof i == "string" ? D("span", null, [i]) : i(a ?? void 0)]), d = c.filter((e) => !e.hiddden).map((e) => et(e, n, a, r)), f = l === !1 ? void 0 : D(ce, s.value, Ze(t = c.map((e) => A(Qe(e, a), { key: e.prop }))) ? t : { default: () => [t] });
|
|
375
379
|
return D("div", {
|
|
376
380
|
class: r,
|
|
377
381
|
style: o.value
|
|
@@ -382,8 +386,7 @@ const tt = k({
|
|
|
382
386
|
]);
|
|
383
387
|
};
|
|
384
388
|
}
|
|
385
|
-
})
|
|
386
|
-
var nt = n("data-descriptions", [
|
|
389
|
+
}), nt = /* @__PURE__ */ n("data-descriptions", [
|
|
387
390
|
r("header", {
|
|
388
391
|
fontWeight: "bold",
|
|
389
392
|
fontSize: "1.125rem",
|
|
@@ -419,8 +422,7 @@ var nt = n("data-descriptions", [
|
|
|
419
422
|
top: "40px",
|
|
420
423
|
right: "40px"
|
|
421
424
|
})
|
|
422
|
-
])
|
|
423
|
-
const J = {
|
|
425
|
+
]), Y = {
|
|
424
426
|
size: {
|
|
425
427
|
type: String,
|
|
426
428
|
default: void 0
|
|
@@ -491,9 +493,9 @@ const J = {
|
|
|
491
493
|
default: void 0
|
|
492
494
|
},
|
|
493
495
|
nativeButtonType: Boolean
|
|
494
|
-
}, rt = k({
|
|
496
|
+
}, rt = /* @__PURE__ */ k({
|
|
495
497
|
name: "DataFormActions",
|
|
496
|
-
props:
|
|
498
|
+
props: Y,
|
|
497
499
|
emits: [
|
|
498
500
|
"submit",
|
|
499
501
|
"reset",
|
|
@@ -510,8 +512,8 @@ const J = {
|
|
|
510
512
|
return () => {
|
|
511
513
|
let e = l.value, n = c.value, { gap: u = e === "small" ? 8 : e === "medium" ? 12 : 16, submitText: d, resetText: f, cancelText: p, submitDisabled: m, submitLoading: h, showSubmitBtn: _, showResetBtn: v, showCancelBtn: b, succeeded: x, successText: S = d, failureText: C = d, nativeButtonType: w } = t;
|
|
512
514
|
return D(H, { size: u === void 0 ? e : u }, { default: () => [
|
|
513
|
-
r
|
|
514
|
-
_ === !1 ? void 0 : D(
|
|
515
|
+
I(r, "prefix"),
|
|
516
|
+
_ === !1 ? void 0 : D(B, {
|
|
515
517
|
attrType: w ? "submit" : "button",
|
|
516
518
|
size: e,
|
|
517
519
|
type: x ? "success" : x === !1 ? "error" : "primary",
|
|
@@ -520,9 +522,9 @@ const J = {
|
|
|
520
522
|
onClick: w ? void 0 : a
|
|
521
523
|
}, {
|
|
522
524
|
default: () => (x ? S : x === !1 ? C : d) || i("common.page.form.submitText"),
|
|
523
|
-
icon: () => x ? D(
|
|
525
|
+
icon: () => x ? D(U, null, { default: () => [D(g, null, null)] }) : x === !1 ? D(U, null, { default: () => [D(y, null, null)] }) : void 0
|
|
524
526
|
}),
|
|
525
|
-
v === !1 ? void 0 : D(
|
|
527
|
+
v === !1 ? void 0 : D(B, {
|
|
526
528
|
size: l.value,
|
|
527
529
|
attrType: w ? "reset" : "button",
|
|
528
530
|
disabled: n || h || x,
|
|
@@ -530,28 +532,30 @@ const J = {
|
|
|
530
532
|
secondary: b,
|
|
531
533
|
onClick: w ? void 0 : o
|
|
532
534
|
}, { default: () => [f || i("common.page.form.resetText")] }),
|
|
533
|
-
b === !1 || x ? void 0 : D(
|
|
535
|
+
b === !1 || x ? void 0 : D(B, {
|
|
534
536
|
attrType: "button",
|
|
535
537
|
disabled: n || h,
|
|
536
538
|
onClick: s
|
|
537
539
|
}, { default: () => [p || i("common.page.form.cancelText")] }),
|
|
538
|
-
r
|
|
540
|
+
I(r, "suffix")
|
|
539
541
|
] });
|
|
540
542
|
};
|
|
541
543
|
}
|
|
542
544
|
});
|
|
545
|
+
//#endregion
|
|
546
|
+
//#region src/components/DataForm.jsx
|
|
543
547
|
function it(e) {
|
|
544
548
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !j(e);
|
|
545
549
|
}
|
|
546
|
-
|
|
550
|
+
var at = /* @__PURE__ */ k({
|
|
547
551
|
name: "DataForm",
|
|
548
552
|
props: {
|
|
549
553
|
grid: {
|
|
550
554
|
type: Object,
|
|
551
555
|
default: () => ({})
|
|
552
556
|
},
|
|
553
|
-
...
|
|
554
|
-
...
|
|
557
|
+
...K(Pe, "disabled", "model", "labelWidth", "labelAlign", "showFeedback", "size"),
|
|
558
|
+
...K(Y, "submitText", "resetText", "cancelText", "showSubmitBtn", "showResetBtn", "showCancelBtn", "submitDisabled", "succeeded", "successText", "failureText"),
|
|
555
559
|
readonly: {
|
|
556
560
|
type: Boolean,
|
|
557
561
|
required: !1,
|
|
@@ -608,58 +612,57 @@ const at = k({
|
|
|
608
612
|
e?.preventDefault?.(), t("reset");
|
|
609
613
|
}, a = (e) => {
|
|
610
614
|
e?.preventDefault?.(), t("cancel");
|
|
611
|
-
}, o = F(), s = ({ overflow: t }) => {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
label: u === "start" ? " " : void 0,
|
|
615
|
+
}, o = F(), s = ({ overflow: t }) => I(n, "action", {
|
|
616
|
+
overflow: t,
|
|
617
|
+
grid: o.value
|
|
618
|
+
}, () => {
|
|
619
|
+
let { loading: t, showSubmitBtn: r, showResetBtn: i, showCancelBtn: o, actionAlign: s, actionJustify: c, actionGap: l, submitDisabled: u, submitText: d, resetText: f, cancelText: p, succeeded: m, successText: h, failureText: g } = e;
|
|
620
|
+
return [D(_e, {
|
|
621
|
+
label: c === "start" ? " " : void 0,
|
|
619
622
|
showLabel: e.labelPlacement !== "top",
|
|
620
623
|
style: "padding-top: 16px"
|
|
621
624
|
}, { default: () => [D(rt, {
|
|
622
|
-
align:
|
|
623
|
-
justify:
|
|
624
|
-
gap:
|
|
625
|
-
showSubmitBtn:
|
|
626
|
-
showResetBtn:
|
|
627
|
-
showCancelBtn:
|
|
628
|
-
submitText:
|
|
629
|
-
resetText:
|
|
630
|
-
cancelText:
|
|
631
|
-
submitDisabled:
|
|
632
|
-
submitLoading:
|
|
633
|
-
succeeded:
|
|
634
|
-
successText:
|
|
635
|
-
failureText:
|
|
625
|
+
align: s,
|
|
626
|
+
justify: c,
|
|
627
|
+
gap: l,
|
|
628
|
+
showSubmitBtn: r,
|
|
629
|
+
showResetBtn: i,
|
|
630
|
+
showCancelBtn: o,
|
|
631
|
+
submitText: d,
|
|
632
|
+
resetText: f,
|
|
633
|
+
cancelText: p,
|
|
634
|
+
submitDisabled: u,
|
|
635
|
+
submitLoading: t,
|
|
636
|
+
succeeded: m,
|
|
637
|
+
successText: h,
|
|
638
|
+
failureText: g,
|
|
636
639
|
nativeButtonType: !0,
|
|
637
640
|
onCancel: a
|
|
638
641
|
}, {
|
|
639
|
-
prefix: () => n
|
|
640
|
-
suffix: () => n
|
|
641
|
-
})] });
|
|
642
|
-
}, c = () => {
|
|
642
|
+
prefix: () => I(n, "actionPrefix"),
|
|
643
|
+
suffix: () => I(n, "actionSuffix")
|
|
644
|
+
})] })];
|
|
645
|
+
}), c = () => {
|
|
643
646
|
let { items: t, validation: r, showAction: i } = e;
|
|
644
647
|
return D(w, null, [t.map(({ hidden: t, name: n, render: i, label: a, showColon: o, span: s = 6, rowSpan: c, offset: l = 0, tooltip: u, tooltipPlacement: d = e.tooltipPlacement, validationStatus: f = r[n]?.errors?.length ? "error" : r[n]?.warnings?.length ? "warnings" : r[n] ? "success" : void 0, readonly: p = e.readonly, showRequireMark: h = !p, showTooltipWhenReadonly: g = !1, ..._ }) => {
|
|
645
648
|
if (t) return;
|
|
646
649
|
let v;
|
|
647
|
-
return v = n[0] === "$" ? i({}) : D(
|
|
650
|
+
return v = n[0] === "$" ? i({}) : D(_e, N({
|
|
648
651
|
path: n,
|
|
649
652
|
validationStatus: f,
|
|
650
653
|
showRequireMark: _.required && h
|
|
651
654
|
}, _), {
|
|
652
|
-
label: () => D(
|
|
655
|
+
label: () => D(G, {
|
|
653
656
|
depth: e.readonly ? 3 : 2,
|
|
654
657
|
style: "display: inline-flex; align-items: flex-start; gap: 1px"
|
|
655
658
|
}, { default: () => [
|
|
656
|
-
D("span", null, [
|
|
659
|
+
D("span", null, [L(a)]),
|
|
657
660
|
d === "icon" ? D(Ae, null, {
|
|
658
|
-
default: () =>
|
|
659
|
-
trigger: () => D(
|
|
661
|
+
default: () => L(u),
|
|
662
|
+
trigger: () => D(B, {
|
|
660
663
|
text: !0,
|
|
661
664
|
style: "font-size: 1.25em; opacity: 0.8"
|
|
662
|
-
}, { default: () => [D(
|
|
665
|
+
}, { default: () => [D(U, null, { default: () => [D(m, null, null)] })] })
|
|
663
666
|
}) : void 0,
|
|
664
667
|
e.showColon && o !== !1 ? D("span", { style: "place-self: center" }, [E(":")]) : void 0
|
|
665
668
|
] }),
|
|
@@ -669,45 +672,45 @@ const at = k({
|
|
|
669
672
|
size: e.size,
|
|
670
673
|
readonly: e.readonly
|
|
671
674
|
})]);
|
|
672
|
-
return u && d === "bottom" && (!e.readonly || g) ? D("div", { style: "width: 100%; display: flex; flex-direction: column" }, [n, D(
|
|
675
|
+
return u && d === "bottom" && (!e.readonly || g) ? D("div", { style: "width: 100%; display: flex; flex-direction: column" }, [n, D(G, {
|
|
673
676
|
depth: 3,
|
|
674
677
|
style: "font-size: calc(1rem - 3px); margin-top: 6px"
|
|
675
|
-
}, it(t =
|
|
678
|
+
}, it(t = L(u)) ? t : { default: () => [t] })]) : n;
|
|
676
679
|
},
|
|
677
680
|
feedback: () => r[n]?.errors?.[0] ?? r[n]?.warnings?.[0]
|
|
678
|
-
}), e.grid === !1 ? v : D(
|
|
681
|
+
}), e.grid === !1 ? v : D(ve, {
|
|
679
682
|
key: n,
|
|
680
683
|
offset: l,
|
|
681
684
|
span: s,
|
|
682
685
|
style: c ? { gridRowEnd: `span ${c}` } : void 0
|
|
683
686
|
}, it(v) ? v : { default: () => [v] });
|
|
684
|
-
}), i === !1 || e.readonly === !0 && !n.action ? void 0 : D(
|
|
687
|
+
}), i === !1 || e.readonly === !0 && !n.action ? void 0 : D(ve, N({
|
|
685
688
|
key: "action",
|
|
686
689
|
span: 2 ** 53 - 1
|
|
687
690
|
}, typeof e.showAction == "object" ? e.showAction : {}), { default: s })]);
|
|
688
691
|
};
|
|
689
692
|
return () => {
|
|
690
693
|
let { items: t, loading: n, validation: a, showColon: s, tooltipPlacement: l, showFeedback: u, labelWidth: d = "7.2em", labelAlign: f = e.labelPlacement === "top" ? "left" : "right", grid: p, showAction: m, showSubmitBtn: h, showResetBtn: g, showCancelBtn: _, actionAlign: v, actionJustify: y, actionGap: b, submitDisabled: x, submitText: S, resetText: C, cancelText: w, succeeded: T, successText: E, failureText: O, ...k } = e, A = !e.readonly && u !== !1;
|
|
691
|
-
return D(
|
|
694
|
+
return D(ge, N({
|
|
692
695
|
labelWidth: d,
|
|
693
696
|
labelAlign: f,
|
|
694
697
|
onReset: i,
|
|
695
698
|
onSubmit: r,
|
|
696
699
|
showFeedback: A
|
|
697
|
-
}, k), { default: () => [D(
|
|
700
|
+
}, k), { default: () => [D(ye, N({
|
|
698
701
|
ref: o,
|
|
699
702
|
itemResponsive: !0
|
|
700
703
|
}, p, { yGap: A ? 0 : p?.yGap ?? 24 }), { default: c })] });
|
|
701
704
|
};
|
|
702
705
|
}
|
|
703
|
-
}), ot = k({
|
|
706
|
+
}), ot = /* @__PURE__ */ k({
|
|
704
707
|
name: "DataFilter",
|
|
705
708
|
props: {
|
|
706
709
|
grid: {
|
|
707
710
|
type: Object,
|
|
708
711
|
default: () => ({})
|
|
709
712
|
},
|
|
710
|
-
...
|
|
713
|
+
...K(Pe, "disabled", "model"),
|
|
711
714
|
labelWidth: {
|
|
712
715
|
type: [String, Number],
|
|
713
716
|
default: "5em"
|
|
@@ -793,13 +796,13 @@ const at = k({
|
|
|
793
796
|
l.suffix = e?.collapsedOverflow || e?.contentEl.children.item(e?.contentEl.children.length - 1).offsetTop > 0;
|
|
794
797
|
}), D("div", { style: "display: flex; gap: 12px; align-items: center; justify-content: " + (l.suffix ? "flex-end" : "flex-start") }, [
|
|
795
798
|
l.suffix ? void 0 : D("span", null, [E("\xA0\xA0\xA0\xA0")]),
|
|
796
|
-
D(
|
|
799
|
+
D(B, {
|
|
797
800
|
attrType: "submit",
|
|
798
801
|
type: "primary",
|
|
799
802
|
disabled: t.disabled,
|
|
800
803
|
loading: t.loading
|
|
801
804
|
}, { default: () => [n || i("common.page.filter.submitText")] }),
|
|
802
|
-
D(
|
|
805
|
+
D(B, {
|
|
803
806
|
attrType: "reset",
|
|
804
807
|
disabled: t.disabled || t.loading
|
|
805
808
|
}, { default: () => [u || i("common.page.form.resetText")] }),
|
|
@@ -811,7 +814,7 @@ const at = k({
|
|
|
811
814
|
type: "primary",
|
|
812
815
|
onCustom: (e) => r("custom", e)
|
|
813
816
|
}, null) : void 0,
|
|
814
|
-
p && e?.collapsedOverflow ? D(
|
|
817
|
+
p && e?.collapsedOverflow ? D(B, {
|
|
815
818
|
text: !0,
|
|
816
819
|
type: "primary",
|
|
817
820
|
iconPlacement: "right",
|
|
@@ -822,6 +825,8 @@ const at = k({
|
|
|
822
825
|
};
|
|
823
826
|
}
|
|
824
827
|
});
|
|
828
|
+
//#endregion
|
|
829
|
+
//#region src/components/DataLocaleInput.jsx
|
|
825
830
|
function st(e) {
|
|
826
831
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !j(e);
|
|
827
832
|
}
|
|
@@ -853,7 +858,7 @@ function ct(t, n, r = 1) {
|
|
|
853
858
|
}
|
|
854
859
|
};
|
|
855
860
|
}
|
|
856
|
-
|
|
861
|
+
var lt = /* @__PURE__ */ k({
|
|
857
862
|
name: "DataLocaleInput",
|
|
858
863
|
props: {
|
|
859
864
|
label: { type: [
|
|
@@ -900,26 +905,26 @@ const lt = k({
|
|
|
900
905
|
...e.modelValue,
|
|
901
906
|
[r]: n
|
|
902
907
|
}, t("update:modelValue", n), t("updateModelValue", n);
|
|
903
|
-
}, { open: r, setSupports: i } = ct(T(() =>
|
|
908
|
+
}, { open: r, setSupports: i } = ct(T(() => L(e.label)), (e) => {
|
|
904
909
|
t("update:modelValue", e), t("updateModelValue", e);
|
|
905
910
|
}, ie(e, "defaultRows")), o = F(e.defaultExpanded);
|
|
906
|
-
|
|
911
|
+
R(() => e.defaultExpanded, (e) => {
|
|
907
912
|
o.value = e;
|
|
908
913
|
});
|
|
909
|
-
let s = () => D(
|
|
914
|
+
let s = () => D(B, {
|
|
910
915
|
quaternary: !0,
|
|
911
916
|
onClick: () => {
|
|
912
917
|
o.value = !o.value;
|
|
913
918
|
},
|
|
914
919
|
style: "--n-padding: 0 8px"
|
|
915
|
-
}, { default: () => [D(
|
|
920
|
+
}, { default: () => [D(U, {
|
|
916
921
|
size: "20",
|
|
917
922
|
depth: "3"
|
|
918
923
|
}, { default: () => [o.value ? D(S, null, null) : D(l, null, null)] })] }), c = (t) => {
|
|
919
924
|
let n = t.split("-")[0];
|
|
920
925
|
return e.supports.some((e) => e.value !== t && e.value.startsWith(n)) ? t : n;
|
|
921
926
|
}, d = `__slots${Ie(6)}`;
|
|
922
|
-
|
|
927
|
+
R(() => e.supports, (e) => {
|
|
923
928
|
i(e);
|
|
924
929
|
let t = 0;
|
|
925
930
|
for (let [n, r] of e.entries()) {
|
|
@@ -948,18 +953,18 @@ const lt = k({
|
|
|
948
953
|
fontSize: "12px",
|
|
949
954
|
fontFamily: "monospace"
|
|
950
955
|
} }, [f.value[0]]),
|
|
951
|
-
suffix: () => D(
|
|
956
|
+
suffix: () => D(B, {
|
|
952
957
|
quaternary: !0,
|
|
953
958
|
onClick: () => r(e.modelValue, e.disabled),
|
|
954
959
|
style: "--n-padding: 0 8px"
|
|
955
|
-
}, { default: () => [D(
|
|
960
|
+
}, { default: () => [D(U, {
|
|
956
961
|
size: "20",
|
|
957
962
|
depth: "3"
|
|
958
963
|
}, { default: () => [D(u, null, null)] })] })
|
|
959
964
|
}, m = { "--n-padding-right": "0" };
|
|
960
965
|
return () => {
|
|
961
966
|
let t;
|
|
962
|
-
return e.mode === "dialog" ? D(
|
|
967
|
+
return e.mode === "dialog" ? D(be, {
|
|
963
968
|
value: e.modelValue?.[e.showLang ?? e.defaultLang] ?? e.modelValue?.[e.defaultLang],
|
|
964
969
|
onUpdateValue: n,
|
|
965
970
|
disabled: e.disabled,
|
|
@@ -974,7 +979,7 @@ const lt = k({
|
|
|
974
979
|
}, st(t = e.supports.map((t, r) => {
|
|
975
980
|
if (!o.value && r !== 0) return;
|
|
976
981
|
let i = r == 0;
|
|
977
|
-
return oe(D(
|
|
982
|
+
return oe(D(be, {
|
|
978
983
|
key: t.value,
|
|
979
984
|
value: e.modelValue?.[t.value],
|
|
980
985
|
onUpdateValue: (e) => n(e, t.value),
|
|
@@ -992,7 +997,7 @@ const lt = k({
|
|
|
992
997
|
})) ? t : { default: () => [t] });
|
|
993
998
|
};
|
|
994
999
|
}
|
|
995
|
-
}),
|
|
1000
|
+
}), X = /* @__PURE__ */ k({
|
|
996
1001
|
name: "DataPagination",
|
|
997
1002
|
props: {
|
|
998
1003
|
total: {
|
|
@@ -1017,7 +1022,7 @@ const lt = k({
|
|
|
1017
1022
|
}), a = (e) => n("change", {
|
|
1018
1023
|
pageSize: e,
|
|
1019
1024
|
currentPage: t.resetPageOnSizeChange ? 1 : t.currentPage ?? t.page?.currentPage ?? 1
|
|
1020
|
-
}), o = ee(
|
|
1025
|
+
}), o = ee(X.DEFAULT_PAGE_SIZES_INJECTION_KEY, () => [
|
|
1021
1026
|
10,
|
|
1022
1027
|
20,
|
|
1023
1028
|
30,
|
|
@@ -1026,7 +1031,7 @@ const lt = k({
|
|
|
1026
1031
|
prefix: () => r("common.page.pagination.prefix", { total: t.total }),
|
|
1027
1032
|
suffix: () => r("common.page.pagination.suffix")
|
|
1028
1033
|
};
|
|
1029
|
-
return () => D(
|
|
1034
|
+
return () => D(Ce, {
|
|
1030
1035
|
page: t.currentPage ?? t.page?.currentPage,
|
|
1031
1036
|
itemCount: t.total,
|
|
1032
1037
|
pageSize: t.pageSize ?? t.page?.pageSize,
|
|
@@ -1040,11 +1045,13 @@ const lt = k({
|
|
|
1040
1045
|
}, t.simple ? void 0 : s);
|
|
1041
1046
|
}
|
|
1042
1047
|
});
|
|
1043
|
-
|
|
1048
|
+
X.DEFAULT_PAGE_SIZES_INJECTION_KEY = Symbol();
|
|
1049
|
+
//#endregion
|
|
1050
|
+
//#region src/components/DataSelection.jsx
|
|
1044
1051
|
function ut(e) {
|
|
1045
1052
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !j(e);
|
|
1046
1053
|
}
|
|
1047
|
-
|
|
1054
|
+
var dt = /* @__PURE__ */ k({
|
|
1048
1055
|
name: "DataSelection",
|
|
1049
1056
|
props: {
|
|
1050
1057
|
modelValue: {
|
|
@@ -1069,14 +1076,14 @@ const dt = k({
|
|
|
1069
1076
|
"wrap-item": !1
|
|
1070
1077
|
}, { default: () => [
|
|
1071
1078
|
D("span", null, [r("common.page.selection.countText", { count: t.count })]),
|
|
1072
|
-
D(
|
|
1079
|
+
D(B, {
|
|
1073
1080
|
text: !0,
|
|
1074
1081
|
type: "primary",
|
|
1075
1082
|
onClick: () => {
|
|
1076
1083
|
n("update:modelValue", t.modelValue === "all" ? "selection" : "all");
|
|
1077
1084
|
}
|
|
1078
1085
|
}, { default: () => [t.modelValue === "all" ? r("common.page.selection.view") : r("common.page.selection.back")] }),
|
|
1079
|
-
D(
|
|
1086
|
+
D(B, {
|
|
1080
1087
|
text: !0,
|
|
1081
1088
|
onClick: () => {
|
|
1082
1089
|
n("clear"), n("update:modelValue", "all");
|
|
@@ -1086,10 +1093,12 @@ const dt = k({
|
|
|
1086
1093
|
};
|
|
1087
1094
|
}
|
|
1088
1095
|
});
|
|
1096
|
+
//#endregion
|
|
1097
|
+
//#region src/components/Radios.jsx
|
|
1089
1098
|
function ft(e) {
|
|
1090
1099
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !j(e);
|
|
1091
1100
|
}
|
|
1092
|
-
|
|
1101
|
+
var pt = /* @__PURE__ */ k({
|
|
1093
1102
|
name: "Radios",
|
|
1094
1103
|
props: {
|
|
1095
1104
|
options: {
|
|
@@ -1149,7 +1158,7 @@ const pt = k({
|
|
|
1149
1158
|
n("update:modelValue", e), n("updateModelValue", e);
|
|
1150
1159
|
};
|
|
1151
1160
|
return () => {
|
|
1152
|
-
let e = t.type === "button" ?
|
|
1161
|
+
let e = t.type === "button" ? Te : we, n = D(w, null, [t.default ? D(e, { value: typeof t.default == "object" ? t.default?.[t.valueField] : null }, { default: () => [i.value] }) : void 0, t.options?.map((n) => {
|
|
1153
1162
|
let r = typeof n[t.labelField] == "string" ? n[t.labelField] : n[t.labelField]?.();
|
|
1154
1163
|
return D(e, {
|
|
1155
1164
|
value: n[t.valueField],
|
|
@@ -1163,7 +1172,7 @@ const pt = k({
|
|
|
1163
1172
|
trigger: () => r
|
|
1164
1173
|
}) : r] });
|
|
1165
1174
|
})]);
|
|
1166
|
-
return D(
|
|
1175
|
+
return D(Ee, {
|
|
1167
1176
|
style: t.vertical ? {
|
|
1168
1177
|
...a.value,
|
|
1169
1178
|
padding: "6px 0 0"
|
|
@@ -1177,10 +1186,12 @@ const pt = k({
|
|
|
1177
1186
|
};
|
|
1178
1187
|
}
|
|
1179
1188
|
});
|
|
1180
|
-
|
|
1189
|
+
//#endregion
|
|
1190
|
+
//#region src/components/UserDept.jsx
|
|
1191
|
+
function Z(e) {
|
|
1181
1192
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !j(e);
|
|
1182
1193
|
}
|
|
1183
|
-
|
|
1194
|
+
var mt = /* @__PURE__ */ k({
|
|
1184
1195
|
name: "UserDept",
|
|
1185
1196
|
inheritAttrs: !1,
|
|
1186
1197
|
props: {
|
|
@@ -1253,8 +1264,8 @@ const mt = k({
|
|
|
1253
1264
|
if (t.multiple) return t.modelValue || [];
|
|
1254
1265
|
let e = t.modelValue?.trim();
|
|
1255
1266
|
return e ? [e] : [];
|
|
1256
|
-
}), u = new Map(), f = T(() => (u.clear(), t.users.map((e) => (e = P(e), e.label = e.nickname + e.username, e.value = e[o.value], e.type = "user", u.set(e[o.value], e), e)))), p = ne([]);
|
|
1257
|
-
|
|
1267
|
+
}), u = /* @__PURE__ */ new Map(), f = T(() => (u.clear(), t.users.map((e) => (e = P(e), e.label = e.nickname + e.username, e.value = e[o.value], e.type = "user", u.set(e[o.value], e), e)))), p = ne([]);
|
|
1268
|
+
R(() => t.depts, (e) => {
|
|
1258
1269
|
Ke(e, (e) => {
|
|
1259
1270
|
e.label = e.name, e.value = e[o.value], e.type = "dept", e.children?.length || delete e.children;
|
|
1260
1271
|
}), p.value = Ge(e);
|
|
@@ -1279,7 +1290,7 @@ const mt = k({
|
|
|
1279
1290
|
type: "user"
|
|
1280
1291
|
};
|
|
1281
1292
|
})];
|
|
1282
|
-
}, y = new WeakMap(), b = (e, n, r) => {
|
|
1293
|
+
}, y = /* @__PURE__ */ new WeakMap(), b = (e, n, r) => {
|
|
1283
1294
|
let a;
|
|
1284
1295
|
if (t.type === "dept") return D(Me, {
|
|
1285
1296
|
data: t.depts,
|
|
@@ -1302,8 +1313,8 @@ const mt = k({
|
|
|
1302
1313
|
n(e);
|
|
1303
1314
|
}
|
|
1304
1315
|
}, null);
|
|
1305
|
-
let o = e ? y.get(e) : new Set();
|
|
1306
|
-
if (e && !o && (o = new Set(e), y.set(e, o)), g.value === !1) return D(
|
|
1316
|
+
let o = e ? y.get(e) : /* @__PURE__ */ new Set();
|
|
1317
|
+
if (e && !o && (o = new Set(e), y.set(e, o)), g.value === !1) return D(Oe, { show: !0 }, null);
|
|
1307
1318
|
let l = g.value || m.value;
|
|
1308
1319
|
r = r?.trim(), r && (l = l?.filter((e) => e.label.includes(r) || e.value.includes(r)));
|
|
1309
1320
|
let u = h.value;
|
|
@@ -1311,22 +1322,22 @@ const mt = k({
|
|
|
1311
1322
|
u.length >= 2 ? u.at(-2).label : i("common.all"),
|
|
1312
1323
|
D("span", { style: "padding: 0 4px" }, [D(d, null, null)]),
|
|
1313
1324
|
u.at(-1).label
|
|
1314
|
-
]), D(
|
|
1325
|
+
]), D(B, {
|
|
1315
1326
|
text: !0,
|
|
1316
1327
|
type: "warning",
|
|
1317
1328
|
onClick: () => {
|
|
1318
1329
|
if (u.pop(), g.value = u.length > 0 ? !1 : void 0, u.length > 0) _(u.at(-1));
|
|
1319
1330
|
else for (let e of f.value) e.disabled = !1;
|
|
1320
1331
|
}
|
|
1321
|
-
}, { default: () => [D(
|
|
1332
|
+
}, { default: () => [D(U, null, { default: () => [D(v, null, null)] }), i("common.back")] })]) : D("span", null, [i("common.all")])]), l?.length ? D(xe, {
|
|
1322
1333
|
showDivider: !1,
|
|
1323
1334
|
style: "padding: 0 16px"
|
|
1324
|
-
},
|
|
1335
|
+
}, Z(a = l.map((r) => {
|
|
1325
1336
|
let i, a;
|
|
1326
|
-
return D(
|
|
1337
|
+
return D(Se, {
|
|
1327
1338
|
key: r.type + "_" + r.value,
|
|
1328
1339
|
style: "padding: 6px 0"
|
|
1329
|
-
}, { default: () => [r.type === "user" ? t.multiple ? D(
|
|
1340
|
+
}, { default: () => [r.type === "user" ? t.multiple ? D(V, {
|
|
1330
1341
|
checked: o.has(r.value) || !1,
|
|
1331
1342
|
onUpdateChecked: (i) => {
|
|
1332
1343
|
if (i && t.max && e.length >= t.max) return;
|
|
@@ -1339,20 +1350,20 @@ const mt = k({
|
|
|
1339
1350
|
n(a);
|
|
1340
1351
|
},
|
|
1341
1352
|
style: "margin-left: 3px"
|
|
1342
|
-
},
|
|
1353
|
+
}, Z(i = $([r], {
|
|
1343
1354
|
max: 1,
|
|
1344
1355
|
size: 24,
|
|
1345
1356
|
placement: "right",
|
|
1346
1357
|
tooltip: !1,
|
|
1347
1358
|
username: !0,
|
|
1348
1359
|
renderInfo: t.renderUserInfo
|
|
1349
|
-
})) ? i : { default: () => [i] }) : D(
|
|
1360
|
+
})) ? i : { default: () => [i] }) : D(we, {
|
|
1350
1361
|
checked: o.has(r.value) || !1,
|
|
1351
1362
|
onUpdateChecked: (e) => {
|
|
1352
1363
|
n(e ? [r.value] : []);
|
|
1353
1364
|
},
|
|
1354
1365
|
style: "margin-left: 3px;"
|
|
1355
|
-
},
|
|
1366
|
+
}, Z(a = $([r], {
|
|
1356
1367
|
max: 1,
|
|
1357
1368
|
size: 24,
|
|
1358
1369
|
placement: "right",
|
|
@@ -1365,18 +1376,18 @@ const mt = k({
|
|
|
1365
1376
|
},
|
|
1366
1377
|
style: "cursor: pointer; display: flex; align-items: center; gap: 8px"
|
|
1367
1378
|
}, [
|
|
1368
|
-
r.type === "dept" ? D(
|
|
1379
|
+
r.type === "dept" ? D(z, {
|
|
1369
1380
|
size: 24,
|
|
1370
1381
|
style: "background-color: red"
|
|
1371
|
-
}, { default: () => [D(
|
|
1382
|
+
}, { default: () => [D(U, null, { default: () => [D(s, null, null)] })] }) : D(z, {
|
|
1372
1383
|
size: 24,
|
|
1373
1384
|
style: "background-color: green"
|
|
1374
|
-
}, { default: () => [D(
|
|
1385
|
+
}, { default: () => [D(U, null, { default: () => [D(c, null, null)] })] }),
|
|
1375
1386
|
D("span", { style: "flex: 1 1 auto" }, [r.label]),
|
|
1376
|
-
D(
|
|
1387
|
+
D(U, null, { default: () => [D(d, null, null)] })
|
|
1377
1388
|
])] });
|
|
1378
|
-
})) ? a : { default: () => [a] }) : D(
|
|
1379
|
-
}, x = () => D(
|
|
1389
|
+
})) ? a : { default: () => [a] }) : D(he, null, null)]);
|
|
1390
|
+
}, x = () => D(he, { description: t.placeholder }, null), S = ({ option: e }) => e.type === "user" ? D("span", null, [e.nickname, D("span", { style: {
|
|
1380
1391
|
opacity: .4,
|
|
1381
1392
|
marginLeft: "8px"
|
|
1382
1393
|
} }, [e.username])]) : D("span", null, [e.label]), C = (e, n, r, i, a) => D(je, N(e, {
|
|
@@ -1396,7 +1407,7 @@ const mt = k({
|
|
|
1396
1407
|
onUpdateValue: (e) => {
|
|
1397
1408
|
a?.(e);
|
|
1398
1409
|
}
|
|
1399
|
-
}), null), E = ({ option: e, handleClose: n }) => D(
|
|
1410
|
+
}), null), E = ({ option: e, handleClose: n }) => D(ke, {
|
|
1400
1411
|
type: t.type === "user" ? "primary" : "info",
|
|
1401
1412
|
closable: !0,
|
|
1402
1413
|
onMousedown: (e) => e.preventDefault(),
|
|
@@ -1425,7 +1436,7 @@ const mt = k({
|
|
|
1425
1436
|
});
|
|
1426
1437
|
}
|
|
1427
1438
|
});
|
|
1428
|
-
}, M = { arrow: () => D(
|
|
1439
|
+
}, M = { arrow: () => D(U, null, { default: () => [t.type === "user" ? D(c, null, null) : D(s, null, null)] }) };
|
|
1429
1440
|
return () => {
|
|
1430
1441
|
let e = t.type === "user" ? f.value : p.value;
|
|
1431
1442
|
if (t.selectType === "dropdown" && t.type === "dept") return D(Ne, {
|
|
@@ -1442,10 +1453,10 @@ const mt = k({
|
|
|
1442
1453
|
"onUpdate:value": (e) => {
|
|
1443
1454
|
t.multiple && t.max && e?.length > t.max || n("update:modelValue", e);
|
|
1444
1455
|
}
|
|
1445
|
-
},
|
|
1456
|
+
}, Z(M) ? M : { default: () => [M] });
|
|
1446
1457
|
if (t.selectType === "transfer") return C(r, e, l.value, (e) => O(e, "update:modelValue"), (e) => O(e, "updateModelValue"));
|
|
1447
1458
|
let i = t.selectType === "dropdown";
|
|
1448
|
-
return D(
|
|
1459
|
+
return D(De, N(r, {
|
|
1449
1460
|
key: t.type,
|
|
1450
1461
|
ref: k,
|
|
1451
1462
|
show: i ? void 0 : !1,
|
|
@@ -1464,22 +1475,22 @@ const mt = k({
|
|
|
1464
1475
|
"onUpdate:value": (e) => {
|
|
1465
1476
|
n("update:modelValue", e);
|
|
1466
1477
|
}
|
|
1467
|
-
}),
|
|
1478
|
+
}), Z(M) ? M : { default: () => [M] });
|
|
1468
1479
|
};
|
|
1469
1480
|
}
|
|
1470
1481
|
});
|
|
1471
|
-
function
|
|
1482
|
+
function Q(e, t, { placement: n = "left", size: r = 24, tooltip: i = !0, username: a = !1, renderInfo: o }) {
|
|
1472
1483
|
let s = e.nickname.split(" ").at(-1), c = s;
|
|
1473
1484
|
if (/^[\u4E00-\u9FA5]+$/.test(s)) {
|
|
1474
1485
|
let e = s.length;
|
|
1475
1486
|
c = e === 3 || e === 4 ? s.slice(-2) : e > 4 ? s.slice(0, 1) : s;
|
|
1476
|
-
} else s.length > 4 && (c = D(
|
|
1477
|
-
let l = (e) => D(
|
|
1487
|
+
} else s.length > 4 && (c = D(U, null, { default: () => [D(x, null, null)] }));
|
|
1488
|
+
let l = (e) => D(z, {
|
|
1478
1489
|
color: "var(--color-primary)",
|
|
1479
1490
|
round: !0,
|
|
1480
1491
|
size: e
|
|
1481
|
-
},
|
|
1482
|
-
return D(
|
|
1492
|
+
}, Z(c) ? c : { default: () => [c] });
|
|
1493
|
+
return D(W, {
|
|
1483
1494
|
key: e.username,
|
|
1484
1495
|
raw: !0,
|
|
1485
1496
|
placement: n,
|
|
@@ -1495,9 +1506,9 @@ function Z(e, t, { placement: n = "left", size: r = 24, tooltip: i = !0, usernam
|
|
|
1495
1506
|
}
|
|
1496
1507
|
});
|
|
1497
1508
|
}
|
|
1498
|
-
function
|
|
1509
|
+
function $(e, t = {}) {
|
|
1499
1510
|
let { max: n = 4, size: r = 24 } = t;
|
|
1500
|
-
return e.length <= 1 ? e[0] ?
|
|
1511
|
+
return e.length <= 1 ? e[0] ? Q(e[0], !0, t) : null : D("span", { style: {
|
|
1501
1512
|
display: "inline-block",
|
|
1502
1513
|
height: r + "px"
|
|
1503
1514
|
} }, [D(ue, {
|
|
@@ -1506,16 +1517,16 @@ function Q(e, t = {}) {
|
|
|
1506
1517
|
max: n || 4,
|
|
1507
1518
|
style: "top: -2px"
|
|
1508
1519
|
}, {
|
|
1509
|
-
avatar: ({ option: e }) =>
|
|
1510
|
-
rest: ({ options: e, rest: t }) => D(
|
|
1520
|
+
avatar: ({ option: e }) => Q(e, !1, t),
|
|
1521
|
+
rest: ({ options: e, rest: t }) => D(pe, {
|
|
1511
1522
|
options: e,
|
|
1512
1523
|
keyField: "username",
|
|
1513
1524
|
labelField: "nickname",
|
|
1514
|
-
renderOption: ({ option: t }) =>
|
|
1515
|
-
}, { default: () => [D(
|
|
1525
|
+
renderOption: ({ option: t }) => Q(t, !1, e)
|
|
1526
|
+
}, { default: () => [D(z, null, { default: () => [E("+"), t] })] })
|
|
1516
1527
|
})]);
|
|
1517
1528
|
}
|
|
1518
|
-
|
|
1529
|
+
var ht = /* @__PURE__ */ k({
|
|
1519
1530
|
name: "DeptRender",
|
|
1520
1531
|
props: {
|
|
1521
1532
|
value: [String, Array],
|
|
@@ -1524,7 +1535,7 @@ const ht = k({
|
|
|
1524
1535
|
},
|
|
1525
1536
|
setup(e) {
|
|
1526
1537
|
let t = F([]), n = {};
|
|
1527
|
-
return
|
|
1538
|
+
return R([() => e.modelValue, () => e.multiple], ([r, i]) => {
|
|
1528
1539
|
t.value = [];
|
|
1529
1540
|
let a = r ? i ? Array.isArray(r) ? r : r.trim() ? r.trim().split(",") : [] : [r] : [], o = [];
|
|
1530
1541
|
for (let [e, r] of a.entries()) n[r] || (n[r] = P({
|
|
@@ -1534,9 +1545,9 @@ const ht = k({
|
|
|
1534
1545
|
o.length > 0 && e.getDeptsByCode(o).then((e) => {
|
|
1535
1546
|
for (let t of e) Object.assign(n[t.code], t);
|
|
1536
1547
|
});
|
|
1537
|
-
}, { immediate: !0 }), () => t.value.map((e) => D(
|
|
1548
|
+
}, { immediate: !0 }), () => t.value.map((e) => D(ke, { key: e.code }, { default: () => [e.name] }));
|
|
1538
1549
|
}
|
|
1539
|
-
}), gt = k({
|
|
1550
|
+
}), gt = /* @__PURE__ */ k({
|
|
1540
1551
|
name: "UserRender",
|
|
1541
1552
|
props: {
|
|
1542
1553
|
value: [String, Array],
|
|
@@ -1549,7 +1560,7 @@ const ht = k({
|
|
|
1549
1560
|
},
|
|
1550
1561
|
setup(e) {
|
|
1551
1562
|
let t = F([]), n = {};
|
|
1552
|
-
return
|
|
1563
|
+
return R([() => e.value, () => e.multiple], ([r, i]) => {
|
|
1553
1564
|
t.value = [];
|
|
1554
1565
|
let a = r ? i ? Array.isArray(r) ? r : r.trim() ? r.trim().split(",") : [] : [r] : [], o = [];
|
|
1555
1566
|
for (let [e, r] of a.entries()) n[r] || (n[r] = P({
|
|
@@ -1559,9 +1570,9 @@ const ht = k({
|
|
|
1559
1570
|
o.length > 0 && e.getUsersByUsername(o).then((e) => {
|
|
1560
1571
|
for (let t of e) Object.assign(n[t.username], t);
|
|
1561
1572
|
});
|
|
1562
|
-
}, { immediate: !0 }), () =>
|
|
1573
|
+
}, { immediate: !0 }), () => $(t.value, e);
|
|
1563
1574
|
}
|
|
1564
|
-
}),
|
|
1575
|
+
}), _t = {
|
|
1565
1576
|
disabled: {
|
|
1566
1577
|
type: Boolean,
|
|
1567
1578
|
default: void 0
|
|
@@ -1590,20 +1601,21 @@ const ht = k({
|
|
|
1590
1601
|
],
|
|
1591
1602
|
default: void 0
|
|
1592
1603
|
}
|
|
1593
|
-
},
|
|
1604
|
+
}, vt = /* @__PURE__ */ k({
|
|
1594
1605
|
name: "StateButton",
|
|
1595
|
-
props:
|
|
1606
|
+
props: _t,
|
|
1596
1607
|
setup(e, { slots: t }) {
|
|
1597
1608
|
return () => {
|
|
1598
1609
|
let { type: n, disabled: r, succeeded: i, successText: a, failureText: o } = e;
|
|
1599
|
-
return D(
|
|
1610
|
+
return D(B, {
|
|
1600
1611
|
type: i ? "success" : i === !1 ? "error" : n,
|
|
1601
1612
|
disabled: typeof i == "boolean" ? !0 : r
|
|
1602
1613
|
}, {
|
|
1603
|
-
default: () => (i ? t
|
|
1604
|
-
icon: () => i ? t
|
|
1614
|
+
default: () => (i ? I(t, "success", void 0, () => [a]) : i === !1 ? I(t, "failure", void 0, () => [o]) : I(t, "default")) ?? I(t, "default"),
|
|
1615
|
+
icon: () => i ? I(t, "successIcon", void 0, () => [D(U, null, { default: () => [D(g, null, null)] })]) : i === !1 ? I(t, "failureIcon", void 0, () => [D(U, null, { default: () => [D(y, null, null)] })]) : I(t, "icon")
|
|
1605
1616
|
});
|
|
1606
1617
|
};
|
|
1607
1618
|
}
|
|
1608
|
-
}),
|
|
1609
|
-
|
|
1619
|
+
}), yt = O(() => import("./DataTable-DEb9CRCZ.js").then((e) => e.DataTable));
|
|
1620
|
+
//#endregion
|
|
1621
|
+
export { Je as DataActions, Xe as DataCustom, tt as DataDescriptions, ot as DataFilter, at as DataForm, rt as DataFormActions, lt as DataLocaleInput, X as DataPagination, dt as DataSelection, yt as DataTable, ht as DtDeptRender, mt as DtUserDept, gt as DtUserRender, qe as NCheckboxes, pt as NRadios, vt as NStateButton, _t as StateButtonProps, Y as dataFormActionsProps, $ as renderUsers, ct as useLocaleEdit };
|