disguise-ui 0.3.7 → 0.3.9
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/README.md +4 -2
- package/dist/{avatar-cell-Cns1UqiV.js → avatar-cell-Cx1YMRjp.js} +1 -1
- package/dist/disguise-ui.js +264 -255
- package/dist/{file-upload-D02tRF4e.js → file-upload-CJIkJlcK.js} +1 -1
- package/dist/{file-upload-BYq_ZBPv.js → file-upload-CdzTspvH.js} +3 -3
- package/dist/{i18n-DyM4J6Tt.js → i18n-DZQHHiTD.js} +47 -50
- package/dist/{picture-cell--GGQKBgi.js → picture-cell-CogcfWjM.js} +1 -1
- package/dist/{picture-upload-CmNsacpE.js → picture-upload-Ba5slmTG.js} +1 -1
- package/dist/{picture-upload-BQeS_ojB.js → picture-upload-By35hBTI.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/types/components/async-select/async-select.vue.d.ts +1 -1
- package/dist/types/components/dialog-list/index.vue.d.ts +10 -10
- package/dist/types/components/dict-tag/index.vue.d.ts +1 -1
- package/dist/types/components/drawer-form-page/index.vue.d.ts +2 -2
- package/dist/types/components/file-upload/components/file-status.vue.d.ts +1 -1
- package/dist/types/components/file-upload/file-upload.vue.d.ts +4 -4
- package/dist/types/components/image-upload/index.vue.d.ts +2 -2
- package/dist/types/components/images-view/index.vue.d.ts +1 -1
- package/dist/types/components/import-dialog/index.type.d.ts +4 -0
- package/dist/types/components/import-dialog/index.vue.d.ts +19 -3
- package/dist/types/components/picture-upload/picture-upload.vue.d.ts +4 -4
- package/dist/types/components/rich-text-editor/index.vue.d.ts +1 -1
- package/dist/types/components/schema-form/schema-form.vue.d.ts +1 -1
- package/dist/types/components/schema-form/translate-field.vue.d.ts +1 -1
- package/dist/types/components/schema-form/translate-toolbar.vue.d.ts +6 -3
- package/dist/types/components/search-form/index.vue.d.ts +1 -1
- package/dist/types/components/table-entity/index.vue.d.ts +2 -2
- package/dist/types/components/user-avatar-info/index.vue.d.ts +8 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/runtime/context.d.ts +25 -3316
- package/dist/types/setup.d.ts +1 -1
- package/dist/{use-image-url-CWM0aE7u.js → use-image-url-o26z5K19.js} +1 -1
- package/dist/{use-multiple-file-upload-Vt01wSm6.js → use-multiple-file-upload-DoEljuzF.js} +2 -2
- package/dist/{user-avatar-info-CwXzoLlH.js → user-avatar-info-DObwPt9B.js} +80 -93
- package/package.json +1 -1
package/dist/disguise-ui.js
CHANGED
|
@@ -1,98 +1,101 @@
|
|
|
1
|
-
import { i as e, r as t, t as n } from "./picture-cell
|
|
1
|
+
import { i as e, r as t, t as n } from "./picture-cell-CogcfWjM.js";
|
|
2
2
|
import { t as r } from "./modal-CHOpDVLd.js";
|
|
3
|
-
import { a as i,
|
|
3
|
+
import { a as i, f as a, i as o, l as s, o as c, r as l, t as u, u as d } from "./i18n-DZQHHiTD.js";
|
|
4
4
|
import { t as f } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
5
|
-
import { t as p } from "./use-image-url-
|
|
6
|
-
import { t as m } from "./user-avatar-info-
|
|
5
|
+
import { t as p } from "./use-image-url-o26z5K19.js";
|
|
6
|
+
import { t as m } from "./user-avatar-info-DObwPt9B.js";
|
|
7
7
|
import { t as h } from "./use-file-type-rNstoxXw.js";
|
|
8
|
-
import { t as g } from "./file-upload-
|
|
9
|
-
import { r as _ } from "./use-multiple-file-upload-
|
|
10
|
-
import { t as v } from "./picture-upload-
|
|
8
|
+
import { t as g } from "./file-upload-CdzTspvH.js";
|
|
9
|
+
import { r as _ } from "./use-multiple-file-upload-DoEljuzF.js";
|
|
10
|
+
import { t as v } from "./picture-upload-By35hBTI.js";
|
|
11
11
|
import { Fragment as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as T, createTextVNode as E, createVNode as D, defineAsyncComponent as O, defineComponent as k, guardReactiveProps as A, h as j, isRef as M, mergeModels as N, mergeProps as P, nextTick as ee, normalizeClass as F, normalizeProps as te, normalizeStyle as I, onUnmounted as L, openBlock as R, reactive as ne, ref as z, renderList as B, renderSlot as V, resolveComponent as re, resolveDirective as H, resolveDynamicComponent as ie, shallowReactive as U, toDisplayString as W, toHandlers as ae, toValue as oe, unref as G, useModel as se, useSlots as ce, vModelSelect as K, vModelText as le, watch as q, withCtx as J, withDirectives as ue, withKeys as de, withModifiers as fe } from "vue";
|
|
12
12
|
import { ElButton as Y, ElCard as X, ElCascader as pe, ElCheckbox as me, ElCheckboxGroup as he, ElCol as ge, ElDatePicker as _e, ElDrawer as ve, ElDropdown as ye, ElDropdownItem as be, ElDropdownMenu as xe, ElForm as Se, ElFormItem as Ce, ElIcon as Z, ElImageViewer as we, ElInput as Te, ElInputNumber as Ee, ElMessage as Q, ElMessageBox as De, ElOption as $, ElPagination as Oe, ElPopover as ke, ElProgress as Ae, ElRadio as je, ElRadioGroup as Me, ElRow as Ne, ElSelect as Pe, ElSelectV2 as Fe, ElSwitch as Ie, ElTabPane as Le, ElTable as Re, ElTableColumn as ze, ElTableV2 as Be, ElTabs as Ve, ElTooltip as He, ElUpload as Ue, TableV2FixedDir as We } from "element-plus";
|
|
13
13
|
import Ge from "dayjs";
|
|
14
14
|
import Ke from "dayjs/plugin/timezone.js";
|
|
15
15
|
import qe from "dayjs/plugin/utc.js";
|
|
16
|
-
import { ArrowDown as Je, ArrowRight as Ye, ArrowUp as Xe, ChatDotRound as Ze, Check as Qe, Close as $e, CopyDocument as et, Delete as tt, Download as nt, FullScreen as rt,
|
|
17
|
-
import { useClipboard as
|
|
18
|
-
import { VueDraggable as
|
|
19
|
-
import { keepPreviousData as
|
|
20
|
-
import { AlignCenter as
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import { Table as
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import { BackgroundColor as
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import { EditorContent as
|
|
16
|
+
import { ArrowDown as Je, ArrowRight as Ye, ArrowUp as Xe, ChatDotRound as Ze, Check as Qe, Close as $e, CopyDocument as et, Delete as tt, Download as nt, FullScreen as rt, Loading as it, Menu as at, Plus as ot, Rank as st, Refresh as ct, ScaleToOriginal as lt, Search as ut, Setting as dt, SuccessFilled as ft, WarningFilled as pt, ZoomIn as mt } from "@element-plus/icons-vue";
|
|
17
|
+
import { useClipboard as ht, useElementSize as gt } from "@vueuse/core";
|
|
18
|
+
import { VueDraggable as _t } from "vue-draggable-plus";
|
|
19
|
+
import { keepPreviousData as vt, useQuery as yt } from "@tanstack/vue-query";
|
|
20
|
+
import { AlignCenter as bt, AlignJustify as xt, AlignLeft as St, AlignRight as Ct, Bold as wt, Code2 as Tt, Eraser as Et, Highlighter as Dt, ImageIcon as Ot, IndentDecrease as kt, IndentIncrease as At, Italic as jt, Languages as Mt, Link2 as Nt, List as Pt, ListOrdered as Ft, Maximize2 as It, Minimize2 as Lt, Palette as Rt, Quote as zt, Redo2 as Bt, Strikethrough as Vt, Table2 as Ht, Underline as Ut, Undo2 as Wt } from "lucide-vue-next";
|
|
21
|
+
import Gt from "@tiptap/extension-color";
|
|
22
|
+
import Kt from "@tiptap/extension-font-family";
|
|
23
|
+
import qt from "@tiptap/extension-highlight";
|
|
24
|
+
import Jt from "@tiptap/extension-image";
|
|
25
|
+
import Yt from "@tiptap/extension-link";
|
|
26
|
+
import Xt from "@tiptap/extension-placeholder";
|
|
27
|
+
import { Table as Zt } from "@tiptap/extension-table";
|
|
28
|
+
import Qt from "@tiptap/extension-table-cell";
|
|
29
|
+
import $t from "@tiptap/extension-table-header";
|
|
30
|
+
import en from "@tiptap/extension-table-row";
|
|
31
|
+
import tn from "@tiptap/extension-text-align";
|
|
32
|
+
import { BackgroundColor as nn, FontSize as rn, LineHeight as an, TextStyle as on } from "@tiptap/extension-text-style";
|
|
33
|
+
import sn from "@tiptap/extension-underline";
|
|
34
|
+
import cn from "@tiptap/starter-kit";
|
|
35
|
+
import { EditorContent as ln, useEditor as un } from "@tiptap/vue-3";
|
|
36
36
|
// src/assets/svgs/more-dot.svg
|
|
37
|
-
var
|
|
37
|
+
var dn = "data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.75%205.875C2.75%206.35825%202.35825%206.75%201.875%206.75C1.39175%206.75%201%206.35825%201%205.875C1%205.39175%201.39175%205%201.875%205C2.35825%205%202.75%205.39175%202.75%205.875Z'%20fill='%232B2F36'/%3e%3cpath%20d='M6.86269%205.875C6.86269%206.35825%206.47094%206.75%205.98769%206.75C5.50444%206.75%205.11269%206.35825%205.11269%205.875C5.11269%205.39175%205.50444%205%205.98769%205C6.47094%205%206.86269%205.39175%206.86269%205.875Z'%20fill='%232B2F36'/%3e%3cpath%20d='M11%205.875C11%206.35825%2010.6082%206.75%2010.125%206.75C9.64175%206.75%209.25%206.35825%209.25%205.875C9.25%205.39175%209.64175%205%2010.125%205C10.6082%205%2011%205.39175%2011%205.875Z'%20fill='%232B2F36'/%3e%3c/svg%3e";
|
|
38
38
|
// src/runtime/access.ts
|
|
39
|
-
function
|
|
39
|
+
function fn() {
|
|
40
40
|
return { hasAccessByCodes(e) {
|
|
41
41
|
return o().value(e);
|
|
42
42
|
} };
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function pn() {
|
|
45
45
|
return { get accessToken() {
|
|
46
46
|
return i();
|
|
47
47
|
} };
|
|
48
48
|
}
|
|
49
49
|
Ge.extend(qe), Ge.extend(Ke), Ge.tz.setDefault(Ge.tz.guess());
|
|
50
|
-
var
|
|
51
|
-
function
|
|
52
|
-
return Number.isFinite(e) && Math.abs(e) <
|
|
50
|
+
var mn = 1e11;
|
|
51
|
+
function hn(e) {
|
|
52
|
+
return Number.isFinite(e) && Math.abs(e) < mn ? e * 1e3 : e;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
if (typeof e == "number") return
|
|
54
|
+
function gn(e) {
|
|
55
|
+
if (typeof e == "number") return hn(e);
|
|
56
56
|
if (typeof e == "string") {
|
|
57
57
|
let t = e.trim();
|
|
58
|
-
if (/^-?\d+(?:\.\d+)?$/.test(t)) return
|
|
58
|
+
if (/^-?\d+(?:\.\d+)?$/.test(t)) return hn(Number(t));
|
|
59
59
|
}
|
|
60
60
|
return e;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function _n(e, t = "YYYY-MM-DD") {
|
|
63
63
|
if (e == null || e === "") return "";
|
|
64
64
|
if (typeof e != "number" && typeof e != "string" && !(e instanceof Date) && !Ge.isDayjs(e)) return String(e);
|
|
65
|
-
let n = Ge.isDayjs(e) ? e : Ge(
|
|
65
|
+
let n = Ge.isDayjs(e) ? e : Ge(gn(e));
|
|
66
66
|
return n.isValid() ? n.tz().format(t) : String(e ?? "");
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
68
|
+
function vn(e) {
|
|
69
|
+
return _n(e, "YYYY-MM-DD HH:mm:ss");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function yn({ fileName: e = "download", source: t }) {
|
|
72
72
|
if (!(t instanceof Blob)) throw TypeError("Invalid Blob data.");
|
|
73
73
|
let n = URL.createObjectURL(t), r = document.createElement("a");
|
|
74
74
|
r.href = n, r.download = e, r.style.display = "none", document.body.append(r), r.click(), r.remove(), URL.revokeObjectURL(n);
|
|
75
75
|
}
|
|
76
76
|
// src/runtime/request.ts
|
|
77
|
-
function
|
|
77
|
+
function bn() {
|
|
78
78
|
let e = d();
|
|
79
79
|
if (!e) throw Error("请先调用 setupDisguise,并传入 request");
|
|
80
80
|
return e;
|
|
81
81
|
}
|
|
82
|
-
var
|
|
82
|
+
var xn = {
|
|
83
83
|
getBaseUrl() {
|
|
84
84
|
return d()?.getBaseUrl() ?? "";
|
|
85
85
|
},
|
|
86
86
|
download(e, t) {
|
|
87
|
-
return
|
|
87
|
+
return bn().download(e, t);
|
|
88
88
|
},
|
|
89
89
|
upload(e, t, n) {
|
|
90
|
-
return
|
|
90
|
+
return bn().upload(e, t, n);
|
|
91
91
|
}
|
|
92
|
-
},
|
|
92
|
+
}, Sn = { class: "import-dialog__header" }, Cn = { class: "import-dialog__title" }, wn = { class: "import-dialog__header-actions" }, Tn = { class: "import-dialog" }, En = {
|
|
93
93
|
key: 0,
|
|
94
94
|
class: "import-dialog__steps"
|
|
95
|
-
},
|
|
95
|
+
}, Dn = { key: 1 }, On = { class: "import-dialog__step-label" }, kn = { class: "import-dialog__form-label" }, An = {
|
|
96
|
+
key: 0,
|
|
97
|
+
class: "import-dialog__desc"
|
|
98
|
+
}, jn = { class: "import-dialog__upload-inner" }, Mn = { class: "import-dialog__upload-icon" }, Nn = { class: "import-dialog__upload-title" }, Pn = { class: "import-dialog__upload-link" }, Fn = { class: "import-dialog__upload-subtitle" }, In = {
|
|
96
99
|
key: 0,
|
|
97
100
|
class: "import-dialog__upload-name"
|
|
98
101
|
}, Ln = { class: "import-dialog__download" }, Rn = { class: "import-dialog__tips" }, zn = { class: "import-dialog__preview-header" }, Bn = { class: "import-dialog__preview-field" }, Vn = { class: "import-dialog__form-label" }, Hn = { class: "import-dialog__preview-field" }, Un = { class: "import-dialog__form-label" }, Wn = { class: "import-dialog__preview-summary" }, Gn = { class: "import-dialog__mapping-header" }, Kn = { class: "import-dialog__mapping-body" }, qn = { class: "import-dialog__mapping-arrow" }, Jn = { class: "import-dialog__mapping-checkbox" }, Yn = { class: "import-dialog__result-badge" }, Xn = { class: "import-dialog__result-title" }, Zn = { class: "import-dialog__result-description" }, Qn = {
|
|
@@ -115,6 +118,8 @@ var Sn = {
|
|
|
115
118
|
maxSize: { default: 5 },
|
|
116
119
|
maxPreviewCount: { default: 100 },
|
|
117
120
|
tips: { default: void 0 },
|
|
121
|
+
importDesc: { default: "" },
|
|
122
|
+
skipSteps: { default: () => [] },
|
|
118
123
|
targetFields: { default: () => [] },
|
|
119
124
|
parseFile: {
|
|
120
125
|
type: Function,
|
|
@@ -141,66 +146,75 @@ var Sn = {
|
|
|
141
146
|
setup(e, { emit: t }) {
|
|
142
147
|
let n = e, i = t, [a, o] = r({ onOpenChange: (e) => {
|
|
143
148
|
e !== n.modelValue && i("update:modelValue", e);
|
|
144
|
-
} }), s = z(), c = z("upload"), l = z(n.defaultMode), d = z(null), f = z(""), p = z([]), m = z(""), h = z([]), g = z([]), _ = z(0), v = z([]), T = z(!1), O = z(!1), k = z(!1), A = z(0), j = z(""), M = z(null), N = z(0), P = b(() => n.title || u("components.importDialog.title")), ee = b(() => !!n.api), te = b(() => n.
|
|
145
|
-
label: u("components.importDialog.modeCreate"),
|
|
146
|
-
value: "create"
|
|
147
|
-
}, {
|
|
148
|
-
label: u("components.importDialog.modeUpdate"),
|
|
149
|
-
value: "update"
|
|
150
|
-
}]), I = b(() => n.tips?.length ? n.tips : [
|
|
149
|
+
} }), s = z(), c = z("upload"), l = z(n.defaultMode), d = z(null), f = z(""), p = z([]), m = z(""), h = z([]), g = z([]), _ = z(0), v = z([]), T = z(!1), O = z(!1), k = z(!1), A = z(0), j = z(""), M = z(null), N = z(0), P = b(() => n.title || u("components.importDialog.title")), ee = b(() => !!n.api), te = b(() => n.tips?.length ? n.tips : [
|
|
151
150
|
u("components.importDialog.tipSize", { size: n.maxSize }),
|
|
152
151
|
u("components.importDialog.tipHeader"),
|
|
153
152
|
u("components.importDialog.tipFormula"),
|
|
154
153
|
u("components.importDialog.tipArea"),
|
|
155
154
|
u("components.importDialog.tipRelation")
|
|
156
|
-
]),
|
|
155
|
+
]), I = b(() => n.accept.join(",")), L = b(() => n.accept.map((e) => e.replace(/^\./, "").toUpperCase()).join("、")), ne = b(() => M.value !== null), re = b(() => !ne.value && !ee.value), ie = b(() => u("components.importDialog.previewSummary", {
|
|
157
156
|
total: _.value,
|
|
158
157
|
count: Math.min(g.value.length, n.maxPreviewCount)
|
|
159
158
|
})), U = b(() => f.value || d.value?.name || ""), ae = b(() => h.value.map((e) => ({
|
|
160
159
|
label: e.label,
|
|
161
160
|
value: e.label
|
|
162
|
-
}))), oe = b(() => j.value || u("components.importDialog.importingProgress", { progress: A.value })), se = b(() => M.value ? M.value.title ? M.value.title : M.value.success ? u("components.importDialog.successTitle") : u("components.importDialog.errorTitle") : ""), ce = b(() => M.value ? M.value.description ? M.value.description : M.value.success ? u("components.importDialog.successDescription") : u("components.importDialog.errorDescription") : ""), K = b(() => [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
161
|
+
}))), oe = b(() => j.value || u("components.importDialog.importingProgress", { progress: A.value })), se = b(() => M.value ? M.value.title ? M.value.title : M.value.success ? u("components.importDialog.successTitle") : u("components.importDialog.errorTitle") : ""), ce = b(() => M.value ? M.value.description ? M.value.description : M.value.success ? u("components.importDialog.successDescription") : u("components.importDialog.errorDescription") : ""), K = b(() => n.skipSteps.includes("preview")), le = b(() => n.skipSteps.includes("mapping")), de = b(() => [
|
|
162
|
+
{
|
|
163
|
+
key: "upload",
|
|
164
|
+
label: u("components.importDialog.stepUpload")
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
key: "preview",
|
|
168
|
+
label: u("components.importDialog.stepPreview")
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
key: "mapping",
|
|
172
|
+
label: u("components.importDialog.stepMapping")
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
key: "import",
|
|
176
|
+
label: u("components.importDialog.stepImport")
|
|
177
|
+
}
|
|
178
|
+
].filter((e) => !(e.key === "preview" && K.value || e.key === "mapping" && le.value))), fe = b(() => {
|
|
179
|
+
let e = c.value === "importing" ? "import" : c.value, t = de.value.findIndex((t) => t.key === e);
|
|
180
|
+
return t === -1 ? 0 : t;
|
|
181
|
+
}), X = b(() => c.value === "mapping" ? !0 : c.value === "preview" ? le.value : c.value === "upload" ? ee.value || K.value && le.value : !1);
|
|
168
182
|
q(() => n.modelValue, (e, t) => {
|
|
169
|
-
e ? (l.value = n.defaultMode, o.open()) : (o.close(), k.value = !1, o.setState({ fullscreen: !1 }), t && n.resetOnClose &&
|
|
183
|
+
e ? (l.value = n.defaultMode, o.open()) : (o.close(), k.value = !1, o.setState({ fullscreen: !1 }), t && n.resetOnClose && pe());
|
|
170
184
|
}, { immediate: !0 });
|
|
171
|
-
function
|
|
185
|
+
function pe() {
|
|
172
186
|
N.value += 1, c.value = "upload", d.value = null, f.value = "", p.value = [], m.value = "", h.value = [], g.value = [], _.value = 0, v.value = [], T.value = !1, O.value = !1, A.value = 0, j.value = "", M.value = null, s.value?.clearFiles();
|
|
173
187
|
}
|
|
174
|
-
function
|
|
188
|
+
function he() {
|
|
175
189
|
p.value = [], m.value = "", h.value = [], g.value = [], _.value = 0, v.value = [], M.value = null;
|
|
176
190
|
}
|
|
177
|
-
function
|
|
178
|
-
|
|
191
|
+
function ge() {
|
|
192
|
+
ne.value || i("cancel"), i("update:modelValue", !1);
|
|
179
193
|
}
|
|
180
|
-
function
|
|
194
|
+
function _e() {
|
|
181
195
|
k.value = !k.value, o.setState({ fullscreen: k.value });
|
|
182
196
|
}
|
|
183
|
-
async function
|
|
197
|
+
async function ve() {
|
|
184
198
|
if (!n.templateUrl) i("downloadTemplate");
|
|
185
199
|
else try {
|
|
186
|
-
let e = await
|
|
200
|
+
let e = await xn.download(ye(n.templateUrl), {
|
|
187
201
|
method: n.templateMethod,
|
|
188
202
|
responseReturn: "raw"
|
|
189
203
|
});
|
|
190
|
-
|
|
191
|
-
fileName:
|
|
204
|
+
yn({
|
|
205
|
+
fileName: xe(be(e.headers, "content-disposition"), n.templateName || "import-template.xlsx"),
|
|
192
206
|
source: e.data
|
|
193
207
|
});
|
|
194
208
|
} catch (e) {
|
|
195
|
-
Q.error(
|
|
209
|
+
Q.error(Se(e, u("components.importDialog.templateDownloadError")));
|
|
196
210
|
}
|
|
197
211
|
}
|
|
198
|
-
function
|
|
212
|
+
function ye(e) {
|
|
199
213
|
if (/^https?:\/\//i.test(e)) return e;
|
|
200
|
-
let t =
|
|
214
|
+
let t = xn.getBaseUrl() || "", n = (/^https?:\/\//i.test(t) ? new URL(t).pathname : t.split(/[?#]/, 1)[0] ?? "").replace(/\/+$/, "");
|
|
201
215
|
return n && n !== "/" && (e === n || e.startsWith(`${n}/`)) ? e.slice(n.length) || "/" : e;
|
|
202
216
|
}
|
|
203
|
-
function
|
|
217
|
+
function be(e, t) {
|
|
204
218
|
if (typeof e.get == "function") {
|
|
205
219
|
let n = e.get(t);
|
|
206
220
|
return typeof n == "string" ? n : void 0;
|
|
@@ -208,23 +222,23 @@ var Sn = {
|
|
|
208
222
|
let n = e[t];
|
|
209
223
|
return typeof n == "string" ? n : void 0;
|
|
210
224
|
}
|
|
211
|
-
function
|
|
225
|
+
function xe(e, t) {
|
|
212
226
|
let n = e?.match(/filename\*=UTF-8''([^;]+)/i)?.[1];
|
|
213
227
|
return n ? decodeURIComponent(n.replace(/^["']|["']$/g, "")) : e?.match(/filename="?([^";]+)"?/i)?.[1] || t;
|
|
214
228
|
}
|
|
215
|
-
function
|
|
229
|
+
function Se(e, t) {
|
|
216
230
|
return e instanceof Error && e.message ? e.message : t;
|
|
217
231
|
}
|
|
218
|
-
function
|
|
232
|
+
function Ce(e) {
|
|
219
233
|
if (e.size / 1024 / 1024 > n.maxSize) return Q.error(u("components.importDialog.fileSizeExceeded", { size: n.maxSize })), !1;
|
|
220
234
|
if (!n.accept.length) return !0;
|
|
221
235
|
let t = e.name.toLowerCase(), r = e.type.toLowerCase();
|
|
222
236
|
return n.accept.some((e) => {
|
|
223
237
|
let n = e.toLowerCase();
|
|
224
238
|
return n.startsWith(".") ? t.endsWith(n) : r === n;
|
|
225
|
-
}) ? !0 : (Q.error(u("components.importDialog.fileTypeInvalid", { types:
|
|
239
|
+
}) ? !0 : (Q.error(u("components.importDialog.fileTypeInvalid", { types: L.value })), !1);
|
|
226
240
|
}
|
|
227
|
-
function
|
|
241
|
+
function we(e) {
|
|
228
242
|
let t = new Map((e ?? []).map((e) => [e.targetField, e]));
|
|
229
243
|
return n.targetFields.map((e) => {
|
|
230
244
|
let n = t.get(e.field);
|
|
@@ -238,22 +252,16 @@ var Sn = {
|
|
|
238
252
|
};
|
|
239
253
|
});
|
|
240
254
|
}
|
|
241
|
-
function
|
|
255
|
+
function Ee(e) {
|
|
242
256
|
let t = e && typeof e == "object" ? e : {}, n = t.data && typeof t.data == "object" ? t.data : t, r = { success: typeof n.success == "boolean" ? n.success : t.success !== !1 };
|
|
243
257
|
return typeof n.title == "string" && (r.title = n.title), typeof n.description == "string" && (r.description = n.description), typeof n.detail == "string" ? r.detail = n.detail : typeof n.message == "string" ? r.detail = n.message : typeof n.msg == "string" && (r.detail = n.msg), typeof n.successCount == "number" && (r.successCount = n.successCount), typeof n.failureCount == "number" && (r.failureCount = n.failureCount), r;
|
|
244
258
|
}
|
|
245
|
-
function
|
|
246
|
-
f.value = e.fileName || d.value?.name || "", p.value = e.sheets, m.value = e.currentSheet || e.sheets[0]?.value || "", h.value = e.previewColumns, g.value = e.previewRows, _.value = e.total, v.value =
|
|
259
|
+
function De(e) {
|
|
260
|
+
f.value = e.fileName || d.value?.name || "", p.value = e.sheets, m.value = e.currentSheet || e.sheets[0]?.value || "", h.value = e.previewColumns, g.value = e.previewRows, _.value = e.total, v.value = we(e.mappings);
|
|
247
261
|
}
|
|
248
|
-
async function
|
|
249
|
-
if (!d.value)
|
|
250
|
-
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
if (!n.parseFile) {
|
|
254
|
-
Q.error(u("components.importDialog.parseFileMissing"));
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
262
|
+
async function Oe(e) {
|
|
263
|
+
if (!d.value) return Q.warning(u("components.importDialog.fileRequired")), !1;
|
|
264
|
+
if (!n.parseFile) return Q.error(u("components.importDialog.parseFileMissing")), !1;
|
|
257
265
|
let t = ++N.value;
|
|
258
266
|
T.value = !0;
|
|
259
267
|
try {
|
|
@@ -262,58 +270,69 @@ var Sn = {
|
|
|
262
270
|
mode: l.value,
|
|
263
271
|
sheet: e
|
|
264
272
|
});
|
|
265
|
-
|
|
266
|
-
Se(r), c.value = "preview";
|
|
273
|
+
return t === N.value && (De(r), !0);
|
|
267
274
|
} catch (e) {
|
|
268
|
-
if (t !== N.value) return;
|
|
275
|
+
if (t !== N.value) return !1;
|
|
269
276
|
let n = e instanceof Error ? e.message : u("components.importDialog.parseError");
|
|
270
|
-
Q.error(n);
|
|
277
|
+
return Q.error(n), !1;
|
|
271
278
|
} finally {
|
|
272
279
|
t === N.value && (T.value = !1);
|
|
273
280
|
}
|
|
274
281
|
}
|
|
275
|
-
function
|
|
282
|
+
function ke(e) {
|
|
276
283
|
let t = e.raw;
|
|
277
|
-
s.value?.clearFiles(), t &&
|
|
278
|
-
}
|
|
279
|
-
function Ee(e) {
|
|
280
|
-
typeof e == "string" && (l.value = e, de(), c.value = "upload");
|
|
284
|
+
s.value?.clearFiles(), t && Ce(t) && (d.value = t, f.value = t.name, c.value = "upload", he(), i("fileChange", t));
|
|
281
285
|
}
|
|
282
|
-
async function
|
|
283
|
-
e && d.value && await
|
|
286
|
+
async function je(e) {
|
|
287
|
+
e && d.value && await Oe(e);
|
|
284
288
|
}
|
|
285
|
-
function
|
|
289
|
+
function Me() {
|
|
286
290
|
let e = v.value.find((e) => e.required && !e.sourceColumn);
|
|
287
291
|
if (e) return Q.warning(u("components.importDialog.mappingRequired", { field: e.targetLabel })), !1;
|
|
288
292
|
let t = v.value.map((e) => e.sourceColumn).filter(Boolean);
|
|
289
293
|
return new Set(t).size === t.length || (Q.warning(u("components.importDialog.mappingDuplicate")), !1);
|
|
290
294
|
}
|
|
291
|
-
async function
|
|
295
|
+
async function Ne() {
|
|
292
296
|
if (c.value === "upload") {
|
|
293
297
|
if (ee.value) {
|
|
294
|
-
await
|
|
298
|
+
await Fe();
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
if (!await Oe()) return;
|
|
302
|
+
if (!K.value) {
|
|
303
|
+
c.value = "preview";
|
|
295
304
|
return;
|
|
296
305
|
}
|
|
297
|
-
|
|
298
|
-
|
|
306
|
+
if (!le.value) {
|
|
307
|
+
c.value = "mapping";
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
await Be();
|
|
311
|
+
} else if (c.value === "preview") {
|
|
312
|
+
if (le.value) {
|
|
313
|
+
await Be();
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
c.value = "mapping";
|
|
317
|
+
} else c.value === "mapping" && await Be();
|
|
299
318
|
}
|
|
300
|
-
async function
|
|
319
|
+
async function Fe() {
|
|
301
320
|
if (!d.value) Q.warning(u("components.importDialog.fileRequired"));
|
|
302
321
|
else if (!n.api) Q.error(u("components.importDialog.apiMissing"));
|
|
303
322
|
else {
|
|
304
323
|
c.value = "importing", O.value = !0, A.value = 8, j.value = u("components.importDialog.importingStart");
|
|
305
324
|
try {
|
|
306
|
-
let e =
|
|
325
|
+
let e = Ee(await xn.upload(ye(n.api), {
|
|
307
326
|
file: d.value,
|
|
308
327
|
mode: l.value
|
|
309
328
|
}, { onUploadProgress: (e) => {
|
|
310
|
-
e.total &&
|
|
329
|
+
e.total && Le(8 + Math.round(e.loaded / e.total * 84));
|
|
311
330
|
} }));
|
|
312
331
|
A.value = 100, M.value = e, e.success ? i("success", e) : i("error", e);
|
|
313
332
|
} catch (e) {
|
|
314
333
|
let t = {
|
|
315
334
|
success: !1,
|
|
316
|
-
detail:
|
|
335
|
+
detail: Se(e, u("components.importDialog.importError"))
|
|
317
336
|
};
|
|
318
337
|
A.value = 100, M.value = t, i("error", e instanceof Error ? e : t);
|
|
319
338
|
} finally {
|
|
@@ -321,16 +340,16 @@ var Sn = {
|
|
|
321
340
|
}
|
|
322
341
|
}
|
|
323
342
|
}
|
|
324
|
-
function
|
|
325
|
-
c.value === "mapping" ? c.value = "preview" : c.value === "preview" && (c.value = "upload");
|
|
343
|
+
function Ie() {
|
|
344
|
+
c.value === "mapping" ? c.value = K.value ? "upload" : "preview" : c.value === "preview" && (c.value = "upload");
|
|
326
345
|
}
|
|
327
|
-
function
|
|
346
|
+
function Le(e, t) {
|
|
328
347
|
A.value = Math.max(0, Math.min(100, Math.round(e))), t && (j.value = t);
|
|
329
348
|
}
|
|
330
|
-
async function
|
|
349
|
+
async function Be() {
|
|
331
350
|
if (!d.value) Q.warning(u("components.importDialog.fileRequired"));
|
|
332
|
-
else if (!m.value) Q.warning(u("components.importDialog.sheetRequired"));
|
|
333
|
-
else if (
|
|
351
|
+
else if (!K.value && !m.value) Q.warning(u("components.importDialog.sheetRequired"));
|
|
352
|
+
else if (le.value || Me()) {
|
|
334
353
|
c.value = "importing", O.value = !0, A.value = 8, j.value = u("components.importDialog.importingStart");
|
|
335
354
|
try {
|
|
336
355
|
if (!n.submitImport) throw Error(u("components.importDialog.submitImportMissing"));
|
|
@@ -339,7 +358,7 @@ var Sn = {
|
|
|
339
358
|
mode: l.value,
|
|
340
359
|
sheet: m.value,
|
|
341
360
|
mappings: v.value,
|
|
342
|
-
onProgress:
|
|
361
|
+
onProgress: Le
|
|
343
362
|
});
|
|
344
363
|
A.value = 100, M.value = e, e.success ? i("success", e) : i("error", e);
|
|
345
364
|
} catch (e) {
|
|
@@ -353,24 +372,24 @@ var Sn = {
|
|
|
353
372
|
}
|
|
354
373
|
}
|
|
355
374
|
}
|
|
356
|
-
return (
|
|
357
|
-
let
|
|
375
|
+
return (t, n) => {
|
|
376
|
+
let r = H("loading");
|
|
358
377
|
return R(), x(G(a), {
|
|
359
378
|
title: P.value,
|
|
360
|
-
class: "import-dialog__dialog
|
|
379
|
+
class: "import-dialog__dialog",
|
|
361
380
|
closable: !1,
|
|
362
381
|
"close-on-click-modal": !1,
|
|
363
382
|
"close-on-press-escape": !O.value,
|
|
364
383
|
"fullscreen-button": !1
|
|
365
384
|
}, {
|
|
366
|
-
title: J(() => [w("div",
|
|
385
|
+
title: J(() => [w("div", Sn, [w("div", Cn, W(P.value), 1), w("div", wn, [D(G(Y), {
|
|
367
386
|
text: "",
|
|
368
387
|
circle: "",
|
|
369
388
|
class: "import-dialog__action",
|
|
370
|
-
onClick:
|
|
389
|
+
onClick: _e
|
|
371
390
|
}, {
|
|
372
391
|
default: J(() => [D(G(Z), { size: 16 }, {
|
|
373
|
-
default: J(() => [k.value ? (R(), x(G(
|
|
392
|
+
default: J(() => [k.value ? (R(), x(G(lt), { key: 0 })) : (R(), x(G(rt), { key: 1 }))]),
|
|
374
393
|
_: 1
|
|
375
394
|
})]),
|
|
376
395
|
_: 1
|
|
@@ -378,7 +397,7 @@ var Sn = {
|
|
|
378
397
|
text: "",
|
|
379
398
|
circle: "",
|
|
380
399
|
class: "import-dialog__action",
|
|
381
|
-
onClick:
|
|
400
|
+
onClick: ge
|
|
382
401
|
}, {
|
|
383
402
|
default: J(() => [D(G(Z), { size: 16 }, {
|
|
384
403
|
default: J(() => [D(G($e))]),
|
|
@@ -386,70 +405,50 @@ var Sn = {
|
|
|
386
405
|
})]),
|
|
387
406
|
_: 1
|
|
388
407
|
})])])]),
|
|
389
|
-
footer: J(() => [w("div", ir, [c.value === "preview" || c.value === "mapping" ? (R(), C(y, { key: 0 }, [D(G(Y), { onClick:
|
|
408
|
+
footer: J(() => [w("div", ir, [c.value === "preview" || c.value === "mapping" ? (R(), C(y, { key: 0 }, [D(G(Y), { onClick: Ie }, {
|
|
390
409
|
default: J(() => [E(W(G(u)("components.importDialog.previous")), 1)]),
|
|
391
410
|
_: 1
|
|
392
411
|
}), D(G(Y), {
|
|
393
412
|
type: "primary",
|
|
394
413
|
loading: T.value || O.value,
|
|
395
|
-
onClick:
|
|
414
|
+
onClick: Ne
|
|
396
415
|
}, {
|
|
397
|
-
default: J(() => [E(W(
|
|
416
|
+
default: J(() => [E(W(X.value ? G(u)("components.importDialog.startImport") : G(u)("components.importDialog.next")), 1)]),
|
|
398
417
|
_: 1
|
|
399
418
|
}, 8, ["loading"])], 64)) : c.value === "upload" ? (R(), x(G(Y), {
|
|
400
419
|
key: 1,
|
|
401
420
|
type: "primary",
|
|
402
421
|
loading: T.value || O.value,
|
|
403
|
-
onClick:
|
|
422
|
+
onClick: Ne
|
|
404
423
|
}, {
|
|
405
|
-
default: J(() => [E(W(
|
|
424
|
+
default: J(() => [E(W(X.value ? G(u)("components.importDialog.startImport") : G(u)("components.importDialog.next")), 1)]),
|
|
406
425
|
_: 1
|
|
407
426
|
}, 8, ["loading"])) : (R(), x(G(Y), {
|
|
408
427
|
key: 2,
|
|
409
|
-
onClick:
|
|
428
|
+
onClick: ge
|
|
410
429
|
}, {
|
|
411
430
|
default: J(() => [E(W(G(u)("common.close")), 1)]),
|
|
412
431
|
_: 1
|
|
413
432
|
}))])]),
|
|
414
|
-
default: J(() => [w("div",
|
|
415
|
-
key: e,
|
|
433
|
+
default: J(() => [w("div", Tn, [re.value ? (R(), C("div", En, [(R(!0), C(y, null, B(de.value, (e, t) => (R(), C("div", {
|
|
434
|
+
key: e.key,
|
|
416
435
|
class: "import-dialog__step"
|
|
417
436
|
}, [
|
|
418
437
|
w("div", { class: F(["import-dialog__step-node", {
|
|
419
|
-
"is-active":
|
|
420
|
-
"is-done":
|
|
421
|
-
}]) }, [
|
|
438
|
+
"is-active": t === fe.value,
|
|
439
|
+
"is-done": t < fe.value
|
|
440
|
+
}]) }, [t < fe.value ? (R(), x(G(Z), { key: 0 }, {
|
|
422
441
|
default: J(() => [D(G(Qe))]),
|
|
423
442
|
_: 1
|
|
424
|
-
})) : (R(), C("span",
|
|
425
|
-
w("div",
|
|
426
|
-
t ===
|
|
443
|
+
})) : (R(), C("span", Dn, W(t + 1), 1))], 2),
|
|
444
|
+
w("div", On, W(e.label), 1),
|
|
445
|
+
t === de.value.length - 1 ? S("", !0) : (R(), C("div", {
|
|
427
446
|
key: 0,
|
|
428
|
-
class: F(["import-dialog__step-line", { "is-active":
|
|
447
|
+
class: F(["import-dialog__step-line", { "is-active": t < fe.value }])
|
|
429
448
|
}, null, 2))
|
|
430
449
|
]))), 128))])) : S("", !0), c.value === "upload" ? (R(), C(y, { key: 1 }, [
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
default: J(() => [D(G(it))]),
|
|
434
|
-
_: 1
|
|
435
|
-
})]),
|
|
436
|
-
_: 1
|
|
437
|
-
}, 8, ["content"])]),
|
|
438
|
-
D(G(Me), {
|
|
439
|
-
"model-value": l.value,
|
|
440
|
-
class: "import-dialog__mode-group",
|
|
441
|
-
"onUpdate:modelValue": Ee
|
|
442
|
-
}, {
|
|
443
|
-
default: J(() => [(R(!0), C(y, null, B(te.value, (e) => (R(), x(G(je), {
|
|
444
|
-
key: e.value,
|
|
445
|
-
label: e.value,
|
|
446
|
-
disabled: e.disabled
|
|
447
|
-
}, {
|
|
448
|
-
default: J(() => [E(W(e.label), 1)]),
|
|
449
|
-
_: 2
|
|
450
|
-
}, 1032, ["label", "disabled"]))), 128))]),
|
|
451
|
-
_: 1
|
|
452
|
-
}, 8, ["model-value"]),
|
|
450
|
+
V(t.$slots, "desc-title", {}, () => [w("div", kn, W(G(u)("components.importDialog.descLabel")), 1)], !0),
|
|
451
|
+
V(t.$slots, "desc-content", {}, () => [e.importDesc ? (R(), C("div", An, W(e.importDesc), 1)) : S("", !0)], !0),
|
|
453
452
|
D(G(Ue), {
|
|
454
453
|
ref_key: "uploadRef",
|
|
455
454
|
ref: s,
|
|
@@ -457,16 +456,16 @@ var Sn = {
|
|
|
457
456
|
drag: "",
|
|
458
457
|
"auto-upload": !1,
|
|
459
458
|
"show-file-list": !1,
|
|
460
|
-
accept:
|
|
461
|
-
"on-change":
|
|
459
|
+
accept: I.value,
|
|
460
|
+
"on-change": ke
|
|
462
461
|
}, {
|
|
463
462
|
default: J(() => [w("div", jn, [
|
|
464
463
|
w("div", Mn, [D(G(Z), { size: 20 }, {
|
|
465
|
-
default: J(() => [D(G(
|
|
464
|
+
default: J(() => [D(G(ot))]),
|
|
466
465
|
_: 1
|
|
467
466
|
})]),
|
|
468
467
|
w("div", Nn, [E(W(G(u)("components.importDialog.uploadPlaceholder")) + " ", 1), w("span", Pn, W(G(u)("components.importDialog.selectUpload")), 1)]),
|
|
469
|
-
w("div", Fn, W(G(u)("components.importDialog.supportedTypes", { types:
|
|
468
|
+
w("div", Fn, W(G(u)("components.importDialog.supportedTypes", { types: L.value })), 1),
|
|
470
469
|
U.value ? (R(), C("div", In, W(U.value), 1)) : S("", !0)
|
|
471
470
|
])]),
|
|
472
471
|
_: 1
|
|
@@ -480,10 +479,10 @@ var Sn = {
|
|
|
480
479
|
w("button", {
|
|
481
480
|
type: "button",
|
|
482
481
|
class: "import-dialog__download-button",
|
|
483
|
-
onClick:
|
|
482
|
+
onClick: ve
|
|
484
483
|
}, W(G(u)("components.importDialog.downloadTemplate")), 1)
|
|
485
484
|
]),
|
|
486
|
-
w("div", Rn, [(R(!0), C(y, null, B(
|
|
485
|
+
w("div", Rn, [(R(!0), C(y, null, B(te.value, (e) => (R(), C("div", {
|
|
487
486
|
key: e,
|
|
488
487
|
class: "import-dialog__tip-item"
|
|
489
488
|
}, W(e), 1))), 128))])
|
|
@@ -493,10 +492,10 @@ var Sn = {
|
|
|
493
492
|
readonly: ""
|
|
494
493
|
}, null, 8, ["model-value"])]), w("div", Hn, [w("div", Un, W(G(u)("components.importDialog.sheetLabel")), 1), D(G(Pe), {
|
|
495
494
|
modelValue: m.value,
|
|
496
|
-
"onUpdate:modelValue":
|
|
495
|
+
"onUpdate:modelValue": n[0] ||= (e) => m.value = e,
|
|
497
496
|
class: "import-dialog__sheet-select",
|
|
498
497
|
disabled: T.value,
|
|
499
|
-
onChange:
|
|
498
|
+
onChange: je
|
|
500
499
|
}, {
|
|
501
500
|
default: J(() => [(R(!0), C(y, null, B(p.value, (e) => (R(), x(G($), {
|
|
502
501
|
key: e.value,
|
|
@@ -525,11 +524,11 @@ var Sn = {
|
|
|
525
524
|
"min-width"
|
|
526
525
|
]))), 128))]),
|
|
527
526
|
_: 1
|
|
528
|
-
}, 8, ["data"])), [[
|
|
527
|
+
}, 8, ["data"])), [[r, T.value]]),
|
|
529
528
|
w("div", Wn, W(ie.value), 1)
|
|
530
529
|
], 64)) : c.value === "mapping" ? (R(), C(y, { key: 3 }, [w("div", Gn, [
|
|
531
530
|
w("div", null, W(G(u)("components.importDialog.mappingExcelColumn")), 1),
|
|
532
|
-
|
|
531
|
+
n[1] ||= w("div", null, null, -1),
|
|
533
532
|
w("div", null, W(G(u)("components.importDialog.mappingTargetField")), 1),
|
|
534
533
|
w("div", null, W(G(u)("components.importDialog.mappingDuplicateLabel")), 1)
|
|
535
534
|
]), w("div", Kn, [(R(!0), C(y, null, B(v.value, (e) => (R(), C("div", {
|
|
@@ -567,15 +566,15 @@ var Sn = {
|
|
|
567
566
|
"onUpdate:modelValue",
|
|
568
567
|
"disabled"
|
|
569
568
|
])])
|
|
570
|
-
]))), 128))])], 64)) :
|
|
569
|
+
]))), 128))])], 64)) : ne.value ? (R(), C(y, { key: 4 }, [
|
|
571
570
|
w("div", { class: F(["import-dialog__result-illustration", {
|
|
572
571
|
"is-success": M.value?.success,
|
|
573
572
|
"is-error": !M.value?.success
|
|
574
|
-
}]) }, [
|
|
575
|
-
default: J(() => [D(G(
|
|
573
|
+
}]) }, [n[2] ||= w("div", { class: "import-dialog__result-card" }, [w("div", { class: "import-dialog__result-layer" }), w("div", { class: "import-dialog__result-layer is-front" })], -1), w("div", Yn, [M.value?.success ? (R(), x(G(Z), { key: 0 }, {
|
|
574
|
+
default: J(() => [D(G(ft))]),
|
|
576
575
|
_: 1
|
|
577
576
|
})) : (R(), x(G(Z), { key: 1 }, {
|
|
578
|
-
default: J(() => [D(G(
|
|
577
|
+
default: J(() => [D(G(pt))]),
|
|
579
578
|
_: 1
|
|
580
579
|
}))])], 2),
|
|
581
580
|
w("div", Xn, W(se.value), 1),
|
|
@@ -588,18 +587,18 @@ var Sn = {
|
|
|
588
587
|
"show-text": !1,
|
|
589
588
|
color: "var(--color-success)"
|
|
590
589
|
}, null, 8, ["percentage"]), w("div", er, [D(G(Z), { color: "var(--color-success)" }, {
|
|
591
|
-
default: J(() => [D(G(
|
|
590
|
+
default: J(() => [D(G(ft))]),
|
|
592
591
|
_: 1
|
|
593
592
|
})])]),
|
|
594
593
|
w("div", tr, W(G(u)("components.importDialog.importingTitle")), 1),
|
|
595
594
|
w("div", nr, W(oe.value), 1),
|
|
596
595
|
w("div", rr, W(G(u)("components.importDialog.importingHint")), 1)
|
|
597
596
|
], 64)) : S("", !0)])]),
|
|
598
|
-
_:
|
|
597
|
+
_: 3
|
|
599
598
|
}, 8, ["title", "close-on-press-escape"]);
|
|
600
599
|
};
|
|
601
600
|
}
|
|
602
|
-
}), [["__scopeId", "data-v-
|
|
601
|
+
}), [["__scopeId", "data-v-4cbcfa82"]]), or = { class: "column-settings-panel" }, sr = { class: "column-settings-panel__header" }, cr = { class: "column-settings-panel__title" }, lr = { class: "column-settings-panel__list" }, ur = { class: "column-settings-panel__head" }, dr = { class: "column-settings-panel__drag-handle" }, fr = { class: "column-settings-panel__label" }, pr = { class: "column-settings-panel__footer" }, mr = { class: "column-settings-panel__count" }, hr = /*#__PURE__*/ f(/* @__PURE__ */ k({
|
|
603
602
|
__name: "ColumnSettingsPanel",
|
|
604
603
|
props: {
|
|
605
604
|
settings: {},
|
|
@@ -650,7 +649,7 @@ var Sn = {
|
|
|
650
649
|
w("span", null, W(G(u)("components.tableEntity.headerAlign")), 1),
|
|
651
650
|
w("span", null, W(G(u)("components.tableEntity.contentAlign")), 1),
|
|
652
651
|
w("span", null, W(G(u)("components.tableEntity.fixedColumn")), 1)
|
|
653
|
-
]), D(G(
|
|
652
|
+
]), D(G(_t), {
|
|
654
653
|
modelValue: i.value,
|
|
655
654
|
"onUpdate:modelValue": t[0] ||= (e) => i.value = e,
|
|
656
655
|
animation: 200,
|
|
@@ -663,7 +662,7 @@ var Sn = {
|
|
|
663
662
|
class: F(["column-settings-panel__item", { "column-settings-panel__item--hidden": !e.visible }])
|
|
664
663
|
}, [
|
|
665
664
|
w("span", dr, [D(G(Z), null, {
|
|
666
|
-
default: J(() => [D(G(
|
|
665
|
+
default: J(() => [D(G(at))]),
|
|
667
666
|
_: 1
|
|
668
667
|
})]),
|
|
669
668
|
D(G(Ie), {
|
|
@@ -1231,7 +1230,7 @@ function Ar() {
|
|
|
1231
1230
|
}
|
|
1232
1231
|
// src/composables/use-dict-data.ts
|
|
1233
1232
|
function jr(e = !0) {
|
|
1234
|
-
return
|
|
1233
|
+
return yt({
|
|
1235
1234
|
queryKey: kr,
|
|
1236
1235
|
queryFn: Ar,
|
|
1237
1236
|
enabled: b(() => oe(e)),
|
|
@@ -1518,7 +1517,7 @@ function di(e, t, n) {
|
|
|
1518
1517
|
return r;
|
|
1519
1518
|
}
|
|
1520
1519
|
function fi(e, t) {
|
|
1521
|
-
return li(e) ? "--" : t === "datetime" ?
|
|
1520
|
+
return li(e) ? "--" : t === "datetime" ? vn(e) : t === "date" ? _n(e) : pi(e);
|
|
1522
1521
|
}
|
|
1523
1522
|
function pi(e) {
|
|
1524
1523
|
if (e == null || e === "") return "--";
|
|
@@ -1545,7 +1544,7 @@ function gi(e, t = "name") {
|
|
|
1545
1544
|
}).filter(Boolean);
|
|
1546
1545
|
}
|
|
1547
1546
|
// src/components/table-entity/utils/column-slots.ts
|
|
1548
|
-
var _i = O(() => Promise.resolve().then(() => Zr)), vi = O(() => import("./picture-cell
|
|
1547
|
+
var _i = O(() => Promise.resolve().then(() => Zr)), vi = O(() => import("./picture-cell-CogcfWjM.js").then((e) => e.n)), yi = O(() => import("./avatar-cell-Cx1YMRjp.js")), { resolveImageUrl: bi } = p();
|
|
1549
1548
|
function xi(e) {
|
|
1550
1549
|
return e == null || e === "" ? [] : (Array.isArray(e) ? e : typeof e == "string" ? e.split(",") : [e]).map((e) => e && typeof e == "object" ? e.fileUrl ?? e.url : e).map((e) => bi(e)).filter(Boolean);
|
|
1551
1550
|
}
|
|
@@ -1818,7 +1817,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
1818
1817
|
50,
|
|
1819
1818
|
100
|
|
1820
1819
|
];
|
|
1821
|
-
}), p = ce(), { hasAccessByCodes: m } =
|
|
1820
|
+
}), p = ce(), { hasAccessByCodes: m } = fn(), h = z([]), g = z(/* @__PURE__ */ new Set()), _ = z(!1), v = z([...r.defaultExpandedRowKeys ?? []]), y = z(), { width: T } = gt(y), O = ne({
|
|
1822
1821
|
current_page: r.current_page,
|
|
1823
1822
|
per_page: r.per_page
|
|
1824
1823
|
}), k = b(() => Math.max(1, Math.floor(r.width ?? T.value))), A = b(() => r.total == null ? l.value : Number(r.total)), M = b(() => r.showColumnSettings || typeof r.data == "function");
|
|
@@ -1998,7 +1997,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
1998
1997
|
cellRenderer: ({ rowData: e }) => r.rowDragDisabled?.(e) ? null : j("span", {
|
|
1999
1998
|
class: Fi,
|
|
2000
1999
|
title: u("components.tableEntity.dragSort")
|
|
2001
|
-
}, j(Z, { size: 16 }, () => j(
|
|
2000
|
+
}, j(Z, { size: 16 }, () => j(st)))
|
|
2002
2001
|
}));
|
|
2003
2002
|
function Ye(e) {
|
|
2004
2003
|
if (!e || !r.permissionCode) return;
|
|
@@ -2182,14 +2181,14 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2182
2181
|
}
|
|
2183
2182
|
return o(e), n;
|
|
2184
2183
|
}
|
|
2185
|
-
function
|
|
2184
|
+
function lt(e) {
|
|
2186
2185
|
v.value = [...e], i("update:expandedRowKeys", [...e]);
|
|
2187
2186
|
}
|
|
2188
2187
|
function ut(e) {
|
|
2189
|
-
|
|
2188
|
+
lt(e);
|
|
2190
2189
|
}
|
|
2191
|
-
function
|
|
2192
|
-
|
|
2190
|
+
function ft(e) {
|
|
2191
|
+
lt(e), i("expandedRowsChange", [...e]);
|
|
2193
2192
|
}
|
|
2194
2193
|
function pt(e) {
|
|
2195
2194
|
i("rowExpand", e);
|
|
@@ -2200,7 +2199,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2200
2199
|
function ht(e) {
|
|
2201
2200
|
O.per_page = e, i("update:per_page", e), se();
|
|
2202
2201
|
}
|
|
2203
|
-
async function
|
|
2202
|
+
async function _t(e) {
|
|
2204
2203
|
e != null && O.current_page !== e ? (O.current_page = e, i("update:current_page", e), se()) : await rt();
|
|
2205
2204
|
}
|
|
2206
2205
|
return t({
|
|
@@ -2209,7 +2208,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2209
2208
|
getSelectedCount: je,
|
|
2210
2209
|
setSelectedKeys: Me,
|
|
2211
2210
|
openImport: Ne,
|
|
2212
|
-
reload:
|
|
2211
|
+
reload: _t
|
|
2213
2212
|
}), (t, n) => {
|
|
2214
2213
|
let i = H("loading");
|
|
2215
2214
|
return R(), C("div", { class: F(["table-entity", {
|
|
@@ -2226,7 +2225,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2226
2225
|
placement: "top"
|
|
2227
2226
|
}, {
|
|
2228
2227
|
default: J(() => [D(G(Y), {
|
|
2229
|
-
icon: G(
|
|
2228
|
+
icon: G(ct),
|
|
2230
2229
|
circle: "",
|
|
2231
2230
|
size: "small",
|
|
2232
2231
|
title: G(u)("components.tableEntity.refresh"),
|
|
@@ -2240,7 +2239,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2240
2239
|
}, {
|
|
2241
2240
|
default: J(() => [D(G(Y), {
|
|
2242
2241
|
class: "table-entity__settings-btn",
|
|
2243
|
-
icon: G(
|
|
2242
|
+
icon: G(dt),
|
|
2244
2243
|
circle: "",
|
|
2245
2244
|
size: "small",
|
|
2246
2245
|
onClick: n[0] ||= (e) => o.value = !0
|
|
@@ -2304,7 +2303,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2304
2303
|
"row-event-handlers": r.selectable ? G($) : void 0,
|
|
2305
2304
|
fixed: "",
|
|
2306
2305
|
"onUpdate:expandedRowKeys": ut,
|
|
2307
|
-
onExpandedRowsChange:
|
|
2306
|
+
onExpandedRowsChange: ft,
|
|
2308
2307
|
onRowExpand: pt
|
|
2309
2308
|
}, null, 8, [
|
|
2310
2309
|
"columns",
|
|
@@ -2426,7 +2425,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2426
2425
|
f.value,
|
|
2427
2426
|
l.value || "",
|
|
2428
2427
|
JSON.stringify(i.filterParams)
|
|
2429
|
-
]), { data: h, isFetching: g } =
|
|
2428
|
+
]), { data: h, isFetching: g } = yt({
|
|
2430
2429
|
queryKey: m,
|
|
2431
2430
|
queryFn: () => i.fetcher({
|
|
2432
2431
|
keyword: l.value || void 0,
|
|
@@ -2435,7 +2434,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2435
2434
|
params: i.filterParams
|
|
2436
2435
|
}),
|
|
2437
2436
|
enabled: b(() => i.visible),
|
|
2438
|
-
placeholderData:
|
|
2437
|
+
placeholderData: vt,
|
|
2439
2438
|
staleTime: 3e5,
|
|
2440
2439
|
refetchOnMount: !1,
|
|
2441
2440
|
refetchOnReconnect: !1
|
|
@@ -2489,7 +2488,7 @@ var Di = { class: "table-entity__toolbar-right" }, Oi = { class: "buttons" }, ki
|
|
|
2489
2488
|
onClear: y
|
|
2490
2489
|
}, {
|
|
2491
2490
|
append: J(() => [D(r, {
|
|
2492
|
-
icon: G(
|
|
2491
|
+
icon: G(ut),
|
|
2493
2492
|
onClick: y
|
|
2494
2493
|
}, null, 8, ["icon"])]),
|
|
2495
2494
|
_: 1
|
|
@@ -2775,7 +2774,7 @@ var Ui = { class: "async-select" }, Wi = { class: "async-select__value" }, Gi =
|
|
|
2775
2774
|
onClick: fe(re, ["stop"])
|
|
2776
2775
|
}, [D(G(Z), null, {
|
|
2777
2776
|
default: J(() => [w("img", {
|
|
2778
|
-
src: G(
|
|
2777
|
+
src: G(dn),
|
|
2779
2778
|
alt: G(u)("components.asyncSelect.more")
|
|
2780
2779
|
}, null, 8, $i)]),
|
|
2781
2780
|
_: 1
|
|
@@ -2844,7 +2843,7 @@ var la = { class: "readonly-text" }, ua = {
|
|
|
2844
2843
|
value: {}
|
|
2845
2844
|
},
|
|
2846
2845
|
setup(e) {
|
|
2847
|
-
let t = e, { copy: n, isSupported: r } =
|
|
2846
|
+
let t = e, { copy: n, isSupported: r } = ht(), i = b(() => {
|
|
2848
2847
|
let e = t.value;
|
|
2849
2848
|
return e == null || e === "" ? "" : Array.isArray(e) ? e.join(", ") : String(e);
|
|
2850
2849
|
}), a = b(() => t.copyable && r.value && i.value);
|
|
@@ -2993,37 +2992,37 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
2993
2992
|
"20px",
|
|
2994
2993
|
"24px",
|
|
2995
2994
|
"32px"
|
|
2996
|
-
], s = z(r.modelValue), c = z(!1), l = z(!1), d = z(0), f = b(() => r.placeholder || u("components.richTextEditor.placeholder")), p =
|
|
2995
|
+
], s = z(r.modelValue), c = z(!1), l = z(!1), d = z(0), f = b(() => r.placeholder || u("components.richTextEditor.placeholder")), p = un({
|
|
2997
2996
|
content: r.modelValue,
|
|
2998
2997
|
editable: r.editable,
|
|
2999
2998
|
extensions: [
|
|
3000
|
-
|
|
2999
|
+
cn.configure({ heading: { levels: [
|
|
3001
3000
|
1,
|
|
3002
3001
|
2,
|
|
3003
3002
|
3
|
|
3004
3003
|
] } }),
|
|
3005
|
-
|
|
3006
|
-
|
|
3004
|
+
on,
|
|
3005
|
+
Gt,
|
|
3006
|
+
nn,
|
|
3007
3007
|
rn,
|
|
3008
3008
|
an,
|
|
3009
|
-
|
|
3010
|
-
qt,
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
Qt.configure({
|
|
3009
|
+
Kt,
|
|
3010
|
+
qt.configure({ multicolor: !0 }),
|
|
3011
|
+
sn,
|
|
3012
|
+
tn.configure({ types: ["heading", "paragraph"] }),
|
|
3013
|
+
Zt.configure({
|
|
3015
3014
|
HTMLAttributes: { class: "rich-text-table" },
|
|
3016
3015
|
resizable: !0
|
|
3017
3016
|
}),
|
|
3018
|
-
tn,
|
|
3019
3017
|
en,
|
|
3020
3018
|
$t,
|
|
3021
|
-
|
|
3022
|
-
|
|
3019
|
+
Qt,
|
|
3020
|
+
Xt.configure({ placeholder: f.value }),
|
|
3021
|
+
Jt.configure({
|
|
3023
3022
|
allowBase64: !0,
|
|
3024
3023
|
inline: !0
|
|
3025
3024
|
}),
|
|
3026
|
-
|
|
3025
|
+
Yt.configure({
|
|
3027
3026
|
HTMLAttributes: {
|
|
3028
3027
|
rel: "noopener noreferrer",
|
|
3029
3028
|
target: "_blank"
|
|
@@ -3188,22 +3187,22 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3188
3187
|
type: "button",
|
|
3189
3188
|
title: G(u)("components.richTextEditor.undo"),
|
|
3190
3189
|
onClick: n[0] ||= (e) => G(p).chain().focus().undo().run()
|
|
3191
|
-
}, [D(G(
|
|
3190
|
+
}, [D(G(Wt), { size: 17 })], 8, Ta),
|
|
3192
3191
|
w("button", {
|
|
3193
3192
|
type: "button",
|
|
3194
3193
|
title: G(u)("components.richTextEditor.redo"),
|
|
3195
3194
|
onClick: n[1] ||= (e) => G(p).chain().focus().redo().run()
|
|
3196
|
-
}, [D(G(
|
|
3195
|
+
}, [D(G(Bt), { size: 17 })], 8, Ea),
|
|
3197
3196
|
n[27] ||= w("span", { class: "rich-text-separator" }, null, -1),
|
|
3198
3197
|
w("button", {
|
|
3199
3198
|
type: "button",
|
|
3200
3199
|
title: G(u)("components.richTextEditor.insertImage"),
|
|
3201
3200
|
onClick: re
|
|
3202
|
-
}, [D(G(
|
|
3201
|
+
}, [D(G(Ot), { size: 17 })], 8, Da),
|
|
3203
3202
|
w("label", {
|
|
3204
3203
|
class: "rich-text-select-wrap rich-text-select-wrap--line",
|
|
3205
3204
|
title: G(u)("components.richTextEditor.lineHeight")
|
|
3206
|
-
}, [D(G(
|
|
3205
|
+
}, [D(G(At), { size: 17 }), w("select", {
|
|
3207
3206
|
disabled: m.value,
|
|
3208
3207
|
onChange: se
|
|
3209
3208
|
}, [
|
|
@@ -3219,29 +3218,29 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3219
3218
|
class: F({ "is-active": X("bold") }),
|
|
3220
3219
|
title: G(u)("components.richTextEditor.bold"),
|
|
3221
3220
|
onClick: n[2] ||= (e) => G(p).chain().focus().toggleBold().run()
|
|
3222
|
-
}, [D(G(
|
|
3221
|
+
}, [D(G(wt), { size: 17 })], 10, ja),
|
|
3223
3222
|
w("button", {
|
|
3224
3223
|
type: "button",
|
|
3225
3224
|
class: F({ "is-active": X("italic") }),
|
|
3226
3225
|
title: G(u)("components.richTextEditor.italic"),
|
|
3227
3226
|
onClick: n[3] ||= (e) => G(p).chain().focus().toggleItalic().run()
|
|
3228
|
-
}, [D(G(
|
|
3227
|
+
}, [D(G(jt), { size: 17 })], 10, Ma),
|
|
3229
3228
|
w("button", {
|
|
3230
3229
|
type: "button",
|
|
3231
3230
|
class: F({ "is-active": X("underline") }),
|
|
3232
3231
|
title: G(u)("components.richTextEditor.underline"),
|
|
3233
3232
|
onClick: n[4] ||= (e) => G(p).chain().focus().toggleUnderline().run()
|
|
3234
|
-
}, [D(G(
|
|
3233
|
+
}, [D(G(Ut), { size: 17 })], 10, Na),
|
|
3235
3234
|
w("button", {
|
|
3236
3235
|
type: "button",
|
|
3237
3236
|
class: F({ "is-active": X("strike") }),
|
|
3238
3237
|
title: G(u)("components.richTextEditor.strike"),
|
|
3239
3238
|
onClick: n[5] ||= (e) => G(p).chain().focus().toggleStrike().run()
|
|
3240
|
-
}, [D(G(
|
|
3239
|
+
}, [D(G(Vt), { size: 17 })], 10, Pa),
|
|
3241
3240
|
w("label", {
|
|
3242
3241
|
class: "rich-text-color",
|
|
3243
3242
|
title: G(u)("components.richTextEditor.textColor")
|
|
3244
|
-
}, [D(G(
|
|
3243
|
+
}, [D(G(Rt), { size: 17 }), w("input", {
|
|
3245
3244
|
type: "color",
|
|
3246
3245
|
value: "#111827",
|
|
3247
3246
|
onInput: U
|
|
@@ -3249,7 +3248,7 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3249
3248
|
w("label", {
|
|
3250
3249
|
class: "rich-text-color",
|
|
3251
3250
|
title: G(u)("components.richTextEditor.highlight")
|
|
3252
|
-
}, [D(G(
|
|
3251
|
+
}, [D(G(Dt), { size: 17 }), w("input", {
|
|
3253
3252
|
type: "color",
|
|
3254
3253
|
value: "#fff3bf",
|
|
3255
3254
|
onInput: ae
|
|
@@ -3288,48 +3287,48 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3288
3287
|
class: F({ "is-active": pe("left") }),
|
|
3289
3288
|
title: G(u)("components.richTextEditor.alignLeft"),
|
|
3290
3289
|
onClick: n[9] ||= (e) => oe("left")
|
|
3291
|
-
}, [D(G(
|
|
3290
|
+
}, [D(G(St), { size: 17 })], 10, qa),
|
|
3292
3291
|
w("button", {
|
|
3293
3292
|
type: "button",
|
|
3294
3293
|
class: F({ "is-active": pe("center") }),
|
|
3295
3294
|
title: G(u)("components.richTextEditor.alignCenter"),
|
|
3296
3295
|
onClick: n[10] ||= (e) => oe("center")
|
|
3297
|
-
}, [D(G(
|
|
3296
|
+
}, [D(G(bt), { size: 17 })], 10, Ja),
|
|
3298
3297
|
w("button", {
|
|
3299
3298
|
type: "button",
|
|
3300
3299
|
class: F({ "is-active": pe("right") }),
|
|
3301
3300
|
title: G(u)("components.richTextEditor.alignRight"),
|
|
3302
3301
|
onClick: n[11] ||= (e) => oe("right")
|
|
3303
|
-
}, [D(G(
|
|
3302
|
+
}, [D(G(Ct), { size: 17 })], 10, Ya),
|
|
3304
3303
|
w("button", {
|
|
3305
3304
|
type: "button",
|
|
3306
3305
|
class: F({ "is-active": pe("justify") }),
|
|
3307
3306
|
title: G(u)("components.richTextEditor.alignJustify"),
|
|
3308
3307
|
onClick: n[12] ||= (e) => oe("justify")
|
|
3309
|
-
}, [D(G(
|
|
3308
|
+
}, [D(G(xt), { size: 17 })], 10, Xa),
|
|
3310
3309
|
n[31] ||= w("span", { class: "rich-text-break" }, null, -1),
|
|
3311
3310
|
w("button", {
|
|
3312
3311
|
type: "button",
|
|
3313
3312
|
title: G(u)("components.richTextEditor.decreaseIndent"),
|
|
3314
3313
|
onClick: de
|
|
3315
|
-
}, [D(G(
|
|
3314
|
+
}, [D(G(kt), { size: 17 })], 8, Za),
|
|
3316
3315
|
w("button", {
|
|
3317
3316
|
type: "button",
|
|
3318
3317
|
title: G(u)("components.richTextEditor.increaseIndent"),
|
|
3319
3318
|
onClick: J
|
|
3320
|
-
}, [D(G(
|
|
3319
|
+
}, [D(G(At), { size: 17 })], 8, Qa),
|
|
3321
3320
|
w("button", {
|
|
3322
3321
|
type: "button",
|
|
3323
3322
|
class: F({ "is-active": X("orderedList") }),
|
|
3324
3323
|
title: G(u)("components.richTextEditor.orderedList"),
|
|
3325
3324
|
onClick: n[13] ||= (e) => G(p).chain().focus().toggleOrderedList().run()
|
|
3326
|
-
}, [D(G(
|
|
3325
|
+
}, [D(G(Ft), { size: 17 })], 10, $a),
|
|
3327
3326
|
w("button", {
|
|
3328
3327
|
type: "button",
|
|
3329
3328
|
class: F({ "is-active": X("bulletList") }),
|
|
3330
3329
|
title: G(u)("components.richTextEditor.bulletList"),
|
|
3331
3330
|
onClick: n[14] ||= (e) => G(p).chain().focus().toggleBulletList().run()
|
|
3332
|
-
}, [D(G(
|
|
3331
|
+
}, [D(G(Pt), { size: 17 })], 10, eo),
|
|
3333
3332
|
w("button", {
|
|
3334
3333
|
type: "button",
|
|
3335
3334
|
class: F({ "is-active": X("code") }),
|
|
@@ -3340,11 +3339,11 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3340
3339
|
type: "button",
|
|
3341
3340
|
title: G(u)("components.richTextEditor.insertLink"),
|
|
3342
3341
|
onClick: ne
|
|
3343
|
-
}, [D(G(
|
|
3342
|
+
}, [D(G(Nt), { size: 17 })], 8, no),
|
|
3344
3343
|
w("label", {
|
|
3345
3344
|
class: "rich-text-select-wrap rich-text-select-wrap--table",
|
|
3346
3345
|
title: G(u)("components.richTextEditor.table")
|
|
3347
|
-
}, [D(G(
|
|
3346
|
+
}, [D(G(Ht), { size: 17 }), w("select", {
|
|
3348
3347
|
disabled: m.value,
|
|
3349
3348
|
onChange: ce
|
|
3350
3349
|
}, [
|
|
@@ -3363,10 +3362,10 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3363
3362
|
type: "button",
|
|
3364
3363
|
title: G(u)("components.richTextEditor.fullscreen"),
|
|
3365
3364
|
onClick: n[16] ||= (e) => l.value = !l.value
|
|
3366
|
-
}, [l.value ? (R(), x(G(
|
|
3365
|
+
}, [l.value ? (R(), x(G(Lt), {
|
|
3367
3366
|
key: 0,
|
|
3368
3367
|
size: 17
|
|
3369
|
-
})) : (R(), x(G(
|
|
3368
|
+
})) : (R(), x(G(It), {
|
|
3370
3369
|
key: 1,
|
|
3371
3370
|
size: 17
|
|
3372
3371
|
}))], 8, ho),
|
|
@@ -3375,18 +3374,18 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3375
3374
|
class: F({ "is-active": c.value }),
|
|
3376
3375
|
title: G(u)("components.richTextEditor.sourceCode"),
|
|
3377
3376
|
onClick: L
|
|
3378
|
-
}, [D(G(
|
|
3377
|
+
}, [D(G(Tt), { size: 17 })], 10, go),
|
|
3379
3378
|
w("button", {
|
|
3380
3379
|
type: "button",
|
|
3381
3380
|
title: G(u)("components.richTextEditor.clearFormat"),
|
|
3382
3381
|
onClick: Y
|
|
3383
|
-
}, [D(G(
|
|
3382
|
+
}, [D(G(Et), { size: 17 })], 8, _o),
|
|
3384
3383
|
w("button", {
|
|
3385
3384
|
type: "button",
|
|
3386
3385
|
class: F({ "is-active": X("blockquote") }),
|
|
3387
3386
|
title: G(u)("components.richTextEditor.blockquote"),
|
|
3388
3387
|
onClick: n[17] ||= (e) => G(p).chain().focus().toggleBlockquote().run()
|
|
3389
|
-
}, [D(G(
|
|
3388
|
+
}, [D(G(zt), { size: 17 })], 10, vo),
|
|
3390
3389
|
t.$slots["toolbar-append"] ? (R(), C("div", {
|
|
3391
3390
|
key: 0,
|
|
3392
3391
|
class: "rich-text-toolbar-extension",
|
|
@@ -3417,7 +3416,7 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3417
3416
|
readonly: m.value,
|
|
3418
3417
|
style: I({ "--rich-text-max-height": e.maxHeight }),
|
|
3419
3418
|
onBlur: te
|
|
3420
|
-
}, null, 44, So)), [[le, s.value]]) : (R(), x(G(
|
|
3419
|
+
}, null, 44, So)), [[le, s.value]]) : (R(), x(G(ln), {
|
|
3421
3420
|
key: 1,
|
|
3422
3421
|
editor: G(p),
|
|
3423
3422
|
style: I({ "--rich-text-max-height": e.maxHeight })
|
|
@@ -3491,6 +3490,10 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3491
3490
|
type: Boolean,
|
|
3492
3491
|
default: !1
|
|
3493
3492
|
},
|
|
3493
|
+
selectTeleported: {
|
|
3494
|
+
type: Boolean,
|
|
3495
|
+
default: !0
|
|
3496
|
+
},
|
|
3494
3497
|
sourceLanguage: {},
|
|
3495
3498
|
targetLanguage: {}
|
|
3496
3499
|
},
|
|
@@ -3507,7 +3510,7 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3507
3510
|
function a(e) {
|
|
3508
3511
|
(e === "translate" || e === "polish") && r("translate", e);
|
|
3509
3512
|
}
|
|
3510
|
-
return (t, n) => e.inline ? (R(), C("div", Do, [w("span", Oo, [D(G(
|
|
3513
|
+
return (t, n) => e.inline ? (R(), C("div", Do, [w("span", Oo, [D(G(Mt), {
|
|
3511
3514
|
class: "translate-toolbar__label-icon",
|
|
3512
3515
|
size: 16,
|
|
3513
3516
|
color: "#8994BC",
|
|
@@ -3598,6 +3601,7 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3598
3601
|
D(G(Pe), {
|
|
3599
3602
|
"model-value": e.sourceLanguage,
|
|
3600
3603
|
disabled: e.disabled || e.loading,
|
|
3604
|
+
teleported: e.selectTeleported,
|
|
3601
3605
|
placeholder: G(u)("product-management.attribute.translation.from"),
|
|
3602
3606
|
class: "translate-toolbar__language-select",
|
|
3603
3607
|
"onUpdate:modelValue": n[3] ||= (e) => r("update:sourceLanguage", String(e))
|
|
@@ -3611,6 +3615,7 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3611
3615
|
}, 8, [
|
|
3612
3616
|
"model-value",
|
|
3613
3617
|
"disabled",
|
|
3618
|
+
"teleported",
|
|
3614
3619
|
"placeholder"
|
|
3615
3620
|
]),
|
|
3616
3621
|
n[7] ||= w("span", {
|
|
@@ -3620,6 +3625,7 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3620
3625
|
D(G(Pe), {
|
|
3621
3626
|
"model-value": e.targetLanguage,
|
|
3622
3627
|
disabled: e.disabled || e.loading,
|
|
3628
|
+
teleported: e.selectTeleported,
|
|
3623
3629
|
placeholder: G(u)("product-management.attribute.translation.to"),
|
|
3624
3630
|
class: "translate-toolbar__language-select",
|
|
3625
3631
|
"onUpdate:modelValue": n[4] ||= (e) => r("update:targetLanguage", String(e))
|
|
@@ -3633,11 +3639,13 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3633
3639
|
}, 8, [
|
|
3634
3640
|
"model-value",
|
|
3635
3641
|
"disabled",
|
|
3642
|
+
"teleported",
|
|
3636
3643
|
"placeholder"
|
|
3637
3644
|
]),
|
|
3638
3645
|
D(G(ye), {
|
|
3639
3646
|
"split-button": "",
|
|
3640
3647
|
type: "primary",
|
|
3648
|
+
teleported: e.selectTeleported,
|
|
3641
3649
|
class: "translate-toolbar__action",
|
|
3642
3650
|
disabled: e.disabled || e.loading || !e.sourceLanguage || !e.targetLanguage,
|
|
3643
3651
|
onClick: n[5] ||= (e) => r("translate", "translate"),
|
|
@@ -3655,12 +3663,12 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3655
3663
|
})]),
|
|
3656
3664
|
default: J(() => [E(W(G(u)("product-management.attribute.translation.translate")) + " ", 1)]),
|
|
3657
3665
|
_: 1
|
|
3658
|
-
}, 8, ["disabled"])
|
|
3666
|
+
}, 8, ["teleported", "disabled"])
|
|
3659
3667
|
])]),
|
|
3660
3668
|
_: 1
|
|
3661
3669
|
}, 8, ["disabled"]));
|
|
3662
3670
|
}
|
|
3663
|
-
}), [["__scopeId", "data-v-
|
|
3671
|
+
}), [["__scopeId", "data-v-9bc1a913"]]), Mo = ["element-loading-text"], No = {
|
|
3664
3672
|
key: 1,
|
|
3665
3673
|
class: "translate-field__grid"
|
|
3666
3674
|
}, Po = ["for"], Fo = /*#__PURE__*/ f(/* @__PURE__ */ k({
|
|
@@ -3775,6 +3783,7 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3775
3783
|
languages: i.value,
|
|
3776
3784
|
"source-language": d.value,
|
|
3777
3785
|
"target-language": f.value,
|
|
3786
|
+
"select-teleported": !1,
|
|
3778
3787
|
disabled: m.value,
|
|
3779
3788
|
loading: p.value,
|
|
3780
3789
|
"onUpdate:sourceLanguage": n[1] ||= (e) => d.value = e,
|
|
@@ -3876,7 +3885,7 @@ var Ta = ["title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = ["disab
|
|
|
3876
3885
|
])) : S("", !0)], 10, Mo)), [[r, p.value]]);
|
|
3877
3886
|
};
|
|
3878
3887
|
}
|
|
3879
|
-
}), [["__scopeId", "data-v-
|
|
3888
|
+
}), [["__scopeId", "data-v-5f92d832"]]);
|
|
3880
3889
|
// src/components/schema-form/use-field-options.ts
|
|
3881
3890
|
function Io(e, t) {
|
|
3882
3891
|
let { options: n } = Fr(() => {
|
|
@@ -3908,7 +3917,7 @@ var Lo = {
|
|
|
3908
3917
|
},
|
|
3909
3918
|
emits: ["update:modelValue"],
|
|
3910
3919
|
setup(e, { emit: t }) {
|
|
3911
|
-
let r = e, i = t, a = O(() => Promise.resolve().then(() => ta)), o = O(() => import("./file-upload-
|
|
3920
|
+
let r = e, i = t, a = O(() => Promise.resolve().then(() => ta)), o = O(() => import("./file-upload-CJIkJlcK.js")), s = O(() => import("./picture-upload-Ba5slmTG.js")), c = O(() => Promise.resolve().then(() => wo)), l = b(() => r.context ?? {
|
|
3912
3921
|
mode: "create",
|
|
3913
3922
|
values: {}
|
|
3914
3923
|
}), d = Io(() => r.field, l), f = b(() => ({
|
|
@@ -3928,8 +3937,8 @@ var Lo = {
|
|
|
3928
3937
|
}
|
|
3929
3938
|
let T = b(() => {
|
|
3930
3939
|
let { type: e } = r.field, t = r.modelValue;
|
|
3931
|
-
if (e === "datetime") return
|
|
3932
|
-
if (e === "date") return
|
|
3940
|
+
if (e === "datetime") return vn(t);
|
|
3941
|
+
if (e === "date") return _n(t);
|
|
3933
3942
|
if (e === "switch") {
|
|
3934
3943
|
let e = p.value?.activeValue ?? !0, n = p.value?.inactiveValue ?? !1;
|
|
3935
3944
|
if (v(t) === v(e)) return p.value?.activeText ?? u("schemaForm.yes");
|
|
@@ -4640,7 +4649,7 @@ var Lo = {
|
|
|
4640
4649
|
}, {
|
|
4641
4650
|
default: J(() => [D(G(Y), {
|
|
4642
4651
|
link: "",
|
|
4643
|
-
icon: f.value ? G(
|
|
4652
|
+
icon: f.value ? G(lt) : G(rt),
|
|
4644
4653
|
"aria-label": f.value ? "退出全屏" : "全屏",
|
|
4645
4654
|
onClick: O
|
|
4646
4655
|
}, null, 8, ["icon", "aria-label"])]),
|
|
@@ -5240,17 +5249,17 @@ var cs = {
|
|
|
5240
5249
|
if (!r?.exportConfig) return;
|
|
5241
5250
|
let { onExport: e, name: t, url: n } = r.exportConfig;
|
|
5242
5251
|
if (e) try {
|
|
5243
|
-
let r =
|
|
5252
|
+
let r = pn(), i = e({
|
|
5244
5253
|
rows: d.value,
|
|
5245
5254
|
queryParmas: f.value
|
|
5246
|
-
}), a = await
|
|
5255
|
+
}), a = await xn.download(Ce(n), {
|
|
5247
5256
|
responseReturn: "raw",
|
|
5248
5257
|
data: {
|
|
5249
5258
|
...i,
|
|
5250
5259
|
token: r.accessToken
|
|
5251
5260
|
}
|
|
5252
5261
|
});
|
|
5253
|
-
|
|
5262
|
+
yn({
|
|
5254
5263
|
fileName: we(Z(a.headers, "content-disposition"), t || "export.xlsx"),
|
|
5255
5264
|
source: a.data
|
|
5256
5265
|
});
|
|
@@ -5260,7 +5269,7 @@ var cs = {
|
|
|
5260
5269
|
}
|
|
5261
5270
|
function Ce(e) {
|
|
5262
5271
|
if (/^https?:\/\//i.test(e)) return e;
|
|
5263
|
-
let t =
|
|
5272
|
+
let t = xn.getBaseUrl() || "", n = (/^https?:\/\//i.test(t) ? new URL(t).pathname : t.split(/[?#]/, 1)[0] ?? "").replace(/\/+$/, "");
|
|
5264
5273
|
return n && n !== "/" && (e === n || e.startsWith(`${n}/`)) ? e.slice(n.length) || "/" : e;
|
|
5265
5274
|
}
|
|
5266
5275
|
function Z(e, t) {
|
|
@@ -5481,7 +5490,7 @@ var cs = {
|
|
|
5481
5490
|
title: G(u)("components.imageUpload.preview"),
|
|
5482
5491
|
onClick: n[0] ||= (e) => a.value = !0
|
|
5483
5492
|
}, {
|
|
5484
|
-
default: J(() => [D(G(
|
|
5493
|
+
default: J(() => [D(G(mt))]),
|
|
5485
5494
|
_: 1
|
|
5486
5495
|
}, 8, ["title"]), e.disabled ? S("", !0) : (R(), x(G(Z), {
|
|
5487
5496
|
key: 0,
|
|
@@ -5503,7 +5512,7 @@ var cs = {
|
|
|
5503
5512
|
class: "image-upload__box is-empty",
|
|
5504
5513
|
style: I(s.value)
|
|
5505
5514
|
}, [D(G(Z), { class: F(["image-upload__icon", { "is-loading": i.value }]) }, {
|
|
5506
|
-
default: J(() => [i.value ? (R(), x(G(
|
|
5515
|
+
default: J(() => [i.value ? (R(), x(G(it), { key: 0 })) : (R(), x(G(ot), { key: 1 }))]),
|
|
5507
5516
|
_: 1
|
|
5508
5517
|
}, 8, ["class"]), w("span", ms, W(i.value ? G(u)("components.imageUpload.uploading") : G(u)("components.imageUpload.upload")), 1)], 4)]),
|
|
5509
5518
|
_: 1
|