@ithinkdt/ui 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components-BXPJvdEe.js → components-BOgApmgo.js} +459 -459
- package/dist/components.js +2 -2
- package/dist/directives-pSAvXd5F.js +240 -0
- package/dist/directives.js +2 -2
- package/dist/index.js +270 -270
- package/dist/page.js +194 -194
- package/dist/use-i18n-Cmb7Xx7d.js +6 -0
- package/dist/use-style.js +29 -2
- package/esm/design.d.ts +4 -4
- package/esm/page.d.ts +2 -0
- package/package.json +9 -9
- package/dist/directives-pc2Vi93X.js +0 -240
- package/dist/use-i18n-D-AJ8KbA.js +0 -6
- package/dist/use-style-BGq0HdRK.js +0 -29
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import { Fragment, computed, createTextVNode, createVNode, defineComponent, h, inject, isVNode, markRaw, mergeProps, nextTick, reactive, ref, shallowRef, toRaw, toRef, toValue, unref, useTemplateRef, watch, withDirectives } from "vue";
|
|
5
|
-
import { toReactive, unrefElement, until } from "@vueuse/core";
|
|
6
|
-
import { NAnchor, NAnchorLink, NAvatar, NAvatarGroup, NButton, NCard, NCheckbox, NCheckboxGroup, NDataTable, NDropdown, NEllipsis, NEmpty, NFlex, NForm, NFormItem, NGi, NGrid, NIcon, NInput, NList, NListItem, NPagination, NPopover, NRadio, NRadioButton, NRadioGroup, NSelect, NSpin, NTag, NText, NTooltip, NTransfer, NTree, NTreeSelect, dataTableProps, formProps, useDialog } from "ithinkdt-ui";
|
|
7
|
-
import { nanoid } from "nanoid";
|
|
8
|
-
import { VOverflow, VResizeObserver } from "vueuc";
|
|
9
|
-
import { Sortable } from "sortablejs/modular/sortable.core.esm.js";
|
|
10
|
-
import { isNullish, pickProps } from "@ithinkdt/common/object";
|
|
11
|
-
import { useFormItem } from "ithinkdt-ui/es/_mixins";
|
|
12
|
-
import { measureText } from "@ithinkdt/common/string";
|
|
13
|
-
import { PAGE_INJECTION, useFormModal } from "@ithinkdt/page";
|
|
14
|
-
import { Sortable as
|
|
15
|
-
import
|
|
16
|
-
import { flattenTree, walkTree } from "@ithinkdt/common";
|
|
17
|
-
const
|
|
1
|
+
import { n as e } from "./use-i18n-Cmb7Xx7d.js";
|
|
2
|
+
import t, { c as n, cB as r, cE as i, cM as a, useClsPrefix as o } from "./use-style.js";
|
|
3
|
+
import { i as s } from "./directives-pSAvXd5F.js";
|
|
4
|
+
import { Fragment as c, computed as l, createTextVNode as u, createVNode as d, defineComponent as f, h as p, inject as m, isVNode as h, markRaw as g, mergeProps as _, nextTick as v, reactive as y, ref as b, shallowRef as x, toRaw as S, toRef as C, toValue as w, unref as T, useTemplateRef as E, watch as D, withDirectives as O } from "vue";
|
|
5
|
+
import { toReactive as ee, unrefElement as k, until as A } from "@vueuse/core";
|
|
6
|
+
import { NAnchor as j, NAnchorLink as te, NAvatar as M, NAvatarGroup as ne, NButton as N, NCard as P, NCheckbox as F, NCheckboxGroup as re, NDataTable as ie, NDropdown as ae, NEllipsis as oe, NEmpty as se, NFlex as I, NForm as ce, NFormItem as le, NGi as ue, NGrid as de, NIcon as L, NInput as R, NList as fe, NListItem as pe, NPagination as me, NPopover as z, NRadio as B, NRadioButton as he, NRadioGroup as ge, NSelect as _e, NSpin as ve, NTag as V, NText as H, NTooltip as U, NTransfer as ye, NTree as be, NTreeSelect as xe, dataTableProps as Se, formProps as Ce, useDialog as we } from "ithinkdt-ui";
|
|
7
|
+
import { nanoid as Te } from "nanoid";
|
|
8
|
+
import { VOverflow as Ee, VResizeObserver as De } from "vueuc";
|
|
9
|
+
import { Sortable as Oe } from "sortablejs/modular/sortable.core.esm.js";
|
|
10
|
+
import { isNullish as ke, pickProps as W } from "@ithinkdt/common/object";
|
|
11
|
+
import { useFormItem as Ae } from "ithinkdt-ui/es/_mixins";
|
|
12
|
+
import { measureText as je } from "@ithinkdt/common/string";
|
|
13
|
+
import { PAGE_INJECTION as Me, useFormModal as Ne } from "@ithinkdt/page";
|
|
14
|
+
import { Sortable as Pe } from "sortablejs";
|
|
15
|
+
import Fe from "ithinkdt-ui/es/_mixins/use-locale.mjs";
|
|
16
|
+
import { flattenTree as Ie, walkTree as Le } from "@ithinkdt/common";
|
|
17
|
+
const Re = /* @__PURE__ */ f({
|
|
18
18
|
name: "Checkboxes",
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
props: {
|
|
@@ -68,237 +68,237 @@ const NCheckboxes = /* @__PURE__ */ defineComponent({
|
|
|
68
68
|
updateModelValue: () => !0
|
|
69
69
|
},
|
|
70
70
|
setup(t, { emit: n, attrs: r }) {
|
|
71
|
-
let { t: i } =
|
|
72
|
-
|
|
71
|
+
let { t: i } = e(), a = l(() => t.default ? t.default === !0 ? i("common.all") : typeof t.default == "string" ? t.default : t.default?.[t.labelField] ?? i("common.all") : ""), o = b([]);
|
|
72
|
+
D(() => t.modelValue, (e) => o.value = e, { immediate: !0 });
|
|
73
73
|
let s = (e) => {
|
|
74
74
|
n("update:modelValue", e), n("updateModelValue", e);
|
|
75
|
-
},
|
|
75
|
+
}, c = () => {
|
|
76
76
|
s(o.value?.length === t.options.length ? [] : t.options.map((e) => e[t.valueField]));
|
|
77
|
-
},
|
|
77
|
+
}, u = l(() => t.options.length > o.value?.length && o.value?.length > 0), f = l(() => ({ "--n-label-padding": t.labelPadding }));
|
|
78
78
|
return () => {
|
|
79
|
-
let e =
|
|
79
|
+
let e = d(re, _(r, {
|
|
80
80
|
value: o.value,
|
|
81
81
|
onUpdateValue: s
|
|
82
|
-
}), { default: () => [
|
|
82
|
+
}), { default: () => [d(I, {
|
|
83
83
|
size: t.gap ?? (t.vertical ? void 0 : "small"),
|
|
84
84
|
vertical: t.vertical,
|
|
85
85
|
style: !t.default && t.vertical ? { padding: "6px 0 0" } : {}
|
|
86
|
-
}, { default: () => [t.options?.map((e) =>
|
|
86
|
+
}, { default: () => [t.options?.map((e) => d(F, {
|
|
87
87
|
value: e[t.valueField],
|
|
88
88
|
disabled: e[t.disabledField],
|
|
89
89
|
style: f.value
|
|
90
90
|
}, { default: () => [e[t.labelField]] }))] })] });
|
|
91
|
-
return t.default ?
|
|
91
|
+
return t.default ? d(I, {
|
|
92
92
|
size: t.gap ?? (t.vertical ? void 0 : "small"),
|
|
93
93
|
vertical: t.vertical,
|
|
94
94
|
style: t.vertical ? { padding: "6px 0 0" } : {}
|
|
95
|
-
}, { default: () => [
|
|
96
|
-
indeterminate:
|
|
95
|
+
}, { default: () => [d("span", null, [d(F, {
|
|
96
|
+
indeterminate: u.value,
|
|
97
97
|
checked: o.value?.length > 0,
|
|
98
|
-
onUpdateChecked:
|
|
98
|
+
onUpdateChecked: c,
|
|
99
99
|
style: f.value
|
|
100
100
|
}, { default: () => [a.value] })]), e] }) : e;
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
}),
|
|
103
|
+
}), ze = (e) => d("svg", _({
|
|
104
104
|
xmlns: "http://www.w3.org/2000/svg",
|
|
105
105
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
106
106
|
role: "img",
|
|
107
107
|
width: "1em",
|
|
108
108
|
height: "1em",
|
|
109
109
|
viewBox: "0 0 24 24"
|
|
110
|
-
}, e), [
|
|
110
|
+
}, e), [d("path", {
|
|
111
111
|
fill: "currentColor",
|
|
112
112
|
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)]),
|
|
113
|
+
}, null)]), Be = (e) => d("svg", _({
|
|
114
114
|
xmlns: "http://www.w3.org/2000/svg",
|
|
115
115
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
116
116
|
role: "img",
|
|
117
117
|
width: "1em",
|
|
118
118
|
height: "1em",
|
|
119
119
|
viewBox: "0 0 1024 1024"
|
|
120
|
-
}, e), [
|
|
120
|
+
}, e), [d("path", {
|
|
121
121
|
fill: "currentColor",
|
|
122
122
|
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)]),
|
|
123
|
+
}, null)]), Ve = (e) => d("svg", _({
|
|
124
124
|
xmlns: "http://www.w3.org/2000/svg",
|
|
125
125
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
126
126
|
role: "img",
|
|
127
127
|
width: "1em",
|
|
128
128
|
height: "1em",
|
|
129
129
|
viewBox: "0 0 1024 1024"
|
|
130
|
-
}, e), [
|
|
130
|
+
}, e), [d("path", {
|
|
131
131
|
fill: "currentColor",
|
|
132
132
|
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"
|
|
133
|
-
}, null)]),
|
|
133
|
+
}, null)]), He = (e) => d("svg", _({
|
|
134
134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
135
135
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
136
136
|
role: "img",
|
|
137
137
|
width: "1em",
|
|
138
138
|
height: "1em",
|
|
139
139
|
viewBox: "0 0 1024 1024"
|
|
140
|
-
}, e), [
|
|
140
|
+
}, e), [d("path", {
|
|
141
141
|
fill: "currentColor",
|
|
142
142
|
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"
|
|
143
|
-
}, null)]),
|
|
143
|
+
}, null)]), Ue = (e) => d("svg", _({
|
|
144
144
|
xmlns: "http://www.w3.org/2000/svg",
|
|
145
145
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
146
146
|
role: "img",
|
|
147
147
|
width: "1em",
|
|
148
148
|
height: "1em",
|
|
149
149
|
viewBox: "0 0 1024 1024"
|
|
150
|
-
}, e), [
|
|
150
|
+
}, e), [d("path", {
|
|
151
151
|
fill: "currentColor",
|
|
152
152
|
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"
|
|
153
|
-
}, null)]),
|
|
153
|
+
}, null)]), We = (e) => d("svg", _({
|
|
154
154
|
xmlns: "http://www.w3.org/2000/svg",
|
|
155
155
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
156
156
|
role: "img",
|
|
157
157
|
width: "1em",
|
|
158
158
|
height: "1em",
|
|
159
159
|
viewBox: "0 0 24 24"
|
|
160
|
-
}, e), [
|
|
160
|
+
}, e), [d("path", {
|
|
161
161
|
fill: "currentColor",
|
|
162
162
|
d: "M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"
|
|
163
|
-
}, null)]),
|
|
163
|
+
}, null)]), Ge = (e) => d("svg", _({
|
|
164
164
|
xmlns: "http://www.w3.org/2000/svg",
|
|
165
165
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
166
166
|
role: "img",
|
|
167
167
|
width: "1em",
|
|
168
168
|
height: "1em",
|
|
169
169
|
viewBox: "0 0 24 24"
|
|
170
|
-
}, e), [
|
|
170
|
+
}, e), [d("path", {
|
|
171
171
|
fill: "currentColor",
|
|
172
172
|
d: "M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"
|
|
173
|
-
}, null)]),
|
|
173
|
+
}, null)]), Ke = (e) => d("svg", _({
|
|
174
174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
175
175
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
176
176
|
role: "img",
|
|
177
177
|
width: "1em",
|
|
178
178
|
height: "1em",
|
|
179
179
|
viewBox: "0 0 32 32"
|
|
180
|
-
}, e), [
|
|
180
|
+
}, e), [d("path", {
|
|
181
181
|
fill: "currentColor",
|
|
182
182
|
d: "M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z"
|
|
183
|
-
}, null)]),
|
|
183
|
+
}, null)]), qe = (e) => d("svg", _({
|
|
184
184
|
xmlns: "http://www.w3.org/2000/svg",
|
|
185
185
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
186
186
|
role: "img",
|
|
187
187
|
width: "1em",
|
|
188
188
|
height: "1em",
|
|
189
189
|
viewBox: "0 0 32 32"
|
|
190
|
-
}, e), [
|
|
190
|
+
}, e), [d("path", {
|
|
191
191
|
fill: "currentColor",
|
|
192
192
|
d: "m16 10l10 10l-1.4 1.4l-8.6-8.6l-8.6 8.6L6 20z"
|
|
193
|
-
}, null)]),
|
|
193
|
+
}, null)]), Je = (e) => d("svg", _({
|
|
194
194
|
xmlns: "http://www.w3.org/2000/svg",
|
|
195
195
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
196
196
|
role: "img",
|
|
197
197
|
width: "1em",
|
|
198
198
|
height: "1em",
|
|
199
199
|
viewBox: "0 0 24 24"
|
|
200
|
-
}, e), [
|
|
200
|
+
}, e), [d("path", {
|
|
201
201
|
fill: "currentColor",
|
|
202
202
|
d: "m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"
|
|
203
|
-
}, null)]),
|
|
203
|
+
}, null)]), Ye = (e) => d("svg", _({
|
|
204
204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
205
205
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
206
206
|
role: "img",
|
|
207
207
|
width: "1em",
|
|
208
208
|
height: "1em",
|
|
209
209
|
viewBox: "0 0 24 24"
|
|
210
|
-
}, e), [
|
|
210
|
+
}, e), [d("path", {
|
|
211
211
|
fill: "currentColor",
|
|
212
212
|
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"
|
|
213
|
-
}, null)]),
|
|
213
|
+
}, null)]), Xe = (e) => d("svg", _({
|
|
214
214
|
xmlns: "http://www.w3.org/2000/svg",
|
|
215
215
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
216
216
|
role: "img",
|
|
217
217
|
width: "1em",
|
|
218
218
|
height: "1em",
|
|
219
219
|
viewBox: "0 0 24 24"
|
|
220
|
-
}, e), [
|
|
220
|
+
}, e), [d("path", {
|
|
221
221
|
fill: "currentColor",
|
|
222
222
|
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"
|
|
223
|
-
}, null)]),
|
|
223
|
+
}, null)]), Ze = (e) => d("svg", _({
|
|
224
224
|
xmlns: "http://www.w3.org/2000/svg",
|
|
225
225
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
226
226
|
role: "img",
|
|
227
227
|
width: "1em",
|
|
228
228
|
height: "1em",
|
|
229
229
|
viewBox: "0 0 24 24"
|
|
230
|
-
}, e), [
|
|
230
|
+
}, e), [d("path", {
|
|
231
231
|
fill: "currentColor",
|
|
232
232
|
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"
|
|
233
|
-
}, null)]),
|
|
233
|
+
}, null)]), Qe = (e) => d("svg", _({
|
|
234
234
|
xmlns: "http://www.w3.org/2000/svg",
|
|
235
235
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
236
236
|
role: "img",
|
|
237
237
|
width: "1em",
|
|
238
238
|
height: "1em",
|
|
239
239
|
viewBox: "0 0 20 20"
|
|
240
|
-
}, e), [
|
|
240
|
+
}, e), [d("path", {
|
|
241
241
|
fill: "currentColor",
|
|
242
242
|
fillRule: "evenodd",
|
|
243
243
|
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"
|
|
244
|
-
}, null)]),
|
|
244
|
+
}, null)]), $e = (e) => d("svg", _({
|
|
245
245
|
xmlns: "http://www.w3.org/2000/svg",
|
|
246
246
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
247
247
|
width: "1em",
|
|
248
248
|
height: "1em",
|
|
249
249
|
viewBox: "0 0 12 12"
|
|
250
|
-
}, e), [
|
|
250
|
+
}, e), [d("path", {
|
|
251
251
|
fill: "currentColor",
|
|
252
252
|
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"
|
|
253
|
-
}, null)]),
|
|
253
|
+
}, null)]), et = (e) => d("svg", _({
|
|
254
254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
255
255
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
256
256
|
width: "1em",
|
|
257
257
|
height: "1em",
|
|
258
258
|
viewBox: "0 0 24 24"
|
|
259
|
-
}, e), [
|
|
259
|
+
}, e), [d("g", {
|
|
260
260
|
fill: "none",
|
|
261
261
|
fillRule: "evenodd"
|
|
262
|
-
}, [
|
|
262
|
+
}, [d("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), d("path", {
|
|
263
263
|
fill: "currentColor",
|
|
264
264
|
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"
|
|
265
|
-
}, null)])]),
|
|
265
|
+
}, null)])]), tt = (e) => d("svg", _({
|
|
266
266
|
xmlns: "http://www.w3.org/2000/svg",
|
|
267
267
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
268
268
|
role: "img",
|
|
269
269
|
width: "1em",
|
|
270
270
|
height: "1em",
|
|
271
271
|
viewBox: "0 0 256 256"
|
|
272
|
-
}, e), [
|
|
272
|
+
}, e), [d("path", {
|
|
273
273
|
fill: "currentColor",
|
|
274
274
|
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"
|
|
275
|
-
}, null)]),
|
|
275
|
+
}, null)]), nt = (e) => d("svg", _({
|
|
276
276
|
xmlns: "http://www.w3.org/2000/svg",
|
|
277
277
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
278
278
|
role: "img",
|
|
279
279
|
width: "1em",
|
|
280
280
|
height: "1em",
|
|
281
281
|
viewBox: "0 0 24 24"
|
|
282
|
-
}, e), [
|
|
282
|
+
}, e), [d("path", {
|
|
283
283
|
fill: "currentColor",
|
|
284
284
|
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"
|
|
285
|
-
}, null)]),
|
|
285
|
+
}, null)]), rt = /* @__PURE__ */ f({
|
|
286
286
|
name: "DataActions",
|
|
287
287
|
props: { options: {
|
|
288
288
|
type: Array,
|
|
289
289
|
default: () => []
|
|
290
290
|
} },
|
|
291
291
|
setup(e) {
|
|
292
|
-
let t =
|
|
292
|
+
let t = b(), n = !0, r = () => {
|
|
293
293
|
n ? n = !1 : t.value?.sync({ showAllItemsBeforeCalculate: !0 });
|
|
294
|
-
}, i =
|
|
294
|
+
}, i = b(), a = () => i.value, o = b(-1), s = (t) => {
|
|
295
295
|
o.value = e.options.length - t;
|
|
296
|
-
},
|
|
296
|
+
}, c = (e) => {
|
|
297
297
|
e || (o.value = -1);
|
|
298
|
-
},
|
|
298
|
+
}, u = () => {}, f = l(() => o.value === -1 ? [] : e.options.slice(o.value).map((e) => ({
|
|
299
299
|
...e,
|
|
300
300
|
key: e.text
|
|
301
|
-
}))), p = (e) =>
|
|
301
|
+
}))), p = (e) => d(N, {
|
|
302
302
|
type: e.color === "danger" ? "error" : [
|
|
303
303
|
"default",
|
|
304
304
|
"tertiary",
|
|
@@ -312,15 +312,15 @@ const NCheckboxes = /* @__PURE__ */ defineComponent({
|
|
|
312
312
|
}, { default: () => [e.text] }), m = (e, t) => {
|
|
313
313
|
t.onClick?.();
|
|
314
314
|
};
|
|
315
|
-
return () =>
|
|
315
|
+
return () => d(De, { onResize: r }, { default: () => [d(Ee, {
|
|
316
316
|
ref: t,
|
|
317
317
|
getCounter: a,
|
|
318
318
|
onUpdateCount: s,
|
|
319
|
-
onUpdateOverflow:
|
|
320
|
-
updateCounter:
|
|
319
|
+
onUpdateOverflow: c,
|
|
320
|
+
updateCounter: u,
|
|
321
321
|
style: "margin-top: 2px"
|
|
322
322
|
}, {
|
|
323
|
-
default: () => e.options.map((e) =>
|
|
323
|
+
default: () => e.options.map((e) => d(N, {
|
|
324
324
|
quaternary: !0,
|
|
325
325
|
type: e.color === "danger" ? "error" : [
|
|
326
326
|
"default",
|
|
@@ -334,24 +334,24 @@ const NCheckboxes = /* @__PURE__ */ defineComponent({
|
|
|
334
334
|
size: "small",
|
|
335
335
|
onClick: e.onClick
|
|
336
336
|
}, { default: () => [e.text] })),
|
|
337
|
-
counter: () =>
|
|
337
|
+
counter: () => d("span", {
|
|
338
338
|
ref: i,
|
|
339
339
|
style: "position: absolute"
|
|
340
|
-
}, [
|
|
340
|
+
}, [d(ae, {
|
|
341
341
|
options: f.value,
|
|
342
342
|
renderLabel: p,
|
|
343
343
|
onSelect: m
|
|
344
|
-
}, { default: () => [
|
|
344
|
+
}, { default: () => [d(N, {
|
|
345
345
|
quaternary: !0,
|
|
346
346
|
size: "small"
|
|
347
|
-
}, { default: () => [
|
|
347
|
+
}, { default: () => [d(Qe, { style: "font-size: 14px; color: #888" }, null)] })] })])
|
|
348
348
|
})] });
|
|
349
349
|
}
|
|
350
350
|
});
|
|
351
|
-
function
|
|
352
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
351
|
+
function G(e) {
|
|
352
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
353
353
|
}
|
|
354
|
-
var
|
|
354
|
+
var it = /* @__PURE__ */ f({
|
|
355
355
|
name: "DataCustomRow",
|
|
356
356
|
props: {
|
|
357
357
|
label: [String, Function],
|
|
@@ -364,36 +364,36 @@ var DataCustomItem = /* @__PURE__ */ defineComponent({
|
|
|
364
364
|
setup(e, { emit: t }) {
|
|
365
365
|
return () => {
|
|
366
366
|
let n;
|
|
367
|
-
return
|
|
367
|
+
return d(I, {
|
|
368
368
|
align: "center",
|
|
369
369
|
wrap: !1,
|
|
370
370
|
size: "small"
|
|
371
371
|
}, { default: () => [
|
|
372
|
-
|
|
372
|
+
d(N, {
|
|
373
373
|
type: "primary",
|
|
374
374
|
text: !0,
|
|
375
375
|
class: "icon-drag"
|
|
376
|
-
}, { default: () => [
|
|
377
|
-
|
|
376
|
+
}, { default: () => [d(L, { size: "18" }, { default: () => [d(Ve, null, null)] })] }),
|
|
377
|
+
d(F, {
|
|
378
378
|
checked: !e.hidden,
|
|
379
379
|
disabled: e.disabled,
|
|
380
380
|
onUpdateChecked: (e) => t("update-hidden", !e)
|
|
381
381
|
}, null),
|
|
382
|
-
|
|
383
|
-
e.showFixed ? [
|
|
382
|
+
d(oe, { style: "flex: 1 1 auto" }, G(n = w(e.label)) ? n : { default: () => [n] }),
|
|
383
|
+
e.showFixed ? [d(N, {
|
|
384
384
|
text: !0,
|
|
385
385
|
type: e.fixed === "left" ? "primary" : void 0,
|
|
386
386
|
onClick: () => t("update-fixed", e.fixed === "left" ? !1 : "left")
|
|
387
|
-
}, { default: () => [
|
|
387
|
+
}, { default: () => [d(L, null, { default: () => [d(He, null, null)] })] }), d(N, {
|
|
388
388
|
text: !0,
|
|
389
389
|
type: e.fixed === "right" ? "primary" : void 0,
|
|
390
390
|
onClick: () => t("update-fixed", e.fixed === "right" ? !1 : "right")
|
|
391
|
-
}, { default: () => [
|
|
391
|
+
}, { default: () => [d(L, null, { default: () => [d(Ue, null, null)] })] })] : void 0
|
|
392
392
|
] });
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
});
|
|
396
|
-
const
|
|
396
|
+
const at = /* @__PURE__ */ f({
|
|
397
397
|
name: "DataCustom",
|
|
398
398
|
props: {
|
|
399
399
|
data: {
|
|
@@ -437,16 +437,16 @@ const DataCustom = /* @__PURE__ */ defineComponent({
|
|
|
437
437
|
},
|
|
438
438
|
emits: { custom: () => !0 },
|
|
439
439
|
setup(t, { emit: n }) {
|
|
440
|
-
let { t: r } =
|
|
440
|
+
let { t: r } = e();
|
|
441
441
|
function i(e, r, i) {
|
|
442
442
|
n("custom", {
|
|
443
443
|
key: e[t.keyField],
|
|
444
444
|
[r]: i
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
|
-
let a =
|
|
448
|
-
return
|
|
449
|
-
e.$el &&
|
|
447
|
+
let a = b();
|
|
448
|
+
return D(a, (e) => {
|
|
449
|
+
e.$el && Oe.create(e.$el, {
|
|
450
450
|
animation: 150,
|
|
451
451
|
ghostClass: "ghost",
|
|
452
452
|
handle: ".icon-drag",
|
|
@@ -456,28 +456,28 @@ const DataCustom = /* @__PURE__ */ defineComponent({
|
|
|
456
456
|
r.splice(e.newIndex, 0, i), n("custom", r);
|
|
457
457
|
}
|
|
458
458
|
});
|
|
459
|
-
}), () =>
|
|
459
|
+
}), () => d(z, {
|
|
460
460
|
trigger: "click",
|
|
461
461
|
scrollable: !0,
|
|
462
462
|
placement: "left-start",
|
|
463
463
|
displayDirective: "show",
|
|
464
464
|
style: "max-height: 400px; width: 240px"
|
|
465
465
|
}, {
|
|
466
|
-
trigger: () =>
|
|
466
|
+
trigger: () => O(d(N, {
|
|
467
467
|
text: !0,
|
|
468
468
|
type: t.type
|
|
469
|
-
}, { default: () => [
|
|
469
|
+
}, { default: () => [d(L, { size: t.size }, { default: () => [d(Be, null, null)] })] }), [[s, t.tooltip ?? r("common.page.custom.tooltip")]]),
|
|
470
470
|
default: () => {
|
|
471
471
|
let e, o;
|
|
472
|
-
return
|
|
472
|
+
return d(I, { vertical: !0 }, { default: () => [d(I, { justify: "space-between" }, { default: () => [d("div", { style: "font-weight: bold" }, [t.tooltip ?? r("common.page.custom.tooltip")]), d(N, {
|
|
473
473
|
text: !0,
|
|
474
474
|
type: "primary",
|
|
475
475
|
size: "small",
|
|
476
476
|
onClick: () => n("custom", !0)
|
|
477
|
-
},
|
|
477
|
+
}, G(e = r("common.page.custom.reset")) ? e : { default: () => [e] })] }), d(I, {
|
|
478
478
|
ref: a,
|
|
479
479
|
vertical: !0
|
|
480
|
-
},
|
|
480
|
+
}, G(o = t.data.filter((e) => e[t.visibleField] !== !1).map((e) => d(it, {
|
|
481
481
|
key: e[t.keyField],
|
|
482
482
|
label: e[t.labelField],
|
|
483
483
|
hidden: e[t.hiddenField],
|
|
@@ -490,36 +490,36 @@ const DataCustom = /* @__PURE__ */ defineComponent({
|
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
|
-
function
|
|
494
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
493
|
+
function ot(e) {
|
|
494
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function K(e, t) {
|
|
497
497
|
return typeof e == "function" ? e(t) : e;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
return e.isGroup ? (e.__children ??= e.children?.filter((e) => e.isGroup) ?? [],
|
|
501
|
-
title: () =>
|
|
502
|
-
default: e.__children?.length ? () => e.__children.map((e) =>
|
|
499
|
+
function st(e, t) {
|
|
500
|
+
return e.isGroup ? (e.__children ??= e.children?.filter((e) => e.isGroup) ?? [], d(te, { href: `#${e.prop}` }, {
|
|
501
|
+
title: () => K(e.label, t),
|
|
502
|
+
default: e.__children?.length ? () => e.__children.map((e) => st(e, t)) : void 0
|
|
503
503
|
})) : null;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function ct(e, t, n) {
|
|
506
506
|
return typeof e == "function" ? e(t, n) : e;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
return e.isGroup ?
|
|
508
|
+
function lt(e, t, n, r) {
|
|
509
|
+
return e.isGroup ? d("div", {
|
|
510
510
|
key: e.prop,
|
|
511
511
|
class: `${r}__group`,
|
|
512
512
|
id: e.prop
|
|
513
|
-
}, [
|
|
513
|
+
}, [d("div", { class: `${r}__title` }, [K(e.label, n)]), d("div", { class: `${r}__wrapper` }, [e.children?.map((e) => lt(e, t, n, r))])]) : d("div", {
|
|
514
514
|
key: e.prop,
|
|
515
515
|
class: `${r}__item`,
|
|
516
516
|
style: {
|
|
517
|
-
"--descriptions-col-span":
|
|
518
|
-
"--descriptions-row-span":
|
|
517
|
+
"--descriptions-col-span": ct(e.colSpan, t, n) ?? 1,
|
|
518
|
+
"--descriptions-row-span": ct(e.rowSpan, t, n) ?? 1
|
|
519
519
|
}
|
|
520
|
-
}, [e.label ?
|
|
520
|
+
}, [e.label ? d("div", { class: `${r}__label` }, [K(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` }, [u("--")])])]);
|
|
521
521
|
}
|
|
522
|
-
const
|
|
522
|
+
const ut = /* @__PURE__ */ f({
|
|
523
523
|
name: "DataDescriptions",
|
|
524
524
|
props: {
|
|
525
525
|
cols: {
|
|
@@ -538,71 +538,71 @@ const DataDescriptions = /* @__PURE__ */ defineComponent({
|
|
|
538
538
|
}
|
|
539
539
|
},
|
|
540
540
|
setup(e) {
|
|
541
|
-
let
|
|
542
|
-
|
|
543
|
-
let
|
|
544
|
-
|
|
545
|
-
location.hash &&
|
|
541
|
+
let n = o(), r = `${n.value}-data-descriptions`;
|
|
542
|
+
t("-data-descriptions", dt, n);
|
|
543
|
+
let i = b();
|
|
544
|
+
D(() => e.items, () => {
|
|
545
|
+
location.hash && A(i).toBeTruthy().then((e) => {
|
|
546
546
|
e.scrollTo(location.hash);
|
|
547
547
|
});
|
|
548
548
|
}, { immediate: !0 });
|
|
549
|
-
let
|
|
550
|
-
ref:
|
|
551
|
-
class: `${
|
|
549
|
+
let a = l(() => ({ "--descriptions-cols": e.cols })), s = l(() => _({
|
|
550
|
+
ref: i,
|
|
551
|
+
class: `${r}__anchor`,
|
|
552
552
|
showBackground: !1,
|
|
553
553
|
affix: !0
|
|
554
554
|
}, e.anchor && typeof e.anchor == "object" ? e.anchor : {}));
|
|
555
555
|
return () => {
|
|
556
|
-
let t, { cols: n, title:
|
|
557
|
-
return
|
|
558
|
-
class:
|
|
559
|
-
style:
|
|
556
|
+
let t, { cols: n, title: i, data: o, items: c, anchor: l } = e, u = ke(i) ? void 0 : d("div", { class: `${r}__header` }, [typeof i == "string" ? d("span", null, [i]) : i(o ?? void 0)]), f = c.filter((e) => !e.hiddden).map((e) => lt(e, n, o, r)), m = l === !1 ? void 0 : d(j, s.value, ot(t = c.map((e) => p(st(e, o), { key: e.prop }))) ? t : { default: () => [t] });
|
|
557
|
+
return d("div", {
|
|
558
|
+
class: r,
|
|
559
|
+
style: a.value
|
|
560
560
|
}, [
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
u,
|
|
562
|
+
d("div", { class: `${r}__wrapper` }, [f]),
|
|
563
563
|
m
|
|
564
564
|
]);
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
567
|
});
|
|
568
|
-
var
|
|
569
|
-
|
|
568
|
+
var dt = /* @__PURE__ */ r("data-descriptions", [
|
|
569
|
+
i("header", {
|
|
570
570
|
fontWeight: "bold",
|
|
571
571
|
fontSize: "1.125rem",
|
|
572
572
|
marginBottom: "24px"
|
|
573
573
|
}),
|
|
574
|
-
|
|
574
|
+
i("wrapper", {
|
|
575
575
|
gridTemplateColumns: "repeat(var(--descriptions-cols, 3), 1fr)",
|
|
576
576
|
display: "grid",
|
|
577
577
|
gap: "20px"
|
|
578
578
|
}, []),
|
|
579
|
-
|
|
580
|
-
|
|
579
|
+
i("group", { gridColumn: "span var(--descriptions-cols, 3)" }),
|
|
580
|
+
i("item", {
|
|
581
581
|
gridColumn: "span var(--descriptions-col-span, 3)",
|
|
582
582
|
gridRow: "span var(--descriptions-row-span, 3)"
|
|
583
583
|
}),
|
|
584
|
-
|
|
584
|
+
i("title", {
|
|
585
585
|
fontWeight: "bold",
|
|
586
586
|
fontSize: "1.125rem",
|
|
587
587
|
marginBottom: "20px",
|
|
588
588
|
marginTop: "24px"
|
|
589
589
|
}),
|
|
590
|
-
|
|
590
|
+
i("label", {
|
|
591
591
|
color: "#888",
|
|
592
592
|
paddingBottom: "6px"
|
|
593
593
|
}),
|
|
594
|
-
|
|
594
|
+
i("content", {
|
|
595
595
|
fontSize: "15px",
|
|
596
596
|
color: "var(--color-text)"
|
|
597
597
|
}),
|
|
598
|
-
|
|
598
|
+
i("anchor", {
|
|
599
599
|
position: "absolute",
|
|
600
600
|
zIndex: 2,
|
|
601
601
|
top: "40px",
|
|
602
602
|
right: "40px"
|
|
603
603
|
})
|
|
604
604
|
]);
|
|
605
|
-
const
|
|
605
|
+
const q = {
|
|
606
606
|
size: {
|
|
607
607
|
type: String,
|
|
608
608
|
default: void 0
|
|
@@ -673,48 +673,48 @@ const dataFormActionsProps = {
|
|
|
673
673
|
default: void 0
|
|
674
674
|
},
|
|
675
675
|
nativeButtonType: Boolean
|
|
676
|
-
},
|
|
676
|
+
}, ft = /* @__PURE__ */ f({
|
|
677
677
|
name: "DataFormActions",
|
|
678
|
-
props:
|
|
678
|
+
props: q,
|
|
679
679
|
emits: [
|
|
680
680
|
"submit",
|
|
681
681
|
"reset",
|
|
682
682
|
"cancel"
|
|
683
683
|
],
|
|
684
684
|
setup(t, { emit: n, slots: r }) {
|
|
685
|
-
let { t: i } =
|
|
685
|
+
let { t: i } = e(), a = () => {
|
|
686
686
|
n("submit");
|
|
687
687
|
}, o = () => {
|
|
688
688
|
n("reset");
|
|
689
689
|
}, s = () => {
|
|
690
690
|
n("cancel");
|
|
691
|
-
}, { mergedDisabledRef:
|
|
691
|
+
}, { mergedDisabledRef: c, mergedSizeRef: l } = Ae(t);
|
|
692
692
|
return () => {
|
|
693
|
-
let e =
|
|
694
|
-
return
|
|
693
|
+
let e = l.value, n = c.value, { gap: u = e === "small" ? 8 : e === "medium" ? 12 : 16, submitText: f, resetText: p, cancelText: m, submitDisabled: h, submitLoading: g, showSubmitBtn: _, showResetBtn: v, showCancelBtn: y, succeeded: b, successText: x = f, failureText: S = f, nativeButtonType: C } = t;
|
|
694
|
+
return d(I, { size: u === void 0 ? e : u }, { default: () => [
|
|
695
695
|
r.prefix?.(),
|
|
696
|
-
|
|
697
|
-
attrType:
|
|
696
|
+
_ === !1 ? void 0 : d(N, {
|
|
697
|
+
attrType: C ? "submit" : "button",
|
|
698
698
|
size: e,
|
|
699
|
-
type:
|
|
700
|
-
disabled:
|
|
701
|
-
loading:
|
|
702
|
-
onClick:
|
|
699
|
+
type: b ? "success" : b === !1 ? "error" : "primary",
|
|
700
|
+
disabled: b !== void 0 || n || h || g,
|
|
701
|
+
loading: g,
|
|
702
|
+
onClick: C ? void 0 : a
|
|
703
703
|
}, {
|
|
704
|
-
default: () => (
|
|
705
|
-
icon: () =>
|
|
704
|
+
default: () => (b ? x : b === !1 ? S : f) || i("common.page.form.submitText"),
|
|
705
|
+
icon: () => b ? d(L, null, { default: () => [d(Je, null, null)] }) : b === !1 ? d(L, null, { default: () => [d(nt, null, null)] }) : void 0
|
|
706
706
|
}),
|
|
707
|
-
|
|
708
|
-
size:
|
|
709
|
-
attrType:
|
|
710
|
-
disabled: n ||
|
|
711
|
-
type:
|
|
712
|
-
secondary:
|
|
713
|
-
onClick:
|
|
707
|
+
v === !1 ? void 0 : d(N, {
|
|
708
|
+
size: l.value,
|
|
709
|
+
attrType: C ? "reset" : "button",
|
|
710
|
+
disabled: n || g || b,
|
|
711
|
+
type: y ? "primary" : "default",
|
|
712
|
+
secondary: y,
|
|
713
|
+
onClick: C ? void 0 : o
|
|
714
714
|
}, { default: () => [p || i("common.page.form.resetText")] }),
|
|
715
|
-
|
|
715
|
+
y === !1 || b ? void 0 : d(N, {
|
|
716
716
|
attrType: "button",
|
|
717
|
-
disabled: n ||
|
|
717
|
+
disabled: n || g,
|
|
718
718
|
onClick: s
|
|
719
719
|
}, { default: () => [m || i("common.page.form.cancelText")] }),
|
|
720
720
|
r.suffix?.()
|
|
@@ -722,18 +722,18 @@ const dataFormActionsProps = {
|
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
|
-
function
|
|
726
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
725
|
+
function pt(e) {
|
|
726
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
727
727
|
}
|
|
728
|
-
const
|
|
728
|
+
const mt = /* @__PURE__ */ f({
|
|
729
729
|
name: "DataForm",
|
|
730
730
|
props: {
|
|
731
731
|
grid: {
|
|
732
732
|
type: Object,
|
|
733
733
|
default: () => ({})
|
|
734
734
|
},
|
|
735
|
-
...
|
|
736
|
-
...
|
|
735
|
+
...W(Ce, "disabled", "model", "labelWidth", "labelAlign", "showFeedback", "size"),
|
|
736
|
+
...W(q, "submitText", "resetText", "cancelText", "showSubmitBtn", "showResetBtn", "showCancelBtn", "submitDisabled", "succeeded", "successText", "failureText"),
|
|
737
737
|
readonly: {
|
|
738
738
|
type: Boolean,
|
|
739
739
|
required: !1,
|
|
@@ -785,111 +785,111 @@ const DataForm = /* @__PURE__ */ defineComponent({
|
|
|
785
785
|
],
|
|
786
786
|
setup(e, { emit: t, slots: n }) {
|
|
787
787
|
let r = (n) => {
|
|
788
|
-
n?.preventDefault?.(), t("submit", { ...
|
|
788
|
+
n?.preventDefault?.(), t("submit", { ...S(e.model) }, n);
|
|
789
789
|
}, i = (e) => {
|
|
790
790
|
e?.preventDefault?.(), t("reset");
|
|
791
791
|
}, a = (e) => {
|
|
792
792
|
e?.preventDefault?.(), t("cancel");
|
|
793
|
-
}, o =
|
|
793
|
+
}, o = b(), s = ({ overflow: t }) => {
|
|
794
794
|
if (n.action) return n.action({
|
|
795
795
|
overflow: t,
|
|
796
796
|
grid: o.value
|
|
797
797
|
});
|
|
798
|
-
let { loading: r, showSubmitBtn: i, showResetBtn: s, showCancelBtn:
|
|
799
|
-
return
|
|
800
|
-
label:
|
|
798
|
+
let { loading: r, showSubmitBtn: i, showResetBtn: s, showCancelBtn: c, actionAlign: l, actionJustify: u, actionGap: f, submitDisabled: p, submitText: m, resetText: h, cancelText: g, succeeded: _, successText: v, failureText: y } = e;
|
|
799
|
+
return d(le, {
|
|
800
|
+
label: u === "start" ? " " : void 0,
|
|
801
801
|
showLabel: e.labelPlacement !== "top",
|
|
802
802
|
style: "padding-top: 16px"
|
|
803
|
-
}, { default: () => [
|
|
804
|
-
align:
|
|
805
|
-
justify:
|
|
803
|
+
}, { default: () => [d(ft, {
|
|
804
|
+
align: l,
|
|
805
|
+
justify: u,
|
|
806
806
|
gap: f,
|
|
807
807
|
showSubmitBtn: i,
|
|
808
808
|
showResetBtn: s,
|
|
809
|
-
showCancelBtn:
|
|
809
|
+
showCancelBtn: c,
|
|
810
810
|
submitText: m,
|
|
811
|
-
resetText:
|
|
812
|
-
cancelText:
|
|
811
|
+
resetText: h,
|
|
812
|
+
cancelText: g,
|
|
813
813
|
submitDisabled: p,
|
|
814
814
|
submitLoading: r,
|
|
815
|
-
succeeded:
|
|
816
|
-
successText:
|
|
817
|
-
failureText:
|
|
815
|
+
succeeded: _,
|
|
816
|
+
successText: v,
|
|
817
|
+
failureText: y,
|
|
818
818
|
nativeButtonType: !0,
|
|
819
819
|
onCancel: a
|
|
820
820
|
}, {
|
|
821
821
|
prefix: () => n.actionPrefix?.(),
|
|
822
822
|
suffix: () => n.actionSuffix?.()
|
|
823
823
|
})] });
|
|
824
|
-
},
|
|
824
|
+
}, l = () => {
|
|
825
825
|
let { items: t, validation: r, showAction: i } = e;
|
|
826
|
-
return
|
|
826
|
+
return d(c, null, [t.map(({ hidden: t, name: n, render: i, label: a, showColon: o, span: s = 6, rowSpan: c, offset: l = 0, tooltip: f, tooltipPlacement: p = e.tooltipPlacement, validationStatus: m = r[n]?.errors?.length ? "error" : r[n]?.warnings?.length ? "warnings" : r[n] ? "success" : void 0, readonly: h = e.readonly, showRequireMark: g = !h, showTooltipWhenReadonly: v = !1, ...y }) => {
|
|
827
827
|
if (t) return;
|
|
828
|
-
let
|
|
829
|
-
return
|
|
828
|
+
let b;
|
|
829
|
+
return b = n[0] === "$" ? i({}) : d(le, _({
|
|
830
830
|
path: n,
|
|
831
831
|
validationStatus: m,
|
|
832
|
-
showRequireMark:
|
|
833
|
-
},
|
|
834
|
-
label: () =>
|
|
832
|
+
showRequireMark: y.required && g
|
|
833
|
+
}, y), {
|
|
834
|
+
label: () => d(H, {
|
|
835
835
|
depth: e.readonly ? 3 : 2,
|
|
836
836
|
style: "display: inline-flex; align-items: flex-start; gap: 1px"
|
|
837
837
|
}, { default: () => [
|
|
838
|
-
|
|
839
|
-
p === "icon" ?
|
|
840
|
-
default: () =>
|
|
841
|
-
trigger: () =>
|
|
838
|
+
d("span", null, [w(a)]),
|
|
839
|
+
p === "icon" ? d(U, null, {
|
|
840
|
+
default: () => w(f),
|
|
841
|
+
trigger: () => d(N, {
|
|
842
842
|
text: !0,
|
|
843
843
|
style: "font-size: 1.25em; opacity: 0.8"
|
|
844
|
-
}, { default: () => [
|
|
844
|
+
}, { default: () => [d(L, null, { default: () => [d(ze, null, null)] })] })
|
|
845
845
|
}) : void 0,
|
|
846
|
-
e.showColon && o !== !1 ?
|
|
846
|
+
e.showColon && o !== !1 ? d("span", { style: "place-self: center" }, [u(":")]) : void 0
|
|
847
847
|
] }),
|
|
848
848
|
default: () => {
|
|
849
|
-
let t, n =
|
|
849
|
+
let t, n = d("div", { style: "width: 100%; font-size: calc(1rem - 2px); min-height: 32px; display: flex; align-items: center" }, [i({
|
|
850
850
|
disabled: e.disabled,
|
|
851
851
|
size: e.size,
|
|
852
852
|
readonly: e.readonly
|
|
853
853
|
})]);
|
|
854
|
-
return f && p === "bottom" && (!e.readonly ||
|
|
854
|
+
return f && p === "bottom" && (!e.readonly || v) ? d("div", { style: "width: 100%; display: flex; flex-direction: column" }, [n, d(H, {
|
|
855
855
|
depth: 3,
|
|
856
856
|
style: "font-size: calc(1rem - 3px); margin-top: 6px"
|
|
857
|
-
},
|
|
857
|
+
}, pt(t = w(f)) ? t : { default: () => [t] })]) : n;
|
|
858
858
|
},
|
|
859
859
|
feedback: () => r[n]?.errors?.[0] ?? r[n]?.warnings?.[0]
|
|
860
|
-
}), e.grid === !1 ?
|
|
860
|
+
}), e.grid === !1 ? b : d(ue, {
|
|
861
861
|
key: n,
|
|
862
|
-
offset:
|
|
862
|
+
offset: l,
|
|
863
863
|
span: s,
|
|
864
|
-
style:
|
|
865
|
-
},
|
|
866
|
-
}), i === !1 || e.readonly === !0 && !n.action ? void 0 :
|
|
864
|
+
style: c ? { gridRowEnd: `span ${c}` } : void 0
|
|
865
|
+
}, pt(b) ? b : { default: () => [b] });
|
|
866
|
+
}), i === !1 || e.readonly === !0 && !n.action ? void 0 : d(ue, _({
|
|
867
867
|
key: "action",
|
|
868
868
|
span: 2 ** 53 - 1
|
|
869
869
|
}, typeof e.showAction == "object" ? e.showAction : {}), { default: s })]);
|
|
870
870
|
};
|
|
871
871
|
return () => {
|
|
872
|
-
let { items: t, loading: n, validation: a, showColon: s, tooltipPlacement:
|
|
873
|
-
return
|
|
872
|
+
let { items: t, loading: n, validation: a, showColon: s, tooltipPlacement: c, showFeedback: u, labelWidth: f = "7.2em", labelAlign: p = e.labelPlacement === "top" ? "left" : "right", grid: m, showAction: h, showSubmitBtn: g, showResetBtn: v, showCancelBtn: y, actionAlign: b, actionJustify: x, actionGap: S, submitDisabled: C, submitText: w, resetText: T, cancelText: E, succeeded: D, successText: O, failureText: ee, ...k } = e, A = !e.readonly && u !== !1;
|
|
873
|
+
return d(ce, _({
|
|
874
874
|
labelWidth: f,
|
|
875
875
|
labelAlign: p,
|
|
876
876
|
onReset: i,
|
|
877
877
|
onSubmit: r,
|
|
878
|
-
showFeedback:
|
|
879
|
-
},
|
|
878
|
+
showFeedback: A
|
|
879
|
+
}, k), { default: () => [d(de, _({
|
|
880
880
|
ref: o,
|
|
881
881
|
itemResponsive: !0
|
|
882
|
-
}, m, { yGap:
|
|
882
|
+
}, m, { yGap: A ? 0 : m?.yGap ?? 24 }), { default: l })] });
|
|
883
883
|
};
|
|
884
884
|
}
|
|
885
|
-
}),
|
|
885
|
+
}), ht = /* @__PURE__ */ f({
|
|
886
886
|
name: "DataFilter",
|
|
887
887
|
props: {
|
|
888
888
|
grid: {
|
|
889
889
|
type: Object,
|
|
890
890
|
default: () => ({})
|
|
891
891
|
},
|
|
892
|
-
...
|
|
892
|
+
...W(Ce, "disabled", "model"),
|
|
893
893
|
labelWidth: {
|
|
894
894
|
type: [String, Number],
|
|
895
895
|
default: "5em"
|
|
@@ -944,71 +944,71 @@ const DataForm = /* @__PURE__ */ defineComponent({
|
|
|
944
944
|
"collapse"
|
|
945
945
|
],
|
|
946
946
|
setup(t, { expose: n, emit: r }) {
|
|
947
|
-
let { t: i } =
|
|
947
|
+
let { t: i } = e(), a = (e) => {
|
|
948
948
|
r("filter", t.model, e);
|
|
949
949
|
}, o = (e) => {
|
|
950
950
|
r("reset", e), t.filterOnReset && r("filter", t.model, e);
|
|
951
|
-
}, s =
|
|
951
|
+
}, s = b(t.defaultCollapsed), c = (e) => {
|
|
952
952
|
s.value = e;
|
|
953
953
|
};
|
|
954
|
-
n({ collapse:
|
|
955
|
-
let
|
|
954
|
+
n({ collapse: c });
|
|
955
|
+
let l = y({
|
|
956
956
|
span: 6,
|
|
957
957
|
suffix: !0
|
|
958
958
|
});
|
|
959
959
|
return () => {
|
|
960
|
-
let { filterOnReset: e, filterText: n, resetText: f, customizable: p, defaultCollapsed: m, collapsible:
|
|
961
|
-
return
|
|
960
|
+
let { filterOnReset: e, filterText: n, resetText: f, customizable: p, defaultCollapsed: m, collapsible: h, grid: g, collapsedRows: y, ...b } = t;
|
|
961
|
+
return d(mt, _({ grid: {
|
|
962
962
|
cols: "12 768:18 1280:24 1536:30",
|
|
963
963
|
yGap: 20,
|
|
964
964
|
xGap: 8,
|
|
965
|
-
...
|
|
965
|
+
...g,
|
|
966
966
|
collapsed: s.value,
|
|
967
|
-
collapsedRows:
|
|
968
|
-
} },
|
|
967
|
+
collapsedRows: y
|
|
968
|
+
} }, b, {
|
|
969
969
|
showFeedback: !1,
|
|
970
|
-
showAction:
|
|
970
|
+
showAction: l,
|
|
971
971
|
onSubmit: a,
|
|
972
972
|
onReset: o,
|
|
973
973
|
style: "position: relative"
|
|
974
|
-
}), { action: ({ grid: e }) => (
|
|
975
|
-
|
|
976
|
-
}),
|
|
977
|
-
|
|
978
|
-
|
|
974
|
+
}), { action: ({ grid: e }) => (v(() => {
|
|
975
|
+
l.suffix = e?.collapsedOverflow || e?.contentEl.children.item(e?.contentEl.children.length - 1).offsetTop > 0;
|
|
976
|
+
}), d("div", { style: "display: flex; gap: 12px; align-items: center; justify-content: " + (l.suffix ? "flex-end" : "flex-start") }, [
|
|
977
|
+
l.suffix ? void 0 : d("span", null, [u("\xA0\xA0\xA0\xA0")]),
|
|
978
|
+
d(N, {
|
|
979
979
|
attrType: "submit",
|
|
980
980
|
type: "primary",
|
|
981
981
|
disabled: t.disabled,
|
|
982
982
|
loading: t.loading
|
|
983
983
|
}, { default: () => [n || i("common.page.filter.submitText")] }),
|
|
984
|
-
|
|
984
|
+
d(N, {
|
|
985
985
|
attrType: "reset",
|
|
986
986
|
disabled: t.disabled || t.loading
|
|
987
987
|
}, { default: () => [f || i("common.page.form.resetText")] }),
|
|
988
|
-
p ?
|
|
988
|
+
p ? d(at, {
|
|
989
989
|
keyField: "name",
|
|
990
990
|
showFixed: !1,
|
|
991
|
-
data:
|
|
991
|
+
data: b.items,
|
|
992
992
|
size: 18,
|
|
993
993
|
type: "primary",
|
|
994
994
|
onCustom: (e) => r("custom", e)
|
|
995
995
|
}, null) : void 0,
|
|
996
|
-
|
|
996
|
+
h && e?.collapsedOverflow ? d(N, {
|
|
997
997
|
text: !0,
|
|
998
998
|
type: "primary",
|
|
999
999
|
iconPlacement: "right",
|
|
1000
|
-
renderIcon: s.value ?
|
|
1001
|
-
onClick: () =>
|
|
1000
|
+
renderIcon: s.value ? Ke : qe,
|
|
1001
|
+
onClick: () => c(!s.value)
|
|
1002
1002
|
}, { default: () => [s.value ? i("common.page.filter.expand") : i("common.page.filter.collapse")] }) : void 0
|
|
1003
1003
|
])) });
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
1006
|
});
|
|
1007
|
-
function
|
|
1008
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1007
|
+
function gt(e) {
|
|
1008
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1011
|
-
let { t: i } =
|
|
1010
|
+
function J(t, n, r = 1) {
|
|
1011
|
+
let { t: i } = e(), a = b(!1), o = [], { open: s, reinit: c } = Ne({
|
|
1012
1012
|
title: t,
|
|
1013
1013
|
showColon: !0,
|
|
1014
1014
|
submitText: i("common.confirm.defaultOk"),
|
|
@@ -1021,8 +1021,8 @@ function useLocaleEdit(t, n, r = 1) {
|
|
|
1021
1021
|
type: "textarea",
|
|
1022
1022
|
showCount: !0,
|
|
1023
1023
|
autosize: {
|
|
1024
|
-
minRows:
|
|
1025
|
-
maxRows: Math.max(
|
|
1024
|
+
minRows: T(r),
|
|
1025
|
+
maxRows: Math.max(T(r), 5)
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
1028
|
})),
|
|
@@ -1031,11 +1031,11 @@ function useLocaleEdit(t, n, r = 1) {
|
|
|
1031
1031
|
return {
|
|
1032
1032
|
open: (e, t = !1) => (a.value = t, s(e)),
|
|
1033
1033
|
setSupports: (e) => {
|
|
1034
|
-
o = e,
|
|
1034
|
+
o = e, c();
|
|
1035
1035
|
}
|
|
1036
1036
|
};
|
|
1037
1037
|
}
|
|
1038
|
-
const
|
|
1038
|
+
const _t = /* @__PURE__ */ f({
|
|
1039
1039
|
name: "DataLocaleInput",
|
|
1040
1040
|
props: {
|
|
1041
1041
|
label: { type: [
|
|
@@ -1082,32 +1082,32 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
|
|
|
1082
1082
|
...e.modelValue,
|
|
1083
1083
|
[r]: n
|
|
1084
1084
|
}, t("update:modelValue", n), t("updateModelValue", n);
|
|
1085
|
-
}, { open: r, setSupports: i } =
|
|
1085
|
+
}, { open: r, setSupports: i } = J(l(() => w(e.label)), (e) => {
|
|
1086
1086
|
t("update:modelValue", e), t("updateModelValue", e);
|
|
1087
|
-
},
|
|
1088
|
-
|
|
1087
|
+
}, C(e, "defaultRows")), a = b(e.defaultExpanded);
|
|
1088
|
+
D(() => e.defaultExpanded, (e) => {
|
|
1089
1089
|
a.value = e;
|
|
1090
1090
|
});
|
|
1091
|
-
let o = () =>
|
|
1091
|
+
let o = () => d(N, {
|
|
1092
1092
|
quaternary: !0,
|
|
1093
1093
|
onClick: () => {
|
|
1094
1094
|
a.value = !a.value;
|
|
1095
1095
|
},
|
|
1096
1096
|
style: "--n-padding: 0 8px"
|
|
1097
|
-
}, { default: () => [
|
|
1097
|
+
}, { default: () => [d(L, {
|
|
1098
1098
|
size: "20",
|
|
1099
1099
|
depth: "3"
|
|
1100
|
-
}, { default: () => [a.value ?
|
|
1100
|
+
}, { default: () => [a.value ? d(Ze, null, null) : d(Xe, null, null)] })] }), c = (t) => {
|
|
1101
1101
|
let n = t.split("-")[0];
|
|
1102
1102
|
return e.supports.some((e) => e.value !== t && e.value.startsWith(n)) ? t : n;
|
|
1103
|
-
},
|
|
1104
|
-
|
|
1103
|
+
}, u = `__slots${Te(6)}`;
|
|
1104
|
+
D(() => e.supports, (e) => {
|
|
1105
1105
|
i(e);
|
|
1106
1106
|
let t = 0;
|
|
1107
1107
|
for (let [n, r] of e.entries()) {
|
|
1108
|
-
let e =
|
|
1109
|
-
t = Math.max(t,
|
|
1110
|
-
prefix: () =>
|
|
1108
|
+
let e = c(r.value);
|
|
1109
|
+
t = Math.max(t, je(e, "monospace")), r[u] = g({
|
|
1110
|
+
prefix: () => d("div", { style: {
|
|
1111
1111
|
width: `${t + 4}px`,
|
|
1112
1112
|
height: "100%",
|
|
1113
1113
|
opacity: .5,
|
|
@@ -1119,29 +1119,29 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
|
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
1121
|
}, { immediate: !0 });
|
|
1122
|
-
let f =
|
|
1123
|
-
let t =
|
|
1124
|
-
return [t,
|
|
1122
|
+
let f = l(() => {
|
|
1123
|
+
let t = c(e.showLang ?? e.defaultLang);
|
|
1124
|
+
return [t, je(t, "monospace")];
|
|
1125
1125
|
}), p = {
|
|
1126
|
-
prefix: () =>
|
|
1126
|
+
prefix: () => d("div", { style: {
|
|
1127
1127
|
width: `${f.value[1] + 4}px`,
|
|
1128
1128
|
height: "100%",
|
|
1129
1129
|
opacity: .5,
|
|
1130
1130
|
fontSize: "12px",
|
|
1131
1131
|
fontFamily: "monospace"
|
|
1132
1132
|
} }, [f.value[0]]),
|
|
1133
|
-
suffix: () =>
|
|
1133
|
+
suffix: () => d(N, {
|
|
1134
1134
|
quaternary: !0,
|
|
1135
1135
|
onClick: () => r(e.modelValue, e.disabled),
|
|
1136
1136
|
style: "--n-padding: 0 8px"
|
|
1137
|
-
}, { default: () => [
|
|
1137
|
+
}, { default: () => [d(L, {
|
|
1138
1138
|
size: "20",
|
|
1139
1139
|
depth: "3"
|
|
1140
|
-
}, { default: () => [
|
|
1140
|
+
}, { default: () => [d(Ye, null, null)] })] })
|
|
1141
1141
|
}, m = { "--n-padding-right": "0" };
|
|
1142
1142
|
return () => {
|
|
1143
1143
|
let t;
|
|
1144
|
-
return e.mode === "dialog" ?
|
|
1144
|
+
return e.mode === "dialog" ? d(R, {
|
|
1145
1145
|
value: e.modelValue?.[e.showLang ?? e.defaultLang] ?? e.modelValue?.[e.defaultLang],
|
|
1146
1146
|
onUpdateValue: n,
|
|
1147
1147
|
disabled: e.disabled,
|
|
@@ -1149,14 +1149,14 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
|
|
|
1149
1149
|
style: m,
|
|
1150
1150
|
type: e.defaultRows > 1 ? "textarea" : "text",
|
|
1151
1151
|
rows: e.defaultRows
|
|
1152
|
-
},
|
|
1152
|
+
}, gt(p) ? p : { default: () => [p] }) : d(I, {
|
|
1153
1153
|
vertical: !0,
|
|
1154
1154
|
wrap: !1,
|
|
1155
1155
|
style: "width: 100%"
|
|
1156
|
-
},
|
|
1156
|
+
}, gt(t = e.supports.map((t, r) => {
|
|
1157
1157
|
if (!a.value && r !== 0) return;
|
|
1158
1158
|
let i = r == 0;
|
|
1159
|
-
return
|
|
1159
|
+
return O(d(R, {
|
|
1160
1160
|
key: t.value,
|
|
1161
1161
|
value: e.modelValue?.[t.value],
|
|
1162
1162
|
onUpdateValue: (e) => n(e, t.value),
|
|
@@ -1165,8 +1165,8 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
|
|
|
1165
1165
|
style: i ? m : void 0,
|
|
1166
1166
|
type: e.defaultRows > 1 ? "textarea" : "text",
|
|
1167
1167
|
rows: e.defaultRows
|
|
1168
|
-
}, t[
|
|
1169
|
-
|
|
1168
|
+
}, t[u]), [[
|
|
1169
|
+
s,
|
|
1170
1170
|
t.label,
|
|
1171
1171
|
void 0,
|
|
1172
1172
|
{ left: !0 }
|
|
@@ -1174,7 +1174,7 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
|
|
|
1174
1174
|
})) ? t : { default: () => [t] });
|
|
1175
1175
|
};
|
|
1176
1176
|
}
|
|
1177
|
-
}),
|
|
1177
|
+
}), Y = /* @__PURE__ */ f({
|
|
1178
1178
|
name: "DataPagination",
|
|
1179
1179
|
props: {
|
|
1180
1180
|
total: {
|
|
@@ -1193,13 +1193,13 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
|
|
|
1193
1193
|
},
|
|
1194
1194
|
emits: { change: () => !0 },
|
|
1195
1195
|
setup(t, { emit: n }) {
|
|
1196
|
-
let { t: r } =
|
|
1196
|
+
let { t: r } = e(), i = (e) => n("change", {
|
|
1197
1197
|
pageSize: t.pageSize ?? t.page?.pageSize ?? 0,
|
|
1198
1198
|
currentPage: e
|
|
1199
1199
|
}), a = (e) => n("change", {
|
|
1200
1200
|
pageSize: e,
|
|
1201
1201
|
currentPage: t.resetPageOnSizeChange ? 1 : t.currentPage ?? t.page?.currentPage ?? 1
|
|
1202
|
-
}), o =
|
|
1202
|
+
}), o = m(Y.DEFAULT_PAGE_SIZES_INJECTION_KEY, () => [
|
|
1203
1203
|
10,
|
|
1204
1204
|
20,
|
|
1205
1205
|
30,
|
|
@@ -1208,7 +1208,7 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
|
|
|
1208
1208
|
prefix: () => r("common.page.pagination.prefix", { total: t.total }),
|
|
1209
1209
|
suffix: () => r("common.page.pagination.suffix")
|
|
1210
1210
|
};
|
|
1211
|
-
return () =>
|
|
1211
|
+
return () => d(me, {
|
|
1212
1212
|
page: t.currentPage ?? t.page?.currentPage,
|
|
1213
1213
|
itemCount: t.total,
|
|
1214
1214
|
pageSize: t.pageSize ?? t.page?.pageSize,
|
|
@@ -1222,11 +1222,11 @@ const DataLocaleInput = /* @__PURE__ */ defineComponent({
|
|
|
1222
1222
|
}, t.simple ? void 0 : s);
|
|
1223
1223
|
}
|
|
1224
1224
|
});
|
|
1225
|
-
|
|
1226
|
-
function
|
|
1227
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1225
|
+
Y.DEFAULT_PAGE_SIZES_INJECTION_KEY = Symbol();
|
|
1226
|
+
function vt(e) {
|
|
1227
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
1228
1228
|
}
|
|
1229
|
-
const
|
|
1229
|
+
const yt = /* @__PURE__ */ f({
|
|
1230
1230
|
name: "DataSelection",
|
|
1231
1231
|
props: {
|
|
1232
1232
|
modelValue: {
|
|
@@ -1243,70 +1243,70 @@ const DataSelection = /* @__PURE__ */ defineComponent({
|
|
|
1243
1243
|
clear: () => !0
|
|
1244
1244
|
},
|
|
1245
1245
|
setup(t, { emit: n }) {
|
|
1246
|
-
let { t: r } =
|
|
1246
|
+
let { t: r } = e();
|
|
1247
1247
|
return () => {
|
|
1248
1248
|
let e;
|
|
1249
|
-
return t.modelValue !== "selection" && t.count === 0 ?
|
|
1249
|
+
return t.modelValue !== "selection" && t.count === 0 ? d("div", null, null) : d("div", null, [d(I, {
|
|
1250
1250
|
align: "center",
|
|
1251
1251
|
"wrap-item": !1
|
|
1252
1252
|
}, { default: () => [
|
|
1253
|
-
|
|
1254
|
-
|
|
1253
|
+
d("span", null, [r("common.page.selection.countText", { count: t.count })]),
|
|
1254
|
+
d(N, {
|
|
1255
1255
|
text: !0,
|
|
1256
1256
|
type: "primary",
|
|
1257
1257
|
onClick: () => {
|
|
1258
1258
|
n("update:modelValue", t.modelValue === "all" ? "selection" : "all");
|
|
1259
1259
|
}
|
|
1260
1260
|
}, { default: () => [t.modelValue === "all" ? r("common.page.selection.view") : r("common.page.selection.back")] }),
|
|
1261
|
-
|
|
1261
|
+
d(N, {
|
|
1262
1262
|
text: !0,
|
|
1263
1263
|
onClick: () => {
|
|
1264
1264
|
n("clear"), n("update:modelValue", "all");
|
|
1265
1265
|
}
|
|
1266
|
-
},
|
|
1266
|
+
}, vt(e = r("common.page.selection.clear")) ? e : { default: () => [e] })
|
|
1267
1267
|
] })]);
|
|
1268
1268
|
};
|
|
1269
1269
|
}
|
|
1270
1270
|
});
|
|
1271
|
-
function
|
|
1272
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1271
|
+
function bt(e) {
|
|
1272
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1274
|
+
function xt(e, t) {
|
|
1275
1275
|
return (e ?? []).map((e) => {
|
|
1276
1276
|
let n = {
|
|
1277
1277
|
csvTitle: e.exportTitle,
|
|
1278
1278
|
...e,
|
|
1279
1279
|
title: () => {
|
|
1280
|
-
let t =
|
|
1281
|
-
|
|
1282
|
-
() =>
|
|
1280
|
+
let t = w(e.title), n = t && O(d("div", null, [t]), [[
|
|
1281
|
+
s,
|
|
1282
|
+
() => w(e.title),
|
|
1283
1283
|
void 0,
|
|
1284
1284
|
{ auto: !0 }
|
|
1285
1285
|
]]);
|
|
1286
|
-
return e.tooltip ?
|
|
1286
|
+
return e.tooltip ? d(I, {
|
|
1287
1287
|
size: 3,
|
|
1288
1288
|
wrap: !1,
|
|
1289
1289
|
inline: !0,
|
|
1290
1290
|
style: "max-width: 100%"
|
|
1291
|
-
}, { default: () => [n,
|
|
1292
|
-
default:
|
|
1293
|
-
trigger: () =>
|
|
1291
|
+
}, { default: () => [n, d(U, null, {
|
|
1292
|
+
default: w(e.tooltip),
|
|
1293
|
+
trigger: () => d(N, {
|
|
1294
1294
|
text: !0,
|
|
1295
1295
|
style: "font-size: 1.25em; opacity: 0.8"
|
|
1296
|
-
}, { default: () => [
|
|
1296
|
+
}, { default: () => [d(L, null, { default: () => [d(ze, null, null)] })] })
|
|
1297
1297
|
})] }) : n;
|
|
1298
1298
|
}
|
|
1299
1299
|
};
|
|
1300
|
-
if (e.children?.length) n.children =
|
|
1300
|
+
if (e.children?.length) n.children = xt(e.children, t);
|
|
1301
1301
|
else {
|
|
1302
1302
|
e.hidden !== !0 && (n.width ??= 100, t.value += Number(n.width));
|
|
1303
1303
|
let r = e.render ?? ((e) => e);
|
|
1304
1304
|
e.ellipsis !== !1 && (n.ellipsis = !1, n.render = (...t) => {
|
|
1305
1305
|
let n = r(...t);
|
|
1306
|
-
return n && (
|
|
1306
|
+
return n && (h(n) || ((function() {
|
|
1307
1307
|
return n;
|
|
1308
|
-
})(), n =
|
|
1309
|
-
|
|
1308
|
+
})(), n = d("span", null, [n])), O(n, [[
|
|
1309
|
+
s,
|
|
1310
1310
|
() => e.ellipsisTooltip ? e.ellipsisTooltip(...t) : n,
|
|
1311
1311
|
void 0,
|
|
1312
1312
|
{
|
|
@@ -1325,7 +1325,7 @@ function _map(e, t) {
|
|
|
1325
1325
|
return n.key === "$actions" && (n.cellProps ??= () => ({ style: { padding: "0 2px" } })), n;
|
|
1326
1326
|
}).filter((e) => e?.hidden !== !0);
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
1328
|
+
const St = /* @__PURE__ */ f({
|
|
1329
1329
|
name: "DataTable",
|
|
1330
1330
|
props: {
|
|
1331
1331
|
data: {
|
|
@@ -1356,8 +1356,8 @@ const DataTable = /* @__PURE__ */ defineComponent({
|
|
|
1356
1356
|
type: String,
|
|
1357
1357
|
default: "normal"
|
|
1358
1358
|
},
|
|
1359
|
-
rowClassName:
|
|
1360
|
-
rowProps:
|
|
1359
|
+
rowClassName: Se.rowClassName,
|
|
1360
|
+
rowProps: Se.rowProps,
|
|
1361
1361
|
maxHeight: [String, Number]
|
|
1362
1362
|
},
|
|
1363
1363
|
emits: [
|
|
@@ -1366,126 +1366,126 @@ const DataTable = /* @__PURE__ */ defineComponent({
|
|
|
1366
1366
|
"custom",
|
|
1367
1367
|
"highlight"
|
|
1368
1368
|
],
|
|
1369
|
-
setup(e, { slots:
|
|
1370
|
-
let { keyField:
|
|
1371
|
-
|
|
1372
|
-
let
|
|
1373
|
-
e == n?.sortField && t == n?.sortOrder ||
|
|
1369
|
+
setup(e, { slots: n, emit: r, expose: i }) {
|
|
1370
|
+
let { keyField: a } = m(Me), s = o(), c = `${s.value}-datatable`;
|
|
1371
|
+
t("-datatable", Ct, s);
|
|
1372
|
+
let u = E("table-ref"), f = ({ sortField: e, sortOrder: t } = {}, n) => {
|
|
1373
|
+
e == n?.sortField && t == n?.sortOrder || u.value?.sort(e, t ? t + "end" : !1);
|
|
1374
1374
|
};
|
|
1375
|
-
|
|
1376
|
-
let p =
|
|
1377
|
-
let t = e.keyField ||
|
|
1375
|
+
D(() => ({ ...e.sorter }), f, { deep: !0 });
|
|
1376
|
+
let p = l(() => {
|
|
1377
|
+
let t = e.keyField || a || "key";
|
|
1378
1378
|
return (e) => e[t];
|
|
1379
|
-
}),
|
|
1379
|
+
}), h = x({
|
|
1380
1380
|
cache: [],
|
|
1381
1381
|
scrollToView(...e) {
|
|
1382
1382
|
this.cache.push(e);
|
|
1383
1383
|
}
|
|
1384
1384
|
});
|
|
1385
|
-
|
|
1385
|
+
A(u).changed().then(() => {
|
|
1386
1386
|
f(e.sorter);
|
|
1387
|
-
let t =
|
|
1388
|
-
|
|
1387
|
+
let t = h.value.cache;
|
|
1388
|
+
h.value = u.value, h.value.scrollToView = (t) => {
|
|
1389
1389
|
let n = e.data.findIndex((e) => p.value(e) === t);
|
|
1390
1390
|
if (n === -1) return;
|
|
1391
|
-
let r =
|
|
1392
|
-
|
|
1391
|
+
let r = u.value.$el.querySelector(`.${c}__row-marker:nth-child(${n + 1})`);
|
|
1392
|
+
u.value.scrollTo({
|
|
1393
1393
|
top: r.offsetTop,
|
|
1394
1394
|
behavior: "smooth"
|
|
1395
1395
|
});
|
|
1396
1396
|
};
|
|
1397
|
-
for (let e of t)
|
|
1398
|
-
}),
|
|
1399
|
-
let
|
|
1400
|
-
|
|
1401
|
-
|
|
1397
|
+
for (let e of t) h.value.scrollToView(...e);
|
|
1398
|
+
}), i(ee(h));
|
|
1399
|
+
let g = b(0), _ = x([]);
|
|
1400
|
+
D(() => e.columns, () => {
|
|
1401
|
+
g.value = 0, _.value = xt(e.columns, g);
|
|
1402
1402
|
}, {
|
|
1403
1403
|
immediate: !0,
|
|
1404
1404
|
deep: 1
|
|
1405
1405
|
});
|
|
1406
|
-
let
|
|
1407
|
-
|
|
1408
|
-
|
|
1406
|
+
let v = b();
|
|
1407
|
+
D(() => e.highlight, (e) => {
|
|
1408
|
+
v.value = typeof e == "boolean" ? null : e ?? null;
|
|
1409
1409
|
}, { immediate: !0 });
|
|
1410
|
-
let
|
|
1410
|
+
let y = l(() => (t, n) => [
|
|
1411
1411
|
e.rowClassName?.(t, n) || "",
|
|
1412
|
-
`${
|
|
1413
|
-
|
|
1414
|
-
].join(" ")),
|
|
1415
|
-
let
|
|
1412
|
+
`${c}__row-marker`,
|
|
1413
|
+
v.value != null && p.value(t) === v.value ? `${c}__row-highlight` : ""
|
|
1414
|
+
].join(" ")), S = l(() => (t, n) => {
|
|
1415
|
+
let i = e.rowProps?.(t, n);
|
|
1416
1416
|
return {
|
|
1417
|
-
...
|
|
1417
|
+
...i,
|
|
1418
1418
|
onClick: (n) => {
|
|
1419
1419
|
let a = p.value(t);
|
|
1420
|
-
e.highlight === !0 && (
|
|
1420
|
+
e.highlight === !0 && (v.value = a), r("highlight", a), i?.onClick?.(n);
|
|
1421
1421
|
}
|
|
1422
1422
|
};
|
|
1423
|
-
}),
|
|
1423
|
+
}), C = (t) => {
|
|
1424
1424
|
if (e.sorter) {
|
|
1425
1425
|
let { sortField: n, sortOrder: r } = e.sorter;
|
|
1426
1426
|
if (t?.columnKey == n && (t?.order ? t.order === r + "end" : !r)) return;
|
|
1427
1427
|
}
|
|
1428
|
-
|
|
1428
|
+
r("sort", {
|
|
1429
1429
|
sortField: t?.order ? t?.columnKey : void 0,
|
|
1430
1430
|
sortOrder: t?.order ? t.order.replace("end", "") : void 0
|
|
1431
1431
|
});
|
|
1432
|
-
},
|
|
1433
|
-
|
|
1434
|
-
},
|
|
1435
|
-
|
|
1432
|
+
}, w = (e) => {
|
|
1433
|
+
r("select", e);
|
|
1434
|
+
}, T = (e, t, n) => {
|
|
1435
|
+
r("custom", {
|
|
1436
1436
|
key: n.key,
|
|
1437
1437
|
width: e
|
|
1438
1438
|
});
|
|
1439
1439
|
};
|
|
1440
|
-
return () =>
|
|
1441
|
-
class: [
|
|
1440
|
+
return () => d(ie, {
|
|
1441
|
+
class: [c, e.appear === "sticky" ? `${c}--sticky` : ""],
|
|
1442
1442
|
data: e.data,
|
|
1443
|
-
columns:
|
|
1443
|
+
columns: _.value,
|
|
1444
1444
|
rowKey: p.value,
|
|
1445
1445
|
tableLayout: "fixed",
|
|
1446
1446
|
ref: "table-ref",
|
|
1447
|
-
scrollX:
|
|
1448
|
-
rowClassName:
|
|
1449
|
-
rowProps:
|
|
1447
|
+
scrollX: g.value,
|
|
1448
|
+
rowClassName: y.value,
|
|
1449
|
+
rowProps: S.value,
|
|
1450
1450
|
checkedRowKeys: e.selectedKeys,
|
|
1451
1451
|
style: { "--n-tr-highlight-color": e.highlightColor },
|
|
1452
1452
|
maxHeight: e.maxHeight ?? (e.appear === "sticky" ? "auto" : void 0),
|
|
1453
|
-
onUpdateSorter:
|
|
1454
|
-
onUpdateCheckedRowKeys:
|
|
1455
|
-
onUnstableColumnResize:
|
|
1456
|
-
},
|
|
1453
|
+
onUpdateSorter: C,
|
|
1454
|
+
onUpdateCheckedRowKeys: w,
|
|
1455
|
+
onUnstableColumnResize: T
|
|
1456
|
+
}, bt(n) ? n : { default: () => [n] });
|
|
1457
1457
|
}
|
|
1458
1458
|
});
|
|
1459
|
-
var
|
|
1460
|
-
|
|
1459
|
+
var Ct = /* @__PURE__ */ r("datatable", [i("row-highlight", [n("& > td", { backgroundColor: "var(--n-tr-highlight-color, var(--n-merged-border-color)) !important" })]), a("sticky", [
|
|
1460
|
+
n(".n-data-table-base-table-header", {
|
|
1461
1461
|
position: "sticky",
|
|
1462
1462
|
top: "-1px",
|
|
1463
1463
|
zIndex: 10,
|
|
1464
1464
|
overflowY: "hidden"
|
|
1465
1465
|
}),
|
|
1466
|
-
|
|
1466
|
+
n(".n-data-table-base-table-body", { overflow: "initial" }, [n("& > .n-scrollbar-container", {
|
|
1467
1467
|
overflow: "initial",
|
|
1468
1468
|
overflowX: "scroll"
|
|
1469
|
-
}),
|
|
1469
|
+
}), n("& > .n-scrollbar-rail--horizontal", {
|
|
1470
1470
|
position: "sticky",
|
|
1471
1471
|
bottom: "0"
|
|
1472
1472
|
})]),
|
|
1473
|
-
|
|
1473
|
+
n(".n-data-table-base-table:has(.n-data-table-empty) .n-data-table-base-table-header", {
|
|
1474
1474
|
scrollbarWidth: "thin",
|
|
1475
1475
|
overflowX: "auto"
|
|
1476
1476
|
}),
|
|
1477
|
-
|
|
1477
|
+
n(".n-data-table-td > *", {
|
|
1478
1478
|
verticalAlign: "middle",
|
|
1479
1479
|
contentVisibility: "auto"
|
|
1480
1480
|
})
|
|
1481
1481
|
])]);
|
|
1482
|
-
function
|
|
1483
|
-
|
|
1482
|
+
function wt(e, { data: t, onSort: n, ...r }) {
|
|
1483
|
+
D([b(t), e], async ([e, t]) => {
|
|
1484
1484
|
if (e.length === 0) return;
|
|
1485
|
-
await
|
|
1486
|
-
let i =
|
|
1485
|
+
await v();
|
|
1486
|
+
let i = k(t)?.querySelector(".n-data-table-base-table-body .n-data-table-tbody");
|
|
1487
1487
|
if (!i) return;
|
|
1488
|
-
let a =
|
|
1488
|
+
let a = Pe.create(i, {
|
|
1489
1489
|
animation: 150,
|
|
1490
1490
|
...r,
|
|
1491
1491
|
onSort(e) {
|
|
@@ -1500,10 +1500,10 @@ function useDataTableDrag(e, { data: t, onSort: n, ...r }) {
|
|
|
1500
1500
|
};
|
|
1501
1501
|
}, { immediate: !0 });
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1504
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1503
|
+
function Tt(e) {
|
|
1504
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
1505
1505
|
}
|
|
1506
|
-
const
|
|
1506
|
+
const Et = /* @__PURE__ */ f({
|
|
1507
1507
|
name: "Radios",
|
|
1508
1508
|
props: {
|
|
1509
1509
|
options: {
|
|
@@ -1556,45 +1556,45 @@ const NRadios = /* @__PURE__ */ defineComponent({
|
|
|
1556
1556
|
updateModelValue: () => !0
|
|
1557
1557
|
},
|
|
1558
1558
|
setup(t, { emit: n }) {
|
|
1559
|
-
let { t: r } =
|
|
1559
|
+
let { t: r } = e(), i = l(() => t.default === !1 ? "" : t.default === !0 ? r("common.all") : typeof t.default == "string" ? t.default : t.default?.[t.labelField] ?? r("common.all")), a = l(() => t.type === "button-primary" ? {
|
|
1560
1560
|
"--n-button-color-active": "var(--color-primary)",
|
|
1561
1561
|
"--n-button-text-color-active": "var(--color-base)"
|
|
1562
1562
|
} : {}), o = (e) => {
|
|
1563
1563
|
n("update:modelValue", e), n("updateModelValue", e);
|
|
1564
1564
|
};
|
|
1565
1565
|
return () => {
|
|
1566
|
-
let e = t.type === "button" ?
|
|
1566
|
+
let e = t.type === "button" ? he : B, n = d(c, null, [t.default ? d(e, { value: typeof t.default == "object" ? t.default?.[t.valueField] : null }, { default: () => [i.value] }) : void 0, t.options?.map((n) => {
|
|
1567
1567
|
let r = typeof n[t.labelField] == "string" ? n[t.labelField] : n[t.labelField]?.();
|
|
1568
|
-
return
|
|
1568
|
+
return d(e, {
|
|
1569
1569
|
value: n[t.valueField],
|
|
1570
1570
|
disabled: n[t.disabledField],
|
|
1571
1571
|
style: t.padding ? {
|
|
1572
1572
|
paddingLeft: t.padding,
|
|
1573
1573
|
paddingRight: t.padding
|
|
1574
1574
|
} : {}
|
|
1575
|
-
}, { default: () => [n.tip ?
|
|
1575
|
+
}, { default: () => [n.tip ? d(U, null, {
|
|
1576
1576
|
default: () => n.tip,
|
|
1577
1577
|
trigger: () => r
|
|
1578
1578
|
}) : r] });
|
|
1579
1579
|
})]);
|
|
1580
|
-
return
|
|
1580
|
+
return d(ge, {
|
|
1581
1581
|
style: t.vertical ? {
|
|
1582
1582
|
...a.value,
|
|
1583
1583
|
padding: "6px 0 0"
|
|
1584
1584
|
} : a.value,
|
|
1585
1585
|
value: t.modelValue,
|
|
1586
1586
|
onUpdateValue: o
|
|
1587
|
-
}, { default: () => [t.type === "radio" ?
|
|
1587
|
+
}, { default: () => [t.type === "radio" ? d(I, {
|
|
1588
1588
|
size: t.vertical ? void 0 : "small",
|
|
1589
1589
|
vertical: t.vertical
|
|
1590
|
-
},
|
|
1590
|
+
}, Tt(n) ? n : { default: () => [n] }) : n] });
|
|
1591
1591
|
};
|
|
1592
1592
|
}
|
|
1593
1593
|
});
|
|
1594
|
-
function
|
|
1595
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1594
|
+
function X(e) {
|
|
1595
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
|
|
1596
1596
|
}
|
|
1597
|
-
const
|
|
1597
|
+
const Dt = /* @__PURE__ */ f({
|
|
1598
1598
|
name: "UserDept",
|
|
1599
1599
|
inheritAttrs: !1,
|
|
1600
1600
|
props: {
|
|
@@ -1663,17 +1663,17 @@ const DtUserDept = /* @__PURE__ */ defineComponent({
|
|
|
1663
1663
|
},
|
|
1664
1664
|
emits: ["update:modelValue", "updateModelValue"],
|
|
1665
1665
|
setup(t, { emit: n, attrs: r }) {
|
|
1666
|
-
let { t: i } =
|
|
1666
|
+
let { t: i } = e(), { localeRef: a } = Fe("Popconfirm"), o = l(() => t.valueField || (t.type === "user" ? "username" : "code")), s = l(() => {
|
|
1667
1667
|
if (t.multiple) return t.modelValue || [];
|
|
1668
1668
|
let e = t.modelValue?.trim();
|
|
1669
1669
|
return e ? [e] : [];
|
|
1670
|
-
}),
|
|
1671
|
-
|
|
1672
|
-
|
|
1670
|
+
}), u = /* @__PURE__ */ new Map(), f = l(() => (u.clear(), t.users.map((e) => (e = y(e), e.label = e.nickname + e.username, e.value = e[o.value], e.type = "user", u.set(e[o.value], e), e)))), p = x([]);
|
|
1671
|
+
D(() => t.depts, (e) => {
|
|
1672
|
+
Le(e, (e) => {
|
|
1673
1673
|
e.label = e.name, e.value = e[o.value], e.type = "dept", e.children?.length || delete e.children;
|
|
1674
|
-
}), p.value =
|
|
1674
|
+
}), p.value = Ie(e);
|
|
1675
1675
|
}, { immediate: !0 });
|
|
1676
|
-
let m =
|
|
1676
|
+
let m = l(() => [
|
|
1677
1677
|
...t.depts,
|
|
1678
1678
|
...t.groups.map((e) => ({
|
|
1679
1679
|
label: e.name,
|
|
@@ -1681,11 +1681,11 @@ const DtUserDept = /* @__PURE__ */ defineComponent({
|
|
|
1681
1681
|
type: "group"
|
|
1682
1682
|
})),
|
|
1683
1683
|
...f.value
|
|
1684
|
-
]),
|
|
1684
|
+
]), h = b([]), g = b(), S = async (e) => {
|
|
1685
1685
|
let n = await (e.type === "group" ? t.getUsersByGroup(e.value) : t.getUsersByDept(e.value));
|
|
1686
1686
|
for (let e of f.value) e.disabled = !0;
|
|
1687
|
-
|
|
1688
|
-
let t =
|
|
1687
|
+
g.value = [...e.type === "dept" ? e.children ?? [] : [], ...n.map((e) => {
|
|
1688
|
+
let t = u.get(e[o.value]);
|
|
1689
1689
|
return t && (t.disabled = !1), {
|
|
1690
1690
|
...e,
|
|
1691
1691
|
label: e.nickname + e.username,
|
|
@@ -1693,9 +1693,9 @@ const DtUserDept = /* @__PURE__ */ defineComponent({
|
|
|
1693
1693
|
type: "user"
|
|
1694
1694
|
};
|
|
1695
1695
|
})];
|
|
1696
|
-
},
|
|
1696
|
+
}, C = /* @__PURE__ */ new WeakMap(), w = (e, n, r) => {
|
|
1697
1697
|
let a;
|
|
1698
|
-
if (t.type === "dept") return
|
|
1698
|
+
if (t.type === "dept") return d(be, {
|
|
1699
1699
|
data: t.depts,
|
|
1700
1700
|
keyField: "value",
|
|
1701
1701
|
labelField: "name",
|
|
@@ -1716,31 +1716,31 @@ const DtUserDept = /* @__PURE__ */ defineComponent({
|
|
|
1716
1716
|
n(e);
|
|
1717
1717
|
}
|
|
1718
1718
|
}, null);
|
|
1719
|
-
let o = e ?
|
|
1720
|
-
if (e && !o && (o = new Set(e),
|
|
1721
|
-
let s =
|
|
1719
|
+
let o = e ? C.get(e) : /* @__PURE__ */ new Set();
|
|
1720
|
+
if (e && !o && (o = new Set(e), C.set(e, o)), g.value === !1) return d(ve, { show: !0 }, null);
|
|
1721
|
+
let s = g.value || m.value;
|
|
1722
1722
|
r = r?.trim(), r && (s = s?.filter((e) => e.label.includes(r) || e.value.includes(r)));
|
|
1723
|
-
let
|
|
1724
|
-
return
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
]),
|
|
1723
|
+
let l = h.value;
|
|
1724
|
+
return d(c, null, [d("div", { style: "margin: 12px 16px; display: flex; justify-content: space-between; align-items: center" }, [l.length > 0 ? d(c, null, [d("span", { style: "display: flex; align-items: center" }, [
|
|
1725
|
+
l.length >= 2 ? l.at(-2).label : i("common.all"),
|
|
1726
|
+
d("span", { style: "padding: 0 4px" }, [d(Ge, null, null)]),
|
|
1727
|
+
l.at(-1).label
|
|
1728
|
+
]), d(N, {
|
|
1729
1729
|
text: !0,
|
|
1730
1730
|
type: "warning",
|
|
1731
1731
|
onClick: () => {
|
|
1732
|
-
if (
|
|
1732
|
+
if (l.pop(), g.value = l.length > 0 ? !1 : void 0, l.length > 0) S(l.at(-1));
|
|
1733
1733
|
else for (let e of f.value) e.disabled = !1;
|
|
1734
1734
|
}
|
|
1735
|
-
}, { default: () => [
|
|
1735
|
+
}, { default: () => [d(L, null, { default: () => [d(We, null, null)] }), i("common.back")] })]) : d("span", null, [i("common.all")])]), s?.length ? d(fe, {
|
|
1736
1736
|
showDivider: !1,
|
|
1737
1737
|
style: "padding: 0 16px"
|
|
1738
|
-
},
|
|
1738
|
+
}, X(a = s.map((r) => {
|
|
1739
1739
|
let i, a;
|
|
1740
|
-
return
|
|
1740
|
+
return d(pe, {
|
|
1741
1741
|
key: r.type + "_" + r.value,
|
|
1742
1742
|
style: "padding: 6px 0"
|
|
1743
|
-
}, { default: () => [r.type === "user" ? t.multiple ?
|
|
1743
|
+
}, { default: () => [r.type === "user" ? t.multiple ? d(F, {
|
|
1744
1744
|
checked: o.has(r.value) || !1,
|
|
1745
1745
|
onUpdateChecked: (i) => {
|
|
1746
1746
|
if (i && t.max && e.length >= t.max) return;
|
|
@@ -1753,52 +1753,52 @@ const DtUserDept = /* @__PURE__ */ defineComponent({
|
|
|
1753
1753
|
n(a);
|
|
1754
1754
|
},
|
|
1755
1755
|
style: "margin-left: 3px"
|
|
1756
|
-
},
|
|
1756
|
+
}, X(i = Q([r], {
|
|
1757
1757
|
max: 1,
|
|
1758
1758
|
size: 24,
|
|
1759
1759
|
placement: "right",
|
|
1760
1760
|
tooltip: !1,
|
|
1761
1761
|
username: !0,
|
|
1762
1762
|
renderInfo: t.renderUserInfo
|
|
1763
|
-
})) ? i : { default: () => [i] }) :
|
|
1763
|
+
})) ? i : { default: () => [i] }) : d(B, {
|
|
1764
1764
|
checked: o.has(r.value) || !1,
|
|
1765
1765
|
onUpdateChecked: (e) => {
|
|
1766
1766
|
n(e ? [r.value] : []);
|
|
1767
1767
|
},
|
|
1768
1768
|
style: "margin-left: 3px;"
|
|
1769
|
-
},
|
|
1769
|
+
}, X(a = Q([r], {
|
|
1770
1770
|
max: 1,
|
|
1771
1771
|
size: 24,
|
|
1772
1772
|
placement: "right",
|
|
1773
1773
|
tooltip: !1,
|
|
1774
1774
|
username: !0,
|
|
1775
1775
|
renderInfo: t.renderUserInfo
|
|
1776
|
-
})) ? a : { default: () => [a] }) :
|
|
1776
|
+
})) ? a : { default: () => [a] }) : d("div", {
|
|
1777
1777
|
onClick: () => {
|
|
1778
|
-
|
|
1778
|
+
g.value = !1, h.value.push(r), S(r);
|
|
1779
1779
|
},
|
|
1780
1780
|
style: "cursor: pointer; display: flex; align-items: center; gap: 8px"
|
|
1781
1781
|
}, [
|
|
1782
|
-
r.type === "dept" ?
|
|
1782
|
+
r.type === "dept" ? d(M, {
|
|
1783
1783
|
size: 24,
|
|
1784
1784
|
style: "background-color: red"
|
|
1785
|
-
}, { default: () => [
|
|
1785
|
+
}, { default: () => [d(L, null, { default: () => [d($e, null, null)] })] }) : d(M, {
|
|
1786
1786
|
size: 24,
|
|
1787
1787
|
style: "background-color: green"
|
|
1788
|
-
}, { default: () => [
|
|
1789
|
-
|
|
1790
|
-
|
|
1788
|
+
}, { default: () => [d(L, null, { default: () => [d(et, null, null)] })] }),
|
|
1789
|
+
d("span", { style: "flex: 1 1 auto" }, [r.label]),
|
|
1790
|
+
d(L, null, { default: () => [d(Ge, null, null)] })
|
|
1791
1791
|
])] });
|
|
1792
|
-
})) ? a : { default: () => [a] }) :
|
|
1793
|
-
},
|
|
1792
|
+
})) ? a : { default: () => [a] }) : d(se, null, null)]);
|
|
1793
|
+
}, T = () => d(se, { description: t.placeholder }, null), E = ({ option: e }) => e.type === "user" ? d("span", null, [e.nickname, d("span", { style: {
|
|
1794
1794
|
opacity: .4,
|
|
1795
1795
|
marginLeft: "8px"
|
|
1796
|
-
} }, [e.username])]) :
|
|
1796
|
+
} }, [e.username])]) : d("span", null, [e.label]), O = (e, n, r, i, a) => d(ye, _(e, {
|
|
1797
1797
|
key: t.type,
|
|
1798
1798
|
options: n,
|
|
1799
|
-
renderSourceList: ({ onCheck: e, pattern: t }) =>
|
|
1800
|
-
renderTargetList: t.placeholder?.trim() && !t.modelValue?.length ?
|
|
1801
|
-
renderTargetLabel:
|
|
1799
|
+
renderSourceList: ({ onCheck: e, pattern: t }) => w(r, e, t),
|
|
1800
|
+
renderTargetList: t.placeholder?.trim() && !t.modelValue?.length ? T : void 0,
|
|
1801
|
+
renderTargetLabel: E,
|
|
1802
1802
|
sourceFilterable: t.filterable,
|
|
1803
1803
|
size: t.size,
|
|
1804
1804
|
disabled: t.disabled || void 0,
|
|
@@ -1810,39 +1810,39 @@ const DtUserDept = /* @__PURE__ */ defineComponent({
|
|
|
1810
1810
|
onUpdateValue: (e) => {
|
|
1811
1811
|
a?.(e);
|
|
1812
1812
|
}
|
|
1813
|
-
}), null),
|
|
1813
|
+
}), null), ee = ({ option: e, handleClose: n }) => d(V, {
|
|
1814
1814
|
type: t.type === "user" ? "primary" : "info",
|
|
1815
1815
|
closable: !0,
|
|
1816
1816
|
onMousedown: (e) => e.preventDefault(),
|
|
1817
1817
|
onClose: (e) => {
|
|
1818
1818
|
e.stopPropagation(), n();
|
|
1819
1819
|
}
|
|
1820
|
-
}, { default: () => [e.label] }),
|
|
1820
|
+
}, { default: () => [e.label] }), k = (e, r = "updateModelValue") => {
|
|
1821
1821
|
t.multiple ? n(r, e) : n(r, e?.[0]);
|
|
1822
|
-
},
|
|
1823
|
-
if (
|
|
1824
|
-
|
|
1825
|
-
let e =
|
|
1826
|
-
|
|
1822
|
+
}, A = b(), j = !1, te = we(), ne = () => {
|
|
1823
|
+
if (j) return;
|
|
1824
|
+
j = !0;
|
|
1825
|
+
let e = x([...s.value || []]);
|
|
1826
|
+
te.create({
|
|
1827
1827
|
showIcon: !1,
|
|
1828
1828
|
title: t.placeholder,
|
|
1829
1829
|
style: { width: "700px" },
|
|
1830
|
-
content: () =>
|
|
1830
|
+
content: () => d("div", { style: { height: "550px" } }, [O({ style: { height: "100%" } }, t.type === "user" ? f.value : p.value, e.value, (t) => e.value = t)]),
|
|
1831
1831
|
positiveText: a.value.positiveText,
|
|
1832
1832
|
negativeText: a.value.negativeText,
|
|
1833
1833
|
onPositiveClick() {
|
|
1834
|
-
|
|
1834
|
+
k(e.value, "update:modelValue"), k(e.value, "updateModelValue");
|
|
1835
1835
|
},
|
|
1836
1836
|
onAfterLeave() {
|
|
1837
|
-
|
|
1838
|
-
|
|
1837
|
+
v(() => {
|
|
1838
|
+
A.value?.blur(), j = !1;
|
|
1839
1839
|
});
|
|
1840
1840
|
}
|
|
1841
1841
|
});
|
|
1842
|
-
},
|
|
1842
|
+
}, P = { arrow: () => d(L, null, { default: () => [t.type === "user" ? d(et, null, null) : d($e, null, null)] }) };
|
|
1843
1843
|
return () => {
|
|
1844
1844
|
let e = t.type === "user" ? f.value : p.value;
|
|
1845
|
-
if (t.selectType === "dropdown" && t.type === "dept") return
|
|
1845
|
+
if (t.selectType === "dropdown" && t.type === "dept") return d(xe, {
|
|
1846
1846
|
options: e,
|
|
1847
1847
|
keyField: "value",
|
|
1848
1848
|
defaultExpandAll: t.defaultExpandAll,
|
|
@@ -1856,12 +1856,12 @@ const DtUserDept = /* @__PURE__ */ defineComponent({
|
|
|
1856
1856
|
"onUpdate:value": (e) => {
|
|
1857
1857
|
t.multiple && t.max && e?.length > t.max || n("update:modelValue", e);
|
|
1858
1858
|
}
|
|
1859
|
-
},
|
|
1860
|
-
if (t.selectType === "transfer") return
|
|
1859
|
+
}, X(P) ? P : { default: () => [P] });
|
|
1860
|
+
if (t.selectType === "transfer") return O(r, e, s.value, (e) => k(e, "update:modelValue"), (e) => k(e, "updateModelValue"));
|
|
1861
1861
|
let i = t.selectType === "dropdown";
|
|
1862
|
-
return
|
|
1862
|
+
return d(_e, _(r, {
|
|
1863
1863
|
key: t.type,
|
|
1864
|
-
ref:
|
|
1864
|
+
ref: A,
|
|
1865
1865
|
show: i ? void 0 : !1,
|
|
1866
1866
|
filterable: i ? t.filterable : !1,
|
|
1867
1867
|
options: e,
|
|
@@ -1870,66 +1870,66 @@ const DtUserDept = /* @__PURE__ */ defineComponent({
|
|
|
1870
1870
|
placeholder: t.placeholder,
|
|
1871
1871
|
disabled: t.disabled || void 0,
|
|
1872
1872
|
value: t.modelValue,
|
|
1873
|
-
renderTag: t.multiple ?
|
|
1874
|
-
onFocus: i ? void 0 :
|
|
1873
|
+
renderTag: t.multiple ? ee : void 0,
|
|
1874
|
+
onFocus: i ? void 0 : ne,
|
|
1875
1875
|
onUpdateValue: (e) => {
|
|
1876
1876
|
n("updateModelValue", e);
|
|
1877
1877
|
},
|
|
1878
1878
|
"onUpdate:value": (e) => {
|
|
1879
1879
|
n("update:modelValue", e);
|
|
1880
1880
|
}
|
|
1881
|
-
}),
|
|
1881
|
+
}), X(P) ? P : { default: () => [P] });
|
|
1882
1882
|
};
|
|
1883
1883
|
}
|
|
1884
1884
|
});
|
|
1885
|
-
function
|
|
1886
|
-
let s = e.nickname.split(" ").at(-1),
|
|
1885
|
+
function Z(e, t, { placement: n = "left", size: r = 24, tooltip: i = !0, username: a = !1, renderInfo: o }) {
|
|
1886
|
+
let s = e.nickname.split(" ").at(-1), c = s;
|
|
1887
1887
|
if (/^[\u4E00-\u9FA5]+$/.test(s)) {
|
|
1888
1888
|
let e = s.length;
|
|
1889
|
-
|
|
1890
|
-
} else s.length > 4 && (
|
|
1891
|
-
let
|
|
1889
|
+
c = e === 3 || e === 4 ? s.slice(-2) : e > 4 ? s.slice(0, 1) : s;
|
|
1890
|
+
} else s.length > 4 && (c = d(L, null, { default: () => [d(tt, null, null)] }));
|
|
1891
|
+
let l = (e) => d(M, {
|
|
1892
1892
|
color: "var(--color-primary)",
|
|
1893
1893
|
round: !0,
|
|
1894
1894
|
size: e
|
|
1895
|
-
},
|
|
1896
|
-
return
|
|
1895
|
+
}, X(c) ? c : { default: () => [c] });
|
|
1896
|
+
return d(z, {
|
|
1897
1897
|
key: e.username,
|
|
1898
1898
|
raw: !0,
|
|
1899
1899
|
placement: n,
|
|
1900
1900
|
disabled: i === !1
|
|
1901
1901
|
}, {
|
|
1902
|
-
default: () =>
|
|
1902
|
+
default: () => d(P, {
|
|
1903
1903
|
style: "min-width: 200px",
|
|
1904
1904
|
size: "small"
|
|
1905
|
-
}, { default: () => [
|
|
1905
|
+
}, { default: () => [d("div", { style: "display: flex; align-items: center; gap: 12px" }, [l(48), d("div", null, [d("div", { style: "font-size: 16px; font-weight: 500;" }, [e.nickname]), d("div", { style: "font-size: 14px; color: #999" }, [e.username])])]), o?.(e)] }),
|
|
1906
1906
|
trigger: () => {
|
|
1907
|
-
let n =
|
|
1908
|
-
return t ?
|
|
1907
|
+
let n = l(r);
|
|
1908
|
+
return t ? d("div", { style: "max-width: 100%; overflow: hidden; display: inline-flex; align-items: center; gap: 6px" }, [n, d("div", { style: "overflow: hidden; white-space: nowrap; text-overflow: ellipsis" }, [d("span", null, [e.nickname]), a ? d("span", { style: "margin-left: 8px; opacity: 0.4" }, [e.username]) : void 0])]) : n;
|
|
1909
1909
|
}
|
|
1910
1910
|
});
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1912
|
+
function Q(e, t = {}) {
|
|
1913
1913
|
let { max: n = 4, size: r = 24 } = t;
|
|
1914
|
-
return e.length <= 1 ? e[0] ?
|
|
1914
|
+
return e.length <= 1 ? e[0] ? Z(e[0], !0, t) : null : d("span", { style: {
|
|
1915
1915
|
display: "inline-block",
|
|
1916
1916
|
height: r + "px"
|
|
1917
|
-
} }, [
|
|
1917
|
+
} }, [d(ne, {
|
|
1918
1918
|
options: e,
|
|
1919
1919
|
size: r,
|
|
1920
1920
|
max: n || 4,
|
|
1921
1921
|
style: "top: -2px"
|
|
1922
1922
|
}, {
|
|
1923
|
-
avatar: ({ option: e }) =>
|
|
1924
|
-
rest: ({ options: e, rest: t }) =>
|
|
1923
|
+
avatar: ({ option: e }) => Z(e, !1, t),
|
|
1924
|
+
rest: ({ options: e, rest: t }) => d(ae, {
|
|
1925
1925
|
options: e,
|
|
1926
1926
|
keyField: "username",
|
|
1927
1927
|
labelField: "nickname",
|
|
1928
|
-
renderOption: ({ option: t }) =>
|
|
1929
|
-
}, { default: () => [
|
|
1928
|
+
renderOption: ({ option: t }) => Z(t, !1, e)
|
|
1929
|
+
}, { default: () => [d(M, null, { default: () => [u("+"), t] })] })
|
|
1930
1930
|
})]);
|
|
1931
1931
|
}
|
|
1932
|
-
const
|
|
1932
|
+
const Ot = /* @__PURE__ */ f({
|
|
1933
1933
|
name: "DeptRender",
|
|
1934
1934
|
props: {
|
|
1935
1935
|
value: [String, Array],
|
|
@@ -1937,20 +1937,20 @@ const DtDeptRender = /* @__PURE__ */ defineComponent({
|
|
|
1937
1937
|
getDeptsByCode: Function
|
|
1938
1938
|
},
|
|
1939
1939
|
setup(e) {
|
|
1940
|
-
let t =
|
|
1941
|
-
return
|
|
1940
|
+
let t = b([]), n = {};
|
|
1941
|
+
return D([() => e.modelValue, () => e.multiple], ([r, i]) => {
|
|
1942
1942
|
t.value = [];
|
|
1943
1943
|
let a = r ? i ? Array.isArray(r) ? r : r.trim() ? r.trim().split(",") : [] : [r] : [], o = [];
|
|
1944
|
-
for (let [e, r] of a.entries()) n[r] || (n[r] =
|
|
1944
|
+
for (let [e, r] of a.entries()) n[r] || (n[r] = y({
|
|
1945
1945
|
code: r,
|
|
1946
1946
|
name: r
|
|
1947
1947
|
}), o.push(r)), t.value[e] = n[r];
|
|
1948
1948
|
o.length > 0 && e.getDeptsByCode(o).then((e) => {
|
|
1949
1949
|
for (let t of e) Object.assign(n[t.code], t);
|
|
1950
1950
|
});
|
|
1951
|
-
}, { immediate: !0 }), () => t.value.map((e) =>
|
|
1951
|
+
}, { immediate: !0 }), () => t.value.map((e) => d(V, { key: e.code }, { default: () => [e.name] }));
|
|
1952
1952
|
}
|
|
1953
|
-
}),
|
|
1953
|
+
}), kt = /* @__PURE__ */ f({
|
|
1954
1954
|
name: "UserRender",
|
|
1955
1955
|
props: {
|
|
1956
1956
|
value: [String, Array],
|
|
@@ -1962,20 +1962,20 @@ const DtDeptRender = /* @__PURE__ */ defineComponent({
|
|
|
1962
1962
|
renderInfo: Function
|
|
1963
1963
|
},
|
|
1964
1964
|
setup(e) {
|
|
1965
|
-
let t =
|
|
1966
|
-
return
|
|
1965
|
+
let t = b([]), n = {};
|
|
1966
|
+
return D([() => e.value, () => e.multiple], ([r, i]) => {
|
|
1967
1967
|
t.value = [];
|
|
1968
1968
|
let a = r ? i ? Array.isArray(r) ? r : r.trim() ? r.trim().split(",") : [] : [r] : [], o = [];
|
|
1969
|
-
for (let [e, r] of a.entries()) n[r] || (n[r] =
|
|
1969
|
+
for (let [e, r] of a.entries()) n[r] || (n[r] = y({
|
|
1970
1970
|
username: r,
|
|
1971
1971
|
nickname: r
|
|
1972
1972
|
}), o.push(r)), t.value[e] = n[r];
|
|
1973
1973
|
o.length > 0 && e.getUsersByUsername(o).then((e) => {
|
|
1974
1974
|
for (let t of e) Object.assign(n[t.username], t);
|
|
1975
1975
|
});
|
|
1976
|
-
}, { immediate: !0 }), () =>
|
|
1976
|
+
}, { immediate: !0 }), () => Q(t.value, e);
|
|
1977
1977
|
}
|
|
1978
|
-
}),
|
|
1978
|
+
}), $ = {
|
|
1979
1979
|
disabled: {
|
|
1980
1980
|
type: Boolean,
|
|
1981
1981
|
default: void 0
|
|
@@ -2004,20 +2004,20 @@ const DtDeptRender = /* @__PURE__ */ defineComponent({
|
|
|
2004
2004
|
],
|
|
2005
2005
|
default: void 0
|
|
2006
2006
|
}
|
|
2007
|
-
},
|
|
2007
|
+
}, At = /* @__PURE__ */ f({
|
|
2008
2008
|
name: "StateButton",
|
|
2009
|
-
props:
|
|
2009
|
+
props: $,
|
|
2010
2010
|
setup(e, { slots: t }) {
|
|
2011
2011
|
return () => {
|
|
2012
2012
|
let { type: n, disabled: r, succeeded: i, successText: a, failureText: o } = e;
|
|
2013
|
-
return
|
|
2013
|
+
return d(N, {
|
|
2014
2014
|
type: i ? "success" : i === !1 ? "error" : n,
|
|
2015
2015
|
disabled: typeof i == "boolean" ? !0 : r
|
|
2016
2016
|
}, {
|
|
2017
2017
|
default: () => (i ? t.success ? t.success() : a : i === !1 ? t.failure ? t.failure() : o : t.default?.()) ?? t.default(),
|
|
2018
|
-
icon: () => i ? t.successIcon ? t.successIcon() :
|
|
2018
|
+
icon: () => i ? t.successIcon ? t.successIcon() : d(L, null, { default: () => [d(Je, null, null)] }) : i === !1 ? t.failureIcon ? t.failureIcon() : d(L, null, { default: () => [d(nt, null, null)] }) : t.icon?.()
|
|
2019
2019
|
});
|
|
2020
2020
|
};
|
|
2021
2021
|
}
|
|
2022
2022
|
});
|
|
2023
|
-
export {
|
|
2023
|
+
export { q as _, kt as a, rt as b, St as c, Y as d, _t as f, ft as g, mt as h, Dt as i, wt as l, ht as m, $ as n, Q as o, J as p, Ot as r, Et as s, At as t, yt as u, ut as v, Re as x, at as y };
|