@farris/ui-vue 1.2.6 → 1.2.7
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 +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +11 -28
- package/components/avatar/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +33 -50
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +183 -171
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +236 -235
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +1531 -1560
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +1299 -1300
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +235 -252
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +127 -143
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +206 -201
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +650 -647
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +1101 -1131
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +335 -332
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +128 -145
- package/components/input-group/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +306 -303
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +2470 -2469
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1928 -1958
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/order/index.esm.js +802 -788
- package/components/order/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +116 -137
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-editor/index.esm.js +533 -521
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +178 -177
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +56 -73
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +547 -518
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +260 -281
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +598 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/switch/index.esm.js +137 -154
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +109 -130
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +103 -120
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +172 -189
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +124 -122
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +1600 -1630
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +245 -246
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +4123 -4112
- package/farris.all.umd.cjs +8 -8
- package/package.json +1 -1
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -2
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var C = (e, t, n) =>
|
|
4
|
-
import { defineComponent as I, ref as f, watch as x, computed as B, createVNode as
|
|
1
|
+
var N = Object.defineProperty;
|
|
2
|
+
var U = (e, t, n) => t in e ? N(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var C = (e, t, n) => U(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as I, ref as f, watch as x, computed as B, createVNode as w, inject as D, onMounted as z } from "vue";
|
|
5
5
|
import { cloneDeep as $ } from "lodash-es";
|
|
6
6
|
import G from "@farris/ui-vue/components/list-view";
|
|
7
|
-
import
|
|
7
|
+
import O from "@farris/ui-vue/components/button-edit";
|
|
8
8
|
import { useDesignerComponent as W } from "@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-component";
|
|
9
9
|
const Q = {}, q = {};
|
|
10
|
-
function
|
|
11
|
-
const { properties: t, title: n } = e, o = Object.keys(t).reduce((r,
|
|
10
|
+
function L(e) {
|
|
11
|
+
const { properties: t, title: n } = e, o = Object.keys(t).reduce((r, u) => (r[u] = t[u].type === "object" && t[u].properties ? L(t[u]) : $(t[u].default), r), {});
|
|
12
12
|
return o.id = `${n}-${Date.now()}`, o;
|
|
13
13
|
}
|
|
14
14
|
function X(e, t) {
|
|
15
|
-
const n =
|
|
15
|
+
const n = L(t);
|
|
16
16
|
return Object.keys(e).reduce((o, r) => (o[r] = e[r], o), n), n;
|
|
17
17
|
}
|
|
18
18
|
function Y(e, t) {
|
|
19
19
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => {
|
|
20
20
|
if (t.has(r)) {
|
|
21
|
-
const
|
|
22
|
-
if (typeof
|
|
23
|
-
o[
|
|
21
|
+
const u = t.get(r);
|
|
22
|
+
if (typeof u == "string")
|
|
23
|
+
o[u] = e[r];
|
|
24
24
|
else {
|
|
25
|
-
const
|
|
26
|
-
Object.assign(o,
|
|
25
|
+
const m = u(r, e[r], e);
|
|
26
|
+
Object.assign(o, m);
|
|
27
27
|
}
|
|
28
28
|
} else
|
|
29
29
|
o[r] = e[r];
|
|
@@ -35,55 +35,55 @@ function Z(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
35
35
|
return Y(o, n);
|
|
36
36
|
}
|
|
37
37
|
function _(e = {}) {
|
|
38
|
-
function t(c,
|
|
38
|
+
function t(c, d, i, a) {
|
|
39
39
|
if (typeof i == "number")
|
|
40
40
|
return a[c].length === i;
|
|
41
41
|
if (typeof i == "object") {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
return Number(a[c].length) !== Number(
|
|
45
|
-
if (
|
|
46
|
-
return Number(a[c].length) >= Number(
|
|
47
|
-
if (
|
|
48
|
-
return Number(a[c].length) <= Number(
|
|
42
|
+
const s = Object.keys(i)[0], p = i[s];
|
|
43
|
+
if (s === "not")
|
|
44
|
+
return Number(a[c].length) !== Number(p);
|
|
45
|
+
if (s === "moreThan")
|
|
46
|
+
return Number(a[c].length) >= Number(p);
|
|
47
|
+
if (s === "lessThan")
|
|
48
|
+
return Number(a[c].length) <= Number(p);
|
|
49
49
|
}
|
|
50
50
|
return !1;
|
|
51
51
|
}
|
|
52
|
-
function n(c,
|
|
52
|
+
function n(c, d, i, a) {
|
|
53
53
|
return a[c] && a[c].propertyValue && String(a[c].propertyValue.value) === String(i);
|
|
54
54
|
}
|
|
55
55
|
const o = /* @__PURE__ */ new Map([
|
|
56
56
|
["length", t],
|
|
57
57
|
["getProperty", n]
|
|
58
58
|
]);
|
|
59
|
-
Object.keys(e).reduce((c,
|
|
60
|
-
function r(c,
|
|
59
|
+
Object.keys(e).reduce((c, d) => (c.set(d, e[d]), c), o);
|
|
60
|
+
function r(c, d) {
|
|
61
61
|
const i = c;
|
|
62
|
-
return typeof
|
|
62
|
+
return typeof d == "number" ? [{ target: i, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: i, operator: "getProperty", param: c, value: !!d }] : typeof d == "object" ? Object.keys(d).map((a) => {
|
|
63
63
|
if (a === "length")
|
|
64
|
-
return { target: i, operator: "length", param: null, value:
|
|
65
|
-
const
|
|
66
|
-
return { target: i, operator: "getProperty", param:
|
|
64
|
+
return { target: i, operator: "length", param: null, value: d[a] };
|
|
65
|
+
const s = a, p = d[a];
|
|
66
|
+
return { target: i, operator: "getProperty", param: s, value: p };
|
|
67
67
|
}) : [];
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function u(c) {
|
|
70
70
|
return Object.keys(c).reduce((i, a) => {
|
|
71
|
-
const
|
|
72
|
-
return i.push(...
|
|
71
|
+
const s = r(a, c[a]);
|
|
72
|
+
return i.push(...s), i;
|
|
73
73
|
}, []);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function m(c, d) {
|
|
76
76
|
if (o.has(c.operator)) {
|
|
77
77
|
const i = o.get(c.operator);
|
|
78
|
-
return i && i(c.target, c.param, c.value,
|
|
78
|
+
return i && i(c.target, c.param, c.value, d) || !1;
|
|
79
79
|
}
|
|
80
80
|
return !1;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
82
|
+
function y(c, d) {
|
|
83
|
+
return u(c).reduce((s, p) => s && m(p, d), !0);
|
|
84
84
|
}
|
|
85
|
-
function g(c,
|
|
86
|
-
const i = Object.keys(c), a = i.includes("allOf"),
|
|
85
|
+
function g(c, d) {
|
|
86
|
+
const i = Object.keys(c), a = i.includes("allOf"), s = i.includes("anyOf"), p = a || s, h = (p ? c[p ? a ? "allOf" : "anyOf" : "allOf"] : [c]).map((T) => y(T, d));
|
|
87
87
|
return a ? !h.includes(!1) : h.includes(!0);
|
|
88
88
|
}
|
|
89
89
|
return { parseValueSchema: g };
|
|
@@ -201,10 +201,10 @@ const l = {
|
|
|
201
201
|
/** 审批类 end */
|
|
202
202
|
}, J = {}, K = {};
|
|
203
203
|
_();
|
|
204
|
-
function ee(e, t, n = /* @__PURE__ */ new Map(), o = (
|
|
205
|
-
return Q[t.title] = t, q[t.title] = o, J[t.title] = r, K[t.title] =
|
|
206
|
-
const
|
|
207
|
-
return Object.assign(g,
|
|
204
|
+
function ee(e, t, n = /* @__PURE__ */ new Map(), o = (m, y, g) => y, r = {}, u = (m) => m) {
|
|
205
|
+
return Q[t.title] = t, q[t.title] = o, J[t.title] = r, K[t.title] = u, (m = {}) => {
|
|
206
|
+
const y = Z(m, t, n), g = Object.keys(e).reduce((c, d) => (c[d] = e[d].default, c), {});
|
|
207
|
+
return Object.assign(g, y);
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
function te(e, t) {
|
|
@@ -498,8 +498,14 @@ const P = {
|
|
|
498
498
|
/**
|
|
499
499
|
* 打开前
|
|
500
500
|
*/
|
|
501
|
-
beforeOpen: { type: Function, default: null }
|
|
502
|
-
|
|
501
|
+
beforeOpen: { type: Function, default: null },
|
|
502
|
+
searchOption: {
|
|
503
|
+
type: Object,
|
|
504
|
+
default: !1
|
|
505
|
+
},
|
|
506
|
+
// 搜索启用高亮
|
|
507
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
508
|
+
}, A = ee(P, de, ne, ue), ye = {
|
|
503
509
|
dataSource: { type: Array, default: [] },
|
|
504
510
|
enableSearch: { type: Boolean, default: !1 },
|
|
505
511
|
idField: { type: String, default: "id" },
|
|
@@ -513,74 +519,96 @@ const P = {
|
|
|
513
519
|
valueField: { type: String, default: "id" },
|
|
514
520
|
/** 值变化事件 */
|
|
515
521
|
onSelectionChange: { type: Function, default: () => {
|
|
516
|
-
} }
|
|
522
|
+
} },
|
|
523
|
+
searchOption: {
|
|
524
|
+
type: Object,
|
|
525
|
+
default: !1
|
|
526
|
+
},
|
|
527
|
+
// 搜索启用高亮
|
|
528
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
517
529
|
}, ge = /* @__PURE__ */ I({
|
|
518
530
|
name: "FComboListContainer",
|
|
519
531
|
props: ye,
|
|
520
532
|
emits: ["selectionChange"],
|
|
521
533
|
setup(e, t) {
|
|
522
|
-
const n = f(e.dataSource),
|
|
534
|
+
const n = f(), o = f(e.dataSource), r = f([]), u = f(e.separator), m = f(e.width), y = f(e.maxHeight), g = f(String(e.selectedValues).split(u.value));
|
|
523
535
|
x(e.dataSource, () => {
|
|
524
|
-
|
|
536
|
+
o.value = e.dataSource;
|
|
525
537
|
});
|
|
526
|
-
const
|
|
527
|
-
const
|
|
528
|
-
return
|
|
538
|
+
const c = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), d = B(() => {
|
|
539
|
+
const s = {};
|
|
540
|
+
return m.value !== void 0 && (s.width = `${m.value}px`), y.value !== void 0 && y.value > 0 && (s.maxHeight = `${y.value}px`), s;
|
|
529
541
|
});
|
|
530
|
-
function s
|
|
531
|
-
|
|
542
|
+
function i(s) {
|
|
543
|
+
r.value = s.map((p) => Object.assign({}, p)), g.value = s.map((p) => p[e.idField]), t.emit("selectionChange", r.value);
|
|
544
|
+
}
|
|
545
|
+
function a(s) {
|
|
546
|
+
if (e.enableHighlightSearch)
|
|
547
|
+
return;
|
|
548
|
+
let p = [];
|
|
549
|
+
typeof e.searchOption == "function" ? p = o.value.filter((v) => e.searchOption(s, v)) : p = o.value.filter((v) => v[e.valueField].indexOf(s) > -1 || v[e.textField].indexOf(s) > -1), n.value.updateDataSource(p);
|
|
532
550
|
}
|
|
533
|
-
return x([() => e.selectedValues], ([
|
|
534
|
-
|
|
535
|
-
}), () =>
|
|
551
|
+
return x([() => e.selectedValues], ([s]) => {
|
|
552
|
+
g.value = s.split(u.value);
|
|
553
|
+
}), () => w("div", {
|
|
536
554
|
class: "f-combo-list-container pl-3",
|
|
537
|
-
style:
|
|
538
|
-
}, [
|
|
555
|
+
style: d.value
|
|
556
|
+
}, [w(G, {
|
|
557
|
+
ref: n,
|
|
539
558
|
size: "small",
|
|
540
559
|
itemClass: "f-combo-list-item",
|
|
541
|
-
header:
|
|
560
|
+
header: c.value,
|
|
542
561
|
headerClass: "f-combo-list-search-box",
|
|
543
|
-
data:
|
|
562
|
+
data: o.value,
|
|
544
563
|
idField: e.idField,
|
|
545
564
|
textField: e.textField,
|
|
546
565
|
titleField: e.titleField,
|
|
547
566
|
multiSelect: e.multiSelect,
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
567
|
+
selection: {
|
|
568
|
+
enableSelectRow: !0,
|
|
569
|
+
multiSelect: !0,
|
|
570
|
+
multiSelectMode: "OnCheckAndClick",
|
|
571
|
+
showCheckbox: !0,
|
|
572
|
+
showSelectAll: !1,
|
|
573
|
+
showSelection: !0
|
|
574
|
+
},
|
|
575
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
576
|
+
selectionValues: g.value,
|
|
577
|
+
onSelectionChange: i,
|
|
578
|
+
onAfterSearch: a
|
|
551
579
|
}, null)]);
|
|
552
580
|
}
|
|
553
581
|
});
|
|
554
582
|
function fe(e) {
|
|
555
583
|
const t = f(""), n = f(e.modelValue), o = f(e.data || []), r = f(e.editable);
|
|
556
|
-
function
|
|
557
|
-
const a = String(i).split(e.separator).map((
|
|
558
|
-
return o.value.filter((
|
|
584
|
+
function u(i) {
|
|
585
|
+
const a = String(i).split(e.separator).map((p) => [p, !0]), s = new Map(a);
|
|
586
|
+
return o.value.filter((p) => s.has(String(p[e.valueField])));
|
|
559
587
|
}
|
|
560
|
-
function
|
|
561
|
-
const a =
|
|
588
|
+
function m(i) {
|
|
589
|
+
const a = u(i).map((s) => s[e.textField]).join(e.separator);
|
|
562
590
|
t.value = r.value ? a || i : a;
|
|
563
591
|
}
|
|
564
|
-
function
|
|
565
|
-
const a = i.split(e.separator).map((
|
|
566
|
-
return o.value.filter((
|
|
592
|
+
function y(i) {
|
|
593
|
+
const a = i.split(e.separator).map((p) => [p, !0]), s = new Map(a);
|
|
594
|
+
return o.value.filter((p) => s.has(p[e.textField]));
|
|
567
595
|
}
|
|
568
596
|
function g(i) {
|
|
569
597
|
const a = {};
|
|
570
598
|
return a[e.idField] = i, a[e.textField] = i, [a];
|
|
571
599
|
}
|
|
572
600
|
function c(i) {
|
|
573
|
-
let a =
|
|
574
|
-
const
|
|
575
|
-
return r.value && !
|
|
601
|
+
let a = y(i);
|
|
602
|
+
const s = a && a.length > 0;
|
|
603
|
+
return r.value && !s && (a = g(i)), a;
|
|
576
604
|
}
|
|
577
|
-
function
|
|
578
|
-
const { url: i, method: a = "GET", headers:
|
|
605
|
+
function d() {
|
|
606
|
+
const { url: i, method: a = "GET", headers: s = {}, body: p = null } = e.remote, v = a.toLowerCase() == "get" ? { method: a, headers: s } : { method: a, headers: s, body: p };
|
|
579
607
|
let F = !1;
|
|
580
|
-
fetch(i,
|
|
581
|
-
var T,
|
|
608
|
+
fetch(i, v).then((h) => {
|
|
609
|
+
var T, M;
|
|
582
610
|
if (h.status === 200)
|
|
583
|
-
return F = !!((
|
|
611
|
+
return F = !!((M = (T = h.headers) == null ? void 0 : T.get("content-type")) != null && M.includes("application/json")), F ? h.text() : h.json();
|
|
584
612
|
throw new Error(h.statusText);
|
|
585
613
|
}).then((h) => {
|
|
586
614
|
o.value = F ? JSON.parse(h) : h;
|
|
@@ -588,60 +616,60 @@ function fe(e) {
|
|
|
588
616
|
console.error(h);
|
|
589
617
|
});
|
|
590
618
|
}
|
|
591
|
-
return e.remote &&
|
|
619
|
+
return e.remote && d(), x(() => e.data, () => {
|
|
592
620
|
o.value = e.data;
|
|
593
621
|
}), x([o], ([i]) => {
|
|
594
622
|
if (e.modelValue) {
|
|
595
|
-
const a = i.find((
|
|
623
|
+
const a = i.find((s) => s[e.valueField] === e.modelValue);
|
|
596
624
|
a && (t.value = a[e.textField]);
|
|
597
625
|
}
|
|
598
626
|
}), x(() => e.modelValue, (i) => {
|
|
599
|
-
n.value = i,
|
|
600
|
-
}),
|
|
627
|
+
n.value = i, m(i);
|
|
628
|
+
}), m(e.modelValue), { dataSource: o, displayText: t, editable: r, modelValue: n, getItemsByDisplayText: y, getItemsByValue: u, getSelectedItemsByDisplayText: c };
|
|
601
629
|
}
|
|
602
630
|
const k = /* @__PURE__ */ I({
|
|
603
631
|
name: "FComboList",
|
|
604
632
|
props: P,
|
|
605
633
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
606
634
|
setup(e, t) {
|
|
607
|
-
const n = f(), o = f(e.disabled), r = f(e.enableClear),
|
|
608
|
-
dataSource:
|
|
635
|
+
const n = f(), o = f(e.disabled), r = f(e.enableClear), u = f(e.enableSearch), m = f(e.readonly), {
|
|
636
|
+
dataSource: y,
|
|
609
637
|
displayText: g,
|
|
610
638
|
editable: c,
|
|
611
|
-
modelValue:
|
|
639
|
+
modelValue: d,
|
|
612
640
|
getSelectedItemsByDisplayText: i
|
|
613
|
-
} = fe(e), a = B(() => e.multiSelect),
|
|
614
|
-
function
|
|
641
|
+
} = fe(e), a = B(() => e.multiSelect), s = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
642
|
+
function p() {
|
|
615
643
|
!a.value && n.value && n.value.hidePopup();
|
|
616
644
|
}
|
|
617
|
-
function
|
|
618
|
-
g.value = b.map((
|
|
645
|
+
function v(b) {
|
|
646
|
+
g.value = b.map((S) => S[e.textField]).join(e.separator), b.length === 1 ? d.value = b[0][e.valueField] : d.value = b.map((S) => S[e.valueField]).join(e.separator), t.emit("update:modelValue", d.value), t.emit("change", b, d.value), p();
|
|
619
647
|
}
|
|
620
648
|
function F() {
|
|
621
|
-
|
|
649
|
+
m.value || n.value.togglePopup();
|
|
622
650
|
}
|
|
623
651
|
function h(b) {
|
|
624
|
-
|
|
652
|
+
d.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
625
653
|
}
|
|
626
654
|
function V(b) {
|
|
627
|
-
const
|
|
628
|
-
S
|
|
655
|
+
const S = i(b);
|
|
656
|
+
v(S);
|
|
629
657
|
}
|
|
630
658
|
function T() {
|
|
631
659
|
return g.value;
|
|
632
660
|
}
|
|
633
|
-
function
|
|
661
|
+
function M(b) {
|
|
634
662
|
t.emit("input", b);
|
|
635
663
|
}
|
|
636
664
|
return t.expose({
|
|
637
665
|
getDisplayText: T
|
|
638
|
-
}), x([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([b,
|
|
639
|
-
o.value = b, c.value =
|
|
640
|
-
}), () =>
|
|
666
|
+
}), x([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([b, S, R, H, j]) => {
|
|
667
|
+
o.value = b, c.value = S, r.value = R, u.value = H, m.value = j;
|
|
668
|
+
}), () => w(O, {
|
|
641
669
|
ref: n,
|
|
642
670
|
id: e.id,
|
|
643
671
|
disable: o.value,
|
|
644
|
-
readonly:
|
|
672
|
+
readonly: m.value,
|
|
645
673
|
forcePlaceholder: e.forcePlaceholder,
|
|
646
674
|
editable: c.value,
|
|
647
675
|
buttonContent: e.dropDownIcon,
|
|
@@ -659,21 +687,22 @@ const k = /* @__PURE__ */ I({
|
|
|
659
687
|
onClear: h,
|
|
660
688
|
onClick: F,
|
|
661
689
|
onChange: V,
|
|
662
|
-
onInput:
|
|
690
|
+
onInput: M,
|
|
663
691
|
beforeOpen: e.beforeOpen
|
|
664
692
|
}, {
|
|
665
|
-
default: () => [
|
|
693
|
+
default: () => [w(ge, {
|
|
666
694
|
idField: e.idField,
|
|
667
695
|
valueField: e.valueField,
|
|
668
696
|
textField: e.textField,
|
|
669
697
|
titleField: e.titleField,
|
|
670
|
-
dataSource:
|
|
671
|
-
selectedValues:
|
|
698
|
+
dataSource: y.value,
|
|
699
|
+
selectedValues: d.value,
|
|
672
700
|
multiSelect: e.multiSelect,
|
|
673
|
-
enableSearch:
|
|
701
|
+
enableSearch: u.value,
|
|
674
702
|
maxHeight: e.maxHeight,
|
|
675
|
-
|
|
676
|
-
|
|
703
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
704
|
+
width: e.fitEditor ? s.value : void 0,
|
|
705
|
+
onSelectionChange: v
|
|
677
706
|
}, null)]
|
|
678
707
|
});
|
|
679
708
|
}
|
|
@@ -684,35 +713,35 @@ function he(e, t) {
|
|
|
684
713
|
function r(i) {
|
|
685
714
|
return !1;
|
|
686
715
|
}
|
|
687
|
-
function
|
|
716
|
+
function u() {
|
|
688
717
|
return !1;
|
|
689
718
|
}
|
|
690
|
-
function
|
|
719
|
+
function m() {
|
|
691
720
|
return !1;
|
|
692
721
|
}
|
|
693
|
-
function
|
|
722
|
+
function y() {
|
|
694
723
|
return !0;
|
|
695
724
|
}
|
|
696
725
|
function g(i) {
|
|
697
726
|
}
|
|
698
727
|
function c() {
|
|
699
728
|
}
|
|
700
|
-
function
|
|
729
|
+
function d(i) {
|
|
701
730
|
return null;
|
|
702
731
|
}
|
|
703
732
|
return {
|
|
704
733
|
canAccepts: r,
|
|
705
|
-
checkCanDeleteComponent:
|
|
706
|
-
checkCanMoveComponent:
|
|
707
|
-
hideNestedPaddingInDesginerView:
|
|
734
|
+
checkCanDeleteComponent: u,
|
|
735
|
+
checkCanMoveComponent: m,
|
|
736
|
+
hideNestedPaddingInDesginerView: y,
|
|
708
737
|
onAcceptMovedChildElement: g,
|
|
709
738
|
resolveComponentContext: c,
|
|
710
739
|
triggerBelongedComponentToMoveWhenMoved: n,
|
|
711
740
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
712
|
-
getPropsConfig:
|
|
741
|
+
getPropsConfig: d
|
|
713
742
|
};
|
|
714
743
|
}
|
|
715
|
-
class
|
|
744
|
+
class E {
|
|
716
745
|
static getEditorTypesByMDataType(t) {
|
|
717
746
|
const n = this.fieldControlTypeMapping[t];
|
|
718
747
|
return n || [{ key: "", value: "" }];
|
|
@@ -721,7 +750,7 @@ class A {
|
|
|
721
750
|
/**
|
|
722
751
|
* <字段类型,可配置的控件类型列表>的映射
|
|
723
752
|
*/
|
|
724
|
-
C(
|
|
753
|
+
C(E, "fieldControlTypeMapping", {
|
|
725
754
|
String: [
|
|
726
755
|
{ key: l["input-group"].type, value: l["input-group"].name },
|
|
727
756
|
{ key: l.lookup.type, value: l.lookup.name },
|
|
@@ -835,7 +864,7 @@ class be {
|
|
|
835
864
|
type: "combo-list",
|
|
836
865
|
textField: "value",
|
|
837
866
|
valueField: "key",
|
|
838
|
-
data:
|
|
867
|
+
data: E.getEditorTypesByMDataType(((r = (o = n.designViewModelField) == null ? void 0 : o.type) == null ? void 0 : r.name) || ""),
|
|
839
868
|
editable: !1
|
|
840
869
|
}
|
|
841
870
|
},
|
|
@@ -845,11 +874,11 @@ class be {
|
|
|
845
874
|
$converter: "/converter/form-group-label.converter"
|
|
846
875
|
}
|
|
847
876
|
},
|
|
848
|
-
setPropertyRelates(
|
|
849
|
-
if (
|
|
850
|
-
switch (
|
|
877
|
+
setPropertyRelates(u, m) {
|
|
878
|
+
if (u)
|
|
879
|
+
switch (u && u.propertyID) {
|
|
851
880
|
case "type": {
|
|
852
|
-
n.changeControlType(t,
|
|
881
|
+
n.changeControlType(t, u);
|
|
853
882
|
break;
|
|
854
883
|
}
|
|
855
884
|
}
|
|
@@ -862,12 +891,12 @@ class be {
|
|
|
862
891
|
* @param newControlType 新控件类型
|
|
863
892
|
*/
|
|
864
893
|
changeControlType(t, n) {
|
|
865
|
-
var c,
|
|
894
|
+
var c, d, i, a, s;
|
|
866
895
|
const o = n.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
|
|
867
|
-
let
|
|
868
|
-
if (!
|
|
896
|
+
let u = this.getControlParentContainer(t.id, r);
|
|
897
|
+
if (!u)
|
|
869
898
|
return;
|
|
870
|
-
const
|
|
899
|
+
const m = u.contents.findIndex((p) => p.id === t.id), y = u.contents[m];
|
|
871
900
|
let g;
|
|
872
901
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
873
902
|
editor: {
|
|
@@ -877,19 +906,19 @@ class be {
|
|
|
877
906
|
require: this.designViewModelField.require,
|
|
878
907
|
readonly: this.designViewModelField.readonly
|
|
879
908
|
}, !1), g = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(g, {
|
|
880
|
-
id:
|
|
881
|
-
appearance:
|
|
882
|
-
size:
|
|
883
|
-
label:
|
|
909
|
+
id: y.id,
|
|
910
|
+
appearance: y.appearance,
|
|
911
|
+
size: y.size,
|
|
912
|
+
label: y.label
|
|
884
913
|
}), Object.assign(g.editor, {
|
|
885
|
-
isTextArea: g.isTextArea &&
|
|
914
|
+
isTextArea: g.isTextArea && y.isTextArea,
|
|
886
915
|
type: o || "",
|
|
887
|
-
placeHolder: (c =
|
|
888
|
-
holdPlace: (
|
|
889
|
-
readonly: (i =
|
|
890
|
-
require: (a =
|
|
891
|
-
visible: (
|
|
892
|
-
}),
|
|
916
|
+
placeHolder: (c = y.editor) == null ? void 0 : c.placeHolder,
|
|
917
|
+
holdPlace: (d = y.editor) == null ? void 0 : d.holdPlace,
|
|
918
|
+
readonly: (i = y.editor) == null ? void 0 : i.readonly,
|
|
919
|
+
require: (a = y.editor) == null ? void 0 : a.require,
|
|
920
|
+
visible: (s = y.editor) == null ? void 0 : s.visible
|
|
921
|
+
}), u.contents.splice(m, 1, g);
|
|
893
922
|
}
|
|
894
923
|
getAppearanceConfig(t = null) {
|
|
895
924
|
return {
|
|
@@ -937,27 +966,6 @@ class be {
|
|
|
937
966
|
return o;
|
|
938
967
|
}
|
|
939
968
|
}
|
|
940
|
-
getBindingFieldEditorOptions(t) {
|
|
941
|
-
const n = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
942
|
-
return {
|
|
943
|
-
type: "field-selector",
|
|
944
|
-
bindingType: { enable: !1 },
|
|
945
|
-
editorParams: {
|
|
946
|
-
propertyData: t,
|
|
947
|
-
formBasicInfo: n
|
|
948
|
-
},
|
|
949
|
-
columns: [
|
|
950
|
-
{ field: "name", title: "字段名称" },
|
|
951
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
952
|
-
{ field: "fieldType", title: "字段类型" }
|
|
953
|
-
],
|
|
954
|
-
beforeOpenDialog: (o) => {
|
|
955
|
-
const r = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
956
|
-
o.instance.loadData(r);
|
|
957
|
-
},
|
|
958
|
-
textField: "bindingField"
|
|
959
|
-
};
|
|
960
|
-
}
|
|
961
969
|
}
|
|
962
970
|
class Ce extends be {
|
|
963
971
|
constructor(t, n) {
|
|
@@ -994,17 +1002,21 @@ class Ce extends be {
|
|
|
994
1002
|
{ field: "bindingField", title: "绑定字段" },
|
|
995
1003
|
{ field: "fieldType", title: "字段类型" }
|
|
996
1004
|
],
|
|
1005
|
+
textField: "bindingField",
|
|
997
1006
|
data: o
|
|
998
1007
|
}
|
|
999
1008
|
};
|
|
1000
1009
|
}
|
|
1010
|
+
getBindingOtions(t) {
|
|
1011
|
+
return this.getFieldSelectorOptions(t);
|
|
1012
|
+
}
|
|
1001
1013
|
getComponentConfig(t, n = {}, o = {}) {
|
|
1002
1014
|
const r = Object.assign({
|
|
1003
1015
|
description: "组件信息",
|
|
1004
1016
|
title: "组件信息",
|
|
1005
1017
|
type: "input-group",
|
|
1006
1018
|
$converter: "/converter/property-editor.converter"
|
|
1007
|
-
}, n),
|
|
1019
|
+
}, n), u = Object.assign({
|
|
1008
1020
|
readonly: {
|
|
1009
1021
|
description: "",
|
|
1010
1022
|
title: "只读",
|
|
@@ -1026,7 +1038,7 @@ class Ce extends be {
|
|
|
1026
1038
|
type: "string"
|
|
1027
1039
|
}
|
|
1028
1040
|
}, o);
|
|
1029
|
-
return { ...r, properties: { ...
|
|
1041
|
+
return { ...r, properties: { ...u } };
|
|
1030
1042
|
}
|
|
1031
1043
|
}
|
|
1032
1044
|
class ve extends Ce {
|
|
@@ -1058,22 +1070,22 @@ function Se(e, t) {
|
|
|
1058
1070
|
canAccepts: n,
|
|
1059
1071
|
checkCanDeleteComponent: o,
|
|
1060
1072
|
checkCanMoveComponent: r,
|
|
1061
|
-
hideNestedPaddingInDesginerView:
|
|
1062
|
-
onAcceptMovedChildElement:
|
|
1063
|
-
resolveComponentContext:
|
|
1073
|
+
hideNestedPaddingInDesginerView: u,
|
|
1074
|
+
onAcceptMovedChildElement: m,
|
|
1075
|
+
resolveComponentContext: y,
|
|
1064
1076
|
triggerBelongedComponentToMoveWhenMoved: g,
|
|
1065
1077
|
triggerBelongedComponentToDeleteWhenDeleted: c
|
|
1066
|
-
} = he(e),
|
|
1078
|
+
} = he(e), d = e.schema;
|
|
1067
1079
|
function i(a) {
|
|
1068
|
-
return new ve(a, t).getPropertyConfig(
|
|
1080
|
+
return new ve(a, t).getPropertyConfig(d);
|
|
1069
1081
|
}
|
|
1070
1082
|
return {
|
|
1071
1083
|
canAccepts: n,
|
|
1072
1084
|
checkCanDeleteComponent: o,
|
|
1073
1085
|
checkCanMoveComponent: r,
|
|
1074
|
-
hideNestedPaddingInDesginerView:
|
|
1075
|
-
onAcceptMovedChildElement:
|
|
1076
|
-
resolveComponentContext:
|
|
1086
|
+
hideNestedPaddingInDesginerView: u,
|
|
1087
|
+
onAcceptMovedChildElement: m,
|
|
1088
|
+
resolveComponentContext: y,
|
|
1077
1089
|
triggerBelongedComponentToMoveWhenMoved: g,
|
|
1078
1090
|
triggerBelongedComponentToDeleteWhenDeleted: c,
|
|
1079
1091
|
getPropsConfig: i
|
|
@@ -1084,10 +1096,10 @@ const Fe = /* @__PURE__ */ I({
|
|
|
1084
1096
|
props: P,
|
|
1085
1097
|
emits: ["clear", "update:modelValue", "change"],
|
|
1086
1098
|
setup(e, t) {
|
|
1087
|
-
const n = f(), o = D("designer-host-service"), r = D("design-item-context"),
|
|
1099
|
+
const n = f(), o = D("designer-host-service"), r = D("design-item-context"), u = Se(r, o), m = W(n, r, u);
|
|
1088
1100
|
return z(() => {
|
|
1089
|
-
n.value.componentInstance =
|
|
1090
|
-
}), t.expose(
|
|
1101
|
+
n.value.componentInstance = m;
|
|
1102
|
+
}), t.expose(m.value), () => w(O, {
|
|
1091
1103
|
ref: n,
|
|
1092
1104
|
id: e.id,
|
|
1093
1105
|
disable: e.disabled,
|
|
@@ -1111,10 +1123,10 @@ const Fe = /* @__PURE__ */ I({
|
|
|
1111
1123
|
}, e;
|
|
1112
1124
|
};
|
|
1113
1125
|
k.register = (e, t, n, o) => {
|
|
1114
|
-
e["combo-list"] = k, t["combo-list"] =
|
|
1126
|
+
e["combo-list"] = k, t["combo-list"] = A;
|
|
1115
1127
|
};
|
|
1116
1128
|
k.registerDesigner = (e, t, n) => {
|
|
1117
|
-
e["combo-list"] = Fe, t["combo-list"] =
|
|
1129
|
+
e["combo-list"] = Fe, t["combo-list"] = A;
|
|
1118
1130
|
};
|
|
1119
1131
|
const Ie = Te(k);
|
|
1120
1132
|
export {
|
|
@@ -1123,5 +1135,5 @@ export {
|
|
|
1123
1135
|
pe as ViewType,
|
|
1124
1136
|
P as comboListProps,
|
|
1125
1137
|
Ie as default,
|
|
1126
|
-
|
|
1138
|
+
A as propsResolver
|
|
1127
1139
|
};
|