@farris/ui-vue 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import { computed as h, defineComponent as A, ref as d, watch as
|
|
2
|
-
import { isPlainObject as
|
|
3
|
-
import { withInstall as
|
|
1
|
+
import { computed as h, defineComponent as A, ref as d, watch as C, createVNode as y, Fragment as Q, inject as U, onMounted as Z } from "vue";
|
|
2
|
+
import { isPlainObject as F, cloneDeep as x } from "lodash-es";
|
|
3
|
+
import { withInstall as K } from "../common/index.esm.js";
|
|
4
4
|
const z = {}, V = {};
|
|
5
|
-
function
|
|
6
|
-
const { properties: r, title: i, ignore: s } = e, n = s && Array.isArray(s),
|
|
7
|
-
|
|
5
|
+
function L(e) {
|
|
6
|
+
const { properties: r, title: i, ignore: s } = e, n = s && Array.isArray(s), c = Object.keys(r).reduce((g, a) => ((!n || !s.find((v) => v === a)) && (g[a] = r[a].type === "object" && r[a].properties ? L(r[a]) : x(r[a].default)), g), {});
|
|
7
|
+
if (i && (!n || !s.find((g) => g === "id"))) {
|
|
8
|
+
const g = i.toLowerCase().replace(/-/g, "_");
|
|
9
|
+
c.id = `${g}_${Math.random().toString().slice(2, 6)}`;
|
|
10
|
+
}
|
|
11
|
+
return c;
|
|
8
12
|
}
|
|
9
13
|
function q(e, r = {}, i) {
|
|
10
14
|
const s = z[e];
|
|
11
15
|
if (s) {
|
|
12
|
-
let n =
|
|
13
|
-
const
|
|
14
|
-
return n =
|
|
16
|
+
let n = L(s);
|
|
17
|
+
const c = V[e];
|
|
18
|
+
return n = c ? c({ getSchemaByType: q }, n, r, i) : n, n;
|
|
15
19
|
}
|
|
16
20
|
return null;
|
|
17
21
|
}
|
|
18
|
-
function
|
|
19
|
-
const i =
|
|
20
|
-
return Object.keys(
|
|
22
|
+
function I(e, r) {
|
|
23
|
+
const i = L(r);
|
|
24
|
+
return Object.keys(i).reduce((s, n) => (s[n] && F(s[n]) && F(e[n] || !e[n]) ? Object.assign(s[n], e[n] || {}) : s[n] = e[n], s), i), i;
|
|
21
25
|
}
|
|
22
26
|
function ee(e, r) {
|
|
23
27
|
return Object.keys(e).filter((s) => e[s] != null).reduce((s, n) => {
|
|
24
28
|
if (r.has(n)) {
|
|
25
|
-
const
|
|
26
|
-
if (typeof
|
|
27
|
-
s[
|
|
29
|
+
const c = r.get(n);
|
|
30
|
+
if (typeof c == "string")
|
|
31
|
+
s[c] = e[n];
|
|
28
32
|
else {
|
|
29
|
-
const
|
|
30
|
-
Object.assign(s,
|
|
33
|
+
const g = c(n, e[n], e);
|
|
34
|
+
Object.assign(s, g);
|
|
31
35
|
}
|
|
32
36
|
} else
|
|
33
37
|
s[n] = e[n];
|
|
@@ -35,26 +39,26 @@ function ee(e, r) {
|
|
|
35
39
|
}, {});
|
|
36
40
|
}
|
|
37
41
|
function re(e, r, i = /* @__PURE__ */ new Map()) {
|
|
38
|
-
const s =
|
|
42
|
+
const s = I(e, r);
|
|
39
43
|
return ee(s, i);
|
|
40
44
|
}
|
|
41
45
|
function te(e = {}) {
|
|
42
|
-
function r(t, o, l,
|
|
46
|
+
function r(t, o, l, u) {
|
|
43
47
|
if (typeof l == "number")
|
|
44
|
-
return
|
|
48
|
+
return u[t].length === l;
|
|
45
49
|
if (typeof l == "object") {
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
50
|
+
const b = Object.keys(l)[0], P = l[b];
|
|
51
|
+
if (b === "not")
|
|
52
|
+
return Number(u[t].length) !== Number(P);
|
|
53
|
+
if (b === "moreThan")
|
|
54
|
+
return Number(u[t].length) >= Number(P);
|
|
55
|
+
if (b === "lessThan")
|
|
56
|
+
return Number(u[t].length) <= Number(P);
|
|
53
57
|
}
|
|
54
58
|
return !1;
|
|
55
59
|
}
|
|
56
|
-
function i(t, o, l,
|
|
57
|
-
return
|
|
60
|
+
function i(t, o, l, u) {
|
|
61
|
+
return u[t] && u[t].propertyValue && String(u[t].propertyValue.value) === String(l);
|
|
58
62
|
}
|
|
59
63
|
const s = /* @__PURE__ */ new Map([
|
|
60
64
|
["length", r],
|
|
@@ -63,20 +67,20 @@ function te(e = {}) {
|
|
|
63
67
|
Object.keys(e).reduce((t, o) => (t.set(o, e[o]), t), s);
|
|
64
68
|
function n(t, o) {
|
|
65
69
|
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((
|
|
67
|
-
if (
|
|
68
|
-
return { target: l, operator: "length", param: null, value: o[
|
|
69
|
-
const
|
|
70
|
-
return { target: l, operator: "getProperty", param:
|
|
70
|
+
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((u) => {
|
|
71
|
+
if (u === "length")
|
|
72
|
+
return { target: l, operator: "length", param: null, value: o[u] };
|
|
73
|
+
const b = u, P = o[u];
|
|
74
|
+
return { target: l, operator: "getProperty", param: b, value: P };
|
|
71
75
|
}) : [];
|
|
72
76
|
}
|
|
73
|
-
function
|
|
74
|
-
return Object.keys(t).reduce((l,
|
|
75
|
-
const
|
|
76
|
-
return l.push(...
|
|
77
|
+
function c(t) {
|
|
78
|
+
return Object.keys(t).reduce((l, u) => {
|
|
79
|
+
const b = n(u, t[u]);
|
|
80
|
+
return l.push(...b), l;
|
|
77
81
|
}, []);
|
|
78
82
|
}
|
|
79
|
-
function
|
|
83
|
+
function g(t, o) {
|
|
80
84
|
if (s.has(t.operator)) {
|
|
81
85
|
const l = s.get(t.operator);
|
|
82
86
|
return l && l(t.target, t.param, t.value, o) || !1;
|
|
@@ -84,19 +88,19 @@ function te(e = {}) {
|
|
|
84
88
|
return !1;
|
|
85
89
|
}
|
|
86
90
|
function a(t, o) {
|
|
87
|
-
return
|
|
91
|
+
return c(t).reduce((b, P) => b && g(P, o), !0);
|
|
88
92
|
}
|
|
89
93
|
function v(t, o) {
|
|
90
|
-
const l = Object.keys(t),
|
|
91
|
-
return
|
|
94
|
+
const l = Object.keys(t), u = l.includes("allOf"), b = l.includes("anyOf"), P = u || b, p = (P ? t[P ? u ? "allOf" : "anyOf" : "allOf"] : [t]).map((S) => a(S, o));
|
|
95
|
+
return u ? !p.includes(!1) : p.includes(!0);
|
|
92
96
|
}
|
|
93
97
|
return { parseValueSchema: v };
|
|
94
98
|
}
|
|
95
99
|
const se = {}, ne = {};
|
|
96
100
|
te();
|
|
97
|
-
function oe(e, r, i = /* @__PURE__ */ new Map(), s = (
|
|
98
|
-
return z[r.title] = r, V[r.title] = s, se[r.title] = n, ne[r.title] =
|
|
99
|
-
const a = re(
|
|
101
|
+
function oe(e, r, i = /* @__PURE__ */ new Map(), s = (g, a, v, t) => a, n = {}, c = (g) => g) {
|
|
102
|
+
return z[r.title] = r, V[r.title] = s, se[r.title] = n, ne[r.title] = c, (g = {}) => {
|
|
103
|
+
const a = re(g, r, i), v = Object.keys(e).reduce((t, o) => (t[o] = e[o].default, t), {});
|
|
100
104
|
return Object.assign(v, a);
|
|
101
105
|
};
|
|
102
106
|
}
|
|
@@ -182,7 +186,7 @@ const ue = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-
|
|
|
182
186
|
type: pe,
|
|
183
187
|
properties: de,
|
|
184
188
|
required: ye
|
|
185
|
-
}, ve = "progress",
|
|
189
|
+
}, ve = "progress", me = "A Farris Component", ke = "object", be = {
|
|
186
190
|
basic: {
|
|
187
191
|
description: "Basic Infomation",
|
|
188
192
|
title: "基本信息",
|
|
@@ -206,10 +210,10 @@ const ue = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-
|
|
|
206
210
|
}
|
|
207
211
|
}, Pe = {
|
|
208
212
|
title: ve,
|
|
209
|
-
description:
|
|
210
|
-
type:
|
|
213
|
+
description: me,
|
|
214
|
+
type: ke,
|
|
211
215
|
categories: be
|
|
212
|
-
},
|
|
216
|
+
}, R = {
|
|
213
217
|
progressType: { type: String, default: "line" },
|
|
214
218
|
strokeWidth: { type: Number, default: 0 },
|
|
215
219
|
size: { type: String, default: "default" },
|
|
@@ -240,15 +244,15 @@ const ue = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-
|
|
|
240
244
|
* 格式化进度信息
|
|
241
245
|
*/
|
|
242
246
|
format: { type: Function, default: (e, r) => `${e}%` }
|
|
243
|
-
},
|
|
247
|
+
}, _ = oe(R, he, ce, le, Pe);
|
|
244
248
|
function Se(e) {
|
|
245
|
-
function r(
|
|
246
|
-
return +
|
|
249
|
+
function r(g) {
|
|
250
|
+
return +g.replace("%", "");
|
|
247
251
|
}
|
|
248
|
-
function i(
|
|
252
|
+
function i(g) {
|
|
249
253
|
let a = [];
|
|
250
|
-
return Object.keys(
|
|
251
|
-
const t =
|
|
254
|
+
return Object.keys(g).forEach((v) => {
|
|
255
|
+
const t = g[v], o = r(v);
|
|
252
256
|
isNaN(o) || a.push({
|
|
253
257
|
key: o,
|
|
254
258
|
value: t
|
|
@@ -256,17 +260,17 @@ function Se(e) {
|
|
|
256
260
|
}), a = a.sort((v, t) => v.key - t.key), a;
|
|
257
261
|
}
|
|
258
262
|
const s = h(() => !!e.strokeColor && typeof e.strokeColor != "string"), n = h(() => {
|
|
259
|
-
const { from:
|
|
263
|
+
const { from: g = "#59a1ff", to: a = "#59a1ff", direction: v = "to right", ...t } = e.strokeColor;
|
|
260
264
|
if (Object.keys(t).length !== 0) {
|
|
261
|
-
const o = i(t).map(({ key: l, value:
|
|
265
|
+
const o = i(t).map(({ key: l, value: u }) => `${u} ${l}%`).join(", ");
|
|
262
266
|
return `linear-gradient(${v}, ${o})`;
|
|
263
267
|
}
|
|
264
|
-
return `linear-gradient(${v}, ${
|
|
265
|
-
}),
|
|
268
|
+
return `linear-gradient(${v}, ${g}, ${a})`;
|
|
269
|
+
}), c = h(() => i(e.strokeColor).map(({ key: g, value: a }) => ({ offset: `${g}%`, color: a })));
|
|
266
270
|
return {
|
|
267
271
|
isGradient: s,
|
|
268
272
|
linearGradient: n,
|
|
269
|
-
circleGradient:
|
|
273
|
+
circleGradient: c
|
|
270
274
|
};
|
|
271
275
|
}
|
|
272
276
|
function $e(e) {
|
|
@@ -276,77 +280,77 @@ function we(e) {
|
|
|
276
280
|
return { formatPercentageText: h(() => e.format(e.percent, e.successPercent)) };
|
|
277
281
|
}
|
|
278
282
|
function je(e, r, i, s) {
|
|
279
|
-
const { isCircleStyle: n } = r, { isGradient:
|
|
280
|
-
const
|
|
283
|
+
const { isCircleStyle: n } = r, { isGradient: c, linearGradient: g } = i, { strokeWidth: a } = s, v = h(() => {
|
|
284
|
+
const p = {
|
|
281
285
|
"f-progress": !0,
|
|
282
286
|
"f-progress-line": e.progressType === "line",
|
|
283
287
|
"ant-progress-small": e.size === "small",
|
|
284
288
|
"f-progress-show-info": e.showInfo,
|
|
285
289
|
"f-progress-circle": n.value
|
|
286
290
|
}, $ = `f-progress-status-${e.progressStatus}`;
|
|
287
|
-
return
|
|
291
|
+
return p[$] = !0, p;
|
|
288
292
|
}), t = h(() => ({
|
|
289
293
|
width: `${e.width}px`,
|
|
290
294
|
height: `${e.width}px`,
|
|
291
295
|
"font-size": `${e.width * 0.15 + 6}px`,
|
|
292
|
-
"f-progress-circle-gradient":
|
|
296
|
+
"f-progress-circle-gradient": c.value
|
|
293
297
|
})), o = h(() => ({
|
|
294
298
|
"f-progress-inner": !0,
|
|
295
|
-
"f-progress-circle-gradient":
|
|
296
|
-
})), l = 0,
|
|
297
|
-
const
|
|
298
|
-
let S = 0, w = -
|
|
299
|
+
"f-progress-circle-gradient": c.value
|
|
300
|
+
})), l = 0, u = h(() => l + 1), b = h(() => {
|
|
301
|
+
const p = 50 - a.value / 2, $ = e.gapPosition || (e.progressType === "circle" ? "top" : "bottom");
|
|
302
|
+
let S = 0, w = -p, f = 0, m = p * -2;
|
|
299
303
|
switch ($) {
|
|
300
304
|
case "left":
|
|
301
|
-
S = -
|
|
305
|
+
S = -p, w = 0, f = p * 2, m = 0;
|
|
302
306
|
break;
|
|
303
307
|
case "right":
|
|
304
|
-
S =
|
|
308
|
+
S = p, w = 0, f = p * -2, m = 0;
|
|
305
309
|
break;
|
|
306
310
|
case "bottom":
|
|
307
|
-
w =
|
|
311
|
+
w = p, m = p * 2;
|
|
308
312
|
break;
|
|
309
313
|
}
|
|
310
314
|
return `M 50,50 m ${S},${w}
|
|
311
|
-
a ${
|
|
312
|
-
a ${
|
|
313
|
-
}),
|
|
314
|
-
const
|
|
315
|
+
a ${p},${p} 0 1 1 ${f},${-m}
|
|
316
|
+
a ${p},${p} 0 1 1 ${-f},${m}`;
|
|
317
|
+
}), P = h(() => {
|
|
318
|
+
const p = 50 - a.value / 2, $ = Math.PI * 2 * p, S = e.gapDegree || (e.progressType === "circle" ? 0 : 75);
|
|
315
319
|
return {
|
|
316
320
|
strokeDasharray: `${$ - S}px ${$}px`,
|
|
317
321
|
strokeDashoffset: `-${S / 2}px`,
|
|
318
322
|
transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"
|
|
319
323
|
};
|
|
320
324
|
}), T = h(() => {
|
|
321
|
-
const
|
|
322
|
-
return w.map((
|
|
323
|
-
const
|
|
325
|
+
const p = 50 - a.value / 2, $ = Math.PI * 2 * p, S = e.gapDegree || (e.progressType === "circle" ? 0 : 75), w = e.successPercent !== void 0 && e.successPercent !== null ? [e.successPercent, e.percent] : [e.percent];
|
|
326
|
+
return w.map((f, m) => {
|
|
327
|
+
const k = w.length === 2 && m === 0;
|
|
324
328
|
return {
|
|
325
|
-
stroke:
|
|
329
|
+
stroke: c.value && !k ? `url(#gradient-${u.value})` : null,
|
|
326
330
|
strokePathStyle: {
|
|
327
|
-
stroke:
|
|
331
|
+
stroke: c.value ? null : k ? "default" : e.strokeColor,
|
|
328
332
|
transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",
|
|
329
|
-
strokeDasharray: `${(
|
|
333
|
+
strokeDasharray: `${(f || 0) / 100 * ($ - S)}px ${$}px`,
|
|
330
334
|
strokeDashoffset: `-${S / 2}px`
|
|
331
335
|
}
|
|
332
336
|
};
|
|
333
337
|
}).reverse();
|
|
334
|
-
}),
|
|
338
|
+
}), B = h(() => ({
|
|
335
339
|
width: `${e.percent}%`,
|
|
336
340
|
"border-radius": e.strokeLinecap === "round" ? "100px" : "0",
|
|
337
|
-
background:
|
|
338
|
-
"background-image":
|
|
341
|
+
background: c.value ? null : e.strokeColor,
|
|
342
|
+
"background-image": c.value ? g.value : null,
|
|
339
343
|
height: `${a.value}px`
|
|
340
344
|
}));
|
|
341
345
|
return {
|
|
342
346
|
progressClass: v,
|
|
343
347
|
inCircleProgressBarStyle: t,
|
|
344
348
|
inCircleProgressBarClass: o,
|
|
345
|
-
pathString:
|
|
346
|
-
trailPathStyle:
|
|
349
|
+
pathString: b,
|
|
350
|
+
trailPathStyle: P,
|
|
347
351
|
progressCirclePaths: T,
|
|
348
|
-
gradientId:
|
|
349
|
-
inlineProgressBackgroundStyle:
|
|
352
|
+
gradientId: u,
|
|
353
|
+
inlineProgressBackgroundStyle: B
|
|
350
354
|
};
|
|
351
355
|
}
|
|
352
356
|
function Oe(e) {
|
|
@@ -357,14 +361,14 @@ function Be(e) {
|
|
|
357
361
|
const n = {
|
|
358
362
|
"f-progress-text-icon": !0,
|
|
359
363
|
"f-icon": !0
|
|
360
|
-
},
|
|
361
|
-
return n[
|
|
364
|
+
}, c = `f-icon-${e.progressStatus}`;
|
|
365
|
+
return n[c] = !0, n;
|
|
362
366
|
}), i = h(() => {
|
|
363
367
|
const n = {
|
|
364
368
|
"f-progress-text-icon": !0,
|
|
365
369
|
"f-icon": !0
|
|
366
|
-
},
|
|
367
|
-
return n[
|
|
370
|
+
}, c = e.progressStatus === "success" ? "f-icon-checkmark" : "f-icon-x";
|
|
371
|
+
return n[c] = !0, n;
|
|
368
372
|
}), s = h(() => e.progressStatus === "error" || e.progressStatus === "success");
|
|
369
373
|
return {
|
|
370
374
|
inlineProgrssStatusClass: r,
|
|
@@ -381,48 +385,48 @@ function Te(e) {
|
|
|
381
385
|
})), i = h(() => e.successPercent || e.successPercent === 0);
|
|
382
386
|
return { inlineProgressSuccessBackgroundStyle: r, shouldShowSuccessInlineProgressBackground: i };
|
|
383
387
|
}
|
|
384
|
-
const
|
|
388
|
+
const E = /* @__PURE__ */ A({
|
|
385
389
|
name: "FProgress",
|
|
386
|
-
props:
|
|
390
|
+
props: R,
|
|
387
391
|
emits: [],
|
|
388
392
|
setup(e) {
|
|
389
|
-
const r = d(e.progressType), i = d(e.showInfo), s = d(e.percent), n = d(e.strokeLinecap),
|
|
390
|
-
isGradient:
|
|
393
|
+
const r = d(e.progressType), i = d(e.showInfo), s = d(e.percent), n = d(e.strokeLinecap), c = Se(e), {
|
|
394
|
+
isGradient: g,
|
|
391
395
|
circleGradient: a
|
|
392
|
-
} =
|
|
396
|
+
} = c, v = $e(e), {
|
|
393
397
|
strokeWidth: t
|
|
394
398
|
} = v, {
|
|
395
399
|
formatPercentageText: o
|
|
396
400
|
} = we(e), l = Oe(e), {
|
|
397
|
-
isCircleStyle:
|
|
401
|
+
isCircleStyle: u
|
|
398
402
|
} = l, {
|
|
399
|
-
progressClass:
|
|
400
|
-
inCircleProgressBarStyle:
|
|
403
|
+
progressClass: b,
|
|
404
|
+
inCircleProgressBarStyle: P,
|
|
401
405
|
inCircleProgressBarClass: T,
|
|
402
|
-
pathString:
|
|
403
|
-
trailPathStyle:
|
|
406
|
+
pathString: B,
|
|
407
|
+
trailPathStyle: p,
|
|
404
408
|
progressCirclePaths: $,
|
|
405
409
|
gradientId: S,
|
|
406
410
|
inlineProgressBackgroundStyle: w
|
|
407
|
-
} = je(e, l,
|
|
408
|
-
inlineProgrssStatusClass:
|
|
411
|
+
} = je(e, l, c, v), {
|
|
412
|
+
inlineProgrssStatusClass: f,
|
|
409
413
|
circleProgrssStatusClass: m,
|
|
410
|
-
shouldShowStatus:
|
|
414
|
+
shouldShowStatus: k
|
|
411
415
|
} = Be(e), {
|
|
412
|
-
inlineProgressSuccessBackgroundStyle:
|
|
416
|
+
inlineProgressSuccessBackgroundStyle: O,
|
|
413
417
|
shouldShowSuccessInlineProgressBackground: M
|
|
414
418
|
} = Te(e);
|
|
415
|
-
|
|
419
|
+
C(() => e.percent, (D) => {
|
|
416
420
|
s.value = D || 0;
|
|
417
421
|
});
|
|
418
|
-
function
|
|
422
|
+
function N() {
|
|
419
423
|
return i.value && y("span", {
|
|
420
424
|
class: "f-progress-text"
|
|
421
|
-
}, [
|
|
422
|
-
class:
|
|
425
|
+
}, [k.value ? y("span", {
|
|
426
|
+
class: u.value ? m.value : f.value
|
|
423
427
|
}, null) : o.value]);
|
|
424
428
|
}
|
|
425
|
-
function
|
|
429
|
+
function G() {
|
|
426
430
|
return y(Q, null, [y("div", {
|
|
427
431
|
class: "f-progress-outer"
|
|
428
432
|
}, [y("div", {
|
|
@@ -432,17 +436,17 @@ const N = /* @__PURE__ */ A({
|
|
|
432
436
|
style: w.value
|
|
433
437
|
}, null), M.value && y("div", {
|
|
434
438
|
class: "f-progress-success-bg",
|
|
435
|
-
style:
|
|
436
|
-
}, null)])]),
|
|
439
|
+
style: O.value
|
|
440
|
+
}, null)])]), N()]);
|
|
437
441
|
}
|
|
438
|
-
function
|
|
442
|
+
function W() {
|
|
439
443
|
return y("div", {
|
|
440
444
|
class: T.value,
|
|
441
|
-
style:
|
|
445
|
+
style: P.value
|
|
442
446
|
}, [y("svg", {
|
|
443
447
|
class: "f-progress-circle",
|
|
444
448
|
viewBox: "0 0 100 100"
|
|
445
|
-
}, [
|
|
449
|
+
}, [g.value && y("defs", null, [y("linearGradient", {
|
|
446
450
|
id: "gradient-" + S.value,
|
|
447
451
|
x1: "100%",
|
|
448
452
|
y1: "0%",
|
|
@@ -456,129 +460,136 @@ const N = /* @__PURE__ */ A({
|
|
|
456
460
|
stroke: "#efefef",
|
|
457
461
|
"fill-opacity": "0",
|
|
458
462
|
"stroke-width": t.value,
|
|
459
|
-
d:
|
|
460
|
-
style:
|
|
463
|
+
d: B.value,
|
|
464
|
+
style: p.value
|
|
461
465
|
}, null), $.value.map((D) => y("path", {
|
|
462
466
|
class: "f-progress-circle-path",
|
|
463
467
|
"fill-opacity": "0",
|
|
464
|
-
d:
|
|
468
|
+
d: B.value,
|
|
465
469
|
"stroke-linecap": n.value,
|
|
466
470
|
stroke: D.stroke,
|
|
467
471
|
"stroke-width": s.value ? t.value : 0,
|
|
468
472
|
style: D.strokePathStyle
|
|
469
|
-
}, null))]),
|
|
473
|
+
}, null))]), N()]);
|
|
470
474
|
}
|
|
471
475
|
return () => y("div", {
|
|
472
|
-
class:
|
|
473
|
-
}, [r.value === "line" &&
|
|
476
|
+
class: b.value
|
|
477
|
+
}, [r.value === "line" && G(), u.value && W()]);
|
|
474
478
|
}
|
|
475
479
|
});
|
|
476
480
|
function De(e, r, i) {
|
|
477
481
|
var w;
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
const n = "", u = "", f = d();
|
|
481
|
-
function a() {
|
|
482
|
+
const s = "", n = "", c = d();
|
|
483
|
+
function g() {
|
|
482
484
|
return (r == null ? void 0 : r.schema.componentType) !== "frame";
|
|
483
485
|
}
|
|
484
|
-
function
|
|
486
|
+
function a() {
|
|
485
487
|
return !1;
|
|
486
488
|
}
|
|
487
|
-
function
|
|
489
|
+
function v() {
|
|
488
490
|
return (r == null ? void 0 : r.schema.componentType) !== "frame";
|
|
489
491
|
}
|
|
490
|
-
function
|
|
492
|
+
function t() {
|
|
491
493
|
return (r == null ? void 0 : r.schema.componentType) === "frame";
|
|
492
494
|
}
|
|
493
|
-
function
|
|
494
|
-
if (!
|
|
495
|
+
function o(f) {
|
|
496
|
+
if (!f || !f.value)
|
|
495
497
|
return null;
|
|
496
|
-
if (
|
|
497
|
-
return
|
|
498
|
-
const m = d(
|
|
499
|
-
return
|
|
498
|
+
if (f.value.schema && f.value.schema.type === "component")
|
|
499
|
+
return f.value;
|
|
500
|
+
const m = d(f == null ? void 0 : f.value.parent), k = o(m);
|
|
501
|
+
return k || null;
|
|
500
502
|
}
|
|
501
|
-
function
|
|
502
|
-
const { componentInstance: m, designerItemElementRef:
|
|
503
|
-
return !m || !m.value ? null : m.value.canMove ?
|
|
503
|
+
function l(f = r) {
|
|
504
|
+
const { componentInstance: m, designerItemElementRef: k } = f;
|
|
505
|
+
return !m || !m.value ? null : m.value.canMove ? k : l(f.parent);
|
|
504
506
|
}
|
|
505
|
-
function
|
|
507
|
+
function u(f) {
|
|
506
508
|
return !!i;
|
|
507
509
|
}
|
|
508
510
|
function b() {
|
|
509
511
|
return (r == null ? void 0 : r.schema.label) || (r == null ? void 0 : r.schema.title) || (r == null ? void 0 : r.schema.name);
|
|
510
512
|
}
|
|
511
|
-
function
|
|
513
|
+
function P() {
|
|
512
514
|
}
|
|
513
|
-
function
|
|
515
|
+
function T(f, m) {
|
|
514
516
|
}
|
|
515
|
-
function
|
|
516
|
-
const { componentType:
|
|
517
|
-
let
|
|
518
|
-
const M =
|
|
519
|
-
return
|
|
517
|
+
function B(f, m) {
|
|
518
|
+
const { componentType: k } = f;
|
|
519
|
+
let O = q(k, f, m);
|
|
520
|
+
const M = k.toLowerCase().replace(/-/g, "_");
|
|
521
|
+
return O && !O.id && O.type === k && (O.id = `${M}_${Math.random().toString().slice(2, 6)}`), O;
|
|
520
522
|
}
|
|
521
|
-
function
|
|
523
|
+
function p(f) {
|
|
522
524
|
}
|
|
523
|
-
function
|
|
525
|
+
function $(...f) {
|
|
526
|
+
}
|
|
527
|
+
function S() {
|
|
528
|
+
r != null && r.schema.contents && r.schema.contents.map((f) => {
|
|
529
|
+
var O;
|
|
530
|
+
let m = f.id;
|
|
531
|
+
f.type === "component-ref" && (m = f.component);
|
|
532
|
+
const k = e.value.querySelector(`#${m}-design-item`);
|
|
533
|
+
(O = k == null ? void 0 : k.componentInstance) != null && O.value.onRemoveComponent && k.componentInstance.value.onRemoveComponent();
|
|
534
|
+
});
|
|
524
535
|
}
|
|
525
|
-
return
|
|
526
|
-
canMove:
|
|
527
|
-
canSelectParent:
|
|
528
|
-
canDelete:
|
|
529
|
-
canNested: !
|
|
536
|
+
return c.value = {
|
|
537
|
+
canMove: g(),
|
|
538
|
+
canSelectParent: a(),
|
|
539
|
+
canDelete: v(),
|
|
540
|
+
canNested: !t(),
|
|
530
541
|
contents: r == null ? void 0 : r.schema.contents,
|
|
531
542
|
elementRef: e,
|
|
532
543
|
parent: (w = r == null ? void 0 : r.parent) == null ? void 0 : w.componentInstance,
|
|
533
544
|
schema: r == null ? void 0 : r.schema,
|
|
534
|
-
styles:
|
|
535
|
-
designerClass:
|
|
536
|
-
canAccepts:
|
|
537
|
-
getBelongedComponentInstance:
|
|
538
|
-
getDraggableDesignItemElement:
|
|
545
|
+
styles: s,
|
|
546
|
+
designerClass: n,
|
|
547
|
+
canAccepts: u,
|
|
548
|
+
getBelongedComponentInstance: o,
|
|
549
|
+
getDraggableDesignItemElement: l,
|
|
539
550
|
getDraggingDisplayText: b,
|
|
540
|
-
getPropConfig:
|
|
541
|
-
getDragScopeElement:
|
|
542
|
-
onAcceptMovedChildElement:
|
|
543
|
-
onChildElementMovedOut:
|
|
544
|
-
addNewChildComponentSchema:
|
|
545
|
-
updateDragAndDropRules: s,
|
|
551
|
+
getPropConfig: $,
|
|
552
|
+
getDragScopeElement: P,
|
|
553
|
+
onAcceptMovedChildElement: T,
|
|
554
|
+
onChildElementMovedOut: p,
|
|
555
|
+
addNewChildComponentSchema: B,
|
|
546
556
|
triggerBelongedComponentToMoveWhenMoved: d(!1),
|
|
547
|
-
triggerBelongedComponentToDeleteWhenDeleted: d(!1)
|
|
548
|
-
|
|
557
|
+
triggerBelongedComponentToDeleteWhenDeleted: d(!1),
|
|
558
|
+
onRemoveComponent: S
|
|
559
|
+
}, c;
|
|
549
560
|
}
|
|
550
561
|
const Me = /* @__PURE__ */ A({
|
|
551
562
|
name: "FProgressDesign",
|
|
552
|
-
props:
|
|
563
|
+
props: R,
|
|
553
564
|
emits: [],
|
|
554
565
|
setup(e, r) {
|
|
555
|
-
const i = d(e.progressStatus), s = d(e.progressType), n = d(e.size),
|
|
566
|
+
const i = d(e.progressStatus), s = d(e.progressType), n = d(e.size), c = d(e.showInfo), g = d(e.strokeWidth), a = d(e.percent), v = d(e.strokeLinecap), t = d(!1), o = d(e.strokeColor), l = d(null), u = d(0), b = d(e.width), P = d(""), T = d([]), B = d(""), p = d([]), $ = d(e.enableBackgroundImg), S = d(e.backgroundImg), w = d(), f = U("design-item-context"), m = De(w, f);
|
|
556
567
|
Z(() => {
|
|
557
568
|
w.value.componentInstance = m;
|
|
558
|
-
}), r.expose(m.value),
|
|
569
|
+
}), r.expose(m.value), C(() => e.percent, (j) => {
|
|
559
570
|
a.value = j || 0;
|
|
560
571
|
});
|
|
561
|
-
const
|
|
572
|
+
const k = h(() => g.value || (s.value === "line" && n.value !== "small" ? 8 : 6)), O = h(() => s.value === "circle" || s.value === "dashboard"), M = h(() => {
|
|
562
573
|
const j = {
|
|
563
574
|
"f-progress": !0,
|
|
564
575
|
"f-progress-line": s.value === "line",
|
|
565
576
|
"ant-progress-small": n.value === "small",
|
|
566
|
-
"f-progress-show-info":
|
|
567
|
-
".f-progress-circle":
|
|
577
|
+
"f-progress-show-info": c.value,
|
|
578
|
+
".f-progress-circle": O.value
|
|
568
579
|
}, J = `f-progress-status-${i.value}`;
|
|
569
580
|
return j[J] = !0, j;
|
|
570
|
-
}),
|
|
581
|
+
}), N = h(() => ({
|
|
571
582
|
width: `${a.value}%`,
|
|
572
583
|
"border-radius": v.value === "round" ? "100px" : "0",
|
|
573
584
|
backgroud: t.value ? null : o.value,
|
|
574
585
|
"background-image": t.value ? l.value : null,
|
|
575
|
-
height: `${
|
|
576
|
-
})),
|
|
586
|
+
height: `${k.value}px`
|
|
587
|
+
})), G = h(() => ({
|
|
577
588
|
width: `${a.value}%`,
|
|
578
589
|
"border-radius": v.value === "round" ? "100px" : "0",
|
|
579
|
-
height: `${
|
|
590
|
+
height: `${k.value}px`,
|
|
580
591
|
"background-image": $.value ? S.value : null
|
|
581
|
-
})),
|
|
592
|
+
})), W = h(() => u.value || u.value === 0);
|
|
582
593
|
function D() {
|
|
583
594
|
return y("div", {
|
|
584
595
|
class: "f-progress-outer"
|
|
@@ -586,27 +597,27 @@ const Me = /* @__PURE__ */ A({
|
|
|
586
597
|
class: "f-progress-inner"
|
|
587
598
|
}, [y("div", {
|
|
588
599
|
class: "f-progress-bg",
|
|
589
|
-
style:
|
|
590
|
-
}, null),
|
|
600
|
+
style: N.value
|
|
601
|
+
}, null), W.value && y("div", {
|
|
591
602
|
class: "f-progress-success-bg",
|
|
592
|
-
style:
|
|
603
|
+
style: G.value
|
|
593
604
|
}, null)])]);
|
|
594
605
|
}
|
|
595
|
-
const
|
|
596
|
-
width: `${
|
|
597
|
-
height: `${
|
|
598
|
-
"font-size": `${
|
|
606
|
+
const X = h(() => ({
|
|
607
|
+
width: `${b.value}px`,
|
|
608
|
+
height: `${b.value}px`,
|
|
609
|
+
"font-size": `${b.value * 0.15 + 6}px`,
|
|
599
610
|
"f-progress-circle-gradient": t.value
|
|
600
|
-
})),
|
|
611
|
+
})), Y = h(() => ({}));
|
|
601
612
|
function H() {
|
|
602
613
|
return y("div", {
|
|
603
614
|
class: "f-progress-inner",
|
|
604
|
-
style:
|
|
615
|
+
style: X.value
|
|
605
616
|
}, [y("svg", {
|
|
606
617
|
class: "f-progress-circle",
|
|
607
618
|
viewBox: "0 0 100 100"
|
|
608
619
|
}, [t.value && y("defs", null, [y("linearGradient", {
|
|
609
|
-
id: "gradient-" +
|
|
620
|
+
id: "gradient-" + P.value,
|
|
610
621
|
x1: "100%",
|
|
611
622
|
y1: "0%",
|
|
612
623
|
x2: "0%",
|
|
@@ -618,35 +629,35 @@ const Me = /* @__PURE__ */ A({
|
|
|
618
629
|
class: "f-progress-circle-trail",
|
|
619
630
|
stroke: "#efefef",
|
|
620
631
|
"fill-opacity": "0",
|
|
621
|
-
"stroke-width":
|
|
622
|
-
d:
|
|
623
|
-
style:
|
|
624
|
-
}, null),
|
|
632
|
+
"stroke-width": k.value,
|
|
633
|
+
d: B.value,
|
|
634
|
+
style: Y.value
|
|
635
|
+
}, null), p.value.map((j) => y("path", {
|
|
625
636
|
class: "f-progress-circle-path",
|
|
626
637
|
"fill-opacity": "0",
|
|
627
|
-
d:
|
|
638
|
+
d: B.value,
|
|
628
639
|
"stroke-linecap": v.value,
|
|
629
640
|
stroke: j.stroke,
|
|
630
|
-
"stroke-width": a.value ?
|
|
641
|
+
"stroke-width": a.value ? k.value : 0,
|
|
631
642
|
style: j.strokePathStyle
|
|
632
643
|
}, null))])]);
|
|
633
644
|
}
|
|
634
645
|
return () => y("div", {
|
|
635
646
|
ref: w,
|
|
636
647
|
class: M.value
|
|
637
|
-
}, [s.value === "line" && D(),
|
|
648
|
+
}, [s.value === "line" && D(), O.value && H()]);
|
|
638
649
|
}
|
|
639
650
|
});
|
|
640
|
-
|
|
641
|
-
e.progress =
|
|
651
|
+
E.register = (e, r, i) => {
|
|
652
|
+
e.progress = E, r.progress = _;
|
|
642
653
|
};
|
|
643
|
-
|
|
644
|
-
e.progress = Me, r.progress =
|
|
654
|
+
E.registerDesigner = (e, r, i) => {
|
|
655
|
+
e.progress = Me, r.progress = _;
|
|
645
656
|
};
|
|
646
|
-
const
|
|
657
|
+
const We = K(E);
|
|
647
658
|
export {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
659
|
+
E as Progress,
|
|
660
|
+
We as default,
|
|
661
|
+
R as progressProps,
|
|
662
|
+
_ as propsResolver
|
|
652
663
|
};
|