@farris/ui-vue 1.2.8 → 1.2.9
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 +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.esm.js +343 -325
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +27 -27
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var H = (n, e, t) => e in n ?
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
1
|
+
var Z = Object.defineProperty;
|
|
2
|
+
var H = (n, e, t) => e in n ? Z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var v = (n, e, t) => H(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as $, inject as N, onMounted as W, createVNode as h, Fragment as I, computed as B, ref as k, provide as K } from "vue";
|
|
5
5
|
import { useCheck as ee } from "../common/index.esm.js";
|
|
6
6
|
import { cloneDeep as te } from "lodash-es";
|
|
7
|
-
import { getSchemaByType as
|
|
7
|
+
import { getSchemaByType as L } from "../dynamic-resolver/index.esm.js";
|
|
8
8
|
const ne = {
|
|
9
9
|
value: { type: String, default: "" },
|
|
10
10
|
/** 值 */
|
|
@@ -15,52 +15,52 @@ const ne = {
|
|
|
15
15
|
label: { type: String, default: "" },
|
|
16
16
|
/** 标识 */
|
|
17
17
|
id: { type: String, default: "" }
|
|
18
|
-
}, x = Symbol("radioGroupContext"),
|
|
18
|
+
}, x = Symbol("radioGroupContext"), q = /* @__PURE__ */ $({
|
|
19
19
|
name: "FRadio",
|
|
20
20
|
props: ne,
|
|
21
21
|
emits: ["update:value"],
|
|
22
22
|
setup(n, e) {
|
|
23
|
-
const t =
|
|
23
|
+
const t = N(x, null), {
|
|
24
24
|
buttonClass: o,
|
|
25
|
-
checked:
|
|
26
|
-
disabled:
|
|
25
|
+
checked: r,
|
|
26
|
+
disabled: p,
|
|
27
27
|
name: m,
|
|
28
|
-
tagClass:
|
|
29
|
-
shouldRenderButton:
|
|
30
|
-
shouldRenderNative:
|
|
31
|
-
shouldRenderTag:
|
|
32
|
-
onClickRadio:
|
|
28
|
+
tagClass: a,
|
|
29
|
+
shouldRenderButton: u,
|
|
30
|
+
shouldRenderNative: i,
|
|
31
|
+
shouldRenderTag: c,
|
|
32
|
+
onClickRadio: s
|
|
33
33
|
} = ee(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
|
|
34
34
|
return W(() => {
|
|
35
35
|
}), () => {
|
|
36
|
-
var d, f, g,
|
|
37
|
-
return h(I, null, [
|
|
36
|
+
var d, f, g, T, w, V;
|
|
37
|
+
return h(I, null, [u.value && h("div", {
|
|
38
38
|
class: o.value,
|
|
39
39
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
40
|
-
onClick:
|
|
41
|
-
}, [(f = (d = e.slots).default) == null ? void 0 : f.call(d)]),
|
|
42
|
-
class:
|
|
43
|
-
onClick:
|
|
40
|
+
onClick: s
|
|
41
|
+
}, [(f = (d = e.slots).default) == null ? void 0 : f.call(d)]), c.value && h("div", {
|
|
42
|
+
class: a.value,
|
|
43
|
+
onClick: s
|
|
44
44
|
}, [h("div", {
|
|
45
45
|
class: "title"
|
|
46
|
-
}, [(
|
|
46
|
+
}, [(T = (g = e.slots).default) == null ? void 0 : T.call(g)]), h("div", {
|
|
47
47
|
class: "tip"
|
|
48
48
|
}, null), h("span", {
|
|
49
49
|
class: "f-icon f-icon-check f-radio-icon"
|
|
50
|
-
}, null)]),
|
|
50
|
+
}, null)]), i.value && h("div", {
|
|
51
51
|
class: "custom-control custom-radio",
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: s
|
|
53
53
|
}, [h("input", {
|
|
54
54
|
type: "radio",
|
|
55
55
|
class: "custom-control-input",
|
|
56
56
|
name: m.value,
|
|
57
57
|
id: n.id,
|
|
58
58
|
value: n.value,
|
|
59
|
-
checked:
|
|
60
|
-
disabled:
|
|
59
|
+
checked: r.value,
|
|
60
|
+
disabled: p.value
|
|
61
61
|
}, null), h("div", {
|
|
62
62
|
class: "custom-control-label"
|
|
63
|
-
}, [(
|
|
63
|
+
}, [(V = (w = e.slots).default) == null ? void 0 : V.call(w)])])]);
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
});
|
|
@@ -68,35 +68,35 @@ function oe(n, e, t) {
|
|
|
68
68
|
return e;
|
|
69
69
|
}
|
|
70
70
|
const _ = {}, J = {};
|
|
71
|
-
function
|
|
72
|
-
const { properties: e, title: t } = n, o = Object.keys(e).reduce((
|
|
73
|
-
return o.id = `${t}-${Date.now()}
|
|
71
|
+
function U(n) {
|
|
72
|
+
const { properties: e, title: t, ignore: o } = n, r = o && Array.isArray(o), p = Object.keys(e).reduce((m, a) => ((!r || !o.find((u) => u == a)) && (m[a] = e[a].type === "object" && e[a].properties ? U(e[a]) : te(e[a].default)), m), {});
|
|
73
|
+
return (!r || !o.find((m) => m == "id")) && (p.id = `${t}-${Date.now()}`), p;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
let
|
|
79
|
-
const
|
|
80
|
-
return
|
|
75
|
+
function O(n, e = {}, t) {
|
|
76
|
+
const o = _[n];
|
|
77
|
+
if (o) {
|
|
78
|
+
let r = U(o);
|
|
79
|
+
const p = J[n];
|
|
80
|
+
return r = p ? p({ getSchemaByType: O }, r, e, t) : r, r;
|
|
81
81
|
}
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
function re(n, e) {
|
|
85
|
-
const t =
|
|
86
|
-
return Object.keys(n).reduce((o,
|
|
85
|
+
const t = U(e);
|
|
86
|
+
return Object.keys(n).reduce((o, r) => (o[r] && typeof o[r] == "object" ? Object.assign(o[r], n[r]) : o[r] = n[r], o), t), t;
|
|
87
87
|
}
|
|
88
88
|
function ie(n, e) {
|
|
89
|
-
return Object.keys(n).filter((o) => n[o] != null).reduce((o,
|
|
90
|
-
if (e.has(
|
|
91
|
-
const
|
|
92
|
-
if (typeof
|
|
93
|
-
o[
|
|
89
|
+
return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
|
|
90
|
+
if (e.has(r)) {
|
|
91
|
+
const p = e.get(r);
|
|
92
|
+
if (typeof p == "string")
|
|
93
|
+
o[p] = n[r];
|
|
94
94
|
else {
|
|
95
|
-
const m =
|
|
95
|
+
const m = p(r, n[r], n);
|
|
96
96
|
Object.assign(o, m);
|
|
97
97
|
}
|
|
98
98
|
} else
|
|
99
|
-
o[
|
|
99
|
+
o[r] = n[r];
|
|
100
100
|
return o;
|
|
101
101
|
}, {});
|
|
102
102
|
}
|
|
@@ -105,60 +105,60 @@ function ae(n, e, t = /* @__PURE__ */ new Map()) {
|
|
|
105
105
|
return ie(o, t);
|
|
106
106
|
}
|
|
107
107
|
function le(n = {}) {
|
|
108
|
-
function e(
|
|
109
|
-
if (typeof
|
|
110
|
-
return d[
|
|
111
|
-
if (typeof
|
|
112
|
-
const f = Object.keys(
|
|
108
|
+
function e(i, c, s, d) {
|
|
109
|
+
if (typeof s == "number")
|
|
110
|
+
return d[i].length === s;
|
|
111
|
+
if (typeof s == "object") {
|
|
112
|
+
const f = Object.keys(s)[0], g = s[f];
|
|
113
113
|
if (f === "not")
|
|
114
|
-
return Number(d[
|
|
114
|
+
return Number(d[i].length) !== Number(g);
|
|
115
115
|
if (f === "moreThan")
|
|
116
|
-
return Number(d[
|
|
116
|
+
return Number(d[i].length) >= Number(g);
|
|
117
117
|
if (f === "lessThan")
|
|
118
|
-
return Number(d[
|
|
118
|
+
return Number(d[i].length) <= Number(g);
|
|
119
119
|
}
|
|
120
120
|
return !1;
|
|
121
121
|
}
|
|
122
|
-
function t(
|
|
123
|
-
return d[
|
|
122
|
+
function t(i, c, s, d) {
|
|
123
|
+
return d[i] && d[i].propertyValue && String(d[i].propertyValue.value) === String(s);
|
|
124
124
|
}
|
|
125
125
|
const o = /* @__PURE__ */ new Map([
|
|
126
126
|
["length", e],
|
|
127
127
|
["getProperty", t]
|
|
128
128
|
]);
|
|
129
|
-
Object.keys(n).reduce((
|
|
130
|
-
function i
|
|
131
|
-
const
|
|
132
|
-
return typeof
|
|
129
|
+
Object.keys(n).reduce((i, c) => (i.set(c, n[c]), i), o);
|
|
130
|
+
function r(i, c) {
|
|
131
|
+
const s = i;
|
|
132
|
+
return typeof c == "number" ? [{ target: s, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
|
|
133
133
|
if (d === "length")
|
|
134
|
-
return { target:
|
|
135
|
-
const f = d, g =
|
|
136
|
-
return { target:
|
|
134
|
+
return { target: s, operator: "length", param: null, value: c[d] };
|
|
135
|
+
const f = d, g = c[d];
|
|
136
|
+
return { target: s, operator: "getProperty", param: f, value: g };
|
|
137
137
|
}) : [];
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return Object.keys(
|
|
141
|
-
const f =
|
|
142
|
-
return
|
|
139
|
+
function p(i) {
|
|
140
|
+
return Object.keys(i).reduce((s, d) => {
|
|
141
|
+
const f = r(d, i[d]);
|
|
142
|
+
return s.push(...f), s;
|
|
143
143
|
}, []);
|
|
144
144
|
}
|
|
145
|
-
function m(
|
|
146
|
-
if (o.has(
|
|
147
|
-
const
|
|
148
|
-
return
|
|
145
|
+
function m(i, c) {
|
|
146
|
+
if (o.has(i.operator)) {
|
|
147
|
+
const s = o.get(i.operator);
|
|
148
|
+
return s && s(i.target, i.param, i.value, c) || !1;
|
|
149
149
|
}
|
|
150
150
|
return !1;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
return
|
|
152
|
+
function a(i, c) {
|
|
153
|
+
return p(i).reduce((f, g) => f && m(g, c), !0);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
return d ? !
|
|
155
|
+
function u(i, c) {
|
|
156
|
+
const s = Object.keys(i), d = s.includes("allOf"), f = s.includes("anyOf"), g = d || f, V = (g ? i[g ? d ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => a(A, c));
|
|
157
|
+
return d ? !V.includes(!1) : V.includes(!0);
|
|
158
158
|
}
|
|
159
|
-
return { parseValueSchema:
|
|
159
|
+
return { parseValueSchema: u };
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
const l = {
|
|
162
162
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
163
163
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
164
164
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -198,10 +198,10 @@ const a = {
|
|
|
198
198
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
199
199
|
}, ce = {}, se = {};
|
|
200
200
|
le();
|
|
201
|
-
function pe(n, e, t = /* @__PURE__ */ new Map(), o = (m,
|
|
202
|
-
return _[e.title] = e, J[e.title] = o, ce[e.title] =
|
|
203
|
-
const
|
|
204
|
-
return Object.assign(
|
|
201
|
+
function pe(n, e, t = /* @__PURE__ */ new Map(), o = (m, a, u) => a, r = {}, p = (m) => m) {
|
|
202
|
+
return _[e.title] = e, J[e.title] = o, ce[e.title] = r, se[e.title] = p, (m = {}) => {
|
|
203
|
+
const a = ae(m, e, t), u = Object.keys(n).reduce((i, c) => (i[c] = n[c].default, i), {});
|
|
204
|
+
return Object.assign(u, a);
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
207
|
function ue(n, e) {
|
|
@@ -293,15 +293,20 @@ const de = /* @__PURE__ */ new Map([
|
|
|
293
293
|
}, be = [
|
|
294
294
|
"id",
|
|
295
295
|
"type"
|
|
296
|
-
], Ce =
|
|
296
|
+
], Ce = [
|
|
297
|
+
"id",
|
|
298
|
+
"appearance",
|
|
299
|
+
"binding"
|
|
300
|
+
], ke = {
|
|
297
301
|
$schema: me,
|
|
298
302
|
$id: fe,
|
|
299
303
|
title: ye,
|
|
300
304
|
description: ge,
|
|
301
305
|
type: he,
|
|
302
306
|
properties: ve,
|
|
303
|
-
required: be
|
|
304
|
-
|
|
307
|
+
required: be,
|
|
308
|
+
ignore: Ce
|
|
309
|
+
}, Me = {
|
|
305
310
|
/**
|
|
306
311
|
* 是否被选中
|
|
307
312
|
*/
|
|
@@ -318,8 +323,8 @@ const de = /* @__PURE__ */ new Map([
|
|
|
318
323
|
* type为button或者tag时的尺寸
|
|
319
324
|
*/
|
|
320
325
|
size: { type: String, default: "middle" }
|
|
321
|
-
},
|
|
322
|
-
...
|
|
326
|
+
}, j = {
|
|
327
|
+
...Me,
|
|
323
328
|
/**
|
|
324
329
|
* 组件标识
|
|
325
330
|
*/
|
|
@@ -358,99 +363,99 @@ const de = /* @__PURE__ */ new Map([
|
|
|
358
363
|
* 枚举数组中枚举值的key值。
|
|
359
364
|
*/
|
|
360
365
|
valueField: { type: String, default: "value" }
|
|
361
|
-
}, X = pe(
|
|
366
|
+
}, X = pe(j, ke, de, oe);
|
|
362
367
|
function Q(n, e, t) {
|
|
363
|
-
const o =
|
|
364
|
-
function
|
|
365
|
-
return
|
|
368
|
+
const o = B(() => !n.disabled), r = B(() => n.enumData || []);
|
|
369
|
+
function p(u) {
|
|
370
|
+
return u[n.valueField];
|
|
366
371
|
}
|
|
367
|
-
function m(
|
|
368
|
-
return
|
|
372
|
+
function m(u) {
|
|
373
|
+
return u[n.textField];
|
|
369
374
|
}
|
|
370
|
-
function u
|
|
375
|
+
function a(u, i) {
|
|
371
376
|
if (o.value) {
|
|
372
|
-
const
|
|
373
|
-
t.value !==
|
|
377
|
+
const c = p(u);
|
|
378
|
+
t.value !== c && (t.value = c, e.emit("changeValue", c), e.emit("update:modelValue", c));
|
|
374
379
|
}
|
|
375
|
-
|
|
380
|
+
i.stopPropagation();
|
|
376
381
|
}
|
|
377
382
|
return {
|
|
378
|
-
enumData:
|
|
379
|
-
getValue:
|
|
383
|
+
enumData: r,
|
|
384
|
+
getValue: p,
|
|
380
385
|
getText: m,
|
|
381
|
-
onClickRadio:
|
|
386
|
+
onClickRadio: a
|
|
382
387
|
};
|
|
383
388
|
}
|
|
384
|
-
const
|
|
389
|
+
const F = /* @__PURE__ */ $({
|
|
385
390
|
name: "FRadioGroup",
|
|
386
|
-
props:
|
|
391
|
+
props: j,
|
|
387
392
|
emits: ["changeValue", "update:modelValue"],
|
|
388
393
|
setup(n, e) {
|
|
389
394
|
const t = k(n.modelValue), {
|
|
390
395
|
enumData: o,
|
|
391
|
-
onClickRadio:
|
|
392
|
-
getValue:
|
|
396
|
+
onClickRadio: r,
|
|
397
|
+
getValue: p,
|
|
393
398
|
getText: m
|
|
394
|
-
} = Q(n, e, t),
|
|
399
|
+
} = Q(n, e, t), a = B(() => ({
|
|
395
400
|
"farris-checkradio-hor": n.direction === "horizontal"
|
|
396
|
-
})),
|
|
401
|
+
})), u = k([]);
|
|
397
402
|
return K(x, {
|
|
398
|
-
radios:
|
|
403
|
+
radios: u,
|
|
399
404
|
parentProps: n,
|
|
400
405
|
parentContext: e
|
|
401
406
|
}), () => h("div", {
|
|
402
|
-
class: ["farris-input-wrap",
|
|
403
|
-
}, [e.slots.default ? e.slots.default() : o.value.map((
|
|
404
|
-
const
|
|
407
|
+
class: ["farris-input-wrap", a.value]
|
|
408
|
+
}, [e.slots.default ? e.slots.default() : o.value.map((i, c) => {
|
|
409
|
+
const s = "radio_" + n.id + n.name + i[n.valueField];
|
|
405
410
|
return h("div", {
|
|
406
411
|
class: "custom-control custom-radio"
|
|
407
412
|
}, [h("input", {
|
|
408
413
|
type: "radio",
|
|
409
414
|
class: "custom-control-input",
|
|
410
|
-
name:
|
|
411
|
-
id:
|
|
412
|
-
value:
|
|
413
|
-
checked:
|
|
415
|
+
name: s,
|
|
416
|
+
id: s,
|
|
417
|
+
value: p(i),
|
|
418
|
+
checked: p(i) === t.value,
|
|
414
419
|
disabled: n.disabled,
|
|
415
420
|
tabindex: n.tabIndex,
|
|
416
|
-
onClick: (d) => i
|
|
421
|
+
onClick: (d) => r(i, d)
|
|
417
422
|
}, null), h("label", {
|
|
418
423
|
class: "custom-control-label",
|
|
419
|
-
for:
|
|
420
|
-
}, [m(
|
|
424
|
+
for: s
|
|
425
|
+
}, [m(i)])]);
|
|
421
426
|
})]);
|
|
422
427
|
}
|
|
423
428
|
});
|
|
424
|
-
function
|
|
425
|
-
var
|
|
429
|
+
function Te(n, e, t) {
|
|
430
|
+
var z;
|
|
426
431
|
function o() {
|
|
427
432
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
428
433
|
}
|
|
429
434
|
o();
|
|
430
|
-
const
|
|
431
|
-
function
|
|
435
|
+
const r = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", m = k();
|
|
436
|
+
function a() {
|
|
432
437
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
433
438
|
}
|
|
434
|
-
function
|
|
439
|
+
function u() {
|
|
435
440
|
return !1;
|
|
436
441
|
}
|
|
437
|
-
function
|
|
442
|
+
function i() {
|
|
438
443
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
439
444
|
}
|
|
440
|
-
function
|
|
445
|
+
function c() {
|
|
441
446
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
442
447
|
}
|
|
443
|
-
function
|
|
448
|
+
function s(y) {
|
|
444
449
|
if (!y || !y.value)
|
|
445
450
|
return null;
|
|
446
451
|
if (y.value.schema && y.value.schema.type === "component")
|
|
447
452
|
return y.value;
|
|
448
|
-
const b = k(y == null ? void 0 : y.value.parent),
|
|
449
|
-
return
|
|
453
|
+
const b = k(y == null ? void 0 : y.value.parent), C = s(b);
|
|
454
|
+
return C || null;
|
|
450
455
|
}
|
|
451
456
|
function d(y = e) {
|
|
452
|
-
const { componentInstance: b, designerItemElementRef:
|
|
453
|
-
return !b || !b.value ? null : b.value.canMove ?
|
|
457
|
+
const { componentInstance: b, designerItemElementRef: C } = y;
|
|
458
|
+
return !b || !b.value ? null : b.value.canMove ? C : d(y.parent);
|
|
454
459
|
}
|
|
455
460
|
function f(y) {
|
|
456
461
|
return !!t && t.canAccepts(y);
|
|
@@ -458,72 +463,72 @@ function Me(n, e, t) {
|
|
|
458
463
|
function g() {
|
|
459
464
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
460
465
|
}
|
|
461
|
-
function
|
|
466
|
+
function T() {
|
|
462
467
|
}
|
|
463
|
-
function
|
|
468
|
+
function w(y, b) {
|
|
464
469
|
b && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(b);
|
|
465
470
|
}
|
|
466
|
-
function
|
|
467
|
-
const { componentType:
|
|
468
|
-
let
|
|
469
|
-
t && t.onResolveNewComponentSchema && (
|
|
470
|
-
const
|
|
471
|
-
return
|
|
471
|
+
function V(y, b) {
|
|
472
|
+
const { componentType: C } = y;
|
|
473
|
+
let M = O(C, y, b);
|
|
474
|
+
t && t.onResolveNewComponentSchema && (M = t.onResolveNewComponentSchema(y, M));
|
|
475
|
+
const S = C.toLowerCase().replace("-", "_");
|
|
476
|
+
return M && !M.id && M.type === C && (M.id = `${S}_${Math.random().toString().slice(2, 6)}`), M;
|
|
472
477
|
}
|
|
473
|
-
function
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
let
|
|
477
|
-
t && t.onAcceptNewChildElement && (
|
|
478
|
-
const
|
|
479
|
-
return
|
|
478
|
+
function G(y, b) {
|
|
479
|
+
const C = String(y.getAttribute("data-controltype")), M = y.getAttribute("data-feature"), S = M ? JSON.parse(M) : {};
|
|
480
|
+
S.parentComponentInstance = m.value;
|
|
481
|
+
let P = O(C, S);
|
|
482
|
+
t && t.onAcceptNewChildElement && (P = t.onAcceptNewChildElement(y, b, P));
|
|
483
|
+
const Y = C.toLowerCase().replace("-", "_");
|
|
484
|
+
return P && !P.id && P.type === C && (P.id = `${Y}_${Math.random().toString().slice(2, 6)}`), P;
|
|
480
485
|
}
|
|
481
|
-
function
|
|
486
|
+
function A(y) {
|
|
482
487
|
}
|
|
483
|
-
function
|
|
488
|
+
function R(...y) {
|
|
484
489
|
if (t && t.getPropsConfig)
|
|
485
490
|
return t.getPropsConfig(...y);
|
|
486
491
|
}
|
|
487
492
|
return m.value = {
|
|
488
|
-
canMove:
|
|
489
|
-
canSelectParent:
|
|
490
|
-
canDelete:
|
|
491
|
-
canNested: !
|
|
493
|
+
canMove: a(),
|
|
494
|
+
canSelectParent: u(),
|
|
495
|
+
canDelete: i(),
|
|
496
|
+
canNested: !c(),
|
|
492
497
|
contents: e == null ? void 0 : e.schema.contents,
|
|
493
498
|
elementRef: n,
|
|
494
|
-
parent: (
|
|
499
|
+
parent: (z = e == null ? void 0 : e.parent) == null ? void 0 : z.componentInstance,
|
|
495
500
|
schema: e == null ? void 0 : e.schema,
|
|
496
|
-
styles:
|
|
497
|
-
designerClass:
|
|
501
|
+
styles: r,
|
|
502
|
+
designerClass: p,
|
|
498
503
|
canAccepts: f,
|
|
499
|
-
getBelongedComponentInstance:
|
|
504
|
+
getBelongedComponentInstance: s,
|
|
500
505
|
getDraggableDesignItemElement: d,
|
|
501
506
|
getDraggingDisplayText: g,
|
|
502
|
-
getPropConfig:
|
|
503
|
-
getDragScopeElement:
|
|
504
|
-
onAcceptMovedChildElement:
|
|
505
|
-
onAcceptNewChildElement:
|
|
506
|
-
onChildElementMovedOut:
|
|
507
|
-
addNewChildComponentSchema:
|
|
507
|
+
getPropConfig: R,
|
|
508
|
+
getDragScopeElement: T,
|
|
509
|
+
onAcceptMovedChildElement: w,
|
|
510
|
+
onAcceptNewChildElement: G,
|
|
511
|
+
onChildElementMovedOut: A,
|
|
512
|
+
addNewChildComponentSchema: V,
|
|
508
513
|
updateDragAndDropRules: o,
|
|
509
514
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || k(!1),
|
|
510
515
|
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
|
|
511
516
|
}, m;
|
|
512
517
|
}
|
|
513
|
-
class
|
|
518
|
+
class we {
|
|
514
519
|
constructor(e, t) {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
520
|
+
v(this, "componentId");
|
|
521
|
+
v(this, "viewModelId");
|
|
522
|
+
v(this, "eventsEditorUtils");
|
|
523
|
+
v(this, "formSchemaUtils");
|
|
524
|
+
v(this, "formMetadataConverter");
|
|
525
|
+
v(this, "designViewModelUtils");
|
|
526
|
+
v(this, "designViewModelField");
|
|
527
|
+
v(this, "controlCreatorUtils");
|
|
528
|
+
v(this, "designerHostService");
|
|
529
|
+
v(this, "schemaService", null);
|
|
530
|
+
v(this, "metadataService", null);
|
|
531
|
+
v(this, "propertyConfig", {
|
|
527
532
|
type: "object",
|
|
528
533
|
categories: {}
|
|
529
534
|
});
|
|
@@ -539,7 +544,7 @@ class Te {
|
|
|
539
544
|
if (t) {
|
|
540
545
|
if (!this.designViewModelField) {
|
|
541
546
|
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
542
|
-
this.designViewModelField = o.fields.find((
|
|
547
|
+
this.designViewModelField = o.fields.find((r) => r.id === t);
|
|
543
548
|
}
|
|
544
549
|
e.updateOn = this.designViewModelField.updateOn;
|
|
545
550
|
}
|
|
@@ -565,7 +570,7 @@ class Te {
|
|
|
565
570
|
type: "combo-list",
|
|
566
571
|
textField: "name",
|
|
567
572
|
valueField: "value",
|
|
568
|
-
data: [{ value: e.type, name:
|
|
573
|
+
data: [{ value: e.type, name: l[e.type].name }]
|
|
569
574
|
}
|
|
570
575
|
}
|
|
571
576
|
}
|
|
@@ -607,7 +612,7 @@ const D = class D {
|
|
|
607
612
|
const e = [];
|
|
608
613
|
for (let t in D.fieldControlTypeMapping)
|
|
609
614
|
D.fieldControlTypeMapping[t].forEach((o) => {
|
|
610
|
-
e.find((
|
|
615
|
+
e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
|
|
611
616
|
});
|
|
612
617
|
return e;
|
|
613
618
|
}
|
|
@@ -615,55 +620,55 @@ const D = class D {
|
|
|
615
620
|
/**
|
|
616
621
|
* <字段类型,可配置的控件类型列表>的映射
|
|
617
622
|
*/
|
|
618
|
-
|
|
623
|
+
v(D, "fieldControlTypeMapping", {
|
|
619
624
|
String: [
|
|
620
|
-
{ key:
|
|
621
|
-
{ key:
|
|
622
|
-
{ key:
|
|
623
|
-
{ key:
|
|
624
|
-
{ key:
|
|
625
|
-
{ key:
|
|
626
|
-
{ key:
|
|
625
|
+
{ key: l["input-group"].type, value: l["input-group"].name },
|
|
626
|
+
{ key: l.lookup.type, value: l.lookup.name },
|
|
627
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name },
|
|
628
|
+
{ key: l["check-box"].type, value: l["check-box"].name },
|
|
629
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name },
|
|
630
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
631
|
+
{ key: l.textarea.type, value: l.textarea.name }
|
|
627
632
|
],
|
|
628
633
|
Text: [
|
|
629
|
-
{ key:
|
|
630
|
-
{ key:
|
|
634
|
+
{ key: l.textarea.type, value: l.textarea.name },
|
|
635
|
+
{ key: l.lookup.type, value: l.lookup.name }
|
|
631
636
|
],
|
|
632
637
|
Decimal: [
|
|
633
|
-
{ key:
|
|
638
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
634
639
|
],
|
|
635
640
|
Integer: [
|
|
636
|
-
{ key:
|
|
641
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
637
642
|
],
|
|
638
643
|
Number: [
|
|
639
|
-
{ key:
|
|
644
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
640
645
|
],
|
|
641
646
|
BigNumber: [
|
|
642
|
-
{ key:
|
|
647
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
643
648
|
],
|
|
644
649
|
Date: [
|
|
645
|
-
{ key:
|
|
650
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name }
|
|
646
651
|
],
|
|
647
652
|
DateTime: [
|
|
648
|
-
{ key:
|
|
653
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name }
|
|
649
654
|
],
|
|
650
655
|
Boolean: [
|
|
651
|
-
{ key:
|
|
652
|
-
{ key:
|
|
656
|
+
{ key: l.switch.type, value: l.switch.name },
|
|
657
|
+
{ key: l["check-box"].type, value: l["check-box"].name }
|
|
653
658
|
],
|
|
654
659
|
Enum: [
|
|
655
|
-
{ key:
|
|
656
|
-
{ key:
|
|
660
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
661
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name }
|
|
657
662
|
],
|
|
658
663
|
Object: [
|
|
659
|
-
{ key:
|
|
660
|
-
{ key:
|
|
661
|
-
{ key:
|
|
664
|
+
{ key: l.lookup.type, value: l.lookup.name },
|
|
665
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
666
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name }
|
|
662
667
|
]
|
|
663
668
|
});
|
|
664
|
-
let
|
|
665
|
-
const
|
|
666
|
-
class
|
|
669
|
+
let E = D;
|
|
670
|
+
const Ve = k(0);
|
|
671
|
+
class Pe extends we {
|
|
667
672
|
constructor(e, t) {
|
|
668
673
|
super(e, t);
|
|
669
674
|
}
|
|
@@ -674,7 +679,7 @@ class Ve extends Te {
|
|
|
674
679
|
var m;
|
|
675
680
|
var o = this;
|
|
676
681
|
this.setDesignViewModelField(e);
|
|
677
|
-
const
|
|
682
|
+
const r = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
678
683
|
return {
|
|
679
684
|
description: "Basic Information",
|
|
680
685
|
title: "基本信息",
|
|
@@ -686,8 +691,8 @@ class Ve extends Te {
|
|
|
686
691
|
readonly: !0
|
|
687
692
|
},
|
|
688
693
|
type: {
|
|
689
|
-
description: "
|
|
690
|
-
title: "
|
|
694
|
+
description: "编辑器类型",
|
|
695
|
+
title: "编辑器类型",
|
|
691
696
|
type: "string",
|
|
692
697
|
refreshPanelAfterChanged: !0,
|
|
693
698
|
$converter: "/converter/change-editor.converter",
|
|
@@ -696,7 +701,7 @@ class Ve extends Te {
|
|
|
696
701
|
textField: "value",
|
|
697
702
|
valueField: "key",
|
|
698
703
|
editable: !1,
|
|
699
|
-
data: o.designViewModelField ?
|
|
704
|
+
data: o.designViewModelField ? E.getEditorTypesByMDataType((m = o.designViewModelField.type) == null ? void 0 : m.name) : E.getAllInputTypes()
|
|
700
705
|
}
|
|
701
706
|
},
|
|
702
707
|
label: {
|
|
@@ -713,7 +718,7 @@ class Ve extends Te {
|
|
|
713
718
|
bindingType: { enable: !1 },
|
|
714
719
|
editorParams: {
|
|
715
720
|
propertyData: e,
|
|
716
|
-
formBasicInfo:
|
|
721
|
+
formBasicInfo: r
|
|
717
722
|
},
|
|
718
723
|
columns: [
|
|
719
724
|
{ field: "name", title: "字段名称" },
|
|
@@ -721,15 +726,19 @@ class Ve extends Te {
|
|
|
721
726
|
{ field: "fieldType", title: "字段类型" }
|
|
722
727
|
],
|
|
723
728
|
textField: "bindingField",
|
|
724
|
-
data:
|
|
729
|
+
data: p
|
|
725
730
|
}
|
|
726
731
|
}
|
|
727
732
|
},
|
|
728
|
-
setPropertyRelates(
|
|
729
|
-
if (
|
|
730
|
-
switch (
|
|
733
|
+
setPropertyRelates(a, u) {
|
|
734
|
+
if (a)
|
|
735
|
+
switch (a && a.propertyID) {
|
|
731
736
|
case "type": {
|
|
732
|
-
o.changeControlType(e,
|
|
737
|
+
o.changeControlType(e, a, t);
|
|
738
|
+
break;
|
|
739
|
+
}
|
|
740
|
+
case "label": {
|
|
741
|
+
a.needRefreshControlTree = !0;
|
|
733
742
|
break;
|
|
734
743
|
}
|
|
735
744
|
}
|
|
@@ -775,43 +784,43 @@ class Ve extends Te {
|
|
|
775
784
|
* @param newControlType 新控件类型
|
|
776
785
|
*/
|
|
777
786
|
changeControlType(e, t, o) {
|
|
778
|
-
var
|
|
779
|
-
const
|
|
780
|
-
if (!
|
|
787
|
+
var i, c, s, d;
|
|
788
|
+
const r = t.propertyValue, p = o && o.parent && o.parent.schema;
|
|
789
|
+
if (!p)
|
|
781
790
|
return;
|
|
782
|
-
const m =
|
|
783
|
-
let
|
|
791
|
+
const m = p.contents.findIndex((f) => f.id === e.id), a = p.contents[m];
|
|
792
|
+
let u;
|
|
784
793
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
785
794
|
editor: {
|
|
786
|
-
$type:
|
|
795
|
+
$type: r
|
|
787
796
|
},
|
|
788
797
|
name: this.designViewModelField.name,
|
|
789
798
|
require: this.designViewModelField.require,
|
|
790
799
|
readonly: this.designViewModelField.readonly
|
|
791
|
-
}, !1),
|
|
792
|
-
id:
|
|
793
|
-
appearance:
|
|
794
|
-
size:
|
|
795
|
-
label:
|
|
796
|
-
binding:
|
|
797
|
-
visible:
|
|
798
|
-
}), Object.assign(
|
|
799
|
-
isTextArea:
|
|
800
|
-
placeholder: (
|
|
801
|
-
holdPlace: (
|
|
802
|
-
readonly: (
|
|
803
|
-
require: (d =
|
|
804
|
-
}),
|
|
800
|
+
}, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), u || (u = L("form-group") || {}, u.editor = L(r) || {}, delete u.editor.id, delete u.editor.binding, delete u.editor.appearance), Object.assign(u, {
|
|
801
|
+
id: a.id,
|
|
802
|
+
appearance: a.appearance,
|
|
803
|
+
size: a.size,
|
|
804
|
+
label: a.label,
|
|
805
|
+
binding: a.binding,
|
|
806
|
+
visible: a.visible
|
|
807
|
+
}), Object.assign(u.editor, {
|
|
808
|
+
isTextArea: u.isTextArea && a.isTextArea,
|
|
809
|
+
placeholder: (i = a.editor) == null ? void 0 : i.placeholder,
|
|
810
|
+
holdPlace: (c = a.editor) == null ? void 0 : c.holdPlace,
|
|
811
|
+
readonly: (s = a.editor) == null ? void 0 : s.readonly,
|
|
812
|
+
require: (d = a.editor) == null ? void 0 : d.require
|
|
813
|
+
}), p.contents.splice(m, 1), p.contents.splice(m, 0, u), o.schema = Object.assign(a, u), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
805
814
|
(f) => f.classList.remove("dgComponentSelected")
|
|
806
|
-
),
|
|
815
|
+
), Ve.value++;
|
|
807
816
|
}
|
|
808
817
|
getComponentConfig(e, t = {}, o = {}) {
|
|
809
|
-
const
|
|
810
|
-
description: "
|
|
811
|
-
title: "
|
|
818
|
+
const r = Object.assign({
|
|
819
|
+
description: "编辑器",
|
|
820
|
+
title: "编辑器",
|
|
812
821
|
type: "input-group",
|
|
813
822
|
$converter: "/converter/property-editor.converter"
|
|
814
|
-
}, t),
|
|
823
|
+
}, t), p = Object.assign({
|
|
815
824
|
readonly: {
|
|
816
825
|
description: "",
|
|
817
826
|
title: "只读",
|
|
@@ -833,10 +842,10 @@ class Ve extends Te {
|
|
|
833
842
|
type: "string"
|
|
834
843
|
}
|
|
835
844
|
}, o);
|
|
836
|
-
return { ...
|
|
845
|
+
return { ...r, properties: { ...p } };
|
|
837
846
|
}
|
|
838
847
|
}
|
|
839
|
-
class De extends
|
|
848
|
+
class De extends Pe {
|
|
840
849
|
constructor(e, t) {
|
|
841
850
|
super(e, t);
|
|
842
851
|
}
|
|
@@ -872,118 +881,118 @@ class De extends Ve {
|
|
|
872
881
|
});
|
|
873
882
|
}
|
|
874
883
|
}
|
|
875
|
-
function
|
|
884
|
+
function Fe(n, e) {
|
|
876
885
|
n.schema;
|
|
877
886
|
const t = k(!0), o = k(!0);
|
|
878
|
-
function
|
|
887
|
+
function r(s) {
|
|
879
888
|
return !1;
|
|
880
889
|
}
|
|
881
|
-
function
|
|
890
|
+
function p() {
|
|
882
891
|
return !1;
|
|
883
892
|
}
|
|
884
893
|
function m() {
|
|
885
894
|
return !1;
|
|
886
895
|
}
|
|
887
|
-
function
|
|
896
|
+
function a() {
|
|
888
897
|
return !0;
|
|
889
898
|
}
|
|
890
|
-
function
|
|
899
|
+
function u(s) {
|
|
891
900
|
}
|
|
892
|
-
function
|
|
901
|
+
function i() {
|
|
893
902
|
}
|
|
894
|
-
function
|
|
903
|
+
function c(s) {
|
|
895
904
|
return null;
|
|
896
905
|
}
|
|
897
906
|
return {
|
|
898
|
-
canAccepts:
|
|
899
|
-
checkCanDeleteComponent:
|
|
907
|
+
canAccepts: r,
|
|
908
|
+
checkCanDeleteComponent: p,
|
|
900
909
|
checkCanMoveComponent: m,
|
|
901
|
-
hideNestedPaddingInDesginerView:
|
|
902
|
-
onAcceptMovedChildElement:
|
|
903
|
-
resolveComponentContext:
|
|
910
|
+
hideNestedPaddingInDesginerView: a,
|
|
911
|
+
onAcceptMovedChildElement: u,
|
|
912
|
+
resolveComponentContext: i,
|
|
904
913
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
905
914
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
906
|
-
getPropsConfig:
|
|
915
|
+
getPropsConfig: c
|
|
907
916
|
};
|
|
908
917
|
}
|
|
909
|
-
function
|
|
918
|
+
function Se(n, e) {
|
|
910
919
|
const {
|
|
911
920
|
canAccepts: t,
|
|
912
921
|
checkCanDeleteComponent: o,
|
|
913
|
-
checkCanMoveComponent:
|
|
914
|
-
hideNestedPaddingInDesginerView:
|
|
922
|
+
checkCanMoveComponent: r,
|
|
923
|
+
hideNestedPaddingInDesginerView: p,
|
|
915
924
|
onAcceptMovedChildElement: m,
|
|
916
|
-
resolveComponentContext:
|
|
917
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
918
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
919
|
-
} =
|
|
920
|
-
function
|
|
921
|
-
return new De(d, e).getPropertyConfig(
|
|
925
|
+
resolveComponentContext: a,
|
|
926
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
927
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
928
|
+
} = Fe(n), c = n.schema;
|
|
929
|
+
function s(d, f) {
|
|
930
|
+
return new De(d, e).getPropertyConfig(c, f);
|
|
922
931
|
}
|
|
923
932
|
return {
|
|
924
933
|
canAccepts: t,
|
|
925
934
|
checkCanDeleteComponent: o,
|
|
926
|
-
checkCanMoveComponent:
|
|
927
|
-
hideNestedPaddingInDesginerView:
|
|
935
|
+
checkCanMoveComponent: r,
|
|
936
|
+
hideNestedPaddingInDesginerView: p,
|
|
928
937
|
onAcceptMovedChildElement: m,
|
|
929
|
-
resolveComponentContext:
|
|
930
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
931
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
932
|
-
getPropsConfig:
|
|
938
|
+
resolveComponentContext: a,
|
|
939
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
940
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
941
|
+
getPropsConfig: s
|
|
933
942
|
};
|
|
934
943
|
}
|
|
935
|
-
const
|
|
944
|
+
const Be = /* @__PURE__ */ $({
|
|
936
945
|
name: "FRadioGroupDesign",
|
|
937
|
-
props:
|
|
946
|
+
props: j,
|
|
938
947
|
emits: ["changeValue", "update:modelValue"],
|
|
939
948
|
setup(n, e) {
|
|
940
949
|
const t = k(n.modelValue), {
|
|
941
950
|
enumData: o,
|
|
942
|
-
onClickRadio:
|
|
943
|
-
getValue:
|
|
951
|
+
onClickRadio: r,
|
|
952
|
+
getValue: p,
|
|
944
953
|
getText: m
|
|
945
|
-
} = Q(n, e, t),
|
|
954
|
+
} = Q(n, e, t), a = B(() => ({
|
|
946
955
|
"farris-checkradio-hor": n.horizontal
|
|
947
|
-
})),
|
|
956
|
+
})), u = k(), i = N("designer-host-service"), c = N("design-item-context"), s = Se(c, i), d = Te(u, c, s);
|
|
948
957
|
return W(() => {
|
|
949
|
-
|
|
958
|
+
u.value.componentInstance = d;
|
|
950
959
|
}), e.expose(d.value), () => h("div", {
|
|
951
|
-
class: ["farris-input-wrap",
|
|
952
|
-
ref:
|
|
960
|
+
class: ["farris-input-wrap", a.value],
|
|
961
|
+
ref: u
|
|
953
962
|
}, [o.value.map((f, g) => {
|
|
954
|
-
const
|
|
963
|
+
const T = "radio_" + n.name + g;
|
|
955
964
|
return h("div", {
|
|
956
965
|
class: "custom-control custom-radio"
|
|
957
966
|
}, [h("input", {
|
|
958
967
|
type: "radio",
|
|
959
968
|
class: "custom-control-input",
|
|
960
969
|
name: n.name,
|
|
961
|
-
id:
|
|
962
|
-
value:
|
|
963
|
-
checked:
|
|
970
|
+
id: T,
|
|
971
|
+
value: p(f),
|
|
972
|
+
checked: p(f) === t.value,
|
|
964
973
|
disabled: n.disabled,
|
|
965
974
|
tabindex: n.tabIndex,
|
|
966
|
-
onClick: (
|
|
975
|
+
onClick: (w) => r(f, w)
|
|
967
976
|
}, null), h("label", {
|
|
968
977
|
class: "custom-control-label",
|
|
969
|
-
for:
|
|
978
|
+
for: T
|
|
970
979
|
}, [m(f)])]);
|
|
971
980
|
})]);
|
|
972
981
|
}
|
|
973
982
|
});
|
|
974
|
-
|
|
975
|
-
n.component(
|
|
983
|
+
F.install = (n) => {
|
|
984
|
+
n.component(F.name, F), n.component(q.name, q);
|
|
976
985
|
};
|
|
977
|
-
|
|
978
|
-
n["radio-group"] =
|
|
986
|
+
F.register = (n, e, t, o) => {
|
|
987
|
+
n["radio-group"] = F, e["radio-group"] = X;
|
|
979
988
|
};
|
|
980
|
-
|
|
981
|
-
n["radio-group"] =
|
|
989
|
+
F.registerDesigner = (n, e, t) => {
|
|
990
|
+
n["radio-group"] = Be, e["radio-group"] = X;
|
|
982
991
|
};
|
|
983
992
|
export {
|
|
984
|
-
|
|
985
|
-
|
|
993
|
+
F as RadioGroup,
|
|
994
|
+
F as default,
|
|
986
995
|
X as propsResolver,
|
|
987
|
-
|
|
996
|
+
j as radioGroupProps,
|
|
988
997
|
ne as radioProps
|
|
989
998
|
};
|