@farris/ui-vue 1.6.5-beta.7 → 1.6.5
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 +360 -361
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +524 -520
- 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 +190 -181
- 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 +309 -309
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1125 -1124
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +472 -472
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3387 -3321
- 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 +177 -177
- 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 +644 -644
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1773 -1760
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +879 -869
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +1091 -1077
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +215 -215
- 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 +139 -141
- 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 +1387 -1383
- 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 +217 -217
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +283 -283
- 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 +194 -194
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +463 -462
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +883 -876
- 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 +59 -57
- 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 +739 -739
- 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 +535 -535
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1456 -1443
- 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 +1875 -1866
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +151 -147
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1236 -1233
- 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 +1097 -1083
- 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 +103 -98
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1596 -1593
- 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 +684 -684
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +935 -929
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +190 -192
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +124 -124
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2363 -2278
- 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 +227 -227
- 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/designer/button-edit/index.esm.js +353 -353
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +7 -3
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +38 -33
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +3562 -3536
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +3 -3
- package/designer/data-view/index.umd.cjs +3 -3
- package/designer/farris-designer.all.esm.js +4203 -4193
- package/designer/farris-designer.all.umd.cjs +9 -9
- package/designer/input-group/index.esm.js +97 -97
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1868 -1854
- package/designer/list-view/index.umd.cjs +8 -8
- package/designer/radio-group/index.esm.js +954 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +16195 -16126
- package/farris.all.umd.cjs +30 -30
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
|
@@ -2,78 +2,78 @@ var ve = Object.defineProperty;
|
|
|
2
2
|
var ge = (n, e, t) => e in n ? ve(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var F = (n, e, t) => ge(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { ref as q, computed as Q, defineComponent as X, inject as G, onMounted as he, createVNode as be } from "vue";
|
|
5
|
-
import {
|
|
5
|
+
import { cloneDeep as W, isPlainObject as J } from "lodash-es";
|
|
6
6
|
import { withInstall as ye } from "../common/index.esm.js";
|
|
7
|
-
import { getSchemaByTypeForDesigner as
|
|
7
|
+
import { getSchemaByTypeForDesigner as Se } from "../dynamic-resolver/index.esm.js";
|
|
8
8
|
function Y(n, e) {
|
|
9
9
|
let t;
|
|
10
10
|
function r(a) {
|
|
11
|
-
const { properties:
|
|
12
|
-
if (b && (!
|
|
13
|
-
const
|
|
14
|
-
v.id = `${
|
|
11
|
+
const { properties: f, title: b, ignore: c } = a, p = c && Array.isArray(c), v = Object.keys(f).reduce((E, w) => ((!p || !c.find((V) => V === w)) && (E[w] = f[w].type === "object" && f[w].properties ? r(f[w]) : W(f[w].default)), E), {});
|
|
12
|
+
if (b && (!p || !c.find((E) => E === "id"))) {
|
|
13
|
+
const E = b.toLowerCase().replace(/-/g, "_");
|
|
14
|
+
v.id = `${E}_${Math.random().toString().slice(2, 6)}`;
|
|
15
15
|
}
|
|
16
16
|
return v;
|
|
17
17
|
}
|
|
18
18
|
function o(a) {
|
|
19
|
-
const { properties:
|
|
19
|
+
const { properties: f, title: b, required: c } = a;
|
|
20
20
|
if (c && Array.isArray(c)) {
|
|
21
|
-
const
|
|
21
|
+
const p = c.reduce((v, E) => (v[E] = f[E].type === "object" && f[E].properties ? r(f[E]) : W(f[E].default), v), {});
|
|
22
22
|
if (b && c.find((v) => v === "id")) {
|
|
23
23
|
const v = b.toLowerCase().replace(/-/g, "_");
|
|
24
|
-
|
|
24
|
+
p.id = `${v}_${Math.random().toString().slice(2, 6)}`;
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return p;
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
29
|
type: b
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function s(a,
|
|
32
|
+
function s(a, f = {}, b) {
|
|
33
33
|
const c = n[a];
|
|
34
34
|
if (c) {
|
|
35
|
-
let
|
|
35
|
+
let p = o(c);
|
|
36
36
|
const v = e[a];
|
|
37
|
-
return
|
|
37
|
+
return p = v ? v({ getSchemaByType: s }, p, f, b) : p, t != null && t.appendIdentifyForNewControl && t.appendIdentifyForNewControl(p), p;
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
41
|
-
function i(a,
|
|
42
|
-
const b = r(
|
|
43
|
-
return Object.keys(b).reduce((c,
|
|
41
|
+
function i(a, f) {
|
|
42
|
+
const b = r(f);
|
|
43
|
+
return Object.keys(b).reduce((c, p) => (Object.prototype.hasOwnProperty.call(a, p) && (c[p] && J(c[p]) && J(a[p] || !a[p]) ? Object.assign(c[p], a[p] || {}) : c[p] = a[p]), c), b), b;
|
|
44
44
|
}
|
|
45
|
-
function g(a,
|
|
46
|
-
return Object.keys(a).filter((c) => a[c] != null).reduce((c,
|
|
47
|
-
if (
|
|
48
|
-
const v =
|
|
45
|
+
function g(a, f) {
|
|
46
|
+
return Object.keys(a).filter((c) => a[c] != null).reduce((c, p) => {
|
|
47
|
+
if (f.has(p)) {
|
|
48
|
+
const v = f.get(p);
|
|
49
49
|
if (typeof v == "string")
|
|
50
|
-
c[v] = a[
|
|
50
|
+
c[v] = a[p];
|
|
51
51
|
else {
|
|
52
|
-
const
|
|
53
|
-
Object.assign(c,
|
|
52
|
+
const E = v(p, a[p], a);
|
|
53
|
+
Object.assign(c, E);
|
|
54
54
|
}
|
|
55
55
|
} else
|
|
56
|
-
c[
|
|
56
|
+
c[p] = a[p];
|
|
57
57
|
return c;
|
|
58
58
|
}, {});
|
|
59
59
|
}
|
|
60
|
-
function u(a,
|
|
61
|
-
const c = i(a,
|
|
60
|
+
function u(a, f, b = /* @__PURE__ */ new Map()) {
|
|
61
|
+
const c = i(a, f);
|
|
62
62
|
return g(c, b);
|
|
63
63
|
}
|
|
64
64
|
function l(a) {
|
|
65
65
|
var b;
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
const c = n[
|
|
66
|
+
const f = a.type;
|
|
67
|
+
if (f) {
|
|
68
|
+
const c = n[f];
|
|
69
69
|
if (!c)
|
|
70
70
|
return a;
|
|
71
|
-
const
|
|
71
|
+
const p = i(a, c), v = ((b = a.editor) == null ? void 0 : b.type) || "";
|
|
72
72
|
if (v) {
|
|
73
|
-
const
|
|
74
|
-
|
|
73
|
+
const E = n[v], w = i(a.editor, E);
|
|
74
|
+
p.editor = w;
|
|
75
75
|
}
|
|
76
|
-
return
|
|
76
|
+
return p;
|
|
77
77
|
}
|
|
78
78
|
return a;
|
|
79
79
|
}
|
|
@@ -82,24 +82,24 @@ function Y(n, e) {
|
|
|
82
82
|
}
|
|
83
83
|
return { getSchemaByType: s, resolveSchemaWithDefaultValue: l, resolveSchemaToProps: u, mappingSchemaToProps: g, setDesignerContext: d };
|
|
84
84
|
}
|
|
85
|
-
const Z = {}, I = {}, { resolveSchemaWithDefaultValue:
|
|
86
|
-
function
|
|
87
|
-
function e(l, d, a,
|
|
85
|
+
const Z = {}, I = {}, { getSchemaByType: bt, resolveSchemaWithDefaultValue: Ee, resolveSchemaToProps: Te, mappingSchemaToProps: we, setDesignerContext: yt } = Y(Z, I);
|
|
86
|
+
function Me(n = {}) {
|
|
87
|
+
function e(l, d, a, f) {
|
|
88
88
|
if (typeof a == "number")
|
|
89
|
-
return
|
|
89
|
+
return f[l].length === a;
|
|
90
90
|
if (typeof a == "object") {
|
|
91
91
|
const b = Object.keys(a)[0], c = a[b];
|
|
92
92
|
if (b === "not")
|
|
93
|
-
return Number(
|
|
93
|
+
return Number(f[l].length) !== Number(c);
|
|
94
94
|
if (b === "moreThan")
|
|
95
|
-
return Number(
|
|
95
|
+
return Number(f[l].length) >= Number(c);
|
|
96
96
|
if (b === "lessThan")
|
|
97
|
-
return Number(
|
|
97
|
+
return Number(f[l].length) <= Number(c);
|
|
98
98
|
}
|
|
99
99
|
return !1;
|
|
100
100
|
}
|
|
101
|
-
function t(l, d, a,
|
|
102
|
-
return
|
|
101
|
+
function t(l, d, a, f) {
|
|
102
|
+
return f[l] && f[l].propertyValue && String(f[l].propertyValue.value) === String(a);
|
|
103
103
|
}
|
|
104
104
|
const r = /* @__PURE__ */ new Map([
|
|
105
105
|
["length", e],
|
|
@@ -108,16 +108,16 @@ function Te(n = {}) {
|
|
|
108
108
|
Object.keys(n).reduce((l, d) => (l.set(d, n[d]), l), r);
|
|
109
109
|
function o(l, d) {
|
|
110
110
|
const a = l;
|
|
111
|
-
return typeof d == "number" ? [{ target: a, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: a, operator: "getProperty", param: l, value: !!d }] : typeof d == "object" ? Object.keys(d).map((
|
|
112
|
-
if (
|
|
113
|
-
return { target: a, operator: "length", param: null, value: d[
|
|
114
|
-
const b =
|
|
111
|
+
return typeof d == "number" ? [{ target: a, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: a, operator: "getProperty", param: l, value: !!d }] : typeof d == "object" ? Object.keys(d).map((f) => {
|
|
112
|
+
if (f === "length")
|
|
113
|
+
return { target: a, operator: "length", param: null, value: d[f] };
|
|
114
|
+
const b = f, c = d[f];
|
|
115
115
|
return { target: a, operator: "getProperty", param: b, value: c };
|
|
116
116
|
}) : [];
|
|
117
117
|
}
|
|
118
118
|
function s(l) {
|
|
119
|
-
return Object.keys(l).reduce((a,
|
|
120
|
-
const b = o(
|
|
119
|
+
return Object.keys(l).reduce((a, f) => {
|
|
120
|
+
const b = o(f, l[f]);
|
|
121
121
|
return a.push(...b), a;
|
|
122
122
|
}, []);
|
|
123
123
|
}
|
|
@@ -132,8 +132,8 @@ function Te(n = {}) {
|
|
|
132
132
|
return s(l).reduce((b, c) => b && i(c, d), !0);
|
|
133
133
|
}
|
|
134
134
|
function u(l, d) {
|
|
135
|
-
const a = Object.keys(l),
|
|
136
|
-
return
|
|
135
|
+
const a = Object.keys(l), f = a.includes("allOf"), b = a.includes("anyOf"), c = f || b, E = (c ? l[c ? f ? "allOf" : "anyOf" : "allOf"] : [l]).map((V) => g(V, d));
|
|
136
|
+
return f ? !E.includes(!1) : E.includes(!0);
|
|
137
137
|
}
|
|
138
138
|
return { parseValueSchema: u };
|
|
139
139
|
}
|
|
@@ -238,7 +238,7 @@ const Pe = {
|
|
|
238
238
|
}
|
|
239
239
|
return "none";
|
|
240
240
|
}
|
|
241
|
-
},
|
|
241
|
+
}, xe = {
|
|
242
242
|
convertTo: (n, e, t, r) => {
|
|
243
243
|
n.command ? n.command[e] = t : n.command = {
|
|
244
244
|
[e]: t
|
|
@@ -256,7 +256,7 @@ const Pe = {
|
|
|
256
256
|
]));
|
|
257
257
|
},
|
|
258
258
|
convertFrom: (n, e, t) => n.command && e === "enable" ? n.command.enable : ""
|
|
259
|
-
},
|
|
259
|
+
}, Oe = {
|
|
260
260
|
convertTo: (n, e, t, r) => {
|
|
261
261
|
n.column ? n.column[e] = t : n.column = {
|
|
262
262
|
[e]: t
|
|
@@ -387,8 +387,8 @@ function R(n, e, t) {
|
|
|
387
387
|
["/converter/type.converter", Ve],
|
|
388
388
|
["/converter/change-editor.converter", Ne],
|
|
389
389
|
["/converter/change-formatter.converter", ke],
|
|
390
|
-
["/converter/column-command.converter",
|
|
391
|
-
["/converter/column-option.converter",
|
|
390
|
+
["/converter/column-command.converter", xe],
|
|
391
|
+
["/converter/column-option.converter", Oe],
|
|
392
392
|
["/converter/summary.converter", Be],
|
|
393
393
|
["/converter/group.converter", De],
|
|
394
394
|
["/converter/form-group-label.converter", Le],
|
|
@@ -425,75 +425,75 @@ function R(n, e, t) {
|
|
|
425
425
|
["array", { type: "button-edit" }],
|
|
426
426
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
427
427
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
428
|
-
]), s =
|
|
429
|
-
function i(c,
|
|
430
|
-
return () => s.parseValueSchema(c,
|
|
428
|
+
]), s = Me();
|
|
429
|
+
function i(c, p) {
|
|
430
|
+
return () => s.parseValueSchema(c, p);
|
|
431
431
|
}
|
|
432
|
-
function g(c,
|
|
433
|
-
return c.includes("visible") &&
|
|
432
|
+
function g(c, p, v) {
|
|
433
|
+
return c.includes("visible") && p.visible !== void 0 ? typeof p.visible == "boolean" ? () => !!p.visible : p.visible === void 0 ? !0 : i(p.visible, v) : () => !0;
|
|
434
434
|
}
|
|
435
|
-
function u(c,
|
|
436
|
-
return c.includes("readonly") &&
|
|
435
|
+
function u(c, p, v) {
|
|
436
|
+
return c.includes("readonly") && p.readonly !== void 0 ? typeof p.readonly == "boolean" ? () => !!p.readonly : i(p.readonly, v) : () => !1;
|
|
437
437
|
}
|
|
438
|
-
function l(c,
|
|
439
|
-
const v = c.$converter ||
|
|
438
|
+
function l(c, p) {
|
|
439
|
+
const v = c.$converter || p;
|
|
440
440
|
return typeof v == "string" && v && r.has(v) ? r.get(v) || null : v || null;
|
|
441
441
|
}
|
|
442
|
-
function d(c,
|
|
443
|
-
return Object.keys(c).map((
|
|
444
|
-
const B = q(1), D =
|
|
445
|
-
|
|
446
|
-
const
|
|
447
|
-
let C = l(h,
|
|
442
|
+
function d(c, p, v, E, w, V = "", O = "") {
|
|
443
|
+
return Object.keys(c).map((M) => {
|
|
444
|
+
const B = q(1), D = M, h = c[M], N = Object.keys(h), j = h.title, m = h.type, y = o.get(m) || { type: "input-group", enableClear: !1 }, S = h.editor ? Object.assign({}, y, h.editor) : Object.assign({}, y), T = g(N, h, p), P = u(N, h, p);
|
|
445
|
+
S.readonly = S.readonly === void 0 ? P() : S.readonly;
|
|
446
|
+
const x = h.type === "cascade" ? d(h.properties, p, v, E, w, V, O) : [], A = !0;
|
|
447
|
+
let C = l(h, O);
|
|
448
448
|
const $ = Q({
|
|
449
449
|
get() {
|
|
450
450
|
if (B.value) {
|
|
451
451
|
if (["class", "style"].find((me) => me === D) && !C && (C = r.get("/converter/appearance.converter") || null), C && C.convertFrom)
|
|
452
|
-
return C.convertFrom(v,
|
|
453
|
-
const U = v[
|
|
452
|
+
return C.convertFrom(v, M, w, V);
|
|
453
|
+
const U = v[M];
|
|
454
454
|
return Object.prototype.hasOwnProperty.call(h, "defaultValue") && (U === void 0 || typeof U == "string" && U === "") ? h.type === "boolean" ? h.defaultValue : h.defaultValue || "" : U;
|
|
455
455
|
}
|
|
456
456
|
return null;
|
|
457
457
|
},
|
|
458
458
|
set(U) {
|
|
459
|
-
B.value += 1, C && C.convertTo ? (C.convertTo(
|
|
459
|
+
B.value += 1, C && C.convertTo ? (C.convertTo(E, M, U, w, V), C.convertTo(v, M, U, w, V)) : (E[M] = U, v[M] = U);
|
|
460
460
|
}
|
|
461
|
-
}), { refreshPanelAfterChanged: L, description:
|
|
462
|
-
return
|
|
461
|
+
}), { refreshPanelAfterChanged: L, description: pe, isExpand: fe, parentPropertyID: de } = h, H = { propertyID: D, propertyName: j, propertyType: m, propertyValue: $, editor: S, visible: T, readonly: P, cascadeConfig: x, hideCascadeTitle: A, refreshPanelAfterChanged: L, description: pe, isExpand: fe, parentPropertyID: de };
|
|
462
|
+
return p[D] = H, H;
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
function a(c,
|
|
466
|
-
const
|
|
467
|
-
return
|
|
468
|
-
const k =
|
|
469
|
-
return { categoryId:
|
|
465
|
+
function a(c, p, v = {}) {
|
|
466
|
+
const E = {}, w = n[c];
|
|
467
|
+
return w && w.categories ? Object.keys(w.categories).map((O) => {
|
|
468
|
+
const k = w.categories[O], M = k == null ? void 0 : k.title, B = d(k.properties || {}, E, {}, v, p);
|
|
469
|
+
return { categoryId: O, categoryName: M, properties: B };
|
|
470
470
|
}) : [];
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
const V =
|
|
472
|
+
function f(c, p, v, E, w = "") {
|
|
473
|
+
const V = p.$ref.schema, O = p.$ref.converter, k = v[V], M = k.type, B = t(k), D = {}, h = n[M];
|
|
474
474
|
if (h && h.categories) {
|
|
475
475
|
const N = h.categories[c], j = N == null ? void 0 : N.title;
|
|
476
|
-
|
|
477
|
-
N.properties[
|
|
476
|
+
O && Object.keys(N.properties).forEach((S) => {
|
|
477
|
+
N.properties[S].$converter = O;
|
|
478
478
|
});
|
|
479
|
-
const m = (N == null ? void 0 : N.properties) || {}, y = d(m, D, B, k,
|
|
479
|
+
const m = (N == null ? void 0 : N.properties) || {}, y = d(m, D, B, k, E, w);
|
|
480
480
|
return { categoryId: c, categoryName: j, properties: y };
|
|
481
481
|
}
|
|
482
482
|
return { categoryId: c, categoryName: "", properties: [] };
|
|
483
483
|
}
|
|
484
|
-
function b(c,
|
|
485
|
-
const V = c.type,
|
|
486
|
-
let
|
|
487
|
-
if (
|
|
484
|
+
function b(c, p, v, E, w) {
|
|
485
|
+
const V = c.type, O = t(c), k = {};
|
|
486
|
+
let M = w || n[V];
|
|
487
|
+
if (M && Object.keys(M).length === 0 && v && v.getPropConfig && (M = v.getPropConfig(E)), M && M.categories) {
|
|
488
488
|
const B = [];
|
|
489
|
-
return Object.keys(
|
|
490
|
-
const h =
|
|
489
|
+
return Object.keys(M.categories).map((D) => {
|
|
490
|
+
const h = M.categories[D];
|
|
491
491
|
if (h.$ref) {
|
|
492
|
-
B.push(
|
|
492
|
+
B.push(f(D, h, c, p, E));
|
|
493
493
|
return;
|
|
494
494
|
}
|
|
495
|
-
const N = h == null ? void 0 : h.title, j = h == null ? void 0 : h.tabId, m = h == null ? void 0 : h.tabName, y = h == null ? void 0 : h.hide,
|
|
496
|
-
B.push({ categoryId: D, categoryName: N, tabId: j, tabName: m, hide: y, properties:
|
|
495
|
+
const N = h == null ? void 0 : h.title, j = h == null ? void 0 : h.tabId, m = h == null ? void 0 : h.tabName, y = h == null ? void 0 : h.hide, S = h == null ? void 0 : h.hideTitle, T = d(h.properties || {}, k, O, c, p, E, h.$converter), { setPropertyRelates: P } = h, x = h == null ? void 0 : h.parentPropertyID;
|
|
496
|
+
B.push({ categoryId: D, categoryName: N, tabId: j, tabName: m, hide: y, properties: T, hideTitle: S, setPropertyRelates: P, parentPropertyID: x });
|
|
497
497
|
}), B;
|
|
498
498
|
}
|
|
499
499
|
return [];
|
|
@@ -505,14 +505,14 @@ function R(n, e, t) {
|
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
507
|
const K = {}, ee = {};
|
|
508
|
-
R(K, ee,
|
|
509
|
-
const te = {}, ne = {}, { resolveSchemaWithDefaultValue: Je } = Y(te, ne), re = {}, oe = {};
|
|
508
|
+
R(K, ee, Ee);
|
|
509
|
+
const te = {}, ne = {}, { getSchemaByType: St, resolveSchemaWithDefaultValue: Je, resolveSchemaToProps: Et, mappingSchemaToProps: Tt, setDesignerContext: wt } = Y(te, ne), re = {}, oe = {};
|
|
510
510
|
R(re, oe, Je);
|
|
511
511
|
function ie(n, e, t = /* @__PURE__ */ new Map(), r = (i, g, u, l) => g, o = {}, s = (i) => i) {
|
|
512
512
|
return Z[e.title] = e, I[e.title] = r, K[e.title] = o, ee[e.title] = s, te[e.title] = e, ne[e.title] = r, re[e.title] = o, oe[e.title] = s, (i = {}, g = !0) => {
|
|
513
513
|
if (!g)
|
|
514
|
-
return
|
|
515
|
-
const u =
|
|
514
|
+
return we(i, t);
|
|
515
|
+
const u = Te(i, e, t), l = Object.keys(n).reduce((d, a) => (d[a] = n[a].default, d), {});
|
|
516
516
|
return Object.assign(l, u);
|
|
517
517
|
};
|
|
518
518
|
}
|
|
@@ -590,18 +590,18 @@ function rt(n, e, t) {
|
|
|
590
590
|
return null;
|
|
591
591
|
if (m.value.schema && m.value.schema.type === "component")
|
|
592
592
|
return m.value;
|
|
593
|
-
const y = q(m == null ? void 0 : m.value.parent),
|
|
594
|
-
return
|
|
593
|
+
const y = q(m == null ? void 0 : m.value.parent), S = a(y);
|
|
594
|
+
return S || null;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function f(m = e) {
|
|
597
597
|
var P;
|
|
598
598
|
if (t != null && t.getDraggableDesignItemElement)
|
|
599
599
|
return t.getDraggableDesignItemElement(m);
|
|
600
|
-
const { componentInstance: y, designerItemElementRef:
|
|
600
|
+
const { componentInstance: y, designerItemElementRef: S } = m;
|
|
601
601
|
if (!y || !y.value)
|
|
602
602
|
return null;
|
|
603
|
-
const { getCustomButtons:
|
|
604
|
-
return y.value.canMove ||
|
|
603
|
+
const { getCustomButtons: T } = y.value;
|
|
604
|
+
return y.value.canMove || T && ((P = T()) != null && P.length) ? S : f(m.parent);
|
|
605
605
|
}
|
|
606
606
|
function b(m) {
|
|
607
607
|
return !!t && t.canAccepts(m);
|
|
@@ -609,49 +609,49 @@ function rt(n, e, t) {
|
|
|
609
609
|
function c() {
|
|
610
610
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function p() {
|
|
613
613
|
}
|
|
614
614
|
function v(m, y) {
|
|
615
|
-
var
|
|
616
|
-
!m || !y || (t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(m, y), (
|
|
615
|
+
var S;
|
|
616
|
+
!m || !y || (t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(m, y), (S = e == null ? void 0 : e.setupContext) == null || S.emit("dragEnd"));
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
const { componentType:
|
|
620
|
-
let
|
|
621
|
-
t && t.onResolveNewComponentSchema && (
|
|
622
|
-
const P =
|
|
623
|
-
return
|
|
618
|
+
function E(m, y) {
|
|
619
|
+
const { componentType: S } = m;
|
|
620
|
+
let T = Se(S, m, y);
|
|
621
|
+
t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(m, T));
|
|
622
|
+
const P = S.toLowerCase().replace(/-/g, "_");
|
|
623
|
+
return T && !T.id && T.type === S && (T.id = `${P}_${Math.random().toString().slice(2, 6)}`), T;
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function w(m) {
|
|
626
626
|
m && t != null && t.onChildElementMovedOut && t.onChildElementMovedOut(m);
|
|
627
627
|
}
|
|
628
628
|
function V(...m) {
|
|
629
629
|
if (t && t.getPropsConfig)
|
|
630
630
|
return t.getPropsConfig(...m);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function O(m) {
|
|
633
633
|
if (!m)
|
|
634
634
|
return;
|
|
635
|
-
const y = e == null ? void 0 : e.schema, { formSchemaUtils:
|
|
636
|
-
if (y &&
|
|
637
|
-
const
|
|
638
|
-
|
|
635
|
+
const y = e == null ? void 0 : e.schema, { formSchemaUtils: S } = m;
|
|
636
|
+
if (y && S.getExpressions().length) {
|
|
637
|
+
const T = S.getExpressions().findIndex((P) => P.target === y.id);
|
|
638
|
+
T > -1 && S.getExpressions().splice(T, 1);
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
function k(m) {
|
|
642
642
|
if (!m || !(e != null && e.schema))
|
|
643
643
|
return;
|
|
644
|
-
const y = e.schema, { formSchemaUtils:
|
|
645
|
-
|
|
646
|
-
}
|
|
647
|
-
function
|
|
648
|
-
t && t.onRemoveComponent && t.onRemoveComponent(),
|
|
649
|
-
let
|
|
650
|
-
y.type === "component-ref" && (
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
var
|
|
654
|
-
(
|
|
644
|
+
const y = e.schema, { formSchemaUtils: S } = m;
|
|
645
|
+
S.removeCommunicationInComponent(y);
|
|
646
|
+
}
|
|
647
|
+
function M(m) {
|
|
648
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), O(m), k(m), e != null && e.schema.contents && e.schema.contents.map((y) => {
|
|
649
|
+
let S = y.id;
|
|
650
|
+
y.type === "component-ref" && (S = y.component);
|
|
651
|
+
const T = n.value.querySelectorAll(`#${S}-design-item`);
|
|
652
|
+
T != null && T.length && Array.from(T).map((P) => {
|
|
653
|
+
var x;
|
|
654
|
+
(x = P == null ? void 0 : P.componentInstance) != null && x.value.onRemoveComponent && P.componentInstance.value.onRemoveComponent(m);
|
|
655
655
|
});
|
|
656
656
|
});
|
|
657
657
|
}
|
|
@@ -660,8 +660,8 @@ function rt(n, e, t) {
|
|
|
660
660
|
return t.getCustomButtons();
|
|
661
661
|
}
|
|
662
662
|
function D(m) {
|
|
663
|
-
var
|
|
664
|
-
if (!((
|
|
663
|
+
var S, T;
|
|
664
|
+
if (!((S = e == null ? void 0 : e.schema) != null && S.id))
|
|
665
665
|
return;
|
|
666
666
|
if (!i && m && (i = m.formSchemaUtils), t != null && t.setComponentBasicInfoMap) {
|
|
667
667
|
t.setComponentBasicInfoMap();
|
|
@@ -671,8 +671,8 @@ function rt(n, e, t) {
|
|
|
671
671
|
if (t != null && t.getComponentTitle)
|
|
672
672
|
y = t.getComponentTitle();
|
|
673
673
|
else {
|
|
674
|
-
const { text: P, title:
|
|
675
|
-
y = P ||
|
|
674
|
+
const { text: P, title: x, label: A, mainTitle: C, name: $, type: L } = e.schema;
|
|
675
|
+
y = P || x || A || C || $ || ((T = z[L]) == null ? void 0 : T.name);
|
|
676
676
|
}
|
|
677
677
|
y && i.getControlBasicInfoMap().set(e.schema.id, {
|
|
678
678
|
componentTitle: y,
|
|
@@ -681,15 +681,15 @@ function rt(n, e, t) {
|
|
|
681
681
|
}
|
|
682
682
|
function h(m) {
|
|
683
683
|
var P;
|
|
684
|
-
const { changeObject: y } = m, { propertyID:
|
|
685
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((P = m == null ? void 0 : m.changeObject) == null ? void 0 : P.propertyID) &&
|
|
686
|
-
const
|
|
684
|
+
const { changeObject: y } = m, { propertyID: S, propertyValue: T } = y;
|
|
685
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((P = m == null ? void 0 : m.changeObject) == null ? void 0 : P.propertyID) && S && T && (D(), i)) {
|
|
686
|
+
const x = i.getControlBasicInfoMap(), A = x.keys().toArray().filter((C) => {
|
|
687
687
|
var $, L;
|
|
688
|
-
return (($ =
|
|
688
|
+
return (($ = x.get(C)) == null ? void 0 : $.reliedComponentId) === ((L = e == null ? void 0 : e.schema) == null ? void 0 : L.id);
|
|
689
689
|
});
|
|
690
690
|
A != null && A.length && A.forEach((C) => {
|
|
691
|
-
const $ =
|
|
692
|
-
$[0] =
|
|
691
|
+
const $ = x.get(C).parentPathName.split(" > ");
|
|
692
|
+
$[0] = T, x.get(C).parentPathName = $.join(" > ");
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
}
|
|
@@ -710,16 +710,16 @@ function rt(n, e, t) {
|
|
|
710
710
|
designerClass: o,
|
|
711
711
|
canAccepts: b,
|
|
712
712
|
getBelongedComponentInstance: a,
|
|
713
|
-
getDraggableDesignItemElement:
|
|
713
|
+
getDraggableDesignItemElement: f,
|
|
714
714
|
getDraggingDisplayText: c,
|
|
715
715
|
getPropConfig: V,
|
|
716
|
-
getDragScopeElement:
|
|
716
|
+
getDragScopeElement: p,
|
|
717
717
|
onAcceptMovedChildElement: v,
|
|
718
|
-
onChildElementMovedOut:
|
|
719
|
-
addNewChildComponentSchema:
|
|
718
|
+
onChildElementMovedOut: w,
|
|
719
|
+
addNewChildComponentSchema: E,
|
|
720
720
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || q(!1),
|
|
721
721
|
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || q(!1),
|
|
722
|
-
onRemoveComponent:
|
|
722
|
+
onRemoveComponent: M,
|
|
723
723
|
getCustomButtons: B,
|
|
724
724
|
onPropertyChanged: N,
|
|
725
725
|
setComponentBasicInfoMap: D,
|
|
@@ -986,8 +986,8 @@ class ct {
|
|
|
986
986
|
onSubmitModal: (d) => {
|
|
987
987
|
const a = this.updateExpression(e, t, d, i);
|
|
988
988
|
if (o) {
|
|
989
|
-
const
|
|
990
|
-
o(
|
|
989
|
+
const f = this.buildRule(g, d, i);
|
|
990
|
+
o(f);
|
|
991
991
|
}
|
|
992
992
|
return a;
|
|
993
993
|
}
|
|
@@ -1142,26 +1142,26 @@ class lt {
|
|
|
1142
1142
|
* @returns
|
|
1143
1143
|
*/
|
|
1144
1144
|
getPropertyEditorParams(e, t = [], r = "visible", o = {}, s = {}, i = "") {
|
|
1145
|
-
const { getVariables: g, getControlName: u, getStateMachines: l } = at(this.designerHostService), d = this.getRealTargetType(e), a = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"],
|
|
1145
|
+
const { getVariables: g, getControlName: u, getStateMachines: l } = at(this.designerHostService), d = this.getRealTargetType(e), a = t && t.length > 0 ? t : ["Const", "Variable", "StateMachine", "Expression"], f = {
|
|
1146
1146
|
type: "property-editor",
|
|
1147
1147
|
propertyTypes: a
|
|
1148
1148
|
};
|
|
1149
1149
|
return a.map((b) => {
|
|
1150
1150
|
switch (b) {
|
|
1151
1151
|
case "Const":
|
|
1152
|
-
Object.assign(
|
|
1152
|
+
Object.assign(f, {
|
|
1153
1153
|
constType: "enum",
|
|
1154
1154
|
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
|
|
1155
1155
|
}, o);
|
|
1156
1156
|
break;
|
|
1157
1157
|
case "Expression":
|
|
1158
|
-
|
|
1158
|
+
f.expressionConfig = this.getExpressionOptions(e, d, i || r);
|
|
1159
1159
|
break;
|
|
1160
1160
|
case "StateMachine":
|
|
1161
|
-
|
|
1161
|
+
f.stateMachines = l();
|
|
1162
1162
|
break;
|
|
1163
1163
|
case "Variable":
|
|
1164
|
-
Object.assign(
|
|
1164
|
+
Object.assign(f, {
|
|
1165
1165
|
controlName: u(e),
|
|
1166
1166
|
newVariablePrefix: "is",
|
|
1167
1167
|
newVariableType: "Boolean",
|
|
@@ -1172,7 +1172,7 @@ class lt {
|
|
|
1172
1172
|
}, s);
|
|
1173
1173
|
break;
|
|
1174
1174
|
}
|
|
1175
|
-
}),
|
|
1175
|
+
}), f;
|
|
1176
1176
|
}
|
|
1177
1177
|
getVisibleProperty(e, t = "") {
|
|
1178
1178
|
var s;
|
|
@@ -1265,14 +1265,14 @@ class lt {
|
|
|
1265
1265
|
const t = e.propertyValue;
|
|
1266
1266
|
if (!((t && t.type) === "Expression" && t.expressionInfo))
|
|
1267
1267
|
return;
|
|
1268
|
-
const { expressionId: s, expressionInfo: i } = t, { targetId: g, targetType: u, expressionType: l, value: d, message: a } = i,
|
|
1269
|
-
|
|
1270
|
-
const { expressions: b } =
|
|
1268
|
+
const { expressionId: s, expressionInfo: i } = t, { targetId: g, targetType: u, expressionType: l, value: d, message: a } = i, f = this.formSchemaUtils.getModule();
|
|
1269
|
+
f.expressions = f.expressions || [];
|
|
1270
|
+
const { expressions: b } = f;
|
|
1271
1271
|
let c = b.find((v) => v.target === g);
|
|
1272
1272
|
c || (c = { target: g, rules: [], targetType: u }, b.push(c));
|
|
1273
|
-
const
|
|
1274
|
-
if (
|
|
1275
|
-
|
|
1273
|
+
const p = c.rules.find((v) => v.type === l);
|
|
1274
|
+
if (p)
|
|
1275
|
+
p.value = d, p.message = a;
|
|
1276
1276
|
else {
|
|
1277
1277
|
const v = { id: s, type: l, value: d, message: a };
|
|
1278
1278
|
c.rules.push(v);
|
|
@@ -1338,7 +1338,7 @@ class ut extends lt {
|
|
|
1338
1338
|
};
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function pt(n, e) {
|
|
1342
1342
|
function t() {
|
|
1343
1343
|
return !1;
|
|
1344
1344
|
}
|
|
@@ -1362,12 +1362,12 @@ function ft(n, e) {
|
|
|
1362
1362
|
checkCanMoveComponent: o
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
|
-
const
|
|
1365
|
+
const ft = /* @__PURE__ */ X({
|
|
1366
1366
|
name: "FHtmlTemplateDesign",
|
|
1367
1367
|
props: ue,
|
|
1368
1368
|
emits: [],
|
|
1369
1369
|
setup(n, e) {
|
|
1370
|
-
const t = q(), r = G("designer-host-service"), o = G("design-item-context"), s =
|
|
1370
|
+
const t = q(), r = G("designer-host-service"), o = G("design-item-context"), s = pt(o.schema, r), i = rt(t, o, s);
|
|
1371
1371
|
he(() => {
|
|
1372
1372
|
t.value.componentInstance = i;
|
|
1373
1373
|
}), e.expose(i.value);
|
|
@@ -1383,12 +1383,12 @@ _.register = (n, e, t, r) => {
|
|
|
1383
1383
|
n["html-template"] = _, e["html-template"] = tt;
|
|
1384
1384
|
};
|
|
1385
1385
|
_.registerDesigner = (n, e, t) => {
|
|
1386
|
-
n["html-template"] =
|
|
1386
|
+
n["html-template"] = ft, e["html-template"] = nt;
|
|
1387
1387
|
};
|
|
1388
|
-
const
|
|
1388
|
+
const Mt = ye(_);
|
|
1389
1389
|
export {
|
|
1390
1390
|
_ as FHtmlTemplate,
|
|
1391
|
-
|
|
1391
|
+
Mt as default,
|
|
1392
1392
|
nt as designPropsResolver,
|
|
1393
1393
|
ue as htmlTemplateDesignProps,
|
|
1394
1394
|
le as htmlTemplateProps,
|