@farris/ui-vue 1.6.5-beta.7 → 1.6.5
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/components/accordion/index.esm.js +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +360 -361
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +524 -520
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +190 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +309 -309
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1125 -1124
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +472 -472
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3387 -3321
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +177 -177
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +644 -644
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1773 -1760
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +879 -869
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +1091 -1077
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +215 -215
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +139 -141
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1387 -1383
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +217 -217
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +283 -283
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +194 -194
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +463 -462
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +883 -876
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +59 -57
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +739 -739
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +535 -535
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1456 -1443
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1875 -1866
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +151 -147
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1236 -1233
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +1097 -1083
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +103 -98
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1596 -1593
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +684 -684
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +935 -929
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +190 -192
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +124 -124
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2363 -2278
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +227 -227
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/designer/button-edit/index.esm.js +353 -353
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +7 -3
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +38 -33
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +3562 -3536
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +3 -3
- package/designer/data-view/index.umd.cjs +3 -3
- package/designer/farris-designer.all.esm.js +4203 -4193
- package/designer/farris-designer.all.umd.cjs +9 -9
- package/designer/input-group/index.esm.js +97 -97
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1868 -1854
- package/designer/list-view/index.umd.cjs +8 -8
- package/designer/radio-group/index.esm.js +954 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +16195 -16126
- package/farris.all.umd.cjs +30 -30
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var Ye = Object.defineProperty;
|
|
2
2
|
var Xe = (t, e, n) => e in t ? Ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var I = (t, e, n) => Xe(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { defineComponent as oe, toRefs as pe, createVNode as o, Fragment as
|
|
5
|
-
import {
|
|
4
|
+
import { defineComponent as oe, toRefs as pe, createVNode as o, Fragment as re, createTextVNode as j, ref as $, watch as ne, inject as le, getCurrentInstance as Je, onMounted as fe, onUnmounted as ve, computed as V, reactive as Ze, createApp as Ie, Transition as Ke, mergeProps as et, provide as tt, resolveComponent as te, onBeforeMount as nt } from "vue";
|
|
5
|
+
import { cloneDeep as ye, isPlainObject as we } from "lodash-es";
|
|
6
6
|
import { useDateFormat as ot, withInstall as it } from "../common/index.esm.js";
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { LocaleService as
|
|
7
|
+
import { useI18n as rt } from "vue-i18n";
|
|
8
|
+
import { LocaleService as lt } from "../locale/index.esm.js";
|
|
9
9
|
import { getSchemaByTypeForDesigner as at } from "../dynamic-resolver/index.esm.js";
|
|
10
10
|
const st = {
|
|
11
11
|
// 是否被选中
|
|
@@ -62,28 +62,28 @@ const st = {
|
|
|
62
62
|
const {
|
|
63
63
|
showInfo: n,
|
|
64
64
|
status: i,
|
|
65
|
-
maxWidth:
|
|
66
|
-
percent:
|
|
65
|
+
maxWidth: l,
|
|
66
|
+
percent: r
|
|
67
67
|
} = pe(t);
|
|
68
68
|
return () => o("div", {
|
|
69
69
|
class: ["f-progress upload-progress", "upload-progress-status-" + i.value, "f-progress-status-" + i.value, "upload-progress-line", n.value ? "upload-progress-show-info" : ""]
|
|
70
70
|
}, [o("div", {
|
|
71
71
|
class: "upload-progress-outer",
|
|
72
72
|
style: {
|
|
73
|
-
"max-width":
|
|
73
|
+
"max-width": l.value > 0 ? l.value + "px" : "auto"
|
|
74
74
|
}
|
|
75
75
|
}, [o("div", {
|
|
76
76
|
class: "upload-progress-inner"
|
|
77
77
|
}, [o("div", {
|
|
78
78
|
class: "upload-progress-bg f-progress-bg",
|
|
79
79
|
style: {
|
|
80
|
-
width:
|
|
80
|
+
width: r.value + "%"
|
|
81
81
|
}
|
|
82
82
|
}, null)])]), n.value ? o("span", {
|
|
83
83
|
class: "upload-progress-text"
|
|
84
84
|
}, [i.value === "error" || i.value === "success" ? o("span", {
|
|
85
85
|
class: ["upload-progress-text-icon f-icon", "f-icon-" + i.value]
|
|
86
|
-
}, null) : o(
|
|
86
|
+
}, null) : o(re, null, [r.value, j("%")])]) : ""]);
|
|
87
87
|
}
|
|
88
88
|
}), Ee = /* @__PURE__ */ oe({
|
|
89
89
|
name: "FPreviewCheckbox",
|
|
@@ -92,14 +92,14 @@ const st = {
|
|
|
92
92
|
setup(t, e) {
|
|
93
93
|
const {
|
|
94
94
|
disabled: n
|
|
95
|
-
} = pe(t), i = $(t.checked),
|
|
96
|
-
|
|
95
|
+
} = pe(t), i = $(t.checked), l = (r) => {
|
|
96
|
+
r.stopPropagation(), n.value || (i.value = !i.value, e.emit("checkedChange", {
|
|
97
97
|
checked: i.value,
|
|
98
98
|
id: t.id
|
|
99
99
|
}));
|
|
100
100
|
};
|
|
101
|
-
return ne(() => t.checked, (
|
|
102
|
-
i.value =
|
|
101
|
+
return ne(() => t.checked, (r) => {
|
|
102
|
+
i.value = r;
|
|
103
103
|
}), () => o("div", {
|
|
104
104
|
class: "preview-checkbox d-inline-flex align-middle"
|
|
105
105
|
}, [o("div", {
|
|
@@ -112,8 +112,8 @@ const st = {
|
|
|
112
112
|
checked: i.value
|
|
113
113
|
}, null), o("label", {
|
|
114
114
|
class: "custom-control-label",
|
|
115
|
-
onClick: (
|
|
116
|
-
onMousedown: (
|
|
115
|
+
onClick: (r) => l(r),
|
|
116
|
+
onMousedown: (r) => r.stopPropagation()
|
|
117
117
|
}, null)])]);
|
|
118
118
|
}
|
|
119
119
|
}), De = /* @__PURE__ */ oe({
|
|
@@ -121,15 +121,15 @@ const st = {
|
|
|
121
121
|
props: ct,
|
|
122
122
|
emits: ["change", "stateChange"],
|
|
123
123
|
setup(t, e) {
|
|
124
|
-
const n =
|
|
124
|
+
const n = le("uploaderService");
|
|
125
125
|
n.setUploadContext(e);
|
|
126
|
-
const i = Je(),
|
|
127
|
-
let
|
|
126
|
+
const i = Je(), l = $("*");
|
|
127
|
+
let r;
|
|
128
128
|
const a = () => {
|
|
129
|
-
|
|
129
|
+
r.files && (e.emit("change", r.files), n.handleFiles(r.files), r.value = null);
|
|
130
130
|
};
|
|
131
131
|
function f() {
|
|
132
|
-
|
|
132
|
+
r.value = null, n.reset();
|
|
133
133
|
}
|
|
134
134
|
ne(() => t.disabled, () => {
|
|
135
135
|
f();
|
|
@@ -141,24 +141,24 @@ const st = {
|
|
|
141
141
|
n.setExtendServerConfig(m);
|
|
142
142
|
});
|
|
143
143
|
function F(m) {
|
|
144
|
-
m && m.stopPropagation(),
|
|
144
|
+
m && m.stopPropagation(), r.click();
|
|
145
145
|
}
|
|
146
146
|
function g(m) {
|
|
147
147
|
n.handleUploadEvent(m);
|
|
148
148
|
}
|
|
149
149
|
return fe(() => {
|
|
150
150
|
var m, c;
|
|
151
|
-
|
|
151
|
+
r = (m = i == null ? void 0 : i.proxy) == null ? void 0 : m.$refs.uploadInput, f(), n.setOptions(t.options), n.setExtendServerConfig(t.extendConfig), l.value = (((c = t.options) == null ? void 0 : c.allowedContentTypes) || ["*"]).join(",");
|
|
152
152
|
}), ve(() => {
|
|
153
153
|
}), e.expose({
|
|
154
154
|
handleUploadEvent: g
|
|
155
|
-
}), () => o(
|
|
155
|
+
}), () => o(re, null, [o("input", {
|
|
156
156
|
ref: "uploadInput",
|
|
157
157
|
type: "file",
|
|
158
158
|
class: "ffileupload--browser",
|
|
159
159
|
disabled: t.disabled,
|
|
160
160
|
multiple: t.enableMulti,
|
|
161
|
-
accept:
|
|
161
|
+
accept: l.value,
|
|
162
162
|
onChange: () => a(),
|
|
163
163
|
style: "width: 10px",
|
|
164
164
|
title: "uploadInput"
|
|
@@ -175,17 +175,17 @@ const st = {
|
|
|
175
175
|
function Be(t, e) {
|
|
176
176
|
let n;
|
|
177
177
|
function i(c) {
|
|
178
|
-
const { properties: p, title: y, ignore: u } = c, s = u && Array.isArray(u), v = Object.keys(p).reduce((x, B) => ((!s || !u.find((C) => C === B)) && (x[B] = p[B].type === "object" && p[B].properties ? i(p[B]) :
|
|
178
|
+
const { properties: p, title: y, ignore: u } = c, s = u && Array.isArray(u), v = Object.keys(p).reduce((x, B) => ((!s || !u.find((C) => C === B)) && (x[B] = p[B].type === "object" && p[B].properties ? i(p[B]) : ye(p[B].default)), x), {});
|
|
179
179
|
if (y && (!s || !u.find((x) => x === "id"))) {
|
|
180
180
|
const x = y.toLowerCase().replace(/-/g, "_");
|
|
181
181
|
v.id = `${x}_${Math.random().toString().slice(2, 6)}`;
|
|
182
182
|
}
|
|
183
183
|
return v;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function l(c) {
|
|
186
186
|
const { properties: p, title: y, required: u } = c;
|
|
187
187
|
if (u && Array.isArray(u)) {
|
|
188
|
-
const s = u.reduce((v, x) => (v[x] = p[x].type === "object" && p[x].properties ? i(p[x]) :
|
|
188
|
+
const s = u.reduce((v, x) => (v[x] = p[x].type === "object" && p[x].properties ? i(p[x]) : ye(p[x].default), v), {});
|
|
189
189
|
if (y && u.find((v) => v === "id")) {
|
|
190
190
|
const v = y.toLowerCase().replace(/-/g, "_");
|
|
191
191
|
s.id = `${v}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -196,18 +196,18 @@ function Be(t, e) {
|
|
|
196
196
|
type: y
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function r(c, p = {}, y) {
|
|
200
200
|
const u = t[c];
|
|
201
201
|
if (u) {
|
|
202
|
-
let s =
|
|
202
|
+
let s = l(u);
|
|
203
203
|
const v = e[c];
|
|
204
|
-
return s = v ? v({ getSchemaByType:
|
|
204
|
+
return s = v ? v({ getSchemaByType: r }, s, p, y) : s, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(s), s;
|
|
205
205
|
}
|
|
206
206
|
return null;
|
|
207
207
|
}
|
|
208
208
|
function a(c, p) {
|
|
209
209
|
const y = i(p);
|
|
210
|
-
return Object.keys(y).reduce((u, s) => (Object.prototype.hasOwnProperty.call(c, s) && (u[s] &&
|
|
210
|
+
return Object.keys(y).reduce((u, s) => (Object.prototype.hasOwnProperty.call(c, s) && (u[s] && we(u[s]) && we(c[s] || !c[s]) ? Object.assign(u[s], c[s] || {}) : u[s] = c[s]), u), y), y;
|
|
211
211
|
}
|
|
212
212
|
function f(c, p) {
|
|
213
213
|
return Object.keys(c).filter((u) => c[u] != null).reduce((u, s) => {
|
|
@@ -247,9 +247,9 @@ function Be(t, e) {
|
|
|
247
247
|
function m(c) {
|
|
248
248
|
n = c;
|
|
249
249
|
}
|
|
250
|
-
return { getSchemaByType:
|
|
250
|
+
return { getSchemaByType: r, resolveSchemaWithDefaultValue: g, resolveSchemaToProps: F, mappingSchemaToProps: f, setDesignerContext: m };
|
|
251
251
|
}
|
|
252
|
-
const Pe = {}, Me = {}, { resolveSchemaWithDefaultValue: pt, resolveSchemaToProps: ft, mappingSchemaToProps: vt } = Be(Pe, Me);
|
|
252
|
+
const Pe = {}, Me = {}, { getSchemaByType: kn, resolveSchemaWithDefaultValue: pt, resolveSchemaToProps: ft, mappingSchemaToProps: vt, setDesignerContext: En } = Be(Pe, Me);
|
|
253
253
|
function mt(t = {}) {
|
|
254
254
|
function e(g, m, c, p) {
|
|
255
255
|
if (typeof c == "number")
|
|
@@ -273,7 +273,7 @@ function mt(t = {}) {
|
|
|
273
273
|
["getProperty", n]
|
|
274
274
|
]);
|
|
275
275
|
Object.keys(t).reduce((g, m) => (g.set(m, t[m]), g), i);
|
|
276
|
-
function
|
|
276
|
+
function l(g, m) {
|
|
277
277
|
const c = g;
|
|
278
278
|
return typeof m == "number" ? [{ target: c, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: c, operator: "getProperty", param: g, value: !!m }] : typeof m == "object" ? Object.keys(m).map((p) => {
|
|
279
279
|
if (p === "length")
|
|
@@ -282,9 +282,9 @@ function mt(t = {}) {
|
|
|
282
282
|
return { target: c, operator: "getProperty", param: y, value: u };
|
|
283
283
|
}) : [];
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function r(g) {
|
|
286
286
|
return Object.keys(g).reduce((c, p) => {
|
|
287
|
-
const y =
|
|
287
|
+
const y = l(p, g[p]);
|
|
288
288
|
return c.push(...y), c;
|
|
289
289
|
}, []);
|
|
290
290
|
}
|
|
@@ -296,7 +296,7 @@ function mt(t = {}) {
|
|
|
296
296
|
return !1;
|
|
297
297
|
}
|
|
298
298
|
function f(g, m) {
|
|
299
|
-
return
|
|
299
|
+
return r(g).reduce((y, u) => y && a(u, m), !0);
|
|
300
300
|
}
|
|
301
301
|
function F(g, m) {
|
|
302
302
|
const c = Object.keys(g), p = c.includes("allOf"), y = c.includes("anyOf"), u = p || y, x = (u ? g[u ? p ? "allOf" : "anyOf" : "allOf"] : [g]).map((C) => f(C, m));
|
|
@@ -365,9 +365,9 @@ const ht = {
|
|
|
365
365
|
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
366
366
|
}, yt = {
|
|
367
367
|
convertFrom: (t, e, n) => {
|
|
368
|
-
var
|
|
368
|
+
var l;
|
|
369
369
|
const i = t.editor && t.editor[e] ? t.editor[e] : t[e];
|
|
370
|
-
return ((
|
|
370
|
+
return ((l = Ae[i]) == null ? void 0 : l.name) || i;
|
|
371
371
|
}
|
|
372
372
|
}, wt = {
|
|
373
373
|
convertTo: (t, e, n, i) => {
|
|
@@ -489,8 +489,8 @@ const ht = {
|
|
|
489
489
|
t.selection || (t.selection = {}), t.selection[e] = n;
|
|
490
490
|
},
|
|
491
491
|
convertFrom: (t, e, n) => {
|
|
492
|
-
var i,
|
|
493
|
-
return e === "showCheckbox" ? (i = t.selection) != null && i.multiSelect ? !0 : (
|
|
492
|
+
var i, l;
|
|
493
|
+
return e === "showCheckbox" ? (i = t.selection) != null && i.multiSelect ? !0 : (l = t.selection) == null ? void 0 : l.showCheckbox : t.selection ? t.selection[e] : t[e];
|
|
494
494
|
}
|
|
495
495
|
}, Pt = {
|
|
496
496
|
convertFrom: (t, e, n) => t[e] && t[e].length ? `共 ${t[e].length} 项` : ""
|
|
@@ -506,19 +506,19 @@ const ht = {
|
|
|
506
506
|
convertFrom: (t, e, n) => t.size ? t.size[e] : t[e]
|
|
507
507
|
}, Ot = {
|
|
508
508
|
convertFrom: (t, e, n) => {
|
|
509
|
-
var i,
|
|
510
|
-
return (i = t.formatter) != null && i.data && e === "formatterEnumData" && !t.formatterEnumData ? (
|
|
509
|
+
var i, l;
|
|
510
|
+
return (i = t.formatter) != null && i.data && e === "formatterEnumData" && !t.formatterEnumData ? (l = t.formatter) == null ? void 0 : l.data : t.formatterEnumData;
|
|
511
511
|
}
|
|
512
512
|
}, Ht = {
|
|
513
513
|
convertTo: (t, e, n, i) => {
|
|
514
514
|
t.sort || (t.sort = {}), t.sort[e] = n;
|
|
515
515
|
},
|
|
516
516
|
convertFrom: (t, e, n) => {
|
|
517
|
-
var i,
|
|
517
|
+
var i, l;
|
|
518
518
|
if (e === "mode")
|
|
519
519
|
return ((i = t.sort) == null ? void 0 : i.mode) || "client";
|
|
520
520
|
if (e === "multiSort")
|
|
521
|
-
return !!((
|
|
521
|
+
return !!((l = t.sort) != null && l.multiSort);
|
|
522
522
|
}
|
|
523
523
|
}, Nt = {
|
|
524
524
|
convertTo: (t, e, n, i) => {
|
|
@@ -568,7 +568,7 @@ function Oe(t, e, n) {
|
|
|
568
568
|
["/converter/grid-sort.converter", Ht],
|
|
569
569
|
["/converter/grid-filter.converter", Nt],
|
|
570
570
|
["/converter/row-option.converter", Rt]
|
|
571
|
-
]),
|
|
571
|
+
]), l = /* @__PURE__ */ new Map([
|
|
572
572
|
["string", { type: "input-group", enableClear: !1 }],
|
|
573
573
|
["boolean", {
|
|
574
574
|
type: "combo-list",
|
|
@@ -592,9 +592,9 @@ function Oe(t, e, n) {
|
|
|
592
592
|
["array", { type: "button-edit" }],
|
|
593
593
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
594
594
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
595
|
-
]),
|
|
595
|
+
]), r = mt();
|
|
596
596
|
function a(u, s) {
|
|
597
|
-
return () =>
|
|
597
|
+
return () => r.parseValueSchema(u, s);
|
|
598
598
|
}
|
|
599
599
|
function f(u, s, v) {
|
|
600
600
|
return u.includes("visible") && s.visible !== void 0 ? typeof s.visible == "boolean" ? () => !!s.visible : s.visible === void 0 ? !0 : a(s.visible, v) : () => !0;
|
|
@@ -608,7 +608,7 @@ function Oe(t, e, n) {
|
|
|
608
608
|
}
|
|
609
609
|
function m(u, s, v, x, B, C = "", k = "") {
|
|
610
610
|
return Object.keys(u).map((N) => {
|
|
611
|
-
const q = $(1), _ = N, w = u[N], L = Object.keys(w), W = w.title, b = w.type, P =
|
|
611
|
+
const q = $(1), _ = N, w = u[N], L = Object.keys(w), W = w.title, b = w.type, P = l.get(b) || { type: "input-group", enableClear: !1 }, M = w.editor ? Object.assign({}, P, w.editor) : Object.assign({}, P), E = f(L, w, s), S = F(L, w, s);
|
|
612
612
|
M.readonly = M.readonly === void 0 ? S() : M.readonly;
|
|
613
613
|
const U = w.type === "cascade" ? m(w.properties, s, v, x, B, C, k) : [], G = !0;
|
|
614
614
|
let R = g(w, k);
|
|
@@ -673,10 +673,10 @@ function Oe(t, e, n) {
|
|
|
673
673
|
}
|
|
674
674
|
const He = {}, Ne = {};
|
|
675
675
|
Oe(He, Ne, pt);
|
|
676
|
-
const Re = {}, je = {}, { resolveSchemaWithDefaultValue: jt } = Be(Re, je), Ue = {}, ze = {};
|
|
676
|
+
const Re = {}, je = {}, { getSchemaByType: Dn, resolveSchemaWithDefaultValue: jt, resolveSchemaToProps: Bn, mappingSchemaToProps: Pn, setDesignerContext: Mn } = Be(Re, je), Ue = {}, ze = {};
|
|
677
677
|
Oe(Ue, ze, jt);
|
|
678
|
-
function Ut(t, e, n = /* @__PURE__ */ new Map(), i = (a, f, F, g) => f,
|
|
679
|
-
return Pe[e.title] = e, Me[e.title] = i, He[e.title] =
|
|
678
|
+
function Ut(t, e, n = /* @__PURE__ */ new Map(), i = (a, f, F, g) => f, l = {}, r = (a) => a) {
|
|
679
|
+
return Pe[e.title] = e, Me[e.title] = i, He[e.title] = l, Ne[e.title] = r, Re[e.title] = e, je[e.title] = i, Ue[e.title] = l, ze[e.title] = r, (a = {}, f = !0) => {
|
|
680
680
|
if (!f)
|
|
681
681
|
return vt(a, n);
|
|
682
682
|
const F = ft(a, e, n), g = Object.keys(t).reduce((m, c) => (m[c] = t[c].default, m), {});
|
|
@@ -1054,7 +1054,7 @@ function Se(t, e) {
|
|
|
1054
1054
|
if (!e)
|
|
1055
1055
|
return "";
|
|
1056
1056
|
let n = "";
|
|
1057
|
-
return t.indexOf(".") === -1 && e.hasOwnProperty(t) ? n = e[t] : n = t.split(".").reduce((i,
|
|
1057
|
+
return t.indexOf(".") === -1 && e.hasOwnProperty(t) ? n = e[t] : n = t.split(".").reduce((i, l) => i ? i[l] : null, e), n;
|
|
1058
1058
|
}
|
|
1059
1059
|
function nn(t) {
|
|
1060
1060
|
return (e, n) => {
|
|
@@ -1063,11 +1063,11 @@ function nn(t) {
|
|
|
1063
1063
|
if (!n.hasOwnProperty(t) || n[t] === void 0 || n[t] === null)
|
|
1064
1064
|
return -1;
|
|
1065
1065
|
if (t !== "createTime") {
|
|
1066
|
-
let
|
|
1067
|
-
return t.indexOf(".") > -1 ? (
|
|
1066
|
+
let r = "", a = "";
|
|
1067
|
+
return t.indexOf(".") > -1 ? (r = Se(t, e), a = Se(t, n)) : (r = e[t], a = n[t]), r > a ? 1 : -1;
|
|
1068
1068
|
}
|
|
1069
|
-
const i = new Date(e[t]),
|
|
1070
|
-
return i.getTime() >
|
|
1069
|
+
const i = new Date(e[t]), l = new Date(n[t]);
|
|
1070
|
+
return i.getTime() > l.getTime() ? -1 : 1;
|
|
1071
1071
|
};
|
|
1072
1072
|
}
|
|
1073
1073
|
function Le(t) {
|
|
@@ -1149,11 +1149,11 @@ function on(t) {
|
|
|
1149
1149
|
let e = t;
|
|
1150
1150
|
return t ? (typeof t == "string" && (e = parseInt(t, 10)), ae(e)) : "0 Byte";
|
|
1151
1151
|
}
|
|
1152
|
-
const
|
|
1152
|
+
const rn = () => Math.random().toString(36).substring(7);
|
|
1153
1153
|
function Ce(t, e) {
|
|
1154
1154
|
return {
|
|
1155
1155
|
fileIndex: e,
|
|
1156
|
-
id:
|
|
1156
|
+
id: rn(),
|
|
1157
1157
|
name: t.name,
|
|
1158
1158
|
size: t.size,
|
|
1159
1159
|
type: t.type,
|
|
@@ -1178,14 +1178,14 @@ function xe(t) {
|
|
|
1178
1178
|
const e = [];
|
|
1179
1179
|
return t.forEach((n) => {
|
|
1180
1180
|
const i = { id: "", name: "", size: 0, type: "", extend: null, extendHeaders: null, createTime: "" };
|
|
1181
|
-
for (const
|
|
1182
|
-
const
|
|
1183
|
-
n.hasOwnProperty(
|
|
1181
|
+
for (const l in i) {
|
|
1182
|
+
const r = l.replace("extend", "response").replace("createTime", "lastModifiedDate");
|
|
1183
|
+
n.hasOwnProperty(r) && (r === "lastModifiedDate" ? i[l] = he(n[r], "yyyy-MM-dd HH:mm:ss") : i[l] = n[r]);
|
|
1184
1184
|
}
|
|
1185
1185
|
e.push(i);
|
|
1186
1186
|
}), e;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function ln(t, e) {
|
|
1189
1189
|
return t ? e <= t * 1024 * 1024 : !0;
|
|
1190
1190
|
}
|
|
1191
1191
|
function an(t) {
|
|
@@ -1210,17 +1210,17 @@ function ke(t) {
|
|
|
1210
1210
|
return new Date(t * 1e3).toISOString().substr(11, 8);
|
|
1211
1211
|
}
|
|
1212
1212
|
class cn extends tn {
|
|
1213
|
-
upload(e, n, i,
|
|
1214
|
-
const
|
|
1213
|
+
upload(e, n, i, l) {
|
|
1214
|
+
const r = e[0];
|
|
1215
1215
|
return new Promise((a, f) => {
|
|
1216
1216
|
var x, B;
|
|
1217
1217
|
const F = n.url || i.url || "", g = n.method || "POST", m = n.data || {}, c = n.headers || {}, p = new XMLHttpRequest(), y = (/* @__PURE__ */ new Date()).getTime();
|
|
1218
|
-
let u = ((x =
|
|
1218
|
+
let u = ((x = r.progress) == null ? void 0 : x.data) && r.progress.data.startTime || y, s = 0, v = null;
|
|
1219
1219
|
p.upload.addEventListener("progress", (C) => {
|
|
1220
1220
|
var k;
|
|
1221
1221
|
if (C.lengthComputable) {
|
|
1222
1222
|
const O = Math.round(C.loaded * 100 / C.total), N = (/* @__PURE__ */ new Date()).getTime() - y;
|
|
1223
|
-
s = Math.round(C.loaded / N * 1e3), u = ((k =
|
|
1223
|
+
s = Math.round(C.loaded / N * 1e3), u = ((k = r.progress) == null ? void 0 : k.data) && r.progress.data.startTime || (/* @__PURE__ */ new Date()).getTime(), v = Math.ceil((C.total - C.loaded) / s), r.progress = {
|
|
1224
1224
|
status: K.Uploading,
|
|
1225
1225
|
data: {
|
|
1226
1226
|
percentage: O,
|
|
@@ -1231,14 +1231,14 @@ class cn extends tn {
|
|
|
1231
1231
|
eta: v,
|
|
1232
1232
|
etaHuman: ke(v)
|
|
1233
1233
|
}
|
|
1234
|
-
},
|
|
1234
|
+
}, l({ type: "uploading", files: [r] });
|
|
1235
1235
|
}
|
|
1236
1236
|
}, !1), p.upload.addEventListener("error", (C) => {
|
|
1237
1237
|
f(C);
|
|
1238
1238
|
}), p.onreadystatechange = () => {
|
|
1239
1239
|
if (p.readyState === XMLHttpRequest.DONE) {
|
|
1240
|
-
const C = Math.round(
|
|
1241
|
-
|
|
1240
|
+
const C = Math.round(r.size / ((/* @__PURE__ */ new Date()).getTime() - u) * 1e3);
|
|
1241
|
+
r.progress = {
|
|
1242
1242
|
status: K.Done,
|
|
1243
1243
|
data: {
|
|
1244
1244
|
percentage: 100,
|
|
@@ -1249,23 +1249,23 @@ class cn extends tn {
|
|
|
1249
1249
|
eta: v,
|
|
1250
1250
|
etaHuman: ke(v || 0)
|
|
1251
1251
|
}
|
|
1252
|
-
},
|
|
1252
|
+
}, r.responseStatus = p.status;
|
|
1253
1253
|
try {
|
|
1254
|
-
|
|
1254
|
+
r.response = JSON.parse(p.response);
|
|
1255
1255
|
} catch {
|
|
1256
|
-
|
|
1256
|
+
r.response = p.response;
|
|
1257
1257
|
}
|
|
1258
|
-
|
|
1258
|
+
r.responseHeaders = un(p.getAllResponseHeaders()), a({ type: "done", files: [r] });
|
|
1259
1259
|
}
|
|
1260
1260
|
}, p.open(g, F, !0), p.withCredentials = !!n.withCredentials;
|
|
1261
1261
|
try {
|
|
1262
|
-
const C =
|
|
1262
|
+
const C = r.nativeFile;
|
|
1263
1263
|
Object.keys(c).forEach((O) => p.setRequestHeader(O, c[O]));
|
|
1264
1264
|
let k;
|
|
1265
1265
|
n.includeWebKitFormBoundary !== !1 ? (Object.keys(m).forEach((O) => {
|
|
1266
1266
|
var N;
|
|
1267
|
-
return (N =
|
|
1268
|
-
}), (B =
|
|
1267
|
+
return (N = r.form) == null ? void 0 : N.append(O, m[O]);
|
|
1268
|
+
}), (B = r.form) == null || B.append(n.fieldName || "file", C, C.name), k = r.form) : k = C, p.send(k);
|
|
1269
1269
|
} catch (C) {
|
|
1270
1270
|
f(C);
|
|
1271
1271
|
}
|
|
@@ -1275,9 +1275,9 @@ class cn extends tn {
|
|
|
1275
1275
|
});
|
|
1276
1276
|
}
|
|
1277
1277
|
// 删除附件
|
|
1278
|
-
remove(e, n, i,
|
|
1279
|
-
return new Promise((
|
|
1280
|
-
|
|
1278
|
+
remove(e, n, i, l) {
|
|
1279
|
+
return new Promise((r, a) => {
|
|
1280
|
+
r({ type: "removed", files: e });
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
@@ -1306,13 +1306,13 @@ const dn = {
|
|
|
1306
1306
|
const {
|
|
1307
1307
|
locale: n,
|
|
1308
1308
|
t: i
|
|
1309
|
-
} =
|
|
1309
|
+
} = rt(), l = $(t.animate), r = "fadeOut", a = V(() => t.options), f = $(!1), F = V(() => a.value.title && a.value.message), g = V(() => !a.value.title && a.value.message), m = V(() => {
|
|
1310
1310
|
const k = {
|
|
1311
1311
|
animated: f.value,
|
|
1312
1312
|
toast: !0,
|
|
1313
1313
|
"toast--only-content": !F.value
|
|
1314
1314
|
};
|
|
1315
|
-
return k[t.animate] = !1, k[
|
|
1315
|
+
return k[t.animate] = !1, k[r] = f.value, k["toasty-type-" + a.value.type] = !0, a.value.theme && (k[a.value.theme] = !0), k;
|
|
1316
1316
|
}), c = V(() => {
|
|
1317
1317
|
const N = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, q = {
|
|
1318
1318
|
"f-icon": !0
|
|
@@ -1332,12 +1332,12 @@ const dn = {
|
|
|
1332
1332
|
function B(k) {
|
|
1333
1333
|
return `f-preten-link ${k.customClass ? k.customClass : ""}`;
|
|
1334
1334
|
}
|
|
1335
|
-
ne(
|
|
1336
|
-
|
|
1335
|
+
ne(l, () => {
|
|
1336
|
+
l.value;
|
|
1337
1337
|
});
|
|
1338
1338
|
const C = () => {
|
|
1339
1339
|
var k;
|
|
1340
|
-
return o(
|
|
1340
|
+
return o(re, null, [o("div", {
|
|
1341
1341
|
class: "after-toast-msg text-right"
|
|
1342
1342
|
}, [!e.slots.default && ((k = a.value.buttons) == null ? void 0 : k.map((O) => o("span", {
|
|
1343
1343
|
class: B(O),
|
|
@@ -1361,7 +1361,7 @@ const dn = {
|
|
|
1361
1361
|
class: c.value
|
|
1362
1362
|
}, null)]), o("div", {
|
|
1363
1363
|
class: "modal-tips-content"
|
|
1364
|
-
}, [F.value && o(
|
|
1364
|
+
}, [F.value && o(re, null, [o("h5", {
|
|
1365
1365
|
class: "toast-title modal-tips-title",
|
|
1366
1366
|
innerHTML: a.value.title
|
|
1367
1367
|
}, null), o("p", {
|
|
@@ -1394,7 +1394,7 @@ const dn = {
|
|
|
1394
1394
|
right: 12,
|
|
1395
1395
|
top: 20,
|
|
1396
1396
|
bottom: 12
|
|
1397
|
-
},
|
|
1397
|
+
}, l = $(), r = $(t.options), a = $(t.showCloseButton), f = V(() => t.position || "bottom-right"), F = V(() => t.timeout != null ? t.timeout : 3e3), g = V(() => {
|
|
1398
1398
|
const p = t.bottom ? t.bottom : i.bottom, y = t.top ? t.top : i.top, u = {
|
|
1399
1399
|
transition: "all 0.2s ease",
|
|
1400
1400
|
left: f.value.indexOf("left") > -1 ? `${t.left ? t.left : i.left}px` : "",
|
|
@@ -1411,7 +1411,7 @@ const dn = {
|
|
|
1411
1411
|
m();
|
|
1412
1412
|
}, F.value), e.expose({
|
|
1413
1413
|
closeToast: m,
|
|
1414
|
-
container:
|
|
1414
|
+
container: l,
|
|
1415
1415
|
notifyPosition: f
|
|
1416
1416
|
});
|
|
1417
1417
|
function c(p, y) {
|
|
@@ -1420,12 +1420,12 @@ const dn = {
|
|
|
1420
1420
|
return () => o("div", {
|
|
1421
1421
|
class: n.value,
|
|
1422
1422
|
style: g.value,
|
|
1423
|
-
ref:
|
|
1423
|
+
ref: l
|
|
1424
1424
|
}, [o(de, {
|
|
1425
|
-
options:
|
|
1425
|
+
options: r.value,
|
|
1426
1426
|
showCloseButton: a.value,
|
|
1427
1427
|
animate: t.animate,
|
|
1428
|
-
onClose: (p) => c(p,
|
|
1428
|
+
onClose: (p) => c(p, r.value)
|
|
1429
1429
|
}, null)]);
|
|
1430
1430
|
}
|
|
1431
1431
|
});
|
|
@@ -1441,35 +1441,35 @@ class Ve {
|
|
|
1441
1441
|
return n.textContent = e || "", n.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
|
|
1442
1442
|
}
|
|
1443
1443
|
createNotifyInstance(e) {
|
|
1444
|
-
const n = this,
|
|
1444
|
+
const n = this, l = Object.assign({
|
|
1445
1445
|
timeout: 3e3,
|
|
1446
1446
|
position: "bottom-right",
|
|
1447
1447
|
showCloseButton: !0,
|
|
1448
1448
|
safeHtml: !0
|
|
1449
1449
|
}, this.globalConfig, {
|
|
1450
1450
|
...e
|
|
1451
|
-
}),
|
|
1452
|
-
|
|
1451
|
+
}), r = document.createElement("div");
|
|
1452
|
+
r.style.display = "contents";
|
|
1453
1453
|
const a = Ie({
|
|
1454
1454
|
setup() {
|
|
1455
1455
|
var g;
|
|
1456
1456
|
const f = $();
|
|
1457
1457
|
function F() {
|
|
1458
1458
|
f.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
1459
|
-
n.updateNotifyPositionForClose(
|
|
1459
|
+
n.updateNotifyPositionForClose(l, f), a.unmount();
|
|
1460
1460
|
}, 220);
|
|
1461
1461
|
}
|
|
1462
|
-
if (
|
|
1463
|
-
const m = n.getNotifyInstances(
|
|
1462
|
+
if (l.position.indexOf("top") > -1) {
|
|
1463
|
+
const m = n.getNotifyInstances(l.position), c = m[m.length - 1];
|
|
1464
1464
|
if (c) {
|
|
1465
1465
|
const p = c.value.container.getBoundingClientRect();
|
|
1466
|
-
|
|
1466
|
+
l.top = p.bottom;
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
|
-
return
|
|
1470
|
-
document.body.removeChild(
|
|
1469
|
+
return l.safeHtml && ((g = l.options) != null && g.message) && (l.options.message = n.escapeAllHtml(l.options.message)), ve(() => {
|
|
1470
|
+
document.body.removeChild(r);
|
|
1471
1471
|
}), fe(() => {
|
|
1472
|
-
n.updateNotifyPositionForCreate(
|
|
1472
|
+
n.updateNotifyPositionForCreate(l, f);
|
|
1473
1473
|
}), () => o(Ke, {
|
|
1474
1474
|
mode: "out-in",
|
|
1475
1475
|
name: "fade",
|
|
@@ -1477,13 +1477,13 @@ class Ve {
|
|
|
1477
1477
|
}, {
|
|
1478
1478
|
default: () => [o(ue, et({
|
|
1479
1479
|
ref: f
|
|
1480
|
-
},
|
|
1480
|
+
}, l, {
|
|
1481
1481
|
onClose: F
|
|
1482
1482
|
}), null)]
|
|
1483
1483
|
});
|
|
1484
1484
|
}
|
|
1485
1485
|
});
|
|
1486
|
-
return a.provide("NotifyService", this), document.body.appendChild(
|
|
1486
|
+
return a.provide("NotifyService", this), document.body.appendChild(r), a.use(lt.i18n), a.mount(r), a;
|
|
1487
1487
|
}
|
|
1488
1488
|
getNotifyInstances(e) {
|
|
1489
1489
|
return this.notifyRefs.filter((n) => n.value.notifyPosition === e);
|
|
@@ -1491,9 +1491,9 @@ class Ve {
|
|
|
1491
1491
|
updateNotifyPositionForCreate(e, n) {
|
|
1492
1492
|
if (this.notifyRefs && this.notifyRefs.length) {
|
|
1493
1493
|
const i = window.innerHeight;
|
|
1494
|
-
e.position.indexOf("bottom") > -1 && this.getNotifyInstances(e.position).forEach((
|
|
1495
|
-
const
|
|
1496
|
-
|
|
1494
|
+
e.position.indexOf("bottom") > -1 && this.getNotifyInstances(e.position).forEach((l) => {
|
|
1495
|
+
const r = l.value.container.getBoundingClientRect();
|
|
1496
|
+
l.value.container.style.bottom = r.height + i - r.bottom + "px";
|
|
1497
1497
|
});
|
|
1498
1498
|
}
|
|
1499
1499
|
this.notifyRefs = [...this.notifyRefs, n];
|
|
@@ -1501,8 +1501,8 @@ class Ve {
|
|
|
1501
1501
|
updateNotifyPositionForClose(e, n) {
|
|
1502
1502
|
const i = this.notifyRefs.indexOf(n);
|
|
1503
1503
|
if (e.position.indexOf("top") > -1) {
|
|
1504
|
-
const
|
|
1505
|
-
|
|
1504
|
+
const l = this.getNotifyInstances(e.position), r = l.indexOf(n);
|
|
1505
|
+
l.slice(r + 1).forEach((a) => {
|
|
1506
1506
|
a.value.container.style.top = a.value.container.offsetTop - a.value.container.offsetHeight + "px";
|
|
1507
1507
|
});
|
|
1508
1508
|
}
|
|
@@ -1512,16 +1512,16 @@ class Ve {
|
|
|
1512
1512
|
return this.createNotifyInstance(e);
|
|
1513
1513
|
}
|
|
1514
1514
|
buildNotifyProps(e, n) {
|
|
1515
|
-
let i = "",
|
|
1516
|
-
typeof n == "string" ? i = n : n && (i = n.message || "",
|
|
1515
|
+
let i = "", l = "", r, a, f;
|
|
1516
|
+
typeof n == "string" ? i = n : n && (i = n.message || "", l = n.title || "", a = n.position || null, f = n.showCloseButton != null ? n.showCloseButton : null, r = n.timeout != null ? n.timeout : null);
|
|
1517
1517
|
const g = {
|
|
1518
1518
|
options: {
|
|
1519
1519
|
type: e,
|
|
1520
1520
|
message: i,
|
|
1521
|
-
title:
|
|
1521
|
+
title: l
|
|
1522
1522
|
}
|
|
1523
1523
|
};
|
|
1524
|
-
return a != null && (g.position = a), f != null && (g.showCloseButton = f),
|
|
1524
|
+
return a != null && (g.position = a), f != null && (g.showCloseButton = f), r != null && (g.timeout = r), g;
|
|
1525
1525
|
}
|
|
1526
1526
|
info(e) {
|
|
1527
1527
|
const n = this.buildNotifyProps("info", e);
|
|
@@ -1556,11 +1556,11 @@ ue.install = (t) => {
|
|
|
1556
1556
|
};
|
|
1557
1557
|
const vn = (t = "") => {
|
|
1558
1558
|
let e;
|
|
1559
|
-
return t &&
|
|
1559
|
+
return t && le(t, null) && (e = le(t)), e || (e = new Ve()), e;
|
|
1560
1560
|
}, mn = (t = "") => {
|
|
1561
1561
|
let e;
|
|
1562
|
-
if (t &&
|
|
1563
|
-
const n =
|
|
1562
|
+
if (t && le(t, null)) {
|
|
1563
|
+
const n = le(t);
|
|
1564
1564
|
n && n() && (e = n());
|
|
1565
1565
|
}
|
|
1566
1566
|
return e || (e = new cn()), e;
|
|
@@ -1569,8 +1569,8 @@ const vn = (t = "") => {
|
|
|
1569
1569
|
getServerAPI: mn
|
|
1570
1570
|
};
|
|
1571
1571
|
function We(t, e, n) {
|
|
1572
|
-
const i = Qe.getNotify(t.notifyServiceToken),
|
|
1573
|
-
disabled:
|
|
1572
|
+
const i = Qe.getNotify(t.notifyServiceToken), l = $(t.fileInfos), {
|
|
1573
|
+
disabled: r,
|
|
1574
1574
|
uploadVisible: a,
|
|
1575
1575
|
uploadDisabled: f,
|
|
1576
1576
|
previewVisible: F,
|
|
@@ -1586,7 +1586,7 @@ function We(t, e, n) {
|
|
|
1586
1586
|
const H = [...d.map((D) => (D.hasOwnProperty("size") || (D.size = void 0), D.hasOwnProperty("createTime") || (D.createTime = void 0), m.value && (D.checked = !!v.value.find((Y) => Y.id === D.id) || s.value), D))];
|
|
1587
1587
|
return H.sort(nn(g.value)), m.value && (v.value = [...H].filter((D) => D.checked)), H;
|
|
1588
1588
|
}
|
|
1589
|
-
const O = $(k(
|
|
1589
|
+
const O = $(k(l.value));
|
|
1590
1590
|
ne(() => t.fileInfos, (d) => {
|
|
1591
1591
|
O.value = k(d);
|
|
1592
1592
|
});
|
|
@@ -1665,15 +1665,15 @@ function We(t, e, n) {
|
|
|
1665
1665
|
size: H.size,
|
|
1666
1666
|
createTime: he(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")
|
|
1667
1667
|
}));
|
|
1668
|
-
|
|
1668
|
+
l.value = [...T, ...O.value], X(d), e.emit("fUploadDoneEvent", xe(d.files || [])), e.emit("uploadDoneEvent", xe(d.files || []));
|
|
1669
1669
|
} else if (d.type === "cancelled" || d.type === "removed" || d.type === "error") {
|
|
1670
|
-
const T =
|
|
1671
|
-
|
|
1670
|
+
const T = l.value.filter((H) => d.files && d.files.findIndex((D) => H.id === D.id) < 0);
|
|
1671
|
+
l.value = [...T], Z(d);
|
|
1672
1672
|
} else d.type === "rejected" && typeof d.file < "u" && Z(d);
|
|
1673
1673
|
};
|
|
1674
1674
|
return ve(() => {
|
|
1675
1675
|
}), {
|
|
1676
|
-
disabled:
|
|
1676
|
+
disabled: r,
|
|
1677
1677
|
uploadVisible: a,
|
|
1678
1678
|
uploadDisabled: f,
|
|
1679
1679
|
downloadButtonDisable: c,
|
|
@@ -1731,14 +1731,14 @@ class hn {
|
|
|
1731
1731
|
switch (e.type) {
|
|
1732
1732
|
case "removed":
|
|
1733
1733
|
this.queue = this.queue.filter(
|
|
1734
|
-
(
|
|
1735
|
-
var
|
|
1736
|
-
return ((
|
|
1734
|
+
(l) => {
|
|
1735
|
+
var r;
|
|
1736
|
+
return ((r = l.progress) == null ? void 0 : r.status) !== K.Remove;
|
|
1737
1737
|
}
|
|
1738
1738
|
), e.hasOwnProperty("message") || (e.message = "被删除"), this.stateChangeRecord.value = e;
|
|
1739
1739
|
break;
|
|
1740
1740
|
case "error":
|
|
1741
|
-
this.queue = this.queue.filter((
|
|
1741
|
+
this.queue = this.queue.filter((l) => e.files && e.files.findIndex((r) => l.id === r.id) < 0), (n = this.uploadContext) == null || n.emit("stateChange", e);
|
|
1742
1742
|
break;
|
|
1743
1743
|
default:
|
|
1744
1744
|
(i = this.uploadContext) == null || i.emit("stateChange", e);
|
|
@@ -1754,18 +1754,18 @@ class hn {
|
|
|
1754
1754
|
handleFiles(e) {
|
|
1755
1755
|
var i;
|
|
1756
1756
|
const n = Array.from(e).reduce(
|
|
1757
|
-
(
|
|
1757
|
+
(l, r, a) => {
|
|
1758
1758
|
var g;
|
|
1759
|
-
const f =
|
|
1760
|
-
|
|
1759
|
+
const f = l.length + this.queue.length + 1, F = this.rejectedReason(
|
|
1760
|
+
r.name,
|
|
1761
1761
|
f,
|
|
1762
|
-
|
|
1762
|
+
r.size
|
|
1763
1763
|
);
|
|
1764
1764
|
if (F.allowed)
|
|
1765
|
-
|
|
1765
|
+
l = l.concat(r);
|
|
1766
1766
|
else {
|
|
1767
1767
|
const m = Ce(
|
|
1768
|
-
|
|
1768
|
+
r,
|
|
1769
1769
|
a
|
|
1770
1770
|
);
|
|
1771
1771
|
(g = this.uploadContext) == null || g.emit("stateChange", {
|
|
@@ -1774,13 +1774,13 @@ class hn {
|
|
|
1774
1774
|
message: F.message
|
|
1775
1775
|
});
|
|
1776
1776
|
}
|
|
1777
|
-
return
|
|
1777
|
+
return l;
|
|
1778
1778
|
},
|
|
1779
1779
|
[]
|
|
1780
1780
|
);
|
|
1781
|
-
[].map.call(n, (
|
|
1781
|
+
[].map.call(n, (l, r) => {
|
|
1782
1782
|
var f;
|
|
1783
|
-
const a = Ce(
|
|
1783
|
+
const a = Ce(l, r);
|
|
1784
1784
|
this.queue.push(a), (f = this.uploadContext) == null || f.emit("stateChange", { type: "addedToQueue", file: a });
|
|
1785
1785
|
}), (i = this.uploadContext) == null || i.emit("stateChange", { type: "allAddedToQueue" });
|
|
1786
1786
|
}
|
|
@@ -1792,10 +1792,10 @@ class hn {
|
|
|
1792
1792
|
* @returns
|
|
1793
1793
|
*/
|
|
1794
1794
|
rejectedReason(e, n, i) {
|
|
1795
|
-
let
|
|
1796
|
-
return this.queue.findIndex((f) => f.name === e) > -1 ?
|
|
1797
|
-
allowed:
|
|
1798
|
-
message:
|
|
1795
|
+
let l = !1, r = "";
|
|
1796
|
+
return this.queue.findIndex((f) => f.name === e) > -1 ? r = "上传失败:已存在同名文件" : this.uploadOpts.allowedContentTypes && !sn(this.uploadOpts.allowedContentTypes, e) ? r = `上传失败:只允许上传${this.uploadOpts.allowedContentTypes.join(",")}类型的文档` : this.exceedMaxUpload(n) ? r = `上传失败:文件总个数超出${this.uploadOpts.maxUploads}限制` : ln(this.uploadOpts.maxFileSize, i) ? i === 0 ? r = "上传失败:不允许文件为空" : l = !0 : r = `上传失败:单个文件大小超出${this.uploadOpts.maxFileSize}MB的限制`, {
|
|
1797
|
+
allowed: l,
|
|
1798
|
+
message: r
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
1801
|
/**
|
|
@@ -1817,25 +1817,25 @@ class hn {
|
|
|
1817
1817
|
var n, i;
|
|
1818
1818
|
switch (e.type) {
|
|
1819
1819
|
case "upload":
|
|
1820
|
-
const
|
|
1820
|
+
const l = this.queue.findIndex(
|
|
1821
1821
|
(f) => f === e.file
|
|
1822
1822
|
);
|
|
1823
|
-
|
|
1824
|
-
files: [this.queue[
|
|
1823
|
+
l !== -1 && e.file && this.serverMethod({
|
|
1824
|
+
files: [this.queue[l]],
|
|
1825
1825
|
event: e
|
|
1826
1826
|
});
|
|
1827
1827
|
break;
|
|
1828
1828
|
case "remove":
|
|
1829
1829
|
if (!((n = e == null ? void 0 : e.file) != null && n.id))
|
|
1830
1830
|
return;
|
|
1831
|
-
const
|
|
1831
|
+
const r = this.queue.findIndex(
|
|
1832
1832
|
(f) => {
|
|
1833
1833
|
var F;
|
|
1834
1834
|
return f.id === ((F = e == null ? void 0 : e.file) == null ? void 0 : F.id);
|
|
1835
1835
|
}
|
|
1836
1836
|
);
|
|
1837
|
-
if (
|
|
1838
|
-
const { progress: f } = this.queue[
|
|
1837
|
+
if (r !== -1 && this.queue[r] && this.queue[r].progress) {
|
|
1838
|
+
const { progress: f } = this.queue[r];
|
|
1839
1839
|
f && (f.status = K.Remove);
|
|
1840
1840
|
}
|
|
1841
1841
|
this.serverMethod({ files: [e.file], event: e });
|
|
@@ -1900,8 +1900,8 @@ class hn {
|
|
|
1900
1900
|
* @returns
|
|
1901
1901
|
*/
|
|
1902
1902
|
upload(e, n, i) {
|
|
1903
|
-
var
|
|
1904
|
-
return (
|
|
1903
|
+
var l;
|
|
1904
|
+
return (l = this.uploadContext) == null || l.emit("stateChange", { type: "start", files: e }), this.uploadServerSer.upload(e, n, this.extendServerConfig, i);
|
|
1905
1905
|
}
|
|
1906
1906
|
/**
|
|
1907
1907
|
* 删除附件
|
|
@@ -1937,7 +1937,7 @@ const ce = /* @__PURE__ */ oe({
|
|
|
1937
1937
|
setup(t, e) {
|
|
1938
1938
|
const n = $(), i = new hn(n, t.uploadServerToken);
|
|
1939
1939
|
tt("uploaderService", i);
|
|
1940
|
-
const
|
|
1940
|
+
const l = $(t.customInfo), r = _e(t.uploadOptions, {
|
|
1941
1941
|
// 允许上传的文件类型
|
|
1942
1942
|
allowedContentTypes: ["*"],
|
|
1943
1943
|
// 默认不限制附件上传个数
|
|
@@ -1980,29 +1980,29 @@ const ce = /* @__PURE__ */ oe({
|
|
|
1980
1980
|
const E = V(() => u.value.length > 0);
|
|
1981
1981
|
function S() {
|
|
1982
1982
|
var h;
|
|
1983
|
-
return Le((
|
|
1983
|
+
return Le((r == null ? void 0 : r.allowedContentTypes) || []) ? o("li", null, [o("span", null, [j("支持类型:")]), o("span", {
|
|
1984
1984
|
class: "support-info--item-detail",
|
|
1985
1985
|
style: "margin-right:4px;"
|
|
1986
|
-
}, [(h =
|
|
1986
|
+
}, [(h = r.allowedContentTypes) == null ? void 0 : h.join(""), j(",")])]) : "";
|
|
1987
1987
|
}
|
|
1988
1988
|
function U() {
|
|
1989
|
-
return qe((
|
|
1989
|
+
return qe((r == null ? void 0 : r.maxFileSize) || "") ? o("li", null, [o("span", null, [j("单个文件限制:")]), o("span", {
|
|
1990
1990
|
class: "support-info--item-detail"
|
|
1991
|
-
}, [
|
|
1991
|
+
}, [r.maxFileSize, j(", ")])]) : "";
|
|
1992
1992
|
}
|
|
1993
1993
|
function G() {
|
|
1994
|
-
return ((
|
|
1994
|
+
return ((r == null ? void 0 : r.maxUploads) || 0) > 0 && o("li", null, [o("span", null, [j("文件总数限制:")]), o("span", {
|
|
1995
1995
|
class: "support-info--item-detail"
|
|
1996
|
-
}, [
|
|
1996
|
+
}, [r.maxUploads, j("个")])]);
|
|
1997
1997
|
}
|
|
1998
1998
|
function R() {
|
|
1999
1999
|
return F.value && !g.value && !f.value ? o("div", {
|
|
2000
2000
|
class: "ffileupload--support-info"
|
|
2001
|
-
}, [
|
|
2001
|
+
}, [l.value ? o("ul", {
|
|
2002
2002
|
class: "support-info--wrapper"
|
|
2003
2003
|
}, [o("li", null, [o("span", {
|
|
2004
2004
|
class: "support-info--item-detail",
|
|
2005
|
-
innerHTML:
|
|
2005
|
+
innerHTML: l.value
|
|
2006
2006
|
}, null)])]) : o("ul", {
|
|
2007
2007
|
class: "support-info--wrapper"
|
|
2008
2008
|
}, [S(), U(), G()])]) : null;
|
|
@@ -2160,7 +2160,7 @@ const ce = /* @__PURE__ */ oe({
|
|
|
2160
2160
|
class: "m-0"
|
|
2161
2161
|
}, [j("共"), o("span", {
|
|
2162
2162
|
class: "count"
|
|
2163
|
-
}, [y.value.length + u.value.length]), j("个附件"), v.value > 0 ? o(
|
|
2163
|
+
}, [y.value.length + u.value.length]), j("个附件"), v.value > 0 ? o(re, null, [j("(已选"), o("span", {
|
|
2164
2164
|
class: "count-selected"
|
|
2165
2165
|
}, [v.value]), j("个)")]) : ""])]) : null;
|
|
2166
2166
|
}
|
|
@@ -2250,7 +2250,7 @@ const ce = /* @__PURE__ */ oe({
|
|
|
2250
2250
|
});
|
|
2251
2251
|
function gn(t, e, n) {
|
|
2252
2252
|
var W;
|
|
2253
|
-
const i = "",
|
|
2253
|
+
const i = "", l = "", r = $();
|
|
2254
2254
|
let a;
|
|
2255
2255
|
function f() {
|
|
2256
2256
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
@@ -2281,7 +2281,7 @@ function gn(t, e, n) {
|
|
|
2281
2281
|
return P.value.canMove || E && ((S = E()) != null && S.length) ? M : p(b.parent);
|
|
2282
2282
|
}
|
|
2283
2283
|
function y(b) {
|
|
2284
|
-
return
|
|
2284
|
+
return !!n;
|
|
2285
2285
|
}
|
|
2286
2286
|
function u() {
|
|
2287
2287
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
@@ -2362,7 +2362,7 @@ function gn(t, e, n) {
|
|
|
2362
2362
|
function L(b) {
|
|
2363
2363
|
w(b);
|
|
2364
2364
|
}
|
|
2365
|
-
return
|
|
2365
|
+
return r.value = {
|
|
2366
2366
|
canMove: f(),
|
|
2367
2367
|
canSelectParent: F(),
|
|
2368
2368
|
canDelete: g(),
|
|
@@ -2372,7 +2372,7 @@ function gn(t, e, n) {
|
|
|
2372
2372
|
parent: (W = e == null ? void 0 : e.parent) == null ? void 0 : W.componentInstance,
|
|
2373
2373
|
schema: e == null ? void 0 : e.schema,
|
|
2374
2374
|
styles: i,
|
|
2375
|
-
designerClass:
|
|
2375
|
+
designerClass: l,
|
|
2376
2376
|
canAccepts: y,
|
|
2377
2377
|
getBelongedComponentInstance: c,
|
|
2378
2378
|
getDraggableDesignItemElement: p,
|
|
@@ -2389,7 +2389,7 @@ function gn(t, e, n) {
|
|
|
2389
2389
|
onPropertyChanged: L,
|
|
2390
2390
|
setComponentBasicInfoMap: _,
|
|
2391
2391
|
updateContextSchema: e == null ? void 0 : e.updateContextSchema
|
|
2392
|
-
},
|
|
2392
|
+
}, r;
|
|
2393
2393
|
}
|
|
2394
2394
|
const bn = /* @__PURE__ */ oe({
|
|
2395
2395
|
name: "FUploaderDesign",
|
|
@@ -2407,7 +2407,7 @@ const bn = /* @__PURE__ */ oe({
|
|
|
2407
2407
|
maxUploads: 0,
|
|
2408
2408
|
// 单位KB,默认是12M
|
|
2409
2409
|
maxFileSize: "12MB"
|
|
2410
|
-
}),
|
|
2410
|
+
}), l = $(null), r = [{
|
|
2411
2411
|
id: "attach01",
|
|
2412
2412
|
name: ""
|
|
2413
2413
|
}, {
|
|
@@ -2423,7 +2423,7 @@ const bn = /* @__PURE__ */ oe({
|
|
|
2423
2423
|
previewEnableMulti: p,
|
|
2424
2424
|
previewCurrentId: y,
|
|
2425
2425
|
showPreviewStateColumn: u
|
|
2426
|
-
} = We(t, e,
|
|
2426
|
+
} = We(t, e, l);
|
|
2427
2427
|
function s() {
|
|
2428
2428
|
var S;
|
|
2429
2429
|
return Le((i == null ? void 0 : i.allowedContentTypes) || []) ? o("li", null, [o("span", null, [j("支持类型:")]), o("span", {
|
|
@@ -2540,7 +2540,7 @@ const bn = /* @__PURE__ */ oe({
|
|
|
2540
2540
|
return f.value ? o("div", {
|
|
2541
2541
|
class: "header--left-container"
|
|
2542
2542
|
}, [o(te("f-file-select"), {
|
|
2543
|
-
ref:
|
|
2543
|
+
ref: l,
|
|
2544
2544
|
disabled: F.value,
|
|
2545
2545
|
selectText: t.selectText
|
|
2546
2546
|
}, null)]) : null;
|
|
@@ -2568,7 +2568,7 @@ const bn = /* @__PURE__ */ oe({
|
|
|
2568
2568
|
}, null) : null, S.title]) : null);
|
|
2569
2569
|
}
|
|
2570
2570
|
function b() {
|
|
2571
|
-
return
|
|
2571
|
+
return r.map((S) => o("tr", {
|
|
2572
2572
|
class: ["uploadAndpreview--preview-item", y.value === S.id ? "uploadAndpreview--currentfile" : ""],
|
|
2573
2573
|
id: "uploadAndpreview--preview-item" + S.id
|
|
2574
2574
|
}, [c.value.map((U) => u(U) ? o("td", {
|
|
@@ -2579,13 +2579,13 @@ const bn = /* @__PURE__ */ oe({
|
|
|
2579
2579
|
}
|
|
2580
2580
|
nt(() => {
|
|
2581
2581
|
});
|
|
2582
|
-
const P = $(), M =
|
|
2582
|
+
const P = $(), M = le("design-item-context"), E = gn(P, M);
|
|
2583
2583
|
return fe(() => {
|
|
2584
2584
|
P.value.componentInstance = E;
|
|
2585
2585
|
}), e.expose(E.value), () => o("div", {
|
|
2586
2586
|
class: "fv-upload-and-preview",
|
|
2587
2587
|
ref: P
|
|
2588
|
-
}, [m.value || f.value ? o(
|
|
2588
|
+
}, [m.value || f.value ? o(re, null, [a.value ? null : o("div", {
|
|
2589
2589
|
class: "uploadAndpreview--header"
|
|
2590
2590
|
}, [w(), L()]), o("div", {
|
|
2591
2591
|
class: "uploadAndpreview--content"
|
|
@@ -2600,11 +2600,11 @@ ce.register = (t, e, n, i) => {
|
|
|
2600
2600
|
ce.registerDesigner = (t, e, n) => {
|
|
2601
2601
|
t.uploader = bn, e.uploader = $e;
|
|
2602
2602
|
};
|
|
2603
|
-
const
|
|
2603
|
+
const An = it(ce);
|
|
2604
2604
|
export {
|
|
2605
2605
|
ce as FUploader,
|
|
2606
2606
|
tn as UploadServerAPI,
|
|
2607
|
-
|
|
2607
|
+
An as default,
|
|
2608
2608
|
$e as propsResolver,
|
|
2609
2609
|
me as uploaderProps
|
|
2610
2610
|
};
|