@farris/ui-vue 1.2.4 → 1.2.6
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 +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +124 -116
- 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/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +219 -209
- 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 +36 -28
- 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/index.esm.js +2 -2
- package/components/common/index.umd.cjs +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 +406 -402
- 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 +4439 -4273
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2904 -2892
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +250 -242
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.css +1 -0
- package/components/designer-canvas/index.esm.js +24 -21
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +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 +984 -928
- 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 +281 -277
- 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 +1917 -1901
- 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 +4185 -4023
- 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 +595 -581
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.css +1 -0
- package/components/flow-canvas/index.esm.js +38 -35
- 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 +256 -248
- 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 +1522 -1519
- 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 +4629 -4410
- 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 +4454 -4255
- 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/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +972 -920
- 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 +917 -893
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +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 +108 -101
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +361 -349
- 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 +72 -64
- 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 +452 -439
- 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 +610 -592
- 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 +4041 -3749
- 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 +159 -178
- 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 +1450 -1408
- 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 +86 -78
- 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 +387 -379
- 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 +95 -93
- 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 +4437 -4271
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +1989 -1985
- 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 +12989 -12513
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- 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/condition/index.d.ts +60 -1
- 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/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/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- 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/designer/use-designer-rules.d.ts +3 -3
- 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/list-view/src/composition/types.d.ts +1 -1
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +8 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +29 -25
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/message-box/index.d.ts +84 -1
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/notify/index.d.ts +84 -1
- 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 -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/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
- package/components/button-edit/style.css +0 -1
- package/components/designer-canvas/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/flow-canvas/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-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/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
94
|
function M(g, T) {
|
|
95
|
-
const l = Object.keys(g), a = l.includes("allOf"),
|
|
96
|
-
return a ? !
|
|
95
|
+
const l = Object.keys(g), a = l.includes("allOf"), f = l.includes("anyOf"), i = a || f, k = (i ? g[i ? a ? "allOf" : "anyOf" : "allOf"] : [g]).map((S) => P(S, T));
|
|
96
|
+
return a ? !k.includes(!1) : k.includes(!0);
|
|
97
97
|
}
|
|
98
98
|
return { parseValueSchema: M };
|
|
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(
|
|
213
|
+
function ce(n, e, t = /* @__PURE__ */ new Map(), s = (h, P, M) => 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), M = Object.keys(n).reduce((g, T) => (g[T] = n[T].default, g), {});
|
|
216
216
|
return Object.assign(M, 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,119 +373,121 @@ 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,
|
|
403
|
+
return p(S, n.icon), S;
|
|
402
404
|
}), M = 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
|
+
function C() {
|
|
433
|
+
return e.slots.titleContent ? b("div", {
|
|
432
434
|
class: M.value
|
|
433
|
-
}, [Y(" "), e.slots.titleContent()]) :
|
|
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 k() {
|
|
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(), k()]), 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
|
}
|
|
@@ -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 k(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
549
|
canSelectParent: M(),
|
|
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: k,
|
|
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
|
|
728
|
+
const h = u.contents.findIndex((i) => i.id === e.id), P = u.contents[h];
|
|
719
729
|
let M;
|
|
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), M = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null,
|
|
737
|
+
}, !1), M = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, s)), Object.assign(M, {
|
|
728
738
|
id: P.id,
|
|
729
739
|
appearance: P.appearance,
|
|
730
740
|
size: P.size,
|
|
731
741
|
label: P.label
|
|
732
742
|
}), Object.assign(M.editor, {
|
|
733
743
|
isTextArea: M.isTextArea && P.isTextArea,
|
|
734
|
-
type:
|
|
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, M);
|
|
741
751
|
}
|
|
742
752
|
getAppearanceConfig(e = null) {
|
|
743
753
|
return {
|
|
@@ -775,14 +785,14 @@ 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
798
|
getBindingFieldEditorOptions(e) {
|
|
@@ -799,15 +809,15 @@ class J {
|
|
|
799
809
|
{ field: "bindingField", title: "绑定字段" },
|
|
800
810
|
{ field: "fieldType", title: "字段类型" }
|
|
801
811
|
],
|
|
802
|
-
beforeOpenDialog: (
|
|
812
|
+
beforeOpenDialog: (s) => {
|
|
803
813
|
const p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
804
|
-
|
|
814
|
+
s.instance.loadData(p);
|
|
805
815
|
},
|
|
806
816
|
textField: "bindingField"
|
|
807
817
|
};
|
|
808
818
|
}
|
|
809
819
|
}
|
|
810
|
-
class
|
|
820
|
+
class at extends J {
|
|
811
821
|
constructor(e, t) {
|
|
812
822
|
super(e, t);
|
|
813
823
|
}
|
|
@@ -831,7 +841,9 @@ class st extends J {
|
|
|
831
841
|
description: "The type of a component.",
|
|
832
842
|
editor: {
|
|
833
843
|
type: "combo-list",
|
|
834
|
-
|
|
844
|
+
textField: "value",
|
|
845
|
+
valueField: "key",
|
|
846
|
+
data: [{ key: "page-header", value: E["page-header"].name }]
|
|
835
847
|
}
|
|
836
848
|
},
|
|
837
849
|
icon: {
|
|
@@ -871,7 +883,7 @@ class st extends J {
|
|
|
871
883
|
label: "click",
|
|
872
884
|
name: "点击事件"
|
|
873
885
|
}
|
|
874
|
-
],
|
|
886
|
+
], s = this, p = s.eventsEditorUtils.formProperties(e, s.viewModelId, t);
|
|
875
887
|
this.propertyConfig.categories.eventsEditor = {
|
|
876
888
|
title: "事件",
|
|
877
889
|
hideTitle: !0,
|
|
@@ -887,26 +899,26 @@ class st extends J {
|
|
|
887
899
|
refreshPanelAfterChanged: !0,
|
|
888
900
|
tabId: "commands",
|
|
889
901
|
tabName: "交互",
|
|
890
|
-
setPropertyRelates(
|
|
891
|
-
const P =
|
|
892
|
-
delete e[
|
|
902
|
+
setPropertyRelates(u, h) {
|
|
903
|
+
const P = u.propertyValue;
|
|
904
|
+
delete e[s.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, P.events, P));
|
|
893
905
|
}
|
|
894
906
|
};
|
|
895
907
|
}
|
|
896
908
|
}
|
|
897
|
-
function
|
|
898
|
-
function t(
|
|
909
|
+
function ct(n, e) {
|
|
910
|
+
function t(u) {
|
|
899
911
|
return !1;
|
|
900
912
|
}
|
|
901
|
-
function
|
|
913
|
+
function s() {
|
|
902
914
|
return !0;
|
|
903
915
|
}
|
|
904
|
-
function p(
|
|
905
|
-
return new
|
|
916
|
+
function p(u) {
|
|
917
|
+
return new at(u, e).getPropertyConfig(n);
|
|
906
918
|
}
|
|
907
919
|
return {
|
|
908
920
|
canAccepts: t,
|
|
909
|
-
hideNestedPaddingInDesginerView:
|
|
921
|
+
hideNestedPaddingInDesginerView: s,
|
|
910
922
|
getPropsConfig: p
|
|
911
923
|
};
|
|
912
924
|
}
|
|
@@ -955,8 +967,8 @@ class Se {
|
|
|
955
967
|
"tipsText",
|
|
956
968
|
"onClick"
|
|
957
969
|
];
|
|
958
|
-
Object.keys(e).filter((
|
|
959
|
-
this[
|
|
970
|
+
Object.keys(e).filter((s) => t.indexOf(s) > -1).forEach((s) => {
|
|
971
|
+
this[s] = e[s];
|
|
960
972
|
});
|
|
961
973
|
}
|
|
962
974
|
/** 是否可用 */
|
|
@@ -972,19 +984,19 @@ class Se {
|
|
|
972
984
|
return this.visible ? this.width : !1;
|
|
973
985
|
}
|
|
974
986
|
}
|
|
975
|
-
class
|
|
987
|
+
class lt extends Se {
|
|
976
988
|
constructor(e) {
|
|
977
989
|
super(e);
|
|
978
990
|
}
|
|
979
991
|
}
|
|
980
992
|
function Pe() {
|
|
981
|
-
function
|
|
993
|
+
function n(e) {
|
|
982
994
|
const t = [];
|
|
983
|
-
return e.reduce((
|
|
995
|
+
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
996
|
}
|
|
985
|
-
return { buildResponseToolbarItems:
|
|
997
|
+
return { buildResponseToolbarItems: n };
|
|
986
998
|
}
|
|
987
|
-
const { buildResponseToolbarItems:
|
|
999
|
+
const { buildResponseToolbarItems: pt } = Pe();
|
|
988
1000
|
class X extends Se {
|
|
989
1001
|
constructor(t) {
|
|
990
1002
|
super(t);
|
|
@@ -998,19 +1010,19 @@ class X extends Se {
|
|
|
998
1010
|
O(this, "split", !1);
|
|
999
1011
|
O(this, "children", []);
|
|
1000
1012
|
O(this, "expanded", !1);
|
|
1001
|
-
const
|
|
1002
|
-
Object.keys(t).filter((p) =>
|
|
1013
|
+
const s = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
1014
|
+
Object.keys(t).filter((p) => s.indexOf(p) > -1).forEach((p) => {
|
|
1003
1015
|
this[p] = t[p];
|
|
1004
|
-
}), t.children && t.children.length && (this.children =
|
|
1016
|
+
}), t.children && t.children.length && (this.children = pt(t.children));
|
|
1005
1017
|
}
|
|
1006
1018
|
}
|
|
1007
1019
|
const De = /* @__PURE__ */ new Map([
|
|
1008
1020
|
["buttons", "items"]
|
|
1009
1021
|
]);
|
|
1010
|
-
function Me(
|
|
1022
|
+
function Me(n, e, t) {
|
|
1011
1023
|
return e;
|
|
1012
1024
|
}
|
|
1013
|
-
const
|
|
1025
|
+
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
1026
|
id: {
|
|
1015
1027
|
description: "The unique identifier for a Response Toolbar",
|
|
1016
1028
|
type: "string"
|
|
@@ -1043,19 +1055,19 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
1043
1055
|
type: "array",
|
|
1044
1056
|
default: []
|
|
1045
1057
|
}
|
|
1046
|
-
},
|
|
1058
|
+
}, ht = [
|
|
1047
1059
|
"id",
|
|
1048
1060
|
"type",
|
|
1049
1061
|
"buttons"
|
|
1050
|
-
],
|
|
1051
|
-
$schema:
|
|
1052
|
-
$id:
|
|
1053
|
-
title:
|
|
1054
|
-
description:
|
|
1055
|
-
type:
|
|
1056
|
-
properties:
|
|
1057
|
-
required:
|
|
1058
|
-
},
|
|
1062
|
+
], bt = {
|
|
1063
|
+
$schema: dt,
|
|
1064
|
+
$id: ut,
|
|
1065
|
+
title: ft,
|
|
1066
|
+
description: mt,
|
|
1067
|
+
type: gt,
|
|
1068
|
+
properties: yt,
|
|
1069
|
+
required: ht
|
|
1070
|
+
}, 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
1071
|
id: {
|
|
1060
1072
|
description: "The unique identifier for a Response Toolbar",
|
|
1061
1073
|
type: "string"
|
|
@@ -1088,24 +1100,24 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
1088
1100
|
type: "string",
|
|
1089
1101
|
default: ""
|
|
1090
1102
|
},
|
|
1091
|
-
|
|
1103
|
+
click: {
|
|
1092
1104
|
description: "The event of response toolbar item.",
|
|
1093
1105
|
type: "string",
|
|
1094
1106
|
default: ""
|
|
1095
1107
|
}
|
|
1096
|
-
},
|
|
1108
|
+
}, Dt = [
|
|
1097
1109
|
"id",
|
|
1098
1110
|
"type",
|
|
1099
1111
|
"text"
|
|
1100
1112
|
], re = {
|
|
1101
|
-
$schema:
|
|
1102
|
-
$id:
|
|
1103
|
-
title:
|
|
1104
|
-
description:
|
|
1105
|
-
type:
|
|
1106
|
-
properties:
|
|
1107
|
-
required:
|
|
1108
|
-
},
|
|
1113
|
+
$schema: vt,
|
|
1114
|
+
$id: Ct,
|
|
1115
|
+
title: wt,
|
|
1116
|
+
description: Tt,
|
|
1117
|
+
type: St,
|
|
1118
|
+
properties: Pt,
|
|
1119
|
+
required: Dt
|
|
1120
|
+
}, Mt = "response-toolbar-item", kt = "A Farris Container Component", xt = "object", Et = {
|
|
1109
1121
|
basic: {
|
|
1110
1122
|
title: "基本信息",
|
|
1111
1123
|
description: "Basic Infomation",
|
|
@@ -1139,10 +1151,10 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
1139
1151
|
}
|
|
1140
1152
|
}
|
|
1141
1153
|
}, me = {
|
|
1142
|
-
title:
|
|
1143
|
-
description:
|
|
1154
|
+
title: Mt,
|
|
1155
|
+
description: kt,
|
|
1144
1156
|
type: xt,
|
|
1145
|
-
categories:
|
|
1157
|
+
categories: Et
|
|
1146
1158
|
}, pe = {
|
|
1147
1159
|
/** 组件自定义样式 */
|
|
1148
1160
|
customClass: { type: String, default: "" },
|
|
@@ -1152,49 +1164,52 @@ const pt = "https://json-schema.org/draft/2020-12/schema", dt = "https://farris-
|
|
|
1152
1164
|
default: []
|
|
1153
1165
|
}
|
|
1154
1166
|
};
|
|
1155
|
-
|
|
1167
|
+
ie[re.title] = re;
|
|
1156
1168
|
we[me.title] = me;
|
|
1157
|
-
const
|
|
1169
|
+
const Bt = Object.assign({}, pe, {
|
|
1170
|
+
componentId: { type: String, default: "" }
|
|
1171
|
+
}), de = ce(
|
|
1158
1172
|
pe,
|
|
1159
|
-
|
|
1173
|
+
bt,
|
|
1160
1174
|
De,
|
|
1161
1175
|
Me
|
|
1162
|
-
),
|
|
1176
|
+
), ke = {
|
|
1163
1177
|
id: { type: String, default: "" },
|
|
1164
1178
|
items: { type: Object, default: {} },
|
|
1165
1179
|
text: { type: String, default: "" },
|
|
1166
1180
|
disabled: { type: Boolean, default: !1 },
|
|
1167
|
-
icon: { type: String, default: "" }
|
|
1168
|
-
|
|
1169
|
-
|
|
1181
|
+
icon: { type: String, default: "" },
|
|
1182
|
+
componentId: { type: String, default: "" }
|
|
1183
|
+
}, jt = ce(
|
|
1184
|
+
ke,
|
|
1170
1185
|
re,
|
|
1171
1186
|
De,
|
|
1172
1187
|
Me
|
|
1173
1188
|
);
|
|
1174
|
-
function
|
|
1175
|
-
function
|
|
1176
|
-
const
|
|
1189
|
+
function xe() {
|
|
1190
|
+
function n(t) {
|
|
1191
|
+
const s = {
|
|
1177
1192
|
"f-icon": !0
|
|
1178
1193
|
};
|
|
1179
1194
|
if (t.icon) {
|
|
1180
1195
|
const p = t.icon.trim().split(" ");
|
|
1181
|
-
p && p.length && p.reduce((
|
|
1196
|
+
p && p.length && p.reduce((u, h) => (u[h] = !0, u), s);
|
|
1182
1197
|
}
|
|
1183
|
-
return
|
|
1198
|
+
return s;
|
|
1184
1199
|
}
|
|
1185
1200
|
function e(t) {
|
|
1186
1201
|
return !!(t.icon && t.icon.trim());
|
|
1187
1202
|
}
|
|
1188
|
-
return { iconClass:
|
|
1203
|
+
return { iconClass: n, shouldShowIcon: e };
|
|
1189
1204
|
}
|
|
1190
|
-
function
|
|
1205
|
+
function At(n) {
|
|
1191
1206
|
function e(l) {
|
|
1192
1207
|
const a = {
|
|
1193
1208
|
"dropdown-menu": !0
|
|
1194
1209
|
};
|
|
1195
1210
|
if (l.class) {
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1211
|
+
const f = l.menuClass.split(" ");
|
|
1212
|
+
f && f.length && f.reduce((i, C) => (i[C] = !0, i), a);
|
|
1198
1213
|
}
|
|
1199
1214
|
return a;
|
|
1200
1215
|
}
|
|
@@ -1203,25 +1218,25 @@ function Bt(o) {
|
|
|
1203
1218
|
disabled: !l.enable,
|
|
1204
1219
|
"dropdown-submenu": !0,
|
|
1205
1220
|
"f-rt-dropdown": !0
|
|
1206
|
-
},
|
|
1207
|
-
return
|
|
1221
|
+
}, f = l.dropdownClass.split(" ");
|
|
1222
|
+
return f && f.length && f.reduce((i, C) => (i[C] = !0, i), a), a;
|
|
1208
1223
|
}
|
|
1209
|
-
function
|
|
1224
|
+
function s(l) {
|
|
1210
1225
|
const a = {
|
|
1211
1226
|
disabled: !l.enable,
|
|
1212
1227
|
"dropdown-item": !0,
|
|
1213
1228
|
"f-rt-btn": !0
|
|
1214
|
-
},
|
|
1215
|
-
return
|
|
1229
|
+
}, f = l.class.split(" ");
|
|
1230
|
+
return f && f.length && f.reduce((i, C) => (i[C] = !0, i), a), a;
|
|
1216
1231
|
}
|
|
1217
1232
|
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 =
|
|
1233
|
+
const u = /* @__PURE__ */ new Map();
|
|
1234
|
+
function h(l, a, f) {
|
|
1235
|
+
var C;
|
|
1236
|
+
((C = l.target) == null ? void 0 : C.id) === a.id && l.stopPropagation();
|
|
1237
|
+
const i = f ? f.id : "__top_item__";
|
|
1238
|
+
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) {
|
|
1239
|
+
const w = u.get(i);
|
|
1225
1240
|
w && (w.expanded = !1);
|
|
1226
1241
|
}
|
|
1227
1242
|
}
|
|
@@ -1229,91 +1244,91 @@ function Bt(o) {
|
|
|
1229
1244
|
document.body.click(), a.enable && a.onClick(l, a.id);
|
|
1230
1245
|
}
|
|
1231
1246
|
function M(l) {
|
|
1232
|
-
return l.children.map((a) => a.children && a.children.length ?
|
|
1247
|
+
return l.children.map((a) => a.children && a.children.length ? b("li", {
|
|
1233
1248
|
class: t(a),
|
|
1234
1249
|
id: a.id,
|
|
1235
|
-
onClick: (
|
|
1236
|
-
}, [
|
|
1250
|
+
onClick: (f) => a.enable && h(f, a, l)
|
|
1251
|
+
}, [b("span", {
|
|
1237
1252
|
id: a.id,
|
|
1238
|
-
class:
|
|
1239
|
-
onMouseover: (
|
|
1240
|
-
}, [a.text,
|
|
1253
|
+
class: s(a),
|
|
1254
|
+
onMouseover: (f) => a.enable && h(f, a, l)
|
|
1255
|
+
}, [a.text, b("i", {
|
|
1241
1256
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1242
1257
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1243
|
-
}, null)]), p(a, a)]) :
|
|
1244
|
-
class:
|
|
1258
|
+
}, null)]), p(a, a)]) : b("li", {
|
|
1259
|
+
class: s(a),
|
|
1245
1260
|
id: a.id,
|
|
1246
|
-
onClick: (
|
|
1247
|
-
onMouseover: (
|
|
1248
|
-
}, [
|
|
1249
|
-
class:
|
|
1261
|
+
onClick: (f) => P(f, a),
|
|
1262
|
+
onMouseover: (f) => a.enable && h(f, a, l)
|
|
1263
|
+
}, [n.shouldShowIcon(a) && b("i", {
|
|
1264
|
+
class: n.iconClass(a)
|
|
1250
1265
|
}, null), a.text]));
|
|
1251
1266
|
}
|
|
1252
|
-
function g(l, a,
|
|
1253
|
-
const
|
|
1267
|
+
function g(l, a, f) {
|
|
1268
|
+
const i = {
|
|
1254
1269
|
display: l.expanded ? "block" : "none",
|
|
1255
1270
|
position: "fixed",
|
|
1256
1271
|
maxWidth: "300px",
|
|
1257
1272
|
width: "auto",
|
|
1258
1273
|
minWidth: "120px"
|
|
1259
|
-
},
|
|
1260
|
-
if (w &&
|
|
1274
|
+
}, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w = a, k = w == null ? void 0 : w.getClientRects();
|
|
1275
|
+
if (w && k && k.length) {
|
|
1261
1276
|
const {
|
|
1262
1277
|
top: R,
|
|
1263
1278
|
width: S,
|
|
1264
|
-
left:
|
|
1279
|
+
left: A,
|
|
1265
1280
|
right: L,
|
|
1266
|
-
height:
|
|
1267
|
-
} =
|
|
1268
|
-
|
|
1281
|
+
height: v
|
|
1282
|
+
} = k[0], m = Math.ceil(v + R);
|
|
1283
|
+
i.top = `${m}px`, i.left = `${A}px`;
|
|
1269
1284
|
const D = l.id + "_menu", j = a ? a.querySelector("#" + D) : null;
|
|
1270
1285
|
if (j) {
|
|
1271
|
-
|
|
1286
|
+
i.display === "block" && (j.style.display = "block");
|
|
1272
1287
|
const d = j.getBoundingClientRect();
|
|
1273
|
-
if (
|
|
1274
|
-
|
|
1275
|
-
const r = Math.ceil(S +
|
|
1276
|
-
|
|
1288
|
+
if (f) {
|
|
1289
|
+
i.top = `${R - 6}px`;
|
|
1290
|
+
const r = Math.ceil(S + A);
|
|
1291
|
+
i.left = `${r}px`;
|
|
1277
1292
|
}
|
|
1278
|
-
|
|
1293
|
+
C - A - S < d.width && (i.left = `${(f ? A : L) - d.width}px`);
|
|
1279
1294
|
}
|
|
1280
1295
|
}
|
|
1281
|
-
return
|
|
1296
|
+
return i;
|
|
1282
1297
|
}
|
|
1283
1298
|
p = function(l, a) {
|
|
1284
|
-
var w,
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1299
|
+
var w, k;
|
|
1300
|
+
const f = be(), i = a ? a.id : l.id, C = (k = (w = f == null ? void 0 : f.exposed) == null ? void 0 : w.elementRef.value) == null ? void 0 : k.querySelector("#" + i);
|
|
1301
|
+
return b("ul", {
|
|
1287
1302
|
class: e(l),
|
|
1288
|
-
style: g(l,
|
|
1303
|
+
style: g(l, C, a),
|
|
1289
1304
|
id: l.id + "_menu"
|
|
1290
1305
|
}, [M(l)]);
|
|
1291
1306
|
};
|
|
1292
1307
|
function T() {
|
|
1293
|
-
|
|
1308
|
+
u.forEach((l) => {
|
|
1294
1309
|
l.expanded = !1;
|
|
1295
|
-
}),
|
|
1310
|
+
}), u.clear();
|
|
1296
1311
|
}
|
|
1297
1312
|
return {
|
|
1298
1313
|
renderDropdownMenu: p,
|
|
1299
1314
|
clearAllDropDownMenu: T
|
|
1300
1315
|
};
|
|
1301
1316
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const t = B(
|
|
1304
|
-
renderDropdownMenu:
|
|
1317
|
+
function It(n, e) {
|
|
1318
|
+
const t = B(n.alignment), {
|
|
1319
|
+
renderDropdownMenu: s,
|
|
1305
1320
|
clearAllDropDownMenu: p
|
|
1306
|
-
} =
|
|
1307
|
-
function
|
|
1321
|
+
} = At(e);
|
|
1322
|
+
function u(T) {
|
|
1308
1323
|
const l = {
|
|
1309
1324
|
"btn-group": !0,
|
|
1310
1325
|
"f-rt-dropdown": !0,
|
|
1311
1326
|
"f-btn-ml": t.value === "right",
|
|
1312
1327
|
"f-btn-mr": t.value === "left"
|
|
1313
1328
|
}, a = T.dropdownClass.split(" ");
|
|
1314
|
-
return a && a.length && a.reduce((
|
|
1329
|
+
return a && a.length && a.reduce((f, i) => (f[i] = !0, f), l), l;
|
|
1315
1330
|
}
|
|
1316
|
-
function
|
|
1331
|
+
function h(T) {
|
|
1317
1332
|
const l = {
|
|
1318
1333
|
btn: !0,
|
|
1319
1334
|
disabled: !T.enable,
|
|
@@ -1322,7 +1337,7 @@ function jt(o, e) {
|
|
|
1322
1337
|
};
|
|
1323
1338
|
if (T.class) {
|
|
1324
1339
|
const a = T.class.split(" ");
|
|
1325
|
-
a && a.length && a.reduce((
|
|
1340
|
+
a && a.length && a.reduce((f, i) => (f[i] = !0, f), l);
|
|
1326
1341
|
}
|
|
1327
1342
|
return l;
|
|
1328
1343
|
}
|
|
@@ -1332,19 +1347,19 @@ function jt(o, e) {
|
|
|
1332
1347
|
document.body.click(), l.expanded = !a;
|
|
1333
1348
|
}
|
|
1334
1349
|
function M(T) {
|
|
1335
|
-
return
|
|
1350
|
+
return b("div", {
|
|
1336
1351
|
id: T.id,
|
|
1337
|
-
class:
|
|
1338
|
-
}, [
|
|
1339
|
-
class:
|
|
1352
|
+
class: u(T)
|
|
1353
|
+
}, [b("div", {
|
|
1354
|
+
class: h(T),
|
|
1340
1355
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
1341
1356
|
onClick: (l) => T.enable && P(l, T)
|
|
1342
|
-
}, [e.shouldShowIcon(T) &&
|
|
1357
|
+
}, [e.shouldShowIcon(T) && b("i", {
|
|
1343
1358
|
class: e.iconClass(T)
|
|
1344
|
-
}, null),
|
|
1359
|
+
}, null), b("span", null, [T.text]), b("i", {
|
|
1345
1360
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1346
1361
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1347
|
-
}, null)]),
|
|
1362
|
+
}, null)]), s(T)]);
|
|
1348
1363
|
}
|
|
1349
1364
|
function g() {
|
|
1350
1365
|
p();
|
|
@@ -1359,198 +1374,198 @@ const {
|
|
|
1359
1374
|
} = Pe(), K = /* @__PURE__ */ G({
|
|
1360
1375
|
name: "FResponseToolbar",
|
|
1361
1376
|
props: pe,
|
|
1362
|
-
emits: [],
|
|
1363
|
-
setup(
|
|
1364
|
-
const t = B(ge(
|
|
1377
|
+
emits: ["click"],
|
|
1378
|
+
setup(n, e) {
|
|
1379
|
+
const t = B(ge(n.items)), s = B(), p = B(), u = B(), h = B(n.alignment), P = {
|
|
1365
1380
|
id: "__more_buttons__",
|
|
1366
1381
|
text: "更多"
|
|
1367
|
-
}, M = B(new X(P)), g =
|
|
1368
|
-
const
|
|
1382
|
+
}, M = B(new X(P)), g = xe(), T = V(() => M.value.children.length > 0), l = V(() => {
|
|
1383
|
+
const m = {
|
|
1369
1384
|
"f-toolbar": !0,
|
|
1370
1385
|
"f-response-toolbar": !0,
|
|
1371
1386
|
"position-relative": !0
|
|
1372
1387
|
};
|
|
1373
|
-
if (
|
|
1374
|
-
const D =
|
|
1375
|
-
D && D.length && D.reduce((j, d) => (j[d] = !0, j),
|
|
1388
|
+
if (n.customClass) {
|
|
1389
|
+
const D = n.customClass.split(" ");
|
|
1390
|
+
D && D.length && D.reduce((j, d) => (j[d] = !0, j), m);
|
|
1376
1391
|
}
|
|
1377
|
-
return
|
|
1392
|
+
return m;
|
|
1378
1393
|
}), a = V(() => ({
|
|
1379
1394
|
"d-flex": !0,
|
|
1380
1395
|
"flex-nowrap": !0,
|
|
1381
|
-
"justify-content-end":
|
|
1382
|
-
"justify-content-start":
|
|
1396
|
+
"justify-content-end": h.value === "right",
|
|
1397
|
+
"justify-content-start": h.value === "left"
|
|
1383
1398
|
})), {
|
|
1384
|
-
renderToolbarDropdown:
|
|
1385
|
-
clearAllDropDown:
|
|
1386
|
-
} =
|
|
1387
|
-
function
|
|
1388
|
-
t.value.filter((
|
|
1389
|
-
|
|
1390
|
-
}), M.value.expanded = !1,
|
|
1399
|
+
renderToolbarDropdown: f,
|
|
1400
|
+
clearAllDropDown: i
|
|
1401
|
+
} = It(n, g);
|
|
1402
|
+
function C() {
|
|
1403
|
+
t.value.filter((m) => m.children && m.children.length > 0).forEach((m) => {
|
|
1404
|
+
m.expanded = !1;
|
|
1405
|
+
}), M.value.expanded = !1, i();
|
|
1391
1406
|
}
|
|
1392
|
-
function w(
|
|
1407
|
+
function w(m) {
|
|
1393
1408
|
const D = {
|
|
1394
1409
|
btn: !0,
|
|
1395
1410
|
"f-rt-btn": !0,
|
|
1396
|
-
"f-btn-ml":
|
|
1397
|
-
"f-btn-mr":
|
|
1398
|
-
"btn-icontext": !!(
|
|
1411
|
+
"f-btn-ml": h.value === "right",
|
|
1412
|
+
"f-btn-mr": h.value === "left",
|
|
1413
|
+
"btn-icontext": !!(m.icon && m.icon.trim())
|
|
1399
1414
|
};
|
|
1400
|
-
if (
|
|
1401
|
-
const j =
|
|
1415
|
+
if (m.class) {
|
|
1416
|
+
const j = m.class.split(" ");
|
|
1402
1417
|
j && j.length && j.reduce((d, r) => (d[r] = !0, d), D);
|
|
1403
1418
|
}
|
|
1404
1419
|
return D;
|
|
1405
1420
|
}
|
|
1406
|
-
function
|
|
1407
|
-
document.body.click(), D.onClick(
|
|
1421
|
+
function k(m, D) {
|
|
1422
|
+
document.body.click(), D.onClick(m, D.id), e.emit("click", m, D.id);
|
|
1408
1423
|
}
|
|
1409
|
-
function R(
|
|
1410
|
-
return
|
|
1424
|
+
function R(m) {
|
|
1425
|
+
return b("button", {
|
|
1411
1426
|
type: "button",
|
|
1412
|
-
class: w(
|
|
1413
|
-
id:
|
|
1414
|
-
disabled: !
|
|
1415
|
-
onClick: (D) =>
|
|
1416
|
-
}, [g.shouldShowIcon(
|
|
1417
|
-
class: g.iconClass(
|
|
1418
|
-
}, null),
|
|
1427
|
+
class: w(m),
|
|
1428
|
+
id: m.id,
|
|
1429
|
+
disabled: !m.enable,
|
|
1430
|
+
onClick: (D) => k(D, m)
|
|
1431
|
+
}, [g.shouldShowIcon(m) && b("i", {
|
|
1432
|
+
class: g.iconClass(m)
|
|
1433
|
+
}, null), m.text]);
|
|
1419
1434
|
}
|
|
1420
|
-
const S = /* @__PURE__ */ new Map(),
|
|
1421
|
-
function L(
|
|
1422
|
-
const D =
|
|
1423
|
-
let j =
|
|
1435
|
+
const S = /* @__PURE__ */ new Map(), A = [];
|
|
1436
|
+
function L(m) {
|
|
1437
|
+
const D = u.value;
|
|
1438
|
+
let j = m;
|
|
1424
1439
|
const d = Array.from(D.children), r = d[d.length - 1].id === "__more_buttons__" ? d[d.length - 1] : null;
|
|
1425
1440
|
if (r) {
|
|
1426
|
-
const
|
|
1441
|
+
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
1442
|
j -= _;
|
|
1428
1443
|
}
|
|
1429
|
-
const
|
|
1430
|
-
for (const
|
|
1431
|
-
const F =
|
|
1432
|
-
j < N ? (S.set(
|
|
1433
|
-
id:
|
|
1444
|
+
const o = d.filter((x) => x.id !== "__more_buttons__");
|
|
1445
|
+
for (const x of o) {
|
|
1446
|
+
const F = x.computedStyleMap().get("margin-left"), _ = x.computedStyleMap().get("margin-right"), N = (F ? F.value : 0) + x.getBoundingClientRect().width + (_ ? _.value : 0);
|
|
1447
|
+
j < N ? (S.set(x.id, !0), A.push({
|
|
1448
|
+
id: x.id,
|
|
1434
1449
|
width: N
|
|
1435
1450
|
})) : j -= N;
|
|
1436
1451
|
}
|
|
1437
|
-
if (
|
|
1438
|
-
for (let
|
|
1439
|
-
const F =
|
|
1452
|
+
if (A.length)
|
|
1453
|
+
for (let x = A.length - 1; x >= 0; x--) {
|
|
1454
|
+
const F = A[x].width;
|
|
1440
1455
|
if (j >= F)
|
|
1441
|
-
j -= F, S.delete(
|
|
1456
|
+
j -= F, S.delete(A[x].id), A.pop();
|
|
1442
1457
|
else
|
|
1443
1458
|
break;
|
|
1444
1459
|
}
|
|
1445
1460
|
const c = Object.assign({}, M.value);
|
|
1446
1461
|
c.children = [];
|
|
1447
|
-
const y = new X(c),
|
|
1448
|
-
M.value = y, t.value =
|
|
1462
|
+
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), []);
|
|
1463
|
+
M.value = y, t.value = I;
|
|
1449
1464
|
}
|
|
1450
|
-
const
|
|
1451
|
-
if (
|
|
1452
|
-
const j =
|
|
1453
|
-
(j < r ||
|
|
1465
|
+
const v = new ResizeObserver((m) => {
|
|
1466
|
+
if (m.length) {
|
|
1467
|
+
const j = m[0].contentRect.width, r = u.value.getBoundingClientRect().width;
|
|
1468
|
+
(j < r || A.length) && (L(j), C());
|
|
1454
1469
|
}
|
|
1455
1470
|
});
|
|
1456
1471
|
return q(() => {
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1459
|
-
}),
|
|
1460
|
-
|
|
1461
|
-
}), Q(() =>
|
|
1462
|
-
t.value = ge(
|
|
1472
|
+
const m = p.value;
|
|
1473
|
+
v.observe(m), document.body.addEventListener("click", C), document.body.addEventListener("wheel", C);
|
|
1474
|
+
}), se(() => {
|
|
1475
|
+
v.disconnect(), document.body.removeEventListener("click", C), document.body.removeEventListener("wheel", C);
|
|
1476
|
+
}), Q(() => n.items, () => {
|
|
1477
|
+
t.value = ge(n.items);
|
|
1463
1478
|
}, {
|
|
1464
1479
|
deep: !0
|
|
1465
1480
|
}), e.expose({
|
|
1466
|
-
elementRef:
|
|
1467
|
-
}), () =>
|
|
1481
|
+
elementRef: s
|
|
1482
|
+
}), () => b("div", {
|
|
1468
1483
|
class: l.value,
|
|
1469
|
-
ref:
|
|
1470
|
-
}, [
|
|
1484
|
+
ref: s
|
|
1485
|
+
}, [b("div", {
|
|
1471
1486
|
ref: p,
|
|
1472
1487
|
class: a.value
|
|
1473
|
-
}, [
|
|
1474
|
-
ref:
|
|
1488
|
+
}, [b("div", {
|
|
1489
|
+
ref: u,
|
|
1475
1490
|
class: "d-inline-block f-response-content",
|
|
1476
1491
|
style: "white-space: nowrap;"
|
|
1477
|
-
}, [t.value.filter((
|
|
1492
|
+
}, [t.value.filter((m) => m.visible).map((m) => m.children && m.children.length > 0 ? f(m) : R(m)), T.value && f(M.value)])])]);
|
|
1478
1493
|
}
|
|
1479
1494
|
});
|
|
1480
|
-
function
|
|
1481
|
-
const t = U("design-item-context"),
|
|
1495
|
+
function Ft(n, e) {
|
|
1496
|
+
const t = U("design-item-context"), s = U("toolbar-item-handler", () => {
|
|
1482
1497
|
});
|
|
1483
1498
|
function p() {
|
|
1484
|
-
|
|
1499
|
+
s && s();
|
|
1485
1500
|
}
|
|
1486
|
-
function
|
|
1487
|
-
const
|
|
1501
|
+
function u(r) {
|
|
1502
|
+
const o = {
|
|
1488
1503
|
"dropdown-menu": !0
|
|
1489
1504
|
};
|
|
1490
1505
|
if (r.class) {
|
|
1491
1506
|
const c = r.menuClass.split(" ");
|
|
1492
|
-
c && c.length && c.reduce((y,
|
|
1507
|
+
c && c.length && c.reduce((y, I) => (y[I] = !0, y), o);
|
|
1493
1508
|
}
|
|
1494
|
-
return
|
|
1509
|
+
return o;
|
|
1495
1510
|
}
|
|
1496
|
-
function
|
|
1497
|
-
const
|
|
1511
|
+
function h(r) {
|
|
1512
|
+
const o = {
|
|
1498
1513
|
disabled: !r.enable,
|
|
1499
1514
|
"dropdown-submenu": !0,
|
|
1500
1515
|
"f-rt-dropdown": !0
|
|
1501
1516
|
}, c = r.dropdownClass.split(" ");
|
|
1502
|
-
return c && c.length && c.reduce((y,
|
|
1517
|
+
return c && c.length && c.reduce((y, I) => (y[I] = !0, y), o), o;
|
|
1503
1518
|
}
|
|
1504
1519
|
function P(r) {
|
|
1505
|
-
const
|
|
1520
|
+
const o = {
|
|
1506
1521
|
disabled: !r.enable,
|
|
1507
1522
|
"dropdown-item": !0,
|
|
1508
1523
|
"f-rt-btn": !0,
|
|
1509
1524
|
"position-relative": !0,
|
|
1510
1525
|
"farris-component": !0
|
|
1511
1526
|
}, c = r.class.split(" ");
|
|
1512
|
-
return c && c.length && c.reduce((y,
|
|
1527
|
+
return c && c.length && c.reduce((y, I) => (y[I] = !0, y), o), o;
|
|
1513
1528
|
}
|
|
1514
1529
|
let M;
|
|
1515
1530
|
const g = /* @__PURE__ */ new Map();
|
|
1516
|
-
function T(r,
|
|
1517
|
-
var
|
|
1518
|
-
((
|
|
1531
|
+
function T(r, o, c) {
|
|
1532
|
+
var I;
|
|
1533
|
+
((I = r.target) == null ? void 0 : I.id) === o.id && r.stopPropagation();
|
|
1519
1534
|
const y = c ? c.id : "__top_item__";
|
|
1520
|
-
if (
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1535
|
+
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) {
|
|
1536
|
+
const x = g.get(y);
|
|
1537
|
+
x && (x.expanded = !1);
|
|
1523
1538
|
}
|
|
1524
1539
|
}
|
|
1525
1540
|
function l(r) {
|
|
1526
1541
|
r && (r.stopPropagation(), r.preventDefault());
|
|
1527
1542
|
}
|
|
1528
1543
|
function a() {
|
|
1529
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1544
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1530
1545
|
const r = document.getElementsByClassName("dgComponentSelected");
|
|
1531
|
-
Array.from(r).forEach((
|
|
1546
|
+
Array.from(r).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1532
1547
|
}
|
|
1533
|
-
function
|
|
1548
|
+
function f(r) {
|
|
1534
1549
|
r.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1535
1550
|
}
|
|
1536
|
-
function
|
|
1551
|
+
function i(r) {
|
|
1537
1552
|
const {
|
|
1538
|
-
buttons:
|
|
1553
|
+
buttons: o = []
|
|
1539
1554
|
} = t.schema;
|
|
1540
1555
|
let c = [];
|
|
1541
|
-
|
|
1542
|
-
c = c.concat(
|
|
1556
|
+
o.forEach((x) => {
|
|
1557
|
+
c = c.concat(x.children || []);
|
|
1543
1558
|
});
|
|
1544
|
-
const y = c.findIndex((
|
|
1559
|
+
const y = c.findIndex((x) => x.id === r), I = y === -1 ? null : c[y];
|
|
1545
1560
|
return {
|
|
1546
1561
|
index: y,
|
|
1547
|
-
item:
|
|
1562
|
+
item: I
|
|
1548
1563
|
};
|
|
1549
1564
|
}
|
|
1550
|
-
function
|
|
1565
|
+
function C(r) {
|
|
1551
1566
|
const {
|
|
1552
|
-
buttons:
|
|
1553
|
-
} = t.schema, c =
|
|
1567
|
+
buttons: o = []
|
|
1568
|
+
} = t.schema, c = o.findIndex((I) => I.id === r), y = c === -1 ? null : o[c];
|
|
1554
1569
|
return {
|
|
1555
1570
|
index: c,
|
|
1556
1571
|
item: y
|
|
@@ -1560,141 +1575,141 @@ function At(o, e) {
|
|
|
1560
1575
|
var y;
|
|
1561
1576
|
t.schema;
|
|
1562
1577
|
const {
|
|
1563
|
-
index:
|
|
1578
|
+
index: o,
|
|
1564
1579
|
item: c
|
|
1565
|
-
} =
|
|
1580
|
+
} = i(r);
|
|
1566
1581
|
(y = t == null ? void 0 : t.setupContext) == null || y.emit("selectionChange", c == null ? void 0 : c.type, c);
|
|
1567
1582
|
}
|
|
1568
|
-
const
|
|
1583
|
+
const k = function(r) {
|
|
1569
1584
|
const {
|
|
1570
|
-
componentType:
|
|
1571
|
-
} = r, c = z(
|
|
1572
|
-
return c && !c.id && c.type ===
|
|
1585
|
+
componentType: o
|
|
1586
|
+
} = r, c = z(o, r), y = o.toLowerCase().replace("-", "_");
|
|
1587
|
+
return c && !c.id && c.type === o && (c.id = `${y}_${Math.random().toString().slice(2, 6)}`), c;
|
|
1573
1588
|
}, R = function() {
|
|
1574
1589
|
const r = {
|
|
1575
1590
|
componentType: "response-toolbar-item",
|
|
1576
1591
|
parentComponentInstance: e.value,
|
|
1577
1592
|
targetPosition: -1
|
|
1578
1593
|
};
|
|
1579
|
-
return
|
|
1594
|
+
return k(r);
|
|
1580
1595
|
};
|
|
1581
|
-
function S(r,
|
|
1582
|
-
l(r), a(),
|
|
1596
|
+
function S(r, o) {
|
|
1597
|
+
l(r), a(), f(r), w(o.id);
|
|
1583
1598
|
}
|
|
1584
|
-
function
|
|
1599
|
+
function A(r, o, c) {
|
|
1585
1600
|
l(r);
|
|
1586
|
-
const y =
|
|
1587
|
-
buttons:
|
|
1601
|
+
const y = o.id, I = c && c.id, {
|
|
1602
|
+
buttons: x = []
|
|
1588
1603
|
} = t.schema;
|
|
1589
|
-
if (!
|
|
1604
|
+
if (!I)
|
|
1590
1605
|
return;
|
|
1591
1606
|
const {
|
|
1592
1607
|
index: F
|
|
1593
|
-
} =
|
|
1608
|
+
} = C(I);
|
|
1594
1609
|
if (F === -1)
|
|
1595
1610
|
return;
|
|
1596
1611
|
const {
|
|
1597
1612
|
index: _
|
|
1598
|
-
} =
|
|
1599
|
-
_ !== -1 && (
|
|
1613
|
+
} = i(y);
|
|
1614
|
+
_ !== -1 && (x[F].children.splice(_, 1), p());
|
|
1600
1615
|
}
|
|
1601
|
-
function L(r,
|
|
1616
|
+
function L(r, o, c) {
|
|
1602
1617
|
l(r);
|
|
1603
1618
|
const y = c && c.id, {
|
|
1604
|
-
buttons:
|
|
1619
|
+
buttons: I = []
|
|
1605
1620
|
} = t.schema;
|
|
1606
1621
|
if (!y)
|
|
1607
1622
|
return;
|
|
1608
1623
|
const {
|
|
1609
|
-
index:
|
|
1610
|
-
} =
|
|
1611
|
-
if (
|
|
1624
|
+
index: x
|
|
1625
|
+
} = C(y);
|
|
1626
|
+
if (x === -1)
|
|
1612
1627
|
return;
|
|
1613
1628
|
const F = R(), _ = Object.assign({}, F, {
|
|
1614
|
-
text:
|
|
1629
|
+
text: o.text
|
|
1615
1630
|
});
|
|
1616
|
-
|
|
1631
|
+
I[x].children.push(_), p();
|
|
1617
1632
|
}
|
|
1618
|
-
function
|
|
1633
|
+
function v(r, o, c) {
|
|
1619
1634
|
l(r);
|
|
1620
1635
|
const y = c && c.id, {
|
|
1621
|
-
buttons:
|
|
1636
|
+
buttons: I = []
|
|
1622
1637
|
} = t.schema;
|
|
1623
1638
|
if (!y)
|
|
1624
1639
|
return;
|
|
1625
1640
|
const {
|
|
1626
|
-
index:
|
|
1627
|
-
} =
|
|
1628
|
-
if (
|
|
1641
|
+
index: x
|
|
1642
|
+
} = C(y);
|
|
1643
|
+
if (x === -1)
|
|
1629
1644
|
return;
|
|
1630
1645
|
const F = R(), _ = Object.assign({}, F, {
|
|
1631
1646
|
text: "按钮"
|
|
1632
1647
|
});
|
|
1633
|
-
|
|
1648
|
+
I[x].children.push(_), p();
|
|
1634
1649
|
}
|
|
1635
|
-
function
|
|
1636
|
-
return
|
|
1650
|
+
function m(r, o) {
|
|
1651
|
+
return b("div", {
|
|
1637
1652
|
class: "component-btn-group"
|
|
1638
|
-
}, [
|
|
1653
|
+
}, [b("div", null, [b("div", {
|
|
1639
1654
|
role: "button",
|
|
1640
1655
|
class: "btn component-settings-button",
|
|
1641
1656
|
title: "删除",
|
|
1642
1657
|
ref: "removeButton",
|
|
1643
1658
|
style: "position:static;",
|
|
1644
|
-
onClick: (c) =>
|
|
1645
|
-
}, [
|
|
1659
|
+
onClick: (c) => A(c, r, o)
|
|
1660
|
+
}, [b("i", {
|
|
1646
1661
|
class: "f-icon f-icon-yxs_delete"
|
|
1647
|
-
}, null)]),
|
|
1662
|
+
}, null)]), b("div", {
|
|
1648
1663
|
role: "button",
|
|
1649
1664
|
class: "btn component-settings-button",
|
|
1650
1665
|
title: "复制",
|
|
1651
1666
|
ref: "copyButton",
|
|
1652
1667
|
style: "position:static;",
|
|
1653
|
-
onClick: (c) => L(c, r,
|
|
1654
|
-
}, [
|
|
1668
|
+
onClick: (c) => L(c, r, o)
|
|
1669
|
+
}, [b("i", {
|
|
1655
1670
|
class: "f-icon f-icon-yxs_copy"
|
|
1656
|
-
}, null)]),
|
|
1671
|
+
}, null)]), b("div", {
|
|
1657
1672
|
role: "button",
|
|
1658
1673
|
class: "btn component-settings-button",
|
|
1659
1674
|
title: "新增同级",
|
|
1660
1675
|
ref: "appendSame",
|
|
1661
1676
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1662
|
-
onClick: (c) =>
|
|
1663
|
-
}, [
|
|
1677
|
+
onClick: (c) => v(c, r, o)
|
|
1678
|
+
}, [b("i", {
|
|
1664
1679
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1665
|
-
}, null),
|
|
1680
|
+
}, null), b("span", {
|
|
1666
1681
|
style: "font-size:13px;margin:auto"
|
|
1667
1682
|
}, [Y("新增同级")])])])]);
|
|
1668
1683
|
}
|
|
1669
1684
|
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
|
-
}, [
|
|
1685
|
+
return r.children.map((o) => o.children && o.children.length ? b("li", {
|
|
1686
|
+
class: h(o),
|
|
1687
|
+
id: o.id,
|
|
1688
|
+
onClick: (c) => o.enable && T(c, o, r)
|
|
1689
|
+
}, [b("span", {
|
|
1690
|
+
id: o.id,
|
|
1691
|
+
class: P(o),
|
|
1692
|
+
onMouseover: (c) => o.enable && T(c, o, r)
|
|
1693
|
+
}, [o.text, b("i", {
|
|
1679
1694
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1680
1695
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1681
|
-
}, null)]), M(
|
|
1682
|
-
class: P(
|
|
1683
|
-
id:
|
|
1684
|
-
onClick: (c) => S(c,
|
|
1685
|
-
}, [
|
|
1686
|
-
class:
|
|
1687
|
-
}, null),
|
|
1688
|
-
}
|
|
1689
|
-
function j(r,
|
|
1696
|
+
}, null)]), M(o, o)]) : b("li", {
|
|
1697
|
+
class: P(o),
|
|
1698
|
+
id: o.id,
|
|
1699
|
+
onClick: (c) => S(c, o)
|
|
1700
|
+
}, [m(o, r), n.shouldShowIcon(o) && b("i", {
|
|
1701
|
+
class: n.iconClass(o)
|
|
1702
|
+
}, null), o.text]));
|
|
1703
|
+
}
|
|
1704
|
+
function j(r, o, c) {
|
|
1690
1705
|
const y = {
|
|
1691
1706
|
display: r.expanded ? "block" : "none",
|
|
1692
1707
|
position: "fixed",
|
|
1693
1708
|
maxWidth: "300px",
|
|
1694
1709
|
width: "auto",
|
|
1695
1710
|
minWidth: "120px"
|
|
1696
|
-
},
|
|
1697
|
-
if (
|
|
1711
|
+
}, I = document.getElementsByTagName("body")[0].getClientRects()[0].width, x = o, F = x == null ? void 0 : x.getClientRects();
|
|
1712
|
+
if (x && F && F.length) {
|
|
1698
1713
|
const {
|
|
1699
1714
|
top: _,
|
|
1700
1715
|
width: N,
|
|
@@ -1703,7 +1718,7 @@ function At(o, e) {
|
|
|
1703
1718
|
height: H
|
|
1704
1719
|
} = F[0], ee = Math.ceil(H + _);
|
|
1705
1720
|
y.top = `${ee}px`, y.left = `${$}px`;
|
|
1706
|
-
const Ie = r.id + "_menu", te =
|
|
1721
|
+
const Ie = r.id + "_menu", te = o ? o.querySelector("#" + Ie) : null;
|
|
1707
1722
|
if (te) {
|
|
1708
1723
|
y.display === "block" && (te.style.display = "block");
|
|
1709
1724
|
const ue = te.getBoundingClientRect();
|
|
@@ -1712,17 +1727,17 @@ function At(o, e) {
|
|
|
1712
1727
|
const Fe = Math.ceil(N + $);
|
|
1713
1728
|
y.left = `${Fe}px`;
|
|
1714
1729
|
}
|
|
1715
|
-
|
|
1730
|
+
I - $ - N < ue.width && (y.left = `${(c ? $ : W) - ue.width}px`);
|
|
1716
1731
|
}
|
|
1717
1732
|
}
|
|
1718
1733
|
return y;
|
|
1719
1734
|
}
|
|
1720
|
-
M = function(r,
|
|
1721
|
-
var
|
|
1722
|
-
const c = be(), y =
|
|
1723
|
-
return
|
|
1724
|
-
class:
|
|
1725
|
-
style: j(r,
|
|
1735
|
+
M = function(r, o) {
|
|
1736
|
+
var x, F;
|
|
1737
|
+
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);
|
|
1738
|
+
return b("ul", {
|
|
1739
|
+
class: u(r),
|
|
1740
|
+
style: j(r, I, o),
|
|
1726
1741
|
id: r.id + "_menu"
|
|
1727
1742
|
}, [D(r)]);
|
|
1728
1743
|
};
|
|
@@ -1736,11 +1751,11 @@ function At(o, e) {
|
|
|
1736
1751
|
clearAllDropDownMenu: d
|
|
1737
1752
|
};
|
|
1738
1753
|
}
|
|
1739
|
-
function
|
|
1740
|
-
const
|
|
1754
|
+
function Rt(n, e, t) {
|
|
1755
|
+
const s = B(n.alignment), {
|
|
1741
1756
|
renderDropdownMenu: p,
|
|
1742
|
-
clearAllDropDownMenu:
|
|
1743
|
-
} =
|
|
1757
|
+
clearAllDropDownMenu: u
|
|
1758
|
+
} = Ft(e, t), h = U("design-item-context"), P = U("toolbar-item-handler", () => {
|
|
1744
1759
|
});
|
|
1745
1760
|
function M() {
|
|
1746
1761
|
P && P();
|
|
@@ -1749,10 +1764,10 @@ function It(o, e, t) {
|
|
|
1749
1764
|
const r = {
|
|
1750
1765
|
"btn-group": !0,
|
|
1751
1766
|
"f-rt-dropdown": !0,
|
|
1752
|
-
"f-btn-ml":
|
|
1753
|
-
"f-btn-mr":
|
|
1754
|
-
},
|
|
1755
|
-
return
|
|
1767
|
+
"f-btn-ml": s.value === "right",
|
|
1768
|
+
"f-btn-mr": s.value === "left"
|
|
1769
|
+
}, o = d.dropdownClass.split(" ");
|
|
1770
|
+
return o && o.length && o.reduce((c, y) => (c[y] = !0, c), r), r;
|
|
1756
1771
|
}
|
|
1757
1772
|
function T(d) {
|
|
1758
1773
|
const r = {
|
|
@@ -1764,8 +1779,8 @@ function It(o, e, t) {
|
|
|
1764
1779
|
"btn-icontext": !!(d.icon && d.icon.trim())
|
|
1765
1780
|
};
|
|
1766
1781
|
if (d.class) {
|
|
1767
|
-
const
|
|
1768
|
-
|
|
1782
|
+
const o = d.class.split(" ");
|
|
1783
|
+
o && o.length && o.reduce((c, y) => (c[y] = !0, c), r);
|
|
1769
1784
|
}
|
|
1770
1785
|
return r;
|
|
1771
1786
|
}
|
|
@@ -1774,93 +1789,93 @@ function It(o, e, t) {
|
|
|
1774
1789
|
}
|
|
1775
1790
|
function a(d, r) {
|
|
1776
1791
|
l(d);
|
|
1777
|
-
const
|
|
1778
|
-
document.body.click(), r.expanded = !
|
|
1792
|
+
const o = r.expanded;
|
|
1793
|
+
document.body.click(), r.expanded = !o;
|
|
1779
1794
|
}
|
|
1780
|
-
const
|
|
1795
|
+
const f = function(d) {
|
|
1781
1796
|
const {
|
|
1782
1797
|
componentType: r
|
|
1783
|
-
} = d,
|
|
1784
|
-
return
|
|
1785
|
-
},
|
|
1798
|
+
} = d, o = z(r, d), c = r.toLowerCase().replace("-", "_");
|
|
1799
|
+
return o && !o.id && o.type === r && (o.id = `${c}_${Math.random().toString().slice(2, 6)}`), o;
|
|
1800
|
+
}, i = function() {
|
|
1786
1801
|
const d = {
|
|
1787
1802
|
componentType: "response-toolbar-item",
|
|
1788
1803
|
parentComponentInstance: t.value,
|
|
1789
1804
|
targetPosition: -1
|
|
1790
1805
|
};
|
|
1791
|
-
return
|
|
1806
|
+
return f(d);
|
|
1792
1807
|
};
|
|
1793
|
-
function
|
|
1794
|
-
const r =
|
|
1808
|
+
function C(d) {
|
|
1809
|
+
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
1810
|
return {
|
|
1796
|
-
index:
|
|
1811
|
+
index: o,
|
|
1797
1812
|
toolbarItem: c
|
|
1798
1813
|
};
|
|
1799
1814
|
}
|
|
1800
1815
|
function w(d, r) {
|
|
1801
1816
|
var F;
|
|
1802
1817
|
const {
|
|
1803
|
-
index:
|
|
1818
|
+
index: o,
|
|
1804
1819
|
toolbarItem: c
|
|
1805
|
-
} =
|
|
1806
|
-
if (
|
|
1820
|
+
} = C(r);
|
|
1821
|
+
if (o === -1)
|
|
1807
1822
|
return;
|
|
1808
|
-
const y = c.text || "按钮",
|
|
1823
|
+
const y = c.text || "按钮", I = i(), x = Object.assign({}, I, {
|
|
1809
1824
|
text: y
|
|
1810
1825
|
});
|
|
1811
|
-
(F =
|
|
1826
|
+
(F = h.schema.buttons) == null || F.push(x), M();
|
|
1812
1827
|
}
|
|
1813
|
-
function
|
|
1828
|
+
function k(d, r) {
|
|
1814
1829
|
const {
|
|
1815
|
-
index:
|
|
1830
|
+
index: o,
|
|
1816
1831
|
toolbarItem: c
|
|
1817
|
-
} =
|
|
1818
|
-
if (
|
|
1832
|
+
} = C(r);
|
|
1833
|
+
if (o === -1)
|
|
1819
1834
|
return;
|
|
1820
|
-
const y = c.text || "按钮",
|
|
1835
|
+
const y = c.text || "按钮", I = i(), x = Object.assign({}, I, {
|
|
1821
1836
|
text: y
|
|
1822
|
-
}), F =
|
|
1823
|
-
F.push(
|
|
1837
|
+
}), F = h.schema.buttons[o].children || [];
|
|
1838
|
+
F.push(x), h.schema.buttons[o].children = F, M();
|
|
1824
1839
|
}
|
|
1825
1840
|
function R(d, r) {
|
|
1826
|
-
const
|
|
1827
|
-
c !== -1 && (
|
|
1841
|
+
const o = h.schema.buttons || h.schema.contents, c = o == null ? void 0 : o.findIndex((y) => y.id === r);
|
|
1842
|
+
c !== -1 && (o.splice(c, 1), M());
|
|
1828
1843
|
}
|
|
1829
1844
|
function S(d) {
|
|
1830
|
-
return
|
|
1845
|
+
return b("div", {
|
|
1831
1846
|
class: "component-btn-group"
|
|
1832
|
-
}, [
|
|
1847
|
+
}, [b("div", null, [b("div", {
|
|
1833
1848
|
role: "button",
|
|
1834
1849
|
class: "btn component-settings-button",
|
|
1835
1850
|
title: "删除",
|
|
1836
1851
|
ref: "removeButton",
|
|
1837
1852
|
style: "position:static;",
|
|
1838
1853
|
onClick: (r) => R(r, d)
|
|
1839
|
-
}, [
|
|
1854
|
+
}, [b("i", {
|
|
1840
1855
|
class: "f-icon f-icon-yxs_delete"
|
|
1841
|
-
}, null)]),
|
|
1856
|
+
}, null)]), b("div", {
|
|
1842
1857
|
role: "button",
|
|
1843
1858
|
class: "btn component-settings-button",
|
|
1844
1859
|
title: "复制",
|
|
1845
1860
|
ref: "copyButton",
|
|
1846
1861
|
style: "position:static;",
|
|
1847
1862
|
onClick: (r) => w(r, d)
|
|
1848
|
-
}, [
|
|
1863
|
+
}, [b("i", {
|
|
1849
1864
|
class: "f-icon f-icon-yxs_copy"
|
|
1850
|
-
}, null)]),
|
|
1865
|
+
}, null)]), b("div", {
|
|
1851
1866
|
role: "button",
|
|
1852
1867
|
class: "btn component-settings-button",
|
|
1853
1868
|
title: "新增子级",
|
|
1854
1869
|
ref: "appendChildButton",
|
|
1855
1870
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1856
|
-
onClick: (r) =>
|
|
1857
|
-
}, [
|
|
1871
|
+
onClick: (r) => k(r, d)
|
|
1872
|
+
}, [b("i", {
|
|
1858
1873
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1859
|
-
}, null),
|
|
1874
|
+
}, null), b("span", {
|
|
1860
1875
|
style: "font-size:13px;margin:auto"
|
|
1861
1876
|
}, [Y("新增子级")])])])]);
|
|
1862
1877
|
}
|
|
1863
|
-
function
|
|
1878
|
+
function A() {
|
|
1864
1879
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((r) => r.classList.remove("dgComponentFocused"));
|
|
1865
1880
|
const d = document.getElementsByClassName("dgComponentSelected");
|
|
1866
1881
|
Array.from(d).forEach((r) => r.classList.remove("dgComponentSelected"));
|
|
@@ -1868,61 +1883,61 @@ function It(o, e, t) {
|
|
|
1868
1883
|
function L(d) {
|
|
1869
1884
|
d.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1870
1885
|
}
|
|
1871
|
-
function
|
|
1886
|
+
function v(d) {
|
|
1872
1887
|
var y;
|
|
1873
|
-
const r =
|
|
1874
|
-
if (
|
|
1888
|
+
const r = h.schema.buttons || h.schema.contents, o = r == null ? void 0 : r.findIndex((I) => I.id === d);
|
|
1889
|
+
if (o === -1)
|
|
1875
1890
|
return;
|
|
1876
|
-
const c = r[
|
|
1877
|
-
(y =
|
|
1891
|
+
const c = r[o];
|
|
1892
|
+
(y = h == null ? void 0 : h.setupContext) == null || y.emit("selectionChange", "response-toolbar-item", c);
|
|
1878
1893
|
}
|
|
1879
|
-
function
|
|
1880
|
-
l(d),
|
|
1894
|
+
function m(d, r) {
|
|
1895
|
+
l(d), A(), L(d), l(d), a(d, r), v(r.id);
|
|
1881
1896
|
}
|
|
1882
1897
|
function D(d) {
|
|
1883
|
-
return
|
|
1898
|
+
return b("div", {
|
|
1884
1899
|
id: d.id,
|
|
1885
1900
|
class: g(d)
|
|
1886
|
-
}, [
|
|
1901
|
+
}, [b("div", {
|
|
1887
1902
|
class: T(d),
|
|
1888
1903
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1889
|
-
onClick: (r) => d.enable &&
|
|
1890
|
-
}, [S(d.id), e.shouldShowIcon(d) &&
|
|
1904
|
+
onClick: (r) => d.enable && m(r, d)
|
|
1905
|
+
}, [S(d.id), e.shouldShowIcon(d) && b("i", {
|
|
1891
1906
|
class: e.iconClass(d)
|
|
1892
|
-
}, null),
|
|
1907
|
+
}, null), b("span", null, [d.text]), b("i", {
|
|
1893
1908
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1894
1909
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1895
1910
|
}, null)]), p(d)]);
|
|
1896
1911
|
}
|
|
1897
1912
|
function j() {
|
|
1898
|
-
|
|
1913
|
+
u();
|
|
1899
1914
|
}
|
|
1900
1915
|
return {
|
|
1901
1916
|
renderToolbarDropdown: D,
|
|
1902
1917
|
clearAllDropDown: j
|
|
1903
1918
|
};
|
|
1904
1919
|
}
|
|
1905
|
-
function
|
|
1906
|
-
function
|
|
1907
|
-
var p,
|
|
1920
|
+
function Ot() {
|
|
1921
|
+
function n(e) {
|
|
1922
|
+
var p, u;
|
|
1908
1923
|
if (!e)
|
|
1909
1924
|
return !1;
|
|
1910
1925
|
const t = ((p = e.targetContainer) == null ? void 0 : p.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1911
1926
|
if (!t)
|
|
1912
1927
|
return !1;
|
|
1913
|
-
const
|
|
1928
|
+
const s = (u = t.schema.appearance) == null ? void 0 : u.class;
|
|
1914
1929
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1915
|
-
const
|
|
1930
|
+
const h = t.schema.type, P = (h === "response-form" || h === "content-container") && s && s.includes("farris-form");
|
|
1916
1931
|
if (t.schema.type !== "response-layout-item" && !P)
|
|
1917
1932
|
return !1;
|
|
1918
1933
|
}
|
|
1919
1934
|
return e.controlType !== "field-set";
|
|
1920
1935
|
}
|
|
1921
1936
|
return {
|
|
1922
|
-
basalDragulaRuleForContainer:
|
|
1937
|
+
basalDragulaRuleForContainer: n
|
|
1923
1938
|
};
|
|
1924
1939
|
}
|
|
1925
|
-
const
|
|
1940
|
+
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
1941
|
"f-page": {
|
|
1927
1942
|
description: "The root class of page designed by farris.",
|
|
1928
1943
|
type: "object",
|
|
@@ -2486,106 +2501,106 @@ const Rt = "https://json-schema.org/draft/2020-12/schema", Ot = "https://farris-
|
|
|
2486
2501
|
description: "",
|
|
2487
2502
|
type: "object"
|
|
2488
2503
|
}
|
|
2489
|
-
},
|
|
2490
|
-
$schema:
|
|
2491
|
-
$id:
|
|
2492
|
-
title:
|
|
2493
|
-
description:
|
|
2494
|
-
type:
|
|
2495
|
-
properties:
|
|
2496
|
-
required:
|
|
2504
|
+
}, Wt = [], zt = {
|
|
2505
|
+
$schema: Lt,
|
|
2506
|
+
$id: Nt,
|
|
2507
|
+
title: $t,
|
|
2508
|
+
description: Vt,
|
|
2509
|
+
type: _t,
|
|
2510
|
+
properties: Ut,
|
|
2511
|
+
required: Wt
|
|
2497
2512
|
}, oe = /* @__PURE__ */ new Map();
|
|
2498
2513
|
function Ee() {
|
|
2499
|
-
function
|
|
2514
|
+
function n(i, C, w, k) {
|
|
2500
2515
|
var R;
|
|
2501
2516
|
if (typeof w == "number")
|
|
2502
|
-
return ((R =
|
|
2517
|
+
return ((R = k[i]) == null ? void 0 : R.length) === w;
|
|
2503
2518
|
if (typeof w == "object") {
|
|
2504
|
-
const S = Object.keys(w)[0],
|
|
2519
|
+
const S = Object.keys(w)[0], A = w[S];
|
|
2505
2520
|
if (S === "not")
|
|
2506
|
-
return Number(
|
|
2521
|
+
return Number(k[i].length) !== Number(A);
|
|
2507
2522
|
if (S === "moreThan")
|
|
2508
|
-
return Number(
|
|
2523
|
+
return Number(k[i].length) >= Number(A);
|
|
2509
2524
|
if (S === "lessThan")
|
|
2510
|
-
return Number(
|
|
2525
|
+
return Number(k[i].length) <= Number(A);
|
|
2511
2526
|
}
|
|
2512
2527
|
return !1;
|
|
2513
2528
|
}
|
|
2514
|
-
function e(
|
|
2515
|
-
return typeof w == "boolean" ?
|
|
2529
|
+
function e(i, C, w, k) {
|
|
2530
|
+
return typeof w == "boolean" ? k.childrenClassList.includes(C) === !!w : !1;
|
|
2516
2531
|
}
|
|
2517
|
-
function t(
|
|
2518
|
-
return typeof w == "boolean" ?
|
|
2532
|
+
function t(i, C, w, k) {
|
|
2533
|
+
return typeof w == "boolean" ? k.parentClassList.includes(C) === !!w : !1;
|
|
2519
2534
|
}
|
|
2520
|
-
function i
|
|
2521
|
-
return typeof w == "boolean" ?
|
|
2535
|
+
function s(i, C, w, k) {
|
|
2536
|
+
return typeof w == "boolean" ? k.parentClassList.includes(C) === !!w : !1;
|
|
2522
2537
|
}
|
|
2523
2538
|
const p = /* @__PURE__ */ new Map([
|
|
2524
|
-
["length",
|
|
2539
|
+
["length", n],
|
|
2525
2540
|
["hasChildren", e],
|
|
2526
|
-
["hasSibling",
|
|
2541
|
+
["hasSibling", s],
|
|
2527
2542
|
["hasParent", t]
|
|
2528
2543
|
]);
|
|
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:
|
|
2544
|
+
function u(i, C) {
|
|
2545
|
+
const w = i;
|
|
2546
|
+
return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((k) => {
|
|
2547
|
+
if (k === "length")
|
|
2548
|
+
return { target: w, operator: "length", param: null, value: C[k] };
|
|
2549
|
+
const R = k, S = C[k];
|
|
2550
|
+
return { target: w, operator: i === "children" ? "hasChildren" : i === "parent" ? "hasParent" : "hasSibling", param: R, value: S };
|
|
2536
2551
|
}) : [];
|
|
2537
2552
|
}
|
|
2538
|
-
function
|
|
2539
|
-
if (p.has(
|
|
2540
|
-
const w = p.get(
|
|
2541
|
-
return w && w(
|
|
2553
|
+
function h(i, C) {
|
|
2554
|
+
if (p.has(i.operator)) {
|
|
2555
|
+
const w = p.get(i.operator);
|
|
2556
|
+
return w && w(i.target, i.param, i.value, C) || !1;
|
|
2542
2557
|
}
|
|
2543
2558
|
return !1;
|
|
2544
2559
|
}
|
|
2545
|
-
function P(
|
|
2546
|
-
return Object.keys(
|
|
2547
|
-
const L =
|
|
2560
|
+
function P(i, C) {
|
|
2561
|
+
return Object.keys(i).reduce((S, A) => {
|
|
2562
|
+
const L = u(A, i[A]);
|
|
2548
2563
|
return S.push(...L), S;
|
|
2549
|
-
}, []).reduce((S,
|
|
2564
|
+
}, []).reduce((S, A) => S && h(A, C), !0);
|
|
2550
2565
|
}
|
|
2551
|
-
function M(
|
|
2552
|
-
const w = Object.keys(
|
|
2553
|
-
return
|
|
2566
|
+
function M(i, C) {
|
|
2567
|
+
const w = Object.keys(i), k = w.includes("allOf"), R = w.includes("anyOf"), S = k || R, v = (S ? i[S ? k ? "allOf" : "anyOf" : "allOf"] : [i]).map((D) => P(D, C));
|
|
2568
|
+
return k ? !v.includes(!1) : v.includes(!0);
|
|
2554
2569
|
}
|
|
2555
|
-
function g(
|
|
2556
|
-
const w =
|
|
2557
|
-
return w ? typeof w == "boolean" ? w : typeof w == "object" ? M(w,
|
|
2570
|
+
function g(i, C) {
|
|
2571
|
+
const w = i.const;
|
|
2572
|
+
return w ? typeof w == "boolean" ? w : typeof w == "object" ? M(w, C) : !1 : !1;
|
|
2558
2573
|
}
|
|
2559
|
-
function T(
|
|
2560
|
-
return (
|
|
2574
|
+
function T(i) {
|
|
2575
|
+
return (C) => {
|
|
2561
2576
|
const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2562
|
-
return
|
|
2563
|
-
const S =
|
|
2564
|
-
return
|
|
2577
|
+
return i && i.properties && Object.keys(i.properties).reduce((k, R) => {
|
|
2578
|
+
const S = i.properties[R];
|
|
2579
|
+
return k[R] = g(S, C), k;
|
|
2565
2580
|
}, w), w;
|
|
2566
2581
|
};
|
|
2567
2582
|
}
|
|
2568
|
-
function l(
|
|
2569
|
-
if (
|
|
2570
|
-
const { rules:
|
|
2571
|
-
w.set(
|
|
2583
|
+
function l(i, C, w) {
|
|
2584
|
+
if (C.type === "object" && C.properties) {
|
|
2585
|
+
const { rules: k, contents: R } = C.properties;
|
|
2586
|
+
w.set(i, T(k)), R && Object.keys(R.properties).forEach(
|
|
2572
2587
|
(S) => l(S, R.properties[S], w)
|
|
2573
2588
|
);
|
|
2574
2589
|
}
|
|
2575
2590
|
}
|
|
2576
2591
|
function a() {
|
|
2577
|
-
const { properties:
|
|
2578
|
-
Object.keys(
|
|
2579
|
-
l(
|
|
2592
|
+
const { properties: i } = zt;
|
|
2593
|
+
Object.keys(i).forEach((C) => {
|
|
2594
|
+
l(C, i[C], oe);
|
|
2580
2595
|
});
|
|
2581
2596
|
}
|
|
2582
|
-
function
|
|
2597
|
+
function f(i, C) {
|
|
2583
2598
|
const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2584
|
-
return oe.has(
|
|
2599
|
+
return oe.has(i) ? oe.get(i)(C) : w;
|
|
2585
2600
|
}
|
|
2586
|
-
return a(), { getRuleValue:
|
|
2601
|
+
return a(), { getRuleValue: f };
|
|
2587
2602
|
}
|
|
2588
|
-
class
|
|
2603
|
+
class Ht extends J {
|
|
2589
2604
|
constructor(e, t) {
|
|
2590
2605
|
super(e, t);
|
|
2591
2606
|
}
|
|
@@ -2609,7 +2624,9 @@ class Wt extends J {
|
|
|
2609
2624
|
description: "The type of a component.",
|
|
2610
2625
|
editor: {
|
|
2611
2626
|
type: "combo-list",
|
|
2612
|
-
|
|
2627
|
+
textField: "value",
|
|
2628
|
+
valueField: "key",
|
|
2629
|
+
data: [{ key: "response-toolbar", value: E["response-toolbar"].name }]
|
|
2613
2630
|
}
|
|
2614
2631
|
}
|
|
2615
2632
|
}
|
|
@@ -2652,54 +2669,54 @@ class Wt extends J {
|
|
|
2652
2669
|
};
|
|
2653
2670
|
}
|
|
2654
2671
|
}
|
|
2655
|
-
function
|
|
2656
|
-
const p = Ee(),
|
|
2672
|
+
function qt(n, e, t, s) {
|
|
2673
|
+
const p = Ee(), u = B(!1), h = B(!1);
|
|
2657
2674
|
let P = !0, M = !1, g;
|
|
2658
|
-
function T(
|
|
2659
|
-
return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ?
|
|
2675
|
+
function T(v) {
|
|
2676
|
+
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
2677
|
}
|
|
2661
|
-
function l(
|
|
2662
|
-
return !
|
|
2678
|
+
function l(v) {
|
|
2679
|
+
return !Ot().basalDragulaRuleForContainer(v) || !P || !T(v), !1;
|
|
2663
2680
|
}
|
|
2664
2681
|
function a() {
|
|
2665
|
-
|
|
2666
|
-
const
|
|
2682
|
+
u.value = !1, h.value = !1;
|
|
2683
|
+
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
2684
|
const H = W && W.appearance ? W.appearance.class : "", ee = H ? H.split(" ") : [];
|
|
2668
2685
|
return $.push(...ee), $;
|
|
2669
|
-
}, []) : [], y = t == null ? void 0 : t.schema,
|
|
2686
|
+
}, []) : [], y = t == null ? void 0 : t.schema, I = y && y.appearance && y.appearance.class || "", x = I ? I.split(" ") : [];
|
|
2670
2687
|
g = {
|
|
2671
|
-
componentClass:
|
|
2688
|
+
componentClass: m,
|
|
2672
2689
|
componentClassList: D,
|
|
2673
2690
|
childContents: j,
|
|
2674
2691
|
firstChildContent: d,
|
|
2675
2692
|
firstChildClass: r,
|
|
2676
|
-
firstChildClassList:
|
|
2693
|
+
firstChildClassList: o,
|
|
2677
2694
|
parent: y,
|
|
2678
|
-
parentClass:
|
|
2679
|
-
parentClassList:
|
|
2695
|
+
parentClass: I,
|
|
2696
|
+
parentClassList: x,
|
|
2680
2697
|
children: j,
|
|
2681
2698
|
childrenClassList: c
|
|
2682
2699
|
};
|
|
2683
2700
|
const { canAccept: F, fixed: _, hidePadding: N } = p.getRuleValue(D[0], g);
|
|
2684
2701
|
return P = F, M = N, !0;
|
|
2685
2702
|
}
|
|
2686
|
-
function
|
|
2703
|
+
function f(v) {
|
|
2687
2704
|
}
|
|
2688
|
-
function
|
|
2689
|
-
return
|
|
2705
|
+
function i() {
|
|
2706
|
+
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2690
2707
|
}
|
|
2691
|
-
function v
|
|
2692
|
-
return
|
|
2708
|
+
function C(v, m) {
|
|
2709
|
+
return m.text = v.label, m;
|
|
2693
2710
|
}
|
|
2694
|
-
function w(
|
|
2695
|
-
const j =
|
|
2711
|
+
function w(v, m, D) {
|
|
2712
|
+
const j = n;
|
|
2696
2713
|
if ((j.appearance && j.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2697
|
-
const
|
|
2698
|
-
return c.editor = D, c.label =
|
|
2714
|
+
const o = String(v.innerText), c = z("form-group");
|
|
2715
|
+
return c.editor = D, c.label = o, c;
|
|
2699
2716
|
}
|
|
2700
2717
|
return D;
|
|
2701
2718
|
}
|
|
2702
|
-
function
|
|
2719
|
+
function k() {
|
|
2703
2720
|
return !1;
|
|
2704
2721
|
}
|
|
2705
2722
|
function R() {
|
|
@@ -2708,29 +2725,29 @@ function zt(o, e, t, i) {
|
|
|
2708
2725
|
function S() {
|
|
2709
2726
|
return !0;
|
|
2710
2727
|
}
|
|
2711
|
-
function
|
|
2728
|
+
function A() {
|
|
2712
2729
|
return M;
|
|
2713
2730
|
}
|
|
2714
|
-
function L(
|
|
2715
|
-
return new
|
|
2731
|
+
function L(v) {
|
|
2732
|
+
return new Ht(v, e).getPropertyConfig(n);
|
|
2716
2733
|
}
|
|
2717
2734
|
return {
|
|
2718
2735
|
canAccepts: l,
|
|
2719
2736
|
checkCanAddComponent: S,
|
|
2720
2737
|
checkCanDeleteComponent: R,
|
|
2721
|
-
checkCanMoveComponent:
|
|
2722
|
-
getStyles:
|
|
2723
|
-
hideNestedPaddingInDesginerView:
|
|
2738
|
+
checkCanMoveComponent: k,
|
|
2739
|
+
getStyles: i,
|
|
2740
|
+
hideNestedPaddingInDesginerView: A,
|
|
2724
2741
|
onAcceptNewChildElement: w,
|
|
2725
|
-
onAcceptMovedChildElement:
|
|
2726
|
-
onResolveNewComponentSchema:
|
|
2742
|
+
onAcceptMovedChildElement: f,
|
|
2743
|
+
onResolveNewComponentSchema: C,
|
|
2727
2744
|
resolveComponentContext: a,
|
|
2728
2745
|
getPropsConfig: L,
|
|
2729
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2730
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2746
|
+
triggerBelongedComponentToMoveWhenMoved: u,
|
|
2747
|
+
triggerBelongedComponentToDeleteWhenDeleted: h
|
|
2731
2748
|
};
|
|
2732
2749
|
}
|
|
2733
|
-
const
|
|
2750
|
+
const Gt = {
|
|
2734
2751
|
id: { type: String, default: "" },
|
|
2735
2752
|
componentId: { type: String, default: "" },
|
|
2736
2753
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2744,39 +2761,39 @@ const Ht = {
|
|
|
2744
2761
|
*/
|
|
2745
2762
|
modelValue: { type: Object }
|
|
2746
2763
|
}, Z = B(0);
|
|
2747
|
-
function
|
|
2748
|
-
const t = e.getBoundingClientRect(),
|
|
2749
|
-
return p &&
|
|
2764
|
+
function Qt(n, e) {
|
|
2765
|
+
const t = e.getBoundingClientRect(), s = n.getBoundingClientRect(), p = s.top >= t.top, u = s.top <= t.bottom;
|
|
2766
|
+
return p && u;
|
|
2750
2767
|
}
|
|
2751
|
-
function
|
|
2752
|
-
if (!
|
|
2768
|
+
function Xt(n) {
|
|
2769
|
+
if (!n)
|
|
2753
2770
|
return;
|
|
2754
2771
|
let e;
|
|
2755
|
-
if (
|
|
2772
|
+
if (n.className.includes("dgComponentSelected") ? e = n : e = n.querySelector(".dgComponentSelected"), !e)
|
|
2756
2773
|
return;
|
|
2757
2774
|
const t = e.getBoundingClientRect();
|
|
2758
2775
|
if (t.width === 0 && t.height === 0)
|
|
2759
2776
|
return;
|
|
2760
|
-
const
|
|
2761
|
-
if (
|
|
2762
|
-
if (!
|
|
2763
|
-
|
|
2777
|
+
const s = e.querySelector(".component-btn-group");
|
|
2778
|
+
if (s) {
|
|
2779
|
+
if (!Qt(e, n)) {
|
|
2780
|
+
s.style.display = "none";
|
|
2764
2781
|
return;
|
|
2765
2782
|
}
|
|
2766
|
-
|
|
2767
|
-
const
|
|
2768
|
-
if (
|
|
2769
|
-
const P =
|
|
2770
|
-
|
|
2783
|
+
s.style.display = "";
|
|
2784
|
+
const u = s.getBoundingClientRect(), h = s.querySelector("div");
|
|
2785
|
+
if (h) {
|
|
2786
|
+
const P = h.getBoundingClientRect();
|
|
2787
|
+
h.style.top = u.top + "px", h.style.left = u.left - P.width + "px";
|
|
2771
2788
|
}
|
|
2772
2789
|
}
|
|
2773
2790
|
}
|
|
2774
|
-
function
|
|
2791
|
+
function Yt(n, e, t) {
|
|
2775
2792
|
var L;
|
|
2776
|
-
function
|
|
2793
|
+
function s() {
|
|
2777
2794
|
}
|
|
2778
|
-
const p = "",
|
|
2779
|
-
function
|
|
2795
|
+
const p = "", u = B();
|
|
2796
|
+
function h() {
|
|
2780
2797
|
return !0;
|
|
2781
2798
|
}
|
|
2782
2799
|
function P() {
|
|
@@ -2791,204 +2808,206 @@ function Qt(o, e, t) {
|
|
|
2791
2808
|
function T() {
|
|
2792
2809
|
return !0;
|
|
2793
2810
|
}
|
|
2794
|
-
function l(
|
|
2795
|
-
if (!
|
|
2811
|
+
function l(v) {
|
|
2812
|
+
if (!v || !v.value)
|
|
2796
2813
|
return null;
|
|
2797
|
-
const
|
|
2814
|
+
const m = B(v == null ? void 0 : v.value.parent), D = l(m);
|
|
2798
2815
|
return D || null;
|
|
2799
2816
|
}
|
|
2800
|
-
function a(
|
|
2801
|
-
const { componentInstance:
|
|
2802
|
-
return !
|
|
2817
|
+
function a(v = e) {
|
|
2818
|
+
const { componentInstance: m, designerItemElementRef: D } = v;
|
|
2819
|
+
return !m || !m.value ? null : m.value.canMove || m.value.canAdd || m.value.canDelete ? D : a(v.parent);
|
|
2803
2820
|
}
|
|
2804
|
-
function
|
|
2821
|
+
function f(v) {
|
|
2805
2822
|
return !!t;
|
|
2806
2823
|
}
|
|
2807
|
-
function
|
|
2824
|
+
function i() {
|
|
2808
2825
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2809
2826
|
}
|
|
2810
|
-
function
|
|
2827
|
+
function C() {
|
|
2811
2828
|
}
|
|
2812
|
-
function w(
|
|
2829
|
+
function w(v, m) {
|
|
2813
2830
|
}
|
|
2814
|
-
function
|
|
2815
|
-
const { componentType:
|
|
2816
|
-
let D = z(
|
|
2817
|
-
const j =
|
|
2818
|
-
return D && !D.id && D.type ===
|
|
2831
|
+
function k(v) {
|
|
2832
|
+
const { componentType: m } = v;
|
|
2833
|
+
let D = z(m, v);
|
|
2834
|
+
const j = m.toLowerCase().replace("-", "_");
|
|
2835
|
+
return D && !D.id && D.type === m && (D.id = `${j}_${Math.random().toString().slice(2, 6)}`), D;
|
|
2819
2836
|
}
|
|
2820
|
-
function R(
|
|
2821
|
-
const D = String(
|
|
2822
|
-
d.parentComponentInstance =
|
|
2837
|
+
function R(v, m) {
|
|
2838
|
+
const D = String(v.getAttribute("data-controltype")), j = v.getAttribute("data-feature"), d = j ? JSON.parse(j) : {};
|
|
2839
|
+
d.parentComponentInstance = u.value;
|
|
2823
2840
|
let r = z(D, d);
|
|
2824
|
-
const
|
|
2825
|
-
return r && !r.id && r.type === D && (r.id = `${
|
|
2841
|
+
const o = D.toLowerCase().replace("-", "_");
|
|
2842
|
+
return r && !r.id && r.type === D && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
|
|
2826
2843
|
}
|
|
2827
|
-
function S(
|
|
2844
|
+
function S(v) {
|
|
2828
2845
|
}
|
|
2829
|
-
function
|
|
2846
|
+
function A(...v) {
|
|
2830
2847
|
return [];
|
|
2831
2848
|
}
|
|
2832
|
-
return
|
|
2833
|
-
canMove:
|
|
2849
|
+
return u.value = {
|
|
2850
|
+
canMove: h(),
|
|
2834
2851
|
canSelectParent: P(),
|
|
2835
2852
|
canAdd: g(),
|
|
2836
2853
|
canDelete: M(),
|
|
2837
2854
|
canNested: !T(),
|
|
2838
2855
|
contents: [],
|
|
2839
|
-
elementRef:
|
|
2856
|
+
elementRef: n,
|
|
2840
2857
|
parent: (L = e.parent) == null ? void 0 : L.componentInstance,
|
|
2841
2858
|
schema: e.schema,
|
|
2842
2859
|
styles: p,
|
|
2843
|
-
canAccepts:
|
|
2860
|
+
canAccepts: f,
|
|
2844
2861
|
getBelongedComponentInstance: l,
|
|
2845
2862
|
getDraggableDesignItemElement: a,
|
|
2846
|
-
getDraggingDisplayText:
|
|
2847
|
-
getPropConfig:
|
|
2848
|
-
getDragScopeElement:
|
|
2863
|
+
getDraggingDisplayText: i,
|
|
2864
|
+
getPropConfig: A,
|
|
2865
|
+
getDragScopeElement: C,
|
|
2849
2866
|
onAcceptMovedChildElement: w,
|
|
2850
2867
|
onAcceptNewChildElement: R,
|
|
2851
2868
|
onChildElementMovedOut: S,
|
|
2852
|
-
addNewChildComponentSchema:
|
|
2853
|
-
updateDragAndDropRules:
|
|
2869
|
+
addNewChildComponentSchema: k,
|
|
2870
|
+
updateDragAndDropRules: s,
|
|
2854
2871
|
triggerBelongedComponentToMoveWhenMoved: B(!1),
|
|
2855
2872
|
triggerBelongedComponentToDeleteWhenDeleted: B(!1)
|
|
2856
|
-
},
|
|
2873
|
+
}, u;
|
|
2857
2874
|
}
|
|
2858
2875
|
const Be = /* @__PURE__ */ G({
|
|
2859
2876
|
name: "FDesignerInnerItem",
|
|
2860
|
-
props:
|
|
2877
|
+
props: Gt,
|
|
2861
2878
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2862
|
-
setup(
|
|
2863
|
-
const t = B(
|
|
2879
|
+
setup(n, e) {
|
|
2880
|
+
const t = B(n.canMove), s = B(n.canAdd), p = B(n.canDelete), u = B(!1), h = B(n.contentKey), P = B(n.childType), M = B(n.childLabel), g = B(n.modelValue), T = B(""), l = B(), a = U("canvas-dragula"), f = B(), i = U("design-item-context"), C = {
|
|
2864
2881
|
designerItemElementRef: l,
|
|
2865
|
-
componentInstance:
|
|
2882
|
+
componentInstance: f,
|
|
2866
2883
|
schema: g.value,
|
|
2867
|
-
parent:
|
|
2884
|
+
parent: i,
|
|
2868
2885
|
setupContext: e
|
|
2869
2886
|
};
|
|
2870
|
-
Le("design-item-context",
|
|
2887
|
+
Le("design-item-context", C);
|
|
2871
2888
|
const w = V(() => ({
|
|
2872
2889
|
"farris-component": !0,
|
|
2890
|
+
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2891
|
+
"flex-fill": n.id == "root-component",
|
|
2873
2892
|
"position-relative": t.value || p.value,
|
|
2874
|
-
"farris-nested":
|
|
2893
|
+
"farris-nested": u.value,
|
|
2875
2894
|
"can-move": t.value,
|
|
2876
2895
|
"d-none": l.value && l.value.classList.contains("d-none")
|
|
2877
|
-
})),
|
|
2878
|
-
const
|
|
2896
|
+
})), k = V(() => {
|
|
2897
|
+
const o = {};
|
|
2879
2898
|
return T.value && T.value.split(";").reduce((c, y) => {
|
|
2880
|
-
const [
|
|
2881
|
-
return
|
|
2882
|
-
},
|
|
2899
|
+
const [I, x] = y.split(":");
|
|
2900
|
+
return I && (c[I] = x), c;
|
|
2901
|
+
}, o), o;
|
|
2883
2902
|
});
|
|
2884
|
-
function R(
|
|
2885
|
-
if (
|
|
2886
|
-
const y =
|
|
2903
|
+
function R(o, c) {
|
|
2904
|
+
if (i && i.schema[h.value]) {
|
|
2905
|
+
const y = i.schema[h.value].findIndex((I) => I.id === c.id);
|
|
2887
2906
|
if (y > -1) {
|
|
2888
|
-
const
|
|
2889
|
-
|
|
2907
|
+
const I = i.schema[h.value].length, x = i.schema[h.value][y % I];
|
|
2908
|
+
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
2909
|
}
|
|
2891
2910
|
}
|
|
2892
2911
|
}
|
|
2893
|
-
function S(
|
|
2894
|
-
if (
|
|
2912
|
+
function S(o) {
|
|
2913
|
+
if (f.value.addNewChildComponentSchema) {
|
|
2895
2914
|
const c = {
|
|
2896
2915
|
componentType: P.value,
|
|
2897
2916
|
label: M.value,
|
|
2898
|
-
parentComponentInstance:
|
|
2917
|
+
parentComponentInstance: f.value,
|
|
2899
2918
|
targetPosition: -1
|
|
2900
|
-
}, y =
|
|
2901
|
-
g.value[
|
|
2919
|
+
}, y = f.value.addNewChildComponentSchema(c);
|
|
2920
|
+
g.value[h.value].push(y), e.emit("addComponent");
|
|
2902
2921
|
}
|
|
2903
2922
|
}
|
|
2904
|
-
function
|
|
2905
|
-
return
|
|
2923
|
+
function A() {
|
|
2924
|
+
return s.value && b("div", {
|
|
2906
2925
|
role: "button",
|
|
2907
2926
|
class: "btn component-settings-button",
|
|
2908
2927
|
title: "新增",
|
|
2909
2928
|
ref: "removeComponent",
|
|
2910
|
-
onClick: (
|
|
2929
|
+
onClick: (o) => {
|
|
2911
2930
|
S();
|
|
2912
2931
|
}
|
|
2913
|
-
}, [
|
|
2932
|
+
}, [b("i", {
|
|
2914
2933
|
class: "f-icon f-icon-plus-circle"
|
|
2915
2934
|
}, null)]);
|
|
2916
2935
|
}
|
|
2917
|
-
function L(
|
|
2918
|
-
return p.value &&
|
|
2936
|
+
function L(o) {
|
|
2937
|
+
return p.value && b("div", {
|
|
2919
2938
|
role: "button",
|
|
2920
2939
|
class: "btn component-settings-button",
|
|
2921
2940
|
title: "删除",
|
|
2922
2941
|
ref: "removeComponent",
|
|
2923
|
-
onClick: $e((c) => R(c,
|
|
2924
|
-
}, [
|
|
2942
|
+
onClick: $e((c) => R(c, o), ["stop"])
|
|
2943
|
+
}, [b("i", {
|
|
2925
2944
|
class: "f-icon f-icon-yxs_delete"
|
|
2926
2945
|
}, null)]);
|
|
2927
2946
|
}
|
|
2928
|
-
function
|
|
2929
|
-
return t.value &&
|
|
2947
|
+
function v() {
|
|
2948
|
+
return t.value && b("div", {
|
|
2930
2949
|
role: "button",
|
|
2931
2950
|
class: "btn component-settings-button",
|
|
2932
2951
|
title: "移动",
|
|
2933
2952
|
ref: "moveComponent"
|
|
2934
|
-
}, [
|
|
2953
|
+
}, [b("i", {
|
|
2935
2954
|
"data-dragging-icon": "true",
|
|
2936
2955
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2937
2956
|
}, null)]);
|
|
2938
2957
|
}
|
|
2939
|
-
function
|
|
2940
|
-
return
|
|
2958
|
+
function m(o) {
|
|
2959
|
+
return b("div", {
|
|
2941
2960
|
class: "component-btn-group",
|
|
2942
2961
|
"data-noattach": "true"
|
|
2943
|
-
}, [
|
|
2962
|
+
}, [b("div", null, [A(), v(), L(o)])]);
|
|
2944
2963
|
}
|
|
2945
|
-
Q(() =>
|
|
2946
|
-
g.value =
|
|
2964
|
+
Q(() => n.modelValue, (o) => {
|
|
2965
|
+
g.value = o, C.schema = o;
|
|
2947
2966
|
});
|
|
2948
|
-
function D(
|
|
2949
|
-
const c =
|
|
2950
|
-
|
|
2967
|
+
function D(o) {
|
|
2968
|
+
const c = o.target;
|
|
2969
|
+
Xt(c);
|
|
2951
2970
|
}
|
|
2952
2971
|
function j() {
|
|
2953
|
-
var
|
|
2954
|
-
(c = (
|
|
2972
|
+
var o, c;
|
|
2973
|
+
(c = (o = g.value) == null ? void 0 : o.contents) != null && c.length && l.value && l.value.addEventListener("scroll", D);
|
|
2955
2974
|
}
|
|
2956
2975
|
function d() {
|
|
2957
|
-
const
|
|
2958
|
-
return
|
|
2976
|
+
const o = l.value, c = B(o.children[1]);
|
|
2977
|
+
return Yt(c, C).value;
|
|
2959
2978
|
}
|
|
2960
2979
|
q(() => {
|
|
2961
2980
|
if (l.value) {
|
|
2962
|
-
const
|
|
2963
|
-
|
|
2981
|
+
const o = l.value.querySelector(`[data-dragref='${g.value.id}-container']`);
|
|
2982
|
+
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
2983
|
}
|
|
2965
2984
|
j(), Z.value++;
|
|
2966
2985
|
}), Ne(() => {
|
|
2967
2986
|
l.value && l.value.removeEventListener("scroll", D);
|
|
2968
2987
|
});
|
|
2969
|
-
function r(
|
|
2970
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((y) => y.classList.remove("dgComponentFocused")),
|
|
2988
|
+
function r(o) {
|
|
2989
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((y) => y.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
|
|
2971
2990
|
const c = l.value;
|
|
2972
2991
|
if (c) {
|
|
2973
2992
|
const y = document.getElementsByClassName("dgComponentSelected");
|
|
2974
2993
|
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
|
-
|
|
2994
|
+
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);
|
|
2995
|
+
const x = f.value.getDraggableDesignItemElement(C);
|
|
2996
|
+
x && x.value && x.value.classList.add("dgComponentSelected");
|
|
2978
2997
|
}
|
|
2979
2998
|
}
|
|
2980
2999
|
Z.value++;
|
|
2981
3000
|
}
|
|
2982
|
-
return () =>
|
|
2983
|
-
id: `${
|
|
3001
|
+
return () => b("div", {
|
|
3002
|
+
id: `${n.id}-design-item`,
|
|
2984
3003
|
ref: l,
|
|
2985
3004
|
class: w.value,
|
|
2986
|
-
style:
|
|
3005
|
+
style: k.value,
|
|
2987
3006
|
onClick: r
|
|
2988
|
-
}, [
|
|
3007
|
+
}, [m(g.value), e.slots.default && e.slots.default()]);
|
|
2989
3008
|
}
|
|
2990
3009
|
});
|
|
2991
|
-
class
|
|
3010
|
+
class Zt extends J {
|
|
2992
3011
|
constructor(e, t) {
|
|
2993
3012
|
super(e, t);
|
|
2994
3013
|
}
|
|
@@ -3039,7 +3058,7 @@ class Xt extends J {
|
|
|
3039
3058
|
title: "style样式"
|
|
3040
3059
|
}
|
|
3041
3060
|
},
|
|
3042
|
-
setPropertyRelates(t,
|
|
3061
|
+
setPropertyRelates(t, s) {
|
|
3043
3062
|
}
|
|
3044
3063
|
};
|
|
3045
3064
|
}
|
|
@@ -3050,9 +3069,9 @@ class Xt extends J {
|
|
|
3050
3069
|
name: "点击事件"
|
|
3051
3070
|
}
|
|
3052
3071
|
];
|
|
3053
|
-
var
|
|
3054
|
-
const p =
|
|
3055
|
-
|
|
3072
|
+
var s = this;
|
|
3073
|
+
const p = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), u = {};
|
|
3074
|
+
u[s.viewModelId] = {
|
|
3056
3075
|
type: "events-editor",
|
|
3057
3076
|
editor: {
|
|
3058
3077
|
initialData: p
|
|
@@ -3060,19 +3079,19 @@ class Xt extends J {
|
|
|
3060
3079
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3061
3080
|
title: "事件",
|
|
3062
3081
|
hideTitle: !0,
|
|
3063
|
-
properties:
|
|
3082
|
+
properties: u,
|
|
3064
3083
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3065
3084
|
refreshPanelAfterChanged: !0,
|
|
3066
3085
|
tabId: "commands",
|
|
3067
3086
|
tabName: "交互",
|
|
3068
|
-
setPropertyRelates(
|
|
3069
|
-
const M =
|
|
3070
|
-
delete e[
|
|
3087
|
+
setPropertyRelates(h, P) {
|
|
3088
|
+
const M = h.propertyValue;
|
|
3089
|
+
delete e[s.viewModelId], M && (M.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, M.events, M));
|
|
3071
3090
|
}
|
|
3072
3091
|
};
|
|
3073
3092
|
}
|
|
3074
3093
|
}
|
|
3075
|
-
class
|
|
3094
|
+
class Kt extends J {
|
|
3076
3095
|
constructor(e, t) {
|
|
3077
3096
|
super(e, t);
|
|
3078
3097
|
}
|
|
@@ -3096,7 +3115,9 @@ class Yt extends J {
|
|
|
3096
3115
|
description: "The type of a component.",
|
|
3097
3116
|
editor: {
|
|
3098
3117
|
type: "combo-list",
|
|
3099
|
-
|
|
3118
|
+
textField: "value",
|
|
3119
|
+
valueField: "key",
|
|
3120
|
+
data: [{ key: "response-toolbar-item", value: E["response-toolbar-item"].name }]
|
|
3100
3121
|
}
|
|
3101
3122
|
},
|
|
3102
3123
|
text: {
|
|
@@ -3121,8 +3142,8 @@ class Yt extends J {
|
|
|
3121
3142
|
label: "click",
|
|
3122
3143
|
name: "点击事件"
|
|
3123
3144
|
}
|
|
3124
|
-
],
|
|
3125
|
-
|
|
3145
|
+
], s = this, p = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), u = {};
|
|
3146
|
+
u[s.viewModelId] = {
|
|
3126
3147
|
type: "events-editor",
|
|
3127
3148
|
editor: {
|
|
3128
3149
|
initialData: p
|
|
@@ -3130,23 +3151,23 @@ class Yt extends J {
|
|
|
3130
3151
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3131
3152
|
title: "事件",
|
|
3132
3153
|
hideTitle: !0,
|
|
3133
|
-
properties:
|
|
3154
|
+
properties: u,
|
|
3134
3155
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3135
3156
|
refreshPanelAfterChanged: !0,
|
|
3136
3157
|
tabId: "commands",
|
|
3137
3158
|
tabName: "交互",
|
|
3138
|
-
setPropertyRelates(
|
|
3139
|
-
const M =
|
|
3140
|
-
delete e[
|
|
3159
|
+
setPropertyRelates(h, P) {
|
|
3160
|
+
const M = h.propertyValue;
|
|
3161
|
+
delete e[s.viewModelId], M && (M.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, M.events, M));
|
|
3141
3162
|
}
|
|
3142
3163
|
};
|
|
3143
3164
|
}
|
|
3144
3165
|
}
|
|
3145
|
-
function
|
|
3166
|
+
function Jt(n, e) {
|
|
3146
3167
|
Ee();
|
|
3147
|
-
const t = B(!1),
|
|
3148
|
-
let p = !1,
|
|
3149
|
-
function
|
|
3168
|
+
const t = B(!1), s = B(!1);
|
|
3169
|
+
let p = !1, u = !1;
|
|
3170
|
+
function h(w) {
|
|
3150
3171
|
return !1;
|
|
3151
3172
|
}
|
|
3152
3173
|
function P(w) {
|
|
@@ -3154,14 +3175,14 @@ function Zt(o, e) {
|
|
|
3154
3175
|
function M() {
|
|
3155
3176
|
return "";
|
|
3156
3177
|
}
|
|
3157
|
-
function g(w,
|
|
3158
|
-
return
|
|
3178
|
+
function g(w, k) {
|
|
3179
|
+
return k.text = w.label, k;
|
|
3159
3180
|
}
|
|
3160
|
-
function T(w,
|
|
3161
|
-
const S =
|
|
3181
|
+
function T(w, k, R) {
|
|
3182
|
+
const S = n.schema;
|
|
3162
3183
|
if ((S.appearance && S.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3163
|
-
const
|
|
3164
|
-
return
|
|
3184
|
+
const v = String(w.innerText), m = z("form-group");
|
|
3185
|
+
return m.editor = R, m.label = v, m;
|
|
3165
3186
|
}
|
|
3166
3187
|
return R;
|
|
3167
3188
|
}
|
|
@@ -3169,231 +3190,232 @@ function Zt(o, e) {
|
|
|
3169
3190
|
return !1;
|
|
3170
3191
|
}
|
|
3171
3192
|
function a() {
|
|
3172
|
-
return !
|
|
3193
|
+
return !u;
|
|
3173
3194
|
}
|
|
3174
|
-
function
|
|
3195
|
+
function f() {
|
|
3175
3196
|
return !1;
|
|
3176
3197
|
}
|
|
3177
|
-
function
|
|
3198
|
+
function i() {
|
|
3178
3199
|
return p;
|
|
3179
3200
|
}
|
|
3180
|
-
function
|
|
3181
|
-
let
|
|
3182
|
-
switch (
|
|
3201
|
+
function C(w) {
|
|
3202
|
+
let k;
|
|
3203
|
+
switch (n.schema.type) {
|
|
3183
3204
|
case "tab-toolbar-item":
|
|
3184
|
-
|
|
3205
|
+
k = new Zt(w, e);
|
|
3185
3206
|
break;
|
|
3186
3207
|
default:
|
|
3187
|
-
|
|
3208
|
+
k = new Kt(w, e);
|
|
3188
3209
|
}
|
|
3189
|
-
return
|
|
3210
|
+
return k.getPropertyConfig(n.schema);
|
|
3190
3211
|
}
|
|
3191
3212
|
return {
|
|
3192
|
-
canAccepts:
|
|
3193
|
-
checkCanAddComponent:
|
|
3213
|
+
canAccepts: h,
|
|
3214
|
+
checkCanAddComponent: f,
|
|
3194
3215
|
checkCanDeleteComponent: a,
|
|
3195
3216
|
checkCanMoveComponent: l,
|
|
3196
3217
|
getStyles: M,
|
|
3197
|
-
hideNestedPaddingInDesginerView:
|
|
3218
|
+
hideNestedPaddingInDesginerView: i,
|
|
3198
3219
|
onAcceptNewChildElement: T,
|
|
3199
3220
|
onAcceptMovedChildElement: P,
|
|
3200
3221
|
onResolveNewComponentSchema: g,
|
|
3201
|
-
getPropsConfig:
|
|
3222
|
+
getPropsConfig: C,
|
|
3202
3223
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
3203
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
3224
|
+
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
3204
3225
|
};
|
|
3205
3226
|
}
|
|
3206
3227
|
const je = /* @__PURE__ */ G({
|
|
3207
3228
|
name: "FResponseToolbarItemDesign",
|
|
3208
|
-
props:
|
|
3229
|
+
props: ke,
|
|
3209
3230
|
emits: ["Click"],
|
|
3210
|
-
setup(
|
|
3231
|
+
setup(n, e) {
|
|
3211
3232
|
B(), B();
|
|
3212
|
-
const t = B(
|
|
3233
|
+
const t = B(n.alignment), s = {
|
|
3213
3234
|
id: "__more_buttons__",
|
|
3214
3235
|
text: "More"
|
|
3215
|
-
}, p = B(new X(
|
|
3236
|
+
}, p = B(new X(s));
|
|
3216
3237
|
V(() => p.value.children.length > 0);
|
|
3217
|
-
const
|
|
3238
|
+
const u = B(), h = U("designer-host-service"), P = U("design-item-context"), M = Jt(P, h), g = ve(u, P, M);
|
|
3218
3239
|
U("toolbar-item-handler", () => {
|
|
3219
3240
|
}), q(() => {
|
|
3220
|
-
|
|
3241
|
+
u.value.componentInstance = g;
|
|
3221
3242
|
}), e.expose(g.value);
|
|
3222
3243
|
function T() {
|
|
3223
|
-
const
|
|
3244
|
+
const f = {
|
|
3224
3245
|
"f-icon": !0
|
|
3225
3246
|
};
|
|
3226
|
-
if (
|
|
3227
|
-
const
|
|
3228
|
-
|
|
3247
|
+
if (n.icon) {
|
|
3248
|
+
const i = n.icon.trim().split(" ");
|
|
3249
|
+
i && i.length && i.reduce((C, w) => (C[w] = !0, C), f);
|
|
3229
3250
|
}
|
|
3230
|
-
return
|
|
3251
|
+
return f;
|
|
3231
3252
|
}
|
|
3232
3253
|
function l() {
|
|
3233
|
-
return !!(
|
|
3254
|
+
return !!(n.icon && n.icon.trim());
|
|
3234
3255
|
}
|
|
3235
3256
|
function a() {
|
|
3236
|
-
const
|
|
3257
|
+
const f = {
|
|
3237
3258
|
btn: !0,
|
|
3238
3259
|
"f-rt-btn": !0,
|
|
3239
3260
|
"f-btn-ml": t.value === "right",
|
|
3240
3261
|
"f-btn-mr": t.value === "left",
|
|
3241
|
-
"btn-icontext": !!(
|
|
3262
|
+
"btn-icontext": !!(n.icon && n.icon.trim())
|
|
3242
3263
|
};
|
|
3243
|
-
if (
|
|
3244
|
-
const
|
|
3245
|
-
|
|
3264
|
+
if (n.class) {
|
|
3265
|
+
const i = n.class.split(" ");
|
|
3266
|
+
i && i.length && i.reduce((C, w) => (C[w] = !0, C), f);
|
|
3246
3267
|
}
|
|
3247
|
-
return
|
|
3268
|
+
return f;
|
|
3248
3269
|
}
|
|
3249
3270
|
return q(() => {
|
|
3250
|
-
}),
|
|
3251
|
-
}), () =>
|
|
3252
|
-
ref:
|
|
3271
|
+
}), se(() => {
|
|
3272
|
+
}), () => b("div", {
|
|
3273
|
+
ref: u,
|
|
3253
3274
|
"data-dragref": `${P.schema.id}-container`,
|
|
3254
3275
|
class: "farris-component position-relative",
|
|
3255
3276
|
style: "display:inline-block!important;"
|
|
3256
|
-
}, [
|
|
3277
|
+
}, [b("button", {
|
|
3257
3278
|
type: "button",
|
|
3258
3279
|
class: a(),
|
|
3259
|
-
id:
|
|
3260
|
-
}, [l() &&
|
|
3280
|
+
id: n.id
|
|
3281
|
+
}, [l() && b("i", {
|
|
3261
3282
|
class: T()
|
|
3262
|
-
}, null),
|
|
3283
|
+
}, null), n.text])]);
|
|
3263
3284
|
}
|
|
3264
3285
|
}), Ae = /* @__PURE__ */ G({
|
|
3265
3286
|
name: "FResponseToolbarDesign",
|
|
3266
|
-
props:
|
|
3287
|
+
props: Bt,
|
|
3267
3288
|
emits: ["Click"],
|
|
3268
|
-
setup(
|
|
3269
|
-
const t = B(
|
|
3270
|
-
let
|
|
3271
|
-
const p = B(),
|
|
3289
|
+
setup(n, e) {
|
|
3290
|
+
const t = B(n.items);
|
|
3291
|
+
let s = new Array(t.value.length).fill(B());
|
|
3292
|
+
const p = B(), u = B(), h = B(n.alignment), P = {
|
|
3272
3293
|
id: "__more_buttons__",
|
|
3273
3294
|
text: "More"
|
|
3274
|
-
}, M = B(new X(P)), g =
|
|
3295
|
+
}, M = B(new X(P)), g = xe();
|
|
3275
3296
|
V(() => M.value.children.length > 0);
|
|
3276
|
-
const T = B(), l = U("designer-host-service"), a = U("design-item-context"),
|
|
3297
|
+
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
3298
|
U("toolbar-item-handler", () => {
|
|
3278
3299
|
}), q(() => {
|
|
3279
|
-
T.value.componentInstance =
|
|
3280
|
-
}), e.expose(
|
|
3281
|
-
const
|
|
3300
|
+
T.value.componentInstance = i;
|
|
3301
|
+
}), e.expose(i.value);
|
|
3302
|
+
const C = V(() => ({
|
|
3282
3303
|
"f-toolbar": !0,
|
|
3283
3304
|
"f-response-toolbar": !0,
|
|
3284
3305
|
"position-relative": !0
|
|
3285
3306
|
})), w = V(() => ({
|
|
3286
3307
|
"d-flex": !0,
|
|
3287
3308
|
"flex-nowrap": !0,
|
|
3288
|
-
"justify-content-end":
|
|
3289
|
-
"justify-content-start":
|
|
3309
|
+
"justify-content-end": h.value === "right",
|
|
3310
|
+
"justify-content-start": h.value === "left"
|
|
3290
3311
|
})), {
|
|
3291
|
-
renderToolbarDropdown:
|
|
3312
|
+
renderToolbarDropdown: k,
|
|
3292
3313
|
clearAllDropDown: R
|
|
3293
|
-
} =
|
|
3314
|
+
} = Rt(n, g, i);
|
|
3294
3315
|
function S() {
|
|
3295
3316
|
t.value.filter((d) => d.children && d.children.length > 0).forEach((d) => {
|
|
3296
3317
|
d.expanded = !1;
|
|
3297
3318
|
}), M.value.expanded = !1, R();
|
|
3298
3319
|
}
|
|
3299
|
-
const
|
|
3300
|
-
function
|
|
3301
|
-
const r =
|
|
3302
|
-
let
|
|
3320
|
+
const A = /* @__PURE__ */ new Map(), L = [];
|
|
3321
|
+
function v(d) {
|
|
3322
|
+
const r = u.value;
|
|
3323
|
+
let o = d;
|
|
3303
3324
|
const c = Array.from(r.children), y = c[c.length - 1].id === "__more_buttons__" ? c[c.length - 1] : null;
|
|
3304
3325
|
if (y) {
|
|
3305
3326
|
const N = y.computedStyleMap().get("margin-left"), $ = y.computedStyleMap().get("margin-right"), W = (N ? N.value : 0) + y.getBoundingClientRect().width + ($ ? $.value : 0);
|
|
3306
|
-
|
|
3327
|
+
o -= W;
|
|
3307
3328
|
}
|
|
3308
|
-
const
|
|
3309
|
-
for (const N of
|
|
3329
|
+
const I = c.filter((N) => N.id !== "__more_buttons__");
|
|
3330
|
+
for (const N of I) {
|
|
3310
3331
|
const $ = N.computedStyleMap().get("margin-left"), W = N.computedStyleMap().get("margin-right"), H = ($ ? $.value : 0) + N.getBoundingClientRect().width + (W ? W.value : 0);
|
|
3311
|
-
|
|
3332
|
+
o < H ? (A.set(N.id, !0), L.push({
|
|
3312
3333
|
id: N.id,
|
|
3313
3334
|
width: H
|
|
3314
|
-
})) :
|
|
3335
|
+
})) : o -= H;
|
|
3315
3336
|
}
|
|
3316
3337
|
if (L.length)
|
|
3317
3338
|
for (let N = L.length - 1; N >= 0; N--) {
|
|
3318
3339
|
const $ = L[N].width;
|
|
3319
|
-
if (
|
|
3320
|
-
|
|
3340
|
+
if (o >= $)
|
|
3341
|
+
o -= $, A.delete(L[N].id), L.pop();
|
|
3321
3342
|
else
|
|
3322
3343
|
break;
|
|
3323
3344
|
}
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3326
|
-
const F = new X(
|
|
3345
|
+
const x = Object.assign({}, M.value);
|
|
3346
|
+
x.children = [];
|
|
3347
|
+
const F = new X(x), _ = t.value.reduce((N, $) => (A.has($.id) && F.children.push($), $.visible = !A.has($.id), N.push($), N), []);
|
|
3327
3348
|
M.value = F, t.value = _;
|
|
3328
3349
|
}
|
|
3329
|
-
const
|
|
3350
|
+
const m = new ResizeObserver((d) => {
|
|
3330
3351
|
if (d.length) {
|
|
3331
|
-
const
|
|
3332
|
-
(
|
|
3352
|
+
const o = d[0].contentRect.width, y = u.value.getBoundingClientRect().width;
|
|
3353
|
+
(o < y || L.length) && v(o);
|
|
3333
3354
|
}
|
|
3334
3355
|
});
|
|
3335
3356
|
q(() => {
|
|
3336
3357
|
const d = p.value;
|
|
3337
|
-
|
|
3338
|
-
}),
|
|
3339
|
-
|
|
3340
|
-
}), Q(() =>
|
|
3341
|
-
t.value =
|
|
3358
|
+
m.observe(d), document.body.addEventListener("click", S);
|
|
3359
|
+
}), se(() => {
|
|
3360
|
+
m.disconnect(), document.body.removeEventListener("click", S);
|
|
3361
|
+
}), Q(() => n.items, () => {
|
|
3362
|
+
t.value = n.items;
|
|
3342
3363
|
}, {
|
|
3343
3364
|
deep: !0
|
|
3344
3365
|
}), Q(t, (d) => {
|
|
3345
|
-
|
|
3366
|
+
s = new Array(t.value.length).fill(B());
|
|
3346
3367
|
});
|
|
3347
|
-
function D(d, r,
|
|
3348
|
-
a && a.setupContext && a.setupContext.emit("selectionChange", d, r,
|
|
3368
|
+
function D(d, r, o, c) {
|
|
3369
|
+
a && a.setupContext && a.setupContext.emit("selectionChange", d, r, o, c);
|
|
3349
3370
|
}
|
|
3350
3371
|
function j() {
|
|
3351
|
-
const d =
|
|
3372
|
+
const d = u.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
3352
3373
|
d == null || d.classList.remove("dgComponentSelected"), d == null || d.classList.remove("dgComponentFocused");
|
|
3353
3374
|
}
|
|
3354
|
-
return () =>
|
|
3375
|
+
return () => b("div", {
|
|
3355
3376
|
ref: T,
|
|
3356
3377
|
"data-dragref": `${a.schema.id}-container`,
|
|
3357
|
-
class:
|
|
3358
|
-
}, [
|
|
3378
|
+
class: C.value
|
|
3379
|
+
}, [b("div", {
|
|
3359
3380
|
ref: p,
|
|
3360
3381
|
class: w.value
|
|
3361
|
-
}, [
|
|
3362
|
-
ref:
|
|
3382
|
+
}, [b("div", {
|
|
3383
|
+
ref: u,
|
|
3363
3384
|
class: "d-inline-block f-response-content",
|
|
3364
3385
|
style: "white-space: nowrap;"
|
|
3365
|
-
}, [t.value.map((d, r) =>
|
|
3366
|
-
ref:
|
|
3386
|
+
}, [t.value.map((d, r) => b(Be, {
|
|
3387
|
+
ref: s[r],
|
|
3367
3388
|
class: "p-0 display-inline-block",
|
|
3368
3389
|
modelValue: d,
|
|
3369
|
-
"onUpdate:modelValue": (
|
|
3390
|
+
"onUpdate:modelValue": (o) => d = o,
|
|
3370
3391
|
canMove: !0,
|
|
3371
3392
|
childType: "response-toolbar-item",
|
|
3372
3393
|
childLabel: "按钮",
|
|
3373
3394
|
contentKey: "buttons",
|
|
3374
|
-
componentId:
|
|
3395
|
+
componentId: n.componentId,
|
|
3375
3396
|
id: d.id,
|
|
3376
3397
|
style: "padding:0 !important;display:inline-block",
|
|
3377
3398
|
onSelectionChange: D,
|
|
3378
3399
|
onRemoveComponent: j
|
|
3379
3400
|
}, {
|
|
3380
|
-
default: () => [
|
|
3401
|
+
default: () => [b(je, {
|
|
3381
3402
|
id: d.id,
|
|
3382
3403
|
disable: d.disable,
|
|
3383
3404
|
text: d.text,
|
|
3384
|
-
icon: d.icon
|
|
3405
|
+
icon: d.icon,
|
|
3406
|
+
componentId: n.componentId
|
|
3385
3407
|
}, null)]
|
|
3386
3408
|
}))])])]);
|
|
3387
3409
|
}
|
|
3388
3410
|
}), ye = de;
|
|
3389
|
-
K.register = (
|
|
3390
|
-
|
|
3411
|
+
K.register = (n, e, t) => {
|
|
3412
|
+
n["response-toolbar"] = K, e["response-toolbar"] = de;
|
|
3391
3413
|
};
|
|
3392
|
-
K.registerDesigner = (
|
|
3393
|
-
|
|
3414
|
+
K.registerDesigner = (n, e, t) => {
|
|
3415
|
+
n["response-toolbar"] = Ae, e["response-toolbar"] = de, n["response-toolbar-item"] = je, e["response-toolbar-item"] = jt;
|
|
3394
3416
|
};
|
|
3395
3417
|
Ue(K);
|
|
3396
|
-
const
|
|
3418
|
+
const en = {
|
|
3397
3419
|
id: { type: String, default: "" },
|
|
3398
3420
|
componentId: { type: String, default: "" },
|
|
3399
3421
|
type: { type: String, default: "" },
|
|
@@ -3410,39 +3432,39 @@ const Kt = {
|
|
|
3410
3432
|
ignore: { type: Boolean, default: !1 }
|
|
3411
3433
|
}, he = /* @__PURE__ */ G({
|
|
3412
3434
|
name: "FDesignerTemplateItem",
|
|
3413
|
-
props:
|
|
3435
|
+
props: en,
|
|
3414
3436
|
emits: ["selectionChange"],
|
|
3415
|
-
setup(
|
|
3416
|
-
const t = B(),
|
|
3437
|
+
setup(n, e) {
|
|
3438
|
+
const t = B(), s = V(() => ({
|
|
3417
3439
|
"farris-component": !0
|
|
3418
3440
|
}));
|
|
3419
|
-
function p(
|
|
3420
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((P) => P.classList.remove("dgComponentFocused")),
|
|
3421
|
-
const
|
|
3422
|
-
if (
|
|
3441
|
+
function p(u) {
|
|
3442
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((P) => P.classList.remove("dgComponentFocused")), u && (u.preventDefault(), u.stopPropagation());
|
|
3443
|
+
const h = t.value;
|
|
3444
|
+
if (h) {
|
|
3423
3445
|
const P = document.getElementsByClassName("dgComponentSelected");
|
|
3424
|
-
P && P.length === 1 && P[0] === t.value || (Array.from(P).forEach((g) => g.classList.remove("dgComponentSelected")),
|
|
3446
|
+
P && P.length === 1 && P[0] === t.value || (Array.from(P).forEach((g) => g.classList.remove("dgComponentSelected")), h.classList.add("dgComponentFocused"));
|
|
3425
3447
|
}
|
|
3426
3448
|
Z.value++;
|
|
3427
3449
|
}
|
|
3428
|
-
return () =>
|
|
3429
|
-
id: `${
|
|
3450
|
+
return () => b("div", {
|
|
3451
|
+
id: `${n.id}-design-item`,
|
|
3430
3452
|
ref: t,
|
|
3431
|
-
class:
|
|
3453
|
+
class: s.value,
|
|
3432
3454
|
onClick: p
|
|
3433
3455
|
}, [e.slots.default && e.slots.default()]);
|
|
3434
3456
|
}
|
|
3435
|
-
}),
|
|
3457
|
+
}), tn = /* @__PURE__ */ G({
|
|
3436
3458
|
name: "FPageHeaderDesign",
|
|
3437
|
-
props:
|
|
3459
|
+
props: st,
|
|
3438
3460
|
emits: ["Click"],
|
|
3439
|
-
setup(
|
|
3440
|
-
const t = B(),
|
|
3461
|
+
setup(n, e) {
|
|
3462
|
+
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
3463
|
type: "response-toolbar",
|
|
3442
3464
|
buttons: []
|
|
3443
3465
|
}), M = B(ye(P.value));
|
|
3444
3466
|
q(() => {
|
|
3445
|
-
t.value.componentInstance =
|
|
3467
|
+
t.value.componentInstance = h;
|
|
3446
3468
|
}), Q(() => p.schema.toolbar, () => {
|
|
3447
3469
|
P.value = p.schema.toolbar || {
|
|
3448
3470
|
type: "response-toolbar",
|
|
@@ -3452,26 +3474,26 @@ const Kt = {
|
|
|
3452
3474
|
deep: !0
|
|
3453
3475
|
});
|
|
3454
3476
|
const g = V(() => [...M.value.items]);
|
|
3455
|
-
function T(l, a,
|
|
3456
|
-
p && p.setupContext && p.setupContext.emit("selectionChange", l, a,
|
|
3477
|
+
function T(l, a, f, i) {
|
|
3478
|
+
p && p.setupContext && p.setupContext.emit("selectionChange", l, a, f, i);
|
|
3457
3479
|
}
|
|
3458
|
-
return e.expose(
|
|
3480
|
+
return e.expose(h.value), () => b("div", {
|
|
3459
3481
|
ref: t
|
|
3460
|
-
}, [
|
|
3482
|
+
}, [b("nav", {
|
|
3461
3483
|
class: "f-page-header-base"
|
|
3462
|
-
}, [
|
|
3484
|
+
}, [b("div", {
|
|
3463
3485
|
class: "f-title"
|
|
3464
|
-
}, [
|
|
3465
|
-
default: () => [
|
|
3486
|
+
}, [b(he, null, {
|
|
3487
|
+
default: () => [b("span", {
|
|
3466
3488
|
class: "f-title-icon f-text-orna-manage"
|
|
3467
|
-
}, [
|
|
3468
|
-
class:
|
|
3489
|
+
}, [b("i", {
|
|
3490
|
+
class: n.icon
|
|
3469
3491
|
}, null)])]
|
|
3470
|
-
}),
|
|
3471
|
-
default: () => [
|
|
3492
|
+
}), b(he, null, {
|
|
3493
|
+
default: () => [b("h4", {
|
|
3472
3494
|
class: "f-title-text"
|
|
3473
|
-
}, [
|
|
3474
|
-
})]),
|
|
3495
|
+
}, [n.title])]
|
|
3496
|
+
})]), b(Be, {
|
|
3475
3497
|
class: "col-5",
|
|
3476
3498
|
modelValue: P.value,
|
|
3477
3499
|
"onUpdate:modelValue": (l) => P.value = l,
|
|
@@ -3480,28 +3502,30 @@ const Kt = {
|
|
|
3480
3502
|
childLabel: "按钮",
|
|
3481
3503
|
contentKey: "buttons",
|
|
3482
3504
|
id: P.value.id,
|
|
3483
|
-
componentId:
|
|
3505
|
+
componentId: n.componentId,
|
|
3484
3506
|
onSelectionChange: T
|
|
3485
3507
|
}, {
|
|
3486
|
-
default: () => [
|
|
3487
|
-
items: g.value
|
|
3508
|
+
default: () => [b(Ae, {
|
|
3509
|
+
items: g.value,
|
|
3510
|
+
componentId: n.componentId
|
|
3488
3511
|
}, null)]
|
|
3489
3512
|
})])]);
|
|
3490
3513
|
}
|
|
3491
|
-
}),
|
|
3492
|
-
install(
|
|
3493
|
-
|
|
3514
|
+
}), ln = {
|
|
3515
|
+
install(n) {
|
|
3516
|
+
n.component(ne.name, ne);
|
|
3494
3517
|
},
|
|
3495
|
-
register(
|
|
3496
|
-
|
|
3518
|
+
register(n, e, t, s) {
|
|
3519
|
+
n["page-header"] = ne, e["page-header"] = fe;
|
|
3497
3520
|
},
|
|
3498
|
-
registerDesigner(
|
|
3499
|
-
|
|
3521
|
+
registerDesigner(n, e, t) {
|
|
3522
|
+
n["page-header"] = tn, e["page-header"] = fe;
|
|
3500
3523
|
}
|
|
3501
3524
|
};
|
|
3502
3525
|
export {
|
|
3503
3526
|
ne as PageHeader,
|
|
3504
|
-
|
|
3527
|
+
ln as default,
|
|
3528
|
+
st as pageHeaderDesignerProps,
|
|
3505
3529
|
le as pageHeaderProps,
|
|
3506
3530
|
fe as propsResolver
|
|
3507
3531
|
};
|