@farris/ui-vue 1.3.0 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +454 -398
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +479 -476
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +255 -252
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +652 -567
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +518 -521
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +659 -553
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +162 -155
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +866 -747
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +371 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1174 -1280
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +340 -991
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +6066 -5847
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3400 -3486
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2328 -2446
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9551 -1200
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +234 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1996 -2630
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +138 -123
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +548 -586
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2871 -3736
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3380 -3645
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10543 -3207
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9775 -1312
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +442 -438
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +587 -807
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +415 -381
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +361 -1024
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2265 -2371
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6425 -6257
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +6164 -5946
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +524 -1474
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +547 -502
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +646 -574
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1181 -2028
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1185 -2027
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +442 -1368
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +238 -235
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1635 -1713
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +791 -716
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12203 -5274
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1873 -520
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +299 -300
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +176 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +715 -659
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1032 -1883
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4767 -5693
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +169 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +490 -1167
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +154 -151
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +575 -1204
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +279 -276
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +478 -428
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2591 -3326
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +442 -439
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +309 -307
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +500 -430
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1391 -1341
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +574 -575
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3422 -3536
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2661 -2764
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +675 -674
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +300 -297
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +454 -1089
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +709 -706
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +54780 -52757
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +5 -4
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +9 -11
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +3 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -41
- package/types/designer-canvas/src/types.d.ts +10 -21
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +6 -1
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +3 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +12 -0
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var wt = (t, e, n) => e in t ?
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
1
|
+
var gt = Object.defineProperty;
|
|
2
|
+
var wt = (t, e, n) => e in t ? gt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var L = (t, e, n) => wt(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 O, watch as K, inject as oe, getCurrentInstance as yt, onMounted as Ee, onUnmounted as Oe, computed as j, reactive as bt, createApp as xt, Transition as Dt, mergeProps as Mt, provide as Tt, resolveComponent as G, onBeforeMount as St } from "vue";
|
|
5
|
+
import { isPlainObject as Re, cloneDeep as kt } from "lodash-es";
|
|
6
6
|
import "bignumber.js";
|
|
7
|
-
|
|
7
|
+
import { withInstall as Ct } from "../common/index.esm.js";
|
|
8
|
+
const Pt = {
|
|
8
9
|
// 是否被选中
|
|
9
10
|
checked: { type: Boolean, default: !1 },
|
|
10
11
|
// 进度条状态 默认'normal'
|
|
11
12
|
id: { type: String, default: "" },
|
|
12
13
|
// 禁用
|
|
13
14
|
disabled: { type: Boolean, default: !1 }
|
|
14
|
-
},
|
|
15
|
+
}, Ft = {
|
|
15
16
|
// 是否显示进度条信息
|
|
16
17
|
showInfo: { type: Boolean, default: !0 },
|
|
17
18
|
// 进度条状态 默认'normal'
|
|
@@ -52,9 +53,9 @@ const Ct = {
|
|
|
52
53
|
* 附件服务器端服务注入的Token
|
|
53
54
|
*/
|
|
54
55
|
uploadServerToken: { type: String, default: "" }
|
|
55
|
-
},
|
|
56
|
+
}, Ot = /* @__PURE__ */ te({
|
|
56
57
|
name: "FUploadProgress",
|
|
57
|
-
props:
|
|
58
|
+
props: Ft,
|
|
58
59
|
setup(t, e) {
|
|
59
60
|
const {
|
|
60
61
|
showInfo: n,
|
|
@@ -80,22 +81,22 @@ const Ct = {
|
|
|
80
81
|
class: "upload-progress-text"
|
|
81
82
|
}, [a.value === "error" || a.value === "success" ? s("span", {
|
|
82
83
|
class: ["upload-progress-text-icon f-icon", "f-icon-" + a.value]
|
|
83
|
-
}, null) : s(
|
|
84
|
+
}, null) : s(se, null, [i.value, C("%")])]) : ""]);
|
|
84
85
|
}
|
|
85
|
-
}),
|
|
86
|
+
}), Ge = /* @__PURE__ */ te({
|
|
86
87
|
name: "FPreviewCheckbox",
|
|
87
|
-
props:
|
|
88
|
+
props: Pt,
|
|
88
89
|
emits: ["checkedChange"],
|
|
89
90
|
setup(t, e) {
|
|
90
91
|
const {
|
|
91
92
|
disabled: n
|
|
92
|
-
} = Fe(t), a =
|
|
93
|
+
} = Fe(t), a = O(t.checked), r = (i) => {
|
|
93
94
|
i.stopPropagation(), n.value || (a.value = !a.value, e.emit("checkedChange", {
|
|
94
95
|
checked: a.value,
|
|
95
96
|
id: t.id
|
|
96
97
|
}));
|
|
97
98
|
};
|
|
98
|
-
return
|
|
99
|
+
return K(() => t.checked, (i) => {
|
|
99
100
|
a.value = i;
|
|
100
101
|
}), () => s("div", {
|
|
101
102
|
class: "preview-checkbox d-inline-flex align-middle"
|
|
@@ -113,14 +114,14 @@ const Ct = {
|
|
|
113
114
|
onMousedown: (i) => i.stopPropagation()
|
|
114
115
|
}, null)])]);
|
|
115
116
|
}
|
|
116
|
-
}), Ze = /* @__PURE__ */
|
|
117
|
+
}), Ze = /* @__PURE__ */ te({
|
|
117
118
|
name: "FFileSelect",
|
|
118
119
|
props: Et,
|
|
119
120
|
emits: ["change", "stateChange"],
|
|
120
121
|
setup(t, e) {
|
|
121
|
-
const n =
|
|
122
|
+
const n = oe("uploaderService");
|
|
122
123
|
n.setUploadContext(e);
|
|
123
|
-
const a = yt(), r =
|
|
124
|
+
const a = yt(), r = O("*");
|
|
124
125
|
let i;
|
|
125
126
|
const l = () => {
|
|
126
127
|
i.files && (e.emit("change", i.files), n.handleFiles(i.files), i.value = null);
|
|
@@ -128,13 +129,13 @@ const Ct = {
|
|
|
128
129
|
function o() {
|
|
129
130
|
i.value = null, n.reset();
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
+
K(() => t.disabled, () => {
|
|
132
133
|
o();
|
|
133
|
-
}),
|
|
134
|
+
}), K(() => t.uploadedCount, (d) => {
|
|
134
135
|
n.setOptions({
|
|
135
136
|
uploadedCount: d
|
|
136
137
|
});
|
|
137
|
-
}),
|
|
138
|
+
}), K(() => t.extendConfig, (d) => {
|
|
138
139
|
n.setExtendServerConfig(d);
|
|
139
140
|
});
|
|
140
141
|
function f(d) {
|
|
@@ -143,13 +144,13 @@ const Ct = {
|
|
|
143
144
|
function u(d) {
|
|
144
145
|
n.handleUploadEvent(d);
|
|
145
146
|
}
|
|
146
|
-
return
|
|
147
|
+
return Ee(() => {
|
|
147
148
|
var d, h;
|
|
148
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(",");
|
|
149
|
-
}),
|
|
150
|
+
}), Oe(() => {
|
|
150
151
|
}), e.expose({
|
|
151
152
|
handleUploadEvent: u
|
|
152
|
-
}), () => s(
|
|
153
|
+
}), () => s(se, null, [s("input", {
|
|
153
154
|
ref: "uploadInput",
|
|
154
155
|
type: "file",
|
|
155
156
|
class: "ffileupload--browser",
|
|
@@ -168,25 +169,29 @@ const Ct = {
|
|
|
168
169
|
style: "top: 2px;position: relative;"
|
|
169
170
|
}, null), t.selectText])]);
|
|
170
171
|
}
|
|
171
|
-
}),
|
|
172
|
-
function
|
|
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
|
|
174
|
-
|
|
172
|
+
}), Je = {}, Ke = {};
|
|
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]) : kt(e[o].default)), l), {});
|
|
175
|
+
if (n && (!r || !a.find((l) => l === "id"))) {
|
|
176
|
+
const l = n.toLowerCase().replace(/-/g, "_");
|
|
177
|
+
i.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
178
|
+
}
|
|
179
|
+
return i;
|
|
175
180
|
}
|
|
176
|
-
function
|
|
177
|
-
const a =
|
|
181
|
+
function et(t, e = {}, n) {
|
|
182
|
+
const a = Je[t];
|
|
178
183
|
if (a) {
|
|
179
|
-
let r =
|
|
180
|
-
const i =
|
|
181
|
-
return r = i ? i({ getSchemaByType:
|
|
184
|
+
let r = Ne(a);
|
|
185
|
+
const i = Ke[t];
|
|
186
|
+
return r = i ? i({ getSchemaByType: et }, r, e, n) : r, r;
|
|
182
187
|
}
|
|
183
188
|
return null;
|
|
184
189
|
}
|
|
185
|
-
function Ot(t, e) {
|
|
186
|
-
const n = Ae(e);
|
|
187
|
-
return Object.keys(t).reduce((a, r) => (a[r] && Ye(a[r]) && Ye(t[r]) ? Object.assign(a[r], t[r]) : a[r] = t[r], a), n), n;
|
|
188
|
-
}
|
|
189
190
|
function Nt(t, e) {
|
|
191
|
+
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;
|
|
193
|
+
}
|
|
194
|
+
function At(t, e) {
|
|
190
195
|
return Object.keys(t).filter((a) => t[a] != null).reduce((a, r) => {
|
|
191
196
|
if (e.has(r)) {
|
|
192
197
|
const i = e.get(r);
|
|
@@ -201,22 +206,22 @@ function Nt(t, e) {
|
|
|
201
206
|
return a;
|
|
202
207
|
}, {});
|
|
203
208
|
}
|
|
204
|
-
function
|
|
205
|
-
const a =
|
|
206
|
-
return
|
|
209
|
+
function Ht(t, e, n = /* @__PURE__ */ new Map()) {
|
|
210
|
+
const a = Nt(t, e);
|
|
211
|
+
return At(a, n);
|
|
207
212
|
}
|
|
208
|
-
function
|
|
213
|
+
function _t(t = {}) {
|
|
209
214
|
function e(u, d, h, m) {
|
|
210
215
|
if (typeof h == "number")
|
|
211
216
|
return m[u].length === h;
|
|
212
217
|
if (typeof h == "object") {
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
215
|
-
return Number(m[u].length) !== Number(
|
|
216
|
-
if (
|
|
217
|
-
return Number(m[u].length) >= Number(
|
|
218
|
-
if (
|
|
219
|
-
return Number(m[u].length) <= Number(
|
|
218
|
+
const D = Object.keys(h)[0], v = h[D];
|
|
219
|
+
if (D === "not")
|
|
220
|
+
return Number(m[u].length) !== Number(v);
|
|
221
|
+
if (D === "moreThan")
|
|
222
|
+
return Number(m[u].length) >= Number(v);
|
|
223
|
+
if (D === "lessThan")
|
|
224
|
+
return Number(m[u].length) <= Number(v);
|
|
220
225
|
}
|
|
221
226
|
return !1;
|
|
222
227
|
}
|
|
@@ -233,14 +238,14 @@ function Ht(t = {}) {
|
|
|
233
238
|
return typeof d == "number" ? [{ target: h, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: h, operator: "getProperty", param: u, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
|
|
234
239
|
if (m === "length")
|
|
235
240
|
return { target: h, operator: "length", param: null, value: d[m] };
|
|
236
|
-
const
|
|
237
|
-
return { target: h, operator: "getProperty", param:
|
|
241
|
+
const D = m, v = d[m];
|
|
242
|
+
return { target: h, operator: "getProperty", param: D, value: v };
|
|
238
243
|
}) : [];
|
|
239
244
|
}
|
|
240
245
|
function i(u) {
|
|
241
246
|
return Object.keys(u).reduce((h, m) => {
|
|
242
|
-
const
|
|
243
|
-
return h.push(...
|
|
247
|
+
const D = r(m, u[m]);
|
|
248
|
+
return h.push(...D), h;
|
|
244
249
|
}, []);
|
|
245
250
|
}
|
|
246
251
|
function l(u, d) {
|
|
@@ -251,23 +256,23 @@ function Ht(t = {}) {
|
|
|
251
256
|
return !1;
|
|
252
257
|
}
|
|
253
258
|
function o(u, d) {
|
|
254
|
-
return i(u).reduce((
|
|
259
|
+
return i(u).reduce((D, v) => D && l(v, d), !0);
|
|
255
260
|
}
|
|
256
261
|
function f(u, d) {
|
|
257
|
-
const h = Object.keys(u), m = h.includes("allOf"),
|
|
262
|
+
const h = Object.keys(u), m = h.includes("allOf"), D = h.includes("anyOf"), v = m || D, k = (v ? u[v ? m ? "allOf" : "anyOf" : "allOf"] : [u]).map((T) => o(T, d));
|
|
258
263
|
return m ? !k.includes(!1) : k.includes(!0);
|
|
259
264
|
}
|
|
260
265
|
return { parseValueSchema: f };
|
|
261
266
|
}
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
function
|
|
265
|
-
return
|
|
266
|
-
const o =
|
|
267
|
+
const Bt = {}, Rt = {};
|
|
268
|
+
_t();
|
|
269
|
+
function Yt(t, e, n = /* @__PURE__ */ new Map(), a = (l, o, f, u) => o, r = {}, i = (l) => l) {
|
|
270
|
+
return Je[e.title] = e, Ke[e.title] = a, Bt[e.title] = r, Rt[e.title] = i, (l = {}) => {
|
|
271
|
+
const o = Ht(l, e, n), f = Object.keys(t).reduce((u, d) => (u[d] = t[d].default, u), {});
|
|
267
272
|
return Object.assign(f, o);
|
|
268
273
|
};
|
|
269
274
|
}
|
|
270
|
-
const
|
|
275
|
+
const Wt = "https://json-schema.org/draft/2020-12/schema", jt = "https://farris-design.gitee.io/uploader.schema.json", qt = "uploader", $t = "A Farris Component", Ut = "object", Lt = {
|
|
271
276
|
id: {
|
|
272
277
|
description: "The unique identifier for uploader",
|
|
273
278
|
type: "string"
|
|
@@ -319,28 +324,28 @@ const Yt = "https://json-schema.org/draft/2020-12/schema", Wt = "https://farris-
|
|
|
319
324
|
type: "boolean",
|
|
320
325
|
default: !0
|
|
321
326
|
}
|
|
322
|
-
},
|
|
327
|
+
}, zt = [
|
|
323
328
|
"id",
|
|
324
329
|
"type"
|
|
325
|
-
],
|
|
326
|
-
$schema:
|
|
327
|
-
$id:
|
|
328
|
-
title:
|
|
330
|
+
], Qt = {
|
|
331
|
+
$schema: Wt,
|
|
332
|
+
$id: jt,
|
|
333
|
+
title: qt,
|
|
329
334
|
description: $t,
|
|
330
|
-
type:
|
|
331
|
-
properties:
|
|
332
|
-
required:
|
|
335
|
+
type: Ut,
|
|
336
|
+
properties: Lt,
|
|
337
|
+
required: zt
|
|
333
338
|
};
|
|
334
|
-
function
|
|
339
|
+
function Vt(t, e) {
|
|
335
340
|
return { customClass: e.class, customStyle: e.style };
|
|
336
341
|
}
|
|
337
|
-
const
|
|
338
|
-
["appearance",
|
|
342
|
+
const It = /* @__PURE__ */ new Map([
|
|
343
|
+
["appearance", Vt]
|
|
339
344
|
]);
|
|
340
|
-
function
|
|
345
|
+
function Xt(t, e, n) {
|
|
341
346
|
return e;
|
|
342
347
|
}
|
|
343
|
-
const
|
|
348
|
+
const Gt = "uploader", Zt = "A Farris Component", Jt = "object", Kt = {
|
|
344
349
|
basic: {
|
|
345
350
|
description: "Basic Infomation",
|
|
346
351
|
title: "基本信息",
|
|
@@ -545,12 +550,12 @@ const Xt = "uploader", Gt = "A Farris Component", Jt = "object", Zt = {
|
|
|
545
550
|
}
|
|
546
551
|
}
|
|
547
552
|
}
|
|
548
|
-
},
|
|
549
|
-
title:
|
|
550
|
-
description:
|
|
553
|
+
}, en = {
|
|
554
|
+
title: Gt,
|
|
555
|
+
description: Zt,
|
|
551
556
|
type: Jt,
|
|
552
|
-
categories:
|
|
553
|
-
},
|
|
557
|
+
categories: Kt
|
|
558
|
+
}, Ae = {
|
|
554
559
|
/** 内容区域填充 */
|
|
555
560
|
contentFill: { type: Boolean, default: !1 },
|
|
556
561
|
/** 排序字段 */
|
|
@@ -614,10 +619,10 @@ const Xt = "uploader", Gt = "A Farris Component", Jt = "object", Zt = {
|
|
|
614
619
|
* 提示服务注入的Token
|
|
615
620
|
*/
|
|
616
621
|
notifyServiceToken: { type: String, default: "" }
|
|
617
|
-
}, tt =
|
|
618
|
-
class
|
|
622
|
+
}, tt = Yt(Ae, Qt, It, Xt, en), tn = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 }, nn = { sun: 0, mon: 1, tue: 2, wed: 3, thu: 4, fri: 5, sat: 6 };
|
|
623
|
+
class an {
|
|
619
624
|
constructor() {
|
|
620
|
-
|
|
625
|
+
L(this, "regexes", {
|
|
621
626
|
YEAR: "[1-9]\\d{3}",
|
|
622
627
|
MONTH: "1[0-2]|0?[1-9]",
|
|
623
628
|
MONTH2: "1[0-2]|0[1-9]",
|
|
@@ -634,7 +639,7 @@ class nn {
|
|
|
634
639
|
AMPM: "am|pm",
|
|
635
640
|
UNIT: "year|month|week|day|hour|minute|second|millisecond"
|
|
636
641
|
});
|
|
637
|
-
|
|
642
|
+
L(this, "patterns", [
|
|
638
643
|
// 2010-03-15
|
|
639
644
|
["iso_8601", this.makePattern("^(_YEAR_)-(_MONTH_)-(_DAY_)$"), "$2/$3/$1"],
|
|
640
645
|
// 3-15-2010
|
|
@@ -700,10 +705,10 @@ class nn {
|
|
|
700
705
|
return e = e.replace(/_([A-Z][A-Z0-9]+)_/g, (n, a) => this.regexes[a]), new RegExp(e, "i");
|
|
701
706
|
}
|
|
702
707
|
getMonthByName(e) {
|
|
703
|
-
return
|
|
708
|
+
return tn[String(e).slice(0, 3).toLowerCase()];
|
|
704
709
|
}
|
|
705
710
|
getWeekdayByName(e) {
|
|
706
|
-
return
|
|
711
|
+
return nn[String(e).slice(0, 3).toLowerCase()];
|
|
707
712
|
}
|
|
708
713
|
parse(e) {
|
|
709
714
|
if (!isNaN(Number(e)))
|
|
@@ -737,40 +742,40 @@ class nn {
|
|
|
737
742
|
return e == null ? Date.now() : e instanceof Date ? e : this.parse(e);
|
|
738
743
|
}
|
|
739
744
|
}
|
|
740
|
-
function
|
|
745
|
+
function z(t) {
|
|
741
746
|
const e = Object.prototype.toString.call(t);
|
|
742
747
|
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
748
|
}
|
|
744
|
-
function
|
|
749
|
+
function ee(t, e) {
|
|
745
750
|
return t instanceof Date ? new t.constructor(e) : new Date(e);
|
|
746
751
|
}
|
|
747
|
-
const nt = 6048e5,
|
|
748
|
-
let
|
|
749
|
-
function
|
|
750
|
-
return
|
|
752
|
+
const nt = 6048e5, rn = 864e5, at = 6e4, rt = 36e5;
|
|
753
|
+
let sn = {};
|
|
754
|
+
function Me() {
|
|
755
|
+
return sn;
|
|
751
756
|
}
|
|
752
757
|
function pe(t, e) {
|
|
753
758
|
var o, f, u, d;
|
|
754
|
-
const n =
|
|
759
|
+
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 = z(t), i = r.getDay(), l = (i < a ? 7 : 0) + i - a;
|
|
755
760
|
return r.setDate(r.getDate() - l), r.setHours(0, 0, 0, 0), r;
|
|
756
761
|
}
|
|
757
762
|
function xe(t) {
|
|
758
763
|
return pe(t, { weekStartsOn: 1 });
|
|
759
764
|
}
|
|
760
765
|
function it(t) {
|
|
761
|
-
const e =
|
|
766
|
+
const e = z(t), n = e.getFullYear(), a = ee(t, 0);
|
|
762
767
|
a.setFullYear(n + 1, 0, 4), a.setHours(0, 0, 0, 0);
|
|
763
|
-
const r = xe(a), i =
|
|
768
|
+
const r = xe(a), i = ee(t, 0);
|
|
764
769
|
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
765
770
|
const l = xe(i);
|
|
766
771
|
return e.getTime() >= r.getTime() ? n + 1 : e.getTime() >= l.getTime() ? n : n - 1;
|
|
767
772
|
}
|
|
768
|
-
function
|
|
769
|
-
const e =
|
|
773
|
+
function Ye(t) {
|
|
774
|
+
const e = z(t);
|
|
770
775
|
return e.setHours(0, 0, 0, 0), e;
|
|
771
776
|
}
|
|
772
|
-
function
|
|
773
|
-
const e =
|
|
777
|
+
function We(t) {
|
|
778
|
+
const e = z(t), n = new Date(
|
|
774
779
|
Date.UTC(
|
|
775
780
|
e.getFullYear(),
|
|
776
781
|
e.getMonth(),
|
|
@@ -783,28 +788,28 @@ function je(t) {
|
|
|
783
788
|
);
|
|
784
789
|
return n.setUTCFullYear(e.getFullYear()), +t - +n;
|
|
785
790
|
}
|
|
786
|
-
function
|
|
787
|
-
const n =
|
|
788
|
-
return Math.round((r - i) /
|
|
791
|
+
function on(t, e) {
|
|
792
|
+
const n = Ye(t), a = Ye(e), r = +n - We(n), i = +a - We(a);
|
|
793
|
+
return Math.round((r - i) / rn);
|
|
789
794
|
}
|
|
790
|
-
function
|
|
791
|
-
const e = it(t), n =
|
|
795
|
+
function ln(t) {
|
|
796
|
+
const e = it(t), n = ee(t, 0);
|
|
792
797
|
return n.setFullYear(e, 0, 4), n.setHours(0, 0, 0, 0), xe(n);
|
|
793
798
|
}
|
|
794
|
-
function
|
|
799
|
+
function un(t) {
|
|
795
800
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
796
801
|
}
|
|
797
802
|
function st(t) {
|
|
798
|
-
if (!
|
|
803
|
+
if (!un(t) && typeof t != "number")
|
|
799
804
|
return !1;
|
|
800
|
-
const e =
|
|
805
|
+
const e = z(t);
|
|
801
806
|
return !isNaN(Number(e));
|
|
802
807
|
}
|
|
803
|
-
function
|
|
804
|
-
const e =
|
|
808
|
+
function cn(t) {
|
|
809
|
+
const e = z(t), n = ee(t, 0);
|
|
805
810
|
return n.setFullYear(e.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
806
811
|
}
|
|
807
|
-
const
|
|
812
|
+
const dn = {
|
|
808
813
|
lessThanXSeconds: {
|
|
809
814
|
one: "less than a second",
|
|
810
815
|
other: "less than {{count}} seconds"
|
|
@@ -866,9 +871,9 @@ const cn = {
|
|
|
866
871
|
one: "almost 1 year",
|
|
867
872
|
other: "almost {{count}} years"
|
|
868
873
|
}
|
|
869
|
-
},
|
|
874
|
+
}, fn = (t, e, n) => {
|
|
870
875
|
let a;
|
|
871
|
-
const r =
|
|
876
|
+
const r = dn[t];
|
|
872
877
|
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;
|
|
873
878
|
};
|
|
874
879
|
function Se(t) {
|
|
@@ -877,32 +882,32 @@ function Se(t) {
|
|
|
877
882
|
return t.formats[n] || t.formats[t.defaultWidth];
|
|
878
883
|
};
|
|
879
884
|
}
|
|
880
|
-
const
|
|
885
|
+
const pn = {
|
|
881
886
|
full: "EEEE, MMMM do, y",
|
|
882
887
|
long: "MMMM do, y",
|
|
883
888
|
medium: "MMM d, y",
|
|
884
889
|
short: "MM/dd/yyyy"
|
|
885
|
-
},
|
|
890
|
+
}, mn = {
|
|
886
891
|
full: "h:mm:ss a zzzz",
|
|
887
892
|
long: "h:mm:ss a z",
|
|
888
893
|
medium: "h:mm:ss a",
|
|
889
894
|
short: "h:mm a"
|
|
890
|
-
},
|
|
895
|
+
}, hn = {
|
|
891
896
|
full: "{{date}} 'at' {{time}}",
|
|
892
897
|
long: "{{date}} 'at' {{time}}",
|
|
893
898
|
medium: "{{date}}, {{time}}",
|
|
894
899
|
short: "{{date}}, {{time}}"
|
|
895
|
-
},
|
|
900
|
+
}, vn = {
|
|
896
901
|
date: Se({
|
|
897
|
-
formats:
|
|
902
|
+
formats: pn,
|
|
898
903
|
defaultWidth: "full"
|
|
899
904
|
}),
|
|
900
905
|
time: Se({
|
|
901
|
-
formats:
|
|
906
|
+
formats: mn,
|
|
902
907
|
defaultWidth: "full"
|
|
903
908
|
}),
|
|
904
909
|
dateTime: Se({
|
|
905
|
-
formats:
|
|
910
|
+
formats: hn,
|
|
906
911
|
defaultWidth: "full"
|
|
907
912
|
})
|
|
908
913
|
}, gn = {
|
|
@@ -912,7 +917,7 @@ const fn = {
|
|
|
912
917
|
tomorrow: "'tomorrow at' p",
|
|
913
918
|
nextWeek: "eeee 'at' p",
|
|
914
919
|
other: "P"
|
|
915
|
-
},
|
|
920
|
+
}, wn = (t, e, n, a) => gn[t];
|
|
916
921
|
function ce(t) {
|
|
917
922
|
return (e, n) => {
|
|
918
923
|
const a = n != null && n.context ? String(n.context) : "standalone";
|
|
@@ -928,15 +933,15 @@ function ce(t) {
|
|
|
928
933
|
return r[i];
|
|
929
934
|
};
|
|
930
935
|
}
|
|
931
|
-
const
|
|
936
|
+
const yn = {
|
|
932
937
|
narrow: ["B", "A"],
|
|
933
938
|
abbreviated: ["BC", "AD"],
|
|
934
939
|
wide: ["Before Christ", "Anno Domini"]
|
|
935
|
-
},
|
|
940
|
+
}, bn = {
|
|
936
941
|
narrow: ["1", "2", "3", "4"],
|
|
937
942
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
938
943
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
939
|
-
},
|
|
944
|
+
}, xn = {
|
|
940
945
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
941
946
|
abbreviated: [
|
|
942
947
|
"Jan",
|
|
@@ -966,7 +971,7 @@ const wn = {
|
|
|
966
971
|
"November",
|
|
967
972
|
"December"
|
|
968
973
|
]
|
|
969
|
-
},
|
|
974
|
+
}, Dn = {
|
|
970
975
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
971
976
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
972
977
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -979,7 +984,7 @@ const wn = {
|
|
|
979
984
|
"Friday",
|
|
980
985
|
"Saturday"
|
|
981
986
|
]
|
|
982
|
-
},
|
|
987
|
+
}, Mn = {
|
|
983
988
|
narrow: {
|
|
984
989
|
am: "a",
|
|
985
990
|
pm: "p",
|
|
@@ -1041,7 +1046,7 @@ const wn = {
|
|
|
1041
1046
|
evening: "in the evening",
|
|
1042
1047
|
night: "at night"
|
|
1043
1048
|
}
|
|
1044
|
-
},
|
|
1049
|
+
}, Sn = (t, e) => {
|
|
1045
1050
|
const n = Number(t), a = n % 100;
|
|
1046
1051
|
if (a > 20 || a < 10)
|
|
1047
1052
|
switch (a % 10) {
|
|
@@ -1053,27 +1058,27 @@ const wn = {
|
|
|
1053
1058
|
return n + "rd";
|
|
1054
1059
|
}
|
|
1055
1060
|
return n + "th";
|
|
1056
|
-
},
|
|
1057
|
-
ordinalNumber:
|
|
1061
|
+
}, kn = {
|
|
1062
|
+
ordinalNumber: Sn,
|
|
1058
1063
|
era: ce({
|
|
1059
|
-
values:
|
|
1064
|
+
values: yn,
|
|
1060
1065
|
defaultWidth: "wide"
|
|
1061
1066
|
}),
|
|
1062
1067
|
quarter: ce({
|
|
1063
|
-
values:
|
|
1068
|
+
values: bn,
|
|
1064
1069
|
defaultWidth: "wide",
|
|
1065
1070
|
argumentCallback: (t) => t - 1
|
|
1066
1071
|
}),
|
|
1067
1072
|
month: ce({
|
|
1068
|
-
values:
|
|
1073
|
+
values: xn,
|
|
1069
1074
|
defaultWidth: "wide"
|
|
1070
1075
|
}),
|
|
1071
1076
|
day: ce({
|
|
1072
|
-
values:
|
|
1077
|
+
values: Dn,
|
|
1073
1078
|
defaultWidth: "wide"
|
|
1074
1079
|
}),
|
|
1075
1080
|
dayPeriod: ce({
|
|
1076
|
-
values:
|
|
1081
|
+
values: Mn,
|
|
1077
1082
|
defaultWidth: "wide",
|
|
1078
1083
|
formattingValues: Tn,
|
|
1079
1084
|
defaultFormattingWidth: "wide"
|
|
@@ -1084,9 +1089,9 @@ function de(t) {
|
|
|
1084
1089
|
const a = n.width, r = a && t.matchPatterns[a] || t.matchPatterns[t.defaultMatchWidth], i = e.match(r);
|
|
1085
1090
|
if (!i)
|
|
1086
1091
|
return null;
|
|
1087
|
-
const l = i[0], o = a && t.parsePatterns[a] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(o) ?
|
|
1092
|
+
const l = i[0], o = a && t.parsePatterns[a] || t.parsePatterns[t.defaultParseWidth], f = Array.isArray(o) ? Pn(o, (h) => h.test(l)) : (
|
|
1088
1093
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
1089
|
-
|
|
1094
|
+
Cn(o, (h) => h.test(l))
|
|
1090
1095
|
);
|
|
1091
1096
|
let u;
|
|
1092
1097
|
u = t.valueCallback ? t.valueCallback(f) : f, u = n.valueCallback ? (
|
|
@@ -1097,17 +1102,17 @@ function de(t) {
|
|
|
1097
1102
|
return { value: u, rest: d };
|
|
1098
1103
|
};
|
|
1099
1104
|
}
|
|
1100
|
-
function
|
|
1105
|
+
function Cn(t, e) {
|
|
1101
1106
|
for (const n in t)
|
|
1102
1107
|
if (Object.prototype.hasOwnProperty.call(t, n) && e(t[n]))
|
|
1103
1108
|
return n;
|
|
1104
1109
|
}
|
|
1105
|
-
function
|
|
1110
|
+
function Pn(t, e) {
|
|
1106
1111
|
for (let n = 0; n < t.length; n++)
|
|
1107
1112
|
if (e(t[n]))
|
|
1108
1113
|
return n;
|
|
1109
1114
|
}
|
|
1110
|
-
function
|
|
1115
|
+
function Fn(t) {
|
|
1111
1116
|
return (e, n = {}) => {
|
|
1112
1117
|
const a = e.match(t.matchPattern);
|
|
1113
1118
|
if (!a) return null;
|
|
@@ -1119,23 +1124,23 @@ function Pn(t) {
|
|
|
1119
1124
|
return { value: l, rest: o };
|
|
1120
1125
|
};
|
|
1121
1126
|
}
|
|
1122
|
-
const En = /^(\d+)(th|st|nd|rd)?/i,
|
|
1127
|
+
const En = /^(\d+)(th|st|nd|rd)?/i, On = /\d+/i, Nn = {
|
|
1123
1128
|
narrow: /^(b|a)/i,
|
|
1124
1129
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1125
1130
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1126
|
-
}, Nn = {
|
|
1127
|
-
any: [/^b/i, /^(a|c)/i]
|
|
1128
1131
|
}, An = {
|
|
1132
|
+
any: [/^b/i, /^(a|c)/i]
|
|
1133
|
+
}, Hn = {
|
|
1129
1134
|
narrow: /^[1234]/i,
|
|
1130
1135
|
abbreviated: /^q[1234]/i,
|
|
1131
1136
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1132
|
-
}, Hn = {
|
|
1133
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1134
1137
|
}, _n = {
|
|
1138
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1139
|
+
}, Bn = {
|
|
1135
1140
|
narrow: /^[jfmasond]/i,
|
|
1136
1141
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1137
1142
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1138
|
-
},
|
|
1143
|
+
}, Rn = {
|
|
1139
1144
|
narrow: [
|
|
1140
1145
|
/^j/i,
|
|
1141
1146
|
/^f/i,
|
|
@@ -1164,18 +1169,18 @@ const En = /^(\d+)(th|st|nd|rd)?/i, Fn = /\d+/i, On = {
|
|
|
1164
1169
|
/^n/i,
|
|
1165
1170
|
/^d/i
|
|
1166
1171
|
]
|
|
1167
|
-
},
|
|
1172
|
+
}, Yn = {
|
|
1168
1173
|
narrow: /^[smtwf]/i,
|
|
1169
1174
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1170
1175
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1171
1176
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1172
|
-
},
|
|
1177
|
+
}, Wn = {
|
|
1173
1178
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1174
1179
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1175
|
-
},
|
|
1180
|
+
}, jn = {
|
|
1176
1181
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1177
1182
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1178
|
-
},
|
|
1183
|
+
}, qn = {
|
|
1179
1184
|
any: {
|
|
1180
1185
|
am: /^a/i,
|
|
1181
1186
|
pm: /^p/i,
|
|
@@ -1187,85 +1192,85 @@ const En = /^(\d+)(th|st|nd|rd)?/i, Fn = /\d+/i, On = {
|
|
|
1187
1192
|
night: /night/i
|
|
1188
1193
|
}
|
|
1189
1194
|
}, $n = {
|
|
1190
|
-
ordinalNumber:
|
|
1195
|
+
ordinalNumber: Fn({
|
|
1191
1196
|
matchPattern: En,
|
|
1192
|
-
parsePattern:
|
|
1197
|
+
parsePattern: On,
|
|
1193
1198
|
valueCallback: (t) => parseInt(t, 10)
|
|
1194
1199
|
}),
|
|
1195
1200
|
era: de({
|
|
1196
|
-
matchPatterns:
|
|
1201
|
+
matchPatterns: Nn,
|
|
1197
1202
|
defaultMatchWidth: "wide",
|
|
1198
|
-
parsePatterns:
|
|
1203
|
+
parsePatterns: An,
|
|
1199
1204
|
defaultParseWidth: "any"
|
|
1200
1205
|
}),
|
|
1201
1206
|
quarter: de({
|
|
1202
|
-
matchPatterns:
|
|
1207
|
+
matchPatterns: Hn,
|
|
1203
1208
|
defaultMatchWidth: "wide",
|
|
1204
|
-
parsePatterns:
|
|
1209
|
+
parsePatterns: _n,
|
|
1205
1210
|
defaultParseWidth: "any",
|
|
1206
1211
|
valueCallback: (t) => t + 1
|
|
1207
1212
|
}),
|
|
1208
1213
|
month: de({
|
|
1209
|
-
matchPatterns:
|
|
1214
|
+
matchPatterns: Bn,
|
|
1210
1215
|
defaultMatchWidth: "wide",
|
|
1211
|
-
parsePatterns:
|
|
1216
|
+
parsePatterns: Rn,
|
|
1212
1217
|
defaultParseWidth: "any"
|
|
1213
1218
|
}),
|
|
1214
1219
|
day: de({
|
|
1215
|
-
matchPatterns:
|
|
1220
|
+
matchPatterns: Yn,
|
|
1216
1221
|
defaultMatchWidth: "wide",
|
|
1217
|
-
parsePatterns:
|
|
1222
|
+
parsePatterns: Wn,
|
|
1218
1223
|
defaultParseWidth: "any"
|
|
1219
1224
|
}),
|
|
1220
1225
|
dayPeriod: de({
|
|
1221
|
-
matchPatterns:
|
|
1226
|
+
matchPatterns: jn,
|
|
1222
1227
|
defaultMatchWidth: "any",
|
|
1223
|
-
parsePatterns:
|
|
1228
|
+
parsePatterns: qn,
|
|
1224
1229
|
defaultParseWidth: "any"
|
|
1225
1230
|
})
|
|
1226
|
-
},
|
|
1231
|
+
}, Un = {
|
|
1227
1232
|
code: "en-US",
|
|
1228
|
-
formatDistance:
|
|
1229
|
-
formatLong:
|
|
1230
|
-
formatRelative:
|
|
1231
|
-
localize:
|
|
1233
|
+
formatDistance: fn,
|
|
1234
|
+
formatLong: vn,
|
|
1235
|
+
formatRelative: wn,
|
|
1236
|
+
localize: kn,
|
|
1232
1237
|
match: $n,
|
|
1233
1238
|
options: {
|
|
1234
1239
|
weekStartsOn: 0,
|
|
1235
1240
|
firstWeekContainsDate: 1
|
|
1236
1241
|
}
|
|
1237
1242
|
};
|
|
1238
|
-
function Un(t) {
|
|
1239
|
-
const e = I(t);
|
|
1240
|
-
return sn(e, un(e)) + 1;
|
|
1241
|
-
}
|
|
1242
1243
|
function Ln(t) {
|
|
1243
|
-
const e =
|
|
1244
|
+
const e = z(t);
|
|
1245
|
+
return on(e, cn(e)) + 1;
|
|
1246
|
+
}
|
|
1247
|
+
function zn(t) {
|
|
1248
|
+
const e = z(t), n = +xe(e) - +ln(e);
|
|
1244
1249
|
return Math.round(n / nt) + 1;
|
|
1245
1250
|
}
|
|
1246
1251
|
function ot(t, e) {
|
|
1247
|
-
var d, h, m,
|
|
1248
|
-
const n =
|
|
1252
|
+
var d, h, m, D;
|
|
1253
|
+
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);
|
|
1249
1254
|
l.setFullYear(a + 1, 0, i), l.setHours(0, 0, 0, 0);
|
|
1250
|
-
const o = pe(l, e), f =
|
|
1255
|
+
const o = pe(l, e), f = ee(t, 0);
|
|
1251
1256
|
f.setFullYear(a, 0, i), f.setHours(0, 0, 0, 0);
|
|
1252
1257
|
const u = pe(f, e);
|
|
1253
1258
|
return n.getTime() >= o.getTime() ? a + 1 : n.getTime() >= u.getTime() ? a : a - 1;
|
|
1254
1259
|
}
|
|
1255
|
-
function
|
|
1260
|
+
function Qn(t, e) {
|
|
1256
1261
|
var o, f, u, d;
|
|
1257
|
-
const n =
|
|
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 = ot(t, e), i = ee(t, 0);
|
|
1258
1263
|
return i.setFullYear(r, 0, a), i.setHours(0, 0, 0, 0), pe(i, e);
|
|
1259
1264
|
}
|
|
1260
|
-
function
|
|
1261
|
-
const n =
|
|
1265
|
+
function Vn(t, e) {
|
|
1266
|
+
const n = z(t), a = +pe(n, e) - +Qn(n, e);
|
|
1262
1267
|
return Math.round(a / nt) + 1;
|
|
1263
1268
|
}
|
|
1264
1269
|
function P(t, e) {
|
|
1265
1270
|
const n = t < 0 ? "-" : "", a = Math.abs(t).toString().padStart(e, "0");
|
|
1266
1271
|
return n + a;
|
|
1267
1272
|
}
|
|
1268
|
-
const
|
|
1273
|
+
const X = {
|
|
1269
1274
|
// Year
|
|
1270
1275
|
y(t, e) {
|
|
1271
1276
|
const n = t.getFullYear(), a = n > 0 ? n : 1 - n;
|
|
@@ -1319,7 +1324,7 @@ const Z = {
|
|
|
1319
1324
|
);
|
|
1320
1325
|
return P(r, e.length);
|
|
1321
1326
|
}
|
|
1322
|
-
},
|
|
1327
|
+
}, ie = {
|
|
1323
1328
|
am: "am",
|
|
1324
1329
|
pm: "pm",
|
|
1325
1330
|
midnight: "midnight",
|
|
@@ -1328,7 +1333,7 @@ const Z = {
|
|
|
1328
1333
|
afternoon: "afternoon",
|
|
1329
1334
|
evening: "evening",
|
|
1330
1335
|
night: "night"
|
|
1331
|
-
},
|
|
1336
|
+
}, je = {
|
|
1332
1337
|
// Era
|
|
1333
1338
|
G: function(t, e, n) {
|
|
1334
1339
|
const a = t.getFullYear() > 0 ? 1 : 0;
|
|
@@ -1350,7 +1355,7 @@ const Z = {
|
|
|
1350
1355
|
const a = t.getFullYear(), r = a > 0 ? a : 1 - a;
|
|
1351
1356
|
return n.ordinalNumber(r, { unit: "year" });
|
|
1352
1357
|
}
|
|
1353
|
-
return
|
|
1358
|
+
return X.y(t, e);
|
|
1354
1359
|
},
|
|
1355
1360
|
// Local week-numbering year
|
|
1356
1361
|
Y: function(t, e, n, a) {
|
|
@@ -1441,7 +1446,7 @@ const Z = {
|
|
|
1441
1446
|
switch (e) {
|
|
1442
1447
|
case "M":
|
|
1443
1448
|
case "MM":
|
|
1444
|
-
return
|
|
1449
|
+
return X.M(t, e);
|
|
1445
1450
|
case "Mo":
|
|
1446
1451
|
return n.ordinalNumber(a + 1, { unit: "month" });
|
|
1447
1452
|
case "MMM":
|
|
@@ -1486,21 +1491,21 @@ const Z = {
|
|
|
1486
1491
|
},
|
|
1487
1492
|
// Local week of year
|
|
1488
1493
|
w: function(t, e, n, a) {
|
|
1489
|
-
const r =
|
|
1494
|
+
const r = Vn(t, a);
|
|
1490
1495
|
return e === "wo" ? n.ordinalNumber(r, { unit: "week" }) : P(r, e.length);
|
|
1491
1496
|
},
|
|
1492
1497
|
// ISO week of year
|
|
1493
1498
|
I: function(t, e, n) {
|
|
1494
|
-
const a =
|
|
1499
|
+
const a = zn(t);
|
|
1495
1500
|
return e === "Io" ? n.ordinalNumber(a, { unit: "week" }) : P(a, e.length);
|
|
1496
1501
|
},
|
|
1497
1502
|
// Day of the month
|
|
1498
1503
|
d: function(t, e, n) {
|
|
1499
|
-
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1504
|
+
return e === "do" ? n.ordinalNumber(t.getDate(), { unit: "date" }) : X.d(t, e);
|
|
1500
1505
|
},
|
|
1501
1506
|
// Day of year
|
|
1502
1507
|
D: function(t, e, n) {
|
|
1503
|
-
const a =
|
|
1508
|
+
const a = Ln(t);
|
|
1504
1509
|
return e === "Do" ? n.ordinalNumber(a, { unit: "dayOfYear" }) : P(a, e.length);
|
|
1505
1510
|
},
|
|
1506
1511
|
// Day of week
|
|
@@ -1663,7 +1668,7 @@ const Z = {
|
|
|
1663
1668
|
b: function(t, e, n) {
|
|
1664
1669
|
const a = t.getHours();
|
|
1665
1670
|
let r;
|
|
1666
|
-
switch (a === 12 ? r =
|
|
1671
|
+
switch (a === 12 ? r = ie.noon : a === 0 ? r = ie.midnight : r = a / 12 >= 1 ? "pm" : "am", e) {
|
|
1667
1672
|
case "b":
|
|
1668
1673
|
case "bb":
|
|
1669
1674
|
return n.dayPeriod(r, {
|
|
@@ -1692,7 +1697,7 @@ const Z = {
|
|
|
1692
1697
|
B: function(t, e, n) {
|
|
1693
1698
|
const a = t.getHours();
|
|
1694
1699
|
let r;
|
|
1695
|
-
switch (a >= 17 ? r =
|
|
1700
|
+
switch (a >= 17 ? r = ie.evening : a >= 12 ? r = ie.afternoon : a >= 4 ? r = ie.morning : r = ie.night, e) {
|
|
1696
1701
|
case "B":
|
|
1697
1702
|
case "BB":
|
|
1698
1703
|
case "BBB":
|
|
@@ -1719,11 +1724,11 @@ const Z = {
|
|
|
1719
1724
|
let a = t.getHours() % 12;
|
|
1720
1725
|
return a === 0 && (a = 12), n.ordinalNumber(a, { unit: "hour" });
|
|
1721
1726
|
}
|
|
1722
|
-
return
|
|
1727
|
+
return X.h(t, e);
|
|
1723
1728
|
},
|
|
1724
1729
|
// Hour [0-23]
|
|
1725
1730
|
H: function(t, e, n) {
|
|
1726
|
-
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1731
|
+
return e === "Ho" ? n.ordinalNumber(t.getHours(), { unit: "hour" }) : X.H(t, e);
|
|
1727
1732
|
},
|
|
1728
1733
|
// Hour [0-11]
|
|
1729
1734
|
K: function(t, e, n) {
|
|
@@ -1737,15 +1742,15 @@ const Z = {
|
|
|
1737
1742
|
},
|
|
1738
1743
|
// Minute
|
|
1739
1744
|
m: function(t, e, n) {
|
|
1740
|
-
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1745
|
+
return e === "mo" ? n.ordinalNumber(t.getMinutes(), { unit: "minute" }) : X.m(t, e);
|
|
1741
1746
|
},
|
|
1742
1747
|
// Second
|
|
1743
1748
|
s: function(t, e, n) {
|
|
1744
|
-
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1749
|
+
return e === "so" ? n.ordinalNumber(t.getSeconds(), { unit: "second" }) : X.s(t, e);
|
|
1745
1750
|
},
|
|
1746
1751
|
// Fraction of second
|
|
1747
1752
|
S: function(t, e) {
|
|
1748
|
-
return
|
|
1753
|
+
return X.S(t, e);
|
|
1749
1754
|
},
|
|
1750
1755
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1751
1756
|
X: function(t, e, n) {
|
|
@@ -1754,14 +1759,14 @@ const Z = {
|
|
|
1754
1759
|
return "Z";
|
|
1755
1760
|
switch (e) {
|
|
1756
1761
|
case "X":
|
|
1757
|
-
return
|
|
1762
|
+
return $e(a);
|
|
1758
1763
|
case "XXXX":
|
|
1759
1764
|
case "XX":
|
|
1760
|
-
return
|
|
1765
|
+
return J(a);
|
|
1761
1766
|
case "XXXXX":
|
|
1762
1767
|
case "XXX":
|
|
1763
1768
|
default:
|
|
1764
|
-
return
|
|
1769
|
+
return J(a, ":");
|
|
1765
1770
|
}
|
|
1766
1771
|
},
|
|
1767
1772
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1769,14 +1774,14 @@ const Z = {
|
|
|
1769
1774
|
const a = t.getTimezoneOffset();
|
|
1770
1775
|
switch (e) {
|
|
1771
1776
|
case "x":
|
|
1772
|
-
return
|
|
1777
|
+
return $e(a);
|
|
1773
1778
|
case "xxxx":
|
|
1774
1779
|
case "xx":
|
|
1775
|
-
return
|
|
1780
|
+
return J(a);
|
|
1776
1781
|
case "xxxxx":
|
|
1777
1782
|
case "xxx":
|
|
1778
1783
|
default:
|
|
1779
|
-
return
|
|
1784
|
+
return J(a, ":");
|
|
1780
1785
|
}
|
|
1781
1786
|
},
|
|
1782
1787
|
// Timezone (GMT)
|
|
@@ -1789,7 +1794,7 @@ const Z = {
|
|
|
1789
1794
|
return "GMT" + qe(a, ":");
|
|
1790
1795
|
case "OOOO":
|
|
1791
1796
|
default:
|
|
1792
|
-
return "GMT" +
|
|
1797
|
+
return "GMT" + J(a, ":");
|
|
1793
1798
|
}
|
|
1794
1799
|
},
|
|
1795
1800
|
// Timezone (specific non-location)
|
|
@@ -1802,7 +1807,7 @@ const Z = {
|
|
|
1802
1807
|
return "GMT" + qe(a, ":");
|
|
1803
1808
|
case "zzzz":
|
|
1804
1809
|
default:
|
|
1805
|
-
return "GMT" +
|
|
1810
|
+
return "GMT" + J(a, ":");
|
|
1806
1811
|
}
|
|
1807
1812
|
},
|
|
1808
1813
|
// Seconds timestamp
|
|
@@ -1820,14 +1825,14 @@ function qe(t, e = "") {
|
|
|
1820
1825
|
const n = t > 0 ? "-" : "+", a = Math.abs(t), r = Math.trunc(a / 60), i = a % 60;
|
|
1821
1826
|
return i === 0 ? n + String(r) : n + String(r) + e + P(i, 2);
|
|
1822
1827
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + P(Math.abs(t) / 60, 2) :
|
|
1828
|
+
function $e(t, e) {
|
|
1829
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + P(Math.abs(t) / 60, 2) : J(t, e);
|
|
1825
1830
|
}
|
|
1826
|
-
function
|
|
1831
|
+
function J(t, e = "") {
|
|
1827
1832
|
const n = t > 0 ? "-" : "+", a = Math.abs(t), r = P(Math.trunc(a / 60), 2), i = P(a % 60, 2);
|
|
1828
1833
|
return n + r + e + i;
|
|
1829
1834
|
}
|
|
1830
|
-
const
|
|
1835
|
+
const Ue = (t, e) => {
|
|
1831
1836
|
switch (t) {
|
|
1832
1837
|
case "P":
|
|
1833
1838
|
return e.date({ width: "short" });
|
|
@@ -1851,10 +1856,10 @@ const Le = (t, e) => {
|
|
|
1851
1856
|
default:
|
|
1852
1857
|
return e.time({ width: "full" });
|
|
1853
1858
|
}
|
|
1854
|
-
},
|
|
1859
|
+
}, In = (t, e) => {
|
|
1855
1860
|
const n = t.match(/(P+)(p+)?/) || [], a = n[1], r = n[2];
|
|
1856
1861
|
if (!r)
|
|
1857
|
-
return
|
|
1862
|
+
return Ue(t, e);
|
|
1858
1863
|
let i;
|
|
1859
1864
|
switch (a) {
|
|
1860
1865
|
case "P":
|
|
@@ -1871,51 +1876,51 @@ const Le = (t, e) => {
|
|
|
1871
1876
|
i = e.dateTime({ width: "full" });
|
|
1872
1877
|
break;
|
|
1873
1878
|
}
|
|
1874
|
-
return i.replace("{{date}}",
|
|
1875
|
-
},
|
|
1879
|
+
return i.replace("{{date}}", Ue(a, e)).replace("{{time}}", lt(r, e));
|
|
1880
|
+
}, Xn = {
|
|
1876
1881
|
p: lt,
|
|
1877
|
-
P:
|
|
1878
|
-
},
|
|
1879
|
-
function Zn(t) {
|
|
1880
|
-
return Xn.test(t);
|
|
1881
|
-
}
|
|
1882
|
+
P: In
|
|
1883
|
+
}, Gn = /^D+$/, Zn = /^Y+$/, Jn = ["D", "DD", "YY", "YYYY"];
|
|
1882
1884
|
function Kn(t) {
|
|
1883
1885
|
return Gn.test(t);
|
|
1884
1886
|
}
|
|
1885
|
-
function ea(t
|
|
1886
|
-
|
|
1887
|
-
if (console.warn(a), Jn.includes(t)) throw new RangeError(a);
|
|
1887
|
+
function ea(t) {
|
|
1888
|
+
return Zn.test(t);
|
|
1888
1889
|
}
|
|
1889
1890
|
function ta(t, e, n) {
|
|
1891
|
+
const a = na(t, e, n);
|
|
1892
|
+
if (console.warn(a), Jn.includes(t)) throw new RangeError(a);
|
|
1893
|
+
}
|
|
1894
|
+
function na(t, e, n) {
|
|
1890
1895
|
const a = t[0] === "Y" ? "years" : "days of the month";
|
|
1891
1896
|
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`;
|
|
1892
1897
|
}
|
|
1893
|
-
const
|
|
1898
|
+
const aa = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ra = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ia = /^'([^]*?)'?$/, sa = /''/g, oa = /[a-zA-Z]/;
|
|
1894
1899
|
function we(t, e, n) {
|
|
1895
|
-
var d, h, m,
|
|
1896
|
-
const a =
|
|
1900
|
+
var d, h, m, D;
|
|
1901
|
+
const a = Me(), r = a.locale ?? Un, 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);
|
|
1897
1902
|
if (!st(o))
|
|
1898
1903
|
throw new RangeError("Invalid time value");
|
|
1899
|
-
let f = e.match(
|
|
1900
|
-
const
|
|
1901
|
-
if (
|
|
1902
|
-
const
|
|
1903
|
-
return
|
|
1904
|
-
}
|
|
1905
|
-
return
|
|
1906
|
-
}).join("").match(
|
|
1907
|
-
if (
|
|
1904
|
+
let f = e.match(ra).map((v) => {
|
|
1905
|
+
const x = v[0];
|
|
1906
|
+
if (x === "p" || x === "P") {
|
|
1907
|
+
const b = Xn[x];
|
|
1908
|
+
return b(v, r.formatLong);
|
|
1909
|
+
}
|
|
1910
|
+
return v;
|
|
1911
|
+
}).join("").match(aa).map((v) => {
|
|
1912
|
+
if (v === "''")
|
|
1908
1913
|
return { isToken: !1, value: "'" };
|
|
1909
|
-
const
|
|
1910
|
-
if (
|
|
1911
|
-
return { isToken: !1, value:
|
|
1912
|
-
if (
|
|
1913
|
-
return { isToken: !0, value:
|
|
1914
|
-
if (
|
|
1914
|
+
const x = v[0];
|
|
1915
|
+
if (x === "'")
|
|
1916
|
+
return { isToken: !1, value: la(v) };
|
|
1917
|
+
if (je[x])
|
|
1918
|
+
return { isToken: !0, value: v };
|
|
1919
|
+
if (x.match(oa))
|
|
1915
1920
|
throw new RangeError(
|
|
1916
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1921
|
+
"Format string contains an unescaped latin alphabet character `" + x + "`"
|
|
1917
1922
|
);
|
|
1918
|
-
return { isToken: !1, value:
|
|
1923
|
+
return { isToken: !1, value: v };
|
|
1919
1924
|
});
|
|
1920
1925
|
r.localize.preprocessor && (f = r.localize.preprocessor(o, f));
|
|
1921
1926
|
const u = {
|
|
@@ -1923,33 +1928,33 @@ function we(t, e, n) {
|
|
|
1923
1928
|
weekStartsOn: l,
|
|
1924
1929
|
locale: r
|
|
1925
1930
|
};
|
|
1926
|
-
return f.map((
|
|
1927
|
-
if (!
|
|
1928
|
-
const
|
|
1929
|
-
(
|
|
1930
|
-
const
|
|
1931
|
-
return
|
|
1931
|
+
return f.map((v) => {
|
|
1932
|
+
if (!v.isToken) return v.value;
|
|
1933
|
+
const x = v.value;
|
|
1934
|
+
(ea(x) || Kn(x)) && ta(x, e, String(t));
|
|
1935
|
+
const b = je[x[0]];
|
|
1936
|
+
return b(o, x, r.localize, u);
|
|
1932
1937
|
}).join("");
|
|
1933
1938
|
}
|
|
1934
|
-
function
|
|
1935
|
-
const e = t.match(
|
|
1936
|
-
return e ? e[1].replace(
|
|
1939
|
+
function la(t) {
|
|
1940
|
+
const e = t.match(ia);
|
|
1941
|
+
return e ? e[1].replace(sa, "'") : t;
|
|
1937
1942
|
}
|
|
1938
1943
|
function ke(t, e) {
|
|
1939
|
-
const a =
|
|
1944
|
+
const a = fa(t);
|
|
1940
1945
|
let r;
|
|
1941
1946
|
if (a.date) {
|
|
1942
|
-
const f =
|
|
1943
|
-
r =
|
|
1947
|
+
const f = pa(a.date, 2);
|
|
1948
|
+
r = ma(f.restDateString, f.year);
|
|
1944
1949
|
}
|
|
1945
1950
|
if (!r || isNaN(r.getTime()))
|
|
1946
1951
|
return /* @__PURE__ */ new Date(NaN);
|
|
1947
1952
|
const i = r.getTime();
|
|
1948
1953
|
let l = 0, o;
|
|
1949
|
-
if (a.time && (l =
|
|
1954
|
+
if (a.time && (l = ha(a.time), isNaN(l)))
|
|
1950
1955
|
return /* @__PURE__ */ new Date(NaN);
|
|
1951
1956
|
if (a.timezone) {
|
|
1952
|
-
if (o =
|
|
1957
|
+
if (o = va(a.timezone), isNaN(o))
|
|
1953
1958
|
return /* @__PURE__ */ new Date(NaN);
|
|
1954
1959
|
} else {
|
|
1955
1960
|
const f = new Date(i + l), u = /* @__PURE__ */ new Date(0);
|
|
@@ -1970,8 +1975,8 @@ const ye = {
|
|
|
1970
1975
|
dateTimeDelimiter: /[T ]/,
|
|
1971
1976
|
timeZoneDelimiter: /[Z ]/i,
|
|
1972
1977
|
timezone: /([Z+-].*)$/
|
|
1973
|
-
},
|
|
1974
|
-
function
|
|
1978
|
+
}, ua = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, ca = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, da = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
1979
|
+
function fa(t) {
|
|
1975
1980
|
const e = {}, n = t.split(ye.dateTimeDelimiter);
|
|
1976
1981
|
let a;
|
|
1977
1982
|
if (n.length > 2)
|
|
@@ -1985,7 +1990,7 @@ function da(t) {
|
|
|
1985
1990
|
}
|
|
1986
1991
|
return e;
|
|
1987
1992
|
}
|
|
1988
|
-
function
|
|
1993
|
+
function pa(t, e) {
|
|
1989
1994
|
const n = new RegExp(
|
|
1990
1995
|
"^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
|
|
1991
1996
|
), a = t.match(n);
|
|
@@ -1996,36 +2001,36 @@ function fa(t, e) {
|
|
|
1996
2001
|
restDateString: t.slice((a[1] || a[2]).length)
|
|
1997
2002
|
};
|
|
1998
2003
|
}
|
|
1999
|
-
function
|
|
2004
|
+
function ma(t, e) {
|
|
2000
2005
|
if (e === null) return /* @__PURE__ */ new Date(NaN);
|
|
2001
|
-
const n = t.match(
|
|
2006
|
+
const n = t.match(ua);
|
|
2002
2007
|
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
2003
2008
|
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;
|
|
2004
2009
|
if (a)
|
|
2005
|
-
return
|
|
2010
|
+
return xa(e, o, f) ? ga(e, o, f) : /* @__PURE__ */ new Date(NaN);
|
|
2006
2011
|
{
|
|
2007
2012
|
const u = /* @__PURE__ */ new Date(0);
|
|
2008
|
-
return !
|
|
2013
|
+
return !ya(e, i, l) || !ba(e, r) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(e, i, Math.max(r, l)), u);
|
|
2009
2014
|
}
|
|
2010
2015
|
}
|
|
2011
2016
|
function fe(t) {
|
|
2012
2017
|
return t ? parseInt(t) : 1;
|
|
2013
2018
|
}
|
|
2014
|
-
function
|
|
2015
|
-
const e = t.match(
|
|
2019
|
+
function ha(t) {
|
|
2020
|
+
const e = t.match(ca);
|
|
2016
2021
|
if (!e) return NaN;
|
|
2017
2022
|
const n = Ce(e[1]), a = Ce(e[2]), r = Ce(e[3]);
|
|
2018
|
-
return
|
|
2023
|
+
return Da(n, a, r) ? n * rt + a * at + r * 1e3 : NaN;
|
|
2019
2024
|
}
|
|
2020
2025
|
function Ce(t) {
|
|
2021
2026
|
return t && parseFloat(t.replace(",", ".")) || 0;
|
|
2022
2027
|
}
|
|
2023
|
-
function
|
|
2028
|
+
function va(t) {
|
|
2024
2029
|
if (t === "Z") return 0;
|
|
2025
|
-
const e = t.match(
|
|
2030
|
+
const e = t.match(da);
|
|
2026
2031
|
if (!e) return 0;
|
|
2027
2032
|
const n = e[1] === "+" ? -1 : 1, a = parseInt(e[2]), r = e[3] && parseInt(e[3]) || 0;
|
|
2028
|
-
return
|
|
2033
|
+
return Ma(a, r) ? n * (a * rt + r * at) : NaN;
|
|
2029
2034
|
}
|
|
2030
2035
|
function ga(t, e, n) {
|
|
2031
2036
|
const a = /* @__PURE__ */ new Date(0);
|
|
@@ -2033,27 +2038,27 @@ function ga(t, e, n) {
|
|
|
2033
2038
|
const r = a.getUTCDay() || 7, i = (e - 1) * 7 + n + 1 - r;
|
|
2034
2039
|
return a.setUTCDate(a.getUTCDate() + i), a;
|
|
2035
2040
|
}
|
|
2036
|
-
const
|
|
2041
|
+
const wa = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
2037
2042
|
function ut(t) {
|
|
2038
2043
|
return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
|
|
2039
2044
|
}
|
|
2040
|
-
function
|
|
2041
|
-
return e >= 0 && e <= 11 && n >= 1 && n <= (
|
|
2045
|
+
function ya(t, e, n) {
|
|
2046
|
+
return e >= 0 && e <= 11 && n >= 1 && n <= (wa[e] || (ut(t) ? 29 : 28));
|
|
2042
2047
|
}
|
|
2043
|
-
function
|
|
2048
|
+
function ba(t, e) {
|
|
2044
2049
|
return e >= 1 && e <= (ut(t) ? 366 : 365);
|
|
2045
2050
|
}
|
|
2046
|
-
function
|
|
2051
|
+
function xa(t, e, n) {
|
|
2047
2052
|
return e >= 1 && e <= 53 && n >= 0 && n <= 6;
|
|
2048
2053
|
}
|
|
2049
|
-
function
|
|
2054
|
+
function Da(t, e, n) {
|
|
2050
2055
|
return t === 24 ? e === 0 && n === 0 : n >= 0 && n < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
|
|
2051
2056
|
}
|
|
2052
|
-
function
|
|
2057
|
+
function Ma(t, e) {
|
|
2053
2058
|
return e >= 0 && e <= 59;
|
|
2054
2059
|
}
|
|
2055
2060
|
function Ta() {
|
|
2056
|
-
const t = new
|
|
2061
|
+
const t = new an();
|
|
2057
2062
|
function e(n, a) {
|
|
2058
2063
|
var i;
|
|
2059
2064
|
if (!n || typeof n == "string" && n.indexOf("0001") === 0)
|
|
@@ -2075,8 +2080,8 @@ function Ta() {
|
|
|
2075
2080
|
formatTo: e
|
|
2076
2081
|
};
|
|
2077
2082
|
}
|
|
2078
|
-
const
|
|
2079
|
-
function
|
|
2083
|
+
const Sa = ["moz", "ms", "webkit"];
|
|
2084
|
+
function ka() {
|
|
2080
2085
|
let t = 0;
|
|
2081
2086
|
return (e) => {
|
|
2082
2087
|
const n = (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (n - t)), r = setTimeout(() => {
|
|
@@ -2085,47 +2090,41 @@ function Sa() {
|
|
|
2085
2090
|
return t = n + a, r;
|
|
2086
2091
|
};
|
|
2087
2092
|
}
|
|
2088
|
-
function
|
|
2093
|
+
function Ca() {
|
|
2089
2094
|
if (typeof window > "u")
|
|
2090
2095
|
return () => 0;
|
|
2091
2096
|
if (window.requestAnimationFrame)
|
|
2092
2097
|
return window.requestAnimationFrame.bind(window);
|
|
2093
|
-
const t =
|
|
2094
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
const e = t;
|
|
2099
|
-
return e.install = function(n) {
|
|
2100
|
-
n.component(e.name, t);
|
|
2101
|
-
}, t;
|
|
2102
|
-
};
|
|
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 || {});
|
|
2098
|
+
const t = Sa.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
2099
|
+
return t ? window[`${t}RequestAnimationFrame`] : ka();
|
|
2100
|
+
}
|
|
2101
|
+
Ca();
|
|
2102
|
+
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 || {});
|
|
2104
2103
|
class Pa {
|
|
2105
2104
|
constructor(e = {}, n = {}) {
|
|
2106
2105
|
/**
|
|
2107
2106
|
* 上传配置
|
|
2108
2107
|
*/
|
|
2109
|
-
|
|
2108
|
+
L(this, "uploadConfig");
|
|
2110
2109
|
/**
|
|
2111
2110
|
* 删除配置
|
|
2112
2111
|
*/
|
|
2113
|
-
|
|
2112
|
+
L(this, "removeConfig");
|
|
2114
2113
|
const a = { type: "config", url: "", timeout: 0, headers: null, data: {} };
|
|
2115
2114
|
this.uploadConfig = Object.assign({}, a, e), this.removeConfig = Object.assign({}, a, n);
|
|
2116
2115
|
}
|
|
2117
2116
|
}
|
|
2118
|
-
function
|
|
2117
|
+
function He(t, e) {
|
|
2119
2118
|
const { formatTo: n } = Ta();
|
|
2120
2119
|
return n(t, e);
|
|
2121
2120
|
}
|
|
2122
|
-
function
|
|
2121
|
+
function Le(t, e) {
|
|
2123
2122
|
if (!e)
|
|
2124
2123
|
return "";
|
|
2125
2124
|
let n = "";
|
|
2126
2125
|
return t.indexOf(".") === -1 && e.hasOwnProperty(t) ? n = e[t] : n = t.split(".").reduce((a, r) => a ? a[r] : null, e), n;
|
|
2127
2126
|
}
|
|
2128
|
-
function
|
|
2127
|
+
function Fa(t) {
|
|
2129
2128
|
return (e, n) => {
|
|
2130
2129
|
if (!e.hasOwnProperty(t) || e[t] === void 0 || e[t] === null)
|
|
2131
2130
|
return 1;
|
|
@@ -2133,7 +2132,7 @@ function Ea(t) {
|
|
|
2133
2132
|
return -1;
|
|
2134
2133
|
if (t !== "createTime") {
|
|
2135
2134
|
let i = "", l = "";
|
|
2136
|
-
return t.indexOf(".") > -1 ? (i =
|
|
2135
|
+
return t.indexOf(".") > -1 ? (i = Le(t, e), l = Le(t, n)) : (i = e[t], l = n[t]), i > l ? 1 : -1;
|
|
2137
2136
|
}
|
|
2138
2137
|
const a = new Date(e[t]), r = new Date(n[t]);
|
|
2139
2138
|
return a.getTime() > r.getTime() ? -1 : 1;
|
|
@@ -2154,7 +2153,7 @@ function me(t) {
|
|
|
2154
2153
|
function ft(t, e) {
|
|
2155
2154
|
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;
|
|
2156
2155
|
}
|
|
2157
|
-
function
|
|
2156
|
+
function ze(t) {
|
|
2158
2157
|
let e = "ffilepreview--filetype";
|
|
2159
2158
|
if (!t)
|
|
2160
2159
|
return e + "-any";
|
|
@@ -2201,12 +2200,12 @@ function Qe(t) {
|
|
|
2201
2200
|
}
|
|
2202
2201
|
return e;
|
|
2203
2202
|
}
|
|
2204
|
-
function
|
|
2203
|
+
function Qe(t) {
|
|
2205
2204
|
var e;
|
|
2206
2205
|
if (t.type === "done")
|
|
2207
2206
|
return 100;
|
|
2208
2207
|
if (t.file && t.file.progress) {
|
|
2209
|
-
if (t.file.progress.status ===
|
|
2208
|
+
if (t.file.progress.status === Q.Uploading) {
|
|
2210
2209
|
const n = ((e = t.file.progress.data) == null ? void 0 : e.percentage) || 5;
|
|
2211
2210
|
return n > 5 ? n : 5;
|
|
2212
2211
|
}
|
|
@@ -2214,12 +2213,12 @@ function Ve(t) {
|
|
|
2214
2213
|
}
|
|
2215
2214
|
return 5;
|
|
2216
2215
|
}
|
|
2217
|
-
function
|
|
2216
|
+
function Ea(t) {
|
|
2218
2217
|
let e = t;
|
|
2219
2218
|
return t ? (typeof t == "string" && (e = parseInt(t, 10)), me(e)) : "0 Byte";
|
|
2220
2219
|
}
|
|
2221
2220
|
const Oa = () => Math.random().toString(36).substring(7);
|
|
2222
|
-
function
|
|
2221
|
+
function Ve(t, e) {
|
|
2223
2222
|
return {
|
|
2224
2223
|
fileIndex: e,
|
|
2225
2224
|
id: Oa(),
|
|
@@ -2228,7 +2227,7 @@ function Ie(t, e) {
|
|
|
2228
2227
|
type: t.type,
|
|
2229
2228
|
form: new FormData(),
|
|
2230
2229
|
progress: {
|
|
2231
|
-
status:
|
|
2230
|
+
status: Q.Queue,
|
|
2232
2231
|
data: {
|
|
2233
2232
|
percentage: 0,
|
|
2234
2233
|
speed: 0,
|
|
@@ -2239,17 +2238,17 @@ function Ie(t, e) {
|
|
|
2239
2238
|
etaHuman: null
|
|
2240
2239
|
}
|
|
2241
2240
|
},
|
|
2242
|
-
lastModifiedDate:
|
|
2241
|
+
lastModifiedDate: He(new Date(t.lastModified), "yyyy-MM-dd HH:mm:ss"),
|
|
2243
2242
|
nativeFile: t
|
|
2244
2243
|
};
|
|
2245
2244
|
}
|
|
2246
|
-
function
|
|
2245
|
+
function Ie(t) {
|
|
2247
2246
|
const e = [];
|
|
2248
2247
|
return t.forEach((n) => {
|
|
2249
2248
|
const a = { id: "", name: "", size: 0, type: "", extend: null, extendHeaders: null, createTime: "" };
|
|
2250
2249
|
for (const r in a) {
|
|
2251
2250
|
const i = r.replace("extend", "response").replace("createTime", "lastModifiedDate");
|
|
2252
|
-
n.hasOwnProperty(i) && (i === "lastModifiedDate" ? a[r] =
|
|
2251
|
+
n.hasOwnProperty(i) && (i === "lastModifiedDate" ? a[r] = He(n[i], "yyyy-MM-dd HH:mm:ss") : a[r] = n[i]);
|
|
2253
2252
|
}
|
|
2254
2253
|
e.push(a);
|
|
2255
2254
|
}), e;
|
|
@@ -2275,7 +2274,7 @@ function _a(t) {
|
|
|
2275
2274
|
return t.split(`
|
|
2276
2275
|
`).map((e) => e.split(/: */, 2)).filter((e) => e[0]).reduce((e, n) => (e[n[0]] = n[1], e), {});
|
|
2277
2276
|
}
|
|
2278
|
-
function
|
|
2277
|
+
function Xe(t) {
|
|
2279
2278
|
return new Date(t * 1e3).toISOString().substr(11, 8);
|
|
2280
2279
|
}
|
|
2281
2280
|
class Ba extends Pa {
|
|
@@ -2283,22 +2282,22 @@ class Ba extends Pa {
|
|
|
2283
2282
|
const i = e[0];
|
|
2284
2283
|
return new Promise((l, o) => {
|
|
2285
2284
|
var k, A;
|
|
2286
|
-
const f = n.url || a.url || "", u = n.method || "POST", d = n.data || {}, h = n.headers || {}, m = new XMLHttpRequest(),
|
|
2287
|
-
let
|
|
2285
|
+
const f = n.url || a.url || "", u = n.method || "POST", d = n.data || {}, h = n.headers || {}, m = new XMLHttpRequest(), D = (/* @__PURE__ */ new Date()).getTime();
|
|
2286
|
+
let v = ((k = i.progress) == null ? void 0 : k.data) && i.progress.data.startTime || D, x = 0, b = null;
|
|
2288
2287
|
m.upload.addEventListener("progress", (T) => {
|
|
2289
|
-
var
|
|
2288
|
+
var H;
|
|
2290
2289
|
if (T.lengthComputable) {
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2293
|
-
status:
|
|
2290
|
+
const g = Math.round(T.loaded * 100 / T.total), N = (/* @__PURE__ */ new Date()).getTime() - D;
|
|
2291
|
+
x = Math.round(T.loaded / N * 1e3), v = ((H = i.progress) == null ? void 0 : H.data) && i.progress.data.startTime || (/* @__PURE__ */ new Date()).getTime(), b = Math.ceil((T.total - T.loaded) / x), i.progress = {
|
|
2292
|
+
status: Q.Uploading,
|
|
2294
2293
|
data: {
|
|
2295
|
-
percentage:
|
|
2296
|
-
speed:
|
|
2297
|
-
speedHuman: `${me(
|
|
2298
|
-
startTime:
|
|
2294
|
+
percentage: g,
|
|
2295
|
+
speed: x,
|
|
2296
|
+
speedHuman: `${me(x)}/s`,
|
|
2297
|
+
startTime: v,
|
|
2299
2298
|
endTime: null,
|
|
2300
|
-
eta:
|
|
2301
|
-
etaHuman:
|
|
2299
|
+
eta: b,
|
|
2300
|
+
etaHuman: Xe(b)
|
|
2302
2301
|
}
|
|
2303
2302
|
}, r({ type: "uploading", files: [i] });
|
|
2304
2303
|
}
|
|
@@ -2306,17 +2305,17 @@ class Ba extends Pa {
|
|
|
2306
2305
|
o(T);
|
|
2307
2306
|
}), m.onreadystatechange = () => {
|
|
2308
2307
|
if (m.readyState === XMLHttpRequest.DONE) {
|
|
2309
|
-
const T = Math.round(i.size / ((/* @__PURE__ */ new Date()).getTime() -
|
|
2308
|
+
const T = Math.round(i.size / ((/* @__PURE__ */ new Date()).getTime() - v) * 1e3);
|
|
2310
2309
|
i.progress = {
|
|
2311
|
-
status:
|
|
2310
|
+
status: Q.Done,
|
|
2312
2311
|
data: {
|
|
2313
2312
|
percentage: 100,
|
|
2314
2313
|
speed: T,
|
|
2315
2314
|
speedHuman: `${me(T)}/s`,
|
|
2316
|
-
startTime:
|
|
2315
|
+
startTime: v,
|
|
2317
2316
|
endTime: (/* @__PURE__ */ new Date()).getTime(),
|
|
2318
|
-
eta:
|
|
2319
|
-
etaHuman:
|
|
2317
|
+
eta: b,
|
|
2318
|
+
etaHuman: Xe(b || 0)
|
|
2320
2319
|
}
|
|
2321
2320
|
}, i.responseStatus = m.status;
|
|
2322
2321
|
try {
|
|
@@ -2329,12 +2328,12 @@ class Ba extends Pa {
|
|
|
2329
2328
|
}, m.open(u, f, !0), m.withCredentials = !!n.withCredentials;
|
|
2330
2329
|
try {
|
|
2331
2330
|
const T = i.nativeFile;
|
|
2332
|
-
Object.keys(h).forEach((
|
|
2333
|
-
let
|
|
2334
|
-
n.includeWebKitFormBoundary !== !1 ? (Object.keys(d).forEach((
|
|
2335
|
-
var
|
|
2336
|
-
return (
|
|
2337
|
-
}), (A = i.form) == null || A.append(n.fieldName || "file", T, T.name),
|
|
2331
|
+
Object.keys(h).forEach((g) => m.setRequestHeader(g, h[g]));
|
|
2332
|
+
let H;
|
|
2333
|
+
n.includeWebKitFormBoundary !== !1 ? (Object.keys(d).forEach((g) => {
|
|
2334
|
+
var N;
|
|
2335
|
+
return (N = i.form) == null ? void 0 : N.append(g, d[g]);
|
|
2336
|
+
}), (A = i.form) == null || A.append(n.fieldName || "file", T, T.name), H = i.form) : H = T, m.send(H);
|
|
2338
2337
|
} catch (T) {
|
|
2339
2338
|
o(T);
|
|
2340
2339
|
}
|
|
@@ -2366,42 +2365,42 @@ const Ra = {
|
|
|
2366
2365
|
showCloseButton: { type: Boolean, default: !0 },
|
|
2367
2366
|
animate: { type: String, default: "fadeIn" },
|
|
2368
2367
|
options: { type: Object }
|
|
2369
|
-
},
|
|
2368
|
+
}, Pe = /* @__PURE__ */ te({
|
|
2370
2369
|
name: "Toast",
|
|
2371
2370
|
props: Ya,
|
|
2372
2371
|
emits: ["close", "click"],
|
|
2373
2372
|
setup: (t, e) => {
|
|
2374
|
-
const n =
|
|
2373
|
+
const n = O(t.animate), a = "fadeOut", r = j(() => t.options), i = O(!1), l = j(() => {
|
|
2375
2374
|
const k = {
|
|
2376
2375
|
animated: i.value,
|
|
2377
2376
|
toast: !0
|
|
2378
2377
|
};
|
|
2379
2378
|
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 =
|
|
2381
|
-
const T = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`,
|
|
2379
|
+
}), o = j(() => {
|
|
2380
|
+
const T = `f-icon-${r.value && r.value.type ? r.value.type.replace("toasty-type-", "") : "default"}`, H = {
|
|
2382
2381
|
"f-icon": !0
|
|
2383
2382
|
};
|
|
2384
|
-
return
|
|
2385
|
-
}), f =
|
|
2386
|
-
function
|
|
2383
|
+
return H[T] = !0, H;
|
|
2384
|
+
}), f = j(() => r.value.title || r.value.message), u = j(() => r.value.title && r.value.message), d = j(() => !r.value.title && r.value.message), h = j(() => t.showCloseButton), m = j(() => !!r.value.buttons || !!e.slots.default);
|
|
2385
|
+
function D(k) {
|
|
2387
2386
|
k.stopPropagation(), k.preventDefault(), i.value = !1, setTimeout(() => {
|
|
2388
2387
|
e.emit("close", r.value);
|
|
2389
2388
|
}, 200);
|
|
2390
2389
|
}
|
|
2391
|
-
function
|
|
2390
|
+
function v(k, A) {
|
|
2392
2391
|
}
|
|
2393
|
-
function
|
|
2392
|
+
function x(k) {
|
|
2394
2393
|
return `f-preten-link ${k.customClass ? k.customClass : ""}`;
|
|
2395
2394
|
}
|
|
2396
|
-
|
|
2395
|
+
K(n, () => {
|
|
2397
2396
|
n.value;
|
|
2398
2397
|
});
|
|
2399
|
-
const
|
|
2398
|
+
const b = () => {
|
|
2400
2399
|
var k;
|
|
2401
|
-
return s(
|
|
2400
|
+
return s(se, null, [s("div", {
|
|
2402
2401
|
class: "after-toast-msg text-right"
|
|
2403
2402
|
}, [!e.slots.default && ((k = r.value.buttons) == null ? void 0 : k.map((A) => s("span", {
|
|
2404
|
-
class:
|
|
2403
|
+
class: x(A),
|
|
2405
2404
|
onClick: (T) => void 0
|
|
2406
2405
|
}, [A.text]))), e.slots.default && e.slots.default()])]);
|
|
2407
2406
|
};
|
|
@@ -2410,7 +2409,7 @@ const Ra = {
|
|
|
2410
2409
|
}, [h.value && s("button", {
|
|
2411
2410
|
title: "close",
|
|
2412
2411
|
class: "toast-close f-btn-icon f-bare",
|
|
2413
|
-
onClick:
|
|
2412
|
+
onClick: D
|
|
2414
2413
|
}, [s("span", {
|
|
2415
2414
|
class: "f-icon modal_close"
|
|
2416
2415
|
}, null)]), f.value && s("section", {
|
|
@@ -2421,45 +2420,45 @@ const Ra = {
|
|
|
2421
2420
|
class: o.value
|
|
2422
2421
|
}, null)]), s("div", {
|
|
2423
2422
|
class: "modal-tips-content"
|
|
2424
|
-
}, [u.value && s(
|
|
2423
|
+
}, [u.value && s(se, null, [s("h5", {
|
|
2425
2424
|
class: "toast-title modal-tips-title",
|
|
2426
2425
|
innerHTML: r.value.title
|
|
2427
2426
|
}, null), s("p", {
|
|
2428
2427
|
class: "toast-msg",
|
|
2429
2428
|
innerHTML: r.value.message
|
|
2430
|
-
}, null), m.value &&
|
|
2429
|
+
}, null), m.value && b()]), d.value && (r.value.buttons ? s("div", {
|
|
2431
2430
|
class: "toast-title-btns-wrapper d-flex"
|
|
2432
2431
|
}, [s("h5", {
|
|
2433
2432
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
2434
2433
|
innerHTML: r.value.message
|
|
2435
2434
|
}, null), s("div", {
|
|
2436
2435
|
class: "after-toast-title text-right ml-auto"
|
|
2437
|
-
}, [
|
|
2436
|
+
}, [b()])]) : s("h5", {
|
|
2438
2437
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
2439
2438
|
innerHTML: r.value.message
|
|
2440
2439
|
}, null))])])]);
|
|
2441
2440
|
}
|
|
2442
|
-
}), be = /* @__PURE__ */
|
|
2441
|
+
}), be = /* @__PURE__ */ te({
|
|
2443
2442
|
name: "Notify",
|
|
2444
2443
|
props: Ra,
|
|
2445
2444
|
emits: ["close", "empty"],
|
|
2446
2445
|
setup(t, e) {
|
|
2447
|
-
const n =
|
|
2446
|
+
const n = j(() => ({
|
|
2448
2447
|
"farris-notify": !0
|
|
2449
2448
|
})), a = {
|
|
2450
2449
|
left: 12,
|
|
2451
2450
|
right: 12,
|
|
2452
2451
|
top: 20,
|
|
2453
2452
|
bottom: 12
|
|
2454
|
-
}, r =
|
|
2455
|
-
const m = t.bottom ? t.bottom : a.bottom,
|
|
2453
|
+
}, r = O(), i = O(t.options), l = O(t.showCloseButton), o = j(() => t.position || "bottom-right"), f = j(() => t.timeout != null ? t.timeout : 3e3), u = j(() => {
|
|
2454
|
+
const m = t.bottom ? t.bottom : a.bottom, D = t.top ? t.top : a.top, v = {
|
|
2456
2455
|
transition: "all 0.2s ease",
|
|
2457
2456
|
left: o.value.indexOf("left") > -1 ? `${t.left ? t.left : a.left}px` : "",
|
|
2458
2457
|
right: o.value.indexOf("right") > -1 ? `${t.right ? t.right : a.right}px` : "",
|
|
2459
|
-
top: o.value.indexOf("top") > -1 ? `${
|
|
2458
|
+
top: o.value.indexOf("top") > -1 ? `${D}px` : "",
|
|
2460
2459
|
bottom: o.value.indexOf("bottom") > -1 ? `${m}px` : ""
|
|
2461
2460
|
};
|
|
2462
|
-
return o.value.indexOf("center") > -1 && (
|
|
2461
|
+
return o.value.indexOf("center") > -1 && (v.left = "50%", v.marginLeft = "calc(-24rem / 2)", o.value === "center-center" && (v.top = "50%", v.transform = "translate(-50%, -50%)")), v;
|
|
2463
2462
|
});
|
|
2464
2463
|
function d(m) {
|
|
2465
2464
|
e.emit("close");
|
|
@@ -2471,14 +2470,14 @@ const Ra = {
|
|
|
2471
2470
|
container: r,
|
|
2472
2471
|
notifyPosition: o
|
|
2473
2472
|
});
|
|
2474
|
-
function h(m,
|
|
2473
|
+
function h(m, D) {
|
|
2475
2474
|
d();
|
|
2476
2475
|
}
|
|
2477
2476
|
return () => s("div", {
|
|
2478
2477
|
class: n.value,
|
|
2479
2478
|
style: u.value,
|
|
2480
2479
|
ref: r
|
|
2481
|
-
}, [s(
|
|
2480
|
+
}, [s(Pe, {
|
|
2482
2481
|
options: i.value,
|
|
2483
2482
|
showCloseButton: l.value,
|
|
2484
2483
|
animate: t.animate,
|
|
@@ -2488,8 +2487,8 @@ const Ra = {
|
|
|
2488
2487
|
});
|
|
2489
2488
|
class pt {
|
|
2490
2489
|
constructor() {
|
|
2491
|
-
|
|
2492
|
-
|
|
2490
|
+
L(this, "notifyRefs", []);
|
|
2491
|
+
L(this, "globalConfig", bt({}));
|
|
2493
2492
|
}
|
|
2494
2493
|
createNotifyInstance(e) {
|
|
2495
2494
|
const n = this, r = Object.assign({
|
|
@@ -2502,7 +2501,7 @@ class pt {
|
|
|
2502
2501
|
i.style.display = "contents";
|
|
2503
2502
|
const l = xt({
|
|
2504
2503
|
setup() {
|
|
2505
|
-
const o =
|
|
2504
|
+
const o = O();
|
|
2506
2505
|
function f() {
|
|
2507
2506
|
o.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
2508
2507
|
n.updateNotifyPositionForClose(r, o), l.unmount();
|
|
@@ -2515,16 +2514,16 @@ class pt {
|
|
|
2515
2514
|
r.top = h.bottom;
|
|
2516
2515
|
}
|
|
2517
2516
|
}
|
|
2518
|
-
return
|
|
2517
|
+
return Oe(() => {
|
|
2519
2518
|
document.body.removeChild(i);
|
|
2520
|
-
}),
|
|
2519
|
+
}), Ee(() => {
|
|
2521
2520
|
n.updateNotifyPositionForCreate(r, o);
|
|
2522
2521
|
}), () => s(Dt, {
|
|
2523
2522
|
mode: "out-in",
|
|
2524
2523
|
name: "fade",
|
|
2525
2524
|
appear: !0
|
|
2526
2525
|
}, {
|
|
2527
|
-
default: () => [s(be,
|
|
2526
|
+
default: () => [s(be, Mt({
|
|
2528
2527
|
ref: o
|
|
2529
2528
|
}, r, {
|
|
2530
2529
|
onClose: f
|
|
@@ -2599,26 +2598,26 @@ class pt {
|
|
|
2599
2598
|
}
|
|
2600
2599
|
const Wa = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
2601
2600
|
be.install = (t) => {
|
|
2602
|
-
t.component(be.name, be), t.component(
|
|
2601
|
+
t.component(be.name, be), t.component(Pe.name, Pe);
|
|
2603
2602
|
const e = new pt();
|
|
2604
2603
|
t.provide(Wa, e), t.provide("FNotifyService", e);
|
|
2605
2604
|
};
|
|
2606
2605
|
const ja = (t = "") => {
|
|
2607
2606
|
let e;
|
|
2608
|
-
return t &&
|
|
2609
|
-
},
|
|
2607
|
+
return t && oe(t, null) && (e = oe(t)), e || (e = new pt()), e;
|
|
2608
|
+
}, qa = (t = "") => {
|
|
2610
2609
|
let e;
|
|
2611
|
-
if (t &&
|
|
2612
|
-
const n =
|
|
2610
|
+
if (t && oe(t, null)) {
|
|
2611
|
+
const n = oe(t);
|
|
2613
2612
|
n && n() && (e = n());
|
|
2614
2613
|
}
|
|
2615
2614
|
return e || (e = new Ba()), e;
|
|
2616
2615
|
}, mt = {
|
|
2617
2616
|
getNotify: ja,
|
|
2618
|
-
getServerAPI:
|
|
2617
|
+
getServerAPI: qa
|
|
2619
2618
|
};
|
|
2620
2619
|
function ht(t, e, n) {
|
|
2621
|
-
const a = mt.getNotify(t.notifyServiceToken), r =
|
|
2620
|
+
const a = mt.getNotify(t.notifyServiceToken), r = O(t.fileInfos), {
|
|
2622
2621
|
disabled: i,
|
|
2623
2622
|
uploadVisible: l,
|
|
2624
2623
|
uploadDisabled: o,
|
|
@@ -2627,99 +2626,100 @@ function ht(t, e, n) {
|
|
|
2627
2626
|
previewEnableMulti: d,
|
|
2628
2627
|
downloadButtonDisable: h,
|
|
2629
2628
|
previewColumns: m,
|
|
2630
|
-
uploadEnableMulti:
|
|
2631
|
-
previewButtonDisable:
|
|
2632
|
-
} = Fe(t),
|
|
2629
|
+
uploadEnableMulti: D,
|
|
2630
|
+
previewButtonDisable: v
|
|
2631
|
+
} = Fe(t), x = O(!1), b = O([]), k = j(() => b.value.length), A = O([]), T = O("");
|
|
2633
2632
|
function H(c) {
|
|
2634
|
-
(!c.length ||
|
|
2635
|
-
const
|
|
2636
|
-
return
|
|
2633
|
+
(!c.length || b.value.length !== c.length) && (x.value = !1);
|
|
2634
|
+
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(Fa(u.value)), d.value && (b.value = [...M].filter((S) => S.checked)), M;
|
|
2637
2636
|
}
|
|
2638
|
-
|
|
2639
|
-
|
|
2637
|
+
const g = O(H(r.value));
|
|
2638
|
+
K(() => t.fileInfos, (c) => {
|
|
2639
|
+
g.value = H(c);
|
|
2640
2640
|
});
|
|
2641
|
-
const
|
|
2642
|
-
c.stopImmediatePropagation(), e.emit("fileDownloadEvent", { fileInfos: [
|
|
2643
|
-
},
|
|
2644
|
-
c.stopImmediatePropagation(), !
|
|
2645
|
-
},
|
|
2646
|
-
|
|
2647
|
-
},
|
|
2641
|
+
const N = (c, w) => {
|
|
2642
|
+
c.stopImmediatePropagation(), e.emit("fileDownloadEvent", { fileInfos: [w], name: "" });
|
|
2643
|
+
}, _ = (c, w) => {
|
|
2644
|
+
c.stopImmediatePropagation(), !v.value && e.emit("filePreviewEvent", w);
|
|
2645
|
+
}, W = (c, w, M) => {
|
|
2646
|
+
w.checked && (b.value = b.value.filter((S) => S.id !== w.id)), e.emit("fileRemoveEvent", w), M.handleUploadEvent({ type: "remove", file: w });
|
|
2647
|
+
}, V = (c, w = "preview") => c.formatter ? !0 : w === "preview" ? ["state", "name", "action", "size", "createTime"].findIndex((S) => S === c.field) > -1 : w === "upload" ? ["state", "name", "size"].findIndex((S) => S === c.field) > -1 : !1, ne = (c) => !(c.field === "state" && (o.value || !l.value)), le = (c) => c.lastIndexOf(".") > 0 ? c.substring(0, c.lastIndexOf(".")) : "", ae = (c) => {
|
|
2648
2648
|
if (c.stopImmediatePropagation(), k.value > 1) {
|
|
2649
|
-
let
|
|
2650
|
-
|
|
2651
|
-
fileInfos:
|
|
2652
|
-
name:
|
|
2649
|
+
let w = "";
|
|
2650
|
+
w = le(b.value[0].name), e.emit("fileDownloadEvent", {
|
|
2651
|
+
fileInfos: b.value,
|
|
2652
|
+
name: w
|
|
2653
2653
|
});
|
|
2654
2654
|
}
|
|
2655
|
-
},
|
|
2656
|
-
c.stopImmediatePropagation(), e.emit("fileRemoveEvent",
|
|
2657
|
-
},
|
|
2658
|
-
const
|
|
2659
|
-
c.checked ? (
|
|
2660
|
-
|
|
2661
|
-
}),
|
|
2662
|
-
|
|
2663
|
-
}),
|
|
2664
|
-
},
|
|
2665
|
-
c && (c.stopImmediatePropagation(), c.stopPropagation()), (!T.value ||
|
|
2666
|
-
},
|
|
2667
|
-
const
|
|
2668
|
-
S && (S.checked = c.checked), c.checked && !
|
|
2655
|
+
}, Z = (c) => {
|
|
2656
|
+
c.stopImmediatePropagation(), e.emit("fileRemoveEvent", b.value);
|
|
2657
|
+
}, re = (c) => {
|
|
2658
|
+
const w = g.value;
|
|
2659
|
+
c.checked ? (w.forEach((M) => {
|
|
2660
|
+
M.checked = !0;
|
|
2661
|
+
}), b.value = [...g.value], x.value = !0) : (b.value = [], w.forEach((M) => {
|
|
2662
|
+
M.checked = !1;
|
|
2663
|
+
}), x.value = !1), e.emit("previewMultiSelectedEvent", b.value);
|
|
2664
|
+
}, B = (c, w) => {
|
|
2665
|
+
c && (c.stopImmediatePropagation(), c.stopPropagation()), (!T.value || w.id !== T.value) && (T.value = w.id, e.emit("selectedEvent", w));
|
|
2666
|
+
}, F = (c) => {
|
|
2667
|
+
const w = b.value.findIndex((U) => U.id === c.id), M = w > -1, S = g.value.find((U) => U.id === c.id);
|
|
2668
|
+
S && (S.checked = c.checked), c.checked && !M && S && b.value.push(S), !c.checked && M && b.value.splice(w, 1), g.value.length > 0 && (b.value.length === g.value.length ? x.value = !0 : x.value = !1), B(null, S), e.emit("previewMultiSelectedEvent", b.value);
|
|
2669
2669
|
}, q = (c) => {
|
|
2670
|
-
var
|
|
2671
|
-
(
|
|
2670
|
+
var w;
|
|
2671
|
+
(w = n == null ? void 0 : n.value) == null || w.handleUploadEvent(c);
|
|
2672
2672
|
}, ue = (c) => {
|
|
2673
2673
|
q({ type: "upload", file: c });
|
|
2674
|
-
},
|
|
2675
|
-
let
|
|
2676
|
-
c.files && c.files.length > 0 ?
|
|
2677
|
-
const
|
|
2678
|
-
var
|
|
2679
|
-
return typeof S < "u" && ((
|
|
2674
|
+
}, R = (c, w) => {
|
|
2675
|
+
let M = [];
|
|
2676
|
+
c.files && c.files.length > 0 ? M = c.files : typeof c.file < "u" && (M = [c.file]), w = w || c.type, M.map((S) => {
|
|
2677
|
+
const U = A.value.findIndex((I) => {
|
|
2678
|
+
var ge;
|
|
2679
|
+
return typeof S < "u" && ((ge = I == null ? void 0 : I.file) == null ? void 0 : ge.id) === S.id;
|
|
2680
2680
|
});
|
|
2681
|
-
|
|
2681
|
+
U > -1 && (A.value[U] = { type: w, file: S });
|
|
2682
2682
|
});
|
|
2683
|
-
},
|
|
2683
|
+
}, Te = (c) => {
|
|
2684
2684
|
if (c.files) {
|
|
2685
|
-
const
|
|
2686
|
-
A.value = A.value.filter((
|
|
2687
|
-
var
|
|
2688
|
-
return
|
|
2685
|
+
const w = c.files.map((M) => M.id);
|
|
2686
|
+
A.value = A.value.filter((M) => !(w.findIndex((U) => {
|
|
2687
|
+
var I;
|
|
2688
|
+
return U === ((I = M == null ? void 0 : M.file) == null ? void 0 : I.id);
|
|
2689
2689
|
}) > -1)), q({
|
|
2690
2690
|
type: "hide",
|
|
2691
|
-
id:
|
|
2691
|
+
id: w.join(",")
|
|
2692
2692
|
});
|
|
2693
2693
|
}
|
|
2694
2694
|
}, he = (c) => {
|
|
2695
|
-
let
|
|
2696
|
-
(c.type === "cancelled" || c.type === "removed") && (
|
|
2697
|
-
const
|
|
2695
|
+
let w = "warning";
|
|
2696
|
+
(c.type === "cancelled" || c.type === "removed") && (w = "success");
|
|
2697
|
+
const M = c.hasOwnProperty("message") ? c.message : "";
|
|
2698
2698
|
a.show({
|
|
2699
|
-
options: { type:
|
|
2699
|
+
options: { type: w, message: M },
|
|
2700
2700
|
position: "top-center"
|
|
2701
2701
|
});
|
|
2702
|
-
},
|
|
2702
|
+
}, ve = (c) => {
|
|
2703
2703
|
if (c.type === "addedToQueue" && typeof c.file < "u")
|
|
2704
2704
|
A.value.push({ type: c.type, file: c.file }), ue(c.file);
|
|
2705
2705
|
else if (c.type === "start")
|
|
2706
|
-
|
|
2706
|
+
R(c, "start");
|
|
2707
2707
|
else if (c.type === "done") {
|
|
2708
|
-
|
|
2709
|
-
const
|
|
2708
|
+
R(c, "done");
|
|
2709
|
+
const w = (c.files || []).map((M) => ({
|
|
2710
2710
|
checked: !1,
|
|
2711
|
-
id:
|
|
2712
|
-
name:
|
|
2713
|
-
size:
|
|
2714
|
-
createTime:
|
|
2711
|
+
id: M.id,
|
|
2712
|
+
name: M.name,
|
|
2713
|
+
size: M.size,
|
|
2714
|
+
createTime: He(/* @__PURE__ */ new Date(), "yyyy-MM-dd HH:mm:ss")
|
|
2715
2715
|
}));
|
|
2716
|
-
r.value = [...
|
|
2716
|
+
r.value = [...w, ...g.value], Te(c), e.emit("fUploadDoneEvent", Ie(c.files || [])), e.emit("uploadDoneEvent", Ie(c.files || []));
|
|
2717
2717
|
} else if (c.type === "cancelled" || c.type === "removed" || c.type === "error") {
|
|
2718
|
-
const
|
|
2719
|
-
r.value = [...
|
|
2718
|
+
const w = r.value.filter((M) => c.files && c.files.findIndex((S) => M.id === S.id) < 0);
|
|
2719
|
+
r.value = [...w], he(c);
|
|
2720
2720
|
} else c.type === "rejected" && typeof c.file < "u" && he(c);
|
|
2721
2721
|
};
|
|
2722
|
-
return
|
|
2722
|
+
return Oe(() => {
|
|
2723
2723
|
}), {
|
|
2724
2724
|
disabled: i,
|
|
2725
2725
|
uploadVisible: l,
|
|
@@ -2728,30 +2728,30 @@ function ht(t, e, n) {
|
|
|
2728
2728
|
previewVisible: f,
|
|
2729
2729
|
previewColumns: m,
|
|
2730
2730
|
uploadFiles: A,
|
|
2731
|
-
innerFileInfos:
|
|
2731
|
+
innerFileInfos: g,
|
|
2732
2732
|
previewEnableMulti: d,
|
|
2733
2733
|
previewMultiSelectedLength: k,
|
|
2734
|
-
previewSelectAllBtnChecked:
|
|
2735
|
-
uploadEnableMulti:
|
|
2734
|
+
previewSelectAllBtnChecked: x,
|
|
2735
|
+
uploadEnableMulti: D,
|
|
2736
2736
|
previewCurrentId: T,
|
|
2737
|
-
multiFileRemoveHandler:
|
|
2738
|
-
previewMultiSelectChangeHandler:
|
|
2739
|
-
fileMultiDownloadHandler:
|
|
2740
|
-
selectOrCancelAllHandler:
|
|
2741
|
-
hasColumnHtmlFunc:
|
|
2742
|
-
showPreviewStateColumn:
|
|
2743
|
-
rowSelectedHandler:
|
|
2744
|
-
fileDownloadHandler:
|
|
2745
|
-
filePreviewHandler:
|
|
2746
|
-
fileRemoveHandler:
|
|
2747
|
-
handleStateChange:
|
|
2737
|
+
multiFileRemoveHandler: Z,
|
|
2738
|
+
previewMultiSelectChangeHandler: F,
|
|
2739
|
+
fileMultiDownloadHandler: ae,
|
|
2740
|
+
selectOrCancelAllHandler: re,
|
|
2741
|
+
hasColumnHtmlFunc: V,
|
|
2742
|
+
showPreviewStateColumn: ne,
|
|
2743
|
+
rowSelectedHandler: B,
|
|
2744
|
+
fileDownloadHandler: N,
|
|
2745
|
+
filePreviewHandler: _,
|
|
2746
|
+
fileRemoveHandler: W,
|
|
2747
|
+
handleStateChange: ve
|
|
2748
2748
|
};
|
|
2749
2749
|
}
|
|
2750
|
-
class
|
|
2750
|
+
class $a {
|
|
2751
2751
|
constructor(e, n) {
|
|
2752
2752
|
// 记录在上传的附件数组
|
|
2753
|
-
|
|
2754
|
-
|
|
2753
|
+
L(this, "queue");
|
|
2754
|
+
L(this, "uploadOpts", {
|
|
2755
2755
|
// 默认不限制,0代表不限制 Number.POSITIVE_INFINITY
|
|
2756
2756
|
allowedContentTypes: ["*"],
|
|
2757
2757
|
maxUploads: 0,
|
|
@@ -2763,9 +2763,9 @@ class qa {
|
|
|
2763
2763
|
/**
|
|
2764
2764
|
* 服务器端扩展
|
|
2765
2765
|
*/
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2766
|
+
L(this, "extendServerConfig", null);
|
|
2767
|
+
L(this, "uploadServerSer");
|
|
2768
|
+
L(this, "uploadContext", null);
|
|
2769
2769
|
this.stateChangeRecord = e, this.serverToken = n, this.queue = [], this.uploadServerSer = mt.getServerAPI(this.serverToken);
|
|
2770
2770
|
}
|
|
2771
2771
|
setUploadContext(e) {
|
|
@@ -2781,7 +2781,7 @@ class qa {
|
|
|
2781
2781
|
this.queue = this.queue.filter(
|
|
2782
2782
|
(r) => {
|
|
2783
2783
|
var i;
|
|
2784
|
-
return ((i = r.progress) == null ? void 0 : i.status) !==
|
|
2784
|
+
return ((i = r.progress) == null ? void 0 : i.status) !== Q.Remove;
|
|
2785
2785
|
}
|
|
2786
2786
|
), e.hasOwnProperty("message") || (e.message = "被删除"), this.stateChangeRecord.value = e;
|
|
2787
2787
|
break;
|
|
@@ -2812,7 +2812,7 @@ class qa {
|
|
|
2812
2812
|
if (f.allowed)
|
|
2813
2813
|
r = r.concat(i);
|
|
2814
2814
|
else {
|
|
2815
|
-
const d =
|
|
2815
|
+
const d = Ve(
|
|
2816
2816
|
i,
|
|
2817
2817
|
l
|
|
2818
2818
|
);
|
|
@@ -2828,7 +2828,7 @@ class qa {
|
|
|
2828
2828
|
);
|
|
2829
2829
|
[].map.call(n, (r, i) => {
|
|
2830
2830
|
var o;
|
|
2831
|
-
const l =
|
|
2831
|
+
const l = Ve(r, i);
|
|
2832
2832
|
this.queue.push(l), (o = this.uploadContext) == null || o.emit("stateChange", { type: "addedToQueue", file: l });
|
|
2833
2833
|
}), (a = this.uploadContext) == null || a.emit("stateChange", { type: "allAddedToQueue" });
|
|
2834
2834
|
}
|
|
@@ -2884,7 +2884,7 @@ class qa {
|
|
|
2884
2884
|
);
|
|
2885
2885
|
if (i !== -1 && this.queue[i] && this.queue[i].progress) {
|
|
2886
2886
|
const { progress: o } = this.queue[i];
|
|
2887
|
-
o && (o.status =
|
|
2887
|
+
o && (o.status = Q.Remove);
|
|
2888
2888
|
}
|
|
2889
2889
|
this.serverMethod({ files: [e.file], event: e });
|
|
2890
2890
|
break;
|
|
@@ -2892,7 +2892,7 @@ class qa {
|
|
|
2892
2892
|
const l = this.queue.filter(
|
|
2893
2893
|
(o) => {
|
|
2894
2894
|
var f;
|
|
2895
|
-
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) ===
|
|
2895
|
+
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) === Q.Queue;
|
|
2896
2896
|
}
|
|
2897
2897
|
);
|
|
2898
2898
|
l.length && ((a = this.uploadContext) == null || a.emit("stateChange", {
|
|
@@ -2902,10 +2902,10 @@ class qa {
|
|
|
2902
2902
|
}), this.queue = this.queue.filter(
|
|
2903
2903
|
(o) => {
|
|
2904
2904
|
var f;
|
|
2905
|
-
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) !==
|
|
2905
|
+
return ((f = o == null ? void 0 : o.progress) == null ? void 0 : f.status) !== Q.Queue;
|
|
2906
2906
|
}
|
|
2907
2907
|
)), this.queue.length && (e.type = "remove", this.queue.forEach((o) => {
|
|
2908
|
-
o.progress && (o.progress.status =
|
|
2908
|
+
o.progress && (o.progress.status = Q.Remove);
|
|
2909
2909
|
}), this.serverMethod({ files: this.queue, event: e }));
|
|
2910
2910
|
break;
|
|
2911
2911
|
}
|
|
@@ -2973,58 +2973,60 @@ class qa {
|
|
|
2973
2973
|
this.reset();
|
|
2974
2974
|
}
|
|
2975
2975
|
}
|
|
2976
|
-
const De = /* @__PURE__ */
|
|
2976
|
+
const De = /* @__PURE__ */ te({
|
|
2977
2977
|
name: "FUploader",
|
|
2978
2978
|
components: {
|
|
2979
|
-
"f-upload-progress":
|
|
2980
|
-
"f-preview-checkbox":
|
|
2979
|
+
"f-upload-progress": Ot,
|
|
2980
|
+
"f-preview-checkbox": Ge,
|
|
2981
2981
|
"f-file-select": Ze
|
|
2982
2982
|
},
|
|
2983
|
-
props:
|
|
2983
|
+
props: Ae,
|
|
2984
2984
|
emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fileRemovedEvent", "fUploadDoneEvent", "uploadDoneEvent"],
|
|
2985
2985
|
setup(t, e) {
|
|
2986
|
-
const n =
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
case "removed":
|
|
2990
|
-
e.emit("fileRemovedEvent", p.files[0]);
|
|
2991
|
-
break;
|
|
2992
|
-
}
|
|
2993
|
-
}), Mt("uploaderService", a);
|
|
2994
|
-
const r = N(t.customInfo), i = ft(t.uploadOptions, {
|
|
2986
|
+
const n = O(), a = new $a(n, t.uploadServerToken);
|
|
2987
|
+
Tt("uploaderService", a);
|
|
2988
|
+
const r = O(t.customInfo), i = ft(t.uploadOptions, {
|
|
2995
2989
|
// 允许上传的文件类型
|
|
2996
2990
|
allowedContentTypes: ["*"],
|
|
2997
2991
|
// 默认不限制附件上传个数
|
|
2998
2992
|
maxUploads: 0,
|
|
2999
2993
|
// 单位KB,默认是12M
|
|
3000
2994
|
maxFileSize: "12MB"
|
|
3001
|
-
}), l =
|
|
2995
|
+
}), l = O(null), {
|
|
3002
2996
|
disabled: o,
|
|
3003
2997
|
uploadVisible: f,
|
|
3004
2998
|
uploadDisabled: u,
|
|
3005
2999
|
downloadButtonDisable: d,
|
|
3006
3000
|
previewVisible: h,
|
|
3007
3001
|
previewColumns: m,
|
|
3008
|
-
uploadFiles:
|
|
3009
|
-
innerFileInfos:
|
|
3010
|
-
previewEnableMulti:
|
|
3011
|
-
previewMultiSelectedLength:
|
|
3002
|
+
uploadFiles: D,
|
|
3003
|
+
innerFileInfos: v,
|
|
3004
|
+
previewEnableMulti: x,
|
|
3005
|
+
previewMultiSelectedLength: b,
|
|
3012
3006
|
previewSelectAllBtnChecked: k,
|
|
3013
3007
|
uploadEnableMulti: A,
|
|
3014
3008
|
previewCurrentId: T,
|
|
3015
|
-
multiFileRemoveHandler:
|
|
3016
|
-
previewMultiSelectChangeHandler:
|
|
3017
|
-
fileMultiDownloadHandler:
|
|
3018
|
-
selectOrCancelAllHandler:
|
|
3019
|
-
rowSelectedHandler:
|
|
3020
|
-
hasColumnHtmlFunc:
|
|
3021
|
-
showPreviewStateColumn:
|
|
3022
|
-
fileDownloadHandler:
|
|
3023
|
-
filePreviewHandler:
|
|
3024
|
-
fileRemoveHandler:
|
|
3025
|
-
handleStateChange:
|
|
3026
|
-
} = ht(t, e, l)
|
|
3027
|
-
|
|
3009
|
+
multiFileRemoveHandler: H,
|
|
3010
|
+
previewMultiSelectChangeHandler: g,
|
|
3011
|
+
fileMultiDownloadHandler: N,
|
|
3012
|
+
selectOrCancelAllHandler: _,
|
|
3013
|
+
rowSelectedHandler: W,
|
|
3014
|
+
hasColumnHtmlFunc: V,
|
|
3015
|
+
showPreviewStateColumn: ne,
|
|
3016
|
+
fileDownloadHandler: le,
|
|
3017
|
+
filePreviewHandler: ae,
|
|
3018
|
+
fileRemoveHandler: Z,
|
|
3019
|
+
handleStateChange: re
|
|
3020
|
+
} = ht(t, e, l);
|
|
3021
|
+
K(n, (p) => {
|
|
3022
|
+
switch (re(p), p.type) {
|
|
3023
|
+
case "removed":
|
|
3024
|
+
e.emit("fileRemovedEvent", p.files[0]);
|
|
3025
|
+
break;
|
|
3026
|
+
}
|
|
3027
|
+
});
|
|
3028
|
+
const B = j(() => v.value.length > 0);
|
|
3029
|
+
function F() {
|
|
3028
3030
|
var p;
|
|
3029
3031
|
return ct((i == null ? void 0 : i.allowedContentTypes) || []) ? s("li", null, [s("span", null, [C("支持类型:")]), s("span", {
|
|
3030
3032
|
class: "support-info--item-detail",
|
|
@@ -3041,7 +3043,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3041
3043
|
class: "support-info--item-detail"
|
|
3042
3044
|
}, [i.maxUploads, C("个")])]);
|
|
3043
3045
|
}
|
|
3044
|
-
function
|
|
3046
|
+
function R() {
|
|
3045
3047
|
return f.value && !u.value && !o.value ? s("div", {
|
|
3046
3048
|
class: "ffileupload--support-info"
|
|
3047
3049
|
}, [r.value ? s("ul", {
|
|
@@ -3051,24 +3053,24 @@ const De = /* @__PURE__ */ re({
|
|
|
3051
3053
|
innerHTML: r.value
|
|
3052
3054
|
}, null)])]) : s("ul", {
|
|
3053
3055
|
class: "support-info--wrapper"
|
|
3054
|
-
}, [
|
|
3056
|
+
}, [F(), q(), ue()])]) : null;
|
|
3055
3057
|
}
|
|
3056
|
-
function
|
|
3057
|
-
var
|
|
3058
|
+
function Te(p) {
|
|
3059
|
+
var y, E, $;
|
|
3058
3060
|
return s("div", {
|
|
3059
3061
|
class: "uploadAndpreview--title-container"
|
|
3060
3062
|
}, [s("div", {
|
|
3061
3063
|
class: "ffilepreview--item-icon"
|
|
3062
3064
|
}, [s("span", {
|
|
3063
|
-
class: ["ffilepreview--filetype-icon",
|
|
3065
|
+
class: ["ffilepreview--filetype-icon", ze(((y = p.file) == null ? void 0 : y.name) || "")]
|
|
3064
3066
|
}, null)]), s("div", {
|
|
3065
3067
|
class: "uploadAndpreview--right"
|
|
3066
3068
|
}, [s("a", {
|
|
3067
3069
|
class: "item-content--title",
|
|
3068
|
-
title: (
|
|
3069
|
-
}, [((
|
|
3070
|
+
title: (E = p.file) == null ? void 0 : E.name
|
|
3071
|
+
}, [(($ = p.file) == null ? void 0 : $.name) || "无名称"]), s(G("f-upload-progress"), {
|
|
3070
3072
|
status: p.type === "done" ? "success" : "active",
|
|
3071
|
-
percent:
|
|
3073
|
+
percent: Qe(p),
|
|
3072
3074
|
maxWidth: 300
|
|
3073
3075
|
}, null)])]);
|
|
3074
3076
|
}
|
|
@@ -3078,22 +3080,22 @@ const De = /* @__PURE__ */ re({
|
|
|
3078
3080
|
}, [s("div", {
|
|
3079
3081
|
class: "ffilepreview--item-icon"
|
|
3080
3082
|
}, [s("span", {
|
|
3081
|
-
class: ["ffilepreview--filetype-icon",
|
|
3083
|
+
class: ["ffilepreview--filetype-icon", ze(p.name)]
|
|
3082
3084
|
}, null)]), s("div", {
|
|
3083
3085
|
class: "uploadAndpreview--right"
|
|
3084
3086
|
}, [s("a", {
|
|
3085
3087
|
class: ["item-content--title", "previewButtonDisable.value?'no-preview':''"],
|
|
3086
3088
|
title: p.name,
|
|
3087
|
-
onClick: (
|
|
3089
|
+
onClick: (y) => ae(y, p)
|
|
3088
3090
|
}, [p.name])])]);
|
|
3089
3091
|
}
|
|
3090
|
-
function
|
|
3092
|
+
function ve(p, y, E) {
|
|
3091
3093
|
return s("div", {
|
|
3092
3094
|
class: "uploadAndpreview--filesize-container"
|
|
3093
|
-
}, [p === "preview" &&
|
|
3095
|
+
}, [p === "preview" && E ? s("span", null, [Ea(E.size)]) : null, p === "upload" && y ? s("span", null, [Qe(y)]) : null]);
|
|
3094
3096
|
}
|
|
3095
|
-
function c(p,
|
|
3096
|
-
return
|
|
3097
|
+
function c(p, y) {
|
|
3098
|
+
return y && y.type === "error" ? s("div", {
|
|
3097
3099
|
class: "uploadAndpreview--state-container"
|
|
3098
3100
|
}, [s("p", {
|
|
3099
3101
|
class: "upload-state--uploaded"
|
|
@@ -3101,7 +3103,7 @@ const De = /* @__PURE__ */ re({
|
|
|
3101
3103
|
class: "f-icon f-icon-message_warning text-danger"
|
|
3102
3104
|
}, null), s("span", null, [C("存在异常")])])]) : s("div", {
|
|
3103
3105
|
class: "uploadAndpreview--state-container"
|
|
3104
|
-
}, [p === "upload" ?
|
|
3106
|
+
}, [p === "upload" ? y && y.type !== "done" ? s("p", {
|
|
3105
3107
|
class: "upload-state--uploading"
|
|
3106
3108
|
}, [s("i", {
|
|
3107
3109
|
class: "f-icon f-icon-clock text-warning"
|
|
@@ -3115,79 +3117,79 @@ const De = /* @__PURE__ */ re({
|
|
|
3115
3117
|
class: "f-icon f-icon-success text-success"
|
|
3116
3118
|
}, null), s("span", null, [C("已上传")])]) : ""]);
|
|
3117
3119
|
}
|
|
3118
|
-
function
|
|
3120
|
+
function w(p) {
|
|
3119
3121
|
return s("div", {
|
|
3120
3122
|
class: "uploadAndpreview--action-container"
|
|
3121
3123
|
}, [d.value ? "" : s("button", {
|
|
3122
3124
|
class: "btn preview-btn",
|
|
3123
3125
|
title: "下载",
|
|
3124
|
-
onClick: (
|
|
3126
|
+
onClick: (y) => le(y, p)
|
|
3125
3127
|
}, [s("span", {
|
|
3126
3128
|
class: "f-icon f-icon-enclosure_download"
|
|
3127
3129
|
}, null)]), t.previewButtonDisable ? "" : s("button", {
|
|
3128
3130
|
class: "btn preview-btn",
|
|
3129
3131
|
title: "预览",
|
|
3130
|
-
onClick: (
|
|
3132
|
+
onClick: (y) => ae(y, p)
|
|
3131
3133
|
}, [s("span", {
|
|
3132
3134
|
class: "f-icon f-icon-enclosure_browse"
|
|
3133
3135
|
}, null)]), t.deleteButtonDisable ? "" : s("button", {
|
|
3134
3136
|
class: "btn preview-btn",
|
|
3135
3137
|
title: "删除",
|
|
3136
|
-
onClick: (
|
|
3138
|
+
onClick: (y) => Z(y, p, a)
|
|
3137
3139
|
}, [s("span", {
|
|
3138
3140
|
class: "f-icon f-icon-enclosure_delete",
|
|
3139
3141
|
style: "top: -1px"
|
|
3140
3142
|
}, null)])]);
|
|
3141
3143
|
}
|
|
3142
|
-
function
|
|
3144
|
+
function M(p) {
|
|
3143
3145
|
return s("div", {
|
|
3144
3146
|
class: "uploadAndpreview--date-container"
|
|
3145
3147
|
}, [p.createTime || ""]);
|
|
3146
3148
|
}
|
|
3147
|
-
function S(p,
|
|
3148
|
-
let
|
|
3149
|
-
if (p = p || "preview",
|
|
3150
|
-
return
|
|
3151
|
-
if (p === "preview" &&
|
|
3152
|
-
switch (
|
|
3149
|
+
function S(p, y, E, $) {
|
|
3150
|
+
let Y;
|
|
3151
|
+
if (p = p || "preview", $.formatter)
|
|
3152
|
+
return Y = $.formatter(E[$.field] || "", p, p === "preview" ? E : y, $), Y;
|
|
3153
|
+
if (p === "preview" && E)
|
|
3154
|
+
switch ($.field) {
|
|
3153
3155
|
case "state":
|
|
3154
|
-
|
|
3156
|
+
Y = c("preview", null);
|
|
3155
3157
|
break;
|
|
3156
3158
|
case "name":
|
|
3157
|
-
|
|
3159
|
+
Y = he(E);
|
|
3158
3160
|
break;
|
|
3159
3161
|
case "action":
|
|
3160
|
-
|
|
3162
|
+
Y = w(E);
|
|
3161
3163
|
break;
|
|
3162
3164
|
case "size":
|
|
3163
|
-
|
|
3165
|
+
Y = ve(p, y, E);
|
|
3164
3166
|
break;
|
|
3165
3167
|
case "createTime":
|
|
3166
|
-
|
|
3168
|
+
Y = M(E);
|
|
3167
3169
|
break;
|
|
3168
3170
|
default:
|
|
3169
|
-
|
|
3171
|
+
Y = `<div>${E[$.field] || ""} </div>`;
|
|
3170
3172
|
}
|
|
3171
|
-
if (p === "upload" &&
|
|
3172
|
-
switch (
|
|
3173
|
+
if (p === "upload" && y)
|
|
3174
|
+
switch ($.field) {
|
|
3173
3175
|
case "state":
|
|
3174
|
-
|
|
3176
|
+
Y = c("upload", y);
|
|
3175
3177
|
break;
|
|
3176
3178
|
case "name":
|
|
3177
|
-
|
|
3179
|
+
Y = Te(y);
|
|
3178
3180
|
break;
|
|
3179
3181
|
case "size":
|
|
3180
|
-
|
|
3182
|
+
Y = ve(p, y, E);
|
|
3181
3183
|
break;
|
|
3182
3184
|
default:
|
|
3183
|
-
|
|
3185
|
+
Y = "";
|
|
3184
3186
|
}
|
|
3185
|
-
return
|
|
3187
|
+
return Y;
|
|
3186
3188
|
}
|
|
3187
|
-
function
|
|
3189
|
+
function U() {
|
|
3188
3190
|
return f.value ? s("div", {
|
|
3189
3191
|
class: "header--left-container"
|
|
3190
|
-
}, [s(
|
|
3192
|
+
}, [s(G("f-file-select"), {
|
|
3191
3193
|
ref: l,
|
|
3192
3194
|
disabled: u.value,
|
|
3193
3195
|
selectText: t.selectText,
|
|
@@ -3196,203 +3198,202 @@ const De = /* @__PURE__ */ re({
|
|
|
3196
3198
|
enableMulti: A.value,
|
|
3197
3199
|
options: t.uploadOptions,
|
|
3198
3200
|
extendConfig: t.extendConfig,
|
|
3199
|
-
onStateChange: (p) =>
|
|
3201
|
+
onStateChange: (p) => re(p)
|
|
3200
3202
|
}, null)]) : null;
|
|
3201
3203
|
}
|
|
3202
|
-
function
|
|
3203
|
-
return !f.value && h.value &&
|
|
3204
|
+
function I() {
|
|
3205
|
+
return !f.value && h.value && B.value ? s("div", {
|
|
3204
3206
|
class: "header--left-container header--countInfo"
|
|
3205
3207
|
}, [s("p", {
|
|
3206
3208
|
class: "m-0"
|
|
3207
3209
|
}, [C("共"), s("span", {
|
|
3208
3210
|
class: "count"
|
|
3209
|
-
}, [
|
|
3211
|
+
}, [D.value.length + v.value.length]), C("个附件"), b.value > 0 ? s(se, null, [C("(已选"), s("span", {
|
|
3210
3212
|
class: "count-selected"
|
|
3211
|
-
}, [
|
|
3213
|
+
}, [b.value]), C("个)")]) : ""])]) : null;
|
|
3212
3214
|
}
|
|
3213
|
-
function
|
|
3214
|
-
return (!d.value || !t.deleteButtonDisable) && h.value &&
|
|
3215
|
+
function ge() {
|
|
3216
|
+
return (!d.value || !t.deleteButtonDisable) && h.value && B.value ? s("div", {
|
|
3215
3217
|
class: "header--right-container"
|
|
3216
3218
|
}, [d.value ? null : s("button", {
|
|
3217
3219
|
class: "btn btn-primary f-btn-ml",
|
|
3218
|
-
disabled:
|
|
3219
|
-
onClick: (
|
|
3220
|
+
disabled: b.value === 0,
|
|
3221
|
+
onClick: (E) => N(E)
|
|
3220
3222
|
}, [C("下载")]), t.deleteButtonDisable.value ? null : s("button", {
|
|
3221
3223
|
class: "btn btn-secondary f-btn-ml",
|
|
3222
|
-
disabled:
|
|
3223
|
-
onClick: (
|
|
3224
|
+
disabled: b.value === 0,
|
|
3225
|
+
onClick: (E) => H(E)
|
|
3224
3226
|
}, [C("删除")])]) : null;
|
|
3225
3227
|
}
|
|
3226
|
-
function
|
|
3227
|
-
return m.value.map((p) =>
|
|
3228
|
+
function _e() {
|
|
3229
|
+
return m.value.map((p) => ne(p) ? s("th", {
|
|
3228
3230
|
style: {
|
|
3229
3231
|
width: p.width ? p.width + "px" : "auto"
|
|
3230
3232
|
},
|
|
3231
3233
|
class: [!o.value && p.checkbox && p.checkbox ? "td--hascheckbox" : ""]
|
|
3232
|
-
}, [!o.value &&
|
|
3234
|
+
}, [!o.value && x.value && p.checkbox ? s(G("f-preview-checkbox"), {
|
|
3233
3235
|
class: "preview-checkbox",
|
|
3234
3236
|
id: "previewMultiBtn",
|
|
3235
3237
|
checked: k.value,
|
|
3236
|
-
onCheckedChange: (
|
|
3238
|
+
onCheckedChange: (y) => _(y)
|
|
3237
3239
|
}, null) : null, p.title]) : null);
|
|
3238
3240
|
}
|
|
3239
|
-
function
|
|
3240
|
-
return
|
|
3241
|
-
var
|
|
3241
|
+
function vt() {
|
|
3242
|
+
return D.value.map((p) => {
|
|
3243
|
+
var y;
|
|
3242
3244
|
return s("tr", {
|
|
3243
3245
|
class: "uploadAndpreview--upload-item",
|
|
3244
|
-
id: "uploadAndpreview--upload-item" + (((
|
|
3245
|
-
}, [m.value.map((
|
|
3246
|
-
var
|
|
3246
|
+
id: "uploadAndpreview--upload-item" + (((y = p == null ? void 0 : p.file) == null ? void 0 : y.id) || "")
|
|
3247
|
+
}, [m.value.map((E) => {
|
|
3248
|
+
var $;
|
|
3247
3249
|
return s("td", {
|
|
3248
|
-
class: [!o.value &&
|
|
3249
|
-
}, [
|
|
3250
|
-
id: (
|
|
3250
|
+
class: [!o.value && E.checkbox && E.checkbox ? "td--hascheckbox" : ""]
|
|
3251
|
+
}, [x.value && E.checkbox ? s(G("f-preview-checkbox"), {
|
|
3252
|
+
id: ($ = p == null ? void 0 : p.file) == null ? void 0 : $.id,
|
|
3251
3253
|
checked: p.checked,
|
|
3252
3254
|
disabled: p.type !== "done",
|
|
3253
3255
|
class: "preview-checkbox",
|
|
3254
|
-
onCheckedChange: (
|
|
3255
|
-
}, null) : null,
|
|
3256
|
+
onCheckedChange: (Y) => g(Y)
|
|
3257
|
+
}, null) : null, V(E, "upload") ? S("upload", p, null, E) : null]);
|
|
3256
3258
|
})]);
|
|
3257
3259
|
});
|
|
3258
3260
|
}
|
|
3259
|
-
function
|
|
3260
|
-
return
|
|
3261
|
+
function Be() {
|
|
3262
|
+
return v.value.map((p) => s("tr", {
|
|
3261
3263
|
class: ["uploadAndpreview--preview-item", T.value === p.id ? "uploadAndpreview--currentfile" : ""],
|
|
3262
3264
|
id: "uploadAndpreview--preview-item" + p.id,
|
|
3263
|
-
onClick: (
|
|
3264
|
-
}, [m.value.map((
|
|
3265
|
-
class: [!o.value &&
|
|
3266
|
-
}, [!o.value &&
|
|
3265
|
+
onClick: (y) => W(y, p)
|
|
3266
|
+
}, [m.value.map((y) => ne(y) ? s("td", {
|
|
3267
|
+
class: [!o.value && y.checkbox && y.checkbox ? "td--hascheckbox" : ""]
|
|
3268
|
+
}, [!o.value && x.value && y.checkbox ? s(G("f-preview-checkbox"), {
|
|
3267
3269
|
id: p.id,
|
|
3268
3270
|
checked: p.checked,
|
|
3269
3271
|
class: "preview-checkbox",
|
|
3270
|
-
onCheckedChange: (
|
|
3271
|
-
}, null) : null,
|
|
3272
|
+
onCheckedChange: (E) => g(E)
|
|
3273
|
+
}, null) : null, V(y, "preview") ? S("preview", null, p, y) : s("div", {
|
|
3272
3274
|
class: "text-truncate",
|
|
3273
|
-
innerHTML: S("preview", null, p,
|
|
3275
|
+
innerHTML: S("preview", null, p, y)
|
|
3274
3276
|
}, null)]) : null)]));
|
|
3275
3277
|
}
|
|
3276
3278
|
return () => o.value ? s("div", {
|
|
3277
3279
|
class: "fv-upload-and-preview"
|
|
3278
|
-
}, [
|
|
3280
|
+
}, [B.value ? null : R(), h.value ? s("div", {
|
|
3279
3281
|
class: "uploadAndpreview--content"
|
|
3280
|
-
}, [
|
|
3282
|
+
}, [B.value ? s("table", {
|
|
3281
3283
|
class: "table table-bordered uploadAndpreview--table"
|
|
3282
|
-
}, [s("thead", null, [
|
|
3284
|
+
}, [s("thead", null, [_e()]), s("tbody", null, [Be()])]) : s("p", {
|
|
3283
3285
|
class: "uploadAndpreview--nodata"
|
|
3284
|
-
}, [C("无附件信息")])]) : null,
|
|
3286
|
+
}, [C("无附件信息")])]) : null, B.value ? R() : null]) : s("div", {
|
|
3285
3287
|
class: "fv-upload-and-preview"
|
|
3286
3288
|
}, [s("div", {
|
|
3287
3289
|
class: "uploadAndpreview--header"
|
|
3288
|
-
}, [
|
|
3290
|
+
}, [U(), I(), ge()]), B.value ? null : R(), h.value || f.value ? s("div", {
|
|
3289
3291
|
class: "uploadAndpreview--content"
|
|
3290
|
-
}, [(d.value || !f.value) &&
|
|
3292
|
+
}, [(d.value || !f.value) && D.value.length === 0 && !B.value ? s("p", {
|
|
3291
3293
|
class: "uploadAndpreview--nodata"
|
|
3292
|
-
}, [C("无附件信息")]) : "",
|
|
3294
|
+
}, [C("无附件信息")]) : "", D.value.length > 0 || B ? s("table", {
|
|
3293
3295
|
class: "table table-bordered uploadAndpreview--table"
|
|
3294
|
-
}, [s("thead", null, [
|
|
3296
|
+
}, [s("thead", null, [_e()]), s("tbody", null, [vt(), Be()])]) : null]) : null, B.value ? R() : null]);
|
|
3295
3297
|
}
|
|
3296
3298
|
});
|
|
3297
3299
|
function Ua(t, e, n) {
|
|
3298
3300
|
var H;
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
const r = "", i = "", l = N();
|
|
3302
|
-
function o() {
|
|
3301
|
+
const a = "", r = "", i = O();
|
|
3302
|
+
function l() {
|
|
3303
3303
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
3304
3304
|
}
|
|
3305
|
-
function
|
|
3305
|
+
function o() {
|
|
3306
3306
|
return !1;
|
|
3307
3307
|
}
|
|
3308
|
-
function
|
|
3308
|
+
function f() {
|
|
3309
3309
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
3310
3310
|
}
|
|
3311
|
-
function
|
|
3311
|
+
function u() {
|
|
3312
3312
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
3313
3313
|
}
|
|
3314
|
-
function
|
|
3315
|
-
if (!
|
|
3314
|
+
function d(g) {
|
|
3315
|
+
if (!g || !g.value)
|
|
3316
3316
|
return null;
|
|
3317
|
-
if (
|
|
3318
|
-
return
|
|
3319
|
-
const
|
|
3317
|
+
if (g.value.schema && g.value.schema.type === "component")
|
|
3318
|
+
return g.value;
|
|
3319
|
+
const N = O(g == null ? void 0 : g.value.parent), _ = d(N);
|
|
3320
3320
|
return _ || null;
|
|
3321
3321
|
}
|
|
3322
|
-
function
|
|
3323
|
-
const { componentInstance:
|
|
3324
|
-
return !
|
|
3322
|
+
function h(g = e) {
|
|
3323
|
+
const { componentInstance: N, designerItemElementRef: _ } = g;
|
|
3324
|
+
return !N || !N.value ? null : N.value.canMove ? _ : h(g.parent);
|
|
3325
3325
|
}
|
|
3326
|
-
function
|
|
3326
|
+
function m(g) {
|
|
3327
3327
|
return !!n;
|
|
3328
3328
|
}
|
|
3329
|
-
function
|
|
3329
|
+
function D() {
|
|
3330
3330
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
3331
3331
|
}
|
|
3332
|
-
function
|
|
3332
|
+
function v() {
|
|
3333
3333
|
}
|
|
3334
|
-
function
|
|
3334
|
+
function x(g, N) {
|
|
3335
3335
|
}
|
|
3336
|
-
function
|
|
3337
|
-
const { componentType: _ } =
|
|
3338
|
-
let
|
|
3339
|
-
const
|
|
3340
|
-
return
|
|
3336
|
+
function b(g, N) {
|
|
3337
|
+
const { componentType: _ } = g;
|
|
3338
|
+
let W = et(_, g, N);
|
|
3339
|
+
const V = _.toLowerCase().replace(/-/g, "_");
|
|
3340
|
+
return W && !W.id && W.type === _ && (W.id = `${V}_${Math.random().toString().slice(2, 6)}`), W;
|
|
3341
3341
|
}
|
|
3342
|
-
function
|
|
3343
|
-
const _ = String(M.getAttribute("data-controltype")), R = M.getAttribute("data-feature"), Q = R ? JSON.parse(R) : {};
|
|
3344
|
-
Q.parentComponentInstance = l.value;
|
|
3345
|
-
let V = Pe(_, Q);
|
|
3346
|
-
const G = _.toLowerCase().replace("-", "_");
|
|
3347
|
-
return V && !V.id && V.type === _ && (V.id = `${G}_${Math.random().toString().slice(2, 6)}`), V;
|
|
3342
|
+
function k(g) {
|
|
3348
3343
|
}
|
|
3349
|
-
function
|
|
3344
|
+
function A(...g) {
|
|
3350
3345
|
}
|
|
3351
|
-
function
|
|
3346
|
+
function T() {
|
|
3347
|
+
e != null && e.schema.contents && e.schema.contents.map((g) => {
|
|
3348
|
+
var W;
|
|
3349
|
+
let N = g.id;
|
|
3350
|
+
g.type === "component-ref" && (N = g.component);
|
|
3351
|
+
const _ = t.value.querySelector(`#${N}-design-item`);
|
|
3352
|
+
(W = _ == null ? void 0 : _.componentInstance) != null && W.value.onRemoveComponent && _.componentInstance.value.onRemoveComponent();
|
|
3353
|
+
});
|
|
3352
3354
|
}
|
|
3353
|
-
return
|
|
3354
|
-
canMove:
|
|
3355
|
-
canSelectParent:
|
|
3356
|
-
canDelete:
|
|
3357
|
-
canNested: !
|
|
3355
|
+
return i.value = {
|
|
3356
|
+
canMove: l(),
|
|
3357
|
+
canSelectParent: o(),
|
|
3358
|
+
canDelete: f(),
|
|
3359
|
+
canNested: !u(),
|
|
3358
3360
|
contents: e == null ? void 0 : e.schema.contents,
|
|
3359
3361
|
elementRef: t,
|
|
3360
3362
|
parent: (H = e == null ? void 0 : e.parent) == null ? void 0 : H.componentInstance,
|
|
3361
3363
|
schema: e == null ? void 0 : e.schema,
|
|
3362
|
-
styles:
|
|
3363
|
-
designerClass:
|
|
3364
|
-
canAccepts:
|
|
3365
|
-
getBelongedComponentInstance:
|
|
3366
|
-
getDraggableDesignItemElement:
|
|
3367
|
-
getDraggingDisplayText:
|
|
3368
|
-
getPropConfig:
|
|
3369
|
-
getDragScopeElement:
|
|
3370
|
-
onAcceptMovedChildElement:
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
const La = /* @__PURE__ */ re({
|
|
3364
|
+
styles: a,
|
|
3365
|
+
designerClass: r,
|
|
3366
|
+
canAccepts: m,
|
|
3367
|
+
getBelongedComponentInstance: d,
|
|
3368
|
+
getDraggableDesignItemElement: h,
|
|
3369
|
+
getDraggingDisplayText: D,
|
|
3370
|
+
getPropConfig: A,
|
|
3371
|
+
getDragScopeElement: v,
|
|
3372
|
+
onAcceptMovedChildElement: x,
|
|
3373
|
+
onChildElementMovedOut: k,
|
|
3374
|
+
addNewChildComponentSchema: b,
|
|
3375
|
+
triggerBelongedComponentToMoveWhenMoved: O(!1),
|
|
3376
|
+
triggerBelongedComponentToDeleteWhenDeleted: O(!1),
|
|
3377
|
+
onRemoveComponent: T
|
|
3378
|
+
}, i;
|
|
3379
|
+
}
|
|
3380
|
+
const La = /* @__PURE__ */ te({
|
|
3380
3381
|
name: "FUploaderDesign",
|
|
3381
3382
|
components: {
|
|
3382
|
-
"f-preview-checkbox":
|
|
3383
|
+
"f-preview-checkbox": Ge,
|
|
3383
3384
|
"f-file-select": Ze
|
|
3384
3385
|
},
|
|
3385
|
-
props:
|
|
3386
|
+
props: Ae,
|
|
3386
3387
|
emits: ["filePreviewEvent", "fileDownloadEvent", "previewMultiSelectedEvent", "selectedEvent", "fileRemoveEvent", "fUploadDoneEvent", "uploadDoneEvent"],
|
|
3387
3388
|
setup(t, e) {
|
|
3388
|
-
const n =
|
|
3389
|
+
const n = O(t.customInfo), a = ft(t.uploadOptions, {
|
|
3389
3390
|
// 允许上传的文件类型
|
|
3390
3391
|
allowedContentTypes: ["*"],
|
|
3391
3392
|
// 默认不限制附件上传个数
|
|
3392
3393
|
maxUploads: 0,
|
|
3393
3394
|
// 单位KB,默认是12M
|
|
3394
3395
|
maxFileSize: "12MB"
|
|
3395
|
-
}), r =
|
|
3396
|
+
}), r = O(null), i = [{
|
|
3396
3397
|
id: "attach01",
|
|
3397
3398
|
name: ""
|
|
3398
3399
|
}, {
|
|
@@ -3406,17 +3407,17 @@ const La = /* @__PURE__ */ re({
|
|
|
3406
3407
|
previewVisible: d,
|
|
3407
3408
|
previewColumns: h,
|
|
3408
3409
|
previewEnableMulti: m,
|
|
3409
|
-
previewCurrentId:
|
|
3410
|
-
showPreviewStateColumn:
|
|
3410
|
+
previewCurrentId: D,
|
|
3411
|
+
showPreviewStateColumn: v
|
|
3411
3412
|
} = ht(t, e, r);
|
|
3412
|
-
function
|
|
3413
|
-
var
|
|
3413
|
+
function x() {
|
|
3414
|
+
var F;
|
|
3414
3415
|
return ct((a == null ? void 0 : a.allowedContentTypes) || []) ? s("li", null, [s("span", null, [C("支持类型:")]), s("span", {
|
|
3415
3416
|
class: "support-info--item-detail",
|
|
3416
3417
|
style: "margin-right:4px;"
|
|
3417
|
-
}, [(
|
|
3418
|
+
}, [(F = a.allowedContentTypes) == null ? void 0 : F.join(""), C(",")])]) : null;
|
|
3418
3419
|
}
|
|
3419
|
-
function
|
|
3420
|
+
function b() {
|
|
3420
3421
|
return dt((a == null ? void 0 : a.maxFileSize) || "") ? s("li", null, [s("span", null, [C("单个文件限制:")]), s("span", {
|
|
3421
3422
|
class: "support-info--item-detail"
|
|
3422
3423
|
}, [a.maxFileSize, C(", ")])]) : null;
|
|
@@ -3436,9 +3437,9 @@ const La = /* @__PURE__ */ re({
|
|
|
3436
3437
|
innerHTML: n.value
|
|
3437
3438
|
}, null)])]) : s("ul", {
|
|
3438
3439
|
class: "support-info--wrapper"
|
|
3439
|
-
}, [
|
|
3440
|
+
}, [x(), b(), k()])]) : null;
|
|
3440
3441
|
}
|
|
3441
|
-
function T(
|
|
3442
|
+
function T(F) {
|
|
3442
3443
|
return s("div", {
|
|
3443
3444
|
class: "uploadAndpreview--title-container"
|
|
3444
3445
|
}, [s("div", {
|
|
@@ -3451,14 +3452,14 @@ const La = /* @__PURE__ */ re({
|
|
|
3451
3452
|
class: "ffilepreview--preview-block"
|
|
3452
3453
|
}, null)])]);
|
|
3453
3454
|
}
|
|
3454
|
-
function
|
|
3455
|
+
function H(F) {
|
|
3455
3456
|
return s("div", {
|
|
3456
3457
|
class: "uploadAndpreview--filesize-container"
|
|
3457
3458
|
}, [s("span", {
|
|
3458
3459
|
class: "ffilepreview--preview-block"
|
|
3459
3460
|
}, null)]);
|
|
3460
3461
|
}
|
|
3461
|
-
function
|
|
3462
|
+
function g() {
|
|
3462
3463
|
return s("div", {
|
|
3463
3464
|
class: "uploadAndpreview--state-container"
|
|
3464
3465
|
}, [s("p", {
|
|
@@ -3467,7 +3468,7 @@ const La = /* @__PURE__ */ re({
|
|
|
3467
3468
|
class: "f-icon f-icon-success text-success"
|
|
3468
3469
|
}, null), s("span", null, [C("已上传")])])]);
|
|
3469
3470
|
}
|
|
3470
|
-
function
|
|
3471
|
+
function N(F) {
|
|
3471
3472
|
return s("div", {
|
|
3472
3473
|
class: "uploadAndpreview--action-container"
|
|
3473
3474
|
}, [u.value ? "" : s("button", {
|
|
@@ -3488,49 +3489,49 @@ const La = /* @__PURE__ */ re({
|
|
|
3488
3489
|
style: "top: -1px"
|
|
3489
3490
|
}, null)])]);
|
|
3490
3491
|
}
|
|
3491
|
-
function
|
|
3492
|
+
function _(F) {
|
|
3492
3493
|
return s("div", {
|
|
3493
3494
|
class: "uploadAndpreview--date-container"
|
|
3494
3495
|
}, [C(" "), s("span", {
|
|
3495
3496
|
class: "ffilepreview--preview-block"
|
|
3496
3497
|
}, null)]);
|
|
3497
3498
|
}
|
|
3498
|
-
function
|
|
3499
|
-
let
|
|
3500
|
-
if (
|
|
3499
|
+
function W(F, q, ue) {
|
|
3500
|
+
let R = null;
|
|
3501
|
+
if (F = F || "preview", F === "preview" && q)
|
|
3501
3502
|
switch (ue.field) {
|
|
3502
3503
|
case "state":
|
|
3503
|
-
|
|
3504
|
+
R = g();
|
|
3504
3505
|
break;
|
|
3505
3506
|
case "name":
|
|
3506
|
-
|
|
3507
|
+
R = T();
|
|
3507
3508
|
break;
|
|
3508
3509
|
case "action":
|
|
3509
|
-
|
|
3510
|
+
R = N();
|
|
3510
3511
|
break;
|
|
3511
3512
|
case "size":
|
|
3512
|
-
|
|
3513
|
+
R = H();
|
|
3513
3514
|
break;
|
|
3514
3515
|
case "createTime":
|
|
3515
|
-
|
|
3516
|
+
R = _();
|
|
3516
3517
|
break;
|
|
3517
3518
|
default:
|
|
3518
|
-
|
|
3519
|
+
R = s("span", {
|
|
3519
3520
|
class: "ffilepreview--preview-block"
|
|
3520
3521
|
}, null);
|
|
3521
3522
|
}
|
|
3522
|
-
return
|
|
3523
|
+
return R;
|
|
3523
3524
|
}
|
|
3524
|
-
function
|
|
3525
|
+
function V() {
|
|
3525
3526
|
return o.value ? s("div", {
|
|
3526
3527
|
class: "header--left-container"
|
|
3527
|
-
}, [s(
|
|
3528
|
+
}, [s(G("f-file-select"), {
|
|
3528
3529
|
ref: r,
|
|
3529
3530
|
disabled: f.value,
|
|
3530
3531
|
selectText: t.selectText
|
|
3531
3532
|
}, null)]) : null;
|
|
3532
3533
|
}
|
|
3533
|
-
function
|
|
3534
|
+
function ne() {
|
|
3534
3535
|
return (!u.value || !t.deleteButtonDisable) && d.value ? s("div", {
|
|
3535
3536
|
class: "header--right-container"
|
|
3536
3537
|
}, [u.value ? null : s("button", {
|
|
@@ -3541,42 +3542,42 @@ const La = /* @__PURE__ */ re({
|
|
|
3541
3542
|
disabled: !0
|
|
3542
3543
|
}, [C("删除")])]) : null;
|
|
3543
3544
|
}
|
|
3544
|
-
function
|
|
3545
|
-
return h.value.map((
|
|
3545
|
+
function le() {
|
|
3546
|
+
return h.value.map((F) => v(F) ? s("th", {
|
|
3546
3547
|
style: {
|
|
3547
|
-
width:
|
|
3548
|
+
width: F.width ? F.width + "px" : "auto"
|
|
3548
3549
|
},
|
|
3549
|
-
class: [!l.value &&
|
|
3550
|
-
}, [!l.value && m.value &&
|
|
3550
|
+
class: [!l.value && F.checkbox && F.checkbox ? "td--hascheckbox" : ""]
|
|
3551
|
+
}, [!l.value && m.value && F.checkbox ? s(G("f-preview-checkbox"), {
|
|
3551
3552
|
class: "preview-checkbox",
|
|
3552
3553
|
id: "previewMultiBtn"
|
|
3553
|
-
}, null) : null,
|
|
3554
|
+
}, null) : null, F.title]) : null);
|
|
3554
3555
|
}
|
|
3555
|
-
function
|
|
3556
|
-
return i.map((
|
|
3557
|
-
class: ["uploadAndpreview--preview-item",
|
|
3558
|
-
id: "uploadAndpreview--preview-item" +
|
|
3559
|
-
}, [h.value.map((q) =>
|
|
3556
|
+
function ae() {
|
|
3557
|
+
return i.map((F) => s("tr", {
|
|
3558
|
+
class: ["uploadAndpreview--preview-item", D.value === F.id ? "uploadAndpreview--currentfile" : ""],
|
|
3559
|
+
id: "uploadAndpreview--preview-item" + F.id
|
|
3560
|
+
}, [h.value.map((q) => v(q) ? s("td", {
|
|
3560
3561
|
class: [!l.value && q.checkbox && q.checkbox ? "td--hascheckbox" : ""]
|
|
3561
|
-
}, [!l.value && m.value && q.checkbox ? s(
|
|
3562
|
+
}, [!l.value && m.value && q.checkbox ? s(G("f-preview-checkbox"), {
|
|
3562
3563
|
class: "preview-checkbox"
|
|
3563
|
-
}, null) : null,
|
|
3564
|
+
}, null) : null, W("preview", F, q)]) : null)]));
|
|
3564
3565
|
}
|
|
3565
3566
|
St(() => {
|
|
3566
3567
|
});
|
|
3567
|
-
const
|
|
3568
|
-
return
|
|
3569
|
-
|
|
3570
|
-
}), e.expose(
|
|
3568
|
+
const Z = O(), re = oe("design-item-context"), B = Ua(Z, re);
|
|
3569
|
+
return Ee(() => {
|
|
3570
|
+
Z.value.componentInstance = B;
|
|
3571
|
+
}), e.expose(B.value), () => s("div", {
|
|
3571
3572
|
class: "fv-upload-and-preview",
|
|
3572
|
-
ref:
|
|
3573
|
-
}, [d.value || o.value ? s(
|
|
3573
|
+
ref: Z
|
|
3574
|
+
}, [d.value || o.value ? s(se, null, [l.value ? null : s("div", {
|
|
3574
3575
|
class: "uploadAndpreview--header"
|
|
3575
|
-
}, [
|
|
3576
|
+
}, [V(), ne()]), s("div", {
|
|
3576
3577
|
class: "uploadAndpreview--content"
|
|
3577
3578
|
}, [s("table", {
|
|
3578
3579
|
class: "table table-bordered uploadAndpreview--table"
|
|
3579
|
-
}, [s("thead", null, [
|
|
3580
|
+
}, [s("thead", null, [le()]), s("tbody", null, [ae()])])]), A()]) : null]);
|
|
3580
3581
|
}
|
|
3581
3582
|
});
|
|
3582
3583
|
De.register = (t, e, n, a) => {
|
|
@@ -3585,11 +3586,11 @@ De.register = (t, e, n, a) => {
|
|
|
3585
3586
|
De.registerDesigner = (t, e, n) => {
|
|
3586
3587
|
t.uploader = La, e.uploader = tt;
|
|
3587
3588
|
};
|
|
3588
|
-
const
|
|
3589
|
+
const Ga = Ct(De);
|
|
3589
3590
|
export {
|
|
3590
3591
|
De as FUploader,
|
|
3591
3592
|
Pa as UploadServerAPI,
|
|
3592
|
-
|
|
3593
|
+
Ga as default,
|
|
3593
3594
|
tt as propsResolver,
|
|
3594
|
-
|
|
3595
|
+
Ae as uploaderProps
|
|
3595
3596
|
};
|