@farris/ui-vue 1.2.9 → 1.3.1
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 +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- 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 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- 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 +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -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/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- 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 +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.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 +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- 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/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- 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 +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- 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/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/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 +2 -1
- 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/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- 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/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -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/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/section/src/designer/use-designer-rules.d.ts +3 -3
- 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/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/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- 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/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- 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,32 +1,32 @@
|
|
|
1
|
-
import { computed as h, defineComponent as
|
|
2
|
-
import { cloneDeep as
|
|
3
|
-
import { withInstall as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const { properties: r, title:
|
|
7
|
-
return (!n || !s.find((f) => f == "id")) && (
|
|
1
|
+
import { computed as h, defineComponent as A, ref as d, watch as F, createVNode as y, Fragment as Q, inject as U, onMounted as Z } from "vue";
|
|
2
|
+
import { isPlainObject as R, cloneDeep as x } from "lodash-es";
|
|
3
|
+
import { withInstall as I } from "../common/index.esm.js";
|
|
4
|
+
const z = {}, V = {};
|
|
5
|
+
function W(e) {
|
|
6
|
+
const { properties: r, title: i, ignore: s } = e, n = s && Array.isArray(s), u = Object.keys(r).reduce((f, a) => ((!n || !s.find((v) => v == a)) && (f[a] = r[a].type === "object" && r[a].properties ? W(r[a]) : x(r[a].default)), f), {});
|
|
7
|
+
return i && (!n || !s.find((f) => f == "id")) && (u.id = `${i}-${Date.now()}`), u;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
const s =
|
|
9
|
+
function q(e, r = {}, i) {
|
|
10
|
+
const s = z[e];
|
|
11
11
|
if (s) {
|
|
12
|
-
let n =
|
|
13
|
-
const
|
|
14
|
-
return n =
|
|
12
|
+
let n = W(s);
|
|
13
|
+
const u = V[e];
|
|
14
|
+
return n = u ? u({ getSchemaByType: q }, n, r, i) : n, n;
|
|
15
15
|
}
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
function I(e, r) {
|
|
19
|
-
const g = L(r);
|
|
20
|
-
return Object.keys(e).reduce((s, n) => (s[n] && typeof s[n] == "object" ? Object.assign(s[n], e[n]) : s[n] = e[n], s), g), g;
|
|
21
|
-
}
|
|
22
18
|
function K(e, r) {
|
|
19
|
+
const i = W(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), i), i;
|
|
21
|
+
}
|
|
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 u = r.get(n);
|
|
26
|
+
if (typeof u == "string")
|
|
27
|
+
s[u] = e[n];
|
|
28
28
|
else {
|
|
29
|
-
const f =
|
|
29
|
+
const f = u(n, e[n], e);
|
|
30
30
|
Object.assign(s, f);
|
|
31
31
|
}
|
|
32
32
|
} else
|
|
@@ -34,31 +34,31 @@ function K(e, r) {
|
|
|
34
34
|
return s;
|
|
35
35
|
}, {});
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const s =
|
|
39
|
-
return
|
|
37
|
+
function re(e, r, i = /* @__PURE__ */ new Map()) {
|
|
38
|
+
const s = K(e, r);
|
|
39
|
+
return ee(s, i);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function te(e = {}) {
|
|
42
42
|
function r(t, o, l, c) {
|
|
43
43
|
if (typeof l == "number")
|
|
44
44
|
return c[t].length === l;
|
|
45
45
|
if (typeof l == "object") {
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
46
|
+
const k = Object.keys(l)[0], b = l[k];
|
|
47
|
+
if (k === "not")
|
|
48
48
|
return Number(c[t].length) !== Number(b);
|
|
49
|
-
if (
|
|
49
|
+
if (k === "moreThan")
|
|
50
50
|
return Number(c[t].length) >= Number(b);
|
|
51
|
-
if (
|
|
51
|
+
if (k === "lessThan")
|
|
52
52
|
return Number(c[t].length) <= Number(b);
|
|
53
53
|
}
|
|
54
54
|
return !1;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function i(t, o, l, c) {
|
|
57
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", i]
|
|
62
62
|
]);
|
|
63
63
|
Object.keys(e).reduce((t, o) => (t.set(o, e[o]), t), s);
|
|
64
64
|
function n(t, o) {
|
|
@@ -66,14 +66,14 @@ function re(e = {}) {
|
|
|
66
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
67
|
if (c === "length")
|
|
68
68
|
return { target: l, operator: "length", param: null, value: o[c] };
|
|
69
|
-
const
|
|
70
|
-
return { target: l, operator: "getProperty", param:
|
|
69
|
+
const k = c, b = o[c];
|
|
70
|
+
return { target: l, operator: "getProperty", param: k, value: b };
|
|
71
71
|
}) : [];
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function u(t) {
|
|
74
74
|
return Object.keys(t).reduce((l, c) => {
|
|
75
|
-
const
|
|
76
|
-
return l.push(...
|
|
75
|
+
const k = n(c, t[c]);
|
|
76
|
+
return l.push(...k), l;
|
|
77
77
|
}, []);
|
|
78
78
|
}
|
|
79
79
|
function f(t, o) {
|
|
@@ -84,32 +84,32 @@ function re(e = {}) {
|
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
86
|
function a(t, o) {
|
|
87
|
-
return
|
|
87
|
+
return u(t).reduce((k, b) => k && f(b, o), !0);
|
|
88
88
|
}
|
|
89
89
|
function v(t, o) {
|
|
90
|
-
const l = Object.keys(t), c = l.includes("allOf"),
|
|
91
|
-
return c ? !
|
|
90
|
+
const l = Object.keys(t), c = l.includes("allOf"), k = l.includes("anyOf"), b = c || k, g = (b ? t[b ? c ? "allOf" : "anyOf" : "allOf"] : [t]).map((S) => a(S, o));
|
|
91
|
+
return c ? !g.includes(!1) : g.includes(!0);
|
|
92
92
|
}
|
|
93
93
|
return { parseValueSchema: v };
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
function
|
|
98
|
-
return
|
|
99
|
-
const a =
|
|
95
|
+
const se = {}, ne = {};
|
|
96
|
+
te();
|
|
97
|
+
function oe(e, r, i = /* @__PURE__ */ new Map(), s = (f, a, v) => a, n = {}, u = (f) => f) {
|
|
98
|
+
return z[r.title] = r, V[r.title] = s, se[r.title] = n, ne[r.title] = u, (f = {}) => {
|
|
99
|
+
const a = re(f, r, i), v = Object.keys(e).reduce((t, o) => (t[o] = e[o].default, t), {});
|
|
100
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, i) {
|
|
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", ke = "A Farris Component", me = "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:
|
|
207
|
+
}, Pe = {
|
|
208
|
+
title: ve,
|
|
209
|
+
description: ke,
|
|
210
210
|
type: me,
|
|
211
|
-
categories:
|
|
212
|
-
},
|
|
211
|
+
categories: be
|
|
212
|
+
}, L = {
|
|
213
213
|
progressType: { type: String, default: "line" },
|
|
214
214
|
strokeWidth: { type: Number, default: 0 },
|
|
215
215
|
size: { type: String, default: "default" },
|
|
@@ -240,12 +240,12 @@ 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
|
|
243
|
+
}, X = oe(L, he, ce, le, Pe);
|
|
244
|
+
function Se(e) {
|
|
245
245
|
function r(f) {
|
|
246
246
|
return +f.replace("%", "");
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function i(f) {
|
|
249
249
|
let a = [];
|
|
250
250
|
return Object.keys(f).forEach((v) => {
|
|
251
251
|
const t = f[v], o = r(v);
|
|
@@ -258,226 +258,226 @@ function Pe(e) {
|
|
|
258
258
|
const s = h(() => !!e.strokeColor && typeof e.strokeColor != "string"), n = h(() => {
|
|
259
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 = i(t).map(({ key: l, value: c }) => `${c} ${l}%`).join(", ");
|
|
262
262
|
return `linear-gradient(${v}, ${o})`;
|
|
263
263
|
}
|
|
264
264
|
return `linear-gradient(${v}, ${f}, ${a})`;
|
|
265
|
-
}),
|
|
265
|
+
}), u = h(() => i(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: u
|
|
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, i, s) {
|
|
279
|
+
const { isCircleStyle: n } = r, { isGradient: u, linearGradient: f } = i, { strokeWidth: a } = s, v = h(() => {
|
|
280
|
+
const g = {
|
|
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 g[$] = !0, g;
|
|
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": u.value
|
|
293
293
|
})), o = h(() => ({
|
|
294
294
|
"f-progress-inner": !0,
|
|
295
|
-
"f-progress-circle-gradient":
|
|
296
|
-
})), l = 0, c = h(() => l + 1),
|
|
297
|
-
const
|
|
298
|
-
let
|
|
295
|
+
"f-progress-circle-gradient": u.value
|
|
296
|
+
})), l = 0, c = h(() => l + 1), k = h(() => {
|
|
297
|
+
const g = 50 - a.value / 2, $ = e.gapPosition || (e.progressType === "circle" ? "top" : "bottom");
|
|
298
|
+
let S = 0, w = -g, p = 0, m = g * -2;
|
|
299
299
|
switch ($) {
|
|
300
300
|
case "left":
|
|
301
|
-
|
|
301
|
+
S = -g, w = 0, p = g * 2, m = 0;
|
|
302
302
|
break;
|
|
303
303
|
case "right":
|
|
304
|
-
|
|
304
|
+
S = g, w = 0, p = g * -2, m = 0;
|
|
305
305
|
break;
|
|
306
306
|
case "bottom":
|
|
307
|
-
w =
|
|
307
|
+
w = g, m = g * 2;
|
|
308
308
|
break;
|
|
309
309
|
}
|
|
310
|
-
return `M 50,50 m ${
|
|
311
|
-
a ${
|
|
312
|
-
a ${
|
|
310
|
+
return `M 50,50 m ${S},${w}
|
|
311
|
+
a ${g},${g} 0 1 1 ${p},${-m}
|
|
312
|
+
a ${g},${g} 0 1 1 ${-p},${m}`;
|
|
313
313
|
}), b = h(() => {
|
|
314
|
-
const
|
|
314
|
+
const g = 50 - a.value / 2, $ = Math.PI * 2 * g, S = e.gapDegree || (e.progressType === "circle" ? 0 : 75);
|
|
315
315
|
return {
|
|
316
|
-
strokeDasharray: `${$ -
|
|
317
|
-
strokeDashoffset: `-${
|
|
316
|
+
strokeDasharray: `${$ - S}px ${$}px`,
|
|
317
|
+
strokeDashoffset: `-${S / 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((
|
|
323
|
-
const
|
|
320
|
+
}), T = h(() => {
|
|
321
|
+
const g = 50 - a.value / 2, $ = Math.PI * 2 * g, S = 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((p, m) => {
|
|
323
|
+
const P = w.length === 2 && m === 0;
|
|
324
324
|
return {
|
|
325
|
-
stroke:
|
|
325
|
+
stroke: u.value && !P ? `url(#gradient-${c.value})` : null,
|
|
326
326
|
strokePathStyle: {
|
|
327
|
-
stroke:
|
|
327
|
+
stroke: u.value ? null : P ? "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: `${(
|
|
330
|
-
strokeDashoffset: `-${
|
|
329
|
+
strokeDasharray: `${(p || 0) / 100 * ($ - S)}px ${$}px`,
|
|
330
|
+
strokeDashoffset: `-${S / 2}px`
|
|
331
331
|
}
|
|
332
332
|
};
|
|
333
333
|
}).reverse();
|
|
334
|
-
}),
|
|
334
|
+
}), O = h(() => ({
|
|
335
335
|
width: `${e.percent}%`,
|
|
336
336
|
"border-radius": e.strokeLinecap === "round" ? "100px" : "0",
|
|
337
|
-
background:
|
|
338
|
-
"background-image":
|
|
337
|
+
background: u.value ? null : e.strokeColor,
|
|
338
|
+
"background-image": u.value ? f.value : null,
|
|
339
339
|
height: `${a.value}px`
|
|
340
340
|
}));
|
|
341
341
|
return {
|
|
342
342
|
progressClass: v,
|
|
343
343
|
inCircleProgressBarStyle: t,
|
|
344
344
|
inCircleProgressBarClass: o,
|
|
345
|
-
pathString:
|
|
345
|
+
pathString: k,
|
|
346
346
|
trailPathStyle: b,
|
|
347
|
-
progressCirclePaths:
|
|
347
|
+
progressCirclePaths: T,
|
|
348
348
|
gradientId: c,
|
|
349
|
-
inlineProgressBackgroundStyle:
|
|
349
|
+
inlineProgressBackgroundStyle: O
|
|
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
|
+
}, u = `f-icon-${e.progressStatus}`;
|
|
361
|
+
return n[u] = !0, n;
|
|
362
|
+
}), i = h(() => {
|
|
363
363
|
const n = {
|
|
364
364
|
"f-progress-text-icon": !0,
|
|
365
365
|
"f-icon": !0
|
|
366
|
-
},
|
|
367
|
-
return n[
|
|
366
|
+
}, u = e.progressStatus === "success" ? "f-icon-checkmark" : "f-icon-x";
|
|
367
|
+
return n[u] = !0, n;
|
|
368
368
|
}), s = h(() => e.progressStatus === "error" || e.progressStatus === "success");
|
|
369
369
|
return {
|
|
370
370
|
inlineProgrssStatusClass: r,
|
|
371
|
-
circleProgrssStatusClass:
|
|
371
|
+
circleProgrssStatusClass: i,
|
|
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
|
+
})), i = h(() => e.successPercent || e.successPercent === 0);
|
|
382
|
+
return { inlineProgressSuccessBackgroundStyle: r, shouldShowSuccessInlineProgressBackground: i };
|
|
383
383
|
}
|
|
384
|
-
const
|
|
384
|
+
const N = /* @__PURE__ */ A({
|
|
385
385
|
name: "FProgress",
|
|
386
|
-
props:
|
|
386
|
+
props: L,
|
|
387
387
|
emits: [],
|
|
388
388
|
setup(e) {
|
|
389
|
-
const r = d(e.progressType),
|
|
389
|
+
const r = d(e.progressType), i = d(e.showInfo), s = d(e.percent), n = d(e.strokeLinecap), u = Se(e), {
|
|
390
390
|
isGradient: f,
|
|
391
391
|
circleGradient: a
|
|
392
|
-
} =
|
|
392
|
+
} = u, v = $e(e), {
|
|
393
393
|
strokeWidth: t
|
|
394
394
|
} = v, {
|
|
395
395
|
formatPercentageText: o
|
|
396
|
-
} =
|
|
396
|
+
} = we(e), l = Oe(e), {
|
|
397
397
|
isCircleStyle: c
|
|
398
398
|
} = l, {
|
|
399
|
-
progressClass:
|
|
399
|
+
progressClass: k,
|
|
400
400
|
inCircleProgressBarStyle: b,
|
|
401
|
-
inCircleProgressBarClass:
|
|
402
|
-
pathString:
|
|
403
|
-
trailPathStyle:
|
|
401
|
+
inCircleProgressBarClass: T,
|
|
402
|
+
pathString: O,
|
|
403
|
+
trailPathStyle: g,
|
|
404
404
|
progressCirclePaths: $,
|
|
405
|
-
gradientId:
|
|
405
|
+
gradientId: S,
|
|
406
406
|
inlineProgressBackgroundStyle: w
|
|
407
|
-
} =
|
|
408
|
-
inlineProgrssStatusClass:
|
|
409
|
-
circleProgrssStatusClass:
|
|
410
|
-
shouldShowStatus:
|
|
411
|
-
} =
|
|
412
|
-
inlineProgressSuccessBackgroundStyle:
|
|
413
|
-
shouldShowSuccessInlineProgressBackground:
|
|
414
|
-
} =
|
|
415
|
-
F(() => e.percent, (
|
|
416
|
-
s.value =
|
|
407
|
+
} = je(e, l, u, v), {
|
|
408
|
+
inlineProgrssStatusClass: p,
|
|
409
|
+
circleProgrssStatusClass: m,
|
|
410
|
+
shouldShowStatus: P
|
|
411
|
+
} = Be(e), {
|
|
412
|
+
inlineProgressSuccessBackgroundStyle: B,
|
|
413
|
+
shouldShowSuccessInlineProgressBackground: M
|
|
414
|
+
} = Te(e);
|
|
415
|
+
F(() => e.percent, (D) => {
|
|
416
|
+
s.value = D || 0;
|
|
417
417
|
});
|
|
418
418
|
function C() {
|
|
419
|
-
return
|
|
419
|
+
return i.value && y("span", {
|
|
420
420
|
class: "f-progress-text"
|
|
421
|
-
}, [
|
|
422
|
-
class: c.value ?
|
|
421
|
+
}, [P.value ? y("span", {
|
|
422
|
+
class: c.value ? m.value : p.value
|
|
423
423
|
}, null) : o.value]);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
return y(
|
|
425
|
+
function E() {
|
|
426
|
+
return y(Q, 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), M.value && y("div", {
|
|
434
434
|
class: "f-progress-success-bg",
|
|
435
|
-
style:
|
|
435
|
+
style: B.value
|
|
436
436
|
}, null)])]), C()]);
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function G() {
|
|
439
439
|
return y("div", {
|
|
440
|
-
class:
|
|
440
|
+
class: T.value,
|
|
441
441
|
style: b.value
|
|
442
442
|
}, [y("svg", {
|
|
443
443
|
class: "f-progress-circle",
|
|
444
444
|
viewBox: "0 0 100 100"
|
|
445
445
|
}, [f.value && y("defs", null, [y("linearGradient", {
|
|
446
|
-
id: "gradient-" +
|
|
446
|
+
id: "gradient-" + S.value,
|
|
447
447
|
x1: "100%",
|
|
448
448
|
y1: "0%",
|
|
449
449
|
x2: "0%",
|
|
450
450
|
y2: "0%"
|
|
451
|
-
}, [a.value.map((
|
|
452
|
-
offset:
|
|
453
|
-
"stop-color":
|
|
451
|
+
}, [a.value.map((D) => y("stop", {
|
|
452
|
+
offset: D.offset,
|
|
453
|
+
"stop-color": D.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: O.value,
|
|
460
|
+
style: g.value
|
|
461
|
+
}, null), $.value.map((D) => y("path", {
|
|
462
462
|
class: "f-progress-circle-path",
|
|
463
463
|
"fill-opacity": "0",
|
|
464
|
-
d:
|
|
464
|
+
d: O.value,
|
|
465
465
|
"stroke-linecap": n.value,
|
|
466
|
-
stroke:
|
|
466
|
+
stroke: D.stroke,
|
|
467
467
|
"stroke-width": s.value ? t.value : 0,
|
|
468
|
-
style:
|
|
468
|
+
style: D.strokePathStyle
|
|
469
469
|
}, null))]), C()]);
|
|
470
470
|
}
|
|
471
471
|
return () => y("div", {
|
|
472
|
-
class:
|
|
473
|
-
}, [r.value === "line" &&
|
|
472
|
+
class: k.value
|
|
473
|
+
}, [r.value === "line" && E(), c.value && G()]);
|
|
474
474
|
}
|
|
475
475
|
});
|
|
476
|
-
function
|
|
477
|
-
var
|
|
476
|
+
function De(e, r, i) {
|
|
477
|
+
var w;
|
|
478
478
|
function s() {
|
|
479
479
|
}
|
|
480
|
-
const n = "",
|
|
480
|
+
const n = "", u = "", f = d();
|
|
481
481
|
function a() {
|
|
482
482
|
return (r == null ? void 0 : r.schema.componentType) !== "frame";
|
|
483
483
|
}
|
|
@@ -490,44 +490,37 @@ function Te(e, r, g) {
|
|
|
490
490
|
function o() {
|
|
491
491
|
return (r == null ? void 0 : r.schema.componentType) === "frame";
|
|
492
492
|
}
|
|
493
|
-
function l(
|
|
494
|
-
if (!
|
|
493
|
+
function l(p) {
|
|
494
|
+
if (!p || !p.value)
|
|
495
495
|
return null;
|
|
496
|
-
if (
|
|
497
|
-
return
|
|
498
|
-
const
|
|
499
|
-
return
|
|
496
|
+
if (p.value.schema && p.value.schema.type === "component")
|
|
497
|
+
return p.value;
|
|
498
|
+
const m = d(p == null ? void 0 : p.value.parent), P = l(m);
|
|
499
|
+
return P || null;
|
|
500
500
|
}
|
|
501
|
-
function c(
|
|
502
|
-
const { componentInstance:
|
|
503
|
-
return !
|
|
501
|
+
function c(p = r) {
|
|
502
|
+
const { componentInstance: m, designerItemElementRef: P } = p;
|
|
503
|
+
return !m || !m.value ? null : m.value.canMove ? P : c(p.parent);
|
|
504
504
|
}
|
|
505
|
-
function
|
|
506
|
-
return !!
|
|
505
|
+
function k(p) {
|
|
506
|
+
return !!i;
|
|
507
507
|
}
|
|
508
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
|
|
512
|
-
}
|
|
513
|
-
function T(u, k) {
|
|
511
|
+
function T() {
|
|
514
512
|
}
|
|
515
|
-
function p
|
|
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;
|
|
513
|
+
function O(p, m) {
|
|
520
514
|
}
|
|
521
|
-
function
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
return M && !M.id && M.type === S && (M.id = `${E}_${Math.random().toString().slice(2, 6)}`), M;
|
|
515
|
+
function g(p, m) {
|
|
516
|
+
const { componentType: P } = p;
|
|
517
|
+
let B = q(P, p, m);
|
|
518
|
+
const M = P.toLowerCase().replace("-", "_");
|
|
519
|
+
return B && !B.id && B.type === P && (B.id = `${M}_${Math.random().toString().slice(2, 6)}`), B;
|
|
527
520
|
}
|
|
528
|
-
function
|
|
521
|
+
function $(p) {
|
|
529
522
|
}
|
|
530
|
-
function
|
|
523
|
+
function S(...p) {
|
|
531
524
|
}
|
|
532
525
|
return f.value = {
|
|
533
526
|
canMove: a(),
|
|
@@ -536,58 +529,57 @@ function Te(e, r, g) {
|
|
|
536
529
|
canNested: !o(),
|
|
537
530
|
contents: r == null ? void 0 : r.schema.contents,
|
|
538
531
|
elementRef: e,
|
|
539
|
-
parent: (
|
|
532
|
+
parent: (w = r == null ? void 0 : r.parent) == null ? void 0 : w.componentInstance,
|
|
540
533
|
schema: r == null ? void 0 : r.schema,
|
|
541
534
|
styles: n,
|
|
542
|
-
designerClass:
|
|
543
|
-
canAccepts:
|
|
535
|
+
designerClass: u,
|
|
536
|
+
canAccepts: k,
|
|
544
537
|
getBelongedComponentInstance: l,
|
|
545
538
|
getDraggableDesignItemElement: c,
|
|
546
539
|
getDraggingDisplayText: b,
|
|
547
|
-
getPropConfig:
|
|
548
|
-
getDragScopeElement:
|
|
549
|
-
onAcceptMovedChildElement:
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
addNewChildComponentSchema: p,
|
|
540
|
+
getPropConfig: S,
|
|
541
|
+
getDragScopeElement: T,
|
|
542
|
+
onAcceptMovedChildElement: O,
|
|
543
|
+
onChildElementMovedOut: $,
|
|
544
|
+
addNewChildComponentSchema: g,
|
|
553
545
|
updateDragAndDropRules: s,
|
|
554
546
|
triggerBelongedComponentToMoveWhenMoved: d(!1),
|
|
555
547
|
triggerBelongedComponentToDeleteWhenDeleted: d(!1)
|
|
556
548
|
}, f;
|
|
557
549
|
}
|
|
558
|
-
const
|
|
550
|
+
const Me = /* @__PURE__ */ A({
|
|
559
551
|
name: "FProgressDesign",
|
|
560
|
-
props:
|
|
552
|
+
props: L,
|
|
561
553
|
emits: [],
|
|
562
554
|
setup(e, r) {
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
w.value.componentInstance =
|
|
566
|
-
}), r.expose(
|
|
555
|
+
const i = d(e.progressStatus), s = d(e.progressType), n = d(e.size), u = 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), k = d(e.width), b = d(""), T = d([]), O = d(""), g = d([]), $ = d(e.enableBackgroundImg), S = d(e.backgroundImg), w = d(), p = U("design-item-context"), m = De(w, p);
|
|
556
|
+
Z(() => {
|
|
557
|
+
w.value.componentInstance = m;
|
|
558
|
+
}), r.expose(m.value), F(() => e.percent, (j) => {
|
|
567
559
|
a.value = j || 0;
|
|
568
560
|
});
|
|
569
|
-
const
|
|
561
|
+
const P = h(() => f.value || (s.value === "line" && n.value !== "small" ? 8 : 6)), B = h(() => s.value === "circle" || s.value === "dashboard"), M = h(() => {
|
|
570
562
|
const j = {
|
|
571
563
|
"f-progress": !0,
|
|
572
564
|
"f-progress-line": s.value === "line",
|
|
573
565
|
"ant-progress-small": n.value === "small",
|
|
574
|
-
"f-progress-show-info":
|
|
575
|
-
".f-progress-circle":
|
|
576
|
-
}, J = `f-progress-status-${
|
|
566
|
+
"f-progress-show-info": u.value,
|
|
567
|
+
".f-progress-circle": B.value
|
|
568
|
+
}, J = `f-progress-status-${i.value}`;
|
|
577
569
|
return j[J] = !0, j;
|
|
578
570
|
}), C = h(() => ({
|
|
579
571
|
width: `${a.value}%`,
|
|
580
572
|
"border-radius": v.value === "round" ? "100px" : "0",
|
|
581
573
|
backgroud: t.value ? null : o.value,
|
|
582
574
|
"background-image": t.value ? l.value : null,
|
|
583
|
-
height: `${
|
|
584
|
-
})),
|
|
575
|
+
height: `${P.value}px`
|
|
576
|
+
})), E = h(() => ({
|
|
585
577
|
width: `${a.value}%`,
|
|
586
578
|
"border-radius": v.value === "round" ? "100px" : "0",
|
|
587
|
-
height: `${
|
|
588
|
-
"background-image": $.value ?
|
|
589
|
-
})),
|
|
590
|
-
function
|
|
579
|
+
height: `${P.value}px`,
|
|
580
|
+
"background-image": $.value ? S.value : null
|
|
581
|
+
})), G = h(() => c.value || c.value === 0);
|
|
582
|
+
function D() {
|
|
591
583
|
return y("div", {
|
|
592
584
|
class: "f-progress-outer"
|
|
593
585
|
}, [y("div", {
|
|
@@ -595,21 +587,21 @@ const De = /* @__PURE__ */ R({
|
|
|
595
587
|
}, [y("div", {
|
|
596
588
|
class: "f-progress-bg",
|
|
597
589
|
style: C.value
|
|
598
|
-
}, null),
|
|
590
|
+
}, null), G.value && y("div", {
|
|
599
591
|
class: "f-progress-success-bg",
|
|
600
|
-
style:
|
|
592
|
+
style: E.value
|
|
601
593
|
}, null)])]);
|
|
602
594
|
}
|
|
603
|
-
const
|
|
604
|
-
width: `${
|
|
605
|
-
height: `${
|
|
606
|
-
"font-size": `${
|
|
595
|
+
const Y = h(() => ({
|
|
596
|
+
width: `${k.value}px`,
|
|
597
|
+
height: `${k.value}px`,
|
|
598
|
+
"font-size": `${k.value * 0.15 + 6}px`,
|
|
607
599
|
"f-progress-circle-gradient": t.value
|
|
608
|
-
})),
|
|
609
|
-
function
|
|
600
|
+
})), _ = h(() => ({}));
|
|
601
|
+
function H() {
|
|
610
602
|
return y("div", {
|
|
611
603
|
class: "f-progress-inner",
|
|
612
|
-
style:
|
|
604
|
+
style: Y.value
|
|
613
605
|
}, [y("svg", {
|
|
614
606
|
class: "f-progress-circle",
|
|
615
607
|
viewBox: "0 0 100 100"
|
|
@@ -619,42 +611,42 @@ const De = /* @__PURE__ */ R({
|
|
|
619
611
|
y1: "0%",
|
|
620
612
|
x2: "0%",
|
|
621
613
|
y2: "0%"
|
|
622
|
-
}, [
|
|
614
|
+
}, [T.value.map((j) => y("stop", {
|
|
623
615
|
offset: j.offset,
|
|
624
616
|
"stop-color": j.color
|
|
625
617
|
}, null))])]), y("path", {
|
|
626
618
|
class: "f-progress-circle-trail",
|
|
627
619
|
stroke: "#efefef",
|
|
628
620
|
"fill-opacity": "0",
|
|
629
|
-
"stroke-width":
|
|
630
|
-
d:
|
|
631
|
-
style:
|
|
632
|
-
}, null),
|
|
621
|
+
"stroke-width": P.value,
|
|
622
|
+
d: O.value,
|
|
623
|
+
style: _.value
|
|
624
|
+
}, null), g.value.map((j) => y("path", {
|
|
633
625
|
class: "f-progress-circle-path",
|
|
634
626
|
"fill-opacity": "0",
|
|
635
|
-
d:
|
|
627
|
+
d: O.value,
|
|
636
628
|
"stroke-linecap": v.value,
|
|
637
629
|
stroke: j.stroke,
|
|
638
|
-
"stroke-width": a.value ?
|
|
630
|
+
"stroke-width": a.value ? P.value : 0,
|
|
639
631
|
style: j.strokePathStyle
|
|
640
632
|
}, null))])]);
|
|
641
633
|
}
|
|
642
634
|
return () => y("div", {
|
|
643
635
|
ref: w,
|
|
644
|
-
class:
|
|
645
|
-
}, [s.value === "line" &&
|
|
636
|
+
class: M.value
|
|
637
|
+
}, [s.value === "line" && D(), B.value && H()]);
|
|
646
638
|
}
|
|
647
639
|
});
|
|
648
|
-
|
|
649
|
-
e.progress =
|
|
640
|
+
N.register = (e, r, i) => {
|
|
641
|
+
e.progress = N, r.progress = X;
|
|
650
642
|
};
|
|
651
|
-
|
|
652
|
-
e.progress =
|
|
643
|
+
N.registerDesigner = (e, r, i) => {
|
|
644
|
+
e.progress = Me, r.progress = X;
|
|
653
645
|
};
|
|
654
|
-
const
|
|
646
|
+
const Ge = I(N);
|
|
655
647
|
export {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
648
|
+
N as Progress,
|
|
649
|
+
Ge as default,
|
|
650
|
+
L as progressProps,
|
|
651
|
+
X as propsResolver
|
|
660
652
|
};
|