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