@farris/ui-vue 1.2.8 → 1.3.0
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 +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
import { computed as h, defineComponent as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { withInstall as
|
|
4
|
-
const V = {},
|
|
1
|
+
import { computed as h, defineComponent as F, ref as d, watch as z, createVNode as y, Fragment as H, inject as Q, onMounted as U } from "vue";
|
|
2
|
+
import { isPlainObject as R, cloneDeep as Z } from "lodash-es";
|
|
3
|
+
import { withInstall as I } from "../common/index.esm.js";
|
|
4
|
+
const V = {}, q = {};
|
|
5
5
|
function L(e) {
|
|
6
|
-
const { properties: r, title:
|
|
7
|
-
return s.id = `${
|
|
6
|
+
const { properties: r, title: g, ignore: s } = e, n = s && Array.isArray(s), i = Object.keys(r).reduce((f, a) => ((!n || !s.find((v) => v == a)) && (f[a] = r[a].type === "object" && r[a].properties ? L(r[a]) : Z(r[a].default)), f), {});
|
|
7
|
+
return (!n || !s.find((f) => f == "id")) && (i.id = `${g}-${Date.now()}`), i;
|
|
8
8
|
}
|
|
9
|
-
function W(e, r = {}) {
|
|
10
|
-
const
|
|
11
|
-
if (
|
|
12
|
-
let
|
|
13
|
-
const
|
|
14
|
-
return
|
|
9
|
+
function W(e, r = {}, g) {
|
|
10
|
+
const s = V[e];
|
|
11
|
+
if (s) {
|
|
12
|
+
let n = L(s);
|
|
13
|
+
const i = q[e];
|
|
14
|
+
return n = i ? i({ getSchemaByType: W }, n, r, g) : n, n;
|
|
15
15
|
}
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
18
|
function K(e, r) {
|
|
19
|
-
const
|
|
20
|
-
return Object.keys(e).reduce((s, n) => (s[n] &&
|
|
19
|
+
const g = L(r);
|
|
20
|
+
return Object.keys(e).reduce((s, n) => (s[n] && R(s[n]) && R(e[n]) ? Object.assign(s[n], e[n]) : s[n] = e[n], s), g), g;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ee(e, r) {
|
|
23
23
|
return Object.keys(e).filter((s) => e[s] != null).reduce((s, n) => {
|
|
24
24
|
if (r.has(n)) {
|
|
25
|
-
const
|
|
26
|
-
if (typeof
|
|
27
|
-
s[
|
|
25
|
+
const i = r.get(n);
|
|
26
|
+
if (typeof i == "string")
|
|
27
|
+
s[i] = e[n];
|
|
28
28
|
else {
|
|
29
|
-
const
|
|
30
|
-
Object.assign(s,
|
|
29
|
+
const f = i(n, e[n], e);
|
|
30
|
+
Object.assign(s, f);
|
|
31
31
|
}
|
|
32
32
|
} else
|
|
33
33
|
s[n] = e[n];
|
|
34
34
|
return s;
|
|
35
35
|
}, {});
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function re(e, r, g = /* @__PURE__ */ new Map()) {
|
|
38
38
|
const s = K(e, r);
|
|
39
|
-
return
|
|
39
|
+
return ee(s, g);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
function r(t, o,
|
|
43
|
-
if (typeof
|
|
44
|
-
return
|
|
45
|
-
if (typeof
|
|
46
|
-
const m = Object.keys(
|
|
41
|
+
function te(e = {}) {
|
|
42
|
+
function r(t, o, l, c) {
|
|
43
|
+
if (typeof l == "number")
|
|
44
|
+
return c[t].length === l;
|
|
45
|
+
if (typeof l == "object") {
|
|
46
|
+
const m = Object.keys(l)[0], b = l[m];
|
|
47
47
|
if (m === "not")
|
|
48
|
-
return Number(
|
|
48
|
+
return Number(c[t].length) !== Number(b);
|
|
49
49
|
if (m === "moreThan")
|
|
50
|
-
return Number(
|
|
50
|
+
return Number(c[t].length) >= Number(b);
|
|
51
51
|
if (m === "lessThan")
|
|
52
|
-
return Number(
|
|
52
|
+
return Number(c[t].length) <= Number(b);
|
|
53
53
|
}
|
|
54
54
|
return !1;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return
|
|
56
|
+
function g(t, o, l, c) {
|
|
57
|
+
return c[t] && c[t].propertyValue && String(c[t].propertyValue.value) === String(l);
|
|
58
58
|
}
|
|
59
59
|
const s = /* @__PURE__ */ new Map([
|
|
60
60
|
["length", r],
|
|
61
|
-
["getProperty",
|
|
61
|
+
["getProperty", g]
|
|
62
62
|
]);
|
|
63
63
|
Object.keys(e).reduce((t, o) => (t.set(o, e[o]), t), s);
|
|
64
64
|
function n(t, o) {
|
|
65
|
-
const
|
|
66
|
-
return typeof o == "number" ? [{ target:
|
|
67
|
-
if (
|
|
68
|
-
return { target:
|
|
69
|
-
const m =
|
|
70
|
-
return { target:
|
|
65
|
+
const l = t;
|
|
66
|
+
return typeof o == "number" ? [{ target: l, operator: "length", param: null, value: Number(o) }] : typeof o == "boolean" ? [{ target: l, operator: "getProperty", param: t, value: !!o }] : typeof o == "object" ? Object.keys(o).map((c) => {
|
|
67
|
+
if (c === "length")
|
|
68
|
+
return { target: l, operator: "length", param: null, value: o[c] };
|
|
69
|
+
const m = c, b = o[c];
|
|
70
|
+
return { target: l, operator: "getProperty", param: m, value: b };
|
|
71
71
|
}) : [];
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return Object.keys(t).reduce((
|
|
75
|
-
const m = n(
|
|
76
|
-
return
|
|
73
|
+
function i(t) {
|
|
74
|
+
return Object.keys(t).reduce((l, c) => {
|
|
75
|
+
const m = n(c, t[c]);
|
|
76
|
+
return l.push(...m), l;
|
|
77
77
|
}, []);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function f(t, o) {
|
|
80
80
|
if (s.has(t.operator)) {
|
|
81
|
-
const
|
|
82
|
-
return
|
|
81
|
+
const l = s.get(t.operator);
|
|
82
|
+
return l && l(t.target, t.param, t.value, o) || !1;
|
|
83
83
|
}
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
86
|
+
function a(t, o) {
|
|
87
|
+
return i(t).reduce((m, b) => m && f(b, o), !0);
|
|
88
88
|
}
|
|
89
89
|
function v(t, o) {
|
|
90
|
-
const
|
|
91
|
-
return
|
|
90
|
+
const l = Object.keys(t), c = l.includes("allOf"), m = l.includes("anyOf"), b = c || m, p = (b ? t[b ? c ? "allOf" : "anyOf" : "allOf"] : [t]).map((P) => a(P, o));
|
|
91
|
+
return c ? !p.includes(!1) : p.includes(!0);
|
|
92
92
|
}
|
|
93
93
|
return { parseValueSchema: v };
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
function
|
|
98
|
-
return V[r.title] = r,
|
|
99
|
-
const
|
|
100
|
-
return Object.assign(v,
|
|
95
|
+
const se = {}, ne = {};
|
|
96
|
+
te();
|
|
97
|
+
function oe(e, r, g = /* @__PURE__ */ new Map(), s = (f, a, v) => a, n = {}, i = (f) => f) {
|
|
98
|
+
return V[r.title] = r, q[r.title] = s, se[r.title] = n, ne[r.title] = i, (f = {}) => {
|
|
99
|
+
const a = re(f, r, g), v = Object.keys(e).reduce((t, o) => (t[o] = e[o].default, t), {});
|
|
100
|
+
return Object.assign(v, a);
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function ae(e, r) {
|
|
104
104
|
return { customClass: r.class, customStyle: r.style };
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
["appearance",
|
|
106
|
+
const ce = /* @__PURE__ */ new Map([
|
|
107
|
+
["appearance", ae]
|
|
108
108
|
]);
|
|
109
|
-
function
|
|
109
|
+
function le(e, r, g) {
|
|
110
110
|
return r;
|
|
111
111
|
}
|
|
112
|
-
const
|
|
112
|
+
const ue = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-design.gitee.io/progress.schema.json", fe = "progress", ge = "A Farris Component", pe = "object", de = {
|
|
113
113
|
id: {
|
|
114
114
|
description: "The unique identifier for progress",
|
|
115
115
|
type: "string"
|
|
@@ -171,18 +171,18 @@ const le = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
171
171
|
type: "boolean",
|
|
172
172
|
default: !0
|
|
173
173
|
}
|
|
174
|
-
},
|
|
174
|
+
}, ye = [
|
|
175
175
|
"id",
|
|
176
176
|
"type"
|
|
177
|
-
],
|
|
178
|
-
$schema:
|
|
179
|
-
$id:
|
|
180
|
-
title:
|
|
181
|
-
description:
|
|
182
|
-
type:
|
|
183
|
-
properties:
|
|
184
|
-
required:
|
|
185
|
-
},
|
|
177
|
+
], he = {
|
|
178
|
+
$schema: ue,
|
|
179
|
+
$id: ie,
|
|
180
|
+
title: fe,
|
|
181
|
+
description: ge,
|
|
182
|
+
type: pe,
|
|
183
|
+
properties: de,
|
|
184
|
+
required: ye
|
|
185
|
+
}, ve = "progress", me = "A Farris Component", ke = "object", be = {
|
|
186
186
|
basic: {
|
|
187
187
|
description: "Basic Infomation",
|
|
188
188
|
title: "基本信息",
|
|
@@ -204,12 +204,12 @@ const le = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
},
|
|
208
|
-
title:
|
|
209
|
-
description:
|
|
210
|
-
type:
|
|
211
|
-
categories:
|
|
212
|
-
},
|
|
207
|
+
}, Pe = {
|
|
208
|
+
title: ve,
|
|
209
|
+
description: me,
|
|
210
|
+
type: ke,
|
|
211
|
+
categories: be
|
|
212
|
+
}, A = {
|
|
213
213
|
progressType: { type: String, default: "line" },
|
|
214
214
|
strokeWidth: { type: Number, default: 0 },
|
|
215
215
|
size: { type: String, default: "default" },
|
|
@@ -240,245 +240,245 @@ const le = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
240
240
|
* 格式化进度信息
|
|
241
241
|
*/
|
|
242
242
|
format: { type: Function, default: (e, r) => `${e}%` }
|
|
243
|
-
},
|
|
244
|
-
function
|
|
245
|
-
function r(
|
|
246
|
-
return +
|
|
243
|
+
}, _ = oe(A, he, ce, le, Pe);
|
|
244
|
+
function Se(e) {
|
|
245
|
+
function r(f) {
|
|
246
|
+
return +f.replace("%", "");
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
let
|
|
250
|
-
return Object.keys(
|
|
251
|
-
const t =
|
|
252
|
-
isNaN(o) ||
|
|
248
|
+
function g(f) {
|
|
249
|
+
let a = [];
|
|
250
|
+
return Object.keys(f).forEach((v) => {
|
|
251
|
+
const t = f[v], o = r(v);
|
|
252
|
+
isNaN(o) || a.push({
|
|
253
253
|
key: o,
|
|
254
254
|
value: t
|
|
255
255
|
});
|
|
256
|
-
}),
|
|
256
|
+
}), a = a.sort((v, t) => v.key - t.key), a;
|
|
257
257
|
}
|
|
258
258
|
const s = h(() => !!e.strokeColor && typeof e.strokeColor != "string"), n = h(() => {
|
|
259
|
-
const { from:
|
|
259
|
+
const { from: f = "#59a1ff", to: a = "#59a1ff", direction: v = "to right", ...t } = e.strokeColor;
|
|
260
260
|
if (Object.keys(t).length !== 0) {
|
|
261
|
-
const o =
|
|
261
|
+
const o = g(t).map(({ key: l, value: c }) => `${c} ${l}%`).join(", ");
|
|
262
262
|
return `linear-gradient(${v}, ${o})`;
|
|
263
263
|
}
|
|
264
|
-
return `linear-gradient(${v}, ${
|
|
265
|
-
}),
|
|
264
|
+
return `linear-gradient(${v}, ${f}, ${a})`;
|
|
265
|
+
}), i = h(() => g(e.strokeColor).map(({ key: f, value: a }) => ({ offset: `${f}%`, color: a })));
|
|
266
266
|
return {
|
|
267
267
|
isGradient: s,
|
|
268
268
|
linearGradient: n,
|
|
269
|
-
circleGradient:
|
|
269
|
+
circleGradient: i
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function $e(e) {
|
|
273
273
|
return { strokeWidth: h(() => e.strokeWidth || (e.progressType === "line" && e.size !== "small" ? 8 : 6)) };
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function we(e) {
|
|
276
276
|
return { formatPercentageText: h(() => e.format(e.percent, e.successPercent)) };
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
const { isCircleStyle: n } = r, { isGradient:
|
|
280
|
-
const
|
|
278
|
+
function je(e, r, g, s) {
|
|
279
|
+
const { isCircleStyle: n } = r, { isGradient: i, linearGradient: f } = g, { strokeWidth: a } = s, v = h(() => {
|
|
280
|
+
const p = {
|
|
281
281
|
"f-progress": !0,
|
|
282
282
|
"f-progress-line": e.progressType === "line",
|
|
283
283
|
"ant-progress-small": e.size === "small",
|
|
284
284
|
"f-progress-show-info": e.showInfo,
|
|
285
285
|
"f-progress-circle": n.value
|
|
286
286
|
}, $ = `f-progress-status-${e.progressStatus}`;
|
|
287
|
-
return
|
|
287
|
+
return p[$] = !0, p;
|
|
288
288
|
}), t = h(() => ({
|
|
289
289
|
width: `${e.width}px`,
|
|
290
290
|
height: `${e.width}px`,
|
|
291
291
|
"font-size": `${e.width * 0.15 + 6}px`,
|
|
292
|
-
"f-progress-circle-gradient":
|
|
292
|
+
"f-progress-circle-gradient": i.value
|
|
293
293
|
})), o = h(() => ({
|
|
294
294
|
"f-progress-inner": !0,
|
|
295
|
-
"f-progress-circle-gradient":
|
|
296
|
-
})),
|
|
297
|
-
const
|
|
298
|
-
let
|
|
295
|
+
"f-progress-circle-gradient": i.value
|
|
296
|
+
})), l = 0, c = h(() => l + 1), m = h(() => {
|
|
297
|
+
const p = 50 - a.value / 2, $ = e.gapPosition || (e.progressType === "circle" ? "top" : "bottom");
|
|
298
|
+
let P = 0, w = -p, O = 0, u = p * -2;
|
|
299
299
|
switch ($) {
|
|
300
300
|
case "left":
|
|
301
|
-
|
|
301
|
+
P = -p, w = 0, O = p * 2, u = 0;
|
|
302
302
|
break;
|
|
303
303
|
case "right":
|
|
304
|
-
|
|
304
|
+
P = p, w = 0, O = p * -2, u = 0;
|
|
305
305
|
break;
|
|
306
306
|
case "bottom":
|
|
307
|
-
w =
|
|
307
|
+
w = p, u = p * 2;
|
|
308
308
|
break;
|
|
309
309
|
}
|
|
310
|
-
return `M 50,50 m ${
|
|
311
|
-
a ${
|
|
312
|
-
a ${
|
|
313
|
-
}),
|
|
314
|
-
const
|
|
310
|
+
return `M 50,50 m ${P},${w}
|
|
311
|
+
a ${p},${p} 0 1 1 ${O},${-u}
|
|
312
|
+
a ${p},${p} 0 1 1 ${-O},${u}`;
|
|
313
|
+
}), b = h(() => {
|
|
314
|
+
const p = 50 - a.value / 2, $ = Math.PI * 2 * p, P = e.gapDegree || (e.progressType === "circle" ? 0 : 75);
|
|
315
315
|
return {
|
|
316
|
-
strokeDasharray: `${$ -
|
|
317
|
-
strokeDashoffset: `-${
|
|
316
|
+
strokeDasharray: `${$ - P}px ${$}px`,
|
|
317
|
+
strokeDashoffset: `-${P / 2}px`,
|
|
318
318
|
transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"
|
|
319
319
|
};
|
|
320
|
-
}),
|
|
321
|
-
const
|
|
322
|
-
return w.map((O,
|
|
323
|
-
const k = w.length === 2 &&
|
|
320
|
+
}), D = h(() => {
|
|
321
|
+
const p = 50 - a.value / 2, $ = Math.PI * 2 * p, P = e.gapDegree || (e.progressType === "circle" ? 0 : 75), w = e.successPercent !== void 0 && e.successPercent !== null ? [e.successPercent, e.percent] : [e.percent];
|
|
322
|
+
return w.map((O, u) => {
|
|
323
|
+
const k = w.length === 2 && u === 0;
|
|
324
324
|
return {
|
|
325
|
-
stroke:
|
|
325
|
+
stroke: i.value && !k ? `url(#gradient-${c.value})` : null,
|
|
326
326
|
strokePathStyle: {
|
|
327
|
-
stroke:
|
|
327
|
+
stroke: i.value ? null : k ? "default" : e.strokeColor,
|
|
328
328
|
transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",
|
|
329
|
-
strokeDasharray: `${(O || 0) / 100 * ($ -
|
|
330
|
-
strokeDashoffset: `-${
|
|
329
|
+
strokeDasharray: `${(O || 0) / 100 * ($ - P)}px ${$}px`,
|
|
330
|
+
strokeDashoffset: `-${P / 2}px`
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
333
|
}).reverse();
|
|
334
|
-
}),
|
|
334
|
+
}), T = h(() => ({
|
|
335
335
|
width: `${e.percent}%`,
|
|
336
336
|
"border-radius": e.strokeLinecap === "round" ? "100px" : "0",
|
|
337
|
-
background:
|
|
338
|
-
"background-image":
|
|
339
|
-
height: `${
|
|
337
|
+
background: i.value ? null : e.strokeColor,
|
|
338
|
+
"background-image": i.value ? f.value : null,
|
|
339
|
+
height: `${a.value}px`
|
|
340
340
|
}));
|
|
341
341
|
return {
|
|
342
342
|
progressClass: v,
|
|
343
343
|
inCircleProgressBarStyle: t,
|
|
344
344
|
inCircleProgressBarClass: o,
|
|
345
345
|
pathString: m,
|
|
346
|
-
trailPathStyle:
|
|
347
|
-
progressCirclePaths:
|
|
348
|
-
gradientId:
|
|
349
|
-
inlineProgressBackgroundStyle:
|
|
346
|
+
trailPathStyle: b,
|
|
347
|
+
progressCirclePaths: D,
|
|
348
|
+
gradientId: c,
|
|
349
|
+
inlineProgressBackgroundStyle: T
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Oe(e) {
|
|
353
353
|
return { isCircleStyle: h(() => e.progressType === "circle" || e.progressType === "dashboard") };
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Be(e) {
|
|
356
356
|
const r = h(() => {
|
|
357
357
|
const n = {
|
|
358
358
|
"f-progress-text-icon": !0,
|
|
359
359
|
"f-icon": !0
|
|
360
|
-
},
|
|
361
|
-
return n[
|
|
362
|
-
}),
|
|
360
|
+
}, i = `f-icon-${e.progressStatus}`;
|
|
361
|
+
return n[i] = !0, n;
|
|
362
|
+
}), g = h(() => {
|
|
363
363
|
const n = {
|
|
364
364
|
"f-progress-text-icon": !0,
|
|
365
365
|
"f-icon": !0
|
|
366
|
-
},
|
|
367
|
-
return n[
|
|
366
|
+
}, i = e.progressStatus === "success" ? "f-icon-checkmark" : "f-icon-x";
|
|
367
|
+
return n[i] = !0, n;
|
|
368
368
|
}), s = h(() => e.progressStatus === "error" || e.progressStatus === "success");
|
|
369
369
|
return {
|
|
370
370
|
inlineProgrssStatusClass: r,
|
|
371
|
-
circleProgrssStatusClass:
|
|
371
|
+
circleProgrssStatusClass: g,
|
|
372
372
|
shouldShowStatus: s
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Te(e) {
|
|
376
376
|
const r = h(() => ({
|
|
377
377
|
width: `${e.successPercent}%`,
|
|
378
378
|
"border-radius": e.strokeLinecap === "round" ? "100px" : "0",
|
|
379
379
|
height: `${e.strokeWidth}px`,
|
|
380
380
|
"background-image": e.enableBackgroundImg ? `url(${e.backgroundImg})` : null
|
|
381
|
-
})),
|
|
382
|
-
return { inlineProgressSuccessBackgroundStyle: r, shouldShowSuccessInlineProgressBackground:
|
|
381
|
+
})), g = h(() => e.successPercent || e.successPercent === 0);
|
|
382
|
+
return { inlineProgressSuccessBackgroundStyle: r, shouldShowSuccessInlineProgressBackground: g };
|
|
383
383
|
}
|
|
384
|
-
const G = /* @__PURE__ */
|
|
384
|
+
const G = /* @__PURE__ */ F({
|
|
385
385
|
name: "FProgress",
|
|
386
|
-
props:
|
|
386
|
+
props: A,
|
|
387
387
|
emits: [],
|
|
388
388
|
setup(e) {
|
|
389
|
-
const r = d(e.progressType),
|
|
390
|
-
isGradient:
|
|
391
|
-
circleGradient:
|
|
392
|
-
} =
|
|
389
|
+
const r = d(e.progressType), g = d(e.showInfo), s = d(e.percent), n = d(e.strokeLinecap), i = Se(e), {
|
|
390
|
+
isGradient: f,
|
|
391
|
+
circleGradient: a
|
|
392
|
+
} = i, v = $e(e), {
|
|
393
393
|
strokeWidth: t
|
|
394
394
|
} = v, {
|
|
395
395
|
formatPercentageText: o
|
|
396
|
-
} =
|
|
397
|
-
isCircleStyle:
|
|
398
|
-
} =
|
|
396
|
+
} = we(e), l = Oe(e), {
|
|
397
|
+
isCircleStyle: c
|
|
398
|
+
} = l, {
|
|
399
399
|
progressClass: m,
|
|
400
|
-
inCircleProgressBarStyle:
|
|
401
|
-
inCircleProgressBarClass:
|
|
402
|
-
pathString:
|
|
403
|
-
trailPathStyle:
|
|
400
|
+
inCircleProgressBarStyle: b,
|
|
401
|
+
inCircleProgressBarClass: D,
|
|
402
|
+
pathString: T,
|
|
403
|
+
trailPathStyle: p,
|
|
404
404
|
progressCirclePaths: $,
|
|
405
|
-
gradientId:
|
|
405
|
+
gradientId: P,
|
|
406
406
|
inlineProgressBackgroundStyle: w
|
|
407
|
-
} =
|
|
407
|
+
} = je(e, l, i, v), {
|
|
408
408
|
inlineProgrssStatusClass: O,
|
|
409
|
-
circleProgrssStatusClass:
|
|
409
|
+
circleProgrssStatusClass: u,
|
|
410
410
|
shouldShowStatus: k
|
|
411
|
-
} =
|
|
412
|
-
inlineProgressSuccessBackgroundStyle:
|
|
413
|
-
shouldShowSuccessInlineProgressBackground:
|
|
414
|
-
} =
|
|
415
|
-
|
|
416
|
-
s.value =
|
|
411
|
+
} = Be(e), {
|
|
412
|
+
inlineProgressSuccessBackgroundStyle: S,
|
|
413
|
+
shouldShowSuccessInlineProgressBackground: B
|
|
414
|
+
} = Te(e);
|
|
415
|
+
z(() => e.percent, (N) => {
|
|
416
|
+
s.value = N || 0;
|
|
417
417
|
});
|
|
418
|
-
function
|
|
419
|
-
return
|
|
418
|
+
function C() {
|
|
419
|
+
return g.value && y("span", {
|
|
420
420
|
class: "f-progress-text"
|
|
421
421
|
}, [k.value ? y("span", {
|
|
422
|
-
class:
|
|
422
|
+
class: c.value ? u.value : O.value
|
|
423
423
|
}, null) : o.value]);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
return y(
|
|
425
|
+
function M() {
|
|
426
|
+
return y(H, null, [y("div", {
|
|
427
427
|
class: "f-progress-outer"
|
|
428
428
|
}, [y("div", {
|
|
429
429
|
class: "f-progress-inner"
|
|
430
430
|
}, [y("div", {
|
|
431
431
|
class: "f-progress-bg",
|
|
432
432
|
style: w.value
|
|
433
|
-
}, null),
|
|
433
|
+
}, null), B.value && y("div", {
|
|
434
434
|
class: "f-progress-success-bg",
|
|
435
|
-
style:
|
|
436
|
-
}, null)])]),
|
|
435
|
+
style: S.value
|
|
436
|
+
}, null)])]), C()]);
|
|
437
437
|
}
|
|
438
438
|
function E() {
|
|
439
439
|
return y("div", {
|
|
440
|
-
class:
|
|
441
|
-
style:
|
|
440
|
+
class: D.value,
|
|
441
|
+
style: b.value
|
|
442
442
|
}, [y("svg", {
|
|
443
443
|
class: "f-progress-circle",
|
|
444
444
|
viewBox: "0 0 100 100"
|
|
445
|
-
}, [
|
|
446
|
-
id: "gradient-" +
|
|
445
|
+
}, [f.value && y("defs", null, [y("linearGradient", {
|
|
446
|
+
id: "gradient-" + P.value,
|
|
447
447
|
x1: "100%",
|
|
448
448
|
y1: "0%",
|
|
449
449
|
x2: "0%",
|
|
450
450
|
y2: "0%"
|
|
451
|
-
}, [
|
|
452
|
-
offset:
|
|
453
|
-
"stop-color":
|
|
451
|
+
}, [a.value.map((N) => y("stop", {
|
|
452
|
+
offset: N.offset,
|
|
453
|
+
"stop-color": N.color
|
|
454
454
|
}, null))])]), y("path", {
|
|
455
455
|
class: "f-progress-circle-trail",
|
|
456
456
|
stroke: "#efefef",
|
|
457
457
|
"fill-opacity": "0",
|
|
458
458
|
"stroke-width": t.value,
|
|
459
|
-
d:
|
|
460
|
-
style:
|
|
461
|
-
}, null), $.value.map((
|
|
459
|
+
d: T.value,
|
|
460
|
+
style: p.value
|
|
461
|
+
}, null), $.value.map((N) => y("path", {
|
|
462
462
|
class: "f-progress-circle-path",
|
|
463
463
|
"fill-opacity": "0",
|
|
464
|
-
d:
|
|
464
|
+
d: T.value,
|
|
465
465
|
"stroke-linecap": n.value,
|
|
466
|
-
stroke:
|
|
466
|
+
stroke: N.stroke,
|
|
467
467
|
"stroke-width": s.value ? t.value : 0,
|
|
468
|
-
style:
|
|
469
|
-
}, null))]),
|
|
468
|
+
style: N.strokePathStyle
|
|
469
|
+
}, null))]), C()]);
|
|
470
470
|
}
|
|
471
471
|
return () => y("div", {
|
|
472
472
|
class: m.value
|
|
473
|
-
}, [r.value === "line" &&
|
|
473
|
+
}, [r.value === "line" && M(), c.value && E()]);
|
|
474
474
|
}
|
|
475
475
|
});
|
|
476
|
-
function
|
|
476
|
+
function De(e, r, g) {
|
|
477
477
|
var O;
|
|
478
478
|
function s() {
|
|
479
479
|
}
|
|
480
|
-
const n = "",
|
|
481
|
-
function
|
|
480
|
+
const n = "", i = "", f = d();
|
|
481
|
+
function a() {
|
|
482
482
|
return (r == null ? void 0 : r.schema.componentType) !== "frame";
|
|
483
483
|
}
|
|
484
484
|
function v() {
|
|
@@ -490,47 +490,47 @@ function Te(e, r, i) {
|
|
|
490
490
|
function o() {
|
|
491
491
|
return (r == null ? void 0 : r.schema.componentType) === "frame";
|
|
492
492
|
}
|
|
493
|
-
function
|
|
494
|
-
if (!
|
|
493
|
+
function l(u) {
|
|
494
|
+
if (!u || !u.value)
|
|
495
495
|
return null;
|
|
496
|
-
if (
|
|
497
|
-
return
|
|
498
|
-
const k = d(
|
|
499
|
-
return
|
|
496
|
+
if (u.value.schema && u.value.schema.type === "component")
|
|
497
|
+
return u.value;
|
|
498
|
+
const k = d(u == null ? void 0 : u.value.parent), S = l(k);
|
|
499
|
+
return S || null;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
const { componentInstance: k, designerItemElementRef:
|
|
503
|
-
return !k || !k.value ? null : k.value.canMove ?
|
|
501
|
+
function c(u = r) {
|
|
502
|
+
const { componentInstance: k, designerItemElementRef: S } = u;
|
|
503
|
+
return !k || !k.value ? null : k.value.canMove ? S : c(u.parent);
|
|
504
504
|
}
|
|
505
|
-
function m(
|
|
506
|
-
return !!
|
|
505
|
+
function m(u) {
|
|
506
|
+
return !!g;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function b() {
|
|
509
509
|
return (r == null ? void 0 : r.schema.label) || (r == null ? void 0 : r.schema.title) || (r == null ? void 0 : r.schema.name);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function D() {
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function T(u, k) {
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
const { componentType:
|
|
517
|
-
let
|
|
518
|
-
const
|
|
519
|
-
return
|
|
515
|
+
function p(u, k) {
|
|
516
|
+
const { componentType: S } = u;
|
|
517
|
+
let B = W(S, u, k);
|
|
518
|
+
const C = S.toLowerCase().replace("-", "_");
|
|
519
|
+
return B && !B.id && B.type === S && (B.id = `${C}_${Math.random().toString().slice(2, 6)}`), B;
|
|
520
520
|
}
|
|
521
|
-
function $(
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
let
|
|
525
|
-
const E =
|
|
526
|
-
return
|
|
521
|
+
function $(u, k) {
|
|
522
|
+
const S = String(u.getAttribute("data-controltype")), B = u.getAttribute("data-feature"), C = B ? JSON.parse(B) : {};
|
|
523
|
+
C.parentComponentInstance = f.value;
|
|
524
|
+
let M = W(S, C);
|
|
525
|
+
const E = S.toLowerCase().replace("-", "_");
|
|
526
|
+
return M && !M.id && M.type === S && (M.id = `${E}_${Math.random().toString().slice(2, 6)}`), M;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function P(u) {
|
|
529
529
|
}
|
|
530
|
-
function w(...
|
|
530
|
+
function w(...u) {
|
|
531
531
|
}
|
|
532
|
-
return
|
|
533
|
-
canMove:
|
|
532
|
+
return f.value = {
|
|
533
|
+
canMove: a(),
|
|
534
534
|
canSelectParent: v(),
|
|
535
535
|
canDelete: t(),
|
|
536
536
|
canNested: !o(),
|
|
@@ -539,87 +539,87 @@ function Te(e, r, i) {
|
|
|
539
539
|
parent: (O = r == null ? void 0 : r.parent) == null ? void 0 : O.componentInstance,
|
|
540
540
|
schema: r == null ? void 0 : r.schema,
|
|
541
541
|
styles: n,
|
|
542
|
-
designerClass:
|
|
542
|
+
designerClass: i,
|
|
543
543
|
canAccepts: m,
|
|
544
|
-
getBelongedComponentInstance:
|
|
545
|
-
getDraggableDesignItemElement:
|
|
546
|
-
getDraggingDisplayText:
|
|
544
|
+
getBelongedComponentInstance: l,
|
|
545
|
+
getDraggableDesignItemElement: c,
|
|
546
|
+
getDraggingDisplayText: b,
|
|
547
547
|
getPropConfig: w,
|
|
548
|
-
getDragScopeElement:
|
|
549
|
-
onAcceptMovedChildElement:
|
|
548
|
+
getDragScopeElement: D,
|
|
549
|
+
onAcceptMovedChildElement: T,
|
|
550
550
|
onAcceptNewChildElement: $,
|
|
551
|
-
onChildElementMovedOut:
|
|
552
|
-
addNewChildComponentSchema:
|
|
551
|
+
onChildElementMovedOut: P,
|
|
552
|
+
addNewChildComponentSchema: p,
|
|
553
553
|
updateDragAndDropRules: s,
|
|
554
554
|
triggerBelongedComponentToMoveWhenMoved: d(!1),
|
|
555
555
|
triggerBelongedComponentToDeleteWhenDeleted: d(!1)
|
|
556
|
-
},
|
|
556
|
+
}, f;
|
|
557
557
|
}
|
|
558
|
-
const
|
|
558
|
+
const Ce = /* @__PURE__ */ F({
|
|
559
559
|
name: "FProgressDesign",
|
|
560
|
-
props:
|
|
560
|
+
props: A,
|
|
561
561
|
emits: [],
|
|
562
562
|
setup(e, r) {
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
w.value.componentInstance =
|
|
566
|
-
}), r.expose(
|
|
567
|
-
|
|
563
|
+
const g = d(e.progressStatus), s = d(e.progressType), n = d(e.size), i = d(e.showInfo), f = d(e.strokeWidth), a = d(e.percent), v = d(e.strokeLinecap), t = d(!1), o = d(e.strokeColor), l = d(null), c = d(0), m = d(e.width), b = d(""), D = d([]), T = d(""), p = d([]), $ = d(e.enableBackgroundImg), P = d(e.backgroundImg), w = d(), O = Q("design-item-context"), u = De(w, O);
|
|
564
|
+
U(() => {
|
|
565
|
+
w.value.componentInstance = u;
|
|
566
|
+
}), r.expose(u.value), z(() => e.percent, (j) => {
|
|
567
|
+
a.value = j || 0;
|
|
568
568
|
});
|
|
569
|
-
const k = h(() =>
|
|
569
|
+
const k = h(() => f.value || (s.value === "line" && n.value !== "small" ? 8 : 6)), S = h(() => s.value === "circle" || s.value === "dashboard"), B = h(() => {
|
|
570
570
|
const j = {
|
|
571
571
|
"f-progress": !0,
|
|
572
572
|
"f-progress-line": s.value === "line",
|
|
573
573
|
"ant-progress-small": n.value === "small",
|
|
574
|
-
"f-progress-show-info":
|
|
575
|
-
".f-progress-circle":
|
|
576
|
-
},
|
|
577
|
-
return j[
|
|
578
|
-
}),
|
|
579
|
-
width: `${
|
|
574
|
+
"f-progress-show-info": i.value,
|
|
575
|
+
".f-progress-circle": S.value
|
|
576
|
+
}, x = `f-progress-status-${g.value}`;
|
|
577
|
+
return j[x] = !0, j;
|
|
578
|
+
}), C = h(() => ({
|
|
579
|
+
width: `${a.value}%`,
|
|
580
580
|
"border-radius": v.value === "round" ? "100px" : "0",
|
|
581
581
|
backgroud: t.value ? null : o.value,
|
|
582
|
-
"background-image": t.value ?
|
|
582
|
+
"background-image": t.value ? l.value : null,
|
|
583
583
|
height: `${k.value}px`
|
|
584
|
-
})),
|
|
585
|
-
width: `${
|
|
584
|
+
})), M = h(() => ({
|
|
585
|
+
width: `${a.value}%`,
|
|
586
586
|
"border-radius": v.value === "round" ? "100px" : "0",
|
|
587
587
|
height: `${k.value}px`,
|
|
588
|
-
"background-image": $.value ?
|
|
589
|
-
})), E = h(() =>
|
|
590
|
-
function
|
|
588
|
+
"background-image": $.value ? P.value : null
|
|
589
|
+
})), E = h(() => c.value || c.value === 0);
|
|
590
|
+
function N() {
|
|
591
591
|
return y("div", {
|
|
592
592
|
class: "f-progress-outer"
|
|
593
593
|
}, [y("div", {
|
|
594
594
|
class: "f-progress-inner"
|
|
595
595
|
}, [y("div", {
|
|
596
596
|
class: "f-progress-bg",
|
|
597
|
-
style:
|
|
597
|
+
style: C.value
|
|
598
598
|
}, null), E.value && y("div", {
|
|
599
599
|
class: "f-progress-success-bg",
|
|
600
|
-
style:
|
|
600
|
+
style: M.value
|
|
601
601
|
}, null)])]);
|
|
602
602
|
}
|
|
603
|
-
const
|
|
603
|
+
const X = h(() => ({
|
|
604
604
|
width: `${m.value}px`,
|
|
605
605
|
height: `${m.value}px`,
|
|
606
606
|
"font-size": `${m.value * 0.15 + 6}px`,
|
|
607
607
|
"f-progress-circle-gradient": t.value
|
|
608
|
-
})),
|
|
609
|
-
function
|
|
608
|
+
})), Y = h(() => ({}));
|
|
609
|
+
function J() {
|
|
610
610
|
return y("div", {
|
|
611
611
|
class: "f-progress-inner",
|
|
612
|
-
style:
|
|
612
|
+
style: X.value
|
|
613
613
|
}, [y("svg", {
|
|
614
614
|
class: "f-progress-circle",
|
|
615
615
|
viewBox: "0 0 100 100"
|
|
616
616
|
}, [t.value && y("defs", null, [y("linearGradient", {
|
|
617
|
-
id: "gradient-" +
|
|
617
|
+
id: "gradient-" + b.value,
|
|
618
618
|
x1: "100%",
|
|
619
619
|
y1: "0%",
|
|
620
620
|
x2: "0%",
|
|
621
621
|
y2: "0%"
|
|
622
|
-
}, [
|
|
622
|
+
}, [D.value.map((j) => y("stop", {
|
|
623
623
|
offset: j.offset,
|
|
624
624
|
"stop-color": j.color
|
|
625
625
|
}, null))])]), y("path", {
|
|
@@ -627,34 +627,34 @@ const De = /* @__PURE__ */ A({
|
|
|
627
627
|
stroke: "#efefef",
|
|
628
628
|
"fill-opacity": "0",
|
|
629
629
|
"stroke-width": k.value,
|
|
630
|
-
d:
|
|
631
|
-
style:
|
|
632
|
-
}, null),
|
|
630
|
+
d: T.value,
|
|
631
|
+
style: Y.value
|
|
632
|
+
}, null), p.value.map((j) => y("path", {
|
|
633
633
|
class: "f-progress-circle-path",
|
|
634
634
|
"fill-opacity": "0",
|
|
635
|
-
d:
|
|
635
|
+
d: T.value,
|
|
636
636
|
"stroke-linecap": v.value,
|
|
637
637
|
stroke: j.stroke,
|
|
638
|
-
"stroke-width":
|
|
638
|
+
"stroke-width": a.value ? k.value : 0,
|
|
639
639
|
style: j.strokePathStyle
|
|
640
640
|
}, null))])]);
|
|
641
641
|
}
|
|
642
642
|
return () => y("div", {
|
|
643
643
|
ref: w,
|
|
644
|
-
class:
|
|
645
|
-
}, [s.value === "line" &&
|
|
644
|
+
class: B.value
|
|
645
|
+
}, [s.value === "line" && N(), S.value && J()]);
|
|
646
646
|
}
|
|
647
647
|
});
|
|
648
|
-
G.register = (e, r,
|
|
649
|
-
e.progress = G, r.progress =
|
|
648
|
+
G.register = (e, r, g) => {
|
|
649
|
+
e.progress = G, r.progress = _;
|
|
650
650
|
};
|
|
651
|
-
G.registerDesigner = (e, r,
|
|
652
|
-
e.progress =
|
|
651
|
+
G.registerDesigner = (e, r, g) => {
|
|
652
|
+
e.progress = Ce, r.progress = _;
|
|
653
653
|
};
|
|
654
|
-
const
|
|
654
|
+
const Ge = I(G);
|
|
655
655
|
export {
|
|
656
656
|
G as Progress,
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
657
|
+
Ge as default,
|
|
658
|
+
A as progressProps,
|
|
659
|
+
_ as propsResolver
|
|
660
660
|
};
|