@farris/ui-vue 1.2.5 → 1.2.7
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 +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +122 -131
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +216 -223
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +201 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +341 -338
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +3415 -3295
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2719 -2717
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +31 -40
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +23 -20
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +578 -584
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +287 -278
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1923 -1908
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +3719 -3604
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +483 -470
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +37 -34
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +258 -267
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1452 -1450
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4860 -4657
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4411 -4259
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +763 -741
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +948 -945
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +485 -466
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +437 -426
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +98 -107
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +840 -800
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +757 -760
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +3659 -3432
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +126 -135
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1400 -1379
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +97 -106
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +393 -402
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +124 -122
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +3531 -3412
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +2046 -2044
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12370 -11917
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +7 -3
- package/types/lookup/src/property-config/lookup.property-config.d.ts +31 -27
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/components/button-edit/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-canvas/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/flow-canvas/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,108 +1,108 @@
|
|
|
1
1
|
var Re = Object.defineProperty;
|
|
2
|
-
var Oe = (
|
|
3
|
-
var O = (
|
|
4
|
-
import { defineComponent as G, ref as B, computed as V, watch as Q, createVNode as
|
|
2
|
+
var Oe = (n, e, t) => e in n ? Re(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var O = (n, e, t) => Oe(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as G, ref as B, computed as V, watch as Q, createVNode as b, createTextVNode as Y, getCurrentInstance as be, onMounted as q, onUnmounted as se, inject as U, provide as Le, onBeforeUnmount as Ne, withModifiers as $e } from "vue";
|
|
5
5
|
import { cloneDeep as Ve } from "lodash-es";
|
|
6
6
|
import _e from "@farris/ui-vue/components/response-toolbar";
|
|
7
7
|
import { useDesignerInnerComponent as ve } from "@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component";
|
|
8
8
|
import { withInstall as Ue } from "@farris/ui-vue/components/common";
|
|
9
|
-
const
|
|
10
|
-
function ae(
|
|
11
|
-
const { properties: e, title: t } =
|
|
12
|
-
return
|
|
9
|
+
const ie = {}, Ce = {};
|
|
10
|
+
function ae(n) {
|
|
11
|
+
const { properties: e, title: t } = n, s = Object.keys(e).reduce((p, u) => (p[u] = e[u].type === "object" && e[u].properties ? ae(e[u]) : Ve(e[u].default), p), {});
|
|
12
|
+
return s.id = `${t}-${Date.now()}`, s;
|
|
13
13
|
}
|
|
14
|
-
function z(
|
|
15
|
-
const t =
|
|
14
|
+
function z(n, e = {}) {
|
|
15
|
+
const t = ie[n];
|
|
16
16
|
if (t) {
|
|
17
|
-
let
|
|
18
|
-
const p = Ce[
|
|
19
|
-
return
|
|
17
|
+
let s = ae(t);
|
|
18
|
+
const p = Ce[n];
|
|
19
|
+
return s = p ? p({ getSchemaByType: z }, s, e) : s, s;
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
function We(
|
|
23
|
+
function We(n, e) {
|
|
24
24
|
const t = ae(e);
|
|
25
|
-
return Object.keys(
|
|
25
|
+
return Object.keys(n).reduce((s, p) => (s[p] = n[p], s), t), t;
|
|
26
26
|
}
|
|
27
|
-
function ze(
|
|
28
|
-
return Object.keys(
|
|
27
|
+
function ze(n, e) {
|
|
28
|
+
return Object.keys(n).filter((s) => n[s] != null).reduce((s, p) => {
|
|
29
29
|
if (e.has(p)) {
|
|
30
|
-
const
|
|
31
|
-
if (typeof
|
|
32
|
-
|
|
30
|
+
const u = e.get(p);
|
|
31
|
+
if (typeof u == "string")
|
|
32
|
+
s[u] = n[p];
|
|
33
33
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(
|
|
34
|
+
const h = u(p, n[p], n);
|
|
35
|
+
Object.assign(s, h);
|
|
36
36
|
}
|
|
37
37
|
} else
|
|
38
|
-
|
|
39
|
-
return
|
|
38
|
+
s[p] = n[p];
|
|
39
|
+
return s;
|
|
40
40
|
}, {});
|
|
41
41
|
}
|
|
42
|
-
function He(
|
|
43
|
-
const
|
|
44
|
-
return ze(
|
|
42
|
+
function He(n, e, t = /* @__PURE__ */ new Map()) {
|
|
43
|
+
const s = We(n, e);
|
|
44
|
+
return ze(s, t);
|
|
45
45
|
}
|
|
46
|
-
function qe(
|
|
46
|
+
function qe(n = {}) {
|
|
47
47
|
function e(g, T, l, a) {
|
|
48
48
|
if (typeof l == "number")
|
|
49
49
|
return a[g].length === l;
|
|
50
50
|
if (typeof l == "object") {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return Number(a[g].length) !== Number(
|
|
54
|
-
if (
|
|
55
|
-
return Number(a[g].length) >= Number(
|
|
56
|
-
if (
|
|
57
|
-
return Number(a[g].length) <= Number(
|
|
51
|
+
const f = Object.keys(l)[0], i = l[f];
|
|
52
|
+
if (f === "not")
|
|
53
|
+
return Number(a[g].length) !== Number(i);
|
|
54
|
+
if (f === "moreThan")
|
|
55
|
+
return Number(a[g].length) >= Number(i);
|
|
56
|
+
if (f === "lessThan")
|
|
57
|
+
return Number(a[g].length) <= Number(i);
|
|
58
58
|
}
|
|
59
59
|
return !1;
|
|
60
60
|
}
|
|
61
61
|
function t(g, T, l, a) {
|
|
62
62
|
return a[g] && a[g].propertyValue && String(a[g].propertyValue.value) === String(l);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const s = /* @__PURE__ */ new Map([
|
|
65
65
|
["length", e],
|
|
66
66
|
["getProperty", t]
|
|
67
67
|
]);
|
|
68
|
-
Object.keys(
|
|
68
|
+
Object.keys(n).reduce((g, T) => (g.set(T, n[T]), g), s);
|
|
69
69
|
function p(g, T) {
|
|
70
70
|
const l = g;
|
|
71
71
|
return typeof T == "number" ? [{ target: l, operator: "length", param: null, value: Number(T) }] : typeof T == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!T }] : typeof T == "object" ? Object.keys(T).map((a) => {
|
|
72
72
|
if (a === "length")
|
|
73
73
|
return { target: l, operator: "length", param: null, value: T[a] };
|
|
74
|
-
const
|
|
75
|
-
return { target: l, operator: "getProperty", param:
|
|
74
|
+
const f = a, i = T[a];
|
|
75
|
+
return { target: l, operator: "getProperty", param: f, value: i };
|
|
76
76
|
}) : [];
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function u(g) {
|
|
79
79
|
return Object.keys(g).reduce((l, a) => {
|
|
80
|
-
const
|
|
81
|
-
return l.push(...
|
|
80
|
+
const f = p(a, g[a]);
|
|
81
|
+
return l.push(...f), l;
|
|
82
82
|
}, []);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
86
|
-
const l =
|
|
84
|
+
function h(g, T) {
|
|
85
|
+
if (s.has(g.operator)) {
|
|
86
|
+
const l = s.get(g.operator);
|
|
87
87
|
return l && l(g.target, g.param, g.value, T) || !1;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
91
|
function P(g, T) {
|
|
92
|
-
return
|
|
92
|
+
return u(g).reduce((f, i) => f && h(i, T), !0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
const l = Object.keys(g), a = l.includes("allOf"),
|
|
96
|
-
return a ? !
|
|
94
|
+
function k(g, T) {
|
|
95
|
+
const l = Object.keys(g), a = l.includes("allOf"), f = l.includes("anyOf"), i = a || f, M = (i ? g[i ? a ? "allOf" : "anyOf" : "allOf"] : [g]).map((S) => P(S, T));
|
|
96
|
+
return a ? !M.includes(!1) : M.includes(!0);
|
|
97
97
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
98
|
+
return { parseValueSchema: k };
|
|
99
99
|
}
|
|
100
100
|
const E = {
|
|
101
101
|
Button: { type: "Button", name: "按钮", icon: "Button" },
|
|
102
102
|
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
104
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "工具栏项", icon: "Button" },
|
|
105
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
106
106
|
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
107
107
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
108
108
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
@@ -129,15 +129,15 @@ const E = {
|
|
|
129
129
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
130
130
|
Panel: { type: "Panel", name: "面板", icon: "ContentContainer" },
|
|
131
131
|
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
132
|
-
|
|
132
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
133
133
|
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
134
134
|
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
135
135
|
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
136
136
|
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
137
137
|
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
138
138
|
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
140
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
141
141
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
142
142
|
Tag: { type: "Tag", name: "Tag", icon: "Tag" },
|
|
143
143
|
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
@@ -146,7 +146,7 @@ const E = {
|
|
|
146
146
|
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
147
147
|
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
148
148
|
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
149
|
-
|
|
149
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
150
150
|
SectionToolbar: { type: "SectionToolbar", name: "分组面板工具栏" },
|
|
151
151
|
SectionToolbarItem: { type: "SectionToolbarItem", name: "分组面板按钮" },
|
|
152
152
|
QueryScheme: { type: "QueryScheme", name: "筛选方案", icon: "QueryScheme" },
|
|
@@ -176,7 +176,7 @@ const E = {
|
|
|
176
176
|
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
177
177
|
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
178
178
|
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
179
|
-
|
|
179
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
180
180
|
ModalFooter: { type: "ModalFooter", name: "弹窗页脚", icon: "ModalFooter" },
|
|
181
181
|
ScrollCollapsibleArea: { type: "ScrollCollapsibleArea", name: "滚动收折区域", icon: "ScrollCollapsibleArea" },
|
|
182
182
|
PersonnelSelector: { type: "PersonnelSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
@@ -210,16 +210,16 @@ const E = {
|
|
|
210
210
|
/** 审批类 end */
|
|
211
211
|
}, we = {}, Ge = {};
|
|
212
212
|
qe();
|
|
213
|
-
function ce(
|
|
214
|
-
return
|
|
215
|
-
const P = He(
|
|
216
|
-
return Object.assign(
|
|
213
|
+
function ce(n, e, t = /* @__PURE__ */ new Map(), s = (h, P, k) => P, p = {}, u = (h) => h) {
|
|
214
|
+
return ie[e.title] = e, Ce[e.title] = s, we[e.title] = p, Ge[e.title] = u, (h = {}) => {
|
|
215
|
+
const P = He(h, e, t), k = Object.keys(n).reduce((g, T) => (g[T] = n[T].default, g), {});
|
|
216
|
+
return Object.assign(k, P);
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
function Qe(
|
|
219
|
+
function Qe(n, e) {
|
|
220
220
|
return { customClass: e.class, customStyle: e.style };
|
|
221
221
|
}
|
|
222
|
-
function Xe(
|
|
222
|
+
function Xe(n, e) {
|
|
223
223
|
return { buttons: e.buttons };
|
|
224
224
|
}
|
|
225
225
|
const Ye = /* @__PURE__ */ new Map([
|
|
@@ -301,7 +301,7 @@ const Ye = /* @__PURE__ */ new Map([
|
|
|
301
301
|
buttonClass: {
|
|
302
302
|
description: "",
|
|
303
303
|
type: "string",
|
|
304
|
-
default: ""
|
|
304
|
+
default: "col-6"
|
|
305
305
|
},
|
|
306
306
|
titleContentClass: {
|
|
307
307
|
description: "",
|
|
@@ -341,7 +341,7 @@ const Ye = /* @__PURE__ */ new Map([
|
|
|
341
341
|
type: tt,
|
|
342
342
|
properties: nt
|
|
343
343
|
};
|
|
344
|
-
function rt(
|
|
344
|
+
function rt(n, e, t) {
|
|
345
345
|
return e.title = "标题", e;
|
|
346
346
|
}
|
|
347
347
|
const le = {
|
|
@@ -373,123 +373,125 @@ const le = {
|
|
|
373
373
|
prePaginationDisabled: { type: Boolean, default: !0 },
|
|
374
374
|
/** 向后翻页是否禁用 */
|
|
375
375
|
nextPaginationDisabled: { type: Boolean, default: !1 }
|
|
376
|
-
},
|
|
376
|
+
}, st = Object.assign({}, le, {
|
|
377
|
+
componentId: { type: String, default: "" }
|
|
378
|
+
}), fe = ce(le, ot, Ye, rt), ne = /* @__PURE__ */ G({
|
|
377
379
|
name: "FPageHeader",
|
|
378
380
|
props: le,
|
|
379
381
|
emits: ["Click", "PrePaginationClick", "NextPaginationClick"],
|
|
380
|
-
setup(
|
|
381
|
-
const t = B(
|
|
382
|
-
e.emit("Click", S);
|
|
382
|
+
setup(n, e) {
|
|
383
|
+
const t = B(n.buttons), s = (S, A) => {
|
|
384
|
+
e.emit("Click", S, A);
|
|
383
385
|
};
|
|
384
|
-
function p(S,
|
|
385
|
-
S &&
|
|
386
|
+
function p(S, A) {
|
|
387
|
+
S && A && A.split(" ").reduce((v, m) => (v[m] = !0, v), S);
|
|
386
388
|
}
|
|
387
|
-
const
|
|
389
|
+
const u = V(() => {
|
|
388
390
|
const S = {
|
|
389
391
|
"f-page-header": !0
|
|
390
392
|
};
|
|
391
|
-
return p(S,
|
|
392
|
-
}),
|
|
393
|
+
return p(S, n.customClass), S;
|
|
394
|
+
}), h = V(() => {
|
|
393
395
|
const S = {
|
|
394
396
|
"f-title-icon": !0
|
|
395
397
|
};
|
|
396
|
-
return p(S,
|
|
398
|
+
return p(S, n.iconClass), S;
|
|
397
399
|
}), P = V(() => {
|
|
398
400
|
const S = {
|
|
399
401
|
"f-icon": !0
|
|
400
402
|
};
|
|
401
|
-
return p(S,
|
|
402
|
-
}),
|
|
403
|
+
return p(S, n.icon), S;
|
|
404
|
+
}), k = V(() => {
|
|
403
405
|
const S = {
|
|
404
406
|
"f-title": !0
|
|
405
407
|
};
|
|
406
|
-
return p(S,
|
|
408
|
+
return p(S, n.titleContentClass), S;
|
|
407
409
|
}), g = V(() => {
|
|
408
410
|
const S = {
|
|
409
411
|
"f-content": !0
|
|
410
412
|
};
|
|
411
|
-
return p(S,
|
|
413
|
+
return p(S, n.contentClass), S;
|
|
412
414
|
}), T = V(() => {
|
|
413
415
|
const S = {
|
|
414
416
|
"f-content": !0
|
|
415
417
|
};
|
|
416
|
-
return p(S,
|
|
418
|
+
return p(S, n.downContentClass), S;
|
|
417
419
|
}), l = V(() => ({
|
|
418
420
|
"f-icon f-icon-arrow-w": !0,
|
|
419
|
-
"f-state-disabled":
|
|
421
|
+
"f-state-disabled": n.prePaginationDisabled
|
|
420
422
|
})), a = V(() => ({
|
|
421
423
|
"f-icon f-icon-arrow-e": !0,
|
|
422
|
-
"f-state-disabled":
|
|
424
|
+
"f-state-disabled": n.nextPaginationDisabled
|
|
423
425
|
}));
|
|
424
|
-
function
|
|
425
|
-
|
|
426
|
+
function f(S) {
|
|
427
|
+
n.prePaginationDisabled || e.emit("PrePaginationClick", S);
|
|
426
428
|
}
|
|
427
|
-
function
|
|
428
|
-
|
|
429
|
+
function i(S) {
|
|
430
|
+
n.nextPaginationDisabled || e.emit("NextPaginationClick", S);
|
|
429
431
|
}
|
|
430
|
-
function
|
|
431
|
-
return e.slots.titleContent ?
|
|
432
|
-
class:
|
|
433
|
-
}, [Y(" "), e.slots.titleContent()]) :
|
|
432
|
+
function C() {
|
|
433
|
+
return e.slots.titleContent ? b("div", {
|
|
434
|
+
class: k.value
|
|
435
|
+
}, [Y(" "), e.slots.titleContent()]) : b("div", {
|
|
434
436
|
class: "f-title"
|
|
435
|
-
}, [
|
|
436
|
-
class:
|
|
437
|
-
}, [
|
|
437
|
+
}, [n.showIcon && n.icon ? b("span", {
|
|
438
|
+
class: h.value
|
|
439
|
+
}, [b("i", {
|
|
438
440
|
class: P.value
|
|
439
|
-
}, null)]) : "",
|
|
441
|
+
}, null)]) : "", b("h4", {
|
|
440
442
|
class: "f-title-text"
|
|
441
|
-
}, [
|
|
443
|
+
}, [n.title]), n.subTitle ? b("h5", {
|
|
442
444
|
class: "f-title-subtitle"
|
|
443
|
-
}, [
|
|
445
|
+
}, [n.subTitle]) : "", n.showPagination ? b("div", {
|
|
444
446
|
class: "f-title-pagination"
|
|
445
|
-
}, [
|
|
447
|
+
}, [b("span", {
|
|
446
448
|
class: l.value,
|
|
447
|
-
onClick:
|
|
448
|
-
}, null),
|
|
449
|
+
onClick: f
|
|
450
|
+
}, null), b("span", {
|
|
449
451
|
class: a.value,
|
|
450
|
-
onClick:
|
|
452
|
+
onClick: i
|
|
451
453
|
}, null)]) : ""]);
|
|
452
454
|
}
|
|
453
455
|
function w() {
|
|
454
|
-
return e.slots.content ?
|
|
456
|
+
return e.slots.content ? b("div", {
|
|
455
457
|
class: g.value
|
|
456
458
|
}, [Y(" "), e.slots.content()]) : "";
|
|
457
459
|
}
|
|
458
|
-
function
|
|
459
|
-
if (
|
|
460
|
-
return
|
|
461
|
-
customClass:
|
|
460
|
+
function M() {
|
|
461
|
+
if (n.buttons && n.buttons.length > 0)
|
|
462
|
+
return b(_e, {
|
|
463
|
+
customClass: n.buttonClass,
|
|
462
464
|
items: t.value,
|
|
463
|
-
onClick:
|
|
465
|
+
onClick: s
|
|
464
466
|
}, null);
|
|
465
467
|
}
|
|
466
468
|
function R() {
|
|
467
|
-
return e.slots.downContent ?
|
|
469
|
+
return e.slots.downContent ? b("div", {
|
|
468
470
|
class: T.value
|
|
469
471
|
}, [Y(" "), e.slots.downContent()]) : "";
|
|
470
472
|
}
|
|
471
|
-
return Q(() =>
|
|
473
|
+
return Q(() => n.buttons, (S) => {
|
|
472
474
|
t.value = S;
|
|
473
475
|
}, {
|
|
474
476
|
deep: !0
|
|
475
|
-
}), () =>
|
|
476
|
-
class:
|
|
477
|
-
}, [
|
|
477
|
+
}), () => b("div", {
|
|
478
|
+
class: u.value
|
|
479
|
+
}, [b("nav", {
|
|
478
480
|
class: "f-page-header-base"
|
|
479
|
-
}, [
|
|
481
|
+
}, [C(), w(), M()]), R()]);
|
|
480
482
|
}
|
|
481
483
|
});
|
|
482
|
-
function it(
|
|
484
|
+
function it(n, e, t) {
|
|
483
485
|
var L;
|
|
484
|
-
function
|
|
486
|
+
function s() {
|
|
485
487
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
486
488
|
}
|
|
487
|
-
|
|
488
|
-
const p = t && t.getStyles && t.getStyles() || "",
|
|
489
|
+
s();
|
|
490
|
+
const p = t && t.getStyles && t.getStyles() || "", u = t && t.getDesignerClass && t.getDesignerClass() || "", h = B();
|
|
489
491
|
function P() {
|
|
490
492
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
491
493
|
}
|
|
492
|
-
function
|
|
494
|
+
function k() {
|
|
493
495
|
return !1;
|
|
494
496
|
}
|
|
495
497
|
function g() {
|
|
@@ -498,79 +500,80 @@ function it(o, e, t) {
|
|
|
498
500
|
function T() {
|
|
499
501
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
500
502
|
}
|
|
501
|
-
function l(
|
|
502
|
-
if (!
|
|
503
|
+
function l(v) {
|
|
504
|
+
if (!v || !v.value)
|
|
503
505
|
return null;
|
|
504
|
-
if (
|
|
505
|
-
return
|
|
506
|
-
const
|
|
506
|
+
if (v.value.schema && v.value.schema.type === "component")
|
|
507
|
+
return v.value;
|
|
508
|
+
const m = B(v == null ? void 0 : v.value.parent), D = l(m);
|
|
507
509
|
return D || null;
|
|
508
510
|
}
|
|
509
|
-
function a(
|
|
510
|
-
const { componentInstance:
|
|
511
|
-
return !
|
|
511
|
+
function a(v = e) {
|
|
512
|
+
const { componentInstance: m, designerItemElementRef: D } = v;
|
|
513
|
+
return !m || !m.value ? null : m.value.canMove ? D : a(v.parent);
|
|
512
514
|
}
|
|
513
|
-
function
|
|
514
|
-
return !!t && t.canAccepts(
|
|
515
|
+
function f(v) {
|
|
516
|
+
return !!t && t.canAccepts(v);
|
|
515
517
|
}
|
|
516
|
-
function
|
|
518
|
+
function i() {
|
|
517
519
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
518
520
|
}
|
|
519
|
-
function
|
|
521
|
+
function C() {
|
|
520
522
|
}
|
|
521
|
-
function w(
|
|
522
|
-
|
|
523
|
+
function w(v, m) {
|
|
524
|
+
m && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(m);
|
|
523
525
|
}
|
|
524
|
-
function
|
|
525
|
-
const { componentType:
|
|
526
|
-
let D = z(
|
|
527
|
-
t && t.onResolveNewComponentSchema && (D = t.onResolveNewComponentSchema(
|
|
528
|
-
const j =
|
|
529
|
-
return D && !D.id && D.type ===
|
|
526
|
+
function M(v) {
|
|
527
|
+
const { componentType: m } = v;
|
|
528
|
+
let D = z(m, v);
|
|
529
|
+
t && t.onResolveNewComponentSchema && (D = t.onResolveNewComponentSchema(v, D));
|
|
530
|
+
const j = m.toLowerCase().replace("-", "_");
|
|
531
|
+
return D && !D.id && D.type === m && (D.id = `${j}_${Math.random().toString().slice(2, 6)}`), D;
|
|
530
532
|
}
|
|
531
|
-
function R(
|
|
532
|
-
const D = String(
|
|
533
|
-
d.parentComponentInstance =
|
|
533
|
+
function R(v, m) {
|
|
534
|
+
const D = String(v.getAttribute("data-controltype")), j = v.getAttribute("data-feature"), d = j ? JSON.parse(j) : {};
|
|
535
|
+
d.parentComponentInstance = h.value;
|
|
534
536
|
let r = z(D, d);
|
|
535
|
-
t && t.onAcceptNewChildElement && (r = t.onAcceptNewChildElement(
|
|
536
|
-
const
|
|
537
|
-
return r && !r.id && r.type === D && (r.id = `${
|
|
537
|
+
t && t.onAcceptNewChildElement && (r = t.onAcceptNewChildElement(v, m, r));
|
|
538
|
+
const o = D.toLowerCase().replace("-", "_");
|
|
539
|
+
return r && !r.id && r.type === D && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
|
|
538
540
|
}
|
|
539
|
-
function S(
|
|
541
|
+
function S(v) {
|
|
540
542
|
}
|
|
541
|
-
function
|
|
543
|
+
function A(...v) {
|
|
542
544
|
if (t && t.getPropsConfig)
|
|
543
|
-
return t.getPropsConfig(...
|
|
545
|
+
return t.getPropsConfig(...v);
|
|
544
546
|
}
|
|
545
|
-
return
|
|
547
|
+
return h.value = {
|
|
546
548
|
canMove: P(),
|
|
547
|
-
canSelectParent:
|
|
549
|
+
canSelectParent: k(),
|
|
548
550
|
canDelete: g(),
|
|
549
551
|
canNested: !T(),
|
|
550
552
|
contents: e == null ? void 0 : e.schema.contents,
|
|
551
|
-
elementRef:
|
|
553
|
+
elementRef: n,
|
|
552
554
|
parent: (L = e == null ? void 0 : e.parent) == null ? void 0 : L.componentInstance,
|
|
553
555
|
schema: e == null ? void 0 : e.schema,
|
|
554
556
|
styles: p,
|
|
555
|
-
designerClass:
|
|
556
|
-
canAccepts:
|
|
557
|
+
designerClass: u,
|
|
558
|
+
canAccepts: f,
|
|
557
559
|
getBelongedComponentInstance: l,
|
|
558
560
|
getDraggableDesignItemElement: a,
|
|
559
|
-
getDraggingDisplayText:
|
|
560
|
-
getPropConfig:
|
|
561
|
-
getDragScopeElement:
|
|
561
|
+
getDraggingDisplayText: i,
|
|
562
|
+
getPropConfig: A,
|
|
563
|
+
getDragScopeElement: C,
|
|
562
564
|
onAcceptMovedChildElement: w,
|
|
563
565
|
onAcceptNewChildElement: R,
|
|
564
566
|
onChildElementMovedOut: S,
|
|
565
|
-
addNewChildComponentSchema:
|
|
566
|
-
updateDragAndDropRules:
|
|
567
|
+
addNewChildComponentSchema: M,
|
|
568
|
+
updateDragAndDropRules: s,
|
|
567
569
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || B(!1),
|
|
568
570
|
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || B(!1)
|
|
569
|
-
},
|
|
571
|
+
}, h;
|
|
570
572
|
}
|
|
571
573
|
class Te {
|
|
572
574
|
static getEditorTypesByMDataType(e) {
|
|
573
|
-
|
|
575
|
+
const t = this.fieldControlTypeMapping[e];
|
|
576
|
+
return t || [{ key: "", value: "" }];
|
|
574
577
|
}
|
|
575
578
|
}
|
|
576
579
|
/**
|
|
@@ -642,20 +645,25 @@ class J {
|
|
|
642
645
|
O(this, "designViewModelField");
|
|
643
646
|
O(this, "controlCreatorUtils");
|
|
644
647
|
O(this, "designerHostService");
|
|
648
|
+
O(this, "schemaService", null);
|
|
645
649
|
O(this, "metadataService", null);
|
|
646
650
|
O(this, "propertyConfig", {
|
|
647
651
|
type: "object",
|
|
648
652
|
categories: {}
|
|
649
653
|
});
|
|
650
|
-
var
|
|
651
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((
|
|
654
|
+
var s;
|
|
655
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((s = this.formSchemaUtils) == null ? void 0 : s.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
656
|
+
}
|
|
657
|
+
getTableInfo() {
|
|
658
|
+
var e;
|
|
659
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
652
660
|
}
|
|
653
661
|
setDesignViewModelField(e) {
|
|
654
662
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
655
663
|
if (t) {
|
|
656
664
|
if (!this.designViewModelField) {
|
|
657
|
-
const
|
|
658
|
-
this.designViewModelField =
|
|
665
|
+
const s = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
666
|
+
this.designViewModelField = s.fields.find((p) => p.id === t);
|
|
659
667
|
}
|
|
660
668
|
e.updateOn = this.designViewModelField.updateOn;
|
|
661
669
|
}
|
|
@@ -663,6 +671,7 @@ class J {
|
|
|
663
671
|
changeFieldEditorType(e, t) {
|
|
664
672
|
}
|
|
665
673
|
getBasicPropConfig(e) {
|
|
674
|
+
var s, p;
|
|
666
675
|
var t = this;
|
|
667
676
|
return this.setDesignViewModelField(e), {
|
|
668
677
|
description: "Basic Information",
|
|
@@ -684,7 +693,8 @@ class J {
|
|
|
684
693
|
type: "combo-list",
|
|
685
694
|
textField: "value",
|
|
686
695
|
valueField: "key",
|
|
687
|
-
data: Te.getEditorTypesByMDataType(t.designViewModelField.type.name)
|
|
696
|
+
data: Te.getEditorTypesByMDataType(((p = (s = t.designViewModelField) == null ? void 0 : s.type) == null ? void 0 : p.name) || ""),
|
|
697
|
+
editable: !1
|
|
688
698
|
}
|
|
689
699
|
},
|
|
690
700
|
label: {
|
|
@@ -693,11 +703,11 @@ class J {
|
|
|
693
703
|
$converter: "/converter/form-group-label.converter"
|
|
694
704
|
}
|
|
695
705
|
},
|
|
696
|
-
setPropertyRelates(
|
|
697
|
-
if (
|
|
698
|
-
switch (
|
|
706
|
+
setPropertyRelates(u, h) {
|
|
707
|
+
if (u)
|
|
708
|
+
switch (u && u.propertyID) {
|
|
699
709
|
case "type": {
|
|
700
|
-
t.changeControlType(e,
|
|
710
|
+
t.changeControlType(e, u);
|
|
701
711
|
break;
|
|
702
712
|
}
|
|
703
713
|
}
|
|
@@ -710,34 +720,34 @@ class J {
|
|
|
710
720
|
* @param newControlType 新控件类型
|
|
711
721
|
*/
|
|
712
722
|
changeControlType(e, t) {
|
|
713
|
-
var g, T, l, a,
|
|
714
|
-
const
|
|
715
|
-
let
|
|
716
|
-
if (!
|
|
723
|
+
var g, T, l, a, f;
|
|
724
|
+
const s = t.propertyValue, p = this.formSchemaUtils.getComponentById(this.componentId);
|
|
725
|
+
let u = this.getControlParentContainer(e.id, p);
|
|
726
|
+
if (!u)
|
|
717
727
|
return;
|
|
718
|
-
const
|
|
719
|
-
let
|
|
728
|
+
const h = u.contents.findIndex((i) => i.id === e.id), P = u.contents[h];
|
|
729
|
+
let k;
|
|
720
730
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
721
731
|
editor: {
|
|
722
|
-
$type:
|
|
732
|
+
$type: s
|
|
723
733
|
},
|
|
724
734
|
name: this.designViewModelField.name,
|
|
725
735
|
require: this.designViewModelField.require,
|
|
726
736
|
readonly: this.designViewModelField.readonly
|
|
727
|
-
}, !1),
|
|
737
|
+
}, !1), k = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, s)), Object.assign(k, {
|
|
728
738
|
id: P.id,
|
|
729
739
|
appearance: P.appearance,
|
|
730
740
|
size: P.size,
|
|
731
741
|
label: P.label
|
|
732
|
-
}), Object.assign(
|
|
733
|
-
isTextArea:
|
|
734
|
-
type:
|
|
742
|
+
}), Object.assign(k.editor, {
|
|
743
|
+
isTextArea: k.isTextArea && P.isTextArea,
|
|
744
|
+
type: s || "",
|
|
735
745
|
placeHolder: (g = P.editor) == null ? void 0 : g.placeHolder,
|
|
736
746
|
holdPlace: (T = P.editor) == null ? void 0 : T.holdPlace,
|
|
737
747
|
readonly: (l = P.editor) == null ? void 0 : l.readonly,
|
|
738
748
|
require: (a = P.editor) == null ? void 0 : a.require,
|
|
739
|
-
visible: (
|
|
740
|
-
}),
|
|
749
|
+
visible: (f = P.editor) == null ? void 0 : f.visible
|
|
750
|
+
}), u.contents.splice(h, 1, k);
|
|
741
751
|
}
|
|
742
752
|
getAppearanceConfig(e = null) {
|
|
743
753
|
return {
|
|
@@ -775,39 +785,18 @@ class J {
|
|
|
775
785
|
* @param domJson 容器
|
|
776
786
|
*/
|
|
777
787
|
getControlParentContainer(e, t) {
|
|
778
|
-
let
|
|
788
|
+
let s;
|
|
779
789
|
if (!t || !t.contents || t.contents.length === 0)
|
|
780
790
|
return null;
|
|
781
791
|
for (const p of t.contents) {
|
|
782
792
|
if (p.id === e)
|
|
783
|
-
return
|
|
784
|
-
if (
|
|
785
|
-
return
|
|
793
|
+
return s = t, t;
|
|
794
|
+
if (s = this.getControlParentContainer(e, p), s)
|
|
795
|
+
return s;
|
|
786
796
|
}
|
|
787
797
|
}
|
|
788
|
-
getBindingFieldEditorOptions(e) {
|
|
789
|
-
const t = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
790
|
-
return {
|
|
791
|
-
type: "field-selector",
|
|
792
|
-
bindingType: { enable: !1 },
|
|
793
|
-
editorParams: {
|
|
794
|
-
propertyData: e,
|
|
795
|
-
formBasicInfo: t
|
|
796
|
-
},
|
|
797
|
-
columns: [
|
|
798
|
-
{ field: "name", title: "字段名称" },
|
|
799
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
800
|
-
{ field: "fieldType", title: "字段类型" }
|
|
801
|
-
],
|
|
802
|
-
beforeOpenDialog: (i) => {
|
|
803
|
-
const p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
804
|
-
i.instance.loadData(p);
|
|
805
|
-
},
|
|
806
|
-
textField: "bindingField"
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
798
|
}
|
|
810
|
-
class
|
|
799
|
+
class at extends J {
|
|
811
800
|
constructor(e, t) {
|
|
812
801
|
super(e, t);
|
|
813
802
|
}
|
|
@@ -831,7 +820,9 @@ class st extends J {
|
|
|
831
820
|
description: "The type of a component.",
|
|
832
821
|
editor: {
|
|
833
822
|
type: "combo-list",
|
|
834
|
-
|
|
823
|
+
textField: "value",
|
|
824
|
+
valueField: "key",
|
|
825
|
+
data: [{ key: "page-header", value: E["page-header"].name }]
|
|
835
826
|
}
|
|
836
827
|
},
|
|
837
828
|
icon: {
|
|
@@ -871,7 +862,7 @@ class st extends J {
|
|
|
871
862
|
label: "click",
|
|
872
863
|
name: "点击事件"
|
|
873
864
|
}
|
|
874
|
-
],
|
|
865
|
+
], s = this, p = s.eventsEditorUtils.formProperties(e, s.viewModelId, t);
|
|
875
866
|
this.propertyConfig.categories.eventsEditor = {
|
|
876
867
|
title: "事件",
|
|
877
868
|
hideTitle: !0,
|
|
@@ -887,26 +878,26 @@ class st extends J {
|
|
|
887
878
|
refreshPanelAfterChanged: !0,
|
|
888
879
|
tabId: "commands",
|
|
889
880
|
tabName: "交互",
|
|
890
|
-
setPropertyRelates(
|
|
891
|
-
const P =
|
|
892
|
-
delete e[
|
|
881
|
+
setPropertyRelates(u, h) {
|
|
882
|
+
const P = u.propertyValue;
|
|
883
|
+
delete e[s.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, P.events, P));
|
|
893
884
|
}
|
|
894
885
|
};
|
|
895
886
|
}
|
|
896
887
|
}
|
|
897
|
-
function
|
|
898
|
-
function t(
|
|
888
|
+
function ct(n, e) {
|
|
889
|
+
function t(u) {
|
|
899
890
|
return !1;
|
|
900
891
|
}
|
|
901
|
-
function
|
|
892
|
+
function s() {
|
|
902
893
|
return !0;
|
|
903
894
|
}
|
|
904
|
-
function p(
|
|
905
|
-
return new
|
|
895
|
+
function p(u) {
|
|
896
|
+
return new at(u, e).getPropertyConfig(n);
|
|
906
897
|
}
|
|
907
898
|
return {
|
|
908
899
|
canAccepts: t,
|
|
909
|
-
hideNestedPaddingInDesginerView:
|
|
900
|
+
hideNestedPaddingInDesginerView: s,
|
|
910
901
|
getPropsConfig: p
|
|
911
902
|
};
|
|
912
903
|
}
|
|
@@ -955,8 +946,8 @@ class Se {
|
|
|
955
946
|
"tipsText",
|
|
956
947
|
"onClick"
|
|
957
948
|
];
|
|
958
|
-
Object.keys(e).filter((
|
|
959
|
-
this[
|
|
949
|
+
Object.keys(e).filter((s) => t.indexOf(s) > -1).forEach((s) => {
|
|
950
|
+
this[s] = e[s];
|
|
960
951
|
});
|
|
961
952
|
}
|
|
962
953
|
/** 是否可用 */
|
|
@@ -972,19 +963,19 @@ class Se {
|
|
|
972
963
|
return this.visible ? this.width : !1;
|
|
973
964
|
}
|
|
974
965
|
}
|
|
975
|
-
class
|
|
966
|
+
class lt extends Se {
|
|
976
967
|
constructor(e) {
|
|
977
968
|
super(e);
|
|
978
969
|
}
|
|
979
970
|
}
|
|
980
971
|
function Pe() {
|
|
981
|
-
function
|
|
972
|
+
function n(e) {
|
|
982
973
|
const t = [];
|
|
983
|
-
return e.reduce((
|
|
974
|
+
return e.reduce((s, p) => (p.children && p.children.length > 0 ? s.push(new X(p)) : s.push(new lt(p)), s), t), t;
|
|
984
975
|
}
|
|
985
|
-
return { buildResponseToolbarItems:
|
|
976
|
+
return { buildResponseToolbarItems: n };
|
|
986
977
|
}
|
|
987
|
-
const { buildResponseToolbarItems:
|
|
978
|
+
const { buildResponseToolbarItems: pt } = Pe();
|
|
988
979
|
class X extends Se {
|
|
989
980
|
constructor(t) {
|
|
990
981
|
super(t);
|
|
@@ -998,19 +989,19 @@ class X extends Se {
|
|
|
998
989
|
O(this, "split", !1);
|
|
999
990
|
O(this, "children", []);
|
|
1000
991
|
O(this, "expanded", !1);
|
|
1001
|
-
const
|
|
1002
|
-
Object.keys(t).filter((p) =>
|
|
992
|
+
const s = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
993
|
+
Object.keys(t).filter((p) => s.indexOf(p) > -1).forEach((p) => {
|
|
1003
994
|
this[p] = t[p];
|
|
1004
|
-
}), t.children && t.children.length && (this.children =
|
|
995
|
+
}), t.children && t.children.length && (this.children = pt(t.children));
|
|
1005
996
|
}
|
|
1006
997
|
}
|
|
1007
998
|
const De = /* @__PURE__ */ new Map([
|
|
1008
999
|
["buttons", "items"]
|
|
1009
1000
|
]);
|
|
1010
|
-
function
|
|
1001
|
+
function ke(n, e, t) {
|
|
1011
1002
|
return e;
|
|
1012
1003
|
}
|
|
1013
|
-
const
|
|
1004
|
+
const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-design.gitee.io/response-toolbar.schema.json", ft = "response-toolbar", mt = "A Farris Toolbar Component", gt = "object", yt = {
|
|
1014
1005
|
id: {
|
|
1015
1006
|
description: "The unique identifier for a Response Toolbar",
|
|
1016
1007
|
type: "string"
|
|
@@ -1043,19 +1034,19 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
1043
1034
|
type: "array",
|
|
1044
1035
|
default: []
|
|
1045
1036
|
}
|
|
1046
|
-
},
|
|
1037
|
+
}, ht = [
|
|
1047
1038
|
"id",
|
|
1048
1039
|
"type",
|
|
1049
1040
|
"buttons"
|
|
1050
|
-
],
|
|
1051
|
-
$schema:
|
|
1052
|
-
$id:
|
|
1053
|
-
title:
|
|
1054
|
-
description:
|
|
1055
|
-
type:
|
|
1056
|
-
properties:
|
|
1057
|
-
required:
|
|
1058
|
-
},
|
|
1041
|
+
], bt = {
|
|
1042
|
+
$schema: dt,
|
|
1043
|
+
$id: ut,
|
|
1044
|
+
title: ft,
|
|
1045
|
+
description: mt,
|
|
1046
|
+
type: gt,
|
|
1047
|
+
properties: yt,
|
|
1048
|
+
required: ht
|
|
1049
|
+
}, vt = "https://json-schema.org/draft/2020-12/schema", Ct = "https://farris-design.gitee.io/response-toolbar-item.schema.json", wt = "response-toolbar-item", Tt = "A Farris Toolbar Item Component", St = "object", Pt = {
|
|
1059
1050
|
id: {
|
|
1060
1051
|
description: "The unique identifier for a Response Toolbar",
|
|
1061
1052
|
type: "string"
|
|
@@ -1088,24 +1079,24 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
1088
1079
|
type: "string",
|
|
1089
1080
|
default: ""
|
|
1090
1081
|
},
|
|
1091
|
-
|
|
1082
|
+
click: {
|
|
1092
1083
|
description: "The event of response toolbar item.",
|
|
1093
1084
|
type: "string",
|
|
1094
1085
|
default: ""
|
|
1095
1086
|
}
|
|
1096
|
-
},
|
|
1087
|
+
}, Dt = [
|
|
1097
1088
|
"id",
|
|
1098
1089
|
"type",
|
|
1099
1090
|
"text"
|
|
1100
1091
|
], re = {
|
|
1101
|
-
$schema:
|
|
1102
|
-
$id:
|
|
1103
|
-
title:
|
|
1104
|
-
description:
|
|
1105
|
-
type:
|
|
1106
|
-
properties:
|
|
1107
|
-
required:
|
|
1108
|
-
},
|
|
1092
|
+
$schema: vt,
|
|
1093
|
+
$id: Ct,
|
|
1094
|
+
title: wt,
|
|
1095
|
+
description: Tt,
|
|
1096
|
+
type: St,
|
|
1097
|
+
properties: Pt,
|
|
1098
|
+
required: Dt
|
|
1099
|
+
}, kt = "response-toolbar-item", Mt = "A Farris Container Component", xt = "object", Et = {
|
|
1109
1100
|
basic: {
|
|
1110
1101
|
title: "基本信息",
|
|
1111
1102
|
description: "Basic Infomation",
|
|
@@ -1139,10 +1130,10 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
1139
1130
|
}
|
|
1140
1131
|
}
|
|
1141
1132
|
}, me = {
|
|
1142
|
-
title:
|
|
1133
|
+
title: kt,
|
|
1143
1134
|
description: Mt,
|
|
1144
1135
|
type: xt,
|
|
1145
|
-
categories:
|
|
1136
|
+
categories: Et
|
|
1146
1137
|
}, pe = {
|
|
1147
1138
|
/** 组件自定义样式 */
|
|
1148
1139
|
customClass: { type: String, default: "" },
|
|
@@ -1152,49 +1143,52 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
1152
1143
|
default: []
|
|
1153
1144
|
}
|
|
1154
1145
|
};
|
|
1155
|
-
|
|
1146
|
+
ie[re.title] = re;
|
|
1156
1147
|
we[me.title] = me;
|
|
1157
|
-
const
|
|
1148
|
+
const Bt = Object.assign({}, pe, {
|
|
1149
|
+
componentId: { type: String, default: "" }
|
|
1150
|
+
}), de = ce(
|
|
1158
1151
|
pe,
|
|
1159
|
-
|
|
1152
|
+
bt,
|
|
1160
1153
|
De,
|
|
1161
|
-
|
|
1162
|
-
),
|
|
1154
|
+
ke
|
|
1155
|
+
), Me = {
|
|
1163
1156
|
id: { type: String, default: "" },
|
|
1164
1157
|
items: { type: Object, default: {} },
|
|
1165
1158
|
text: { type: String, default: "" },
|
|
1166
1159
|
disabled: { type: Boolean, default: !1 },
|
|
1167
|
-
icon: { type: String, default: "" }
|
|
1168
|
-
|
|
1169
|
-
|
|
1160
|
+
icon: { type: String, default: "" },
|
|
1161
|
+
componentId: { type: String, default: "" }
|
|
1162
|
+
}, jt = ce(
|
|
1163
|
+
Me,
|
|
1170
1164
|
re,
|
|
1171
1165
|
De,
|
|
1172
|
-
|
|
1166
|
+
ke
|
|
1173
1167
|
);
|
|
1174
|
-
function
|
|
1175
|
-
function
|
|
1176
|
-
const
|
|
1168
|
+
function xe() {
|
|
1169
|
+
function n(t) {
|
|
1170
|
+
const s = {
|
|
1177
1171
|
"f-icon": !0
|
|
1178
1172
|
};
|
|
1179
1173
|
if (t.icon) {
|
|
1180
1174
|
const p = t.icon.trim().split(" ");
|
|
1181
|
-
p && p.length && p.reduce((
|
|
1175
|
+
p && p.length && p.reduce((u, h) => (u[h] = !0, u), s);
|
|
1182
1176
|
}
|
|
1183
|
-
return
|
|
1177
|
+
return s;
|
|
1184
1178
|
}
|
|
1185
1179
|
function e(t) {
|
|
1186
1180
|
return !!(t.icon && t.icon.trim());
|
|
1187
1181
|
}
|
|
1188
|
-
return { iconClass:
|
|
1182
|
+
return { iconClass: n, shouldShowIcon: e };
|
|
1189
1183
|
}
|
|
1190
|
-
function
|
|
1184
|
+
function At(n) {
|
|
1191
1185
|
function e(l) {
|
|
1192
1186
|
const a = {
|
|
1193
1187
|
"dropdown-menu": !0
|
|
1194
1188
|
};
|
|
1195
1189
|
if (l.class) {
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1190
|
+
const f = l.menuClass.split(" ");
|
|
1191
|
+
f && f.length && f.reduce((i, C) => (i[C] = !0, i), a);
|
|
1198
1192
|
}
|
|
1199
1193
|
return a;
|
|
1200
1194
|
}
|
|
@@ -1203,117 +1197,117 @@ function Bt(o) {
|
|
|
1203
1197
|
disabled: !l.enable,
|
|
1204
1198
|
"dropdown-submenu": !0,
|
|
1205
1199
|
"f-rt-dropdown": !0
|
|
1206
|
-
},
|
|
1207
|
-
return
|
|
1200
|
+
}, f = l.dropdownClass.split(" ");
|
|
1201
|
+
return f && f.length && f.reduce((i, C) => (i[C] = !0, i), a), a;
|
|
1208
1202
|
}
|
|
1209
|
-
function
|
|
1203
|
+
function s(l) {
|
|
1210
1204
|
const a = {
|
|
1211
1205
|
disabled: !l.enable,
|
|
1212
1206
|
"dropdown-item": !0,
|
|
1213
1207
|
"f-rt-btn": !0
|
|
1214
|
-
},
|
|
1215
|
-
return
|
|
1208
|
+
}, f = l.class.split(" ");
|
|
1209
|
+
return f && f.length && f.reduce((i, C) => (i[C] = !0, i), a), a;
|
|
1216
1210
|
}
|
|
1217
1211
|
let p;
|
|
1218
|
-
const
|
|
1219
|
-
function
|
|
1220
|
-
var
|
|
1221
|
-
((
|
|
1222
|
-
const
|
|
1223
|
-
if (a.children && a.children.length && (a.expanded = !a.expanded, a.expanded ?
|
|
1224
|
-
const w =
|
|
1212
|
+
const u = /* @__PURE__ */ new Map();
|
|
1213
|
+
function h(l, a, f) {
|
|
1214
|
+
var C;
|
|
1215
|
+
((C = l.target) == null ? void 0 : C.id) === a.id && l.stopPropagation();
|
|
1216
|
+
const i = f ? f.id : "__top_item__";
|
|
1217
|
+
if (a.children && a.children.length && (a.expanded = !a.expanded, a.expanded ? u.set(i, a) : u.delete(i)), u.has(i) && u.get(i) !== a) {
|
|
1218
|
+
const w = u.get(i);
|
|
1225
1219
|
w && (w.expanded = !1);
|
|
1226
1220
|
}
|
|
1227
1221
|
}
|
|
1228
1222
|
function P(l, a) {
|
|
1229
1223
|
document.body.click(), a.enable && a.onClick(l, a.id);
|
|
1230
1224
|
}
|
|
1231
|
-
function
|
|
1232
|
-
return l.children.map((a) => a.children && a.children.length ?
|
|
1225
|
+
function k(l) {
|
|
1226
|
+
return l.children.map((a) => a.children && a.children.length ? b("li", {
|
|
1233
1227
|
class: t(a),
|
|
1234
1228
|
id: a.id,
|
|
1235
|
-
onClick: (
|
|
1236
|
-
}, [
|
|
1229
|
+
onClick: (f) => a.enable && h(f, a, l)
|
|
1230
|
+
}, [b("span", {
|
|
1237
1231
|
id: a.id,
|
|
1238
|
-
class:
|
|
1239
|
-
onMouseover: (
|
|
1240
|
-
}, [a.text,
|
|
1232
|
+
class: s(a),
|
|
1233
|
+
onMouseover: (f) => a.enable && h(f, a, l)
|
|
1234
|
+
}, [a.text, b("i", {
|
|
1241
1235
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1242
1236
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1243
|
-
}, null)]), p(a, a)]) :
|
|
1244
|
-
class:
|
|
1237
|
+
}, null)]), p(a, a)]) : b("li", {
|
|
1238
|
+
class: s(a),
|
|
1245
1239
|
id: a.id,
|
|
1246
|
-
onClick: (
|
|
1247
|
-
onMouseover: (
|
|
1248
|
-
}, [
|
|
1249
|
-
class:
|
|
1240
|
+
onClick: (f) => P(f, a),
|
|
1241
|
+
onMouseover: (f) => a.enable && h(f, a, l)
|
|
1242
|
+
}, [n.shouldShowIcon(a) && b("i", {
|
|
1243
|
+
class: n.iconClass(a)
|
|
1250
1244
|
}, null), a.text]));
|
|
1251
1245
|
}
|
|
1252
|
-
function g(l, a,
|
|
1253
|
-
const
|
|
1246
|
+
function g(l, a, f) {
|
|
1247
|
+
const i = {
|
|
1254
1248
|
display: l.expanded ? "block" : "none",
|
|
1255
1249
|
position: "fixed",
|
|
1256
1250
|
maxWidth: "300px",
|
|
1257
1251
|
width: "auto",
|
|
1258
1252
|
minWidth: "120px"
|
|
1259
|
-
},
|
|
1260
|
-
if (w &&
|
|
1253
|
+
}, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w = a, M = w == null ? void 0 : w.getClientRects();
|
|
1254
|
+
if (w && M && M.length) {
|
|
1261
1255
|
const {
|
|
1262
1256
|
top: R,
|
|
1263
1257
|
width: S,
|
|
1264
|
-
left:
|
|
1258
|
+
left: A,
|
|
1265
1259
|
right: L,
|
|
1266
|
-
height:
|
|
1267
|
-
} =
|
|
1268
|
-
|
|
1260
|
+
height: v
|
|
1261
|
+
} = M[0], m = Math.ceil(v + R);
|
|
1262
|
+
i.top = `${m}px`, i.left = `${A}px`;
|
|
1269
1263
|
const D = l.id + "_menu", j = a ? a.querySelector("#" + D) : null;
|
|
1270
1264
|
if (j) {
|
|
1271
|
-
|
|
1265
|
+
i.display === "block" && (j.style.display = "block");
|
|
1272
1266
|
const d = j.getBoundingClientRect();
|
|
1273
|
-
if (
|
|
1274
|
-
|
|
1275
|
-
const r = Math.ceil(S +
|
|
1276
|
-
|
|
1267
|
+
if (f) {
|
|
1268
|
+
i.top = `${R - 6}px`;
|
|
1269
|
+
const r = Math.ceil(S + A);
|
|
1270
|
+
i.left = `${r}px`;
|
|
1277
1271
|
}
|
|
1278
|
-
|
|
1272
|
+
C - A - S < d.width && (i.left = `${(f ? A : L) - d.width}px`);
|
|
1279
1273
|
}
|
|
1280
1274
|
}
|
|
1281
|
-
return
|
|
1275
|
+
return i;
|
|
1282
1276
|
}
|
|
1283
1277
|
p = function(l, a) {
|
|
1284
|
-
var w,
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1278
|
+
var w, M;
|
|
1279
|
+
const f = be(), i = a ? a.id : l.id, C = (M = (w = f == null ? void 0 : f.exposed) == null ? void 0 : w.elementRef.value) == null ? void 0 : M.querySelector("#" + i);
|
|
1280
|
+
return b("ul", {
|
|
1287
1281
|
class: e(l),
|
|
1288
|
-
style: g(l,
|
|
1282
|
+
style: g(l, C, a),
|
|
1289
1283
|
id: l.id + "_menu"
|
|
1290
|
-
}, [
|
|
1284
|
+
}, [k(l)]);
|
|
1291
1285
|
};
|
|
1292
1286
|
function T() {
|
|
1293
|
-
|
|
1287
|
+
u.forEach((l) => {
|
|
1294
1288
|
l.expanded = !1;
|
|
1295
|
-
}),
|
|
1289
|
+
}), u.clear();
|
|
1296
1290
|
}
|
|
1297
1291
|
return {
|
|
1298
1292
|
renderDropdownMenu: p,
|
|
1299
1293
|
clearAllDropDownMenu: T
|
|
1300
1294
|
};
|
|
1301
1295
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const t = B(
|
|
1304
|
-
renderDropdownMenu:
|
|
1296
|
+
function It(n, e) {
|
|
1297
|
+
const t = B(n.alignment), {
|
|
1298
|
+
renderDropdownMenu: s,
|
|
1305
1299
|
clearAllDropDownMenu: p
|
|
1306
|
-
} =
|
|
1307
|
-
function
|
|
1300
|
+
} = At(e);
|
|
1301
|
+
function u(T) {
|
|
1308
1302
|
const l = {
|
|
1309
1303
|
"btn-group": !0,
|
|
1310
1304
|
"f-rt-dropdown": !0,
|
|
1311
1305
|
"f-btn-ml": t.value === "right",
|
|
1312
1306
|
"f-btn-mr": t.value === "left"
|
|
1313
1307
|
}, a = T.dropdownClass.split(" ");
|
|
1314
|
-
return a && a.length && a.reduce((
|
|
1308
|
+
return a && a.length && a.reduce((f, i) => (f[i] = !0, f), l), l;
|
|
1315
1309
|
}
|
|
1316
|
-
function
|
|
1310
|
+
function h(T) {
|
|
1317
1311
|
const l = {
|
|
1318
1312
|
btn: !0,
|
|
1319
1313
|
disabled: !T.enable,
|
|
@@ -1322,7 +1316,7 @@ function jt(o, e) {
|
|
|
1322
1316
|
};
|
|
1323
1317
|
if (T.class) {
|
|
1324
1318
|
const a = T.class.split(" ");
|
|
1325
|
-
a && a.length && a.reduce((
|
|
1319
|
+
a && a.length && a.reduce((f, i) => (f[i] = !0, f), l);
|
|
1326
1320
|
}
|
|
1327
1321
|
return l;
|
|
1328
1322
|
}
|
|
@@ -1331,26 +1325,26 @@ function jt(o, e) {
|
|
|
1331
1325
|
const a = l.expanded;
|
|
1332
1326
|
document.body.click(), l.expanded = !a;
|
|
1333
1327
|
}
|
|
1334
|
-
function
|
|
1335
|
-
return
|
|
1328
|
+
function k(T) {
|
|
1329
|
+
return b("div", {
|
|
1336
1330
|
id: T.id,
|
|
1337
|
-
class:
|
|
1338
|
-
}, [
|
|
1339
|
-
class:
|
|
1331
|
+
class: u(T)
|
|
1332
|
+
}, [b("div", {
|
|
1333
|
+
class: h(T),
|
|
1340
1334
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
1341
1335
|
onClick: (l) => T.enable && P(l, T)
|
|
1342
|
-
}, [e.shouldShowIcon(T) &&
|
|
1336
|
+
}, [e.shouldShowIcon(T) && b("i", {
|
|
1343
1337
|
class: e.iconClass(T)
|
|
1344
|
-
}, null),
|
|
1338
|
+
}, null), b("span", null, [T.text]), b("i", {
|
|
1345
1339
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1346
1340
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1347
|
-
}, null)]),
|
|
1341
|
+
}, null)]), s(T)]);
|
|
1348
1342
|
}
|
|
1349
1343
|
function g() {
|
|
1350
1344
|
p();
|
|
1351
1345
|
}
|
|
1352
1346
|
return {
|
|
1353
|
-
renderToolbarDropdown:
|
|
1347
|
+
renderToolbarDropdown: k,
|
|
1354
1348
|
clearAllDropDown: g
|
|
1355
1349
|
};
|
|
1356
1350
|
}
|
|
@@ -1359,198 +1353,198 @@ const {
|
|
|
1359
1353
|
} = Pe(), K = /* @__PURE__ */ G({
|
|
1360
1354
|
name: "FResponseToolbar",
|
|
1361
1355
|
props: pe,
|
|
1362
|
-
emits: [],
|
|
1363
|
-
setup(
|
|
1364
|
-
const t = B(ge(
|
|
1356
|
+
emits: ["click"],
|
|
1357
|
+
setup(n, e) {
|
|
1358
|
+
const t = B(ge(n.items)), s = B(), p = B(), u = B(), h = B(n.alignment), P = {
|
|
1365
1359
|
id: "__more_buttons__",
|
|
1366
1360
|
text: "更多"
|
|
1367
|
-
},
|
|
1368
|
-
const
|
|
1361
|
+
}, k = B(new X(P)), g = xe(), T = V(() => k.value.children.length > 0), l = V(() => {
|
|
1362
|
+
const m = {
|
|
1369
1363
|
"f-toolbar": !0,
|
|
1370
1364
|
"f-response-toolbar": !0,
|
|
1371
1365
|
"position-relative": !0
|
|
1372
1366
|
};
|
|
1373
|
-
if (
|
|
1374
|
-
const D =
|
|
1375
|
-
D && D.length && D.reduce((j, d) => (j[d] = !0, j),
|
|
1367
|
+
if (n.customClass) {
|
|
1368
|
+
const D = n.customClass.split(" ");
|
|
1369
|
+
D && D.length && D.reduce((j, d) => (j[d] = !0, j), m);
|
|
1376
1370
|
}
|
|
1377
|
-
return
|
|
1371
|
+
return m;
|
|
1378
1372
|
}), a = V(() => ({
|
|
1379
1373
|
"d-flex": !0,
|
|
1380
1374
|
"flex-nowrap": !0,
|
|
1381
|
-
"justify-content-end":
|
|
1382
|
-
"justify-content-start":
|
|
1375
|
+
"justify-content-end": h.value === "right",
|
|
1376
|
+
"justify-content-start": h.value === "left"
|
|
1383
1377
|
})), {
|
|
1384
|
-
renderToolbarDropdown:
|
|
1385
|
-
clearAllDropDown:
|
|
1386
|
-
} =
|
|
1387
|
-
function
|
|
1388
|
-
t.value.filter((
|
|
1389
|
-
|
|
1390
|
-
}),
|
|
1378
|
+
renderToolbarDropdown: f,
|
|
1379
|
+
clearAllDropDown: i
|
|
1380
|
+
} = It(n, g);
|
|
1381
|
+
function C() {
|
|
1382
|
+
t.value.filter((m) => m.children && m.children.length > 0).forEach((m) => {
|
|
1383
|
+
m.expanded = !1;
|
|
1384
|
+
}), k.value.expanded = !1, i();
|
|
1391
1385
|
}
|
|
1392
|
-
function w(
|
|
1386
|
+
function w(m) {
|
|
1393
1387
|
const D = {
|
|
1394
1388
|
btn: !0,
|
|
1395
1389
|
"f-rt-btn": !0,
|
|
1396
|
-
"f-btn-ml":
|
|
1397
|
-
"f-btn-mr":
|
|
1398
|
-
"btn-icontext": !!(
|
|
1390
|
+
"f-btn-ml": h.value === "right",
|
|
1391
|
+
"f-btn-mr": h.value === "left",
|
|
1392
|
+
"btn-icontext": !!(m.icon && m.icon.trim())
|
|
1399
1393
|
};
|
|
1400
|
-
if (
|
|
1401
|
-
const j =
|
|
1394
|
+
if (m.class) {
|
|
1395
|
+
const j = m.class.split(" ");
|
|
1402
1396
|
j && j.length && j.reduce((d, r) => (d[r] = !0, d), D);
|
|
1403
1397
|
}
|
|
1404
1398
|
return D;
|
|
1405
1399
|
}
|
|
1406
|
-
function
|
|
1407
|
-
document.body.click(), D.onClick(
|
|
1400
|
+
function M(m, D) {
|
|
1401
|
+
document.body.click(), D.onClick(m, D.id), e.emit("click", m, D.id);
|
|
1408
1402
|
}
|
|
1409
|
-
function R(
|
|
1410
|
-
return
|
|
1403
|
+
function R(m) {
|
|
1404
|
+
return b("button", {
|
|
1411
1405
|
type: "button",
|
|
1412
|
-
class: w(
|
|
1413
|
-
id:
|
|
1414
|
-
disabled: !
|
|
1415
|
-
onClick: (D) =>
|
|
1416
|
-
}, [g.shouldShowIcon(
|
|
1417
|
-
class: g.iconClass(
|
|
1418
|
-
}, null),
|
|
1406
|
+
class: w(m),
|
|
1407
|
+
id: m.id,
|
|
1408
|
+
disabled: !m.enable,
|
|
1409
|
+
onClick: (D) => M(D, m)
|
|
1410
|
+
}, [g.shouldShowIcon(m) && b("i", {
|
|
1411
|
+
class: g.iconClass(m)
|
|
1412
|
+
}, null), m.text]);
|
|
1419
1413
|
}
|
|
1420
|
-
const S = /* @__PURE__ */ new Map(),
|
|
1421
|
-
function L(
|
|
1422
|
-
const D =
|
|
1423
|
-
let j =
|
|
1414
|
+
const S = /* @__PURE__ */ new Map(), A = [];
|
|
1415
|
+
function L(m) {
|
|
1416
|
+
const D = u.value;
|
|
1417
|
+
let j = m;
|
|
1424
1418
|
const d = Array.from(D.children), r = d[d.length - 1].id === "__more_buttons__" ? d[d.length - 1] : null;
|
|
1425
1419
|
if (r) {
|
|
1426
|
-
const
|
|
1420
|
+
const x = r.computedStyleMap().get("margin-left"), F = r.computedStyleMap().get("margin-right"), _ = (x ? x.value : 0) + r.getBoundingClientRect().width + (F ? F.value : 0);
|
|
1427
1421
|
j -= _;
|
|
1428
1422
|
}
|
|
1429
|
-
const
|
|
1430
|
-
for (const
|
|
1431
|
-
const F =
|
|
1432
|
-
j < N ? (S.set(
|
|
1433
|
-
id:
|
|
1423
|
+
const o = d.filter((x) => x.id !== "__more_buttons__");
|
|
1424
|
+
for (const x of o) {
|
|
1425
|
+
const F = x.computedStyleMap().get("margin-left"), _ = x.computedStyleMap().get("margin-right"), N = (F ? F.value : 0) + x.getBoundingClientRect().width + (_ ? _.value : 0);
|
|
1426
|
+
j < N ? (S.set(x.id, !0), A.push({
|
|
1427
|
+
id: x.id,
|
|
1434
1428
|
width: N
|
|
1435
1429
|
})) : j -= N;
|
|
1436
1430
|
}
|
|
1437
|
-
if (
|
|
1438
|
-
for (let
|
|
1439
|
-
const F =
|
|
1431
|
+
if (A.length)
|
|
1432
|
+
for (let x = A.length - 1; x >= 0; x--) {
|
|
1433
|
+
const F = A[x].width;
|
|
1440
1434
|
if (j >= F)
|
|
1441
|
-
j -= F, S.delete(
|
|
1435
|
+
j -= F, S.delete(A[x].id), A.pop();
|
|
1442
1436
|
else
|
|
1443
1437
|
break;
|
|
1444
1438
|
}
|
|
1445
|
-
const c = Object.assign({},
|
|
1439
|
+
const c = Object.assign({}, k.value);
|
|
1446
1440
|
c.children = [];
|
|
1447
|
-
const y = new X(c),
|
|
1448
|
-
|
|
1441
|
+
const y = new X(c), I = t.value.reduce((x, F) => (S.has(F.id) && y.children.push(F), F.visible = !S.has(F.id), x.push(F), x), []);
|
|
1442
|
+
k.value = y, t.value = I;
|
|
1449
1443
|
}
|
|
1450
|
-
const
|
|
1451
|
-
if (
|
|
1452
|
-
const j =
|
|
1453
|
-
(j < r ||
|
|
1444
|
+
const v = new ResizeObserver((m) => {
|
|
1445
|
+
if (m.length) {
|
|
1446
|
+
const j = m[0].contentRect.width, r = u.value.getBoundingClientRect().width;
|
|
1447
|
+
(j < r || A.length) && (L(j), C());
|
|
1454
1448
|
}
|
|
1455
1449
|
});
|
|
1456
1450
|
return q(() => {
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1459
|
-
}),
|
|
1460
|
-
|
|
1461
|
-
}), Q(() =>
|
|
1462
|
-
t.value = ge(
|
|
1451
|
+
const m = p.value;
|
|
1452
|
+
v.observe(m), document.body.addEventListener("click", C), document.body.addEventListener("wheel", C);
|
|
1453
|
+
}), se(() => {
|
|
1454
|
+
v.disconnect(), document.body.removeEventListener("click", C), document.body.removeEventListener("wheel", C);
|
|
1455
|
+
}), Q(() => n.items, () => {
|
|
1456
|
+
t.value = ge(n.items);
|
|
1463
1457
|
}, {
|
|
1464
1458
|
deep: !0
|
|
1465
1459
|
}), e.expose({
|
|
1466
|
-
elementRef:
|
|
1467
|
-
}), () =>
|
|
1460
|
+
elementRef: s
|
|
1461
|
+
}), () => b("div", {
|
|
1468
1462
|
class: l.value,
|
|
1469
|
-
ref:
|
|
1470
|
-
}, [
|
|
1463
|
+
ref: s
|
|
1464
|
+
}, [b("div", {
|
|
1471
1465
|
ref: p,
|
|
1472
1466
|
class: a.value
|
|
1473
|
-
}, [
|
|
1474
|
-
ref:
|
|
1467
|
+
}, [b("div", {
|
|
1468
|
+
ref: u,
|
|
1475
1469
|
class: "d-inline-block f-response-content",
|
|
1476
1470
|
style: "white-space: nowrap;"
|
|
1477
|
-
}, [t.value.filter((
|
|
1471
|
+
}, [t.value.filter((m) => m.visible).map((m) => m.children && m.children.length > 0 ? f(m) : R(m)), T.value && f(k.value)])])]);
|
|
1478
1472
|
}
|
|
1479
1473
|
});
|
|
1480
|
-
function
|
|
1481
|
-
const t = U("design-item-context"),
|
|
1474
|
+
function Ft(n, e) {
|
|
1475
|
+
const t = U("design-item-context"), s = U("toolbar-item-handler", () => {
|
|
1482
1476
|
});
|
|
1483
1477
|
function p() {
|
|
1484
|
-
|
|
1478
|
+
s && s();
|
|
1485
1479
|
}
|
|
1486
|
-
function
|
|
1487
|
-
const
|
|
1480
|
+
function u(r) {
|
|
1481
|
+
const o = {
|
|
1488
1482
|
"dropdown-menu": !0
|
|
1489
1483
|
};
|
|
1490
1484
|
if (r.class) {
|
|
1491
1485
|
const c = r.menuClass.split(" ");
|
|
1492
|
-
c && c.length && c.reduce((y,
|
|
1486
|
+
c && c.length && c.reduce((y, I) => (y[I] = !0, y), o);
|
|
1493
1487
|
}
|
|
1494
|
-
return
|
|
1488
|
+
return o;
|
|
1495
1489
|
}
|
|
1496
|
-
function
|
|
1497
|
-
const
|
|
1490
|
+
function h(r) {
|
|
1491
|
+
const o = {
|
|
1498
1492
|
disabled: !r.enable,
|
|
1499
1493
|
"dropdown-submenu": !0,
|
|
1500
1494
|
"f-rt-dropdown": !0
|
|
1501
1495
|
}, c = r.dropdownClass.split(" ");
|
|
1502
|
-
return c && c.length && c.reduce((y,
|
|
1496
|
+
return c && c.length && c.reduce((y, I) => (y[I] = !0, y), o), o;
|
|
1503
1497
|
}
|
|
1504
1498
|
function P(r) {
|
|
1505
|
-
const
|
|
1499
|
+
const o = {
|
|
1506
1500
|
disabled: !r.enable,
|
|
1507
1501
|
"dropdown-item": !0,
|
|
1508
1502
|
"f-rt-btn": !0,
|
|
1509
1503
|
"position-relative": !0,
|
|
1510
1504
|
"farris-component": !0
|
|
1511
1505
|
}, c = r.class.split(" ");
|
|
1512
|
-
return c && c.length && c.reduce((y,
|
|
1506
|
+
return c && c.length && c.reduce((y, I) => (y[I] = !0, y), o), o;
|
|
1513
1507
|
}
|
|
1514
|
-
let
|
|
1508
|
+
let k;
|
|
1515
1509
|
const g = /* @__PURE__ */ new Map();
|
|
1516
|
-
function T(r,
|
|
1517
|
-
var
|
|
1518
|
-
((
|
|
1510
|
+
function T(r, o, c) {
|
|
1511
|
+
var I;
|
|
1512
|
+
((I = r.target) == null ? void 0 : I.id) === o.id && r.stopPropagation();
|
|
1519
1513
|
const y = c ? c.id : "__top_item__";
|
|
1520
|
-
if (
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1514
|
+
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? g.set(y, o) : g.delete(y)), g.has(y) && g.get(y) !== o) {
|
|
1515
|
+
const x = g.get(y);
|
|
1516
|
+
x && (x.expanded = !1);
|
|
1523
1517
|
}
|
|
1524
1518
|
}
|
|
1525
1519
|
function l(r) {
|
|
1526
1520
|
r && (r.stopPropagation(), r.preventDefault());
|
|
1527
1521
|
}
|
|
1528
1522
|
function a() {
|
|
1529
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1523
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1530
1524
|
const r = document.getElementsByClassName("dgComponentSelected");
|
|
1531
|
-
Array.from(r).forEach((
|
|
1525
|
+
Array.from(r).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1532
1526
|
}
|
|
1533
|
-
function
|
|
1527
|
+
function f(r) {
|
|
1534
1528
|
r.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1535
1529
|
}
|
|
1536
|
-
function
|
|
1530
|
+
function i(r) {
|
|
1537
1531
|
const {
|
|
1538
|
-
buttons:
|
|
1532
|
+
buttons: o = []
|
|
1539
1533
|
} = t.schema;
|
|
1540
1534
|
let c = [];
|
|
1541
|
-
|
|
1542
|
-
c = c.concat(
|
|
1535
|
+
o.forEach((x) => {
|
|
1536
|
+
c = c.concat(x.children || []);
|
|
1543
1537
|
});
|
|
1544
|
-
const y = c.findIndex((
|
|
1538
|
+
const y = c.findIndex((x) => x.id === r), I = y === -1 ? null : c[y];
|
|
1545
1539
|
return {
|
|
1546
1540
|
index: y,
|
|
1547
|
-
item:
|
|
1541
|
+
item: I
|
|
1548
1542
|
};
|
|
1549
1543
|
}
|
|
1550
|
-
function
|
|
1544
|
+
function C(r) {
|
|
1551
1545
|
const {
|
|
1552
|
-
buttons:
|
|
1553
|
-
} = t.schema, c =
|
|
1546
|
+
buttons: o = []
|
|
1547
|
+
} = t.schema, c = o.findIndex((I) => I.id === r), y = c === -1 ? null : o[c];
|
|
1554
1548
|
return {
|
|
1555
1549
|
index: c,
|
|
1556
1550
|
item: y
|
|
@@ -1560,141 +1554,141 @@ function At(o, e) {
|
|
|
1560
1554
|
var y;
|
|
1561
1555
|
t.schema;
|
|
1562
1556
|
const {
|
|
1563
|
-
index:
|
|
1557
|
+
index: o,
|
|
1564
1558
|
item: c
|
|
1565
|
-
} =
|
|
1559
|
+
} = i(r);
|
|
1566
1560
|
(y = t == null ? void 0 : t.setupContext) == null || y.emit("selectionChange", c == null ? void 0 : c.type, c);
|
|
1567
1561
|
}
|
|
1568
|
-
const
|
|
1562
|
+
const M = function(r) {
|
|
1569
1563
|
const {
|
|
1570
|
-
componentType:
|
|
1571
|
-
} = r, c = z(
|
|
1572
|
-
return c && !c.id && c.type ===
|
|
1564
|
+
componentType: o
|
|
1565
|
+
} = r, c = z(o, r), y = o.toLowerCase().replace("-", "_");
|
|
1566
|
+
return c && !c.id && c.type === o && (c.id = `${y}_${Math.random().toString().slice(2, 6)}`), c;
|
|
1573
1567
|
}, R = function() {
|
|
1574
1568
|
const r = {
|
|
1575
1569
|
componentType: "response-toolbar-item",
|
|
1576
1570
|
parentComponentInstance: e.value,
|
|
1577
1571
|
targetPosition: -1
|
|
1578
1572
|
};
|
|
1579
|
-
return
|
|
1573
|
+
return M(r);
|
|
1580
1574
|
};
|
|
1581
|
-
function S(r,
|
|
1582
|
-
l(r), a(),
|
|
1575
|
+
function S(r, o) {
|
|
1576
|
+
l(r), a(), f(r), w(o.id);
|
|
1583
1577
|
}
|
|
1584
|
-
function
|
|
1578
|
+
function A(r, o, c) {
|
|
1585
1579
|
l(r);
|
|
1586
|
-
const y =
|
|
1587
|
-
buttons:
|
|
1580
|
+
const y = o.id, I = c && c.id, {
|
|
1581
|
+
buttons: x = []
|
|
1588
1582
|
} = t.schema;
|
|
1589
|
-
if (!
|
|
1583
|
+
if (!I)
|
|
1590
1584
|
return;
|
|
1591
1585
|
const {
|
|
1592
1586
|
index: F
|
|
1593
|
-
} =
|
|
1587
|
+
} = C(I);
|
|
1594
1588
|
if (F === -1)
|
|
1595
1589
|
return;
|
|
1596
1590
|
const {
|
|
1597
1591
|
index: _
|
|
1598
|
-
} =
|
|
1599
|
-
_ !== -1 && (
|
|
1592
|
+
} = i(y);
|
|
1593
|
+
_ !== -1 && (x[F].children.splice(_, 1), p());
|
|
1600
1594
|
}
|
|
1601
|
-
function L(r,
|
|
1595
|
+
function L(r, o, c) {
|
|
1602
1596
|
l(r);
|
|
1603
1597
|
const y = c && c.id, {
|
|
1604
|
-
buttons:
|
|
1598
|
+
buttons: I = []
|
|
1605
1599
|
} = t.schema;
|
|
1606
1600
|
if (!y)
|
|
1607
1601
|
return;
|
|
1608
1602
|
const {
|
|
1609
|
-
index:
|
|
1610
|
-
} =
|
|
1611
|
-
if (
|
|
1603
|
+
index: x
|
|
1604
|
+
} = C(y);
|
|
1605
|
+
if (x === -1)
|
|
1612
1606
|
return;
|
|
1613
1607
|
const F = R(), _ = Object.assign({}, F, {
|
|
1614
|
-
text:
|
|
1608
|
+
text: o.text
|
|
1615
1609
|
});
|
|
1616
|
-
|
|
1610
|
+
I[x].children.push(_), p();
|
|
1617
1611
|
}
|
|
1618
|
-
function
|
|
1612
|
+
function v(r, o, c) {
|
|
1619
1613
|
l(r);
|
|
1620
1614
|
const y = c && c.id, {
|
|
1621
|
-
buttons:
|
|
1615
|
+
buttons: I = []
|
|
1622
1616
|
} = t.schema;
|
|
1623
1617
|
if (!y)
|
|
1624
1618
|
return;
|
|
1625
1619
|
const {
|
|
1626
|
-
index:
|
|
1627
|
-
} =
|
|
1628
|
-
if (
|
|
1620
|
+
index: x
|
|
1621
|
+
} = C(y);
|
|
1622
|
+
if (x === -1)
|
|
1629
1623
|
return;
|
|
1630
1624
|
const F = R(), _ = Object.assign({}, F, {
|
|
1631
1625
|
text: "按钮"
|
|
1632
1626
|
});
|
|
1633
|
-
|
|
1627
|
+
I[x].children.push(_), p();
|
|
1634
1628
|
}
|
|
1635
|
-
function
|
|
1636
|
-
return
|
|
1629
|
+
function m(r, o) {
|
|
1630
|
+
return b("div", {
|
|
1637
1631
|
class: "component-btn-group"
|
|
1638
|
-
}, [
|
|
1632
|
+
}, [b("div", null, [b("div", {
|
|
1639
1633
|
role: "button",
|
|
1640
1634
|
class: "btn component-settings-button",
|
|
1641
1635
|
title: "删除",
|
|
1642
1636
|
ref: "removeButton",
|
|
1643
1637
|
style: "position:static;",
|
|
1644
|
-
onClick: (c) =>
|
|
1645
|
-
}, [
|
|
1638
|
+
onClick: (c) => A(c, r, o)
|
|
1639
|
+
}, [b("i", {
|
|
1646
1640
|
class: "f-icon f-icon-yxs_delete"
|
|
1647
|
-
}, null)]),
|
|
1641
|
+
}, null)]), b("div", {
|
|
1648
1642
|
role: "button",
|
|
1649
1643
|
class: "btn component-settings-button",
|
|
1650
1644
|
title: "复制",
|
|
1651
1645
|
ref: "copyButton",
|
|
1652
1646
|
style: "position:static;",
|
|
1653
|
-
onClick: (c) => L(c, r,
|
|
1654
|
-
}, [
|
|
1647
|
+
onClick: (c) => L(c, r, o)
|
|
1648
|
+
}, [b("i", {
|
|
1655
1649
|
class: "f-icon f-icon-yxs_copy"
|
|
1656
|
-
}, null)]),
|
|
1650
|
+
}, null)]), b("div", {
|
|
1657
1651
|
role: "button",
|
|
1658
1652
|
class: "btn component-settings-button",
|
|
1659
1653
|
title: "新增同级",
|
|
1660
1654
|
ref: "appendSame",
|
|
1661
1655
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1662
|
-
onClick: (c) =>
|
|
1663
|
-
}, [
|
|
1656
|
+
onClick: (c) => v(c, r, o)
|
|
1657
|
+
}, [b("i", {
|
|
1664
1658
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1665
|
-
}, null),
|
|
1659
|
+
}, null), b("span", {
|
|
1666
1660
|
style: "font-size:13px;margin:auto"
|
|
1667
1661
|
}, [Y("新增同级")])])])]);
|
|
1668
1662
|
}
|
|
1669
1663
|
function D(r) {
|
|
1670
|
-
return r.children.map((
|
|
1671
|
-
class:
|
|
1672
|
-
id:
|
|
1673
|
-
onClick: (c) =>
|
|
1674
|
-
}, [
|
|
1675
|
-
id:
|
|
1676
|
-
class: P(
|
|
1677
|
-
onMouseover: (c) =>
|
|
1678
|
-
}, [
|
|
1664
|
+
return r.children.map((o) => o.children && o.children.length ? b("li", {
|
|
1665
|
+
class: h(o),
|
|
1666
|
+
id: o.id,
|
|
1667
|
+
onClick: (c) => o.enable && T(c, o, r)
|
|
1668
|
+
}, [b("span", {
|
|
1669
|
+
id: o.id,
|
|
1670
|
+
class: P(o),
|
|
1671
|
+
onMouseover: (c) => o.enable && T(c, o, r)
|
|
1672
|
+
}, [o.text, b("i", {
|
|
1679
1673
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1680
1674
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1681
|
-
}, null)]),
|
|
1682
|
-
class: P(
|
|
1683
|
-
id:
|
|
1684
|
-
onClick: (c) => S(c,
|
|
1685
|
-
}, [
|
|
1686
|
-
class:
|
|
1687
|
-
}, null),
|
|
1688
|
-
}
|
|
1689
|
-
function j(r,
|
|
1675
|
+
}, null)]), k(o, o)]) : b("li", {
|
|
1676
|
+
class: P(o),
|
|
1677
|
+
id: o.id,
|
|
1678
|
+
onClick: (c) => S(c, o)
|
|
1679
|
+
}, [m(o, r), n.shouldShowIcon(o) && b("i", {
|
|
1680
|
+
class: n.iconClass(o)
|
|
1681
|
+
}, null), o.text]));
|
|
1682
|
+
}
|
|
1683
|
+
function j(r, o, c) {
|
|
1690
1684
|
const y = {
|
|
1691
1685
|
display: r.expanded ? "block" : "none",
|
|
1692
1686
|
position: "fixed",
|
|
1693
1687
|
maxWidth: "300px",
|
|
1694
1688
|
width: "auto",
|
|
1695
1689
|
minWidth: "120px"
|
|
1696
|
-
},
|
|
1697
|
-
if (
|
|
1690
|
+
}, I = document.getElementsByTagName("body")[0].getClientRects()[0].width, x = o, F = x == null ? void 0 : x.getClientRects();
|
|
1691
|
+
if (x && F && F.length) {
|
|
1698
1692
|
const {
|
|
1699
1693
|
top: _,
|
|
1700
1694
|
width: N,
|
|
@@ -1703,7 +1697,7 @@ function At(o, e) {
|
|
|
1703
1697
|
height: H
|
|
1704
1698
|
} = F[0], ee = Math.ceil(H + _);
|
|
1705
1699
|
y.top = `${ee}px`, y.left = `${$}px`;
|
|
1706
|
-
const Ie = r.id + "_menu", te =
|
|
1700
|
+
const Ie = r.id + "_menu", te = o ? o.querySelector("#" + Ie) : null;
|
|
1707
1701
|
if (te) {
|
|
1708
1702
|
y.display === "block" && (te.style.display = "block");
|
|
1709
1703
|
const ue = te.getBoundingClientRect();
|
|
@@ -1712,17 +1706,17 @@ function At(o, e) {
|
|
|
1712
1706
|
const Fe = Math.ceil(N + $);
|
|
1713
1707
|
y.left = `${Fe}px`;
|
|
1714
1708
|
}
|
|
1715
|
-
|
|
1709
|
+
I - $ - N < ue.width && (y.left = `${(c ? $ : W) - ue.width}px`);
|
|
1716
1710
|
}
|
|
1717
1711
|
}
|
|
1718
1712
|
return y;
|
|
1719
1713
|
}
|
|
1720
|
-
|
|
1721
|
-
var
|
|
1722
|
-
const c = be(), y =
|
|
1723
|
-
return
|
|
1724
|
-
class:
|
|
1725
|
-
style: j(r,
|
|
1714
|
+
k = function(r, o) {
|
|
1715
|
+
var x, F;
|
|
1716
|
+
const c = be(), y = o ? o.id : r.id, I = (F = (x = c == null ? void 0 : c.exposed) == null ? void 0 : x.elementRef.value) == null ? void 0 : F.querySelector("#" + y);
|
|
1717
|
+
return b("ul", {
|
|
1718
|
+
class: u(r),
|
|
1719
|
+
style: j(r, I, o),
|
|
1726
1720
|
id: r.id + "_menu"
|
|
1727
1721
|
}, [D(r)]);
|
|
1728
1722
|
};
|
|
@@ -1732,27 +1726,27 @@ function At(o, e) {
|
|
|
1732
1726
|
}), g.clear();
|
|
1733
1727
|
}
|
|
1734
1728
|
return {
|
|
1735
|
-
renderDropdownMenu:
|
|
1729
|
+
renderDropdownMenu: k,
|
|
1736
1730
|
clearAllDropDownMenu: d
|
|
1737
1731
|
};
|
|
1738
1732
|
}
|
|
1739
|
-
function
|
|
1740
|
-
const
|
|
1733
|
+
function Rt(n, e, t) {
|
|
1734
|
+
const s = B(n.alignment), {
|
|
1741
1735
|
renderDropdownMenu: p,
|
|
1742
|
-
clearAllDropDownMenu:
|
|
1743
|
-
} =
|
|
1736
|
+
clearAllDropDownMenu: u
|
|
1737
|
+
} = Ft(e, t), h = U("design-item-context"), P = U("toolbar-item-handler", () => {
|
|
1744
1738
|
});
|
|
1745
|
-
function
|
|
1739
|
+
function k() {
|
|
1746
1740
|
P && P();
|
|
1747
1741
|
}
|
|
1748
1742
|
function g(d) {
|
|
1749
1743
|
const r = {
|
|
1750
1744
|
"btn-group": !0,
|
|
1751
1745
|
"f-rt-dropdown": !0,
|
|
1752
|
-
"f-btn-ml":
|
|
1753
|
-
"f-btn-mr":
|
|
1754
|
-
},
|
|
1755
|
-
return
|
|
1746
|
+
"f-btn-ml": s.value === "right",
|
|
1747
|
+
"f-btn-mr": s.value === "left"
|
|
1748
|
+
}, o = d.dropdownClass.split(" ");
|
|
1749
|
+
return o && o.length && o.reduce((c, y) => (c[y] = !0, c), r), r;
|
|
1756
1750
|
}
|
|
1757
1751
|
function T(d) {
|
|
1758
1752
|
const r = {
|
|
@@ -1764,8 +1758,8 @@ function It(o, e, t) {
|
|
|
1764
1758
|
"btn-icontext": !!(d.icon && d.icon.trim())
|
|
1765
1759
|
};
|
|
1766
1760
|
if (d.class) {
|
|
1767
|
-
const
|
|
1768
|
-
|
|
1761
|
+
const o = d.class.split(" ");
|
|
1762
|
+
o && o.length && o.reduce((c, y) => (c[y] = !0, c), r);
|
|
1769
1763
|
}
|
|
1770
1764
|
return r;
|
|
1771
1765
|
}
|
|
@@ -1774,93 +1768,93 @@ function It(o, e, t) {
|
|
|
1774
1768
|
}
|
|
1775
1769
|
function a(d, r) {
|
|
1776
1770
|
l(d);
|
|
1777
|
-
const
|
|
1778
|
-
document.body.click(), r.expanded = !
|
|
1771
|
+
const o = r.expanded;
|
|
1772
|
+
document.body.click(), r.expanded = !o;
|
|
1779
1773
|
}
|
|
1780
|
-
const
|
|
1774
|
+
const f = function(d) {
|
|
1781
1775
|
const {
|
|
1782
1776
|
componentType: r
|
|
1783
|
-
} = d,
|
|
1784
|
-
return
|
|
1785
|
-
},
|
|
1777
|
+
} = d, o = z(r, d), c = r.toLowerCase().replace("-", "_");
|
|
1778
|
+
return o && !o.id && o.type === r && (o.id = `${c}_${Math.random().toString().slice(2, 6)}`), o;
|
|
1779
|
+
}, i = function() {
|
|
1786
1780
|
const d = {
|
|
1787
1781
|
componentType: "response-toolbar-item",
|
|
1788
1782
|
parentComponentInstance: t.value,
|
|
1789
1783
|
targetPosition: -1
|
|
1790
1784
|
};
|
|
1791
|
-
return
|
|
1785
|
+
return f(d);
|
|
1792
1786
|
};
|
|
1793
|
-
function
|
|
1794
|
-
const r =
|
|
1787
|
+
function C(d) {
|
|
1788
|
+
const r = h.schema.buttons || h.schema.contents, o = r == null ? void 0 : r.findIndex((y) => y.id === d), c = o === -1 ? null : r[o];
|
|
1795
1789
|
return {
|
|
1796
|
-
index:
|
|
1790
|
+
index: o,
|
|
1797
1791
|
toolbarItem: c
|
|
1798
1792
|
};
|
|
1799
1793
|
}
|
|
1800
1794
|
function w(d, r) {
|
|
1801
1795
|
var F;
|
|
1802
1796
|
const {
|
|
1803
|
-
index:
|
|
1797
|
+
index: o,
|
|
1804
1798
|
toolbarItem: c
|
|
1805
|
-
} =
|
|
1806
|
-
if (
|
|
1799
|
+
} = C(r);
|
|
1800
|
+
if (o === -1)
|
|
1807
1801
|
return;
|
|
1808
|
-
const y = c.text || "按钮",
|
|
1802
|
+
const y = c.text || "按钮", I = i(), x = Object.assign({}, I, {
|
|
1809
1803
|
text: y
|
|
1810
1804
|
});
|
|
1811
|
-
(F =
|
|
1805
|
+
(F = h.schema.buttons) == null || F.push(x), k();
|
|
1812
1806
|
}
|
|
1813
|
-
function
|
|
1807
|
+
function M(d, r) {
|
|
1814
1808
|
const {
|
|
1815
|
-
index:
|
|
1809
|
+
index: o,
|
|
1816
1810
|
toolbarItem: c
|
|
1817
|
-
} =
|
|
1818
|
-
if (
|
|
1811
|
+
} = C(r);
|
|
1812
|
+
if (o === -1)
|
|
1819
1813
|
return;
|
|
1820
|
-
const y = c.text || "按钮",
|
|
1814
|
+
const y = c.text || "按钮", I = i(), x = Object.assign({}, I, {
|
|
1821
1815
|
text: y
|
|
1822
|
-
}), F =
|
|
1823
|
-
F.push(
|
|
1816
|
+
}), F = h.schema.buttons[o].children || [];
|
|
1817
|
+
F.push(x), h.schema.buttons[o].children = F, k();
|
|
1824
1818
|
}
|
|
1825
1819
|
function R(d, r) {
|
|
1826
|
-
const
|
|
1827
|
-
c !== -1 && (
|
|
1820
|
+
const o = h.schema.buttons || h.schema.contents, c = o == null ? void 0 : o.findIndex((y) => y.id === r);
|
|
1821
|
+
c !== -1 && (o.splice(c, 1), k());
|
|
1828
1822
|
}
|
|
1829
1823
|
function S(d) {
|
|
1830
|
-
return
|
|
1824
|
+
return b("div", {
|
|
1831
1825
|
class: "component-btn-group"
|
|
1832
|
-
}, [
|
|
1826
|
+
}, [b("div", null, [b("div", {
|
|
1833
1827
|
role: "button",
|
|
1834
1828
|
class: "btn component-settings-button",
|
|
1835
1829
|
title: "删除",
|
|
1836
1830
|
ref: "removeButton",
|
|
1837
1831
|
style: "position:static;",
|
|
1838
1832
|
onClick: (r) => R(r, d)
|
|
1839
|
-
}, [
|
|
1833
|
+
}, [b("i", {
|
|
1840
1834
|
class: "f-icon f-icon-yxs_delete"
|
|
1841
|
-
}, null)]),
|
|
1835
|
+
}, null)]), b("div", {
|
|
1842
1836
|
role: "button",
|
|
1843
1837
|
class: "btn component-settings-button",
|
|
1844
1838
|
title: "复制",
|
|
1845
1839
|
ref: "copyButton",
|
|
1846
1840
|
style: "position:static;",
|
|
1847
1841
|
onClick: (r) => w(r, d)
|
|
1848
|
-
}, [
|
|
1842
|
+
}, [b("i", {
|
|
1849
1843
|
class: "f-icon f-icon-yxs_copy"
|
|
1850
|
-
}, null)]),
|
|
1844
|
+
}, null)]), b("div", {
|
|
1851
1845
|
role: "button",
|
|
1852
1846
|
class: "btn component-settings-button",
|
|
1853
1847
|
title: "新增子级",
|
|
1854
1848
|
ref: "appendChildButton",
|
|
1855
1849
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1856
|
-
onClick: (r) =>
|
|
1857
|
-
}, [
|
|
1850
|
+
onClick: (r) => M(r, d)
|
|
1851
|
+
}, [b("i", {
|
|
1858
1852
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1859
|
-
}, null),
|
|
1853
|
+
}, null), b("span", {
|
|
1860
1854
|
style: "font-size:13px;margin:auto"
|
|
1861
1855
|
}, [Y("新增子级")])])])]);
|
|
1862
1856
|
}
|
|
1863
|
-
function
|
|
1857
|
+
function A() {
|
|
1864
1858
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((r) => r.classList.remove("dgComponentFocused"));
|
|
1865
1859
|
const d = document.getElementsByClassName("dgComponentSelected");
|
|
1866
1860
|
Array.from(d).forEach((r) => r.classList.remove("dgComponentSelected"));
|
|
@@ -1868,61 +1862,61 @@ function It(o, e, t) {
|
|
|
1868
1862
|
function L(d) {
|
|
1869
1863
|
d.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1870
1864
|
}
|
|
1871
|
-
function
|
|
1865
|
+
function v(d) {
|
|
1872
1866
|
var y;
|
|
1873
|
-
const r =
|
|
1874
|
-
if (
|
|
1867
|
+
const r = h.schema.buttons || h.schema.contents, o = r == null ? void 0 : r.findIndex((I) => I.id === d);
|
|
1868
|
+
if (o === -1)
|
|
1875
1869
|
return;
|
|
1876
|
-
const c = r[
|
|
1877
|
-
(y =
|
|
1870
|
+
const c = r[o];
|
|
1871
|
+
(y = h == null ? void 0 : h.setupContext) == null || y.emit("selectionChange", "response-toolbar-item", c);
|
|
1878
1872
|
}
|
|
1879
|
-
function
|
|
1880
|
-
l(d),
|
|
1873
|
+
function m(d, r) {
|
|
1874
|
+
l(d), A(), L(d), l(d), a(d, r), v(r.id);
|
|
1881
1875
|
}
|
|
1882
1876
|
function D(d) {
|
|
1883
|
-
return
|
|
1877
|
+
return b("div", {
|
|
1884
1878
|
id: d.id,
|
|
1885
1879
|
class: g(d)
|
|
1886
|
-
}, [
|
|
1880
|
+
}, [b("div", {
|
|
1887
1881
|
class: T(d),
|
|
1888
1882
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1889
|
-
onClick: (r) => d.enable &&
|
|
1890
|
-
}, [S(d.id), e.shouldShowIcon(d) &&
|
|
1883
|
+
onClick: (r) => d.enable && m(r, d)
|
|
1884
|
+
}, [S(d.id), e.shouldShowIcon(d) && b("i", {
|
|
1891
1885
|
class: e.iconClass(d)
|
|
1892
|
-
}, null),
|
|
1886
|
+
}, null), b("span", null, [d.text]), b("i", {
|
|
1893
1887
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1894
1888
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1895
1889
|
}, null)]), p(d)]);
|
|
1896
1890
|
}
|
|
1897
1891
|
function j() {
|
|
1898
|
-
|
|
1892
|
+
u();
|
|
1899
1893
|
}
|
|
1900
1894
|
return {
|
|
1901
1895
|
renderToolbarDropdown: D,
|
|
1902
1896
|
clearAllDropDown: j
|
|
1903
1897
|
};
|
|
1904
1898
|
}
|
|
1905
|
-
function
|
|
1906
|
-
function
|
|
1907
|
-
var p,
|
|
1899
|
+
function Ot() {
|
|
1900
|
+
function n(e) {
|
|
1901
|
+
var p, u;
|
|
1908
1902
|
if (!e)
|
|
1909
1903
|
return !1;
|
|
1910
1904
|
const t = ((p = e.targetContainer) == null ? void 0 : p.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1911
1905
|
if (!t)
|
|
1912
1906
|
return !1;
|
|
1913
|
-
const
|
|
1907
|
+
const s = (u = t.schema.appearance) == null ? void 0 : u.class;
|
|
1914
1908
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1915
|
-
const
|
|
1909
|
+
const h = t.schema.type, P = (h === "response-form" || h === "content-container") && s && s.includes("farris-form");
|
|
1916
1910
|
if (t.schema.type !== "response-layout-item" && !P)
|
|
1917
1911
|
return !1;
|
|
1918
1912
|
}
|
|
1919
1913
|
return e.controlType !== "field-set";
|
|
1920
1914
|
}
|
|
1921
1915
|
return {
|
|
1922
|
-
basalDragulaRuleForContainer:
|
|
1916
|
+
basalDragulaRuleForContainer: n
|
|
1923
1917
|
};
|
|
1924
1918
|
}
|
|
1925
|
-
const
|
|
1919
|
+
const Lt = "https://json-schema.org/draft/2020-12/schema", Nt = "https://farris-design.gitee.io/dragging-rules.schema.json", $t = "Dragging Rules", Vt = "The rules of designer canvas", _t = "object", Ut = {
|
|
1926
1920
|
"f-page": {
|
|
1927
1921
|
description: "The root class of page designed by farris.",
|
|
1928
1922
|
type: "object",
|
|
@@ -2486,106 +2480,106 @@ const Rt = "https://json-schema.org/draft/2020-12/schema", Ot = "https://farris-
|
|
|
2486
2480
|
description: "",
|
|
2487
2481
|
type: "object"
|
|
2488
2482
|
}
|
|
2489
|
-
},
|
|
2490
|
-
$schema:
|
|
2491
|
-
$id:
|
|
2492
|
-
title:
|
|
2493
|
-
description:
|
|
2494
|
-
type:
|
|
2495
|
-
properties:
|
|
2496
|
-
required:
|
|
2483
|
+
}, Wt = [], zt = {
|
|
2484
|
+
$schema: Lt,
|
|
2485
|
+
$id: Nt,
|
|
2486
|
+
title: $t,
|
|
2487
|
+
description: Vt,
|
|
2488
|
+
type: _t,
|
|
2489
|
+
properties: Ut,
|
|
2490
|
+
required: Wt
|
|
2497
2491
|
}, oe = /* @__PURE__ */ new Map();
|
|
2498
2492
|
function Ee() {
|
|
2499
|
-
function
|
|
2493
|
+
function n(i, C, w, M) {
|
|
2500
2494
|
var R;
|
|
2501
2495
|
if (typeof w == "number")
|
|
2502
|
-
return ((R =
|
|
2496
|
+
return ((R = M[i]) == null ? void 0 : R.length) === w;
|
|
2503
2497
|
if (typeof w == "object") {
|
|
2504
|
-
const S = Object.keys(w)[0],
|
|
2498
|
+
const S = Object.keys(w)[0], A = w[S];
|
|
2505
2499
|
if (S === "not")
|
|
2506
|
-
return Number(
|
|
2500
|
+
return Number(M[i].length) !== Number(A);
|
|
2507
2501
|
if (S === "moreThan")
|
|
2508
|
-
return Number(
|
|
2502
|
+
return Number(M[i].length) >= Number(A);
|
|
2509
2503
|
if (S === "lessThan")
|
|
2510
|
-
return Number(
|
|
2504
|
+
return Number(M[i].length) <= Number(A);
|
|
2511
2505
|
}
|
|
2512
2506
|
return !1;
|
|
2513
2507
|
}
|
|
2514
|
-
function e(
|
|
2515
|
-
return typeof w == "boolean" ?
|
|
2508
|
+
function e(i, C, w, M) {
|
|
2509
|
+
return typeof w == "boolean" ? M.childrenClassList.includes(C) === !!w : !1;
|
|
2516
2510
|
}
|
|
2517
|
-
function t(
|
|
2518
|
-
return typeof w == "boolean" ?
|
|
2511
|
+
function t(i, C, w, M) {
|
|
2512
|
+
return typeof w == "boolean" ? M.parentClassList.includes(C) === !!w : !1;
|
|
2519
2513
|
}
|
|
2520
|
-
function i
|
|
2521
|
-
return typeof w == "boolean" ?
|
|
2514
|
+
function s(i, C, w, M) {
|
|
2515
|
+
return typeof w == "boolean" ? M.parentClassList.includes(C) === !!w : !1;
|
|
2522
2516
|
}
|
|
2523
2517
|
const p = /* @__PURE__ */ new Map([
|
|
2524
|
-
["length",
|
|
2518
|
+
["length", n],
|
|
2525
2519
|
["hasChildren", e],
|
|
2526
|
-
["hasSibling",
|
|
2520
|
+
["hasSibling", s],
|
|
2527
2521
|
["hasParent", t]
|
|
2528
2522
|
]);
|
|
2529
|
-
function
|
|
2530
|
-
const w =
|
|
2531
|
-
return typeof
|
|
2532
|
-
if (
|
|
2533
|
-
return { target: w, operator: "length", param: null, value:
|
|
2534
|
-
const R =
|
|
2535
|
-
return { target: w, operator:
|
|
2523
|
+
function u(i, C) {
|
|
2524
|
+
const w = i;
|
|
2525
|
+
return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((M) => {
|
|
2526
|
+
if (M === "length")
|
|
2527
|
+
return { target: w, operator: "length", param: null, value: C[M] };
|
|
2528
|
+
const R = M, S = C[M];
|
|
2529
|
+
return { target: w, operator: i === "children" ? "hasChildren" : i === "parent" ? "hasParent" : "hasSibling", param: R, value: S };
|
|
2536
2530
|
}) : [];
|
|
2537
2531
|
}
|
|
2538
|
-
function
|
|
2539
|
-
if (p.has(
|
|
2540
|
-
const w = p.get(
|
|
2541
|
-
return w && w(
|
|
2532
|
+
function h(i, C) {
|
|
2533
|
+
if (p.has(i.operator)) {
|
|
2534
|
+
const w = p.get(i.operator);
|
|
2535
|
+
return w && w(i.target, i.param, i.value, C) || !1;
|
|
2542
2536
|
}
|
|
2543
2537
|
return !1;
|
|
2544
2538
|
}
|
|
2545
|
-
function P(
|
|
2546
|
-
return Object.keys(
|
|
2547
|
-
const L =
|
|
2539
|
+
function P(i, C) {
|
|
2540
|
+
return Object.keys(i).reduce((S, A) => {
|
|
2541
|
+
const L = u(A, i[A]);
|
|
2548
2542
|
return S.push(...L), S;
|
|
2549
|
-
}, []).reduce((S,
|
|
2543
|
+
}, []).reduce((S, A) => S && h(A, C), !0);
|
|
2550
2544
|
}
|
|
2551
|
-
function
|
|
2552
|
-
const w = Object.keys(
|
|
2553
|
-
return
|
|
2545
|
+
function k(i, C) {
|
|
2546
|
+
const w = Object.keys(i), M = w.includes("allOf"), R = w.includes("anyOf"), S = M || R, v = (S ? i[S ? M ? "allOf" : "anyOf" : "allOf"] : [i]).map((D) => P(D, C));
|
|
2547
|
+
return M ? !v.includes(!1) : v.includes(!0);
|
|
2554
2548
|
}
|
|
2555
|
-
function g(
|
|
2556
|
-
const w =
|
|
2557
|
-
return w ? typeof w == "boolean" ? w : typeof w == "object" ?
|
|
2549
|
+
function g(i, C) {
|
|
2550
|
+
const w = i.const;
|
|
2551
|
+
return w ? typeof w == "boolean" ? w : typeof w == "object" ? k(w, C) : !1 : !1;
|
|
2558
2552
|
}
|
|
2559
|
-
function T(
|
|
2560
|
-
return (
|
|
2553
|
+
function T(i) {
|
|
2554
|
+
return (C) => {
|
|
2561
2555
|
const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2562
|
-
return
|
|
2563
|
-
const S =
|
|
2564
|
-
return
|
|
2556
|
+
return i && i.properties && Object.keys(i.properties).reduce((M, R) => {
|
|
2557
|
+
const S = i.properties[R];
|
|
2558
|
+
return M[R] = g(S, C), M;
|
|
2565
2559
|
}, w), w;
|
|
2566
2560
|
};
|
|
2567
2561
|
}
|
|
2568
|
-
function l(
|
|
2569
|
-
if (
|
|
2570
|
-
const { rules:
|
|
2571
|
-
w.set(
|
|
2562
|
+
function l(i, C, w) {
|
|
2563
|
+
if (C.type === "object" && C.properties) {
|
|
2564
|
+
const { rules: M, contents: R } = C.properties;
|
|
2565
|
+
w.set(i, T(M)), R && Object.keys(R.properties).forEach(
|
|
2572
2566
|
(S) => l(S, R.properties[S], w)
|
|
2573
2567
|
);
|
|
2574
2568
|
}
|
|
2575
2569
|
}
|
|
2576
2570
|
function a() {
|
|
2577
|
-
const { properties:
|
|
2578
|
-
Object.keys(
|
|
2579
|
-
l(
|
|
2571
|
+
const { properties: i } = zt;
|
|
2572
|
+
Object.keys(i).forEach((C) => {
|
|
2573
|
+
l(C, i[C], oe);
|
|
2580
2574
|
});
|
|
2581
2575
|
}
|
|
2582
|
-
function
|
|
2576
|
+
function f(i, C) {
|
|
2583
2577
|
const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2584
|
-
return oe.has(
|
|
2578
|
+
return oe.has(i) ? oe.get(i)(C) : w;
|
|
2585
2579
|
}
|
|
2586
|
-
return a(), { getRuleValue:
|
|
2580
|
+
return a(), { getRuleValue: f };
|
|
2587
2581
|
}
|
|
2588
|
-
class
|
|
2582
|
+
class Ht extends J {
|
|
2589
2583
|
constructor(e, t) {
|
|
2590
2584
|
super(e, t);
|
|
2591
2585
|
}
|
|
@@ -2609,7 +2603,9 @@ class Wt extends J {
|
|
|
2609
2603
|
description: "The type of a component.",
|
|
2610
2604
|
editor: {
|
|
2611
2605
|
type: "combo-list",
|
|
2612
|
-
|
|
2606
|
+
textField: "value",
|
|
2607
|
+
valueField: "key",
|
|
2608
|
+
data: [{ key: "response-toolbar", value: E["response-toolbar"].name }]
|
|
2613
2609
|
}
|
|
2614
2610
|
}
|
|
2615
2611
|
}
|
|
@@ -2652,54 +2648,54 @@ class Wt extends J {
|
|
|
2652
2648
|
};
|
|
2653
2649
|
}
|
|
2654
2650
|
}
|
|
2655
|
-
function
|
|
2656
|
-
const p = Ee(),
|
|
2657
|
-
let P = !0,
|
|
2658
|
-
function T(
|
|
2659
|
-
return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ?
|
|
2651
|
+
function qt(n, e, t, s) {
|
|
2652
|
+
const p = Ee(), u = B(!1), h = B(!1);
|
|
2653
|
+
let P = !0, k = !1, g;
|
|
2654
|
+
function T(v) {
|
|
2655
|
+
return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ? v.sourceType === "control" && v.controlCategory === "input" || v.sourceType === "move" && v.controlType === "form-group" : !0;
|
|
2660
2656
|
}
|
|
2661
|
-
function l(
|
|
2662
|
-
return !
|
|
2657
|
+
function l(v) {
|
|
2658
|
+
return !Ot().basalDragulaRuleForContainer(v) || !P || !T(v), !1;
|
|
2663
2659
|
}
|
|
2664
2660
|
function a() {
|
|
2665
|
-
|
|
2666
|
-
const
|
|
2661
|
+
u.value = !1, h.value = !1;
|
|
2662
|
+
const v = n, m = v.appearance && v.appearance.class || "", D = m.split(" "), j = v.buttons || [], d = j.length ? j[0] : null, r = d && d.appearance ? d.appearance.class : "", o = r ? r.split(" ") : [], c = j.length ? j.reduce(($, W) => {
|
|
2667
2663
|
const H = W && W.appearance ? W.appearance.class : "", ee = H ? H.split(" ") : [];
|
|
2668
2664
|
return $.push(...ee), $;
|
|
2669
|
-
}, []) : [], y = t == null ? void 0 : t.schema,
|
|
2665
|
+
}, []) : [], y = t == null ? void 0 : t.schema, I = y && y.appearance && y.appearance.class || "", x = I ? I.split(" ") : [];
|
|
2670
2666
|
g = {
|
|
2671
|
-
componentClass:
|
|
2667
|
+
componentClass: m,
|
|
2672
2668
|
componentClassList: D,
|
|
2673
2669
|
childContents: j,
|
|
2674
2670
|
firstChildContent: d,
|
|
2675
2671
|
firstChildClass: r,
|
|
2676
|
-
firstChildClassList:
|
|
2672
|
+
firstChildClassList: o,
|
|
2677
2673
|
parent: y,
|
|
2678
|
-
parentClass:
|
|
2679
|
-
parentClassList:
|
|
2674
|
+
parentClass: I,
|
|
2675
|
+
parentClassList: x,
|
|
2680
2676
|
children: j,
|
|
2681
2677
|
childrenClassList: c
|
|
2682
2678
|
};
|
|
2683
2679
|
const { canAccept: F, fixed: _, hidePadding: N } = p.getRuleValue(D[0], g);
|
|
2684
|
-
return P = F,
|
|
2680
|
+
return P = F, k = N, !0;
|
|
2685
2681
|
}
|
|
2686
|
-
function
|
|
2682
|
+
function f(v) {
|
|
2687
2683
|
}
|
|
2688
|
-
function
|
|
2689
|
-
return
|
|
2684
|
+
function i() {
|
|
2685
|
+
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2690
2686
|
}
|
|
2691
|
-
function v
|
|
2692
|
-
return
|
|
2687
|
+
function C(v, m) {
|
|
2688
|
+
return m.text = v.label, m;
|
|
2693
2689
|
}
|
|
2694
|
-
function w(
|
|
2695
|
-
const j =
|
|
2690
|
+
function w(v, m, D) {
|
|
2691
|
+
const j = n;
|
|
2696
2692
|
if ((j.appearance && j.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2697
|
-
const
|
|
2698
|
-
return c.editor = D, c.label =
|
|
2693
|
+
const o = String(v.innerText), c = z("form-group");
|
|
2694
|
+
return c.editor = D, c.label = o, c;
|
|
2699
2695
|
}
|
|
2700
2696
|
return D;
|
|
2701
2697
|
}
|
|
2702
|
-
function
|
|
2698
|
+
function M() {
|
|
2703
2699
|
return !1;
|
|
2704
2700
|
}
|
|
2705
2701
|
function R() {
|
|
@@ -2708,29 +2704,29 @@ function zt(o, e, t, i) {
|
|
|
2708
2704
|
function S() {
|
|
2709
2705
|
return !0;
|
|
2710
2706
|
}
|
|
2711
|
-
function
|
|
2712
|
-
return
|
|
2707
|
+
function A() {
|
|
2708
|
+
return k;
|
|
2713
2709
|
}
|
|
2714
|
-
function L(
|
|
2715
|
-
return new
|
|
2710
|
+
function L(v) {
|
|
2711
|
+
return new Ht(v, e).getPropertyConfig(n);
|
|
2716
2712
|
}
|
|
2717
2713
|
return {
|
|
2718
2714
|
canAccepts: l,
|
|
2719
2715
|
checkCanAddComponent: S,
|
|
2720
2716
|
checkCanDeleteComponent: R,
|
|
2721
|
-
checkCanMoveComponent:
|
|
2722
|
-
getStyles:
|
|
2723
|
-
hideNestedPaddingInDesginerView:
|
|
2717
|
+
checkCanMoveComponent: M,
|
|
2718
|
+
getStyles: i,
|
|
2719
|
+
hideNestedPaddingInDesginerView: A,
|
|
2724
2720
|
onAcceptNewChildElement: w,
|
|
2725
|
-
onAcceptMovedChildElement:
|
|
2726
|
-
onResolveNewComponentSchema:
|
|
2721
|
+
onAcceptMovedChildElement: f,
|
|
2722
|
+
onResolveNewComponentSchema: C,
|
|
2727
2723
|
resolveComponentContext: a,
|
|
2728
2724
|
getPropsConfig: L,
|
|
2729
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2730
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2725
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
2726
|
+
triggerBelongedComponentToDeleteWhenDeleted: h
|
|
2731
2727
|
};
|
|
2732
2728
|
}
|
|
2733
|
-
const
|
|
2729
|
+
const Gt = {
|
|
2734
2730
|
id: { type: String, default: "" },
|
|
2735
2731
|
componentId: { type: String, default: "" },
|
|
2736
2732
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2744,45 +2740,45 @@ const Ht = {
|
|
|
2744
2740
|
*/
|
|
2745
2741
|
modelValue: { type: Object }
|
|
2746
2742
|
}, Z = B(0);
|
|
2747
|
-
function
|
|
2748
|
-
const t = e.getBoundingClientRect(),
|
|
2749
|
-
return p &&
|
|
2743
|
+
function Qt(n, e) {
|
|
2744
|
+
const t = e.getBoundingClientRect(), s = n.getBoundingClientRect(), p = s.top >= t.top, u = s.top <= t.bottom;
|
|
2745
|
+
return p && u;
|
|
2750
2746
|
}
|
|
2751
|
-
function
|
|
2752
|
-
if (!
|
|
2747
|
+
function Xt(n) {
|
|
2748
|
+
if (!n)
|
|
2753
2749
|
return;
|
|
2754
2750
|
let e;
|
|
2755
|
-
if (
|
|
2751
|
+
if (n.className.includes("dgComponentSelected") ? e = n : e = n.querySelector(".dgComponentSelected"), !e)
|
|
2756
2752
|
return;
|
|
2757
2753
|
const t = e.getBoundingClientRect();
|
|
2758
2754
|
if (t.width === 0 && t.height === 0)
|
|
2759
2755
|
return;
|
|
2760
|
-
const
|
|
2761
|
-
if (
|
|
2762
|
-
if (!
|
|
2763
|
-
|
|
2756
|
+
const s = e.querySelector(".component-btn-group");
|
|
2757
|
+
if (s) {
|
|
2758
|
+
if (!Qt(e, n)) {
|
|
2759
|
+
s.style.display = "none";
|
|
2764
2760
|
return;
|
|
2765
2761
|
}
|
|
2766
|
-
|
|
2767
|
-
const
|
|
2768
|
-
if (
|
|
2769
|
-
const P =
|
|
2770
|
-
|
|
2762
|
+
s.style.display = "";
|
|
2763
|
+
const u = s.getBoundingClientRect(), h = s.querySelector("div");
|
|
2764
|
+
if (h) {
|
|
2765
|
+
const P = h.getBoundingClientRect();
|
|
2766
|
+
h.style.top = u.top + "px", h.style.left = u.left - P.width + "px";
|
|
2771
2767
|
}
|
|
2772
2768
|
}
|
|
2773
2769
|
}
|
|
2774
|
-
function
|
|
2770
|
+
function Yt(n, e, t) {
|
|
2775
2771
|
var L;
|
|
2776
|
-
function
|
|
2772
|
+
function s() {
|
|
2777
2773
|
}
|
|
2778
|
-
const p = "",
|
|
2779
|
-
function
|
|
2774
|
+
const p = "", u = B();
|
|
2775
|
+
function h() {
|
|
2780
2776
|
return !0;
|
|
2781
2777
|
}
|
|
2782
2778
|
function P() {
|
|
2783
2779
|
return !1;
|
|
2784
2780
|
}
|
|
2785
|
-
function
|
|
2781
|
+
function k() {
|
|
2786
2782
|
return !0;
|
|
2787
2783
|
}
|
|
2788
2784
|
function g() {
|
|
@@ -2791,204 +2787,206 @@ function Qt(o, e, t) {
|
|
|
2791
2787
|
function T() {
|
|
2792
2788
|
return !0;
|
|
2793
2789
|
}
|
|
2794
|
-
function l(
|
|
2795
|
-
if (!
|
|
2790
|
+
function l(v) {
|
|
2791
|
+
if (!v || !v.value)
|
|
2796
2792
|
return null;
|
|
2797
|
-
const
|
|
2793
|
+
const m = B(v == null ? void 0 : v.value.parent), D = l(m);
|
|
2798
2794
|
return D || null;
|
|
2799
2795
|
}
|
|
2800
|
-
function a(
|
|
2801
|
-
const { componentInstance:
|
|
2802
|
-
return !
|
|
2796
|
+
function a(v = e) {
|
|
2797
|
+
const { componentInstance: m, designerItemElementRef: D } = v;
|
|
2798
|
+
return !m || !m.value ? null : m.value.canMove || m.value.canAdd || m.value.canDelete ? D : a(v.parent);
|
|
2803
2799
|
}
|
|
2804
|
-
function
|
|
2800
|
+
function f(v) {
|
|
2805
2801
|
return !!t;
|
|
2806
2802
|
}
|
|
2807
|
-
function
|
|
2803
|
+
function i() {
|
|
2808
2804
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2809
2805
|
}
|
|
2810
|
-
function
|
|
2806
|
+
function C() {
|
|
2811
2807
|
}
|
|
2812
|
-
function w(
|
|
2808
|
+
function w(v, m) {
|
|
2813
2809
|
}
|
|
2814
|
-
function
|
|
2815
|
-
const { componentType:
|
|
2816
|
-
let D = z(
|
|
2817
|
-
const j =
|
|
2818
|
-
return D && !D.id && D.type ===
|
|
2810
|
+
function M(v) {
|
|
2811
|
+
const { componentType: m } = v;
|
|
2812
|
+
let D = z(m, v);
|
|
2813
|
+
const j = m.toLowerCase().replace("-", "_");
|
|
2814
|
+
return D && !D.id && D.type === m && (D.id = `${j}_${Math.random().toString().slice(2, 6)}`), D;
|
|
2819
2815
|
}
|
|
2820
|
-
function R(
|
|
2821
|
-
const D = String(
|
|
2822
|
-
d.parentComponentInstance =
|
|
2816
|
+
function R(v, m) {
|
|
2817
|
+
const D = String(v.getAttribute("data-controltype")), j = v.getAttribute("data-feature"), d = j ? JSON.parse(j) : {};
|
|
2818
|
+
d.parentComponentInstance = u.value;
|
|
2823
2819
|
let r = z(D, d);
|
|
2824
|
-
const
|
|
2825
|
-
return r && !r.id && r.type === D && (r.id = `${
|
|
2820
|
+
const o = D.toLowerCase().replace("-", "_");
|
|
2821
|
+
return r && !r.id && r.type === D && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
|
|
2826
2822
|
}
|
|
2827
|
-
function S(
|
|
2823
|
+
function S(v) {
|
|
2828
2824
|
}
|
|
2829
|
-
function
|
|
2825
|
+
function A(...v) {
|
|
2830
2826
|
return [];
|
|
2831
2827
|
}
|
|
2832
|
-
return
|
|
2833
|
-
canMove:
|
|
2828
|
+
return u.value = {
|
|
2829
|
+
canMove: h(),
|
|
2834
2830
|
canSelectParent: P(),
|
|
2835
2831
|
canAdd: g(),
|
|
2836
|
-
canDelete:
|
|
2832
|
+
canDelete: k(),
|
|
2837
2833
|
canNested: !T(),
|
|
2838
2834
|
contents: [],
|
|
2839
|
-
elementRef:
|
|
2835
|
+
elementRef: n,
|
|
2840
2836
|
parent: (L = e.parent) == null ? void 0 : L.componentInstance,
|
|
2841
2837
|
schema: e.schema,
|
|
2842
2838
|
styles: p,
|
|
2843
|
-
canAccepts:
|
|
2839
|
+
canAccepts: f,
|
|
2844
2840
|
getBelongedComponentInstance: l,
|
|
2845
2841
|
getDraggableDesignItemElement: a,
|
|
2846
|
-
getDraggingDisplayText:
|
|
2847
|
-
getPropConfig:
|
|
2848
|
-
getDragScopeElement:
|
|
2842
|
+
getDraggingDisplayText: i,
|
|
2843
|
+
getPropConfig: A,
|
|
2844
|
+
getDragScopeElement: C,
|
|
2849
2845
|
onAcceptMovedChildElement: w,
|
|
2850
2846
|
onAcceptNewChildElement: R,
|
|
2851
2847
|
onChildElementMovedOut: S,
|
|
2852
|
-
addNewChildComponentSchema:
|
|
2853
|
-
updateDragAndDropRules:
|
|
2848
|
+
addNewChildComponentSchema: M,
|
|
2849
|
+
updateDragAndDropRules: s,
|
|
2854
2850
|
triggerBelongedComponentToMoveWhenMoved: B(!1),
|
|
2855
2851
|
triggerBelongedComponentToDeleteWhenDeleted: B(!1)
|
|
2856
|
-
},
|
|
2852
|
+
}, u;
|
|
2857
2853
|
}
|
|
2858
2854
|
const Be = /* @__PURE__ */ G({
|
|
2859
2855
|
name: "FDesignerInnerItem",
|
|
2860
|
-
props:
|
|
2856
|
+
props: Gt,
|
|
2861
2857
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2862
|
-
setup(
|
|
2863
|
-
const t = B(
|
|
2858
|
+
setup(n, e) {
|
|
2859
|
+
const t = B(n.canMove), s = B(n.canAdd), p = B(n.canDelete), u = B(!1), h = B(n.contentKey), P = B(n.childType), k = B(n.childLabel), g = B(n.modelValue), T = B(""), l = B(), a = U("canvas-dragula"), f = B(), i = U("design-item-context"), C = {
|
|
2864
2860
|
designerItemElementRef: l,
|
|
2865
|
-
componentInstance:
|
|
2861
|
+
componentInstance: f,
|
|
2866
2862
|
schema: g.value,
|
|
2867
|
-
parent:
|
|
2863
|
+
parent: i,
|
|
2868
2864
|
setupContext: e
|
|
2869
2865
|
};
|
|
2870
|
-
Le("design-item-context",
|
|
2866
|
+
Le("design-item-context", C);
|
|
2871
2867
|
const w = V(() => ({
|
|
2872
2868
|
"farris-component": !0,
|
|
2869
|
+
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2870
|
+
"flex-fill": n.id == "root-component",
|
|
2873
2871
|
"position-relative": t.value || p.value,
|
|
2874
|
-
"farris-nested":
|
|
2872
|
+
"farris-nested": u.value,
|
|
2875
2873
|
"can-move": t.value,
|
|
2876
2874
|
"d-none": l.value && l.value.classList.contains("d-none")
|
|
2877
|
-
})),
|
|
2878
|
-
const
|
|
2875
|
+
})), M = V(() => {
|
|
2876
|
+
const o = {};
|
|
2879
2877
|
return T.value && T.value.split(";").reduce((c, y) => {
|
|
2880
|
-
const [
|
|
2881
|
-
return
|
|
2882
|
-
},
|
|
2878
|
+
const [I, x] = y.split(":");
|
|
2879
|
+
return I && (c[I] = x), c;
|
|
2880
|
+
}, o), o;
|
|
2883
2881
|
});
|
|
2884
|
-
function R(
|
|
2885
|
-
if (
|
|
2886
|
-
const y =
|
|
2882
|
+
function R(o, c) {
|
|
2883
|
+
if (i && i.schema[h.value]) {
|
|
2884
|
+
const y = i.schema[h.value].findIndex((I) => I.id === c.id);
|
|
2887
2885
|
if (y > -1) {
|
|
2888
|
-
const
|
|
2889
|
-
|
|
2886
|
+
const I = i.schema[h.value].length, x = i.schema[h.value][y % I];
|
|
2887
|
+
i.designerItemElementRef.value.querySelector(`#${x.id}-design-item`), i.schema[h.value].splice(y, 1), i.componentInstance.value.updateDragAndDropRules(), Z.value++, e.emit("removeComponent");
|
|
2890
2888
|
}
|
|
2891
2889
|
}
|
|
2892
2890
|
}
|
|
2893
|
-
function S(
|
|
2894
|
-
if (
|
|
2891
|
+
function S(o) {
|
|
2892
|
+
if (f.value.addNewChildComponentSchema) {
|
|
2895
2893
|
const c = {
|
|
2896
2894
|
componentType: P.value,
|
|
2897
|
-
label:
|
|
2898
|
-
parentComponentInstance:
|
|
2895
|
+
label: k.value,
|
|
2896
|
+
parentComponentInstance: f.value,
|
|
2899
2897
|
targetPosition: -1
|
|
2900
|
-
}, y =
|
|
2901
|
-
g.value[
|
|
2898
|
+
}, y = f.value.addNewChildComponentSchema(c);
|
|
2899
|
+
g.value[h.value].push(y), e.emit("addComponent");
|
|
2902
2900
|
}
|
|
2903
2901
|
}
|
|
2904
|
-
function
|
|
2905
|
-
return
|
|
2902
|
+
function A() {
|
|
2903
|
+
return s.value && b("div", {
|
|
2906
2904
|
role: "button",
|
|
2907
2905
|
class: "btn component-settings-button",
|
|
2908
2906
|
title: "新增",
|
|
2909
2907
|
ref: "removeComponent",
|
|
2910
|
-
onClick: (
|
|
2908
|
+
onClick: (o) => {
|
|
2911
2909
|
S();
|
|
2912
2910
|
}
|
|
2913
|
-
}, [
|
|
2911
|
+
}, [b("i", {
|
|
2914
2912
|
class: "f-icon f-icon-plus-circle"
|
|
2915
2913
|
}, null)]);
|
|
2916
2914
|
}
|
|
2917
|
-
function L(
|
|
2918
|
-
return p.value &&
|
|
2915
|
+
function L(o) {
|
|
2916
|
+
return p.value && b("div", {
|
|
2919
2917
|
role: "button",
|
|
2920
2918
|
class: "btn component-settings-button",
|
|
2921
2919
|
title: "删除",
|
|
2922
2920
|
ref: "removeComponent",
|
|
2923
|
-
onClick: $e((c) => R(c,
|
|
2924
|
-
}, [
|
|
2921
|
+
onClick: $e((c) => R(c, o), ["stop"])
|
|
2922
|
+
}, [b("i", {
|
|
2925
2923
|
class: "f-icon f-icon-yxs_delete"
|
|
2926
2924
|
}, null)]);
|
|
2927
2925
|
}
|
|
2928
|
-
function
|
|
2929
|
-
return t.value &&
|
|
2926
|
+
function v() {
|
|
2927
|
+
return t.value && b("div", {
|
|
2930
2928
|
role: "button",
|
|
2931
2929
|
class: "btn component-settings-button",
|
|
2932
2930
|
title: "移动",
|
|
2933
2931
|
ref: "moveComponent"
|
|
2934
|
-
}, [
|
|
2932
|
+
}, [b("i", {
|
|
2935
2933
|
"data-dragging-icon": "true",
|
|
2936
2934
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2937
2935
|
}, null)]);
|
|
2938
2936
|
}
|
|
2939
|
-
function
|
|
2940
|
-
return
|
|
2937
|
+
function m(o) {
|
|
2938
|
+
return b("div", {
|
|
2941
2939
|
class: "component-btn-group",
|
|
2942
2940
|
"data-noattach": "true"
|
|
2943
|
-
}, [
|
|
2941
|
+
}, [b("div", null, [A(), v(), L(o)])]);
|
|
2944
2942
|
}
|
|
2945
|
-
Q(() =>
|
|
2946
|
-
g.value =
|
|
2943
|
+
Q(() => n.modelValue, (o) => {
|
|
2944
|
+
g.value = o, C.schema = o;
|
|
2947
2945
|
});
|
|
2948
|
-
function D(
|
|
2949
|
-
const c =
|
|
2950
|
-
|
|
2946
|
+
function D(o) {
|
|
2947
|
+
const c = o.target;
|
|
2948
|
+
Xt(c);
|
|
2951
2949
|
}
|
|
2952
2950
|
function j() {
|
|
2953
|
-
var
|
|
2954
|
-
(c = (
|
|
2951
|
+
var o, c;
|
|
2952
|
+
(c = (o = g.value) == null ? void 0 : o.contents) != null && c.length && l.value && l.value.addEventListener("scroll", D);
|
|
2955
2953
|
}
|
|
2956
2954
|
function d() {
|
|
2957
|
-
const
|
|
2958
|
-
return
|
|
2955
|
+
const o = l.value, c = B(o.children[1]);
|
|
2956
|
+
return Yt(c, C).value;
|
|
2959
2957
|
}
|
|
2960
2958
|
q(() => {
|
|
2961
2959
|
if (l.value) {
|
|
2962
|
-
const
|
|
2963
|
-
|
|
2960
|
+
const o = l.value.querySelector(`[data-dragref='${g.value.id}-container']`);
|
|
2961
|
+
f.value = o && o.componentInstance ? o.componentInstance.value : d(), a && o && a.attachComponents(o, g.value), u.value = f.value.canNested !== void 0 ? f.value.canNested : u.value, s.value = f.value.canAdd !== void 0 ? f.value.canAdd : s.value, p.value = f.value.canDelete !== void 0 ? f.value.canDelete : p.value, t.value = f.value.canMove !== void 0 ? f.value.canMove : t.value, T.value = f.value.styles || "", l.value && (l.value.componentInstance = f, l.value.designItemContext = C);
|
|
2964
2962
|
}
|
|
2965
2963
|
j(), Z.value++;
|
|
2966
2964
|
}), Ne(() => {
|
|
2967
2965
|
l.value && l.value.removeEventListener("scroll", D);
|
|
2968
2966
|
});
|
|
2969
|
-
function r(
|
|
2970
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((y) => y.classList.remove("dgComponentFocused")),
|
|
2967
|
+
function r(o) {
|
|
2968
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((y) => y.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
|
|
2971
2969
|
const c = l.value;
|
|
2972
2970
|
if (c) {
|
|
2973
2971
|
const y = document.getElementsByClassName("dgComponentSelected");
|
|
2974
2972
|
if (!(y && y.length === 1 && y[0] === l.value)) {
|
|
2975
|
-
Array.from(y).forEach((F) => F.classList.remove("dgComponentSelected")), c.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value,
|
|
2976
|
-
const
|
|
2977
|
-
|
|
2973
|
+
Array.from(y).forEach((F) => F.classList.remove("dgComponentSelected")), c.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, n.componentId, f.value);
|
|
2974
|
+
const x = f.value.getDraggableDesignItemElement(C);
|
|
2975
|
+
x && x.value && x.value.classList.add("dgComponentSelected");
|
|
2978
2976
|
}
|
|
2979
2977
|
}
|
|
2980
2978
|
Z.value++;
|
|
2981
2979
|
}
|
|
2982
|
-
return () =>
|
|
2983
|
-
id: `${
|
|
2980
|
+
return () => b("div", {
|
|
2981
|
+
id: `${n.id}-design-item`,
|
|
2984
2982
|
ref: l,
|
|
2985
2983
|
class: w.value,
|
|
2986
|
-
style:
|
|
2984
|
+
style: M.value,
|
|
2987
2985
|
onClick: r
|
|
2988
|
-
}, [
|
|
2986
|
+
}, [m(g.value), e.slots.default && e.slots.default()]);
|
|
2989
2987
|
}
|
|
2990
2988
|
});
|
|
2991
|
-
class
|
|
2989
|
+
class Zt extends J {
|
|
2992
2990
|
constructor(e, t) {
|
|
2993
2991
|
super(e, t);
|
|
2994
2992
|
}
|
|
@@ -3039,7 +3037,7 @@ class Xt extends J {
|
|
|
3039
3037
|
title: "style样式"
|
|
3040
3038
|
}
|
|
3041
3039
|
},
|
|
3042
|
-
setPropertyRelates(t,
|
|
3040
|
+
setPropertyRelates(t, s) {
|
|
3043
3041
|
}
|
|
3044
3042
|
};
|
|
3045
3043
|
}
|
|
@@ -3050,9 +3048,9 @@ class Xt extends J {
|
|
|
3050
3048
|
name: "点击事件"
|
|
3051
3049
|
}
|
|
3052
3050
|
];
|
|
3053
|
-
var
|
|
3054
|
-
const p =
|
|
3055
|
-
|
|
3051
|
+
var s = this;
|
|
3052
|
+
const p = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), u = {};
|
|
3053
|
+
u[s.viewModelId] = {
|
|
3056
3054
|
type: "events-editor",
|
|
3057
3055
|
editor: {
|
|
3058
3056
|
initialData: p
|
|
@@ -3060,19 +3058,19 @@ class Xt extends J {
|
|
|
3060
3058
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3061
3059
|
title: "事件",
|
|
3062
3060
|
hideTitle: !0,
|
|
3063
|
-
properties:
|
|
3061
|
+
properties: u,
|
|
3064
3062
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3065
3063
|
refreshPanelAfterChanged: !0,
|
|
3066
3064
|
tabId: "commands",
|
|
3067
3065
|
tabName: "交互",
|
|
3068
|
-
setPropertyRelates(
|
|
3069
|
-
const
|
|
3070
|
-
delete e[
|
|
3066
|
+
setPropertyRelates(h, P) {
|
|
3067
|
+
const k = h.propertyValue;
|
|
3068
|
+
delete e[s.viewModelId], k && (k.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, k.events, k));
|
|
3071
3069
|
}
|
|
3072
3070
|
};
|
|
3073
3071
|
}
|
|
3074
3072
|
}
|
|
3075
|
-
class
|
|
3073
|
+
class Kt extends J {
|
|
3076
3074
|
constructor(e, t) {
|
|
3077
3075
|
super(e, t);
|
|
3078
3076
|
}
|
|
@@ -3096,7 +3094,9 @@ class Yt extends J {
|
|
|
3096
3094
|
description: "The type of a component.",
|
|
3097
3095
|
editor: {
|
|
3098
3096
|
type: "combo-list",
|
|
3099
|
-
|
|
3097
|
+
textField: "value",
|
|
3098
|
+
valueField: "key",
|
|
3099
|
+
data: [{ key: "response-toolbar-item", value: E["response-toolbar-item"].name }]
|
|
3100
3100
|
}
|
|
3101
3101
|
},
|
|
3102
3102
|
text: {
|
|
@@ -3121,8 +3121,8 @@ class Yt extends J {
|
|
|
3121
3121
|
label: "click",
|
|
3122
3122
|
name: "点击事件"
|
|
3123
3123
|
}
|
|
3124
|
-
],
|
|
3125
|
-
|
|
3124
|
+
], s = this, p = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), u = {};
|
|
3125
|
+
u[s.viewModelId] = {
|
|
3126
3126
|
type: "events-editor",
|
|
3127
3127
|
editor: {
|
|
3128
3128
|
initialData: p
|
|
@@ -3130,38 +3130,38 @@ class Yt extends J {
|
|
|
3130
3130
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3131
3131
|
title: "事件",
|
|
3132
3132
|
hideTitle: !0,
|
|
3133
|
-
properties:
|
|
3133
|
+
properties: u,
|
|
3134
3134
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3135
3135
|
refreshPanelAfterChanged: !0,
|
|
3136
3136
|
tabId: "commands",
|
|
3137
3137
|
tabName: "交互",
|
|
3138
|
-
setPropertyRelates(
|
|
3139
|
-
const
|
|
3140
|
-
delete e[
|
|
3138
|
+
setPropertyRelates(h, P) {
|
|
3139
|
+
const k = h.propertyValue;
|
|
3140
|
+
delete e[s.viewModelId], k && (k.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, k.events, k));
|
|
3141
3141
|
}
|
|
3142
3142
|
};
|
|
3143
3143
|
}
|
|
3144
3144
|
}
|
|
3145
|
-
function
|
|
3145
|
+
function Jt(n, e) {
|
|
3146
3146
|
Ee();
|
|
3147
|
-
const t = B(!1),
|
|
3148
|
-
let p = !1,
|
|
3149
|
-
function
|
|
3147
|
+
const t = B(!1), s = B(!1);
|
|
3148
|
+
let p = !1, u = !1;
|
|
3149
|
+
function h(w) {
|
|
3150
3150
|
return !1;
|
|
3151
3151
|
}
|
|
3152
3152
|
function P(w) {
|
|
3153
3153
|
}
|
|
3154
|
-
function
|
|
3154
|
+
function k() {
|
|
3155
3155
|
return "";
|
|
3156
3156
|
}
|
|
3157
|
-
function g(w,
|
|
3158
|
-
return
|
|
3157
|
+
function g(w, M) {
|
|
3158
|
+
return M.text = w.label, M;
|
|
3159
3159
|
}
|
|
3160
|
-
function T(w,
|
|
3161
|
-
const S =
|
|
3160
|
+
function T(w, M, R) {
|
|
3161
|
+
const S = n.schema;
|
|
3162
3162
|
if ((S.appearance && S.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3163
|
-
const
|
|
3164
|
-
return
|
|
3163
|
+
const v = String(w.innerText), m = z("form-group");
|
|
3164
|
+
return m.editor = R, m.label = v, m;
|
|
3165
3165
|
}
|
|
3166
3166
|
return R;
|
|
3167
3167
|
}
|
|
@@ -3169,231 +3169,232 @@ function Zt(o, e) {
|
|
|
3169
3169
|
return !1;
|
|
3170
3170
|
}
|
|
3171
3171
|
function a() {
|
|
3172
|
-
return !
|
|
3172
|
+
return !u;
|
|
3173
3173
|
}
|
|
3174
|
-
function
|
|
3174
|
+
function f() {
|
|
3175
3175
|
return !1;
|
|
3176
3176
|
}
|
|
3177
|
-
function
|
|
3177
|
+
function i() {
|
|
3178
3178
|
return p;
|
|
3179
3179
|
}
|
|
3180
|
-
function
|
|
3181
|
-
let
|
|
3182
|
-
switch (
|
|
3180
|
+
function C(w) {
|
|
3181
|
+
let M;
|
|
3182
|
+
switch (n.schema.type) {
|
|
3183
3183
|
case "tab-toolbar-item":
|
|
3184
|
-
|
|
3184
|
+
M = new Zt(w, e);
|
|
3185
3185
|
break;
|
|
3186
3186
|
default:
|
|
3187
|
-
|
|
3187
|
+
M = new Kt(w, e);
|
|
3188
3188
|
}
|
|
3189
|
-
return
|
|
3189
|
+
return M.getPropertyConfig(n.schema);
|
|
3190
3190
|
}
|
|
3191
3191
|
return {
|
|
3192
|
-
canAccepts:
|
|
3193
|
-
checkCanAddComponent:
|
|
3192
|
+
canAccepts: h,
|
|
3193
|
+
checkCanAddComponent: f,
|
|
3194
3194
|
checkCanDeleteComponent: a,
|
|
3195
3195
|
checkCanMoveComponent: l,
|
|
3196
|
-
getStyles:
|
|
3197
|
-
hideNestedPaddingInDesginerView:
|
|
3196
|
+
getStyles: k,
|
|
3197
|
+
hideNestedPaddingInDesginerView: i,
|
|
3198
3198
|
onAcceptNewChildElement: T,
|
|
3199
3199
|
onAcceptMovedChildElement: P,
|
|
3200
3200
|
onResolveNewComponentSchema: g,
|
|
3201
|
-
getPropsConfig:
|
|
3201
|
+
getPropsConfig: C,
|
|
3202
3202
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
3203
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3203
|
+
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
3204
3204
|
};
|
|
3205
3205
|
}
|
|
3206
3206
|
const je = /* @__PURE__ */ G({
|
|
3207
3207
|
name: "FResponseToolbarItemDesign",
|
|
3208
|
-
props:
|
|
3208
|
+
props: Me,
|
|
3209
3209
|
emits: ["Click"],
|
|
3210
|
-
setup(
|
|
3210
|
+
setup(n, e) {
|
|
3211
3211
|
B(), B();
|
|
3212
|
-
const t = B(
|
|
3212
|
+
const t = B(n.alignment), s = {
|
|
3213
3213
|
id: "__more_buttons__",
|
|
3214
3214
|
text: "More"
|
|
3215
|
-
}, p = B(new X(
|
|
3215
|
+
}, p = B(new X(s));
|
|
3216
3216
|
V(() => p.value.children.length > 0);
|
|
3217
|
-
const
|
|
3217
|
+
const u = B(), h = U("designer-host-service"), P = U("design-item-context"), k = Jt(P, h), g = ve(u, P, k);
|
|
3218
3218
|
U("toolbar-item-handler", () => {
|
|
3219
3219
|
}), q(() => {
|
|
3220
|
-
|
|
3220
|
+
u.value.componentInstance = g;
|
|
3221
3221
|
}), e.expose(g.value);
|
|
3222
3222
|
function T() {
|
|
3223
|
-
const
|
|
3223
|
+
const f = {
|
|
3224
3224
|
"f-icon": !0
|
|
3225
3225
|
};
|
|
3226
|
-
if (
|
|
3227
|
-
const
|
|
3228
|
-
|
|
3226
|
+
if (n.icon) {
|
|
3227
|
+
const i = n.icon.trim().split(" ");
|
|
3228
|
+
i && i.length && i.reduce((C, w) => (C[w] = !0, C), f);
|
|
3229
3229
|
}
|
|
3230
|
-
return
|
|
3230
|
+
return f;
|
|
3231
3231
|
}
|
|
3232
3232
|
function l() {
|
|
3233
|
-
return !!(
|
|
3233
|
+
return !!(n.icon && n.icon.trim());
|
|
3234
3234
|
}
|
|
3235
3235
|
function a() {
|
|
3236
|
-
const
|
|
3236
|
+
const f = {
|
|
3237
3237
|
btn: !0,
|
|
3238
3238
|
"f-rt-btn": !0,
|
|
3239
3239
|
"f-btn-ml": t.value === "right",
|
|
3240
3240
|
"f-btn-mr": t.value === "left",
|
|
3241
|
-
"btn-icontext": !!(
|
|
3241
|
+
"btn-icontext": !!(n.icon && n.icon.trim())
|
|
3242
3242
|
};
|
|
3243
|
-
if (
|
|
3244
|
-
const
|
|
3245
|
-
|
|
3243
|
+
if (n.class) {
|
|
3244
|
+
const i = n.class.split(" ");
|
|
3245
|
+
i && i.length && i.reduce((C, w) => (C[w] = !0, C), f);
|
|
3246
3246
|
}
|
|
3247
|
-
return
|
|
3247
|
+
return f;
|
|
3248
3248
|
}
|
|
3249
3249
|
return q(() => {
|
|
3250
|
-
}),
|
|
3251
|
-
}), () =>
|
|
3252
|
-
ref:
|
|
3250
|
+
}), se(() => {
|
|
3251
|
+
}), () => b("div", {
|
|
3252
|
+
ref: u,
|
|
3253
3253
|
"data-dragref": `${P.schema.id}-container`,
|
|
3254
3254
|
class: "farris-component position-relative",
|
|
3255
3255
|
style: "display:inline-block!important;"
|
|
3256
|
-
}, [
|
|
3256
|
+
}, [b("button", {
|
|
3257
3257
|
type: "button",
|
|
3258
3258
|
class: a(),
|
|
3259
|
-
id:
|
|
3260
|
-
}, [l() &&
|
|
3259
|
+
id: n.id
|
|
3260
|
+
}, [l() && b("i", {
|
|
3261
3261
|
class: T()
|
|
3262
|
-
}, null),
|
|
3262
|
+
}, null), n.text])]);
|
|
3263
3263
|
}
|
|
3264
3264
|
}), Ae = /* @__PURE__ */ G({
|
|
3265
3265
|
name: "FResponseToolbarDesign",
|
|
3266
|
-
props:
|
|
3266
|
+
props: Bt,
|
|
3267
3267
|
emits: ["Click"],
|
|
3268
|
-
setup(
|
|
3269
|
-
const t = B(
|
|
3270
|
-
let
|
|
3271
|
-
const p = B(),
|
|
3268
|
+
setup(n, e) {
|
|
3269
|
+
const t = B(n.items);
|
|
3270
|
+
let s = new Array(t.value.length).fill(B());
|
|
3271
|
+
const p = B(), u = B(), h = B(n.alignment), P = {
|
|
3272
3272
|
id: "__more_buttons__",
|
|
3273
3273
|
text: "More"
|
|
3274
|
-
},
|
|
3275
|
-
V(() =>
|
|
3276
|
-
const T = B(), l = U("designer-host-service"), a = U("design-item-context"),
|
|
3274
|
+
}, k = B(new X(P)), g = xe();
|
|
3275
|
+
V(() => k.value.children.length > 0);
|
|
3276
|
+
const T = B(), l = U("designer-host-service"), a = U("design-item-context"), f = qt(a.schema, l, a), i = ve(T, a, f);
|
|
3277
3277
|
U("toolbar-item-handler", () => {
|
|
3278
3278
|
}), q(() => {
|
|
3279
|
-
T.value.componentInstance =
|
|
3280
|
-
}), e.expose(
|
|
3281
|
-
const
|
|
3279
|
+
T.value.componentInstance = i;
|
|
3280
|
+
}), e.expose(i.value);
|
|
3281
|
+
const C = V(() => ({
|
|
3282
3282
|
"f-toolbar": !0,
|
|
3283
3283
|
"f-response-toolbar": !0,
|
|
3284
3284
|
"position-relative": !0
|
|
3285
3285
|
})), w = V(() => ({
|
|
3286
3286
|
"d-flex": !0,
|
|
3287
3287
|
"flex-nowrap": !0,
|
|
3288
|
-
"justify-content-end":
|
|
3289
|
-
"justify-content-start":
|
|
3288
|
+
"justify-content-end": h.value === "right",
|
|
3289
|
+
"justify-content-start": h.value === "left"
|
|
3290
3290
|
})), {
|
|
3291
|
-
renderToolbarDropdown:
|
|
3291
|
+
renderToolbarDropdown: M,
|
|
3292
3292
|
clearAllDropDown: R
|
|
3293
|
-
} =
|
|
3293
|
+
} = Rt(n, g, i);
|
|
3294
3294
|
function S() {
|
|
3295
3295
|
t.value.filter((d) => d.children && d.children.length > 0).forEach((d) => {
|
|
3296
3296
|
d.expanded = !1;
|
|
3297
|
-
}),
|
|
3297
|
+
}), k.value.expanded = !1, R();
|
|
3298
3298
|
}
|
|
3299
|
-
const
|
|
3300
|
-
function
|
|
3301
|
-
const r =
|
|
3302
|
-
let
|
|
3299
|
+
const A = /* @__PURE__ */ new Map(), L = [];
|
|
3300
|
+
function v(d) {
|
|
3301
|
+
const r = u.value;
|
|
3302
|
+
let o = d;
|
|
3303
3303
|
const c = Array.from(r.children), y = c[c.length - 1].id === "__more_buttons__" ? c[c.length - 1] : null;
|
|
3304
3304
|
if (y) {
|
|
3305
3305
|
const N = y.computedStyleMap().get("margin-left"), $ = y.computedStyleMap().get("margin-right"), W = (N ? N.value : 0) + y.getBoundingClientRect().width + ($ ? $.value : 0);
|
|
3306
|
-
|
|
3306
|
+
o -= W;
|
|
3307
3307
|
}
|
|
3308
|
-
const
|
|
3309
|
-
for (const N of
|
|
3308
|
+
const I = c.filter((N) => N.id !== "__more_buttons__");
|
|
3309
|
+
for (const N of I) {
|
|
3310
3310
|
const $ = N.computedStyleMap().get("margin-left"), W = N.computedStyleMap().get("margin-right"), H = ($ ? $.value : 0) + N.getBoundingClientRect().width + (W ? W.value : 0);
|
|
3311
|
-
|
|
3311
|
+
o < H ? (A.set(N.id, !0), L.push({
|
|
3312
3312
|
id: N.id,
|
|
3313
3313
|
width: H
|
|
3314
|
-
})) :
|
|
3314
|
+
})) : o -= H;
|
|
3315
3315
|
}
|
|
3316
3316
|
if (L.length)
|
|
3317
3317
|
for (let N = L.length - 1; N >= 0; N--) {
|
|
3318
3318
|
const $ = L[N].width;
|
|
3319
|
-
if (
|
|
3320
|
-
|
|
3319
|
+
if (o >= $)
|
|
3320
|
+
o -= $, A.delete(L[N].id), L.pop();
|
|
3321
3321
|
else
|
|
3322
3322
|
break;
|
|
3323
3323
|
}
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3326
|
-
const F = new X(
|
|
3327
|
-
|
|
3324
|
+
const x = Object.assign({}, k.value);
|
|
3325
|
+
x.children = [];
|
|
3326
|
+
const F = new X(x), _ = t.value.reduce((N, $) => (A.has($.id) && F.children.push($), $.visible = !A.has($.id), N.push($), N), []);
|
|
3327
|
+
k.value = F, t.value = _;
|
|
3328
3328
|
}
|
|
3329
|
-
const
|
|
3329
|
+
const m = new ResizeObserver((d) => {
|
|
3330
3330
|
if (d.length) {
|
|
3331
|
-
const
|
|
3332
|
-
(
|
|
3331
|
+
const o = d[0].contentRect.width, y = u.value.getBoundingClientRect().width;
|
|
3332
|
+
(o < y || L.length) && v(o);
|
|
3333
3333
|
}
|
|
3334
3334
|
});
|
|
3335
3335
|
q(() => {
|
|
3336
3336
|
const d = p.value;
|
|
3337
|
-
|
|
3338
|
-
}),
|
|
3339
|
-
|
|
3340
|
-
}), Q(() =>
|
|
3341
|
-
t.value =
|
|
3337
|
+
m.observe(d), document.body.addEventListener("click", S);
|
|
3338
|
+
}), se(() => {
|
|
3339
|
+
m.disconnect(), document.body.removeEventListener("click", S);
|
|
3340
|
+
}), Q(() => n.items, () => {
|
|
3341
|
+
t.value = n.items;
|
|
3342
3342
|
}, {
|
|
3343
3343
|
deep: !0
|
|
3344
3344
|
}), Q(t, (d) => {
|
|
3345
|
-
|
|
3345
|
+
s = new Array(t.value.length).fill(B());
|
|
3346
3346
|
});
|
|
3347
|
-
function D(d, r,
|
|
3348
|
-
a && a.setupContext && a.setupContext.emit("selectionChange", d, r,
|
|
3347
|
+
function D(d, r, o, c) {
|
|
3348
|
+
a && a.setupContext && a.setupContext.emit("selectionChange", d, r, o, c);
|
|
3349
3349
|
}
|
|
3350
3350
|
function j() {
|
|
3351
|
-
const d =
|
|
3351
|
+
const d = u.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
3352
3352
|
d == null || d.classList.remove("dgComponentSelected"), d == null || d.classList.remove("dgComponentFocused");
|
|
3353
3353
|
}
|
|
3354
|
-
return () =>
|
|
3354
|
+
return () => b("div", {
|
|
3355
3355
|
ref: T,
|
|
3356
3356
|
"data-dragref": `${a.schema.id}-container`,
|
|
3357
|
-
class:
|
|
3358
|
-
}, [
|
|
3357
|
+
class: C.value
|
|
3358
|
+
}, [b("div", {
|
|
3359
3359
|
ref: p,
|
|
3360
3360
|
class: w.value
|
|
3361
|
-
}, [
|
|
3362
|
-
ref:
|
|
3361
|
+
}, [b("div", {
|
|
3362
|
+
ref: u,
|
|
3363
3363
|
class: "d-inline-block f-response-content",
|
|
3364
3364
|
style: "white-space: nowrap;"
|
|
3365
|
-
}, [t.value.map((d, r) =>
|
|
3366
|
-
ref:
|
|
3365
|
+
}, [t.value.map((d, r) => b(Be, {
|
|
3366
|
+
ref: s[r],
|
|
3367
3367
|
class: "p-0 display-inline-block",
|
|
3368
3368
|
modelValue: d,
|
|
3369
|
-
"onUpdate:modelValue": (
|
|
3369
|
+
"onUpdate:modelValue": (o) => d = o,
|
|
3370
3370
|
canMove: !0,
|
|
3371
3371
|
childType: "response-toolbar-item",
|
|
3372
3372
|
childLabel: "按钮",
|
|
3373
3373
|
contentKey: "buttons",
|
|
3374
|
-
componentId:
|
|
3374
|
+
componentId: n.componentId,
|
|
3375
3375
|
id: d.id,
|
|
3376
3376
|
style: "padding:0 !important;display:inline-block",
|
|
3377
3377
|
onSelectionChange: D,
|
|
3378
3378
|
onRemoveComponent: j
|
|
3379
3379
|
}, {
|
|
3380
|
-
default: () => [
|
|
3380
|
+
default: () => [b(je, {
|
|
3381
3381
|
id: d.id,
|
|
3382
3382
|
disable: d.disable,
|
|
3383
3383
|
text: d.text,
|
|
3384
|
-
icon: d.icon
|
|
3384
|
+
icon: d.icon,
|
|
3385
|
+
componentId: n.componentId
|
|
3385
3386
|
}, null)]
|
|
3386
3387
|
}))])])]);
|
|
3387
3388
|
}
|
|
3388
3389
|
}), ye = de;
|
|
3389
|
-
K.register = (
|
|
3390
|
-
|
|
3390
|
+
K.register = (n, e, t) => {
|
|
3391
|
+
n["response-toolbar"] = K, e["response-toolbar"] = de;
|
|
3391
3392
|
};
|
|
3392
|
-
K.registerDesigner = (
|
|
3393
|
-
|
|
3393
|
+
K.registerDesigner = (n, e, t) => {
|
|
3394
|
+
n["response-toolbar"] = Ae, e["response-toolbar"] = de, n["response-toolbar-item"] = je, e["response-toolbar-item"] = jt;
|
|
3394
3395
|
};
|
|
3395
3396
|
Ue(K);
|
|
3396
|
-
const
|
|
3397
|
+
const en = {
|
|
3397
3398
|
id: { type: String, default: "" },
|
|
3398
3399
|
componentId: { type: String, default: "" },
|
|
3399
3400
|
type: { type: String, default: "" },
|
|
@@ -3410,68 +3411,68 @@ const Kt = {
|
|
|
3410
3411
|
ignore: { type: Boolean, default: !1 }
|
|
3411
3412
|
}, he = /* @__PURE__ */ G({
|
|
3412
3413
|
name: "FDesignerTemplateItem",
|
|
3413
|
-
props:
|
|
3414
|
+
props: en,
|
|
3414
3415
|
emits: ["selectionChange"],
|
|
3415
|
-
setup(
|
|
3416
|
-
const t = B(),
|
|
3416
|
+
setup(n, e) {
|
|
3417
|
+
const t = B(), s = V(() => ({
|
|
3417
3418
|
"farris-component": !0
|
|
3418
3419
|
}));
|
|
3419
|
-
function p(
|
|
3420
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((P) => P.classList.remove("dgComponentFocused")),
|
|
3421
|
-
const
|
|
3422
|
-
if (
|
|
3420
|
+
function p(u) {
|
|
3421
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((P) => P.classList.remove("dgComponentFocused")), u && (u.preventDefault(), u.stopPropagation());
|
|
3422
|
+
const h = t.value;
|
|
3423
|
+
if (h) {
|
|
3423
3424
|
const P = document.getElementsByClassName("dgComponentSelected");
|
|
3424
|
-
P && P.length === 1 && P[0] === t.value || (Array.from(P).forEach((g) => g.classList.remove("dgComponentSelected")),
|
|
3425
|
+
P && P.length === 1 && P[0] === t.value || (Array.from(P).forEach((g) => g.classList.remove("dgComponentSelected")), h.classList.add("dgComponentFocused"));
|
|
3425
3426
|
}
|
|
3426
3427
|
Z.value++;
|
|
3427
3428
|
}
|
|
3428
|
-
return () =>
|
|
3429
|
-
id: `${
|
|
3429
|
+
return () => b("div", {
|
|
3430
|
+
id: `${n.id}-design-item`,
|
|
3430
3431
|
ref: t,
|
|
3431
|
-
class:
|
|
3432
|
+
class: s.value,
|
|
3432
3433
|
onClick: p
|
|
3433
3434
|
}, [e.slots.default && e.slots.default()]);
|
|
3434
3435
|
}
|
|
3435
|
-
}),
|
|
3436
|
+
}), tn = /* @__PURE__ */ G({
|
|
3436
3437
|
name: "FPageHeaderDesign",
|
|
3437
|
-
props:
|
|
3438
|
+
props: st,
|
|
3438
3439
|
emits: ["Click"],
|
|
3439
|
-
setup(
|
|
3440
|
-
const t = B(),
|
|
3440
|
+
setup(n, e) {
|
|
3441
|
+
const t = B(), s = U("designer-host-service"), p = U("design-item-context"), u = ct(p.schema, s), h = it(t, p, u), P = B(p.schema.toolbar || {
|
|
3441
3442
|
type: "response-toolbar",
|
|
3442
3443
|
buttons: []
|
|
3443
|
-
}),
|
|
3444
|
+
}), k = B(ye(P.value));
|
|
3444
3445
|
q(() => {
|
|
3445
|
-
t.value.componentInstance =
|
|
3446
|
+
t.value.componentInstance = h;
|
|
3446
3447
|
}), Q(() => p.schema.toolbar, () => {
|
|
3447
3448
|
P.value = p.schema.toolbar || {
|
|
3448
3449
|
type: "response-toolbar",
|
|
3449
3450
|
buttons: []
|
|
3450
|
-
},
|
|
3451
|
+
}, k.value = ye(P.value);
|
|
3451
3452
|
}, {
|
|
3452
3453
|
deep: !0
|
|
3453
3454
|
});
|
|
3454
|
-
const g = V(() => [...
|
|
3455
|
-
function T(l, a,
|
|
3456
|
-
p && p.setupContext && p.setupContext.emit("selectionChange", l, a,
|
|
3455
|
+
const g = V(() => [...k.value.items]);
|
|
3456
|
+
function T(l, a, f, i) {
|
|
3457
|
+
p && p.setupContext && p.setupContext.emit("selectionChange", l, a, f, i);
|
|
3457
3458
|
}
|
|
3458
|
-
return e.expose(
|
|
3459
|
+
return e.expose(h.value), () => b("div", {
|
|
3459
3460
|
ref: t
|
|
3460
|
-
}, [
|
|
3461
|
+
}, [b("nav", {
|
|
3461
3462
|
class: "f-page-header-base"
|
|
3462
|
-
}, [
|
|
3463
|
+
}, [b("div", {
|
|
3463
3464
|
class: "f-title"
|
|
3464
|
-
}, [
|
|
3465
|
-
default: () => [
|
|
3465
|
+
}, [b(he, null, {
|
|
3466
|
+
default: () => [b("span", {
|
|
3466
3467
|
class: "f-title-icon f-text-orna-manage"
|
|
3467
|
-
}, [
|
|
3468
|
-
class:
|
|
3468
|
+
}, [b("i", {
|
|
3469
|
+
class: n.icon
|
|
3469
3470
|
}, null)])]
|
|
3470
|
-
}),
|
|
3471
|
-
default: () => [
|
|
3471
|
+
}), b(he, null, {
|
|
3472
|
+
default: () => [b("h4", {
|
|
3472
3473
|
class: "f-title-text"
|
|
3473
|
-
}, [
|
|
3474
|
-
})]),
|
|
3474
|
+
}, [n.title])]
|
|
3475
|
+
})]), b(Be, {
|
|
3475
3476
|
class: "col-5",
|
|
3476
3477
|
modelValue: P.value,
|
|
3477
3478
|
"onUpdate:modelValue": (l) => P.value = l,
|
|
@@ -3480,28 +3481,30 @@ const Kt = {
|
|
|
3480
3481
|
childLabel: "按钮",
|
|
3481
3482
|
contentKey: "buttons",
|
|
3482
3483
|
id: P.value.id,
|
|
3483
|
-
componentId:
|
|
3484
|
+
componentId: n.componentId,
|
|
3484
3485
|
onSelectionChange: T
|
|
3485
3486
|
}, {
|
|
3486
|
-
default: () => [
|
|
3487
|
-
items: g.value
|
|
3487
|
+
default: () => [b(Ae, {
|
|
3488
|
+
items: g.value,
|
|
3489
|
+
componentId: n.componentId
|
|
3488
3490
|
}, null)]
|
|
3489
3491
|
})])]);
|
|
3490
3492
|
}
|
|
3491
|
-
}),
|
|
3492
|
-
install(
|
|
3493
|
-
|
|
3493
|
+
}), ln = {
|
|
3494
|
+
install(n) {
|
|
3495
|
+
n.component(ne.name, ne);
|
|
3494
3496
|
},
|
|
3495
|
-
register(
|
|
3496
|
-
|
|
3497
|
+
register(n, e, t, s) {
|
|
3498
|
+
n["page-header"] = ne, e["page-header"] = fe;
|
|
3497
3499
|
},
|
|
3498
|
-
registerDesigner(
|
|
3499
|
-
|
|
3500
|
+
registerDesigner(n, e, t) {
|
|
3501
|
+
n["page-header"] = tn, e["page-header"] = fe;
|
|
3500
3502
|
}
|
|
3501
3503
|
};
|
|
3502
3504
|
export {
|
|
3503
3505
|
ne as PageHeader,
|
|
3504
|
-
|
|
3506
|
+
ln as default,
|
|
3507
|
+
st as pageHeaderDesignerProps,
|
|
3505
3508
|
le as pageHeaderProps,
|
|
3506
3509
|
fe as propsResolver
|
|
3507
3510
|
};
|