@farris/ui-vue 1.8.0-alpha.0 → 1.8.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +138 -1526
- package/components/avatar/index.umd.cjs +1 -6
- package/components/button/index.css +1 -1
- package/components/button/index.esm.js +15951 -15410
- package/components/button/index.umd.cjs +27 -27
- package/components/calendar/index.esm.js +269 -255
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +243 -229
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +32 -32
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +473 -456
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2503 -2239
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +1064 -954
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +1 -1
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +3894 -3058
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +91 -77
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +220 -215
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +145 -131
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +336 -329
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1611 -1536
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +219 -219
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/external-container/index.esm.js +179 -178
- package/components/external-container/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +285 -221
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -0
- package/components/filter-bar/index.esm.js +1512 -1290
- package/components/filter-bar/index.umd.cjs +7 -7
- package/components/filter-condition-editor/index.esm.js +851 -831
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +520 -501
- package/components/flow-canvas/index.umd.cjs +8 -8
- package/components/image/index.esm.js +101 -79
- package/components/image/index.umd.cjs +3 -3
- package/components/language-textbox/index.esm.js +330 -251
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-nav/index.esm.js +399 -313
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/locale/index.esm.js +3 -0
- package/components/locale/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +997 -976
- package/components/lookup/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +725 -705
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +542 -522
- package/components/message-box/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +95 -308
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +115 -107
- package/components/number-range/index.umd.cjs +2 -2
- package/components/order/index.esm.js +56 -54
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +135 -123
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +266 -222
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +402 -375
- package/components/property-panel/index.umd.cjs +4 -4
- package/components/query-solution/index.esm.js +3171 -3061
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1620 -1608
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/scroll-navbar/index.esm.js +150 -136
- package/components/scroll-navbar/index.umd.cjs +2 -2
- package/components/section/index.esm.js +323 -311
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +850 -830
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/step/index.esm.js +991 -224
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +356 -334
- package/components/tabs/index.umd.cjs +1 -1
- package/components/wizard/index.esm.js +159 -162
- package/components/wizard/index.umd.cjs +1 -1
- package/designer/avatar/index.esm.js +1721 -0
- package/designer/avatar/index.umd.cjs +6 -0
- package/designer/button-edit/index.esm.js +2 -1
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +693 -659
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +90 -78
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +203 -203
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.esm.js +181 -167
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +228 -206
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +10014 -9692
- package/designer/farris-designer.all.umd.cjs +18 -18
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +15 -15
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +1719 -0
- package/designer/nav/index.umd.cjs +6 -0
- package/designer/number-spinner/index.esm.js +8 -7
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +133 -125
- package/designer/radio-group/index.umd.cjs +2 -2
- package/designer/response-toolbar/index.esm.js +864 -863
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +245 -183
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +3667 -2810
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +26 -17
- package/designer/time-picker/index.umd.cjs +2 -2
- package/designer/tree-grid/index.esm.js +69 -37
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/wizard/index.esm.js +110 -110
- package/designer/wizard/index.umd.cjs +3 -3
- package/farris.all.esm.js +39993 -39089
- package/farris.all.umd.cjs +36 -36
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +1 -0
- package/locales/filter-bar/ui/zh-CHS.json +1 -0
- package/locales/filter-bar/ui/zh-CHT.json +1 -0
- package/locales/ui/en.json +1 -0
- package/locales/ui/zh-CHS.json +1 -0
- package/locales/ui/zh-CHT.json +1 -0
- package/package.json +1 -1
- package/types/avatar/designer.d.ts +28 -0
- package/types/avatar/index.d.ts +0 -15
- package/types/avatar/src/composition/types.d.ts +3 -0
- package/types/avatar/src/composition/use-file.d.ts +19 -0
- package/types/avatar/src/composition/use-image.d.ts +1 -1
- package/types/avatar/src/designer/avatar.design.props.d.ts +24 -0
- package/types/avatar/src/property-config/avatar.property-config.d.ts +11 -13
- package/types/avatar/src/schema/schema-mapper.d.ts +2 -0
- package/types/components.d.ts +3 -0
- package/types/condition/index.d.ts +18 -6
- package/types/condition/src/condition-fields.component.d.ts +9 -3
- package/types/condition/src/condition-fields.design.component.d.ts +9 -3
- package/types/condition/src/condition-list.component.d.ts +9 -3
- package/types/condition/src/condition.props.d.ts +11 -0
- package/types/data-view/designer/property-config/use-appearance.d.ts +17 -10
- package/types/data-view/designer/property-config/use-pagination.d.ts +0 -6
- package/types/designer-canvas/src/composition/dg-control.d.ts +13 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -0
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.props.d.ts +4 -0
- package/types/dynamic-resolver/src/converter/tree-auto-check.converter.d.ts +3 -0
- package/types/dynamic-view/src/components/maps.d.ts +130 -4
- package/types/filter-bar/src/composition/types.d.ts +2 -0
- package/types/filter-bar/src/filter-bar.props.d.ts +0 -1
- package/types/filter-bar/src/locale/locale.d.ts +2 -1
- package/types/filter-bar/src/property-config/filter-bar.property-config.d.ts +0 -1
- package/types/language-textbox/index.d.ts +65 -2
- package/types/language-textbox/src/designer/language-textbox.design.component.d.ts +36 -0
- package/types/language-textbox/src/language-textbox.component.d.ts +38 -1
- package/types/language-textbox/src/language-textbox.props.d.ts +20 -0
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/lookup/src/composition/use-compat.d.ts +28 -0
- package/types/lookup/src/composition/use-state.d.ts +1 -0
- package/types/message-box/src/message-box.service.d.ts +2 -1
- package/types/nav/designer.d.ts +28 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/designer/nav.design.props.d.ts +29 -0
- package/types/nav/src/designer/use-design-rules.d.ts +3 -0
- package/types/nav/src/property-config/nav.property-config.d.ts +9 -0
- package/types/nav/src/schema/schema-mapper.d.ts +4 -0
- package/types/page-footer/src/designer/use-designer-rules.d.ts +2 -2
- package/types/page-header/src/designer/use-designer-rules.d.ts +2 -2
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -1
- package/types/section/src/designer/section.design.props.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +39 -0
- package/types/section/src/schema/toolbar-resolver.d.ts +0 -1
- package/types/step/src/designer/use-designer-rules.d.ts +3 -0
- package/types/step/src/designer/use-step-creator.d.ts +6 -0
- package/types/step/src/property-config/step.property-config.d.ts +15 -0
- package/types/step/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +4 -0
- package/types/tabs/src/tabs.props.d.ts +6 -0
- package/types/tooltip/index.d.ts +3 -3
- package/types/tooltip/src/tooltip.component.d.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as N, computed as B, defineComponent as V, provide as U, onMounted as fe, createVNode as
|
|
1
|
+
import { ref as N, computed as B, defineComponent as V, provide as U, onMounted as fe, createVNode as h, createTextVNode as R, inject as W, watch as me } from "vue";
|
|
2
2
|
import { FButtonEdit as pe } from "../button-edit/index.esm.js";
|
|
3
3
|
import { isPlainObject as G, cloneDeep as $ } from "lodash-es";
|
|
4
4
|
import { FPropertyPanel as ve } from "../property-panel/index.esm.js";
|
|
@@ -6,133 +6,133 @@ import { FTreeView as ge } from "../tree-view/index.esm.js";
|
|
|
6
6
|
import { FMessageBoxService as be } from "../message-box/index.esm.js";
|
|
7
7
|
function J(e, t) {
|
|
8
8
|
let n;
|
|
9
|
-
function a(
|
|
10
|
-
const { properties: l, title:
|
|
11
|
-
if (
|
|
12
|
-
const
|
|
13
|
-
|
|
9
|
+
function a(o) {
|
|
10
|
+
const { properties: l, title: c, ignore: r } = o, i = r && Array.isArray(r), u = Object.keys(l).reduce((g, y) => ((!i || !r.find((w) => w === y)) && (g[y] = l[y].type === "object" && l[y].properties ? a(l[y]) : $(l[y].default)), g), {});
|
|
11
|
+
if (c && (!i || !r.find((g) => g === "id"))) {
|
|
12
|
+
const g = c.toLowerCase().replace(/-/g, "_");
|
|
13
|
+
u.id = `${g}_${Math.random().toString().slice(2, 6)}`;
|
|
14
14
|
}
|
|
15
|
-
return
|
|
16
|
-
}
|
|
17
|
-
function
|
|
18
|
-
const { properties: l, title:
|
|
19
|
-
if (
|
|
20
|
-
const i =
|
|
21
|
-
if (
|
|
22
|
-
const
|
|
23
|
-
i.id = `${
|
|
15
|
+
return u;
|
|
16
|
+
}
|
|
17
|
+
function p(o) {
|
|
18
|
+
const { properties: l, title: c, required: r } = o;
|
|
19
|
+
if (r && Array.isArray(r)) {
|
|
20
|
+
const i = r.reduce((u, g) => (u[g] = l[g].type === "object" && l[g].properties ? a(l[g]) : $(l[g].default), u), {});
|
|
21
|
+
if (c && r.find((u) => u === "id")) {
|
|
22
|
+
const u = c.toLowerCase().replace(/-/g, "_");
|
|
23
|
+
i.id = `${u}_${Math.random().toString().slice(2, 6)}`;
|
|
24
24
|
}
|
|
25
25
|
return i;
|
|
26
26
|
}
|
|
27
27
|
return {
|
|
28
|
-
type:
|
|
28
|
+
type: c
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function b(
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
let i =
|
|
35
|
-
const
|
|
36
|
-
return i =
|
|
31
|
+
function b(o, l = {}, c) {
|
|
32
|
+
const r = e[o];
|
|
33
|
+
if (r) {
|
|
34
|
+
let i = p(r);
|
|
35
|
+
const u = t[o];
|
|
36
|
+
return i = u ? u({ getSchemaByType: b }, i, l, c) : i, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(i), i;
|
|
37
37
|
}
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
-
function S(
|
|
41
|
-
const
|
|
42
|
-
return Object.keys(
|
|
40
|
+
function S(o, l) {
|
|
41
|
+
const c = a(l);
|
|
42
|
+
return Object.keys(c).reduce((r, i) => (Object.prototype.hasOwnProperty.call(o, i) && (r[i] && G(r[i]) && G(o[i] || !o[i]) ? Object.assign(r[i], o[i] || {}) : r[i] = o[i]), r), c), c;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return Object.keys(
|
|
44
|
+
function x(o, l) {
|
|
45
|
+
return Object.keys(o).filter((r) => o[r] != null).reduce((r, i) => {
|
|
46
46
|
if (l.has(i)) {
|
|
47
|
-
const
|
|
48
|
-
if (typeof
|
|
49
|
-
|
|
47
|
+
const u = l.get(i);
|
|
48
|
+
if (typeof u == "string")
|
|
49
|
+
r[u] = o[i];
|
|
50
50
|
else {
|
|
51
|
-
const
|
|
52
|
-
Object.assign(
|
|
51
|
+
const g = u(i, o[i], o);
|
|
52
|
+
Object.assign(r, g);
|
|
53
53
|
}
|
|
54
54
|
} else
|
|
55
|
-
|
|
56
|
-
return
|
|
55
|
+
r[i] = o[i];
|
|
56
|
+
return r;
|
|
57
57
|
}, {});
|
|
58
58
|
}
|
|
59
|
-
function f(
|
|
60
|
-
const
|
|
61
|
-
return
|
|
59
|
+
function f(o, l, c = /* @__PURE__ */ new Map()) {
|
|
60
|
+
const r = S(o, l);
|
|
61
|
+
return x(r, c);
|
|
62
62
|
}
|
|
63
|
-
function d(
|
|
64
|
-
var
|
|
65
|
-
const l =
|
|
63
|
+
function d(o) {
|
|
64
|
+
var c;
|
|
65
|
+
const l = o.type;
|
|
66
66
|
if (l) {
|
|
67
|
-
const
|
|
68
|
-
if (!
|
|
69
|
-
return
|
|
70
|
-
const i = S(
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
67
|
+
const r = e[l];
|
|
68
|
+
if (!r)
|
|
69
|
+
return o;
|
|
70
|
+
const i = S(o, r), u = ((c = o.editor) == null ? void 0 : c.type) || "";
|
|
71
|
+
if (u) {
|
|
72
|
+
const g = e[u], y = S(o.editor, g);
|
|
73
73
|
i.editor = y;
|
|
74
74
|
}
|
|
75
75
|
return i;
|
|
76
76
|
}
|
|
77
|
-
return
|
|
77
|
+
return o;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
n =
|
|
79
|
+
function v(o) {
|
|
80
|
+
n = o;
|
|
81
81
|
}
|
|
82
|
-
return { getSchemaByType: b, resolveSchemaWithDefaultValue: d, resolveSchemaToProps: f, mappingSchemaToProps:
|
|
82
|
+
return { getSchemaByType: b, resolveSchemaWithDefaultValue: d, resolveSchemaToProps: f, mappingSchemaToProps: x, setDesignerContext: v };
|
|
83
83
|
}
|
|
84
84
|
const Q = {}, X = {}, { resolveSchemaWithDefaultValue: ye, resolveSchemaToProps: Ce, mappingSchemaToProps: Se } = J(Q, X);
|
|
85
85
|
function Te(e = {}) {
|
|
86
|
-
function t(d,
|
|
87
|
-
if (typeof
|
|
88
|
-
return l[d].length ===
|
|
89
|
-
if (typeof
|
|
90
|
-
const
|
|
91
|
-
if (
|
|
92
|
-
return Number(l[d].length) !== Number(
|
|
93
|
-
if (
|
|
94
|
-
return Number(l[d].length) >= Number(
|
|
95
|
-
if (
|
|
96
|
-
return Number(l[d].length) <= Number(
|
|
86
|
+
function t(d, v, o, l) {
|
|
87
|
+
if (typeof o == "number")
|
|
88
|
+
return l[d].length === o;
|
|
89
|
+
if (typeof o == "object") {
|
|
90
|
+
const c = Object.keys(o)[0], r = o[c];
|
|
91
|
+
if (c === "not")
|
|
92
|
+
return Number(l[d].length) !== Number(r);
|
|
93
|
+
if (c === "moreThan")
|
|
94
|
+
return Number(l[d].length) >= Number(r);
|
|
95
|
+
if (c === "lessThan")
|
|
96
|
+
return Number(l[d].length) <= Number(r);
|
|
97
97
|
}
|
|
98
98
|
return !1;
|
|
99
99
|
}
|
|
100
|
-
function n(d,
|
|
101
|
-
return l[d] && l[d].propertyValue && String(l[d].propertyValue.value) === String(
|
|
100
|
+
function n(d, v, o, l) {
|
|
101
|
+
return l[d] && l[d].propertyValue && String(l[d].propertyValue.value) === String(o);
|
|
102
102
|
}
|
|
103
103
|
const a = /* @__PURE__ */ new Map([
|
|
104
104
|
["length", t],
|
|
105
105
|
["getProperty", n]
|
|
106
106
|
]);
|
|
107
|
-
Object.keys(e).reduce((d,
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
return typeof
|
|
107
|
+
Object.keys(e).reduce((d, v) => (d.set(v, e[v]), d), a);
|
|
108
|
+
function p(d, v) {
|
|
109
|
+
const o = d;
|
|
110
|
+
return typeof v == "number" ? [{ target: o, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: o, operator: "getProperty", param: d, value: !!v }] : typeof v == "object" ? Object.keys(v).map((l) => {
|
|
111
111
|
if (l === "length")
|
|
112
|
-
return { target:
|
|
113
|
-
const
|
|
114
|
-
return { target:
|
|
112
|
+
return { target: o, operator: "length", param: null, value: v[l] };
|
|
113
|
+
const c = l, r = v[l];
|
|
114
|
+
return { target: o, operator: "getProperty", param: c, value: r };
|
|
115
115
|
}) : [];
|
|
116
116
|
}
|
|
117
117
|
function b(d) {
|
|
118
|
-
return Object.keys(d).reduce((
|
|
119
|
-
const
|
|
120
|
-
return
|
|
118
|
+
return Object.keys(d).reduce((o, l) => {
|
|
119
|
+
const c = p(l, d[l]);
|
|
120
|
+
return o.push(...c), o;
|
|
121
121
|
}, []);
|
|
122
122
|
}
|
|
123
|
-
function S(d,
|
|
123
|
+
function S(d, v) {
|
|
124
124
|
if (a.has(d.operator)) {
|
|
125
|
-
const
|
|
126
|
-
return
|
|
125
|
+
const o = a.get(d.operator);
|
|
126
|
+
return o && o(d.target, d.param, d.value, v) || !1;
|
|
127
127
|
}
|
|
128
128
|
return !1;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return b(d).reduce((
|
|
130
|
+
function x(d, v) {
|
|
131
|
+
return b(d).reduce((c, r) => c && S(r, v), !0);
|
|
132
132
|
}
|
|
133
|
-
function f(d,
|
|
134
|
-
const
|
|
135
|
-
return l ? !
|
|
133
|
+
function f(d, v) {
|
|
134
|
+
const o = Object.keys(d), l = o.includes("allOf"), c = o.includes("anyOf"), r = l || c, g = (r ? d[r ? l ? "allOf" : "anyOf" : "allOf"] : [d]).map((w) => x(w, v));
|
|
135
|
+
return l ? !g.includes(!1) : g.includes(!0);
|
|
136
136
|
}
|
|
137
137
|
return { parseValueSchema: f };
|
|
138
138
|
}
|
|
@@ -141,14 +141,14 @@ const Fe = {
|
|
|
141
141
|
e.appearance || (e.appearance = {}), e.appearance[t] = n;
|
|
142
142
|
},
|
|
143
143
|
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
|
|
144
|
-
},
|
|
144
|
+
}, he = {
|
|
145
145
|
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
146
|
-
},
|
|
146
|
+
}, we = {
|
|
147
147
|
convertTo: (e, t, n, a) => {
|
|
148
148
|
e.editor && (e.editor[t] = n);
|
|
149
149
|
},
|
|
150
150
|
convertFrom: (e, t, n) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
151
|
-
},
|
|
151
|
+
}, xe = {
|
|
152
152
|
button: { type: "button", name: "按钮" },
|
|
153
153
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
154
154
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -194,10 +194,12 @@ const Fe = {
|
|
|
194
194
|
drawer: { type: "drawer", name: "抽屉" },
|
|
195
195
|
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
196
196
|
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
197
|
+
nav: { type: "nav", name: "标签类导航" },
|
|
197
198
|
"list-view": { type: "list-view", name: "列表" },
|
|
198
199
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
199
200
|
"language-textbox": { type: "language-textbox", name: "多语输入框" },
|
|
200
201
|
image: { type: "image", name: "图像" },
|
|
202
|
+
avatar: { type: "avatar", name: "头像" },
|
|
201
203
|
"discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
|
|
202
204
|
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
203
205
|
comment: { type: "comment", name: "评论区" },
|
|
@@ -205,12 +207,13 @@ const Fe = {
|
|
|
205
207
|
calendar: { type: "calendar", name: "日历", icon: "date-picker" },
|
|
206
208
|
wizard: { type: "wizard", name: "向导", icon: "wizard" },
|
|
207
209
|
"wizard-page": { type: "wizard-page", name: "向导页", icon: "wizard" },
|
|
208
|
-
"wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" }
|
|
210
|
+
"wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" },
|
|
211
|
+
step: { type: "step", name: "步骤条", icon: "step" }
|
|
209
212
|
}, Oe = {
|
|
210
213
|
convertFrom: (e, t, n) => {
|
|
211
|
-
var
|
|
214
|
+
var p;
|
|
212
215
|
const a = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
213
|
-
return ((
|
|
216
|
+
return ((p = xe[a]) == null ? void 0 : p.name) || a;
|
|
214
217
|
}
|
|
215
218
|
}, Pe = {
|
|
216
219
|
convertTo: (e, t, n, a) => {
|
|
@@ -296,10 +299,10 @@ const Fe = {
|
|
|
296
299
|
]), t === "enableType" && n === "unable" && (e.command.enable = !1);
|
|
297
300
|
},
|
|
298
301
|
convertFrom: (e, t, n) => {
|
|
299
|
-
var a,
|
|
302
|
+
var a, p;
|
|
300
303
|
if (e.command) {
|
|
301
304
|
if (t === "enableType") {
|
|
302
|
-
const b = (
|
|
305
|
+
const b = (p = (a = e.command) == null ? void 0 : a.commands) == null ? void 0 : p.find((S) => S.command === "edit" && S.type === "primary");
|
|
303
306
|
return e.command.enable ? b ? "default" : "custom" : "unable";
|
|
304
307
|
}
|
|
305
308
|
if (t === "commands")
|
|
@@ -380,8 +383,8 @@ const Fe = {
|
|
|
380
383
|
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
381
384
|
},
|
|
382
385
|
convertFrom: (e, t, n) => {
|
|
383
|
-
var a,
|
|
384
|
-
return t === "showCheckbox" ? (a = e.selection) != null && a.multiSelect ? !0 : (
|
|
386
|
+
var a, p;
|
|
387
|
+
return t === "showCheckbox" ? (a = e.selection) != null && a.multiSelect ? !0 : (p = e.selection) == null ? void 0 : p.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
385
388
|
}
|
|
386
389
|
}, Re = {
|
|
387
390
|
convertFrom: (e, t, n) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
@@ -397,19 +400,19 @@ const Fe = {
|
|
|
397
400
|
convertFrom: (e, t, n) => e.size ? e.size[t] : e[t]
|
|
398
401
|
}, He = {
|
|
399
402
|
convertFrom: (e, t, n) => {
|
|
400
|
-
var a,
|
|
401
|
-
return (a = e.formatter) != null && a.data && t === "formatterEnumData" && !e.formatterEnumData ? (
|
|
403
|
+
var a, p;
|
|
404
|
+
return (a = e.formatter) != null && a.data && t === "formatterEnumData" && !e.formatterEnumData ? (p = e.formatter) == null ? void 0 : p.data : e.formatterEnumData;
|
|
402
405
|
}
|
|
403
406
|
}, Ie = {
|
|
404
407
|
convertTo: (e, t, n, a) => {
|
|
405
408
|
e.sort || (e.sort = {}), e.sort[t] = n;
|
|
406
409
|
},
|
|
407
410
|
convertFrom: (e, t, n) => {
|
|
408
|
-
var a,
|
|
411
|
+
var a, p;
|
|
409
412
|
if (t === "mode")
|
|
410
413
|
return ((a = e.sort) == null ? void 0 : a.mode) || "client";
|
|
411
414
|
if (t === "multiSort")
|
|
412
|
-
return !!((
|
|
415
|
+
return !!((p = e.sort) != null && p.multiSort);
|
|
413
416
|
}
|
|
414
417
|
}, qe = {
|
|
415
418
|
convertTo: (e, t, n, a) => {
|
|
@@ -449,12 +452,22 @@ const Fe = {
|
|
|
449
452
|
</span>`), t === "columnTemplateType" && n === "default" && (e.columnTemplate = ""), t === "columnTemplateType" && n === "custom" && (e.columnTemplate = ""));
|
|
450
453
|
},
|
|
451
454
|
convertFrom: (e, t, n) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
455
|
+
}, We = {
|
|
456
|
+
convertTo: (e, t, n, a) => {
|
|
457
|
+
e.hierarchy || (e.hierarchy = {
|
|
458
|
+
cascadeOption: {}
|
|
459
|
+
}), e.hierarchy.cascadeOption || (e.hierarchy.cascadeOption = {}), e.hierarchy.cascadeOption[t] = n;
|
|
460
|
+
},
|
|
461
|
+
convertFrom: (e, t, n) => {
|
|
462
|
+
var a, p;
|
|
463
|
+
return !!((p = (a = e.hierarchy) == null ? void 0 : a.cascadeOption) != null && p[t]);
|
|
464
|
+
}
|
|
452
465
|
};
|
|
453
466
|
function Y(e, t, n) {
|
|
454
467
|
const a = /* @__PURE__ */ new Map([
|
|
455
468
|
["/converter/appearance.converter", Fe],
|
|
456
|
-
["/converter/buttons.converter",
|
|
457
|
-
["/converter/property-editor.converter",
|
|
469
|
+
["/converter/buttons.converter", he],
|
|
470
|
+
["/converter/property-editor.converter", we],
|
|
458
471
|
["/converter/items-count.converter", Re],
|
|
459
472
|
["/converter/type.converter", Oe],
|
|
460
473
|
["/converter/change-editor.converter", Pe],
|
|
@@ -473,8 +486,9 @@ function Y(e, t, n) {
|
|
|
473
486
|
["/converter/grid-sort.converter", Ie],
|
|
474
487
|
["/converter/grid-filter.converter", qe],
|
|
475
488
|
["/converter/row-option.converter", _e],
|
|
476
|
-
["/converter/change-formatter-type.converter", Ue]
|
|
477
|
-
|
|
489
|
+
["/converter/change-formatter-type.converter", Ue],
|
|
490
|
+
["/converter/tree-auto-check.converter", We]
|
|
491
|
+
]), p = /* @__PURE__ */ new Map([
|
|
478
492
|
["string", { type: "input-group", enableClear: !1 }],
|
|
479
493
|
["boolean", {
|
|
480
494
|
type: "combo-list",
|
|
@@ -499,97 +513,97 @@ function Y(e, t, n) {
|
|
|
499
513
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
500
514
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
501
515
|
]), b = Te();
|
|
502
|
-
function S(
|
|
503
|
-
return () => b.parseValueSchema(
|
|
516
|
+
function S(r, i) {
|
|
517
|
+
return () => b.parseValueSchema(r, i);
|
|
504
518
|
}
|
|
505
|
-
function
|
|
506
|
-
return
|
|
519
|
+
function x(r, i, u) {
|
|
520
|
+
return r.includes("visible") && i.visible !== void 0 ? typeof i.visible == "boolean" ? () => !!i.visible : i.visible === void 0 ? !0 : S(i.visible, u) : () => !0;
|
|
507
521
|
}
|
|
508
|
-
function f(
|
|
509
|
-
return
|
|
522
|
+
function f(r, i, u) {
|
|
523
|
+
return r.includes("readonly") && i.readonly !== void 0 ? typeof i.readonly == "boolean" ? () => !!i.readonly : S(i.readonly, u) : () => !1;
|
|
510
524
|
}
|
|
511
|
-
function d(
|
|
512
|
-
const
|
|
513
|
-
return typeof
|
|
525
|
+
function d(r, i) {
|
|
526
|
+
const u = r.$converter || i;
|
|
527
|
+
return typeof u == "string" && u && a.has(u) ? a.get(u) || null : u || null;
|
|
514
528
|
}
|
|
515
|
-
function
|
|
516
|
-
return Object.keys(
|
|
517
|
-
const E = N(1), k = T, C =
|
|
529
|
+
function v(r, i, u, g, y, w = "", P = "") {
|
|
530
|
+
return Object.keys(r).map((T) => {
|
|
531
|
+
const E = N(1), k = T, C = r[T], m = Object.keys(C), z = C.title, j = C.type, s = p.get(j) || { type: "input-group", enableClear: !1 }, F = C.editor ? Object.assign({}, s, C.editor) : Object.assign({}, s), A = x(m, C, i), L = f(m, C, i);
|
|
518
532
|
F.readonly = F.readonly === void 0 ? L() : F.readonly;
|
|
519
|
-
const H = C.type === "cascade" ?
|
|
533
|
+
const H = C.type === "cascade" ? v(C.properties, i, u, g, y, w, P) : [], I = !0;
|
|
520
534
|
let D = d(C, P);
|
|
521
535
|
const ae = B({
|
|
522
536
|
get() {
|
|
523
537
|
if (E.value) {
|
|
524
538
|
if (["class", "style"].find((de) => de === k) && !D && (D = a.get("/converter/appearance.converter") || null), D && D.convertFrom)
|
|
525
|
-
return D.convertFrom(
|
|
526
|
-
const M =
|
|
539
|
+
return D.convertFrom(u, T, y, w);
|
|
540
|
+
const M = u[T];
|
|
527
541
|
return Object.prototype.hasOwnProperty.call(C, "defaultValue") && (M === void 0 || typeof M == "string" && M === "") ? C.type === "boolean" ? C.defaultValue : C.defaultValue || "" : M;
|
|
528
542
|
}
|
|
529
543
|
return null;
|
|
530
544
|
},
|
|
531
545
|
set(M) {
|
|
532
|
-
E.value += 1, D && D.convertTo ? (D.convertTo(
|
|
546
|
+
E.value += 1, D && D.convertTo ? (D.convertTo(g, T, M, y, w), D.convertTo(u, T, M, y, w)) : (g[T] = M, u[T] = M);
|
|
533
547
|
}
|
|
534
|
-
}), { refreshPanelAfterChanged: le, description:
|
|
548
|
+
}), { refreshPanelAfterChanged: le, description: ce, isExpand: ue, parentPropertyID: se } = C, _ = { propertyID: k, propertyName: z, propertyType: j, propertyValue: ae, editor: F, visible: A, readonly: L, cascadeConfig: H, hideCascadeTitle: I, refreshPanelAfterChanged: le, description: ce, isExpand: ue, parentPropertyID: se };
|
|
535
549
|
return i[k] = _, _;
|
|
536
550
|
});
|
|
537
551
|
}
|
|
538
|
-
function r
|
|
539
|
-
const
|
|
552
|
+
function o(r, i, u = {}) {
|
|
553
|
+
const g = {}, y = e[r];
|
|
540
554
|
return y && y.categories ? Object.keys(y.categories).map((P) => {
|
|
541
|
-
const O = y.categories[P], T = O == null ? void 0 : O.title, E =
|
|
555
|
+
const O = y.categories[P], T = O == null ? void 0 : O.title, E = v(O.properties || {}, g, {}, u, i);
|
|
542
556
|
return { categoryId: P, categoryName: T, properties: E };
|
|
543
557
|
}) : [];
|
|
544
558
|
}
|
|
545
|
-
function l(
|
|
546
|
-
const
|
|
559
|
+
function l(r, i, u, g, y = "") {
|
|
560
|
+
const w = i.$ref.schema, P = i.$ref.converter, O = u[w], T = O.type, E = n(O), k = {}, C = e[T];
|
|
547
561
|
if (C && C.categories) {
|
|
548
|
-
const m = C.categories[
|
|
562
|
+
const m = C.categories[r], z = m == null ? void 0 : m.title;
|
|
549
563
|
P && Object.keys(m.properties).forEach((F) => {
|
|
550
564
|
m.properties[F].$converter = P;
|
|
551
565
|
});
|
|
552
|
-
const j = (m == null ? void 0 : m.properties) || {}, s =
|
|
553
|
-
return { categoryId:
|
|
566
|
+
const j = (m == null ? void 0 : m.properties) || {}, s = v(j, k, E, O, g, y);
|
|
567
|
+
return { categoryId: r, categoryName: z, properties: s };
|
|
554
568
|
}
|
|
555
|
-
return { categoryId:
|
|
569
|
+
return { categoryId: r, categoryName: "", properties: [] };
|
|
556
570
|
}
|
|
557
|
-
function
|
|
558
|
-
const
|
|
559
|
-
let T = y || e[
|
|
560
|
-
if (!(T && Object.keys(T).length > 0) &&
|
|
571
|
+
function c(r, i, u, g, y) {
|
|
572
|
+
const w = r.type, P = n(r), O = {};
|
|
573
|
+
let T = y || e[w];
|
|
574
|
+
if (!(T && Object.keys(T).length > 0) && u && u.getPropConfig && (T = u.getPropConfig(g)), T && T.categories) {
|
|
561
575
|
const k = [];
|
|
562
576
|
return Object.keys(T.categories).map((C) => {
|
|
563
577
|
const m = T.categories[C];
|
|
564
578
|
if (m.$ref) {
|
|
565
|
-
k.push(l(C, m,
|
|
579
|
+
k.push(l(C, m, r, i, g));
|
|
566
580
|
return;
|
|
567
581
|
}
|
|
568
|
-
const z = m == null ? void 0 : m.title, j = m == null ? void 0 : m.tabId, s = m == null ? void 0 : m.tabName, F = m == null ? void 0 : m.hide, A = m == null ? void 0 : m.hideTitle, L =
|
|
582
|
+
const z = m == null ? void 0 : m.title, j = m == null ? void 0 : m.tabId, s = m == null ? void 0 : m.tabName, F = m == null ? void 0 : m.hide, A = m == null ? void 0 : m.hideTitle, L = v(m.properties || {}, O, P, r, i, g, m.$converter), { setPropertyRelates: H } = m, I = m == null ? void 0 : m.parentPropertyID;
|
|
569
583
|
k.push({ categoryId: C, categoryName: z, tabId: j, tabName: s, hide: F, properties: L, hideTitle: A, setPropertyRelates: H, parentPropertyID: I });
|
|
570
584
|
}), k;
|
|
571
585
|
}
|
|
572
586
|
return [];
|
|
573
587
|
}
|
|
574
588
|
return {
|
|
575
|
-
getPropertyConfigBySchema:
|
|
576
|
-
getPropertyConfigByType:
|
|
589
|
+
getPropertyConfigBySchema: c,
|
|
590
|
+
getPropertyConfigByType: o,
|
|
577
591
|
propertyConverterMap: a
|
|
578
592
|
};
|
|
579
593
|
}
|
|
580
594
|
const Z = {}, K = {};
|
|
581
595
|
Y(Z, K, ye);
|
|
582
|
-
const ee = {}, te = {}, { resolveSchemaWithDefaultValue:
|
|
583
|
-
Y(ne,
|
|
584
|
-
function
|
|
585
|
-
return Q[t.title] = t, X[t.title] = a, Z[t.title] =
|
|
586
|
-
if (!
|
|
596
|
+
const ee = {}, te = {}, { resolveSchemaWithDefaultValue: Ge } = J(ee, te), ne = {}, re = {};
|
|
597
|
+
Y(ne, re, Ge);
|
|
598
|
+
function Ve(e, t, n = /* @__PURE__ */ new Map(), a = (S, x, f, d) => x, p = {}, b = (S) => S) {
|
|
599
|
+
return Q[t.title] = t, X[t.title] = a, Z[t.title] = p, K[t.title] = b, ee[t.title] = t, te[t.title] = a, ne[t.title] = p, re[t.title] = b, (S = {}, x = !0) => {
|
|
600
|
+
if (!x)
|
|
587
601
|
return Se(S, n);
|
|
588
|
-
const f = Ce(S, t, n), d = Object.keys(e).reduce((
|
|
602
|
+
const f = Ce(S, t, n), d = Object.keys(e).reduce((v, o) => (v[o] = e[o].default, v), {});
|
|
589
603
|
return Object.assign(d, f);
|
|
590
604
|
};
|
|
591
605
|
}
|
|
592
|
-
const
|
|
606
|
+
const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-design.gitee.io/collection-property-editor.schema.json", Xe = "collection-property-editor", Ye = "A Farris Component", Ze = "object", Ke = {
|
|
593
607
|
id: {
|
|
594
608
|
description: "The unique identifier for collection-property-editor",
|
|
595
609
|
type: "string"
|
|
@@ -644,20 +658,20 @@ const Ve = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-
|
|
|
644
658
|
type: "boolean",
|
|
645
659
|
default: !1
|
|
646
660
|
}
|
|
647
|
-
},
|
|
661
|
+
}, et = [
|
|
648
662
|
"type"
|
|
649
|
-
],
|
|
663
|
+
], tt = [
|
|
650
664
|
"id"
|
|
651
|
-
],
|
|
652
|
-
$schema:
|
|
653
|
-
$id:
|
|
654
|
-
title:
|
|
655
|
-
description:
|
|
656
|
-
type:
|
|
657
|
-
properties:
|
|
658
|
-
required:
|
|
659
|
-
ignore:
|
|
660
|
-
},
|
|
665
|
+
], nt = {
|
|
666
|
+
$schema: Je,
|
|
667
|
+
$id: Qe,
|
|
668
|
+
title: Xe,
|
|
669
|
+
description: Ye,
|
|
670
|
+
type: Ze,
|
|
671
|
+
properties: Ke,
|
|
672
|
+
required: et,
|
|
673
|
+
ignore: tt
|
|
674
|
+
}, oe = {
|
|
661
675
|
modelValue: {
|
|
662
676
|
type: Array,
|
|
663
677
|
default: []
|
|
@@ -699,63 +713,63 @@ const Ve = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-
|
|
|
699
713
|
default: !1
|
|
700
714
|
}
|
|
701
715
|
}, ie = {
|
|
702
|
-
...
|
|
716
|
+
...oe,
|
|
703
717
|
modalTitle: {
|
|
704
718
|
type: String,
|
|
705
719
|
default: "编辑器"
|
|
706
720
|
}
|
|
707
|
-
},
|
|
721
|
+
}, rt = Ve(ie, nt), ot = /* @__PURE__ */ V({
|
|
708
722
|
name: "CollectionPropertyContainer",
|
|
709
|
-
props:
|
|
723
|
+
props: oe,
|
|
710
724
|
emits: ["valueChange", "selectionChange"],
|
|
711
725
|
setup(e, t) {
|
|
712
726
|
const n = N(), a = N(), {
|
|
713
|
-
idField:
|
|
727
|
+
idField: p,
|
|
714
728
|
textField: b,
|
|
715
729
|
defaultComponentSchema: S,
|
|
716
|
-
isToolbarHidden:
|
|
717
|
-
} = e, f = N(e.modelValue), d = N(),
|
|
730
|
+
isToolbarHidden: x
|
|
731
|
+
} = e, f = N(e.modelValue), d = N(), v = N("collection-property-editor");
|
|
718
732
|
U("useFormCommand", e.useFormCommand), U("useFormSchema", e.useFormSchema);
|
|
719
|
-
const
|
|
733
|
+
const o = N(), l = B(() => !f.value || f.value.length === 0), c = [{
|
|
720
734
|
field: b,
|
|
721
735
|
title: "名称",
|
|
722
736
|
width: 340,
|
|
723
737
|
resizable: !0,
|
|
724
738
|
dataType: "string"
|
|
725
|
-
}],
|
|
739
|
+
}], r = B(() => f.value.filter((s) => e.visibleCondition ? e.visibleCondition(s) : !0));
|
|
726
740
|
function i() {
|
|
727
741
|
const s = $(S), F = Math.random().toString().slice(2, 6);
|
|
728
|
-
return s[
|
|
742
|
+
return s[p] = s[p] + "_" + F, s[b] = s[b] + "_" + F, s;
|
|
729
743
|
}
|
|
730
|
-
function
|
|
731
|
-
|
|
732
|
-
selectedData:
|
|
744
|
+
function u(s) {
|
|
745
|
+
o.value = s, t.emit("selectionChange", {
|
|
746
|
+
selectedData: o,
|
|
733
747
|
propertyConfig: d
|
|
734
|
-
}), a.value.updatePropertyConfig(d.value,
|
|
748
|
+
}), a.value.updatePropertyConfig(d.value, o.value, !0);
|
|
735
749
|
}
|
|
736
|
-
function
|
|
750
|
+
function g(s) {
|
|
737
751
|
if (s >= f.value.length && (s = f.value.length - 1), f.value.length > 0) {
|
|
738
752
|
const F = f.value[s];
|
|
739
|
-
n.value.selectItemById(F[
|
|
753
|
+
n.value.selectItemById(F[p]), u(F);
|
|
740
754
|
}
|
|
741
755
|
}
|
|
742
756
|
function y() {
|
|
743
757
|
const s = i();
|
|
744
|
-
f.value.push(s), n.value.updateDataSource(
|
|
758
|
+
f.value.push(s), n.value.updateDataSource(r.value), n.value.selectItemById(s[p]), u(s);
|
|
745
759
|
}
|
|
746
|
-
function
|
|
760
|
+
function w() {
|
|
747
761
|
const s = f.value && f.value.length > 0 ? f.value[0] : null;
|
|
748
|
-
s && (n.value.selectItemById(s[
|
|
762
|
+
s && (n.value.selectItemById(s[p]), u(s));
|
|
749
763
|
}
|
|
750
764
|
function P() {
|
|
751
|
-
const s = f.value.indexOf(
|
|
752
|
-
f.value.splice(s, 1), n.value.updateDataSource(
|
|
765
|
+
const s = f.value.indexOf(o.value);
|
|
766
|
+
f.value.splice(s, 1), n.value.updateDataSource(r.value), g(s);
|
|
753
767
|
}
|
|
754
768
|
function O() {
|
|
755
|
-
if (!
|
|
769
|
+
if (!o.value)
|
|
756
770
|
return;
|
|
757
|
-
const s = f.value.indexOf(
|
|
758
|
-
s !== f.value.length - 1 && (f.value[s] = f.value[s + 1], f.value[s + 1] =
|
|
771
|
+
const s = f.value.indexOf(o.value);
|
|
772
|
+
s !== f.value.length - 1 && (f.value[s] = f.value[s + 1], f.value[s + 1] = o.value, n.value.updateDataSource(r.value));
|
|
759
773
|
}
|
|
760
774
|
function T() {
|
|
761
775
|
be.question("确定关闭当前编辑器并跳转到代码视图吗?", "", () => {
|
|
@@ -763,72 +777,72 @@ const Ve = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-
|
|
|
763
777
|
});
|
|
764
778
|
}
|
|
765
779
|
function E() {
|
|
766
|
-
if (!
|
|
780
|
+
if (!o.value)
|
|
767
781
|
return;
|
|
768
|
-
const s = f.value.indexOf(
|
|
769
|
-
s !== 0 && (f.value[s] = f.value[s - 1], f.value[s - 1] =
|
|
782
|
+
const s = f.value.indexOf(o.value);
|
|
783
|
+
s !== 0 && (f.value[s] = f.value[s - 1], f.value[s - 1] = o.value, n.value.updateDataSource(r.value));
|
|
770
784
|
}
|
|
771
785
|
function k(s) {
|
|
772
|
-
|
|
786
|
+
u(s[0]);
|
|
773
787
|
}
|
|
774
788
|
function C() {
|
|
775
|
-
n.value.updateDataSource(
|
|
789
|
+
n.value.updateDataSource(r.value);
|
|
776
790
|
}
|
|
777
791
|
fe(() => {
|
|
778
|
-
|
|
792
|
+
w();
|
|
779
793
|
});
|
|
780
|
-
const m = B(() => !
|
|
781
|
-
return () =>
|
|
794
|
+
const m = B(() => !o.value || l.value), z = B(() => m.value || f.value.length <= 1 ? !1 : f.value.findIndex((F) => F.id === o.value.id) > 0), j = B(() => m.value || f.value.length <= 1 ? !1 : f.value.findIndex((F) => F.id === o.value.id) < f.value.length - 1);
|
|
795
|
+
return () => h("div", {
|
|
782
796
|
class: "f-utils-fill-flex-column h-100 pt-2 pl-2 border-bottom"
|
|
783
|
-
}, [
|
|
784
|
-
hidden:
|
|
797
|
+
}, [h("div", {
|
|
798
|
+
hidden: x,
|
|
785
799
|
class: "border-bottom pb-2"
|
|
786
|
-
}, [
|
|
800
|
+
}, [h("button", {
|
|
787
801
|
class: "btn btn-primary mr-2",
|
|
788
802
|
onClick: y
|
|
789
|
-
}, [R("新增")]),
|
|
803
|
+
}, [R("新增")]), h("button", {
|
|
790
804
|
class: "btn btn-secondary mr-2",
|
|
791
805
|
onClick: P,
|
|
792
806
|
disabled: m.value
|
|
793
|
-
}, [R("删除")]),
|
|
807
|
+
}, [R("删除")]), h("button", {
|
|
794
808
|
class: "btn btn-secondary mr-2",
|
|
795
809
|
onClick: E,
|
|
796
810
|
disabled: !z.value
|
|
797
|
-
}, [R("上移")]),
|
|
811
|
+
}, [R("上移")]), h("button", {
|
|
798
812
|
class: "btn btn-secondary mr-2",
|
|
799
813
|
onClick: O,
|
|
800
814
|
disabled: !j.value
|
|
801
|
-
}, [R("下移")]), e.enableClear &&
|
|
815
|
+
}, [R("下移")]), e.enableClear && h("button", {
|
|
802
816
|
class: "btn btn-secondary mr-2 d-flex align-items-center",
|
|
803
817
|
style: "float:right",
|
|
804
818
|
onClick: T,
|
|
805
819
|
disabled: l.value
|
|
806
|
-
}, [
|
|
820
|
+
}, [h("i", {
|
|
807
821
|
class: "f-icon f-icon-close mr-1"
|
|
808
|
-
}, null), R("清空")])]),
|
|
822
|
+
}, null), R("清空")])]), h("div", {
|
|
809
823
|
class: "f-utils-fill-flex-row"
|
|
810
|
-
}, [
|
|
824
|
+
}, [h("div", {
|
|
811
825
|
class: "f-utils-fill f-utils-overflow-auto"
|
|
812
|
-
}, [
|
|
826
|
+
}, [h(ge, {
|
|
813
827
|
ref: n,
|
|
814
|
-
columns:
|
|
815
|
-
data:
|
|
828
|
+
columns: c,
|
|
829
|
+
data: r.value,
|
|
816
830
|
rowOption: {
|
|
817
831
|
disabledField: "undefined"
|
|
818
832
|
},
|
|
819
833
|
fit: "true",
|
|
820
|
-
idField:
|
|
834
|
+
idField: p,
|
|
821
835
|
columnOption: {
|
|
822
836
|
fitColumns: !0
|
|
823
837
|
},
|
|
824
838
|
onSelectionChange: k
|
|
825
|
-
}, null)]),
|
|
839
|
+
}, null)]), h("div", {
|
|
826
840
|
hidden: l.value,
|
|
827
841
|
style: "display: flex;"
|
|
828
|
-
}, [
|
|
842
|
+
}, [h(ve, {
|
|
829
843
|
propertyConfig: d.value,
|
|
830
844
|
ref: a,
|
|
831
|
-
propertyName:
|
|
845
|
+
propertyName: v.value,
|
|
832
846
|
enableSearch: !1,
|
|
833
847
|
allowCollapse: e.allowCollapse,
|
|
834
848
|
onPropertyChanged: C
|
|
@@ -839,37 +853,37 @@ const Ve = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-
|
|
|
839
853
|
props: ie,
|
|
840
854
|
emits: ["valueChange", "selectionChange"],
|
|
841
855
|
setup(e, t) {
|
|
842
|
-
const n = N(), a = W("useFormCommand"),
|
|
843
|
-
me(() => e.modelValue, (
|
|
844
|
-
b.value = $(
|
|
856
|
+
const n = N(), a = W("useFormCommand"), p = W("useFormSchema"), b = N($(e.modelValue) || []);
|
|
857
|
+
me(() => e.modelValue, (c) => {
|
|
858
|
+
b.value = $(c) || [];
|
|
845
859
|
});
|
|
846
860
|
const S = B(() => {
|
|
847
|
-
let
|
|
848
|
-
return b.value && (e.visibleCondition ?
|
|
861
|
+
let c = 0;
|
|
862
|
+
return b.value && (e.visibleCondition ? c = b.value.filter(e.visibleCondition).length : c = b.value.length), `共 ${c || 0} 项`;
|
|
849
863
|
});
|
|
850
|
-
function
|
|
851
|
-
|
|
852
|
-
Object.keys(
|
|
853
|
-
i.indexOf("__fv") > -1 && delete
|
|
864
|
+
function x(c) {
|
|
865
|
+
c && c.forEach((r) => {
|
|
866
|
+
Object.keys(r).forEach((i) => {
|
|
867
|
+
i.indexOf("__fv") > -1 && delete r[i];
|
|
854
868
|
});
|
|
855
869
|
});
|
|
856
870
|
}
|
|
857
871
|
function f() {
|
|
858
|
-
return
|
|
872
|
+
return x(b.value), t.emit("valueChange", b.value), !0;
|
|
859
873
|
}
|
|
860
874
|
function d() {
|
|
861
875
|
return !0;
|
|
862
876
|
}
|
|
863
|
-
function
|
|
864
|
-
selectedData:
|
|
865
|
-
propertyConfig:
|
|
877
|
+
function v({
|
|
878
|
+
selectedData: c,
|
|
879
|
+
propertyConfig: r
|
|
866
880
|
}) {
|
|
867
881
|
t.emit("selectionChange", {
|
|
868
|
-
selectedData:
|
|
869
|
-
propertyConfig:
|
|
882
|
+
selectedData: c,
|
|
883
|
+
propertyConfig: r
|
|
870
884
|
});
|
|
871
885
|
}
|
|
872
|
-
function
|
|
886
|
+
function o() {
|
|
873
887
|
b.value = [];
|
|
874
888
|
}
|
|
875
889
|
const l = {
|
|
@@ -894,47 +908,47 @@ const Ve = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-
|
|
|
894
908
|
class: "btn btn-primary",
|
|
895
909
|
handle: f
|
|
896
910
|
}],
|
|
897
|
-
closedCallback: (
|
|
898
|
-
if (
|
|
911
|
+
closedCallback: (c, r) => {
|
|
912
|
+
if (c.target.name === "cancel" || r === "icon" || r === "esc")
|
|
899
913
|
return b.value = $(e.modelValue), t.emit("valueChange", b.value), !0;
|
|
900
914
|
}
|
|
901
915
|
};
|
|
902
|
-
return () =>
|
|
916
|
+
return () => h(pe, {
|
|
903
917
|
modelValue: S.value,
|
|
904
|
-
"onUpdate:modelValue": (
|
|
918
|
+
"onUpdate:modelValue": (c) => S.value = c,
|
|
905
919
|
editable: !1,
|
|
906
920
|
enableTitle: !0,
|
|
907
921
|
inputType: "text",
|
|
908
922
|
buttonBehavior: "Modal",
|
|
909
923
|
modalOptions: l
|
|
910
924
|
}, {
|
|
911
|
-
default: () => [
|
|
925
|
+
default: () => [h("div", {
|
|
912
926
|
class: "h-100 d-flex flex-column"
|
|
913
|
-
}, [
|
|
927
|
+
}, [h(ot, {
|
|
914
928
|
ref: n,
|
|
915
929
|
modelValue: b.value,
|
|
916
|
-
"onUpdate:modelValue": (
|
|
930
|
+
"onUpdate:modelValue": (c) => b.value = c,
|
|
917
931
|
idField: e.idField,
|
|
918
932
|
textField: e.textField,
|
|
919
933
|
defaultComponentSchema: e.defaultComponentSchema,
|
|
920
|
-
onSelectionChange:
|
|
934
|
+
onSelectionChange: v,
|
|
921
935
|
useFormCommand: a,
|
|
922
|
-
useFormSchema:
|
|
936
|
+
useFormSchema: p,
|
|
923
937
|
allowCollapse: e.allowCollapse,
|
|
924
938
|
visibleCondition: e.visibleCondition,
|
|
925
939
|
enableClear: e.enableClear,
|
|
926
|
-
onClear:
|
|
940
|
+
onClear: o
|
|
927
941
|
}, null)])]
|
|
928
942
|
});
|
|
929
943
|
}
|
|
930
|
-
}),
|
|
944
|
+
}), dt = {
|
|
931
945
|
install(e) {
|
|
932
946
|
e.component(q.name, q);
|
|
933
947
|
},
|
|
934
948
|
register(e, t, n, a) {
|
|
935
|
-
e["collection-property-editor"] = q, t["collection-property-editor"] =
|
|
949
|
+
e["collection-property-editor"] = q, t["collection-property-editor"] = rt;
|
|
936
950
|
}
|
|
937
951
|
};
|
|
938
952
|
export {
|
|
939
|
-
|
|
953
|
+
dt as default
|
|
940
954
|
};
|