@farris/ui-vue 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.esm.js +343 -325
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +27 -27
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var gt = Object.defineProperty;
|
|
2
2
|
var vt = (t, e, n) => e in t ? gt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as re, toRefs as Fe, createVNode as s, Fragment as oe, createTextVNode as C, ref as N, watch as ne, inject as le, getCurrentInstance as wt, onMounted as Oe, onUnmounted as Ne, computed as
|
|
3
|
+
var z = (t, e, n) => vt(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { defineComponent as re, toRefs as Fe, createVNode as s, Fragment as oe, createTextVNode as C, ref as N, watch as ne, inject as le, getCurrentInstance as wt, onMounted as Oe, onUnmounted as Ne, computed as $, reactive as yt, createApp as bt, mergeProps as xt, provide as Dt, resolveComponent as K, onBeforeMount as Mt } from "vue";
|
|
5
5
|
import { cloneDeep as Tt } from "lodash-es";
|
|
6
6
|
import "bignumber.js";
|
|
7
7
|
const St = {
|
|
@@ -170,15 +170,15 @@ const St = {
|
|
|
170
170
|
}
|
|
171
171
|
}), Ze = {}, Ke = {};
|
|
172
172
|
function Ae(t) {
|
|
173
|
-
const { properties: e, title: n } = t, a = Object.keys(e).reduce((
|
|
174
|
-
return a.id = `${n}-${Date.now()}
|
|
173
|
+
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 ? Ae(e[o]) : Tt(e[o].default)), l), {});
|
|
174
|
+
return (!r || !a.find((l) => l == "id")) && (i.id = `${n}-${Date.now()}`), i;
|
|
175
175
|
}
|
|
176
|
-
function Pe(t, e = {}) {
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
let
|
|
180
|
-
const
|
|
181
|
-
return
|
|
176
|
+
function Pe(t, e = {}, n) {
|
|
177
|
+
const a = Ze[t];
|
|
178
|
+
if (a) {
|
|
179
|
+
let r = Ae(a);
|
|
180
|
+
const i = Ke[t];
|
|
181
|
+
return r = i ? i({ getSchemaByType: Pe }, r, e, n) : r, r;
|
|
182
182
|
}
|
|
183
183
|
return null;
|
|
184
184
|
}
|
|
@@ -617,7 +617,7 @@ const Vt = "uploader", It = "A Farris Component", Xt = "object", Gt = {
|
|
|
617
617
|
}, et = _t(He, Ut, zt, Qt, Jt), Zt = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 }, Kt = { sun: 0, mon: 1, tue: 2, wed: 3, thu: 4, fri: 5, sat: 6 };
|
|
618
618
|
class en {
|
|
619
619
|
constructor() {
|
|
620
|
-
|
|
620
|
+
z(this, "regexes", {
|
|
621
621
|
YEAR: "[1-9]\\d{3}",
|
|
622
622
|
MONTH: "1[0-2]|0?[1-9]",
|
|
623
623
|
MONTH2: "1[0-2]|0[1-9]",
|
|
@@ -634,7 +634,7 @@ class en {
|
|
|
634
634
|
AMPM: "am|pm",
|
|
635
635
|
UNIT: "year|month|week|day|hour|minute|second|millisecond"
|
|
636
636
|
});
|
|
637
|
-
|
|
637
|
+
z(this, "patterns", [
|
|
638
638
|
// 2010-03-15
|
|
639
639
|
["iso_8601", this.makePattern("^(_YEAR_)-(_MONTH_)-(_DAY_)$"), "$2/$3/$1"],
|
|
640
640
|
// 3-15-2010
|
|
@@ -737,7 +737,7 @@ class en {
|
|
|
737
737
|
return e == null ? Date.now() : e instanceof Date ? e : this.parse(e);
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function I(t) {
|
|
741
741
|
const e = Object.prototype.toString.call(t);
|
|
742
742
|
return t instanceof Date || typeof t == "object" && e === "[object Date]" ? new t.constructor(+t) : typeof t == "number" || e === "[object Number]" || typeof t == "string" || e === "[object String]" ? new Date(t) : /* @__PURE__ */ new Date(NaN);
|
|
743
743
|
}
|
|
@@ -751,14 +751,14 @@ function Me() {
|
|
|
751
751
|
}
|
|
752
752
|
function pe(t, e) {
|
|
753
753
|
var o, f, u, d;
|
|
754
|
-
const n = Me(), a = (e == null ? void 0 : e.weekStartsOn) ?? ((f = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : f.weekStartsOn) ?? n.weekStartsOn ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) ?? 0, r =
|
|
754
|
+
const n = Me(), a = (e == null ? void 0 : e.weekStartsOn) ?? ((f = (o = e == null ? void 0 : e.locale) == null ? void 0 : o.options) == null ? void 0 : f.weekStartsOn) ?? n.weekStartsOn ?? ((d = (u = n.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) ?? 0, r = I(t), i = r.getDay(), l = (i < a ? 7 : 0) + i - a;
|
|
755
755
|
return r.setDate(r.getDate() - l), r.setHours(0, 0, 0, 0), r;
|
|
756
756
|
}
|
|
757
757
|
function xe(t) {
|
|
758
758
|
return pe(t, { weekStartsOn: 1 });
|
|
759
759
|
}
|
|
760
760
|
function rt(t) {
|
|
761
|
-
const e =
|
|
761
|
+
const e = I(t), n = e.getFullYear(), a = ae(t, 0);
|
|
762
762
|
a.setFullYear(n + 1, 0, 4), a.setHours(0, 0, 0, 0);
|
|
763
763
|
const r = xe(a), i = ae(t, 0);
|
|
764
764
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
@@ -766,11 +766,11 @@ function rt(t) {
|
|
|
766
766
|
return e.getTime() >= r.getTime() ? n + 1 : e.getTime() >= l.getTime() ? n : n - 1;
|
|
767
767
|
}
|
|
768
768
|
function Ye(t) {
|
|
769
|
-
const e =
|
|
769
|
+
const e = I(t);
|
|
770
770
|
return e.setHours(0, 0, 0, 0), e;
|
|
771
771
|
}
|
|
772
772
|
function We(t) {
|
|
773
|
-
const e =
|
|
773
|
+
const e = I(t), n = new Date(
|
|
774
774
|
Date.UTC(
|
|
775
775
|
e.getFullYear(),
|
|
776
776
|
e.getMonth(),
|
|
@@ -797,11 +797,11 @@ function sn(t) {
|
|
|
797
797
|
function it(t) {
|
|
798
798
|
if (!sn(t) && typeof t != "number")
|
|
799
799
|
return !1;
|
|
800
|
-
const e =
|
|
800
|
+
const e = I(t);
|
|
801
801
|
return !isNaN(Number(e));
|
|
802
802
|
}
|
|
803
803
|
function on(t) {
|
|
804
|
-
const e =
|
|
804
|
+
const e = I(t), n = ae(t, 0);
|
|
805
805
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
806
806
|
}
|
|
807
807
|
const ln = {
|
|
@@ -1236,16 +1236,16 @@ const Cn = /^(\d+)(th|st|nd|rd)?/i, Pn = /\d+/i, En = {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
};
|
|
1238
1238
|
function $n(t) {
|
|
1239
|
-
const e =
|
|
1239
|
+
const e = I(t);
|
|
1240
1240
|
return an(e, on(e)) + 1;
|
|
1241
1241
|
}
|
|
1242
1242
|
function qn(t) {
|
|
1243
|
-
const e =
|
|
1243
|
+
const e = I(t), n = +xe(e) - +rn(e);
|
|
1244
1244
|
return Math.round(n / tt) + 1;
|
|
1245
1245
|
}
|
|
1246
1246
|
function st(t, e) {
|
|
1247
1247
|
var d, h, m, x;
|
|
1248
|
-
const n =
|
|
1248
|
+
const n = I(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 ?? ((x = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, l = ae(t, 0);
|
|
1249
1249
|
l.setFullYear(a + 1, 0, i), l.setHours(0, 0, 0, 0);
|
|
1250
1250
|
const o = pe(l, e), f = ae(t, 0);
|
|
1251
1251
|
f.setFullYear(a, 0, i), f.setHours(0, 0, 0, 0);
|
|
@@ -1258,7 +1258,7 @@ function Un(t, e) {
|
|
|
1258
1258
|
return i.setFullYear(r, 0, a), i.setHours(0, 0, 0, 0), pe(i, e);
|
|
1259
1259
|
}
|
|
1260
1260
|
function Ln(t, e) {
|
|
1261
|
-
const n =
|
|
1261
|
+
const n = I(t), a = +pe(n, e) - +Un(n, e);
|
|
1262
1262
|
return Math.round(a / tt) + 1;
|
|
1263
1263
|
}
|
|
1264
1264
|
function P(t, e) {
|
|
@@ -1893,7 +1893,7 @@ function Kn(t, e, n) {
|
|
|
1893
1893
|
const ea = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ta = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, na = /^'([^]*?)'?$/, aa = /''/g, ra = /[a-zA-Z]/;
|
|
1894
1894
|
function we(t, e, n) {
|
|
1895
1895
|
var d, h, m, x;
|
|
1896
|
-
const a = Me(), r = a.locale ?? jn, i = a.firstWeekContainsDate ?? ((h = (d = a.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, l = a.weekStartsOn ?? ((x = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : x.weekStartsOn) ?? 0, o =
|
|
1896
|
+
const a = Me(), r = a.locale ?? jn, i = a.firstWeekContainsDate ?? ((h = (d = a.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, l = a.weekStartsOn ?? ((x = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : x.weekStartsOn) ?? 0, o = I(t);
|
|
1897
1897
|
if (!it(o))
|
|
1898
1898
|
throw new RangeError("Invalid time value");
|
|
1899
1899
|
let f = e.match(ta).map((g) => {
|
|
@@ -2100,17 +2100,17 @@ const Sa = (t) => {
|
|
|
2100
2100
|
n.component(e.name, t);
|
|
2101
2101
|
}, t;
|
|
2102
2102
|
};
|
|
2103
|
-
var
|
|
2103
|
+
var X = /* @__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))(X || {});
|
|
2104
2104
|
class ka {
|
|
2105
2105
|
constructor(e = {}, n = {}) {
|
|
2106
2106
|
/**
|
|
2107
2107
|
* 上传配置
|
|
2108
2108
|
*/
|
|
2109
|
-
|
|
2109
|
+
z(this, "uploadConfig");
|
|
2110
2110
|
/**
|
|
2111
2111
|
* 删除配置
|
|
2112
2112
|
*/
|
|
2113
|
-
|
|
2113
|
+
z(this, "removeConfig");
|
|
2114
2114
|
const a = { type: "config", url: "", timeout: 0, headers: null, data: {} };
|
|
2115
2115
|
this.uploadConfig = Object.assign({}, a, e), this.removeConfig = Object.assign({}, a, n);
|
|
2116
2116
|
}
|
|
@@ -2206,7 +2206,7 @@ function Qe(t) {
|
|
|
2206
2206
|
if (t.type === "done")
|
|
2207
2207
|
return 100;
|
|
2208
2208
|
if (t.file && t.file.progress) {
|
|
2209
|
-
if (t.file.progress.status ===
|
|
2209
|
+
if (t.file.progress.status === X.Uploading) {
|
|
2210
2210
|
const n = ((e = t.file.progress.data) == null ? void 0 : e.percentage) || 5;
|
|
2211
2211
|
return n > 5 ? n : 5;
|
|
2212
2212
|
}
|
|
@@ -2228,7 +2228,7 @@ function Ve(t, e) {
|
|
|
2228
2228
|
type: t.type,
|
|
2229
2229
|
form: new FormData(),
|
|
2230
2230
|
progress: {
|
|
2231
|
-
status:
|
|
2231
|
+
status: X.Queue,
|
|
2232
2232
|
data: {
|
|
2233
2233
|
percentage: 0,
|
|
2234
2234
|
speed: 0,
|
|
@@ -2288,11 +2288,11 @@ class Ha extends ka {
|
|
|
2288
2288
|
m.upload.addEventListener("progress", (M) => {
|
|
2289
2289
|
var O;
|
|
2290
2290
|
if (M.lengthComputable) {
|
|
2291
|
-
const
|
|
2291
|
+
const H = Math.round(M.loaded * 100 / M.total), T = (/* @__PURE__ */ new Date()).getTime() - x;
|
|
2292
2292
|
b = Math.round(M.loaded / T * 1e3), g = ((O = i.progress) == null ? void 0 : O.data) && i.progress.data.startTime || (/* @__PURE__ */ new Date()).getTime(), y = Math.ceil((M.total - M.loaded) / b), i.progress = {
|
|
2293
|
-
status:
|
|
2293
|
+
status: X.Uploading,
|
|
2294
2294
|
data: {
|
|
2295
|
-
percentage:
|
|
2295
|
+
percentage: H,
|
|
2296
2296
|
speed: b,
|
|
2297
2297
|
speedHuman: `${me(b)}/s`,
|
|
2298
2298
|
startTime: g,
|
|
@@ -2308,7 +2308,7 @@ class Ha extends ka {
|
|
|
2308
2308
|
if (m.readyState === XMLHttpRequest.DONE) {
|
|
2309
2309
|
const M = Math.round(i.size / ((/* @__PURE__ */ new Date()).getTime() - g) * 1e3);
|
|
2310
2310
|
i.progress = {
|
|
2311
|
-
status:
|
|
2311
|
+
status: X.Done,
|
|
2312
2312
|
data: {
|
|
2313
2313
|
percentage: 100,
|
|
2314
2314
|
speed: M,
|
|
@@ -2329,11 +2329,11 @@ class Ha extends ka {
|
|
|
2329
2329
|
}, m.open(u, f, !0), m.withCredentials = !!n.withCredentials;
|
|
2330
2330
|
try {
|
|
2331
2331
|
const M = i.nativeFile;
|
|
2332
|
-
Object.keys(h).forEach((
|
|
2332
|
+
Object.keys(h).forEach((H) => m.setRequestHeader(H, h[H]));
|
|
2333
2333
|
let O;
|
|
2334
|
-
n.includeWebKitFormBoundary !== !1 ? (Object.keys(d).forEach((
|
|
2334
|
+
n.includeWebKitFormBoundary !== !1 ? (Object.keys(d).forEach((H) => {
|
|
2335
2335
|
var T;
|
|
2336
|
-
return (T = i.form) == null ? void 0 : T.append(
|
|
2336
|
+
return (T = i.form) == null ? void 0 : T.append(H, d[H]);
|
|
2337
2337
|
}), (A = i.form) == null || A.append(n.fieldName || "file", M, M.name), O = i.form) : O = M, m.send(O);
|
|
2338
2338
|
} catch (M) {
|
|
2339
2339
|
o(M);
|
|
@@ -2371,18 +2371,18 @@ const _a = {
|
|
|
2371
2371
|
props: Ba,
|
|
2372
2372
|
emits: ["close", "click"],
|
|
2373
2373
|
setup: (t, e) => {
|
|
2374
|
-
const n = N(t.animate), a = "fadeOut", r =
|
|
2374
|
+
const n = N(t.animate), a = "fadeOut", r = $(() => t.options), i = N(!1), l = $(() => {
|
|
2375
2375
|
const k = {
|
|
2376
2376
|
animated: i.value,
|
|
2377
2377
|
toast: !0
|
|
2378
2378
|
};
|
|
2379
2379
|
return k[t.animate] = !1, k[a] = i.value, k[r.value.type] = !0, r.value.theme && (k[r.value.theme] = !0), k;
|
|
2380
|
-
}), o =
|
|
2380
|
+
}), o = $(() => {
|
|
2381
2381
|
const M = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`, O = {
|
|
2382
2382
|
"f-icon": !0
|
|
2383
2383
|
};
|
|
2384
2384
|
return O[M] = !0, O;
|
|
2385
|
-
}), f =
|
|
2385
|
+
}), f = $(() => r.value.title || r.value.message), u = $(() => r.value.title && r.value.message), d = $(() => !r.value.title && r.value.message), h = $(() => t.showCloseButton), m = $(() => !!r.value.buttons || !!e.slots.default);
|
|
2386
2386
|
function x(k) {
|
|
2387
2387
|
k.stopPropagation(), k.preventDefault(), i.value = !1, setTimeout(() => {
|
|
2388
2388
|
e.emit("close", r.value);
|
|
@@ -2444,14 +2444,14 @@ const _a = {
|
|
|
2444
2444
|
props: _a,
|
|
2445
2445
|
emits: ["close", "empty"],
|
|
2446
2446
|
setup(t, e) {
|
|
2447
|
-
const n =
|
|
2447
|
+
const n = $(() => ({
|
|
2448
2448
|
"farris-notify": !0
|
|
2449
2449
|
})), a = {
|
|
2450
2450
|
left: 12,
|
|
2451
2451
|
right: 12,
|
|
2452
2452
|
top: 20,
|
|
2453
2453
|
bottom: 12
|
|
2454
|
-
}, r = N(), i = N(t.options), l = N(t.showCloseButton), o =
|
|
2454
|
+
}, r = N(), i = N(t.options), l = N(t.showCloseButton), o = $(() => t.position || "bottom-right"), f = $(() => t.timeout != null ? t.timeout : 3e3), u = $(() => {
|
|
2455
2455
|
const m = t.bottom ? t.bottom : a.bottom, x = t.top ? t.top : a.top, g = {
|
|
2456
2456
|
transition: "all 0.2s ease",
|
|
2457
2457
|
left: o.value.indexOf("left") > -1 ? `${t.left ? t.left : a.left}px` : "",
|
|
@@ -2488,8 +2488,8 @@ const _a = {
|
|
|
2488
2488
|
});
|
|
2489
2489
|
class ft {
|
|
2490
2490
|
constructor() {
|
|
2491
|
-
|
|
2492
|
-
|
|
2491
|
+
z(this, "notifyRefs", []);
|
|
2492
|
+
z(this, "globalConfig", yt({}));
|
|
2493
2493
|
}
|
|
2494
2494
|
createNotifyInstance(e) {
|
|
2495
2495
|
const n = this, r = Object.assign({
|
|
@@ -2623,25 +2623,25 @@ function mt(t, e, n) {
|
|
|
2623
2623
|
previewColumns: m,
|
|
2624
2624
|
uploadEnableMulti: x,
|
|
2625
2625
|
previewButtonDisable: g
|
|
2626
|
-
} = Fe(t), b = N(!1), y = N([]), k =
|
|
2627
|
-
function
|
|
2626
|
+
} = Fe(t), b = N(!1), y = N([]), k = $(() => y.value.length), A = N([]), M = N(""), O = N(H(r.value));
|
|
2627
|
+
function H(c) {
|
|
2628
2628
|
(!c.length || y.value.length !== c.length) && (b.value = !1);
|
|
2629
|
-
const D = [...c.map((S) => (S.hasOwnProperty("size") || (S.size = void 0), S.hasOwnProperty("createTime") || (S.createTime = void 0), d.value && (S.checked = !!y.value.find((
|
|
2629
|
+
const D = [...c.map((S) => (S.hasOwnProperty("size") || (S.size = void 0), S.hasOwnProperty("createTime") || (S.createTime = void 0), d.value && (S.checked = !!y.value.find((L) => L.id === S.id) || b.value), S))];
|
|
2630
2630
|
return D.sort(Ca(u.value)), d.value && (y.value = [...D].filter((S) => S.checked)), D;
|
|
2631
2631
|
}
|
|
2632
2632
|
ne(() => t.fileInfos, (c) => {
|
|
2633
|
-
O.value =
|
|
2633
|
+
O.value = H(c);
|
|
2634
2634
|
});
|
|
2635
2635
|
const T = (c, v) => {
|
|
2636
2636
|
c.stopImmediatePropagation(), e.emit("fileDownloadEvent", { fileInfos: [v], name: "" });
|
|
2637
2637
|
}, B = (c, v) => {
|
|
2638
2638
|
c.stopImmediatePropagation(), !g.value && e.emit("filePreviewEvent", v);
|
|
2639
|
-
},
|
|
2639
|
+
}, _ = (c, v, D) => {
|
|
2640
2640
|
v.checked && (y.value = y.value.filter((S) => S.id !== v.id)), e.emit("fileRemoveEvent", v), D.handleUploadEvent({ type: "remove", file: v });
|
|
2641
|
-
},
|
|
2641
|
+
}, R = (c, v = "preview") => c.formatter ? !0 : v === "preview" ? ["state", "name", "action", "size", "createTime"].findIndex((S) => S === c.field) > -1 : v === "upload" ? ["state", "name", "size"].findIndex((S) => S === c.field) > -1 : !1, Q = (c) => !(c.field === "state" && (o.value || !l.value)), V = (c) => c.lastIndexOf(".") > 0 ? c.substring(0, c.lastIndexOf(".")) : "", G = (c) => {
|
|
2642
2642
|
if (c.stopImmediatePropagation(), k.value > 1) {
|
|
2643
2643
|
let v = "";
|
|
2644
|
-
v =
|
|
2644
|
+
v = V(y.value[0].name), e.emit("fileDownloadEvent", {
|
|
2645
2645
|
fileInfos: y.value,
|
|
2646
2646
|
name: v
|
|
2647
2647
|
});
|
|
@@ -2655,32 +2655,32 @@ function mt(t, e, n) {
|
|
|
2655
2655
|
}), y.value = [...O.value], b.value = !0) : (y.value = [], v.forEach((D) => {
|
|
2656
2656
|
D.checked = !1;
|
|
2657
2657
|
}), b.value = !1), e.emit("previewMultiSelectedEvent", y.value);
|
|
2658
|
-
},
|
|
2658
|
+
}, Y = (c, v) => {
|
|
2659
2659
|
c && (c.stopImmediatePropagation(), c.stopPropagation()), (!M.value || v.id !== M.value) && (M.value = v.id, e.emit("selectedEvent", v));
|
|
2660
2660
|
}, E = (c) => {
|
|
2661
|
-
const v = y.value.findIndex((
|
|
2662
|
-
S && (S.checked = c.checked), c.checked && !D && S && y.value.push(S), !c.checked && D && y.value.splice(v, 1), O.value.length > 0 && (y.value.length === O.value.length ? b.value = !0 : b.value = !1),
|
|
2663
|
-
},
|
|
2661
|
+
const v = y.value.findIndex((L) => L.id === c.id), D = v > -1, S = O.value.find((L) => L.id === c.id);
|
|
2662
|
+
S && (S.checked = c.checked), c.checked && !D && S && y.value.push(S), !c.checked && D && y.value.splice(v, 1), O.value.length > 0 && (y.value.length === O.value.length ? b.value = !0 : b.value = !1), Y(null, S), e.emit("previewMultiSelectedEvent", y.value);
|
|
2663
|
+
}, q = (c) => {
|
|
2664
2664
|
var v;
|
|
2665
2665
|
(v = n == null ? void 0 : n.value) == null || v.handleUploadEvent(c);
|
|
2666
2666
|
}, ue = (c) => {
|
|
2667
|
-
|
|
2668
|
-
},
|
|
2667
|
+
q({ type: "upload", file: c });
|
|
2668
|
+
}, W = (c, v) => {
|
|
2669
2669
|
let D = [];
|
|
2670
2670
|
c.files && c.files.length > 0 ? D = c.files : typeof c.file < "u" && (D = [c.file]), v = v || c.type, D.map((S) => {
|
|
2671
|
-
const
|
|
2671
|
+
const L = A.value.findIndex((J) => {
|
|
2672
2672
|
var ve;
|
|
2673
2673
|
return typeof S < "u" && ((ve = J == null ? void 0 : J.file) == null ? void 0 : ve.id) === S.id;
|
|
2674
2674
|
});
|
|
2675
|
-
|
|
2675
|
+
L > -1 && (A.value[L] = { type: v, file: S });
|
|
2676
2676
|
});
|
|
2677
2677
|
}, Te = (c) => {
|
|
2678
2678
|
if (c.files) {
|
|
2679
2679
|
const v = c.files.map((D) => D.id);
|
|
2680
|
-
A.value = A.value.filter((D) => !(v.findIndex((
|
|
2680
|
+
A.value = A.value.filter((D) => !(v.findIndex((L) => {
|
|
2681
2681
|
var J;
|
|
2682
|
-
return
|
|
2683
|
-
}) > -1)),
|
|
2682
|
+
return L === ((J = D == null ? void 0 : D.file) == null ? void 0 : J.id);
|
|
2683
|
+
}) > -1)), q({
|
|
2684
2684
|
type: "hide",
|
|
2685
2685
|
id: v.join(",")
|
|
2686
2686
|
});
|
|
@@ -2697,9 +2697,9 @@ function mt(t, e, n) {
|
|
|
2697
2697
|
if (c.type === "addedToQueue" && typeof c.file < "u")
|
|
2698
2698
|
A.value.push({ type: c.type, file: c.file }), ue(c.file);
|
|
2699
2699
|
else if (c.type === "start")
|
|
2700
|
-
|
|
2700
|
+
W(c, "start");
|
|
2701
2701
|
else if (c.type === "done") {
|
|
2702
|
-
|
|
2702
|
+
W(c, "done");
|
|
2703
2703
|
const v = (c.files || []).map((D) => ({
|
|
2704
2704
|
checked: !1,
|
|
2705
2705
|
id: D.id,
|
|
@@ -2732,20 +2732,20 @@ function mt(t, e, n) {
|
|
|
2732
2732
|
previewMultiSelectChangeHandler: E,
|
|
2733
2733
|
fileMultiDownloadHandler: G,
|
|
2734
2734
|
selectOrCancelAllHandler: ie,
|
|
2735
|
-
hasColumnHtmlFunc:
|
|
2736
|
-
showPreviewStateColumn:
|
|
2737
|
-
rowSelectedHandler:
|
|
2735
|
+
hasColumnHtmlFunc: R,
|
|
2736
|
+
showPreviewStateColumn: Q,
|
|
2737
|
+
rowSelectedHandler: Y,
|
|
2738
2738
|
fileDownloadHandler: T,
|
|
2739
2739
|
filePreviewHandler: B,
|
|
2740
|
-
fileRemoveHandler:
|
|
2740
|
+
fileRemoveHandler: _,
|
|
2741
2741
|
handleStateChange: ge
|
|
2742
2742
|
};
|
|
2743
2743
|
}
|
|
2744
2744
|
class ja {
|
|
2745
2745
|
constructor(e, n) {
|
|
2746
2746
|
// 记录在上传的附件数组
|
|
2747
|
-
|
|
2748
|
-
|
|
2747
|
+
z(this, "queue");
|
|
2748
|
+
z(this, "uploadOpts", {
|
|
2749
2749
|
// 默认不限制,0代表不限制 Number.POSITIVE_INFINITY
|
|
2750
2750
|
allowedContentTypes: ["*"],
|
|
2751
2751
|
maxUploads: 0,
|
|
@@ -2757,9 +2757,9 @@ class ja {
|
|
|
2757
2757
|
/**
|
|
2758
2758
|
* 服务器端扩展
|
|
2759
2759
|
*/
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2760
|
+
z(this, "extendServerConfig", null);
|
|
2761
|
+
z(this, "uploadServerSer");
|
|
2762
|
+
z(this, "uploadContext", null);
|
|
2763
2763
|
this.stateChangeRecord = e, this.serverToken = n, this.queue = [], this.uploadServerSer = pt.getServerAPI(this.serverToken);
|
|
2764
2764
|
}
|
|
2765
2765
|
setUploadContext(e) {
|
|
@@ -2775,7 +2775,7 @@ class ja {
|
|
|
2775
2775
|
this.queue = this.queue.filter(
|
|
2776
2776
|
(r) => {
|
|
2777
2777
|
var i;
|
|
2778
|
-
return ((i = r.progress) == null ? void 0 : i.status) !==
|
|
2778
|
+
return ((i = r.progress) == null ? void 0 : i.status) !== X.Remove;
|
|
2779
2779
|
}
|
|
2780
2780
|
), e.hasOwnProperty("message") || (e.message = "被删除"), this.stateChangeRecord.value = e;
|
|
2781
2781
|
break;
|
|
@@ -2878,7 +2878,7 @@ class ja {
|
|
|
2878
2878
|
);
|
|
2879
2879
|
if (i !== -1 && this.queue[i] && this.queue[i].progress) {
|
|
2880
2880
|
const { progress: o } = this.queue[i];
|
|
2881
|
-
o && (o.status =
|
|
2881
|
+
o && (o.status = X.Remove);
|
|
2882
2882
|
}
|
|
2883
2883
|
this.serverMethod({ files: [e.file], event: e });
|
|
2884
2884
|
break;
|
|
@@ -2886,7 +2886,7 @@ class ja {
|
|
|
2886
2886
|
const l = this.queue.filter(
|
|
2887
2887
|
(o) => {
|
|
2888
2888
|
var f;
|
|
2889
|
-
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) ===
|
|
2889
|
+
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) === X.Queue;
|
|
2890
2890
|
}
|
|
2891
2891
|
);
|
|
2892
2892
|
l.length && ((a = this.uploadContext) == null || a.emit("stateChange", {
|
|
@@ -2896,10 +2896,10 @@ class ja {
|
|
|
2896
2896
|
}), this.queue = this.queue.filter(
|
|
2897
2897
|
(o) => {
|
|
2898
2898
|
var f;
|
|
2899
|
-
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) !==
|
|
2899
|
+
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) !== X.Queue;
|
|
2900
2900
|
}
|
|
2901
2901
|
)), this.queue.length && (e.type = "remove", this.queue.forEach((o) => {
|
|
2902
|
-
o.progress && (o.progress.status =
|
|
2902
|
+
o.progress && (o.progress.status = X.Remove);
|
|
2903
2903
|
}), this.serverMethod({ files: this.queue, event: e }));
|
|
2904
2904
|
break;
|
|
2905
2905
|
}
|
|
@@ -3007,17 +3007,17 @@ const De = /* @__PURE__ */ re({
|
|
|
3007
3007
|
uploadEnableMulti: A,
|
|
3008
3008
|
previewCurrentId: M,
|
|
3009
3009
|
multiFileRemoveHandler: O,
|
|
3010
|
-
previewMultiSelectChangeHandler:
|
|
3010
|
+
previewMultiSelectChangeHandler: H,
|
|
3011
3011
|
fileMultiDownloadHandler: T,
|
|
3012
3012
|
selectOrCancelAllHandler: B,
|
|
3013
|
-
rowSelectedHandler:
|
|
3014
|
-
hasColumnHtmlFunc:
|
|
3015
|
-
showPreviewStateColumn:
|
|
3016
|
-
fileDownloadHandler:
|
|
3013
|
+
rowSelectedHandler: _,
|
|
3014
|
+
hasColumnHtmlFunc: R,
|
|
3015
|
+
showPreviewStateColumn: Q,
|
|
3016
|
+
fileDownloadHandler: V,
|
|
3017
3017
|
filePreviewHandler: G,
|
|
3018
3018
|
fileRemoveHandler: ee,
|
|
3019
3019
|
handleStateChange: ie
|
|
3020
|
-
} = mt(t, e, l),
|
|
3020
|
+
} = mt(t, e, l), Y = $(() => g.value.length > 0);
|
|
3021
3021
|
function E() {
|
|
3022
3022
|
var p;
|
|
3023
3023
|
return ut((i == null ? void 0 : i.allowedContentTypes) || []) ? s("li", null, [s("span", null, [C("支持类型:")]), s("span", {
|
|
@@ -3025,7 +3025,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3025
3025
|
style: "margin-right:4px;"
|
|
3026
3026
|
}, [(p = i.allowedContentTypes) == null ? void 0 : p.join(""), C(",")])]) : "";
|
|
3027
3027
|
}
|
|
3028
|
-
function
|
|
3028
|
+
function q() {
|
|
3029
3029
|
return ct((i == null ? void 0 : i.maxFileSize) || "") ? s("li", null, [s("span", null, [C("单个文件限制:")]), s("span", {
|
|
3030
3030
|
class: "support-info--item-detail"
|
|
3031
3031
|
}, [i.maxFileSize, C(", ")])]) : "";
|
|
@@ -3035,7 +3035,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3035
3035
|
class: "support-info--item-detail"
|
|
3036
3036
|
}, [i.maxUploads, C("个")])]);
|
|
3037
3037
|
}
|
|
3038
|
-
function
|
|
3038
|
+
function W() {
|
|
3039
3039
|
return f.value && !u.value && !o.value ? s("div", {
|
|
3040
3040
|
class: "ffileupload--support-info"
|
|
3041
3041
|
}, [r.value ? s("ul", {
|
|
@@ -3045,10 +3045,10 @@ const De = /* @__PURE__ */ re({
|
|
|
3045
3045
|
innerHTML: r.value
|
|
3046
3046
|
}, null)])]) : s("ul", {
|
|
3047
3047
|
class: "support-info--wrapper"
|
|
3048
|
-
}, [E(),
|
|
3048
|
+
}, [E(), q(), ue()])]) : null;
|
|
3049
3049
|
}
|
|
3050
3050
|
function Te(p) {
|
|
3051
|
-
var w, F,
|
|
3051
|
+
var w, F, U;
|
|
3052
3052
|
return s("div", {
|
|
3053
3053
|
class: "uploadAndpreview--title-container"
|
|
3054
3054
|
}, [s("div", {
|
|
@@ -3060,7 +3060,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3060
3060
|
}, [s("a", {
|
|
3061
3061
|
class: "item-content--title",
|
|
3062
3062
|
title: (F = p.file) == null ? void 0 : F.name
|
|
3063
|
-
}, [((
|
|
3063
|
+
}, [((U = p.file) == null ? void 0 : U.name) || "无名称"]), s(K("f-upload-progress"), {
|
|
3064
3064
|
status: p.type === "done" ? "success" : "active",
|
|
3065
3065
|
percent: Qe(p),
|
|
3066
3066
|
maxWidth: 300
|
|
@@ -3115,7 +3115,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3115
3115
|
}, [d.value ? "" : s("button", {
|
|
3116
3116
|
class: "btn preview-btn",
|
|
3117
3117
|
title: "下载",
|
|
3118
|
-
onClick: (w) =>
|
|
3118
|
+
onClick: (w) => V(w, p)
|
|
3119
3119
|
}, [s("span", {
|
|
3120
3120
|
class: "f-icon f-icon-enclosure_download"
|
|
3121
3121
|
}, null)]), t.previewButtonDisable ? "" : s("button", {
|
|
@@ -3138,47 +3138,47 @@ const De = /* @__PURE__ */ re({
|
|
|
3138
3138
|
class: "uploadAndpreview--date-container"
|
|
3139
3139
|
}, [p.createTime || ""]);
|
|
3140
3140
|
}
|
|
3141
|
-
function S(p, w, F,
|
|
3142
|
-
let
|
|
3143
|
-
if (p = p || "preview",
|
|
3144
|
-
return
|
|
3141
|
+
function S(p, w, F, U) {
|
|
3142
|
+
let j;
|
|
3143
|
+
if (p = p || "preview", U.formatter)
|
|
3144
|
+
return j = U.formatter(F[U.field] || "", p, p == "preview" ? F : w, U), j;
|
|
3145
3145
|
if (p === "preview" && F)
|
|
3146
|
-
switch (
|
|
3146
|
+
switch (U.field) {
|
|
3147
3147
|
case "state":
|
|
3148
|
-
|
|
3148
|
+
j = c("preview", null);
|
|
3149
3149
|
break;
|
|
3150
3150
|
case "name":
|
|
3151
|
-
|
|
3151
|
+
j = he(F);
|
|
3152
3152
|
break;
|
|
3153
3153
|
case "action":
|
|
3154
|
-
|
|
3154
|
+
j = v(F);
|
|
3155
3155
|
break;
|
|
3156
3156
|
case "size":
|
|
3157
|
-
|
|
3157
|
+
j = ge(p, w, F);
|
|
3158
3158
|
break;
|
|
3159
3159
|
case "createTime":
|
|
3160
|
-
|
|
3160
|
+
j = D(F);
|
|
3161
3161
|
break;
|
|
3162
3162
|
default:
|
|
3163
|
-
|
|
3163
|
+
j = `<div>${F[U.field] || ""} </div>`;
|
|
3164
3164
|
}
|
|
3165
3165
|
if (p === "upload" && w)
|
|
3166
|
-
switch (
|
|
3166
|
+
switch (U.field) {
|
|
3167
3167
|
case "state":
|
|
3168
|
-
|
|
3168
|
+
j = c("upload", w);
|
|
3169
3169
|
break;
|
|
3170
3170
|
case "name":
|
|
3171
|
-
|
|
3171
|
+
j = Te(w);
|
|
3172
3172
|
break;
|
|
3173
3173
|
case "size":
|
|
3174
|
-
|
|
3174
|
+
j = ge(p, w, F);
|
|
3175
3175
|
break;
|
|
3176
3176
|
default:
|
|
3177
|
-
|
|
3177
|
+
j = "";
|
|
3178
3178
|
}
|
|
3179
|
-
return
|
|
3179
|
+
return j;
|
|
3180
3180
|
}
|
|
3181
|
-
function
|
|
3181
|
+
function L() {
|
|
3182
3182
|
return f.value ? s("div", {
|
|
3183
3183
|
class: "header--left-container"
|
|
3184
3184
|
}, [s(K("f-file-select"), {
|
|
@@ -3194,7 +3194,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3194
3194
|
}, null)]) : null;
|
|
3195
3195
|
}
|
|
3196
3196
|
function J() {
|
|
3197
|
-
return !f.value && h.value &&
|
|
3197
|
+
return !f.value && h.value && Y.value ? s("div", {
|
|
3198
3198
|
class: "header--left-container header--countInfo"
|
|
3199
3199
|
}, [s("p", {
|
|
3200
3200
|
class: "m-0"
|
|
@@ -3205,7 +3205,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3205
3205
|
}, [y.value]), C("个)")]) : ""])]) : null;
|
|
3206
3206
|
}
|
|
3207
3207
|
function ve() {
|
|
3208
|
-
return (!d.value || !t.deleteButtonDisable) && h.value &&
|
|
3208
|
+
return (!d.value || !t.deleteButtonDisable) && h.value && Y.value ? s("div", {
|
|
3209
3209
|
class: "header--right-container"
|
|
3210
3210
|
}, [d.value ? null : s("button", {
|
|
3211
3211
|
class: "btn btn-primary f-btn-ml",
|
|
@@ -3218,7 +3218,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3218
3218
|
}, [C("删除")])]) : null;
|
|
3219
3219
|
}
|
|
3220
3220
|
function Be() {
|
|
3221
|
-
return m.value.map((p) =>
|
|
3221
|
+
return m.value.map((p) => Q(p) ? s("th", {
|
|
3222
3222
|
style: {
|
|
3223
3223
|
width: p.width ? p.width + "px" : "auto"
|
|
3224
3224
|
},
|
|
@@ -3237,16 +3237,16 @@ const De = /* @__PURE__ */ re({
|
|
|
3237
3237
|
class: "uploadAndpreview--upload-item",
|
|
3238
3238
|
id: "uploadAndpreview--upload-item" + (((w = p == null ? void 0 : p.file) == null ? void 0 : w.id) || "")
|
|
3239
3239
|
}, [m.value.map((F) => {
|
|
3240
|
-
var
|
|
3240
|
+
var U;
|
|
3241
3241
|
return s("td", {
|
|
3242
3242
|
class: [!o.value && F.checkbox && F.checkbox ? "td--hascheckbox" : ""]
|
|
3243
3243
|
}, [b.value && F.checkbox ? s(K("f-preview-checkbox"), {
|
|
3244
|
-
id: (
|
|
3244
|
+
id: (U = p == null ? void 0 : p.file) == null ? void 0 : U.id,
|
|
3245
3245
|
checked: p.checked,
|
|
3246
3246
|
disabled: p.type !== "done",
|
|
3247
3247
|
class: "preview-checkbox",
|
|
3248
|
-
onCheckedChange: (
|
|
3249
|
-
}, null) : null,
|
|
3248
|
+
onCheckedChange: (j) => H(j)
|
|
3249
|
+
}, null) : null, R(F, "upload") ? S("upload", p, null, F) : null]);
|
|
3250
3250
|
})]);
|
|
3251
3251
|
});
|
|
3252
3252
|
}
|
|
@@ -3254,42 +3254,42 @@ const De = /* @__PURE__ */ re({
|
|
|
3254
3254
|
return g.value.map((p) => s("tr", {
|
|
3255
3255
|
class: ["uploadAndpreview--preview-item", M.value === p.id ? "uploadAndpreview--currentfile" : ""],
|
|
3256
3256
|
id: "uploadAndpreview--preview-item" + p.id,
|
|
3257
|
-
onClick: (w) =>
|
|
3258
|
-
}, [m.value.map((w) =>
|
|
3257
|
+
onClick: (w) => _(w, p)
|
|
3258
|
+
}, [m.value.map((w) => Q(w) ? s("td", {
|
|
3259
3259
|
class: [!o.value && w.checkbox && w.checkbox ? "td--hascheckbox" : ""]
|
|
3260
3260
|
}, [!o.value && b.value && w.checkbox ? s(K("f-preview-checkbox"), {
|
|
3261
3261
|
id: p.id,
|
|
3262
3262
|
checked: p.checked,
|
|
3263
3263
|
class: "preview-checkbox",
|
|
3264
|
-
onCheckedChange: (F) =>
|
|
3265
|
-
}, null) : null,
|
|
3264
|
+
onCheckedChange: (F) => H(F)
|
|
3265
|
+
}, null) : null, R(w, "preview") ? S("preview", null, p, w) : s("div", {
|
|
3266
3266
|
class: "text-truncate",
|
|
3267
3267
|
innerHTML: S("preview", null, p, w)
|
|
3268
3268
|
}, null)]) : null)]));
|
|
3269
3269
|
}
|
|
3270
3270
|
return () => o.value ? s("div", {
|
|
3271
3271
|
class: "fv-upload-and-preview"
|
|
3272
|
-
}, [
|
|
3272
|
+
}, [Y.value ? null : W(), h.value ? s("div", {
|
|
3273
3273
|
class: "uploadAndpreview--content"
|
|
3274
|
-
}, [
|
|
3274
|
+
}, [Y.value ? s("table", {
|
|
3275
3275
|
class: "table table-bordered uploadAndpreview--table"
|
|
3276
3276
|
}, [s("thead", null, [Be()]), s("tbody", null, [Re()])]) : s("p", {
|
|
3277
3277
|
class: "uploadAndpreview--nodata"
|
|
3278
|
-
}, [C("无附件信息")])]) : null,
|
|
3278
|
+
}, [C("无附件信息")])]) : null, Y.value ? W() : null]) : s("div", {
|
|
3279
3279
|
class: "fv-upload-and-preview"
|
|
3280
3280
|
}, [s("div", {
|
|
3281
3281
|
class: "uploadAndpreview--header"
|
|
3282
|
-
}, [
|
|
3282
|
+
}, [L(), J(), ve()]), Y.value ? null : W(), h.value || f.value ? s("div", {
|
|
3283
3283
|
class: "uploadAndpreview--content"
|
|
3284
|
-
}, [(d.value || !f.value) && x.value.length === 0 && !
|
|
3284
|
+
}, [(d.value || !f.value) && x.value.length === 0 && !Y.value ? s("p", {
|
|
3285
3285
|
class: "uploadAndpreview--nodata"
|
|
3286
|
-
}, [C("无附件信息")]) : "", x.value.length > 0 ||
|
|
3286
|
+
}, [C("无附件信息")]) : "", x.value.length > 0 || Y ? s("table", {
|
|
3287
3287
|
class: "table table-bordered uploadAndpreview--table"
|
|
3288
|
-
}, [s("thead", null, [Be()]), s("tbody", null, [ht(), Re()])]) : null]) : null,
|
|
3288
|
+
}, [s("thead", null, [Be()]), s("tbody", null, [ht(), Re()])]) : null]) : null, Y.value ? W() : null]);
|
|
3289
3289
|
}
|
|
3290
3290
|
});
|
|
3291
3291
|
function $a(t, e, n) {
|
|
3292
|
-
var
|
|
3292
|
+
var H;
|
|
3293
3293
|
function a() {
|
|
3294
3294
|
}
|
|
3295
3295
|
const r = "", i = "", l = N();
|
|
@@ -3310,12 +3310,12 @@ function $a(t, e, n) {
|
|
|
3310
3310
|
return null;
|
|
3311
3311
|
if (T.value.schema && T.value.schema.type === "component")
|
|
3312
3312
|
return T.value;
|
|
3313
|
-
const B = N(T == null ? void 0 : T.value.parent),
|
|
3314
|
-
return
|
|
3313
|
+
const B = N(T == null ? void 0 : T.value.parent), _ = h(B);
|
|
3314
|
+
return _ || null;
|
|
3315
3315
|
}
|
|
3316
3316
|
function m(T = e) {
|
|
3317
|
-
const { componentInstance: B, designerItemElementRef:
|
|
3318
|
-
return !B || !B.value ? null : B.value.canMove ?
|
|
3317
|
+
const { componentInstance: B, designerItemElementRef: _ } = T;
|
|
3318
|
+
return !B || !B.value ? null : B.value.canMove ? _ : m(T.parent);
|
|
3319
3319
|
}
|
|
3320
3320
|
function x(T) {
|
|
3321
3321
|
return !!n;
|
|
@@ -3327,18 +3327,18 @@ function $a(t, e, n) {
|
|
|
3327
3327
|
}
|
|
3328
3328
|
function y(T, B) {
|
|
3329
3329
|
}
|
|
3330
|
-
function k(T) {
|
|
3331
|
-
const { componentType:
|
|
3332
|
-
let
|
|
3333
|
-
const
|
|
3334
|
-
return
|
|
3330
|
+
function k(T, B) {
|
|
3331
|
+
const { componentType: _ } = T;
|
|
3332
|
+
let R = Pe(_, T, B);
|
|
3333
|
+
const Q = _.toLowerCase().replace("-", "_");
|
|
3334
|
+
return R && !R.id && R.type === _ && (R.id = `${Q}_${Math.random().toString().slice(2, 6)}`), R;
|
|
3335
3335
|
}
|
|
3336
3336
|
function A(T, B) {
|
|
3337
|
-
const
|
|
3338
|
-
|
|
3339
|
-
let
|
|
3340
|
-
const G =
|
|
3341
|
-
return
|
|
3337
|
+
const _ = String(T.getAttribute("data-controltype")), R = T.getAttribute("data-feature"), Q = R ? JSON.parse(R) : {};
|
|
3338
|
+
Q.parentComponentInstance = l.value;
|
|
3339
|
+
let V = Pe(_, Q);
|
|
3340
|
+
const G = _.toLowerCase().replace("-", "_");
|
|
3341
|
+
return V && !V.id && V.type === _ && (V.id = `${G}_${Math.random().toString().slice(2, 6)}`), V;
|
|
3342
3342
|
}
|
|
3343
3343
|
function M(T) {
|
|
3344
3344
|
}
|
|
@@ -3351,7 +3351,7 @@ function $a(t, e, n) {
|
|
|
3351
3351
|
canNested: !d(),
|
|
3352
3352
|
contents: e == null ? void 0 : e.schema.contents,
|
|
3353
3353
|
elementRef: t,
|
|
3354
|
-
parent: (
|
|
3354
|
+
parent: (H = e == null ? void 0 : e.parent) == null ? void 0 : H.componentInstance,
|
|
3355
3355
|
schema: e == null ? void 0 : e.schema,
|
|
3356
3356
|
styles: r,
|
|
3357
3357
|
designerClass: i,
|
|
@@ -3452,7 +3452,7 @@ const qa = /* @__PURE__ */ re({
|
|
|
3452
3452
|
class: "ffilepreview--preview-block"
|
|
3453
3453
|
}, null)]);
|
|
3454
3454
|
}
|
|
3455
|
-
function
|
|
3455
|
+
function H() {
|
|
3456
3456
|
return s("div", {
|
|
3457
3457
|
class: "uploadAndpreview--state-container"
|
|
3458
3458
|
}, [s("p", {
|
|
@@ -3489,33 +3489,33 @@ const qa = /* @__PURE__ */ re({
|
|
|
3489
3489
|
class: "ffilepreview--preview-block"
|
|
3490
3490
|
}, null)]);
|
|
3491
3491
|
}
|
|
3492
|
-
function
|
|
3493
|
-
let
|
|
3494
|
-
if (E = E || "preview", E === "preview" &&
|
|
3492
|
+
function _(E, q, ue) {
|
|
3493
|
+
let W = null;
|
|
3494
|
+
if (E = E || "preview", E === "preview" && q)
|
|
3495
3495
|
switch (ue.field) {
|
|
3496
3496
|
case "state":
|
|
3497
|
-
|
|
3497
|
+
W = H();
|
|
3498
3498
|
break;
|
|
3499
3499
|
case "name":
|
|
3500
|
-
|
|
3500
|
+
W = M();
|
|
3501
3501
|
break;
|
|
3502
3502
|
case "action":
|
|
3503
|
-
|
|
3503
|
+
W = T();
|
|
3504
3504
|
break;
|
|
3505
3505
|
case "size":
|
|
3506
|
-
|
|
3506
|
+
W = O();
|
|
3507
3507
|
break;
|
|
3508
3508
|
case "createTime":
|
|
3509
|
-
|
|
3509
|
+
W = B();
|
|
3510
3510
|
break;
|
|
3511
3511
|
default:
|
|
3512
|
-
|
|
3512
|
+
W = s("span", {
|
|
3513
3513
|
class: "ffilepreview--preview-block"
|
|
3514
3514
|
}, null);
|
|
3515
3515
|
}
|
|
3516
|
-
return
|
|
3516
|
+
return W;
|
|
3517
3517
|
}
|
|
3518
|
-
function
|
|
3518
|
+
function R() {
|
|
3519
3519
|
return o.value ? s("div", {
|
|
3520
3520
|
class: "header--left-container"
|
|
3521
3521
|
}, [s(K("f-file-select"), {
|
|
@@ -3524,7 +3524,7 @@ const qa = /* @__PURE__ */ re({
|
|
|
3524
3524
|
selectText: t.selectText
|
|
3525
3525
|
}, null)]) : null;
|
|
3526
3526
|
}
|
|
3527
|
-
function
|
|
3527
|
+
function Q() {
|
|
3528
3528
|
return (!u.value || !t.deleteButtonDisable) && d.value ? s("div", {
|
|
3529
3529
|
class: "header--right-container"
|
|
3530
3530
|
}, [u.value ? null : s("button", {
|
|
@@ -3535,7 +3535,7 @@ const qa = /* @__PURE__ */ re({
|
|
|
3535
3535
|
disabled: !0
|
|
3536
3536
|
}, [C("删除")])]) : null;
|
|
3537
3537
|
}
|
|
3538
|
-
function
|
|
3538
|
+
function V() {
|
|
3539
3539
|
return h.value.map((E) => g(E) ? s("th", {
|
|
3540
3540
|
style: {
|
|
3541
3541
|
width: E.width ? E.width + "px" : "auto"
|
|
@@ -3550,27 +3550,27 @@ const qa = /* @__PURE__ */ re({
|
|
|
3550
3550
|
return i.map((E) => s("tr", {
|
|
3551
3551
|
class: ["uploadAndpreview--preview-item", x.value === E.id ? "uploadAndpreview--currentfile" : ""],
|
|
3552
3552
|
id: "uploadAndpreview--preview-item" + E.id
|
|
3553
|
-
}, [h.value.map((
|
|
3554
|
-
class: [!l.value &&
|
|
3555
|
-
}, [!l.value && m.value &&
|
|
3553
|
+
}, [h.value.map((q) => g(q) ? s("td", {
|
|
3554
|
+
class: [!l.value && q.checkbox && q.checkbox ? "td--hascheckbox" : ""]
|
|
3555
|
+
}, [!l.value && m.value && q.checkbox ? s(K("f-preview-checkbox"), {
|
|
3556
3556
|
class: "preview-checkbox"
|
|
3557
|
-
}, null) : null,
|
|
3557
|
+
}, null) : null, _("preview", E, q)]) : null)]));
|
|
3558
3558
|
}
|
|
3559
3559
|
Mt(() => {
|
|
3560
3560
|
});
|
|
3561
|
-
const ee = N(), ie = le("design-item-context"),
|
|
3561
|
+
const ee = N(), ie = le("design-item-context"), Y = $a(ee, ie);
|
|
3562
3562
|
return Oe(() => {
|
|
3563
|
-
ee.value.componentInstance =
|
|
3564
|
-
}), e.expose(
|
|
3563
|
+
ee.value.componentInstance = Y;
|
|
3564
|
+
}), e.expose(Y.value), () => s("div", {
|
|
3565
3565
|
class: "fv-upload-and-preview",
|
|
3566
3566
|
ref: ee
|
|
3567
3567
|
}, [d.value || o.value ? s(oe, null, [l.value ? null : s("div", {
|
|
3568
3568
|
class: "uploadAndpreview--header"
|
|
3569
|
-
}, [
|
|
3569
|
+
}, [R(), Q()]), s("div", {
|
|
3570
3570
|
class: "uploadAndpreview--content"
|
|
3571
3571
|
}, [s("table", {
|
|
3572
3572
|
class: "table table-bordered uploadAndpreview--table"
|
|
3573
|
-
}, [s("thead", null, [
|
|
3573
|
+
}, [s("thead", null, [V()]), s("tbody", null, [G()])])]), A()]) : null]);
|
|
3574
3574
|
}
|
|
3575
3575
|
});
|
|
3576
3576
|
De.register = (t, e, n, a) => {
|