@farris/ui-vue 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +150 -142
- package/components/avatar/index.esm.js +393 -457
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +491 -554
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +479 -513
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +857 -743
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4883 -5182
- package/components/data-view/index.esm.js +3072 -2949
- package/components/date-picker/index.esm.js +2626 -2689
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +940 -998
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +307 -293
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1747 -1627
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5877 -6176
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1454 -1524
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +659 -722
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1643 -1524
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6502 -6770
- package/components/mapping-editor/index.esm.js +5639 -5939
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +1098 -1130
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1317
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1479 -1513
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +706 -778
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +453 -516
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +555 -526
- package/components/response-toolbar/index.esm.js +1009 -1247
- package/components/schema-selector/index.esm.js +3261 -3373
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +441 -504
- package/components/tabs/index.esm.js +1849 -2039
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +445 -493
- package/components/time-picker/index.esm.js +1350 -1414
- package/components/transfer/index.esm.js +146 -144
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5948 -6237
- package/components/tree-view/index.esm.js +2381 -2255
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +27221 -26804
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,109 +1,107 @@
|
|
|
1
1
|
var Re = Object.defineProperty;
|
|
2
2
|
var Oe = (n, e, t) => e in n ? Re(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var O = (n, e, t) => Oe(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import { useDesignerInnerComponent as ve } from "
|
|
8
|
-
import { withInstall as
|
|
4
|
+
import { defineComponent as z, ref as x, computed as F, watch as G, createVNode as h, createTextVNode as Q, getCurrentInstance as ye, onMounted as H, onUnmounted as re, inject as V, provide as Ne, onBeforeUnmount as $e, withModifiers as _e } from "vue";
|
|
5
|
+
import { cloneDeep as Fe } from "lodash-es";
|
|
6
|
+
import Le from "../response-toolbar/index.esm.js";
|
|
7
|
+
import { useDesignerInnerComponent as ve } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { withInstall as Ve } from "../common/index.esm.js";
|
|
9
9
|
const ie = {}, Ce = {};
|
|
10
10
|
function ae(n) {
|
|
11
|
-
const { properties: e, title: t } = n,
|
|
12
|
-
return
|
|
11
|
+
const { properties: e, title: t } = n, r = Object.keys(e).reduce((u, g) => (u[g] = e[g].type === "object" && e[g].properties ? ae(e[g]) : Fe(e[g].default), u), {});
|
|
12
|
+
return r.id = `${t}-${Date.now()}`, r;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function U(n, e = {}) {
|
|
15
15
|
const t = ie[n];
|
|
16
16
|
if (t) {
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
return
|
|
17
|
+
let r = ae(t);
|
|
18
|
+
const u = Ce[n];
|
|
19
|
+
return r = u ? u({ getSchemaByType: U }, r, e) : r, r;
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
function We(n, e) {
|
|
24
24
|
const t = ae(e);
|
|
25
|
-
return Object.keys(n).reduce((
|
|
25
|
+
return Object.keys(n).reduce((r, u) => (r[u] && typeof r[u] == "object" ? Object.assign(r[u], n[u]) : r[u] = n[u], r), t), t;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return Object.keys(n).filter((
|
|
29
|
-
if (e.has(
|
|
30
|
-
const
|
|
31
|
-
if (typeof
|
|
32
|
-
|
|
27
|
+
function Ue(n, e) {
|
|
28
|
+
return Object.keys(n).filter((r) => n[r] != null).reduce((r, u) => {
|
|
29
|
+
if (e.has(u)) {
|
|
30
|
+
const g = e.get(u);
|
|
31
|
+
if (typeof g == "string")
|
|
32
|
+
r[g] = n[u];
|
|
33
33
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(
|
|
34
|
+
const v = g(u, n[u], n);
|
|
35
|
+
Object.assign(r, v);
|
|
36
36
|
}
|
|
37
37
|
} else
|
|
38
|
-
|
|
39
|
-
return
|
|
38
|
+
r[u] = n[u];
|
|
39
|
+
return r;
|
|
40
40
|
}, {});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
return
|
|
42
|
+
function qe(n, e, t = /* @__PURE__ */ new Map()) {
|
|
43
|
+
const r = We(n, e);
|
|
44
|
+
return Ue(r, t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
function e(
|
|
46
|
+
function He(n = {}) {
|
|
47
|
+
function e(b, T, l, a) {
|
|
48
48
|
if (typeof l == "number")
|
|
49
|
-
return a[
|
|
49
|
+
return a[b].length === l;
|
|
50
50
|
if (typeof l == "object") {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return Number(a[
|
|
54
|
-
if (
|
|
55
|
-
return Number(a[
|
|
56
|
-
if (
|
|
57
|
-
return Number(a[
|
|
51
|
+
const d = Object.keys(l)[0], i = l[d];
|
|
52
|
+
if (d === "not")
|
|
53
|
+
return Number(a[b].length) !== Number(i);
|
|
54
|
+
if (d === "moreThan")
|
|
55
|
+
return Number(a[b].length) >= Number(i);
|
|
56
|
+
if (d === "lessThan")
|
|
57
|
+
return Number(a[b].length) <= Number(i);
|
|
58
58
|
}
|
|
59
59
|
return !1;
|
|
60
60
|
}
|
|
61
|
-
function t(
|
|
62
|
-
return a[
|
|
61
|
+
function t(b, T, l, a) {
|
|
62
|
+
return a[b] && a[b].propertyValue && String(a[b].propertyValue.value) === String(l);
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const r = /* @__PURE__ */ new Map([
|
|
65
65
|
["length", e],
|
|
66
66
|
["getProperty", t]
|
|
67
67
|
]);
|
|
68
|
-
Object.keys(n).reduce((
|
|
69
|
-
function
|
|
70
|
-
const l =
|
|
71
|
-
return typeof T == "number" ? [{ target: l, operator: "length", param: null, value: Number(T) }] : typeof T == "boolean" ? [{ target: l, operator: "getProperty", param:
|
|
68
|
+
Object.keys(n).reduce((b, T) => (b.set(T, n[T]), b), r);
|
|
69
|
+
function u(b, T) {
|
|
70
|
+
const l = b;
|
|
71
|
+
return typeof T == "number" ? [{ target: l, operator: "length", param: null, value: Number(T) }] : typeof T == "boolean" ? [{ target: l, operator: "getProperty", param: b, 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 d = a, i = T[a];
|
|
75
|
+
return { target: l, operator: "getProperty", param: d, value: i };
|
|
76
76
|
}) : [];
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return Object.keys(
|
|
80
|
-
const
|
|
81
|
-
return l.push(...
|
|
78
|
+
function g(b) {
|
|
79
|
+
return Object.keys(b).reduce((l, a) => {
|
|
80
|
+
const d = u(a, b[a]);
|
|
81
|
+
return l.push(...d), l;
|
|
82
82
|
}, []);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
if (
|
|
86
|
-
const l =
|
|
87
|
-
return l && l(
|
|
84
|
+
function v(b, T) {
|
|
85
|
+
if (r.has(b.operator)) {
|
|
86
|
+
const l = r.get(b.operator);
|
|
87
|
+
return l && l(b.target, b.param, b.value, T) || !1;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function D(b, T) {
|
|
92
|
+
return g(b).reduce((d, i) => d && v(i, T), !0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
const l = Object.keys(
|
|
96
|
-
return a ? !
|
|
94
|
+
function E(b, T) {
|
|
95
|
+
const l = Object.keys(b), a = l.includes("allOf"), d = l.includes("anyOf"), i = a || d, j = (i ? b[i ? a ? "allOf" : "anyOf" : "allOf"] : [b]).map((P) => D(P, T));
|
|
96
|
+
return a ? !j.includes(!1) : j.includes(!0);
|
|
97
97
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
98
|
+
return { parseValueSchema: E };
|
|
99
99
|
}
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
100
|
+
const Z = {
|
|
101
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
103
102
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
104
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
103
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
105
104
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
106
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
107
105
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
108
106
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
109
107
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -114,118 +112,47 @@ const E = {
|
|
|
114
112
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
115
113
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
116
114
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
121
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
122
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
115
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
116
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
117
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
123
118
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
124
|
-
|
|
125
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
126
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
127
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
119
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
128
120
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
129
121
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
130
|
-
|
|
131
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
122
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
132
123
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
133
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
134
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
135
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
136
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
137
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
138
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
139
124
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
140
125
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
141
126
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
142
|
-
|
|
143
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
144
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
145
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
146
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
147
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
148
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
127
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
149
128
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
157
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
158
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
159
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
160
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
161
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
162
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
163
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
164
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
165
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
166
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
167
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
168
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
169
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
170
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
171
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
172
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
173
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
174
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
175
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
176
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
177
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
178
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
129
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
130
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
131
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
132
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
133
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
134
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
179
135
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
189
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
190
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
191
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
192
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
193
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
194
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
195
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
196
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
197
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
198
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
199
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
200
|
-
/** 查询类 start */
|
|
201
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
202
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
203
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
204
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
205
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
206
|
-
/** 查询类 end */
|
|
207
|
-
/** 审批类 start */
|
|
208
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
209
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
210
|
-
/** 审批类 end */
|
|
211
|
-
}, we = {}, Ge = {};
|
|
212
|
-
qe();
|
|
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
|
-
return Object.assign(M, P);
|
|
136
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
137
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
138
|
+
}, we = {}, ze = {};
|
|
139
|
+
He();
|
|
140
|
+
function ce(n, e, t = /* @__PURE__ */ new Map(), r = (v, D, E) => D, u = {}, g = (v) => v) {
|
|
141
|
+
return ie[e.title] = e, Ce[e.title] = r, we[e.title] = u, ze[e.title] = g, (v = {}) => {
|
|
142
|
+
const D = qe(v, e, t), E = Object.keys(n).reduce((b, T) => (b[T] = n[T].default, b), {});
|
|
143
|
+
return Object.assign(E, D);
|
|
217
144
|
};
|
|
218
145
|
}
|
|
219
|
-
function
|
|
146
|
+
function Ge(n, e) {
|
|
220
147
|
return { customClass: e.class, customStyle: e.style };
|
|
221
148
|
}
|
|
222
|
-
function
|
|
149
|
+
function Je(n, e) {
|
|
223
150
|
return { buttons: e.buttons };
|
|
224
151
|
}
|
|
225
|
-
const
|
|
226
|
-
["appearance",
|
|
227
|
-
["toolbar",
|
|
228
|
-
]),
|
|
152
|
+
const Qe = /* @__PURE__ */ new Map([
|
|
153
|
+
["appearance", Ge],
|
|
154
|
+
["toolbar", Je]
|
|
155
|
+
]), Xe = "https://json-schema.org/draft/2020-12/schema", Ye = "https://farris-design.gitee.io/page-header.schema.json", Ze = "page-header", Ke = "A Farris Container Component", et = "object", tt = {
|
|
229
156
|
id: {
|
|
230
157
|
description: "The unique identifier for a Page Header",
|
|
231
158
|
type: "string"
|
|
@@ -333,15 +260,15 @@ const Ye = /* @__PURE__ */ new Map([
|
|
|
333
260
|
type: "boolean",
|
|
334
261
|
default: !1
|
|
335
262
|
}
|
|
336
|
-
},
|
|
337
|
-
$schema:
|
|
338
|
-
$id:
|
|
339
|
-
title:
|
|
340
|
-
description:
|
|
341
|
-
type:
|
|
342
|
-
properties:
|
|
263
|
+
}, nt = {
|
|
264
|
+
$schema: Xe,
|
|
265
|
+
$id: Ye,
|
|
266
|
+
title: Ze,
|
|
267
|
+
description: Ke,
|
|
268
|
+
type: et,
|
|
269
|
+
properties: tt
|
|
343
270
|
};
|
|
344
|
-
function
|
|
271
|
+
function ot(n, e, t) {
|
|
345
272
|
return e.title = "标题", e;
|
|
346
273
|
}
|
|
347
274
|
const le = {
|
|
@@ -375,187 +302,187 @@ const le = {
|
|
|
375
302
|
nextPaginationDisabled: { type: Boolean, default: !1 }
|
|
376
303
|
}, st = Object.assign({}, le, {
|
|
377
304
|
componentId: { type: String, default: "" }
|
|
378
|
-
}), fe = ce(le,
|
|
305
|
+
}), fe = ce(le, nt, Qe, ot), ne = /* @__PURE__ */ z({
|
|
379
306
|
name: "FPageHeader",
|
|
380
307
|
props: le,
|
|
381
308
|
emits: ["Click", "PrePaginationClick", "NextPaginationClick"],
|
|
382
309
|
setup(n, e) {
|
|
383
|
-
const t =
|
|
384
|
-
e.emit("Click",
|
|
310
|
+
const t = x(n.buttons), r = (P, A) => {
|
|
311
|
+
e.emit("Click", P, A);
|
|
385
312
|
};
|
|
386
|
-
function
|
|
387
|
-
|
|
313
|
+
function u(P, A) {
|
|
314
|
+
P && A && A.split(" ").reduce((y, f) => (y[f] = !0, y), P);
|
|
388
315
|
}
|
|
389
|
-
const
|
|
390
|
-
const
|
|
316
|
+
const g = F(() => {
|
|
317
|
+
const P = {
|
|
391
318
|
"f-page-header": !0
|
|
392
319
|
};
|
|
393
|
-
return
|
|
394
|
-
}),
|
|
395
|
-
const
|
|
320
|
+
return u(P, n.customClass), P;
|
|
321
|
+
}), v = F(() => {
|
|
322
|
+
const P = {
|
|
396
323
|
"f-title-icon": !0
|
|
397
324
|
};
|
|
398
|
-
return
|
|
399
|
-
}),
|
|
400
|
-
const
|
|
325
|
+
return u(P, n.iconClass), P;
|
|
326
|
+
}), D = F(() => {
|
|
327
|
+
const P = {
|
|
401
328
|
"f-icon": !0
|
|
402
329
|
};
|
|
403
|
-
return
|
|
404
|
-
}),
|
|
405
|
-
const
|
|
330
|
+
return u(P, n.icon), P;
|
|
331
|
+
}), E = F(() => {
|
|
332
|
+
const P = {
|
|
406
333
|
"f-title": !0
|
|
407
334
|
};
|
|
408
|
-
return
|
|
409
|
-
}),
|
|
410
|
-
const
|
|
335
|
+
return u(P, n.titleContentClass), P;
|
|
336
|
+
}), b = F(() => {
|
|
337
|
+
const P = {
|
|
411
338
|
"f-content": !0
|
|
412
339
|
};
|
|
413
|
-
return
|
|
414
|
-
}), T =
|
|
415
|
-
const
|
|
340
|
+
return u(P, n.contentClass), P;
|
|
341
|
+
}), T = F(() => {
|
|
342
|
+
const P = {
|
|
416
343
|
"f-content": !0
|
|
417
344
|
};
|
|
418
|
-
return
|
|
419
|
-
}), l =
|
|
345
|
+
return u(P, n.downContentClass), P;
|
|
346
|
+
}), l = F(() => ({
|
|
420
347
|
"f-icon f-icon-arrow-w": !0,
|
|
421
348
|
"f-state-disabled": n.prePaginationDisabled
|
|
422
|
-
})), a =
|
|
349
|
+
})), a = F(() => ({
|
|
423
350
|
"f-icon f-icon-arrow-e": !0,
|
|
424
351
|
"f-state-disabled": n.nextPaginationDisabled
|
|
425
352
|
}));
|
|
426
|
-
function
|
|
427
|
-
n.prePaginationDisabled || e.emit("PrePaginationClick",
|
|
353
|
+
function d(P) {
|
|
354
|
+
n.prePaginationDisabled || e.emit("PrePaginationClick", P);
|
|
428
355
|
}
|
|
429
|
-
function i(
|
|
430
|
-
n.nextPaginationDisabled || e.emit("NextPaginationClick",
|
|
356
|
+
function i(P) {
|
|
357
|
+
n.nextPaginationDisabled || e.emit("NextPaginationClick", P);
|
|
431
358
|
}
|
|
432
359
|
function C() {
|
|
433
|
-
return e.slots.titleContent ?
|
|
434
|
-
class:
|
|
435
|
-
}, [
|
|
360
|
+
return e.slots.titleContent ? h("div", {
|
|
361
|
+
class: E.value
|
|
362
|
+
}, [Q(" "), e.slots.titleContent()]) : h("div", {
|
|
436
363
|
class: "f-title"
|
|
437
|
-
}, [n.showIcon && n.icon ?
|
|
438
|
-
class:
|
|
439
|
-
}, [
|
|
440
|
-
class:
|
|
441
|
-
}, null)]) : "",
|
|
364
|
+
}, [n.showIcon && n.icon ? h("span", {
|
|
365
|
+
class: v.value
|
|
366
|
+
}, [h("i", {
|
|
367
|
+
class: D.value
|
|
368
|
+
}, null)]) : "", h("h4", {
|
|
442
369
|
class: "f-title-text"
|
|
443
|
-
}, [n.title]), n.subTitle ?
|
|
370
|
+
}, [n.title]), n.subTitle ? h("h5", {
|
|
444
371
|
class: "f-title-subtitle"
|
|
445
|
-
}, [n.subTitle]) : "", n.showPagination ?
|
|
372
|
+
}, [n.subTitle]) : "", n.showPagination ? h("div", {
|
|
446
373
|
class: "f-title-pagination"
|
|
447
|
-
}, [
|
|
374
|
+
}, [h("span", {
|
|
448
375
|
class: l.value,
|
|
449
|
-
onClick:
|
|
450
|
-
}, null),
|
|
376
|
+
onClick: d
|
|
377
|
+
}, null), h("span", {
|
|
451
378
|
class: a.value,
|
|
452
379
|
onClick: i
|
|
453
380
|
}, null)]) : ""]);
|
|
454
381
|
}
|
|
455
382
|
function w() {
|
|
456
|
-
return e.slots.content ?
|
|
457
|
-
class:
|
|
458
|
-
}, [
|
|
383
|
+
return e.slots.content ? h("div", {
|
|
384
|
+
class: b.value
|
|
385
|
+
}, [Q(" "), e.slots.content()]) : "";
|
|
459
386
|
}
|
|
460
|
-
function
|
|
387
|
+
function j() {
|
|
461
388
|
if (n.buttons && n.buttons.length > 0)
|
|
462
|
-
return
|
|
389
|
+
return h(Le, {
|
|
463
390
|
customClass: n.buttonClass,
|
|
464
391
|
items: t.value,
|
|
465
|
-
onClick:
|
|
392
|
+
onClick: r
|
|
466
393
|
}, null);
|
|
467
394
|
}
|
|
468
395
|
function R() {
|
|
469
|
-
return e.slots.downContent ?
|
|
396
|
+
return e.slots.downContent ? h("div", {
|
|
470
397
|
class: T.value
|
|
471
|
-
}, [
|
|
398
|
+
}, [Q(" "), e.slots.downContent()]) : "";
|
|
472
399
|
}
|
|
473
|
-
return
|
|
474
|
-
t.value =
|
|
400
|
+
return G(() => n.buttons, (P) => {
|
|
401
|
+
t.value = P;
|
|
475
402
|
}, {
|
|
476
403
|
deep: !0
|
|
477
|
-
}), () =>
|
|
478
|
-
class:
|
|
479
|
-
}, [
|
|
404
|
+
}), () => h("div", {
|
|
405
|
+
class: g.value
|
|
406
|
+
}, [h("nav", {
|
|
480
407
|
class: "f-page-header-base"
|
|
481
|
-
}, [C(), w(),
|
|
408
|
+
}, [C(), w(), j()]), R()]);
|
|
482
409
|
}
|
|
483
410
|
});
|
|
484
|
-
function
|
|
485
|
-
var
|
|
486
|
-
function
|
|
411
|
+
function rt(n, e, t) {
|
|
412
|
+
var N;
|
|
413
|
+
function r() {
|
|
487
414
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
488
415
|
}
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
function
|
|
416
|
+
r();
|
|
417
|
+
const u = t && t.getStyles && t.getStyles() || "", g = t && t.getDesignerClass && t.getDesignerClass() || "", v = x();
|
|
418
|
+
function D() {
|
|
492
419
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
493
420
|
}
|
|
494
|
-
function
|
|
421
|
+
function E() {
|
|
495
422
|
return !1;
|
|
496
423
|
}
|
|
497
|
-
function
|
|
424
|
+
function b() {
|
|
498
425
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
499
426
|
}
|
|
500
427
|
function T() {
|
|
501
428
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
502
429
|
}
|
|
503
|
-
function l(
|
|
504
|
-
if (!
|
|
430
|
+
function l(y) {
|
|
431
|
+
if (!y || !y.value)
|
|
505
432
|
return null;
|
|
506
|
-
if (
|
|
507
|
-
return
|
|
508
|
-
const
|
|
509
|
-
return
|
|
433
|
+
if (y.value.schema && y.value.schema.type === "component")
|
|
434
|
+
return y.value;
|
|
435
|
+
const f = x(y == null ? void 0 : y.value.parent), S = l(f);
|
|
436
|
+
return S || null;
|
|
510
437
|
}
|
|
511
|
-
function a(
|
|
512
|
-
const { componentInstance:
|
|
513
|
-
return !
|
|
438
|
+
function a(y = e) {
|
|
439
|
+
const { componentInstance: f, designerItemElementRef: S } = y;
|
|
440
|
+
return !f || !f.value ? null : f.value.canMove ? S : a(y.parent);
|
|
514
441
|
}
|
|
515
|
-
function
|
|
516
|
-
return !!t && t.canAccepts(
|
|
442
|
+
function d(y) {
|
|
443
|
+
return !!t && t.canAccepts(y);
|
|
517
444
|
}
|
|
518
445
|
function i() {
|
|
519
446
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
520
447
|
}
|
|
521
448
|
function C() {
|
|
522
449
|
}
|
|
523
|
-
function w(
|
|
524
|
-
|
|
450
|
+
function w(y, f) {
|
|
451
|
+
f && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(f);
|
|
525
452
|
}
|
|
526
|
-
function
|
|
527
|
-
const { componentType:
|
|
528
|
-
let
|
|
529
|
-
t && t.onResolveNewComponentSchema && (
|
|
530
|
-
const
|
|
531
|
-
return
|
|
453
|
+
function j(y) {
|
|
454
|
+
const { componentType: f } = y;
|
|
455
|
+
let S = U(f, y);
|
|
456
|
+
t && t.onResolveNewComponentSchema && (S = t.onResolveNewComponentSchema(y, S));
|
|
457
|
+
const k = f.toLowerCase().replace("-", "_");
|
|
458
|
+
return S && !S.id && S.type === f && (S.id = `${k}_${Math.random().toString().slice(2, 6)}`), S;
|
|
532
459
|
}
|
|
533
|
-
function R(
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
let
|
|
537
|
-
t && t.onAcceptNewChildElement && (
|
|
538
|
-
const o =
|
|
539
|
-
return
|
|
460
|
+
function R(y, f) {
|
|
461
|
+
const S = String(y.getAttribute("data-controltype")), k = y.getAttribute("data-feature"), p = k ? JSON.parse(k) : {};
|
|
462
|
+
p.parentComponentInstance = v.value;
|
|
463
|
+
let s = U(S, p);
|
|
464
|
+
t && t.onAcceptNewChildElement && (s = t.onAcceptNewChildElement(y, f, s));
|
|
465
|
+
const o = S.toLowerCase().replace("-", "_");
|
|
466
|
+
return s && !s.id && s.type === S && (s.id = `${o}_${Math.random().toString().slice(2, 6)}`), s;
|
|
540
467
|
}
|
|
541
|
-
function
|
|
468
|
+
function P(y) {
|
|
542
469
|
}
|
|
543
|
-
function A(...
|
|
470
|
+
function A(...y) {
|
|
544
471
|
if (t && t.getPropsConfig)
|
|
545
|
-
return t.getPropsConfig(...
|
|
472
|
+
return t.getPropsConfig(...y);
|
|
546
473
|
}
|
|
547
|
-
return
|
|
548
|
-
canMove:
|
|
549
|
-
canSelectParent:
|
|
550
|
-
canDelete:
|
|
474
|
+
return v.value = {
|
|
475
|
+
canMove: D(),
|
|
476
|
+
canSelectParent: E(),
|
|
477
|
+
canDelete: b(),
|
|
551
478
|
canNested: !T(),
|
|
552
479
|
contents: e == null ? void 0 : e.schema.contents,
|
|
553
480
|
elementRef: n,
|
|
554
|
-
parent: (
|
|
481
|
+
parent: (N = e == null ? void 0 : e.parent) == null ? void 0 : N.componentInstance,
|
|
555
482
|
schema: e == null ? void 0 : e.schema,
|
|
556
|
-
styles:
|
|
557
|
-
designerClass:
|
|
558
|
-
canAccepts:
|
|
483
|
+
styles: u,
|
|
484
|
+
designerClass: g,
|
|
485
|
+
canAccepts: d,
|
|
559
486
|
getBelongedComponentInstance: l,
|
|
560
487
|
getDraggableDesignItemElement: a,
|
|
561
488
|
getDraggingDisplayText: i,
|
|
@@ -563,78 +490,14 @@ function it(n, e, t) {
|
|
|
563
490
|
getDragScopeElement: C,
|
|
564
491
|
onAcceptMovedChildElement: w,
|
|
565
492
|
onAcceptNewChildElement: R,
|
|
566
|
-
onChildElementMovedOut:
|
|
567
|
-
addNewChildComponentSchema:
|
|
568
|
-
updateDragAndDropRules:
|
|
569
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
570
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
571
|
-
},
|
|
493
|
+
onChildElementMovedOut: P,
|
|
494
|
+
addNewChildComponentSchema: j,
|
|
495
|
+
updateDragAndDropRules: r,
|
|
496
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || x(!1),
|
|
497
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || x(!1)
|
|
498
|
+
}, v;
|
|
572
499
|
}
|
|
573
|
-
class
|
|
574
|
-
static getEditorTypesByMDataType(e) {
|
|
575
|
-
const t = this.fieldControlTypeMapping[e];
|
|
576
|
-
return t || [{ key: "", value: "" }];
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* <字段类型,可配置的控件类型列表>的映射
|
|
581
|
-
*/
|
|
582
|
-
O(Te, "fieldControlTypeMapping", {
|
|
583
|
-
String: [
|
|
584
|
-
{ key: E["input-group"].type, value: E["input-group"].name },
|
|
585
|
-
{ key: E.lookup.type, value: E.lookup.name },
|
|
586
|
-
{ key: E.Image.type, value: E.Image.name },
|
|
587
|
-
{ key: E["date-picker"].type, value: E["date-picker"].name },
|
|
588
|
-
{ key: E["check-box"].type, value: E["check-box"].name },
|
|
589
|
-
{ key: E["radio-group"].type, value: E["radio-group"].name },
|
|
590
|
-
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
591
|
-
{ key: E.textarea.type, value: E.textarea.name }
|
|
592
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
593
|
-
],
|
|
594
|
-
Text: [
|
|
595
|
-
{ key: E.textarea.type, value: E.textarea.name },
|
|
596
|
-
{ key: E.avatar.type, value: E.avatar.name },
|
|
597
|
-
{ key: E.lookup.type, value: E.lookup.name }
|
|
598
|
-
],
|
|
599
|
-
Decimal: [
|
|
600
|
-
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
601
|
-
],
|
|
602
|
-
Integer: [
|
|
603
|
-
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
604
|
-
],
|
|
605
|
-
Number: [
|
|
606
|
-
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
607
|
-
],
|
|
608
|
-
BigNumber: [
|
|
609
|
-
{ key: E["number-spinner"].type, value: E["number-spinner"].name }
|
|
610
|
-
],
|
|
611
|
-
Date: [
|
|
612
|
-
{ key: E["date-picker"].type, value: E["date-picker"].name }
|
|
613
|
-
],
|
|
614
|
-
DateTime: [
|
|
615
|
-
{ key: E["date-picker"].type, value: E["date-picker"].name }
|
|
616
|
-
],
|
|
617
|
-
Boolean: [
|
|
618
|
-
{ key: E.switch.type, value: E.switch.name },
|
|
619
|
-
{ key: E["check-box"].type, value: E["check-box"].name }
|
|
620
|
-
],
|
|
621
|
-
Enum: [
|
|
622
|
-
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
623
|
-
{ key: E["radio-group"].type, value: E["radio-group"].name }
|
|
624
|
-
],
|
|
625
|
-
Object: [
|
|
626
|
-
{ key: E.lookup.type, value: E.lookup.name },
|
|
627
|
-
{ key: E["combo-list"].type, value: E["combo-list"].name },
|
|
628
|
-
{ key: E["radio-group"].type, value: E["radio-group"].name }
|
|
629
|
-
],
|
|
630
|
-
EmployeeSelector: [
|
|
631
|
-
{ key: E.EmployeeSelector.type, value: E.EmployeeSelector.name }
|
|
632
|
-
],
|
|
633
|
-
AdminOrganizationSelector: [
|
|
634
|
-
{ key: E.AdminOrganizationSelector.type, value: E.AdminOrganizationSelector.name }
|
|
635
|
-
]
|
|
636
|
-
});
|
|
637
|
-
class J {
|
|
500
|
+
class K {
|
|
638
501
|
constructor(e, t) {
|
|
639
502
|
O(this, "componentId");
|
|
640
503
|
O(this, "viewModelId");
|
|
@@ -651,8 +514,8 @@ class J {
|
|
|
651
514
|
type: "object",
|
|
652
515
|
categories: {}
|
|
653
516
|
});
|
|
654
|
-
var
|
|
655
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((
|
|
517
|
+
var r;
|
|
518
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
656
519
|
}
|
|
657
520
|
getTableInfo() {
|
|
658
521
|
var e;
|
|
@@ -662,8 +525,8 @@ class J {
|
|
|
662
525
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
663
526
|
if (t) {
|
|
664
527
|
if (!this.designViewModelField) {
|
|
665
|
-
const
|
|
666
|
-
this.designViewModelField =
|
|
528
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
529
|
+
this.designViewModelField = r.fields.find((u) => u.id === t);
|
|
667
530
|
}
|
|
668
531
|
e.updateOn = this.designViewModelField.updateOn;
|
|
669
532
|
}
|
|
@@ -671,9 +534,7 @@ class J {
|
|
|
671
534
|
changeFieldEditorType(e, t) {
|
|
672
535
|
}
|
|
673
536
|
getBasicPropConfig(e) {
|
|
674
|
-
|
|
675
|
-
var t = this;
|
|
676
|
-
return this.setDesignViewModelField(e), {
|
|
537
|
+
return {
|
|
677
538
|
description: "Basic Information",
|
|
678
539
|
title: "基本信息",
|
|
679
540
|
properties: {
|
|
@@ -686,69 +547,17 @@ class J {
|
|
|
686
547
|
type: {
|
|
687
548
|
description: "组件类型",
|
|
688
549
|
title: "控件类型",
|
|
689
|
-
type: "
|
|
690
|
-
refreshPanelAfterChanged: !0,
|
|
691
|
-
$converter: "/converter/change-editor.converter",
|
|
550
|
+
type: "select",
|
|
692
551
|
editor: {
|
|
693
552
|
type: "combo-list",
|
|
694
|
-
textField: "
|
|
695
|
-
valueField: "
|
|
696
|
-
data:
|
|
697
|
-
editable: !1
|
|
553
|
+
textField: "name",
|
|
554
|
+
valueField: "value",
|
|
555
|
+
data: [{ value: e.type, name: Z[e.type].name }]
|
|
698
556
|
}
|
|
699
|
-
},
|
|
700
|
-
label: {
|
|
701
|
-
title: "标签",
|
|
702
|
-
type: "string",
|
|
703
|
-
$converter: "/converter/form-group-label.converter"
|
|
704
557
|
}
|
|
705
|
-
},
|
|
706
|
-
setPropertyRelates(u, h) {
|
|
707
|
-
if (u)
|
|
708
|
-
switch (u && u.propertyID) {
|
|
709
|
-
case "type": {
|
|
710
|
-
t.changeControlType(e, u);
|
|
711
|
-
break;
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
558
|
}
|
|
715
559
|
};
|
|
716
560
|
}
|
|
717
|
-
/**
|
|
718
|
-
* 卡片控件:切换控件类型后事件
|
|
719
|
-
* @param propertyData 控件DOM属性
|
|
720
|
-
* @param newControlType 新控件类型
|
|
721
|
-
*/
|
|
722
|
-
changeControlType(e, t) {
|
|
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)
|
|
727
|
-
return;
|
|
728
|
-
const h = u.contents.findIndex((i) => i.id === e.id), P = u.contents[h];
|
|
729
|
-
let M;
|
|
730
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
731
|
-
editor: {
|
|
732
|
-
$type: s
|
|
733
|
-
},
|
|
734
|
-
name: this.designViewModelField.name,
|
|
735
|
-
require: this.designViewModelField.require,
|
|
736
|
-
readonly: this.designViewModelField.readonly
|
|
737
|
-
}, !1), M = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, s)), Object.assign(M, {
|
|
738
|
-
id: P.id,
|
|
739
|
-
appearance: P.appearance,
|
|
740
|
-
size: P.size,
|
|
741
|
-
label: P.label
|
|
742
|
-
}), Object.assign(M.editor, {
|
|
743
|
-
isTextArea: M.isTextArea && P.isTextArea,
|
|
744
|
-
type: s || "",
|
|
745
|
-
placeHolder: (g = P.editor) == null ? void 0 : g.placeHolder,
|
|
746
|
-
holdPlace: (T = P.editor) == null ? void 0 : T.holdPlace,
|
|
747
|
-
readonly: (l = P.editor) == null ? void 0 : l.readonly,
|
|
748
|
-
require: (a = P.editor) == null ? void 0 : a.require,
|
|
749
|
-
visible: (f = P.editor) == null ? void 0 : f.visible
|
|
750
|
-
}), u.contents.splice(h, 1, M);
|
|
751
|
-
}
|
|
752
561
|
getAppearanceConfig(e = null) {
|
|
753
562
|
return {
|
|
754
563
|
title: "样式",
|
|
@@ -765,59 +574,12 @@ class J {
|
|
|
765
574
|
type: "string",
|
|
766
575
|
description: "组件的样式",
|
|
767
576
|
$converter: "/converter/appearance.converter"
|
|
768
|
-
},
|
|
769
|
-
responseLayout: {
|
|
770
|
-
description: "响应式列宽",
|
|
771
|
-
title: "响应式列宽",
|
|
772
|
-
type: "boolean",
|
|
773
|
-
visible: !1,
|
|
774
|
-
editor: {
|
|
775
|
-
type: "response-layout-editor-setting"
|
|
776
|
-
},
|
|
777
|
-
$converter: "/converter/response-form-layout.converter"
|
|
778
577
|
}
|
|
779
578
|
}
|
|
780
579
|
};
|
|
781
580
|
}
|
|
782
|
-
/**
|
|
783
|
-
* 获取控件:以contents为节点进行定位
|
|
784
|
-
* @param controlId 控件ID
|
|
785
|
-
* @param domJson 容器
|
|
786
|
-
*/
|
|
787
|
-
getControlParentContainer(e, t) {
|
|
788
|
-
let s;
|
|
789
|
-
if (!t || !t.contents || t.contents.length === 0)
|
|
790
|
-
return null;
|
|
791
|
-
for (const p of t.contents) {
|
|
792
|
-
if (p.id === e)
|
|
793
|
-
return s = t, t;
|
|
794
|
-
if (s = this.getControlParentContainer(e, p), s)
|
|
795
|
-
return s;
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
getBindingFieldEditorOptions(e) {
|
|
799
|
-
const t = this.formSchemaUtils.getFormMetadataBasicInfo();
|
|
800
|
-
return {
|
|
801
|
-
type: "field-selector",
|
|
802
|
-
bindingType: { enable: !1 },
|
|
803
|
-
editorParams: {
|
|
804
|
-
propertyData: e,
|
|
805
|
-
formBasicInfo: t
|
|
806
|
-
},
|
|
807
|
-
columns: [
|
|
808
|
-
{ field: "name", title: "字段名称" },
|
|
809
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
810
|
-
{ field: "fieldType", title: "字段类型" }
|
|
811
|
-
],
|
|
812
|
-
beforeOpenDialog: (s) => {
|
|
813
|
-
const p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
814
|
-
s.instance.loadData(p);
|
|
815
|
-
},
|
|
816
|
-
textField: "bindingField"
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
581
|
}
|
|
820
|
-
class
|
|
582
|
+
class it extends K {
|
|
821
583
|
constructor(e, t) {
|
|
822
584
|
super(e, t);
|
|
823
585
|
}
|
|
@@ -843,7 +605,7 @@ class at extends J {
|
|
|
843
605
|
type: "combo-list",
|
|
844
606
|
textField: "value",
|
|
845
607
|
valueField: "key",
|
|
846
|
-
data: [{ key: "page-header", value:
|
|
608
|
+
data: [{ key: "page-header", value: Z["page-header"].name }]
|
|
847
609
|
}
|
|
848
610
|
},
|
|
849
611
|
icon: {
|
|
@@ -883,7 +645,7 @@ class at extends J {
|
|
|
883
645
|
label: "click",
|
|
884
646
|
name: "点击事件"
|
|
885
647
|
}
|
|
886
|
-
],
|
|
648
|
+
], r = this, u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t);
|
|
887
649
|
this.propertyConfig.categories.eventsEditor = {
|
|
888
650
|
title: "事件",
|
|
889
651
|
hideTitle: !0,
|
|
@@ -891,7 +653,7 @@ class at extends J {
|
|
|
891
653
|
"data-grid-component-viewmodel": {
|
|
892
654
|
type: "events-editor",
|
|
893
655
|
editor: {
|
|
894
|
-
initialData:
|
|
656
|
+
initialData: u
|
|
895
657
|
}
|
|
896
658
|
}
|
|
897
659
|
},
|
|
@@ -899,30 +661,38 @@ class at extends J {
|
|
|
899
661
|
refreshPanelAfterChanged: !0,
|
|
900
662
|
tabId: "commands",
|
|
901
663
|
tabName: "交互",
|
|
902
|
-
setPropertyRelates(
|
|
903
|
-
const
|
|
904
|
-
delete e[
|
|
664
|
+
setPropertyRelates(g, v) {
|
|
665
|
+
const D = g.propertyValue;
|
|
666
|
+
delete e[r.viewModelId], D && (D.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, D.events, D));
|
|
905
667
|
}
|
|
906
668
|
};
|
|
907
669
|
}
|
|
908
670
|
}
|
|
909
|
-
function
|
|
910
|
-
function t(
|
|
671
|
+
function at(n, e) {
|
|
672
|
+
function t(D) {
|
|
673
|
+
return !1;
|
|
674
|
+
}
|
|
675
|
+
function r() {
|
|
676
|
+
return !1;
|
|
677
|
+
}
|
|
678
|
+
function u() {
|
|
911
679
|
return !1;
|
|
912
680
|
}
|
|
913
|
-
function
|
|
681
|
+
function g() {
|
|
914
682
|
return !0;
|
|
915
683
|
}
|
|
916
|
-
function
|
|
917
|
-
return new
|
|
684
|
+
function v(D) {
|
|
685
|
+
return new it(D, e).getPropertyConfig(n);
|
|
918
686
|
}
|
|
919
687
|
return {
|
|
920
688
|
canAccepts: t,
|
|
921
|
-
hideNestedPaddingInDesginerView:
|
|
922
|
-
getPropsConfig:
|
|
689
|
+
hideNestedPaddingInDesginerView: g,
|
|
690
|
+
getPropsConfig: v,
|
|
691
|
+
checkCanDeleteComponent: r,
|
|
692
|
+
checkCanMoveComponent: u
|
|
923
693
|
};
|
|
924
694
|
}
|
|
925
|
-
class
|
|
695
|
+
class Te {
|
|
926
696
|
constructor(e) {
|
|
927
697
|
/** 工具栏项标识 */
|
|
928
698
|
O(this, "id", "");
|
|
@@ -967,13 +737,13 @@ class Se {
|
|
|
967
737
|
"tipsText",
|
|
968
738
|
"onClick"
|
|
969
739
|
];
|
|
970
|
-
Object.keys(e).filter((
|
|
971
|
-
this[
|
|
740
|
+
Object.keys(e).filter((r) => t.indexOf(r) > -1).forEach((r) => {
|
|
741
|
+
this[r] = e[r];
|
|
972
742
|
});
|
|
973
743
|
}
|
|
974
744
|
/** 是否可用 */
|
|
975
745
|
get enable() {
|
|
976
|
-
return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable :
|
|
746
|
+
return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : F(() => !0);
|
|
977
747
|
}
|
|
978
748
|
/** 设置宽度 */
|
|
979
749
|
setWidth(e) {
|
|
@@ -984,7 +754,7 @@ class Se {
|
|
|
984
754
|
return this.visible ? this.width : !1;
|
|
985
755
|
}
|
|
986
756
|
}
|
|
987
|
-
class
|
|
757
|
+
class ct extends Te {
|
|
988
758
|
constructor(e) {
|
|
989
759
|
super(e);
|
|
990
760
|
}
|
|
@@ -992,12 +762,12 @@ class lt extends Se {
|
|
|
992
762
|
function Pe() {
|
|
993
763
|
function n(e) {
|
|
994
764
|
const t = [];
|
|
995
|
-
return e.reduce((
|
|
765
|
+
return e.reduce((r, u) => (u.children && u.children.length > 0 ? r.push(new J(u)) : r.push(new ct(u)), r), t), t;
|
|
996
766
|
}
|
|
997
767
|
return { buildResponseToolbarItems: n };
|
|
998
768
|
}
|
|
999
|
-
const { buildResponseToolbarItems:
|
|
1000
|
-
class
|
|
769
|
+
const { buildResponseToolbarItems: lt } = Pe();
|
|
770
|
+
class J extends Te {
|
|
1001
771
|
constructor(t) {
|
|
1002
772
|
super(t);
|
|
1003
773
|
O(this, "placement", "");
|
|
@@ -1010,19 +780,19 @@ class X extends Se {
|
|
|
1010
780
|
O(this, "split", !1);
|
|
1011
781
|
O(this, "children", []);
|
|
1012
782
|
O(this, "expanded", !1);
|
|
1013
|
-
const
|
|
1014
|
-
Object.keys(t).filter((
|
|
1015
|
-
this[
|
|
1016
|
-
}), t.children && t.children.length && (this.children =
|
|
783
|
+
const r = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
784
|
+
Object.keys(t).filter((u) => r.indexOf(u) > -1).forEach((u) => {
|
|
785
|
+
this[u] = t[u];
|
|
786
|
+
}), t.children && t.children.length && (this.children = lt(t.children));
|
|
1017
787
|
}
|
|
1018
788
|
}
|
|
1019
789
|
const De = /* @__PURE__ */ new Map([
|
|
1020
790
|
["buttons", "items"]
|
|
1021
791
|
]);
|
|
1022
|
-
function
|
|
792
|
+
function Se(n, e, t) {
|
|
1023
793
|
return e;
|
|
1024
794
|
}
|
|
1025
|
-
const
|
|
795
|
+
const pt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-design.gitee.io/response-toolbar.schema.json", dt = "response-toolbar", ft = "A Farris Toolbar Component", mt = "object", gt = {
|
|
1026
796
|
id: {
|
|
1027
797
|
description: "The unique identifier for a Response Toolbar",
|
|
1028
798
|
type: "string"
|
|
@@ -1060,14 +830,14 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1060
830
|
"type",
|
|
1061
831
|
"buttons"
|
|
1062
832
|
], bt = {
|
|
1063
|
-
$schema:
|
|
833
|
+
$schema: pt,
|
|
1064
834
|
$id: ut,
|
|
1065
|
-
title:
|
|
1066
|
-
description:
|
|
1067
|
-
type:
|
|
1068
|
-
properties:
|
|
835
|
+
title: dt,
|
|
836
|
+
description: ft,
|
|
837
|
+
type: mt,
|
|
838
|
+
properties: gt,
|
|
1069
839
|
required: ht
|
|
1070
|
-
},
|
|
840
|
+
}, yt = "https://json-schema.org/draft/2020-12/schema", vt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Ct = "response-toolbar-item", wt = "A Farris Toolbar Item Component", Tt = "object", Pt = {
|
|
1071
841
|
id: {
|
|
1072
842
|
description: "The unique identifier for a Response Toolbar",
|
|
1073
843
|
type: "string"
|
|
@@ -1109,15 +879,15 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1109
879
|
"id",
|
|
1110
880
|
"type",
|
|
1111
881
|
"text"
|
|
1112
|
-
],
|
|
1113
|
-
$schema:
|
|
1114
|
-
$id:
|
|
1115
|
-
title:
|
|
1116
|
-
description:
|
|
1117
|
-
type:
|
|
882
|
+
], se = {
|
|
883
|
+
$schema: yt,
|
|
884
|
+
$id: vt,
|
|
885
|
+
title: Ct,
|
|
886
|
+
description: wt,
|
|
887
|
+
type: Tt,
|
|
1118
888
|
properties: Pt,
|
|
1119
889
|
required: Dt
|
|
1120
|
-
},
|
|
890
|
+
}, St = "response-toolbar-item", jt = "A Farris Container Component", Et = "object", Mt = {
|
|
1121
891
|
basic: {
|
|
1122
892
|
title: "基本信息",
|
|
1123
893
|
description: "Basic Infomation",
|
|
@@ -1151,10 +921,10 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1151
921
|
}
|
|
1152
922
|
}
|
|
1153
923
|
}, me = {
|
|
1154
|
-
title:
|
|
1155
|
-
description:
|
|
1156
|
-
type:
|
|
1157
|
-
categories:
|
|
924
|
+
title: St,
|
|
925
|
+
description: jt,
|
|
926
|
+
type: Et,
|
|
927
|
+
categories: Mt
|
|
1158
928
|
}, pe = {
|
|
1159
929
|
/** 组件自定义样式 */
|
|
1160
930
|
customClass: { type: String, default: "" },
|
|
@@ -1164,38 +934,38 @@ const dt = "https://json-schema.org/draft/2020-12/schema", ut = "https://farris-
|
|
|
1164
934
|
default: []
|
|
1165
935
|
}
|
|
1166
936
|
};
|
|
1167
|
-
ie[
|
|
937
|
+
ie[se.title] = se;
|
|
1168
938
|
we[me.title] = me;
|
|
1169
|
-
const
|
|
939
|
+
const xt = Object.assign({}, pe, {
|
|
1170
940
|
componentId: { type: String, default: "" }
|
|
1171
|
-
}),
|
|
941
|
+
}), ue = ce(
|
|
1172
942
|
pe,
|
|
1173
943
|
bt,
|
|
1174
944
|
De,
|
|
1175
|
-
|
|
1176
|
-
),
|
|
945
|
+
Se
|
|
946
|
+
), je = {
|
|
1177
947
|
id: { type: String, default: "" },
|
|
1178
948
|
items: { type: Object, default: {} },
|
|
1179
949
|
text: { type: String, default: "" },
|
|
1180
950
|
disabled: { type: Boolean, default: !1 },
|
|
1181
951
|
icon: { type: String, default: "" },
|
|
1182
952
|
componentId: { type: String, default: "" }
|
|
1183
|
-
},
|
|
1184
|
-
|
|
1185
|
-
|
|
953
|
+
}, kt = ce(
|
|
954
|
+
je,
|
|
955
|
+
se,
|
|
1186
956
|
De,
|
|
1187
|
-
|
|
957
|
+
Se
|
|
1188
958
|
);
|
|
1189
|
-
function
|
|
959
|
+
function Ee() {
|
|
1190
960
|
function n(t) {
|
|
1191
|
-
const
|
|
961
|
+
const r = {
|
|
1192
962
|
"f-icon": !0
|
|
1193
963
|
};
|
|
1194
964
|
if (t.icon) {
|
|
1195
|
-
const
|
|
1196
|
-
|
|
965
|
+
const u = t.icon.trim().split(" ");
|
|
966
|
+
u && u.length && u.reduce((g, v) => (g[v] = !0, g), r);
|
|
1197
967
|
}
|
|
1198
|
-
return
|
|
968
|
+
return r;
|
|
1199
969
|
}
|
|
1200
970
|
function e(t) {
|
|
1201
971
|
return !!(t.icon && t.icon.trim());
|
|
@@ -1208,8 +978,8 @@ function At(n) {
|
|
|
1208
978
|
"dropdown-menu": !0
|
|
1209
979
|
};
|
|
1210
980
|
if (l.class) {
|
|
1211
|
-
const
|
|
1212
|
-
|
|
981
|
+
const d = l.menuClass.split(" ");
|
|
982
|
+
d && d.length && d.reduce((i, C) => (i[C] = !0, i), a);
|
|
1213
983
|
}
|
|
1214
984
|
return a;
|
|
1215
985
|
}
|
|
@@ -1218,117 +988,117 @@ function At(n) {
|
|
|
1218
988
|
disabled: !l.enable,
|
|
1219
989
|
"dropdown-submenu": !0,
|
|
1220
990
|
"f-rt-dropdown": !0
|
|
1221
|
-
},
|
|
1222
|
-
return
|
|
991
|
+
}, d = l.dropdownClass.split(" ");
|
|
992
|
+
return d && d.length && d.reduce((i, C) => (i[C] = !0, i), a), a;
|
|
1223
993
|
}
|
|
1224
|
-
function
|
|
994
|
+
function r(l) {
|
|
1225
995
|
const a = {
|
|
1226
996
|
disabled: !l.enable,
|
|
1227
997
|
"dropdown-item": !0,
|
|
1228
998
|
"f-rt-btn": !0
|
|
1229
|
-
},
|
|
1230
|
-
return
|
|
999
|
+
}, d = l.class.split(" ");
|
|
1000
|
+
return d && d.length && d.reduce((i, C) => (i[C] = !0, i), a), a;
|
|
1231
1001
|
}
|
|
1232
|
-
let
|
|
1233
|
-
const
|
|
1234
|
-
function
|
|
1002
|
+
let u;
|
|
1003
|
+
const g = /* @__PURE__ */ new Map();
|
|
1004
|
+
function v(l, a, d) {
|
|
1235
1005
|
var C;
|
|
1236
1006
|
((C = l.target) == null ? void 0 : C.id) === a.id && l.stopPropagation();
|
|
1237
|
-
const i =
|
|
1238
|
-
if (a.children && a.children.length && (a.expanded = !a.expanded, a.expanded ?
|
|
1239
|
-
const w =
|
|
1007
|
+
const i = d ? d.id : "__top_item__";
|
|
1008
|
+
if (a.children && a.children.length && (a.expanded = !a.expanded, a.expanded ? g.set(i, a) : g.delete(i)), g.has(i) && g.get(i) !== a) {
|
|
1009
|
+
const w = g.get(i);
|
|
1240
1010
|
w && (w.expanded = !1);
|
|
1241
1011
|
}
|
|
1242
1012
|
}
|
|
1243
|
-
function
|
|
1013
|
+
function D(l, a) {
|
|
1244
1014
|
document.body.click(), a.enable && a.onClick(l, a.id);
|
|
1245
1015
|
}
|
|
1246
|
-
function
|
|
1247
|
-
return l.children.map((a) => a.children && a.children.length ?
|
|
1016
|
+
function E(l) {
|
|
1017
|
+
return l.children.map((a) => a.children && a.children.length ? h("li", {
|
|
1248
1018
|
class: t(a),
|
|
1249
1019
|
id: a.id,
|
|
1250
|
-
onClick: (
|
|
1251
|
-
}, [
|
|
1020
|
+
onClick: (d) => a.enable && v(d, a, l)
|
|
1021
|
+
}, [h("span", {
|
|
1252
1022
|
id: a.id,
|
|
1253
|
-
class:
|
|
1254
|
-
onMouseover: (
|
|
1255
|
-
}, [a.text,
|
|
1023
|
+
class: r(a),
|
|
1024
|
+
onMouseover: (d) => a.enable && v(d, a, l)
|
|
1025
|
+
}, [a.text, h("i", {
|
|
1256
1026
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1257
1027
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1258
|
-
}, null)]),
|
|
1259
|
-
class:
|
|
1028
|
+
}, null)]), u(a, a)]) : h("li", {
|
|
1029
|
+
class: r(a),
|
|
1260
1030
|
id: a.id,
|
|
1261
|
-
onClick: (
|
|
1262
|
-
onMouseover: (
|
|
1263
|
-
}, [n.shouldShowIcon(a) &&
|
|
1031
|
+
onClick: (d) => D(d, a),
|
|
1032
|
+
onMouseover: (d) => a.enable && v(d, a, l)
|
|
1033
|
+
}, [n.shouldShowIcon(a) && h("i", {
|
|
1264
1034
|
class: n.iconClass(a)
|
|
1265
1035
|
}, null), a.text]));
|
|
1266
1036
|
}
|
|
1267
|
-
function
|
|
1037
|
+
function b(l, a, d) {
|
|
1268
1038
|
const i = {
|
|
1269
1039
|
display: l.expanded ? "block" : "none",
|
|
1270
1040
|
position: "fixed",
|
|
1271
1041
|
maxWidth: "300px",
|
|
1272
1042
|
width: "auto",
|
|
1273
1043
|
minWidth: "120px"
|
|
1274
|
-
}, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w = a,
|
|
1275
|
-
if (w &&
|
|
1044
|
+
}, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w = a, j = w == null ? void 0 : w.getClientRects();
|
|
1045
|
+
if (w && j && j.length) {
|
|
1276
1046
|
const {
|
|
1277
1047
|
top: R,
|
|
1278
|
-
width:
|
|
1048
|
+
width: P,
|
|
1279
1049
|
left: A,
|
|
1280
|
-
right:
|
|
1281
|
-
height:
|
|
1282
|
-
} =
|
|
1283
|
-
i.top = `${
|
|
1284
|
-
const
|
|
1285
|
-
if (
|
|
1286
|
-
i.display === "block" && (
|
|
1287
|
-
const
|
|
1288
|
-
if (
|
|
1050
|
+
right: N,
|
|
1051
|
+
height: y
|
|
1052
|
+
} = j[0], f = Math.ceil(y + R);
|
|
1053
|
+
i.top = `${f}px`, i.left = `${A}px`;
|
|
1054
|
+
const S = l.id + "_menu", k = a ? a.querySelector("#" + S) : null;
|
|
1055
|
+
if (k) {
|
|
1056
|
+
i.display === "block" && (k.style.display = "block");
|
|
1057
|
+
const p = k.getBoundingClientRect();
|
|
1058
|
+
if (d) {
|
|
1289
1059
|
i.top = `${R - 6}px`;
|
|
1290
|
-
const
|
|
1291
|
-
i.left = `${
|
|
1060
|
+
const s = Math.ceil(P + A);
|
|
1061
|
+
i.left = `${s}px`;
|
|
1292
1062
|
}
|
|
1293
|
-
C - A -
|
|
1063
|
+
C - A - P < p.width && (i.left = `${(d ? A : N) - p.width}px`);
|
|
1294
1064
|
}
|
|
1295
1065
|
}
|
|
1296
1066
|
return i;
|
|
1297
1067
|
}
|
|
1298
|
-
|
|
1299
|
-
var w,
|
|
1300
|
-
const
|
|
1301
|
-
return
|
|
1068
|
+
u = function(l, a) {
|
|
1069
|
+
var w, j;
|
|
1070
|
+
const d = ye(), i = a ? a.id : l.id, C = (j = (w = d == null ? void 0 : d.exposed) == null ? void 0 : w.elementRef.value) == null ? void 0 : j.querySelector("#" + i);
|
|
1071
|
+
return h("ul", {
|
|
1302
1072
|
class: e(l),
|
|
1303
|
-
style:
|
|
1073
|
+
style: b(l, C, a),
|
|
1304
1074
|
id: l.id + "_menu"
|
|
1305
|
-
}, [
|
|
1075
|
+
}, [E(l)]);
|
|
1306
1076
|
};
|
|
1307
1077
|
function T() {
|
|
1308
|
-
|
|
1078
|
+
g.forEach((l) => {
|
|
1309
1079
|
l.expanded = !1;
|
|
1310
|
-
}),
|
|
1080
|
+
}), g.clear();
|
|
1311
1081
|
}
|
|
1312
1082
|
return {
|
|
1313
|
-
renderDropdownMenu:
|
|
1083
|
+
renderDropdownMenu: u,
|
|
1314
1084
|
clearAllDropDownMenu: T
|
|
1315
1085
|
};
|
|
1316
1086
|
}
|
|
1317
|
-
function
|
|
1318
|
-
const t =
|
|
1319
|
-
renderDropdownMenu:
|
|
1320
|
-
clearAllDropDownMenu:
|
|
1087
|
+
function Bt(n, e) {
|
|
1088
|
+
const t = x(n.alignment), {
|
|
1089
|
+
renderDropdownMenu: r,
|
|
1090
|
+
clearAllDropDownMenu: u
|
|
1321
1091
|
} = At(e);
|
|
1322
|
-
function
|
|
1092
|
+
function g(T) {
|
|
1323
1093
|
const l = {
|
|
1324
1094
|
"btn-group": !0,
|
|
1325
1095
|
"f-rt-dropdown": !0,
|
|
1326
1096
|
"f-btn-ml": t.value === "right",
|
|
1327
1097
|
"f-btn-mr": t.value === "left"
|
|
1328
1098
|
}, a = T.dropdownClass.split(" ");
|
|
1329
|
-
return a && a.length && a.reduce((
|
|
1099
|
+
return a && a.length && a.reduce((d, i) => (d[i] = !0, d), l), l;
|
|
1330
1100
|
}
|
|
1331
|
-
function
|
|
1101
|
+
function v(T) {
|
|
1332
1102
|
const l = {
|
|
1333
1103
|
btn: !0,
|
|
1334
1104
|
disabled: !T.enable,
|
|
@@ -1337,598 +1107,598 @@ function It(n, e) {
|
|
|
1337
1107
|
};
|
|
1338
1108
|
if (T.class) {
|
|
1339
1109
|
const a = T.class.split(" ");
|
|
1340
|
-
a && a.length && a.reduce((
|
|
1110
|
+
a && a.length && a.reduce((d, i) => (d[i] = !0, d), l);
|
|
1341
1111
|
}
|
|
1342
1112
|
return l;
|
|
1343
1113
|
}
|
|
1344
|
-
function
|
|
1114
|
+
function D(T, l) {
|
|
1345
1115
|
T.stopPropagation();
|
|
1346
1116
|
const a = l.expanded;
|
|
1347
1117
|
document.body.click(), l.expanded = !a;
|
|
1348
1118
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return
|
|
1119
|
+
function E(T) {
|
|
1120
|
+
return h("div", {
|
|
1351
1121
|
id: T.id,
|
|
1352
|
-
class:
|
|
1353
|
-
}, [
|
|
1354
|
-
class:
|
|
1122
|
+
class: g(T)
|
|
1123
|
+
}, [h("div", {
|
|
1124
|
+
class: v(T),
|
|
1355
1125
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
1356
|
-
onClick: (l) => T.enable &&
|
|
1357
|
-
}, [e.shouldShowIcon(T) &&
|
|
1126
|
+
onClick: (l) => T.enable && D(l, T)
|
|
1127
|
+
}, [e.shouldShowIcon(T) && h("i", {
|
|
1358
1128
|
class: e.iconClass(T)
|
|
1359
|
-
}, null),
|
|
1129
|
+
}, null), h("span", null, [T.text]), h("i", {
|
|
1360
1130
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1361
1131
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1362
|
-
}, null)]),
|
|
1132
|
+
}, null)]), r(T)]);
|
|
1363
1133
|
}
|
|
1364
|
-
function
|
|
1365
|
-
|
|
1134
|
+
function b() {
|
|
1135
|
+
u();
|
|
1366
1136
|
}
|
|
1367
1137
|
return {
|
|
1368
|
-
renderToolbarDropdown:
|
|
1369
|
-
clearAllDropDown:
|
|
1138
|
+
renderToolbarDropdown: E,
|
|
1139
|
+
clearAllDropDown: b
|
|
1370
1140
|
};
|
|
1371
1141
|
}
|
|
1372
1142
|
const {
|
|
1373
1143
|
buildResponseToolbarItems: ge
|
|
1374
|
-
} = Pe(),
|
|
1144
|
+
} = Pe(), Y = /* @__PURE__ */ z({
|
|
1375
1145
|
name: "FResponseToolbar",
|
|
1376
1146
|
props: pe,
|
|
1377
1147
|
emits: ["click"],
|
|
1378
1148
|
setup(n, e) {
|
|
1379
|
-
const t =
|
|
1149
|
+
const t = x(ge(n.items)), r = x(), u = x(), g = x(), v = x(n.alignment), D = {
|
|
1380
1150
|
id: "__more_buttons__",
|
|
1381
1151
|
text: "更多"
|
|
1382
|
-
},
|
|
1383
|
-
const
|
|
1152
|
+
}, E = x(new J(D)), b = Ee(), T = F(() => E.value.children.length > 0), l = F(() => {
|
|
1153
|
+
const f = {
|
|
1384
1154
|
"f-toolbar": !0,
|
|
1385
1155
|
"f-response-toolbar": !0,
|
|
1386
1156
|
"position-relative": !0
|
|
1387
1157
|
};
|
|
1388
1158
|
if (n.customClass) {
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1159
|
+
const S = n.customClass.split(" ");
|
|
1160
|
+
S && S.length && S.reduce((k, p) => (k[p] = !0, k), f);
|
|
1391
1161
|
}
|
|
1392
|
-
return
|
|
1393
|
-
}), a =
|
|
1162
|
+
return f;
|
|
1163
|
+
}), a = F(() => ({
|
|
1394
1164
|
"d-flex": !0,
|
|
1395
1165
|
"flex-nowrap": !0,
|
|
1396
|
-
"justify-content-end":
|
|
1397
|
-
"justify-content-start":
|
|
1166
|
+
"justify-content-end": v.value === "right",
|
|
1167
|
+
"justify-content-start": v.value === "left"
|
|
1398
1168
|
})), {
|
|
1399
|
-
renderToolbarDropdown:
|
|
1169
|
+
renderToolbarDropdown: d,
|
|
1400
1170
|
clearAllDropDown: i
|
|
1401
|
-
} =
|
|
1171
|
+
} = Bt(n, b);
|
|
1402
1172
|
function C() {
|
|
1403
|
-
t.value.filter((
|
|
1404
|
-
|
|
1405
|
-
}),
|
|
1173
|
+
t.value.filter((f) => f.children && f.children.length > 0).forEach((f) => {
|
|
1174
|
+
f.expanded = !1;
|
|
1175
|
+
}), E.value.expanded = !1, i();
|
|
1406
1176
|
}
|
|
1407
|
-
function w(
|
|
1408
|
-
const
|
|
1177
|
+
function w(f) {
|
|
1178
|
+
const S = {
|
|
1409
1179
|
btn: !0,
|
|
1410
1180
|
"f-rt-btn": !0,
|
|
1411
|
-
"f-btn-ml":
|
|
1412
|
-
"f-btn-mr":
|
|
1413
|
-
"btn-icontext": !!(
|
|
1181
|
+
"f-btn-ml": v.value === "right",
|
|
1182
|
+
"f-btn-mr": v.value === "left",
|
|
1183
|
+
"btn-icontext": !!(f.icon && f.icon.trim())
|
|
1414
1184
|
};
|
|
1415
|
-
if (
|
|
1416
|
-
const
|
|
1417
|
-
|
|
1185
|
+
if (f.class) {
|
|
1186
|
+
const k = f.class.split(" ");
|
|
1187
|
+
k && k.length && k.reduce((p, s) => (p[s] = !0, p), S);
|
|
1418
1188
|
}
|
|
1419
|
-
return
|
|
1189
|
+
return S;
|
|
1420
1190
|
}
|
|
1421
|
-
function
|
|
1422
|
-
document.body.click(),
|
|
1191
|
+
function j(f, S) {
|
|
1192
|
+
document.body.click(), S.onClick(f, S.id), e.emit("click", f, S.id);
|
|
1423
1193
|
}
|
|
1424
|
-
function R(
|
|
1425
|
-
return
|
|
1194
|
+
function R(f) {
|
|
1195
|
+
return h("button", {
|
|
1426
1196
|
type: "button",
|
|
1427
|
-
class: w(
|
|
1428
|
-
id:
|
|
1429
|
-
disabled: !
|
|
1430
|
-
onClick: (
|
|
1431
|
-
}, [
|
|
1432
|
-
class:
|
|
1433
|
-
}, null),
|
|
1197
|
+
class: w(f),
|
|
1198
|
+
id: f.id,
|
|
1199
|
+
disabled: !f.enable,
|
|
1200
|
+
onClick: (S) => j(S, f)
|
|
1201
|
+
}, [b.shouldShowIcon(f) && h("i", {
|
|
1202
|
+
class: b.iconClass(f)
|
|
1203
|
+
}, null), f.text]);
|
|
1434
1204
|
}
|
|
1435
|
-
const
|
|
1436
|
-
function
|
|
1437
|
-
const
|
|
1438
|
-
let
|
|
1439
|
-
const
|
|
1440
|
-
if (
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1205
|
+
const P = /* @__PURE__ */ new Map(), A = [];
|
|
1206
|
+
function N(f) {
|
|
1207
|
+
const S = g.value;
|
|
1208
|
+
let k = f;
|
|
1209
|
+
const p = Array.from(S.children), s = p[p.length - 1].id === "__more_buttons__" ? p[p.length - 1] : null;
|
|
1210
|
+
if (s) {
|
|
1211
|
+
const M = s.computedStyleMap().get("margin-left"), I = s.computedStyleMap().get("margin-right"), L = (M ? M.value : 0) + s.getBoundingClientRect().width + (I ? I.value : 0);
|
|
1212
|
+
k -= L;
|
|
1443
1213
|
}
|
|
1444
|
-
const o =
|
|
1445
|
-
for (const
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1448
|
-
id:
|
|
1449
|
-
width:
|
|
1450
|
-
})) :
|
|
1214
|
+
const o = p.filter((M) => M.id !== "__more_buttons__");
|
|
1215
|
+
for (const M of o) {
|
|
1216
|
+
const I = M.computedStyleMap().get("margin-left"), L = M.computedStyleMap().get("margin-right"), $ = (I ? I.value : 0) + M.getBoundingClientRect().width + (L ? L.value : 0);
|
|
1217
|
+
k < $ ? (P.set(M.id, !0), A.push({
|
|
1218
|
+
id: M.id,
|
|
1219
|
+
width: $
|
|
1220
|
+
})) : k -= $;
|
|
1451
1221
|
}
|
|
1452
1222
|
if (A.length)
|
|
1453
|
-
for (let
|
|
1454
|
-
const
|
|
1455
|
-
if (
|
|
1456
|
-
|
|
1223
|
+
for (let M = A.length - 1; M >= 0; M--) {
|
|
1224
|
+
const I = A[M].width;
|
|
1225
|
+
if (k >= I)
|
|
1226
|
+
k -= I, P.delete(A[M].id), A.pop();
|
|
1457
1227
|
else
|
|
1458
1228
|
break;
|
|
1459
1229
|
}
|
|
1460
|
-
const c = Object.assign({},
|
|
1230
|
+
const c = Object.assign({}, E.value);
|
|
1461
1231
|
c.children = [];
|
|
1462
|
-
const
|
|
1463
|
-
|
|
1232
|
+
const m = new J(c), B = t.value.reduce((M, I) => (P.has(I.id) && m.children.push(I), I.visible = !P.has(I.id), M.push(I), M), []);
|
|
1233
|
+
E.value = m, t.value = B;
|
|
1464
1234
|
}
|
|
1465
|
-
const
|
|
1466
|
-
if (
|
|
1467
|
-
const
|
|
1468
|
-
(
|
|
1235
|
+
const y = new ResizeObserver((f) => {
|
|
1236
|
+
if (f.length) {
|
|
1237
|
+
const k = f[0].contentRect.width, s = g.value.getBoundingClientRect().width;
|
|
1238
|
+
(k < s || A.length) && (N(k), C());
|
|
1469
1239
|
}
|
|
1470
1240
|
});
|
|
1471
|
-
return
|
|
1472
|
-
const
|
|
1473
|
-
|
|
1474
|
-
}),
|
|
1475
|
-
|
|
1476
|
-
}),
|
|
1241
|
+
return H(() => {
|
|
1242
|
+
const f = u.value;
|
|
1243
|
+
y.observe(f), document.body.addEventListener("click", C), document.body.addEventListener("wheel", C);
|
|
1244
|
+
}), re(() => {
|
|
1245
|
+
y.disconnect(), document.body.removeEventListener("click", C), document.body.removeEventListener("wheel", C);
|
|
1246
|
+
}), G(() => n.items, () => {
|
|
1477
1247
|
t.value = ge(n.items);
|
|
1478
1248
|
}, {
|
|
1479
1249
|
deep: !0
|
|
1480
1250
|
}), e.expose({
|
|
1481
|
-
elementRef:
|
|
1482
|
-
}), () =>
|
|
1251
|
+
elementRef: r
|
|
1252
|
+
}), () => h("div", {
|
|
1483
1253
|
class: l.value,
|
|
1484
|
-
ref:
|
|
1485
|
-
}, [
|
|
1486
|
-
ref: p,
|
|
1487
|
-
class: a.value
|
|
1488
|
-
}, [b("div", {
|
|
1254
|
+
ref: r
|
|
1255
|
+
}, [h("div", {
|
|
1489
1256
|
ref: u,
|
|
1257
|
+
class: a.value
|
|
1258
|
+
}, [h("div", {
|
|
1259
|
+
ref: g,
|
|
1490
1260
|
class: "d-inline-block f-response-content",
|
|
1491
1261
|
style: "white-space: nowrap;"
|
|
1492
|
-
}, [t.value.filter((
|
|
1262
|
+
}, [t.value.filter((f) => f.visible).map((f) => f.children && f.children.length > 0 ? d(f) : R(f)), T.value && d(E.value)])])]);
|
|
1493
1263
|
}
|
|
1494
1264
|
});
|
|
1495
|
-
function
|
|
1496
|
-
const t =
|
|
1265
|
+
function It(n, e) {
|
|
1266
|
+
const t = V("design-item-context"), r = V("toolbar-item-handler", () => {
|
|
1497
1267
|
});
|
|
1498
|
-
function
|
|
1499
|
-
|
|
1268
|
+
function u() {
|
|
1269
|
+
r && r();
|
|
1500
1270
|
}
|
|
1501
|
-
function
|
|
1271
|
+
function g(s) {
|
|
1502
1272
|
const o = {
|
|
1503
1273
|
"dropdown-menu": !0
|
|
1504
1274
|
};
|
|
1505
|
-
if (
|
|
1506
|
-
const c =
|
|
1507
|
-
c && c.length && c.reduce((
|
|
1275
|
+
if (s.class) {
|
|
1276
|
+
const c = s.menuClass.split(" ");
|
|
1277
|
+
c && c.length && c.reduce((m, B) => (m[B] = !0, m), o);
|
|
1508
1278
|
}
|
|
1509
1279
|
return o;
|
|
1510
1280
|
}
|
|
1511
|
-
function
|
|
1281
|
+
function v(s) {
|
|
1512
1282
|
const o = {
|
|
1513
|
-
disabled: !
|
|
1283
|
+
disabled: !s.enable,
|
|
1514
1284
|
"dropdown-submenu": !0,
|
|
1515
1285
|
"f-rt-dropdown": !0
|
|
1516
|
-
}, c =
|
|
1517
|
-
return c && c.length && c.reduce((
|
|
1286
|
+
}, c = s.dropdownClass.split(" ");
|
|
1287
|
+
return c && c.length && c.reduce((m, B) => (m[B] = !0, m), o), o;
|
|
1518
1288
|
}
|
|
1519
|
-
function
|
|
1289
|
+
function D(s) {
|
|
1520
1290
|
const o = {
|
|
1521
|
-
disabled: !
|
|
1291
|
+
disabled: !s.enable,
|
|
1522
1292
|
"dropdown-item": !0,
|
|
1523
1293
|
"f-rt-btn": !0,
|
|
1524
1294
|
"position-relative": !0,
|
|
1525
1295
|
"farris-component": !0
|
|
1526
|
-
}, c =
|
|
1527
|
-
return c && c.length && c.reduce((
|
|
1528
|
-
}
|
|
1529
|
-
let
|
|
1530
|
-
const
|
|
1531
|
-
function T(
|
|
1532
|
-
var
|
|
1533
|
-
((
|
|
1534
|
-
const
|
|
1535
|
-
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ?
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1296
|
+
}, c = s.class.split(" ");
|
|
1297
|
+
return c && c.length && c.reduce((m, B) => (m[B] = !0, m), o), o;
|
|
1298
|
+
}
|
|
1299
|
+
let E;
|
|
1300
|
+
const b = /* @__PURE__ */ new Map();
|
|
1301
|
+
function T(s, o, c) {
|
|
1302
|
+
var B;
|
|
1303
|
+
((B = s.target) == null ? void 0 : B.id) === o.id && s.stopPropagation();
|
|
1304
|
+
const m = c ? c.id : "__top_item__";
|
|
1305
|
+
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? b.set(m, o) : b.delete(m)), b.has(m) && b.get(m) !== o) {
|
|
1306
|
+
const M = b.get(m);
|
|
1307
|
+
M && (M.expanded = !1);
|
|
1538
1308
|
}
|
|
1539
1309
|
}
|
|
1540
|
-
function l(
|
|
1541
|
-
|
|
1310
|
+
function l(s) {
|
|
1311
|
+
s && (s.stopPropagation(), s.preventDefault());
|
|
1542
1312
|
}
|
|
1543
1313
|
function a() {
|
|
1544
1314
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1545
|
-
const
|
|
1546
|
-
Array.from(
|
|
1315
|
+
const s = document.getElementsByClassName("dgComponentSelected");
|
|
1316
|
+
Array.from(s).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
1547
1317
|
}
|
|
1548
|
-
function
|
|
1549
|
-
|
|
1318
|
+
function d(s) {
|
|
1319
|
+
s.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1550
1320
|
}
|
|
1551
|
-
function i(
|
|
1321
|
+
function i(s) {
|
|
1552
1322
|
const {
|
|
1553
1323
|
buttons: o = []
|
|
1554
1324
|
} = t.schema;
|
|
1555
1325
|
let c = [];
|
|
1556
|
-
o.forEach((
|
|
1557
|
-
c = c.concat(
|
|
1326
|
+
o.forEach((M) => {
|
|
1327
|
+
c = c.concat(M.children || []);
|
|
1558
1328
|
});
|
|
1559
|
-
const
|
|
1329
|
+
const m = c.findIndex((M) => M.id === s), B = m === -1 ? null : c[m];
|
|
1560
1330
|
return {
|
|
1561
|
-
index:
|
|
1562
|
-
item:
|
|
1331
|
+
index: m,
|
|
1332
|
+
item: B
|
|
1563
1333
|
};
|
|
1564
1334
|
}
|
|
1565
|
-
function C(
|
|
1335
|
+
function C(s) {
|
|
1566
1336
|
const {
|
|
1567
1337
|
buttons: o = []
|
|
1568
|
-
} = t.schema, c = o.findIndex((
|
|
1338
|
+
} = t.schema, c = o.findIndex((B) => B.id === s), m = c === -1 ? null : o[c];
|
|
1569
1339
|
return {
|
|
1570
1340
|
index: c,
|
|
1571
|
-
item:
|
|
1341
|
+
item: m
|
|
1572
1342
|
};
|
|
1573
1343
|
}
|
|
1574
|
-
function w(
|
|
1575
|
-
var
|
|
1344
|
+
function w(s) {
|
|
1345
|
+
var m;
|
|
1576
1346
|
t.schema;
|
|
1577
1347
|
const {
|
|
1578
1348
|
index: o,
|
|
1579
1349
|
item: c
|
|
1580
|
-
} = i(
|
|
1581
|
-
(
|
|
1350
|
+
} = i(s);
|
|
1351
|
+
(m = t == null ? void 0 : t.setupContext) == null || m.emit("selectionChange", c == null ? void 0 : c.type, c);
|
|
1582
1352
|
}
|
|
1583
|
-
const
|
|
1353
|
+
const j = function(s) {
|
|
1584
1354
|
const {
|
|
1585
1355
|
componentType: o
|
|
1586
|
-
} =
|
|
1587
|
-
return c && !c.id && c.type === o && (c.id = `${
|
|
1356
|
+
} = s, c = U(o, s), m = o.toLowerCase().replace("-", "_");
|
|
1357
|
+
return c && !c.id && c.type === o && (c.id = `${m}_${Math.random().toString().slice(2, 6)}`), c;
|
|
1588
1358
|
}, R = function() {
|
|
1589
|
-
const
|
|
1359
|
+
const s = {
|
|
1590
1360
|
componentType: "response-toolbar-item",
|
|
1591
1361
|
parentComponentInstance: e.value,
|
|
1592
1362
|
targetPosition: -1
|
|
1593
1363
|
};
|
|
1594
|
-
return
|
|
1364
|
+
return j(s);
|
|
1595
1365
|
};
|
|
1596
|
-
function
|
|
1597
|
-
l(
|
|
1366
|
+
function P(s, o) {
|
|
1367
|
+
l(s), a(), d(s), w(o.id);
|
|
1598
1368
|
}
|
|
1599
|
-
function A(
|
|
1600
|
-
l(
|
|
1601
|
-
const
|
|
1602
|
-
buttons:
|
|
1369
|
+
function A(s, o, c) {
|
|
1370
|
+
l(s);
|
|
1371
|
+
const m = o.id, B = c && c.id, {
|
|
1372
|
+
buttons: M = []
|
|
1603
1373
|
} = t.schema;
|
|
1604
|
-
if (!
|
|
1374
|
+
if (!B)
|
|
1605
1375
|
return;
|
|
1606
1376
|
const {
|
|
1607
|
-
index:
|
|
1608
|
-
} = C(
|
|
1609
|
-
if (
|
|
1377
|
+
index: I
|
|
1378
|
+
} = C(B);
|
|
1379
|
+
if (I === -1)
|
|
1610
1380
|
return;
|
|
1611
1381
|
const {
|
|
1612
|
-
index:
|
|
1613
|
-
} = i(
|
|
1614
|
-
|
|
1615
|
-
}
|
|
1616
|
-
function
|
|
1617
|
-
l(
|
|
1618
|
-
const
|
|
1619
|
-
buttons:
|
|
1382
|
+
index: L
|
|
1383
|
+
} = i(m);
|
|
1384
|
+
L !== -1 && (M[I].children.splice(L, 1), u());
|
|
1385
|
+
}
|
|
1386
|
+
function N(s, o, c) {
|
|
1387
|
+
l(s);
|
|
1388
|
+
const m = c && c.id, {
|
|
1389
|
+
buttons: B = []
|
|
1620
1390
|
} = t.schema;
|
|
1621
|
-
if (!
|
|
1391
|
+
if (!m)
|
|
1622
1392
|
return;
|
|
1623
1393
|
const {
|
|
1624
|
-
index:
|
|
1625
|
-
} = C(
|
|
1626
|
-
if (
|
|
1394
|
+
index: M
|
|
1395
|
+
} = C(m);
|
|
1396
|
+
if (M === -1)
|
|
1627
1397
|
return;
|
|
1628
|
-
const
|
|
1398
|
+
const I = R(), L = Object.assign({}, I, {
|
|
1629
1399
|
text: o.text
|
|
1630
1400
|
});
|
|
1631
|
-
|
|
1401
|
+
B[M].children.push(L), u();
|
|
1632
1402
|
}
|
|
1633
|
-
function
|
|
1634
|
-
l(
|
|
1635
|
-
const
|
|
1636
|
-
buttons:
|
|
1403
|
+
function y(s, o, c) {
|
|
1404
|
+
l(s);
|
|
1405
|
+
const m = c && c.id, {
|
|
1406
|
+
buttons: B = []
|
|
1637
1407
|
} = t.schema;
|
|
1638
|
-
if (!
|
|
1408
|
+
if (!m)
|
|
1639
1409
|
return;
|
|
1640
1410
|
const {
|
|
1641
|
-
index:
|
|
1642
|
-
} = C(
|
|
1643
|
-
if (
|
|
1411
|
+
index: M
|
|
1412
|
+
} = C(m);
|
|
1413
|
+
if (M === -1)
|
|
1644
1414
|
return;
|
|
1645
|
-
const
|
|
1415
|
+
const I = R(), L = Object.assign({}, I, {
|
|
1646
1416
|
text: "按钮"
|
|
1647
1417
|
});
|
|
1648
|
-
|
|
1418
|
+
B[M].children.push(L), u();
|
|
1649
1419
|
}
|
|
1650
|
-
function
|
|
1651
|
-
return
|
|
1420
|
+
function f(s, o) {
|
|
1421
|
+
return h("div", {
|
|
1652
1422
|
class: "component-btn-group"
|
|
1653
|
-
}, [
|
|
1423
|
+
}, [h("div", null, [h("div", {
|
|
1654
1424
|
role: "button",
|
|
1655
1425
|
class: "btn component-settings-button",
|
|
1656
1426
|
title: "删除",
|
|
1657
1427
|
ref: "removeButton",
|
|
1658
1428
|
style: "position:static;",
|
|
1659
|
-
onClick: (c) => A(c,
|
|
1660
|
-
}, [
|
|
1429
|
+
onClick: (c) => A(c, s, o)
|
|
1430
|
+
}, [h("i", {
|
|
1661
1431
|
class: "f-icon f-icon-yxs_delete"
|
|
1662
|
-
}, null)]),
|
|
1432
|
+
}, null)]), h("div", {
|
|
1663
1433
|
role: "button",
|
|
1664
1434
|
class: "btn component-settings-button",
|
|
1665
1435
|
title: "复制",
|
|
1666
1436
|
ref: "copyButton",
|
|
1667
1437
|
style: "position:static;",
|
|
1668
|
-
onClick: (c) =>
|
|
1669
|
-
}, [
|
|
1438
|
+
onClick: (c) => N(c, s, o)
|
|
1439
|
+
}, [h("i", {
|
|
1670
1440
|
class: "f-icon f-icon-yxs_copy"
|
|
1671
|
-
}, null)]),
|
|
1441
|
+
}, null)]), h("div", {
|
|
1672
1442
|
role: "button",
|
|
1673
1443
|
class: "btn component-settings-button",
|
|
1674
1444
|
title: "新增同级",
|
|
1675
1445
|
ref: "appendSame",
|
|
1676
1446
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1677
|
-
onClick: (c) =>
|
|
1678
|
-
}, [
|
|
1447
|
+
onClick: (c) => y(c, s, o)
|
|
1448
|
+
}, [h("i", {
|
|
1679
1449
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1680
|
-
}, null),
|
|
1450
|
+
}, null), h("span", {
|
|
1681
1451
|
style: "font-size:13px;margin:auto"
|
|
1682
|
-
}, [
|
|
1452
|
+
}, [Q("新增同级")])])])]);
|
|
1683
1453
|
}
|
|
1684
|
-
function
|
|
1685
|
-
return
|
|
1686
|
-
class:
|
|
1454
|
+
function S(s) {
|
|
1455
|
+
return s.children.map((o) => o.children && o.children.length ? h("li", {
|
|
1456
|
+
class: v(o),
|
|
1687
1457
|
id: o.id,
|
|
1688
|
-
onClick: (c) => o.enable && T(c, o,
|
|
1689
|
-
}, [
|
|
1458
|
+
onClick: (c) => o.enable && T(c, o, s)
|
|
1459
|
+
}, [h("span", {
|
|
1690
1460
|
id: o.id,
|
|
1691
|
-
class:
|
|
1692
|
-
onMouseover: (c) => o.enable && T(c, o,
|
|
1693
|
-
}, [o.text,
|
|
1461
|
+
class: D(o),
|
|
1462
|
+
onMouseover: (c) => o.enable && T(c, o, s)
|
|
1463
|
+
}, [o.text, h("i", {
|
|
1694
1464
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1695
1465
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1696
|
-
}, null)]),
|
|
1697
|
-
class:
|
|
1466
|
+
}, null)]), E(o, o)]) : h("li", {
|
|
1467
|
+
class: D(o),
|
|
1698
1468
|
id: o.id,
|
|
1699
|
-
onClick: (c) =>
|
|
1700
|
-
}, [
|
|
1469
|
+
onClick: (c) => P(c, o)
|
|
1470
|
+
}, [f(o, s), n.shouldShowIcon(o) && h("i", {
|
|
1701
1471
|
class: n.iconClass(o)
|
|
1702
1472
|
}, null), o.text]));
|
|
1703
1473
|
}
|
|
1704
|
-
function
|
|
1705
|
-
const
|
|
1706
|
-
display:
|
|
1474
|
+
function k(s, o, c) {
|
|
1475
|
+
const m = {
|
|
1476
|
+
display: s.expanded ? "block" : "none",
|
|
1707
1477
|
position: "fixed",
|
|
1708
1478
|
maxWidth: "300px",
|
|
1709
1479
|
width: "auto",
|
|
1710
1480
|
minWidth: "120px"
|
|
1711
|
-
},
|
|
1712
|
-
if (
|
|
1481
|
+
}, B = document.getElementsByTagName("body")[0].getClientRects()[0].width, M = o, I = M == null ? void 0 : M.getClientRects();
|
|
1482
|
+
if (M && I && I.length) {
|
|
1713
1483
|
const {
|
|
1714
|
-
top:
|
|
1715
|
-
width:
|
|
1716
|
-
left:
|
|
1484
|
+
top: L,
|
|
1485
|
+
width: $,
|
|
1486
|
+
left: _,
|
|
1717
1487
|
right: W,
|
|
1718
|
-
height:
|
|
1719
|
-
} =
|
|
1720
|
-
|
|
1721
|
-
const
|
|
1488
|
+
height: q
|
|
1489
|
+
} = I[0], ee = Math.ceil(q + L);
|
|
1490
|
+
m.top = `${ee}px`, m.left = `${_}px`;
|
|
1491
|
+
const Be = s.id + "_menu", te = o ? o.querySelector("#" + Be) : null;
|
|
1722
1492
|
if (te) {
|
|
1723
|
-
|
|
1724
|
-
const
|
|
1493
|
+
m.display === "block" && (te.style.display = "block");
|
|
1494
|
+
const de = te.getBoundingClientRect();
|
|
1725
1495
|
if (c) {
|
|
1726
|
-
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1496
|
+
m.top = `${L - 6}px`;
|
|
1497
|
+
const Ie = Math.ceil($ + _);
|
|
1498
|
+
m.left = `${Ie}px`;
|
|
1729
1499
|
}
|
|
1730
|
-
|
|
1500
|
+
B - _ - $ < de.width && (m.left = `${(c ? _ : W) - de.width}px`);
|
|
1731
1501
|
}
|
|
1732
1502
|
}
|
|
1733
|
-
return
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
var
|
|
1737
|
-
const c =
|
|
1738
|
-
return
|
|
1739
|
-
class:
|
|
1740
|
-
style:
|
|
1741
|
-
id:
|
|
1742
|
-
}, [
|
|
1503
|
+
return m;
|
|
1504
|
+
}
|
|
1505
|
+
E = function(s, o) {
|
|
1506
|
+
var M, I;
|
|
1507
|
+
const c = ye(), m = o ? o.id : s.id, B = (I = (M = c == null ? void 0 : c.exposed) == null ? void 0 : M.elementRef.value) == null ? void 0 : I.querySelector("#" + m);
|
|
1508
|
+
return h("ul", {
|
|
1509
|
+
class: g(s),
|
|
1510
|
+
style: k(s, B, o),
|
|
1511
|
+
id: s.id + "_menu"
|
|
1512
|
+
}, [S(s)]);
|
|
1743
1513
|
};
|
|
1744
|
-
function
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
}),
|
|
1514
|
+
function p() {
|
|
1515
|
+
b.forEach((s) => {
|
|
1516
|
+
s.expanded = !1;
|
|
1517
|
+
}), b.clear();
|
|
1748
1518
|
}
|
|
1749
1519
|
return {
|
|
1750
|
-
renderDropdownMenu:
|
|
1751
|
-
clearAllDropDownMenu:
|
|
1520
|
+
renderDropdownMenu: E,
|
|
1521
|
+
clearAllDropDownMenu: p
|
|
1752
1522
|
};
|
|
1753
1523
|
}
|
|
1754
1524
|
function Rt(n, e, t) {
|
|
1755
|
-
const
|
|
1756
|
-
renderDropdownMenu:
|
|
1757
|
-
clearAllDropDownMenu:
|
|
1758
|
-
} =
|
|
1525
|
+
const r = x(n.alignment), {
|
|
1526
|
+
renderDropdownMenu: u,
|
|
1527
|
+
clearAllDropDownMenu: g
|
|
1528
|
+
} = It(e, t), v = V("design-item-context"), D = V("toolbar-item-handler", () => {
|
|
1759
1529
|
});
|
|
1760
|
-
function
|
|
1761
|
-
|
|
1530
|
+
function E() {
|
|
1531
|
+
D && D();
|
|
1762
1532
|
}
|
|
1763
|
-
function
|
|
1764
|
-
const
|
|
1533
|
+
function b(p) {
|
|
1534
|
+
const s = {
|
|
1765
1535
|
"btn-group": !0,
|
|
1766
1536
|
"f-rt-dropdown": !0,
|
|
1767
|
-
"f-btn-ml":
|
|
1768
|
-
"f-btn-mr":
|
|
1769
|
-
}, o =
|
|
1770
|
-
return o && o.length && o.reduce((c,
|
|
1537
|
+
"f-btn-ml": r.value === "right",
|
|
1538
|
+
"f-btn-mr": r.value === "left"
|
|
1539
|
+
}, o = p.dropdownClass.split(" ");
|
|
1540
|
+
return o && o.length && o.reduce((c, m) => (c[m] = !0, c), s), s;
|
|
1771
1541
|
}
|
|
1772
|
-
function T(
|
|
1773
|
-
const
|
|
1542
|
+
function T(p) {
|
|
1543
|
+
const s = {
|
|
1774
1544
|
btn: !0,
|
|
1775
|
-
disabled: !
|
|
1545
|
+
disabled: !p.enable,
|
|
1776
1546
|
"position-relative": !0,
|
|
1777
1547
|
"farris-component": !0,
|
|
1778
1548
|
"f-rt-btn": !0,
|
|
1779
|
-
"btn-icontext": !!(
|
|
1549
|
+
"btn-icontext": !!(p.icon && p.icon.trim())
|
|
1780
1550
|
};
|
|
1781
|
-
if (
|
|
1782
|
-
const o =
|
|
1783
|
-
o && o.length && o.reduce((c,
|
|
1551
|
+
if (p.class) {
|
|
1552
|
+
const o = p.class.split(" ");
|
|
1553
|
+
o && o.length && o.reduce((c, m) => (c[m] = !0, c), s);
|
|
1784
1554
|
}
|
|
1785
|
-
return
|
|
1555
|
+
return s;
|
|
1786
1556
|
}
|
|
1787
|
-
function l(
|
|
1788
|
-
|
|
1557
|
+
function l(p) {
|
|
1558
|
+
p && (p.stopPropagation(), p.preventDefault());
|
|
1789
1559
|
}
|
|
1790
|
-
function a(
|
|
1791
|
-
l(
|
|
1792
|
-
const o =
|
|
1793
|
-
document.body.click(),
|
|
1560
|
+
function a(p, s) {
|
|
1561
|
+
l(p);
|
|
1562
|
+
const o = s.expanded;
|
|
1563
|
+
document.body.click(), s.expanded = !o;
|
|
1794
1564
|
}
|
|
1795
|
-
const
|
|
1565
|
+
const d = function(p) {
|
|
1796
1566
|
const {
|
|
1797
|
-
componentType:
|
|
1798
|
-
} =
|
|
1799
|
-
return o && !o.id && o.type ===
|
|
1567
|
+
componentType: s
|
|
1568
|
+
} = p, o = U(s, p), c = s.toLowerCase().replace("-", "_");
|
|
1569
|
+
return o && !o.id && o.type === s && (o.id = `${c}_${Math.random().toString().slice(2, 6)}`), o;
|
|
1800
1570
|
}, i = function() {
|
|
1801
|
-
const
|
|
1571
|
+
const p = {
|
|
1802
1572
|
componentType: "response-toolbar-item",
|
|
1803
1573
|
parentComponentInstance: t.value,
|
|
1804
1574
|
targetPosition: -1
|
|
1805
1575
|
};
|
|
1806
|
-
return
|
|
1576
|
+
return d(p);
|
|
1807
1577
|
};
|
|
1808
|
-
function C(
|
|
1809
|
-
const
|
|
1578
|
+
function C(p) {
|
|
1579
|
+
const s = v.schema.buttons || v.schema.contents, o = s == null ? void 0 : s.findIndex((m) => m.id === p), c = o === -1 ? null : s[o];
|
|
1810
1580
|
return {
|
|
1811
1581
|
index: o,
|
|
1812
1582
|
toolbarItem: c
|
|
1813
1583
|
};
|
|
1814
1584
|
}
|
|
1815
|
-
function w(
|
|
1816
|
-
var
|
|
1585
|
+
function w(p, s) {
|
|
1586
|
+
var I;
|
|
1817
1587
|
const {
|
|
1818
1588
|
index: o,
|
|
1819
1589
|
toolbarItem: c
|
|
1820
|
-
} = C(
|
|
1590
|
+
} = C(s);
|
|
1821
1591
|
if (o === -1)
|
|
1822
1592
|
return;
|
|
1823
|
-
const
|
|
1824
|
-
text:
|
|
1593
|
+
const m = c.text || "按钮", B = i(), M = Object.assign({}, B, {
|
|
1594
|
+
text: m
|
|
1825
1595
|
});
|
|
1826
|
-
(
|
|
1596
|
+
(I = v.schema.buttons) == null || I.push(M), E();
|
|
1827
1597
|
}
|
|
1828
|
-
function
|
|
1598
|
+
function j(p, s) {
|
|
1829
1599
|
const {
|
|
1830
1600
|
index: o,
|
|
1831
1601
|
toolbarItem: c
|
|
1832
|
-
} = C(
|
|
1602
|
+
} = C(s);
|
|
1833
1603
|
if (o === -1)
|
|
1834
1604
|
return;
|
|
1835
|
-
const
|
|
1836
|
-
text:
|
|
1837
|
-
}),
|
|
1838
|
-
|
|
1605
|
+
const m = c.text || "按钮", B = i(), M = Object.assign({}, B, {
|
|
1606
|
+
text: m
|
|
1607
|
+
}), I = v.schema.buttons[o].children || [];
|
|
1608
|
+
I.push(M), v.schema.buttons[o].children = I, E();
|
|
1839
1609
|
}
|
|
1840
|
-
function R(
|
|
1841
|
-
const o =
|
|
1842
|
-
c !== -1 && (o.splice(c, 1),
|
|
1610
|
+
function R(p, s) {
|
|
1611
|
+
const o = v.schema.buttons || v.schema.contents, c = o == null ? void 0 : o.findIndex((m) => m.id === s);
|
|
1612
|
+
c !== -1 && (o.splice(c, 1), E());
|
|
1843
1613
|
}
|
|
1844
|
-
function
|
|
1845
|
-
return
|
|
1614
|
+
function P(p) {
|
|
1615
|
+
return h("div", {
|
|
1846
1616
|
class: "component-btn-group"
|
|
1847
|
-
}, [
|
|
1617
|
+
}, [h("div", null, [h("div", {
|
|
1848
1618
|
role: "button",
|
|
1849
1619
|
class: "btn component-settings-button",
|
|
1850
1620
|
title: "删除",
|
|
1851
1621
|
ref: "removeButton",
|
|
1852
1622
|
style: "position:static;",
|
|
1853
|
-
onClick: (
|
|
1854
|
-
}, [
|
|
1623
|
+
onClick: (s) => R(s, p)
|
|
1624
|
+
}, [h("i", {
|
|
1855
1625
|
class: "f-icon f-icon-yxs_delete"
|
|
1856
|
-
}, null)]),
|
|
1626
|
+
}, null)]), h("div", {
|
|
1857
1627
|
role: "button",
|
|
1858
1628
|
class: "btn component-settings-button",
|
|
1859
1629
|
title: "复制",
|
|
1860
1630
|
ref: "copyButton",
|
|
1861
1631
|
style: "position:static;",
|
|
1862
|
-
onClick: (
|
|
1863
|
-
}, [
|
|
1632
|
+
onClick: (s) => w(s, p)
|
|
1633
|
+
}, [h("i", {
|
|
1864
1634
|
class: "f-icon f-icon-yxs_copy"
|
|
1865
|
-
}, null)]),
|
|
1635
|
+
}, null)]), h("div", {
|
|
1866
1636
|
role: "button",
|
|
1867
1637
|
class: "btn component-settings-button",
|
|
1868
1638
|
title: "新增子级",
|
|
1869
1639
|
ref: "appendChildButton",
|
|
1870
1640
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1871
|
-
onClick: (
|
|
1872
|
-
}, [
|
|
1641
|
+
onClick: (s) => j(s, p)
|
|
1642
|
+
}, [h("i", {
|
|
1873
1643
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1874
|
-
}, null),
|
|
1644
|
+
}, null), h("span", {
|
|
1875
1645
|
style: "font-size:13px;margin:auto"
|
|
1876
|
-
}, [
|
|
1646
|
+
}, [Q("新增子级")])])])]);
|
|
1877
1647
|
}
|
|
1878
1648
|
function A() {
|
|
1879
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
1880
|
-
const
|
|
1881
|
-
Array.from(
|
|
1649
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((s) => s.classList.remove("dgComponentFocused"));
|
|
1650
|
+
const p = document.getElementsByClassName("dgComponentSelected");
|
|
1651
|
+
Array.from(p).forEach((s) => s.classList.remove("dgComponentSelected"));
|
|
1882
1652
|
}
|
|
1883
|
-
function
|
|
1884
|
-
|
|
1653
|
+
function N(p) {
|
|
1654
|
+
p.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1885
1655
|
}
|
|
1886
|
-
function
|
|
1887
|
-
var
|
|
1888
|
-
const
|
|
1656
|
+
function y(p) {
|
|
1657
|
+
var m;
|
|
1658
|
+
const s = v.schema.buttons || v.schema.contents, o = s == null ? void 0 : s.findIndex((B) => B.id === p);
|
|
1889
1659
|
if (o === -1)
|
|
1890
1660
|
return;
|
|
1891
|
-
const c =
|
|
1892
|
-
(
|
|
1893
|
-
}
|
|
1894
|
-
function
|
|
1895
|
-
l(
|
|
1896
|
-
}
|
|
1897
|
-
function
|
|
1898
|
-
return
|
|
1899
|
-
id:
|
|
1900
|
-
class:
|
|
1901
|
-
}, [
|
|
1902
|
-
class: T(
|
|
1661
|
+
const c = s[o];
|
|
1662
|
+
(m = v == null ? void 0 : v.setupContext) == null || m.emit("selectionChange", "response-toolbar-item", c);
|
|
1663
|
+
}
|
|
1664
|
+
function f(p, s) {
|
|
1665
|
+
l(p), A(), N(p), l(p), a(p, s), y(s.id);
|
|
1666
|
+
}
|
|
1667
|
+
function S(p) {
|
|
1668
|
+
return h("div", {
|
|
1669
|
+
id: p.id,
|
|
1670
|
+
class: b(p)
|
|
1671
|
+
}, [h("div", {
|
|
1672
|
+
class: T(p),
|
|
1903
1673
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1904
|
-
onClick: (
|
|
1905
|
-
}, [
|
|
1906
|
-
class: e.iconClass(
|
|
1907
|
-
}, null),
|
|
1674
|
+
onClick: (s) => p.enable && f(s, p)
|
|
1675
|
+
}, [P(p.id), e.shouldShowIcon(p) && h("i", {
|
|
1676
|
+
class: e.iconClass(p)
|
|
1677
|
+
}, null), h("span", null, [p.text]), h("i", {
|
|
1908
1678
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1909
1679
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1910
|
-
}, null)]), p
|
|
1680
|
+
}, null)]), u(p)]);
|
|
1911
1681
|
}
|
|
1912
|
-
function
|
|
1913
|
-
|
|
1682
|
+
function k() {
|
|
1683
|
+
g();
|
|
1914
1684
|
}
|
|
1915
1685
|
return {
|
|
1916
|
-
renderToolbarDropdown:
|
|
1917
|
-
clearAllDropDown:
|
|
1686
|
+
renderToolbarDropdown: S,
|
|
1687
|
+
clearAllDropDown: k
|
|
1918
1688
|
};
|
|
1919
1689
|
}
|
|
1920
1690
|
function Ot() {
|
|
1921
1691
|
function n(e) {
|
|
1922
|
-
var
|
|
1692
|
+
var u, g;
|
|
1923
1693
|
if (!e)
|
|
1924
1694
|
return !1;
|
|
1925
|
-
const t = ((
|
|
1695
|
+
const t = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1926
1696
|
if (!t)
|
|
1927
1697
|
return !1;
|
|
1928
|
-
const
|
|
1698
|
+
const r = (g = t.schema.appearance) == null ? void 0 : g.class;
|
|
1929
1699
|
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1930
|
-
const
|
|
1931
|
-
if (t.schema.type !== "response-layout-item" && !
|
|
1700
|
+
const v = t.schema.type, D = (v === "response-form" || v === "content-container") && r && r.includes("farris-form");
|
|
1701
|
+
if (t.schema.type !== "response-layout-item" && !D)
|
|
1932
1702
|
return !1;
|
|
1933
1703
|
}
|
|
1934
1704
|
return e.controlType !== "field-set";
|
|
@@ -1937,7 +1707,7 @@ function Ot() {
|
|
|
1937
1707
|
basalDragulaRuleForContainer: n
|
|
1938
1708
|
};
|
|
1939
1709
|
}
|
|
1940
|
-
const
|
|
1710
|
+
const Nt = "https://json-schema.org/draft/2020-12/schema", $t = "https://farris-design.gitee.io/dragging-rules.schema.json", _t = "Dragging Rules", Ft = "The rules of designer canvas", Lt = "object", Vt = {
|
|
1941
1711
|
"f-page": {
|
|
1942
1712
|
description: "The root class of page designed by farris.",
|
|
1943
1713
|
type: "object",
|
|
@@ -2501,106 +2271,106 @@ const Lt = "https://json-schema.org/draft/2020-12/schema", Nt = "https://farris-
|
|
|
2501
2271
|
description: "",
|
|
2502
2272
|
type: "object"
|
|
2503
2273
|
}
|
|
2504
|
-
}, Wt = [],
|
|
2505
|
-
$schema:
|
|
2506
|
-
$id:
|
|
2507
|
-
title:
|
|
2508
|
-
description:
|
|
2509
|
-
type:
|
|
2510
|
-
properties:
|
|
2274
|
+
}, Wt = [], Ut = {
|
|
2275
|
+
$schema: Nt,
|
|
2276
|
+
$id: $t,
|
|
2277
|
+
title: _t,
|
|
2278
|
+
description: Ft,
|
|
2279
|
+
type: Lt,
|
|
2280
|
+
properties: Vt,
|
|
2511
2281
|
required: Wt
|
|
2512
2282
|
}, oe = /* @__PURE__ */ new Map();
|
|
2513
|
-
function
|
|
2514
|
-
function n(i, C, w,
|
|
2283
|
+
function Me() {
|
|
2284
|
+
function n(i, C, w, j) {
|
|
2515
2285
|
var R;
|
|
2516
2286
|
if (typeof w == "number")
|
|
2517
|
-
return ((R =
|
|
2287
|
+
return ((R = j[i]) == null ? void 0 : R.length) === w;
|
|
2518
2288
|
if (typeof w == "object") {
|
|
2519
|
-
const
|
|
2520
|
-
if (
|
|
2521
|
-
return Number(
|
|
2522
|
-
if (
|
|
2523
|
-
return Number(
|
|
2524
|
-
if (
|
|
2525
|
-
return Number(
|
|
2289
|
+
const P = Object.keys(w)[0], A = w[P];
|
|
2290
|
+
if (P === "not")
|
|
2291
|
+
return Number(j[i].length) !== Number(A);
|
|
2292
|
+
if (P === "moreThan")
|
|
2293
|
+
return Number(j[i].length) >= Number(A);
|
|
2294
|
+
if (P === "lessThan")
|
|
2295
|
+
return Number(j[i].length) <= Number(A);
|
|
2526
2296
|
}
|
|
2527
2297
|
return !1;
|
|
2528
2298
|
}
|
|
2529
|
-
function e(i, C, w,
|
|
2530
|
-
return typeof w == "boolean" ?
|
|
2299
|
+
function e(i, C, w, j) {
|
|
2300
|
+
return typeof w == "boolean" ? j.childrenClassList.includes(C) === !!w : !1;
|
|
2531
2301
|
}
|
|
2532
|
-
function t(i, C, w,
|
|
2533
|
-
return typeof w == "boolean" ?
|
|
2302
|
+
function t(i, C, w, j) {
|
|
2303
|
+
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2534
2304
|
}
|
|
2535
|
-
function
|
|
2536
|
-
return typeof w == "boolean" ?
|
|
2305
|
+
function r(i, C, w, j) {
|
|
2306
|
+
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2537
2307
|
}
|
|
2538
|
-
const
|
|
2308
|
+
const u = /* @__PURE__ */ new Map([
|
|
2539
2309
|
["length", n],
|
|
2540
2310
|
["hasChildren", e],
|
|
2541
|
-
["hasSibling",
|
|
2311
|
+
["hasSibling", r],
|
|
2542
2312
|
["hasParent", t]
|
|
2543
2313
|
]);
|
|
2544
|
-
function
|
|
2314
|
+
function g(i, C) {
|
|
2545
2315
|
const w = i;
|
|
2546
|
-
return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((
|
|
2547
|
-
if (
|
|
2548
|
-
return { target: w, operator: "length", param: null, value: C[
|
|
2549
|
-
const R =
|
|
2550
|
-
return { target: w, operator: i === "children" ? "hasChildren" : i === "parent" ? "hasParent" : "hasSibling", param: R, value:
|
|
2316
|
+
return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((j) => {
|
|
2317
|
+
if (j === "length")
|
|
2318
|
+
return { target: w, operator: "length", param: null, value: C[j] };
|
|
2319
|
+
const R = j, P = C[j];
|
|
2320
|
+
return { target: w, operator: i === "children" ? "hasChildren" : i === "parent" ? "hasParent" : "hasSibling", param: R, value: P };
|
|
2551
2321
|
}) : [];
|
|
2552
2322
|
}
|
|
2553
|
-
function
|
|
2554
|
-
if (
|
|
2555
|
-
const w =
|
|
2323
|
+
function v(i, C) {
|
|
2324
|
+
if (u.has(i.operator)) {
|
|
2325
|
+
const w = u.get(i.operator);
|
|
2556
2326
|
return w && w(i.target, i.param, i.value, C) || !1;
|
|
2557
2327
|
}
|
|
2558
2328
|
return !1;
|
|
2559
2329
|
}
|
|
2560
|
-
function
|
|
2561
|
-
return Object.keys(i).reduce((
|
|
2562
|
-
const
|
|
2563
|
-
return
|
|
2564
|
-
}, []).reduce((
|
|
2330
|
+
function D(i, C) {
|
|
2331
|
+
return Object.keys(i).reduce((P, A) => {
|
|
2332
|
+
const N = g(A, i[A]);
|
|
2333
|
+
return P.push(...N), P;
|
|
2334
|
+
}, []).reduce((P, A) => P && v(A, C), !0);
|
|
2565
2335
|
}
|
|
2566
|
-
function
|
|
2567
|
-
const w = Object.keys(i),
|
|
2568
|
-
return
|
|
2336
|
+
function E(i, C) {
|
|
2337
|
+
const w = Object.keys(i), j = w.includes("allOf"), R = w.includes("anyOf"), P = j || R, y = (P ? i[P ? j ? "allOf" : "anyOf" : "allOf"] : [i]).map((S) => D(S, C));
|
|
2338
|
+
return j ? !y.includes(!1) : y.includes(!0);
|
|
2569
2339
|
}
|
|
2570
|
-
function
|
|
2340
|
+
function b(i, C) {
|
|
2571
2341
|
const w = i.const;
|
|
2572
|
-
return w ? typeof w == "boolean" ? w : typeof w == "object" ?
|
|
2342
|
+
return w ? typeof w == "boolean" ? w : typeof w == "object" ? E(w, C) : !1 : !1;
|
|
2573
2343
|
}
|
|
2574
2344
|
function T(i) {
|
|
2575
2345
|
return (C) => {
|
|
2576
2346
|
const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2577
|
-
return i && i.properties && Object.keys(i.properties).reduce((
|
|
2578
|
-
const
|
|
2579
|
-
return
|
|
2347
|
+
return i && i.properties && Object.keys(i.properties).reduce((j, R) => {
|
|
2348
|
+
const P = i.properties[R];
|
|
2349
|
+
return j[R] = b(P, C), j;
|
|
2580
2350
|
}, w), w;
|
|
2581
2351
|
};
|
|
2582
2352
|
}
|
|
2583
2353
|
function l(i, C, w) {
|
|
2584
2354
|
if (C.type === "object" && C.properties) {
|
|
2585
|
-
const { rules:
|
|
2586
|
-
w.set(i, T(
|
|
2587
|
-
(
|
|
2355
|
+
const { rules: j, contents: R } = C.properties;
|
|
2356
|
+
w.set(i, T(j)), R && Object.keys(R.properties).forEach(
|
|
2357
|
+
(P) => l(P, R.properties[P], w)
|
|
2588
2358
|
);
|
|
2589
2359
|
}
|
|
2590
2360
|
}
|
|
2591
2361
|
function a() {
|
|
2592
|
-
const { properties: i } =
|
|
2362
|
+
const { properties: i } = Ut;
|
|
2593
2363
|
Object.keys(i).forEach((C) => {
|
|
2594
2364
|
l(C, i[C], oe);
|
|
2595
2365
|
});
|
|
2596
2366
|
}
|
|
2597
|
-
function
|
|
2367
|
+
function d(i, C) {
|
|
2598
2368
|
const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2599
2369
|
return oe.has(i) ? oe.get(i)(C) : w;
|
|
2600
2370
|
}
|
|
2601
|
-
return a(), { getRuleValue:
|
|
2371
|
+
return a(), { getRuleValue: d };
|
|
2602
2372
|
}
|
|
2603
|
-
class
|
|
2373
|
+
class qt extends K {
|
|
2604
2374
|
constructor(e, t) {
|
|
2605
2375
|
super(e, t);
|
|
2606
2376
|
}
|
|
@@ -2626,7 +2396,7 @@ class Ht extends J {
|
|
|
2626
2396
|
type: "combo-list",
|
|
2627
2397
|
textField: "value",
|
|
2628
2398
|
valueField: "key",
|
|
2629
|
-
data: [{ key: "response-toolbar", value:
|
|
2399
|
+
data: [{ key: "response-toolbar", value: Z["response-toolbar"].name }]
|
|
2630
2400
|
}
|
|
2631
2401
|
}
|
|
2632
2402
|
}
|
|
@@ -2669,85 +2439,85 @@ class Ht extends J {
|
|
|
2669
2439
|
};
|
|
2670
2440
|
}
|
|
2671
2441
|
}
|
|
2672
|
-
function
|
|
2673
|
-
const
|
|
2674
|
-
let
|
|
2675
|
-
function T(
|
|
2676
|
-
return
|
|
2442
|
+
function Ht(n, e, t, r) {
|
|
2443
|
+
const u = Me(), g = x(!1), v = x(!1);
|
|
2444
|
+
let D = !0, E = !1, b;
|
|
2445
|
+
function T(y) {
|
|
2446
|
+
return b && b.componentClassList && b.componentClassList.includes("f-form-layout") && b.componentClassList.includes("farris-form") ? y.sourceType === "control" && y.controlCategory === "input" || y.sourceType === "move" && y.controlType === "form-group" : !0;
|
|
2677
2447
|
}
|
|
2678
|
-
function l(
|
|
2679
|
-
return !Ot().basalDragulaRuleForContainer(
|
|
2448
|
+
function l(y) {
|
|
2449
|
+
return !Ot().basalDragulaRuleForContainer(y) || !D || !T(y), !1;
|
|
2680
2450
|
}
|
|
2681
2451
|
function a() {
|
|
2682
|
-
|
|
2683
|
-
const
|
|
2684
|
-
const
|
|
2685
|
-
return
|
|
2686
|
-
}, []) : [],
|
|
2687
|
-
|
|
2688
|
-
componentClass:
|
|
2689
|
-
componentClassList:
|
|
2690
|
-
childContents:
|
|
2691
|
-
firstChildContent:
|
|
2692
|
-
firstChildClass:
|
|
2452
|
+
g.value = !1, v.value = !1;
|
|
2453
|
+
const y = n, f = y.appearance && y.appearance.class || "", S = f.split(" "), k = y.buttons || [], p = k.length ? k[0] : null, s = p && p.appearance ? p.appearance.class : "", o = s ? s.split(" ") : [], c = k.length ? k.reduce((_, W) => {
|
|
2454
|
+
const q = W && W.appearance ? W.appearance.class : "", ee = q ? q.split(" ") : [];
|
|
2455
|
+
return _.push(...ee), _;
|
|
2456
|
+
}, []) : [], m = t == null ? void 0 : t.schema, B = m && m.appearance && m.appearance.class || "", M = B ? B.split(" ") : [];
|
|
2457
|
+
b = {
|
|
2458
|
+
componentClass: f,
|
|
2459
|
+
componentClassList: S,
|
|
2460
|
+
childContents: k,
|
|
2461
|
+
firstChildContent: p,
|
|
2462
|
+
firstChildClass: s,
|
|
2693
2463
|
firstChildClassList: o,
|
|
2694
|
-
parent:
|
|
2695
|
-
parentClass:
|
|
2696
|
-
parentClassList:
|
|
2697
|
-
children:
|
|
2464
|
+
parent: m,
|
|
2465
|
+
parentClass: B,
|
|
2466
|
+
parentClassList: M,
|
|
2467
|
+
children: k,
|
|
2698
2468
|
childrenClassList: c
|
|
2699
2469
|
};
|
|
2700
|
-
const { canAccept:
|
|
2701
|
-
return
|
|
2470
|
+
const { canAccept: I, fixed: L, hidePadding: $ } = u.getRuleValue(S[0], b);
|
|
2471
|
+
return D = I, E = $, !0;
|
|
2702
2472
|
}
|
|
2703
|
-
function
|
|
2473
|
+
function d(y) {
|
|
2704
2474
|
}
|
|
2705
2475
|
function i() {
|
|
2706
2476
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2707
2477
|
}
|
|
2708
|
-
function C(
|
|
2709
|
-
return
|
|
2478
|
+
function C(y, f) {
|
|
2479
|
+
return f.text = y.label, f;
|
|
2710
2480
|
}
|
|
2711
|
-
function w(
|
|
2712
|
-
const
|
|
2713
|
-
if ((
|
|
2714
|
-
const o = String(
|
|
2715
|
-
return c.editor =
|
|
2481
|
+
function w(y, f, S) {
|
|
2482
|
+
const k = n;
|
|
2483
|
+
if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2484
|
+
const o = String(y.innerText), c = U("form-group");
|
|
2485
|
+
return c.editor = S, c.label = o, c;
|
|
2716
2486
|
}
|
|
2717
|
-
return
|
|
2487
|
+
return S;
|
|
2718
2488
|
}
|
|
2719
|
-
function
|
|
2489
|
+
function j() {
|
|
2720
2490
|
return !1;
|
|
2721
2491
|
}
|
|
2722
2492
|
function R() {
|
|
2723
2493
|
return !1;
|
|
2724
2494
|
}
|
|
2725
|
-
function
|
|
2495
|
+
function P() {
|
|
2726
2496
|
return !0;
|
|
2727
2497
|
}
|
|
2728
2498
|
function A() {
|
|
2729
|
-
return
|
|
2499
|
+
return E;
|
|
2730
2500
|
}
|
|
2731
|
-
function
|
|
2732
|
-
return new
|
|
2501
|
+
function N(y) {
|
|
2502
|
+
return new qt(y, e).getPropertyConfig(n);
|
|
2733
2503
|
}
|
|
2734
2504
|
return {
|
|
2735
2505
|
canAccepts: l,
|
|
2736
|
-
checkCanAddComponent:
|
|
2506
|
+
checkCanAddComponent: P,
|
|
2737
2507
|
checkCanDeleteComponent: R,
|
|
2738
|
-
checkCanMoveComponent:
|
|
2508
|
+
checkCanMoveComponent: j,
|
|
2739
2509
|
getStyles: i,
|
|
2740
2510
|
hideNestedPaddingInDesginerView: A,
|
|
2741
2511
|
onAcceptNewChildElement: w,
|
|
2742
|
-
onAcceptMovedChildElement:
|
|
2512
|
+
onAcceptMovedChildElement: d,
|
|
2743
2513
|
onResolveNewComponentSchema: C,
|
|
2744
2514
|
resolveComponentContext: a,
|
|
2745
|
-
getPropsConfig:
|
|
2746
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2747
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2515
|
+
getPropsConfig: N,
|
|
2516
|
+
triggerBelongedComponentToMoveWhenMoved: g,
|
|
2517
|
+
triggerBelongedComponentToDeleteWhenDeleted: v
|
|
2748
2518
|
};
|
|
2749
2519
|
}
|
|
2750
|
-
const
|
|
2520
|
+
const zt = {
|
|
2751
2521
|
id: { type: String, default: "" },
|
|
2752
2522
|
componentId: { type: String, default: "" },
|
|
2753
2523
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2760,12 +2530,12 @@ const Gt = {
|
|
|
2760
2530
|
* 组件值
|
|
2761
2531
|
*/
|
|
2762
2532
|
modelValue: { type: Object }
|
|
2763
|
-
},
|
|
2764
|
-
function
|
|
2765
|
-
const t = e.getBoundingClientRect(),
|
|
2766
|
-
return
|
|
2533
|
+
}, X = x(0);
|
|
2534
|
+
function Gt(n, e) {
|
|
2535
|
+
const t = e.getBoundingClientRect(), r = n.getBoundingClientRect(), u = r.top >= t.top, g = r.top <= t.bottom;
|
|
2536
|
+
return u && g;
|
|
2767
2537
|
}
|
|
2768
|
-
function
|
|
2538
|
+
function Jt(n) {
|
|
2769
2539
|
if (!n)
|
|
2770
2540
|
return;
|
|
2771
2541
|
let e;
|
|
@@ -2774,51 +2544,51 @@ function Xt(n) {
|
|
|
2774
2544
|
const t = e.getBoundingClientRect();
|
|
2775
2545
|
if (t.width === 0 && t.height === 0)
|
|
2776
2546
|
return;
|
|
2777
|
-
const
|
|
2778
|
-
if (
|
|
2779
|
-
if (!
|
|
2780
|
-
|
|
2547
|
+
const r = e.querySelector(".component-btn-group");
|
|
2548
|
+
if (r) {
|
|
2549
|
+
if (!Gt(e, n)) {
|
|
2550
|
+
r.style.display = "none";
|
|
2781
2551
|
return;
|
|
2782
2552
|
}
|
|
2783
|
-
|
|
2784
|
-
const
|
|
2785
|
-
if (
|
|
2786
|
-
const
|
|
2787
|
-
|
|
2553
|
+
r.style.display = "";
|
|
2554
|
+
const g = r.getBoundingClientRect(), v = r.querySelector("div");
|
|
2555
|
+
if (v) {
|
|
2556
|
+
const D = v.getBoundingClientRect();
|
|
2557
|
+
v.style.top = g.top + "px", v.style.left = g.left - D.width + "px";
|
|
2788
2558
|
}
|
|
2789
2559
|
}
|
|
2790
2560
|
}
|
|
2791
|
-
function
|
|
2792
|
-
var
|
|
2793
|
-
function
|
|
2561
|
+
function Qt(n, e, t) {
|
|
2562
|
+
var N;
|
|
2563
|
+
function r() {
|
|
2794
2564
|
}
|
|
2795
|
-
const
|
|
2796
|
-
function
|
|
2565
|
+
const u = "", g = x();
|
|
2566
|
+
function v() {
|
|
2797
2567
|
return !0;
|
|
2798
2568
|
}
|
|
2799
|
-
function
|
|
2569
|
+
function D() {
|
|
2800
2570
|
return !1;
|
|
2801
2571
|
}
|
|
2802
|
-
function
|
|
2572
|
+
function E() {
|
|
2803
2573
|
return !0;
|
|
2804
2574
|
}
|
|
2805
|
-
function
|
|
2575
|
+
function b() {
|
|
2806
2576
|
return !0;
|
|
2807
2577
|
}
|
|
2808
2578
|
function T() {
|
|
2809
2579
|
return !0;
|
|
2810
2580
|
}
|
|
2811
|
-
function l(
|
|
2812
|
-
if (!
|
|
2581
|
+
function l(y) {
|
|
2582
|
+
if (!y || !y.value)
|
|
2813
2583
|
return null;
|
|
2814
|
-
const
|
|
2815
|
-
return
|
|
2584
|
+
const f = x(y == null ? void 0 : y.value.parent), S = l(f);
|
|
2585
|
+
return S || null;
|
|
2816
2586
|
}
|
|
2817
|
-
function a(
|
|
2818
|
-
const { componentInstance:
|
|
2819
|
-
return !
|
|
2587
|
+
function a(y = e) {
|
|
2588
|
+
const { componentInstance: f, designerItemElementRef: S } = y;
|
|
2589
|
+
return !f || !f.value ? null : f.value.canMove || f.value.canAdd || f.value.canDelete ? S : a(y.parent);
|
|
2820
2590
|
}
|
|
2821
|
-
function
|
|
2591
|
+
function d(y) {
|
|
2822
2592
|
return !!t;
|
|
2823
2593
|
}
|
|
2824
2594
|
function i() {
|
|
@@ -2826,38 +2596,38 @@ function Yt(n, e, t) {
|
|
|
2826
2596
|
}
|
|
2827
2597
|
function C() {
|
|
2828
2598
|
}
|
|
2829
|
-
function w(
|
|
2599
|
+
function w(y, f) {
|
|
2830
2600
|
}
|
|
2831
|
-
function
|
|
2832
|
-
const { componentType:
|
|
2833
|
-
let
|
|
2834
|
-
const
|
|
2835
|
-
return
|
|
2601
|
+
function j(y) {
|
|
2602
|
+
const { componentType: f } = y;
|
|
2603
|
+
let S = U(f, y);
|
|
2604
|
+
const k = f.toLowerCase().replace("-", "_");
|
|
2605
|
+
return S && !S.id && S.type === f && (S.id = `${k}_${Math.random().toString().slice(2, 6)}`), S;
|
|
2836
2606
|
}
|
|
2837
|
-
function R(
|
|
2838
|
-
const
|
|
2839
|
-
|
|
2840
|
-
let
|
|
2841
|
-
const o =
|
|
2842
|
-
return
|
|
2607
|
+
function R(y, f) {
|
|
2608
|
+
const S = String(y.getAttribute("data-controltype")), k = y.getAttribute("data-feature"), p = k ? JSON.parse(k) : {};
|
|
2609
|
+
p.parentComponentInstance = g.value;
|
|
2610
|
+
let s = U(S, p);
|
|
2611
|
+
const o = S.toLowerCase().replace("-", "_");
|
|
2612
|
+
return s && !s.id && s.type === S && (s.id = `${o}_${Math.random().toString().slice(2, 6)}`), s;
|
|
2843
2613
|
}
|
|
2844
|
-
function
|
|
2614
|
+
function P(y) {
|
|
2845
2615
|
}
|
|
2846
|
-
function A(...
|
|
2616
|
+
function A(...y) {
|
|
2847
2617
|
return [];
|
|
2848
2618
|
}
|
|
2849
|
-
return
|
|
2850
|
-
canMove:
|
|
2851
|
-
canSelectParent:
|
|
2852
|
-
canAdd:
|
|
2853
|
-
canDelete:
|
|
2619
|
+
return g.value = {
|
|
2620
|
+
canMove: v(),
|
|
2621
|
+
canSelectParent: D(),
|
|
2622
|
+
canAdd: b(),
|
|
2623
|
+
canDelete: E(),
|
|
2854
2624
|
canNested: !T(),
|
|
2855
2625
|
contents: [],
|
|
2856
2626
|
elementRef: n,
|
|
2857
|
-
parent: (
|
|
2627
|
+
parent: (N = e.parent) == null ? void 0 : N.componentInstance,
|
|
2858
2628
|
schema: e.schema,
|
|
2859
|
-
styles:
|
|
2860
|
-
canAccepts:
|
|
2629
|
+
styles: u,
|
|
2630
|
+
canAccepts: d,
|
|
2861
2631
|
getBelongedComponentInstance: l,
|
|
2862
2632
|
getDraggableDesignItemElement: a,
|
|
2863
2633
|
getDraggingDisplayText: i,
|
|
@@ -2865,149 +2635,149 @@ function Yt(n, e, t) {
|
|
|
2865
2635
|
getDragScopeElement: C,
|
|
2866
2636
|
onAcceptMovedChildElement: w,
|
|
2867
2637
|
onAcceptNewChildElement: R,
|
|
2868
|
-
onChildElementMovedOut:
|
|
2869
|
-
addNewChildComponentSchema:
|
|
2870
|
-
updateDragAndDropRules:
|
|
2871
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2872
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2873
|
-
},
|
|
2638
|
+
onChildElementMovedOut: P,
|
|
2639
|
+
addNewChildComponentSchema: j,
|
|
2640
|
+
updateDragAndDropRules: r,
|
|
2641
|
+
triggerBelongedComponentToMoveWhenMoved: x(!1),
|
|
2642
|
+
triggerBelongedComponentToDeleteWhenDeleted: x(!1)
|
|
2643
|
+
}, g;
|
|
2874
2644
|
}
|
|
2875
|
-
const
|
|
2645
|
+
const xe = /* @__PURE__ */ z({
|
|
2876
2646
|
name: "FDesignerInnerItem",
|
|
2877
|
-
props:
|
|
2647
|
+
props: zt,
|
|
2878
2648
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2879
2649
|
setup(n, e) {
|
|
2880
|
-
const t =
|
|
2650
|
+
const t = x(n.canMove), r = x(n.canAdd), u = x(n.canDelete), g = x(!1), v = x(n.contentKey), D = x(n.childType), E = x(n.childLabel), b = x(n.modelValue), T = x(""), l = x(), a = V("canvas-dragula"), d = x(), i = V("design-item-context"), C = {
|
|
2881
2651
|
designerItemElementRef: l,
|
|
2882
|
-
componentInstance:
|
|
2883
|
-
schema:
|
|
2652
|
+
componentInstance: d,
|
|
2653
|
+
schema: b.value,
|
|
2884
2654
|
parent: i,
|
|
2885
2655
|
setupContext: e
|
|
2886
2656
|
};
|
|
2887
|
-
|
|
2888
|
-
const w =
|
|
2657
|
+
Ne("design-item-context", C);
|
|
2658
|
+
const w = F(() => ({
|
|
2889
2659
|
"farris-component": !0,
|
|
2890
2660
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2891
2661
|
"flex-fill": n.id == "root-component",
|
|
2892
|
-
"position-relative": t.value ||
|
|
2893
|
-
"farris-nested":
|
|
2662
|
+
"position-relative": t.value || u.value,
|
|
2663
|
+
"farris-nested": g.value,
|
|
2894
2664
|
"can-move": t.value,
|
|
2895
2665
|
"d-none": l.value && l.value.classList.contains("d-none")
|
|
2896
|
-
})),
|
|
2666
|
+
})), j = F(() => {
|
|
2897
2667
|
const o = {};
|
|
2898
|
-
return T.value && T.value.split(";").reduce((c,
|
|
2899
|
-
const [
|
|
2900
|
-
return
|
|
2668
|
+
return T.value && T.value.split(";").reduce((c, m) => {
|
|
2669
|
+
const [B, M] = m.split(":");
|
|
2670
|
+
return B && (c[B] = M), c;
|
|
2901
2671
|
}, o), o;
|
|
2902
2672
|
});
|
|
2903
2673
|
function R(o, c) {
|
|
2904
|
-
if (i && i.schema[
|
|
2905
|
-
const
|
|
2906
|
-
if (
|
|
2907
|
-
const
|
|
2908
|
-
i.designerItemElementRef.value.querySelector(`#${
|
|
2674
|
+
if (i && i.schema[v.value]) {
|
|
2675
|
+
const m = i.schema[v.value].findIndex((B) => B.id === c.id);
|
|
2676
|
+
if (m > -1) {
|
|
2677
|
+
const B = i.schema[v.value].length, M = i.schema[v.value][m % B];
|
|
2678
|
+
i.designerItemElementRef.value.querySelector(`#${M.id}-design-item`), i.schema[v.value].splice(m, 1), i.componentInstance.value.updateDragAndDropRules(), X.value++, e.emit("removeComponent");
|
|
2909
2679
|
}
|
|
2910
2680
|
}
|
|
2911
2681
|
}
|
|
2912
|
-
function
|
|
2913
|
-
if (
|
|
2682
|
+
function P(o) {
|
|
2683
|
+
if (d.value.addNewChildComponentSchema) {
|
|
2914
2684
|
const c = {
|
|
2915
|
-
componentType:
|
|
2916
|
-
label:
|
|
2917
|
-
parentComponentInstance:
|
|
2685
|
+
componentType: D.value,
|
|
2686
|
+
label: E.value,
|
|
2687
|
+
parentComponentInstance: d.value,
|
|
2918
2688
|
targetPosition: -1
|
|
2919
|
-
},
|
|
2920
|
-
|
|
2689
|
+
}, m = d.value.addNewChildComponentSchema(c);
|
|
2690
|
+
b.value[v.value].push(m), e.emit("addComponent");
|
|
2921
2691
|
}
|
|
2922
2692
|
}
|
|
2923
2693
|
function A() {
|
|
2924
|
-
return
|
|
2694
|
+
return r.value && h("div", {
|
|
2925
2695
|
role: "button",
|
|
2926
2696
|
class: "btn component-settings-button",
|
|
2927
2697
|
title: "新增",
|
|
2928
2698
|
ref: "removeComponent",
|
|
2929
2699
|
onClick: (o) => {
|
|
2930
|
-
|
|
2700
|
+
P();
|
|
2931
2701
|
}
|
|
2932
|
-
}, [
|
|
2702
|
+
}, [h("i", {
|
|
2933
2703
|
class: "f-icon f-icon-plus-circle"
|
|
2934
2704
|
}, null)]);
|
|
2935
2705
|
}
|
|
2936
|
-
function
|
|
2937
|
-
return
|
|
2706
|
+
function N(o) {
|
|
2707
|
+
return u.value && h("div", {
|
|
2938
2708
|
role: "button",
|
|
2939
2709
|
class: "btn component-settings-button",
|
|
2940
2710
|
title: "删除",
|
|
2941
2711
|
ref: "removeComponent",
|
|
2942
|
-
onClick:
|
|
2943
|
-
}, [
|
|
2712
|
+
onClick: _e((c) => R(c, o), ["stop"])
|
|
2713
|
+
}, [h("i", {
|
|
2944
2714
|
class: "f-icon f-icon-yxs_delete"
|
|
2945
2715
|
}, null)]);
|
|
2946
2716
|
}
|
|
2947
|
-
function
|
|
2948
|
-
return t.value &&
|
|
2717
|
+
function y() {
|
|
2718
|
+
return t.value && h("div", {
|
|
2949
2719
|
role: "button",
|
|
2950
2720
|
class: "btn component-settings-button",
|
|
2951
2721
|
title: "移动",
|
|
2952
2722
|
ref: "moveComponent"
|
|
2953
|
-
}, [
|
|
2723
|
+
}, [h("i", {
|
|
2954
2724
|
"data-dragging-icon": "true",
|
|
2955
2725
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2956
2726
|
}, null)]);
|
|
2957
2727
|
}
|
|
2958
|
-
function
|
|
2959
|
-
return
|
|
2728
|
+
function f(o) {
|
|
2729
|
+
return h("div", {
|
|
2960
2730
|
class: "component-btn-group",
|
|
2961
2731
|
"data-noattach": "true"
|
|
2962
|
-
}, [
|
|
2732
|
+
}, [h("div", null, [A(), y(), N(o)])]);
|
|
2963
2733
|
}
|
|
2964
|
-
|
|
2965
|
-
|
|
2734
|
+
G(() => n.modelValue, (o) => {
|
|
2735
|
+
b.value = o, C.schema = o;
|
|
2966
2736
|
});
|
|
2967
|
-
function
|
|
2737
|
+
function S(o) {
|
|
2968
2738
|
const c = o.target;
|
|
2969
|
-
|
|
2739
|
+
Jt(c);
|
|
2970
2740
|
}
|
|
2971
|
-
function
|
|
2741
|
+
function k() {
|
|
2972
2742
|
var o, c;
|
|
2973
|
-
(c = (o =
|
|
2743
|
+
(c = (o = b.value) == null ? void 0 : o.contents) != null && c.length && l.value && l.value.addEventListener("scroll", S);
|
|
2974
2744
|
}
|
|
2975
|
-
function
|
|
2976
|
-
const o = l.value, c =
|
|
2977
|
-
return
|
|
2745
|
+
function p() {
|
|
2746
|
+
const o = l.value, c = x(o.children[1]);
|
|
2747
|
+
return Qt(c, C).value;
|
|
2978
2748
|
}
|
|
2979
|
-
|
|
2749
|
+
H(() => {
|
|
2980
2750
|
if (l.value) {
|
|
2981
|
-
const o = l.value.querySelector(`[data-dragref='${
|
|
2982
|
-
|
|
2751
|
+
const o = l.value.querySelector(`[data-dragref='${b.value.id}-container']`);
|
|
2752
|
+
d.value = o && o.componentInstance ? o.componentInstance.value : p(), a && o && a.attachComponents(o, b.value), g.value = d.value.canNested !== void 0 ? d.value.canNested : g.value, r.value = d.value.canAdd !== void 0 ? d.value.canAdd : r.value, u.value = d.value.canDelete !== void 0 ? d.value.canDelete : u.value, t.value = d.value.canMove !== void 0 ? d.value.canMove : t.value, T.value = d.value.styles || "", l.value && (l.value.componentInstance = d, l.value.designItemContext = C);
|
|
2983
2753
|
}
|
|
2984
|
-
|
|
2985
|
-
}),
|
|
2986
|
-
l.value && l.value.removeEventListener("scroll",
|
|
2754
|
+
k(), X.value++;
|
|
2755
|
+
}), $e(() => {
|
|
2756
|
+
l.value && l.value.removeEventListener("scroll", S);
|
|
2987
2757
|
});
|
|
2988
|
-
function
|
|
2989
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
2758
|
+
function s(o) {
|
|
2759
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((m) => m.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
|
|
2990
2760
|
const c = l.value;
|
|
2991
2761
|
if (c) {
|
|
2992
|
-
const
|
|
2993
|
-
if (!(
|
|
2994
|
-
Array.from(
|
|
2995
|
-
const
|
|
2996
|
-
|
|
2762
|
+
const m = document.getElementsByClassName("dgComponentSelected");
|
|
2763
|
+
if (!(m && m.length === 1 && m[0] === l.value)) {
|
|
2764
|
+
Array.from(m).forEach((I) => I.classList.remove("dgComponentSelected")), c.classList.add("dgComponentFocused"), e.emit("selectionChange", b.value.type, b.value, n.componentId, d.value);
|
|
2765
|
+
const M = d.value.getDraggableDesignItemElement(C);
|
|
2766
|
+
M && M.value && M.value.classList.add("dgComponentSelected");
|
|
2997
2767
|
}
|
|
2998
2768
|
}
|
|
2999
|
-
|
|
2769
|
+
X.value++;
|
|
3000
2770
|
}
|
|
3001
|
-
return () =>
|
|
2771
|
+
return () => h("div", {
|
|
3002
2772
|
id: `${n.id}-design-item`,
|
|
3003
2773
|
ref: l,
|
|
3004
2774
|
class: w.value,
|
|
3005
|
-
style:
|
|
3006
|
-
onClick:
|
|
3007
|
-
}, [
|
|
2775
|
+
style: j.value,
|
|
2776
|
+
onClick: s
|
|
2777
|
+
}, [f(b.value), e.slots.default && e.slots.default()]);
|
|
3008
2778
|
}
|
|
3009
2779
|
});
|
|
3010
|
-
class
|
|
2780
|
+
class Xt extends K {
|
|
3011
2781
|
constructor(e, t) {
|
|
3012
2782
|
super(e, t);
|
|
3013
2783
|
}
|
|
@@ -3058,7 +2828,7 @@ class Zt extends J {
|
|
|
3058
2828
|
title: "style样式"
|
|
3059
2829
|
}
|
|
3060
2830
|
},
|
|
3061
|
-
setPropertyRelates(t,
|
|
2831
|
+
setPropertyRelates(t, r) {
|
|
3062
2832
|
}
|
|
3063
2833
|
};
|
|
3064
2834
|
}
|
|
@@ -3069,29 +2839,29 @@ class Zt extends J {
|
|
|
3069
2839
|
name: "点击事件"
|
|
3070
2840
|
}
|
|
3071
2841
|
];
|
|
3072
|
-
var
|
|
3073
|
-
const
|
|
3074
|
-
|
|
2842
|
+
var r = this;
|
|
2843
|
+
const u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t), g = {};
|
|
2844
|
+
g[r.viewModelId] = {
|
|
3075
2845
|
type: "events-editor",
|
|
3076
2846
|
editor: {
|
|
3077
|
-
initialData:
|
|
2847
|
+
initialData: u
|
|
3078
2848
|
}
|
|
3079
2849
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3080
2850
|
title: "事件",
|
|
3081
2851
|
hideTitle: !0,
|
|
3082
|
-
properties:
|
|
2852
|
+
properties: g,
|
|
3083
2853
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3084
2854
|
refreshPanelAfterChanged: !0,
|
|
3085
2855
|
tabId: "commands",
|
|
3086
2856
|
tabName: "交互",
|
|
3087
|
-
setPropertyRelates(
|
|
3088
|
-
const
|
|
3089
|
-
delete e[
|
|
2857
|
+
setPropertyRelates(v, D) {
|
|
2858
|
+
const E = v.propertyValue;
|
|
2859
|
+
delete e[r.viewModelId], E && (E.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, E.events, E));
|
|
3090
2860
|
}
|
|
3091
2861
|
};
|
|
3092
2862
|
}
|
|
3093
2863
|
}
|
|
3094
|
-
class
|
|
2864
|
+
class Yt extends K {
|
|
3095
2865
|
constructor(e, t) {
|
|
3096
2866
|
super(e, t);
|
|
3097
2867
|
}
|
|
@@ -3117,7 +2887,7 @@ class Kt extends J {
|
|
|
3117
2887
|
type: "combo-list",
|
|
3118
2888
|
textField: "value",
|
|
3119
2889
|
valueField: "key",
|
|
3120
|
-
data: [{ key: "response-toolbar-item", value:
|
|
2890
|
+
data: [{ key: "response-toolbar-item", value: Z["response-toolbar-item"].name }]
|
|
3121
2891
|
}
|
|
3122
2892
|
},
|
|
3123
2893
|
text: {
|
|
@@ -3142,47 +2912,47 @@ class Kt extends J {
|
|
|
3142
2912
|
label: "click",
|
|
3143
2913
|
name: "点击事件"
|
|
3144
2914
|
}
|
|
3145
|
-
],
|
|
3146
|
-
|
|
2915
|
+
], r = this, u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t), g = {};
|
|
2916
|
+
g[r.viewModelId] = {
|
|
3147
2917
|
type: "events-editor",
|
|
3148
2918
|
editor: {
|
|
3149
|
-
initialData:
|
|
2919
|
+
initialData: u
|
|
3150
2920
|
}
|
|
3151
2921
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3152
2922
|
title: "事件",
|
|
3153
2923
|
hideTitle: !0,
|
|
3154
|
-
properties:
|
|
2924
|
+
properties: g,
|
|
3155
2925
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3156
2926
|
refreshPanelAfterChanged: !0,
|
|
3157
2927
|
tabId: "commands",
|
|
3158
2928
|
tabName: "交互",
|
|
3159
|
-
setPropertyRelates(
|
|
3160
|
-
const
|
|
3161
|
-
delete e[
|
|
2929
|
+
setPropertyRelates(v, D) {
|
|
2930
|
+
const E = v.propertyValue;
|
|
2931
|
+
delete e[r.viewModelId], E && (E.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, E.events, E));
|
|
3162
2932
|
}
|
|
3163
2933
|
};
|
|
3164
2934
|
}
|
|
3165
2935
|
}
|
|
3166
|
-
function
|
|
3167
|
-
|
|
3168
|
-
const t =
|
|
3169
|
-
let
|
|
3170
|
-
function
|
|
2936
|
+
function Zt(n, e) {
|
|
2937
|
+
Me();
|
|
2938
|
+
const t = x(!1), r = x(!1);
|
|
2939
|
+
let u = !1, g = !1;
|
|
2940
|
+
function v(w) {
|
|
3171
2941
|
return !1;
|
|
3172
2942
|
}
|
|
3173
|
-
function
|
|
2943
|
+
function D(w) {
|
|
3174
2944
|
}
|
|
3175
|
-
function
|
|
2945
|
+
function E() {
|
|
3176
2946
|
return "";
|
|
3177
2947
|
}
|
|
3178
|
-
function
|
|
3179
|
-
return
|
|
2948
|
+
function b(w, j) {
|
|
2949
|
+
return j.text = w.label, j;
|
|
3180
2950
|
}
|
|
3181
|
-
function T(w,
|
|
3182
|
-
const
|
|
3183
|
-
if ((
|
|
3184
|
-
const
|
|
3185
|
-
return
|
|
2951
|
+
function T(w, j, R) {
|
|
2952
|
+
const P = n.schema;
|
|
2953
|
+
if ((P.appearance && P.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2954
|
+
const y = String(w.innerText), f = U("form-group");
|
|
2955
|
+
return f.editor = R, f.label = y, f;
|
|
3186
2956
|
}
|
|
3187
2957
|
return R;
|
|
3188
2958
|
}
|
|
@@ -3190,71 +2960,71 @@ function Jt(n, e) {
|
|
|
3190
2960
|
return !1;
|
|
3191
2961
|
}
|
|
3192
2962
|
function a() {
|
|
3193
|
-
return !
|
|
2963
|
+
return !g;
|
|
3194
2964
|
}
|
|
3195
|
-
function
|
|
2965
|
+
function d() {
|
|
3196
2966
|
return !1;
|
|
3197
2967
|
}
|
|
3198
2968
|
function i() {
|
|
3199
|
-
return
|
|
2969
|
+
return u;
|
|
3200
2970
|
}
|
|
3201
2971
|
function C(w) {
|
|
3202
|
-
let
|
|
2972
|
+
let j;
|
|
3203
2973
|
switch (n.schema.type) {
|
|
3204
2974
|
case "tab-toolbar-item":
|
|
3205
|
-
|
|
2975
|
+
j = new Xt(w, e);
|
|
3206
2976
|
break;
|
|
3207
2977
|
default:
|
|
3208
|
-
|
|
2978
|
+
j = new Yt(w, e);
|
|
3209
2979
|
}
|
|
3210
|
-
return
|
|
2980
|
+
return j.getPropertyConfig(n.schema);
|
|
3211
2981
|
}
|
|
3212
2982
|
return {
|
|
3213
|
-
canAccepts:
|
|
3214
|
-
checkCanAddComponent:
|
|
2983
|
+
canAccepts: v,
|
|
2984
|
+
checkCanAddComponent: d,
|
|
3215
2985
|
checkCanDeleteComponent: a,
|
|
3216
2986
|
checkCanMoveComponent: l,
|
|
3217
|
-
getStyles:
|
|
2987
|
+
getStyles: E,
|
|
3218
2988
|
hideNestedPaddingInDesginerView: i,
|
|
3219
2989
|
onAcceptNewChildElement: T,
|
|
3220
|
-
onAcceptMovedChildElement:
|
|
3221
|
-
onResolveNewComponentSchema:
|
|
2990
|
+
onAcceptMovedChildElement: D,
|
|
2991
|
+
onResolveNewComponentSchema: b,
|
|
3222
2992
|
getPropsConfig: C,
|
|
3223
2993
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
3224
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2994
|
+
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
3225
2995
|
};
|
|
3226
2996
|
}
|
|
3227
|
-
const
|
|
2997
|
+
const ke = /* @__PURE__ */ z({
|
|
3228
2998
|
name: "FResponseToolbarItemDesign",
|
|
3229
|
-
props:
|
|
2999
|
+
props: je,
|
|
3230
3000
|
emits: ["Click"],
|
|
3231
3001
|
setup(n, e) {
|
|
3232
|
-
|
|
3233
|
-
const t =
|
|
3002
|
+
x(), x();
|
|
3003
|
+
const t = x(n.alignment), r = {
|
|
3234
3004
|
id: "__more_buttons__",
|
|
3235
3005
|
text: "More"
|
|
3236
|
-
},
|
|
3237
|
-
|
|
3238
|
-
const
|
|
3239
|
-
|
|
3240
|
-
}),
|
|
3241
|
-
|
|
3242
|
-
}), e.expose(
|
|
3006
|
+
}, u = x(new J(r));
|
|
3007
|
+
F(() => u.value.children.length > 0);
|
|
3008
|
+
const g = x(), v = V("designer-host-service"), D = V("design-item-context"), E = Zt(D, v), b = ve(g, D, E);
|
|
3009
|
+
V("toolbar-item-handler", () => {
|
|
3010
|
+
}), H(() => {
|
|
3011
|
+
g.value.componentInstance = b;
|
|
3012
|
+
}), e.expose(b.value);
|
|
3243
3013
|
function T() {
|
|
3244
|
-
const
|
|
3014
|
+
const d = {
|
|
3245
3015
|
"f-icon": !0
|
|
3246
3016
|
};
|
|
3247
3017
|
if (n.icon) {
|
|
3248
3018
|
const i = n.icon.trim().split(" ");
|
|
3249
|
-
i && i.length && i.reduce((C, w) => (C[w] = !0, C),
|
|
3019
|
+
i && i.length && i.reduce((C, w) => (C[w] = !0, C), d);
|
|
3250
3020
|
}
|
|
3251
|
-
return
|
|
3021
|
+
return d;
|
|
3252
3022
|
}
|
|
3253
3023
|
function l() {
|
|
3254
3024
|
return !!(n.icon && n.icon.trim());
|
|
3255
3025
|
}
|
|
3256
3026
|
function a() {
|
|
3257
|
-
const
|
|
3027
|
+
const d = {
|
|
3258
3028
|
btn: !0,
|
|
3259
3029
|
"f-rt-btn": !0,
|
|
3260
3030
|
"f-btn-ml": t.value === "right",
|
|
@@ -3263,159 +3033,159 @@ const je = /* @__PURE__ */ G({
|
|
|
3263
3033
|
};
|
|
3264
3034
|
if (n.class) {
|
|
3265
3035
|
const i = n.class.split(" ");
|
|
3266
|
-
i && i.length && i.reduce((C, w) => (C[w] = !0, C),
|
|
3036
|
+
i && i.length && i.reduce((C, w) => (C[w] = !0, C), d);
|
|
3267
3037
|
}
|
|
3268
|
-
return
|
|
3038
|
+
return d;
|
|
3269
3039
|
}
|
|
3270
|
-
return
|
|
3271
|
-
}),
|
|
3272
|
-
}), () =>
|
|
3273
|
-
ref:
|
|
3274
|
-
"data-dragref": `${
|
|
3040
|
+
return H(() => {
|
|
3041
|
+
}), re(() => {
|
|
3042
|
+
}), () => h("div", {
|
|
3043
|
+
ref: g,
|
|
3044
|
+
"data-dragref": `${D.schema.id}-container`,
|
|
3275
3045
|
class: "farris-component position-relative",
|
|
3276
3046
|
style: "display:inline-block!important;"
|
|
3277
|
-
}, [
|
|
3047
|
+
}, [h("button", {
|
|
3278
3048
|
type: "button",
|
|
3279
3049
|
class: a(),
|
|
3280
3050
|
id: n.id
|
|
3281
|
-
}, [l() &&
|
|
3051
|
+
}, [l() && h("i", {
|
|
3282
3052
|
class: T()
|
|
3283
3053
|
}, null), n.text])]);
|
|
3284
3054
|
}
|
|
3285
|
-
}), Ae = /* @__PURE__ */
|
|
3055
|
+
}), Ae = /* @__PURE__ */ z({
|
|
3286
3056
|
name: "FResponseToolbarDesign",
|
|
3287
|
-
props:
|
|
3057
|
+
props: xt,
|
|
3288
3058
|
emits: ["Click"],
|
|
3289
3059
|
setup(n, e) {
|
|
3290
|
-
const t =
|
|
3291
|
-
let
|
|
3292
|
-
const
|
|
3060
|
+
const t = x(n.items);
|
|
3061
|
+
let r = new Array(t.value.length).fill(x());
|
|
3062
|
+
const u = x(), g = x(), v = x(n.alignment), D = {
|
|
3293
3063
|
id: "__more_buttons__",
|
|
3294
3064
|
text: "More"
|
|
3295
|
-
},
|
|
3296
|
-
|
|
3297
|
-
const T =
|
|
3298
|
-
|
|
3299
|
-
}),
|
|
3065
|
+
}, E = x(new J(D)), b = Ee();
|
|
3066
|
+
F(() => E.value.children.length > 0);
|
|
3067
|
+
const T = x(), l = V("designer-host-service"), a = V("design-item-context"), d = Ht(a.schema, l, a), i = ve(T, a, d);
|
|
3068
|
+
V("toolbar-item-handler", () => {
|
|
3069
|
+
}), H(() => {
|
|
3300
3070
|
T.value.componentInstance = i;
|
|
3301
3071
|
}), e.expose(i.value);
|
|
3302
|
-
const C =
|
|
3072
|
+
const C = F(() => ({
|
|
3303
3073
|
"f-toolbar": !0,
|
|
3304
3074
|
"f-response-toolbar": !0,
|
|
3305
3075
|
"position-relative": !0
|
|
3306
|
-
})), w =
|
|
3076
|
+
})), w = F(() => ({
|
|
3307
3077
|
"d-flex": !0,
|
|
3308
3078
|
"flex-nowrap": !0,
|
|
3309
|
-
"justify-content-end":
|
|
3310
|
-
"justify-content-start":
|
|
3079
|
+
"justify-content-end": v.value === "right",
|
|
3080
|
+
"justify-content-start": v.value === "left"
|
|
3311
3081
|
})), {
|
|
3312
|
-
renderToolbarDropdown:
|
|
3082
|
+
renderToolbarDropdown: j,
|
|
3313
3083
|
clearAllDropDown: R
|
|
3314
|
-
} = Rt(n,
|
|
3315
|
-
function
|
|
3316
|
-
t.value.filter((
|
|
3317
|
-
|
|
3318
|
-
}),
|
|
3084
|
+
} = Rt(n, b, i);
|
|
3085
|
+
function P() {
|
|
3086
|
+
t.value.filter((p) => p.children && p.children.length > 0).forEach((p) => {
|
|
3087
|
+
p.expanded = !1;
|
|
3088
|
+
}), E.value.expanded = !1, R();
|
|
3319
3089
|
}
|
|
3320
|
-
const A = /* @__PURE__ */ new Map(),
|
|
3321
|
-
function
|
|
3322
|
-
const
|
|
3323
|
-
let o =
|
|
3324
|
-
const c = Array.from(
|
|
3325
|
-
if (
|
|
3326
|
-
const
|
|
3090
|
+
const A = /* @__PURE__ */ new Map(), N = [];
|
|
3091
|
+
function y(p) {
|
|
3092
|
+
const s = g.value;
|
|
3093
|
+
let o = p;
|
|
3094
|
+
const c = Array.from(s.children), m = c[c.length - 1].id === "__more_buttons__" ? c[c.length - 1] : null;
|
|
3095
|
+
if (m) {
|
|
3096
|
+
const $ = m.computedStyleMap().get("margin-left"), _ = m.computedStyleMap().get("margin-right"), W = ($ ? $.value : 0) + m.getBoundingClientRect().width + (_ ? _.value : 0);
|
|
3327
3097
|
o -= W;
|
|
3328
3098
|
}
|
|
3329
|
-
const
|
|
3330
|
-
for (const
|
|
3331
|
-
const
|
|
3332
|
-
o <
|
|
3333
|
-
id:
|
|
3334
|
-
width:
|
|
3335
|
-
})) : o -=
|
|
3099
|
+
const B = c.filter(($) => $.id !== "__more_buttons__");
|
|
3100
|
+
for (const $ of B) {
|
|
3101
|
+
const _ = $.computedStyleMap().get("margin-left"), W = $.computedStyleMap().get("margin-right"), q = (_ ? _.value : 0) + $.getBoundingClientRect().width + (W ? W.value : 0);
|
|
3102
|
+
o < q ? (A.set($.id, !0), N.push({
|
|
3103
|
+
id: $.id,
|
|
3104
|
+
width: q
|
|
3105
|
+
})) : o -= q;
|
|
3336
3106
|
}
|
|
3337
|
-
if (
|
|
3338
|
-
for (let
|
|
3339
|
-
const
|
|
3340
|
-
if (o >=
|
|
3341
|
-
o -=
|
|
3107
|
+
if (N.length)
|
|
3108
|
+
for (let $ = N.length - 1; $ >= 0; $--) {
|
|
3109
|
+
const _ = N[$].width;
|
|
3110
|
+
if (o >= _)
|
|
3111
|
+
o -= _, A.delete(N[$].id), N.pop();
|
|
3342
3112
|
else
|
|
3343
3113
|
break;
|
|
3344
3114
|
}
|
|
3345
|
-
const
|
|
3346
|
-
|
|
3347
|
-
const
|
|
3348
|
-
|
|
3115
|
+
const M = Object.assign({}, E.value);
|
|
3116
|
+
M.children = [];
|
|
3117
|
+
const I = new J(M), L = t.value.reduce(($, _) => (A.has(_.id) && I.children.push(_), _.visible = !A.has(_.id), $.push(_), $), []);
|
|
3118
|
+
E.value = I, t.value = L;
|
|
3349
3119
|
}
|
|
3350
|
-
const
|
|
3351
|
-
if (
|
|
3352
|
-
const o =
|
|
3353
|
-
(o <
|
|
3120
|
+
const f = new ResizeObserver((p) => {
|
|
3121
|
+
if (p.length) {
|
|
3122
|
+
const o = p[0].contentRect.width, m = g.value.getBoundingClientRect().width;
|
|
3123
|
+
(o < m || N.length) && y(o);
|
|
3354
3124
|
}
|
|
3355
3125
|
});
|
|
3356
|
-
|
|
3357
|
-
const
|
|
3358
|
-
|
|
3359
|
-
}),
|
|
3360
|
-
|
|
3361
|
-
}),
|
|
3126
|
+
H(() => {
|
|
3127
|
+
const p = u.value;
|
|
3128
|
+
f.observe(p), document.body.addEventListener("click", P);
|
|
3129
|
+
}), re(() => {
|
|
3130
|
+
f.disconnect(), document.body.removeEventListener("click", P);
|
|
3131
|
+
}), G(() => n.items, () => {
|
|
3362
3132
|
t.value = n.items;
|
|
3363
3133
|
}, {
|
|
3364
3134
|
deep: !0
|
|
3365
|
-
}),
|
|
3366
|
-
|
|
3135
|
+
}), G(t, (p) => {
|
|
3136
|
+
r = new Array(t.value.length).fill(x());
|
|
3367
3137
|
});
|
|
3368
|
-
function
|
|
3369
|
-
a && a.setupContext && a.setupContext.emit("selectionChange",
|
|
3138
|
+
function S(p, s, o, c) {
|
|
3139
|
+
a && a.setupContext && a.setupContext.emit("selectionChange", p, s, o, c);
|
|
3370
3140
|
}
|
|
3371
|
-
function
|
|
3372
|
-
const
|
|
3373
|
-
|
|
3141
|
+
function k() {
|
|
3142
|
+
const p = g.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
3143
|
+
p == null || p.classList.remove("dgComponentSelected"), p == null || p.classList.remove("dgComponentFocused");
|
|
3374
3144
|
}
|
|
3375
|
-
return () =>
|
|
3145
|
+
return () => h("div", {
|
|
3376
3146
|
ref: T,
|
|
3377
3147
|
"data-dragref": `${a.schema.id}-container`,
|
|
3378
3148
|
class: C.value
|
|
3379
|
-
}, [
|
|
3380
|
-
ref: p,
|
|
3381
|
-
class: w.value
|
|
3382
|
-
}, [b("div", {
|
|
3149
|
+
}, [h("div", {
|
|
3383
3150
|
ref: u,
|
|
3151
|
+
class: w.value
|
|
3152
|
+
}, [h("div", {
|
|
3153
|
+
ref: g,
|
|
3384
3154
|
class: "d-inline-block f-response-content",
|
|
3385
3155
|
style: "white-space: nowrap;"
|
|
3386
|
-
}, [t.value.map((
|
|
3387
|
-
ref: s
|
|
3156
|
+
}, [t.value.map((p, s) => h(xe, {
|
|
3157
|
+
ref: r[s],
|
|
3388
3158
|
class: "p-0 display-inline-block",
|
|
3389
|
-
modelValue:
|
|
3390
|
-
"onUpdate:modelValue": (o) =>
|
|
3159
|
+
modelValue: p,
|
|
3160
|
+
"onUpdate:modelValue": (o) => p = o,
|
|
3391
3161
|
canMove: !0,
|
|
3392
3162
|
childType: "response-toolbar-item",
|
|
3393
3163
|
childLabel: "按钮",
|
|
3394
3164
|
contentKey: "buttons",
|
|
3395
3165
|
componentId: n.componentId,
|
|
3396
|
-
id:
|
|
3166
|
+
id: p.id,
|
|
3397
3167
|
style: "padding:0 !important;display:inline-block",
|
|
3398
|
-
onSelectionChange:
|
|
3399
|
-
onRemoveComponent:
|
|
3168
|
+
onSelectionChange: S,
|
|
3169
|
+
onRemoveComponent: k
|
|
3400
3170
|
}, {
|
|
3401
|
-
default: () => [
|
|
3402
|
-
id:
|
|
3403
|
-
disable:
|
|
3404
|
-
text:
|
|
3405
|
-
icon:
|
|
3171
|
+
default: () => [h(ke, {
|
|
3172
|
+
id: p.id,
|
|
3173
|
+
disable: p.disable,
|
|
3174
|
+
text: p.text,
|
|
3175
|
+
icon: p.icon,
|
|
3406
3176
|
componentId: n.componentId
|
|
3407
3177
|
}, null)]
|
|
3408
3178
|
}))])])]);
|
|
3409
3179
|
}
|
|
3410
|
-
}),
|
|
3411
|
-
|
|
3412
|
-
n["response-toolbar"] =
|
|
3180
|
+
}), he = ue;
|
|
3181
|
+
Y.register = (n, e, t) => {
|
|
3182
|
+
n["response-toolbar"] = Y, e["response-toolbar"] = ue;
|
|
3413
3183
|
};
|
|
3414
|
-
|
|
3415
|
-
n["response-toolbar"] = Ae, e["response-toolbar"] =
|
|
3184
|
+
Y.registerDesigner = (n, e, t) => {
|
|
3185
|
+
n["response-toolbar"] = Ae, e["response-toolbar"] = ue, n["response-toolbar-item"] = ke, e["response-toolbar-item"] = kt;
|
|
3416
3186
|
};
|
|
3417
|
-
|
|
3418
|
-
const
|
|
3187
|
+
Ve(Y);
|
|
3188
|
+
const Kt = {
|
|
3419
3189
|
id: { type: String, default: "" },
|
|
3420
3190
|
componentId: { type: String, default: "" },
|
|
3421
3191
|
type: { type: String, default: "" },
|
|
@@ -3430,101 +3200,102 @@ const en = {
|
|
|
3430
3200
|
*/
|
|
3431
3201
|
modelValue: { type: Object },
|
|
3432
3202
|
ignore: { type: Boolean, default: !1 }
|
|
3433
|
-
},
|
|
3203
|
+
}, be = /* @__PURE__ */ z({
|
|
3434
3204
|
name: "FDesignerTemplateItem",
|
|
3435
|
-
props:
|
|
3205
|
+
props: Kt,
|
|
3436
3206
|
emits: ["selectionChange"],
|
|
3437
3207
|
setup(n, e) {
|
|
3438
|
-
const t =
|
|
3208
|
+
const t = x(), r = F(() => ({
|
|
3439
3209
|
"farris-component": !0
|
|
3440
3210
|
}));
|
|
3441
|
-
function
|
|
3442
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
3443
|
-
const
|
|
3444
|
-
if (
|
|
3445
|
-
const
|
|
3446
|
-
|
|
3211
|
+
function u(g) {
|
|
3212
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((D) => D.classList.remove("dgComponentFocused")), g && (g.preventDefault(), g.stopPropagation());
|
|
3213
|
+
const v = t.value;
|
|
3214
|
+
if (v) {
|
|
3215
|
+
const D = document.getElementsByClassName("dgComponentSelected");
|
|
3216
|
+
D && D.length === 1 && D[0] === t.value || (Array.from(D).forEach((b) => b.classList.remove("dgComponentSelected")), v.classList.add("dgComponentFocused"));
|
|
3447
3217
|
}
|
|
3448
|
-
|
|
3218
|
+
X.value++;
|
|
3449
3219
|
}
|
|
3450
|
-
return () =>
|
|
3220
|
+
return () => h("div", {
|
|
3451
3221
|
id: `${n.id}-design-item`,
|
|
3452
3222
|
ref: t,
|
|
3453
|
-
class:
|
|
3454
|
-
onClick:
|
|
3223
|
+
class: r.value,
|
|
3224
|
+
onClick: u
|
|
3455
3225
|
}, [e.slots.default && e.slots.default()]);
|
|
3456
3226
|
}
|
|
3457
|
-
}),
|
|
3227
|
+
}), en = /* @__PURE__ */ z({
|
|
3458
3228
|
name: "FPageHeaderDesign",
|
|
3459
3229
|
props: st,
|
|
3460
3230
|
emits: ["Click"],
|
|
3461
3231
|
setup(n, e) {
|
|
3462
|
-
const t =
|
|
3232
|
+
const t = x(), r = V("designer-host-service"), u = V("design-item-context"), g = at(u.schema, r), v = rt(t, u, g), D = x(u.schema.toolbar || {
|
|
3463
3233
|
type: "response-toolbar",
|
|
3464
3234
|
buttons: []
|
|
3465
|
-
}),
|
|
3466
|
-
|
|
3467
|
-
t.value.componentInstance =
|
|
3468
|
-
}),
|
|
3469
|
-
|
|
3235
|
+
}), E = x(he(D.value));
|
|
3236
|
+
H(() => {
|
|
3237
|
+
t.value.componentInstance = v;
|
|
3238
|
+
}), G(() => u.schema.toolbar, () => {
|
|
3239
|
+
D.value = u.schema.toolbar || {
|
|
3470
3240
|
type: "response-toolbar",
|
|
3471
3241
|
buttons: []
|
|
3472
|
-
},
|
|
3242
|
+
}, E.value = he(D.value);
|
|
3473
3243
|
}, {
|
|
3474
3244
|
deep: !0
|
|
3475
3245
|
});
|
|
3476
|
-
const
|
|
3477
|
-
function T(l, a,
|
|
3478
|
-
|
|
3246
|
+
const b = F(() => [...E.value.items]);
|
|
3247
|
+
function T(l, a, d, i) {
|
|
3248
|
+
u && u.setupContext && u.setupContext.emit("selectionChange", l, a, d, i);
|
|
3479
3249
|
}
|
|
3480
|
-
return e.expose(
|
|
3250
|
+
return e.expose(v.value), () => h("div", {
|
|
3481
3251
|
ref: t
|
|
3482
|
-
}, [
|
|
3252
|
+
}, [h("nav", {
|
|
3483
3253
|
class: "f-page-header-base"
|
|
3484
|
-
}, [
|
|
3254
|
+
}, [h("div", {
|
|
3485
3255
|
class: "f-title"
|
|
3486
|
-
}, [
|
|
3487
|
-
default: () => [
|
|
3256
|
+
}, [h(be, null, {
|
|
3257
|
+
default: () => [h("span", {
|
|
3488
3258
|
class: "f-title-icon f-text-orna-manage"
|
|
3489
|
-
}, [
|
|
3259
|
+
}, [h("i", {
|
|
3490
3260
|
class: n.icon
|
|
3491
3261
|
}, null)])]
|
|
3492
|
-
}),
|
|
3493
|
-
default: () => [
|
|
3262
|
+
}), h(be, null, {
|
|
3263
|
+
default: () => [h("h4", {
|
|
3494
3264
|
class: "f-title-text"
|
|
3495
3265
|
}, [n.title])]
|
|
3496
|
-
})]),
|
|
3497
|
-
class: "col-
|
|
3498
|
-
modelValue:
|
|
3499
|
-
"onUpdate:modelValue": (l) =>
|
|
3266
|
+
})]), h(xe, {
|
|
3267
|
+
class: "col-6 text-right",
|
|
3268
|
+
modelValue: D.value,
|
|
3269
|
+
"onUpdate:modelValue": (l) => D.value = l,
|
|
3500
3270
|
canAdd: !0,
|
|
3501
3271
|
childType: "response-toolbar-item",
|
|
3502
3272
|
childLabel: "按钮",
|
|
3503
3273
|
contentKey: "buttons",
|
|
3504
|
-
id:
|
|
3274
|
+
id: D.value.id,
|
|
3505
3275
|
componentId: n.componentId,
|
|
3506
3276
|
onSelectionChange: T
|
|
3507
3277
|
}, {
|
|
3508
|
-
default: () => [
|
|
3509
|
-
|
|
3278
|
+
default: () => [h(Ae, {
|
|
3279
|
+
customClass: "w-100",
|
|
3280
|
+
items: b.value,
|
|
3510
3281
|
componentId: n.componentId
|
|
3511
3282
|
}, null)]
|
|
3512
3283
|
})])]);
|
|
3513
3284
|
}
|
|
3514
|
-
}),
|
|
3285
|
+
}), cn = {
|
|
3515
3286
|
install(n) {
|
|
3516
3287
|
n.component(ne.name, ne);
|
|
3517
3288
|
},
|
|
3518
|
-
register(n, e, t,
|
|
3289
|
+
register(n, e, t, r) {
|
|
3519
3290
|
n["page-header"] = ne, e["page-header"] = fe;
|
|
3520
3291
|
},
|
|
3521
3292
|
registerDesigner(n, e, t) {
|
|
3522
|
-
n["page-header"] =
|
|
3293
|
+
n["page-header"] = en, e["page-header"] = fe;
|
|
3523
3294
|
}
|
|
3524
3295
|
};
|
|
3525
3296
|
export {
|
|
3526
3297
|
ne as PageHeader,
|
|
3527
|
-
|
|
3298
|
+
cn as default,
|
|
3528
3299
|
st as pageHeaderDesignerProps,
|
|
3529
3300
|
le as pageHeaderProps,
|
|
3530
3301
|
fe as propsResolver
|