@farris/ui-vue 1.6.5-beta.7 → 1.6.5-beta.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 +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +28 -29
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +521 -517
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +163 -157
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +10 -10
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1122 -1121
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +190 -190
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2693 -2693
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +8 -8
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +8 -8
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1470 -1460
- package/components/expression-editor/index.umd.cjs +3 -3
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +853 -843
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +922 -911
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +12 -12
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +104 -108
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1311 -1307
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +7 -7
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +9 -9
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +326 -326
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +168 -167
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +739 -737
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +1 -1
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +565 -565
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +409 -409
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1488 -1478
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1765 -1762
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/search-box/index.esm.js +114 -114
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1184 -1181
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +927 -916
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +76 -72
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1527 -1524
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +361 -361
- package/components/textarea/index.umd.cjs +2 -2
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +130 -134
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +25 -25
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +1746 -1743
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +8 -8
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/farris.all.esm.js +16987 -17002
- package/farris.all.umd.cjs +27 -27
- package/package.json +1 -1
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
- package/components/time-picker/index.css +0 -1
- package/components/time-picker/index.esm.js +0 -9793
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/time-picker/package.json +0 -8
- package/components/time-picker/style.js +0 -6
- package/designer/button-edit/index.css +0 -1
- package/designer/button-edit/index.esm.js +0 -4856
- package/designer/button-edit/index.umd.cjs +0 -1
- package/designer/checkbox/index.esm.js +0 -250
- package/designer/checkbox/index.umd.cjs +0 -1
- package/designer/checkbox-group/index.esm.js +0 -377
- package/designer/checkbox-group/index.umd.cjs +0 -1
- package/designer/data-grid/index.css +0 -1
- package/designer/data-grid/index.esm.js +0 -15413
- package/designer/data-grid/index.umd.cjs +0 -23
- package/designer/data-view/index.esm.js +0 -854
- package/designer/data-view/index.umd.cjs +0 -38
- package/designer/drawer/index.css +0 -1
- package/designer/drawer/index.esm.js +0 -525
- package/designer/drawer/index.umd.cjs +0 -1
- package/designer/farris-designer.all.esm.js +0 -22320
- package/designer/farris-designer.all.umd.cjs +0 -34
- package/designer/index.css +0 -1
- package/designer/input-group/index.esm.js +0 -1098
- package/designer/input-group/index.umd.cjs +0 -1
- package/designer/list-view/index.css +0 -1
- package/designer/list-view/index.esm.js +0 -4675
- package/designer/list-view/index.umd.cjs +0 -40
- package/designer/radio-group/index.css +0 -1
- package/designer/radio-group/index.esm.js +0 -6980
- package/designer/radio-group/index.umd.cjs +0 -1
- package/designer/tree-grid/index.esm.js +0 -1099
- package/designer/tree-grid/index.umd.cjs +0 -1
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { ref as G, computed as
|
|
2
|
-
import {
|
|
1
|
+
import { ref as G, computed as le, defineComponent as W, watch as ue, createVNode as k, Fragment as H } from "vue";
|
|
2
|
+
import { cloneDeep as z, isPlainObject as _ } from "lodash-es";
|
|
3
3
|
import { withInstall as fe } from "../common/index.esm.js";
|
|
4
4
|
function V(e, t) {
|
|
5
5
|
let r;
|
|
6
|
-
function
|
|
7
|
-
const { properties:
|
|
8
|
-
if (
|
|
9
|
-
const
|
|
10
|
-
c.id = `${
|
|
6
|
+
function s(i) {
|
|
7
|
+
const { properties: a, title: p, ignore: n } = i, o = n && Array.isArray(n), c = Object.keys(a).reduce((d, m) => ((!o || !n.find((C) => C === m)) && (d[m] = a[m].type === "object" && a[m].properties ? s(a[m]) : z(a[m].default)), d), {});
|
|
8
|
+
if (p && (!o || !n.find((d) => d === "id"))) {
|
|
9
|
+
const d = p.toLowerCase().replace(/-/g, "_");
|
|
10
|
+
c.id = `${d}_${Math.random().toString().slice(2, 6)}`;
|
|
11
11
|
}
|
|
12
12
|
return c;
|
|
13
13
|
}
|
|
14
14
|
function v(i) {
|
|
15
|
-
const { properties:
|
|
15
|
+
const { properties: a, title: p, required: n } = i;
|
|
16
16
|
if (n && Array.isArray(n)) {
|
|
17
|
-
const o = n.reduce((c,
|
|
18
|
-
if (
|
|
19
|
-
const c =
|
|
17
|
+
const o = n.reduce((c, d) => (c[d] = a[d].type === "object" && a[d].properties ? s(a[d]) : z(a[d].default), c), {});
|
|
18
|
+
if (p && n.find((c) => c === "id")) {
|
|
19
|
+
const c = p.toLowerCase().replace(/-/g, "_");
|
|
20
20
|
o.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
21
21
|
}
|
|
22
22
|
return o;
|
|
23
23
|
}
|
|
24
24
|
return {
|
|
25
|
-
type:
|
|
25
|
+
type: p
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
function g(i,
|
|
28
|
+
function g(i, a = {}, p) {
|
|
29
29
|
const n = e[i];
|
|
30
30
|
if (n) {
|
|
31
31
|
let o = v(n);
|
|
32
32
|
const c = t[i];
|
|
33
|
-
return o = c ? c({ getSchemaByType: g }, o,
|
|
33
|
+
return o = c ? c({ getSchemaByType: g }, o, a, p) : o, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(o), o;
|
|
34
34
|
}
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
|
-
function y(i,
|
|
38
|
-
const
|
|
39
|
-
return Object.keys(
|
|
37
|
+
function y(i, a) {
|
|
38
|
+
const p = s(a);
|
|
39
|
+
return Object.keys(p).reduce((n, o) => (Object.prototype.hasOwnProperty.call(i, o) && (n[o] && _(n[o]) && _(i[o] || !i[o]) ? Object.assign(n[o], i[o] || {}) : n[o] = i[o]), n), p), p;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function S(i, a) {
|
|
42
42
|
return Object.keys(i).filter((n) => i[n] != null).reduce((n, o) => {
|
|
43
|
-
if (
|
|
44
|
-
const c =
|
|
43
|
+
if (a.has(o)) {
|
|
44
|
+
const c = a.get(o);
|
|
45
45
|
if (typeof c == "string")
|
|
46
46
|
n[c] = i[o];
|
|
47
47
|
else {
|
|
48
|
-
const
|
|
49
|
-
Object.assign(n,
|
|
48
|
+
const d = c(o, i[o], i);
|
|
49
|
+
Object.assign(n, d);
|
|
50
50
|
}
|
|
51
51
|
} else
|
|
52
52
|
n[o] = i[o];
|
|
53
53
|
return n;
|
|
54
54
|
}, {});
|
|
55
55
|
}
|
|
56
|
-
function x(i,
|
|
57
|
-
const n = y(i,
|
|
58
|
-
return
|
|
56
|
+
function x(i, a, p = /* @__PURE__ */ new Map()) {
|
|
57
|
+
const n = y(i, a);
|
|
58
|
+
return S(n, p);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
var
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
const n = e[
|
|
60
|
+
function u(i) {
|
|
61
|
+
var p;
|
|
62
|
+
const a = i.type;
|
|
63
|
+
if (a) {
|
|
64
|
+
const n = e[a];
|
|
65
65
|
if (!n)
|
|
66
66
|
return i;
|
|
67
|
-
const o = y(i, n), c = ((
|
|
67
|
+
const o = y(i, n), c = ((p = i.editor) == null ? void 0 : p.type) || "";
|
|
68
68
|
if (c) {
|
|
69
|
-
const
|
|
69
|
+
const d = e[c], m = y(i.editor, d);
|
|
70
70
|
o.editor = m;
|
|
71
71
|
}
|
|
72
72
|
return o;
|
|
@@ -76,76 +76,76 @@ function V(e, t) {
|
|
|
76
76
|
function f(i) {
|
|
77
77
|
r = i;
|
|
78
78
|
}
|
|
79
|
-
return { getSchemaByType: g, resolveSchemaWithDefaultValue:
|
|
79
|
+
return { getSchemaByType: g, resolveSchemaWithDefaultValue: u, resolveSchemaToProps: x, mappingSchemaToProps: S, setDesignerContext: f };
|
|
80
80
|
}
|
|
81
|
-
const I = {}, J = {}, { resolveSchemaWithDefaultValue:
|
|
81
|
+
const I = {}, J = {}, { getSchemaByType: st, resolveSchemaWithDefaultValue: pe, resolveSchemaToProps: de, mappingSchemaToProps: me, setDesignerContext: at } = V(I, J);
|
|
82
82
|
function ve(e = {}) {
|
|
83
|
-
function t(
|
|
83
|
+
function t(u, f, i, a) {
|
|
84
84
|
if (typeof i == "number")
|
|
85
|
-
return
|
|
85
|
+
return a[u].length === i;
|
|
86
86
|
if (typeof i == "object") {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
return Number(
|
|
90
|
-
if (
|
|
91
|
-
return Number(
|
|
92
|
-
if (
|
|
93
|
-
return Number(
|
|
87
|
+
const p = Object.keys(i)[0], n = i[p];
|
|
88
|
+
if (p === "not")
|
|
89
|
+
return Number(a[u].length) !== Number(n);
|
|
90
|
+
if (p === "moreThan")
|
|
91
|
+
return Number(a[u].length) >= Number(n);
|
|
92
|
+
if (p === "lessThan")
|
|
93
|
+
return Number(a[u].length) <= Number(n);
|
|
94
94
|
}
|
|
95
95
|
return !1;
|
|
96
96
|
}
|
|
97
|
-
function r(
|
|
98
|
-
return
|
|
97
|
+
function r(u, f, i, a) {
|
|
98
|
+
return a[u] && a[u].propertyValue && String(a[u].propertyValue.value) === String(i);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const s = /* @__PURE__ */ new Map([
|
|
101
101
|
["length", t],
|
|
102
102
|
["getProperty", r]
|
|
103
103
|
]);
|
|
104
|
-
Object.keys(e).reduce((
|
|
105
|
-
function v(
|
|
106
|
-
const i =
|
|
107
|
-
return typeof f == "number" ? [{ target: i, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: i, operator: "getProperty", param:
|
|
108
|
-
if (
|
|
109
|
-
return { target: i, operator: "length", param: null, value: f[
|
|
110
|
-
const
|
|
111
|
-
return { target: i, operator: "getProperty", param:
|
|
104
|
+
Object.keys(e).reduce((u, f) => (u.set(f, e[f]), u), s);
|
|
105
|
+
function v(u, f) {
|
|
106
|
+
const i = u;
|
|
107
|
+
return typeof f == "number" ? [{ target: i, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: i, operator: "getProperty", param: u, value: !!f }] : typeof f == "object" ? Object.keys(f).map((a) => {
|
|
108
|
+
if (a === "length")
|
|
109
|
+
return { target: i, operator: "length", param: null, value: f[a] };
|
|
110
|
+
const p = a, n = f[a];
|
|
111
|
+
return { target: i, operator: "getProperty", param: p, value: n };
|
|
112
112
|
}) : [];
|
|
113
113
|
}
|
|
114
|
-
function g(
|
|
115
|
-
return Object.keys(
|
|
116
|
-
const
|
|
117
|
-
return i.push(...
|
|
114
|
+
function g(u) {
|
|
115
|
+
return Object.keys(u).reduce((i, a) => {
|
|
116
|
+
const p = v(a, u[a]);
|
|
117
|
+
return i.push(...p), i;
|
|
118
118
|
}, []);
|
|
119
119
|
}
|
|
120
|
-
function y(
|
|
121
|
-
if (
|
|
122
|
-
const i =
|
|
123
|
-
return i && i(
|
|
120
|
+
function y(u, f) {
|
|
121
|
+
if (s.has(u.operator)) {
|
|
122
|
+
const i = s.get(u.operator);
|
|
123
|
+
return i && i(u.target, u.param, u.value, f) || !1;
|
|
124
124
|
}
|
|
125
125
|
return !1;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
return g(
|
|
127
|
+
function S(u, f) {
|
|
128
|
+
return g(u).reduce((p, n) => p && y(n, f), !0);
|
|
129
129
|
}
|
|
130
|
-
function x(
|
|
131
|
-
const i = Object.keys(
|
|
132
|
-
return
|
|
130
|
+
function x(u, f) {
|
|
131
|
+
const i = Object.keys(u), a = i.includes("allOf"), p = i.includes("anyOf"), n = a || p, d = (n ? u[n ? a ? "allOf" : "anyOf" : "allOf"] : [u]).map((C) => S(C, f));
|
|
132
|
+
return a ? !d.includes(!1) : d.includes(!0);
|
|
133
133
|
}
|
|
134
134
|
return { parseValueSchema: x };
|
|
135
135
|
}
|
|
136
136
|
const ge = {
|
|
137
|
-
convertTo: (e, t, r,
|
|
137
|
+
convertTo: (e, t, r, s) => {
|
|
138
138
|
e.appearance || (e.appearance = {}), e.appearance[t] = r;
|
|
139
139
|
},
|
|
140
140
|
convertFrom: (e, t, r) => e.appearance ? e.appearance[t] : e[t]
|
|
141
141
|
}, be = {
|
|
142
142
|
convertFrom: (e, t, r) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
143
143
|
}, ye = {
|
|
144
|
-
convertTo: (e, t, r,
|
|
144
|
+
convertTo: (e, t, r, s) => {
|
|
145
145
|
e.editor && (e.editor[t] = r);
|
|
146
146
|
},
|
|
147
147
|
convertFrom: (e, t, r) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, t) ? e.editor[t] : e[t]
|
|
148
|
-
},
|
|
148
|
+
}, Se = {
|
|
149
149
|
button: { type: "button", name: "按钮" },
|
|
150
150
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
151
151
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -192,19 +192,19 @@ const ge = {
|
|
|
192
192
|
"list-view": { type: "list-view", name: "列表" },
|
|
193
193
|
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
194
194
|
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
195
|
-
},
|
|
195
|
+
}, Ce = {
|
|
196
196
|
convertFrom: (e, t, r) => {
|
|
197
197
|
var v;
|
|
198
|
-
const
|
|
199
|
-
return ((v =
|
|
198
|
+
const s = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
199
|
+
return ((v = Se[s]) == null ? void 0 : v.name) || s;
|
|
200
200
|
}
|
|
201
|
-
},
|
|
202
|
-
convertTo: (e, t, r,
|
|
201
|
+
}, Te = {
|
|
202
|
+
convertTo: (e, t, r, s) => {
|
|
203
203
|
e[t] = e[t];
|
|
204
204
|
},
|
|
205
205
|
convertFrom: (e, t, r) => e.editor ? r.getRealEditorType(e.editor.type) : ""
|
|
206
|
-
},
|
|
207
|
-
convertTo: (e, t, r,
|
|
206
|
+
}, Fe = {
|
|
207
|
+
convertTo: (e, t, r, s) => {
|
|
208
208
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = r : e.formatter = {
|
|
209
209
|
[t]: r
|
|
210
210
|
});
|
|
@@ -235,7 +235,7 @@ const ge = {
|
|
|
235
235
|
return "none";
|
|
236
236
|
}
|
|
237
237
|
}, xe = {
|
|
238
|
-
convertTo: (e, t, r,
|
|
238
|
+
convertTo: (e, t, r, s) => {
|
|
239
239
|
e.command ? e.command[t] = r : e.command = {
|
|
240
240
|
[t]: r
|
|
241
241
|
}, t === "enable" && r && (e.command.commands || (e.command.commands = [
|
|
@@ -253,7 +253,7 @@ const ge = {
|
|
|
253
253
|
},
|
|
254
254
|
convertFrom: (e, t, r) => e.command && t === "enable" ? e.command.enable : ""
|
|
255
255
|
}, we = {
|
|
256
|
-
convertTo: (e, t, r,
|
|
256
|
+
convertTo: (e, t, r, s) => {
|
|
257
257
|
e.column ? e.column[t] = r : e.column = {
|
|
258
258
|
[t]: r
|
|
259
259
|
}, t === "fitColumns" && r && (e.column.fitMode || (e.column.fitMode = "average"));
|
|
@@ -268,7 +268,7 @@ const ge = {
|
|
|
268
268
|
return "";
|
|
269
269
|
}
|
|
270
270
|
}, Oe = {
|
|
271
|
-
convertTo: (e, t, r,
|
|
271
|
+
convertTo: (e, t, r, s) => {
|
|
272
272
|
e.summary ? e.summary[t] = r : e.summary = {
|
|
273
273
|
[t]: r
|
|
274
274
|
}, t === "enable" && r && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
|
|
@@ -278,7 +278,7 @@ const ge = {
|
|
|
278
278
|
},
|
|
279
279
|
convertFrom: (e, t, r) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
280
280
|
}, Pe = {
|
|
281
|
-
convertTo: (e, t, r,
|
|
281
|
+
convertTo: (e, t, r, s) => {
|
|
282
282
|
e.group ? e.group[t] = r : e.group = {
|
|
283
283
|
[t]: r
|
|
284
284
|
}, t === "enable" && r && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
|
|
@@ -295,71 +295,71 @@ const ge = {
|
|
|
295
295
|
return e.group.showSummary;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
},
|
|
298
|
+
}, De = {
|
|
299
299
|
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
300
300
|
convertTo: (e, t, r) => {
|
|
301
301
|
if (r && r.length > 0) {
|
|
302
|
-
const
|
|
303
|
-
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path =
|
|
302
|
+
const s = r[0];
|
|
303
|
+
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = s.bindingField, e.binding.field = s.id, e.binding.fullPath = s.path, e.path = s.bindingPath;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
},
|
|
307
|
-
convertTo: (e, t, r,
|
|
306
|
+
}, Ee = {
|
|
307
|
+
convertTo: (e, t, r, s) => {
|
|
308
308
|
e.pagination || (e.pagination = {}), e.pagination[t] = r;
|
|
309
309
|
},
|
|
310
310
|
convertFrom: (e, t, r) => e.pagination ? e.pagination[t] : e[t]
|
|
311
|
-
},
|
|
312
|
-
convertTo: (e, t, r,
|
|
311
|
+
}, $e = {
|
|
312
|
+
convertTo: (e, t, r, s) => {
|
|
313
313
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = r;
|
|
314
314
|
},
|
|
315
315
|
convertFrom: (e, t, r) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
316
|
-
},
|
|
317
|
-
convertTo: (e, t, r,
|
|
316
|
+
}, je = {
|
|
317
|
+
convertTo: (e, t, r, s) => {
|
|
318
318
|
e.selection || (e.selection = {}), e.selection[t] = r;
|
|
319
319
|
},
|
|
320
320
|
convertFrom: (e, t, r) => {
|
|
321
|
-
var
|
|
322
|
-
return t === "showCheckbox" ? (
|
|
321
|
+
var s, v;
|
|
322
|
+
return t === "showCheckbox" ? (s = e.selection) != null && s.multiSelect ? !0 : (v = e.selection) == null ? void 0 : v.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
323
323
|
}
|
|
324
|
-
},
|
|
324
|
+
}, he = {
|
|
325
325
|
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
326
|
-
},
|
|
326
|
+
}, ke = {
|
|
327
327
|
convertFrom: (e, t) => e[t] || "",
|
|
328
328
|
convertTo: (e, t, r) => {
|
|
329
329
|
e[t] = r;
|
|
330
330
|
}
|
|
331
|
-
},
|
|
332
|
-
convertTo: (e, t, r,
|
|
331
|
+
}, Ne = {
|
|
332
|
+
convertTo: (e, t, r, s) => {
|
|
333
333
|
e.size || (e.size = {}), e.size[t] = r;
|
|
334
334
|
},
|
|
335
335
|
convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
|
|
336
|
-
},
|
|
336
|
+
}, Re = {
|
|
337
337
|
convertFrom: (e, t, r) => {
|
|
338
|
-
var
|
|
339
|
-
return (
|
|
338
|
+
var s, v;
|
|
339
|
+
return (s = e.formatter) != null && s.data && t === "formatterEnumData" && !e.formatterEnumData ? (v = e.formatter) == null ? void 0 : v.data : e.formatterEnumData;
|
|
340
340
|
}
|
|
341
|
-
},
|
|
342
|
-
convertTo: (e, t, r,
|
|
341
|
+
}, Me = {
|
|
342
|
+
convertTo: (e, t, r, s) => {
|
|
343
343
|
e.sort || (e.sort = {}), e.sort[t] = r;
|
|
344
344
|
},
|
|
345
345
|
convertFrom: (e, t, r) => {
|
|
346
|
-
var
|
|
346
|
+
var s, v;
|
|
347
347
|
if (t === "mode")
|
|
348
|
-
return ((
|
|
348
|
+
return ((s = e.sort) == null ? void 0 : s.mode) || "client";
|
|
349
349
|
if (t === "multiSort")
|
|
350
350
|
return !!((v = e.sort) != null && v.multiSort);
|
|
351
351
|
}
|
|
352
352
|
}, Be = {
|
|
353
|
-
convertTo: (e, t, r,
|
|
353
|
+
convertTo: (e, t, r, s) => {
|
|
354
354
|
e.filter || (e.filter = {}), e.filter[t] = r;
|
|
355
355
|
},
|
|
356
356
|
convertFrom: (e, t, r) => {
|
|
357
|
-
var
|
|
357
|
+
var s;
|
|
358
358
|
if (t === "mode")
|
|
359
|
-
return ((
|
|
359
|
+
return ((s = e.filter) == null ? void 0 : s.mode) || "client";
|
|
360
360
|
}
|
|
361
361
|
}, Ae = {
|
|
362
|
-
convertTo: (e, t, r,
|
|
362
|
+
convertTo: (e, t, r, s) => {
|
|
363
363
|
e.rowOption ? e.rowOption[t] = r : e.rowOption = {
|
|
364
364
|
[t]: r
|
|
365
365
|
};
|
|
@@ -375,26 +375,26 @@ const ge = {
|
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
377
|
function Q(e, t, r) {
|
|
378
|
-
const
|
|
378
|
+
const s = /* @__PURE__ */ new Map([
|
|
379
379
|
["/converter/appearance.converter", ge],
|
|
380
380
|
["/converter/buttons.converter", be],
|
|
381
381
|
["/converter/property-editor.converter", ye],
|
|
382
|
-
["/converter/items-count.converter",
|
|
383
|
-
["/converter/type.converter",
|
|
384
|
-
["/converter/change-editor.converter",
|
|
385
|
-
["/converter/change-formatter.converter",
|
|
382
|
+
["/converter/items-count.converter", he],
|
|
383
|
+
["/converter/type.converter", Ce],
|
|
384
|
+
["/converter/change-editor.converter", Te],
|
|
385
|
+
["/converter/change-formatter.converter", Fe],
|
|
386
386
|
["/converter/column-command.converter", xe],
|
|
387
387
|
["/converter/column-option.converter", we],
|
|
388
388
|
["/converter/summary.converter", Oe],
|
|
389
389
|
["/converter/group.converter", Pe],
|
|
390
|
-
["/converter/form-group-label.converter",
|
|
391
|
-
["/converter/field-selector.converter",
|
|
392
|
-
["/converter/pagination.converter",
|
|
393
|
-
["/converter/row-number.converter",
|
|
394
|
-
["/converter/grid-selection.converter",
|
|
395
|
-
["/converter/size.converter",
|
|
396
|
-
["/converter/change-formatter-enum.converter",
|
|
397
|
-
["/converter/grid-sort.converter",
|
|
390
|
+
["/converter/form-group-label.converter", ke],
|
|
391
|
+
["/converter/field-selector.converter", De],
|
|
392
|
+
["/converter/pagination.converter", Ee],
|
|
393
|
+
["/converter/row-number.converter", $e],
|
|
394
|
+
["/converter/grid-selection.converter", je],
|
|
395
|
+
["/converter/size.converter", Ne],
|
|
396
|
+
["/converter/change-formatter-enum.converter", Re],
|
|
397
|
+
["/converter/grid-sort.converter", Me],
|
|
398
398
|
["/converter/grid-filter.converter", Be],
|
|
399
399
|
["/converter/row-option.converter", Ae]
|
|
400
400
|
]), v = /* @__PURE__ */ new Map([
|
|
@@ -425,91 +425,91 @@ function Q(e, t, r) {
|
|
|
425
425
|
function y(n, o) {
|
|
426
426
|
return () => g.parseValueSchema(n, o);
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function S(n, o, c) {
|
|
429
429
|
return n.includes("visible") && o.visible !== void 0 ? typeof o.visible == "boolean" ? () => !!o.visible : o.visible === void 0 ? !0 : y(o.visible, c) : () => !0;
|
|
430
430
|
}
|
|
431
431
|
function x(n, o, c) {
|
|
432
432
|
return n.includes("readonly") && o.readonly !== void 0 ? typeof o.readonly == "boolean" ? () => !!o.readonly : y(o.readonly, c) : () => !1;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function u(n, o) {
|
|
435
435
|
const c = n.$converter || o;
|
|
436
|
-
return typeof c == "string" && c &&
|
|
436
|
+
return typeof c == "string" && c && s.has(c) ? s.get(c) || null : c || null;
|
|
437
437
|
}
|
|
438
|
-
function f(n, o, c,
|
|
438
|
+
function f(n, o, c, d, m, C = "", w = "") {
|
|
439
439
|
return Object.keys(n).map((b) => {
|
|
440
|
-
const O = G(1), P = b,
|
|
441
|
-
|
|
442
|
-
const A =
|
|
443
|
-
let
|
|
444
|
-
const ne =
|
|
440
|
+
const O = G(1), P = b, l = n[b], T = Object.keys(l), N = l.title, j = l.type, h = v.get(j) || { type: "input-group", enableClear: !1 }, $ = l.editor ? Object.assign({}, h, l.editor) : Object.assign({}, h), B = S(T, l, o), R = x(T, l, o);
|
|
441
|
+
$.readonly = $.readonly === void 0 ? R() : $.readonly;
|
|
442
|
+
const A = l.type === "cascade" ? f(l.properties, o, c, d, m, C, w) : [], re = !0;
|
|
443
|
+
let D = u(l, w);
|
|
444
|
+
const ne = le({
|
|
445
445
|
get() {
|
|
446
446
|
if (O.value) {
|
|
447
|
-
if (["class", "style"].find((ce) => ce === P) && !
|
|
448
|
-
return
|
|
449
|
-
const
|
|
450
|
-
return Object.prototype.hasOwnProperty.call(
|
|
447
|
+
if (["class", "style"].find((ce) => ce === P) && !D && (D = s.get("/converter/appearance.converter") || null), D && D.convertFrom)
|
|
448
|
+
return D.convertFrom(c, b, m, C);
|
|
449
|
+
const E = c[b];
|
|
450
|
+
return Object.prototype.hasOwnProperty.call(l, "defaultValue") && (E === void 0 || typeof E == "string" && E === "") ? l.type === "boolean" ? l.defaultValue : l.defaultValue || "" : E;
|
|
451
451
|
}
|
|
452
452
|
return null;
|
|
453
453
|
},
|
|
454
|
-
set(
|
|
455
|
-
O.value += 1,
|
|
454
|
+
set(E) {
|
|
455
|
+
O.value += 1, D && D.convertTo ? (D.convertTo(d, b, E, m, C), D.convertTo(c, b, E, m, C)) : (d[b] = E, c[b] = E);
|
|
456
456
|
}
|
|
457
|
-
}), { refreshPanelAfterChanged: oe, description: ie, isExpand:
|
|
457
|
+
}), { refreshPanelAfterChanged: oe, description: ie, isExpand: se, parentPropertyID: ae } = l, L = { propertyID: P, propertyName: N, propertyType: j, propertyValue: ne, editor: $, visible: B, readonly: R, cascadeConfig: A, hideCascadeTitle: re, refreshPanelAfterChanged: oe, description: ie, isExpand: se, parentPropertyID: ae };
|
|
458
458
|
return o[P] = L, L;
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
461
|
function i(n, o, c = {}) {
|
|
462
|
-
const
|
|
462
|
+
const d = {}, m = e[n];
|
|
463
463
|
return m && m.categories ? Object.keys(m.categories).map((w) => {
|
|
464
|
-
const
|
|
464
|
+
const F = m.categories[w], b = F == null ? void 0 : F.title, O = f(F.properties || {}, d, {}, c, o);
|
|
465
465
|
return { categoryId: w, categoryName: b, properties: O };
|
|
466
466
|
}) : [];
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
const
|
|
470
|
-
if (
|
|
471
|
-
const
|
|
472
|
-
w && Object.keys(
|
|
473
|
-
|
|
468
|
+
function a(n, o, c, d, m = "") {
|
|
469
|
+
const C = o.$ref.schema, w = o.$ref.converter, F = c[C], b = F.type, O = r(F), P = {}, l = e[b];
|
|
470
|
+
if (l && l.categories) {
|
|
471
|
+
const T = l.categories[n], N = T == null ? void 0 : T.title;
|
|
472
|
+
w && Object.keys(T.properties).forEach(($) => {
|
|
473
|
+
T.properties[$].$converter = w;
|
|
474
474
|
});
|
|
475
|
-
const
|
|
476
|
-
return { categoryId: n, categoryName:
|
|
475
|
+
const j = (T == null ? void 0 : T.properties) || {}, h = f(j, P, O, F, d, m);
|
|
476
|
+
return { categoryId: n, categoryName: N, properties: h };
|
|
477
477
|
}
|
|
478
478
|
return { categoryId: n, categoryName: "", properties: [] };
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
const
|
|
482
|
-
let b = m || e[
|
|
483
|
-
if (b && Object.keys(b).length === 0 && c && c.getPropConfig && (b = c.getPropConfig(
|
|
480
|
+
function p(n, o, c, d, m) {
|
|
481
|
+
const C = n.type, w = r(n), F = {};
|
|
482
|
+
let b = m || e[C];
|
|
483
|
+
if (b && Object.keys(b).length === 0 && c && c.getPropConfig && (b = c.getPropConfig(d)), b && b.categories) {
|
|
484
484
|
const O = [];
|
|
485
485
|
return Object.keys(b.categories).map((P) => {
|
|
486
|
-
const
|
|
487
|
-
if (
|
|
488
|
-
O.push(
|
|
486
|
+
const l = b.categories[P];
|
|
487
|
+
if (l.$ref) {
|
|
488
|
+
O.push(a(P, l, n, o, d));
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
|
-
const
|
|
492
|
-
O.push({ categoryId: P, categoryName:
|
|
491
|
+
const T = l == null ? void 0 : l.title, N = l == null ? void 0 : l.tabId, j = l == null ? void 0 : l.tabName, h = l == null ? void 0 : l.hide, $ = l == null ? void 0 : l.hideTitle, B = f(l.properties || {}, F, w, n, o, d, l.$converter), { setPropertyRelates: R } = l, A = l == null ? void 0 : l.parentPropertyID;
|
|
492
|
+
O.push({ categoryId: P, categoryName: T, tabId: N, tabName: j, hide: h, properties: B, hideTitle: $, setPropertyRelates: R, parentPropertyID: A });
|
|
493
493
|
}), O;
|
|
494
494
|
}
|
|
495
495
|
return [];
|
|
496
496
|
}
|
|
497
497
|
return {
|
|
498
|
-
getPropertyConfigBySchema:
|
|
498
|
+
getPropertyConfigBySchema: p,
|
|
499
499
|
getPropertyConfigByType: i,
|
|
500
|
-
propertyConverterMap:
|
|
500
|
+
propertyConverterMap: s
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
503
|
const U = {}, X = {};
|
|
504
|
-
Q(U, X,
|
|
505
|
-
const Y = {}, Z = {}, { resolveSchemaWithDefaultValue: qe } = V(Y, Z), K = {}, ee = {};
|
|
504
|
+
Q(U, X, pe);
|
|
505
|
+
const Y = {}, Z = {}, { getSchemaByType: ct, resolveSchemaWithDefaultValue: qe, resolveSchemaToProps: lt, mappingSchemaToProps: ut, setDesignerContext: ft } = V(Y, Z), K = {}, ee = {};
|
|
506
506
|
Q(K, ee, qe);
|
|
507
|
-
function Le(e, t, r = /* @__PURE__ */ new Map(),
|
|
508
|
-
return I[t.title] = t, J[t.title] =
|
|
509
|
-
if (!
|
|
507
|
+
function Le(e, t, r = /* @__PURE__ */ new Map(), s = (y, S, x, u) => S, v = {}, g = (y) => y) {
|
|
508
|
+
return I[t.title] = t, J[t.title] = s, U[t.title] = v, X[t.title] = g, Y[t.title] = t, Z[t.title] = s, K[t.title] = v, ee[t.title] = g, (y = {}, S = !0) => {
|
|
509
|
+
if (!S)
|
|
510
510
|
return me(y, r);
|
|
511
|
-
const x =
|
|
512
|
-
return Object.assign(
|
|
511
|
+
const x = de(y, t, r), u = Object.keys(e).reduce((f, i) => (f[i] = e[i].default, f), {});
|
|
512
|
+
return Object.assign(u, x);
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
function ze(e, t) {
|
|
@@ -635,34 +635,34 @@ const We = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
635
635
|
*/
|
|
636
636
|
onSelectedValueChanged: { type: Function, default: () => {
|
|
637
637
|
} }
|
|
638
|
-
}, te = Le(q, Xe, _e, Ge, tt),
|
|
638
|
+
}, te = Le(q, Xe, _e, Ge, tt), M = /* @__PURE__ */ W({
|
|
639
639
|
name: "FRadioButton",
|
|
640
640
|
props: q,
|
|
641
641
|
emits: ["selectedValueChanged"],
|
|
642
642
|
setup(e, t) {
|
|
643
643
|
const r = G(e.enumData);
|
|
644
|
-
function
|
|
644
|
+
function s(g, y) {
|
|
645
645
|
if (g.currentTarget.classList.value = "btn btn-secondary active", g.currentTarget.tagName.toLowerCase() === "label") {
|
|
646
646
|
const {
|
|
647
|
-
currentTarget:
|
|
648
|
-
} = g, x =
|
|
649
|
-
Array.from(x.querySelectorAll("label")).filter((f) => f !==
|
|
647
|
+
currentTarget: S
|
|
648
|
+
} = g, x = S.parentElement;
|
|
649
|
+
Array.from(x.querySelectorAll("label")).filter((f) => f !== S).forEach((f) => f.classList.remove("active"));
|
|
650
650
|
}
|
|
651
651
|
t.emit("selectedValueChanged", y);
|
|
652
652
|
}
|
|
653
653
|
function v(g) {
|
|
654
654
|
return `${g.text}${e.suffixValue}`;
|
|
655
655
|
}
|
|
656
|
-
return
|
|
656
|
+
return ue(() => e.enumData, (g, y) => {
|
|
657
657
|
g !== y && (r.value = e.enumData);
|
|
658
|
-
}), () =>
|
|
658
|
+
}), () => k("div", {
|
|
659
659
|
class: "f-radio-button"
|
|
660
|
-
}, [
|
|
660
|
+
}, [k("div", {
|
|
661
661
|
class: ["farris-input-wrap"]
|
|
662
|
-
}, [r.value.map((g, y) =>
|
|
662
|
+
}, [r.value.map((g, y) => k(H, null, [k("label", {
|
|
663
663
|
class: g.active ? "btn btn-secondary active" : "btn btn-secondary",
|
|
664
|
-
onClick: (
|
|
665
|
-
}, [
|
|
664
|
+
onClick: (S) => s(S, g)
|
|
665
|
+
}, [k("span", {
|
|
666
666
|
class: "f-radio-button-text"
|
|
667
667
|
}, [v(g)])])]))])]);
|
|
668
668
|
}
|
|
@@ -671,19 +671,19 @@ const We = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
|
|
|
671
671
|
props: q,
|
|
672
672
|
emits: [""],
|
|
673
673
|
setup(e, t) {
|
|
674
|
-
return () =>
|
|
674
|
+
return () => k(H, null, null);
|
|
675
675
|
}
|
|
676
676
|
});
|
|
677
|
-
|
|
678
|
-
e["radio-button"] =
|
|
677
|
+
M.register = (e, t, r, s) => {
|
|
678
|
+
e["radio-button"] = M, t["radio-button"] = te;
|
|
679
679
|
};
|
|
680
|
-
|
|
680
|
+
M.registerDesigner = (e, t, r) => {
|
|
681
681
|
e["radio-button"] = rt, t["radio-button"] = te;
|
|
682
682
|
};
|
|
683
|
-
const
|
|
683
|
+
const pt = fe(M);
|
|
684
684
|
export {
|
|
685
|
-
|
|
686
|
-
|
|
685
|
+
M as RadioButton,
|
|
686
|
+
pt as default,
|
|
687
687
|
te as propsResolver,
|
|
688
688
|
q as radioButtonProps
|
|
689
689
|
};
|