@farris/ui-vue 1.2.6 → 1.2.8
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 +150 -142
- package/components/avatar/index.esm.js +393 -457
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +491 -554
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +479 -513
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +857 -743
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4883 -5182
- package/components/data-view/index.esm.js +3072 -2949
- package/components/date-picker/index.esm.js +2626 -2689
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +940 -998
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +307 -293
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1747 -1627
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5877 -6176
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1454 -1524
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +659 -722
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1643 -1524
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6502 -6770
- package/components/mapping-editor/index.esm.js +5639 -5939
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +1098 -1130
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1317
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1479 -1513
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +706 -778
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +453 -516
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +555 -526
- package/components/response-toolbar/index.esm.js +1009 -1247
- package/components/schema-selector/index.esm.js +3261 -3373
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +441 -504
- package/components/tabs/index.esm.js +1849 -2039
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +445 -493
- package/components/time-picker/index.esm.js +1350 -1414
- package/components/transfer/index.esm.js +146 -144
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5948 -6237
- package/components/tree-view/index.esm.js +2381 -2255
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +27221 -26804
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import { defineComponent as F, ref as m, computed as N, watch as C, createVNode as
|
|
1
|
+
import { defineComponent as F, ref as m, computed as N, watch as C, createVNode as d, inject as W, onMounted as J } from "vue";
|
|
2
2
|
import { cloneDeep as G } from "lodash-es";
|
|
3
3
|
const q = {}, _ = {};
|
|
4
4
|
function L(t) {
|
|
5
|
-
const { properties: e, title: o } = t,
|
|
6
|
-
return
|
|
5
|
+
const { properties: e, title: o } = t, c = Object.keys(e).reduce((u, y) => (u[y] = e[y].type === "object" && e[y].properties ? L(e[y]) : G(e[y].default), u), {});
|
|
6
|
+
return c.id = `${o}-${Date.now()}`, c;
|
|
7
7
|
}
|
|
8
8
|
function B(t, e = {}) {
|
|
9
9
|
const o = q[t];
|
|
10
10
|
if (o) {
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
return
|
|
11
|
+
let c = L(o);
|
|
12
|
+
const u = _[t];
|
|
13
|
+
return c = u ? u({ getSchemaByType: B }, c, e) : c, c;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function H(t, e) {
|
|
18
18
|
const o = L(e);
|
|
19
|
-
return Object.keys(t).reduce((
|
|
19
|
+
return Object.keys(t).reduce((c, u) => (c[u] && typeof c[u] == "object" ? Object.assign(c[u], t[u]) : c[u] = t[u], c), o), o;
|
|
20
20
|
}
|
|
21
21
|
function Q(t, e) {
|
|
22
|
-
return Object.keys(t).filter((
|
|
23
|
-
if (e.has(
|
|
24
|
-
const
|
|
25
|
-
if (typeof
|
|
26
|
-
|
|
22
|
+
return Object.keys(t).filter((c) => t[c] != null).reduce((c, u) => {
|
|
23
|
+
if (e.has(u)) {
|
|
24
|
+
const y = e.get(u);
|
|
25
|
+
if (typeof y == "string")
|
|
26
|
+
c[y] = t[u];
|
|
27
27
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(
|
|
28
|
+
const g = y(u, t[u], t);
|
|
29
|
+
Object.assign(c, g);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
|
-
|
|
33
|
-
return
|
|
32
|
+
c[u] = t[u];
|
|
33
|
+
return c;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
36
36
|
function U(t, e, o = /* @__PURE__ */ new Map()) {
|
|
37
|
-
const
|
|
38
|
-
return Q(
|
|
37
|
+
const c = H(t, e);
|
|
38
|
+
return Q(c, o);
|
|
39
39
|
}
|
|
40
40
|
function X(t = {}) {
|
|
41
|
-
function e(n,
|
|
42
|
-
if (typeof
|
|
43
|
-
return
|
|
44
|
-
if (typeof
|
|
45
|
-
const O = Object.keys(
|
|
41
|
+
function e(n, f, p, v) {
|
|
42
|
+
if (typeof p == "number")
|
|
43
|
+
return v[n].length === p;
|
|
44
|
+
if (typeof p == "object") {
|
|
45
|
+
const O = Object.keys(p)[0], j = p[O];
|
|
46
46
|
if (O === "not")
|
|
47
|
-
return Number(
|
|
47
|
+
return Number(v[n].length) !== Number(j);
|
|
48
48
|
if (O === "moreThan")
|
|
49
|
-
return Number(
|
|
49
|
+
return Number(v[n].length) >= Number(j);
|
|
50
50
|
if (O === "lessThan")
|
|
51
|
-
return Number(
|
|
51
|
+
return Number(v[n].length) <= Number(j);
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
|
-
function o(n,
|
|
56
|
-
return
|
|
55
|
+
function o(n, f, p, v) {
|
|
56
|
+
return v[n] && v[n].propertyValue && String(v[n].propertyValue.value) === String(p);
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const c = /* @__PURE__ */ new Map([
|
|
59
59
|
["length", e],
|
|
60
60
|
["getProperty", o]
|
|
61
61
|
]);
|
|
62
|
-
Object.keys(t).reduce((n,
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
return typeof
|
|
66
|
-
if (
|
|
67
|
-
return { target:
|
|
68
|
-
const O =
|
|
69
|
-
return { target:
|
|
62
|
+
Object.keys(t).reduce((n, f) => (n.set(f, t[f]), n), c);
|
|
63
|
+
function u(n, f) {
|
|
64
|
+
const p = n;
|
|
65
|
+
return typeof f == "number" ? [{ target: p, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: p, operator: "getProperty", param: n, value: !!f }] : typeof f == "object" ? Object.keys(f).map((v) => {
|
|
66
|
+
if (v === "length")
|
|
67
|
+
return { target: p, operator: "length", param: null, value: f[v] };
|
|
68
|
+
const O = v, j = f[v];
|
|
69
|
+
return { target: p, operator: "getProperty", param: O, value: j };
|
|
70
70
|
}) : [];
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return Object.keys(n).reduce((
|
|
74
|
-
const O = v
|
|
75
|
-
return
|
|
72
|
+
function y(n) {
|
|
73
|
+
return Object.keys(n).reduce((p, v) => {
|
|
74
|
+
const O = u(v, n[v]);
|
|
75
|
+
return p.push(...O), p;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
78
|
+
function g(n, f) {
|
|
79
|
+
if (c.has(n.operator)) {
|
|
80
|
+
const p = c.get(n.operator);
|
|
81
|
+
return p && p(n.target, n.param, n.value, f) || !1;
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
85
|
+
function k(n, f) {
|
|
86
|
+
return y(n).reduce((O, j) => O && g(j, f), !0);
|
|
87
87
|
}
|
|
88
|
-
function b(n,
|
|
89
|
-
const
|
|
90
|
-
return
|
|
88
|
+
function b(n, f) {
|
|
89
|
+
const p = Object.keys(n), v = p.includes("allOf"), O = p.includes("anyOf"), j = v || O, S = (j ? n[j ? v ? "allOf" : "anyOf" : "allOf"] : [n]).map((T) => k(T, f));
|
|
90
|
+
return v ? !S.includes(!1) : S.includes(!0);
|
|
91
91
|
}
|
|
92
92
|
return { parseValueSchema: b };
|
|
93
93
|
}
|
|
94
94
|
const Y = {}, Z = {};
|
|
95
95
|
X();
|
|
96
|
-
function K(t, e, o = /* @__PURE__ */ new Map(),
|
|
97
|
-
return q[e.title] = e, _[e.title] =
|
|
98
|
-
const
|
|
99
|
-
return Object.assign(b,
|
|
96
|
+
function K(t, e, o = /* @__PURE__ */ new Map(), c = (g, k, b) => k, u = {}, y = (g) => g) {
|
|
97
|
+
return q[e.title] = e, _[e.title] = c, Y[e.title] = u, Z[e.title] = y, (g = {}) => {
|
|
98
|
+
const k = U(g, e, o), b = Object.keys(t).reduce((n, f) => (n[f] = t[f].default, n), {});
|
|
99
|
+
return Object.assign(b, k);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
function x(t, e) {
|
|
@@ -243,25 +243,25 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
|
|
|
243
243
|
props: V,
|
|
244
244
|
emits: ["click"],
|
|
245
245
|
setup(t, e) {
|
|
246
|
-
const o = m(t.direction),
|
|
246
|
+
const o = m(t.direction), c = m(t.fill), u = m(t.height), y = m(t.steps), g = m(t.clickable), k = m(0), b = m(t.activeIndex), n = N(() => ({
|
|
247
247
|
"f-progress-step-list": o.value === "horizontal",
|
|
248
248
|
"f-progress-step-list-block": o.value === "vertical",
|
|
249
|
-
"f-progress-step-horizontal-fill": o.value === "horizontal" &&
|
|
250
|
-
"f-progress-step-vertical-fill": o.value === "vertical" &&
|
|
251
|
-
})),
|
|
252
|
-
height: o.value === "vertical" ? `${
|
|
249
|
+
"f-progress-step-horizontal-fill": o.value === "horizontal" && c.value,
|
|
250
|
+
"f-progress-step-vertical-fill": o.value === "vertical" && c.value
|
|
251
|
+
})), f = N(() => ({
|
|
252
|
+
height: o.value === "vertical" ? `${u.value}px` : ""
|
|
253
253
|
}));
|
|
254
|
-
function
|
|
254
|
+
function p(r, s) {
|
|
255
255
|
const i = {
|
|
256
256
|
step: !0,
|
|
257
257
|
active: s === b.value,
|
|
258
|
-
clickable:
|
|
258
|
+
clickable: g.value,
|
|
259
259
|
// 'click-disable': step.disable,
|
|
260
260
|
current: s === b.value
|
|
261
261
|
};
|
|
262
262
|
return s < b.value && (i.finish = !0), i;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function v(r, s) {
|
|
265
265
|
const i = {
|
|
266
266
|
step: r,
|
|
267
267
|
stepIndex: s
|
|
@@ -286,9 +286,9 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
|
|
|
286
286
|
}
|
|
287
287
|
function w(r, s) {
|
|
288
288
|
const i = [];
|
|
289
|
-
return s >= b.value || s ===
|
|
289
|
+
return s >= b.value || s === k.value ? i.push(d("span", {
|
|
290
290
|
class: "step-icon"
|
|
291
|
-
}, [s + 1])) : i.push(
|
|
291
|
+
}, [s + 1])) : i.push(d("span", {
|
|
292
292
|
class: j(r, !0)
|
|
293
293
|
}, null)), i;
|
|
294
294
|
}
|
|
@@ -298,10 +298,10 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
|
|
|
298
298
|
"step-name-success": s < b.value
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
return
|
|
301
|
+
function S(r, s) {
|
|
302
|
+
return d("div", {
|
|
303
303
|
class: "f-progress-step-title"
|
|
304
|
-
}, [
|
|
304
|
+
}, [d("p", {
|
|
305
305
|
class: E(r, s)
|
|
306
306
|
}, [r.title])]);
|
|
307
307
|
}
|
|
@@ -312,42 +312,42 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
|
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
314
|
function T(r, s) {
|
|
315
|
-
return s !==
|
|
315
|
+
return s !== y.value.length - 1;
|
|
316
316
|
}
|
|
317
317
|
const $ = N(() => ({
|
|
318
318
|
triangle: !0,
|
|
319
319
|
"": o.value === "vertical"
|
|
320
320
|
}));
|
|
321
321
|
function M() {
|
|
322
|
-
return
|
|
323
|
-
class:
|
|
324
|
-
onClick: (i) =>
|
|
325
|
-
}, [
|
|
322
|
+
return y.value.map((r, s) => d("li", {
|
|
323
|
+
class: p(r, s),
|
|
324
|
+
onClick: (i) => v(r, s)
|
|
325
|
+
}, [d("div", {
|
|
326
326
|
class: O(r, s)
|
|
327
|
-
}, [
|
|
327
|
+
}, [d("div", {
|
|
328
328
|
class: "f-progress-step-content"
|
|
329
|
-
}, [w(r, s),
|
|
329
|
+
}, [w(r, s), S(r, s)]), T(r, s) && d("div", {
|
|
330
330
|
class: P(r, s)
|
|
331
|
-
}, [
|
|
331
|
+
}, [d("span", {
|
|
332
332
|
class: $.value
|
|
333
333
|
}, null)])])]));
|
|
334
334
|
}
|
|
335
335
|
return C(() => t.activeIndex, () => {
|
|
336
|
-
t.activeIndex > -1 && t.activeIndex <=
|
|
337
|
-
}), () =>
|
|
336
|
+
t.activeIndex > -1 && t.activeIndex <= y.value.length && (b.value = t.activeIndex, M());
|
|
337
|
+
}), () => d("div", {
|
|
338
338
|
class: "f-progress-step"
|
|
339
|
-
}, [
|
|
339
|
+
}, [d("ul", {
|
|
340
340
|
class: n.value,
|
|
341
|
-
style:
|
|
341
|
+
style: f.value
|
|
342
342
|
}, [M()])]);
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
345
|
function he(t, e, o) {
|
|
346
346
|
var M;
|
|
347
|
-
function
|
|
347
|
+
function c() {
|
|
348
348
|
}
|
|
349
|
-
const
|
|
350
|
-
function
|
|
349
|
+
const u = "", y = "", g = m();
|
|
350
|
+
function k() {
|
|
351
351
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
352
352
|
}
|
|
353
353
|
function b() {
|
|
@@ -356,20 +356,20 @@ function he(t, e, o) {
|
|
|
356
356
|
function n() {
|
|
357
357
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function f() {
|
|
360
360
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function p(r) {
|
|
363
363
|
if (!r || !r.value)
|
|
364
364
|
return null;
|
|
365
365
|
if (r.value.schema && r.value.schema.type === "component")
|
|
366
366
|
return r.value;
|
|
367
|
-
const s = m(r == null ? void 0 : r.value.parent), i =
|
|
367
|
+
const s = m(r == null ? void 0 : r.value.parent), i = p(s);
|
|
368
368
|
return i || null;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function v(r = e) {
|
|
371
371
|
const { componentInstance: s, designerItemElementRef: i } = r;
|
|
372
|
-
return !s || !s.value ? null : s.value.canMove ? i :
|
|
372
|
+
return !s || !s.value ? null : s.value.canMove ? i : v(r.parent);
|
|
373
373
|
}
|
|
374
374
|
function O(r) {
|
|
375
375
|
return !!o;
|
|
@@ -381,15 +381,15 @@ function he(t, e, o) {
|
|
|
381
381
|
}
|
|
382
382
|
function E(r, s) {
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function S(r) {
|
|
385
385
|
const { componentType: s } = r;
|
|
386
386
|
let i = B(s, r);
|
|
387
|
-
const
|
|
388
|
-
return i && !i.id && i.type === s && (i.id = `${
|
|
387
|
+
const l = s.toLowerCase().replace("-", "_");
|
|
388
|
+
return i && !i.id && i.type === s && (i.id = `${l}_${Math.random().toString().slice(2, 6)}`), i;
|
|
389
389
|
}
|
|
390
390
|
function P(r, s) {
|
|
391
|
-
const i = String(r.getAttribute("data-controltype")),
|
|
392
|
-
a.parentComponentInstance =
|
|
391
|
+
const i = String(r.getAttribute("data-controltype")), l = r.getAttribute("data-feature"), a = l ? JSON.parse(l) : {};
|
|
392
|
+
a.parentComponentInstance = g.value;
|
|
393
393
|
let h = B(i, a);
|
|
394
394
|
const D = i.toLowerCase().replace("-", "_");
|
|
395
395
|
return h && !h.id && h.type === i && (h.id = `${D}_${Math.random().toString().slice(2, 6)}`), h;
|
|
@@ -398,133 +398,133 @@ function he(t, e, o) {
|
|
|
398
398
|
}
|
|
399
399
|
function $(...r) {
|
|
400
400
|
}
|
|
401
|
-
return
|
|
402
|
-
canMove:
|
|
401
|
+
return g.value = {
|
|
402
|
+
canMove: k(),
|
|
403
403
|
canSelectParent: b(),
|
|
404
404
|
canDelete: n(),
|
|
405
|
-
canNested: !
|
|
405
|
+
canNested: !f(),
|
|
406
406
|
contents: e == null ? void 0 : e.schema.contents,
|
|
407
407
|
elementRef: t,
|
|
408
408
|
parent: (M = e == null ? void 0 : e.parent) == null ? void 0 : M.componentInstance,
|
|
409
409
|
schema: e == null ? void 0 : e.schema,
|
|
410
|
-
styles:
|
|
411
|
-
designerClass:
|
|
410
|
+
styles: u,
|
|
411
|
+
designerClass: y,
|
|
412
412
|
canAccepts: O,
|
|
413
|
-
getBelongedComponentInstance:
|
|
414
|
-
getDraggableDesignItemElement:
|
|
413
|
+
getBelongedComponentInstance: p,
|
|
414
|
+
getDraggableDesignItemElement: v,
|
|
415
415
|
getDraggingDisplayText: j,
|
|
416
416
|
getPropConfig: $,
|
|
417
417
|
getDragScopeElement: w,
|
|
418
418
|
onAcceptMovedChildElement: E,
|
|
419
419
|
onAcceptNewChildElement: P,
|
|
420
420
|
onChildElementMovedOut: T,
|
|
421
|
-
addNewChildComponentSchema:
|
|
422
|
-
updateDragAndDropRules:
|
|
421
|
+
addNewChildComponentSchema: S,
|
|
422
|
+
updateDragAndDropRules: c,
|
|
423
423
|
triggerBelongedComponentToMoveWhenMoved: m(!1),
|
|
424
424
|
triggerBelongedComponentToDeleteWhenDeleted: m(!1)
|
|
425
|
-
},
|
|
425
|
+
}, g;
|
|
426
426
|
}
|
|
427
|
-
const
|
|
427
|
+
const ge = /* @__PURE__ */ F({
|
|
428
428
|
name: "FStepDesign",
|
|
429
429
|
props: V,
|
|
430
430
|
emits: [],
|
|
431
431
|
setup(t, e) {
|
|
432
|
-
const o = m(t.direction),
|
|
432
|
+
const o = m(t.direction), c = m(t.fill), u = m(t.height), y = m(t.steps), g = m(0), k = m(t.clickable), b = m(0), n = m(), f = W("design-item-context"), p = he(n, f);
|
|
433
433
|
J(() => {
|
|
434
|
-
n.value.componentInstance =
|
|
435
|
-
}), e.expose(
|
|
436
|
-
const
|
|
434
|
+
n.value.componentInstance = p;
|
|
435
|
+
}), e.expose(p.value);
|
|
436
|
+
const v = N(() => ({
|
|
437
437
|
"f-progress-step-list": o.value === "horizontal",
|
|
438
438
|
"f-progress-step-list-block": o.value === "vertical",
|
|
439
|
-
"f-progress-step-horizontal-fill": o.value === "horizontal" &&
|
|
440
|
-
"f-progress-step-vertical-fill": o.value === "vertical" &&
|
|
439
|
+
"f-progress-step-horizontal-fill": o.value === "horizontal" && c.value,
|
|
440
|
+
"f-progress-step-vertical-fill": o.value === "vertical" && c.value
|
|
441
441
|
})), O = N(() => ({
|
|
442
|
-
height: o.value === "vertical" ? `${
|
|
442
|
+
height: o.value === "vertical" ? `${u.value}px` : ""
|
|
443
443
|
}));
|
|
444
|
-
function j(
|
|
444
|
+
function j(l, a) {
|
|
445
445
|
const h = {
|
|
446
446
|
step: !0,
|
|
447
|
-
active: a ===
|
|
448
|
-
clickable:
|
|
449
|
-
"click-disable":
|
|
450
|
-
current: a ===
|
|
447
|
+
active: a === g.value,
|
|
448
|
+
clickable: k.value,
|
|
449
|
+
"click-disable": l.disable,
|
|
450
|
+
current: a === g.value
|
|
451
451
|
};
|
|
452
|
-
return a <
|
|
452
|
+
return a < g.value && (h.finish = !0), l.status && (h[l.status] = !0), l.hasOwnProperty("class") && l.class.split(" ").reduce((D, R) => (D[R] = !0, D), h), h;
|
|
453
453
|
}
|
|
454
|
-
function w(
|
|
454
|
+
function w(l, a) {
|
|
455
455
|
}
|
|
456
|
-
function E(
|
|
456
|
+
function E(l, a) {
|
|
457
457
|
const h = {
|
|
458
458
|
"f-progressstep-row": !0,
|
|
459
|
-
"step-active": a ===
|
|
460
|
-
"step-current": a ===
|
|
459
|
+
"step-active": a === g.value,
|
|
460
|
+
"step-current": a === g.value
|
|
461
461
|
};
|
|
462
|
-
return a <
|
|
462
|
+
return a < g.value && (h["step-finish"] = !0), l.status && (h["step-" + l.status] = !0), h;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function S(l, a) {
|
|
465
465
|
const h = {
|
|
466
466
|
"step-icon": !0,
|
|
467
467
|
"step-success": a,
|
|
468
468
|
"k-icon": a,
|
|
469
469
|
"k-i-check": a
|
|
470
470
|
};
|
|
471
|
-
return
|
|
471
|
+
return l.hasOwnProperty("icon") && l.class.split(" ").reduce((D, R) => (D[R] = !0, D), h), h;
|
|
472
472
|
}
|
|
473
|
-
function P(
|
|
473
|
+
function P(l, a) {
|
|
474
474
|
const h = [];
|
|
475
|
-
return
|
|
476
|
-
class:
|
|
477
|
-
}, null)) : a >=
|
|
475
|
+
return l.icon ? h.push(d("span", {
|
|
476
|
+
class: S(l, !1)
|
|
477
|
+
}, null)) : a >= g.value || a === b.value ? h.push(d("span", {
|
|
478
478
|
class: "step-icon"
|
|
479
|
-
}, [a + 1])) : h.push(
|
|
480
|
-
class:
|
|
479
|
+
}, [a + 1])) : h.push(d("span", {
|
|
480
|
+
class: S(l, !0)
|
|
481
481
|
}, null)), h;
|
|
482
482
|
}
|
|
483
|
-
function T(
|
|
483
|
+
function T(l, a) {
|
|
484
484
|
return {
|
|
485
485
|
"step-name": !0,
|
|
486
|
-
"step-name-success": a <
|
|
486
|
+
"step-name-success": a < g.value
|
|
487
487
|
};
|
|
488
488
|
}
|
|
489
|
-
function $(
|
|
490
|
-
return
|
|
489
|
+
function $(l, a) {
|
|
490
|
+
return d("div", {
|
|
491
491
|
class: "f-progress-step-title"
|
|
492
|
-
}, [
|
|
493
|
-
class: T(
|
|
494
|
-
}, [
|
|
492
|
+
}, [d("p", {
|
|
493
|
+
class: T(l, a)
|
|
494
|
+
}, [l.title])]);
|
|
495
495
|
}
|
|
496
|
-
function M(
|
|
496
|
+
function M(l, a) {
|
|
497
497
|
return {
|
|
498
498
|
"f-progress-step-line": !0,
|
|
499
|
-
"f-progress-step-line-success": a ===
|
|
499
|
+
"f-progress-step-line-success": a === g.value
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
function r(
|
|
503
|
-
return a !==
|
|
502
|
+
function r(l, a) {
|
|
503
|
+
return a !== y.value.length - 1;
|
|
504
504
|
}
|
|
505
505
|
const s = N(() => ({
|
|
506
506
|
triangle: !0,
|
|
507
507
|
"": o.value === "vertical"
|
|
508
508
|
}));
|
|
509
509
|
function i() {
|
|
510
|
-
return
|
|
511
|
-
class: j(
|
|
510
|
+
return y.value.map((l, a) => d("li", {
|
|
511
|
+
class: j(l, a),
|
|
512
512
|
onClick: (h) => void 0
|
|
513
|
-
}, [
|
|
514
|
-
class: E(
|
|
515
|
-
}, [
|
|
513
|
+
}, [d("div", {
|
|
514
|
+
class: E(l, a)
|
|
515
|
+
}, [d("div", {
|
|
516
516
|
class: "f-progress-step-content"
|
|
517
|
-
}, [P(
|
|
518
|
-
class: M(
|
|
519
|
-
}, [
|
|
517
|
+
}, [P(l, a), $(l, a)]), r(l, a) && d("div", {
|
|
518
|
+
class: M(l, a)
|
|
519
|
+
}, [d("span", {
|
|
520
520
|
class: s.value
|
|
521
521
|
}, null)])])]));
|
|
522
522
|
}
|
|
523
|
-
return () =>
|
|
523
|
+
return () => d("div", {
|
|
524
524
|
ref: n,
|
|
525
525
|
class: "f-progress-step"
|
|
526
|
-
}, [
|
|
527
|
-
class:
|
|
526
|
+
}, [d("ul", {
|
|
527
|
+
class: v.value,
|
|
528
528
|
style: O.value
|
|
529
529
|
}, [i()])]);
|
|
530
530
|
}
|
|
@@ -532,11 +532,11 @@ const de = /* @__PURE__ */ F({
|
|
|
532
532
|
install(t) {
|
|
533
533
|
t.component(A.name, A);
|
|
534
534
|
},
|
|
535
|
-
register(t, e, o,
|
|
535
|
+
register(t, e, o, c) {
|
|
536
536
|
t.step = A, e.step = z;
|
|
537
537
|
},
|
|
538
538
|
registerDesigner(t, e, o) {
|
|
539
|
-
t.step =
|
|
539
|
+
t.step = ge, e.step = z;
|
|
540
540
|
}
|
|
541
541
|
};
|
|
542
542
|
export {
|