@farris/ui-vue 1.2.7 → 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 +136 -136
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +418 -456
- package/components/avatar/index.umd.cjs +1 -1
- package/components/border-editor/index.esm.js +4 -4
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button/index.esm.js +1 -1
- package/components/button/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +363 -436
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +5 -5
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +417 -417
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +176 -176
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +557 -594
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +119 -119
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +502 -535
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +69 -69
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +387 -275
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1219 -983
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +292 -219
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +5718 -5546
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3291 -2930
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2650 -2682
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +945 -932
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +175 -133
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/discussion-editor/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +246 -246
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1319 -1172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +119 -82
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/enum-editor/index.esm.js +3 -3
- package/components/enum-editor/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +569 -514
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +104 -104
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3122 -2686
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +6780 -6608
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1466 -1523
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1048 -1035
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +422 -422
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +674 -716
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +291 -291
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +303 -230
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2486 -2130
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +7474 -7272
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6139 -5949
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +1 -1
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +432 -371
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +1124 -0
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1155 -0
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1215 -1178
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +147 -147
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1240 -1346
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +489 -428
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +220 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1512 -1540
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +749 -815
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +7074 -0
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +86 -86
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +442 -479
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +213 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +116 -116
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +943 -918
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1174 -1295
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5383 -5171
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +201 -201
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +684 -542
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +121 -121
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/spacing-editor/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +1158 -382
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +232 -232
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +451 -487
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2078 -2168
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +318 -320
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +192 -192
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +471 -497
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1421 -1441
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +430 -421
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +6806 -6624
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2793 -2433
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +165 -165
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +255 -255
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +413 -334
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +902 -902
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +54155 -52847
- package/farris.all.umd.cjs +9 -9
- 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/checkbox/index.d.ts +1 -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/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- 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 +19 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +3 -3
- package/types/dynamic-form/index.d.ts +3 -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-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- 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/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { useCheck as
|
|
6
|
-
import { cloneDeep as
|
|
7
|
-
|
|
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
|
+
import { useCheck as ee } from "../common/index.esm.js";
|
|
6
|
+
import { cloneDeep as te } from "lodash-es";
|
|
7
|
+
import { getSchemaByType as L } from "../dynamic-resolver/index.esm.js";
|
|
8
|
+
const ne = {
|
|
8
9
|
value: { type: String, default: "" },
|
|
9
10
|
/** 值 */
|
|
10
11
|
modelValue: { type: String, default: "" },
|
|
@@ -14,41 +15,41 @@ const ee = {
|
|
|
14
15
|
label: { type: String, default: "" },
|
|
15
16
|
/** 标识 */
|
|
16
17
|
id: { type: String, default: "" }
|
|
17
|
-
},
|
|
18
|
+
}, x = Symbol("radioGroupContext"), q = /* @__PURE__ */ $({
|
|
18
19
|
name: "FRadio",
|
|
19
|
-
props:
|
|
20
|
+
props: ne,
|
|
20
21
|
emits: ["update:value"],
|
|
21
22
|
setup(n, e) {
|
|
22
|
-
const t =
|
|
23
|
+
const t = N(x, null), {
|
|
23
24
|
buttonClass: o,
|
|
24
25
|
checked: r,
|
|
25
26
|
disabled: p,
|
|
26
27
|
name: m,
|
|
27
|
-
tagClass:
|
|
28
|
+
tagClass: a,
|
|
28
29
|
shouldRenderButton: u,
|
|
29
|
-
shouldRenderNative:
|
|
30
|
-
shouldRenderTag:
|
|
31
|
-
onClickRadio:
|
|
32
|
-
} =
|
|
33
|
-
return
|
|
30
|
+
shouldRenderNative: i,
|
|
31
|
+
shouldRenderTag: c,
|
|
32
|
+
onClickRadio: s
|
|
33
|
+
} = ee(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
|
|
34
|
+
return W(() => {
|
|
34
35
|
}), () => {
|
|
35
|
-
var
|
|
36
|
-
return h(
|
|
36
|
+
var d, f, g, T, w, V;
|
|
37
|
+
return h(I, null, [u.value && h("div", {
|
|
37
38
|
class: o.value,
|
|
38
39
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
39
|
-
onClick:
|
|
40
|
-
}, [(
|
|
41
|
-
class:
|
|
42
|
-
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
|
|
43
44
|
}, [h("div", {
|
|
44
45
|
class: "title"
|
|
45
46
|
}, [(T = (g = e.slots).default) == null ? void 0 : T.call(g)]), h("div", {
|
|
46
47
|
class: "tip"
|
|
47
48
|
}, null), h("span", {
|
|
48
49
|
class: "f-icon f-icon-check f-radio-icon"
|
|
49
|
-
}, null)]),
|
|
50
|
+
}, null)]), i.value && h("div", {
|
|
50
51
|
class: "custom-control custom-radio",
|
|
51
|
-
onClick:
|
|
52
|
+
onClick: s
|
|
52
53
|
}, [h("input", {
|
|
53
54
|
type: "radio",
|
|
54
55
|
class: "custom-control-input",
|
|
@@ -59,32 +60,32 @@ const ee = {
|
|
|
59
60
|
disabled: p.value
|
|
60
61
|
}, null), h("div", {
|
|
61
62
|
class: "custom-control-label"
|
|
62
|
-
}, [(
|
|
63
|
+
}, [(V = (w = e.slots).default) == null ? void 0 : V.call(w)])])]);
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
});
|
|
66
|
-
function
|
|
67
|
+
function oe(n, e, t) {
|
|
67
68
|
return e;
|
|
68
69
|
}
|
|
69
|
-
const
|
|
70
|
-
function
|
|
71
|
-
const { properties: e, title: t } = n, o = Object.keys(e).reduce((
|
|
72
|
-
return o.id = `${t}-${Date.now()}
|
|
70
|
+
const _ = {}, J = {};
|
|
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;
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
let
|
|
78
|
-
const
|
|
79
|
-
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;
|
|
80
81
|
}
|
|
81
82
|
return null;
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
-
const t =
|
|
85
|
-
return Object.keys(n).reduce((o, r) => (o[r] = n[r], o), t), t;
|
|
84
|
+
function re(n, e) {
|
|
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;
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function ie(n, e) {
|
|
88
89
|
return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
|
|
89
90
|
if (e.has(r)) {
|
|
90
91
|
const p = e.get(r);
|
|
@@ -100,70 +101,68 @@ function oe(n, e) {
|
|
|
100
101
|
}, {});
|
|
101
102
|
}
|
|
102
103
|
function ae(n, e, t = /* @__PURE__ */ new Map()) {
|
|
103
|
-
const o =
|
|
104
|
-
return
|
|
104
|
+
const o = re(n, e);
|
|
105
|
+
return ie(o, t);
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
-
function e(
|
|
108
|
-
if (typeof
|
|
109
|
-
return
|
|
110
|
-
if (typeof
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
return Number(
|
|
114
|
-
if (
|
|
115
|
-
return Number(
|
|
116
|
-
if (
|
|
117
|
-
return Number(
|
|
107
|
+
function le(n = {}) {
|
|
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
|
+
if (f === "not")
|
|
114
|
+
return Number(d[i].length) !== Number(g);
|
|
115
|
+
if (f === "moreThan")
|
|
116
|
+
return Number(d[i].length) >= Number(g);
|
|
117
|
+
if (f === "lessThan")
|
|
118
|
+
return Number(d[i].length) <= Number(g);
|
|
118
119
|
}
|
|
119
120
|
return !1;
|
|
120
121
|
}
|
|
121
|
-
function t(
|
|
122
|
-
return
|
|
122
|
+
function t(i, c, s, d) {
|
|
123
|
+
return d[i] && d[i].propertyValue && String(d[i].propertyValue.value) === String(s);
|
|
123
124
|
}
|
|
124
125
|
const o = /* @__PURE__ */ new Map([
|
|
125
126
|
["length", e],
|
|
126
127
|
["getProperty", t]
|
|
127
128
|
]);
|
|
128
|
-
Object.keys(n).reduce((
|
|
129
|
-
function r(
|
|
130
|
-
const
|
|
131
|
-
return typeof
|
|
132
|
-
if (
|
|
133
|
-
return { target:
|
|
134
|
-
const
|
|
135
|
-
return { target:
|
|
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
|
+
if (d === "length")
|
|
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 };
|
|
136
137
|
}) : [];
|
|
137
138
|
}
|
|
138
|
-
function p(
|
|
139
|
-
return Object.keys(
|
|
140
|
-
const
|
|
141
|
-
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;
|
|
142
143
|
}, []);
|
|
143
144
|
}
|
|
144
|
-
function m(
|
|
145
|
-
if (o.has(
|
|
146
|
-
const
|
|
147
|
-
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;
|
|
148
149
|
}
|
|
149
150
|
return !1;
|
|
150
151
|
}
|
|
151
|
-
function
|
|
152
|
-
return p(
|
|
152
|
+
function a(i, c) {
|
|
153
|
+
return p(i).reduce((f, g) => f && m(g, c), !0);
|
|
153
154
|
}
|
|
154
|
-
function u(
|
|
155
|
-
const
|
|
156
|
-
return
|
|
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);
|
|
157
158
|
}
|
|
158
159
|
return { parseValueSchema: u };
|
|
159
160
|
}
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
161
|
+
const l = {
|
|
162
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
163
163
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
164
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
164
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
165
165
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
166
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
167
166
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
168
167
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
169
168
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -174,114 +173,43 @@ const i = {
|
|
|
174
173
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
175
174
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
176
175
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
181
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
182
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
176
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
177
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
178
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
183
179
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
184
|
-
|
|
185
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
186
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
187
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
180
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
188
181
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
189
182
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
190
|
-
|
|
191
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
183
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
192
184
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
193
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
194
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
195
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
196
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
197
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
198
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
199
185
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
200
186
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
201
187
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
202
|
-
|
|
203
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
204
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
205
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
206
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
207
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
208
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
188
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
209
189
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
217
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
218
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
219
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
220
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
221
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
222
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
223
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
224
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
225
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
226
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
227
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
228
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
229
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
230
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
231
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
232
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
233
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
234
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
235
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
236
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
237
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
238
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
190
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
191
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
192
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
193
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
194
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
195
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
239
196
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
249
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
250
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
251
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
252
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
253
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
254
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
255
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
256
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
257
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
258
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
259
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
260
|
-
/** 查询类 start */
|
|
261
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
262
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
263
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
264
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
265
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
266
|
-
/** 查询类 end */
|
|
267
|
-
/** 审批类 start */
|
|
268
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
269
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
270
|
-
/** 审批类 end */
|
|
271
|
-
}, re = {}, le = {};
|
|
272
|
-
ie();
|
|
273
|
-
function ce(n, e, t = /* @__PURE__ */ new Map(), o = (m, d, u) => d, r = {}, p = (m) => m) {
|
|
274
|
-
return j[e.title] = e, W[e.title] = o, re[e.title] = r, le[e.title] = p, (m = {}) => {
|
|
275
|
-
const d = ae(m, e, t), u = Object.keys(n).reduce((a, l) => (a[l] = n[l].default, a), {});
|
|
276
|
-
return Object.assign(u, d);
|
|
197
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
198
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
199
|
+
}, ce = {}, se = {};
|
|
200
|
+
le();
|
|
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);
|
|
277
205
|
};
|
|
278
206
|
}
|
|
279
|
-
function
|
|
207
|
+
function ue(n, e) {
|
|
280
208
|
return { customClass: e.class, customStyle: e.style };
|
|
281
209
|
}
|
|
282
|
-
const
|
|
283
|
-
["appearance",
|
|
284
|
-
]),
|
|
210
|
+
const de = /* @__PURE__ */ new Map([
|
|
211
|
+
["appearance", ue]
|
|
212
|
+
]), me = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/radio-group.schema.json", ye = "radio-group", ge = "A Farris Input Component", he = "object", ve = {
|
|
285
213
|
id: {
|
|
286
214
|
description: "The unique identifier for a radio-group",
|
|
287
215
|
type: "string"
|
|
@@ -362,18 +290,23 @@ const se = /* @__PURE__ */ new Map([
|
|
|
362
290
|
description: "",
|
|
363
291
|
type: "array"
|
|
364
292
|
}
|
|
365
|
-
},
|
|
293
|
+
}, be = [
|
|
366
294
|
"id",
|
|
367
295
|
"type"
|
|
368
|
-
],
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
296
|
+
], Ce = [
|
|
297
|
+
"id",
|
|
298
|
+
"appearance",
|
|
299
|
+
"binding"
|
|
300
|
+
], ke = {
|
|
301
|
+
$schema: me,
|
|
302
|
+
$id: fe,
|
|
303
|
+
title: ye,
|
|
304
|
+
description: ge,
|
|
305
|
+
type: he,
|
|
306
|
+
properties: ve,
|
|
307
|
+
required: be,
|
|
308
|
+
ignore: Ce
|
|
309
|
+
}, Me = {
|
|
377
310
|
/**
|
|
378
311
|
* 是否被选中
|
|
379
312
|
*/
|
|
@@ -390,8 +323,8 @@ const se = /* @__PURE__ */ new Map([
|
|
|
390
323
|
* type为button或者tag时的尺寸
|
|
391
324
|
*/
|
|
392
325
|
size: { type: String, default: "middle" }
|
|
393
|
-
},
|
|
394
|
-
...
|
|
326
|
+
}, j = {
|
|
327
|
+
...Me,
|
|
395
328
|
/**
|
|
396
329
|
* 组件标识
|
|
397
330
|
*/
|
|
@@ -430,262 +363,324 @@ const se = /* @__PURE__ */ new Map([
|
|
|
430
363
|
* 枚举数组中枚举值的key值。
|
|
431
364
|
*/
|
|
432
365
|
valueField: { type: String, default: "value" }
|
|
433
|
-
},
|
|
434
|
-
function
|
|
435
|
-
const o =
|
|
366
|
+
}, X = pe(j, ke, de, oe);
|
|
367
|
+
function Q(n, e, t) {
|
|
368
|
+
const o = B(() => !n.disabled), r = B(() => n.enumData || []);
|
|
436
369
|
function p(u) {
|
|
437
370
|
return u[n.valueField];
|
|
438
371
|
}
|
|
439
372
|
function m(u) {
|
|
440
373
|
return u[n.textField];
|
|
441
374
|
}
|
|
442
|
-
function
|
|
375
|
+
function a(u, i) {
|
|
443
376
|
if (o.value) {
|
|
444
|
-
const
|
|
445
|
-
t.value !==
|
|
377
|
+
const c = p(u);
|
|
378
|
+
t.value !== c && (t.value = c, e.emit("changeValue", c), e.emit("update:modelValue", c));
|
|
446
379
|
}
|
|
447
|
-
|
|
380
|
+
i.stopPropagation();
|
|
448
381
|
}
|
|
449
382
|
return {
|
|
450
383
|
enumData: r,
|
|
451
384
|
getValue: p,
|
|
452
385
|
getText: m,
|
|
453
|
-
onClickRadio:
|
|
386
|
+
onClickRadio: a
|
|
454
387
|
};
|
|
455
388
|
}
|
|
456
|
-
const
|
|
389
|
+
const F = /* @__PURE__ */ $({
|
|
457
390
|
name: "FRadioGroup",
|
|
458
|
-
props:
|
|
391
|
+
props: j,
|
|
459
392
|
emits: ["changeValue", "update:modelValue"],
|
|
460
393
|
setup(n, e) {
|
|
461
|
-
const t =
|
|
394
|
+
const t = k(n.modelValue), {
|
|
462
395
|
enumData: o,
|
|
463
396
|
onClickRadio: r,
|
|
464
397
|
getValue: p,
|
|
465
398
|
getText: m
|
|
466
|
-
} =
|
|
399
|
+
} = Q(n, e, t), a = B(() => ({
|
|
467
400
|
"farris-checkradio-hor": n.direction === "horizontal"
|
|
468
|
-
})), u =
|
|
469
|
-
return
|
|
401
|
+
})), u = k([]);
|
|
402
|
+
return K(x, {
|
|
470
403
|
radios: u,
|
|
471
404
|
parentProps: n,
|
|
472
405
|
parentContext: e
|
|
473
406
|
}), () => h("div", {
|
|
474
|
-
class: ["farris-input-wrap",
|
|
475
|
-
}, [e.slots.default ? e.slots.default() : o.value.map((
|
|
476
|
-
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];
|
|
477
410
|
return h("div", {
|
|
478
411
|
class: "custom-control custom-radio"
|
|
479
412
|
}, [h("input", {
|
|
480
413
|
type: "radio",
|
|
481
414
|
class: "custom-control-input",
|
|
482
|
-
name:
|
|
483
|
-
id:
|
|
484
|
-
value: p(
|
|
485
|
-
checked: p(
|
|
415
|
+
name: s,
|
|
416
|
+
id: s,
|
|
417
|
+
value: p(i),
|
|
418
|
+
checked: p(i) === t.value,
|
|
486
419
|
disabled: n.disabled,
|
|
487
420
|
tabindex: n.tabIndex,
|
|
488
|
-
onClick: (
|
|
421
|
+
onClick: (d) => r(i, d)
|
|
489
422
|
}, null), h("label", {
|
|
490
423
|
class: "custom-control-label",
|
|
491
|
-
for:
|
|
492
|
-
}, [m(
|
|
424
|
+
for: s
|
|
425
|
+
}, [m(i)])]);
|
|
493
426
|
})]);
|
|
494
427
|
}
|
|
495
428
|
});
|
|
496
|
-
function
|
|
497
|
-
var
|
|
429
|
+
function Te(n, e, t) {
|
|
430
|
+
var z;
|
|
498
431
|
function o() {
|
|
499
432
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
500
433
|
}
|
|
501
434
|
o();
|
|
502
|
-
const r = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", m =
|
|
503
|
-
function
|
|
435
|
+
const r = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", m = k();
|
|
436
|
+
function a() {
|
|
504
437
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
505
438
|
}
|
|
506
439
|
function u() {
|
|
507
440
|
return !1;
|
|
508
441
|
}
|
|
509
|
-
function
|
|
442
|
+
function i() {
|
|
510
443
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
511
444
|
}
|
|
512
|
-
function
|
|
445
|
+
function c() {
|
|
513
446
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
514
447
|
}
|
|
515
|
-
function
|
|
516
|
-
if (!
|
|
448
|
+
function s(y) {
|
|
449
|
+
if (!y || !y.value)
|
|
517
450
|
return null;
|
|
518
|
-
if (
|
|
519
|
-
return
|
|
520
|
-
const b =
|
|
521
|
-
return
|
|
451
|
+
if (y.value.schema && y.value.schema.type === "component")
|
|
452
|
+
return y.value;
|
|
453
|
+
const b = k(y == null ? void 0 : y.value.parent), C = s(b);
|
|
454
|
+
return C || null;
|
|
522
455
|
}
|
|
523
|
-
function
|
|
524
|
-
const { componentInstance: b, designerItemElementRef:
|
|
525
|
-
return !b || !b.value ? null : b.value.canMove ?
|
|
456
|
+
function d(y = e) {
|
|
457
|
+
const { componentInstance: b, designerItemElementRef: C } = y;
|
|
458
|
+
return !b || !b.value ? null : b.value.canMove ? C : d(y.parent);
|
|
526
459
|
}
|
|
527
|
-
function y
|
|
528
|
-
return !!t && t.canAccepts(
|
|
460
|
+
function f(y) {
|
|
461
|
+
return !!t && t.canAccepts(y);
|
|
529
462
|
}
|
|
530
463
|
function g() {
|
|
531
464
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
532
465
|
}
|
|
533
466
|
function T() {
|
|
534
467
|
}
|
|
535
|
-
function
|
|
468
|
+
function w(y, b) {
|
|
536
469
|
b && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(b);
|
|
537
470
|
}
|
|
538
|
-
function
|
|
539
|
-
const { componentType:
|
|
540
|
-
let
|
|
541
|
-
t && t.onResolveNewComponentSchema && (
|
|
542
|
-
const
|
|
543
|
-
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;
|
|
544
477
|
}
|
|
545
|
-
function
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
let
|
|
549
|
-
t && t.onAcceptNewChildElement && (
|
|
550
|
-
const
|
|
551
|
-
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;
|
|
552
485
|
}
|
|
553
|
-
function
|
|
486
|
+
function A(y) {
|
|
554
487
|
}
|
|
555
|
-
function
|
|
488
|
+
function R(...y) {
|
|
556
489
|
if (t && t.getPropsConfig)
|
|
557
|
-
return t.getPropsConfig(...
|
|
490
|
+
return t.getPropsConfig(...y);
|
|
558
491
|
}
|
|
559
492
|
return m.value = {
|
|
560
|
-
canMove:
|
|
493
|
+
canMove: a(),
|
|
561
494
|
canSelectParent: u(),
|
|
562
|
-
canDelete:
|
|
563
|
-
canNested: !
|
|
495
|
+
canDelete: i(),
|
|
496
|
+
canNested: !c(),
|
|
564
497
|
contents: e == null ? void 0 : e.schema.contents,
|
|
565
498
|
elementRef: n,
|
|
566
|
-
parent: (
|
|
499
|
+
parent: (z = e == null ? void 0 : e.parent) == null ? void 0 : z.componentInstance,
|
|
567
500
|
schema: e == null ? void 0 : e.schema,
|
|
568
501
|
styles: r,
|
|
569
502
|
designerClass: p,
|
|
570
|
-
canAccepts:
|
|
571
|
-
getBelongedComponentInstance:
|
|
572
|
-
getDraggableDesignItemElement:
|
|
503
|
+
canAccepts: f,
|
|
504
|
+
getBelongedComponentInstance: s,
|
|
505
|
+
getDraggableDesignItemElement: d,
|
|
573
506
|
getDraggingDisplayText: g,
|
|
574
|
-
getPropConfig:
|
|
507
|
+
getPropConfig: R,
|
|
575
508
|
getDragScopeElement: T,
|
|
576
|
-
onAcceptMovedChildElement:
|
|
577
|
-
onAcceptNewChildElement:
|
|
578
|
-
onChildElementMovedOut:
|
|
579
|
-
addNewChildComponentSchema:
|
|
509
|
+
onAcceptMovedChildElement: w,
|
|
510
|
+
onAcceptNewChildElement: G,
|
|
511
|
+
onChildElementMovedOut: A,
|
|
512
|
+
addNewChildComponentSchema: V,
|
|
580
513
|
updateDragAndDropRules: o,
|
|
581
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
582
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
514
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || k(!1),
|
|
515
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
|
|
583
516
|
}, m;
|
|
584
517
|
}
|
|
585
|
-
class
|
|
518
|
+
class we {
|
|
519
|
+
constructor(e, t) {
|
|
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", {
|
|
532
|
+
type: "object",
|
|
533
|
+
categories: {}
|
|
534
|
+
});
|
|
535
|
+
var o;
|
|
536
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
537
|
+
}
|
|
538
|
+
getTableInfo() {
|
|
539
|
+
var e;
|
|
540
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
541
|
+
}
|
|
542
|
+
setDesignViewModelField(e) {
|
|
543
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
544
|
+
if (t) {
|
|
545
|
+
if (!this.designViewModelField) {
|
|
546
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
547
|
+
this.designViewModelField = o.fields.find((r) => r.id === t);
|
|
548
|
+
}
|
|
549
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
changeFieldEditorType(e, t) {
|
|
553
|
+
}
|
|
554
|
+
getBasicPropConfig(e) {
|
|
555
|
+
return {
|
|
556
|
+
description: "Basic Information",
|
|
557
|
+
title: "基本信息",
|
|
558
|
+
properties: {
|
|
559
|
+
id: {
|
|
560
|
+
description: "组件标识",
|
|
561
|
+
title: "标识",
|
|
562
|
+
type: "string",
|
|
563
|
+
readonly: !0
|
|
564
|
+
},
|
|
565
|
+
type: {
|
|
566
|
+
description: "组件类型",
|
|
567
|
+
title: "控件类型",
|
|
568
|
+
type: "select",
|
|
569
|
+
editor: {
|
|
570
|
+
type: "combo-list",
|
|
571
|
+
textField: "name",
|
|
572
|
+
valueField: "value",
|
|
573
|
+
data: [{ value: e.type, name: l[e.type].name }]
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
getAppearanceConfig(e = null) {
|
|
580
|
+
return {
|
|
581
|
+
title: "样式",
|
|
582
|
+
description: "Appearance",
|
|
583
|
+
properties: {
|
|
584
|
+
class: {
|
|
585
|
+
title: "class样式",
|
|
586
|
+
type: "string",
|
|
587
|
+
description: "组件的CSS样式",
|
|
588
|
+
$converter: "/converter/appearance.converter"
|
|
589
|
+
},
|
|
590
|
+
style: {
|
|
591
|
+
title: "style样式",
|
|
592
|
+
type: "string",
|
|
593
|
+
description: "组件的样式",
|
|
594
|
+
$converter: "/converter/appearance.converter"
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
const D = class D {
|
|
601
|
+
/**
|
|
602
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
603
|
+
*/
|
|
586
604
|
static getEditorTypesByMDataType(e) {
|
|
587
|
-
const t =
|
|
605
|
+
const t = D.fieldControlTypeMapping[e];
|
|
588
606
|
return t || [{ key: "", value: "" }];
|
|
589
607
|
}
|
|
590
|
-
|
|
608
|
+
/**
|
|
609
|
+
* 获取所有输入类控件
|
|
610
|
+
*/
|
|
611
|
+
static getAllInputTypes() {
|
|
612
|
+
const e = [];
|
|
613
|
+
for (let t in D.fieldControlTypeMapping)
|
|
614
|
+
D.fieldControlTypeMapping[t].forEach((o) => {
|
|
615
|
+
e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
|
|
616
|
+
});
|
|
617
|
+
return e;
|
|
618
|
+
}
|
|
619
|
+
};
|
|
591
620
|
/**
|
|
592
621
|
* <字段类型,可配置的控件类型列表>的映射
|
|
593
622
|
*/
|
|
594
|
-
|
|
623
|
+
v(D, "fieldControlTypeMapping", {
|
|
595
624
|
String: [
|
|
596
|
-
{ key:
|
|
597
|
-
{ key:
|
|
598
|
-
{ key:
|
|
599
|
-
{ key:
|
|
600
|
-
{ key:
|
|
601
|
-
{ key:
|
|
602
|
-
{ key:
|
|
603
|
-
{ key: i.textarea.type, value: i.textarea.name }
|
|
604
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
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 }
|
|
605
632
|
],
|
|
606
633
|
Text: [
|
|
607
|
-
{ key:
|
|
608
|
-
{ key:
|
|
609
|
-
{ key: i.lookup.type, value: i.lookup.name }
|
|
634
|
+
{ key: l.textarea.type, value: l.textarea.name },
|
|
635
|
+
{ key: l.lookup.type, value: l.lookup.name }
|
|
610
636
|
],
|
|
611
637
|
Decimal: [
|
|
612
|
-
{ key:
|
|
638
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
613
639
|
],
|
|
614
640
|
Integer: [
|
|
615
|
-
{ key:
|
|
641
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
616
642
|
],
|
|
617
643
|
Number: [
|
|
618
|
-
{ key:
|
|
644
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
619
645
|
],
|
|
620
646
|
BigNumber: [
|
|
621
|
-
{ key:
|
|
647
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
622
648
|
],
|
|
623
649
|
Date: [
|
|
624
|
-
{ key:
|
|
650
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name }
|
|
625
651
|
],
|
|
626
652
|
DateTime: [
|
|
627
|
-
{ key:
|
|
653
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name }
|
|
628
654
|
],
|
|
629
655
|
Boolean: [
|
|
630
|
-
{ key:
|
|
631
|
-
{ key:
|
|
656
|
+
{ key: l.switch.type, value: l.switch.name },
|
|
657
|
+
{ key: l["check-box"].type, value: l["check-box"].name }
|
|
632
658
|
],
|
|
633
659
|
Enum: [
|
|
634
|
-
{ key:
|
|
635
|
-
{ key:
|
|
660
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
661
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name }
|
|
636
662
|
],
|
|
637
663
|
Object: [
|
|
638
|
-
{ key:
|
|
639
|
-
{ key:
|
|
640
|
-
{ key:
|
|
641
|
-
],
|
|
642
|
-
EmployeeSelector: [
|
|
643
|
-
{ key: i.EmployeeSelector.type, value: i.EmployeeSelector.name }
|
|
644
|
-
],
|
|
645
|
-
AdminOrganizationSelector: [
|
|
646
|
-
{ key: i.AdminOrganizationSelector.type, value: i.AdminOrganizationSelector.name }
|
|
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 }
|
|
647
667
|
]
|
|
648
668
|
});
|
|
649
|
-
|
|
669
|
+
let E = D;
|
|
670
|
+
const Ve = k(0);
|
|
671
|
+
class Pe extends we {
|
|
650
672
|
constructor(e, t) {
|
|
651
|
-
|
|
652
|
-
C(this, "viewModelId");
|
|
653
|
-
C(this, "eventsEditorUtils");
|
|
654
|
-
C(this, "formSchemaUtils");
|
|
655
|
-
C(this, "formMetadataConverter");
|
|
656
|
-
C(this, "designViewModelUtils");
|
|
657
|
-
C(this, "designViewModelField");
|
|
658
|
-
C(this, "controlCreatorUtils");
|
|
659
|
-
C(this, "designerHostService");
|
|
660
|
-
C(this, "schemaService", null);
|
|
661
|
-
C(this, "metadataService", null);
|
|
662
|
-
C(this, "propertyConfig", {
|
|
663
|
-
type: "object",
|
|
664
|
-
categories: {}
|
|
665
|
-
});
|
|
666
|
-
var o;
|
|
667
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
668
|
-
}
|
|
669
|
-
getTableInfo() {
|
|
670
|
-
var e;
|
|
671
|
-
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
672
|
-
}
|
|
673
|
-
setDesignViewModelField(e) {
|
|
674
|
-
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
675
|
-
if (t) {
|
|
676
|
-
if (!this.designViewModelField) {
|
|
677
|
-
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
678
|
-
this.designViewModelField = o.fields.find((r) => r.id === t);
|
|
679
|
-
}
|
|
680
|
-
e.updateOn = this.designViewModelField.updateOn;
|
|
681
|
-
}
|
|
673
|
+
super(e, t);
|
|
682
674
|
}
|
|
683
|
-
|
|
675
|
+
getPropertyConfig(e, t) {
|
|
676
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
684
677
|
}
|
|
685
|
-
|
|
686
|
-
var
|
|
687
|
-
var
|
|
688
|
-
|
|
678
|
+
getBasicProperties(e, t) {
|
|
679
|
+
var m;
|
|
680
|
+
var o = this;
|
|
681
|
+
this.setDesignViewModelField(e);
|
|
682
|
+
const r = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
683
|
+
return {
|
|
689
684
|
description: "Basic Information",
|
|
690
685
|
title: "基本信息",
|
|
691
686
|
properties: {
|
|
@@ -696,8 +691,8 @@ class Se {
|
|
|
696
691
|
readonly: !0
|
|
697
692
|
},
|
|
698
693
|
type: {
|
|
699
|
-
description: "
|
|
700
|
-
title: "
|
|
694
|
+
description: "编辑器类型",
|
|
695
|
+
title: "编辑器类型",
|
|
701
696
|
type: "string",
|
|
702
697
|
refreshPanelAfterChanged: !0,
|
|
703
698
|
$converter: "/converter/change-editor.converter",
|
|
@@ -705,63 +700,52 @@ class Se {
|
|
|
705
700
|
type: "combo-list",
|
|
706
701
|
textField: "value",
|
|
707
702
|
valueField: "key",
|
|
708
|
-
|
|
709
|
-
|
|
703
|
+
editable: !1,
|
|
704
|
+
data: o.designViewModelField ? E.getEditorTypesByMDataType((m = o.designViewModelField.type) == null ? void 0 : m.name) : E.getAllInputTypes()
|
|
710
705
|
}
|
|
711
706
|
},
|
|
712
707
|
label: {
|
|
713
708
|
title: "标签",
|
|
714
709
|
type: "string",
|
|
715
710
|
$converter: "/converter/form-group-label.converter"
|
|
711
|
+
},
|
|
712
|
+
binding: {
|
|
713
|
+
description: "绑定的表单字段",
|
|
714
|
+
title: "绑定",
|
|
715
|
+
$converter: "/converter/field-selector.converter",
|
|
716
|
+
editor: {
|
|
717
|
+
type: "field-selector",
|
|
718
|
+
bindingType: { enable: !1 },
|
|
719
|
+
editorParams: {
|
|
720
|
+
propertyData: e,
|
|
721
|
+
formBasicInfo: r
|
|
722
|
+
},
|
|
723
|
+
columns: [
|
|
724
|
+
{ field: "name", title: "字段名称" },
|
|
725
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
726
|
+
{ field: "fieldType", title: "字段类型" }
|
|
727
|
+
],
|
|
728
|
+
textField: "bindingField",
|
|
729
|
+
data: p
|
|
730
|
+
}
|
|
716
731
|
}
|
|
717
732
|
},
|
|
718
|
-
setPropertyRelates(
|
|
719
|
-
if (
|
|
720
|
-
switch (
|
|
733
|
+
setPropertyRelates(a, u) {
|
|
734
|
+
if (a)
|
|
735
|
+
switch (a && a.propertyID) {
|
|
721
736
|
case "type": {
|
|
722
|
-
|
|
737
|
+
o.changeControlType(e, a, t);
|
|
738
|
+
break;
|
|
739
|
+
}
|
|
740
|
+
case "label": {
|
|
741
|
+
a.needRefreshControlTree = !0;
|
|
723
742
|
break;
|
|
724
743
|
}
|
|
725
744
|
}
|
|
726
745
|
}
|
|
727
746
|
};
|
|
728
747
|
}
|
|
729
|
-
|
|
730
|
-
* 卡片控件:切换控件类型后事件
|
|
731
|
-
* @param propertyData 控件DOM属性
|
|
732
|
-
* @param newControlType 新控件类型
|
|
733
|
-
*/
|
|
734
|
-
changeControlType(e, t) {
|
|
735
|
-
var a, l, c, s, y;
|
|
736
|
-
const o = t.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
|
|
737
|
-
let p = this.getControlParentContainer(e.id, r);
|
|
738
|
-
if (!p)
|
|
739
|
-
return;
|
|
740
|
-
const m = p.contents.findIndex((g) => g.id === e.id), d = p.contents[m];
|
|
741
|
-
let u;
|
|
742
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
743
|
-
editor: {
|
|
744
|
-
$type: o
|
|
745
|
-
},
|
|
746
|
-
name: this.designViewModelField.name,
|
|
747
|
-
require: this.designViewModelField.require,
|
|
748
|
-
readonly: this.designViewModelField.readonly
|
|
749
|
-
}, !1), u = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(u, {
|
|
750
|
-
id: d.id,
|
|
751
|
-
appearance: d.appearance,
|
|
752
|
-
size: d.size,
|
|
753
|
-
label: d.label
|
|
754
|
-
}), Object.assign(u.editor, {
|
|
755
|
-
isTextArea: u.isTextArea && d.isTextArea,
|
|
756
|
-
type: o || "",
|
|
757
|
-
placeHolder: (a = d.editor) == null ? void 0 : a.placeHolder,
|
|
758
|
-
holdPlace: (l = d.editor) == null ? void 0 : l.holdPlace,
|
|
759
|
-
readonly: (c = d.editor) == null ? void 0 : c.readonly,
|
|
760
|
-
require: (s = d.editor) == null ? void 0 : s.require,
|
|
761
|
-
visible: (y = d.editor) == null ? void 0 : y.visible
|
|
762
|
-
}), p.contents.splice(m, 1, u);
|
|
763
|
-
}
|
|
764
|
-
getAppearanceConfig(e = null) {
|
|
748
|
+
getAppearanceProperties(e) {
|
|
765
749
|
return {
|
|
766
750
|
title: "样式",
|
|
767
751
|
description: "Appearance",
|
|
@@ -791,70 +775,49 @@ class Se {
|
|
|
791
775
|
}
|
|
792
776
|
};
|
|
793
777
|
}
|
|
794
|
-
/**
|
|
795
|
-
* 获取控件:以contents为节点进行定位
|
|
796
|
-
* @param controlId 控件ID
|
|
797
|
-
* @param domJson 容器
|
|
798
|
-
*/
|
|
799
|
-
getControlParentContainer(e, t) {
|
|
800
|
-
let o;
|
|
801
|
-
if (!t || !t.contents || t.contents.length === 0)
|
|
802
|
-
return null;
|
|
803
|
-
for (const r of t.contents) {
|
|
804
|
-
if (r.id === e)
|
|
805
|
-
return o = t, t;
|
|
806
|
-
if (o = this.getControlParentContainer(e, r), o)
|
|
807
|
-
return o;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
class Te extends Se {
|
|
812
|
-
constructor(e, t) {
|
|
813
|
-
super(e, t);
|
|
814
|
-
}
|
|
815
|
-
getBasicProperties(e) {
|
|
816
|
-
let t = this.getBasicPropConfig(e);
|
|
817
|
-
return t.properties.binding = this.getFieldSelectorOptions(e), t;
|
|
818
|
-
}
|
|
819
|
-
getAppearanceProperties(e) {
|
|
820
|
-
return this.getAppearanceConfig(e);
|
|
821
|
-
}
|
|
822
778
|
getEditorProperties(e) {
|
|
823
779
|
return this.getComponentConfig(e);
|
|
824
780
|
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
781
|
+
/**
|
|
782
|
+
* 卡片控件:切换控件类型后事件
|
|
783
|
+
* @param propertyData 控件DOM属性
|
|
784
|
+
* @param newControlType 新控件类型
|
|
785
|
+
*/
|
|
786
|
+
changeControlType(e, t, o) {
|
|
787
|
+
var i, c, s, d;
|
|
788
|
+
const r = t.propertyValue, p = o && o.parent && o.parent.schema;
|
|
789
|
+
if (!p)
|
|
790
|
+
return;
|
|
791
|
+
const m = p.contents.findIndex((f) => f.id === e.id), a = p.contents[m];
|
|
792
|
+
let u;
|
|
793
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
834
794
|
editor: {
|
|
835
|
-
type:
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
795
|
+
$type: r
|
|
796
|
+
},
|
|
797
|
+
name: this.designViewModelField.name,
|
|
798
|
+
require: this.designViewModelField.require,
|
|
799
|
+
readonly: this.designViewModelField.readonly
|
|
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(
|
|
814
|
+
(f) => f.classList.remove("dgComponentSelected")
|
|
815
|
+
), Ve.value++;
|
|
853
816
|
}
|
|
854
817
|
getComponentConfig(e, t = {}, o = {}) {
|
|
855
818
|
const r = Object.assign({
|
|
856
|
-
description: "
|
|
857
|
-
title: "
|
|
819
|
+
description: "编辑器",
|
|
820
|
+
title: "编辑器",
|
|
858
821
|
type: "input-group",
|
|
859
822
|
$converter: "/converter/property-editor.converter"
|
|
860
823
|
}, t), p = Object.assign({
|
|
@@ -882,7 +845,7 @@ class Te extends Se {
|
|
|
882
845
|
return { ...r, properties: { ...p } };
|
|
883
846
|
}
|
|
884
847
|
}
|
|
885
|
-
class
|
|
848
|
+
class De extends Pe {
|
|
886
849
|
constructor(e, t) {
|
|
887
850
|
super(e, t);
|
|
888
851
|
}
|
|
@@ -918,10 +881,10 @@ class Me extends Te {
|
|
|
918
881
|
});
|
|
919
882
|
}
|
|
920
883
|
}
|
|
921
|
-
function
|
|
884
|
+
function Fe(n, e) {
|
|
922
885
|
n.schema;
|
|
923
|
-
const t =
|
|
924
|
-
function r(
|
|
886
|
+
const t = k(!0), o = k(!0);
|
|
887
|
+
function r(s) {
|
|
925
888
|
return !1;
|
|
926
889
|
}
|
|
927
890
|
function p() {
|
|
@@ -930,41 +893,41 @@ function ke(n, e) {
|
|
|
930
893
|
function m() {
|
|
931
894
|
return !1;
|
|
932
895
|
}
|
|
933
|
-
function
|
|
896
|
+
function a() {
|
|
934
897
|
return !0;
|
|
935
898
|
}
|
|
936
|
-
function u(
|
|
899
|
+
function u(s) {
|
|
937
900
|
}
|
|
938
|
-
function
|
|
901
|
+
function i() {
|
|
939
902
|
}
|
|
940
|
-
function
|
|
903
|
+
function c(s) {
|
|
941
904
|
return null;
|
|
942
905
|
}
|
|
943
906
|
return {
|
|
944
907
|
canAccepts: r,
|
|
945
908
|
checkCanDeleteComponent: p,
|
|
946
909
|
checkCanMoveComponent: m,
|
|
947
|
-
hideNestedPaddingInDesginerView:
|
|
910
|
+
hideNestedPaddingInDesginerView: a,
|
|
948
911
|
onAcceptMovedChildElement: u,
|
|
949
|
-
resolveComponentContext:
|
|
912
|
+
resolveComponentContext: i,
|
|
950
913
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
951
914
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
952
|
-
getPropsConfig:
|
|
915
|
+
getPropsConfig: c
|
|
953
916
|
};
|
|
954
917
|
}
|
|
955
|
-
function
|
|
918
|
+
function Se(n, e) {
|
|
956
919
|
const {
|
|
957
920
|
canAccepts: t,
|
|
958
921
|
checkCanDeleteComponent: o,
|
|
959
922
|
checkCanMoveComponent: r,
|
|
960
923
|
hideNestedPaddingInDesginerView: p,
|
|
961
924
|
onAcceptMovedChildElement: m,
|
|
962
|
-
resolveComponentContext:
|
|
925
|
+
resolveComponentContext: a,
|
|
963
926
|
triggerBelongedComponentToMoveWhenMoved: u,
|
|
964
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
965
|
-
} =
|
|
966
|
-
function
|
|
967
|
-
return new
|
|
927
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
928
|
+
} = Fe(n), c = n.schema;
|
|
929
|
+
function s(d, f) {
|
|
930
|
+
return new De(d, e).getPropertyConfig(c, f);
|
|
968
931
|
}
|
|
969
932
|
return {
|
|
970
933
|
canAccepts: t,
|
|
@@ -972,31 +935,31 @@ function Fe(n, e) {
|
|
|
972
935
|
checkCanMoveComponent: r,
|
|
973
936
|
hideNestedPaddingInDesginerView: p,
|
|
974
937
|
onAcceptMovedChildElement: m,
|
|
975
|
-
resolveComponentContext:
|
|
938
|
+
resolveComponentContext: a,
|
|
976
939
|
triggerBelongedComponentToMoveWhenMoved: u,
|
|
977
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
978
|
-
getPropsConfig:
|
|
940
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
941
|
+
getPropsConfig: s
|
|
979
942
|
};
|
|
980
943
|
}
|
|
981
|
-
const
|
|
944
|
+
const Be = /* @__PURE__ */ $({
|
|
982
945
|
name: "FRadioGroupDesign",
|
|
983
|
-
props:
|
|
946
|
+
props: j,
|
|
984
947
|
emits: ["changeValue", "update:modelValue"],
|
|
985
948
|
setup(n, e) {
|
|
986
|
-
const t =
|
|
949
|
+
const t = k(n.modelValue), {
|
|
987
950
|
enumData: o,
|
|
988
951
|
onClickRadio: r,
|
|
989
952
|
getValue: p,
|
|
990
953
|
getText: m
|
|
991
|
-
} =
|
|
954
|
+
} = Q(n, e, t), a = B(() => ({
|
|
992
955
|
"farris-checkradio-hor": n.horizontal
|
|
993
|
-
})), u =
|
|
994
|
-
return
|
|
995
|
-
u.value.componentInstance =
|
|
996
|
-
}), e.expose(
|
|
997
|
-
class: ["farris-input-wrap",
|
|
956
|
+
})), u = k(), i = N("designer-host-service"), c = N("design-item-context"), s = Se(c, i), d = Te(u, c, s);
|
|
957
|
+
return W(() => {
|
|
958
|
+
u.value.componentInstance = d;
|
|
959
|
+
}), e.expose(d.value), () => h("div", {
|
|
960
|
+
class: ["farris-input-wrap", a.value],
|
|
998
961
|
ref: u
|
|
999
|
-
}, [o.value.map((
|
|
962
|
+
}, [o.value.map((f, g) => {
|
|
1000
963
|
const T = "radio_" + n.name + g;
|
|
1001
964
|
return h("div", {
|
|
1002
965
|
class: "custom-control custom-radio"
|
|
@@ -1005,31 +968,31 @@ const we = /* @__PURE__ */ E({
|
|
|
1005
968
|
class: "custom-control-input",
|
|
1006
969
|
name: n.name,
|
|
1007
970
|
id: T,
|
|
1008
|
-
value: p(
|
|
1009
|
-
checked: p(
|
|
971
|
+
value: p(f),
|
|
972
|
+
checked: p(f) === t.value,
|
|
1010
973
|
disabled: n.disabled,
|
|
1011
974
|
tabindex: n.tabIndex,
|
|
1012
|
-
onClick: (
|
|
975
|
+
onClick: (w) => r(f, w)
|
|
1013
976
|
}, null), h("label", {
|
|
1014
977
|
class: "custom-control-label",
|
|
1015
978
|
for: T
|
|
1016
|
-
}, [m(
|
|
979
|
+
}, [m(f)])]);
|
|
1017
980
|
})]);
|
|
1018
981
|
}
|
|
1019
982
|
});
|
|
1020
|
-
|
|
1021
|
-
n.component(
|
|
983
|
+
F.install = (n) => {
|
|
984
|
+
n.component(F.name, F), n.component(q.name, q);
|
|
1022
985
|
};
|
|
1023
|
-
|
|
1024
|
-
n["radio-group"] =
|
|
986
|
+
F.register = (n, e, t, o) => {
|
|
987
|
+
n["radio-group"] = F, e["radio-group"] = X;
|
|
1025
988
|
};
|
|
1026
|
-
|
|
1027
|
-
n["radio-group"] =
|
|
989
|
+
F.registerDesigner = (n, e, t) => {
|
|
990
|
+
n["radio-group"] = Be, e["radio-group"] = X;
|
|
1028
991
|
};
|
|
1029
992
|
export {
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
993
|
+
F as RadioGroup,
|
|
994
|
+
F as default,
|
|
995
|
+
X as propsResolver,
|
|
996
|
+
j as radioGroupProps,
|
|
997
|
+
ne as radioProps
|
|
1035
998
|
};
|