@ithinkdt/ui 4.1.1 → 4.2.0-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/esm/{DataTable-D1Z9h8V1.js → DataTable-D5VMWw2x.js} +4 -6
- package/esm/{components-CwMUuo3f.js → components-BA7KsV1q.js} +362 -285
- package/esm/components.d.ts +11 -2
- package/esm/components.js +1 -1
- package/esm/composables.js +1 -1
- package/esm/{directives-G7hy3akL.js → directives--_Z8BQhu.js} +2 -2
- package/esm/directives.js +1 -1
- package/esm/index.js +69 -71
- package/esm/page.js +12 -12
- package/esm/{use-i18n-BUP_StIp.js → use-i18n-BMlVGLEB.js} +1 -1
- package/esm/{use-table-range-select-B6KrCUln.js → use-table-range-select-BOqsUOeY.js} +7 -4
- package/package.json +8 -8
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { n as e } from "./use-i18n-
|
|
1
|
+
import { n as e } from "./use-i18n-BMlVGLEB.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 { Fragment as o, computed as s, createTextVNode as c, createVNode as l, defineAsyncComponent as u, defineComponent as d, h as f, inject as p, isVNode as m, markRaw as h, mergeProps as g, nextTick as _,
|
|
5
|
-
import { onClickOutside as
|
|
6
|
-
import { NAnchor as
|
|
3
|
+
import { i as a } from "./directives--_Z8BQhu.js";
|
|
4
|
+
import { Fragment as o, computed as s, createTextVNode as c, createVNode as l, defineAsyncComponent as u, defineComponent as d, h as f, inject as p, isVNode as m, markRaw as h, mergeProps as g, nextTick as _, reactive as v, ref as y, renderSlot as b, shallowRef as x, toRaw as S, toRef as C, toValue as w, unref as T, useTemplateRef as ee, watch as E, withDirectives as D } from "vue";
|
|
5
|
+
import { onClickOutside as te, until as O, useElementHover as k, useFullscreen as A } from "@vueuse/core";
|
|
6
|
+
import { NAnchor as ne, NAnchorLink as re, NAvatar as j, NAvatarGroup as M, NBadge as ie, NButton as N, NCard as ae, NCheckbox as P, NCheckboxGroup as oe, NDropdown as F, NEllipsis as se, NEmpty as ce, NFlex as I, NForm as le, NFormItem as ue, NGi as de, NGrid as fe, NIcon as L, NInput as R, NList as pe, NListItem as me, NPagination as he, NPopover as z, NRadio as ge, NRadioButton as _e, NRadioGroup as ve, NScrollbar as ye, NSelect as be, NSpin as xe, NTag as Se, NText as B, NTooltip as V, NTransfer as Ce, NTree as we, NTreeSelect as Te, formProps as H, useDialog as Ee } from "ithinkdt-ui";
|
|
7
7
|
import { nanoid as De } from "nanoid";
|
|
8
|
-
import { isNullish as Oe, pickProps as
|
|
8
|
+
import { isNullish as Oe, pickProps as U } from "@ithinkdt/common/object";
|
|
9
9
|
import { VOverflow as ke, VResizeObserver as Ae } from "vueuc";
|
|
10
10
|
import { Sortable as je } from "sortablejs/modular/sortable.core.esm.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import Pe from "ithinkdt
|
|
15
|
-
import
|
|
11
|
+
import { removeIf as Me } from "@ithinkdt/common/array";
|
|
12
|
+
import { useFormItem as Ne } from "ithinkdt-ui/es/_mixins";
|
|
13
|
+
import { measureText as W } from "@ithinkdt/common/string";
|
|
14
|
+
import { useFormModal as Pe } from "@ithinkdt/page";
|
|
15
|
+
import Fe from "ithinkdt-ui/es/_mixins/use-locale.mjs";
|
|
16
|
+
import { flattenTree as Ie, walkTree as Le } from "@ithinkdt/common";
|
|
16
17
|
//#region src/components/Checkboxes.jsx
|
|
17
|
-
var
|
|
18
|
+
var Re = /* @__PURE__ */ d({
|
|
18
19
|
name: "Checkboxes",
|
|
19
20
|
inheritAttrs: !1,
|
|
20
21
|
props: {
|
|
@@ -68,31 +69,31 @@ var Le = /* @__PURE__ */ d({
|
|
|
68
69
|
updateModelValue: () => !0
|
|
69
70
|
},
|
|
70
71
|
setup(t, { emit: n, attrs: r }) {
|
|
71
|
-
let { t: i } = e(), a = s(() => t.default ? t.default === !0 ? i("common.all") : typeof t.default == "string" ? t.default : t.default?.[t.labelField] ?? i("common.all") : ""), o =
|
|
72
|
-
|
|
72
|
+
let { t: i } = e(), a = s(() => t.default ? t.default === !0 ? i("common.all") : typeof t.default == "string" ? t.default : t.default?.[t.labelField] ?? i("common.all") : ""), o = y([]);
|
|
73
|
+
E(() => t.modelValue, (e) => o.value = e, { immediate: !0 });
|
|
73
74
|
let c = (e) => {
|
|
74
75
|
n("update:modelValue", e), n("updateModelValue", e);
|
|
75
76
|
}, u = () => {
|
|
76
77
|
c(o.value?.length === t.options.length ? [] : t.options.map((e) => e[t.valueField]));
|
|
77
78
|
}, d = s(() => t.options.length > o.value?.length && o.value?.length > 0), f = s(() => ({ "--n-label-padding": t.labelPadding }));
|
|
78
79
|
return () => {
|
|
79
|
-
let e = l(
|
|
80
|
+
let e = l(oe, g(r, {
|
|
80
81
|
value: o.value,
|
|
81
82
|
onUpdateValue: c
|
|
82
|
-
}), { default: () => [l(
|
|
83
|
+
}), { default: () => [l(I, {
|
|
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) => l(
|
|
87
|
+
}, { default: () => [t.options?.map((e) => l(P, {
|
|
87
88
|
value: e[t.valueField],
|
|
88
89
|
disabled: e[t.disabledField],
|
|
89
90
|
style: f.value
|
|
90
91
|
}, { default: () => [e[t.labelField]] }))] })] });
|
|
91
|
-
return t.default ? l(
|
|
92
|
+
return t.default ? l(I, {
|
|
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: () => [l("span", null, [l(
|
|
96
|
+
}, { default: () => [l("span", null, [l(P, {
|
|
96
97
|
indeterminate: d.value,
|
|
97
98
|
checked: o.value?.length > 0,
|
|
98
99
|
onUpdateChecked: u,
|
|
@@ -100,7 +101,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
100
101
|
}, { default: () => [a.value] })]), e] }) : e;
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
|
-
}),
|
|
104
|
+
}), ze = (e) => l("svg", g({
|
|
104
105
|
xmlns: "http://www.w3.org/2000/svg",
|
|
105
106
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
106
107
|
role: "img",
|
|
@@ -110,7 +111,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
110
111
|
}, e), [l("path", {
|
|
111
112
|
fill: "currentColor",
|
|
112
113
|
d: "M11 18h2v-2h-2v2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2a2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4Z"
|
|
113
|
-
}, null)]),
|
|
114
|
+
}, null)]), Be = (e) => l("svg", g({
|
|
114
115
|
xmlns: "http://www.w3.org/2000/svg",
|
|
115
116
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
116
117
|
role: "img",
|
|
@@ -120,7 +121,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
120
121
|
}, e), [l("path", {
|
|
121
122
|
fill: "currentColor",
|
|
122
123
|
d: "m924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 0 0 9.3-35.2l-.9-2.6a443.74 443.74 0 0 0-79.7-137.9l-1.8-2.1a32.12 32.12 0 0 0-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 0 0-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 0 0-25.8 25.7l-15.8 85.4a351.86 351.86 0 0 0-99 57.4l-81.9-29.1a32 32 0 0 0-35.1 9.5l-1.8 2.1a446.02 446.02 0 0 0-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1c0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 0 0-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0 0 35.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0 0 25.8 25.7l2.7.5a449.4 449.4 0 0 0 159 0l2.7-.5a32.05 32.05 0 0 0 25.8-25.7l15.7-85a350 350 0 0 0 99.7-57.6l81.3 28.9a32 32 0 0 0 35.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1l74.7 63.9a370.03 370.03 0 0 1-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3l-17.9 97a377.5 377.5 0 0 1-85 0l-17.9-97.2l-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9l-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5l-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5c0-15.3 1.2-30.6 3.7-45.5l6.5-40l-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2l31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3l17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97l38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8l92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 0 1 512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 0 1 400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 0 1 624 502c0 29.9-11.7 58-32.8 79.2z"
|
|
123
|
-
}, null)]),
|
|
124
|
+
}, null)]), Ve = (e) => l("svg", g({
|
|
124
125
|
xmlns: "http://www.w3.org/2000/svg",
|
|
125
126
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
126
127
|
role: "img",
|
|
@@ -132,7 +133,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
132
133
|
"fill-rule": "evenodd",
|
|
133
134
|
d: "M8.27.776L7.275 6.25H3v2.5h3.82l-1.181 6.5H1v2.5h4.184l-.914 5.026l2.46.448l.995-5.474h6.46l-.915 5.026l2.46.448l.995-5.474H21v-2.5h-3.82l1.181-6.5H23v-2.5h-4.184l.914-5.026l-2.46-.448l-.995 5.474H9.816l.914-5.026zm6.37 14.474l1.181-6.5h-6.46l-1.181 6.5z",
|
|
134
135
|
"clip-rule": "evenodd"
|
|
135
|
-
}, null)]),
|
|
136
|
+
}, null)]), He = (e) => l("svg", g({
|
|
136
137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
137
138
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
138
139
|
role: "img",
|
|
@@ -146,7 +147,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
146
147
|
"stroke-linejoin": "round",
|
|
147
148
|
"stroke-width": "1.5",
|
|
148
149
|
d: "m15.238 10.81l-.569 1.694a4.33 4.33 0 0 1-2.757 2.76l-1.713.569a.288.288 0 0 0 0 .548l1.713.569a4.32 4.32 0 0 1 2.736 2.738l.568 1.715a.287.287 0 0 0 .548 0l.59-1.694a4.32 4.32 0 0 1 2.735-2.738l1.714-.569a.288.288 0 0 0 0-.548l-1.692-.59a4.32 4.32 0 0 1-2.757-2.76l-.569-1.715a.29.29 0 0 0-.448-.126a.3.3 0 0 0-.099.148m-8.43-4.914l-.413 1.231a3.15 3.15 0 0 1-2.006 2.007l-1.246.414a.21.21 0 0 0 0 .398l1.246.415a3.14 3.14 0 0 1 1.99 1.99l.413 1.248a.21.21 0 0 0 .398 0l.43-1.232a3.15 3.15 0 0 1 1.99-1.99l1.245-.415a.21.21 0 0 0 0-.398l-1.23-.43A3.14 3.14 0 0 1 7.62 7.128l-.414-1.247a.21.21 0 0 0-.398.016m7.849-3.422l-.207.616a1.57 1.57 0 0 1-1.002 1.004l-.623.207a.104.104 0 0 0-.052.16a.1.1 0 0 0 .052.039l.623.207a1.57 1.57 0 0 1 .995.995l.206.624a.105.105 0 0 0 .2 0l.214-.616a1.57 1.57 0 0 1 .995-.995l.623-.207a.105.105 0 0 0 0-.2l-.615-.214a1.57 1.57 0 0 1-1.003-1.004l-.207-.624a.105.105 0 0 0-.199.008"
|
|
149
|
-
}, null)]),
|
|
150
|
+
}, null)]), Ue = (e) => l("svg", g({
|
|
150
151
|
xmlns: "http://www.w3.org/2000/svg",
|
|
151
152
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
152
153
|
role: "img",
|
|
@@ -156,7 +157,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
156
157
|
}, e), [l("path", {
|
|
157
158
|
fill: "currentColor",
|
|
158
159
|
d: "M300 276.497a56 56 0 1 0 56-96.994a56 56 0 0 0-56 96.994Zm0 284a56 56 0 1 0 56-96.994a56 56 0 0 0-56 96.994ZM640 228a56 56 0 1 0 112 0a56 56 0 0 0-112 0Zm0 284a56 56 0 1 0 112 0a56 56 0 0 0-112 0ZM300 844.497a56 56 0 1 0 56-96.994a56 56 0 0 0-56 96.994ZM640 796a56 56 0 1 0 112 0a56 56 0 0 0-112 0Z"
|
|
159
|
-
}, null)]),
|
|
160
|
+
}, null)]), We = (e) => l("svg", g({
|
|
160
161
|
xmlns: "http://www.w3.org/2000/svg",
|
|
161
162
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
162
163
|
role: "img",
|
|
@@ -166,7 +167,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
166
167
|
}, e), [l("path", {
|
|
167
168
|
fill: "currentColor",
|
|
168
169
|
d: "M326 164h-64c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V172c0-4.4-3.6-8-8-8zm444 72.4V164c0-6.8-7.9-10.5-13.1-6.1L335 512l421.9 354.1c5.2 4.4 13.1.7 13.1-6.1v-72.4c0-9.4-4.2-18.4-11.4-24.5L459.4 512l299.2-251.1c7.2-6.1 11.4-15.1 11.4-24.5z"
|
|
169
|
-
}, null)]),
|
|
170
|
+
}, null)]), Ge = (e) => l("svg", g({
|
|
170
171
|
xmlns: "http://www.w3.org/2000/svg",
|
|
171
172
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
172
173
|
role: "img",
|
|
@@ -176,7 +177,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
176
177
|
}, e), [l("path", {
|
|
177
178
|
fill: "currentColor",
|
|
178
179
|
d: "M762 164h-64c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V172c0-4.4-3.6-8-8-8zm-508 0v72.4c0 9.5 4.2 18.4 11.4 24.5L564.6 512L265.4 763.1c-7.2 6.1-11.4 15-11.4 24.5V860c0 6.8 7.9 10.5 13.1 6.1L689 512L267.1 157.9A7.95 7.95 0 0 0 254 164z"
|
|
179
|
-
}, null)]),
|
|
180
|
+
}, null)]), Ke = (e) => l("svg", g({
|
|
180
181
|
xmlns: "http://www.w3.org/2000/svg",
|
|
181
182
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
182
183
|
role: "img",
|
|
@@ -186,7 +187,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
186
187
|
}, e), [l("path", {
|
|
187
188
|
fill: "currentColor",
|
|
188
189
|
d: "M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"
|
|
189
|
-
}, null)]),
|
|
190
|
+
}, null)]), qe = (e) => l("svg", g({
|
|
190
191
|
xmlns: "http://www.w3.org/2000/svg",
|
|
191
192
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
192
193
|
role: "img",
|
|
@@ -196,7 +197,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
196
197
|
}, e), [l("path", {
|
|
197
198
|
fill: "currentColor",
|
|
198
199
|
d: "M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"
|
|
199
|
-
}, null)]),
|
|
200
|
+
}, null)]), Je = (e) => l("svg", g({
|
|
200
201
|
xmlns: "http://www.w3.org/2000/svg",
|
|
201
202
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
202
203
|
role: "img",
|
|
@@ -206,7 +207,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
206
207
|
}, e), [l("path", {
|
|
207
208
|
fill: "currentColor",
|
|
208
209
|
d: "M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z"
|
|
209
|
-
}, null)]),
|
|
210
|
+
}, null)]), Ye = (e) => l("svg", g({
|
|
210
211
|
xmlns: "http://www.w3.org/2000/svg",
|
|
211
212
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
212
213
|
role: "img",
|
|
@@ -216,7 +217,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
216
217
|
}, e), [l("path", {
|
|
217
218
|
fill: "currentColor",
|
|
218
219
|
d: "m16 10l10 10l-1.4 1.4l-8.6-8.6l-8.6 8.6L6 20z"
|
|
219
|
-
}, null)]),
|
|
220
|
+
}, null)]), Xe = (e) => l("svg", g({
|
|
220
221
|
xmlns: "http://www.w3.org/2000/svg",
|
|
221
222
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
222
223
|
role: "img",
|
|
@@ -226,7 +227,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
226
227
|
}, e), [l("path", {
|
|
227
228
|
fill: "currentColor",
|
|
228
229
|
d: "m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"
|
|
229
|
-
}, null)]),
|
|
230
|
+
}, null)]), Ze = (e) => l("svg", g({
|
|
230
231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
231
232
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
232
233
|
role: "img",
|
|
@@ -236,7 +237,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
236
237
|
}, e), [l("path", {
|
|
237
238
|
fill: "currentColor",
|
|
238
239
|
d: "M12 22q-2.05 0-3.875-.788t-3.187-2.15t-2.15-3.187T2 12q0-2.075.788-3.887t2.15-3.175t3.187-2.15T12 2q2.075 0 3.888.788t3.174 2.15t2.15 3.175T22 12q0 2.05-.788 3.875t-2.15 3.188t-3.175 2.15T12 22m0-2.05q.65-.9 1.125-1.875T13.9 16h-3.8q.3 1.1.775 2.075T12 19.95m-2.6-.4q-.45-.825-.787-1.713T8.05 16H5.1q.725 1.25 1.813 2.175T9.4 19.55m5.2 0q1.4-.45 2.488-1.375T18.9 16h-2.95q-.225.95-.562 1.838T14.6 19.55M4.25 14h3.4q-.075-.5-.112-.987T7.5 12t.038-1.012T7.65 10h-3.4q-.125.5-.187.988T4 12t.063 1.013t.187.987m5.4 0h4.7q.075-.5.113-.987T14.5 12t-.038-1.012T14.35 10h-4.7q-.075.5-.112.988T9.5 12t.038 1.013t.112.987m6.7 0h3.4q.125-.5.188-.987T20 12t-.062-1.012T19.75 10h-3.4q.075.5.113.988T16.5 12t-.038 1.013t-.112.987m-.4-6h2.95q-.725-1.25-1.812-2.175T14.6 4.45q.45.825.788 1.713T15.95 8M10.1 8h3.8q-.3-1.1-.775-2.075T12 4.05q-.65.9-1.125 1.875T10.1 8m-5 0h2.95q.225-.95.563-1.838T9.4 4.45Q8 4.9 6.912 5.825T5.1 8"
|
|
239
|
-
}, null)]),
|
|
240
|
+
}, null)]), Qe = (e) => l("svg", g({
|
|
240
241
|
xmlns: "http://www.w3.org/2000/svg",
|
|
241
242
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
242
243
|
role: "img",
|
|
@@ -246,7 +247,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
246
247
|
}, e), [l("path", {
|
|
247
248
|
fill: "currentColor",
|
|
248
249
|
d: "m12 19.24l-4.95-4.95l-1.41 1.42L12 22.07l6.36-6.36l-1.41-1.42zM5.64 8.29l1.41 1.42L12 4.76l4.95 4.95l1.41-1.42L12 1.93z"
|
|
249
|
-
}, null)]),
|
|
250
|
+
}, null)]), $e = (e) => l("svg", g({
|
|
250
251
|
xmlns: "http://www.w3.org/2000/svg",
|
|
251
252
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
252
253
|
role: "img",
|
|
@@ -256,7 +257,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
256
257
|
}, e), [l("path", {
|
|
257
258
|
fill: "currentColor",
|
|
258
259
|
d: "M12 7.59L7.05 2.64L5.64 4.05L12 10.41l6.36-6.36l-1.41-1.41zM5.64 19.95l1.41 1.41L12 16.41l4.95 4.95l1.41-1.41L12 13.59z"
|
|
259
|
-
}, null)]),
|
|
260
|
+
}, null)]), et = (e) => l("svg", g({
|
|
260
261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
261
262
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
262
263
|
role: "img",
|
|
@@ -267,7 +268,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
267
268
|
fill: "currentColor",
|
|
268
269
|
fillRule: "evenodd",
|
|
269
270
|
d: "M2.5 7.5a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5m15 0a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5m-7.274 0a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5"
|
|
270
|
-
}, null)]),
|
|
271
|
+
}, null)]), tt = (e) => l("svg", g({
|
|
271
272
|
xmlns: "http://www.w3.org/2000/svg",
|
|
272
273
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
273
274
|
width: "1em",
|
|
@@ -276,7 +277,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
276
277
|
}, e), [l("path", {
|
|
277
278
|
fill: "currentColor",
|
|
278
279
|
d: "M5.5 4.937a2 2 0 1 1 1 0V6h2a1 1 0 0 1 1 1v1.063a2 2 0 1 1-1 0V7h-5v1.063a2 2 0 1 1-1 0V7a1 1 0 0 1 1-1h2zM6 4a1 1 0 1 0 0-2a1 1 0 0 0 0 2m-3 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m5-1a1 1 0 1 0 2 0a1 1 0 0 0-2 0"
|
|
279
|
-
}, null)]),
|
|
280
|
+
}, null)]), nt = (e) => l("svg", g({
|
|
280
281
|
xmlns: "http://www.w3.org/2000/svg",
|
|
281
282
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
282
283
|
width: "1em",
|
|
@@ -288,7 +289,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
288
289
|
}, [l("path", { d: "M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" }, null), l("path", {
|
|
289
290
|
fill: "currentColor",
|
|
290
291
|
d: "M13 13a4 4 0 0 1 4 4v2a1 1 0 1 1-2 0v-2a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v2a1 1 0 1 1-2 0v-2a4 4 0 0 1 4-4zm6 0a3 3 0 0 1 3 3v2a1 1 0 1 1-2 0v-2a1 1 0 0 0-1-1h-1.416a5.02 5.02 0 0 0-1.583-2zM9.5 3a4.5 4.5 0 1 1 0 9a4.5 4.5 0 0 1 0-9M18 6a3 3 0 1 1 0 6a3 3 0 0 1 0-6M9.5 5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5M18 8a1 1 0 1 0 0 2a1 1 0 0 0 0-2"
|
|
291
|
-
}, null)])]),
|
|
292
|
+
}, null)])]), rt = (e) => l("svg", g({
|
|
292
293
|
xmlns: "http://www.w3.org/2000/svg",
|
|
293
294
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
294
295
|
role: "img",
|
|
@@ -298,7 +299,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
298
299
|
}, e), [l("path", {
|
|
299
300
|
fill: "currentColor",
|
|
300
301
|
d: "M235.4 210a124.2 124.2 0 0 0-61.8-53.2a76 76 0 1 0-91.2 0A124.2 124.2 0 0 0 20.6 210a12 12 0 0 0 20.8 12a100 100 0 0 1 173.2 0a12.1 12.1 0 0 0 10.4 6a11.7 11.7 0 0 0 6-1.6a12 12 0 0 0 4.4-16.4ZM76 96a52 52 0 1 1 52 52a52 52 0 0 1-52-52Z"
|
|
301
|
-
}, null)]),
|
|
302
|
+
}, null)]), it = (e) => l("svg", g({
|
|
302
303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
303
304
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
304
305
|
role: "img",
|
|
@@ -308,7 +309,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
308
309
|
}, e), [l("path", {
|
|
309
310
|
fill: "currentColor",
|
|
310
311
|
d: "m6.4 18.308l-.708-.708l5.6-5.6l-5.6-5.6l.708-.708l5.6 5.6l5.6-5.6l.708.708l-5.6 5.6l5.6 5.6l-.708.708l-5.6-5.6z"
|
|
311
|
-
}, null)]),
|
|
312
|
+
}, null)]), at = (e) => l("svg", g({
|
|
312
313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
313
314
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
314
315
|
role: "img",
|
|
@@ -318,7 +319,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
318
319
|
}, e), [l("path", {
|
|
319
320
|
fill: "currentColor",
|
|
320
321
|
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5l-1-1h-5l-1 1H5v2h14V4z"
|
|
321
|
-
}, null)]),
|
|
322
|
+
}, null)]), ot = (e) => l("svg", g({
|
|
322
323
|
xmlns: "http://www.w3.org/2000/svg",
|
|
323
324
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
324
325
|
role: "img",
|
|
@@ -328,23 +329,23 @@ var Le = /* @__PURE__ */ d({
|
|
|
328
329
|
}, e), [l("path", {
|
|
329
330
|
fill: "currentColor",
|
|
330
331
|
d: "M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12z"
|
|
331
|
-
}, null)]),
|
|
332
|
+
}, null)]), st = /* @__PURE__ */ d({
|
|
332
333
|
name: "DataActions",
|
|
333
334
|
props: { options: {
|
|
334
335
|
type: Array,
|
|
335
336
|
default: () => []
|
|
336
337
|
} },
|
|
337
338
|
setup(e) {
|
|
338
|
-
let t =
|
|
339
|
+
let t = y(), n = !0, r = () => {
|
|
339
340
|
n ? n = !1 : t.value?.sync({ showAllItemsBeforeCalculate: !0 });
|
|
340
|
-
}, i =
|
|
341
|
+
}, i = y(), a = () => i.value, o = y(-1), c = (t) => {
|
|
341
342
|
o.value = e.options.length - t;
|
|
342
343
|
}, u = (e) => {
|
|
343
344
|
e || (o.value = -1);
|
|
344
345
|
}, d = () => {}, f = s(() => o.value === -1 ? [] : e.options.slice(o.value).map((e) => ({
|
|
345
346
|
...e,
|
|
346
347
|
key: e.text
|
|
347
|
-
}))), p = (e) => l(
|
|
348
|
+
}))), p = (e) => l(N, {
|
|
348
349
|
type: e.color === "danger" ? "error" : [
|
|
349
350
|
"default",
|
|
350
351
|
"tertiary",
|
|
@@ -366,7 +367,7 @@ var Le = /* @__PURE__ */ d({
|
|
|
366
367
|
updateCounter: d,
|
|
367
368
|
style: "margin-top: 2px"
|
|
368
369
|
}, {
|
|
369
|
-
default: () => e.options.map((e) => l(
|
|
370
|
+
default: () => e.options.map((e) => l(N, {
|
|
370
371
|
quaternary: !0,
|
|
371
372
|
type: e.color === "danger" ? "error" : [
|
|
372
373
|
"default",
|
|
@@ -383,24 +384,24 @@ var Le = /* @__PURE__ */ d({
|
|
|
383
384
|
counter: () => l("span", {
|
|
384
385
|
ref: i,
|
|
385
386
|
style: "position: absolute"
|
|
386
|
-
}, [l(
|
|
387
|
+
}, [l(F, {
|
|
387
388
|
options: f.value,
|
|
388
389
|
renderLabel: p,
|
|
389
390
|
showArrow: !0,
|
|
390
391
|
onSelect: m
|
|
391
|
-
}, { default: () => [l(
|
|
392
|
+
}, { default: () => [l(N, {
|
|
392
393
|
quaternary: !0,
|
|
393
394
|
size: "small"
|
|
394
|
-
}, { default: () => [l(
|
|
395
|
+
}, { default: () => [l(et, { style: "font-size: 14px; color: #888" }, null)] })] })])
|
|
395
396
|
})] });
|
|
396
397
|
}
|
|
397
398
|
});
|
|
398
399
|
//#endregion
|
|
399
400
|
//#region src/components/DataCustom.jsx
|
|
400
|
-
function
|
|
401
|
+
function G(e) {
|
|
401
402
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
402
403
|
}
|
|
403
|
-
var
|
|
404
|
+
var K = /* @__PURE__ */ d({
|
|
404
405
|
name: "DataCustomRow",
|
|
405
406
|
props: {
|
|
406
407
|
label: [String, Function],
|
|
@@ -411,37 +412,38 @@ var st = /* @__PURE__ */ d({
|
|
|
411
412
|
},
|
|
412
413
|
emits: ["update-hidden", "update-fixed"],
|
|
413
414
|
setup(e, { emit: t }) {
|
|
414
|
-
let n =
|
|
415
|
+
let n = y(null), r = k(n);
|
|
415
416
|
return () => {
|
|
416
417
|
let i;
|
|
417
|
-
return l(
|
|
418
|
+
return l(I, {
|
|
418
419
|
ref: n,
|
|
419
420
|
align: "center",
|
|
420
421
|
wrap: !1,
|
|
421
422
|
size: "small",
|
|
423
|
+
class: "data-custom-item",
|
|
422
424
|
style: `padding: 4px 12px; ${r.value ? "background-color: #f5f5f5" : ""}`
|
|
423
425
|
}, { default: () => [
|
|
424
|
-
l(
|
|
425
|
-
type: "primary",
|
|
426
|
+
l(N, {
|
|
427
|
+
type: e.fixed ? "default" : "primary",
|
|
426
428
|
text: !0,
|
|
427
|
-
class: "icon-drag",
|
|
428
|
-
style: "cursor: move"
|
|
429
|
-
}, { default: () => [l(
|
|
430
|
-
l(
|
|
429
|
+
class: e.fixed ? "disabled" : "icon-drag",
|
|
430
|
+
style: e.fixed ? "cursor: not-allowed" : "cursor: move"
|
|
431
|
+
}, { default: () => [l(L, { size: "18" }, { default: () => [l(Ue, null, null)] })] }),
|
|
432
|
+
l(P, {
|
|
431
433
|
checked: !e.hidden,
|
|
432
434
|
disabled: e.disabled,
|
|
433
435
|
onUpdateChecked: (e) => t("update-hidden", !e)
|
|
434
436
|
}, null),
|
|
435
|
-
l(
|
|
436
|
-
e.showFixed ? [l(
|
|
437
|
+
l(se, { style: "flex: 1 1 auto" }, G(i = w(e.label)) ? i : { default: () => [i] }),
|
|
438
|
+
e.showFixed ? [l(N, {
|
|
437
439
|
text: !0,
|
|
438
|
-
type: e.fixed === "left" ? "
|
|
439
|
-
onClick: () => t("update-fixed", e.fixed
|
|
440
|
-
}, { default: () => [l(
|
|
440
|
+
type: e.fixed === "left" ? "success" : void 0,
|
|
441
|
+
onClick: () => t("update-fixed", e.fixed !== "left" && "left")
|
|
442
|
+
}, { default: () => [l(L, null, { default: () => [l(We, null, null)] })] }), l(N, {
|
|
441
443
|
text: !0,
|
|
442
|
-
type: e.fixed === "right" ? "
|
|
443
|
-
onClick: () => t("update-fixed", e.fixed
|
|
444
|
-
}, { default: () => [l(
|
|
444
|
+
type: e.fixed === "right" ? "success" : void 0,
|
|
445
|
+
onClick: () => t("update-fixed", e.fixed !== "right" && "right")
|
|
446
|
+
}, { default: () => [l(L, null, { default: () => [l(Ge, null, null)] })] })] : void 0
|
|
445
447
|
] });
|
|
446
448
|
};
|
|
447
449
|
}
|
|
@@ -501,21 +503,50 @@ var st = /* @__PURE__ */ d({
|
|
|
501
503
|
[r]: i
|
|
502
504
|
});
|
|
503
505
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
506
|
+
function o(e, r) {
|
|
507
|
+
let i = e[t.fixedField];
|
|
508
|
+
if (r === i) return;
|
|
509
|
+
let [a, o, s] = [
|
|
510
|
+
[...c.value[0]],
|
|
511
|
+
[...c.value[1]],
|
|
512
|
+
[...c.value[2]]
|
|
513
|
+
], l = r ? r === "left" ? a : s : o;
|
|
514
|
+
r === "left" ? l.push(e) : r === "right" || i === "left" ? l.unshift(e) : l.push(e), Me(i ? i === "left" ? a : s : o, (n) => n[t.keyField] === e[t.keyField]), n("custom", [[
|
|
515
|
+
a,
|
|
516
|
+
o,
|
|
517
|
+
s
|
|
518
|
+
].flatMap((e) => e.map((e) => e[t.keyField])), {
|
|
519
|
+
key: e[t.keyField],
|
|
520
|
+
fixed: r
|
|
521
|
+
}]);
|
|
522
|
+
}
|
|
523
|
+
let c = s(() => {
|
|
524
|
+
let e = [], n = [], r = [];
|
|
525
|
+
for (let i of t.data) i[t.fixedField] === "left" ? e.push(i) : i[t.fixedField] === "right" ? r.push(i) : n.push(i);
|
|
526
|
+
return [
|
|
527
|
+
e,
|
|
528
|
+
n,
|
|
529
|
+
r
|
|
530
|
+
];
|
|
531
|
+
}), u = y(), d;
|
|
532
|
+
return E(u, (e, r, i) => {
|
|
533
|
+
e?.$el && (d = je.create(e.$el, {
|
|
507
534
|
animation: 150,
|
|
508
535
|
ghostClass: "ghost",
|
|
509
536
|
handle: ".icon-drag",
|
|
510
537
|
filter: ".disabled",
|
|
511
538
|
onEnd(e) {
|
|
512
|
-
let r =
|
|
513
|
-
r.splice(e.newIndex, 0, i), n("custom",
|
|
539
|
+
let r = c.value[1].map((e) => e[t.keyField]), [i] = r.splice(e.oldIndex, 1);
|
|
540
|
+
r.splice(e.newIndex, 0, i), n("custom", [
|
|
541
|
+
...c.value[0].map((e) => e[t.keyField]),
|
|
542
|
+
...r,
|
|
543
|
+
...c.value[2].map((e) => e[t.keyField])
|
|
544
|
+
]);
|
|
514
545
|
}
|
|
546
|
+
}), i(() => {
|
|
547
|
+
d?.destroy(), d = void 0;
|
|
515
548
|
}));
|
|
516
|
-
}),
|
|
517
|
-
s?.destroy(), s = void 0;
|
|
518
|
-
}), () => l(H, {
|
|
549
|
+
}), () => l(z, {
|
|
519
550
|
trigger: "click",
|
|
520
551
|
scrollable: !0,
|
|
521
552
|
placement: "left-start",
|
|
@@ -523,40 +554,71 @@ var st = /* @__PURE__ */ d({
|
|
|
523
554
|
"content-style": "padding: 0",
|
|
524
555
|
style: "max-height: 400px; width: 240px"
|
|
525
556
|
}, {
|
|
526
|
-
trigger: () =>
|
|
557
|
+
trigger: () => D(t.buttonRender?.() ?? l(N, {
|
|
527
558
|
text: !0,
|
|
528
559
|
type: t.type
|
|
529
|
-
}, { default: () => [l(
|
|
560
|
+
}, { default: () => [l(L, { size: t.size }, { default: () => [l(Be, null, null)] })] }), [[
|
|
530
561
|
a,
|
|
531
562
|
t.tooltip ?? r("common.page.custom.tooltip"),
|
|
532
563
|
void 0,
|
|
533
564
|
{ [t.tooltipPlacement]: !0 }
|
|
534
565
|
]]),
|
|
535
566
|
default: () => {
|
|
536
|
-
let e, a;
|
|
537
|
-
return l("div",
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
567
|
+
let e, a, s, d;
|
|
568
|
+
return l("div", { class: "data-custom" }, [
|
|
569
|
+
l(I, {
|
|
570
|
+
justify: "space-between",
|
|
571
|
+
style: "padding: 8px 12px; position: sticky; z-index: 1; top: 0; backdrop-filter: blur(4px)"
|
|
572
|
+
}, { default: () => [l("div", { style: "font-weight: bold" }, [t.tooltip ?? r("common.page.custom.tooltip")]), l(N, {
|
|
573
|
+
text: !0,
|
|
574
|
+
type: "primary",
|
|
575
|
+
size: "small",
|
|
576
|
+
onClick: () => n("custom", !0)
|
|
577
|
+
}, G(e = r("common.page.custom.reset")) ? e : { default: () => [e] })] }),
|
|
578
|
+
c.value[0].length > 0 ? l(I, {
|
|
579
|
+
vertical: !0,
|
|
580
|
+
size: 0,
|
|
581
|
+
style: "position: sticky; z-index: 1; top: 40px; backdrop-filter: blur(6px)"
|
|
582
|
+
}, G(a = c.value[0].map((e) => l(K, {
|
|
583
|
+
key: e[t.keyField],
|
|
584
|
+
label: e[t.labelField],
|
|
585
|
+
hidden: e[t.hiddenField],
|
|
586
|
+
fixed: e[t.fixedField],
|
|
587
|
+
showFixed: t.showFixed,
|
|
588
|
+
style: e[t.visibleField] === !1 ? "display: none" : void 0,
|
|
589
|
+
onUpdateHidden: (t) => i(e, "hidden", t),
|
|
590
|
+
onUpdateFixed: (t) => o(e, t)
|
|
591
|
+
}, null))) ? a : { default: () => [a] }) : void 0,
|
|
592
|
+
l(I, {
|
|
593
|
+
ref: u,
|
|
594
|
+
vertical: !0,
|
|
595
|
+
size: 0,
|
|
596
|
+
style: "margin-bottom: 8px"
|
|
597
|
+
}, G(s = c.value[1].map((e) => l(K, {
|
|
598
|
+
key: e[t.keyField],
|
|
599
|
+
label: e[t.labelField],
|
|
600
|
+
hidden: e[t.hiddenField],
|
|
601
|
+
fixed: e[t.fixedField],
|
|
602
|
+
showFixed: t.showFixed,
|
|
603
|
+
style: e[t.visibleField] === !1 ? "display: none" : void 0,
|
|
604
|
+
onUpdateHidden: (t) => i(e, "hidden", t),
|
|
605
|
+
onUpdateFixed: (t) => o(e, t)
|
|
606
|
+
}, null))) ? s : { default: () => [s] }),
|
|
607
|
+
c.value[2].length > 0 ? l(I, {
|
|
608
|
+
vertical: !0,
|
|
609
|
+
size: 0,
|
|
610
|
+
style: "position: sticky; z-index: 1; bottom: 0; backdrop-filter: blur(6px)"
|
|
611
|
+
}, G(d = c.value[2].map((e) => l(K, {
|
|
612
|
+
key: e[t.keyField],
|
|
613
|
+
label: e[t.labelField],
|
|
614
|
+
hidden: e[t.hiddenField],
|
|
615
|
+
fixed: e[t.fixedField],
|
|
616
|
+
showFixed: t.showFixed,
|
|
617
|
+
style: e[t.visibleField] === !1 ? "display: none" : void 0,
|
|
618
|
+
onUpdateHidden: (t) => i(e, "hidden", t),
|
|
619
|
+
onUpdateFixed: (t) => o(e, t)
|
|
620
|
+
}, null))) ? d : { default: () => [d] }) : void 0
|
|
621
|
+
]);
|
|
560
622
|
}
|
|
561
623
|
});
|
|
562
624
|
}
|
|
@@ -571,7 +633,7 @@ function q(e, t) {
|
|
|
571
633
|
}
|
|
572
634
|
function ut(e, t) {
|
|
573
635
|
let n = e.children?.filter((e) => e.isGroup);
|
|
574
|
-
return l(
|
|
636
|
+
return l(re, { href: `#${e.prop}` }, {
|
|
575
637
|
title: () => q(e.label, t),
|
|
576
638
|
default: n?.length ? () => n.map((e) => ut(e, t)) : void 0
|
|
577
639
|
});
|
|
@@ -614,9 +676,9 @@ var pt = /* @__PURE__ */ d({
|
|
|
614
676
|
setup(e) {
|
|
615
677
|
let n = i(), r = `${n.value}-data-descriptions`;
|
|
616
678
|
t("-data-descriptions", mt, n);
|
|
617
|
-
let a =
|
|
618
|
-
|
|
619
|
-
location.hash &&
|
|
679
|
+
let a = y();
|
|
680
|
+
E(() => e.items, () => {
|
|
681
|
+
location.hash && O(a).toBeTruthy().then((e) => {
|
|
620
682
|
e.scrollTo(location.hash);
|
|
621
683
|
});
|
|
622
684
|
}, { immediate: !0 });
|
|
@@ -630,7 +692,7 @@ var pt = /* @__PURE__ */ d({
|
|
|
630
692
|
let { cols: t, title: n, data: i, items: a, anchor: s } = e, u = Oe(n) ? void 0 : l("div", { class: `${r}__header` }, [typeof n == "string" ? l("span", null, [n]) : n(i ?? void 0)]), d = a.filter((e) => !e.hidden).map((e) => ft(e, t, i, r)), p;
|
|
631
693
|
if (s !== !1) {
|
|
632
694
|
let e;
|
|
633
|
-
p = l(
|
|
695
|
+
p = l(ne, c.value, lt(e = a.filter((e) => e.isGroup).map((e) => f(ut(e, i), { key: e.prop }))) ? e : { default: () => [e] });
|
|
634
696
|
}
|
|
635
697
|
return l("div", {
|
|
636
698
|
class: r,
|
|
@@ -749,7 +811,7 @@ var pt = /* @__PURE__ */ d({
|
|
|
749
811
|
default: void 0
|
|
750
812
|
},
|
|
751
813
|
nativeButtonType: Boolean
|
|
752
|
-
},
|
|
814
|
+
}, ht = /* @__PURE__ */ d({
|
|
753
815
|
name: "DataFormActions",
|
|
754
816
|
props: J,
|
|
755
817
|
emits: [
|
|
@@ -764,54 +826,54 @@ var pt = /* @__PURE__ */ d({
|
|
|
764
826
|
n("reset");
|
|
765
827
|
}, s = () => {
|
|
766
828
|
n("cancel");
|
|
767
|
-
}, { mergedDisabledRef: c, mergedSizeRef: u } =
|
|
829
|
+
}, { mergedDisabledRef: c, mergedSizeRef: u } = Ne(t);
|
|
768
830
|
return () => {
|
|
769
|
-
let e = u.value, n = c.value, { gap: d = e === "small" ? 8 : e === "medium" ? 12 : 16, submitText: f, resetText: p, cancelText: m, submitDisabled: h, submitLoading: g, showSubmitBtn: _, showResetBtn: v, showCancelBtn: y, succeeded:
|
|
770
|
-
return l(
|
|
771
|
-
|
|
772
|
-
_ === !1 ? void 0 : l(
|
|
831
|
+
let e = u.value, n = c.value, { gap: d = e === "small" ? 8 : e === "medium" ? 12 : 16, submitText: f, resetText: p, cancelText: m, submitDisabled: h, submitLoading: g, showSubmitBtn: _, showResetBtn: v, showCancelBtn: y, succeeded: x, successText: S = f, failureText: C = f, nativeButtonType: w } = t;
|
|
832
|
+
return l(I, { size: d === void 0 ? e : d }, { default: () => [
|
|
833
|
+
b(r, "prefix"),
|
|
834
|
+
_ === !1 ? void 0 : l(N, {
|
|
773
835
|
attrType: w ? "submit" : "button",
|
|
774
836
|
size: e,
|
|
775
|
-
type:
|
|
776
|
-
disabled:
|
|
837
|
+
type: x ? "success" : x === !1 ? "error" : "primary",
|
|
838
|
+
disabled: x !== void 0 || n || h || g,
|
|
777
839
|
loading: g,
|
|
778
840
|
onClick: w ? void 0 : a
|
|
779
841
|
}, {
|
|
780
|
-
default: () => (
|
|
781
|
-
icon: () =>
|
|
842
|
+
default: () => (x ? S : x === !1 ? C : f) || i("common.page.form.submitText"),
|
|
843
|
+
icon: () => x ? l(L, null, { default: () => [l(Xe, null, null)] }) : x === !1 ? l(L, null, { default: () => [l(it, null, null)] }) : void 0
|
|
782
844
|
}),
|
|
783
|
-
v === !1 ? void 0 : l(
|
|
845
|
+
v === !1 ? void 0 : l(N, {
|
|
784
846
|
size: u.value,
|
|
785
847
|
attrType: w ? "reset" : "button",
|
|
786
|
-
disabled: n || g ||
|
|
848
|
+
disabled: n || g || x,
|
|
787
849
|
type: y ? "primary" : "default",
|
|
788
850
|
secondary: y,
|
|
789
851
|
onClick: w ? void 0 : o
|
|
790
852
|
}, { default: () => [p || i("common.page.form.resetText")] }),
|
|
791
|
-
y === !1 ||
|
|
853
|
+
y === !1 || x ? void 0 : l(N, {
|
|
792
854
|
attrType: "button",
|
|
793
855
|
disabled: n || g,
|
|
794
856
|
onClick: s
|
|
795
857
|
}, { default: () => [m || i("common.page.form.cancelText")] }),
|
|
796
|
-
|
|
858
|
+
b(r, "suffix")
|
|
797
859
|
] });
|
|
798
860
|
};
|
|
799
861
|
}
|
|
800
862
|
});
|
|
801
863
|
//#endregion
|
|
802
864
|
//#region src/components/DataForm.jsx
|
|
803
|
-
function
|
|
865
|
+
function gt(e) {
|
|
804
866
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
805
867
|
}
|
|
806
|
-
var
|
|
868
|
+
var _t = /* @__PURE__ */ d({
|
|
807
869
|
name: "DataForm",
|
|
808
870
|
props: {
|
|
809
871
|
grid: {
|
|
810
872
|
type: Object,
|
|
811
873
|
default: () => ({})
|
|
812
874
|
},
|
|
813
|
-
...
|
|
814
|
-
...
|
|
875
|
+
...U(H, "disabled", "model", "labelWidth", "labelAlign", "showFeedback", "size"),
|
|
876
|
+
...U(J, "submitText", "resetText", "cancelText", "showSubmitBtn", "showResetBtn", "showCancelBtn", "submitDisabled", "succeeded", "successText", "failureText"),
|
|
815
877
|
readonly: {
|
|
816
878
|
type: Boolean,
|
|
817
879
|
required: !1,
|
|
@@ -863,18 +925,18 @@ var gt = /* @__PURE__ */ d({
|
|
|
863
925
|
],
|
|
864
926
|
setup(e, { emit: t, slots: n }) {
|
|
865
927
|
let r = (n) => {
|
|
866
|
-
n?.preventDefault?.(), t("submit", { ...
|
|
928
|
+
n?.preventDefault?.(), t("submit", { ...S(e.model) }, n);
|
|
867
929
|
}, i = (e) => {
|
|
868
930
|
e?.preventDefault?.(), t("reset");
|
|
869
931
|
}, a = (e) => {
|
|
870
932
|
e?.preventDefault?.(), t("cancel");
|
|
871
|
-
}, s =
|
|
933
|
+
}, s = y(), u = () => b(n, "actionPrefix"), d = () => b(n, "actionSuffix"), f = () => {
|
|
872
934
|
let { loading: t, showSubmitBtn: n, showResetBtn: r, showCancelBtn: i, actionAlign: o, actionJustify: s, actionGap: c, submitDisabled: f, submitText: p, resetText: m, cancelText: h, succeeded: g, successText: _, failureText: v } = e;
|
|
873
|
-
return [l(
|
|
935
|
+
return [l(ue, {
|
|
874
936
|
label: s === "start" ? " " : void 0,
|
|
875
937
|
showLabel: e.labelPlacement !== "top",
|
|
876
938
|
style: "padding-top: 16px"
|
|
877
|
-
}, { default: () => [l(
|
|
939
|
+
}, { default: () => [l(ht, {
|
|
878
940
|
align: o,
|
|
879
941
|
justify: s,
|
|
880
942
|
gap: c,
|
|
@@ -895,20 +957,20 @@ var gt = /* @__PURE__ */ d({
|
|
|
895
957
|
prefix: u,
|
|
896
958
|
suffix: d
|
|
897
959
|
})] })];
|
|
898
|
-
}, p = ({ overflow: e }) =>
|
|
960
|
+
}, p = ({ overflow: e }) => b(n, "action", {
|
|
899
961
|
overflow: e,
|
|
900
962
|
grid: s.value
|
|
901
|
-
}, f), m = (t) => e.validation[t]?.errors?.[0] ?? e.validation[t]?.warnings?.[0], h = ({ label: t, showColon: n, tooltip: r, tooltipPlacement: i = e.tooltipPlacement }) => l(
|
|
963
|
+
}, f), m = (t) => e.validation[t]?.errors?.[0] ?? e.validation[t]?.warnings?.[0], h = ({ label: t, showColon: n, tooltip: r, tooltipPlacement: i = e.tooltipPlacement }) => l(B, {
|
|
902
964
|
depth: e.readonly ? 3 : 2,
|
|
903
965
|
style: "display: inline-flex; align-items: flex-start; gap: 1px"
|
|
904
966
|
}, { default: () => [
|
|
905
|
-
l("span", null, [
|
|
906
|
-
i === "icon" ? l(
|
|
907
|
-
default: () =>
|
|
908
|
-
trigger: () => l(
|
|
967
|
+
l("span", null, [w(t)]),
|
|
968
|
+
i === "icon" ? l(V, null, {
|
|
969
|
+
default: () => w(r),
|
|
970
|
+
trigger: () => l(N, {
|
|
909
971
|
text: !0,
|
|
910
972
|
style: "font-size: 1.25em; opacity: 0.8"
|
|
911
|
-
}, { default: () => [l(
|
|
973
|
+
}, { default: () => [l(L, null, { default: () => [l(ze, null, null)] })] })
|
|
912
974
|
}) : void 0,
|
|
913
975
|
e.showColon && n !== !1 ? l("span", { style: "place-self: center" }, [c(":")]) : void 0
|
|
914
976
|
] }), _ = ({ render: t, tooltip: n, tooltipPlacement: r = e.tooltipPlacement, showTooltipWhenReadonly: i = !1 }) => {
|
|
@@ -917,14 +979,14 @@ var gt = /* @__PURE__ */ d({
|
|
|
917
979
|
size: e.size,
|
|
918
980
|
readonly: e.readonly
|
|
919
981
|
})]);
|
|
920
|
-
return n && r === "bottom" && (!e.readonly || i) ? l("div", { style: "width: 100%; display: flex; flex-direction: column" }, [o, l(
|
|
982
|
+
return n && r === "bottom" && (!e.readonly || i) ? l("div", { style: "width: 100%; display: flex; flex-direction: column" }, [o, l(B, {
|
|
921
983
|
depth: 3,
|
|
922
984
|
style: "font-size: calc(1rem - 3px); margin-top: 6px"
|
|
923
|
-
},
|
|
985
|
+
}, gt(a = w(n)) ? a : { default: () => [a] })]) : o;
|
|
924
986
|
}, v = (t) => {
|
|
925
987
|
if (t.hidden) return;
|
|
926
988
|
let { hidden: n, name: r, render: i, label: a, showColon: o, span: s = 6, rowSpan: c, offset: u = 0, tooltip: d, tooltipPlacement: f, readonly: p = e.readonly, showRequireMark: v = !p, showTooltipWhenReadonly: y, validationStatus: b = e.validation[r]?.errors?.length ? "error" : e.validation[r]?.warnings?.length ? "warning" : e.validation[r] ? "success" : void 0, ...x } = t, S;
|
|
927
|
-
return S = r[0] === "$" ? i({}) : l(
|
|
989
|
+
return S = r[0] === "$" ? i({}) : l(ue, g({
|
|
928
990
|
path: r,
|
|
929
991
|
validationStatus: b,
|
|
930
992
|
showRequireMark: x.required && v
|
|
@@ -932,41 +994,41 @@ var gt = /* @__PURE__ */ d({
|
|
|
932
994
|
label: () => h(t),
|
|
933
995
|
default: () => _(t),
|
|
934
996
|
feedback: () => m(r)
|
|
935
|
-
}), e.grid === !1 ? S : l(
|
|
997
|
+
}), e.grid === !1 ? S : l(de, {
|
|
936
998
|
key: r,
|
|
937
999
|
offset: u,
|
|
938
1000
|
span: s,
|
|
939
1001
|
style: c ? { gridRowEnd: `span ${c}` } : void 0
|
|
940
|
-
},
|
|
941
|
-
},
|
|
1002
|
+
}, gt(S) ? S : { default: () => [S] });
|
|
1003
|
+
}, x = () => {
|
|
942
1004
|
let { items: t, showAction: r } = e;
|
|
943
|
-
return l(o, null, [t.map(v), r === !1 || e.readonly === !0 && !n.action ? void 0 : l(
|
|
1005
|
+
return l(o, null, [t.map(v), r === !1 || e.readonly === !0 && !n.action ? void 0 : l(de, g({
|
|
944
1006
|
key: "action",
|
|
945
1007
|
span: 2 ** 53 - 1
|
|
946
1008
|
}, typeof e.showAction == "object" ? e.showAction : {}), { default: p })]);
|
|
947
1009
|
};
|
|
948
1010
|
return () => {
|
|
949
|
-
let { items: t, loading: n, validation: a, showColon: o, tooltipPlacement: c, showFeedback: u, labelWidth: d = "7.2em", labelAlign: f = e.labelPlacement === "top" ? "left" : "right", grid: p, showAction: m, showSubmitBtn: h, showResetBtn: _, showCancelBtn: v, actionAlign:
|
|
950
|
-
return l(
|
|
1011
|
+
let { items: t, loading: n, validation: a, showColon: o, tooltipPlacement: c, showFeedback: u, labelWidth: d = "7.2em", labelAlign: f = e.labelPlacement === "top" ? "left" : "right", grid: p, showAction: m, showSubmitBtn: h, showResetBtn: _, showCancelBtn: v, actionAlign: y, actionJustify: b, actionGap: S, submitDisabled: C, submitText: w, resetText: T, cancelText: ee, succeeded: E, successText: D, failureText: te, ...O } = e, k = !e.readonly && u !== !1;
|
|
1012
|
+
return l(le, g({
|
|
951
1013
|
labelWidth: d,
|
|
952
1014
|
labelAlign: f,
|
|
953
1015
|
onReset: i,
|
|
954
1016
|
onSubmit: r,
|
|
955
|
-
showFeedback:
|
|
956
|
-
},
|
|
1017
|
+
showFeedback: k
|
|
1018
|
+
}, O), { default: () => [l(fe, g({
|
|
957
1019
|
ref: s,
|
|
958
1020
|
itemResponsive: !0
|
|
959
|
-
}, p, { yGap:
|
|
1021
|
+
}, p, { yGap: k ? 0 : p?.yGap ?? 24 }), { default: x })] });
|
|
960
1022
|
};
|
|
961
1023
|
}
|
|
962
|
-
}),
|
|
1024
|
+
}), vt = /* @__PURE__ */ d({
|
|
963
1025
|
name: "DataFilter",
|
|
964
1026
|
props: {
|
|
965
1027
|
grid: {
|
|
966
1028
|
type: Object,
|
|
967
1029
|
default: () => ({})
|
|
968
1030
|
},
|
|
969
|
-
...
|
|
1031
|
+
...U(H, "disabled", "model", "validation"),
|
|
970
1032
|
labelWidth: {
|
|
971
1033
|
type: [String, Number],
|
|
972
1034
|
default: "5em"
|
|
@@ -1025,17 +1087,17 @@ var gt = /* @__PURE__ */ d({
|
|
|
1025
1087
|
r("filter", t.model, e);
|
|
1026
1088
|
}, o = (e) => {
|
|
1027
1089
|
r("reset", e), t.filterOnReset && r("filter", t.model, e);
|
|
1028
|
-
}, s =
|
|
1090
|
+
}, s = y(t.defaultCollapsed), u = (e) => {
|
|
1029
1091
|
s.value = e;
|
|
1030
1092
|
};
|
|
1031
1093
|
n({ collapse: u });
|
|
1032
|
-
let d =
|
|
1094
|
+
let d = v({
|
|
1033
1095
|
span: 6,
|
|
1034
1096
|
suffix: !0
|
|
1035
1097
|
});
|
|
1036
1098
|
return () => {
|
|
1037
1099
|
let { filterOnReset: e, filterText: n, resetText: f, customizable: p, defaultCollapsed: m, collapsible: h, grid: v, collapsedRows: y, ...b } = t;
|
|
1038
|
-
return l(
|
|
1100
|
+
return l(_t, g({ grid: {
|
|
1039
1101
|
cols: "12 768:18 1280:24 1536:30",
|
|
1040
1102
|
yGap: 20,
|
|
1041
1103
|
xGap: 8,
|
|
@@ -1052,13 +1114,13 @@ var gt = /* @__PURE__ */ d({
|
|
|
1052
1114
|
d.suffix = e?.collapsedOverflow || e?.contentEl.children.item(e?.contentEl.children.length - 1).offsetTop > 0;
|
|
1053
1115
|
}), l("div", { style: "display: flex; gap: 12px; align-items: center; justify-content: " + (d.suffix ? "flex-end" : "flex-start") }, [
|
|
1054
1116
|
d.suffix ? void 0 : l("span", null, [c("\xA0\xA0\xA0\xA0")]),
|
|
1055
|
-
l(
|
|
1117
|
+
l(N, {
|
|
1056
1118
|
attrType: "submit",
|
|
1057
1119
|
type: "primary",
|
|
1058
1120
|
disabled: t.disabled,
|
|
1059
1121
|
loading: t.loading
|
|
1060
1122
|
}, { default: () => [n || i("common.page.filter.submitText")] }),
|
|
1061
|
-
l(
|
|
1123
|
+
l(N, {
|
|
1062
1124
|
attrType: "reset",
|
|
1063
1125
|
disabled: t.disabled || t.loading
|
|
1064
1126
|
}, { default: () => [f || i("common.page.form.resetText")] }),
|
|
@@ -1068,11 +1130,11 @@ var gt = /* @__PURE__ */ d({
|
|
|
1068
1130
|
data: b.items,
|
|
1069
1131
|
onCustom: (e) => r("custom", e)
|
|
1070
1132
|
}, null) : void 0,
|
|
1071
|
-
h && e?.collapsedOverflow ? l(
|
|
1133
|
+
h && e?.collapsedOverflow ? l(N, {
|
|
1072
1134
|
text: !0,
|
|
1073
1135
|
type: "primary",
|
|
1074
1136
|
iconPlacement: "right",
|
|
1075
|
-
renderIcon: s.value ?
|
|
1137
|
+
renderIcon: s.value ? Je : Ye,
|
|
1076
1138
|
onClick: () => u(!s.value)
|
|
1077
1139
|
}, { default: () => [s.value ? i("common.page.filter.expand") : i("common.page.filter.collapse")] }) : void 0
|
|
1078
1140
|
])) });
|
|
@@ -1081,11 +1143,11 @@ var gt = /* @__PURE__ */ d({
|
|
|
1081
1143
|
});
|
|
1082
1144
|
//#endregion
|
|
1083
1145
|
//#region src/components/DataLocaleInput.jsx
|
|
1084
|
-
function
|
|
1146
|
+
function yt(e) {
|
|
1085
1147
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
1086
1148
|
}
|
|
1087
|
-
function
|
|
1088
|
-
let { t: i } = e(), a =
|
|
1149
|
+
function bt(t, n, r = 1) {
|
|
1150
|
+
let { t: i } = e(), a = y(!1), o = [], { open: s, reinit: c } = Pe({
|
|
1089
1151
|
title: t,
|
|
1090
1152
|
showColon: !0,
|
|
1091
1153
|
submitText: i("common.confirm.defaultOk"),
|
|
@@ -1098,8 +1160,8 @@ function yt(t, n, r = 1) {
|
|
|
1098
1160
|
type: "textarea",
|
|
1099
1161
|
showCount: !0,
|
|
1100
1162
|
autosize: {
|
|
1101
|
-
minRows:
|
|
1102
|
-
maxRows: Math.max(
|
|
1163
|
+
minRows: T(r),
|
|
1164
|
+
maxRows: Math.max(T(r), 5)
|
|
1103
1165
|
}
|
|
1104
1166
|
}
|
|
1105
1167
|
})),
|
|
@@ -1112,7 +1174,7 @@ function yt(t, n, r = 1) {
|
|
|
1112
1174
|
}
|
|
1113
1175
|
};
|
|
1114
1176
|
}
|
|
1115
|
-
var
|
|
1177
|
+
var xt = /* @__PURE__ */ d({
|
|
1116
1178
|
name: "DataLocaleInput",
|
|
1117
1179
|
props: {
|
|
1118
1180
|
label: { type: [
|
|
@@ -1159,31 +1221,31 @@ var bt = /* @__PURE__ */ d({
|
|
|
1159
1221
|
...e.modelValue,
|
|
1160
1222
|
[r]: n
|
|
1161
1223
|
}, t("update:modelValue", n), t("updateModelValue", n);
|
|
1162
|
-
}, { open: r, setSupports: i } =
|
|
1224
|
+
}, { open: r, setSupports: i } = bt(s(() => w(e.label)), (e) => {
|
|
1163
1225
|
t("update:modelValue", e), t("updateModelValue", e);
|
|
1164
|
-
},
|
|
1165
|
-
|
|
1226
|
+
}, C(e, "defaultRows")), o = y(e.defaultExpanded);
|
|
1227
|
+
E(() => e.defaultExpanded, (e) => {
|
|
1166
1228
|
o.value = e;
|
|
1167
1229
|
});
|
|
1168
|
-
let c = () => l(
|
|
1230
|
+
let c = () => l(N, {
|
|
1169
1231
|
quaternary: !0,
|
|
1170
1232
|
onClick: () => {
|
|
1171
1233
|
o.value = !o.value;
|
|
1172
1234
|
},
|
|
1173
1235
|
style: "--n-padding: 0 8px"
|
|
1174
|
-
}, { default: () => [l(
|
|
1236
|
+
}, { default: () => [l(L, {
|
|
1175
1237
|
size: "20",
|
|
1176
1238
|
depth: "3"
|
|
1177
|
-
}, { default: () => [o.value ? l(
|
|
1239
|
+
}, { default: () => [o.value ? l($e, null, null) : l(Qe, null, null)] })] }), u = (t) => {
|
|
1178
1240
|
let n = t.split("-", 1)[0];
|
|
1179
1241
|
return e.supports.some((e) => e.value !== t && e.value.startsWith(n)) ? t : n;
|
|
1180
1242
|
}, d = `__slots${De(6)}`;
|
|
1181
|
-
|
|
1243
|
+
E(() => e.supports, (e) => {
|
|
1182
1244
|
i(e);
|
|
1183
1245
|
let t = 0;
|
|
1184
1246
|
for (let [n, r] of e.entries()) {
|
|
1185
1247
|
let e = u(r.value);
|
|
1186
|
-
t = Math.max(t,
|
|
1248
|
+
t = Math.max(t, W(e, "monospace")), r[d] = h({
|
|
1187
1249
|
prefix: () => l("div", { style: {
|
|
1188
1250
|
width: `${t + 4}px`,
|
|
1189
1251
|
height: "100%",
|
|
@@ -1198,7 +1260,7 @@ var bt = /* @__PURE__ */ d({
|
|
|
1198
1260
|
}, { immediate: !0 });
|
|
1199
1261
|
let f = s(() => {
|
|
1200
1262
|
let t = u(e.showLang ?? e.defaultLang);
|
|
1201
|
-
return [t,
|
|
1263
|
+
return [t, W(t, "monospace")];
|
|
1202
1264
|
}), p = {
|
|
1203
1265
|
prefix: () => l("div", { style: {
|
|
1204
1266
|
width: `${f.value[1] + 4}px`,
|
|
@@ -1207,18 +1269,18 @@ var bt = /* @__PURE__ */ d({
|
|
|
1207
1269
|
fontSize: "12px",
|
|
1208
1270
|
fontFamily: "monospace"
|
|
1209
1271
|
} }, [f.value[0]]),
|
|
1210
|
-
suffix: () => l(
|
|
1272
|
+
suffix: () => l(N, {
|
|
1211
1273
|
quaternary: !0,
|
|
1212
1274
|
onClick: () => r(e.modelValue, e.disabled),
|
|
1213
1275
|
style: "--n-padding: 0 8px"
|
|
1214
|
-
}, { default: () => [l(
|
|
1276
|
+
}, { default: () => [l(L, {
|
|
1215
1277
|
size: "20",
|
|
1216
1278
|
depth: "3"
|
|
1217
|
-
}, { default: () => [l(
|
|
1279
|
+
}, { default: () => [l(Ze, null, null)] })] })
|
|
1218
1280
|
}, m = { "--n-padding-right": "0" };
|
|
1219
1281
|
return () => {
|
|
1220
1282
|
let t;
|
|
1221
|
-
return e.mode === "dialog" ? l(
|
|
1283
|
+
return e.mode === "dialog" ? l(R, {
|
|
1222
1284
|
value: e.modelValue?.[e.showLang ?? e.defaultLang] ?? e.modelValue?.[e.defaultLang],
|
|
1223
1285
|
onUpdateValue: n,
|
|
1224
1286
|
disabled: e.disabled,
|
|
@@ -1226,14 +1288,14 @@ var bt = /* @__PURE__ */ d({
|
|
|
1226
1288
|
style: m,
|
|
1227
1289
|
type: e.defaultRows > 1 ? "textarea" : "text",
|
|
1228
1290
|
rows: e.defaultRows
|
|
1229
|
-
},
|
|
1291
|
+
}, yt(p) ? p : { default: () => [p] }) : l(I, {
|
|
1230
1292
|
vertical: !0,
|
|
1231
1293
|
wrap: !1,
|
|
1232
1294
|
style: "width: 100%"
|
|
1233
|
-
},
|
|
1295
|
+
}, yt(t = e.supports.map((t, r) => {
|
|
1234
1296
|
if (!o.value && r !== 0) return;
|
|
1235
1297
|
let i = r == 0;
|
|
1236
|
-
return
|
|
1298
|
+
return D(l(R, {
|
|
1237
1299
|
key: t.value,
|
|
1238
1300
|
value: e.modelValue?.[t.value],
|
|
1239
1301
|
onUpdateValue: (e) => n(e, t.value),
|
|
@@ -1251,7 +1313,7 @@ var bt = /* @__PURE__ */ d({
|
|
|
1251
1313
|
})) ? t : { default: () => [t] });
|
|
1252
1314
|
};
|
|
1253
1315
|
}
|
|
1254
|
-
}),
|
|
1316
|
+
}), Y = /* @__PURE__ */ d({
|
|
1255
1317
|
name: "DataPagination",
|
|
1256
1318
|
props: {
|
|
1257
1319
|
total: {
|
|
@@ -1276,7 +1338,7 @@ var bt = /* @__PURE__ */ d({
|
|
|
1276
1338
|
}), a = (e) => n("change", {
|
|
1277
1339
|
pageSize: e,
|
|
1278
1340
|
currentPage: t.resetPageOnSizeChange ? 1 : t.currentPage ?? t.page?.currentPage ?? 1
|
|
1279
|
-
}), o = p(
|
|
1341
|
+
}), o = p(Y.DEFAULT_PAGE_SIZES_INJECTION_KEY, () => [
|
|
1280
1342
|
10,
|
|
1281
1343
|
20,
|
|
1282
1344
|
30,
|
|
@@ -1285,7 +1347,7 @@ var bt = /* @__PURE__ */ d({
|
|
|
1285
1347
|
prefix: () => r("common.page.pagination.prefix", { total: t.total }),
|
|
1286
1348
|
suffix: () => r("common.page.pagination.suffix")
|
|
1287
1349
|
};
|
|
1288
|
-
return () => l(
|
|
1350
|
+
return () => l(he, {
|
|
1289
1351
|
page: t.currentPage ?? t.page?.currentPage,
|
|
1290
1352
|
itemCount: t.total,
|
|
1291
1353
|
pageSize: t.pageSize ?? t.page?.pageSize,
|
|
@@ -1299,10 +1361,10 @@ var bt = /* @__PURE__ */ d({
|
|
|
1299
1361
|
}, t.simple ? void 0 : s);
|
|
1300
1362
|
}
|
|
1301
1363
|
});
|
|
1302
|
-
|
|
1364
|
+
Y.DEFAULT_PAGE_SIZES_INJECTION_KEY = Symbol("__DEFAULT_PAGE_SIZES_INJECTION_KEY__");
|
|
1303
1365
|
//#endregion
|
|
1304
1366
|
//#region src/components/ViewProfile.jsx
|
|
1305
|
-
function
|
|
1367
|
+
function X(e) {
|
|
1306
1368
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !m(e);
|
|
1307
1369
|
}
|
|
1308
1370
|
var St = /* @__PURE__ */ d({
|
|
@@ -1322,8 +1384,8 @@ var St = /* @__PURE__ */ d({
|
|
|
1322
1384
|
"copy"
|
|
1323
1385
|
],
|
|
1324
1386
|
setup(e, { emit: t }) {
|
|
1325
|
-
let n =
|
|
1326
|
-
|
|
1387
|
+
let n = y(null), r = k(n), i = y(!1), a = y();
|
|
1388
|
+
te(n, () => i.value = !1);
|
|
1327
1389
|
let s = () => {
|
|
1328
1390
|
e.locked || (i.value = !0, a.value = e.label);
|
|
1329
1391
|
}, u = () => {
|
|
@@ -1339,7 +1401,7 @@ var St = /* @__PURE__ */ d({
|
|
|
1339
1401
|
};
|
|
1340
1402
|
return () => {
|
|
1341
1403
|
let t;
|
|
1342
|
-
return l(
|
|
1404
|
+
return l(I, {
|
|
1343
1405
|
ref: n,
|
|
1344
1406
|
align: "center",
|
|
1345
1407
|
wrap: !1,
|
|
@@ -1350,7 +1412,7 @@ var St = /* @__PURE__ */ d({
|
|
|
1350
1412
|
fontSize: "18px",
|
|
1351
1413
|
opacity: +!!e.current
|
|
1352
1414
|
} }, [c("*")]),
|
|
1353
|
-
i.value ? l(
|
|
1415
|
+
i.value ? l(R, {
|
|
1354
1416
|
style: "flex: 1 1 auto",
|
|
1355
1417
|
size: "small",
|
|
1356
1418
|
value: a.value,
|
|
@@ -1364,27 +1426,27 @@ var St = /* @__PURE__ */ d({
|
|
|
1364
1426
|
style: "flex: 1 1 auto; line-height: 28px;",
|
|
1365
1427
|
onClick: d,
|
|
1366
1428
|
onDblclick: s
|
|
1367
|
-
}, [l(
|
|
1368
|
-
l(
|
|
1429
|
+
}, [l(se, null, X(t = w(e.label)) ? t : { default: () => [t] })]),
|
|
1430
|
+
l(N, {
|
|
1369
1431
|
text: !0,
|
|
1370
1432
|
type: "primary",
|
|
1371
1433
|
style: { display: r.value ? "block" : "none" },
|
|
1372
1434
|
onClick: m
|
|
1373
|
-
}, { default: () => [l(
|
|
1374
|
-
l(
|
|
1435
|
+
}, { default: () => [l(L, { size: 15 }, { default: () => [l(ot, null, null)] })] }),
|
|
1436
|
+
l(N, {
|
|
1375
1437
|
text: !0,
|
|
1376
1438
|
type: "error",
|
|
1377
1439
|
disabled: e.locked,
|
|
1378
1440
|
style: { display: r.value ? "block" : "none" },
|
|
1379
1441
|
onClick: p
|
|
1380
|
-
}, { default: () => [l(
|
|
1442
|
+
}, { default: () => [l(L, { size: 18 }, { default: () => [l(at, null, null)] })] })
|
|
1381
1443
|
]),
|
|
1382
|
-
l(
|
|
1444
|
+
l(N, {
|
|
1383
1445
|
text: !0,
|
|
1384
1446
|
type: e.preference ? "success" : "default",
|
|
1385
1447
|
style: { display: !e.preference && !r.value ? "none" : "block" },
|
|
1386
1448
|
onClick: u
|
|
1387
|
-
}, { default: () => [l(
|
|
1449
|
+
}, { default: () => [l(L, { size: 18 }, { default: () => [l(He, null, null)] })] })
|
|
1388
1450
|
] });
|
|
1389
1451
|
};
|
|
1390
1452
|
}
|
|
@@ -1427,18 +1489,18 @@ var St = /* @__PURE__ */ d({
|
|
|
1427
1489
|
remove: () => !0
|
|
1428
1490
|
},
|
|
1429
1491
|
setup(e, { emit: t, slots: n }) {
|
|
1430
|
-
let r = s(() => e.profiles.find((t) => t[e.keyField] === e.profile)), i = () => [l("div", { style: "display: flex; align-items: center; gap: 2px; color: #999; font-style: italic; font-weight: normal; cursor: pointer;" }, [l(
|
|
1492
|
+
let r = s(() => e.profiles.find((t) => t[e.keyField] === e.profile)), i = () => [l("div", { style: "display: flex; align-items: center; gap: 2px; color: #999; font-style: italic; font-weight: normal; cursor: pointer;" }, [l(ie, {
|
|
1431
1493
|
dot: !0,
|
|
1432
1494
|
processing: !0,
|
|
1433
1495
|
type: "success",
|
|
1434
1496
|
show: e.changing
|
|
1435
|
-
}, { default: () => [e.buttonRender?.() ?? l(
|
|
1497
|
+
}, { default: () => [e.buttonRender?.() ?? l(N, {
|
|
1436
1498
|
text: !0,
|
|
1437
1499
|
type: e.type
|
|
1438
|
-
}, { default: () => [l(
|
|
1500
|
+
}, { default: () => [l(L, {
|
|
1439
1501
|
size: e.size,
|
|
1440
1502
|
color: "#999"
|
|
1441
|
-
}, { default: () => [l(
|
|
1503
|
+
}, { default: () => [l(Ve, null, null)] })] })] }), l("span", { style: { fontSize: e.size + "px" } }, [r.value?.[e.nameField] ?? e.profile])])], a = (e) => {
|
|
1442
1504
|
t("update:profile", e), t("updateProfile", e);
|
|
1443
1505
|
}, o = (e, n) => {
|
|
1444
1506
|
n = n ? e : void 0, t("updatePreference", n), t("update:preference", n);
|
|
@@ -1452,21 +1514,21 @@ var St = /* @__PURE__ */ d({
|
|
|
1452
1514
|
}, d = (e) => {
|
|
1453
1515
|
t("copy", e);
|
|
1454
1516
|
};
|
|
1455
|
-
return () => l(
|
|
1517
|
+
return () => l(z, {
|
|
1456
1518
|
scrollable: !0,
|
|
1457
1519
|
trigger: "click",
|
|
1458
1520
|
placement: "bottom-start",
|
|
1459
1521
|
"content-style": "padding: 0",
|
|
1460
1522
|
style: "max-height: 400px; width: 240px"
|
|
1461
1523
|
}, {
|
|
1462
|
-
trigger: () =>
|
|
1524
|
+
trigger: () => b(n, "default", {}, i),
|
|
1463
1525
|
default: () => {
|
|
1464
1526
|
let t;
|
|
1465
|
-
return l(
|
|
1527
|
+
return l(I, {
|
|
1466
1528
|
vertical: !0,
|
|
1467
1529
|
size: 0,
|
|
1468
1530
|
style: "margin-block: 8px"
|
|
1469
|
-
},
|
|
1531
|
+
}, X(t = e.profiles.map((t) => l(St, {
|
|
1470
1532
|
value: t[e.keyField],
|
|
1471
1533
|
label: t[e.nameField] || t[e.keyField],
|
|
1472
1534
|
locked: t[e.lockedField],
|
|
@@ -1507,19 +1569,19 @@ var Tt = /* @__PURE__ */ d({
|
|
|
1507
1569
|
let { t: r } = e();
|
|
1508
1570
|
return () => {
|
|
1509
1571
|
let e;
|
|
1510
|
-
return t.modelValue !== "selection" && t.count === 0 ? l("div", null, null) : l("div", null, [l(
|
|
1572
|
+
return t.modelValue !== "selection" && t.count === 0 ? l("div", null, null) : l("div", null, [l(I, {
|
|
1511
1573
|
align: "center",
|
|
1512
1574
|
"wrap-item": !1
|
|
1513
1575
|
}, { default: () => [
|
|
1514
1576
|
l("span", null, [r("common.page.selection.countText", { count: t.count })]),
|
|
1515
|
-
l(
|
|
1577
|
+
l(N, {
|
|
1516
1578
|
text: !0,
|
|
1517
1579
|
type: "primary",
|
|
1518
1580
|
onClick: () => {
|
|
1519
1581
|
n("update:modelValue", t.modelValue === "all" ? "selection" : "all");
|
|
1520
1582
|
}
|
|
1521
1583
|
}, { default: () => [t.modelValue === "all" ? r("common.page.selection.view") : r("common.page.selection.back")] }),
|
|
1522
|
-
l(
|
|
1584
|
+
l(N, {
|
|
1523
1585
|
text: !0,
|
|
1524
1586
|
onClick: () => {
|
|
1525
1587
|
n("clear"), n("update:modelValue", "all");
|
|
@@ -1555,19 +1617,19 @@ var Tt = /* @__PURE__ */ d({
|
|
|
1555
1617
|
emit: ["change"],
|
|
1556
1618
|
setup(t, { emit: n, attrs: r }) {
|
|
1557
1619
|
let { t: i } = e(), o, c;
|
|
1558
|
-
if (t.abstract) o =
|
|
1620
|
+
if (t.abstract) o = C(t, "isFullscreen"), c = () => {
|
|
1559
1621
|
n("change", !o.value);
|
|
1560
1622
|
};
|
|
1561
1623
|
else {
|
|
1562
|
-
let e =
|
|
1624
|
+
let e = A(s(() => typeof t.target == "string" ? document.querySelector(t.target) : t.target));
|
|
1563
1625
|
o = e.isFullscreen, c = () => {
|
|
1564
1626
|
e.toggle(), n("change", o.value);
|
|
1565
1627
|
};
|
|
1566
1628
|
}
|
|
1567
|
-
return () =>
|
|
1629
|
+
return () => D(l(N, {
|
|
1568
1630
|
style: r.quaternary ? "--n-padding: 0 12px" : void 0,
|
|
1569
1631
|
onClick: c
|
|
1570
|
-
}, { default: () => [l(
|
|
1632
|
+
}, { default: () => [l(L, { size: t.iconSize }, { default: () => [o.value ? l("svg", {
|
|
1571
1633
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1572
1634
|
width: "1em",
|
|
1573
1635
|
height: "1em",
|
|
@@ -1622,16 +1684,16 @@ var Ot = /* @__PURE__ */ d({
|
|
|
1622
1684
|
},
|
|
1623
1685
|
emit: ["change"],
|
|
1624
1686
|
setup(e, { emit: t, slots: n }) {
|
|
1625
|
-
let r =
|
|
1626
|
-
return
|
|
1627
|
-
let t =
|
|
1687
|
+
let r = ee("target"), { isFullscreen: i, toggle: a, enter: o, exit: s } = A(r);
|
|
1688
|
+
return E(i, (e) => t("change", e)), () => {
|
|
1689
|
+
let t = b(n, "default", {
|
|
1628
1690
|
target: r.value,
|
|
1629
1691
|
toggle: a,
|
|
1630
1692
|
isFullscreen: i.value,
|
|
1631
1693
|
enter: o,
|
|
1632
1694
|
exit: s
|
|
1633
1695
|
});
|
|
1634
|
-
return f(e.tag, { ref: "target" }, e.scrollable && i.value ? l(
|
|
1696
|
+
return f(e.tag, { ref: "target" }, e.scrollable && i.value ? l(ye, e.scrollbarProps, Dt(t) ? t : { default: () => [t] }) : t);
|
|
1635
1697
|
};
|
|
1636
1698
|
}
|
|
1637
1699
|
});
|
|
@@ -1700,7 +1762,7 @@ var At = /* @__PURE__ */ d({
|
|
|
1700
1762
|
n("update:modelValue", e), n("updateModelValue", e);
|
|
1701
1763
|
};
|
|
1702
1764
|
return () => {
|
|
1703
|
-
let e = t.type === "button" ?
|
|
1765
|
+
let e = t.type === "button" ? _e : ge, n = l(o, null, [t.default ? l(e, {
|
|
1704
1766
|
value: typeof t.default == "object" ? t.default?.[t.valueField] : null,
|
|
1705
1767
|
class: `${a.value}-radio__default`
|
|
1706
1768
|
}, { default: () => [c.value] }) : void 0, t.options?.map((n) => {
|
|
@@ -1712,12 +1774,12 @@ var At = /* @__PURE__ */ d({
|
|
|
1712
1774
|
paddingLeft: t.padding,
|
|
1713
1775
|
paddingRight: t.padding
|
|
1714
1776
|
} : {}
|
|
1715
|
-
}, { default: () => [n.tip ? l(
|
|
1777
|
+
}, { default: () => [n.tip ? l(V, null, {
|
|
1716
1778
|
default: () => n.tip,
|
|
1717
1779
|
trigger: () => r
|
|
1718
1780
|
}) : r] });
|
|
1719
1781
|
})]);
|
|
1720
|
-
return l(
|
|
1782
|
+
return l(ve, {
|
|
1721
1783
|
style: t.vertical ? {
|
|
1722
1784
|
...u.value,
|
|
1723
1785
|
padding: "6px 0 0"
|
|
@@ -1725,7 +1787,7 @@ var At = /* @__PURE__ */ d({
|
|
|
1725
1787
|
class: `${a.value}-radios`,
|
|
1726
1788
|
value: t.modelValue,
|
|
1727
1789
|
onUpdateValue: d
|
|
1728
|
-
}, { default: () => [t.type === "radio" ? l(
|
|
1790
|
+
}, { default: () => [t.type === "radio" ? l(I, {
|
|
1729
1791
|
size: t.vertical ? void 0 : "small",
|
|
1730
1792
|
vertical: t.vertical
|
|
1731
1793
|
}, kt(n) ? n : { default: () => [n] }) : n] });
|
|
@@ -1806,15 +1868,15 @@ var jt = /* @__PURE__ */ d({
|
|
|
1806
1868
|
},
|
|
1807
1869
|
emits: ["update:modelValue", "updateModelValue"],
|
|
1808
1870
|
setup(t, { emit: n, attrs: r }) {
|
|
1809
|
-
let { t: i } = e(), { localeRef: a } =
|
|
1871
|
+
let { t: i } = e(), { localeRef: a } = Fe("Popconfirm"), c = s(() => t.valueField || (t.type === "user" ? "username" : "code")), u = s(() => {
|
|
1810
1872
|
if (t.multiple) return t.modelValue || [];
|
|
1811
1873
|
let e = t.modelValue?.trim();
|
|
1812
1874
|
return e ? [e] : [];
|
|
1813
|
-
}), d = /* @__PURE__ */ new Map(), f = s(() => (d.clear(), t.users.map((e) => (e =
|
|
1814
|
-
|
|
1815
|
-
|
|
1875
|
+
}), d = /* @__PURE__ */ new Map(), f = s(() => (d.clear(), t.users.map((e) => (e = v(e), e.label = e.nickname + e.username, e.value = e[c.value], e.type = "user", d.set(e[c.value], e), e)))), p = x([]);
|
|
1876
|
+
E(() => t.depts, (e) => {
|
|
1877
|
+
Le(e, (e) => {
|
|
1816
1878
|
e.label = e.name, e.value = e[c.value], e.type = "dept", e.children?.length || delete e.children;
|
|
1817
|
-
}), p.value =
|
|
1879
|
+
}), p.value = Ie(e);
|
|
1818
1880
|
}, { immediate: !0 });
|
|
1819
1881
|
let m = s(() => [
|
|
1820
1882
|
...t.depts,
|
|
@@ -1824,10 +1886,10 @@ var jt = /* @__PURE__ */ d({
|
|
|
1824
1886
|
type: "group"
|
|
1825
1887
|
})),
|
|
1826
1888
|
...f.value
|
|
1827
|
-
]), h =
|
|
1889
|
+
]), h = y([]), b = y(), S = async (e) => {
|
|
1828
1890
|
let n = await (e.type === "group" ? t.getUsersByGroup(e.value) : t.getUsersByDept(e.value));
|
|
1829
1891
|
for (let e of f.value) e.disabled = !0;
|
|
1830
|
-
|
|
1892
|
+
b.value = [...e.type === "dept" ? e.children ?? [] : [], ...n.map((e) => {
|
|
1831
1893
|
let t = d.get(e[c.value]);
|
|
1832
1894
|
return t && (t.disabled = !1), {
|
|
1833
1895
|
...e,
|
|
@@ -1860,30 +1922,30 @@ var jt = /* @__PURE__ */ d({
|
|
|
1860
1922
|
}
|
|
1861
1923
|
}, null);
|
|
1862
1924
|
let s = e ? C.get(e) : /* @__PURE__ */ new Set();
|
|
1863
|
-
if (e && !s && (s = new Set(e), C.set(e, s)),
|
|
1864
|
-
let c =
|
|
1925
|
+
if (e && !s && (s = new Set(e), C.set(e, s)), b.value === !1) return l(xe, { show: !0 }, null);
|
|
1926
|
+
let c = b.value || m.value;
|
|
1865
1927
|
r = r?.trim(), r && (c = c?.filter((e) => e.label.includes(r) || e.value.includes(r)));
|
|
1866
1928
|
let u = h.value;
|
|
1867
1929
|
return l(o, null, [l("div", { style: "margin: 12px 16px; display: flex; justify-content: space-between; align-items: center" }, [u.length > 0 ? l(o, null, [l("span", { style: "display: flex; align-items: center" }, [
|
|
1868
1930
|
u.length >= 2 ? u.at(-2).label : i("common.all"),
|
|
1869
|
-
l("span", { style: "padding: 0 4px" }, [l(
|
|
1931
|
+
l("span", { style: "padding: 0 4px" }, [l(qe, null, null)]),
|
|
1870
1932
|
u.at(-1).label
|
|
1871
|
-
]), l(
|
|
1933
|
+
]), l(N, {
|
|
1872
1934
|
text: !0,
|
|
1873
1935
|
type: "warning",
|
|
1874
1936
|
onClick: () => {
|
|
1875
|
-
if (u.pop(),
|
|
1937
|
+
if (u.pop(), b.value = u.length > 0 ? !1 : void 0, u.length > 0) S(u.at(-1));
|
|
1876
1938
|
else for (let e of f.value) e.disabled = !1;
|
|
1877
1939
|
}
|
|
1878
|
-
}, { default: () => [l(
|
|
1940
|
+
}, { default: () => [l(L, null, { default: () => [l(Ke, null, null)] }), i("common.back")] })]) : l("span", null, [i("common.all")])]), c?.length ? l(pe, {
|
|
1879
1941
|
showDivider: !1,
|
|
1880
1942
|
style: "padding: 0 16px"
|
|
1881
1943
|
}, Z(a = c.map((r) => {
|
|
1882
1944
|
let i, a;
|
|
1883
|
-
return l(
|
|
1945
|
+
return l(me, {
|
|
1884
1946
|
key: r.type + "_" + r.value,
|
|
1885
1947
|
style: "padding: 6px 0"
|
|
1886
|
-
}, { default: () => [r.type === "user" ? t.multiple ? l(
|
|
1948
|
+
}, { default: () => [r.type === "user" ? t.multiple ? l(P, {
|
|
1887
1949
|
checked: s.has(r.value) || !1,
|
|
1888
1950
|
onUpdateChecked: (i) => {
|
|
1889
1951
|
if (i && t.max && e.length >= t.max) return;
|
|
@@ -1903,7 +1965,7 @@ var jt = /* @__PURE__ */ d({
|
|
|
1903
1965
|
tooltip: !1,
|
|
1904
1966
|
username: !0,
|
|
1905
1967
|
renderInfo: t.renderUserInfo
|
|
1906
|
-
})) ? i : { default: () => [i] }) : l(
|
|
1968
|
+
})) ? i : { default: () => [i] }) : l(ge, {
|
|
1907
1969
|
checked: s.has(r.value) || !1,
|
|
1908
1970
|
onUpdateChecked: (e) => {
|
|
1909
1971
|
n(e ? [r.value] : []);
|
|
@@ -1918,22 +1980,22 @@ var jt = /* @__PURE__ */ d({
|
|
|
1918
1980
|
renderInfo: t.renderUserInfo
|
|
1919
1981
|
})) ? a : { default: () => [a] }) : l("div", {
|
|
1920
1982
|
onClick: () => {
|
|
1921
|
-
|
|
1983
|
+
b.value = !1, h.value.push(r), S(r);
|
|
1922
1984
|
},
|
|
1923
1985
|
style: "cursor: pointer; display: flex; align-items: center; gap: 8px"
|
|
1924
1986
|
}, [
|
|
1925
|
-
r.type === "dept" ? l(
|
|
1987
|
+
r.type === "dept" ? l(j, {
|
|
1926
1988
|
size: 24,
|
|
1927
1989
|
style: "background-color: red"
|
|
1928
|
-
}, { default: () => [l(
|
|
1990
|
+
}, { default: () => [l(L, null, { default: () => [l(tt, null, null)] })] }) : l(j, {
|
|
1929
1991
|
size: 24,
|
|
1930
1992
|
style: "background-color: green"
|
|
1931
|
-
}, { default: () => [l(
|
|
1993
|
+
}, { default: () => [l(L, null, { default: () => [l(nt, null, null)] })] }),
|
|
1932
1994
|
l("span", { style: "flex: 1 1 auto" }, [r.label]),
|
|
1933
|
-
l(
|
|
1995
|
+
l(L, null, { default: () => [l(qe, null, null)] })
|
|
1934
1996
|
])] });
|
|
1935
|
-
})) ? a : { default: () => [a] }) : l(
|
|
1936
|
-
}, T = () => l(
|
|
1997
|
+
})) ? a : { default: () => [a] }) : l(ce, null, null)]);
|
|
1998
|
+
}, T = () => l(ce, { description: t.placeholder }, null), ee = ({ option: e }) => e.type === "user" ? l("span", null, [e.nickname, l("span", { style: {
|
|
1937
1999
|
opacity: .4,
|
|
1938
2000
|
marginLeft: "8px"
|
|
1939
2001
|
} }, [e.username])]) : l("span", null, [e.label]), D = (e, n, r, i, a) => l(Ce, g(e, {
|
|
@@ -1941,7 +2003,7 @@ var jt = /* @__PURE__ */ d({
|
|
|
1941
2003
|
options: n,
|
|
1942
2004
|
renderSourceList: ({ onCheck: e, pattern: t }) => w(r, e, t),
|
|
1943
2005
|
renderTargetList: t.placeholder?.trim() && !t.modelValue?.length ? T : void 0,
|
|
1944
|
-
renderTargetLabel:
|
|
2006
|
+
renderTargetLabel: ee,
|
|
1945
2007
|
sourceFilterable: t.filterable,
|
|
1946
2008
|
size: t.size,
|
|
1947
2009
|
disabled: t.disabled || void 0,
|
|
@@ -1949,36 +2011,39 @@ var jt = /* @__PURE__ */ d({
|
|
|
1949
2011
|
filter: (e, t) => t.label.includes(e) || t.value.includes(e),
|
|
1950
2012
|
"onUpdate:value": i,
|
|
1951
2013
|
onUpdateValue: a
|
|
1952
|
-
}), null),
|
|
2014
|
+
}), null), te = ({ option: e, handleClose: n }) => l(Se, {
|
|
1953
2015
|
type: t.type === "user" ? "primary" : "info",
|
|
1954
2016
|
closable: !0,
|
|
1955
2017
|
onMousedown: (e) => e.preventDefault(),
|
|
1956
2018
|
onClose: (e) => {
|
|
1957
2019
|
e.stopPropagation(), n();
|
|
1958
2020
|
}
|
|
1959
|
-
}, { default: () => [e.label] }),
|
|
2021
|
+
}, { default: () => [e.label] }), O = (e, r = "updateModelValue") => {
|
|
1960
2022
|
t.multiple ? n(r, e) : n(r, e?.[0]);
|
|
1961
|
-
},
|
|
1962
|
-
if (
|
|
1963
|
-
|
|
1964
|
-
let e =
|
|
1965
|
-
|
|
2023
|
+
}, k = y(), A = !1, ne = Ee(), re = () => {
|
|
2024
|
+
if (A) return;
|
|
2025
|
+
A = !0;
|
|
2026
|
+
let e = x([...u.value || []]);
|
|
2027
|
+
ne.create({
|
|
1966
2028
|
showIcon: !1,
|
|
1967
2029
|
title: t.placeholder,
|
|
1968
2030
|
style: { width: "700px" },
|
|
1969
|
-
content: () =>
|
|
2031
|
+
content: () => {
|
|
2032
|
+
let n = t.type === "user" ? f.value : p.value;
|
|
2033
|
+
return l("div", { style: { height: "550px" } }, [D({ style: { height: "100%" } }, n, e.value, (t) => e.value = t, void 0)]);
|
|
2034
|
+
},
|
|
1970
2035
|
positiveText: a.value.positiveText,
|
|
1971
2036
|
negativeText: a.value.negativeText,
|
|
1972
2037
|
onPositiveClick() {
|
|
1973
|
-
|
|
2038
|
+
O(e.value, "update:modelValue"), O(e.value, "updateModelValue");
|
|
1974
2039
|
},
|
|
1975
2040
|
onAfterLeave() {
|
|
1976
2041
|
_(() => {
|
|
1977
|
-
|
|
2042
|
+
k.value?.blur(), A = !1;
|
|
1978
2043
|
});
|
|
1979
2044
|
}
|
|
1980
2045
|
});
|
|
1981
|
-
},
|
|
2046
|
+
}, M = { arrow: () => l(L, null, { default: () => [t.type === "user" ? l(nt, null, null) : l(tt, null, null)] }) };
|
|
1982
2047
|
return () => {
|
|
1983
2048
|
let e = t.type === "user" ? f.value : p.value;
|
|
1984
2049
|
if (t.selectType === "dropdown" && t.type === "dept") return l(Te, {
|
|
@@ -1995,12 +2060,12 @@ var jt = /* @__PURE__ */ d({
|
|
|
1995
2060
|
"onUpdate:value": (e) => {
|
|
1996
2061
|
t.multiple && t.max && e?.length > t.max || n("update:modelValue", e);
|
|
1997
2062
|
}
|
|
1998
|
-
}, Z(
|
|
1999
|
-
if (t.selectType === "transfer") return D(r, e, u.value, (e) =>
|
|
2063
|
+
}, Z(M) ? M : { default: () => [M] });
|
|
2064
|
+
if (t.selectType === "transfer") return D(r, e, u.value, (e) => O(e, "update:modelValue"), (e) => O(e, "updateModelValue"));
|
|
2000
2065
|
let i = t.selectType === "dropdown";
|
|
2001
|
-
return l(
|
|
2066
|
+
return l(be, g(r, {
|
|
2002
2067
|
key: t.type,
|
|
2003
|
-
ref:
|
|
2068
|
+
ref: k,
|
|
2004
2069
|
show: i ? void 0 : !1,
|
|
2005
2070
|
filterable: i ? t.filterable : !1,
|
|
2006
2071
|
options: e,
|
|
@@ -2009,15 +2074,15 @@ var jt = /* @__PURE__ */ d({
|
|
|
2009
2074
|
placeholder: t.placeholder,
|
|
2010
2075
|
disabled: t.disabled || void 0,
|
|
2011
2076
|
value: t.modelValue,
|
|
2012
|
-
renderTag: t.multiple ?
|
|
2013
|
-
onFocus: i ? void 0 :
|
|
2077
|
+
renderTag: t.multiple ? te : void 0,
|
|
2078
|
+
onFocus: i ? void 0 : re,
|
|
2014
2079
|
onUpdateValue: (e) => {
|
|
2015
2080
|
n("updateModelValue", e);
|
|
2016
2081
|
},
|
|
2017
2082
|
"onUpdate:value": (e) => {
|
|
2018
2083
|
n("update:modelValue", e);
|
|
2019
2084
|
}
|
|
2020
|
-
}), Z(
|
|
2085
|
+
}), Z(M) ? M : { default: () => [M] });
|
|
2021
2086
|
};
|
|
2022
2087
|
}
|
|
2023
2088
|
});
|
|
@@ -2026,19 +2091,19 @@ function Q(e, t, { placement: n = "left", size: r = 24, tooltip: i = !0, usernam
|
|
|
2026
2091
|
if (/^[\u{4E00}-\u{9FA5}]+$/u.test(s)) {
|
|
2027
2092
|
let e = s.length;
|
|
2028
2093
|
c = e === 3 || e === 4 ? s.slice(-2) : e > 4 ? s.slice(0, 1) : s;
|
|
2029
|
-
} else s.length > 4 && (c = l(
|
|
2030
|
-
let u = (e) => l(
|
|
2094
|
+
} else s.length > 4 && (c = l(L, null, { default: () => [l(rt, null, null)] }));
|
|
2095
|
+
let u = (e) => l(j, {
|
|
2031
2096
|
color: "var(--color-primary)",
|
|
2032
2097
|
round: !0,
|
|
2033
2098
|
size: e
|
|
2034
2099
|
}, Z(c) ? c : { default: () => [c] });
|
|
2035
|
-
return l(
|
|
2100
|
+
return l(z, {
|
|
2036
2101
|
key: e.username,
|
|
2037
2102
|
raw: !0,
|
|
2038
2103
|
placement: n,
|
|
2039
2104
|
disabled: i === !1
|
|
2040
2105
|
}, {
|
|
2041
|
-
default: () => l(
|
|
2106
|
+
default: () => l(ae, {
|
|
2042
2107
|
style: "min-width: 200px",
|
|
2043
2108
|
size: "small"
|
|
2044
2109
|
}, { default: () => [l("div", { style: "display: flex; align-items: center; gap: 12px" }, [u(48), l("div", null, [l("div", { style: "font-size: 16px; font-weight: 500;" }, [e.nickname]), l("div", { style: "font-size: 14px; color: #999" }, [e.username])])]), o?.(e)] }),
|
|
@@ -2053,19 +2118,19 @@ function $(e, t = {}) {
|
|
|
2053
2118
|
return e.length <= 1 ? e[0] ? Q(e[0], !0, t) : null : l("span", { style: {
|
|
2054
2119
|
display: "inline-block",
|
|
2055
2120
|
height: r + "px"
|
|
2056
|
-
} }, [l(
|
|
2121
|
+
} }, [l(M, {
|
|
2057
2122
|
options: e,
|
|
2058
2123
|
size: r,
|
|
2059
2124
|
max: n || 4,
|
|
2060
2125
|
style: "top: -2px"
|
|
2061
2126
|
}, {
|
|
2062
2127
|
avatar: ({ option: e }) => Q(e, !1, t),
|
|
2063
|
-
rest: ({ options: e, rest: t }) => l(
|
|
2128
|
+
rest: ({ options: e, rest: t }) => l(F, {
|
|
2064
2129
|
options: e,
|
|
2065
2130
|
keyField: "username",
|
|
2066
2131
|
labelField: "nickname",
|
|
2067
2132
|
renderOption: ({ option: t }) => Q(t, !1, e)
|
|
2068
|
-
}, { default: () => [l(
|
|
2133
|
+
}, { default: () => [l(j, null, { default: () => [c("+"), t] })] })
|
|
2069
2134
|
})]);
|
|
2070
2135
|
}
|
|
2071
2136
|
var Mt = /* @__PURE__ */ d({
|
|
@@ -2076,18 +2141,24 @@ var Mt = /* @__PURE__ */ d({
|
|
|
2076
2141
|
getDeptsByCode: Function
|
|
2077
2142
|
},
|
|
2078
2143
|
setup(e) {
|
|
2079
|
-
let t =
|
|
2080
|
-
return
|
|
2144
|
+
let t = y([]), n = {};
|
|
2145
|
+
return E([() => e.modelValue, () => e.multiple], ([r, i]) => {
|
|
2081
2146
|
t.value = [];
|
|
2082
2147
|
let a = r ? i ? Array.isArray(r) ? r : r.trim() ? r.trim().split(",") : [] : [r] : [], o = [];
|
|
2083
|
-
for (let [e, r] of a.entries())
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2148
|
+
for (let [e, r] of a.entries()) {
|
|
2149
|
+
if (!n[r]) {
|
|
2150
|
+
let e = v({
|
|
2151
|
+
code: r,
|
|
2152
|
+
name: r
|
|
2153
|
+
});
|
|
2154
|
+
n[r] = e, o.push(r);
|
|
2155
|
+
}
|
|
2156
|
+
t.value[e] = n[r];
|
|
2157
|
+
}
|
|
2087
2158
|
o.length > 0 && e.getDeptsByCode(o).then((e) => {
|
|
2088
2159
|
for (let t of e) Object.assign(n[t.code], t);
|
|
2089
2160
|
});
|
|
2090
|
-
}, { immediate: !0 }), () => t.value.map((e) => l(
|
|
2161
|
+
}, { immediate: !0 }), () => t.value.map((e) => l(Se, { key: e.code }, { default: () => [e.name] }));
|
|
2091
2162
|
}
|
|
2092
2163
|
}), Nt = /* @__PURE__ */ d({
|
|
2093
2164
|
name: "UserRender",
|
|
@@ -2101,14 +2172,20 @@ var Mt = /* @__PURE__ */ d({
|
|
|
2101
2172
|
renderInfo: Function
|
|
2102
2173
|
},
|
|
2103
2174
|
setup(e) {
|
|
2104
|
-
let t =
|
|
2105
|
-
return
|
|
2175
|
+
let t = y([]), n = {};
|
|
2176
|
+
return E([() => e.value, () => e.multiple], ([r, i]) => {
|
|
2106
2177
|
t.value = [];
|
|
2107
2178
|
let a = r ? i ? Array.isArray(r) ? r : r.trim() ? r.trim().split(",") : [] : [r] : [], o = [];
|
|
2108
|
-
for (let [e, r] of a.entries())
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2179
|
+
for (let [e, r] of a.entries()) {
|
|
2180
|
+
if (!n[r]) {
|
|
2181
|
+
let e = v({
|
|
2182
|
+
username: r,
|
|
2183
|
+
nickname: r
|
|
2184
|
+
});
|
|
2185
|
+
n[r] = e, o.push(r);
|
|
2186
|
+
}
|
|
2187
|
+
t.value[e] = n[r];
|
|
2188
|
+
}
|
|
2112
2189
|
o.length > 0 && e.getUsersByUsername(o).then((e) => {
|
|
2113
2190
|
for (let t of e) Object.assign(n[t.username], t);
|
|
2114
2191
|
});
|
|
@@ -2149,15 +2226,15 @@ var Mt = /* @__PURE__ */ d({
|
|
|
2149
2226
|
setup(e, { slots: t }) {
|
|
2150
2227
|
return () => {
|
|
2151
2228
|
let { type: n, disabled: r, succeeded: i, successText: a, failureText: o } = e;
|
|
2152
|
-
return l(
|
|
2229
|
+
return l(N, {
|
|
2153
2230
|
type: i ? "success" : i === !1 ? "error" : n,
|
|
2154
|
-
disabled: typeof i == "boolean"
|
|
2231
|
+
disabled: typeof i == "boolean" || r
|
|
2155
2232
|
}, {
|
|
2156
|
-
default: () => (i ?
|
|
2157
|
-
icon: () => i ?
|
|
2233
|
+
default: () => (i ? b(t, "success", void 0, () => [a]) : i === !1 ? b(t, "failure", void 0, () => [o]) : b(t, "default")) ?? b(t, "default"),
|
|
2234
|
+
icon: () => i ? b(t, "successIcon", void 0, () => [l(L, null, { default: () => [l(Xe, null, null)] })]) : i === !1 ? b(t, "failureIcon", void 0, () => [l(L, null, { default: () => [l(it, null, null)] })]) : b(t, "icon")
|
|
2158
2235
|
});
|
|
2159
2236
|
};
|
|
2160
2237
|
}
|
|
2161
|
-
}), It = u(() => import("./DataTable-
|
|
2238
|
+
}), It = u(() => import("./DataTable-D5VMWw2x.js").then((e) => e.DataTable));
|
|
2162
2239
|
//#endregion
|
|
2163
|
-
export {
|
|
2240
|
+
export { ze as C, st as S, _t as _, jt as a, pt as b, At as c, Tt as d, Ct as f, vt as g, bt as h, Mt as i, Ot as l, xt as m, Ft as n, Nt as o, Y as p, Pt as r, $ as s, It as t, Et as u, ht as v, Re as w, ct as x, J as y };
|