@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,6 +1,6 @@
|
|
|
1
1
|
import { withInstall as Ee } from "../common/index.esm.js";
|
|
2
2
|
import { ref as S, computed as Q, defineComponent as ge, watch as Y, nextTick as se, createVNode as E, mergeProps as je, inject as Me, onMounted as Ne } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { cloneDeep as ve, isPlainObject as me } from "lodash-es";
|
|
4
4
|
import { getSchemaByTypeForDesigner as Re } from "../dynamic-resolver/index.esm.js";
|
|
5
5
|
function $e(e, t, n) {
|
|
6
6
|
return t;
|
|
@@ -8,7 +8,7 @@ function $e(e, t, n) {
|
|
|
8
8
|
function be(e, t) {
|
|
9
9
|
let n;
|
|
10
10
|
function f(r) {
|
|
11
|
-
const { properties: u, title: h, ignore: l } = r, o = l && Array.isArray(l), d = Object.keys(u).reduce((w, F) => ((!o || !l.find((N) => N === F)) && (w[F] = u[F].type === "object" && u[F].properties ? f(u[F]) :
|
|
11
|
+
const { properties: u, title: h, ignore: l } = r, o = l && Array.isArray(l), d = Object.keys(u).reduce((w, F) => ((!o || !l.find((N) => N === F)) && (w[F] = u[F].type === "object" && u[F].properties ? f(u[F]) : ve(u[F].default)), w), {});
|
|
12
12
|
if (h && (!o || !l.find((w) => w === "id"))) {
|
|
13
13
|
const w = h.toLowerCase().replace(/-/g, "_");
|
|
14
14
|
d.id = `${w}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -18,7 +18,7 @@ function be(e, t) {
|
|
|
18
18
|
function c(r) {
|
|
19
19
|
const { properties: u, title: h, required: l } = r;
|
|
20
20
|
if (l && Array.isArray(l)) {
|
|
21
|
-
const o = l.reduce((d, w) => (d[w] = u[w].type === "object" && u[w].properties ? f(u[w]) :
|
|
21
|
+
const o = l.reduce((d, w) => (d[w] = u[w].type === "object" && u[w].properties ? f(u[w]) : ve(u[w].default), d), {});
|
|
22
22
|
if (h && l.find((d) => d === "id")) {
|
|
23
23
|
const d = h.toLowerCase().replace(/-/g, "_");
|
|
24
24
|
o.id = `${d}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -29,18 +29,18 @@ function be(e, t) {
|
|
|
29
29
|
type: h
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function C(r, u = {}, h) {
|
|
33
33
|
const l = e[r];
|
|
34
34
|
if (l) {
|
|
35
35
|
let o = c(l);
|
|
36
36
|
const d = t[r];
|
|
37
|
-
return o = d ? d({ getSchemaByType:
|
|
37
|
+
return o = d ? d({ getSchemaByType: C }, o, u, h) : o, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(o), o;
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function P(r, u) {
|
|
42
42
|
const h = f(u);
|
|
43
|
-
return Object.keys(h).reduce((l, o) => (Object.prototype.hasOwnProperty.call(r, o) && (l[o] &&
|
|
43
|
+
return Object.keys(h).reduce((l, o) => (Object.prototype.hasOwnProperty.call(r, o) && (l[o] && me(l[o]) && me(r[o] || !r[o]) ? Object.assign(l[o], r[o] || {}) : l[o] = r[o]), l), h), h;
|
|
44
44
|
}
|
|
45
45
|
function $(r, u) {
|
|
46
46
|
return Object.keys(r).filter((l) => r[l] != null).reduce((l, o) => {
|
|
@@ -58,7 +58,7 @@ function be(e, t) {
|
|
|
58
58
|
}, {});
|
|
59
59
|
}
|
|
60
60
|
function L(r, u, h = /* @__PURE__ */ new Map()) {
|
|
61
|
-
const l =
|
|
61
|
+
const l = P(r, u);
|
|
62
62
|
return $(l, h);
|
|
63
63
|
}
|
|
64
64
|
function g(r) {
|
|
@@ -68,9 +68,9 @@ function be(e, t) {
|
|
|
68
68
|
const l = e[u];
|
|
69
69
|
if (!l)
|
|
70
70
|
return r;
|
|
71
|
-
const o =
|
|
71
|
+
const o = P(r, l), d = ((h = r.editor) == null ? void 0 : h.type) || "";
|
|
72
72
|
if (d) {
|
|
73
|
-
const w = e[d], F =
|
|
73
|
+
const w = e[d], F = P(r.editor, w);
|
|
74
74
|
o.editor = F;
|
|
75
75
|
}
|
|
76
76
|
return o;
|
|
@@ -80,9 +80,9 @@ function be(e, t) {
|
|
|
80
80
|
function b(r) {
|
|
81
81
|
n = r;
|
|
82
82
|
}
|
|
83
|
-
return { getSchemaByType:
|
|
83
|
+
return { getSchemaByType: C, resolveSchemaWithDefaultValue: g, resolveSchemaToProps: L, mappingSchemaToProps: $, setDesignerContext: b };
|
|
84
84
|
}
|
|
85
|
-
const ye = {}, he = {}, { resolveSchemaWithDefaultValue: Le, resolveSchemaToProps: qe, mappingSchemaToProps: We } = be(ye, he);
|
|
85
|
+
const ye = {}, he = {}, { getSchemaByType: Et, resolveSchemaWithDefaultValue: Le, resolveSchemaToProps: qe, mappingSchemaToProps: We, setDesignerContext: jt } = be(ye, he);
|
|
86
86
|
function ze(e = {}) {
|
|
87
87
|
function t(g, b, r, u) {
|
|
88
88
|
if (typeof r == "number")
|
|
@@ -115,13 +115,13 @@ function ze(e = {}) {
|
|
|
115
115
|
return { target: r, operator: "getProperty", param: h, value: l };
|
|
116
116
|
}) : [];
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function C(g) {
|
|
119
119
|
return Object.keys(g).reduce((r, u) => {
|
|
120
120
|
const h = c(u, g[u]);
|
|
121
121
|
return r.push(...h), r;
|
|
122
122
|
}, []);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function P(g, b) {
|
|
125
125
|
if (f.has(g.operator)) {
|
|
126
126
|
const r = f.get(g.operator);
|
|
127
127
|
return r && r(g.target, g.param, g.value, b) || !1;
|
|
@@ -129,7 +129,7 @@ function ze(e = {}) {
|
|
|
129
129
|
return !1;
|
|
130
130
|
}
|
|
131
131
|
function $(g, b) {
|
|
132
|
-
return
|
|
132
|
+
return C(g).reduce((h, l) => h && P(l, b), !0);
|
|
133
133
|
}
|
|
134
134
|
function L(g, b) {
|
|
135
135
|
const r = Object.keys(g), u = r.includes("allOf"), h = r.includes("anyOf"), l = u || h, w = (l ? g[l ? u ? "allOf" : "anyOf" : "allOf"] : [g]).map((N) => $(N, b));
|
|
@@ -137,12 +137,12 @@ function ze(e = {}) {
|
|
|
137
137
|
}
|
|
138
138
|
return { parseValueSchema: L };
|
|
139
139
|
}
|
|
140
|
-
const
|
|
140
|
+
const xe = {
|
|
141
141
|
convertTo: (e, t, n, f) => {
|
|
142
142
|
e.appearance || (e.appearance = {}), e.appearance[t] = n;
|
|
143
143
|
},
|
|
144
144
|
convertFrom: (e, t, n) => e.appearance ? e.appearance[t] : e[t]
|
|
145
|
-
},
|
|
145
|
+
}, _e = {
|
|
146
146
|
convertFrom: (e, t, n) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
147
147
|
}, Ge = {
|
|
148
148
|
convertTo: (e, t, n, f) => {
|
|
@@ -380,8 +380,8 @@ const _e = {
|
|
|
380
380
|
};
|
|
381
381
|
function Se(e, t, n) {
|
|
382
382
|
const f = /* @__PURE__ */ new Map([
|
|
383
|
-
["/converter/appearance.converter",
|
|
384
|
-
["/converter/buttons.converter",
|
|
383
|
+
["/converter/appearance.converter", xe],
|
|
384
|
+
["/converter/buttons.converter", _e],
|
|
385
385
|
["/converter/property-editor.converter", Ge],
|
|
386
386
|
["/converter/items-count.converter", tt],
|
|
387
387
|
["/converter/type.converter", Ue],
|
|
@@ -425,15 +425,15 @@ function Se(e, t, n) {
|
|
|
425
425
|
["array", { type: "button-edit" }],
|
|
426
426
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
427
427
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
428
|
-
]),
|
|
429
|
-
function
|
|
430
|
-
return () =>
|
|
428
|
+
]), C = ze();
|
|
429
|
+
function P(l, o) {
|
|
430
|
+
return () => C.parseValueSchema(l, o);
|
|
431
431
|
}
|
|
432
432
|
function $(l, o, d) {
|
|
433
|
-
return l.includes("visible") && o.visible !== void 0 ? typeof o.visible == "boolean" ? () => !!o.visible : o.visible === void 0 ? !0 :
|
|
433
|
+
return l.includes("visible") && o.visible !== void 0 ? typeof o.visible == "boolean" ? () => !!o.visible : o.visible === void 0 ? !0 : P(o.visible, d) : () => !0;
|
|
434
434
|
}
|
|
435
435
|
function L(l, o, d) {
|
|
436
|
-
return l.includes("readonly") && o.readonly !== void 0 ? typeof o.readonly == "boolean" ? () => !!o.readonly :
|
|
436
|
+
return l.includes("readonly") && o.readonly !== void 0 ? typeof o.readonly == "boolean" ? () => !!o.readonly : P(o.readonly, d) : () => !1;
|
|
437
437
|
}
|
|
438
438
|
function g(l, o) {
|
|
439
439
|
const d = l.$converter || o;
|
|
@@ -441,13 +441,13 @@ function Se(e, t, n) {
|
|
|
441
441
|
}
|
|
442
442
|
function b(l, o, d, w, F, N = "", W = "") {
|
|
443
443
|
return Object.keys(l).map((B) => {
|
|
444
|
-
const
|
|
444
|
+
const x = S(1), z = B, m = l[B], R = Object.keys(m), J = m.title, v = m.type, D = c.get(v) || { type: "input-group", enableClear: !1 }, k = m.editor ? Object.assign({}, D, m.editor) : Object.assign({}, D), O = $(R, m, o), A = L(R, m, o);
|
|
445
445
|
k.readonly = k.readonly === void 0 ? A() : k.readonly;
|
|
446
446
|
const q = m.type === "cascade" ? b(m.properties, o, d, w, F, N, W) : [], G = !0;
|
|
447
447
|
let M = g(m, W);
|
|
448
448
|
const U = Q({
|
|
449
449
|
get() {
|
|
450
|
-
if (
|
|
450
|
+
if (x.value) {
|
|
451
451
|
if (["class", "style"].find((re) => re === z) && !M && (M = f.get("/converter/appearance.converter") || null), M && M.convertFrom)
|
|
452
452
|
return M.convertFrom(d, B, F, N);
|
|
453
453
|
const X = d[B];
|
|
@@ -456,7 +456,7 @@ function Se(e, t, n) {
|
|
|
456
456
|
return null;
|
|
457
457
|
},
|
|
458
458
|
set(X) {
|
|
459
|
-
|
|
459
|
+
x.value += 1, M && M.convertTo ? (M.convertTo(w, B, X, F, N), M.convertTo(d, B, X, F, N)) : (w[B] = X, d[B] = X);
|
|
460
460
|
}
|
|
461
461
|
}), { refreshPanelAfterChanged: Z, description: te, isExpand: ne, parentPropertyID: ee } = m, K = { propertyID: z, propertyName: J, propertyType: v, propertyValue: U, editor: k, visible: O, readonly: A, cascadeConfig: q, hideCascadeTitle: G, refreshPanelAfterChanged: Z, description: te, isExpand: ne, parentPropertyID: ee };
|
|
462
462
|
return o[z] = K, K;
|
|
@@ -465,18 +465,18 @@ function Se(e, t, n) {
|
|
|
465
465
|
function r(l, o, d = {}) {
|
|
466
466
|
const w = {}, F = e[l];
|
|
467
467
|
return F && F.categories ? Object.keys(F.categories).map((W) => {
|
|
468
|
-
const j = F.categories[W], B = j == null ? void 0 : j.title,
|
|
469
|
-
return { categoryId: W, categoryName: B, properties:
|
|
468
|
+
const j = F.categories[W], B = j == null ? void 0 : j.title, x = b(j.properties || {}, w, {}, d, o);
|
|
469
|
+
return { categoryId: W, categoryName: B, properties: x };
|
|
470
470
|
}) : [];
|
|
471
471
|
}
|
|
472
472
|
function u(l, o, d, w, F = "") {
|
|
473
|
-
const N = o.$ref.schema, W = o.$ref.converter, j = d[N], B = j.type,
|
|
473
|
+
const N = o.$ref.schema, W = o.$ref.converter, j = d[N], B = j.type, x = n(j), z = {}, m = e[B];
|
|
474
474
|
if (m && m.categories) {
|
|
475
475
|
const R = m.categories[l], J = R == null ? void 0 : R.title;
|
|
476
476
|
W && Object.keys(R.properties).forEach((k) => {
|
|
477
477
|
R.properties[k].$converter = W;
|
|
478
478
|
});
|
|
479
|
-
const v = (R == null ? void 0 : R.properties) || {}, D = b(v, z,
|
|
479
|
+
const v = (R == null ? void 0 : R.properties) || {}, D = b(v, z, x, j, w, F);
|
|
480
480
|
return { categoryId: l, categoryName: J, properties: D };
|
|
481
481
|
}
|
|
482
482
|
return { categoryId: l, categoryName: "", properties: [] };
|
|
@@ -485,16 +485,16 @@ function Se(e, t, n) {
|
|
|
485
485
|
const N = l.type, W = n(l), j = {};
|
|
486
486
|
let B = F || e[N];
|
|
487
487
|
if (B && Object.keys(B).length === 0 && d && d.getPropConfig && (B = d.getPropConfig(w)), B && B.categories) {
|
|
488
|
-
const
|
|
488
|
+
const x = [];
|
|
489
489
|
return Object.keys(B.categories).map((z) => {
|
|
490
490
|
const m = B.categories[z];
|
|
491
491
|
if (m.$ref) {
|
|
492
|
-
|
|
492
|
+
x.push(u(z, m, l, o, w));
|
|
493
493
|
return;
|
|
494
494
|
}
|
|
495
495
|
const R = m == null ? void 0 : m.title, J = m == null ? void 0 : m.tabId, v = m == null ? void 0 : m.tabName, D = m == null ? void 0 : m.hide, k = m == null ? void 0 : m.hideTitle, O = b(m.properties || {}, j, W, l, o, w, m.$converter), { setPropertyRelates: A } = m, q = m == null ? void 0 : m.parentPropertyID;
|
|
496
|
-
|
|
497
|
-
}),
|
|
496
|
+
x.push({ categoryId: z, categoryName: R, tabId: J, tabName: v, hide: D, properties: O, hideTitle: k, setPropertyRelates: A, parentPropertyID: q });
|
|
497
|
+
}), x;
|
|
498
498
|
}
|
|
499
499
|
return [];
|
|
500
500
|
}
|
|
@@ -506,13 +506,13 @@ function Se(e, t, n) {
|
|
|
506
506
|
}
|
|
507
507
|
const we = {}, ke = {};
|
|
508
508
|
Se(we, ke, Le);
|
|
509
|
-
const De = {}, Be = {}, { resolveSchemaWithDefaultValue: ct } = be(De, Be), Fe = {}, Oe = {};
|
|
509
|
+
const De = {}, Be = {}, { getSchemaByType: Mt, resolveSchemaWithDefaultValue: ct, resolveSchemaToProps: Nt, mappingSchemaToProps: Rt, setDesignerContext: $t } = be(De, Be), Fe = {}, Oe = {};
|
|
510
510
|
Se(Fe, Oe, ct);
|
|
511
|
-
function st(e, t, n = /* @__PURE__ */ new Map(), f = (
|
|
512
|
-
return ye[t.title] = t, he[t.title] = f, we[t.title] = c, ke[t.title] =
|
|
511
|
+
function st(e, t, n = /* @__PURE__ */ new Map(), f = (P, $, L, g) => $, c = {}, C = (P) => P) {
|
|
512
|
+
return ye[t.title] = t, he[t.title] = f, we[t.title] = c, ke[t.title] = C, De[t.title] = t, Be[t.title] = f, Fe[t.title] = c, Oe[t.title] = C, (P = {}, $ = !0) => {
|
|
513
513
|
if (!$)
|
|
514
|
-
return We(
|
|
515
|
-
const L = qe(
|
|
514
|
+
return We(P, n);
|
|
515
|
+
const L = qe(P, t, n), g = Object.keys(e).reduce((b, r) => (b[r] = e[r].default, b), {});
|
|
516
516
|
return Object.assign(g, L);
|
|
517
517
|
};
|
|
518
518
|
}
|
|
@@ -638,32 +638,32 @@ const ft = /* @__PURE__ */ new Map([
|
|
|
638
638
|
draggable: { type: Boolean, default: !1 },
|
|
639
639
|
disable: { type: Boolean, default: !1 },
|
|
640
640
|
placeholder: { type: String, default: "" }
|
|
641
|
-
},
|
|
642
|
-
function
|
|
643
|
-
const c = S(-1),
|
|
644
|
-
function
|
|
641
|
+
}, Pe = st(ue, Dt, ft, $e, gt);
|
|
642
|
+
function Ce(e, t, n, f) {
|
|
643
|
+
const c = S(-1), C = S(!1);
|
|
644
|
+
function P(b, r, u) {
|
|
645
645
|
e.disable || (b.stopPropagation(), r && setTimeout(() => {
|
|
646
|
-
c.value = u,
|
|
646
|
+
c.value = u, C.value = !0, r.moving = !0;
|
|
647
647
|
}));
|
|
648
648
|
}
|
|
649
649
|
function $(b, r) {
|
|
650
|
-
if (
|
|
650
|
+
if (C.value && (b.preventDefault(), c.value !== r)) {
|
|
651
651
|
const u = f.value[c.value], h = f.value;
|
|
652
652
|
h.splice(c.value, 1), h.splice(r, 0, u), c.value = r;
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
function L(b, r) {
|
|
656
|
-
|
|
656
|
+
C.value && (b.preventDefault(), b.dataTransfer && (b.dataTransfer.dropEffect = "move"));
|
|
657
657
|
}
|
|
658
658
|
function g(b, r) {
|
|
659
|
-
r && (r.moving = !1), n.value = f.value.filter((u) => u.type === "Tag").map((u) => u.payload),
|
|
659
|
+
r && (r.moving = !1), n.value = f.value.filter((u) => u.type === "Tag").map((u) => u.payload), C.value = !1, t.emit("change", n.value);
|
|
660
660
|
}
|
|
661
661
|
return {
|
|
662
|
-
dragstart:
|
|
662
|
+
dragstart: P,
|
|
663
663
|
dragenter: $,
|
|
664
664
|
dragover: L,
|
|
665
665
|
dragend: g,
|
|
666
|
-
isDragging:
|
|
666
|
+
isDragging: C
|
|
667
667
|
};
|
|
668
668
|
}
|
|
669
669
|
const ae = /* @__PURE__ */ ge({
|
|
@@ -671,7 +671,7 @@ const ae = /* @__PURE__ */ ge({
|
|
|
671
671
|
props: ue,
|
|
672
672
|
emits: ["remove", "selectionChange", "change", "click"],
|
|
673
673
|
setup(e, t) {
|
|
674
|
-
const n = S(e.selectable), f = S(e.customClass), c = S(e.data),
|
|
674
|
+
const n = S(e.selectable), f = S(e.customClass), c = S(e.data), C = S(e.tagType), P = S(e.tagStyle), $ = S(e.showColor), L = S(e.customStyle), g = S(e.activeTag), b = S(e.addButtonText), r = S(), u = S(e.wrapText), h = S();
|
|
675
675
|
S(e.disable);
|
|
676
676
|
const l = S(!1);
|
|
677
677
|
function o() {
|
|
@@ -687,11 +687,11 @@ const ae = /* @__PURE__ */ ge({
|
|
|
687
687
|
function w(a) {
|
|
688
688
|
c.value = a, d.value = o();
|
|
689
689
|
}
|
|
690
|
-
const F = Q(() => d.value.findIndex((a) => a.type === "Input")), N =
|
|
690
|
+
const F = Q(() => d.value.findIndex((a) => a.type === "Input")), N = Ce(e, t, c, d), {
|
|
691
691
|
dragstart: W,
|
|
692
692
|
dragenter: j,
|
|
693
693
|
dragover: B,
|
|
694
|
-
dragend:
|
|
694
|
+
dragend: x
|
|
695
695
|
} = N;
|
|
696
696
|
Y(() => e.data, (a) => w(a)), Y(() => e.showAddButton, () => {
|
|
697
697
|
d.value = o();
|
|
@@ -700,9 +700,9 @@ const ae = /* @__PURE__ */ ge({
|
|
|
700
700
|
}), Y(() => e.activeTag, (a) => {
|
|
701
701
|
g.value = a;
|
|
702
702
|
}), Y(() => e.tagType, (a) => {
|
|
703
|
-
P.value = a;
|
|
704
|
-
}), Y(() => e.tagStyle, (a) => {
|
|
705
703
|
C.value = a;
|
|
704
|
+
}), Y(() => e.tagStyle, (a) => {
|
|
705
|
+
P.value = a;
|
|
706
706
|
}), Y(() => e.wrapText, (a) => {
|
|
707
707
|
u.value = a;
|
|
708
708
|
}), Y(() => e.addButtonText, (a) => {
|
|
@@ -730,12 +730,12 @@ const ae = /* @__PURE__ */ ge({
|
|
|
730
730
|
const s = {
|
|
731
731
|
"farris-tag-item": !0,
|
|
732
732
|
"farris-tag-item-checked": n.value && a.checked,
|
|
733
|
-
"farris-tag-item-checkable": !g.value && !
|
|
733
|
+
"farris-tag-item-checkable": !g.value && !C.value && n.value,
|
|
734
734
|
"farris-tag-item-has-color": $.value,
|
|
735
735
|
"farris-tag-item-actived": g.value === a.name
|
|
736
736
|
};
|
|
737
|
-
if (
|
|
738
|
-
const T = `farris-tag-item-${
|
|
737
|
+
if (C.value) {
|
|
738
|
+
const T = `farris-tag-item-${C.value}`;
|
|
739
739
|
s[T] = !0;
|
|
740
740
|
}
|
|
741
741
|
return s;
|
|
@@ -841,7 +841,7 @@ const ae = /* @__PURE__ */ ge({
|
|
|
841
841
|
draggable: "false",
|
|
842
842
|
onDragstart: (T) => W(T, a, s),
|
|
843
843
|
onDragenter: (T) => j(T, s),
|
|
844
|
-
onDragend: (T) =>
|
|
844
|
+
onDragend: (T) => x(T, a),
|
|
845
845
|
onDragover: (T) => B(T, s)
|
|
846
846
|
}, [E("span", {
|
|
847
847
|
title: a.name,
|
|
@@ -868,7 +868,7 @@ const ae = /* @__PURE__ */ ge({
|
|
|
868
868
|
const ee = Q(() => ({
|
|
869
869
|
"h-100": !0,
|
|
870
870
|
"farris-tags-item-container": !0,
|
|
871
|
-
"farris-tag-item-capsule":
|
|
871
|
+
"farris-tag-item-capsule": P.value === "capsule"
|
|
872
872
|
}));
|
|
873
873
|
function K(a) {
|
|
874
874
|
const s = Math.max(r.value.scrollLeft - a.deltaX, 0);
|
|
@@ -904,8 +904,8 @@ const ae = /* @__PURE__ */ ge({
|
|
|
904
904
|
});
|
|
905
905
|
function Bt(e, t, n) {
|
|
906
906
|
var J;
|
|
907
|
-
const f = "", c = "",
|
|
908
|
-
let
|
|
907
|
+
const f = "", c = "", C = S();
|
|
908
|
+
let P;
|
|
909
909
|
function $() {
|
|
910
910
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
911
911
|
}
|
|
@@ -935,7 +935,7 @@ function Bt(e, t, n) {
|
|
|
935
935
|
return D.value.canMove || O && ((A = O()) != null && A.length) ? k : u(v.parent);
|
|
936
936
|
}
|
|
937
937
|
function h(v) {
|
|
938
|
-
return
|
|
938
|
+
return !!n;
|
|
939
939
|
}
|
|
940
940
|
function l() {
|
|
941
941
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
@@ -982,19 +982,19 @@ function Bt(e, t, n) {
|
|
|
982
982
|
});
|
|
983
983
|
});
|
|
984
984
|
}
|
|
985
|
-
function
|
|
985
|
+
function x() {
|
|
986
986
|
}
|
|
987
987
|
function z(v) {
|
|
988
988
|
var k, O;
|
|
989
989
|
if (!((k = t == null ? void 0 : t.schema) != null && k.id))
|
|
990
990
|
return;
|
|
991
|
-
!
|
|
991
|
+
!P && v && (P = v.formSchemaUtils);
|
|
992
992
|
let D = "";
|
|
993
993
|
{
|
|
994
994
|
const { text: A, title: q, label: G, mainTitle: M, name: U, type: Z } = t.schema;
|
|
995
995
|
D = A || q || G || M || U || ((O = Te[Z]) == null ? void 0 : O.name);
|
|
996
996
|
}
|
|
997
|
-
D &&
|
|
997
|
+
D && P.getControlBasicInfoMap().set(t.schema.id, {
|
|
998
998
|
componentTitle: D,
|
|
999
999
|
parentPathName: D
|
|
1000
1000
|
});
|
|
@@ -1002,8 +1002,8 @@ function Bt(e, t, n) {
|
|
|
1002
1002
|
function m(v) {
|
|
1003
1003
|
var A;
|
|
1004
1004
|
const { changeObject: D } = v, { propertyID: k, propertyValue: O } = D;
|
|
1005
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((A = v == null ? void 0 : v.changeObject) == null ? void 0 : A.propertyID) && k && O && (z(),
|
|
1006
|
-
const q =
|
|
1005
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((A = v == null ? void 0 : v.changeObject) == null ? void 0 : A.propertyID) && k && O && (z(), P)) {
|
|
1006
|
+
const q = P.getControlBasicInfoMap(), G = q.keys().toArray().filter((M) => {
|
|
1007
1007
|
var U, Z;
|
|
1008
1008
|
return ((U = q.get(M)) == null ? void 0 : U.reliedComponentId) === ((Z = t == null ? void 0 : t.schema) == null ? void 0 : Z.id);
|
|
1009
1009
|
});
|
|
@@ -1016,7 +1016,7 @@ function Bt(e, t, n) {
|
|
|
1016
1016
|
function R(v) {
|
|
1017
1017
|
m(v);
|
|
1018
1018
|
}
|
|
1019
|
-
return
|
|
1019
|
+
return C.value = {
|
|
1020
1020
|
canMove: $(),
|
|
1021
1021
|
canSelectParent: L(),
|
|
1022
1022
|
canDelete: g(),
|
|
@@ -1039,18 +1039,18 @@ function Bt(e, t, n) {
|
|
|
1039
1039
|
triggerBelongedComponentToMoveWhenMoved: S(!1),
|
|
1040
1040
|
triggerBelongedComponentToDeleteWhenDeleted: S(!1),
|
|
1041
1041
|
onRemoveComponent: B,
|
|
1042
|
-
getCustomButtons:
|
|
1042
|
+
getCustomButtons: x,
|
|
1043
1043
|
onPropertyChanged: R,
|
|
1044
1044
|
setComponentBasicInfoMap: z,
|
|
1045
1045
|
updateContextSchema: t == null ? void 0 : t.updateContextSchema
|
|
1046
|
-
},
|
|
1046
|
+
}, C;
|
|
1047
1047
|
}
|
|
1048
1048
|
const Ft = /* @__PURE__ */ ge({
|
|
1049
1049
|
name: "FTagsDesign",
|
|
1050
1050
|
props: ue,
|
|
1051
1051
|
emits: ["remove", "selectionChange", "change"],
|
|
1052
1052
|
setup(e, t) {
|
|
1053
|
-
const n = S(e.selectable), f = S(e.customClass), c = S(e.data),
|
|
1053
|
+
const n = S(e.selectable), f = S(e.customClass), c = S(e.data), C = S(e.tagType), P = S(e.tagStyle), $ = S(e.showColor), L = S(e.activeTag), g = S(e.customStyle), b = S(e.showClose), r = S(e.showAddButton), u = S(e.showInput), h = S(e.addButtonText), l = S(e.enableAddButton);
|
|
1054
1054
|
S(e.placeholder), S(""), S();
|
|
1055
1055
|
const o = S(), d = S(e.wrapText), w = S(), F = S(), N = Me("design-item-context"), W = Bt(F, N);
|
|
1056
1056
|
Ne(() => {
|
|
@@ -1066,16 +1066,16 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1066
1066
|
}), i;
|
|
1067
1067
|
}
|
|
1068
1068
|
const B = S(j());
|
|
1069
|
-
function
|
|
1069
|
+
function x(i) {
|
|
1070
1070
|
c.value = i, B.value = j();
|
|
1071
1071
|
}
|
|
1072
|
-
const z = Q(() => B.value.findIndex((i) => i.type === "Input")), m =
|
|
1072
|
+
const z = Q(() => B.value.findIndex((i) => i.type === "Input")), m = Ce(e, t, c, B), {
|
|
1073
1073
|
dragstart: R,
|
|
1074
1074
|
dragenter: J,
|
|
1075
1075
|
dragover: v,
|
|
1076
1076
|
dragend: D
|
|
1077
1077
|
} = m;
|
|
1078
|
-
Y(() => e.data, (i) =>
|
|
1078
|
+
Y(() => e.data, (i) => x(i));
|
|
1079
1079
|
const k = Q(() => {
|
|
1080
1080
|
const i = {
|
|
1081
1081
|
"farris-tags": !0,
|
|
@@ -1092,8 +1092,8 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1092
1092
|
"farris-tag-item-has-color": $.value,
|
|
1093
1093
|
"farris-tag-item-actived": L.value === i.name
|
|
1094
1094
|
};
|
|
1095
|
-
if (
|
|
1096
|
-
const y = `farris-tag-item-${
|
|
1095
|
+
if (C.value) {
|
|
1096
|
+
const y = `farris-tag-item-${C.value}`;
|
|
1097
1097
|
p[y] = !0;
|
|
1098
1098
|
}
|
|
1099
1099
|
return p;
|
|
@@ -1101,8 +1101,8 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1101
1101
|
const A = Q(() => {
|
|
1102
1102
|
const i = {};
|
|
1103
1103
|
return g.value && g.value.split(";").reduce((p, y) => {
|
|
1104
|
-
const
|
|
1105
|
-
return p[
|
|
1104
|
+
const _ = y.split(":");
|
|
1105
|
+
return p[_[0]] = _[1], p;
|
|
1106
1106
|
}, i), i;
|
|
1107
1107
|
});
|
|
1108
1108
|
function q(i, p) {
|
|
@@ -1114,7 +1114,7 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1114
1114
|
let y;
|
|
1115
1115
|
switch (i.key) {
|
|
1116
1116
|
case "Backspace":
|
|
1117
|
-
c.value = c.value.filter((
|
|
1117
|
+
c.value = c.value.filter((_) => _.name !== p.name), t.emit("change", c.value);
|
|
1118
1118
|
break;
|
|
1119
1119
|
case "ArrowLeft":
|
|
1120
1120
|
y = Math.max(o.value.scrollLeft + 20, 0), o.value.scrollLeft = y;
|
|
@@ -1124,10 +1124,10 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1124
1124
|
}
|
|
1125
1125
|
}
|
|
1126
1126
|
function M(i, p) {
|
|
1127
|
-
const y = c.value.findIndex((
|
|
1127
|
+
const y = c.value.findIndex((_) => _.name === p.name);
|
|
1128
1128
|
if (y > -1) {
|
|
1129
|
-
const [
|
|
1130
|
-
B.value = j(), t.emit("change", c.value), t.emit("remove", c.value,
|
|
1129
|
+
const [_] = c.value.splice(y, 1);
|
|
1130
|
+
B.value = j(), t.emit("change", c.value), t.emit("remove", c.value, _, y);
|
|
1131
1131
|
}
|
|
1132
1132
|
i.stopPropagation();
|
|
1133
1133
|
}
|
|
@@ -1229,7 +1229,7 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1229
1229
|
}
|
|
1230
1230
|
const T = Q(() => ({
|
|
1231
1231
|
"farris-tags-item-container": !0,
|
|
1232
|
-
"farris-tag-item-capsule":
|
|
1232
|
+
"farris-tag-item-capsule": P.value === "capsule"
|
|
1233
1233
|
}));
|
|
1234
1234
|
function H(i) {
|
|
1235
1235
|
const p = Math.max(o.value.scrollLeft - i.deltaX, 0);
|
|
@@ -1238,12 +1238,12 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1238
1238
|
function le(i) {
|
|
1239
1239
|
const p = o.value, y = c.value.length - 1;
|
|
1240
1240
|
if (p) {
|
|
1241
|
-
const
|
|
1241
|
+
const _ = Array.from(p.children).filter((I) => I.className.indexOf("farris-tag-item") > -1).findIndex((I) => {
|
|
1242
1242
|
const V = I.getBoundingClientRect(), ce = window.getComputedStyle(I), pe = parseInt(ce["margin-left"], 10) + V.width + parseInt(ce["margin-right"], 10);
|
|
1243
1243
|
return V.left + pe > i;
|
|
1244
1244
|
});
|
|
1245
|
-
if (
|
|
1246
|
-
return
|
|
1245
|
+
if (_ > -1)
|
|
1246
|
+
return _;
|
|
1247
1247
|
}
|
|
1248
1248
|
return y;
|
|
1249
1249
|
}
|
|
@@ -1263,7 +1263,7 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1263
1263
|
i.preventDefault(), i.stopPropagation();
|
|
1264
1264
|
const p = (y = i.dataTransfer) == null ? void 0 : y.getData("Text");
|
|
1265
1265
|
if (p) {
|
|
1266
|
-
const
|
|
1266
|
+
const _ = p.split(":"), I = _[0], V = _[1];
|
|
1267
1267
|
[...c.value].findIndex((Ae) => Ae.value === V) > -1 || ee(c.value.length, I, V);
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
@@ -1284,15 +1284,15 @@ const Ft = /* @__PURE__ */ ge({
|
|
|
1284
1284
|
}
|
|
1285
1285
|
});
|
|
1286
1286
|
ae.register = (e, t, n, f) => {
|
|
1287
|
-
e.tags = ae, t.tags =
|
|
1287
|
+
e.tags = ae, t.tags = Pe;
|
|
1288
1288
|
};
|
|
1289
1289
|
ae.registerDesigner = (e, t, n) => {
|
|
1290
|
-
e.tags = Ft, t.tags =
|
|
1290
|
+
e.tags = Ft, t.tags = Pe;
|
|
1291
1291
|
};
|
|
1292
|
-
const
|
|
1292
|
+
const Lt = Ee(ae);
|
|
1293
1293
|
export {
|
|
1294
1294
|
ae as FTags,
|
|
1295
|
-
|
|
1296
|
-
|
|
1295
|
+
Lt as default,
|
|
1296
|
+
Pe as propsResolver,
|
|
1297
1297
|
ue as tagsProps
|
|
1298
1298
|
};
|