@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,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
|
|
10
|
-
function
|
|
11
|
-
const { properties: e, title:
|
|
12
|
-
return o.id = `${
|
|
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 U = {}, O = {};
|
|
10
|
+
function V(t) {
|
|
11
|
+
const { properties: e, title: n, ignore: r } = t, o = r && Array.isArray(r), d = Object.keys(e).reduce((u, s) => ((!o || !r.find((A) => A == s)) && (u[s] = e[s].type === "object" && e[s].properties ? V(e[s]) : N(e[s].default)), u), {});
|
|
12
|
+
return (!o || !r.find((u) => u == "id")) && (d.id = `${n}-${Date.now()}`), d;
|
|
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 d = e.get(o);
|
|
22
|
+
if (typeof d == "string")
|
|
23
|
+
r[d] = t[o];
|
|
24
24
|
else {
|
|
25
|
-
const
|
|
26
|
-
Object.assign(
|
|
25
|
+
const u = d(o, t[o], t);
|
|
26
|
+
Object.assign(r, u);
|
|
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,
|
|
39
|
-
if (typeof
|
|
40
|
-
return
|
|
41
|
-
if (typeof
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
return Number(
|
|
45
|
-
if (
|
|
46
|
-
return Number(
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
37
|
+
function Z(t = {}) {
|
|
38
|
+
function e(i, c, p, g) {
|
|
39
|
+
if (typeof p == "number")
|
|
40
|
+
return g[i].length === p;
|
|
41
|
+
if (typeof p == "object") {
|
|
42
|
+
const l = Object.keys(p)[0], y = p[l];
|
|
43
|
+
if (l === "not")
|
|
44
|
+
return Number(g[i].length) !== Number(y);
|
|
45
|
+
if (l === "moreThan")
|
|
46
|
+
return Number(g[i].length) >= Number(y);
|
|
47
|
+
if (l === "lessThan")
|
|
48
|
+
return Number(g[i].length) <= Number(y);
|
|
49
49
|
}
|
|
50
50
|
return !1;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function n(i, c, p, g) {
|
|
53
|
+
return g[i] && g[i].propertyValue && String(g[i].propertyValue.value) === String(p);
|
|
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
|
|
61
|
-
const
|
|
62
|
-
return typeof
|
|
63
|
-
if (
|
|
64
|
-
return { target:
|
|
65
|
-
const
|
|
66
|
-
return { target:
|
|
59
|
+
Object.keys(t).reduce((i, c) => (i.set(c, t[c]), i), r);
|
|
60
|
+
function o(i, c) {
|
|
61
|
+
const p = i;
|
|
62
|
+
return typeof c == "number" ? [{ target: p, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: p, operator: "getProperty", param: i, value: !!c }] : typeof c == "object" ? Object.keys(c).map((g) => {
|
|
63
|
+
if (g === "length")
|
|
64
|
+
return { target: p, operator: "length", param: null, value: c[g] };
|
|
65
|
+
const l = g, y = c[g];
|
|
66
|
+
return { target: p, operator: "getProperty", param: l, value: y };
|
|
67
67
|
}) : [];
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return Object.keys(i).reduce((
|
|
71
|
-
const
|
|
72
|
-
return
|
|
69
|
+
function d(i) {
|
|
70
|
+
return Object.keys(i).reduce((p, g) => {
|
|
71
|
+
const l = o(g, i[g]);
|
|
72
|
+
return p.push(...l), p;
|
|
73
73
|
}, []);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
return
|
|
75
|
+
function u(i, c) {
|
|
76
|
+
if (r.has(i.operator)) {
|
|
77
|
+
const p = r.get(i.operator);
|
|
78
|
+
return p && p(i.target, i.param, i.value, c) || !1;
|
|
79
79
|
}
|
|
80
80
|
return !1;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
82
|
+
function s(i, c) {
|
|
83
|
+
return d(i).reduce((l, y) => l && u(y, c), !0);
|
|
84
84
|
}
|
|
85
|
-
function A(i,
|
|
86
|
-
const
|
|
87
|
-
return
|
|
85
|
+
function A(i, c) {
|
|
86
|
+
const p = Object.keys(i), g = p.includes("allOf"), l = p.includes("anyOf"), y = g || l, x = (y ? i[y ? g ? "allOf" : "anyOf" : "allOf"] : [i]).map((R) => s(R, c));
|
|
87
|
+
return g ? !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 = (u, s, A) => s, o = {}, d = (u) => u) {
|
|
132
|
+
return U[e.title] = e, O[e.title] = r, z[e.title] = o, K[e.title] = d, (u = {}) => {
|
|
133
|
+
const s = L(u, e, n), A = Object.keys(t).reduce((i, c) => (i[c] = t[c].default, i), {});
|
|
134
|
+
return Object.assign(A, s);
|
|
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,23 @@ 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
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
207
|
+
], ie = [
|
|
208
|
+
"id",
|
|
209
|
+
"appearance",
|
|
210
|
+
"binding"
|
|
211
|
+
], ae = {
|
|
212
|
+
$schema: $,
|
|
213
|
+
$id: _,
|
|
214
|
+
title: ee,
|
|
215
|
+
description: te,
|
|
216
|
+
type: ne,
|
|
217
|
+
properties: re,
|
|
218
|
+
required: oe,
|
|
219
|
+
ignore: ie
|
|
220
|
+
}, k = {
|
|
289
221
|
/**
|
|
290
222
|
* 头像宽度
|
|
291
223
|
*/
|
|
@@ -322,67 +254,67 @@ const Y = /* @__PURE__ */ new Map([
|
|
|
322
254
|
* 支持的头像类型
|
|
323
255
|
*/
|
|
324
256
|
imageType: { type: Array, default: ["jpeg"] }
|
|
325
|
-
},
|
|
326
|
-
function
|
|
327
|
-
const
|
|
328
|
-
function
|
|
329
|
-
return
|
|
257
|
+
}, E = J(k, ae, X, Y);
|
|
258
|
+
function I(t, e, n, r) {
|
|
259
|
+
const o = "data:image/jpeg;base64,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", d = v(t.readonly);
|
|
260
|
+
function u(l) {
|
|
261
|
+
return l.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
330
262
|
}
|
|
331
|
-
function
|
|
332
|
-
return
|
|
263
|
+
function s(l) {
|
|
264
|
+
return l.indexOf("data:image/") > -1;
|
|
333
265
|
}
|
|
334
|
-
function A(
|
|
335
|
-
return
|
|
266
|
+
function A(l) {
|
|
267
|
+
return l ? "data:image/jpeg;base64," + l : "";
|
|
336
268
|
}
|
|
337
|
-
const i =
|
|
269
|
+
const i = b(() => {
|
|
338
270
|
var y;
|
|
339
|
-
if (!
|
|
271
|
+
if (!t.imageType || !t.imageType.length)
|
|
340
272
|
return "";
|
|
341
|
-
const
|
|
342
|
-
return !
|
|
343
|
-
}),
|
|
344
|
-
const
|
|
345
|
-
return
|
|
346
|
-
}),
|
|
347
|
-
function
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
return { acceptTypes: i, imageSource:
|
|
273
|
+
const l = (y = t.imageType) == null ? void 0 : y.map((h) => (h === "jpg" && (h = "jpeg"), `image/${h}`));
|
|
274
|
+
return !l || !l.length ? "image/*" : l.join(",");
|
|
275
|
+
}), c = b(() => {
|
|
276
|
+
const l = r.value || t.cover || o;
|
|
277
|
+
return u(l) || s(l) ? l : A(l);
|
|
278
|
+
}), p = b(() => d.value ? "" : t.title);
|
|
279
|
+
function g() {
|
|
280
|
+
d.value || n && n.value && n.value.click();
|
|
281
|
+
}
|
|
282
|
+
return { acceptTypes: i, imageSource: c, imageTitle: p, onClickImage: g };
|
|
351
283
|
}
|
|
352
|
-
const
|
|
284
|
+
const B = /* @__PURE__ */ F({
|
|
353
285
|
name: "FAvatar",
|
|
354
|
-
props:
|
|
286
|
+
props: k,
|
|
355
287
|
emits: ["change", "update:modelValue"],
|
|
356
|
-
setup(
|
|
357
|
-
const
|
|
288
|
+
setup(t, e) {
|
|
289
|
+
const n = b(() => ({
|
|
358
290
|
"f-avatar": !0,
|
|
359
|
-
"f-avatar-readonly":
|
|
360
|
-
"f-avatar-circle":
|
|
361
|
-
"f-avatar-square":
|
|
362
|
-
})),
|
|
363
|
-
width:
|
|
364
|
-
height:
|
|
365
|
-
})),
|
|
366
|
-
function
|
|
291
|
+
"f-avatar-readonly": t.readonly,
|
|
292
|
+
"f-avatar-circle": t.shape === "circle",
|
|
293
|
+
"f-avatar-square": t.shape === "square"
|
|
294
|
+
})), r = v(t.modelValue), o = b(() => ({
|
|
295
|
+
width: t.avatarWidth + "px",
|
|
296
|
+
height: t.avatarHeight + "px"
|
|
297
|
+
})), d = !1;
|
|
298
|
+
function u() {
|
|
367
299
|
return "";
|
|
368
300
|
}
|
|
369
|
-
function
|
|
301
|
+
function s() {
|
|
370
302
|
}
|
|
371
303
|
const A = v(null), {
|
|
372
304
|
acceptTypes: i,
|
|
373
|
-
imageSource:
|
|
374
|
-
onClickImage:
|
|
375
|
-
} =
|
|
305
|
+
imageSource: c,
|
|
306
|
+
onClickImage: p
|
|
307
|
+
} = I(t, e, A, r);
|
|
376
308
|
return () => f("div", {
|
|
377
|
-
class:
|
|
378
|
-
style:
|
|
379
|
-
onClick:
|
|
380
|
-
}, [
|
|
381
|
-
title:
|
|
309
|
+
class: n.value,
|
|
310
|
+
style: o.value,
|
|
311
|
+
onClick: p
|
|
312
|
+
}, [d, f("img", {
|
|
313
|
+
title: t.title,
|
|
382
314
|
class: "f-avatar-image",
|
|
383
|
-
src:
|
|
384
|
-
onError:
|
|
385
|
-
}, null), !
|
|
315
|
+
src: c.value,
|
|
316
|
+
onError: u
|
|
317
|
+
}, null), !t.readonly && f("div", {
|
|
386
318
|
class: "f-avatar-icon"
|
|
387
319
|
}, [f("span", {
|
|
388
320
|
class: "f-icon f-icon-camera"
|
|
@@ -392,69 +324,162 @@ const b = /* @__PURE__ */ w({
|
|
|
392
324
|
type: "file",
|
|
393
325
|
class: "f-avatar-upload",
|
|
394
326
|
accept: i.value,
|
|
395
|
-
onChange:
|
|
327
|
+
onChange: s,
|
|
396
328
|
style: "display: none;"
|
|
397
329
|
}, null)]);
|
|
398
330
|
}
|
|
399
331
|
});
|
|
400
|
-
function
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
function
|
|
332
|
+
function se(t, e) {
|
|
333
|
+
t.schema;
|
|
334
|
+
const n = v(!0), r = v(!0);
|
|
335
|
+
function o(p) {
|
|
404
336
|
return !1;
|
|
405
337
|
}
|
|
406
|
-
function
|
|
338
|
+
function d() {
|
|
407
339
|
return !1;
|
|
408
340
|
}
|
|
409
|
-
function
|
|
341
|
+
function u() {
|
|
410
342
|
return !1;
|
|
411
343
|
}
|
|
412
|
-
function
|
|
344
|
+
function s() {
|
|
413
345
|
return !0;
|
|
414
346
|
}
|
|
415
|
-
function A(
|
|
347
|
+
function A(p) {
|
|
416
348
|
}
|
|
417
349
|
function i() {
|
|
418
350
|
}
|
|
419
|
-
function
|
|
351
|
+
function c(p) {
|
|
420
352
|
return null;
|
|
421
353
|
}
|
|
422
354
|
return {
|
|
423
|
-
canAccepts:
|
|
424
|
-
checkCanDeleteComponent:
|
|
425
|
-
checkCanMoveComponent:
|
|
426
|
-
hideNestedPaddingInDesginerView:
|
|
355
|
+
canAccepts: o,
|
|
356
|
+
checkCanDeleteComponent: d,
|
|
357
|
+
checkCanMoveComponent: u,
|
|
358
|
+
hideNestedPaddingInDesginerView: s,
|
|
427
359
|
onAcceptMovedChildElement: A,
|
|
428
360
|
resolveComponentContext: i,
|
|
429
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
430
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
431
|
-
getPropsConfig:
|
|
361
|
+
triggerBelongedComponentToMoveWhenMoved: n,
|
|
362
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
363
|
+
getPropsConfig: c
|
|
432
364
|
};
|
|
433
365
|
}
|
|
434
|
-
class
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
366
|
+
class le {
|
|
367
|
+
constructor(e, n) {
|
|
368
|
+
m(this, "componentId");
|
|
369
|
+
m(this, "viewModelId");
|
|
370
|
+
m(this, "eventsEditorUtils");
|
|
371
|
+
m(this, "formSchemaUtils");
|
|
372
|
+
m(this, "formMetadataConverter");
|
|
373
|
+
m(this, "designViewModelUtils");
|
|
374
|
+
m(this, "designViewModelField");
|
|
375
|
+
m(this, "controlCreatorUtils");
|
|
376
|
+
m(this, "designerHostService");
|
|
377
|
+
m(this, "schemaService", null);
|
|
378
|
+
m(this, "metadataService", null);
|
|
379
|
+
m(this, "propertyConfig", {
|
|
380
|
+
type: "object",
|
|
381
|
+
categories: {}
|
|
382
|
+
});
|
|
383
|
+
var r;
|
|
384
|
+
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;
|
|
385
|
+
}
|
|
386
|
+
getTableInfo() {
|
|
387
|
+
var e;
|
|
388
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
389
|
+
}
|
|
390
|
+
setDesignViewModelField(e) {
|
|
391
|
+
const n = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
392
|
+
if (n) {
|
|
393
|
+
if (!this.designViewModelField) {
|
|
394
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
395
|
+
this.designViewModelField = r.fields.find((o) => o.id === n);
|
|
396
|
+
}
|
|
397
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
changeFieldEditorType(e, n) {
|
|
401
|
+
}
|
|
402
|
+
getBasicPropConfig(e) {
|
|
403
|
+
return {
|
|
404
|
+
description: "Basic Information",
|
|
405
|
+
title: "基本信息",
|
|
406
|
+
properties: {
|
|
407
|
+
id: {
|
|
408
|
+
description: "组件标识",
|
|
409
|
+
title: "标识",
|
|
410
|
+
type: "string",
|
|
411
|
+
readonly: !0
|
|
412
|
+
},
|
|
413
|
+
type: {
|
|
414
|
+
description: "组件类型",
|
|
415
|
+
title: "控件类型",
|
|
416
|
+
type: "select",
|
|
417
|
+
editor: {
|
|
418
|
+
type: "combo-list",
|
|
419
|
+
textField: "name",
|
|
420
|
+
valueField: "value",
|
|
421
|
+
data: [{ value: e.type, name: a[e.type].name }]
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
getAppearanceConfig(e = null) {
|
|
428
|
+
return {
|
|
429
|
+
title: "样式",
|
|
430
|
+
description: "Appearance",
|
|
431
|
+
properties: {
|
|
432
|
+
class: {
|
|
433
|
+
title: "class样式",
|
|
434
|
+
type: "string",
|
|
435
|
+
description: "组件的CSS样式",
|
|
436
|
+
$converter: "/converter/appearance.converter"
|
|
437
|
+
},
|
|
438
|
+
style: {
|
|
439
|
+
title: "style样式",
|
|
440
|
+
type: "string",
|
|
441
|
+
description: "组件的样式",
|
|
442
|
+
$converter: "/converter/appearance.converter"
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
};
|
|
438
446
|
}
|
|
439
447
|
}
|
|
448
|
+
const C = class C {
|
|
449
|
+
/**
|
|
450
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
451
|
+
*/
|
|
452
|
+
static getEditorTypesByMDataType(e) {
|
|
453
|
+
const n = C.fieldControlTypeMapping[e];
|
|
454
|
+
return n || [{ key: "", value: "" }];
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* 获取所有输入类控件
|
|
458
|
+
*/
|
|
459
|
+
static getAllInputTypes() {
|
|
460
|
+
const e = [];
|
|
461
|
+
for (let n in C.fieldControlTypeMapping)
|
|
462
|
+
C.fieldControlTypeMapping[n].forEach((r) => {
|
|
463
|
+
e.find((o) => o.key === r.key && o.value === r.value) || e.push({ key: r.key, value: r.value });
|
|
464
|
+
});
|
|
465
|
+
return e;
|
|
466
|
+
}
|
|
467
|
+
};
|
|
440
468
|
/**
|
|
441
469
|
* <字段类型,可配置的控件类型列表>的映射
|
|
442
470
|
*/
|
|
443
|
-
|
|
471
|
+
m(C, "fieldControlTypeMapping", {
|
|
444
472
|
String: [
|
|
445
473
|
{ key: a["input-group"].type, value: a["input-group"].name },
|
|
446
474
|
{ key: a.lookup.type, value: a.lookup.name },
|
|
447
|
-
{ key: a.Image.type, value: a.Image.name },
|
|
448
475
|
{ key: a["date-picker"].type, value: a["date-picker"].name },
|
|
449
476
|
{ key: a["check-box"].type, value: a["check-box"].name },
|
|
450
477
|
{ key: a["radio-group"].type, value: a["radio-group"].name },
|
|
451
478
|
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
452
479
|
{ key: a.textarea.type, value: a.textarea.name }
|
|
453
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
454
480
|
],
|
|
455
481
|
Text: [
|
|
456
482
|
{ key: a.textarea.type, value: a.textarea.name },
|
|
457
|
-
{ key: a.avatar.type, value: a.avatar.name },
|
|
458
483
|
{ key: a.lookup.type, value: a.lookup.name }
|
|
459
484
|
],
|
|
460
485
|
Decimal: [
|
|
@@ -487,54 +512,23 @@ g(I, "fieldControlTypeMapping", {
|
|
|
487
512
|
{ key: a.lookup.type, value: a.lookup.name },
|
|
488
513
|
{ key: a["combo-list"].type, value: a["combo-list"].name },
|
|
489
514
|
{ 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
515
|
]
|
|
497
516
|
});
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
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), {
|
|
517
|
+
let T = C;
|
|
518
|
+
const ce = v(0);
|
|
519
|
+
class pe extends le {
|
|
520
|
+
constructor(e, n) {
|
|
521
|
+
super(e, n);
|
|
522
|
+
}
|
|
523
|
+
getPropertyConfig(e, n) {
|
|
524
|
+
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;
|
|
525
|
+
}
|
|
526
|
+
getBasicProperties(e, n) {
|
|
527
|
+
var u;
|
|
528
|
+
var r = this;
|
|
529
|
+
this.setDesignViewModelField(e);
|
|
530
|
+
const o = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
531
|
+
return {
|
|
538
532
|
description: "Basic Information",
|
|
539
533
|
title: "基本信息",
|
|
540
534
|
properties: {
|
|
@@ -545,8 +539,8 @@ class ie {
|
|
|
545
539
|
readonly: !0
|
|
546
540
|
},
|
|
547
541
|
type: {
|
|
548
|
-
description: "
|
|
549
|
-
title: "
|
|
542
|
+
description: "编辑器类型",
|
|
543
|
+
title: "编辑器类型",
|
|
550
544
|
type: "string",
|
|
551
545
|
refreshPanelAfterChanged: !0,
|
|
552
546
|
$converter: "/converter/change-editor.converter",
|
|
@@ -554,63 +548,52 @@ class ie {
|
|
|
554
548
|
type: "combo-list",
|
|
555
549
|
textField: "value",
|
|
556
550
|
valueField: "key",
|
|
557
|
-
|
|
558
|
-
|
|
551
|
+
editable: !1,
|
|
552
|
+
data: r.designViewModelField ? T.getEditorTypesByMDataType((u = r.designViewModelField.type) == null ? void 0 : u.name) : T.getAllInputTypes()
|
|
559
553
|
}
|
|
560
554
|
},
|
|
561
555
|
label: {
|
|
562
556
|
title: "标签",
|
|
563
557
|
type: "string",
|
|
564
558
|
$converter: "/converter/form-group-label.converter"
|
|
559
|
+
},
|
|
560
|
+
binding: {
|
|
561
|
+
description: "绑定的表单字段",
|
|
562
|
+
title: "绑定",
|
|
563
|
+
$converter: "/converter/field-selector.converter",
|
|
564
|
+
editor: {
|
|
565
|
+
type: "field-selector",
|
|
566
|
+
bindingType: { enable: !1 },
|
|
567
|
+
editorParams: {
|
|
568
|
+
propertyData: e,
|
|
569
|
+
formBasicInfo: o
|
|
570
|
+
},
|
|
571
|
+
columns: [
|
|
572
|
+
{ field: "name", title: "字段名称" },
|
|
573
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
574
|
+
{ field: "fieldType", title: "字段类型" }
|
|
575
|
+
],
|
|
576
|
+
textField: "bindingField",
|
|
577
|
+
data: d
|
|
578
|
+
}
|
|
565
579
|
}
|
|
566
580
|
},
|
|
567
|
-
setPropertyRelates(
|
|
568
|
-
if (
|
|
569
|
-
switch (
|
|
581
|
+
setPropertyRelates(s, A) {
|
|
582
|
+
if (s)
|
|
583
|
+
switch (s && s.propertyID) {
|
|
570
584
|
case "type": {
|
|
571
|
-
|
|
585
|
+
r.changeControlType(e, s, n);
|
|
586
|
+
break;
|
|
587
|
+
}
|
|
588
|
+
case "label": {
|
|
589
|
+
s.needRefreshControlTree = !0;
|
|
572
590
|
break;
|
|
573
591
|
}
|
|
574
592
|
}
|
|
575
593
|
}
|
|
576
594
|
};
|
|
577
595
|
}
|
|
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) {
|
|
596
|
+
getAppearanceProperties(e) {
|
|
614
597
|
return {
|
|
615
598
|
title: "样式",
|
|
616
599
|
description: "Appearance",
|
|
@@ -640,73 +623,52 @@ class ie {
|
|
|
640
623
|
}
|
|
641
624
|
};
|
|
642
625
|
}
|
|
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
|
-
}
|
|
660
|
-
class re extends ie {
|
|
661
|
-
constructor(e, t) {
|
|
662
|
-
super(e, t);
|
|
663
|
-
}
|
|
664
|
-
getBasicProperties(e) {
|
|
665
|
-
let t = this.getBasicPropConfig(e);
|
|
666
|
-
return t.properties.binding = this.getFieldSelectorOptions(e), t;
|
|
667
|
-
}
|
|
668
|
-
getAppearanceProperties(e) {
|
|
669
|
-
return this.getAppearanceConfig(e);
|
|
670
|
-
}
|
|
671
626
|
getEditorProperties(e) {
|
|
672
627
|
return this.getComponentConfig(e);
|
|
673
628
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
629
|
+
/**
|
|
630
|
+
* 卡片控件:切换控件类型后事件
|
|
631
|
+
* @param propertyData 控件DOM属性
|
|
632
|
+
* @param newControlType 新控件类型
|
|
633
|
+
*/
|
|
634
|
+
changeControlType(e, n, r) {
|
|
635
|
+
var i, c, p, g;
|
|
636
|
+
const o = n.propertyValue, d = r && r.parent && r.parent.schema;
|
|
637
|
+
if (!d)
|
|
638
|
+
return;
|
|
639
|
+
const u = d.contents.findIndex((l) => l.id === e.id), s = d.contents[u];
|
|
640
|
+
let A;
|
|
641
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
683
642
|
editor: {
|
|
684
|
-
type:
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
643
|
+
$type: o
|
|
644
|
+
},
|
|
645
|
+
name: this.designViewModelField.name,
|
|
646
|
+
require: this.designViewModelField.require,
|
|
647
|
+
readonly: this.designViewModelField.readonly
|
|
648
|
+
}, !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, {
|
|
649
|
+
id: s.id,
|
|
650
|
+
appearance: s.appearance,
|
|
651
|
+
size: s.size,
|
|
652
|
+
label: s.label,
|
|
653
|
+
binding: s.binding,
|
|
654
|
+
visible: s.visible
|
|
655
|
+
}), Object.assign(A.editor, {
|
|
656
|
+
isTextArea: A.isTextArea && s.isTextArea,
|
|
657
|
+
placeholder: (i = s.editor) == null ? void 0 : i.placeholder,
|
|
658
|
+
holdPlace: (c = s.editor) == null ? void 0 : c.holdPlace,
|
|
659
|
+
readonly: (p = s.editor) == null ? void 0 : p.readonly,
|
|
660
|
+
require: (g = s.editor) == null ? void 0 : g.require
|
|
661
|
+
}), d.contents.splice(u, 1), d.contents.splice(u, 0, A), r.schema = Object.assign(s, A), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
662
|
+
(l) => l.classList.remove("dgComponentSelected")
|
|
663
|
+
), ce.value++;
|
|
664
|
+
}
|
|
665
|
+
getComponentConfig(e, n = {}, r = {}) {
|
|
666
|
+
const o = Object.assign({
|
|
667
|
+
description: "编辑器",
|
|
668
|
+
title: "编辑器",
|
|
707
669
|
type: "input-group",
|
|
708
670
|
$converter: "/converter/property-editor.converter"
|
|
709
|
-
},
|
|
671
|
+
}, n), d = Object.assign({
|
|
710
672
|
readonly: {
|
|
711
673
|
description: "",
|
|
712
674
|
title: "只读",
|
|
@@ -727,18 +689,18 @@ class re extends ie {
|
|
|
727
689
|
title: "提示文本",
|
|
728
690
|
type: "string"
|
|
729
691
|
}
|
|
730
|
-
},
|
|
731
|
-
return { ...
|
|
692
|
+
}, r);
|
|
693
|
+
return { ...o, properties: { ...d } };
|
|
732
694
|
}
|
|
733
695
|
}
|
|
734
|
-
class
|
|
735
|
-
constructor(e,
|
|
736
|
-
super(e,
|
|
696
|
+
class de extends pe {
|
|
697
|
+
constructor(e, n) {
|
|
698
|
+
super(e, n);
|
|
737
699
|
}
|
|
738
700
|
getEditorProperties(e) {
|
|
739
701
|
return {
|
|
740
|
-
description: "
|
|
741
|
-
title: "
|
|
702
|
+
description: "编辑器",
|
|
703
|
+
title: "编辑器",
|
|
742
704
|
type: "avatar",
|
|
743
705
|
$converter: "/converter/property-editor.converter",
|
|
744
706
|
properties: {
|
|
@@ -766,71 +728,71 @@ class le extends re {
|
|
|
766
728
|
};
|
|
767
729
|
}
|
|
768
730
|
}
|
|
769
|
-
function
|
|
731
|
+
function ue(t, e) {
|
|
770
732
|
const {
|
|
771
|
-
canAccepts:
|
|
772
|
-
checkCanDeleteComponent:
|
|
773
|
-
checkCanMoveComponent:
|
|
774
|
-
hideNestedPaddingInDesginerView:
|
|
775
|
-
onAcceptMovedChildElement:
|
|
776
|
-
resolveComponentContext:
|
|
733
|
+
canAccepts: n,
|
|
734
|
+
checkCanDeleteComponent: r,
|
|
735
|
+
checkCanMoveComponent: o,
|
|
736
|
+
hideNestedPaddingInDesginerView: d,
|
|
737
|
+
onAcceptMovedChildElement: u,
|
|
738
|
+
resolveComponentContext: s,
|
|
777
739
|
triggerBelongedComponentToMoveWhenMoved: A,
|
|
778
740
|
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
779
|
-
} =
|
|
780
|
-
function
|
|
781
|
-
return new
|
|
741
|
+
} = se(t), c = t.schema;
|
|
742
|
+
function p(g, l) {
|
|
743
|
+
return new de(g, e).getPropertyConfig(c, l);
|
|
782
744
|
}
|
|
783
745
|
return {
|
|
784
|
-
canAccepts:
|
|
785
|
-
checkCanDeleteComponent:
|
|
786
|
-
checkCanMoveComponent:
|
|
787
|
-
hideNestedPaddingInDesginerView:
|
|
788
|
-
onAcceptMovedChildElement:
|
|
789
|
-
resolveComponentContext:
|
|
746
|
+
canAccepts: n,
|
|
747
|
+
checkCanDeleteComponent: r,
|
|
748
|
+
checkCanMoveComponent: o,
|
|
749
|
+
hideNestedPaddingInDesginerView: d,
|
|
750
|
+
onAcceptMovedChildElement: u,
|
|
751
|
+
resolveComponentContext: s,
|
|
790
752
|
triggerBelongedComponentToMoveWhenMoved: A,
|
|
791
753
|
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
792
|
-
getPropsConfig:
|
|
754
|
+
getPropsConfig: p
|
|
793
755
|
};
|
|
794
756
|
}
|
|
795
|
-
const
|
|
757
|
+
const Ae = /* @__PURE__ */ F({
|
|
796
758
|
name: "FAvatarDesign",
|
|
797
|
-
props:
|
|
759
|
+
props: k,
|
|
798
760
|
emits: ["change", "update:modelValue"],
|
|
799
|
-
setup(
|
|
800
|
-
const
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
}), e.expose(
|
|
804
|
-
const
|
|
761
|
+
setup(t, e) {
|
|
762
|
+
const n = v(), r = P("designer-host-service"), o = P("design-item-context"), d = ue(o, r), u = Q(n, o, d);
|
|
763
|
+
H(() => {
|
|
764
|
+
n.value.componentInstance = u;
|
|
765
|
+
}), e.expose(u.value);
|
|
766
|
+
const s = b(() => ({
|
|
805
767
|
"f-avatar": !0,
|
|
806
|
-
"f-avatar-readonly":
|
|
807
|
-
"f-avatar-circle":
|
|
808
|
-
"f-avatar-square":
|
|
809
|
-
})), A = v(
|
|
810
|
-
width:
|
|
811
|
-
height:
|
|
812
|
-
})),
|
|
813
|
-
function
|
|
768
|
+
"f-avatar-readonly": t.readonly,
|
|
769
|
+
"f-avatar-circle": t.shape === "circle",
|
|
770
|
+
"f-avatar-square": t.shape === "square"
|
|
771
|
+
})), A = v(t.modelValue), i = b(() => ({
|
|
772
|
+
width: t.avatarWidth + "px",
|
|
773
|
+
height: t.avatarHeight + "px"
|
|
774
|
+
})), c = !1;
|
|
775
|
+
function p() {
|
|
814
776
|
return "";
|
|
815
777
|
}
|
|
816
|
-
function
|
|
778
|
+
function g() {
|
|
817
779
|
}
|
|
818
|
-
const
|
|
780
|
+
const l = v(null), {
|
|
819
781
|
acceptTypes: y,
|
|
820
782
|
imageSource: h,
|
|
821
|
-
onClickImage:
|
|
822
|
-
} =
|
|
783
|
+
onClickImage: w
|
|
784
|
+
} = I(t, e, l, A);
|
|
823
785
|
return () => f("div", {
|
|
824
|
-
ref:
|
|
825
|
-
class:
|
|
786
|
+
ref: n,
|
|
787
|
+
class: s.value,
|
|
826
788
|
style: i.value,
|
|
827
|
-
onClick:
|
|
828
|
-
}, [
|
|
829
|
-
title:
|
|
789
|
+
onClick: w
|
|
790
|
+
}, [c, f("img", {
|
|
791
|
+
title: t.title,
|
|
830
792
|
class: "f-avatar-image",
|
|
831
793
|
src: h.value,
|
|
832
|
-
onError:
|
|
833
|
-
}, null), !
|
|
794
|
+
onError: p
|
|
795
|
+
}, null), !t.readonly && f("div", {
|
|
834
796
|
class: "f-avatar-icon"
|
|
835
797
|
}, [f("span", {
|
|
836
798
|
class: "f-icon f-icon-camera"
|
|
@@ -840,21 +802,21 @@ const ce = /* @__PURE__ */ w({
|
|
|
840
802
|
type: "file",
|
|
841
803
|
class: "f-avatar-upload",
|
|
842
804
|
accept: y.value,
|
|
843
|
-
onChange:
|
|
805
|
+
onChange: g,
|
|
844
806
|
style: "display: none;"
|
|
845
807
|
}, null)]);
|
|
846
808
|
}
|
|
847
809
|
});
|
|
848
|
-
|
|
849
|
-
|
|
810
|
+
B.register = (t, e, n, r) => {
|
|
811
|
+
t.avatar = B, e.avatar = E;
|
|
850
812
|
};
|
|
851
|
-
|
|
852
|
-
|
|
813
|
+
B.registerDesigner = (t, e, n) => {
|
|
814
|
+
t.avatar = Ae, e.avatar = E;
|
|
853
815
|
};
|
|
854
|
-
const
|
|
816
|
+
const Ce = q(B);
|
|
855
817
|
export {
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
818
|
+
B as FAvatar,
|
|
819
|
+
k as avatarProps,
|
|
820
|
+
Ce as default,
|
|
821
|
+
E as propsResolver
|
|
860
822
|
};
|