@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,118 +1,132 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isPlainObject as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const { properties: e, title:
|
|
6
|
-
if (
|
|
7
|
-
const
|
|
8
|
-
|
|
1
|
+
import { defineComponent as F, ref as O, computed as $, watch as G, createVNode as g, inject as J, onMounted as Q } from "vue";
|
|
2
|
+
import { isPlainObject as q, cloneDeep as V } from "lodash-es";
|
|
3
|
+
const _ = {}, W = {};
|
|
4
|
+
function A(t) {
|
|
5
|
+
const { properties: e, title: l, ignore: r } = t, c = r && Array.isArray(r), p = Object.keys(e).reduce((i, j) => ((!c || !r.find((b) => b === j)) && (i[j] = e[j].type === "object" && e[j].properties ? A(e[j]) : V(e[j].default)), i), {});
|
|
6
|
+
if (l && (!c || !r.find((i) => i === "id"))) {
|
|
7
|
+
const i = l.toLowerCase().replace(/-/g, "_");
|
|
8
|
+
p.id = `${i}_${Math.random().toString().slice(2, 6)}`;
|
|
9
9
|
}
|
|
10
|
-
return
|
|
10
|
+
return p;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
function U(t) {
|
|
13
|
+
const { properties: e, title: l, required: r } = t;
|
|
14
|
+
if (r && Array.isArray(r)) {
|
|
15
|
+
const c = r.reduce((p, i) => (p[i] = e[i].type === "object" && e[i].properties ? A(e[i]) : V(e[i].default), p), {});
|
|
16
|
+
if (l && r.find((p) => p === "id")) {
|
|
17
|
+
const p = l.toLowerCase().replace(/-/g, "_");
|
|
18
|
+
c.id = `${p}_${Math.random().toString().slice(2, 6)}`;
|
|
19
|
+
}
|
|
20
|
+
return c;
|
|
18
21
|
}
|
|
19
|
-
return
|
|
22
|
+
return {
|
|
23
|
+
type: l
|
|
24
|
+
};
|
|
20
25
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
|
|
26
|
+
function H(t, e = {}, l) {
|
|
27
|
+
const r = _[t];
|
|
28
|
+
if (r) {
|
|
29
|
+
let c = U(r);
|
|
30
|
+
const p = W[t];
|
|
31
|
+
return c = p ? p({ getSchemaByType: H }, c, e, l) : c, c;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
24
34
|
}
|
|
25
35
|
function X(t, e) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
const l = A(e);
|
|
37
|
+
return Object.keys(l).reduce((r, c) => (Object.prototype.hasOwnProperty.call(t, c) && (r[c] && q(r[c]) && q(t[c] || !t[c]) ? Object.assign(r[c], t[c] || {}) : r[c] = t[c]), r), l), l;
|
|
38
|
+
}
|
|
39
|
+
function Y(t, e) {
|
|
40
|
+
return Object.keys(t).filter((r) => t[r] != null).reduce((r, c) => {
|
|
41
|
+
if (e.has(c)) {
|
|
42
|
+
const p = e.get(c);
|
|
43
|
+
if (typeof p == "string")
|
|
44
|
+
r[p] = t[c];
|
|
31
45
|
else {
|
|
32
|
-
const
|
|
33
|
-
Object.assign(
|
|
46
|
+
const i = p(c, t[c], t);
|
|
47
|
+
Object.assign(r, i);
|
|
34
48
|
}
|
|
35
49
|
} else
|
|
36
|
-
c
|
|
37
|
-
return
|
|
50
|
+
r[c] = t[c];
|
|
51
|
+
return r;
|
|
38
52
|
}, {});
|
|
39
53
|
}
|
|
40
|
-
function
|
|
41
|
-
const
|
|
42
|
-
return
|
|
54
|
+
function Z(t, e, l = /* @__PURE__ */ new Map()) {
|
|
55
|
+
const r = X(t, e);
|
|
56
|
+
return Y(r, l);
|
|
43
57
|
}
|
|
44
|
-
function
|
|
45
|
-
function e(n,
|
|
46
|
-
if (typeof
|
|
47
|
-
return
|
|
48
|
-
if (typeof
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
58
|
+
function C(t = {}) {
|
|
59
|
+
function e(n, f, v, h) {
|
|
60
|
+
if (typeof v == "number")
|
|
61
|
+
return h[n].length === v;
|
|
62
|
+
if (typeof v == "object") {
|
|
63
|
+
const S = Object.keys(v)[0], k = v[S];
|
|
64
|
+
if (S === "not")
|
|
65
|
+
return Number(h[n].length) !== Number(k);
|
|
66
|
+
if (S === "moreThan")
|
|
67
|
+
return Number(h[n].length) >= Number(k);
|
|
68
|
+
if (S === "lessThan")
|
|
69
|
+
return Number(h[n].length) <= Number(k);
|
|
56
70
|
}
|
|
57
71
|
return !1;
|
|
58
72
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
73
|
+
function l(n, f, v, h) {
|
|
74
|
+
return h[n] && h[n].propertyValue && String(h[n].propertyValue.value) === String(v);
|
|
61
75
|
}
|
|
62
|
-
const
|
|
76
|
+
const r = /* @__PURE__ */ new Map([
|
|
63
77
|
["length", e],
|
|
64
|
-
["getProperty",
|
|
78
|
+
["getProperty", l]
|
|
65
79
|
]);
|
|
66
|
-
Object.keys(t).reduce((n,
|
|
67
|
-
function
|
|
68
|
-
const
|
|
69
|
-
return typeof
|
|
70
|
-
if (
|
|
71
|
-
return { target:
|
|
72
|
-
const
|
|
73
|
-
return { target:
|
|
80
|
+
Object.keys(t).reduce((n, f) => (n.set(f, t[f]), n), r);
|
|
81
|
+
function c(n, f) {
|
|
82
|
+
const v = n;
|
|
83
|
+
return typeof f == "number" ? [{ target: v, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: v, operator: "getProperty", param: n, value: !!f }] : typeof f == "object" ? Object.keys(f).map((h) => {
|
|
84
|
+
if (h === "length")
|
|
85
|
+
return { target: v, operator: "length", param: null, value: f[h] };
|
|
86
|
+
const S = h, k = f[h];
|
|
87
|
+
return { target: v, operator: "getProperty", param: S, value: k };
|
|
74
88
|
}) : [];
|
|
75
89
|
}
|
|
76
|
-
function
|
|
77
|
-
return Object.keys(n).reduce((
|
|
78
|
-
const
|
|
79
|
-
return
|
|
90
|
+
function p(n) {
|
|
91
|
+
return Object.keys(n).reduce((v, h) => {
|
|
92
|
+
const S = c(h, n[h]);
|
|
93
|
+
return v.push(...S), v;
|
|
80
94
|
}, []);
|
|
81
95
|
}
|
|
82
|
-
function
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
return
|
|
96
|
+
function i(n, f) {
|
|
97
|
+
if (r.has(n.operator)) {
|
|
98
|
+
const v = r.get(n.operator);
|
|
99
|
+
return v && v(n.target, n.param, n.value, f) || !1;
|
|
86
100
|
}
|
|
87
101
|
return !1;
|
|
88
102
|
}
|
|
89
|
-
function j(n,
|
|
90
|
-
return
|
|
103
|
+
function j(n, f) {
|
|
104
|
+
return p(n).reduce((S, k) => S && i(k, f), !0);
|
|
91
105
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
return
|
|
106
|
+
function b(n, f) {
|
|
107
|
+
const v = Object.keys(n), h = v.includes("allOf"), S = v.includes("anyOf"), k = h || S, M = (k ? n[k ? h ? "allOf" : "anyOf" : "allOf"] : [n]).map((P) => j(P, f));
|
|
108
|
+
return h ? !M.includes(!1) : M.includes(!0);
|
|
95
109
|
}
|
|
96
|
-
return { parseValueSchema:
|
|
110
|
+
return { parseValueSchema: b };
|
|
97
111
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
function
|
|
101
|
-
return
|
|
102
|
-
const j =
|
|
103
|
-
return Object.assign(
|
|
112
|
+
const K = {}, x = {};
|
|
113
|
+
C();
|
|
114
|
+
function I(t, e, l = /* @__PURE__ */ new Map(), r = (i, j, b, n) => j, c = {}, p = (i) => i) {
|
|
115
|
+
return _[e.title] = e, W[e.title] = r, K[e.title] = c, x[e.title] = p, (i = {}) => {
|
|
116
|
+
const j = Z(i, e, l), b = Object.keys(t).reduce((n, f) => (n[f] = t[f].default, n), {});
|
|
117
|
+
return Object.assign(b, j);
|
|
104
118
|
};
|
|
105
119
|
}
|
|
106
|
-
function
|
|
120
|
+
function ee(t, e) {
|
|
107
121
|
return { customClass: e.class, customStyle: e.style };
|
|
108
122
|
}
|
|
109
|
-
const
|
|
110
|
-
["appearance",
|
|
123
|
+
const te = /* @__PURE__ */ new Map([
|
|
124
|
+
["appearance", ee]
|
|
111
125
|
]);
|
|
112
|
-
function
|
|
126
|
+
function se(t, e, l) {
|
|
113
127
|
return e;
|
|
114
128
|
}
|
|
115
|
-
const
|
|
129
|
+
const re = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-design.gitee.io/step.schema.json", ce = "step", le = "A Farris Component", ae = "object", ie = {
|
|
116
130
|
id: {
|
|
117
131
|
description: "The unique identifier for step",
|
|
118
132
|
type: "string"
|
|
@@ -177,15 +191,15 @@ const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
|
|
|
177
191
|
}, oe = [
|
|
178
192
|
"id",
|
|
179
193
|
"type"
|
|
180
|
-
],
|
|
181
|
-
$schema:
|
|
194
|
+
], ue = {
|
|
195
|
+
$schema: re,
|
|
182
196
|
$id: ne,
|
|
183
|
-
title:
|
|
184
|
-
description:
|
|
185
|
-
type:
|
|
186
|
-
properties:
|
|
197
|
+
title: ce,
|
|
198
|
+
description: le,
|
|
199
|
+
type: ae,
|
|
200
|
+
properties: ie,
|
|
187
201
|
required: oe
|
|
188
|
-
},
|
|
202
|
+
}, pe = "step", fe = "A Farris Component", ve = "object", he = {
|
|
189
203
|
basic: {
|
|
190
204
|
description: "Basic Infomation",
|
|
191
205
|
title: "基本信息",
|
|
@@ -207,12 +221,12 @@ const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
|
|
|
207
221
|
}
|
|
208
222
|
}
|
|
209
223
|
}
|
|
210
|
-
},
|
|
211
|
-
title:
|
|
212
|
-
description:
|
|
213
|
-
type:
|
|
214
|
-
categories:
|
|
215
|
-
},
|
|
224
|
+
}, de = {
|
|
225
|
+
title: pe,
|
|
226
|
+
description: fe,
|
|
227
|
+
type: ve,
|
|
228
|
+
categories: he
|
|
229
|
+
}, B = {
|
|
216
230
|
/** 步骤条方向 */
|
|
217
231
|
direction: { type: String, default: "horizontal" },
|
|
218
232
|
/** 是否平铺 */
|
|
@@ -242,45 +256,45 @@ const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
|
|
|
242
256
|
/** 步骤条点击后事件 */
|
|
243
257
|
onClick: { type: Function, default: () => {
|
|
244
258
|
} }
|
|
245
|
-
},
|
|
259
|
+
}, z = I(B, ue, te, se, de), L = /* @__PURE__ */ F({
|
|
246
260
|
name: "FStep",
|
|
247
|
-
props:
|
|
261
|
+
props: B,
|
|
248
262
|
emits: ["click"],
|
|
249
263
|
setup(t, e) {
|
|
250
|
-
const
|
|
251
|
-
"f-progress-step-list":
|
|
252
|
-
"f-progress-step-list-block":
|
|
253
|
-
"f-progress-step-horizontal-fill":
|
|
254
|
-
"f-progress-step-vertical-fill":
|
|
255
|
-
})),
|
|
256
|
-
height:
|
|
264
|
+
const l = O(t.direction), r = O(t.fill), c = O(t.height), p = O(t.steps), i = O(t.clickable), j = O(0), b = O(t.activeIndex), n = $(() => ({
|
|
265
|
+
"f-progress-step-list": l.value === "horizontal",
|
|
266
|
+
"f-progress-step-list-block": l.value === "vertical",
|
|
267
|
+
"f-progress-step-horizontal-fill": l.value === "horizontal" && r.value,
|
|
268
|
+
"f-progress-step-vertical-fill": l.value === "vertical" && r.value
|
|
269
|
+
})), f = $(() => ({
|
|
270
|
+
height: l.value === "vertical" ? `${c.value}px` : ""
|
|
257
271
|
}));
|
|
258
|
-
function
|
|
259
|
-
const
|
|
272
|
+
function v(a, s) {
|
|
273
|
+
const y = {
|
|
260
274
|
step: !0,
|
|
261
|
-
active: s ===
|
|
262
|
-
clickable:
|
|
275
|
+
active: s === b.value,
|
|
276
|
+
clickable: i.value,
|
|
263
277
|
// 'click-disable': step.disable,
|
|
264
|
-
current: s ===
|
|
278
|
+
current: s === b.value
|
|
265
279
|
};
|
|
266
|
-
return s <
|
|
280
|
+
return s < b.value && (y.finish = !0), y;
|
|
267
281
|
}
|
|
268
|
-
function
|
|
269
|
-
const
|
|
270
|
-
step:
|
|
282
|
+
function h(a, s) {
|
|
283
|
+
const y = {
|
|
284
|
+
step: a,
|
|
271
285
|
stepIndex: s
|
|
272
286
|
};
|
|
273
|
-
e.emit("click",
|
|
287
|
+
e.emit("click", y);
|
|
274
288
|
}
|
|
275
|
-
function
|
|
276
|
-
const
|
|
289
|
+
function S(a, s) {
|
|
290
|
+
const y = {
|
|
277
291
|
"f-progressstep-row": !0,
|
|
278
|
-
"step-active": s ===
|
|
279
|
-
"step-current": s ===
|
|
292
|
+
"step-active": s === b.value,
|
|
293
|
+
"step-current": s === b.value
|
|
280
294
|
};
|
|
281
|
-
return s <
|
|
295
|
+
return s < b.value && (y["step-finish"] = !0), y;
|
|
282
296
|
}
|
|
283
|
-
function
|
|
297
|
+
function k(a, s) {
|
|
284
298
|
return {
|
|
285
299
|
"step-icon": !0,
|
|
286
300
|
"step-success": s,
|
|
@@ -288,263 +302,263 @@ const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
|
|
|
288
302
|
"f-icon-check": s
|
|
289
303
|
};
|
|
290
304
|
}
|
|
291
|
-
function
|
|
292
|
-
const
|
|
293
|
-
return s >=
|
|
305
|
+
function T(a, s) {
|
|
306
|
+
const y = [];
|
|
307
|
+
return s >= b.value || s === j.value ? y.push(g("span", {
|
|
294
308
|
class: "step-icon"
|
|
295
|
-
}, [s + 1])) :
|
|
296
|
-
class:
|
|
297
|
-
}, null)),
|
|
309
|
+
}, [s + 1])) : y.push(g("span", {
|
|
310
|
+
class: k(a, !0)
|
|
311
|
+
}, null)), y;
|
|
298
312
|
}
|
|
299
|
-
function D(
|
|
313
|
+
function D(a, s) {
|
|
300
314
|
return {
|
|
301
315
|
"step-name": !0,
|
|
302
|
-
"step-name-success": s <
|
|
316
|
+
"step-name-success": s < b.value
|
|
303
317
|
};
|
|
304
318
|
}
|
|
305
|
-
function M(
|
|
306
|
-
return
|
|
319
|
+
function M(a, s) {
|
|
320
|
+
return g("div", {
|
|
307
321
|
class: "f-progress-step-title"
|
|
308
|
-
}, [
|
|
309
|
-
class: D(
|
|
310
|
-
}, [
|
|
322
|
+
}, [g("p", {
|
|
323
|
+
class: D(a, s)
|
|
324
|
+
}, [a.title])]);
|
|
311
325
|
}
|
|
312
|
-
function
|
|
326
|
+
function w(a, s) {
|
|
313
327
|
return {
|
|
314
328
|
"f-progress-step-line": !0,
|
|
315
|
-
"f-progress-step-line-success": s ===
|
|
329
|
+
"f-progress-step-line-success": s === b.value
|
|
316
330
|
};
|
|
317
331
|
}
|
|
318
|
-
function
|
|
319
|
-
return s !==
|
|
332
|
+
function P(a, s) {
|
|
333
|
+
return s !== p.value.length - 1;
|
|
320
334
|
}
|
|
321
|
-
const
|
|
335
|
+
const R = $(() => ({
|
|
322
336
|
triangle: !0,
|
|
323
|
-
"":
|
|
337
|
+
"": l.value === "vertical"
|
|
324
338
|
}));
|
|
325
|
-
function
|
|
326
|
-
return
|
|
327
|
-
class:
|
|
328
|
-
onClick: (
|
|
329
|
-
}, [
|
|
330
|
-
class:
|
|
331
|
-
}, [
|
|
339
|
+
function d() {
|
|
340
|
+
return p.value.map((a, s) => g("li", {
|
|
341
|
+
class: v(a, s),
|
|
342
|
+
onClick: (y) => h(a, s)
|
|
343
|
+
}, [g("div", {
|
|
344
|
+
class: S(a, s)
|
|
345
|
+
}, [g("div", {
|
|
332
346
|
class: "f-progress-step-content"
|
|
333
|
-
}, [
|
|
334
|
-
class:
|
|
335
|
-
}, [
|
|
336
|
-
class:
|
|
347
|
+
}, [T(a, s), M(a, s)]), P(a, s) && g("div", {
|
|
348
|
+
class: w(a, s)
|
|
349
|
+
}, [g("span", {
|
|
350
|
+
class: R.value
|
|
337
351
|
}, null)])])]));
|
|
338
352
|
}
|
|
339
|
-
return
|
|
340
|
-
t.activeIndex > -1 && t.activeIndex <=
|
|
341
|
-
}), () =>
|
|
353
|
+
return G(() => t.activeIndex, () => {
|
|
354
|
+
t.activeIndex > -1 && t.activeIndex <= p.value.length && (b.value = t.activeIndex, d());
|
|
355
|
+
}), () => g("div", {
|
|
342
356
|
class: "f-progress-step"
|
|
343
|
-
}, [
|
|
357
|
+
}, [g("ul", {
|
|
344
358
|
class: n.value,
|
|
345
|
-
style:
|
|
346
|
-
}, [
|
|
359
|
+
style: f.value
|
|
360
|
+
}, [d()])]);
|
|
347
361
|
}
|
|
348
362
|
});
|
|
349
|
-
function
|
|
350
|
-
var
|
|
351
|
-
const
|
|
352
|
-
function
|
|
363
|
+
function ye(t, e, l) {
|
|
364
|
+
var R;
|
|
365
|
+
const r = "", c = "", p = O();
|
|
366
|
+
function i() {
|
|
353
367
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
354
368
|
}
|
|
355
369
|
function j() {
|
|
356
370
|
return !1;
|
|
357
371
|
}
|
|
358
|
-
function
|
|
372
|
+
function b() {
|
|
359
373
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
360
374
|
}
|
|
361
375
|
function n() {
|
|
362
376
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
363
377
|
}
|
|
364
|
-
function
|
|
365
|
-
if (!
|
|
378
|
+
function f(d) {
|
|
379
|
+
if (!d || !d.value)
|
|
366
380
|
return null;
|
|
367
|
-
if (
|
|
368
|
-
return
|
|
369
|
-
const
|
|
381
|
+
if (d.value.schema && d.value.schema.type === "component")
|
|
382
|
+
return d.value;
|
|
383
|
+
const a = O(d == null ? void 0 : d.value.parent), s = f(a);
|
|
370
384
|
return s || null;
|
|
371
385
|
}
|
|
372
|
-
function
|
|
373
|
-
const { componentInstance:
|
|
374
|
-
return !
|
|
386
|
+
function v(d = e) {
|
|
387
|
+
const { componentInstance: a, designerItemElementRef: s } = d;
|
|
388
|
+
return !a || !a.value ? null : a.value.canMove ? s : v(d.parent);
|
|
375
389
|
}
|
|
376
|
-
function
|
|
377
|
-
return !!
|
|
390
|
+
function h(d) {
|
|
391
|
+
return !!l;
|
|
378
392
|
}
|
|
379
|
-
function
|
|
393
|
+
function S() {
|
|
380
394
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
381
395
|
}
|
|
382
|
-
function
|
|
396
|
+
function k() {
|
|
383
397
|
}
|
|
384
|
-
function
|
|
398
|
+
function T(d, a) {
|
|
385
399
|
}
|
|
386
|
-
function D(
|
|
387
|
-
const { componentType: s } =
|
|
388
|
-
let
|
|
400
|
+
function D(d, a) {
|
|
401
|
+
const { componentType: s } = d;
|
|
402
|
+
let y = H(s, d, a);
|
|
389
403
|
const o = s.toLowerCase().replace(/-/g, "_");
|
|
390
|
-
return
|
|
404
|
+
return y && !y.id && y.type === s && (y.id = `${o}_${Math.random().toString().slice(2, 6)}`), y;
|
|
391
405
|
}
|
|
392
|
-
function M(
|
|
406
|
+
function M(d) {
|
|
393
407
|
}
|
|
394
|
-
function
|
|
408
|
+
function w(...d) {
|
|
395
409
|
}
|
|
396
|
-
function
|
|
397
|
-
e != null && e.schema.contents && e.schema.contents.map((
|
|
398
|
-
var
|
|
399
|
-
let
|
|
400
|
-
|
|
401
|
-
const s = t.value.querySelector(`#${
|
|
402
|
-
(
|
|
410
|
+
function P() {
|
|
411
|
+
e != null && e.schema.contents && e.schema.contents.map((d) => {
|
|
412
|
+
var y;
|
|
413
|
+
let a = d.id;
|
|
414
|
+
d.type === "component-ref" && (a = d.component);
|
|
415
|
+
const s = t.value.querySelector(`#${a}-design-item`);
|
|
416
|
+
(y = s == null ? void 0 : s.componentInstance) != null && y.value.onRemoveComponent && s.componentInstance.value.onRemoveComponent();
|
|
403
417
|
});
|
|
404
418
|
}
|
|
405
|
-
return
|
|
406
|
-
canMove:
|
|
419
|
+
return p.value = {
|
|
420
|
+
canMove: i(),
|
|
407
421
|
canSelectParent: j(),
|
|
408
|
-
canDelete:
|
|
422
|
+
canDelete: b(),
|
|
409
423
|
canNested: !n(),
|
|
410
424
|
contents: e == null ? void 0 : e.schema.contents,
|
|
411
425
|
elementRef: t,
|
|
412
|
-
parent: (
|
|
426
|
+
parent: (R = e == null ? void 0 : e.parent) == null ? void 0 : R.componentInstance,
|
|
413
427
|
schema: e == null ? void 0 : e.schema,
|
|
414
|
-
styles:
|
|
415
|
-
designerClass:
|
|
416
|
-
canAccepts:
|
|
417
|
-
getBelongedComponentInstance:
|
|
418
|
-
getDraggableDesignItemElement:
|
|
419
|
-
getDraggingDisplayText:
|
|
420
|
-
getPropConfig:
|
|
421
|
-
getDragScopeElement:
|
|
422
|
-
onAcceptMovedChildElement:
|
|
428
|
+
styles: r,
|
|
429
|
+
designerClass: c,
|
|
430
|
+
canAccepts: h,
|
|
431
|
+
getBelongedComponentInstance: f,
|
|
432
|
+
getDraggableDesignItemElement: v,
|
|
433
|
+
getDraggingDisplayText: S,
|
|
434
|
+
getPropConfig: w,
|
|
435
|
+
getDragScopeElement: k,
|
|
436
|
+
onAcceptMovedChildElement: T,
|
|
423
437
|
onChildElementMovedOut: M,
|
|
424
438
|
addNewChildComponentSchema: D,
|
|
425
439
|
triggerBelongedComponentToMoveWhenMoved: O(!1),
|
|
426
440
|
triggerBelongedComponentToDeleteWhenDeleted: O(!1),
|
|
427
|
-
onRemoveComponent:
|
|
428
|
-
},
|
|
441
|
+
onRemoveComponent: P
|
|
442
|
+
}, p;
|
|
429
443
|
}
|
|
430
|
-
const
|
|
444
|
+
const ge = /* @__PURE__ */ F({
|
|
431
445
|
name: "FStepDesign",
|
|
432
|
-
props:
|
|
446
|
+
props: B,
|
|
433
447
|
emits: [],
|
|
434
448
|
setup(t, e) {
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
n.value.componentInstance =
|
|
438
|
-
}), e.expose(
|
|
439
|
-
const
|
|
440
|
-
"f-progress-step-list":
|
|
441
|
-
"f-progress-step-list-block":
|
|
442
|
-
"f-progress-step-horizontal-fill":
|
|
443
|
-
"f-progress-step-vertical-fill":
|
|
444
|
-
})),
|
|
445
|
-
height:
|
|
449
|
+
const l = O(t.direction), r = O(t.fill), c = O(t.height), p = O(t.steps), i = O(0), j = O(t.clickable), b = O(0), n = O(), f = J("design-item-context"), v = ye(n, f);
|
|
450
|
+
Q(() => {
|
|
451
|
+
n.value.componentInstance = v;
|
|
452
|
+
}), e.expose(v.value);
|
|
453
|
+
const h = $(() => ({
|
|
454
|
+
"f-progress-step-list": l.value === "horizontal",
|
|
455
|
+
"f-progress-step-list-block": l.value === "vertical",
|
|
456
|
+
"f-progress-step-horizontal-fill": l.value === "horizontal" && r.value,
|
|
457
|
+
"f-progress-step-vertical-fill": l.value === "vertical" && r.value
|
|
458
|
+
})), S = $(() => ({
|
|
459
|
+
height: l.value === "vertical" ? `${c.value}px` : ""
|
|
446
460
|
}));
|
|
447
|
-
function
|
|
461
|
+
function k(o, u) {
|
|
448
462
|
const m = {
|
|
449
463
|
step: !0,
|
|
450
|
-
active:
|
|
464
|
+
active: u === i.value,
|
|
451
465
|
clickable: j.value,
|
|
452
466
|
"click-disable": o.disable,
|
|
453
|
-
current:
|
|
467
|
+
current: u === i.value
|
|
454
468
|
};
|
|
455
|
-
return
|
|
469
|
+
return u < i.value && (m.finish = !0), o.status && (m[o.status] = !0), o.hasOwnProperty("class") && o.class.split(" ").reduce((E, N) => (E[N] = !0, E), m), m;
|
|
456
470
|
}
|
|
457
|
-
function
|
|
471
|
+
function T(o, u) {
|
|
458
472
|
}
|
|
459
|
-
function D(o,
|
|
473
|
+
function D(o, u) {
|
|
460
474
|
const m = {
|
|
461
475
|
"f-progressstep-row": !0,
|
|
462
|
-
"step-active":
|
|
463
|
-
"step-current":
|
|
476
|
+
"step-active": u === i.value,
|
|
477
|
+
"step-current": u === i.value
|
|
464
478
|
};
|
|
465
|
-
return
|
|
479
|
+
return u < i.value && (m["step-finish"] = !0), o.status && (m["step-" + o.status] = !0), m;
|
|
466
480
|
}
|
|
467
|
-
function M(o,
|
|
481
|
+
function M(o, u) {
|
|
468
482
|
const m = {
|
|
469
483
|
"step-icon": !0,
|
|
470
|
-
"step-success":
|
|
471
|
-
"k-icon":
|
|
472
|
-
"k-i-check":
|
|
484
|
+
"step-success": u,
|
|
485
|
+
"k-icon": u,
|
|
486
|
+
"k-i-check": u
|
|
473
487
|
};
|
|
474
|
-
return o.hasOwnProperty("icon") && o.class.split(" ").reduce((
|
|
488
|
+
return o.hasOwnProperty("icon") && o.class.split(" ").reduce((E, N) => (E[N] = !0, E), m), m;
|
|
475
489
|
}
|
|
476
|
-
function
|
|
490
|
+
function w(o, u) {
|
|
477
491
|
const m = [];
|
|
478
|
-
return o.icon ? m.push(
|
|
492
|
+
return o.icon ? m.push(g("span", {
|
|
479
493
|
class: M(o, !1)
|
|
480
|
-
}, null)) :
|
|
494
|
+
}, null)) : u >= i.value || u === b.value ? m.push(g("span", {
|
|
481
495
|
class: "step-icon"
|
|
482
|
-
}, [
|
|
496
|
+
}, [u + 1])) : m.push(g("span", {
|
|
483
497
|
class: M(o, !0)
|
|
484
498
|
}, null)), m;
|
|
485
499
|
}
|
|
486
|
-
function
|
|
500
|
+
function P(o, u) {
|
|
487
501
|
return {
|
|
488
502
|
"step-name": !0,
|
|
489
|
-
"step-name-success":
|
|
503
|
+
"step-name-success": u < i.value
|
|
490
504
|
};
|
|
491
505
|
}
|
|
492
|
-
function
|
|
493
|
-
return
|
|
506
|
+
function R(o, u) {
|
|
507
|
+
return g("div", {
|
|
494
508
|
class: "f-progress-step-title"
|
|
495
|
-
}, [
|
|
496
|
-
class:
|
|
509
|
+
}, [g("p", {
|
|
510
|
+
class: P(o, u)
|
|
497
511
|
}, [o.title])]);
|
|
498
512
|
}
|
|
499
|
-
function
|
|
513
|
+
function d(o, u) {
|
|
500
514
|
return {
|
|
501
515
|
"f-progress-step-line": !0,
|
|
502
|
-
"f-progress-step-line-success":
|
|
516
|
+
"f-progress-step-line-success": u === i.value
|
|
503
517
|
};
|
|
504
518
|
}
|
|
505
|
-
function
|
|
506
|
-
return
|
|
519
|
+
function a(o, u) {
|
|
520
|
+
return u !== p.value.length - 1;
|
|
507
521
|
}
|
|
508
|
-
const s =
|
|
522
|
+
const s = $(() => ({
|
|
509
523
|
triangle: !0,
|
|
510
|
-
"":
|
|
524
|
+
"": l.value === "vertical"
|
|
511
525
|
}));
|
|
512
|
-
function
|
|
513
|
-
return
|
|
514
|
-
class:
|
|
526
|
+
function y() {
|
|
527
|
+
return p.value.map((o, u) => g("li", {
|
|
528
|
+
class: k(o, u),
|
|
515
529
|
onClick: (m) => void 0
|
|
516
|
-
}, [
|
|
517
|
-
class: D(o,
|
|
518
|
-
}, [
|
|
530
|
+
}, [g("div", {
|
|
531
|
+
class: D(o, u)
|
|
532
|
+
}, [g("div", {
|
|
519
533
|
class: "f-progress-step-content"
|
|
520
|
-
}, [
|
|
521
|
-
class:
|
|
522
|
-
}, [
|
|
534
|
+
}, [w(o, u), R(o, u)]), a(o, u) && g("div", {
|
|
535
|
+
class: d(o, u)
|
|
536
|
+
}, [g("span", {
|
|
523
537
|
class: s.value
|
|
524
538
|
}, null)])])]));
|
|
525
539
|
}
|
|
526
|
-
return () =>
|
|
540
|
+
return () => g("div", {
|
|
527
541
|
ref: n,
|
|
528
542
|
class: "f-progress-step"
|
|
529
|
-
}, [
|
|
530
|
-
class:
|
|
531
|
-
style:
|
|
532
|
-
}, [
|
|
543
|
+
}, [g("ul", {
|
|
544
|
+
class: h.value,
|
|
545
|
+
style: S.value
|
|
546
|
+
}, [y()])]);
|
|
533
547
|
}
|
|
534
|
-
}),
|
|
548
|
+
}), Oe = {
|
|
535
549
|
install(t) {
|
|
536
550
|
t.component(L.name, L);
|
|
537
551
|
},
|
|
538
|
-
register(t, e,
|
|
539
|
-
t.step = L, e.step =
|
|
552
|
+
register(t, e, l, r) {
|
|
553
|
+
t.step = L, e.step = z;
|
|
540
554
|
},
|
|
541
|
-
registerDesigner(t, e,
|
|
542
|
-
t.step =
|
|
555
|
+
registerDesigner(t, e, l) {
|
|
556
|
+
t.step = ge, e.step = z;
|
|
543
557
|
}
|
|
544
558
|
};
|
|
545
559
|
export {
|
|
546
560
|
L as Step,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
561
|
+
Oe as default,
|
|
562
|
+
z as propsResolver,
|
|
563
|
+
B as stepProps
|
|
550
564
|
};
|