@farris/ui-vue 1.3.5 → 1.3.6
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 +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4057 -4304
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2450 -2467
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3593 -3585
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +163 -2643
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +500 -486
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +485 -470
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2611 -2623
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +3825 -3837
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +3720 -3712
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +312 -296
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +4748 -4992
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4215 -4462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3015 -3027
- package/components/query-solution/index.umd.cjs +5 -5
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +293 -280
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +632 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2994 -3006
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +749 -733
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +7750 -7990
- package/farris.all.umd.cjs +12 -12
- package/package.json +1 -1
- package/types/data-view/composition/types.d.ts +0 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
- package/components/event-parameter/index.css +0 -1
- package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
- package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (t, e, n) =>
|
|
4
|
-
import { defineComponent as te, toRefs as Fe, createVNode as s, Fragment as se, createTextVNode as C, ref as
|
|
5
|
-
import { isPlainObject as Re, cloneDeep as
|
|
1
|
+
var wt = Object.defineProperty;
|
|
2
|
+
var yt = (t, e, n) => e in t ? wt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var L = (t, e, n) => yt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { defineComponent as te, toRefs as Fe, createVNode as s, Fragment as se, createTextVNode as C, ref as E, watch as K, inject as oe, getCurrentInstance as bt, onMounted as Oe, onUnmounted as Ee, computed as j, reactive as xt, createApp as Dt, Transition as Mt, mergeProps as Tt, provide as St, resolveComponent as G, onBeforeMount as kt } from "vue";
|
|
5
|
+
import { isPlainObject as Re, cloneDeep as Ge } from "lodash-es";
|
|
6
6
|
import "bignumber.js";
|
|
7
7
|
import { withInstall as Ct } from "../common/index.esm.js";
|
|
8
8
|
const Pt = {
|
|
@@ -20,7 +20,7 @@ const Pt = {
|
|
|
20
20
|
// 已完成的分段百分比
|
|
21
21
|
percent: { type: Number, default: 0 },
|
|
22
22
|
maxWidth: { type: Number, default: 0 }
|
|
23
|
-
},
|
|
23
|
+
}, Ot = {
|
|
24
24
|
/**
|
|
25
25
|
* 按钮文本
|
|
26
26
|
*/
|
|
@@ -53,7 +53,7 @@ const Pt = {
|
|
|
53
53
|
* 附件服务器端服务注入的Token
|
|
54
54
|
*/
|
|
55
55
|
uploadServerToken: { type: String, default: "" }
|
|
56
|
-
},
|
|
56
|
+
}, Et = /* @__PURE__ */ te({
|
|
57
57
|
name: "FUploadProgress",
|
|
58
58
|
props: Ft,
|
|
59
59
|
setup(t, e) {
|
|
@@ -83,14 +83,14 @@ const Pt = {
|
|
|
83
83
|
class: ["upload-progress-text-icon f-icon", "f-icon-" + a.value]
|
|
84
84
|
}, null) : s(se, null, [i.value, C("%")])]) : ""]);
|
|
85
85
|
}
|
|
86
|
-
}),
|
|
86
|
+
}), Ze = /* @__PURE__ */ te({
|
|
87
87
|
name: "FPreviewCheckbox",
|
|
88
88
|
props: Pt,
|
|
89
89
|
emits: ["checkedChange"],
|
|
90
90
|
setup(t, e) {
|
|
91
91
|
const {
|
|
92
92
|
disabled: n
|
|
93
|
-
} = Fe(t), a =
|
|
93
|
+
} = Fe(t), a = E(t.checked), r = (i) => {
|
|
94
94
|
i.stopPropagation(), n.value || (a.value = !a.value, e.emit("checkedChange", {
|
|
95
95
|
checked: a.value,
|
|
96
96
|
id: t.id
|
|
@@ -114,14 +114,14 @@ const Pt = {
|
|
|
114
114
|
onMousedown: (i) => i.stopPropagation()
|
|
115
115
|
}, null)])]);
|
|
116
116
|
}
|
|
117
|
-
}),
|
|
117
|
+
}), Je = /* @__PURE__ */ te({
|
|
118
118
|
name: "FFileSelect",
|
|
119
|
-
props:
|
|
119
|
+
props: Ot,
|
|
120
120
|
emits: ["change", "stateChange"],
|
|
121
121
|
setup(t, e) {
|
|
122
122
|
const n = oe("uploaderService");
|
|
123
123
|
n.setUploadContext(e);
|
|
124
|
-
const a =
|
|
124
|
+
const a = bt(), r = E("*");
|
|
125
125
|
let i;
|
|
126
126
|
const l = () => {
|
|
127
127
|
i.files && (e.emit("change", i.files), n.handleFiles(i.files), i.value = null);
|
|
@@ -144,10 +144,10 @@ const Pt = {
|
|
|
144
144
|
function u(d) {
|
|
145
145
|
n.handleUploadEvent(d);
|
|
146
146
|
}
|
|
147
|
-
return
|
|
147
|
+
return Oe(() => {
|
|
148
148
|
var d, h;
|
|
149
149
|
i = (d = a == null ? void 0 : a.proxy) == null ? void 0 : d.$refs.uploadInput, o(), n.setOptions(t.options), n.setExtendServerConfig(t.extendConfig), r.value = (((h = t.options) == null ? void 0 : h.allowedContentTypes) || ["*"]).join(",");
|
|
150
|
-
}),
|
|
150
|
+
}), Ee(() => {
|
|
151
151
|
}), e.expose({
|
|
152
152
|
handleUploadEvent: u
|
|
153
153
|
}), () => s(se, null, [s("input", {
|
|
@@ -169,29 +169,43 @@ const Pt = {
|
|
|
169
169
|
style: "top: 2px;position: relative;"
|
|
170
170
|
}, null), t.selectText])]);
|
|
171
171
|
}
|
|
172
|
-
}),
|
|
172
|
+
}), Ke = {}, et = {};
|
|
173
173
|
function Ne(t) {
|
|
174
|
-
const { properties: e, title: n, ignore: a } = t, r = a && Array.isArray(a), i = Object.keys(e).reduce((l, o) => ((!r || !a.find((f) => f === o)) && (l[o] = e[o].type === "object" && e[o].properties ? Ne(e[o]) :
|
|
174
|
+
const { properties: e, title: n, ignore: a } = t, r = a && Array.isArray(a), i = Object.keys(e).reduce((l, o) => ((!r || !a.find((f) => f === o)) && (l[o] = e[o].type === "object" && e[o].properties ? Ne(e[o]) : Ge(e[o].default)), l), {});
|
|
175
175
|
if (n && (!r || !a.find((l) => l === "id"))) {
|
|
176
176
|
const l = n.toLowerCase().replace(/-/g, "_");
|
|
177
177
|
i.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
178
178
|
}
|
|
179
179
|
return i;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
const a =
|
|
181
|
+
function Nt(t) {
|
|
182
|
+
const { properties: e, title: n, required: a } = t;
|
|
183
|
+
if (a && Array.isArray(a)) {
|
|
184
|
+
const r = a.reduce((i, l) => (i[l] = e[l].type === "object" && e[l].properties ? Ne(e[l]) : Ge(e[l].default), i), {});
|
|
185
|
+
if (n && a.find((i) => i === "id")) {
|
|
186
|
+
const i = n.toLowerCase().replace(/-/g, "_");
|
|
187
|
+
r.id = `${i}_${Math.random().toString().slice(2, 6)}`;
|
|
188
|
+
}
|
|
189
|
+
return r;
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
type: n
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function tt(t, e = {}, n) {
|
|
196
|
+
const a = Ke[t];
|
|
183
197
|
if (a) {
|
|
184
|
-
let r =
|
|
185
|
-
const i =
|
|
186
|
-
return r = i ? i({ getSchemaByType:
|
|
198
|
+
let r = Nt(a);
|
|
199
|
+
const i = et[t];
|
|
200
|
+
return r = i ? i({ getSchemaByType: tt }, r, e, n) : r, r;
|
|
187
201
|
}
|
|
188
202
|
return null;
|
|
189
203
|
}
|
|
190
|
-
function
|
|
204
|
+
function At(t, e) {
|
|
191
205
|
const n = Ne(e);
|
|
192
|
-
return Object.keys(n).reduce((a, r) => (a[r] && Re(a[r]) && Re(t[r] || !t[r]) ? Object.assign(a[r], t[r] || {}) : a[r] = t[r], a), n), n;
|
|
206
|
+
return Object.keys(n).reduce((a, r) => (Object.prototype.hasOwnProperty.call(t, r) && (a[r] && Re(a[r]) && Re(t[r] || !t[r]) ? Object.assign(a[r], t[r] || {}) : a[r] = t[r]), a), n), n;
|
|
193
207
|
}
|
|
194
|
-
function
|
|
208
|
+
function Ht(t, e) {
|
|
195
209
|
return Object.keys(t).filter((a) => t[a] != null).reduce((a, r) => {
|
|
196
210
|
if (e.has(r)) {
|
|
197
211
|
const i = e.get(r);
|
|
@@ -206,11 +220,11 @@ function At(t, e) {
|
|
|
206
220
|
return a;
|
|
207
221
|
}, {});
|
|
208
222
|
}
|
|
209
|
-
function
|
|
210
|
-
const a =
|
|
211
|
-
return
|
|
223
|
+
function _t(t, e, n = /* @__PURE__ */ new Map()) {
|
|
224
|
+
const a = At(t, e);
|
|
225
|
+
return Ht(a, n);
|
|
212
226
|
}
|
|
213
|
-
function
|
|
227
|
+
function Bt(t = {}) {
|
|
214
228
|
function e(u, d, h, m) {
|
|
215
229
|
if (typeof h == "number")
|
|
216
230
|
return m[u].length === h;
|
|
@@ -264,15 +278,15 @@ function _t(t = {}) {
|
|
|
264
278
|
}
|
|
265
279
|
return { parseValueSchema: f };
|
|
266
280
|
}
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
function
|
|
270
|
-
return
|
|
271
|
-
const o =
|
|
281
|
+
const Rt = {}, Yt = {};
|
|
282
|
+
Bt();
|
|
283
|
+
function Wt(t, e, n = /* @__PURE__ */ new Map(), a = (l, o, f, u) => o, r = {}, i = (l) => l) {
|
|
284
|
+
return Ke[e.title] = e, et[e.title] = a, Rt[e.title] = r, Yt[e.title] = i, (l = {}) => {
|
|
285
|
+
const o = _t(l, e, n), f = Object.keys(t).reduce((u, d) => (u[d] = t[d].default, u), {});
|
|
272
286
|
return Object.assign(f, o);
|
|
273
287
|
};
|
|
274
288
|
}
|
|
275
|
-
const
|
|
289
|
+
const jt = "https://json-schema.org/draft/2020-12/schema", qt = "https://farris-design.gitee.io/uploader.schema.json", $t = "uploader", Ut = "A Farris Component", Lt = "object", zt = {
|
|
276
290
|
id: {
|
|
277
291
|
description: "The unique identifier for uploader",
|
|
278
292
|
type: "string"
|
|
@@ -324,28 +338,28 @@ const Wt = "https://json-schema.org/draft/2020-12/schema", jt = "https://farris-
|
|
|
324
338
|
type: "boolean",
|
|
325
339
|
default: !0
|
|
326
340
|
}
|
|
327
|
-
},
|
|
341
|
+
}, Qt = [
|
|
328
342
|
"id",
|
|
329
343
|
"type"
|
|
330
|
-
],
|
|
331
|
-
$schema:
|
|
332
|
-
$id:
|
|
333
|
-
title:
|
|
334
|
-
description:
|
|
335
|
-
type:
|
|
336
|
-
properties:
|
|
337
|
-
required:
|
|
344
|
+
], Vt = {
|
|
345
|
+
$schema: jt,
|
|
346
|
+
$id: qt,
|
|
347
|
+
title: $t,
|
|
348
|
+
description: Ut,
|
|
349
|
+
type: Lt,
|
|
350
|
+
properties: zt,
|
|
351
|
+
required: Qt
|
|
338
352
|
};
|
|
339
|
-
function
|
|
353
|
+
function It(t, e) {
|
|
340
354
|
return { customClass: e.class, customStyle: e.style };
|
|
341
355
|
}
|
|
342
|
-
const
|
|
343
|
-
["appearance",
|
|
356
|
+
const Xt = /* @__PURE__ */ new Map([
|
|
357
|
+
["appearance", It]
|
|
344
358
|
]);
|
|
345
|
-
function
|
|
359
|
+
function Gt(t, e, n) {
|
|
346
360
|
return e;
|
|
347
361
|
}
|
|
348
|
-
const
|
|
362
|
+
const Zt = "uploader", Jt = "A Farris Component", Kt = "object", en = {
|
|
349
363
|
basic: {
|
|
350
364
|
description: "Basic Infomation",
|
|
351
365
|
title: "基本信息",
|
|
@@ -550,11 +564,11 @@ const Gt = "uploader", Zt = "A Farris Component", Jt = "object", Kt = {
|
|
|
550
564
|
}
|
|
551
565
|
}
|
|
552
566
|
}
|
|
553
|
-
},
|
|
554
|
-
title:
|
|
555
|
-
description:
|
|
556
|
-
type:
|
|
557
|
-
categories:
|
|
567
|
+
}, tn = {
|
|
568
|
+
title: Zt,
|
|
569
|
+
description: Jt,
|
|
570
|
+
type: Kt,
|
|
571
|
+
categories: en
|
|
558
572
|
}, Ae = {
|
|
559
573
|
/** 内容区域填充 */
|
|
560
574
|
contentFill: { type: Boolean, default: !1 },
|
|
@@ -619,8 +633,8 @@ const Gt = "uploader", Zt = "A Farris Component", Jt = "object", Kt = {
|
|
|
619
633
|
* 提示服务注入的Token
|
|
620
634
|
*/
|
|
621
635
|
notifyServiceToken: { type: String, default: "" }
|
|
622
|
-
},
|
|
623
|
-
class
|
|
636
|
+
}, nt = Wt(Ae, Vt, Xt, Gt, tn), nn = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 }, an = { sun: 0, mon: 1, tue: 2, wed: 3, thu: 4, fri: 5, sat: 6 };
|
|
637
|
+
class rn {
|
|
624
638
|
constructor() {
|
|
625
639
|
L(this, "regexes", {
|
|
626
640
|
YEAR: "[1-9]\\d{3}",
|
|
@@ -705,10 +719,10 @@ class an {
|
|
|
705
719
|
return e = e.replace(/_([A-Z][A-Z0-9]+)_/g, (n, a) => this.regexes[a]), new RegExp(e, "i");
|
|
706
720
|
}
|
|
707
721
|
getMonthByName(e) {
|
|
708
|
-
return
|
|
722
|
+
return nn[String(e).slice(0, 3).toLowerCase()];
|
|
709
723
|
}
|
|
710
724
|
getWeekdayByName(e) {
|
|
711
|
-
return
|
|
725
|
+
return an[String(e).slice(0, 3).toLowerCase()];
|
|
712
726
|
}
|
|
713
727
|
parse(e) {
|
|
714
728
|
if (!isNaN(Number(e)))
|
|
@@ -749,10 +763,10 @@ function z(t) {
|
|
|
749
763
|
function ee(t, e) {
|
|
750
764
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
751
765
|
}
|
|
752
|
-
const
|
|
753
|
-
let
|
|
766
|
+
const at = 6048e5, sn = 864e5, rt = 6e4, it = 36e5;
|
|
767
|
+
let on = {};
|
|
754
768
|
function Me() {
|
|
755
|
-
return
|
|
769
|
+
return on;
|
|
756
770
|
}
|
|
757
771
|
function pe(t, e) {
|
|
758
772
|
var o, f, u, d;
|
|
@@ -762,7 +776,7 @@ function pe(t, e) {
|
|
|
762
776
|
function xe(t) {
|
|
763
777
|
return pe(t, { weekStartsOn: 1 });
|
|
764
778
|
}
|
|
765
|
-
function
|
|
779
|
+
function st(t) {
|
|
766
780
|
const e = z(t), n = e.getFullYear(), a = ee(t, 0);
|
|
767
781
|
a.setFullYear(n + 1, 0, 4), a.setHours(0, 0, 0, 0);
|
|
768
782
|
const r = xe(a), i = ee(t, 0);
|
|
@@ -788,28 +802,28 @@ function We(t) {
|
|
|
788
802
|
);
|
|
789
803
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
790
804
|
}
|
|
791
|
-
function
|
|
805
|
+
function ln(t, e) {
|
|
792
806
|
const n = Ye(t), a = Ye(e), r = +n - We(n), i = +a - We(a);
|
|
793
|
-
return Math.round((r - i) /
|
|
807
|
+
return Math.round((r - i) / sn);
|
|
794
808
|
}
|
|
795
|
-
function
|
|
796
|
-
const e =
|
|
809
|
+
function un(t) {
|
|
810
|
+
const e = st(t), n = ee(t, 0);
|
|
797
811
|
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), xe(n);
|
|
798
812
|
}
|
|
799
|
-
function
|
|
813
|
+
function cn(t) {
|
|
800
814
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
801
815
|
}
|
|
802
|
-
function
|
|
803
|
-
if (!
|
|
816
|
+
function ot(t) {
|
|
817
|
+
if (!cn(t) && typeof t != "number")
|
|
804
818
|
return !1;
|
|
805
819
|
const e = z(t);
|
|
806
820
|
return !isNaN(Number(e));
|
|
807
821
|
}
|
|
808
|
-
function
|
|
822
|
+
function dn(t) {
|
|
809
823
|
const e = z(t), n = ee(t, 0);
|
|
810
824
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
811
825
|
}
|
|
812
|
-
const
|
|
826
|
+
const fn = {
|
|
813
827
|
lessThanXSeconds: {
|
|
814
828
|
one: "less than a second",
|
|
815
829
|
other: "less than {{count}} seconds"
|
|
@@ -871,9 +885,9 @@ const dn = {
|
|
|
871
885
|
one: "almost 1 year",
|
|
872
886
|
other: "almost {{count}} years"
|
|
873
887
|
}
|
|
874
|
-
},
|
|
888
|
+
}, pn = (t, e, n) => {
|
|
875
889
|
let a;
|
|
876
|
-
const r =
|
|
890
|
+
const r = fn[t];
|
|
877
891
|
return typeof r == "string" ? a = r : e === 1 ? a = r.one : a = r.other.replace("{{count}}", e.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + a : a + " ago" : a;
|
|
878
892
|
};
|
|
879
893
|
function Se(t) {
|
|
@@ -882,42 +896,42 @@ function Se(t) {
|
|
|
882
896
|
return t.formats[n] || t.formats[t.defaultWidth];
|
|
883
897
|
};
|
|
884
898
|
}
|
|
885
|
-
const
|
|
899
|
+
const mn = {
|
|
886
900
|
full: "EEEE, MMMM do, y",
|
|
887
901
|
long: "MMMM do, y",
|
|
888
902
|
medium: "MMM d, y",
|
|
889
903
|
short: "MM/dd/yyyy"
|
|
890
|
-
},
|
|
904
|
+
}, hn = {
|
|
891
905
|
full: "h:mm:ss a zzzz",
|
|
892
906
|
long: "h:mm:ss a z",
|
|
893
907
|
medium: "h:mm:ss a",
|
|
894
908
|
short: "h:mm a"
|
|
895
|
-
},
|
|
909
|
+
}, vn = {
|
|
896
910
|
full: "{{date}} 'at' {{time}}",
|
|
897
911
|
long: "{{date}} 'at' {{time}}",
|
|
898
912
|
medium: "{{date}}, {{time}}",
|
|
899
913
|
short: "{{date}}, {{time}}"
|
|
900
|
-
},
|
|
914
|
+
}, gn = {
|
|
901
915
|
date: Se({
|
|
902
|
-
formats:
|
|
916
|
+
formats: mn,
|
|
903
917
|
defaultWidth: "full"
|
|
904
918
|
}),
|
|
905
919
|
time: Se({
|
|
906
|
-
formats:
|
|
920
|
+
formats: hn,
|
|
907
921
|
defaultWidth: "full"
|
|
908
922
|
}),
|
|
909
923
|
dateTime: Se({
|
|
910
|
-
formats:
|
|
924
|
+
formats: vn,
|
|
911
925
|
defaultWidth: "full"
|
|
912
926
|
})
|
|
913
|
-
},
|
|
927
|
+
}, wn = {
|
|
914
928
|
lastWeek: "'last' eeee 'at' p",
|
|
915
929
|
yesterday: "'yesterday at' p",
|
|
916
930
|
today: "'today at' p",
|
|
917
931
|
tomorrow: "'tomorrow at' p",
|
|
918
932
|
nextWeek: "eeee 'at' p",
|
|
919
933
|
other: "P"
|
|
920
|
-
},
|
|
934
|
+
}, yn = (t, e, n, a) => wn[t];
|
|
921
935
|
function ce(t) {
|
|
922
936
|
return (e, n) => {
|
|
923
937
|
const a = n != null && n.context ? String(n.context) : "standalone";
|
|
@@ -933,15 +947,15 @@ function ce(t) {
|
|
|
933
947
|
return r[i];
|
|
934
948
|
};
|
|
935
949
|
}
|
|
936
|
-
const
|
|
950
|
+
const bn = {
|
|
937
951
|
narrow: ["B", "A"],
|
|
938
952
|
abbreviated: ["BC", "AD"],
|
|
939
953
|
wide: ["Before Christ", "Anno Domini"]
|
|
940
|
-
},
|
|
954
|
+
}, xn = {
|
|
941
955
|
narrow: ["1", "2", "3", "4"],
|
|
942
956
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
943
957
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
944
|
-
},
|
|
958
|
+
}, Dn = {
|
|
945
959
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
946
960
|
abbreviated: [
|
|
947
961
|
"Jan",
|
|
@@ -971,7 +985,7 @@ const yn = {
|
|
|
971
985
|
"November",
|
|
972
986
|
"December"
|
|
973
987
|
]
|
|
974
|
-
},
|
|
988
|
+
}, Mn = {
|
|
975
989
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
976
990
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
977
991
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -984,7 +998,7 @@ const yn = {
|
|
|
984
998
|
"Friday",
|
|
985
999
|
"Saturday"
|
|
986
1000
|
]
|
|
987
|
-
},
|
|
1001
|
+
}, Tn = {
|
|
988
1002
|
narrow: {
|
|
989
1003
|
am: "a",
|
|
990
1004
|
pm: "p",
|
|
@@ -1015,7 +1029,7 @@ const yn = {
|
|
|
1015
1029
|
evening: "evening",
|
|
1016
1030
|
night: "night"
|
|
1017
1031
|
}
|
|
1018
|
-
},
|
|
1032
|
+
}, Sn = {
|
|
1019
1033
|
narrow: {
|
|
1020
1034
|
am: "a",
|
|
1021
1035
|
pm: "p",
|
|
@@ -1046,7 +1060,7 @@ const yn = {
|
|
|
1046
1060
|
evening: "in the evening",
|
|
1047
1061
|
night: "at night"
|
|
1048
1062
|
}
|
|
1049
|
-
},
|
|
1063
|
+
}, kn = (t, e) => {
|
|
1050
1064
|
const n = Number(t), a = n % 100;
|
|
1051
1065
|
if (a > 20 || a < 10)
|
|
1052
1066
|
switch (a % 10) {
|
|
@@ -1058,29 +1072,29 @@ const yn = {
|
|
|
1058
1072
|
return n + "rd";
|
|
1059
1073
|
}
|
|
1060
1074
|
return n + "th";
|
|
1061
|
-
},
|
|
1062
|
-
ordinalNumber:
|
|
1075
|
+
}, Cn = {
|
|
1076
|
+
ordinalNumber: kn,
|
|
1063
1077
|
era: ce({
|
|
1064
|
-
values:
|
|
1078
|
+
values: bn,
|
|
1065
1079
|
defaultWidth: "wide"
|
|
1066
1080
|
}),
|
|
1067
1081
|
quarter: ce({
|
|
1068
|
-
values:
|
|
1082
|
+
values: xn,
|
|
1069
1083
|
defaultWidth: "wide",
|
|
1070
1084
|
argumentCallback: (t) => t - 1
|
|
1071
1085
|
}),
|
|
1072
1086
|
month: ce({
|
|
1073
|
-
values:
|
|
1087
|
+
values: Dn,
|
|
1074
1088
|
defaultWidth: "wide"
|
|
1075
1089
|
}),
|
|
1076
1090
|
day: ce({
|
|
1077
|
-
values:
|
|
1091
|
+
values: Mn,
|
|
1078
1092
|
defaultWidth: "wide"
|
|
1079
1093
|
}),
|
|
1080
1094
|
dayPeriod: ce({
|
|
1081
|
-
values:
|
|
1095
|
+
values: Tn,
|
|
1082
1096
|
defaultWidth: "wide",
|
|
1083
|
-
formattingValues:
|
|
1097
|
+
formattingValues: Sn,
|
|
1084
1098
|
defaultFormattingWidth: "wide"
|
|
1085
1099
|
})
|
|
1086
1100
|
};
|
|
@@ -1089,9 +1103,9 @@ function de(t) {
|
|
|
1089
1103
|
const a = n.width, r = a && t.matchPatterns[a] || t.matchPatterns[t.defaultMatchWidth], i = e.match(r);
|
|
1090
1104
|
if (!i)
|
|
1091
1105
|
return null;
|
|
1092
|
-
const l = i[0], o = a && t.parsePatterns[a] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(o) ?
|
|
1106
|
+
const l = i[0], o = a && t.parsePatterns[a] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(o) ? Fn(o, (h) => h.test(l)) : (
|
|
1093
1107
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
1094
|
-
|
|
1108
|
+
Pn(o, (h) => h.test(l))
|
|
1095
1109
|
);
|
|
1096
1110
|
let u;
|
|
1097
1111
|
u = t.valueCallback ? t.valueCallback(f) : f, u = n.valueCallback ? (
|
|
@@ -1102,17 +1116,17 @@ function de(t) {
|
|
|
1102
1116
|
return { value: u, rest: d };
|
|
1103
1117
|
};
|
|
1104
1118
|
}
|
|
1105
|
-
function
|
|
1119
|
+
function Pn(t, e) {
|
|
1106
1120
|
for (const n in t)
|
|
1107
1121
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
1108
1122
|
return n;
|
|
1109
1123
|
}
|
|
1110
|
-
function
|
|
1124
|
+
function Fn(t, e) {
|
|
1111
1125
|
for (let n = 0; n < t.length; n++)
|
|
1112
1126
|
if (e(t[n]))
|
|
1113
1127
|
return n;
|
|
1114
1128
|
}
|
|
1115
|
-
function
|
|
1129
|
+
function On(t) {
|
|
1116
1130
|
return (e, n = {}) => {
|
|
1117
1131
|
const a = e.match(t.matchPattern);
|
|
1118
1132
|
if (!a) return null;
|
|
@@ -1124,23 +1138,23 @@ function Fn(t) {
|
|
|
1124
1138
|
return { value: l, rest: o };
|
|
1125
1139
|
};
|
|
1126
1140
|
}
|
|
1127
|
-
const En = /^(\d+)(th|st|nd|rd)?/i,
|
|
1141
|
+
const En = /^(\d+)(th|st|nd|rd)?/i, Nn = /\d+/i, An = {
|
|
1128
1142
|
narrow: /^(b|a)/i,
|
|
1129
1143
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1130
1144
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1131
|
-
}, An = {
|
|
1132
|
-
any: [/^b/i, /^(a|c)/i]
|
|
1133
1145
|
}, Hn = {
|
|
1146
|
+
any: [/^b/i, /^(a|c)/i]
|
|
1147
|
+
}, _n = {
|
|
1134
1148
|
narrow: /^[1234]/i,
|
|
1135
1149
|
abbreviated: /^q[1234]/i,
|
|
1136
1150
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1137
|
-
}, _n = {
|
|
1138
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1139
1151
|
}, Bn = {
|
|
1152
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1153
|
+
}, Rn = {
|
|
1140
1154
|
narrow: /^[jfmasond]/i,
|
|
1141
1155
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1142
1156
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1143
|
-
},
|
|
1157
|
+
}, Yn = {
|
|
1144
1158
|
narrow: [
|
|
1145
1159
|
/^j/i,
|
|
1146
1160
|
/^f/i,
|
|
@@ -1169,18 +1183,18 @@ const En = /^(\d+)(th|st|nd|rd)?/i, On = /\d+/i, Nn = {
|
|
|
1169
1183
|
/^n/i,
|
|
1170
1184
|
/^d/i
|
|
1171
1185
|
]
|
|
1172
|
-
},
|
|
1186
|
+
}, Wn = {
|
|
1173
1187
|
narrow: /^[smtwf]/i,
|
|
1174
1188
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1175
1189
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1176
1190
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1177
|
-
},
|
|
1191
|
+
}, jn = {
|
|
1178
1192
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1179
1193
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1180
|
-
},
|
|
1194
|
+
}, qn = {
|
|
1181
1195
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1182
1196
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1183
|
-
},
|
|
1197
|
+
}, $n = {
|
|
1184
1198
|
any: {
|
|
1185
1199
|
am: /^a/i,
|
|
1186
1200
|
pm: /^p/i,
|
|
@@ -1191,64 +1205,64 @@ const En = /^(\d+)(th|st|nd|rd)?/i, On = /\d+/i, Nn = {
|
|
|
1191
1205
|
evening: /evening/i,
|
|
1192
1206
|
night: /night/i
|
|
1193
1207
|
}
|
|
1194
|
-
},
|
|
1195
|
-
ordinalNumber:
|
|
1208
|
+
}, Un = {
|
|
1209
|
+
ordinalNumber: On({
|
|
1196
1210
|
matchPattern: En,
|
|
1197
|
-
parsePattern:
|
|
1211
|
+
parsePattern: Nn,
|
|
1198
1212
|
valueCallback: (t) => parseInt(t, 10)
|
|
1199
1213
|
}),
|
|
1200
1214
|
era: de({
|
|
1201
|
-
matchPatterns:
|
|
1215
|
+
matchPatterns: An,
|
|
1202
1216
|
defaultMatchWidth: "wide",
|
|
1203
|
-
parsePatterns:
|
|
1217
|
+
parsePatterns: Hn,
|
|
1204
1218
|
defaultParseWidth: "any"
|
|
1205
1219
|
}),
|
|
1206
1220
|
quarter: de({
|
|
1207
|
-
matchPatterns:
|
|
1221
|
+
matchPatterns: _n,
|
|
1208
1222
|
defaultMatchWidth: "wide",
|
|
1209
|
-
parsePatterns:
|
|
1223
|
+
parsePatterns: Bn,
|
|
1210
1224
|
defaultParseWidth: "any",
|
|
1211
1225
|
valueCallback: (t) => t + 1
|
|
1212
1226
|
}),
|
|
1213
1227
|
month: de({
|
|
1214
|
-
matchPatterns:
|
|
1228
|
+
matchPatterns: Rn,
|
|
1215
1229
|
defaultMatchWidth: "wide",
|
|
1216
|
-
parsePatterns:
|
|
1230
|
+
parsePatterns: Yn,
|
|
1217
1231
|
defaultParseWidth: "any"
|
|
1218
1232
|
}),
|
|
1219
1233
|
day: de({
|
|
1220
|
-
matchPatterns:
|
|
1234
|
+
matchPatterns: Wn,
|
|
1221
1235
|
defaultMatchWidth: "wide",
|
|
1222
|
-
parsePatterns:
|
|
1236
|
+
parsePatterns: jn,
|
|
1223
1237
|
defaultParseWidth: "any"
|
|
1224
1238
|
}),
|
|
1225
1239
|
dayPeriod: de({
|
|
1226
|
-
matchPatterns:
|
|
1240
|
+
matchPatterns: qn,
|
|
1227
1241
|
defaultMatchWidth: "any",
|
|
1228
|
-
parsePatterns:
|
|
1242
|
+
parsePatterns: $n,
|
|
1229
1243
|
defaultParseWidth: "any"
|
|
1230
1244
|
})
|
|
1231
|
-
},
|
|
1245
|
+
}, Ln = {
|
|
1232
1246
|
code: "en-US",
|
|
1233
|
-
formatDistance:
|
|
1234
|
-
formatLong:
|
|
1235
|
-
formatRelative:
|
|
1236
|
-
localize:
|
|
1237
|
-
match:
|
|
1247
|
+
formatDistance: pn,
|
|
1248
|
+
formatLong: gn,
|
|
1249
|
+
formatRelative: yn,
|
|
1250
|
+
localize: Cn,
|
|
1251
|
+
match: Un,
|
|
1238
1252
|
options: {
|
|
1239
1253
|
weekStartsOn: 0,
|
|
1240
1254
|
firstWeekContainsDate: 1
|
|
1241
1255
|
}
|
|
1242
1256
|
};
|
|
1243
|
-
function
|
|
1257
|
+
function zn(t) {
|
|
1244
1258
|
const e = z(t);
|
|
1245
|
-
return
|
|
1259
|
+
return ln(e, dn(e)) + 1;
|
|
1246
1260
|
}
|
|
1247
|
-
function
|
|
1248
|
-
const e = z(t), n = +xe(e) - +
|
|
1249
|
-
return Math.round(n /
|
|
1261
|
+
function Qn(t) {
|
|
1262
|
+
const e = z(t), n = +xe(e) - +un(e);
|
|
1263
|
+
return Math.round(n / at) + 1;
|
|
1250
1264
|
}
|
|
1251
|
-
function
|
|
1265
|
+
function lt(t, e) {
|
|
1252
1266
|
var d, h, m, D;
|
|
1253
1267
|
const n = z(t), a = n.getFullYear(), r = Me(), i = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((h = (d = e == null ? void 0 : e.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((D = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : D.firstWeekContainsDate) ?? 1, l = ee(t, 0);
|
|
1254
1268
|
l.setFullYear(a + 1, 0, i), l.setHours(0, 0, 0, 0);
|
|
@@ -1257,14 +1271,14 @@ function ot(t, e) {
|
|
|
1257
1271
|
const u = pe(f, e);
|
|
1258
1272
|
return n.getTime() >= o.getTime() ? a + 1 : n.getTime() >= u.getTime() ? a : a - 1;
|
|
1259
1273
|
}
|
|
1260
|
-
function
|
|
1274
|
+
function Vn(t, e) {
|
|
1261
1275
|
var o, f, u, d;
|
|
1262
|
-
const n = Me(), a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((f = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, r =
|
|
1276
|
+
const n = Me(), a = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((f = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : f.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, r = lt(t, e), i = ee(t, 0);
|
|
1263
1277
|
return i.setFullYear(r, 0, a), i.setHours(0, 0, 0, 0), pe(i, e);
|
|
1264
1278
|
}
|
|
1265
|
-
function
|
|
1266
|
-
const n = z(t), a = +pe(n, e) - +
|
|
1267
|
-
return Math.round(a /
|
|
1279
|
+
function In(t, e) {
|
|
1280
|
+
const n = z(t), a = +pe(n, e) - +Vn(n, e);
|
|
1281
|
+
return Math.round(a / at) + 1;
|
|
1268
1282
|
}
|
|
1269
1283
|
function P(t, e) {
|
|
1270
1284
|
const n = t < 0 ? "-" : "", a = Math.abs(t).toString().padStart(e, "0");
|
|
@@ -1359,7 +1373,7 @@ const X = {
|
|
|
1359
1373
|
},
|
|
1360
1374
|
// Local week-numbering year
|
|
1361
1375
|
Y: function(t, e, n, a) {
|
|
1362
|
-
const r =
|
|
1376
|
+
const r = lt(t, a), i = r > 0 ? r : 1 - r;
|
|
1363
1377
|
if (e === "YY") {
|
|
1364
1378
|
const l = i % 100;
|
|
1365
1379
|
return P(l, 2);
|
|
@@ -1368,7 +1382,7 @@ const X = {
|
|
|
1368
1382
|
},
|
|
1369
1383
|
// ISO week-numbering year
|
|
1370
1384
|
R: function(t, e) {
|
|
1371
|
-
const n =
|
|
1385
|
+
const n = st(t);
|
|
1372
1386
|
return P(n, e.length);
|
|
1373
1387
|
},
|
|
1374
1388
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1491,12 +1505,12 @@ const X = {
|
|
|
1491
1505
|
},
|
|
1492
1506
|
// Local week of year
|
|
1493
1507
|
w: function(t, e, n, a) {
|
|
1494
|
-
const r =
|
|
1508
|
+
const r = In(t, a);
|
|
1495
1509
|
return e === "wo" ? n.ordinalNumber(r, { unit: "week" }) : P(r, e.length);
|
|
1496
1510
|
},
|
|
1497
1511
|
// ISO week of year
|
|
1498
1512
|
I: function(t, e, n) {
|
|
1499
|
-
const a =
|
|
1513
|
+
const a = Qn(t);
|
|
1500
1514
|
return e === "Io" ? n.ordinalNumber(a, { unit: "week" }) : P(a, e.length);
|
|
1501
1515
|
},
|
|
1502
1516
|
// Day of the month
|
|
@@ -1505,7 +1519,7 @@ const X = {
|
|
|
1505
1519
|
},
|
|
1506
1520
|
// Day of year
|
|
1507
1521
|
D: function(t, e, n) {
|
|
1508
|
-
const a =
|
|
1522
|
+
const a = zn(t);
|
|
1509
1523
|
return e === "Do" ? n.ordinalNumber(a, { unit: "dayOfYear" }) : P(a, e.length);
|
|
1510
1524
|
},
|
|
1511
1525
|
// Day of week
|
|
@@ -1844,7 +1858,7 @@ const Ue = (t, e) => {
|
|
|
1844
1858
|
default:
|
|
1845
1859
|
return e.date({ width: "full" });
|
|
1846
1860
|
}
|
|
1847
|
-
},
|
|
1861
|
+
}, ut = (t, e) => {
|
|
1848
1862
|
switch (t) {
|
|
1849
1863
|
case "p":
|
|
1850
1864
|
return e.time({ width: "short" });
|
|
@@ -1856,7 +1870,7 @@ const Ue = (t, e) => {
|
|
|
1856
1870
|
default:
|
|
1857
1871
|
return e.time({ width: "full" });
|
|
1858
1872
|
}
|
|
1859
|
-
},
|
|
1873
|
+
}, Xn = (t, e) => {
|
|
1860
1874
|
const n = t.match(/(P+)(p+)?/) || [], a = n[1], r = n[2];
|
|
1861
1875
|
if (!r)
|
|
1862
1876
|
return Ue(t, e);
|
|
@@ -1876,47 +1890,47 @@ const Ue = (t, e) => {
|
|
|
1876
1890
|
i = e.dateTime({ width: "full" });
|
|
1877
1891
|
break;
|
|
1878
1892
|
}
|
|
1879
|
-
return i.replace("{{date}}", Ue(a, e)).replace("{{time}}",
|
|
1880
|
-
},
|
|
1881
|
-
p:
|
|
1882
|
-
P:
|
|
1883
|
-
},
|
|
1884
|
-
function Kn(t) {
|
|
1885
|
-
return Gn.test(t);
|
|
1886
|
-
}
|
|
1893
|
+
return i.replace("{{date}}", Ue(a, e)).replace("{{time}}", ut(r, e));
|
|
1894
|
+
}, Gn = {
|
|
1895
|
+
p: ut,
|
|
1896
|
+
P: Xn
|
|
1897
|
+
}, Zn = /^D+$/, Jn = /^Y+$/, Kn = ["D", "DD", "YY", "YYYY"];
|
|
1887
1898
|
function ea(t) {
|
|
1888
1899
|
return Zn.test(t);
|
|
1889
1900
|
}
|
|
1890
|
-
function ta(t
|
|
1891
|
-
|
|
1892
|
-
if (console.warn(a), Jn.includes(t)) throw new RangeError(a);
|
|
1901
|
+
function ta(t) {
|
|
1902
|
+
return Jn.test(t);
|
|
1893
1903
|
}
|
|
1894
1904
|
function na(t, e, n) {
|
|
1905
|
+
const a = aa(t, e, n);
|
|
1906
|
+
if (console.warn(a), Kn.includes(t)) throw new RangeError(a);
|
|
1907
|
+
}
|
|
1908
|
+
function aa(t, e, n) {
|
|
1895
1909
|
const a = t[0] === "Y" ? "years" : "days of the month";
|
|
1896
1910
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1897
1911
|
}
|
|
1898
|
-
const
|
|
1912
|
+
const ra = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ia = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, sa = /^'([^]*?)'?$/, oa = /''/g, la = /[a-zA-Z]/;
|
|
1899
1913
|
function we(t, e, n) {
|
|
1900
1914
|
var d, h, m, D;
|
|
1901
|
-
const a = Me(), r = a.locale ??
|
|
1902
|
-
if (!
|
|
1915
|
+
const a = Me(), r = a.locale ?? Ln, i = a.firstWeekContainsDate ?? ((h = (d = a.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, l = a.weekStartsOn ?? ((D = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : D.weekStartsOn) ?? 0, o = z(t);
|
|
1916
|
+
if (!ot(o))
|
|
1903
1917
|
throw new RangeError("Invalid time value");
|
|
1904
|
-
let f = e.match(
|
|
1918
|
+
let f = e.match(ia).map((v) => {
|
|
1905
1919
|
const x = v[0];
|
|
1906
1920
|
if (x === "p" || x === "P") {
|
|
1907
|
-
const b =
|
|
1921
|
+
const b = Gn[x];
|
|
1908
1922
|
return b(v, r.formatLong);
|
|
1909
1923
|
}
|
|
1910
1924
|
return v;
|
|
1911
|
-
}).join("").match(
|
|
1925
|
+
}).join("").match(ra).map((v) => {
|
|
1912
1926
|
if (v === "''")
|
|
1913
1927
|
return { isToken: !1, value: "'" };
|
|
1914
1928
|
const x = v[0];
|
|
1915
1929
|
if (x === "'")
|
|
1916
|
-
return { isToken: !1, value:
|
|
1930
|
+
return { isToken: !1, value: ua(v) };
|
|
1917
1931
|
if (je[x])
|
|
1918
1932
|
return { isToken: !0, value: v };
|
|
1919
|
-
if (x.match(
|
|
1933
|
+
if (x.match(la))
|
|
1920
1934
|
throw new RangeError(
|
|
1921
1935
|
"Format string contains an unescaped latin alphabet character `" + x + "`"
|
|
1922
1936
|
);
|
|
@@ -1931,30 +1945,30 @@ function we(t, e, n) {
|
|
|
1931
1945
|
return f.map((v) => {
|
|
1932
1946
|
if (!v.isToken) return v.value;
|
|
1933
1947
|
const x = v.value;
|
|
1934
|
-
(
|
|
1948
|
+
(ta(x) || ea(x)) && na(x, e, String(t));
|
|
1935
1949
|
const b = je[x[0]];
|
|
1936
1950
|
return b(o, x, r.localize, u);
|
|
1937
1951
|
}).join("");
|
|
1938
1952
|
}
|
|
1939
|
-
function
|
|
1940
|
-
const e = t.match(
|
|
1941
|
-
return e ? e[1].replace(
|
|
1953
|
+
function ua(t) {
|
|
1954
|
+
const e = t.match(sa);
|
|
1955
|
+
return e ? e[1].replace(oa, "'") : t;
|
|
1942
1956
|
}
|
|
1943
1957
|
function ke(t, e) {
|
|
1944
|
-
const a =
|
|
1958
|
+
const a = pa(t);
|
|
1945
1959
|
let r;
|
|
1946
1960
|
if (a.date) {
|
|
1947
|
-
const f =
|
|
1948
|
-
r =
|
|
1961
|
+
const f = ma(a.date, 2);
|
|
1962
|
+
r = ha(f.restDateString, f.year);
|
|
1949
1963
|
}
|
|
1950
1964
|
if (!r || isNaN(r.getTime()))
|
|
1951
1965
|
return /* @__PURE__ */ new Date(NaN);
|
|
1952
1966
|
const i = r.getTime();
|
|
1953
1967
|
let l = 0, o;
|
|
1954
|
-
if (a.time && (l =
|
|
1968
|
+
if (a.time && (l = va(a.time), isNaN(l)))
|
|
1955
1969
|
return /* @__PURE__ */ new Date(NaN);
|
|
1956
1970
|
if (a.timezone) {
|
|
1957
|
-
if (o =
|
|
1971
|
+
if (o = ga(a.timezone), isNaN(o))
|
|
1958
1972
|
return /* @__PURE__ */ new Date(NaN);
|
|
1959
1973
|
} else {
|
|
1960
1974
|
const f = new Date(i + l), u = /* @__PURE__ */ new Date(0);
|
|
@@ -1975,8 +1989,8 @@ const ye = {
|
|
|
1975
1989
|
dateTimeDelimiter: /[T ]/,
|
|
1976
1990
|
timeZoneDelimiter: /[Z ]/i,
|
|
1977
1991
|
timezone: /([Z+-].*)$/
|
|
1978
|
-
},
|
|
1979
|
-
function
|
|
1992
|
+
}, ca = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, da = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, fa = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
1993
|
+
function pa(t) {
|
|
1980
1994
|
const e = {}, n = t.split(ye.dateTimeDelimiter);
|
|
1981
1995
|
let a;
|
|
1982
1996
|
if (n.length > 2)
|
|
@@ -1990,7 +2004,7 @@ function fa(t) {
|
|
|
1990
2004
|
}
|
|
1991
2005
|
return e;
|
|
1992
2006
|
}
|
|
1993
|
-
function
|
|
2007
|
+
function ma(t, e) {
|
|
1994
2008
|
const n = new RegExp(
|
|
1995
2009
|
"^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
|
|
1996
2010
|
), a = t.match(n);
|
|
@@ -2001,64 +2015,64 @@ function pa(t, e) {
|
|
|
2001
2015
|
restDateString: t.slice((a[1] || a[2]).length)
|
|
2002
2016
|
};
|
|
2003
2017
|
}
|
|
2004
|
-
function
|
|
2018
|
+
function ha(t, e) {
|
|
2005
2019
|
if (e === null) return /* @__PURE__ */ new Date(NaN);
|
|
2006
|
-
const n = t.match(
|
|
2020
|
+
const n = t.match(ca);
|
|
2007
2021
|
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
2008
2022
|
const a = !!n[4], r = fe(n[1]), i = fe(n[2]) - 1, l = fe(n[3]), o = fe(n[4]), f = fe(n[5]) - 1;
|
|
2009
2023
|
if (a)
|
|
2010
|
-
return
|
|
2024
|
+
return Da(e, o, f) ? wa(e, o, f) : /* @__PURE__ */ new Date(NaN);
|
|
2011
2025
|
{
|
|
2012
2026
|
const u = /* @__PURE__ */ new Date(0);
|
|
2013
|
-
return !
|
|
2027
|
+
return !ba(e, i, l) || !xa(e, r) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, i, Math.max(r, l)), u);
|
|
2014
2028
|
}
|
|
2015
2029
|
}
|
|
2016
2030
|
function fe(t) {
|
|
2017
2031
|
return t ? parseInt(t) : 1;
|
|
2018
2032
|
}
|
|
2019
|
-
function
|
|
2020
|
-
const e = t.match(
|
|
2033
|
+
function va(t) {
|
|
2034
|
+
const e = t.match(da);
|
|
2021
2035
|
if (!e) return NaN;
|
|
2022
2036
|
const n = Ce(e[1]), a = Ce(e[2]), r = Ce(e[3]);
|
|
2023
|
-
return
|
|
2037
|
+
return Ma(n, a, r) ? n * it + a * rt + r * 1e3 : NaN;
|
|
2024
2038
|
}
|
|
2025
2039
|
function Ce(t) {
|
|
2026
2040
|
return t && parseFloat(t.replace(",", ".")) || 0;
|
|
2027
2041
|
}
|
|
2028
|
-
function
|
|
2042
|
+
function ga(t) {
|
|
2029
2043
|
if (t === "Z") return 0;
|
|
2030
|
-
const e = t.match(
|
|
2044
|
+
const e = t.match(fa);
|
|
2031
2045
|
if (!e) return 0;
|
|
2032
2046
|
const n = e[1] === "+" ? -1 : 1, a = parseInt(e[2]), r = e[3] && parseInt(e[3]) || 0;
|
|
2033
|
-
return
|
|
2047
|
+
return Ta(a, r) ? n * (a * it + r * rt) : NaN;
|
|
2034
2048
|
}
|
|
2035
|
-
function
|
|
2049
|
+
function wa(t, e, n) {
|
|
2036
2050
|
const a = /* @__PURE__ */ new Date(0);
|
|
2037
2051
|
a.setUTCFullYear(t, 0, 4);
|
|
2038
2052
|
const r = a.getUTCDay() || 7, i = (e - 1) * 7 + n + 1 - r;
|
|
2039
2053
|
return a.setUTCDate(a.getUTCDate() + i), a;
|
|
2040
2054
|
}
|
|
2041
|
-
const
|
|
2042
|
-
function
|
|
2055
|
+
const ya = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
2056
|
+
function ct(t) {
|
|
2043
2057
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
2044
2058
|
}
|
|
2045
|
-
function
|
|
2046
|
-
return e >= 0 && e <= 11 && n >= 1 && n <= (
|
|
2059
|
+
function ba(t, e, n) {
|
|
2060
|
+
return e >= 0 && e <= 11 && n >= 1 && n <= (ya[e] || (ct(t) ? 29 : 28));
|
|
2047
2061
|
}
|
|
2048
|
-
function
|
|
2049
|
-
return e >= 1 && e <= (
|
|
2062
|
+
function xa(t, e) {
|
|
2063
|
+
return e >= 1 && e <= (ct(t) ? 366 : 365);
|
|
2050
2064
|
}
|
|
2051
|
-
function
|
|
2065
|
+
function Da(t, e, n) {
|
|
2052
2066
|
return e >= 1 && e <= 53 && n >= 0 && n <= 6;
|
|
2053
2067
|
}
|
|
2054
|
-
function
|
|
2068
|
+
function Ma(t, e, n) {
|
|
2055
2069
|
return t === 24 ? e === 0 && n === 0 : n >= 0 && n < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
|
|
2056
2070
|
}
|
|
2057
|
-
function
|
|
2071
|
+
function Ta(t, e) {
|
|
2058
2072
|
return e >= 0 && e <= 59;
|
|
2059
2073
|
}
|
|
2060
|
-
function
|
|
2061
|
-
const t = new
|
|
2074
|
+
function Sa() {
|
|
2075
|
+
const t = new rn();
|
|
2062
2076
|
function e(n, a) {
|
|
2063
2077
|
var i;
|
|
2064
2078
|
if (!n || typeof n == "string" && n.indexOf("0001") === 0)
|
|
@@ -2066,7 +2080,7 @@ function Ta() {
|
|
|
2066
2080
|
if (n instanceof Date)
|
|
2067
2081
|
return we(n, a);
|
|
2068
2082
|
let r = ke(n);
|
|
2069
|
-
if (r == "Invalid Date" && (r = t.create(n) || new Date(n)),
|
|
2083
|
+
if (r == "Invalid Date" && (r = t.create(n) || new Date(n)), ot(r))
|
|
2070
2084
|
return r = ke(we(r, "yyyy-MM-dd HH:mm:ss")), we(r, a);
|
|
2071
2085
|
if (a.indexOf("HH") === 0 || a.indexOf("hh") === 0) {
|
|
2072
2086
|
const l = (i = n.match(/\d*/g)) == null ? void 0 : i.filter((f) => f !== "").join(":");
|
|
@@ -2080,8 +2094,8 @@ function Ta() {
|
|
|
2080
2094
|
formatTo: e
|
|
2081
2095
|
};
|
|
2082
2096
|
}
|
|
2083
|
-
const
|
|
2084
|
-
function
|
|
2097
|
+
const ka = ["moz", "ms", "webkit"];
|
|
2098
|
+
function Ca() {
|
|
2085
2099
|
let t = 0;
|
|
2086
2100
|
return (e) => {
|
|
2087
2101
|
const n = (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (n - t)), r = setTimeout(() => {
|
|
@@ -2090,17 +2104,17 @@ function ka() {
|
|
|
2090
2104
|
return t = n + a, r;
|
|
2091
2105
|
};
|
|
2092
2106
|
}
|
|
2093
|
-
function
|
|
2107
|
+
function Pa() {
|
|
2094
2108
|
if (typeof window > "u")
|
|
2095
2109
|
return () => 0;
|
|
2096
2110
|
if (window.requestAnimationFrame)
|
|
2097
2111
|
return window.requestAnimationFrame.bind(window);
|
|
2098
|
-
const t =
|
|
2099
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
2112
|
+
const t = ka.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
2113
|
+
return t ? window[`${t}RequestAnimationFrame`] : Ca();
|
|
2100
2114
|
}
|
|
2101
|
-
|
|
2115
|
+
Pa();
|
|
2102
2116
|
var Q = /* @__PURE__ */ ((t) => (t[t.Queue = 0] = "Queue", t[t.Uploading = 1] = "Uploading", t[t.Done = 2] = "Done", t[t.Cancelled = 3] = "Cancelled", t[t.Remove = 4] = "Remove", t[t.Error = 5] = "Error", t))(Q || {});
|
|
2103
|
-
class
|
|
2117
|
+
class Fa {
|
|
2104
2118
|
constructor(e = {}, n = {}) {
|
|
2105
2119
|
/**
|
|
2106
2120
|
* 上传配置
|
|
@@ -2115,7 +2129,7 @@ class Pa {
|
|
|
2115
2129
|
}
|
|
2116
2130
|
}
|
|
2117
2131
|
function He(t, e) {
|
|
2118
|
-
const { formatTo: n } =
|
|
2132
|
+
const { formatTo: n } = Sa();
|
|
2119
2133
|
return n(t, e);
|
|
2120
2134
|
}
|
|
2121
2135
|
function Le(t, e) {
|
|
@@ -2124,7 +2138,7 @@ function Le(t, e) {
|
|
|
2124
2138
|
let n = "";
|
|
2125
2139
|
return t.indexOf(".") === -1 && e.hasOwnProperty(t) ? n = e[t] : n = t.split(".").reduce((a, r) => a ? a[r] : null, e), n;
|
|
2126
2140
|
}
|
|
2127
|
-
function
|
|
2141
|
+
function Oa(t) {
|
|
2128
2142
|
return (e, n) => {
|
|
2129
2143
|
if (!e.hasOwnProperty(t) || e[t] === void 0 || e[t] === null)
|
|
2130
2144
|
return 1;
|
|
@@ -2138,10 +2152,10 @@ function Fa(t) {
|
|
|
2138
2152
|
return a.getTime() > r.getTime() ? -1 : 1;
|
|
2139
2153
|
};
|
|
2140
2154
|
}
|
|
2141
|
-
function
|
|
2155
|
+
function dt(t) {
|
|
2142
2156
|
return (t || []).findIndex((n) => n === "*") === -1;
|
|
2143
2157
|
}
|
|
2144
|
-
function
|
|
2158
|
+
function ft(t) {
|
|
2145
2159
|
return t !== "0 Byte";
|
|
2146
2160
|
}
|
|
2147
2161
|
function me(t) {
|
|
@@ -2150,7 +2164,7 @@ function me(t) {
|
|
|
2150
2164
|
const e = 1024, n = ["Bytes", "KB", "MB", "GB", "TB", "PB"], a = Math.floor(Math.log(t) / Math.log(e));
|
|
2151
2165
|
return parseFloat((t / e ** a).toFixed(2)) + " " + n[a];
|
|
2152
2166
|
}
|
|
2153
|
-
function
|
|
2167
|
+
function pt(t, e) {
|
|
2154
2168
|
return t && (t.hasOwnProperty("allowedContentTypes") && (e.allowedContentTypes = t.allowedContentTypes || ["*"], e.allowedContentTypes = e.allowedContentTypes && e.allowedContentTypes.length > 0 ? e.allowedContentTypes : ["*"]), t.hasOwnProperty("maxUploads") && (e.maxUploads = t.maxUploads || 0), t.hasOwnProperty("maxFileSize") && (e.maxFileSize = me(1024 * 1024 * (parseInt(String(t.maxFileSize), 10) || 1)))), e;
|
|
2155
2169
|
}
|
|
2156
2170
|
function ze(t) {
|
|
@@ -2217,11 +2231,11 @@ function Ea(t) {
|
|
|
2217
2231
|
let e = t;
|
|
2218
2232
|
return t ? (typeof t == "string" && (e = parseInt(t, 10)), me(e)) : "0 Byte";
|
|
2219
2233
|
}
|
|
2220
|
-
const
|
|
2234
|
+
const Na = () => Math.random().toString(36).substring(7);
|
|
2221
2235
|
function Ve(t, e) {
|
|
2222
2236
|
return {
|
|
2223
2237
|
fileIndex: e,
|
|
2224
|
-
id:
|
|
2238
|
+
id: Na(),
|
|
2225
2239
|
name: t.name,
|
|
2226
2240
|
size: t.size,
|
|
2227
2241
|
type: t.type,
|
|
@@ -2253,14 +2267,14 @@ function Ie(t) {
|
|
|
2253
2267
|
e.push(a);
|
|
2254
2268
|
}), e;
|
|
2255
2269
|
}
|
|
2256
|
-
function
|
|
2270
|
+
function Aa(t, e) {
|
|
2257
2271
|
return t ? e <= t * 1024 * 1024 : !0;
|
|
2258
2272
|
}
|
|
2259
|
-
function
|
|
2273
|
+
function Ha(t) {
|
|
2260
2274
|
return t.find((e) => e === "*") !== void 0;
|
|
2261
2275
|
}
|
|
2262
|
-
function
|
|
2263
|
-
if (!t || t.length === 0 ||
|
|
2276
|
+
function _a(t, e) {
|
|
2277
|
+
if (!t || t.length === 0 || Ha(t))
|
|
2264
2278
|
return !0;
|
|
2265
2279
|
if (e.lastIndexOf(".") < 0)
|
|
2266
2280
|
return !1;
|
|
@@ -2269,7 +2283,7 @@ function Ha(t, e) {
|
|
|
2269
2283
|
(a) => a.toLowerCase() === n.toLowerCase()
|
|
2270
2284
|
) > -1;
|
|
2271
2285
|
}
|
|
2272
|
-
function
|
|
2286
|
+
function Ba(t) {
|
|
2273
2287
|
if (t)
|
|
2274
2288
|
return t.split(`
|
|
2275
2289
|
`).map((e) => e.split(/: */, 2)).filter((e) => e[0]).reduce((e, n) => (e[n[0]] = n[1], e), {});
|
|
@@ -2277,7 +2291,7 @@ function _a(t) {
|
|
|
2277
2291
|
function Xe(t) {
|
|
2278
2292
|
return new Date(t * 1e3).toISOString().substr(11, 8);
|
|
2279
2293
|
}
|
|
2280
|
-
class
|
|
2294
|
+
class Ra extends Fa {
|
|
2281
2295
|
upload(e, n, a, r) {
|
|
2282
2296
|
const i = e[0];
|
|
2283
2297
|
return new Promise((l, o) => {
|
|
@@ -2323,7 +2337,7 @@ class Ba extends Pa {
|
|
|
2323
2337
|
} catch {
|
|
2324
2338
|
i.response = m.response;
|
|
2325
2339
|
}
|
|
2326
|
-
i.responseHeaders =
|
|
2340
|
+
i.responseHeaders = Ba(m.getAllResponseHeaders()), l({ type: "done", files: [i] });
|
|
2327
2341
|
}
|
|
2328
2342
|
}, m.open(u, f, !0), m.withCredentials = !!n.withCredentials;
|
|
2329
2343
|
try {
|
|
@@ -2349,7 +2363,7 @@ class Ba extends Pa {
|
|
|
2349
2363
|
});
|
|
2350
2364
|
}
|
|
2351
2365
|
}
|
|
2352
|
-
const
|
|
2366
|
+
const Ya = {
|
|
2353
2367
|
showCloseButton: { type: Boolean, default: !0 },
|
|
2354
2368
|
position: { type: String, default: "top-center" },
|
|
2355
2369
|
timeout: { type: Number, default: 3e3 },
|
|
@@ -2361,16 +2375,16 @@ const Ra = {
|
|
|
2361
2375
|
id: { type: String },
|
|
2362
2376
|
animate: { type: String, default: "fadeIn" },
|
|
2363
2377
|
options: { type: Object }
|
|
2364
|
-
},
|
|
2378
|
+
}, Wa = {
|
|
2365
2379
|
showCloseButton: { type: Boolean, default: !0 },
|
|
2366
2380
|
animate: { type: String, default: "fadeIn" },
|
|
2367
2381
|
options: { type: Object }
|
|
2368
2382
|
}, Pe = /* @__PURE__ */ te({
|
|
2369
2383
|
name: "Toast",
|
|
2370
|
-
props:
|
|
2384
|
+
props: Wa,
|
|
2371
2385
|
emits: ["close", "click"],
|
|
2372
2386
|
setup: (t, e) => {
|
|
2373
|
-
const n =
|
|
2387
|
+
const n = E(t.animate), a = "fadeOut", r = j(() => t.options), i = E(!1), l = j(() => {
|
|
2374
2388
|
const k = {
|
|
2375
2389
|
animated: i.value,
|
|
2376
2390
|
toast: !0
|
|
@@ -2440,7 +2454,7 @@ const Ra = {
|
|
|
2440
2454
|
}
|
|
2441
2455
|
}), be = /* @__PURE__ */ te({
|
|
2442
2456
|
name: "Notify",
|
|
2443
|
-
props:
|
|
2457
|
+
props: Ya,
|
|
2444
2458
|
emits: ["close", "empty"],
|
|
2445
2459
|
setup(t, e) {
|
|
2446
2460
|
const n = j(() => ({
|
|
@@ -2450,7 +2464,7 @@ const Ra = {
|
|
|
2450
2464
|
right: 12,
|
|
2451
2465
|
top: 20,
|
|
2452
2466
|
bottom: 12
|
|
2453
|
-
}, r =
|
|
2467
|
+
}, r = E(), i = E(t.options), l = E(t.showCloseButton), o = j(() => t.position || "bottom-right"), f = j(() => t.timeout != null ? t.timeout : 3e3), u = j(() => {
|
|
2454
2468
|
const m = t.bottom ? t.bottom : a.bottom, D = t.top ? t.top : a.top, v = {
|
|
2455
2469
|
transition: "all 0.2s ease",
|
|
2456
2470
|
left: o.value.indexOf("left") > -1 ? `${t.left ? t.left : a.left}px` : "",
|
|
@@ -2485,10 +2499,10 @@ const Ra = {
|
|
|
2485
2499
|
}, null)]);
|
|
2486
2500
|
}
|
|
2487
2501
|
});
|
|
2488
|
-
class
|
|
2502
|
+
class mt {
|
|
2489
2503
|
constructor() {
|
|
2490
2504
|
L(this, "notifyRefs", []);
|
|
2491
|
-
L(this, "globalConfig",
|
|
2505
|
+
L(this, "globalConfig", xt({}));
|
|
2492
2506
|
}
|
|
2493
2507
|
createNotifyInstance(e) {
|
|
2494
2508
|
const n = this, r = Object.assign({
|
|
@@ -2499,9 +2513,9 @@ class pt {
|
|
|
2499
2513
|
...e
|
|
2500
2514
|
}), i = document.createElement("div");
|
|
2501
2515
|
i.style.display = "contents";
|
|
2502
|
-
const l =
|
|
2516
|
+
const l = Dt({
|
|
2503
2517
|
setup() {
|
|
2504
|
-
const o =
|
|
2518
|
+
const o = E();
|
|
2505
2519
|
function f() {
|
|
2506
2520
|
o.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
2507
2521
|
n.updateNotifyPositionForClose(r, o), l.unmount();
|
|
@@ -2514,16 +2528,16 @@ class pt {
|
|
|
2514
2528
|
r.top = h.bottom;
|
|
2515
2529
|
}
|
|
2516
2530
|
}
|
|
2517
|
-
return
|
|
2531
|
+
return Ee(() => {
|
|
2518
2532
|
document.body.removeChild(i);
|
|
2519
|
-
}),
|
|
2533
|
+
}), Oe(() => {
|
|
2520
2534
|
n.updateNotifyPositionForCreate(r, o);
|
|
2521
|
-
}), () => s(
|
|
2535
|
+
}), () => s(Mt, {
|
|
2522
2536
|
mode: "out-in",
|
|
2523
2537
|
name: "fade",
|
|
2524
2538
|
appear: !0
|
|
2525
2539
|
}, {
|
|
2526
|
-
default: () => [s(be,
|
|
2540
|
+
default: () => [s(be, Tt({
|
|
2527
2541
|
ref: o
|
|
2528
2542
|
}, r, {
|
|
2529
2543
|
onClose: f
|
|
@@ -2596,28 +2610,28 @@ class pt {
|
|
|
2596
2610
|
}), this.notifyRefs.length = 0;
|
|
2597
2611
|
}
|
|
2598
2612
|
}
|
|
2599
|
-
const
|
|
2613
|
+
const ja = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
2600
2614
|
be.install = (t) => {
|
|
2601
2615
|
t.component(be.name, be), t.component(Pe.name, Pe);
|
|
2602
|
-
const e = new
|
|
2603
|
-
t.provide(
|
|
2616
|
+
const e = new mt();
|
|
2617
|
+
t.provide(ja, e), t.provide("FNotifyService", e);
|
|
2604
2618
|
};
|
|
2605
|
-
const
|
|
2619
|
+
const qa = (t = "") => {
|
|
2606
2620
|
let e;
|
|
2607
|
-
return t && oe(t, null) && (e = oe(t)), e || (e = new
|
|
2608
|
-
},
|
|
2621
|
+
return t && oe(t, null) && (e = oe(t)), e || (e = new mt()), e;
|
|
2622
|
+
}, $a = (t = "") => {
|
|
2609
2623
|
let e;
|
|
2610
2624
|
if (t && oe(t, null)) {
|
|
2611
2625
|
const n = oe(t);
|
|
2612
2626
|
n && n() && (e = n());
|
|
2613
2627
|
}
|
|
2614
|
-
return e || (e = new
|
|
2615
|
-
},
|
|
2616
|
-
getNotify:
|
|
2617
|
-
getServerAPI:
|
|
2628
|
+
return e || (e = new Ra()), e;
|
|
2629
|
+
}, ht = {
|
|
2630
|
+
getNotify: qa,
|
|
2631
|
+
getServerAPI: $a
|
|
2618
2632
|
};
|
|
2619
|
-
function
|
|
2620
|
-
const a =
|
|
2633
|
+
function vt(t, e, n) {
|
|
2634
|
+
const a = ht.getNotify(t.notifyServiceToken), r = E(t.fileInfos), {
|
|
2621
2635
|
disabled: i,
|
|
2622
2636
|
uploadVisible: l,
|
|
2623
2637
|
uploadDisabled: o,
|
|
@@ -2628,13 +2642,13 @@ function ht(t, e, n) {
|
|
|
2628
2642
|
previewColumns: m,
|
|
2629
2643
|
uploadEnableMulti: D,
|
|
2630
2644
|
previewButtonDisable: v
|
|
2631
|
-
} = Fe(t), x =
|
|
2645
|
+
} = Fe(t), x = E(!1), b = E([]), k = j(() => b.value.length), A = E([]), T = E("");
|
|
2632
2646
|
function H(c) {
|
|
2633
2647
|
(!c.length || b.value.length !== c.length) && (x.value = !1);
|
|
2634
2648
|
const M = [...c.map((S) => (S.hasOwnProperty("size") || (S.size = void 0), S.hasOwnProperty("createTime") || (S.createTime = void 0), d.value && (S.checked = !!b.value.find((U) => U.id === S.id) || x.value), S))];
|
|
2635
|
-
return M.sort(
|
|
2649
|
+
return M.sort(Oa(u.value)), d.value && (b.value = [...M].filter((S) => S.checked)), M;
|
|
2636
2650
|
}
|
|
2637
|
-
const g =
|
|
2651
|
+
const g = E(H(r.value));
|
|
2638
2652
|
K(() => t.fileInfos, (c) => {
|
|
2639
2653
|
g.value = H(c);
|
|
2640
2654
|
});
|
|
@@ -2719,7 +2733,7 @@ function ht(t, e, n) {
|
|
|
2719
2733
|
r.value = [...w], he(c);
|
|
2720
2734
|
} else c.type === "rejected" && typeof c.file < "u" && he(c);
|
|
2721
2735
|
};
|
|
2722
|
-
return
|
|
2736
|
+
return Ee(() => {
|
|
2723
2737
|
}), {
|
|
2724
2738
|
disabled: i,
|
|
2725
2739
|
uploadVisible: l,
|
|
@@ -2747,7 +2761,7 @@ function ht(t, e, n) {
|
|
|
2747
2761
|
handleStateChange: ve
|
|
2748
2762
|
};
|
|
2749
2763
|
}
|
|
2750
|
-
class
|
|
2764
|
+
class Ua {
|
|
2751
2765
|
constructor(e, n) {
|
|
2752
2766
|
// 记录在上传的附件数组
|
|
2753
2767
|
L(this, "queue");
|
|
@@ -2766,7 +2780,7 @@ class $a {
|
|
|
2766
2780
|
L(this, "extendServerConfig", null);
|
|
2767
2781
|
L(this, "uploadServerSer");
|
|
2768
2782
|
L(this, "uploadContext", null);
|
|
2769
|
-
this.stateChangeRecord = e, this.serverToken = n, this.queue = [], this.uploadServerSer =
|
|
2783
|
+
this.stateChangeRecord = e, this.serverToken = n, this.queue = [], this.uploadServerSer = ht.getServerAPI(this.serverToken);
|
|
2770
2784
|
}
|
|
2771
2785
|
setUploadContext(e) {
|
|
2772
2786
|
this.uploadContext = e;
|
|
@@ -2841,7 +2855,7 @@ class $a {
|
|
|
2841
2855
|
*/
|
|
2842
2856
|
rejectedReason(e, n, a) {
|
|
2843
2857
|
let r = !1, i = "";
|
|
2844
|
-
return this.queue.findIndex((o) => o.name === e) > -1 ? i = "上传失败:已存在同名文件" : this.uploadOpts.allowedContentTypes && !
|
|
2858
|
+
return this.queue.findIndex((o) => o.name === e) > -1 ? i = "上传失败:已存在同名文件" : this.uploadOpts.allowedContentTypes && !_a(this.uploadOpts.allowedContentTypes, e) ? i = `上传失败:只允许上传${this.uploadOpts.allowedContentTypes.join(",")}类型的文档` : this.exceedMaxUpload(n) ? i = `上传失败:文件总个数超出${this.uploadOpts.maxUploads}限制` : Aa(this.uploadOpts.maxFileSize, a) ? a === 0 ? i = "上传失败:不允许文件为空" : r = !0 : i = `上传失败:单个文件大小超出${this.uploadOpts.maxFileSize}MB的限制`, {
|
|
2845
2859
|
allowed: r,
|
|
2846
2860
|
message: i
|
|
2847
2861
|
};
|
|
@@ -2976,23 +2990,23 @@ class $a {
|
|
|
2976
2990
|
const De = /* @__PURE__ */ te({
|
|
2977
2991
|
name: "FUploader",
|
|
2978
2992
|
components: {
|
|
2979
|
-
"f-upload-progress":
|
|
2980
|
-
"f-preview-checkbox":
|
|
2981
|
-
"f-file-select":
|
|
2993
|
+
"f-upload-progress": Et,
|
|
2994
|
+
"f-preview-checkbox": Ze,
|
|
2995
|
+
"f-file-select": Je
|
|
2982
2996
|
},
|
|
2983
2997
|
props: Ae,
|
|
2984
2998
|
emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fileRemovedEvent", "fUploadDoneEvent", "uploadDoneEvent"],
|
|
2985
2999
|
setup(t, e) {
|
|
2986
|
-
const n =
|
|
2987
|
-
|
|
2988
|
-
const r =
|
|
3000
|
+
const n = E(), a = new Ua(n, t.uploadServerToken);
|
|
3001
|
+
St("uploaderService", a);
|
|
3002
|
+
const r = E(t.customInfo), i = pt(t.uploadOptions, {
|
|
2989
3003
|
// 允许上传的文件类型
|
|
2990
3004
|
allowedContentTypes: ["*"],
|
|
2991
3005
|
// 默认不限制附件上传个数
|
|
2992
3006
|
maxUploads: 0,
|
|
2993
3007
|
// 单位KB,默认是12M
|
|
2994
3008
|
maxFileSize: "12MB"
|
|
2995
|
-
}), l =
|
|
3009
|
+
}), l = E(null), {
|
|
2996
3010
|
disabled: o,
|
|
2997
3011
|
uploadVisible: f,
|
|
2998
3012
|
uploadDisabled: u,
|
|
@@ -3017,7 +3031,7 @@ const De = /* @__PURE__ */ te({
|
|
|
3017
3031
|
filePreviewHandler: ae,
|
|
3018
3032
|
fileRemoveHandler: Z,
|
|
3019
3033
|
handleStateChange: re
|
|
3020
|
-
} =
|
|
3034
|
+
} = vt(t, e, l);
|
|
3021
3035
|
K(n, (p) => {
|
|
3022
3036
|
switch (re(p), p.type) {
|
|
3023
3037
|
case "removed":
|
|
@@ -3028,13 +3042,13 @@ const De = /* @__PURE__ */ te({
|
|
|
3028
3042
|
const B = j(() => v.value.length > 0);
|
|
3029
3043
|
function F() {
|
|
3030
3044
|
var p;
|
|
3031
|
-
return
|
|
3045
|
+
return dt((i == null ? void 0 : i.allowedContentTypes) || []) ? s("li", null, [s("span", null, [C("支持类型:")]), s("span", {
|
|
3032
3046
|
class: "support-info--item-detail",
|
|
3033
3047
|
style: "margin-right:4px;"
|
|
3034
3048
|
}, [(p = i.allowedContentTypes) == null ? void 0 : p.join(""), C(",")])]) : "";
|
|
3035
3049
|
}
|
|
3036
3050
|
function q() {
|
|
3037
|
-
return
|
|
3051
|
+
return ft((i == null ? void 0 : i.maxFileSize) || "") ? s("li", null, [s("span", null, [C("单个文件限制:")]), s("span", {
|
|
3038
3052
|
class: "support-info--item-detail"
|
|
3039
3053
|
}, [i.maxFileSize, C(", ")])]) : "";
|
|
3040
3054
|
}
|
|
@@ -3056,7 +3070,7 @@ const De = /* @__PURE__ */ te({
|
|
|
3056
3070
|
}, [F(), q(), ue()])]) : null;
|
|
3057
3071
|
}
|
|
3058
3072
|
function Te(p) {
|
|
3059
|
-
var y,
|
|
3073
|
+
var y, O, $;
|
|
3060
3074
|
return s("div", {
|
|
3061
3075
|
class: "uploadAndpreview--title-container"
|
|
3062
3076
|
}, [s("div", {
|
|
@@ -3067,7 +3081,7 @@ const De = /* @__PURE__ */ te({
|
|
|
3067
3081
|
class: "uploadAndpreview--right"
|
|
3068
3082
|
}, [s("a", {
|
|
3069
3083
|
class: "item-content--title",
|
|
3070
|
-
title: (
|
|
3084
|
+
title: (O = p.file) == null ? void 0 : O.name
|
|
3071
3085
|
}, [(($ = p.file) == null ? void 0 : $.name) || "无名称"]), s(G("f-upload-progress"), {
|
|
3072
3086
|
status: p.type === "done" ? "success" : "active",
|
|
3073
3087
|
percent: Qe(p),
|
|
@@ -3089,10 +3103,10 @@ const De = /* @__PURE__ */ te({
|
|
|
3089
3103
|
onClick: (y) => ae(y, p)
|
|
3090
3104
|
}, [p.name])])]);
|
|
3091
3105
|
}
|
|
3092
|
-
function ve(p, y,
|
|
3106
|
+
function ve(p, y, O) {
|
|
3093
3107
|
return s("div", {
|
|
3094
3108
|
class: "uploadAndpreview--filesize-container"
|
|
3095
|
-
}, [p === "preview" &&
|
|
3109
|
+
}, [p === "preview" && O ? s("span", null, [Ea(O.size)]) : null, p === "upload" && y ? s("span", null, [Qe(y)]) : null]);
|
|
3096
3110
|
}
|
|
3097
3111
|
function c(p, y) {
|
|
3098
3112
|
return y && y.type === "error" ? s("div", {
|
|
@@ -3146,29 +3160,29 @@ const De = /* @__PURE__ */ te({
|
|
|
3146
3160
|
class: "uploadAndpreview--date-container"
|
|
3147
3161
|
}, [p.createTime || ""]);
|
|
3148
3162
|
}
|
|
3149
|
-
function S(p, y,
|
|
3163
|
+
function S(p, y, O, $) {
|
|
3150
3164
|
let Y;
|
|
3151
3165
|
if (p = p || "preview", $.formatter)
|
|
3152
|
-
return Y = $.formatter(
|
|
3153
|
-
if (p === "preview" &&
|
|
3166
|
+
return Y = $.formatter(O[$.field] || "", p, p === "preview" ? O : y, $), Y;
|
|
3167
|
+
if (p === "preview" && O)
|
|
3154
3168
|
switch ($.field) {
|
|
3155
3169
|
case "state":
|
|
3156
3170
|
Y = c("preview", null);
|
|
3157
3171
|
break;
|
|
3158
3172
|
case "name":
|
|
3159
|
-
Y = he(
|
|
3173
|
+
Y = he(O);
|
|
3160
3174
|
break;
|
|
3161
3175
|
case "action":
|
|
3162
|
-
Y = w(
|
|
3176
|
+
Y = w(O);
|
|
3163
3177
|
break;
|
|
3164
3178
|
case "size":
|
|
3165
|
-
Y = ve(p, y,
|
|
3179
|
+
Y = ve(p, y, O);
|
|
3166
3180
|
break;
|
|
3167
3181
|
case "createTime":
|
|
3168
|
-
Y = M(
|
|
3182
|
+
Y = M(O);
|
|
3169
3183
|
break;
|
|
3170
3184
|
default:
|
|
3171
|
-
Y = `<div>${
|
|
3185
|
+
Y = `<div>${O[$.field] || ""} </div>`;
|
|
3172
3186
|
}
|
|
3173
3187
|
if (p === "upload" && y)
|
|
3174
3188
|
switch ($.field) {
|
|
@@ -3179,7 +3193,7 @@ const De = /* @__PURE__ */ te({
|
|
|
3179
3193
|
Y = Te(y);
|
|
3180
3194
|
break;
|
|
3181
3195
|
case "size":
|
|
3182
|
-
Y = ve(p, y,
|
|
3196
|
+
Y = ve(p, y, O);
|
|
3183
3197
|
break;
|
|
3184
3198
|
default:
|
|
3185
3199
|
Y = "";
|
|
@@ -3218,11 +3232,11 @@ const De = /* @__PURE__ */ te({
|
|
|
3218
3232
|
}, [d.value ? null : s("button", {
|
|
3219
3233
|
class: "btn btn-primary f-btn-ml",
|
|
3220
3234
|
disabled: b.value === 0,
|
|
3221
|
-
onClick: (
|
|
3235
|
+
onClick: (O) => N(O)
|
|
3222
3236
|
}, [C("下载")]), t.deleteButtonDisable.value ? null : s("button", {
|
|
3223
3237
|
class: "btn btn-secondary f-btn-ml",
|
|
3224
3238
|
disabled: b.value === 0,
|
|
3225
|
-
onClick: (
|
|
3239
|
+
onClick: (O) => H(O)
|
|
3226
3240
|
}, [C("删除")])]) : null;
|
|
3227
3241
|
}
|
|
3228
3242
|
function _e() {
|
|
@@ -3238,23 +3252,23 @@ const De = /* @__PURE__ */ te({
|
|
|
3238
3252
|
onCheckedChange: (y) => _(y)
|
|
3239
3253
|
}, null) : null, p.title]) : null);
|
|
3240
3254
|
}
|
|
3241
|
-
function
|
|
3255
|
+
function gt() {
|
|
3242
3256
|
return D.value.map((p) => {
|
|
3243
3257
|
var y;
|
|
3244
3258
|
return s("tr", {
|
|
3245
3259
|
class: "uploadAndpreview--upload-item",
|
|
3246
3260
|
id: "uploadAndpreview--upload-item" + (((y = p == null ? void 0 : p.file) == null ? void 0 : y.id) || "")
|
|
3247
|
-
}, [m.value.map((
|
|
3261
|
+
}, [m.value.map((O) => {
|
|
3248
3262
|
var $;
|
|
3249
3263
|
return s("td", {
|
|
3250
|
-
class: [!o.value &&
|
|
3251
|
-
}, [x.value &&
|
|
3264
|
+
class: [!o.value && O.checkbox && O.checkbox ? "td--hascheckbox" : ""]
|
|
3265
|
+
}, [x.value && O.checkbox ? s(G("f-preview-checkbox"), {
|
|
3252
3266
|
id: ($ = p == null ? void 0 : p.file) == null ? void 0 : $.id,
|
|
3253
3267
|
checked: p.checked,
|
|
3254
3268
|
disabled: p.type !== "done",
|
|
3255
3269
|
class: "preview-checkbox",
|
|
3256
3270
|
onCheckedChange: (Y) => g(Y)
|
|
3257
|
-
}, null) : null, V(
|
|
3271
|
+
}, null) : null, V(O, "upload") ? S("upload", p, null, O) : null]);
|
|
3258
3272
|
})]);
|
|
3259
3273
|
});
|
|
3260
3274
|
}
|
|
@@ -3269,7 +3283,7 @@ const De = /* @__PURE__ */ te({
|
|
|
3269
3283
|
id: p.id,
|
|
3270
3284
|
checked: p.checked,
|
|
3271
3285
|
class: "preview-checkbox",
|
|
3272
|
-
onCheckedChange: (
|
|
3286
|
+
onCheckedChange: (O) => g(O)
|
|
3273
3287
|
}, null) : null, V(y, "preview") ? S("preview", null, p, y) : s("div", {
|
|
3274
3288
|
class: "text-truncate",
|
|
3275
3289
|
innerHTML: S("preview", null, p, y)
|
|
@@ -3293,12 +3307,12 @@ const De = /* @__PURE__ */ te({
|
|
|
3293
3307
|
class: "uploadAndpreview--nodata"
|
|
3294
3308
|
}, [C("无附件信息")]) : "", D.value.length > 0 || B ? s("table", {
|
|
3295
3309
|
class: "table table-bordered uploadAndpreview--table"
|
|
3296
|
-
}, [s("thead", null, [_e()]), s("tbody", null, [
|
|
3310
|
+
}, [s("thead", null, [_e()]), s("tbody", null, [gt(), Be()])]) : null]) : null, B.value ? R() : null]);
|
|
3297
3311
|
}
|
|
3298
3312
|
});
|
|
3299
|
-
function
|
|
3313
|
+
function La(t, e, n) {
|
|
3300
3314
|
var H;
|
|
3301
|
-
const a = "", r = "", i =
|
|
3315
|
+
const a = "", r = "", i = E();
|
|
3302
3316
|
function l() {
|
|
3303
3317
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
3304
3318
|
}
|
|
@@ -3316,7 +3330,7 @@ function Ua(t, e, n) {
|
|
|
3316
3330
|
return null;
|
|
3317
3331
|
if (g.value.schema && g.value.schema.type === "component")
|
|
3318
3332
|
return g.value;
|
|
3319
|
-
const N =
|
|
3333
|
+
const N = E(g == null ? void 0 : g.value.parent), _ = d(N);
|
|
3320
3334
|
return _ || null;
|
|
3321
3335
|
}
|
|
3322
3336
|
function h(g = e) {
|
|
@@ -3335,7 +3349,7 @@ function Ua(t, e, n) {
|
|
|
3335
3349
|
}
|
|
3336
3350
|
function b(g, N) {
|
|
3337
3351
|
const { componentType: _ } = g;
|
|
3338
|
-
let W =
|
|
3352
|
+
let W = tt(_, g, N);
|
|
3339
3353
|
const V = _.toLowerCase().replace(/-/g, "_");
|
|
3340
3354
|
return W && !W.id && W.type === _ && (W.id = `${V}_${Math.random().toString().slice(2, 6)}`), W;
|
|
3341
3355
|
}
|
|
@@ -3372,28 +3386,28 @@ function Ua(t, e, n) {
|
|
|
3372
3386
|
onAcceptMovedChildElement: x,
|
|
3373
3387
|
onChildElementMovedOut: k,
|
|
3374
3388
|
addNewChildComponentSchema: b,
|
|
3375
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
3376
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3389
|
+
triggerBelongedComponentToMoveWhenMoved: E(!1),
|
|
3390
|
+
triggerBelongedComponentToDeleteWhenDeleted: E(!1),
|
|
3377
3391
|
onRemoveComponent: T
|
|
3378
3392
|
}, i;
|
|
3379
3393
|
}
|
|
3380
|
-
const
|
|
3394
|
+
const za = /* @__PURE__ */ te({
|
|
3381
3395
|
name: "FUploaderDesign",
|
|
3382
3396
|
components: {
|
|
3383
|
-
"f-preview-checkbox":
|
|
3384
|
-
"f-file-select":
|
|
3397
|
+
"f-preview-checkbox": Ze,
|
|
3398
|
+
"f-file-select": Je
|
|
3385
3399
|
},
|
|
3386
3400
|
props: Ae,
|
|
3387
3401
|
emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fUploadDoneEvent", "uploadDoneEvent"],
|
|
3388
3402
|
setup(t, e) {
|
|
3389
|
-
const n =
|
|
3403
|
+
const n = E(t.customInfo), a = pt(t.uploadOptions, {
|
|
3390
3404
|
// 允许上传的文件类型
|
|
3391
3405
|
allowedContentTypes: ["*"],
|
|
3392
3406
|
// 默认不限制附件上传个数
|
|
3393
3407
|
maxUploads: 0,
|
|
3394
3408
|
// 单位KB,默认是12M
|
|
3395
3409
|
maxFileSize: "12MB"
|
|
3396
|
-
}), r =
|
|
3410
|
+
}), r = E(null), i = [{
|
|
3397
3411
|
id: "attach01",
|
|
3398
3412
|
name: ""
|
|
3399
3413
|
}, {
|
|
@@ -3409,16 +3423,16 @@ const La = /* @__PURE__ */ te({
|
|
|
3409
3423
|
previewEnableMulti: m,
|
|
3410
3424
|
previewCurrentId: D,
|
|
3411
3425
|
showPreviewStateColumn: v
|
|
3412
|
-
} =
|
|
3426
|
+
} = vt(t, e, r);
|
|
3413
3427
|
function x() {
|
|
3414
3428
|
var F;
|
|
3415
|
-
return
|
|
3429
|
+
return dt((a == null ? void 0 : a.allowedContentTypes) || []) ? s("li", null, [s("span", null, [C("支持类型:")]), s("span", {
|
|
3416
3430
|
class: "support-info--item-detail",
|
|
3417
3431
|
style: "margin-right:4px;"
|
|
3418
3432
|
}, [(F = a.allowedContentTypes) == null ? void 0 : F.join(""), C(",")])]) : null;
|
|
3419
3433
|
}
|
|
3420
3434
|
function b() {
|
|
3421
|
-
return
|
|
3435
|
+
return ft((a == null ? void 0 : a.maxFileSize) || "") ? s("li", null, [s("span", null, [C("单个文件限制:")]), s("span", {
|
|
3422
3436
|
class: "support-info--item-detail"
|
|
3423
3437
|
}, [a.maxFileSize, C(", ")])]) : null;
|
|
3424
3438
|
}
|
|
@@ -3563,10 +3577,10 @@ const La = /* @__PURE__ */ te({
|
|
|
3563
3577
|
class: "preview-checkbox"
|
|
3564
3578
|
}, null) : null, W("preview", F, q)]) : null)]));
|
|
3565
3579
|
}
|
|
3566
|
-
|
|
3580
|
+
kt(() => {
|
|
3567
3581
|
});
|
|
3568
|
-
const Z =
|
|
3569
|
-
return
|
|
3582
|
+
const Z = E(), re = oe("design-item-context"), B = La(Z, re);
|
|
3583
|
+
return Oe(() => {
|
|
3570
3584
|
Z.value.componentInstance = B;
|
|
3571
3585
|
}), e.expose(B.value), () => s("div", {
|
|
3572
3586
|
class: "fv-upload-and-preview",
|
|
@@ -3581,16 +3595,16 @@ const La = /* @__PURE__ */ te({
|
|
|
3581
3595
|
}
|
|
3582
3596
|
});
|
|
3583
3597
|
De.register = (t, e, n, a) => {
|
|
3584
|
-
t.uploader = De, e.uploader =
|
|
3598
|
+
t.uploader = De, e.uploader = nt;
|
|
3585
3599
|
};
|
|
3586
3600
|
De.registerDesigner = (t, e, n) => {
|
|
3587
|
-
t.uploader =
|
|
3601
|
+
t.uploader = za, e.uploader = nt;
|
|
3588
3602
|
};
|
|
3589
|
-
const
|
|
3603
|
+
const Za = Ct(De);
|
|
3590
3604
|
export {
|
|
3591
3605
|
De as FUploader,
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3606
|
+
Fa as UploadServerAPI,
|
|
3607
|
+
Za as default,
|
|
3608
|
+
nt as propsResolver,
|
|
3595
3609
|
Ae as uploaderProps
|
|
3596
3610
|
};
|