@farris/ui-vue 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +150 -142
- package/components/avatar/index.esm.js +393 -457
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +491 -554
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +479 -513
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +857 -743
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4883 -5182
- package/components/data-view/index.esm.js +3072 -2949
- package/components/date-picker/index.esm.js +2626 -2689
- 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.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +940 -998
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +307 -293
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1747 -1627
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5877 -6176
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1454 -1524
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +659 -722
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1643 -1524
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6502 -6770
- package/components/mapping-editor/index.esm.js +5639 -5939
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +1098 -1130
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1317
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1479 -1513
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +706 -778
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +453 -516
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +555 -526
- package/components/response-toolbar/index.esm.js +1009 -1247
- package/components/schema-selector/index.esm.js +3261 -3373
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +441 -504
- package/components/tabs/index.esm.js +1849 -2039
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +445 -493
- package/components/time-picker/index.esm.js +1350 -1414
- package/components/transfer/index.esm.js +146 -144
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5948 -6237
- package/components/tree-view/index.esm.js +2381 -2255
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +27221 -26804
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/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-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- 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-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- 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
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,100 +1,98 @@
|
|
|
1
|
-
var
|
|
2
|
-
var D = (
|
|
3
|
-
var
|
|
4
|
-
import { ref as v, computed as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { resolveAppearance as
|
|
7
|
-
import { useDesignerComponent as Q } from "
|
|
8
|
-
import { withInstall as
|
|
9
|
-
const O = {},
|
|
10
|
-
function
|
|
11
|
-
const { properties: e, title:
|
|
12
|
-
return
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
|
+
var D = (t, e, n) => e in t ? S(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var m = (t, e, n) => D(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { ref as v, computed as b, defineComponent as F, createVNode as f, inject as P, onMounted as H } from "vue";
|
|
5
|
+
import { cloneDeep as N } from "lodash-es";
|
|
6
|
+
import { resolveAppearance as j, getSchemaByType as M } from "../dynamic-resolver/index.esm.js";
|
|
7
|
+
import { useDesignerComponent as Q } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { withInstall as q } from "../common/index.esm.js";
|
|
9
|
+
const O = {}, U = {};
|
|
10
|
+
function V(t) {
|
|
11
|
+
const { properties: e, title: n } = t, r = Object.keys(e).reduce((o, p) => (o[p] = e[p].type === "object" && e[p].properties ? V(e[p]) : N(e[p].default), o), {});
|
|
12
|
+
return r.id = `${n}-${Date.now()}`, r;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
return Object.keys(
|
|
14
|
+
function W(t, e) {
|
|
15
|
+
const n = V(e);
|
|
16
|
+
return Object.keys(t).reduce((r, o) => (r[o] && typeof r[o] == "object" ? Object.assign(r[o], t[o]) : r[o] = t[o], r), n), n;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Object.keys(
|
|
20
|
-
if (e.has(
|
|
21
|
-
const
|
|
22
|
-
if (typeof
|
|
23
|
-
|
|
18
|
+
function G(t, e) {
|
|
19
|
+
return Object.keys(t).filter((r) => t[r] != null).reduce((r, o) => {
|
|
20
|
+
if (e.has(o)) {
|
|
21
|
+
const p = e.get(o);
|
|
22
|
+
if (typeof p == "string")
|
|
23
|
+
r[p] = t[o];
|
|
24
24
|
else {
|
|
25
|
-
const
|
|
26
|
-
Object.assign(
|
|
25
|
+
const g = p(o, t[o], t);
|
|
26
|
+
Object.assign(r, g);
|
|
27
27
|
}
|
|
28
28
|
} else
|
|
29
|
-
o
|
|
30
|
-
return
|
|
29
|
+
r[o] = t[o];
|
|
30
|
+
return r;
|
|
31
31
|
}, {});
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
return
|
|
33
|
+
function L(t, e, n = /* @__PURE__ */ new Map()) {
|
|
34
|
+
const r = W(t, e);
|
|
35
|
+
return G(r, n);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
function e(i,
|
|
37
|
+
function Z(t = {}) {
|
|
38
|
+
function e(i, l, c, u) {
|
|
39
39
|
if (typeof c == "number")
|
|
40
|
-
return
|
|
40
|
+
return u[i].length === c;
|
|
41
41
|
if (typeof c == "object") {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
return Number(
|
|
45
|
-
if (
|
|
46
|
-
return Number(
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
42
|
+
const s = Object.keys(c)[0], y = c[s];
|
|
43
|
+
if (s === "not")
|
|
44
|
+
return Number(u[i].length) !== Number(y);
|
|
45
|
+
if (s === "moreThan")
|
|
46
|
+
return Number(u[i].length) >= Number(y);
|
|
47
|
+
if (s === "lessThan")
|
|
48
|
+
return Number(u[i].length) <= Number(y);
|
|
49
49
|
}
|
|
50
50
|
return !1;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function n(i, l, c, u) {
|
|
53
|
+
return u[i] && u[i].propertyValue && String(u[i].propertyValue.value) === String(c);
|
|
54
54
|
}
|
|
55
|
-
const
|
|
55
|
+
const r = /* @__PURE__ */ new Map([
|
|
56
56
|
["length", e],
|
|
57
|
-
["getProperty",
|
|
57
|
+
["getProperty", n]
|
|
58
58
|
]);
|
|
59
|
-
Object.keys(
|
|
60
|
-
function
|
|
59
|
+
Object.keys(t).reduce((i, l) => (i.set(l, t[l]), i), r);
|
|
60
|
+
function o(i, l) {
|
|
61
61
|
const c = i;
|
|
62
|
-
return typeof
|
|
63
|
-
if (
|
|
64
|
-
return { target: c, operator: "length", param: null, value:
|
|
65
|
-
const
|
|
66
|
-
return { target: c, operator: "getProperty", param:
|
|
62
|
+
return typeof l == "number" ? [{ target: c, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: c, operator: "getProperty", param: i, value: !!l }] : typeof l == "object" ? Object.keys(l).map((u) => {
|
|
63
|
+
if (u === "length")
|
|
64
|
+
return { target: c, operator: "length", param: null, value: l[u] };
|
|
65
|
+
const s = u, y = l[u];
|
|
66
|
+
return { target: c, operator: "getProperty", param: s, value: y };
|
|
67
67
|
}) : [];
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return Object.keys(i).reduce((c,
|
|
71
|
-
const
|
|
72
|
-
return c.push(...
|
|
69
|
+
function p(i) {
|
|
70
|
+
return Object.keys(i).reduce((c, u) => {
|
|
71
|
+
const s = o(u, i[u]);
|
|
72
|
+
return c.push(...s), c;
|
|
73
73
|
}, []);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
if (
|
|
77
|
-
const c =
|
|
78
|
-
return c && c(i.target, i.param, i.value,
|
|
75
|
+
function g(i, l) {
|
|
76
|
+
if (r.has(i.operator)) {
|
|
77
|
+
const c = r.get(i.operator);
|
|
78
|
+
return c && c(i.target, i.param, i.value, l) || !1;
|
|
79
79
|
}
|
|
80
80
|
return !1;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
82
|
+
function d(i, l) {
|
|
83
|
+
return p(i).reduce((s, y) => s && g(y, l), !0);
|
|
84
84
|
}
|
|
85
|
-
function A(i,
|
|
86
|
-
const c = Object.keys(i),
|
|
87
|
-
return
|
|
85
|
+
function A(i, l) {
|
|
86
|
+
const c = Object.keys(i), u = c.includes("allOf"), s = c.includes("anyOf"), y = u || s, x = (y ? i[y ? u ? "allOf" : "anyOf" : "allOf"] : [i]).map((R) => d(R, l));
|
|
87
|
+
return u ? !x.includes(!1) : x.includes(!0);
|
|
88
88
|
}
|
|
89
89
|
return { parseValueSchema: A };
|
|
90
90
|
}
|
|
91
91
|
const a = {
|
|
92
|
-
|
|
93
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
92
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
94
93
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
95
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
94
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
96
95
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
97
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
98
96
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
99
97
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
100
98
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -105,114 +103,43 @@ const a = {
|
|
|
105
103
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
106
104
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
107
105
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
112
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
113
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
106
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
107
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
108
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
114
109
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
115
|
-
|
|
116
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
117
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
118
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
110
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
119
111
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
120
112
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
121
|
-
|
|
122
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
113
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
123
114
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
124
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
125
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
126
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
127
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
128
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
129
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
130
115
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
131
116
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
132
117
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
133
|
-
|
|
134
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
135
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
136
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
137
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
138
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
139
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
118
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
140
119
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
148
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
149
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
150
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
151
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
152
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
153
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
154
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
155
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
156
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
157
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
158
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
159
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
160
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
161
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
162
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
163
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
164
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
165
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
166
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
167
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
168
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
169
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
120
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
121
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
122
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
123
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
124
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
125
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
170
126
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
180
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
181
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
182
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
183
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
184
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
185
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
186
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
187
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
188
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
189
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
190
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
191
|
-
/** 查询类 start */
|
|
192
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
193
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
194
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
195
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
196
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
197
|
-
/** 查询类 end */
|
|
198
|
-
/** 审批类 start */
|
|
199
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
200
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
201
|
-
/** 审批类 end */
|
|
202
|
-
}, G = {}, z = {};
|
|
203
|
-
W();
|
|
204
|
-
function Z(n, e, t = /* @__PURE__ */ new Map(), o = (m, u, A) => u, r = {}, l = (m) => m) {
|
|
205
|
-
return O[e.title] = e, L[e.title] = o, G[e.title] = r, z[e.title] = l, (m = {}) => {
|
|
206
|
-
const u = q(m, e, t), A = Object.keys(n).reduce((i, s) => (i[s] = n[s].default, i), {});
|
|
207
|
-
return Object.assign(A, u);
|
|
127
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
128
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
129
|
+
}, z = {}, K = {};
|
|
130
|
+
Z();
|
|
131
|
+
function J(t, e, n = /* @__PURE__ */ new Map(), r = (g, d, A) => d, o = {}, p = (g) => g) {
|
|
132
|
+
return O[e.title] = e, U[e.title] = r, z[e.title] = o, K[e.title] = p, (g = {}) => {
|
|
133
|
+
const d = L(g, e, n), A = Object.keys(t).reduce((i, l) => (i[l] = t[l].default, i), {});
|
|
134
|
+
return Object.assign(A, d);
|
|
208
135
|
};
|
|
209
136
|
}
|
|
210
|
-
function
|
|
137
|
+
function Y(t, e, n) {
|
|
211
138
|
return e;
|
|
212
139
|
}
|
|
213
|
-
const
|
|
214
|
-
["appearance",
|
|
215
|
-
]),
|
|
140
|
+
const X = /* @__PURE__ */ new Map([
|
|
141
|
+
["appearance", j]
|
|
142
|
+
]), $ = "https://json-schema.org/draft/2020-12/schema", _ = "https://farris-design.gitee.io/avatar.schema.json", ee = "avatar", te = "A Farris Component", ne = "object", re = {
|
|
216
143
|
id: {
|
|
217
144
|
description: "The unique identifier for avatar",
|
|
218
145
|
type: "string"
|
|
@@ -274,18 +201,18 @@ const Y = /* @__PURE__ */ new Map([
|
|
|
274
201
|
type: "boolean",
|
|
275
202
|
default: !0
|
|
276
203
|
}
|
|
277
|
-
},
|
|
204
|
+
}, oe = [
|
|
278
205
|
"id",
|
|
279
206
|
"type"
|
|
280
|
-
],
|
|
281
|
-
$schema:
|
|
282
|
-
$id:
|
|
283
|
-
title:
|
|
284
|
-
description:
|
|
285
|
-
type:
|
|
286
|
-
properties:
|
|
287
|
-
required:
|
|
288
|
-
},
|
|
207
|
+
], ie = {
|
|
208
|
+
$schema: $,
|
|
209
|
+
$id: _,
|
|
210
|
+
title: ee,
|
|
211
|
+
description: te,
|
|
212
|
+
type: ne,
|
|
213
|
+
properties: re,
|
|
214
|
+
required: oe
|
|
215
|
+
}, w = {
|
|
289
216
|
/**
|
|
290
217
|
* 头像宽度
|
|
291
218
|
*/
|
|
@@ -322,67 +249,67 @@ const Y = /* @__PURE__ */ new Map([
|
|
|
322
249
|
* 支持的头像类型
|
|
323
250
|
*/
|
|
324
251
|
imageType: { type: Array, default: ["jpeg"] }
|
|
325
|
-
},
|
|
326
|
-
function
|
|
327
|
-
const
|
|
328
|
-
function
|
|
329
|
-
return
|
|
252
|
+
}, E = J(w, ie, X, Y);
|
|
253
|
+
function I(t, e, n, r) {
|
|
254
|
+
const o = "data:image/jpeg;base64,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", p = v(t.readonly);
|
|
255
|
+
function g(s) {
|
|
256
|
+
return s.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
330
257
|
}
|
|
331
|
-
function
|
|
332
|
-
return
|
|
258
|
+
function d(s) {
|
|
259
|
+
return s.indexOf("data:image/") > -1;
|
|
333
260
|
}
|
|
334
|
-
function A(
|
|
335
|
-
return
|
|
261
|
+
function A(s) {
|
|
262
|
+
return s ? "data:image/jpeg;base64," + s : "";
|
|
336
263
|
}
|
|
337
|
-
const i =
|
|
264
|
+
const i = b(() => {
|
|
338
265
|
var y;
|
|
339
|
-
if (!
|
|
266
|
+
if (!t.imageType || !t.imageType.length)
|
|
340
267
|
return "";
|
|
341
|
-
const
|
|
342
|
-
return !
|
|
343
|
-
}),
|
|
344
|
-
const
|
|
345
|
-
return
|
|
346
|
-
}), c =
|
|
347
|
-
function
|
|
348
|
-
|
|
268
|
+
const s = (y = t.imageType) == null ? void 0 : y.map((h) => (h === "jpg" && (h = "jpeg"), `image/${h}`));
|
|
269
|
+
return !s || !s.length ? "image/*" : s.join(",");
|
|
270
|
+
}), l = b(() => {
|
|
271
|
+
const s = r.value || t.cover || o;
|
|
272
|
+
return g(s) || d(s) ? s : A(s);
|
|
273
|
+
}), c = b(() => p.value ? "" : t.title);
|
|
274
|
+
function u() {
|
|
275
|
+
p.value || n && n.value && n.value.click();
|
|
349
276
|
}
|
|
350
|
-
return { acceptTypes: i, imageSource:
|
|
277
|
+
return { acceptTypes: i, imageSource: l, imageTitle: c, onClickImage: u };
|
|
351
278
|
}
|
|
352
|
-
const
|
|
279
|
+
const B = /* @__PURE__ */ F({
|
|
353
280
|
name: "FAvatar",
|
|
354
|
-
props:
|
|
281
|
+
props: w,
|
|
355
282
|
emits: ["change", "update:modelValue"],
|
|
356
|
-
setup(
|
|
357
|
-
const
|
|
283
|
+
setup(t, e) {
|
|
284
|
+
const n = b(() => ({
|
|
358
285
|
"f-avatar": !0,
|
|
359
|
-
"f-avatar-readonly":
|
|
360
|
-
"f-avatar-circle":
|
|
361
|
-
"f-avatar-square":
|
|
362
|
-
})),
|
|
363
|
-
width:
|
|
364
|
-
height:
|
|
365
|
-
})),
|
|
366
|
-
function
|
|
286
|
+
"f-avatar-readonly": t.readonly,
|
|
287
|
+
"f-avatar-circle": t.shape === "circle",
|
|
288
|
+
"f-avatar-square": t.shape === "square"
|
|
289
|
+
})), r = v(t.modelValue), o = b(() => ({
|
|
290
|
+
width: t.avatarWidth + "px",
|
|
291
|
+
height: t.avatarHeight + "px"
|
|
292
|
+
})), p = !1;
|
|
293
|
+
function g() {
|
|
367
294
|
return "";
|
|
368
295
|
}
|
|
369
|
-
function
|
|
296
|
+
function d() {
|
|
370
297
|
}
|
|
371
298
|
const A = v(null), {
|
|
372
299
|
acceptTypes: i,
|
|
373
|
-
imageSource:
|
|
300
|
+
imageSource: l,
|
|
374
301
|
onClickImage: c
|
|
375
|
-
} =
|
|
302
|
+
} = I(t, e, A, r);
|
|
376
303
|
return () => f("div", {
|
|
377
|
-
class:
|
|
378
|
-
style:
|
|
304
|
+
class: n.value,
|
|
305
|
+
style: o.value,
|
|
379
306
|
onClick: c
|
|
380
|
-
}, [
|
|
381
|
-
title:
|
|
307
|
+
}, [p, f("img", {
|
|
308
|
+
title: t.title,
|
|
382
309
|
class: "f-avatar-image",
|
|
383
|
-
src:
|
|
384
|
-
onError:
|
|
385
|
-
}, null), !
|
|
310
|
+
src: l.value,
|
|
311
|
+
onError: g
|
|
312
|
+
}, null), !t.readonly && f("div", {
|
|
386
313
|
class: "f-avatar-icon"
|
|
387
314
|
}, [f("span", {
|
|
388
315
|
class: "f-icon f-icon-camera"
|
|
@@ -392,69 +319,162 @@ const b = /* @__PURE__ */ w({
|
|
|
392
319
|
type: "file",
|
|
393
320
|
class: "f-avatar-upload",
|
|
394
321
|
accept: i.value,
|
|
395
|
-
onChange:
|
|
322
|
+
onChange: d,
|
|
396
323
|
style: "display: none;"
|
|
397
324
|
}, null)]);
|
|
398
325
|
}
|
|
399
326
|
});
|
|
400
|
-
function ae(
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
function
|
|
327
|
+
function ae(t, e) {
|
|
328
|
+
t.schema;
|
|
329
|
+
const n = v(!0), r = v(!0);
|
|
330
|
+
function o(c) {
|
|
404
331
|
return !1;
|
|
405
332
|
}
|
|
406
|
-
function
|
|
333
|
+
function p() {
|
|
407
334
|
return !1;
|
|
408
335
|
}
|
|
409
|
-
function
|
|
336
|
+
function g() {
|
|
410
337
|
return !1;
|
|
411
338
|
}
|
|
412
|
-
function
|
|
339
|
+
function d() {
|
|
413
340
|
return !0;
|
|
414
341
|
}
|
|
415
342
|
function A(c) {
|
|
416
343
|
}
|
|
417
344
|
function i() {
|
|
418
345
|
}
|
|
419
|
-
function
|
|
346
|
+
function l(c) {
|
|
420
347
|
return null;
|
|
421
348
|
}
|
|
422
349
|
return {
|
|
423
|
-
canAccepts:
|
|
424
|
-
checkCanDeleteComponent:
|
|
425
|
-
checkCanMoveComponent:
|
|
426
|
-
hideNestedPaddingInDesginerView:
|
|
350
|
+
canAccepts: o,
|
|
351
|
+
checkCanDeleteComponent: p,
|
|
352
|
+
checkCanMoveComponent: g,
|
|
353
|
+
hideNestedPaddingInDesginerView: d,
|
|
427
354
|
onAcceptMovedChildElement: A,
|
|
428
355
|
resolveComponentContext: i,
|
|
429
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
430
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
431
|
-
getPropsConfig:
|
|
356
|
+
triggerBelongedComponentToMoveWhenMoved: n,
|
|
357
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
358
|
+
getPropsConfig: l
|
|
432
359
|
};
|
|
433
360
|
}
|
|
434
|
-
class
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
361
|
+
class se {
|
|
362
|
+
constructor(e, n) {
|
|
363
|
+
m(this, "componentId");
|
|
364
|
+
m(this, "viewModelId");
|
|
365
|
+
m(this, "eventsEditorUtils");
|
|
366
|
+
m(this, "formSchemaUtils");
|
|
367
|
+
m(this, "formMetadataConverter");
|
|
368
|
+
m(this, "designViewModelUtils");
|
|
369
|
+
m(this, "designViewModelField");
|
|
370
|
+
m(this, "controlCreatorUtils");
|
|
371
|
+
m(this, "designerHostService");
|
|
372
|
+
m(this, "schemaService", null);
|
|
373
|
+
m(this, "metadataService", null);
|
|
374
|
+
m(this, "propertyConfig", {
|
|
375
|
+
type: "object",
|
|
376
|
+
categories: {}
|
|
377
|
+
});
|
|
378
|
+
var r;
|
|
379
|
+
this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
380
|
+
}
|
|
381
|
+
getTableInfo() {
|
|
382
|
+
var e;
|
|
383
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
384
|
+
}
|
|
385
|
+
setDesignViewModelField(e) {
|
|
386
|
+
const n = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
387
|
+
if (n) {
|
|
388
|
+
if (!this.designViewModelField) {
|
|
389
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
390
|
+
this.designViewModelField = r.fields.find((o) => o.id === n);
|
|
391
|
+
}
|
|
392
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
changeFieldEditorType(e, n) {
|
|
396
|
+
}
|
|
397
|
+
getBasicPropConfig(e) {
|
|
398
|
+
return {
|
|
399
|
+
description: "Basic Information",
|
|
400
|
+
title: "基本信息",
|
|
401
|
+
properties: {
|
|
402
|
+
id: {
|
|
403
|
+
description: "组件标识",
|
|
404
|
+
title: "标识",
|
|
405
|
+
type: "string",
|
|
406
|
+
readonly: !0
|
|
407
|
+
},
|
|
408
|
+
type: {
|
|
409
|
+
description: "组件类型",
|
|
410
|
+
title: "控件类型",
|
|
411
|
+
type: "select",
|
|
412
|
+
editor: {
|
|
413
|
+
type: "combo-list",
|
|
414
|
+
textField: "name",
|
|
415
|
+
valueField: "value",
|
|
416
|
+
data: [{ value: e.type, name: a[e.type].name }]
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
getAppearanceConfig(e = null) {
|
|
423
|
+
return {
|
|
424
|
+
title: "样式",
|
|
425
|
+
description: "Appearance",
|
|
426
|
+
properties: {
|
|
427
|
+
class: {
|
|
428
|
+
title: "class样式",
|
|
429
|
+
type: "string",
|
|
430
|
+
description: "组件的CSS样式",
|
|
431
|
+
$converter: "/converter/appearance.converter"
|
|
432
|
+
},
|
|
433
|
+
style: {
|
|
434
|
+
title: "style样式",
|
|
435
|
+
type: "string",
|
|
436
|
+
description: "组件的样式",
|
|
437
|
+
$converter: "/converter/appearance.converter"
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
};
|
|
438
441
|
}
|
|
439
442
|
}
|
|
443
|
+
const C = class C {
|
|
444
|
+
/**
|
|
445
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
446
|
+
*/
|
|
447
|
+
static getEditorTypesByMDataType(e) {
|
|
448
|
+
const n = C.fieldControlTypeMapping[e];
|
|
449
|
+
return n || [{ key: "", value: "" }];
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* 获取所有输入类控件
|
|
453
|
+
*/
|
|
454
|
+
static getAllInputTypes() {
|
|
455
|
+
const e = [];
|
|
456
|
+
for (let n in C.fieldControlTypeMapping)
|
|
457
|
+
C.fieldControlTypeMapping[n].forEach((r) => {
|
|
458
|
+
e.find((o) => o.key === r.key && o.value === r.value) || e.push({ key: r.key, value: r.value });
|
|
459
|
+
});
|
|
460
|
+
return e;
|
|
461
|
+
}
|
|
462
|
+
};
|
|
440
463
|
/**
|
|
441
464
|
* <字段类型,可配置的控件类型列表>的映射
|
|
442
465
|
*/
|
|
443
|
-
|
|
466
|
+
m(C, "fieldControlTypeMapping", {
|
|
444
467
|
String: [
|
|
445
468
|
{ key: a["input-group"].type, value: a["input-group"].name },
|
|
446
469
|
{ key: a.lookup.type, value: a.lookup.name },
|
|
447
|
-
{ key: a.Image.type, value: a.Image.name },
|
|
448
470
|
{ key: a["date-picker"].type, value: a["date-picker"].name },
|
|
449
471
|
{ key: a["check-box"].type, value: a["check-box"].name },
|
|
450
472
|
{ key: a["radio-group"].type, value: a["radio-group"].name },
|
|
451
473
|
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
452
474
|
{ key: a.textarea.type, value: a.textarea.name }
|
|
453
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
454
475
|
],
|
|
455
476
|
Text: [
|
|
456
477
|
{ key: a.textarea.type, value: a.textarea.name },
|
|
457
|
-
{ key: a.avatar.type, value: a.avatar.name },
|
|
458
478
|
{ key: a.lookup.type, value: a.lookup.name }
|
|
459
479
|
],
|
|
460
480
|
Decimal: [
|
|
@@ -487,54 +507,23 @@ g(I, "fieldControlTypeMapping", {
|
|
|
487
507
|
{ key: a.lookup.type, value: a.lookup.name },
|
|
488
508
|
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
489
509
|
{ key: a["radio-group"].type, value: a["radio-group"].name }
|
|
490
|
-
],
|
|
491
|
-
EmployeeSelector: [
|
|
492
|
-
{ key: a.EmployeeSelector.type, value: a.EmployeeSelector.name }
|
|
493
|
-
],
|
|
494
|
-
AdminOrganizationSelector: [
|
|
495
|
-
{ key: a.AdminOrganizationSelector.type, value: a.AdminOrganizationSelector.name }
|
|
496
510
|
]
|
|
497
511
|
});
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
g
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
categories: {}
|
|
514
|
-
});
|
|
515
|
-
var o;
|
|
516
|
-
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;
|
|
517
|
-
}
|
|
518
|
-
getTableInfo() {
|
|
519
|
-
var e;
|
|
520
|
-
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
521
|
-
}
|
|
522
|
-
setDesignViewModelField(e) {
|
|
523
|
-
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
524
|
-
if (t) {
|
|
525
|
-
if (!this.designViewModelField) {
|
|
526
|
-
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
527
|
-
this.designViewModelField = o.fields.find((r) => r.id === t);
|
|
528
|
-
}
|
|
529
|
-
e.updateOn = this.designViewModelField.updateOn;
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
changeFieldEditorType(e, t) {
|
|
533
|
-
}
|
|
534
|
-
getBasicPropConfig(e) {
|
|
535
|
-
var o, r;
|
|
536
|
-
var t = this;
|
|
537
|
-
return this.setDesignViewModelField(e), {
|
|
512
|
+
let T = C;
|
|
513
|
+
const le = v(0);
|
|
514
|
+
class ce extends se {
|
|
515
|
+
constructor(e, n) {
|
|
516
|
+
super(e, n);
|
|
517
|
+
}
|
|
518
|
+
getPropertyConfig(e, n) {
|
|
519
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
520
|
+
}
|
|
521
|
+
getBasicProperties(e, n) {
|
|
522
|
+
var g;
|
|
523
|
+
var r = this;
|
|
524
|
+
this.setDesignViewModelField(e);
|
|
525
|
+
const o = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
526
|
+
return {
|
|
538
527
|
description: "Basic Information",
|
|
539
528
|
title: "基本信息",
|
|
540
529
|
properties: {
|
|
@@ -554,63 +543,48 @@ class ie {
|
|
|
554
543
|
type: "combo-list",
|
|
555
544
|
textField: "value",
|
|
556
545
|
valueField: "key",
|
|
557
|
-
|
|
558
|
-
|
|
546
|
+
editable: !1,
|
|
547
|
+
data: r.designViewModelField ? T.getEditorTypesByMDataType((g = r.designViewModelField.type) == null ? void 0 : g.name) : T.getAllInputTypes()
|
|
559
548
|
}
|
|
560
549
|
},
|
|
561
550
|
label: {
|
|
562
551
|
title: "标签",
|
|
563
552
|
type: "string",
|
|
564
553
|
$converter: "/converter/form-group-label.converter"
|
|
554
|
+
},
|
|
555
|
+
binding: {
|
|
556
|
+
description: "绑定的表单字段",
|
|
557
|
+
title: "绑定",
|
|
558
|
+
$converter: "/converter/field-selector.converter",
|
|
559
|
+
editor: {
|
|
560
|
+
type: "field-selector",
|
|
561
|
+
bindingType: { enable: !1 },
|
|
562
|
+
editorParams: {
|
|
563
|
+
propertyData: e,
|
|
564
|
+
formBasicInfo: o
|
|
565
|
+
},
|
|
566
|
+
columns: [
|
|
567
|
+
{ field: "name", title: "字段名称" },
|
|
568
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
569
|
+
{ field: "fieldType", title: "字段类型" }
|
|
570
|
+
],
|
|
571
|
+
textField: "bindingField",
|
|
572
|
+
data: p
|
|
573
|
+
}
|
|
565
574
|
}
|
|
566
575
|
},
|
|
567
|
-
setPropertyRelates(
|
|
568
|
-
if (
|
|
569
|
-
switch (
|
|
576
|
+
setPropertyRelates(d, A) {
|
|
577
|
+
if (d)
|
|
578
|
+
switch (d && d.propertyID) {
|
|
570
579
|
case "type": {
|
|
571
|
-
|
|
580
|
+
r.changeControlType(e, d, n);
|
|
572
581
|
break;
|
|
573
582
|
}
|
|
574
583
|
}
|
|
575
584
|
}
|
|
576
585
|
};
|
|
577
586
|
}
|
|
578
|
-
|
|
579
|
-
* 卡片控件:切换控件类型后事件
|
|
580
|
-
* @param propertyData 控件DOM属性
|
|
581
|
-
* @param newControlType 新控件类型
|
|
582
|
-
*/
|
|
583
|
-
changeControlType(e, t) {
|
|
584
|
-
var i, s, c, d, p;
|
|
585
|
-
const o = t.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
|
|
586
|
-
let l = this.getControlParentContainer(e.id, r);
|
|
587
|
-
if (!l)
|
|
588
|
-
return;
|
|
589
|
-
const m = l.contents.findIndex((y) => y.id === e.id), u = l.contents[m];
|
|
590
|
-
let A;
|
|
591
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
592
|
-
editor: {
|
|
593
|
-
$type: o
|
|
594
|
-
},
|
|
595
|
-
name: this.designViewModelField.name,
|
|
596
|
-
require: this.designViewModelField.require,
|
|
597
|
-
readonly: this.designViewModelField.readonly
|
|
598
|
-
}, !1), A = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(A, {
|
|
599
|
-
id: u.id,
|
|
600
|
-
appearance: u.appearance,
|
|
601
|
-
size: u.size,
|
|
602
|
-
label: u.label
|
|
603
|
-
}), Object.assign(A.editor, {
|
|
604
|
-
isTextArea: A.isTextArea && u.isTextArea,
|
|
605
|
-
type: o || "",
|
|
606
|
-
placeHolder: (i = u.editor) == null ? void 0 : i.placeHolder,
|
|
607
|
-
holdPlace: (s = u.editor) == null ? void 0 : s.holdPlace,
|
|
608
|
-
readonly: (c = u.editor) == null ? void 0 : c.readonly,
|
|
609
|
-
require: (d = u.editor) == null ? void 0 : d.require,
|
|
610
|
-
visible: (p = u.editor) == null ? void 0 : p.visible
|
|
611
|
-
}), l.contents.splice(m, 1, A);
|
|
612
|
-
}
|
|
613
|
-
getAppearanceConfig(e = null) {
|
|
587
|
+
getAppearanceProperties(e) {
|
|
614
588
|
return {
|
|
615
589
|
title: "样式",
|
|
616
590
|
description: "Appearance",
|
|
@@ -640,90 +614,52 @@ class ie {
|
|
|
640
614
|
}
|
|
641
615
|
};
|
|
642
616
|
}
|
|
643
|
-
/**
|
|
644
|
-
* 获取控件:以contents为节点进行定位
|
|
645
|
-
* @param controlId 控件ID
|
|
646
|
-
* @param domJson 容器
|
|
647
|
-
*/
|
|
648
|
-
getControlParentContainer(e, t) {
|
|
649
|
-
let o;
|
|
650
|
-
if (!t || !t.contents || t.contents.length === 0)
|
|
651
|
-
return null;
|
|
652
|
-
for (const r of t.contents) {
|
|
653
|
-
if (r.id === e)
|
|
654
|
-
return o = t, t;
|
|
655
|
-
if (o = this.getControlParentContainer(e, r), o)
|
|
656
|
-
return o;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
getBindingFieldEditorOptions(e) {
|
|
660
|
-
const t = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
661
|
-
return {
|
|
662
|
-
type: "field-selector",
|
|
663
|
-
bindingType: { enable: !1 },
|
|
664
|
-
editorParams: {
|
|
665
|
-
propertyData: e,
|
|
666
|
-
formBasicInfo: t
|
|
667
|
-
},
|
|
668
|
-
columns: [
|
|
669
|
-
{ field: "name", title: "字段名称" },
|
|
670
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
671
|
-
{ field: "fieldType", title: "字段类型" }
|
|
672
|
-
],
|
|
673
|
-
beforeOpenDialog: (o) => {
|
|
674
|
-
const r = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
675
|
-
o.instance.loadData(r);
|
|
676
|
-
},
|
|
677
|
-
textField: "bindingField"
|
|
678
|
-
};
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
class re extends ie {
|
|
682
|
-
constructor(e, t) {
|
|
683
|
-
super(e, t);
|
|
684
|
-
}
|
|
685
|
-
getBasicProperties(e) {
|
|
686
|
-
let t = this.getBasicPropConfig(e);
|
|
687
|
-
return t.properties.binding = this.getFieldSelectorOptions(e), t;
|
|
688
|
-
}
|
|
689
|
-
getAppearanceProperties(e) {
|
|
690
|
-
return this.getAppearanceConfig(e);
|
|
691
|
-
}
|
|
692
617
|
getEditorProperties(e) {
|
|
693
618
|
return this.getComponentConfig(e);
|
|
694
619
|
}
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
620
|
+
/**
|
|
621
|
+
* 卡片控件:切换控件类型后事件
|
|
622
|
+
* @param propertyData 控件DOM属性
|
|
623
|
+
* @param newControlType 新控件类型
|
|
624
|
+
*/
|
|
625
|
+
changeControlType(e, n, r) {
|
|
626
|
+
var i, l, c, u;
|
|
627
|
+
const o = n.propertyValue, p = r && r.parent && r.parent.schema;
|
|
628
|
+
if (!p)
|
|
629
|
+
return;
|
|
630
|
+
const g = p.contents.findIndex((s) => s.id === e.id), d = p.contents[g];
|
|
631
|
+
let A;
|
|
632
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
704
633
|
editor: {
|
|
705
|
-
type:
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
634
|
+
$type: o
|
|
635
|
+
},
|
|
636
|
+
name: this.designViewModelField.name,
|
|
637
|
+
require: this.designViewModelField.require,
|
|
638
|
+
readonly: this.designViewModelField.readonly
|
|
639
|
+
}, !1), A = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o)), A || (A = M("form-group") || {}, A.editor = M(o) || {}, delete A.editor.id, delete A.editor.binding, delete A.editor.appearance), Object.assign(A, {
|
|
640
|
+
id: d.id,
|
|
641
|
+
appearance: d.appearance,
|
|
642
|
+
size: d.size,
|
|
643
|
+
label: d.label,
|
|
644
|
+
binding: d.binding,
|
|
645
|
+
visible: d.visible
|
|
646
|
+
}), Object.assign(A.editor, {
|
|
647
|
+
isTextArea: A.isTextArea && d.isTextArea,
|
|
648
|
+
placeholder: (i = d.editor) == null ? void 0 : i.placeholder,
|
|
649
|
+
holdPlace: (l = d.editor) == null ? void 0 : l.holdPlace,
|
|
650
|
+
readonly: (c = d.editor) == null ? void 0 : c.readonly,
|
|
651
|
+
require: (u = d.editor) == null ? void 0 : u.require
|
|
652
|
+
}), p.contents.splice(g, 1), p.contents.splice(g, 0, A), r.schema = Object.assign(d, A), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
653
|
+
(s) => s.classList.remove("dgComponentSelected")
|
|
654
|
+
), le.value++;
|
|
655
|
+
}
|
|
656
|
+
getComponentConfig(e, n = {}, r = {}) {
|
|
657
|
+
const o = Object.assign({
|
|
722
658
|
description: "组件信息",
|
|
723
659
|
title: "组件信息",
|
|
724
660
|
type: "input-group",
|
|
725
661
|
$converter: "/converter/property-editor.converter"
|
|
726
|
-
},
|
|
662
|
+
}, n), p = Object.assign({
|
|
727
663
|
readonly: {
|
|
728
664
|
description: "",
|
|
729
665
|
title: "只读",
|
|
@@ -744,13 +680,13 @@ class re extends ie {
|
|
|
744
680
|
title: "提示文本",
|
|
745
681
|
type: "string"
|
|
746
682
|
}
|
|
747
|
-
},
|
|
748
|
-
return { ...
|
|
683
|
+
}, r);
|
|
684
|
+
return { ...o, properties: { ...p } };
|
|
749
685
|
}
|
|
750
686
|
}
|
|
751
|
-
class
|
|
752
|
-
constructor(e,
|
|
753
|
-
super(e,
|
|
687
|
+
class pe extends ce {
|
|
688
|
+
constructor(e, n) {
|
|
689
|
+
super(e, n);
|
|
754
690
|
}
|
|
755
691
|
getEditorProperties(e) {
|
|
756
692
|
return {
|
|
@@ -783,71 +719,71 @@ class le extends re {
|
|
|
783
719
|
};
|
|
784
720
|
}
|
|
785
721
|
}
|
|
786
|
-
function
|
|
722
|
+
function de(t, e) {
|
|
787
723
|
const {
|
|
788
|
-
canAccepts:
|
|
789
|
-
checkCanDeleteComponent:
|
|
790
|
-
checkCanMoveComponent:
|
|
791
|
-
hideNestedPaddingInDesginerView:
|
|
792
|
-
onAcceptMovedChildElement:
|
|
793
|
-
resolveComponentContext:
|
|
724
|
+
canAccepts: n,
|
|
725
|
+
checkCanDeleteComponent: r,
|
|
726
|
+
checkCanMoveComponent: o,
|
|
727
|
+
hideNestedPaddingInDesginerView: p,
|
|
728
|
+
onAcceptMovedChildElement: g,
|
|
729
|
+
resolveComponentContext: d,
|
|
794
730
|
triggerBelongedComponentToMoveWhenMoved: A,
|
|
795
731
|
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
796
|
-
} = ae(
|
|
797
|
-
function c(
|
|
798
|
-
return new
|
|
732
|
+
} = ae(t), l = t.schema;
|
|
733
|
+
function c(u, s) {
|
|
734
|
+
return new pe(u, e).getPropertyConfig(l, s);
|
|
799
735
|
}
|
|
800
736
|
return {
|
|
801
|
-
canAccepts:
|
|
802
|
-
checkCanDeleteComponent:
|
|
803
|
-
checkCanMoveComponent:
|
|
804
|
-
hideNestedPaddingInDesginerView:
|
|
805
|
-
onAcceptMovedChildElement:
|
|
806
|
-
resolveComponentContext:
|
|
737
|
+
canAccepts: n,
|
|
738
|
+
checkCanDeleteComponent: r,
|
|
739
|
+
checkCanMoveComponent: o,
|
|
740
|
+
hideNestedPaddingInDesginerView: p,
|
|
741
|
+
onAcceptMovedChildElement: g,
|
|
742
|
+
resolveComponentContext: d,
|
|
807
743
|
triggerBelongedComponentToMoveWhenMoved: A,
|
|
808
744
|
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
809
745
|
getPropsConfig: c
|
|
810
746
|
};
|
|
811
747
|
}
|
|
812
|
-
const
|
|
748
|
+
const ue = /* @__PURE__ */ F({
|
|
813
749
|
name: "FAvatarDesign",
|
|
814
|
-
props:
|
|
750
|
+
props: w,
|
|
815
751
|
emits: ["change", "update:modelValue"],
|
|
816
|
-
setup(
|
|
817
|
-
const
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
}), e.expose(
|
|
821
|
-
const
|
|
752
|
+
setup(t, e) {
|
|
753
|
+
const n = v(), r = P("designer-host-service"), o = P("design-item-context"), p = de(o, r), g = Q(n, o, p);
|
|
754
|
+
H(() => {
|
|
755
|
+
n.value.componentInstance = g;
|
|
756
|
+
}), e.expose(g.value);
|
|
757
|
+
const d = b(() => ({
|
|
822
758
|
"f-avatar": !0,
|
|
823
|
-
"f-avatar-readonly":
|
|
824
|
-
"f-avatar-circle":
|
|
825
|
-
"f-avatar-square":
|
|
826
|
-
})), A = v(
|
|
827
|
-
width:
|
|
828
|
-
height:
|
|
829
|
-
})),
|
|
759
|
+
"f-avatar-readonly": t.readonly,
|
|
760
|
+
"f-avatar-circle": t.shape === "circle",
|
|
761
|
+
"f-avatar-square": t.shape === "square"
|
|
762
|
+
})), A = v(t.modelValue), i = b(() => ({
|
|
763
|
+
width: t.avatarWidth + "px",
|
|
764
|
+
height: t.avatarHeight + "px"
|
|
765
|
+
})), l = !1;
|
|
830
766
|
function c() {
|
|
831
767
|
return "";
|
|
832
768
|
}
|
|
833
|
-
function
|
|
769
|
+
function u() {
|
|
834
770
|
}
|
|
835
|
-
const
|
|
771
|
+
const s = v(null), {
|
|
836
772
|
acceptTypes: y,
|
|
837
773
|
imageSource: h,
|
|
838
|
-
onClickImage:
|
|
839
|
-
} =
|
|
774
|
+
onClickImage: k
|
|
775
|
+
} = I(t, e, s, A);
|
|
840
776
|
return () => f("div", {
|
|
841
|
-
ref:
|
|
842
|
-
class:
|
|
777
|
+
ref: n,
|
|
778
|
+
class: d.value,
|
|
843
779
|
style: i.value,
|
|
844
|
-
onClick:
|
|
845
|
-
}, [
|
|
846
|
-
title:
|
|
780
|
+
onClick: k
|
|
781
|
+
}, [l, f("img", {
|
|
782
|
+
title: t.title,
|
|
847
783
|
class: "f-avatar-image",
|
|
848
784
|
src: h.value,
|
|
849
785
|
onError: c
|
|
850
|
-
}, null), !
|
|
786
|
+
}, null), !t.readonly && f("div", {
|
|
851
787
|
class: "f-avatar-icon"
|
|
852
788
|
}, [f("span", {
|
|
853
789
|
class: "f-icon f-icon-camera"
|
|
@@ -857,21 +793,21 @@ const ce = /* @__PURE__ */ w({
|
|
|
857
793
|
type: "file",
|
|
858
794
|
class: "f-avatar-upload",
|
|
859
795
|
accept: y.value,
|
|
860
|
-
onChange:
|
|
796
|
+
onChange: u,
|
|
861
797
|
style: "display: none;"
|
|
862
798
|
}, null)]);
|
|
863
799
|
}
|
|
864
800
|
});
|
|
865
|
-
|
|
866
|
-
|
|
801
|
+
B.register = (t, e, n, r) => {
|
|
802
|
+
t.avatar = B, e.avatar = E;
|
|
867
803
|
};
|
|
868
|
-
|
|
869
|
-
|
|
804
|
+
B.registerDesigner = (t, e, n) => {
|
|
805
|
+
t.avatar = ue, e.avatar = E;
|
|
870
806
|
};
|
|
871
|
-
const
|
|
807
|
+
const be = q(B);
|
|
872
808
|
export {
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
809
|
+
B as FAvatar,
|
|
810
|
+
w as avatarProps,
|
|
811
|
+
be as default,
|
|
812
|
+
E as propsResolver
|
|
877
813
|
};
|