@farris/ui-vue 1.2.9 → 1.3.0
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 +63 -63
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +402 -323
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +98 -96
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +66 -66
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +118 -118
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +539 -460
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +135 -135
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1007 -312
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +97 -97
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +472 -329
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2231 -1055
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +79 -79
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6408 -5034
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4762 -3511
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3442 -2742
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2597 -1141
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +114 -71
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +171 -171
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3075 -2586
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5272 -8511
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1726 -1822
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +126 -126
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +620 -540
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +88 -88
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +71 -71
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3582 -2356
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10752 -8972
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5601 -5329
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +535 -452
- package/components/nav/index.umd.cjs +2 -2
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +556 -477
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +504 -425
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1833 -1054
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +899 -870
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +576 -487
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +73 -73
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +1916 -1220
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +783 -886
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3632 -2556
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +484 -405
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +152 -152
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +73 -73
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1081 -1043
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +753 -738
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4418 -4177
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +119 -119
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +92 -91
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +59 -59
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +103 -103
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +85 -85
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +457 -378
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +1696 -1617
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +53 -53
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +268 -268
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +420 -341
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1062 -981
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +381 -379
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5252 -9560
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3920 -2692
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +373 -367
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +92 -92
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +597 -417
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +251 -251
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +17125 -16176
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +1 -1
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,110 +1,152 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var ee = Object.defineProperty;
|
|
2
|
+
var te = (r, e, t) => e in r ? ee(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var M = (r, e, t) => te(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as z, onBeforeMount as ne, onMounted as Q, createVNode as X, ref as E, inject as W } from "vue";
|
|
5
|
+
import { isPlainObject as _, cloneDeep as Y } from "lodash-es";
|
|
6
|
+
const Z = {}, x = {};
|
|
7
|
+
function F(r) {
|
|
8
|
+
const { properties: e, title: t, ignore: n } = r, s = n && Array.isArray(n), u = Object.keys(e).reduce((y, g) => ((!s || !n.find((P) => P == g)) && (y[g] = e[g].type === "object" && e[g].properties ? F(e[g]) : Y(e[g].default)), y), {});
|
|
9
|
+
return (!s || !n.find((y) => y == "id")) && (u.id = `${t}-${Date.now()}`), u;
|
|
7
10
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
return
|
|
11
|
+
function B(r, e = {}, t) {
|
|
12
|
+
const n = Z[r];
|
|
13
|
+
if (n) {
|
|
14
|
+
let s = F(n);
|
|
15
|
+
const u = x[r];
|
|
16
|
+
return s = u ? u({ getSchemaByType: B }, s, e, t) : s, s;
|
|
14
17
|
}
|
|
15
18
|
return null;
|
|
16
19
|
}
|
|
17
|
-
function
|
|
18
|
-
const t =
|
|
19
|
-
return Object.keys(r).reduce((
|
|
20
|
+
function oe(r, e) {
|
|
21
|
+
const t = F(e);
|
|
22
|
+
return Object.keys(r).reduce((n, s) => (n[s] && _(n[s]) && _(r[s]) ? Object.assign(n[s], r[s]) : n[s] = r[s], n), t), t;
|
|
20
23
|
}
|
|
21
|
-
function
|
|
22
|
-
return Object.keys(r).filter((
|
|
23
|
-
if (e.has(
|
|
24
|
-
const
|
|
25
|
-
if (typeof
|
|
26
|
-
|
|
24
|
+
function re(r, e) {
|
|
25
|
+
return Object.keys(r).filter((n) => r[n] != null).reduce((n, s) => {
|
|
26
|
+
if (e.has(s)) {
|
|
27
|
+
const u = e.get(s);
|
|
28
|
+
if (typeof u == "string")
|
|
29
|
+
n[u] = r[s];
|
|
27
30
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(
|
|
31
|
+
const y = u(s, r[s], r);
|
|
32
|
+
Object.assign(n, y);
|
|
30
33
|
}
|
|
31
34
|
} else
|
|
32
|
-
|
|
33
|
-
return
|
|
35
|
+
n[s] = r[s];
|
|
36
|
+
return n;
|
|
34
37
|
}, {});
|
|
35
38
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
+
function se(r, e, t = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const n = oe(r, e);
|
|
41
|
+
return re(n, t);
|
|
39
42
|
}
|
|
40
|
-
function
|
|
41
|
-
function e(a,
|
|
42
|
-
if (typeof
|
|
43
|
-
return
|
|
44
|
-
if (typeof
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
return Number(
|
|
48
|
-
if (
|
|
49
|
-
return Number(
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
43
|
+
function ce(r = {}) {
|
|
44
|
+
function e(a, d, f, m) {
|
|
45
|
+
if (typeof f == "number")
|
|
46
|
+
return m[a].length === f;
|
|
47
|
+
if (typeof f == "object") {
|
|
48
|
+
const j = Object.keys(f)[0], o = f[j];
|
|
49
|
+
if (j === "not")
|
|
50
|
+
return Number(m[a].length) !== Number(o);
|
|
51
|
+
if (j === "moreThan")
|
|
52
|
+
return Number(m[a].length) >= Number(o);
|
|
53
|
+
if (j === "lessThan")
|
|
54
|
+
return Number(m[a].length) <= Number(o);
|
|
52
55
|
}
|
|
53
56
|
return !1;
|
|
54
57
|
}
|
|
55
|
-
function t(a,
|
|
56
|
-
return
|
|
58
|
+
function t(a, d, f, m) {
|
|
59
|
+
return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(f);
|
|
57
60
|
}
|
|
58
|
-
const
|
|
61
|
+
const n = /* @__PURE__ */ new Map([
|
|
59
62
|
["length", e],
|
|
60
63
|
["getProperty", t]
|
|
61
64
|
]);
|
|
62
|
-
Object.keys(r).reduce((a,
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
return typeof
|
|
66
|
-
if (
|
|
67
|
-
return { target:
|
|
68
|
-
const
|
|
69
|
-
return { target:
|
|
65
|
+
Object.keys(r).reduce((a, d) => (a.set(d, r[d]), a), n);
|
|
66
|
+
function s(a, d) {
|
|
67
|
+
const f = a;
|
|
68
|
+
return typeof d == "number" ? [{ target: f, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: f, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
|
|
69
|
+
if (m === "length")
|
|
70
|
+
return { target: f, operator: "length", param: null, value: d[m] };
|
|
71
|
+
const j = m, o = d[m];
|
|
72
|
+
return { target: f, operator: "getProperty", param: j, value: o };
|
|
70
73
|
}) : [];
|
|
71
74
|
}
|
|
72
|
-
function
|
|
73
|
-
return Object.keys(a).reduce((
|
|
74
|
-
const
|
|
75
|
-
return
|
|
75
|
+
function u(a) {
|
|
76
|
+
return Object.keys(a).reduce((f, m) => {
|
|
77
|
+
const j = s(m, a[m]);
|
|
78
|
+
return f.push(...j), f;
|
|
76
79
|
}, []);
|
|
77
80
|
}
|
|
78
|
-
function
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
81
|
+
function y(a, d) {
|
|
82
|
+
if (n.has(a.operator)) {
|
|
83
|
+
const f = n.get(a.operator);
|
|
84
|
+
return f && f(a.target, a.param, a.value, d) || !1;
|
|
82
85
|
}
|
|
83
86
|
return !1;
|
|
84
87
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
88
|
+
function g(a, d) {
|
|
89
|
+
return u(a).reduce((j, o) => j && y(o, d), !0);
|
|
87
90
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
return
|
|
91
|
+
function P(a, d) {
|
|
92
|
+
const f = Object.keys(a), m = f.includes("allOf"), j = f.includes("anyOf"), o = m || j, p = (o ? a[o ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((h) => g(h, d));
|
|
93
|
+
return m ? !p.includes(!1) : p.includes(!0);
|
|
91
94
|
}
|
|
92
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: P };
|
|
93
96
|
}
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
const ie = {
|
|
98
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
99
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
100
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
101
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
102
|
+
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
103
|
+
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
104
|
+
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
105
|
+
"number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
|
|
106
|
+
"date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
|
|
107
|
+
switch: { type: "switch", name: "开关", icon: "SwitchField" },
|
|
108
|
+
"radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
|
|
109
|
+
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
110
|
+
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
111
|
+
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
112
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
113
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
114
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
115
|
+
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
116
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
117
|
+
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
118
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
119
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
120
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
121
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
122
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
123
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
124
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
125
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
126
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
127
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
128
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
129
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
130
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
131
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
132
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
133
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
134
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
135
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
136
|
+
}, ae = {}, pe = {};
|
|
137
|
+
ce();
|
|
138
|
+
function H(r, e, t = /* @__PURE__ */ new Map(), n = (y, g, P) => g, s = {}, u = (y) => y) {
|
|
139
|
+
return Z[e.title] = e, x[e.title] = n, ae[e.title] = s, pe[e.title] = u, (y = {}) => {
|
|
140
|
+
const g = se(y, e, t), P = Object.keys(r).reduce((a, d) => (a[d] = r[d].default, a), {});
|
|
141
|
+
return Object.assign(P, g);
|
|
100
142
|
};
|
|
101
143
|
}
|
|
102
|
-
function
|
|
144
|
+
function le(r, e) {
|
|
103
145
|
return { customClass: e.class, customStyle: e.style };
|
|
104
146
|
}
|
|
105
|
-
const
|
|
106
|
-
["appearance",
|
|
107
|
-
]),
|
|
147
|
+
const R = /* @__PURE__ */ new Map([
|
|
148
|
+
["appearance", le]
|
|
149
|
+
]), ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/component.schema.json", de = "component", ye = "A Farris Visual Component", me = "object", he = {
|
|
108
150
|
id: {
|
|
109
151
|
description: "The unique identifier for a component",
|
|
110
152
|
type: "string"
|
|
@@ -144,179 +186,141 @@ const H = /* @__PURE__ */ new Map([
|
|
|
144
186
|
description: "",
|
|
145
187
|
type: "boolean",
|
|
146
188
|
default: !0
|
|
189
|
+
},
|
|
190
|
+
onInit: {
|
|
191
|
+
description: "初始化事件",
|
|
192
|
+
type: "string",
|
|
193
|
+
default: ""
|
|
194
|
+
},
|
|
195
|
+
onAfterViewInit: {
|
|
196
|
+
description: "视图初始化后事件",
|
|
197
|
+
type: "string",
|
|
198
|
+
default: ""
|
|
147
199
|
}
|
|
148
|
-
},
|
|
200
|
+
}, be = [
|
|
149
201
|
"id",
|
|
150
202
|
"type",
|
|
151
203
|
"contents"
|
|
152
|
-
],
|
|
153
|
-
$schema:
|
|
154
|
-
$id:
|
|
155
|
-
title:
|
|
156
|
-
description:
|
|
157
|
-
type:
|
|
158
|
-
properties:
|
|
159
|
-
required:
|
|
204
|
+
], ge = {
|
|
205
|
+
$schema: ue,
|
|
206
|
+
$id: fe,
|
|
207
|
+
title: de,
|
|
208
|
+
description: ye,
|
|
209
|
+
type: me,
|
|
210
|
+
properties: he,
|
|
211
|
+
required: be
|
|
160
212
|
};
|
|
161
|
-
function
|
|
213
|
+
function I(r, e, t) {
|
|
162
214
|
return e;
|
|
163
215
|
}
|
|
164
|
-
const
|
|
165
|
-
basic: {
|
|
166
|
-
description: "Basic Infomation",
|
|
167
|
-
title: "基本信息",
|
|
168
|
-
properties: {
|
|
169
|
-
id: {
|
|
170
|
-
description: "组件标识",
|
|
171
|
-
title: "标识",
|
|
172
|
-
type: "string",
|
|
173
|
-
readonly: !0
|
|
174
|
-
},
|
|
175
|
-
type: {
|
|
176
|
-
description: "组件类型",
|
|
177
|
-
title: "控件类型",
|
|
178
|
-
type: "select",
|
|
179
|
-
editor: {
|
|
180
|
-
type: "combo-list",
|
|
181
|
-
textField: "value",
|
|
182
|
-
valueField: "key",
|
|
183
|
-
data: [
|
|
184
|
-
{
|
|
185
|
-
key: "component",
|
|
186
|
-
value: "组件"
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
appearance: {
|
|
194
|
-
description: "",
|
|
195
|
-
title: "外观",
|
|
196
|
-
properties: {
|
|
197
|
-
class: {
|
|
198
|
-
description: "组件的CSS样式",
|
|
199
|
-
title: "class样式"
|
|
200
|
-
},
|
|
201
|
-
style: {
|
|
202
|
-
description: "组件的内容样式",
|
|
203
|
-
title: "style样式"
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}, be = {
|
|
208
|
-
title: ue,
|
|
209
|
-
description: fe,
|
|
210
|
-
type: de,
|
|
211
|
-
categories: ye
|
|
212
|
-
}, F = {
|
|
216
|
+
const D = {
|
|
213
217
|
id: { type: String },
|
|
214
218
|
customClass: { type: String, default: "" },
|
|
215
219
|
componentType: { type: String, default: "" }
|
|
216
|
-
},
|
|
220
|
+
}, J = H(D, ge, R, I), Qe = Object.assign({}, D, { componentId: { type: String, default: "" } }), k = /* @__PURE__ */ z({
|
|
217
221
|
name: "FComponent",
|
|
218
|
-
props:
|
|
222
|
+
props: D,
|
|
219
223
|
emits: ["init", "afterViewInit"],
|
|
220
224
|
setup(r, e) {
|
|
221
|
-
return
|
|
225
|
+
return ne(() => {
|
|
222
226
|
e.emit("init", r.id);
|
|
223
|
-
}),
|
|
227
|
+
}), Q(() => {
|
|
224
228
|
e.emit("afterViewInit", r.id);
|
|
225
|
-
}), () =>
|
|
229
|
+
}), () => X("div", {
|
|
226
230
|
class: r.customClass
|
|
227
231
|
}, [e.slots.default && e.slots.default()]);
|
|
228
232
|
}
|
|
229
233
|
});
|
|
230
|
-
function
|
|
231
|
-
var
|
|
232
|
-
function
|
|
234
|
+
function je(r, e, t) {
|
|
235
|
+
var S;
|
|
236
|
+
function n() {
|
|
233
237
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
234
238
|
}
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
function
|
|
239
|
+
n();
|
|
240
|
+
const s = t && t.getStyles && t.getStyles() || "", u = t && t.getDesignerClass && t.getDesignerClass() || "", y = E();
|
|
241
|
+
function g() {
|
|
238
242
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
239
243
|
}
|
|
240
|
-
function
|
|
244
|
+
function P() {
|
|
241
245
|
return !1;
|
|
242
246
|
}
|
|
243
247
|
function a() {
|
|
244
248
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
245
249
|
}
|
|
246
|
-
function
|
|
250
|
+
function d() {
|
|
247
251
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
248
252
|
}
|
|
249
|
-
function l
|
|
250
|
-
if (!
|
|
253
|
+
function f(l) {
|
|
254
|
+
if (!l || !l.value)
|
|
251
255
|
return null;
|
|
252
|
-
if (
|
|
253
|
-
return
|
|
254
|
-
const v =
|
|
256
|
+
if (l.value.schema && l.value.schema.type === "component")
|
|
257
|
+
return l.value;
|
|
258
|
+
const v = E(l == null ? void 0 : l.value.parent), C = f(v);
|
|
255
259
|
return C || null;
|
|
256
260
|
}
|
|
257
|
-
function
|
|
258
|
-
const { componentInstance: v, designerItemElementRef: C } =
|
|
259
|
-
return !v || !v.value ? null : v.value.canMove ? C :
|
|
261
|
+
function m(l = e) {
|
|
262
|
+
const { componentInstance: v, designerItemElementRef: C } = l;
|
|
263
|
+
return !v || !v.value ? null : v.value.canMove ? C : m(l.parent);
|
|
260
264
|
}
|
|
261
|
-
function
|
|
262
|
-
return !!t && t.canAccepts(
|
|
265
|
+
function j(l) {
|
|
266
|
+
return !!t && t.canAccepts(l);
|
|
263
267
|
}
|
|
264
|
-
function
|
|
268
|
+
function o() {
|
|
265
269
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
266
270
|
}
|
|
267
|
-
function
|
|
271
|
+
function i() {
|
|
268
272
|
}
|
|
269
|
-
function
|
|
273
|
+
function c(l, v) {
|
|
270
274
|
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
271
275
|
}
|
|
272
|
-
function
|
|
273
|
-
const { componentType: C } =
|
|
274
|
-
let T =
|
|
275
|
-
t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(
|
|
276
|
+
function p(l, v) {
|
|
277
|
+
const { componentType: C } = l;
|
|
278
|
+
let T = B(C, l, v);
|
|
279
|
+
t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(l, T));
|
|
276
280
|
const O = C.toLowerCase().replace("-", "_");
|
|
277
281
|
return T && !T.id && T.type === C && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
|
|
278
282
|
}
|
|
279
|
-
function
|
|
280
|
-
const C = String(
|
|
281
|
-
O.parentComponentInstance =
|
|
282
|
-
let
|
|
283
|
-
t && t.onAcceptNewChildElement && (
|
|
284
|
-
const
|
|
285
|
-
return
|
|
283
|
+
function b(l, v) {
|
|
284
|
+
const C = String(l.getAttribute("data-controltype")), T = l.getAttribute("data-feature"), O = T ? JSON.parse(T) : {};
|
|
285
|
+
O.parentComponentInstance = y.value;
|
|
286
|
+
let A = B(C, O);
|
|
287
|
+
t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(l, v, A));
|
|
288
|
+
const V = C.toLowerCase().replace("-", "_");
|
|
289
|
+
return A && !A.id && A.type === C && (A.id = `${V}_${Math.random().toString().slice(2, 6)}`), A;
|
|
286
290
|
}
|
|
287
|
-
function
|
|
291
|
+
function h(l) {
|
|
288
292
|
}
|
|
289
|
-
function
|
|
293
|
+
function w(...l) {
|
|
290
294
|
if (t && t.getPropsConfig)
|
|
291
|
-
return t.getPropsConfig(...
|
|
295
|
+
return t.getPropsConfig(...l);
|
|
292
296
|
}
|
|
293
|
-
return
|
|
294
|
-
canMove:
|
|
295
|
-
canSelectParent:
|
|
297
|
+
return y.value = {
|
|
298
|
+
canMove: g(),
|
|
299
|
+
canSelectParent: P(),
|
|
296
300
|
canDelete: a(),
|
|
297
|
-
canNested: !
|
|
301
|
+
canNested: !d(),
|
|
298
302
|
contents: e == null ? void 0 : e.schema.contents,
|
|
299
303
|
elementRef: r,
|
|
300
|
-
parent: (
|
|
304
|
+
parent: (S = e == null ? void 0 : e.parent) == null ? void 0 : S.componentInstance,
|
|
301
305
|
schema: e == null ? void 0 : e.schema,
|
|
302
|
-
styles:
|
|
303
|
-
designerClass:
|
|
304
|
-
canAccepts:
|
|
305
|
-
getBelongedComponentInstance:
|
|
306
|
-
getDraggableDesignItemElement:
|
|
307
|
-
getDraggingDisplayText:
|
|
308
|
-
getPropConfig:
|
|
309
|
-
getDragScopeElement:
|
|
310
|
-
onAcceptMovedChildElement:
|
|
311
|
-
onAcceptNewChildElement:
|
|
312
|
-
onChildElementMovedOut:
|
|
313
|
-
addNewChildComponentSchema:
|
|
314
|
-
updateDragAndDropRules:
|
|
315
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
316
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
317
|
-
},
|
|
306
|
+
styles: s,
|
|
307
|
+
designerClass: u,
|
|
308
|
+
canAccepts: j,
|
|
309
|
+
getBelongedComponentInstance: f,
|
|
310
|
+
getDraggableDesignItemElement: m,
|
|
311
|
+
getDraggingDisplayText: o,
|
|
312
|
+
getPropConfig: w,
|
|
313
|
+
getDragScopeElement: i,
|
|
314
|
+
onAcceptMovedChildElement: c,
|
|
315
|
+
onAcceptNewChildElement: b,
|
|
316
|
+
onChildElementMovedOut: h,
|
|
317
|
+
addNewChildComponentSchema: p,
|
|
318
|
+
updateDragAndDropRules: n,
|
|
319
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || E(!1),
|
|
320
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
|
|
321
|
+
}, y;
|
|
318
322
|
}
|
|
319
|
-
const
|
|
323
|
+
const ve = "https://json-schema.org/draft/2020-12/schema", Ce = "https://farris-design.gitee.io/dragging-rules.schema.json", Pe = "Dragging Rules", we = "The rules of designer canvas", Me = "object", Te = {
|
|
320
324
|
"f-page": {
|
|
321
325
|
description: "The root class of page designed by farris.",
|
|
322
326
|
type: "object",
|
|
@@ -955,164 +959,302 @@ const me = "https://json-schema.org/draft/2020-12/schema", ge = "https://farris-
|
|
|
955
959
|
type: "object"
|
|
956
960
|
}
|
|
957
961
|
}, Ae = {
|
|
958
|
-
$schema:
|
|
959
|
-
$id:
|
|
960
|
-
title:
|
|
961
|
-
description:
|
|
962
|
-
type:
|
|
963
|
-
properties:
|
|
964
|
-
},
|
|
965
|
-
function
|
|
966
|
-
function r(
|
|
967
|
-
var
|
|
968
|
-
if (typeof
|
|
969
|
-
return ((
|
|
970
|
-
if (typeof
|
|
971
|
-
const
|
|
972
|
-
if (
|
|
973
|
-
return Number(
|
|
974
|
-
if (
|
|
975
|
-
return Number(
|
|
976
|
-
if (
|
|
977
|
-
return Number(
|
|
962
|
+
$schema: ve,
|
|
963
|
+
$id: Ce,
|
|
964
|
+
title: Pe,
|
|
965
|
+
description: we,
|
|
966
|
+
type: Me,
|
|
967
|
+
properties: Te
|
|
968
|
+
}, N = /* @__PURE__ */ new Map();
|
|
969
|
+
function Se() {
|
|
970
|
+
function r(o, i, c, p) {
|
|
971
|
+
var b;
|
|
972
|
+
if (typeof c == "number")
|
|
973
|
+
return ((b = p[o]) == null ? void 0 : b.length) === c;
|
|
974
|
+
if (typeof c == "object") {
|
|
975
|
+
const h = Object.keys(c)[0], w = c[h];
|
|
976
|
+
if (h === "not")
|
|
977
|
+
return Number(p[o].length) !== Number(w);
|
|
978
|
+
if (h === "moreThan")
|
|
979
|
+
return Number(p[o].length) >= Number(w);
|
|
980
|
+
if (h === "lessThan")
|
|
981
|
+
return Number(p[o].length) <= Number(w);
|
|
978
982
|
}
|
|
979
983
|
return !1;
|
|
980
984
|
}
|
|
981
|
-
function e(
|
|
982
|
-
return typeof
|
|
985
|
+
function e(o, i, c, p) {
|
|
986
|
+
return typeof c == "boolean" ? p.childrenClassList.includes(i) === !!c : !1;
|
|
983
987
|
}
|
|
984
|
-
function t(
|
|
985
|
-
return typeof
|
|
988
|
+
function t(o, i, c, p) {
|
|
989
|
+
return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
|
|
986
990
|
}
|
|
987
|
-
function
|
|
988
|
-
return typeof
|
|
991
|
+
function n(o, i, c, p) {
|
|
992
|
+
return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
|
|
989
993
|
}
|
|
990
|
-
const
|
|
994
|
+
const s = /* @__PURE__ */ new Map([
|
|
991
995
|
["length", r],
|
|
992
996
|
["hasChildren", e],
|
|
993
|
-
["hasSibling",
|
|
997
|
+
["hasSibling", n],
|
|
994
998
|
["hasParent", t]
|
|
995
999
|
]);
|
|
996
|
-
function
|
|
997
|
-
const
|
|
998
|
-
return typeof
|
|
999
|
-
if (
|
|
1000
|
-
return { target:
|
|
1001
|
-
const
|
|
1002
|
-
return { target:
|
|
1000
|
+
function u(o, i) {
|
|
1001
|
+
const c = o;
|
|
1002
|
+
return typeof i == "number" ? [{ target: c, operator: "length", param: null, value: Number(i) }] : typeof i == "object" ? Object.keys(i).map((p) => {
|
|
1003
|
+
if (p === "length")
|
|
1004
|
+
return { target: c, operator: "length", param: null, value: i[p] };
|
|
1005
|
+
const b = p, h = i[p];
|
|
1006
|
+
return { target: c, operator: o === "children" ? "hasChildren" : o === "parent" ? "hasParent" : "hasSibling", param: b, value: h };
|
|
1003
1007
|
}) : [];
|
|
1004
1008
|
}
|
|
1005
|
-
function
|
|
1006
|
-
if (
|
|
1007
|
-
const
|
|
1008
|
-
return
|
|
1009
|
+
function y(o, i) {
|
|
1010
|
+
if (s.has(o.operator)) {
|
|
1011
|
+
const c = s.get(o.operator);
|
|
1012
|
+
return c && c(o.target, o.param, o.value, i) || !1;
|
|
1009
1013
|
}
|
|
1010
1014
|
return !1;
|
|
1011
1015
|
}
|
|
1012
|
-
function
|
|
1013
|
-
return Object.keys(
|
|
1014
|
-
const
|
|
1015
|
-
return
|
|
1016
|
-
}, []).reduce((
|
|
1016
|
+
function g(o, i) {
|
|
1017
|
+
return Object.keys(o).reduce((h, w) => {
|
|
1018
|
+
const S = u(w, o[w]);
|
|
1019
|
+
return h.push(...S), h;
|
|
1020
|
+
}, []).reduce((h, w) => h && y(w, i), !0);
|
|
1017
1021
|
}
|
|
1018
|
-
function
|
|
1019
|
-
const
|
|
1020
|
-
return
|
|
1022
|
+
function P(o, i) {
|
|
1023
|
+
const c = Object.keys(o), p = c.includes("allOf"), b = c.includes("anyOf"), h = p || b, l = (h ? o[h ? p ? "allOf" : "anyOf" : "allOf"] : [o]).map((C) => g(C, i));
|
|
1024
|
+
return p ? !l.includes(!1) : l.includes(!0);
|
|
1021
1025
|
}
|
|
1022
|
-
function a(
|
|
1023
|
-
const
|
|
1024
|
-
return
|
|
1026
|
+
function a(o, i) {
|
|
1027
|
+
const c = o.const;
|
|
1028
|
+
return c ? typeof c == "boolean" ? c : typeof c == "object" ? P(c, i) : !1 : !1;
|
|
1025
1029
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return (
|
|
1028
|
-
const
|
|
1029
|
-
return
|
|
1030
|
-
const
|
|
1031
|
-
return
|
|
1032
|
-
},
|
|
1030
|
+
function d(o) {
|
|
1031
|
+
return (i) => {
|
|
1032
|
+
const c = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
1033
|
+
return o && o.properties && Object.keys(o.properties).reduce((p, b) => {
|
|
1034
|
+
const h = o.properties[b];
|
|
1035
|
+
return p[b] = a(h, i), p;
|
|
1036
|
+
}, c), c;
|
|
1033
1037
|
};
|
|
1034
1038
|
}
|
|
1035
|
-
function
|
|
1036
|
-
if (
|
|
1037
|
-
const { rules:
|
|
1038
|
-
|
|
1039
|
-
(
|
|
1039
|
+
function f(o, i, c) {
|
|
1040
|
+
if (i.type === "object" && i.properties) {
|
|
1041
|
+
const { rules: p, contents: b } = i.properties;
|
|
1042
|
+
c.set(o, d(p)), b && Object.keys(b.properties).forEach(
|
|
1043
|
+
(h) => f(h, b.properties[h], c)
|
|
1040
1044
|
);
|
|
1041
1045
|
}
|
|
1042
1046
|
}
|
|
1043
|
-
function
|
|
1044
|
-
const { properties:
|
|
1045
|
-
Object.keys(
|
|
1046
|
-
|
|
1047
|
+
function m() {
|
|
1048
|
+
const { properties: o } = Ae;
|
|
1049
|
+
Object.keys(o).forEach((i) => {
|
|
1050
|
+
f(i, o[i], N);
|
|
1047
1051
|
});
|
|
1048
1052
|
}
|
|
1049
|
-
function
|
|
1050
|
-
const
|
|
1051
|
-
return
|
|
1053
|
+
function j(o, i) {
|
|
1054
|
+
const c = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1055
|
+
return N.has(o) ? N.get(o)(i) : c;
|
|
1052
1056
|
}
|
|
1053
|
-
return
|
|
1057
|
+
return m(), { getRuleValue: j };
|
|
1054
1058
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1059
|
+
class Oe {
|
|
1060
|
+
constructor(e, t) {
|
|
1061
|
+
M(this, "componentId");
|
|
1062
|
+
M(this, "viewModelId");
|
|
1063
|
+
M(this, "eventsEditorUtils");
|
|
1064
|
+
M(this, "formSchemaUtils");
|
|
1065
|
+
M(this, "formMetadataConverter");
|
|
1066
|
+
M(this, "designViewModelUtils");
|
|
1067
|
+
M(this, "designViewModelField");
|
|
1068
|
+
M(this, "controlCreatorUtils");
|
|
1069
|
+
M(this, "designerHostService");
|
|
1070
|
+
M(this, "schemaService", null);
|
|
1071
|
+
M(this, "metadataService", null);
|
|
1072
|
+
M(this, "propertyConfig", {
|
|
1073
|
+
type: "object",
|
|
1074
|
+
categories: {}
|
|
1075
|
+
});
|
|
1076
|
+
var n;
|
|
1077
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
1061
1078
|
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1079
|
+
getTableInfo() {
|
|
1080
|
+
var e;
|
|
1081
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
1064
1082
|
}
|
|
1065
|
-
|
|
1066
|
-
|
|
1083
|
+
setDesignViewModelField(e) {
|
|
1084
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
1085
|
+
if (t) {
|
|
1086
|
+
if (!this.designViewModelField) {
|
|
1087
|
+
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1088
|
+
this.designViewModelField = n.fields.find((s) => s.id === t);
|
|
1089
|
+
}
|
|
1090
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
changeFieldEditorType(e, t) {
|
|
1094
|
+
}
|
|
1095
|
+
getBasicPropConfig(e) {
|
|
1096
|
+
return {
|
|
1097
|
+
description: "Basic Information",
|
|
1098
|
+
title: "基本信息",
|
|
1099
|
+
properties: {
|
|
1100
|
+
id: {
|
|
1101
|
+
description: "组件标识",
|
|
1102
|
+
title: "标识",
|
|
1103
|
+
type: "string",
|
|
1104
|
+
readonly: !0
|
|
1105
|
+
},
|
|
1106
|
+
type: {
|
|
1107
|
+
description: "组件类型",
|
|
1108
|
+
title: "控件类型",
|
|
1109
|
+
type: "select",
|
|
1110
|
+
editor: {
|
|
1111
|
+
type: "combo-list",
|
|
1112
|
+
textField: "name",
|
|
1113
|
+
valueField: "value",
|
|
1114
|
+
data: [{ value: e.type, name: ie[e.type].name }]
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
getAppearanceConfig(e = null) {
|
|
1121
|
+
return {
|
|
1122
|
+
title: "样式",
|
|
1123
|
+
description: "Appearance",
|
|
1124
|
+
properties: {
|
|
1125
|
+
class: {
|
|
1126
|
+
title: "class样式",
|
|
1127
|
+
type: "string",
|
|
1128
|
+
description: "组件的CSS样式",
|
|
1129
|
+
$converter: "/converter/appearance.converter"
|
|
1130
|
+
},
|
|
1131
|
+
style: {
|
|
1132
|
+
title: "style样式",
|
|
1133
|
+
type: "string",
|
|
1134
|
+
description: "组件的样式",
|
|
1135
|
+
$converter: "/converter/appearance.converter"
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
*
|
|
1142
|
+
* @param propertyId
|
|
1143
|
+
* @param componentInstance
|
|
1144
|
+
* @returns
|
|
1145
|
+
*/
|
|
1146
|
+
updateElementByParentContainer(e, t) {
|
|
1147
|
+
const n = t && t.parent && t.parent.schema;
|
|
1148
|
+
if (!n)
|
|
1149
|
+
return;
|
|
1150
|
+
const s = n.contents.findIndex((y) => y.id === e), u = Y(n.contents[s]);
|
|
1151
|
+
n.contents.splice(s, 1), n.contents.splice(s, 0, u);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
class Ee extends Oe {
|
|
1155
|
+
constructor(e, t) {
|
|
1156
|
+
super(e, t);
|
|
1157
|
+
}
|
|
1158
|
+
getPropertyConfig(e) {
|
|
1159
|
+
return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
1160
|
+
}
|
|
1161
|
+
getEventPropConfig(e) {
|
|
1162
|
+
const t = [
|
|
1163
|
+
{
|
|
1164
|
+
label: "onInit",
|
|
1165
|
+
name: "初始化事件"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
label: "onAfterViewInit",
|
|
1169
|
+
name: "视图初始化后事件"
|
|
1170
|
+
}
|
|
1171
|
+
];
|
|
1172
|
+
var n = this;
|
|
1173
|
+
const s = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), u = {};
|
|
1174
|
+
u[n.viewModelId] = {
|
|
1175
|
+
type: "events-editor",
|
|
1176
|
+
editor: {
|
|
1177
|
+
initialData: s
|
|
1178
|
+
}
|
|
1179
|
+
}, this.propertyConfig.categories.eventsEditor = {
|
|
1180
|
+
title: "事件",
|
|
1181
|
+
hideTitle: !0,
|
|
1182
|
+
properties: u,
|
|
1183
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1184
|
+
refreshPanelAfterChanged: !0,
|
|
1185
|
+
tabId: "commands",
|
|
1186
|
+
tabName: "交互",
|
|
1187
|
+
setPropertyRelates(y, g) {
|
|
1188
|
+
const P = y.propertyValue;
|
|
1189
|
+
delete e[n.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, P.events, P));
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
function De(r, e) {
|
|
1195
|
+
const t = Se();
|
|
1196
|
+
let n = !1, s, u = !1;
|
|
1197
|
+
const y = !1, g = r.schema;
|
|
1198
|
+
function P() {
|
|
1199
|
+
return !1;
|
|
1067
1200
|
}
|
|
1068
1201
|
function a() {
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1202
|
+
return y || !u;
|
|
1203
|
+
}
|
|
1204
|
+
function d() {
|
|
1205
|
+
return !u;
|
|
1206
|
+
}
|
|
1207
|
+
function f() {
|
|
1208
|
+
var U, L;
|
|
1209
|
+
u = !1;
|
|
1210
|
+
const o = r.schema, i = o.appearance && o.appearance.class || "", c = i.split(" "), p = o.contents || [], b = p.length ? p[0] : null, h = b && b.appearance ? b.appearance.class : "", w = h ? h.split(" ") : [], S = p.length ? p.reduce((q, $) => {
|
|
1211
|
+
const G = $ && $.appearance ? $.appearance.class : "", K = G ? G.split(" ") : [];
|
|
1212
|
+
return q.push(...K), q;
|
|
1074
1213
|
}, []) : [];
|
|
1075
|
-
if (((
|
|
1076
|
-
|
|
1214
|
+
if (((L = (U = r.parent) == null ? void 0 : U.schema) == null ? void 0 : L.type) !== "component-ref") {
|
|
1215
|
+
n = !0, u = !0;
|
|
1077
1216
|
return;
|
|
1078
1217
|
}
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1081
|
-
componentClass:
|
|
1082
|
-
componentClassList:
|
|
1083
|
-
childContents:
|
|
1084
|
-
firstChildContent:
|
|
1085
|
-
firstChildClass:
|
|
1086
|
-
firstChildClassList:
|
|
1087
|
-
parent:
|
|
1088
|
-
parentClass:
|
|
1089
|
-
parentClassList:
|
|
1090
|
-
children:
|
|
1091
|
-
childrenClassList:
|
|
1218
|
+
const l = r.parent.parent, v = l && l.schema, C = v && v.appearance ? v.appearance.class : "", T = C ? C.split(" ") : [];
|
|
1219
|
+
s = {
|
|
1220
|
+
componentClass: i,
|
|
1221
|
+
componentClassList: c,
|
|
1222
|
+
childContents: p,
|
|
1223
|
+
firstChildContent: b,
|
|
1224
|
+
firstChildClass: h,
|
|
1225
|
+
firstChildClassList: w,
|
|
1226
|
+
parent: v,
|
|
1227
|
+
parentClass: C,
|
|
1228
|
+
parentClassList: T,
|
|
1229
|
+
children: p,
|
|
1230
|
+
childrenClassList: S
|
|
1092
1231
|
};
|
|
1093
|
-
const { canAccept:
|
|
1094
|
-
|
|
1232
|
+
const { canAccept: O, fixed: A, hidePadding: V } = t.getRuleValue(c[0], s);
|
|
1233
|
+
n = V, u = A;
|
|
1095
1234
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return
|
|
1235
|
+
function m() {
|
|
1236
|
+
return n;
|
|
1237
|
+
}
|
|
1238
|
+
function j(o) {
|
|
1239
|
+
return new Ee(o, e).getPropertyConfig(g);
|
|
1098
1240
|
}
|
|
1099
|
-
return { canAccepts:
|
|
1241
|
+
return { canAccepts: P, checkCanDeleteComponent: a, checkCanMoveComponent: d, resolveComponentContext: f, hideNestedPaddingInDesginerView: m, getPropsConfig: j };
|
|
1100
1242
|
}
|
|
1101
|
-
const
|
|
1243
|
+
const Ve = /* @__PURE__ */ z({
|
|
1102
1244
|
name: "FComponetDesign",
|
|
1103
|
-
props:
|
|
1245
|
+
props: D,
|
|
1104
1246
|
emits: [],
|
|
1105
1247
|
setup(r, e) {
|
|
1106
|
-
const t =
|
|
1107
|
-
return
|
|
1108
|
-
t.value.componentInstance =
|
|
1109
|
-
}), e.expose(
|
|
1248
|
+
const t = E(), n = W("designer-host-service"), s = W("design-item-context"), u = De(s, n), y = je(t, s, u);
|
|
1249
|
+
return Q(() => {
|
|
1250
|
+
t.value.componentInstance = y;
|
|
1251
|
+
}), e.expose(y.value), () => X("div", {
|
|
1110
1252
|
ref: t,
|
|
1111
1253
|
class: "drag-container",
|
|
1112
|
-
"data-dragref": `${
|
|
1254
|
+
"data-dragref": `${s.schema.id}-container`
|
|
1113
1255
|
}, [e.slots.default && e.slots.default()]);
|
|
1114
1256
|
}
|
|
1115
|
-
}),
|
|
1257
|
+
}), $e = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/component.schema.json", Ne = "component-ref", Be = "A Farris Visual Component", Fe = "object", Ue = {
|
|
1116
1258
|
id: {
|
|
1117
1259
|
description: "The unique identifier for a Section",
|
|
1118
1260
|
type: "string"
|
|
@@ -1127,36 +1269,37 @@ const De = /* @__PURE__ */ q({
|
|
|
1127
1269
|
type: "string",
|
|
1128
1270
|
default: ""
|
|
1129
1271
|
}
|
|
1130
|
-
},
|
|
1272
|
+
}, Le = [
|
|
1131
1273
|
"id",
|
|
1132
1274
|
"type",
|
|
1133
1275
|
"component"
|
|
1134
|
-
],
|
|
1135
|
-
$schema:
|
|
1136
|
-
$id:
|
|
1137
|
-
title:
|
|
1138
|
-
description:
|
|
1139
|
-
type:
|
|
1140
|
-
properties:
|
|
1141
|
-
required:
|
|
1142
|
-
},
|
|
1276
|
+
], qe = {
|
|
1277
|
+
$schema: $e,
|
|
1278
|
+
$id: ke,
|
|
1279
|
+
title: Ne,
|
|
1280
|
+
description: Be,
|
|
1281
|
+
type: Fe,
|
|
1282
|
+
properties: Ue,
|
|
1283
|
+
required: Le
|
|
1284
|
+
}, Ge = {
|
|
1143
1285
|
id: { type: String },
|
|
1144
1286
|
component: { type: String, default: "" }
|
|
1145
|
-
},
|
|
1287
|
+
}, We = H(Ge, qe, R, I), Xe = {
|
|
1146
1288
|
install(r) {
|
|
1147
|
-
r.component(
|
|
1289
|
+
r.component(k.name, k);
|
|
1148
1290
|
},
|
|
1149
|
-
register(r, e, t,
|
|
1150
|
-
r.component =
|
|
1291
|
+
register(r, e, t, n) {
|
|
1292
|
+
r.component = k, e.component = J;
|
|
1151
1293
|
},
|
|
1152
1294
|
registerDesigner(r, e) {
|
|
1153
|
-
r.component =
|
|
1295
|
+
r.component = Ve, e.component = J, e["component-ref"] = We;
|
|
1154
1296
|
}
|
|
1155
1297
|
};
|
|
1156
1298
|
export {
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1299
|
+
k as Component,
|
|
1300
|
+
Ve as ComponentDesign,
|
|
1301
|
+
Qe as componentDesignProps,
|
|
1302
|
+
D as componentProps,
|
|
1303
|
+
Xe as default,
|
|
1304
|
+
J as propsResolver
|
|
1162
1305
|
};
|