@farris/ui-vue 1.3.0 → 1.3.1
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 +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
7
|
-
import { getCustomClass as Y, withInstall as
|
|
8
|
-
import { useDesignerInnerComponent as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const { properties: e, title: t, ignore: s } = n,
|
|
12
|
-
return (!
|
|
1
|
+
var je = Object.defineProperty;
|
|
2
|
+
var $e = (n, e, t) => e in n ? je(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var R = (n, e, t) => $e(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as U, ref as S, computed as N, watch as q, createVNode as g, createTextVNode as J, getCurrentInstance as be, onMounted as H, onUnmounted as ye, inject as V, provide as _e, onBeforeUnmount as Ne, withModifiers as Fe } from "vue";
|
|
5
|
+
import { isPlainObject as ue, cloneDeep as ve } from "lodash-es";
|
|
6
|
+
import Le from "../response-toolbar/index.esm.js";
|
|
7
|
+
import { getCustomClass as Y, withInstall as Ve } from "../common/index.esm.js";
|
|
8
|
+
import { useDesignerInnerComponent as Ce } from "../designer-canvas/index.esm.js";
|
|
9
|
+
const se = {}, we = {};
|
|
10
|
+
function re(n) {
|
|
11
|
+
const { properties: e, title: t, ignore: s } = n, i = s && Array.isArray(s), p = Object.keys(e).reduce((u, y) => ((!i || !s.find((w) => w == y)) && (u[y] = e[y].type === "object" && e[y].properties ? re(e[y]) : ve(e[y].default)), u), {});
|
|
12
|
+
return t && (!i || !s.find((u) => u == "id")) && (p.id = `${t}-${Date.now()}`), p;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const s =
|
|
14
|
+
function Q(n, e = {}, t) {
|
|
15
|
+
const s = se[n];
|
|
16
16
|
if (s) {
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
return
|
|
17
|
+
let i = re(s);
|
|
18
|
+
const p = we[n];
|
|
19
|
+
return i = p ? p({ getSchemaByType: Q }, i, e, t) : i, i;
|
|
20
20
|
}
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const t =
|
|
25
|
-
return Object.keys(n).reduce((s,
|
|
23
|
+
function Ue(n, e) {
|
|
24
|
+
const t = re(e);
|
|
25
|
+
return Object.keys(n).reduce((s, i) => (s[i] && ue(s[i]) && ue(n[i]) ? Object.assign(s[i], n[i]) : s[i] = n[i], s), t), t;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return Object.keys(n).filter((s) => n[s] != null).reduce((s,
|
|
29
|
-
if (e.has(
|
|
30
|
-
const
|
|
31
|
-
if (typeof
|
|
32
|
-
s[
|
|
27
|
+
function We(n, e) {
|
|
28
|
+
return Object.keys(n).filter((s) => n[s] != null).reduce((s, i) => {
|
|
29
|
+
if (e.has(i)) {
|
|
30
|
+
const p = e.get(i);
|
|
31
|
+
if (typeof p == "string")
|
|
32
|
+
s[p] = n[i];
|
|
33
33
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(s,
|
|
34
|
+
const u = p(i, n[i], n);
|
|
35
|
+
Object.assign(s, u);
|
|
36
36
|
}
|
|
37
37
|
} else
|
|
38
|
-
s[
|
|
38
|
+
s[i] = n[i];
|
|
39
39
|
return s;
|
|
40
40
|
}, {});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const s =
|
|
44
|
-
return
|
|
42
|
+
function qe(n, e, t = /* @__PURE__ */ new Map()) {
|
|
43
|
+
const s = Ue(n, e);
|
|
44
|
+
return We(s, t);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
function e(
|
|
48
|
-
if (typeof
|
|
49
|
-
return
|
|
50
|
-
if (typeof
|
|
51
|
-
const f = Object.keys(
|
|
46
|
+
function He(n = {}) {
|
|
47
|
+
function e(h, b, l, c) {
|
|
48
|
+
if (typeof l == "number")
|
|
49
|
+
return c[h].length === l;
|
|
50
|
+
if (typeof l == "object") {
|
|
51
|
+
const f = Object.keys(l)[0], v = l[f];
|
|
52
52
|
if (f === "not")
|
|
53
|
-
return Number(
|
|
53
|
+
return Number(c[h].length) !== Number(v);
|
|
54
54
|
if (f === "moreThan")
|
|
55
|
-
return Number(
|
|
55
|
+
return Number(c[h].length) >= Number(v);
|
|
56
56
|
if (f === "lessThan")
|
|
57
|
-
return Number(
|
|
57
|
+
return Number(c[h].length) <= Number(v);
|
|
58
58
|
}
|
|
59
59
|
return !1;
|
|
60
60
|
}
|
|
61
|
-
function t(
|
|
62
|
-
return
|
|
61
|
+
function t(h, b, l, c) {
|
|
62
|
+
return c[h] && c[h].propertyValue && String(c[h].propertyValue.value) === String(l);
|
|
63
63
|
}
|
|
64
64
|
const s = /* @__PURE__ */ new Map([
|
|
65
65
|
["length", e],
|
|
66
66
|
["getProperty", t]
|
|
67
67
|
]);
|
|
68
|
-
Object.keys(n).reduce((
|
|
69
|
-
function
|
|
70
|
-
const
|
|
71
|
-
return typeof
|
|
72
|
-
if (
|
|
73
|
-
return { target:
|
|
74
|
-
const f =
|
|
75
|
-
return { target:
|
|
68
|
+
Object.keys(n).reduce((h, b) => (h.set(b, n[b]), h), s);
|
|
69
|
+
function i(h, b) {
|
|
70
|
+
const l = h;
|
|
71
|
+
return typeof b == "number" ? [{ target: l, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: l, operator: "getProperty", param: h, value: !!b }] : typeof b == "object" ? Object.keys(b).map((c) => {
|
|
72
|
+
if (c === "length")
|
|
73
|
+
return { target: l, operator: "length", param: null, value: b[c] };
|
|
74
|
+
const f = c, v = b[c];
|
|
75
|
+
return { target: l, operator: "getProperty", param: f, value: v };
|
|
76
76
|
}) : [];
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return Object.keys(
|
|
80
|
-
const f = c
|
|
81
|
-
return
|
|
78
|
+
function p(h) {
|
|
79
|
+
return Object.keys(h).reduce((l, c) => {
|
|
80
|
+
const f = i(c, h[c]);
|
|
81
|
+
return l.push(...f), l;
|
|
82
82
|
}, []);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
if (s.has(
|
|
86
|
-
const
|
|
87
|
-
return
|
|
84
|
+
function u(h, b) {
|
|
85
|
+
if (s.has(h.operator)) {
|
|
86
|
+
const l = s.get(h.operator);
|
|
87
|
+
return l && l(h.target, h.param, h.value, b) || !1;
|
|
88
88
|
}
|
|
89
89
|
return !1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function y(h, b) {
|
|
92
|
+
return p(h).reduce((f, v) => f && u(v, b), !0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
return
|
|
94
|
+
function w(h, b) {
|
|
95
|
+
const l = Object.keys(h), c = l.includes("allOf"), f = l.includes("anyOf"), v = c || f, $ = (v ? h[v ? c ? "allOf" : "anyOf" : "allOf"] : [h]).map((T) => y(T, b));
|
|
96
|
+
return c ? !$.includes(!1) : $.includes(!0);
|
|
97
97
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
98
|
+
return { parseValueSchema: w };
|
|
99
99
|
}
|
|
100
100
|
const K = {
|
|
101
101
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
@@ -136,37 +136,44 @@ const K = {
|
|
|
136
136
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
137
137
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
138
138
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
function
|
|
142
|
-
return
|
|
143
|
-
const
|
|
144
|
-
return Object.assign(
|
|
139
|
+
}, Pe = {}, ze = {};
|
|
140
|
+
He();
|
|
141
|
+
function ie(n, e, t = /* @__PURE__ */ new Map(), s = (u, y, w) => y, i = {}, p = (u) => u) {
|
|
142
|
+
return se[e.title] = e, we[e.title] = s, Pe[e.title] = i, ze[e.title] = p, (u = {}) => {
|
|
143
|
+
const y = qe(u, e, t), w = Object.keys(n).reduce((h, b) => (h[b] = n[b].default, h), {});
|
|
144
|
+
return Object.assign(w, y);
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function De(n, e) {
|
|
148
148
|
return { customClass: e.class, customStyle: e.style };
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
150
|
+
function Ge(n, e) {
|
|
151
|
+
const t = [];
|
|
152
|
+
return e == null || e.buttons.map((s) => {
|
|
153
|
+
const i = {};
|
|
154
|
+
Object.keys(s).map((p) => {
|
|
155
|
+
var u;
|
|
156
|
+
p == "appearance" ? i.class = ((u = s[p]) == null ? void 0 : u.class) || "" : i[p] = s[p];
|
|
157
|
+
}), t.push(i);
|
|
158
|
+
}), { buttons: t };
|
|
152
159
|
}
|
|
153
|
-
function
|
|
160
|
+
function Je() {
|
|
154
161
|
function n(e, t) {
|
|
155
|
-
var
|
|
156
|
-
const s = (
|
|
162
|
+
var y;
|
|
163
|
+
const s = (y = e.toolbar) == null ? void 0 : y.buttons;
|
|
157
164
|
if (!s || s.length < 1)
|
|
158
165
|
return null;
|
|
159
|
-
const [
|
|
160
|
-
return
|
|
166
|
+
const [i, p] = t.payloads, u = s.find((w) => w.id === p);
|
|
167
|
+
return u ? u.onClick || u.click : null;
|
|
161
168
|
}
|
|
162
169
|
return {
|
|
163
170
|
resolve: n
|
|
164
171
|
};
|
|
165
172
|
}
|
|
166
|
-
const
|
|
167
|
-
["appearance",
|
|
168
|
-
["toolbar",
|
|
169
|
-
]),
|
|
173
|
+
const Qe = /* @__PURE__ */ new Map([
|
|
174
|
+
["appearance", De],
|
|
175
|
+
["toolbar", Ge]
|
|
176
|
+
]), 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 = {
|
|
170
177
|
id: {
|
|
171
178
|
description: "The unique identifier for a Page Header",
|
|
172
179
|
type: "string"
|
|
@@ -274,18 +281,18 @@ const Ye = /* @__PURE__ */ new Map([
|
|
|
274
281
|
type: "boolean",
|
|
275
282
|
default: !1
|
|
276
283
|
}
|
|
277
|
-
},
|
|
278
|
-
$schema:
|
|
279
|
-
$id:
|
|
280
|
-
title:
|
|
281
|
-
description:
|
|
282
|
-
type:
|
|
283
|
-
properties:
|
|
284
|
+
}, nt = {
|
|
285
|
+
$schema: Xe,
|
|
286
|
+
$id: Ye,
|
|
287
|
+
title: Ze,
|
|
288
|
+
description: Ke,
|
|
289
|
+
type: et,
|
|
290
|
+
properties: tt
|
|
284
291
|
};
|
|
285
|
-
function
|
|
292
|
+
function ot(n, e, t) {
|
|
286
293
|
return e.title = "标题", e;
|
|
287
294
|
}
|
|
288
|
-
const
|
|
295
|
+
const ae = {
|
|
289
296
|
/** 组件自定义样式 */
|
|
290
297
|
customClass: { type: String, default: "" },
|
|
291
298
|
/** 是否显示图标 */
|
|
@@ -314,217 +321,208 @@ const pe = {
|
|
|
314
321
|
prePaginationDisabled: { type: Boolean, default: !0 },
|
|
315
322
|
/** 向后翻页是否禁用 */
|
|
316
323
|
nextPaginationDisabled: { type: Boolean, default: !1 }
|
|
317
|
-
},
|
|
324
|
+
}, st = Object.assign({}, ae, {
|
|
318
325
|
componentId: { type: String, default: "" }
|
|
319
|
-
}),
|
|
326
|
+
}), pe = ie(ae, nt, Qe, ot), rt = Je(), ne = /* @__PURE__ */ U({
|
|
320
327
|
name: "FPageHeader",
|
|
321
|
-
props:
|
|
328
|
+
props: ae,
|
|
322
329
|
emits: ["Click", "PrePaginationClick", "NextPaginationClick"],
|
|
323
330
|
setup(n, e) {
|
|
324
|
-
const t =
|
|
325
|
-
e.emit("Click",
|
|
331
|
+
const t = S(n.buttons), s = (T, B) => {
|
|
332
|
+
e.emit("Click", T, B);
|
|
326
333
|
};
|
|
327
|
-
function
|
|
328
|
-
|
|
334
|
+
function i(T, B) {
|
|
335
|
+
T && B && B.split(" ").reduce((x, C) => (x[C] = !0, x), T);
|
|
329
336
|
}
|
|
330
|
-
const
|
|
331
|
-
const
|
|
337
|
+
const p = N(() => {
|
|
338
|
+
const T = {
|
|
332
339
|
"f-page-header": !0
|
|
333
340
|
};
|
|
334
|
-
return
|
|
335
|
-
}),
|
|
336
|
-
const
|
|
341
|
+
return i(T, n.customClass), T;
|
|
342
|
+
}), u = N(() => {
|
|
343
|
+
const T = {
|
|
337
344
|
"f-title-icon": !0
|
|
338
345
|
};
|
|
339
|
-
return
|
|
340
|
-
}),
|
|
341
|
-
const
|
|
346
|
+
return i(T, n.iconClass), T;
|
|
347
|
+
}), y = N(() => {
|
|
348
|
+
const T = {
|
|
342
349
|
"f-icon": !0
|
|
343
350
|
};
|
|
344
|
-
return
|
|
345
|
-
}),
|
|
346
|
-
const
|
|
351
|
+
return i(T, n.icon), T;
|
|
352
|
+
}), w = N(() => {
|
|
353
|
+
const T = {
|
|
347
354
|
"f-title": !0
|
|
348
355
|
};
|
|
349
|
-
return
|
|
350
|
-
}),
|
|
351
|
-
const
|
|
356
|
+
return i(T, n.titleContentClass), T;
|
|
357
|
+
}), h = N(() => {
|
|
358
|
+
const T = {
|
|
352
359
|
"f-content": !0
|
|
353
360
|
};
|
|
354
|
-
return
|
|
355
|
-
}),
|
|
356
|
-
const
|
|
361
|
+
return i(T, n.contentClass), T;
|
|
362
|
+
}), b = N(() => {
|
|
363
|
+
const T = {
|
|
357
364
|
"f-content": !0
|
|
358
365
|
};
|
|
359
|
-
return
|
|
360
|
-
}),
|
|
366
|
+
return i(T, n.downContentClass), T;
|
|
367
|
+
}), l = N(() => ({
|
|
361
368
|
"f-icon f-icon-arrow-w": !0,
|
|
362
369
|
"f-state-disabled": n.prePaginationDisabled
|
|
363
|
-
})),
|
|
370
|
+
})), c = N(() => ({
|
|
364
371
|
"f-icon f-icon-arrow-e": !0,
|
|
365
372
|
"f-state-disabled": n.nextPaginationDisabled
|
|
366
373
|
}));
|
|
367
|
-
function f(
|
|
368
|
-
n.prePaginationDisabled || e.emit("PrePaginationClick",
|
|
374
|
+
function f(T) {
|
|
375
|
+
n.prePaginationDisabled || e.emit("PrePaginationClick", T);
|
|
369
376
|
}
|
|
370
|
-
function
|
|
371
|
-
n.nextPaginationDisabled || e.emit("NextPaginationClick",
|
|
377
|
+
function v(T) {
|
|
378
|
+
n.nextPaginationDisabled || e.emit("NextPaginationClick", T);
|
|
372
379
|
}
|
|
373
|
-
function
|
|
374
|
-
return e.slots.titleContent ?
|
|
375
|
-
class:
|
|
376
|
-
}, [
|
|
380
|
+
function k() {
|
|
381
|
+
return e.slots.titleContent ? g("div", {
|
|
382
|
+
class: w.value
|
|
383
|
+
}, [J(" "), e.slots.titleContent()]) : g("div", {
|
|
377
384
|
class: "f-title"
|
|
378
|
-
}, [n.showIcon && n.icon ?
|
|
379
|
-
class:
|
|
380
|
-
}, [
|
|
381
|
-
class:
|
|
382
|
-
}, null)]) : "",
|
|
385
|
+
}, [n.showIcon && n.icon ? g("span", {
|
|
386
|
+
class: u.value
|
|
387
|
+
}, [g("i", {
|
|
388
|
+
class: y.value
|
|
389
|
+
}, null)]) : "", g("h4", {
|
|
383
390
|
class: "f-title-text"
|
|
384
|
-
}, [n.title]), n.subTitle ?
|
|
391
|
+
}, [n.title]), n.subTitle ? g("h5", {
|
|
385
392
|
class: "f-title-subtitle"
|
|
386
|
-
}, [n.subTitle]) : "", n.showPagination ?
|
|
393
|
+
}, [n.subTitle]) : "", n.showPagination ? g("div", {
|
|
387
394
|
class: "f-title-pagination"
|
|
388
|
-
}, [
|
|
389
|
-
class:
|
|
395
|
+
}, [g("span", {
|
|
396
|
+
class: l.value,
|
|
390
397
|
onClick: f
|
|
391
|
-
}, null),
|
|
392
|
-
class:
|
|
393
|
-
onClick:
|
|
398
|
+
}, null), g("span", {
|
|
399
|
+
class: c.value,
|
|
400
|
+
onClick: v
|
|
394
401
|
}, null)]) : ""]);
|
|
395
402
|
}
|
|
396
|
-
function
|
|
397
|
-
return e.slots.content ?
|
|
398
|
-
class:
|
|
399
|
-
}, [
|
|
403
|
+
function A() {
|
|
404
|
+
return e.slots.content ? g("div", {
|
|
405
|
+
class: h.value
|
|
406
|
+
}, [J(" "), e.slots.content()]) : "";
|
|
400
407
|
}
|
|
401
|
-
function
|
|
408
|
+
function $() {
|
|
402
409
|
if (n.buttons && n.buttons.length > 0)
|
|
403
|
-
return
|
|
410
|
+
return g(Le, {
|
|
404
411
|
customClass: n.buttonClass,
|
|
405
412
|
items: t.value,
|
|
406
413
|
onClick: s
|
|
407
414
|
}, null);
|
|
408
415
|
}
|
|
409
|
-
function
|
|
410
|
-
return e.slots.downContent ?
|
|
411
|
-
class:
|
|
412
|
-
}, [
|
|
416
|
+
function _() {
|
|
417
|
+
return e.slots.downContent ? g("div", {
|
|
418
|
+
class: b.value
|
|
419
|
+
}, [J(" "), e.slots.downContent()]) : "";
|
|
413
420
|
}
|
|
414
|
-
return
|
|
415
|
-
t.value =
|
|
421
|
+
return q(() => n.buttons, (T) => {
|
|
422
|
+
t.value = T;
|
|
416
423
|
}, {
|
|
417
424
|
deep: !0
|
|
418
|
-
}), () =>
|
|
419
|
-
class:
|
|
420
|
-
}, [
|
|
425
|
+
}), () => g("div", {
|
|
426
|
+
class: p.value
|
|
427
|
+
}, [g("nav", {
|
|
421
428
|
class: "f-page-header-base"
|
|
422
|
-
}, [
|
|
429
|
+
}, [k(), A(), $()]), _()]);
|
|
423
430
|
}
|
|
424
431
|
});
|
|
425
|
-
function
|
|
426
|
-
var
|
|
432
|
+
function it(n, e, t) {
|
|
433
|
+
var B;
|
|
427
434
|
function s() {
|
|
428
435
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
429
436
|
}
|
|
430
437
|
s();
|
|
431
|
-
const
|
|
432
|
-
function
|
|
438
|
+
const i = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", u = S();
|
|
439
|
+
function y() {
|
|
433
440
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
434
441
|
}
|
|
435
|
-
function
|
|
442
|
+
function w() {
|
|
436
443
|
return !1;
|
|
437
444
|
}
|
|
438
|
-
function
|
|
445
|
+
function h() {
|
|
439
446
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
440
447
|
}
|
|
441
|
-
function
|
|
448
|
+
function b() {
|
|
442
449
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
443
450
|
}
|
|
444
|
-
function
|
|
445
|
-
if (!
|
|
451
|
+
function l(P) {
|
|
452
|
+
if (!P || !P.value)
|
|
446
453
|
return null;
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
449
|
-
const
|
|
450
|
-
return
|
|
454
|
+
if (P.value.schema && P.value.schema.type === "component")
|
|
455
|
+
return P.value;
|
|
456
|
+
const x = S(P == null ? void 0 : P.value.parent), C = l(x);
|
|
457
|
+
return C || null;
|
|
451
458
|
}
|
|
452
|
-
function
|
|
453
|
-
const { componentInstance:
|
|
454
|
-
return !
|
|
459
|
+
function c(P = e) {
|
|
460
|
+
const { componentInstance: x, designerItemElementRef: C } = P;
|
|
461
|
+
return !x || !x.value ? null : x.value.canMove ? C : c(P.parent);
|
|
455
462
|
}
|
|
456
|
-
function f(
|
|
457
|
-
return !!t && t.canAccepts(
|
|
463
|
+
function f(P) {
|
|
464
|
+
return !!t && t.canAccepts(P);
|
|
458
465
|
}
|
|
459
|
-
function
|
|
466
|
+
function v() {
|
|
460
467
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
461
468
|
}
|
|
462
|
-
function
|
|
463
|
-
}
|
|
464
|
-
function w(v, m) {
|
|
465
|
-
m && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(m);
|
|
469
|
+
function k() {
|
|
466
470
|
}
|
|
467
|
-
function
|
|
468
|
-
|
|
469
|
-
let k = U(x, v, m);
|
|
470
|
-
t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(v, k));
|
|
471
|
-
const u = x.toLowerCase().replace("-", "_");
|
|
472
|
-
return k && !k.id && k.type === x && (k.id = `${u}_${Math.random().toString().slice(2, 6)}`), k;
|
|
471
|
+
function A(P, x) {
|
|
472
|
+
x && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(x);
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
const
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
return r && !r.id && r.type === x && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
|
|
474
|
+
function $(P, x) {
|
|
475
|
+
const { componentType: C } = P;
|
|
476
|
+
let I = Q(C, P, x);
|
|
477
|
+
t && t.onResolveNewComponentSchema && (I = t.onResolveNewComponentSchema(P, I));
|
|
478
|
+
const O = C.toLowerCase().replace("-", "_");
|
|
479
|
+
return I && !I.id && I.type === C && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
|
|
481
480
|
}
|
|
482
|
-
function
|
|
481
|
+
function _(P) {
|
|
483
482
|
}
|
|
484
|
-
function
|
|
483
|
+
function T(...P) {
|
|
485
484
|
if (t && t.getPropsConfig)
|
|
486
|
-
return t.getPropsConfig(...
|
|
485
|
+
return t.getPropsConfig(...P);
|
|
487
486
|
}
|
|
488
|
-
return
|
|
489
|
-
canMove:
|
|
490
|
-
canSelectParent:
|
|
491
|
-
canDelete:
|
|
492
|
-
canNested: !
|
|
487
|
+
return u.value = {
|
|
488
|
+
canMove: y(),
|
|
489
|
+
canSelectParent: w(),
|
|
490
|
+
canDelete: h(),
|
|
491
|
+
canNested: !b(),
|
|
493
492
|
contents: e == null ? void 0 : e.schema.contents,
|
|
494
493
|
elementRef: n,
|
|
495
|
-
parent: (
|
|
494
|
+
parent: (B = e == null ? void 0 : e.parent) == null ? void 0 : B.componentInstance,
|
|
496
495
|
schema: e == null ? void 0 : e.schema,
|
|
497
|
-
styles:
|
|
498
|
-
designerClass:
|
|
496
|
+
styles: i,
|
|
497
|
+
designerClass: p,
|
|
499
498
|
canAccepts: f,
|
|
500
|
-
getBelongedComponentInstance:
|
|
501
|
-
getDraggableDesignItemElement:
|
|
502
|
-
getDraggingDisplayText:
|
|
503
|
-
getPropConfig:
|
|
504
|
-
getDragScopeElement:
|
|
505
|
-
onAcceptMovedChildElement:
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
addNewChildComponentSchema: j,
|
|
499
|
+
getBelongedComponentInstance: l,
|
|
500
|
+
getDraggableDesignItemElement: c,
|
|
501
|
+
getDraggingDisplayText: v,
|
|
502
|
+
getPropConfig: T,
|
|
503
|
+
getDragScopeElement: k,
|
|
504
|
+
onAcceptMovedChildElement: A,
|
|
505
|
+
onChildElementMovedOut: _,
|
|
506
|
+
addNewChildComponentSchema: $,
|
|
509
507
|
updateDragAndDropRules: s,
|
|
510
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
511
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
512
|
-
},
|
|
508
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || S(!1),
|
|
509
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || S(!1)
|
|
510
|
+
}, u;
|
|
513
511
|
}
|
|
514
512
|
class ee {
|
|
515
513
|
constructor(e, t) {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
514
|
+
R(this, "componentId");
|
|
515
|
+
R(this, "viewModelId");
|
|
516
|
+
R(this, "eventsEditorUtils");
|
|
517
|
+
R(this, "formSchemaUtils");
|
|
518
|
+
R(this, "formMetadataConverter");
|
|
519
|
+
R(this, "designViewModelUtils");
|
|
520
|
+
R(this, "designViewModelField");
|
|
521
|
+
R(this, "controlCreatorUtils");
|
|
522
|
+
R(this, "designerHostService");
|
|
523
|
+
R(this, "schemaService", null);
|
|
524
|
+
R(this, "metadataService", null);
|
|
525
|
+
R(this, "propertyConfig", {
|
|
528
526
|
type: "object",
|
|
529
527
|
categories: {}
|
|
530
528
|
});
|
|
@@ -540,7 +538,7 @@ class ee {
|
|
|
540
538
|
if (t) {
|
|
541
539
|
if (!this.designViewModelField) {
|
|
542
540
|
const s = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
543
|
-
this.designViewModelField = s.fields.find((
|
|
541
|
+
this.designViewModelField = s.fields.find((i) => i.id === t);
|
|
544
542
|
}
|
|
545
543
|
e.updateOn = this.designViewModelField.updateOn;
|
|
546
544
|
}
|
|
@@ -602,11 +600,11 @@ class ee {
|
|
|
602
600
|
const s = t && t.parent && t.parent.schema;
|
|
603
601
|
if (!s)
|
|
604
602
|
return;
|
|
605
|
-
const
|
|
606
|
-
s.contents.splice(
|
|
603
|
+
const i = s.contents.findIndex((u) => u.id === e), p = ve(s.contents[i]);
|
|
604
|
+
s.contents.splice(i, 1), s.contents.splice(i, 0, p);
|
|
607
605
|
}
|
|
608
606
|
}
|
|
609
|
-
class
|
|
607
|
+
class at extends ee {
|
|
610
608
|
constructor(e, t) {
|
|
611
609
|
super(e, t);
|
|
612
610
|
}
|
|
@@ -681,7 +679,7 @@ class lt extends ee {
|
|
|
681
679
|
label: "click",
|
|
682
680
|
name: "点击事件"
|
|
683
681
|
}
|
|
684
|
-
], s = this,
|
|
682
|
+
], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t);
|
|
685
683
|
this.propertyConfig.categories.eventsEditor = {
|
|
686
684
|
title: "事件",
|
|
687
685
|
hideTitle: !0,
|
|
@@ -689,7 +687,7 @@ class lt extends ee {
|
|
|
689
687
|
"data-grid-component-viewmodel": {
|
|
690
688
|
type: "events-editor",
|
|
691
689
|
editor: {
|
|
692
|
-
initialData:
|
|
690
|
+
initialData: i
|
|
693
691
|
}
|
|
694
692
|
}
|
|
695
693
|
},
|
|
@@ -697,65 +695,65 @@ class lt extends ee {
|
|
|
697
695
|
refreshPanelAfterChanged: !0,
|
|
698
696
|
tabId: "commands",
|
|
699
697
|
tabName: "交互",
|
|
700
|
-
setPropertyRelates(
|
|
701
|
-
const
|
|
702
|
-
delete e[s.viewModelId],
|
|
698
|
+
setPropertyRelates(p, u) {
|
|
699
|
+
const y = p.propertyValue;
|
|
700
|
+
delete e[s.viewModelId], y && (y.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, y.events, y));
|
|
703
701
|
}
|
|
704
702
|
};
|
|
705
703
|
}
|
|
706
704
|
}
|
|
707
|
-
function
|
|
708
|
-
function t(
|
|
705
|
+
function lt(n, e) {
|
|
706
|
+
function t(y) {
|
|
709
707
|
return !1;
|
|
710
708
|
}
|
|
711
709
|
function s() {
|
|
712
710
|
return !1;
|
|
713
711
|
}
|
|
714
|
-
function
|
|
712
|
+
function i() {
|
|
715
713
|
return !1;
|
|
716
714
|
}
|
|
717
|
-
function
|
|
715
|
+
function p() {
|
|
718
716
|
return !0;
|
|
719
717
|
}
|
|
720
|
-
function
|
|
721
|
-
return new
|
|
718
|
+
function u(y) {
|
|
719
|
+
return new at(y, e).getPropertyConfig(n);
|
|
722
720
|
}
|
|
723
721
|
return {
|
|
724
722
|
canAccepts: t,
|
|
725
|
-
hideNestedPaddingInDesginerView:
|
|
726
|
-
getPropsConfig:
|
|
723
|
+
hideNestedPaddingInDesginerView: p,
|
|
724
|
+
getPropsConfig: u,
|
|
727
725
|
checkCanDeleteComponent: s,
|
|
728
|
-
checkCanMoveComponent:
|
|
726
|
+
checkCanMoveComponent: i
|
|
729
727
|
};
|
|
730
728
|
}
|
|
731
|
-
class
|
|
729
|
+
class Te {
|
|
732
730
|
constructor(e) {
|
|
733
731
|
/** 工具栏项标识 */
|
|
734
|
-
|
|
732
|
+
R(this, "id", "");
|
|
735
733
|
/** 工具栏项自定义样式 */
|
|
736
|
-
|
|
734
|
+
R(this, "class", "btn-secondary");
|
|
737
735
|
/** 图标 */
|
|
738
|
-
|
|
736
|
+
R(this, "icon", "");
|
|
739
737
|
/** 所属分组 */
|
|
740
|
-
|
|
738
|
+
R(this, "groupId", "");
|
|
741
739
|
/** 收藏顺序 */
|
|
742
|
-
|
|
740
|
+
R(this, "order", -1);
|
|
743
741
|
/** 是否作为下拉菜单的顶层按钮 */
|
|
744
|
-
|
|
742
|
+
R(this, "asDropDownTop", !1);
|
|
745
743
|
/** 文本 */
|
|
746
|
-
|
|
744
|
+
R(this, "text", "");
|
|
747
745
|
/** 是否可见 */
|
|
748
|
-
|
|
749
|
-
|
|
746
|
+
R(this, "visible", !0);
|
|
747
|
+
R(this, "responsed", !1);
|
|
750
748
|
/** 是否启用提示消息 */
|
|
751
|
-
|
|
749
|
+
R(this, "tipsEnable", !1);
|
|
752
750
|
/** 提示消息内容 */
|
|
753
|
-
|
|
751
|
+
R(this, "tipsText", "");
|
|
754
752
|
/** 记录宽度 */
|
|
755
|
-
|
|
756
|
-
|
|
753
|
+
R(this, "width", 0);
|
|
754
|
+
R(this, "onClick", () => {
|
|
757
755
|
});
|
|
758
|
-
|
|
756
|
+
R(this, "options");
|
|
759
757
|
this.options = e;
|
|
760
758
|
const t = [
|
|
761
759
|
"id",
|
|
@@ -779,7 +777,7 @@ class je {
|
|
|
779
777
|
}
|
|
780
778
|
/** 是否可用 */
|
|
781
779
|
get enable() {
|
|
782
|
-
return Object.keys(this.options).indexOf("
|
|
780
|
+
return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : N(() => !0);
|
|
783
781
|
}
|
|
784
782
|
/** 设置宽度 */
|
|
785
783
|
setWidth(e) {
|
|
@@ -790,51 +788,51 @@ class je {
|
|
|
790
788
|
return this.visible ? this.width : !1;
|
|
791
789
|
}
|
|
792
790
|
}
|
|
793
|
-
class
|
|
791
|
+
class ct extends Te {
|
|
794
792
|
constructor(e) {
|
|
795
793
|
super(e);
|
|
796
794
|
}
|
|
797
795
|
}
|
|
798
|
-
function
|
|
796
|
+
function Se() {
|
|
799
797
|
function n(e) {
|
|
800
798
|
const t = [];
|
|
801
|
-
return e.reduce((s,
|
|
799
|
+
return e.reduce((s, i) => (i.children && i.children.length > 0 ? s.push(new z(i)) : s.push(new ct(i)), s), t), t;
|
|
802
800
|
}
|
|
803
801
|
return { buildResponseToolbarItems: n };
|
|
804
802
|
}
|
|
805
|
-
const { buildResponseToolbarItems: dt } =
|
|
806
|
-
class
|
|
803
|
+
const { buildResponseToolbarItems: dt } = Se();
|
|
804
|
+
class z extends Te {
|
|
807
805
|
constructor(t) {
|
|
808
806
|
super(t);
|
|
809
|
-
|
|
807
|
+
R(this, "placement", "");
|
|
810
808
|
// 下拉位置
|
|
811
809
|
/** 下拉class */
|
|
812
|
-
|
|
810
|
+
R(this, "dropdownClass", "");
|
|
813
811
|
/** 下拉菜单class */
|
|
814
|
-
|
|
812
|
+
R(this, "menuClass", "");
|
|
815
813
|
/** 是否用分开的下拉按钮 */
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
814
|
+
R(this, "split", !1);
|
|
815
|
+
R(this, "children", []);
|
|
816
|
+
R(this, "expanded", !1);
|
|
819
817
|
const s = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
|
|
820
|
-
Object.keys(t).filter((
|
|
821
|
-
this[
|
|
818
|
+
Object.keys(t).filter((i) => s.indexOf(i) > -1).forEach((i) => {
|
|
819
|
+
this[i] = t[i];
|
|
822
820
|
}), t.children && t.children.length && (this.children = dt(t.children));
|
|
823
821
|
}
|
|
824
822
|
}
|
|
825
|
-
const
|
|
823
|
+
const ut = /* @__PURE__ */ new Map([
|
|
826
824
|
["buttons", "items"],
|
|
827
|
-
["appearance",
|
|
828
|
-
]),
|
|
829
|
-
["appearance",
|
|
825
|
+
["appearance", De]
|
|
826
|
+
]), pt = /* @__PURE__ */ new Map([
|
|
827
|
+
["appearance", ft]
|
|
830
828
|
]);
|
|
831
|
-
function
|
|
829
|
+
function ft(n, e) {
|
|
832
830
|
return { class: e.class, style: e.style };
|
|
833
831
|
}
|
|
834
|
-
function
|
|
832
|
+
function ke(n, e, t) {
|
|
835
833
|
return e;
|
|
836
834
|
}
|
|
837
|
-
const
|
|
835
|
+
const gt = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/response-toolbar.schema.json", ht = "response-toolbar", bt = "A Farris Toolbar Component", yt = "object", vt = {
|
|
838
836
|
id: {
|
|
839
837
|
description: "The unique identifier for a Response Toolbar",
|
|
840
838
|
type: "string"
|
|
@@ -850,9 +848,6 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
|
|
|
850
848
|
properties: {
|
|
851
849
|
class: {
|
|
852
850
|
type: "string"
|
|
853
|
-
},
|
|
854
|
-
style: {
|
|
855
|
-
type: "string"
|
|
856
851
|
}
|
|
857
852
|
},
|
|
858
853
|
default: {}
|
|
@@ -867,19 +862,19 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
|
|
|
867
862
|
type: "array",
|
|
868
863
|
default: []
|
|
869
864
|
}
|
|
870
|
-
},
|
|
865
|
+
}, Ct = [
|
|
871
866
|
"id",
|
|
872
867
|
"type",
|
|
873
868
|
"buttons"
|
|
874
|
-
],
|
|
875
|
-
$schema:
|
|
876
|
-
$id:
|
|
877
|
-
title:
|
|
878
|
-
description:
|
|
879
|
-
type:
|
|
880
|
-
properties:
|
|
881
|
-
required:
|
|
882
|
-
},
|
|
869
|
+
], wt = {
|
|
870
|
+
$schema: gt,
|
|
871
|
+
$id: mt,
|
|
872
|
+
title: ht,
|
|
873
|
+
description: bt,
|
|
874
|
+
type: yt,
|
|
875
|
+
properties: vt,
|
|
876
|
+
required: Ct
|
|
877
|
+
}, Pt = "https://json-schema.org/draft/2020-12/schema", Dt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Tt = "response-toolbar-item", St = "A Farris Toolbar Item Component", kt = "object", Mt = {
|
|
883
878
|
id: {
|
|
884
879
|
description: "The unique identifier for a Response Toolbar",
|
|
885
880
|
type: "string"
|
|
@@ -895,10 +890,7 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
|
|
|
895
890
|
properties: {
|
|
896
891
|
class: {
|
|
897
892
|
type: "string",
|
|
898
|
-
default: "btn-
|
|
899
|
-
},
|
|
900
|
-
style: {
|
|
901
|
-
type: "string"
|
|
893
|
+
default: "btn-secondary"
|
|
902
894
|
}
|
|
903
895
|
},
|
|
904
896
|
default: {}
|
|
@@ -911,31 +903,36 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
|
|
|
911
903
|
text: {
|
|
912
904
|
description: "文本",
|
|
913
905
|
type: "string",
|
|
914
|
-
default: "
|
|
906
|
+
default: "按钮"
|
|
915
907
|
},
|
|
916
908
|
icon: {
|
|
917
909
|
description: "图标",
|
|
918
910
|
type: "string",
|
|
919
911
|
default: ""
|
|
920
912
|
},
|
|
913
|
+
disabled: {
|
|
914
|
+
description: "禁用",
|
|
915
|
+
type: "boolean",
|
|
916
|
+
default: !1
|
|
917
|
+
},
|
|
921
918
|
onClick: {
|
|
922
919
|
description: "点击事件",
|
|
923
920
|
type: "string",
|
|
924
921
|
default: ""
|
|
925
922
|
}
|
|
926
|
-
},
|
|
923
|
+
}, xt = [
|
|
927
924
|
"id",
|
|
928
925
|
"type",
|
|
929
926
|
"text"
|
|
930
|
-
],
|
|
931
|
-
$schema:
|
|
932
|
-
$id:
|
|
933
|
-
title:
|
|
934
|
-
description:
|
|
935
|
-
type:
|
|
927
|
+
], oe = {
|
|
928
|
+
$schema: Pt,
|
|
929
|
+
$id: Dt,
|
|
930
|
+
title: Tt,
|
|
931
|
+
description: St,
|
|
932
|
+
type: kt,
|
|
936
933
|
properties: Mt,
|
|
937
|
-
required:
|
|
938
|
-
},
|
|
934
|
+
required: xt
|
|
935
|
+
}, Et = "response-toolbar-item", Bt = "A Farris Container Component", It = "object", Rt = {
|
|
939
936
|
basic: {
|
|
940
937
|
title: "基本信息",
|
|
941
938
|
description: "Basic Infomation",
|
|
@@ -968,12 +965,12 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
|
|
|
968
965
|
}
|
|
969
966
|
}
|
|
970
967
|
}
|
|
971
|
-
},
|
|
972
|
-
title:
|
|
968
|
+
}, fe = {
|
|
969
|
+
title: Et,
|
|
973
970
|
description: Bt,
|
|
974
|
-
type:
|
|
975
|
-
categories:
|
|
976
|
-
},
|
|
971
|
+
type: It,
|
|
972
|
+
categories: Rt
|
|
973
|
+
}, le = {
|
|
977
974
|
/** 组件自定义样式 */
|
|
978
975
|
customClass: { type: String, default: "" },
|
|
979
976
|
alignment: { Type: String, default: "right" },
|
|
@@ -982,15 +979,15 @@ const ht = "https://json-schema.org/draft/2020-12/schema", bt = "https://farris-
|
|
|
982
979
|
default: []
|
|
983
980
|
}
|
|
984
981
|
};
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
const
|
|
982
|
+
se[oe.title] = oe;
|
|
983
|
+
Pe[fe.title] = fe;
|
|
984
|
+
const At = Object.assign({}, le, {
|
|
988
985
|
componentId: { type: String, default: "" }
|
|
989
|
-
}),
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
986
|
+
}), ce = ie(
|
|
987
|
+
le,
|
|
988
|
+
wt,
|
|
989
|
+
ut,
|
|
990
|
+
ke
|
|
994
991
|
), Me = {
|
|
995
992
|
id: { type: String, default: "" },
|
|
996
993
|
items: { type: Object, default: {} },
|
|
@@ -1000,20 +997,20 @@ const Ot = Object.assign({}, ue, {
|
|
|
1000
997
|
icon: { type: String, default: "" },
|
|
1001
998
|
componentId: { type: String, default: "" },
|
|
1002
999
|
alignment: { Type: String, default: "right" }
|
|
1003
|
-
},
|
|
1000
|
+
}, Ot = ie(
|
|
1004
1001
|
Me,
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1002
|
+
oe,
|
|
1003
|
+
pt,
|
|
1004
|
+
ke
|
|
1008
1005
|
);
|
|
1009
|
-
function
|
|
1006
|
+
function xe() {
|
|
1010
1007
|
function n(t) {
|
|
1011
1008
|
const s = {
|
|
1012
1009
|
"f-icon": !0
|
|
1013
1010
|
};
|
|
1014
1011
|
if (t.icon) {
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1012
|
+
const i = t.icon.trim().split(" ");
|
|
1013
|
+
i && i.length && i.reduce((p, u) => (p[u] = !0, p), s);
|
|
1017
1014
|
}
|
|
1018
1015
|
return s;
|
|
1019
1016
|
}
|
|
@@ -1022,315 +1019,315 @@ function ke() {
|
|
|
1022
1019
|
}
|
|
1023
1020
|
return { iconClass: n, shouldShowIcon: e };
|
|
1024
1021
|
}
|
|
1025
|
-
function
|
|
1026
|
-
function e(
|
|
1027
|
-
const
|
|
1022
|
+
function jt(n) {
|
|
1023
|
+
function e(l) {
|
|
1024
|
+
const c = {
|
|
1028
1025
|
"dropdown-menu": !0
|
|
1029
1026
|
};
|
|
1030
|
-
if (
|
|
1031
|
-
const f =
|
|
1032
|
-
f && f.length && f.reduce((
|
|
1027
|
+
if (l.class) {
|
|
1028
|
+
const f = l.menuClass.split(" ");
|
|
1029
|
+
f && f.length && f.reduce((v, k) => (v[k] = !0, v), c);
|
|
1033
1030
|
}
|
|
1034
|
-
return
|
|
1031
|
+
return c;
|
|
1035
1032
|
}
|
|
1036
|
-
function t(
|
|
1037
|
-
const
|
|
1038
|
-
disabled: !
|
|
1033
|
+
function t(l) {
|
|
1034
|
+
const c = {
|
|
1035
|
+
disabled: !l.enable,
|
|
1039
1036
|
"dropdown-submenu": !0,
|
|
1040
1037
|
"f-rt-dropdown": !0
|
|
1041
|
-
}, f =
|
|
1042
|
-
return f && f.length && f.reduce((
|
|
1038
|
+
}, f = l.dropdownClass.split(" ");
|
|
1039
|
+
return f && f.length && f.reduce((v, k) => (v[k] = !0, v), c), c;
|
|
1043
1040
|
}
|
|
1044
|
-
function s(
|
|
1045
|
-
const
|
|
1046
|
-
disabled: !
|
|
1041
|
+
function s(l) {
|
|
1042
|
+
const c = {
|
|
1043
|
+
disabled: !l.enable,
|
|
1047
1044
|
"dropdown-item": !0,
|
|
1048
1045
|
"f-rt-btn": !0
|
|
1049
|
-
}, f =
|
|
1050
|
-
return f && f.length && f.reduce((
|
|
1051
|
-
}
|
|
1052
|
-
let
|
|
1053
|
-
const
|
|
1054
|
-
function
|
|
1055
|
-
var
|
|
1056
|
-
((
|
|
1057
|
-
const
|
|
1058
|
-
if (
|
|
1059
|
-
const
|
|
1060
|
-
|
|
1046
|
+
}, f = l.class.split(" ");
|
|
1047
|
+
return f && f.length && f.reduce((v, k) => (v[k] = !0, v), c), c;
|
|
1048
|
+
}
|
|
1049
|
+
let i;
|
|
1050
|
+
const p = /* @__PURE__ */ new Map();
|
|
1051
|
+
function u(l, c, f) {
|
|
1052
|
+
var k;
|
|
1053
|
+
((k = l.target) == null ? void 0 : k.id) === c.id && l.stopPropagation();
|
|
1054
|
+
const v = f ? f.id : "__top_item__";
|
|
1055
|
+
if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? p.set(v, c) : p.delete(v)), p.has(v) && p.get(v) !== c) {
|
|
1056
|
+
const A = p.get(v);
|
|
1057
|
+
A && (A.expanded = !1);
|
|
1061
1058
|
}
|
|
1062
1059
|
}
|
|
1063
|
-
function
|
|
1064
|
-
document.body.click(),
|
|
1065
|
-
}
|
|
1066
|
-
function
|
|
1067
|
-
return
|
|
1068
|
-
class: t(
|
|
1069
|
-
id:
|
|
1070
|
-
onClick: (f) =>
|
|
1071
|
-
}, [
|
|
1072
|
-
id:
|
|
1073
|
-
class: s(
|
|
1074
|
-
onMouseover: (f) =>
|
|
1075
|
-
}, [
|
|
1060
|
+
function y(l, c) {
|
|
1061
|
+
document.body.click(), c.enable && c.onClick(l, c.id);
|
|
1062
|
+
}
|
|
1063
|
+
function w(l) {
|
|
1064
|
+
return l.children.map((c) => c.children && c.children.length ? g("li", {
|
|
1065
|
+
class: t(c),
|
|
1066
|
+
id: c.id,
|
|
1067
|
+
onClick: (f) => c.enable && u(f, c, l)
|
|
1068
|
+
}, [g("span", {
|
|
1069
|
+
id: c.id,
|
|
1070
|
+
class: s(c),
|
|
1071
|
+
onMouseover: (f) => c.enable && u(f, c, l)
|
|
1072
|
+
}, [c.text, g("i", {
|
|
1076
1073
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1077
1074
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1078
|
-
}, null)]), c
|
|
1079
|
-
class: s(
|
|
1080
|
-
id:
|
|
1081
|
-
onClick: (f) =>
|
|
1082
|
-
onMouseover: (f) =>
|
|
1083
|
-
}, [n.shouldShowIcon(
|
|
1084
|
-
class: n.iconClass(
|
|
1085
|
-
}, null),
|
|
1086
|
-
}
|
|
1087
|
-
function
|
|
1088
|
-
const
|
|
1089
|
-
display:
|
|
1075
|
+
}, null)]), i(c, c)]) : g("li", {
|
|
1076
|
+
class: s(c),
|
|
1077
|
+
id: c.id,
|
|
1078
|
+
onClick: (f) => y(f, c),
|
|
1079
|
+
onMouseover: (f) => c.enable && u(f, c, l)
|
|
1080
|
+
}, [n.shouldShowIcon(c) && g("i", {
|
|
1081
|
+
class: n.iconClass(c)
|
|
1082
|
+
}, null), c.text]));
|
|
1083
|
+
}
|
|
1084
|
+
function h(l, c, f) {
|
|
1085
|
+
const v = {
|
|
1086
|
+
display: l.expanded ? "block" : "none",
|
|
1090
1087
|
position: "fixed",
|
|
1091
1088
|
maxWidth: "300px",
|
|
1092
1089
|
width: "auto",
|
|
1093
1090
|
minWidth: "120px"
|
|
1094
|
-
},
|
|
1095
|
-
if (
|
|
1091
|
+
}, k = document.getElementsByTagName("body")[0].getClientRects()[0].width, A = c, $ = A == null ? void 0 : A.getClientRects();
|
|
1092
|
+
if (A && $ && $.length) {
|
|
1096
1093
|
const {
|
|
1097
|
-
top:
|
|
1098
|
-
width:
|
|
1099
|
-
left:
|
|
1100
|
-
right:
|
|
1101
|
-
height:
|
|
1102
|
-
} =
|
|
1103
|
-
|
|
1104
|
-
const
|
|
1105
|
-
if (
|
|
1106
|
-
|
|
1107
|
-
const
|
|
1094
|
+
top: _,
|
|
1095
|
+
width: T,
|
|
1096
|
+
left: B,
|
|
1097
|
+
right: P,
|
|
1098
|
+
height: x
|
|
1099
|
+
} = $[0], C = Math.ceil(x + _);
|
|
1100
|
+
v.top = `${C}px`, v.left = `${B}px`;
|
|
1101
|
+
const I = l.id + "_menu", O = c ? c.querySelector("#" + I) : null;
|
|
1102
|
+
if (O) {
|
|
1103
|
+
v.display === "block" && (O.style.display = "block");
|
|
1104
|
+
const d = O.getBoundingClientRect();
|
|
1108
1105
|
if (f) {
|
|
1109
|
-
|
|
1110
|
-
const r = Math.ceil(
|
|
1111
|
-
|
|
1106
|
+
v.top = `${_ - 6}px`;
|
|
1107
|
+
const r = Math.ceil(T + B);
|
|
1108
|
+
v.left = `${r}px`;
|
|
1112
1109
|
}
|
|
1113
|
-
|
|
1110
|
+
k - B - T < d.width && (v.left = `${(f ? B : P) - d.width}px`);
|
|
1114
1111
|
}
|
|
1115
1112
|
}
|
|
1116
|
-
return
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
var
|
|
1120
|
-
const f =
|
|
1121
|
-
return
|
|
1122
|
-
class: e(
|
|
1123
|
-
style:
|
|
1124
|
-
id:
|
|
1125
|
-
}, [
|
|
1113
|
+
return v;
|
|
1114
|
+
}
|
|
1115
|
+
i = function(l, c) {
|
|
1116
|
+
var A, $;
|
|
1117
|
+
const f = be(), v = c ? c.id : l.id, k = ($ = (A = f == null ? void 0 : f.exposed) == null ? void 0 : A.elementRef.value) == null ? void 0 : $.querySelector("#" + v);
|
|
1118
|
+
return g("ul", {
|
|
1119
|
+
class: e(l),
|
|
1120
|
+
style: h(l, k, c),
|
|
1121
|
+
id: l.id + "_menu"
|
|
1122
|
+
}, [w(l)]);
|
|
1126
1123
|
};
|
|
1127
|
-
function
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
}),
|
|
1124
|
+
function b() {
|
|
1125
|
+
p.forEach((l) => {
|
|
1126
|
+
l.expanded = !1;
|
|
1127
|
+
}), p.clear();
|
|
1131
1128
|
}
|
|
1132
1129
|
return {
|
|
1133
|
-
renderDropdownMenu:
|
|
1134
|
-
clearAllDropDownMenu:
|
|
1130
|
+
renderDropdownMenu: i,
|
|
1131
|
+
clearAllDropDownMenu: b
|
|
1135
1132
|
};
|
|
1136
1133
|
}
|
|
1137
|
-
function
|
|
1138
|
-
const t =
|
|
1134
|
+
function $t(n, e) {
|
|
1135
|
+
const t = S(n.alignment), {
|
|
1139
1136
|
renderDropdownMenu: s,
|
|
1140
|
-
clearAllDropDownMenu:
|
|
1141
|
-
} =
|
|
1142
|
-
function
|
|
1143
|
-
const
|
|
1137
|
+
clearAllDropDownMenu: i
|
|
1138
|
+
} = jt(e);
|
|
1139
|
+
function p(b) {
|
|
1140
|
+
const l = {
|
|
1144
1141
|
"btn-group": !0,
|
|
1145
1142
|
"f-rt-dropdown": !0,
|
|
1146
1143
|
"f-btn-ml": t.value === "right",
|
|
1147
1144
|
"f-btn-mr": t.value === "left"
|
|
1148
|
-
},
|
|
1149
|
-
return
|
|
1145
|
+
}, c = b.dropdownClass.split(" ");
|
|
1146
|
+
return c && c.length && c.reduce((f, v) => (f[v] = !0, f), l), l;
|
|
1150
1147
|
}
|
|
1151
|
-
function
|
|
1152
|
-
const
|
|
1148
|
+
function u(b) {
|
|
1149
|
+
const l = {
|
|
1153
1150
|
btn: !0,
|
|
1154
|
-
disabled: !
|
|
1151
|
+
disabled: !b.enable,
|
|
1155
1152
|
"f-rt-btn": !0,
|
|
1156
|
-
"btn-icontext": !!(
|
|
1153
|
+
"btn-icontext": !!(b.icon && b.icon.trim())
|
|
1157
1154
|
};
|
|
1158
|
-
if (
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1155
|
+
if (b.class) {
|
|
1156
|
+
const c = b.class.split(" ");
|
|
1157
|
+
c && c.length && c.reduce((f, v) => (f[v] = !0, f), l);
|
|
1161
1158
|
}
|
|
1162
|
-
return
|
|
1163
|
-
}
|
|
1164
|
-
function
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1167
|
-
document.body.click(),
|
|
1168
|
-
}
|
|
1169
|
-
function
|
|
1170
|
-
return
|
|
1171
|
-
id:
|
|
1172
|
-
class:
|
|
1173
|
-
}, [
|
|
1174
|
-
class:
|
|
1159
|
+
return l;
|
|
1160
|
+
}
|
|
1161
|
+
function y(b, l) {
|
|
1162
|
+
b.stopPropagation();
|
|
1163
|
+
const c = l.expanded;
|
|
1164
|
+
document.body.click(), l.expanded = !c;
|
|
1165
|
+
}
|
|
1166
|
+
function w(b) {
|
|
1167
|
+
return g("div", {
|
|
1168
|
+
id: b.id,
|
|
1169
|
+
class: p(b)
|
|
1170
|
+
}, [g("div", {
|
|
1171
|
+
class: u(b),
|
|
1175
1172
|
style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
|
|
1176
|
-
onClick: (
|
|
1177
|
-
}, [e.shouldShowIcon(
|
|
1178
|
-
class: e.iconClass(
|
|
1179
|
-
}, null),
|
|
1173
|
+
onClick: (l) => b.enable && y(l, b)
|
|
1174
|
+
}, [e.shouldShowIcon(b) && g("i", {
|
|
1175
|
+
class: e.iconClass(b)
|
|
1176
|
+
}, null), g("span", null, [b.text]), g("i", {
|
|
1180
1177
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1181
1178
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1182
|
-
}, null)]), s(
|
|
1179
|
+
}, null)]), s(b)]);
|
|
1183
1180
|
}
|
|
1184
|
-
function
|
|
1185
|
-
|
|
1181
|
+
function h() {
|
|
1182
|
+
i();
|
|
1186
1183
|
}
|
|
1187
1184
|
return {
|
|
1188
|
-
renderToolbarDropdown:
|
|
1189
|
-
clearAllDropDown:
|
|
1185
|
+
renderToolbarDropdown: w,
|
|
1186
|
+
clearAllDropDown: h
|
|
1190
1187
|
};
|
|
1191
1188
|
}
|
|
1192
1189
|
const {
|
|
1193
|
-
buildResponseToolbarItems:
|
|
1194
|
-
} =
|
|
1190
|
+
buildResponseToolbarItems: ge
|
|
1191
|
+
} = Se(), Z = /* @__PURE__ */ U({
|
|
1195
1192
|
name: "FResponseToolbar",
|
|
1196
|
-
props:
|
|
1193
|
+
props: le,
|
|
1197
1194
|
emits: ["click"],
|
|
1198
1195
|
setup(n, e) {
|
|
1199
|
-
const t =
|
|
1196
|
+
const t = S(ge(n.items)), s = S(), i = S(), p = S(), u = S(n.alignment), y = {
|
|
1200
1197
|
id: "__more_buttons__",
|
|
1201
1198
|
text: "更多"
|
|
1202
|
-
},
|
|
1199
|
+
}, w = S(new z(y)), h = xe(), b = N(() => w.value.children.length > 0), l = N(() => Y({
|
|
1203
1200
|
"f-toolbar": !0,
|
|
1204
1201
|
"f-response-toolbar": !0,
|
|
1205
1202
|
"position-relative": !0
|
|
1206
|
-
}, n.customClass)),
|
|
1203
|
+
}, n.customClass)), c = N(() => ({
|
|
1207
1204
|
"w-100": !0,
|
|
1208
1205
|
"d-flex": !0,
|
|
1209
1206
|
"flex-nowrap": !0,
|
|
1210
|
-
"justify-content-end":
|
|
1211
|
-
"justify-content-start":
|
|
1207
|
+
"justify-content-end": u.value === "right",
|
|
1208
|
+
"justify-content-start": u.value === "left"
|
|
1212
1209
|
})), {
|
|
1213
1210
|
renderToolbarDropdown: f,
|
|
1214
|
-
clearAllDropDown:
|
|
1215
|
-
} =
|
|
1216
|
-
function
|
|
1217
|
-
t.value.filter((
|
|
1218
|
-
|
|
1219
|
-
}),
|
|
1211
|
+
clearAllDropDown: v
|
|
1212
|
+
} = $t(n, h);
|
|
1213
|
+
function k() {
|
|
1214
|
+
t.value.filter((C) => C.children && C.children.length > 0).forEach((C) => {
|
|
1215
|
+
C.expanded = !1;
|
|
1216
|
+
}), w.value.expanded = !1, v();
|
|
1220
1217
|
}
|
|
1221
|
-
function
|
|
1222
|
-
const
|
|
1218
|
+
function A(C) {
|
|
1219
|
+
const I = {
|
|
1223
1220
|
btn: !0,
|
|
1224
1221
|
"f-rt-btn": !0,
|
|
1225
|
-
"f-btn-ml":
|
|
1226
|
-
"f-btn-mr":
|
|
1227
|
-
"btn-icontext": !!(
|
|
1222
|
+
"f-btn-ml": u.value === "right",
|
|
1223
|
+
"f-btn-mr": u.value === "left",
|
|
1224
|
+
"btn-icontext": !!(C.icon && C.icon.trim())
|
|
1228
1225
|
};
|
|
1229
|
-
if (
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1226
|
+
if (C.class) {
|
|
1227
|
+
const O = C.class.split(" ");
|
|
1228
|
+
O && O.length && O.reduce((d, r) => (d[r] = !0, d), I);
|
|
1232
1229
|
}
|
|
1233
|
-
return
|
|
1230
|
+
return I;
|
|
1234
1231
|
}
|
|
1235
|
-
function
|
|
1236
|
-
document.body.click(), typeof
|
|
1232
|
+
function $(C, I) {
|
|
1233
|
+
document.body.click(), typeof I.onClick == "function" && I.onClick(C, I.id), e.emit("click", C, I.id);
|
|
1237
1234
|
}
|
|
1238
|
-
function
|
|
1239
|
-
return
|
|
1235
|
+
function _(C) {
|
|
1236
|
+
return g("button", {
|
|
1240
1237
|
type: "button",
|
|
1241
|
-
class:
|
|
1242
|
-
id:
|
|
1243
|
-
disabled: !
|
|
1244
|
-
onClick: (
|
|
1245
|
-
}, [
|
|
1246
|
-
class:
|
|
1247
|
-
}, null),
|
|
1238
|
+
class: A(C),
|
|
1239
|
+
id: C.id,
|
|
1240
|
+
disabled: !C.enable,
|
|
1241
|
+
onClick: (I) => $(I, C)
|
|
1242
|
+
}, [h.shouldShowIcon(C) && g("i", {
|
|
1243
|
+
class: h.iconClass(C)
|
|
1244
|
+
}, null), C.text]);
|
|
1248
1245
|
}
|
|
1249
|
-
const
|
|
1250
|
-
function
|
|
1251
|
-
const
|
|
1252
|
-
let
|
|
1253
|
-
const
|
|
1246
|
+
const T = /* @__PURE__ */ new Map(), B = [];
|
|
1247
|
+
function P(C) {
|
|
1248
|
+
const I = p.value;
|
|
1249
|
+
let O = C;
|
|
1250
|
+
const d = Array.from(I.children), r = d[d.length - 1].id === "__more_buttons__" ? d[d.length - 1] : null;
|
|
1254
1251
|
if (r) {
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1252
|
+
const D = r.computedStyleMap().get("margin-left"), E = r.computedStyleMap().get("margin-right"), L = (D ? D.value : 0) + r.getBoundingClientRect().width + (E ? E.value : 0);
|
|
1253
|
+
O -= L;
|
|
1257
1254
|
}
|
|
1258
|
-
const o =
|
|
1259
|
-
for (const
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
id:
|
|
1263
|
-
width:
|
|
1264
|
-
})) :
|
|
1255
|
+
const o = d.filter((D) => D.id !== "__more_buttons__");
|
|
1256
|
+
for (const D of o) {
|
|
1257
|
+
const E = D.computedStyleMap().get("margin-left"), L = D.computedStyleMap().get("margin-right"), j = (E ? E.value : 0) + D.getBoundingClientRect().width + (L ? L.value : 0);
|
|
1258
|
+
O < j ? (T.set(D.id, !0), B.push({
|
|
1259
|
+
id: D.id,
|
|
1260
|
+
width: j
|
|
1261
|
+
})) : O -= j;
|
|
1265
1262
|
}
|
|
1266
|
-
if (
|
|
1267
|
-
for (let
|
|
1268
|
-
const
|
|
1269
|
-
if (
|
|
1270
|
-
|
|
1263
|
+
if (B.length)
|
|
1264
|
+
for (let D = B.length - 1; D >= 0; D--) {
|
|
1265
|
+
const E = B[D].width;
|
|
1266
|
+
if (O >= E)
|
|
1267
|
+
O -= E, T.delete(B[D].id), B.pop();
|
|
1271
1268
|
else
|
|
1272
1269
|
break;
|
|
1273
1270
|
}
|
|
1274
|
-
const a = Object.assign({},
|
|
1271
|
+
const a = Object.assign({}, w.value);
|
|
1275
1272
|
a.children = [];
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1273
|
+
const m = new z(a), M = t.value.reduce((D, E) => (T.has(E.id) && m.children.push(E), E.visible = !T.has(E.id), D.push(E), D), []);
|
|
1274
|
+
w.value = m, t.value = M;
|
|
1278
1275
|
}
|
|
1279
|
-
const
|
|
1280
|
-
if (
|
|
1281
|
-
const
|
|
1282
|
-
(
|
|
1276
|
+
const x = new ResizeObserver((C) => {
|
|
1277
|
+
if (C.length) {
|
|
1278
|
+
const O = C[0].contentRect.width, r = p.value.getBoundingClientRect().width;
|
|
1279
|
+
(O < r || B.length) && (P(O), k());
|
|
1283
1280
|
}
|
|
1284
1281
|
});
|
|
1285
1282
|
return H(() => {
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
}),
|
|
1289
|
-
|
|
1290
|
-
}),
|
|
1291
|
-
t.value =
|
|
1283
|
+
const C = i.value;
|
|
1284
|
+
x.observe(C), document.body.addEventListener("click", k), document.body.addEventListener("wheel", k);
|
|
1285
|
+
}), ye(() => {
|
|
1286
|
+
x.disconnect(), document.body.removeEventListener("click", k), document.body.removeEventListener("wheel", k);
|
|
1287
|
+
}), q(() => n.items, () => {
|
|
1288
|
+
t.value = ge(n.items);
|
|
1292
1289
|
}, {
|
|
1293
1290
|
deep: !0
|
|
1294
1291
|
}), e.expose({
|
|
1295
1292
|
elementRef: s
|
|
1296
|
-
}), () =>
|
|
1297
|
-
class:
|
|
1293
|
+
}), () => g("div", {
|
|
1294
|
+
class: l.value,
|
|
1298
1295
|
ref: s
|
|
1299
|
-
}, [
|
|
1300
|
-
ref:
|
|
1301
|
-
class:
|
|
1302
|
-
}, [
|
|
1303
|
-
ref:
|
|
1296
|
+
}, [g("div", {
|
|
1297
|
+
ref: i,
|
|
1298
|
+
class: c.value
|
|
1299
|
+
}, [g("div", {
|
|
1300
|
+
ref: p,
|
|
1304
1301
|
class: "d-inline-block f-response-content",
|
|
1305
1302
|
style: "white-space: nowrap;"
|
|
1306
|
-
}, [t.value.filter((
|
|
1303
|
+
}, [t.value.filter((C) => C.visible).map((C) => C.children && C.children.length > 0 ? f(C) : _(C)), b.value && f(w.value)])])]);
|
|
1307
1304
|
}
|
|
1308
1305
|
});
|
|
1309
|
-
function
|
|
1306
|
+
function _t(n, e) {
|
|
1310
1307
|
const t = V("design-item-context"), s = V("toolbar-item-handler", () => {
|
|
1311
1308
|
});
|
|
1312
|
-
function
|
|
1309
|
+
function i() {
|
|
1313
1310
|
s && s();
|
|
1314
1311
|
}
|
|
1315
|
-
function
|
|
1312
|
+
function p(r) {
|
|
1316
1313
|
const o = {
|
|
1317
1314
|
"dropdown-menu": !0
|
|
1318
1315
|
};
|
|
1319
1316
|
if (r.class) {
|
|
1320
1317
|
const a = r.menuClass.split(" ");
|
|
1321
|
-
a && a.length && a.reduce((
|
|
1318
|
+
a && a.length && a.reduce((m, M) => (m[M] = !0, m), o);
|
|
1322
1319
|
}
|
|
1323
1320
|
return o;
|
|
1324
1321
|
}
|
|
1325
|
-
function
|
|
1322
|
+
function u(r) {
|
|
1326
1323
|
const o = {
|
|
1327
1324
|
disabled: !r.enable,
|
|
1328
1325
|
"dropdown-submenu": !0,
|
|
1329
1326
|
"f-rt-dropdown": !0
|
|
1330
1327
|
}, a = r.dropdownClass.split(" ");
|
|
1331
|
-
return a && a.length && a.reduce((
|
|
1328
|
+
return a && a.length && a.reduce((m, M) => (m[M] = !0, m), o), o;
|
|
1332
1329
|
}
|
|
1333
|
-
function
|
|
1330
|
+
function y(r) {
|
|
1334
1331
|
const o = {
|
|
1335
1332
|
disabled: !r.enable,
|
|
1336
1333
|
"dropdown-item": !0,
|
|
@@ -1338,23 +1335,23 @@ function Ft(n, e) {
|
|
|
1338
1335
|
"position-relative": !0,
|
|
1339
1336
|
"farris-component": !0
|
|
1340
1337
|
}, a = r.class.split(" ");
|
|
1341
|
-
return a && a.length && a.reduce((
|
|
1342
|
-
}
|
|
1343
|
-
let
|
|
1344
|
-
const
|
|
1345
|
-
function
|
|
1346
|
-
var
|
|
1347
|
-
((
|
|
1348
|
-
const
|
|
1349
|
-
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ?
|
|
1350
|
-
const
|
|
1351
|
-
|
|
1338
|
+
return a && a.length && a.reduce((m, M) => (m[M] = !0, m), o), o;
|
|
1339
|
+
}
|
|
1340
|
+
let w;
|
|
1341
|
+
const h = /* @__PURE__ */ new Map();
|
|
1342
|
+
function b(r, o, a) {
|
|
1343
|
+
var M;
|
|
1344
|
+
((M = r.target) == null ? void 0 : M.id) === o.id && r.stopPropagation();
|
|
1345
|
+
const m = a ? a.id : "__top_item__";
|
|
1346
|
+
if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? h.set(m, o) : h.delete(m)), h.has(m) && h.get(m) !== o) {
|
|
1347
|
+
const D = h.get(m);
|
|
1348
|
+
D && (D.expanded = !1);
|
|
1352
1349
|
}
|
|
1353
1350
|
}
|
|
1354
|
-
function
|
|
1351
|
+
function l(r) {
|
|
1355
1352
|
r && (r.stopPropagation(), r.preventDefault());
|
|
1356
1353
|
}
|
|
1357
|
-
function
|
|
1354
|
+
function c() {
|
|
1358
1355
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
|
|
1359
1356
|
const r = document.getElementsByClassName("dgComponentSelected");
|
|
1360
1357
|
Array.from(r).forEach((o) => o.classList.remove("dgComponentSelected"));
|
|
@@ -1362,1132 +1359,376 @@ function Ft(n, e) {
|
|
|
1362
1359
|
function f(r) {
|
|
1363
1360
|
r.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1364
1361
|
}
|
|
1365
|
-
function
|
|
1362
|
+
function v(r) {
|
|
1366
1363
|
const {
|
|
1367
1364
|
buttons: o = []
|
|
1368
1365
|
} = t.schema;
|
|
1369
1366
|
let a = [];
|
|
1370
|
-
o.forEach((
|
|
1371
|
-
a = a.concat(
|
|
1367
|
+
o.forEach((D) => {
|
|
1368
|
+
a = a.concat(D.children || []);
|
|
1372
1369
|
});
|
|
1373
|
-
const
|
|
1370
|
+
const m = a.findIndex((D) => D.id === r), M = m === -1 ? null : a[m];
|
|
1374
1371
|
return {
|
|
1375
|
-
index:
|
|
1376
|
-
item:
|
|
1372
|
+
index: m,
|
|
1373
|
+
item: M
|
|
1377
1374
|
};
|
|
1378
1375
|
}
|
|
1379
|
-
function
|
|
1376
|
+
function k(r) {
|
|
1380
1377
|
const {
|
|
1381
1378
|
buttons: o = []
|
|
1382
|
-
} = t.schema, a = o.findIndex((
|
|
1379
|
+
} = t.schema, a = o.findIndex((M) => M.id === r), m = a === -1 ? null : o[a];
|
|
1383
1380
|
return {
|
|
1384
1381
|
index: a,
|
|
1385
|
-
item:
|
|
1382
|
+
item: m
|
|
1386
1383
|
};
|
|
1387
1384
|
}
|
|
1388
|
-
function
|
|
1389
|
-
var
|
|
1385
|
+
function A(r) {
|
|
1386
|
+
var m;
|
|
1390
1387
|
t.schema;
|
|
1391
1388
|
const {
|
|
1392
1389
|
index: o,
|
|
1393
1390
|
item: a
|
|
1394
|
-
} =
|
|
1395
|
-
(
|
|
1391
|
+
} = v(r);
|
|
1392
|
+
(m = t == null ? void 0 : t.setupContext) == null || m.emit("selectionChange", a == null ? void 0 : a.type, a);
|
|
1396
1393
|
}
|
|
1397
|
-
const
|
|
1394
|
+
const $ = function(r) {
|
|
1398
1395
|
const {
|
|
1399
1396
|
componentType: o
|
|
1400
|
-
} = r, a =
|
|
1401
|
-
return a && !a.id && a.type === o && (a.id = `${
|
|
1402
|
-
},
|
|
1397
|
+
} = r, a = Q(o, r), m = o.toLowerCase().replace("-", "_");
|
|
1398
|
+
return a && !a.id && a.type === o && (a.id = `${m}_${Math.random().toString().slice(2, 6)}`), a;
|
|
1399
|
+
}, _ = function() {
|
|
1403
1400
|
const r = {
|
|
1404
1401
|
componentType: "response-toolbar-item",
|
|
1405
1402
|
parentComponentInstance: e.value,
|
|
1406
1403
|
targetPosition: -1
|
|
1407
1404
|
};
|
|
1408
|
-
return
|
|
1405
|
+
return $(r);
|
|
1409
1406
|
};
|
|
1410
|
-
function
|
|
1411
|
-
|
|
1407
|
+
function T(r, o) {
|
|
1408
|
+
l(r), c(), f(r), A(o.id);
|
|
1412
1409
|
}
|
|
1413
|
-
function
|
|
1414
|
-
|
|
1415
|
-
const
|
|
1416
|
-
buttons:
|
|
1410
|
+
function B(r, o, a) {
|
|
1411
|
+
l(r);
|
|
1412
|
+
const m = o.id, M = a && a.id, {
|
|
1413
|
+
buttons: D = []
|
|
1417
1414
|
} = t.schema;
|
|
1418
|
-
if (!
|
|
1415
|
+
if (!M)
|
|
1419
1416
|
return;
|
|
1420
1417
|
const {
|
|
1421
|
-
index:
|
|
1422
|
-
} =
|
|
1423
|
-
if (
|
|
1418
|
+
index: E
|
|
1419
|
+
} = k(M);
|
|
1420
|
+
if (E === -1)
|
|
1424
1421
|
return;
|
|
1425
1422
|
const {
|
|
1426
1423
|
index: L
|
|
1427
|
-
} =
|
|
1428
|
-
L !== -1 && (E
|
|
1424
|
+
} = v(m);
|
|
1425
|
+
L !== -1 && (D[E].children.splice(L, 1), i());
|
|
1429
1426
|
}
|
|
1430
|
-
function
|
|
1431
|
-
|
|
1432
|
-
const
|
|
1433
|
-
buttons:
|
|
1427
|
+
function P(r, o, a) {
|
|
1428
|
+
l(r);
|
|
1429
|
+
const m = a && a.id, {
|
|
1430
|
+
buttons: M = []
|
|
1434
1431
|
} = t.schema;
|
|
1435
|
-
if (!
|
|
1432
|
+
if (!m)
|
|
1436
1433
|
return;
|
|
1437
1434
|
const {
|
|
1438
|
-
index:
|
|
1439
|
-
} =
|
|
1440
|
-
if (
|
|
1435
|
+
index: D
|
|
1436
|
+
} = k(m);
|
|
1437
|
+
if (D === -1)
|
|
1441
1438
|
return;
|
|
1442
|
-
const
|
|
1439
|
+
const E = _(), L = Object.assign({}, E, {
|
|
1443
1440
|
text: o.text
|
|
1444
1441
|
});
|
|
1445
|
-
|
|
1442
|
+
M[D].children.push(L), i();
|
|
1446
1443
|
}
|
|
1447
|
-
function
|
|
1448
|
-
|
|
1449
|
-
const
|
|
1450
|
-
buttons:
|
|
1444
|
+
function x(r, o, a) {
|
|
1445
|
+
l(r);
|
|
1446
|
+
const m = a && a.id, {
|
|
1447
|
+
buttons: M = []
|
|
1451
1448
|
} = t.schema;
|
|
1452
|
-
if (!
|
|
1449
|
+
if (!m)
|
|
1453
1450
|
return;
|
|
1454
1451
|
const {
|
|
1455
|
-
index:
|
|
1456
|
-
} =
|
|
1457
|
-
if (
|
|
1452
|
+
index: D
|
|
1453
|
+
} = k(m);
|
|
1454
|
+
if (D === -1)
|
|
1458
1455
|
return;
|
|
1459
|
-
const
|
|
1456
|
+
const E = _(), L = Object.assign({}, E, {
|
|
1460
1457
|
text: "按钮"
|
|
1461
1458
|
});
|
|
1462
|
-
|
|
1459
|
+
M[D].children.push(L), i();
|
|
1463
1460
|
}
|
|
1464
|
-
function
|
|
1465
|
-
return
|
|
1461
|
+
function C(r, o) {
|
|
1462
|
+
return g("div", {
|
|
1466
1463
|
class: "component-btn-group"
|
|
1467
|
-
}, [
|
|
1464
|
+
}, [g("div", null, [g("div", {
|
|
1468
1465
|
role: "button",
|
|
1469
1466
|
class: "btn component-settings-button",
|
|
1470
1467
|
title: "删除",
|
|
1471
1468
|
ref: "removeButton",
|
|
1472
1469
|
style: "position:static;",
|
|
1473
|
-
onClick: (a) =>
|
|
1474
|
-
}, [
|
|
1470
|
+
onClick: (a) => B(a, r, o)
|
|
1471
|
+
}, [g("i", {
|
|
1475
1472
|
class: "f-icon f-icon-yxs_delete"
|
|
1476
|
-
}, null)]),
|
|
1473
|
+
}, null)]), g("div", {
|
|
1477
1474
|
role: "button",
|
|
1478
1475
|
class: "btn component-settings-button",
|
|
1479
1476
|
title: "复制",
|
|
1480
1477
|
ref: "copyButton",
|
|
1481
1478
|
style: "position:static;",
|
|
1482
|
-
onClick: (a) =>
|
|
1483
|
-
}, [
|
|
1479
|
+
onClick: (a) => P(a, r, o)
|
|
1480
|
+
}, [g("i", {
|
|
1484
1481
|
class: "f-icon f-icon-yxs_copy"
|
|
1485
|
-
}, null)]),
|
|
1482
|
+
}, null)]), g("div", {
|
|
1486
1483
|
role: "button",
|
|
1487
1484
|
class: "btn component-settings-button",
|
|
1488
1485
|
title: "新增同级",
|
|
1489
1486
|
ref: "appendSame",
|
|
1490
1487
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1491
|
-
onClick: (a) =>
|
|
1492
|
-
}, [
|
|
1488
|
+
onClick: (a) => x(a, r, o)
|
|
1489
|
+
}, [g("i", {
|
|
1493
1490
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1494
|
-
}, null),
|
|
1491
|
+
}, null), g("span", {
|
|
1495
1492
|
style: "font-size:13px;margin:auto"
|
|
1496
|
-
}, [
|
|
1493
|
+
}, [J("新增同级")])])])]);
|
|
1497
1494
|
}
|
|
1498
|
-
function
|
|
1499
|
-
return r.children.map((o) => o.children && o.children.length ?
|
|
1500
|
-
class:
|
|
1495
|
+
function I(r) {
|
|
1496
|
+
return r.children.map((o) => o.children && o.children.length ? g("li", {
|
|
1497
|
+
class: u(o),
|
|
1501
1498
|
id: o.id,
|
|
1502
|
-
onClick: (a) => o.enable &&
|
|
1503
|
-
}, [
|
|
1499
|
+
onClick: (a) => o.enable && b(a, o, r)
|
|
1500
|
+
}, [g("span", {
|
|
1504
1501
|
id: o.id,
|
|
1505
|
-
class:
|
|
1506
|
-
onMouseover: (a) => o.enable &&
|
|
1507
|
-
}, [o.text,
|
|
1502
|
+
class: y(o),
|
|
1503
|
+
onMouseover: (a) => o.enable && b(a, o, r)
|
|
1504
|
+
}, [o.text, g("i", {
|
|
1508
1505
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
1509
1506
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
1510
|
-
}, null)]),
|
|
1511
|
-
class:
|
|
1507
|
+
}, null)]), w(o, o)]) : g("li", {
|
|
1508
|
+
class: y(o),
|
|
1512
1509
|
id: o.id,
|
|
1513
|
-
onClick: (a) =>
|
|
1514
|
-
}, [
|
|
1510
|
+
onClick: (a) => T(a, o)
|
|
1511
|
+
}, [C(o, r), n.shouldShowIcon(o) && g("i", {
|
|
1515
1512
|
class: n.iconClass(o)
|
|
1516
1513
|
}, null), o.text]));
|
|
1517
1514
|
}
|
|
1518
|
-
function
|
|
1519
|
-
const
|
|
1515
|
+
function O(r, o, a) {
|
|
1516
|
+
const m = {
|
|
1520
1517
|
display: r.expanded ? "block" : "none",
|
|
1521
1518
|
position: "fixed",
|
|
1522
1519
|
maxWidth: "300px",
|
|
1523
1520
|
width: "auto",
|
|
1524
1521
|
minWidth: "120px"
|
|
1525
|
-
},
|
|
1526
|
-
if (
|
|
1522
|
+
}, M = document.getElementsByTagName("body")[0].getClientRects()[0].width, D = o, E = D == null ? void 0 : D.getClientRects();
|
|
1523
|
+
if (D && E && E.length) {
|
|
1527
1524
|
const {
|
|
1528
1525
|
top: L,
|
|
1529
|
-
width:
|
|
1530
|
-
left:
|
|
1526
|
+
width: j,
|
|
1527
|
+
left: F,
|
|
1531
1528
|
right: W,
|
|
1532
|
-
height:
|
|
1533
|
-
} =
|
|
1534
|
-
|
|
1535
|
-
const
|
|
1536
|
-
if (
|
|
1537
|
-
|
|
1538
|
-
const
|
|
1529
|
+
height: G
|
|
1530
|
+
} = E[0], Re = Math.ceil(G + L);
|
|
1531
|
+
m.top = `${Re}px`, m.left = `${F}px`;
|
|
1532
|
+
const Ae = r.id + "_menu", te = o ? o.querySelector("#" + Ae) : null;
|
|
1533
|
+
if (te) {
|
|
1534
|
+
m.display === "block" && (te.style.display = "block");
|
|
1535
|
+
const de = te.getBoundingClientRect();
|
|
1539
1536
|
if (a) {
|
|
1540
|
-
|
|
1541
|
-
const
|
|
1542
|
-
|
|
1537
|
+
m.top = `${L - 6}px`;
|
|
1538
|
+
const Oe = Math.ceil(j + F);
|
|
1539
|
+
m.left = `${Oe}px`;
|
|
1543
1540
|
}
|
|
1544
|
-
|
|
1541
|
+
M - F - j < de.width && (m.left = `${(a ? F : W) - de.width}px`);
|
|
1545
1542
|
}
|
|
1546
1543
|
}
|
|
1547
|
-
return
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
var
|
|
1551
|
-
const a =
|
|
1552
|
-
return
|
|
1553
|
-
class:
|
|
1554
|
-
style:
|
|
1544
|
+
return m;
|
|
1545
|
+
}
|
|
1546
|
+
w = function(r, o) {
|
|
1547
|
+
var D, E;
|
|
1548
|
+
const a = be(), m = o ? o.id : r.id, M = (E = (D = a == null ? void 0 : a.exposed) == null ? void 0 : D.elementRef.value) == null ? void 0 : E.querySelector("#" + m);
|
|
1549
|
+
return g("ul", {
|
|
1550
|
+
class: p(r),
|
|
1551
|
+
style: O(r, M, o),
|
|
1555
1552
|
id: r.id + "_menu"
|
|
1556
|
-
}, [
|
|
1553
|
+
}, [I(r)]);
|
|
1557
1554
|
};
|
|
1558
|
-
function
|
|
1559
|
-
|
|
1555
|
+
function d() {
|
|
1556
|
+
h.forEach((r) => {
|
|
1560
1557
|
r.expanded = !1;
|
|
1561
|
-
}),
|
|
1558
|
+
}), h.clear();
|
|
1562
1559
|
}
|
|
1563
1560
|
return {
|
|
1564
|
-
renderDropdownMenu:
|
|
1565
|
-
clearAllDropDownMenu:
|
|
1561
|
+
renderDropdownMenu: w,
|
|
1562
|
+
clearAllDropDownMenu: d
|
|
1566
1563
|
};
|
|
1567
1564
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const s =
|
|
1570
|
-
renderDropdownMenu:
|
|
1571
|
-
clearAllDropDownMenu:
|
|
1572
|
-
} =
|
|
1565
|
+
function Nt(n, e, t) {
|
|
1566
|
+
const s = S(n.alignment), {
|
|
1567
|
+
renderDropdownMenu: i,
|
|
1568
|
+
clearAllDropDownMenu: p
|
|
1569
|
+
} = _t(e, t), u = V("design-item-context"), y = V("toolbar-item-handler", () => {
|
|
1573
1570
|
});
|
|
1574
|
-
function
|
|
1575
|
-
|
|
1571
|
+
function w() {
|
|
1572
|
+
y && y();
|
|
1576
1573
|
}
|
|
1577
|
-
function
|
|
1574
|
+
function h(d) {
|
|
1578
1575
|
const r = {
|
|
1579
1576
|
"btn-group": !0,
|
|
1580
1577
|
"f-rt-dropdown": !0,
|
|
1581
1578
|
"f-btn-ml": s.value === "right",
|
|
1582
1579
|
"f-btn-mr": s.value === "left"
|
|
1583
|
-
}, o =
|
|
1584
|
-
return o && o.length && o.reduce((a,
|
|
1580
|
+
}, o = d.dropdownClass.split(" ");
|
|
1581
|
+
return o && o.length && o.reduce((a, m) => (a[m] = !0, a), r), r;
|
|
1585
1582
|
}
|
|
1586
|
-
function
|
|
1583
|
+
function b(d) {
|
|
1587
1584
|
const r = {
|
|
1588
1585
|
btn: !0,
|
|
1589
|
-
disabled: !
|
|
1586
|
+
disabled: !d.enable,
|
|
1590
1587
|
"position-relative": !0,
|
|
1591
1588
|
"farris-component": !0,
|
|
1592
1589
|
"f-rt-btn": !0,
|
|
1593
|
-
"btn-icontext": !!(
|
|
1590
|
+
"btn-icontext": !!(d.icon && d.icon.trim())
|
|
1594
1591
|
};
|
|
1595
|
-
if (
|
|
1596
|
-
const o =
|
|
1597
|
-
o && o.length && o.reduce((a,
|
|
1592
|
+
if (d.class) {
|
|
1593
|
+
const o = d.class.split(" ");
|
|
1594
|
+
o && o.length && o.reduce((a, m) => (a[m] = !0, a), r);
|
|
1598
1595
|
}
|
|
1599
1596
|
return r;
|
|
1600
1597
|
}
|
|
1601
|
-
function
|
|
1602
|
-
|
|
1598
|
+
function l(d) {
|
|
1599
|
+
d && (d.stopPropagation(), d.preventDefault());
|
|
1603
1600
|
}
|
|
1604
|
-
function
|
|
1605
|
-
|
|
1601
|
+
function c(d, r) {
|
|
1602
|
+
l(d);
|
|
1606
1603
|
const o = r.expanded;
|
|
1607
1604
|
document.body.click(), r.expanded = !o;
|
|
1608
1605
|
}
|
|
1609
|
-
const f = function(
|
|
1606
|
+
const f = function(d) {
|
|
1610
1607
|
const {
|
|
1611
1608
|
componentType: r
|
|
1612
|
-
} =
|
|
1609
|
+
} = d, o = Q(r, d), a = r.toLowerCase().replace("-", "_");
|
|
1613
1610
|
return o && !o.id && o.type === r && (o.id = `${a}_${Math.random().toString().slice(2, 6)}`), o;
|
|
1614
|
-
},
|
|
1615
|
-
const
|
|
1611
|
+
}, v = function() {
|
|
1612
|
+
const d = {
|
|
1616
1613
|
componentType: "response-toolbar-item",
|
|
1617
1614
|
parentComponentInstance: t.value,
|
|
1618
1615
|
targetPosition: -1
|
|
1619
1616
|
};
|
|
1620
|
-
return f(
|
|
1617
|
+
return f(d);
|
|
1621
1618
|
};
|
|
1622
|
-
function
|
|
1623
|
-
const r =
|
|
1619
|
+
function k(d) {
|
|
1620
|
+
const r = u.schema.buttons || u.schema.contents, o = r == null ? void 0 : r.findIndex((m) => m.id === d), a = o === -1 ? null : r[o];
|
|
1624
1621
|
return {
|
|
1625
1622
|
index: o,
|
|
1626
1623
|
toolbarItem: a
|
|
1627
1624
|
};
|
|
1628
1625
|
}
|
|
1629
|
-
function
|
|
1630
|
-
var
|
|
1626
|
+
function A(d, r) {
|
|
1627
|
+
var E;
|
|
1631
1628
|
const {
|
|
1632
1629
|
index: o,
|
|
1633
1630
|
toolbarItem: a
|
|
1634
|
-
} =
|
|
1631
|
+
} = k(r);
|
|
1635
1632
|
if (o === -1)
|
|
1636
1633
|
return;
|
|
1637
|
-
const
|
|
1638
|
-
text:
|
|
1634
|
+
const m = a.text || "按钮", M = v(), D = Object.assign({}, M, {
|
|
1635
|
+
text: m
|
|
1639
1636
|
});
|
|
1640
|
-
(
|
|
1637
|
+
(E = u.schema.buttons) == null || E.push(D), w();
|
|
1641
1638
|
}
|
|
1642
|
-
function
|
|
1639
|
+
function $(d, r) {
|
|
1643
1640
|
const {
|
|
1644
1641
|
index: o,
|
|
1645
1642
|
toolbarItem: a
|
|
1646
|
-
} =
|
|
1643
|
+
} = k(r);
|
|
1647
1644
|
if (o === -1)
|
|
1648
1645
|
return;
|
|
1649
|
-
const
|
|
1650
|
-
text:
|
|
1651
|
-
}),
|
|
1652
|
-
|
|
1646
|
+
const m = a.text || "按钮", M = v(), D = Object.assign({}, M, {
|
|
1647
|
+
text: m
|
|
1648
|
+
}), E = u.schema.buttons[o].children || [];
|
|
1649
|
+
E.push(D), u.schema.buttons[o].children = E, w();
|
|
1653
1650
|
}
|
|
1654
|
-
function
|
|
1655
|
-
const o =
|
|
1656
|
-
a !== -1 && (o.splice(a, 1),
|
|
1651
|
+
function _(d, r) {
|
|
1652
|
+
const o = u.schema.buttons || u.schema.contents, a = o == null ? void 0 : o.findIndex((m) => m.id === r);
|
|
1653
|
+
a !== -1 && (o.splice(a, 1), w());
|
|
1657
1654
|
}
|
|
1658
|
-
function
|
|
1659
|
-
return
|
|
1655
|
+
function T(d) {
|
|
1656
|
+
return g("div", {
|
|
1660
1657
|
class: "component-btn-group"
|
|
1661
|
-
}, [
|
|
1658
|
+
}, [g("div", null, [g("div", {
|
|
1662
1659
|
role: "button",
|
|
1663
1660
|
class: "btn component-settings-button",
|
|
1664
1661
|
title: "删除",
|
|
1665
1662
|
ref: "removeButton",
|
|
1666
1663
|
style: "position:static;",
|
|
1667
|
-
onClick: (r) =>
|
|
1668
|
-
}, [
|
|
1664
|
+
onClick: (r) => _(r, d)
|
|
1665
|
+
}, [g("i", {
|
|
1669
1666
|
class: "f-icon f-icon-yxs_delete"
|
|
1670
|
-
}, null)]),
|
|
1667
|
+
}, null)]), g("div", {
|
|
1671
1668
|
role: "button",
|
|
1672
1669
|
class: "btn component-settings-button",
|
|
1673
1670
|
title: "复制",
|
|
1674
1671
|
ref: "copyButton",
|
|
1675
1672
|
style: "position:static;",
|
|
1676
|
-
onClick: (r) =>
|
|
1677
|
-
}, [
|
|
1673
|
+
onClick: (r) => A(r, d)
|
|
1674
|
+
}, [g("i", {
|
|
1678
1675
|
class: "f-icon f-icon-yxs_copy"
|
|
1679
|
-
}, null)]),
|
|
1676
|
+
}, null)]), g("div", {
|
|
1680
1677
|
role: "button",
|
|
1681
1678
|
class: "btn component-settings-button",
|
|
1682
1679
|
title: "新增子级",
|
|
1683
1680
|
ref: "appendChildButton",
|
|
1684
1681
|
style: "width:85px!important;padding:0 5px;position:static;",
|
|
1685
|
-
onClick: (r) =>
|
|
1686
|
-
}, [
|
|
1682
|
+
onClick: (r) => $(r, d)
|
|
1683
|
+
}, [g("i", {
|
|
1687
1684
|
class: "f-icon f-icon-plus-circle text-white mr-1"
|
|
1688
|
-
}, null),
|
|
1685
|
+
}, null), g("span", {
|
|
1689
1686
|
style: "font-size:13px;margin:auto"
|
|
1690
|
-
}, [
|
|
1687
|
+
}, [J("新增子级")])])])]);
|
|
1691
1688
|
}
|
|
1692
|
-
function
|
|
1689
|
+
function B() {
|
|
1693
1690
|
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((r) => r.classList.remove("dgComponentFocused"));
|
|
1694
|
-
const
|
|
1695
|
-
Array.from(
|
|
1691
|
+
const d = document.getElementsByClassName("dgComponentSelected");
|
|
1692
|
+
Array.from(d).forEach((r) => r.classList.remove("dgComponentSelected"));
|
|
1696
1693
|
}
|
|
1697
|
-
function
|
|
1698
|
-
|
|
1694
|
+
function P(d) {
|
|
1695
|
+
d.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
|
|
1699
1696
|
}
|
|
1700
|
-
function
|
|
1701
|
-
var
|
|
1702
|
-
const r =
|
|
1697
|
+
function x(d) {
|
|
1698
|
+
var m;
|
|
1699
|
+
const r = u.schema.buttons || u.schema.contents, o = r == null ? void 0 : r.findIndex((M) => M.id === d);
|
|
1703
1700
|
if (o === -1)
|
|
1704
1701
|
return;
|
|
1705
1702
|
const a = r[o];
|
|
1706
|
-
(
|
|
1703
|
+
(m = u == null ? void 0 : u.setupContext) == null || m.emit("selectionChange", "response-toolbar-item", a);
|
|
1707
1704
|
}
|
|
1708
|
-
function
|
|
1709
|
-
|
|
1705
|
+
function C(d, r) {
|
|
1706
|
+
l(d), B(), P(d), l(d), c(d, r), x(r.id);
|
|
1710
1707
|
}
|
|
1711
|
-
function
|
|
1712
|
-
return
|
|
1713
|
-
id:
|
|
1714
|
-
class:
|
|
1715
|
-
}, [
|
|
1716
|
-
class:
|
|
1708
|
+
function I(d) {
|
|
1709
|
+
return g("div", {
|
|
1710
|
+
id: d.id,
|
|
1711
|
+
class: h(d)
|
|
1712
|
+
}, [g("div", {
|
|
1713
|
+
class: b(d),
|
|
1717
1714
|
style: "display: flex;padding-right: 0.1rem;",
|
|
1718
|
-
onClick: (r) =>
|
|
1719
|
-
}, [
|
|
1720
|
-
class: e.iconClass(
|
|
1721
|
-
}, null),
|
|
1715
|
+
onClick: (r) => d.enable && C(r, d)
|
|
1716
|
+
}, [T(d.id), e.shouldShowIcon(d) && g("i", {
|
|
1717
|
+
class: e.iconClass(d)
|
|
1718
|
+
}, null), g("span", null, [d.text]), g("i", {
|
|
1722
1719
|
class: "f-icon f-icon-arrow-chevron-down",
|
|
1723
1720
|
style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
|
|
1724
|
-
}, null)]),
|
|
1721
|
+
}, null)]), i(d)]);
|
|
1725
1722
|
}
|
|
1726
|
-
function
|
|
1727
|
-
|
|
1728
|
-
}
|
|
1729
|
-
return {
|
|
1730
|
-
renderToolbarDropdown: x,
|
|
1731
|
-
clearAllDropDown: k
|
|
1732
|
-
};
|
|
1733
|
-
}
|
|
1734
|
-
function Vt() {
|
|
1735
|
-
function n(e) {
|
|
1736
|
-
var c, g;
|
|
1737
|
-
if (!e)
|
|
1738
|
-
return !1;
|
|
1739
|
-
const t = ((c = e.targetContainer) == null ? void 0 : c.componentInstance) && e.targetContainer.componentInstance.value;
|
|
1740
|
-
if (!t)
|
|
1741
|
-
return !1;
|
|
1742
|
-
const s = (g = t.schema.appearance) == null ? void 0 : g.class;
|
|
1743
|
-
if (e.controlCategory === "input" || e.controlType === "form-group") {
|
|
1744
|
-
const d = t.schema.type, P = (d === "response-form" || d === "content-container") && s && s.includes("farris-form");
|
|
1745
|
-
if (t.schema.type !== "response-layout-item" && !P)
|
|
1746
|
-
return !1;
|
|
1747
|
-
}
|
|
1748
|
-
return e.controlType !== "field-set";
|
|
1723
|
+
function O() {
|
|
1724
|
+
p();
|
|
1749
1725
|
}
|
|
1750
1726
|
return {
|
|
1751
|
-
|
|
1727
|
+
renderToolbarDropdown: I,
|
|
1728
|
+
clearAllDropDown: O
|
|
1752
1729
|
};
|
|
1753
1730
|
}
|
|
1754
|
-
|
|
1755
|
-
"f-page": {
|
|
1756
|
-
description: "The root class of page designed by farris.",
|
|
1757
|
-
type: "object",
|
|
1758
|
-
properties: {
|
|
1759
|
-
contents: {
|
|
1760
|
-
type: "object",
|
|
1761
|
-
properties: {
|
|
1762
|
-
"f-page-header": {
|
|
1763
|
-
description: "The class of page header designed by farris.",
|
|
1764
|
-
type: "string"
|
|
1765
|
-
},
|
|
1766
|
-
"f-page-main": {
|
|
1767
|
-
description: "The class of page body designed by farris.",
|
|
1768
|
-
type: "object",
|
|
1769
|
-
properties: {
|
|
1770
|
-
contents: {
|
|
1771
|
-
type: "object",
|
|
1772
|
-
properties: {
|
|
1773
|
-
"f-struct-like-card": {
|
|
1774
|
-
description: "",
|
|
1775
|
-
type: "object",
|
|
1776
|
-
properties: {
|
|
1777
|
-
contents: {
|
|
1778
|
-
type: "object",
|
|
1779
|
-
properties: {
|
|
1780
|
-
"f-struct-form": {
|
|
1781
|
-
description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
|
|
1782
|
-
type: "object",
|
|
1783
|
-
properties: {
|
|
1784
|
-
contents: {
|
|
1785
|
-
type: "object",
|
|
1786
|
-
properties: {
|
|
1787
|
-
"f-section-form": {
|
|
1788
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1789
|
-
type: "object",
|
|
1790
|
-
properties: {
|
|
1791
|
-
contents: {
|
|
1792
|
-
type: "object",
|
|
1793
|
-
properties: {
|
|
1794
|
-
"f-form-layout": {
|
|
1795
|
-
description: "The class of reponse form",
|
|
1796
|
-
type: "object",
|
|
1797
|
-
properties: {
|
|
1798
|
-
rules: {
|
|
1799
|
-
type: "object",
|
|
1800
|
-
properties: {
|
|
1801
|
-
canAccept: {
|
|
1802
|
-
type: "boolean",
|
|
1803
|
-
const: !0
|
|
1804
|
-
},
|
|
1805
|
-
fixed: {
|
|
1806
|
-
type: "boolean",
|
|
1807
|
-
const: !0
|
|
1808
|
-
},
|
|
1809
|
-
hidePadding: {
|
|
1810
|
-
type: "boolean",
|
|
1811
|
-
const: !1
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
},
|
|
1819
|
-
rules: {
|
|
1820
|
-
type: "object",
|
|
1821
|
-
properties: {
|
|
1822
|
-
canAccept: {
|
|
1823
|
-
type: "boolean",
|
|
1824
|
-
const: !1
|
|
1825
|
-
},
|
|
1826
|
-
fixed: {
|
|
1827
|
-
type: "boolean",
|
|
1828
|
-
const: !0
|
|
1829
|
-
},
|
|
1830
|
-
hidePadding: {
|
|
1831
|
-
type: "boolean",
|
|
1832
|
-
const: !0
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
},
|
|
1840
|
-
rules: {
|
|
1841
|
-
type: "object",
|
|
1842
|
-
properties: {
|
|
1843
|
-
canAccept: {
|
|
1844
|
-
type: "boolean",
|
|
1845
|
-
const: !1
|
|
1846
|
-
},
|
|
1847
|
-
fixed: {
|
|
1848
|
-
type: "boolean",
|
|
1849
|
-
const: !1
|
|
1850
|
-
},
|
|
1851
|
-
hidePadding: {
|
|
1852
|
-
type: "boolean",
|
|
1853
|
-
const: !0
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
}
|
|
1857
|
-
}
|
|
1858
|
-
},
|
|
1859
|
-
"f-struct-wrapper": {
|
|
1860
|
-
description: "",
|
|
1861
|
-
type: "object",
|
|
1862
|
-
properties: {
|
|
1863
|
-
contents: {
|
|
1864
|
-
type: "object",
|
|
1865
|
-
properties: {
|
|
1866
|
-
"f-section-tabs": {
|
|
1867
|
-
description: "The class of section which has wrapped sub-grid tabs.",
|
|
1868
|
-
type: "object",
|
|
1869
|
-
properties: {
|
|
1870
|
-
contents: {
|
|
1871
|
-
type: "object",
|
|
1872
|
-
properties: {
|
|
1873
|
-
"f-tabs-in-card": {
|
|
1874
|
-
description: "The class of tabs which contains sub-grid.",
|
|
1875
|
-
type: "object",
|
|
1876
|
-
properties: {
|
|
1877
|
-
contents: {
|
|
1878
|
-
type: "object",
|
|
1879
|
-
properties: {
|
|
1880
|
-
"f-struct-data-grid-in-card": {
|
|
1881
|
-
description: "The class of sub-grid component",
|
|
1882
|
-
type: "object",
|
|
1883
|
-
properties: {
|
|
1884
|
-
contents: {
|
|
1885
|
-
type: "object",
|
|
1886
|
-
properties: {
|
|
1887
|
-
"f-grid-is-sub": {
|
|
1888
|
-
description: "The class of sub-grid",
|
|
1889
|
-
type: "object",
|
|
1890
|
-
properties: {
|
|
1891
|
-
rules: {
|
|
1892
|
-
type: "object",
|
|
1893
|
-
properties: {
|
|
1894
|
-
canAccept: {
|
|
1895
|
-
type: "boolean",
|
|
1896
|
-
const: !0
|
|
1897
|
-
},
|
|
1898
|
-
fixed: {
|
|
1899
|
-
type: "boolean",
|
|
1900
|
-
const: !0
|
|
1901
|
-
},
|
|
1902
|
-
hidePadding: {
|
|
1903
|
-
type: "boolean",
|
|
1904
|
-
const: !1
|
|
1905
|
-
}
|
|
1906
|
-
}
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
}
|
|
1911
|
-
},
|
|
1912
|
-
rules: {
|
|
1913
|
-
type: "object",
|
|
1914
|
-
properties: {
|
|
1915
|
-
canAccept: {
|
|
1916
|
-
type: "boolean",
|
|
1917
|
-
const: !1
|
|
1918
|
-
},
|
|
1919
|
-
fixed: {
|
|
1920
|
-
type: "boolean",
|
|
1921
|
-
const: !1
|
|
1922
|
-
},
|
|
1923
|
-
hidePadding: {
|
|
1924
|
-
type: "boolean",
|
|
1925
|
-
const: !0
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
}
|
|
1932
|
-
},
|
|
1933
|
-
rules: {
|
|
1934
|
-
type: "object",
|
|
1935
|
-
properties: {
|
|
1936
|
-
canAccept: {
|
|
1937
|
-
type: "boolean",
|
|
1938
|
-
const: !1
|
|
1939
|
-
},
|
|
1940
|
-
fixed: {
|
|
1941
|
-
type: "boolean",
|
|
1942
|
-
const: !0
|
|
1943
|
-
},
|
|
1944
|
-
hidePadding: {
|
|
1945
|
-
type: "boolean",
|
|
1946
|
-
const: !0
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
},
|
|
1954
|
-
rules: {
|
|
1955
|
-
type: "object",
|
|
1956
|
-
properties: {
|
|
1957
|
-
canAccept: {
|
|
1958
|
-
type: "boolean",
|
|
1959
|
-
const: !1
|
|
1960
|
-
},
|
|
1961
|
-
fixed: {
|
|
1962
|
-
type: "boolean",
|
|
1963
|
-
const: !0
|
|
1964
|
-
},
|
|
1965
|
-
hidePadding: {
|
|
1966
|
-
type: "boolean",
|
|
1967
|
-
const: !0
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
},
|
|
1973
|
-
"f-section-in-main": {
|
|
1974
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
1975
|
-
type: "object",
|
|
1976
|
-
properties: {
|
|
1977
|
-
rules: {
|
|
1978
|
-
type: "object",
|
|
1979
|
-
properties: {
|
|
1980
|
-
canAccept: {
|
|
1981
|
-
type: "boolean",
|
|
1982
|
-
const: !0
|
|
1983
|
-
},
|
|
1984
|
-
fixed: {
|
|
1985
|
-
type: "boolean",
|
|
1986
|
-
const: !0
|
|
1987
|
-
},
|
|
1988
|
-
hidePadding: {
|
|
1989
|
-
type: "boolean",
|
|
1990
|
-
const: !1
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
},
|
|
1998
|
-
rules: {
|
|
1999
|
-
type: "object",
|
|
2000
|
-
properties: {
|
|
2001
|
-
canAccept: {
|
|
2002
|
-
type: "boolean",
|
|
2003
|
-
const: !1
|
|
2004
|
-
},
|
|
2005
|
-
fixed: {
|
|
2006
|
-
type: "boolean",
|
|
2007
|
-
const: !1
|
|
2008
|
-
},
|
|
2009
|
-
hidePadding: {
|
|
2010
|
-
type: "boolean",
|
|
2011
|
-
const: !0
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
},
|
|
2019
|
-
rules: {
|
|
2020
|
-
type: "object",
|
|
2021
|
-
properties: {
|
|
2022
|
-
canAccept: {
|
|
2023
|
-
type: "boolean",
|
|
2024
|
-
const: !0
|
|
2025
|
-
},
|
|
2026
|
-
fixed: {
|
|
2027
|
-
type: "boolean",
|
|
2028
|
-
const: !0
|
|
2029
|
-
},
|
|
2030
|
-
hidePadding: {
|
|
2031
|
-
type: "object",
|
|
2032
|
-
const: {
|
|
2033
|
-
allOf: [
|
|
2034
|
-
{
|
|
2035
|
-
sibling: 0,
|
|
2036
|
-
parent: {
|
|
2037
|
-
"f-page-main": !0
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
]
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
}
|
|
2046
|
-
},
|
|
2047
|
-
"f-struct-data-grid": {
|
|
2048
|
-
description: "",
|
|
2049
|
-
type: "object",
|
|
2050
|
-
properties: {
|
|
2051
|
-
rules: {
|
|
2052
|
-
type: "object",
|
|
2053
|
-
properties: {
|
|
2054
|
-
canAccept: {
|
|
2055
|
-
type: "object",
|
|
2056
|
-
const: !0
|
|
2057
|
-
},
|
|
2058
|
-
fixed: {
|
|
2059
|
-
type: "boolean",
|
|
2060
|
-
const: !0
|
|
2061
|
-
},
|
|
2062
|
-
hidePadding: {
|
|
2063
|
-
type: "boolean",
|
|
2064
|
-
const: !0
|
|
2065
|
-
}
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
},
|
|
2070
|
-
"f-page-main-content": {
|
|
2071
|
-
description: "",
|
|
2072
|
-
type: "object",
|
|
2073
|
-
properties: {
|
|
2074
|
-
contents: {
|
|
2075
|
-
type: "object",
|
|
2076
|
-
properties: {
|
|
2077
|
-
"f-page-content-nav": {
|
|
2078
|
-
description: "",
|
|
2079
|
-
type: "object",
|
|
2080
|
-
properties: {
|
|
2081
|
-
contents: {
|
|
2082
|
-
type: "object",
|
|
2083
|
-
properties: {
|
|
2084
|
-
"f-struct-data-grid-in-nav": {
|
|
2085
|
-
description: "",
|
|
2086
|
-
type: "object",
|
|
2087
|
-
properties: {
|
|
2088
|
-
contents: {
|
|
2089
|
-
type: "object",
|
|
2090
|
-
properties: {
|
|
2091
|
-
"f-page-content-nav-extend": {
|
|
2092
|
-
description: "",
|
|
2093
|
-
type: "object"
|
|
2094
|
-
},
|
|
2095
|
-
"f-section-in-nav": {
|
|
2096
|
-
description: "",
|
|
2097
|
-
type: "object",
|
|
2098
|
-
properties: {
|
|
2099
|
-
rules: {
|
|
2100
|
-
type: "object",
|
|
2101
|
-
properties: {
|
|
2102
|
-
canAccept: {
|
|
2103
|
-
type: "boolean",
|
|
2104
|
-
const: !1
|
|
2105
|
-
},
|
|
2106
|
-
fixed: {
|
|
2107
|
-
type: "boolean",
|
|
2108
|
-
const: !0
|
|
2109
|
-
},
|
|
2110
|
-
hidePadding: {
|
|
2111
|
-
type: "boolean",
|
|
2112
|
-
const: !1
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
2115
|
-
}
|
|
2116
|
-
}
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
},
|
|
2120
|
-
rules: {
|
|
2121
|
-
type: "object",
|
|
2122
|
-
properties: {
|
|
2123
|
-
canAccept: {
|
|
2124
|
-
type: "boolean",
|
|
2125
|
-
const: !0
|
|
2126
|
-
},
|
|
2127
|
-
fixed: {
|
|
2128
|
-
type: "boolean",
|
|
2129
|
-
const: !1
|
|
2130
|
-
},
|
|
2131
|
-
hidePadding: {
|
|
2132
|
-
type: "boolean",
|
|
2133
|
-
const: !0
|
|
2134
|
-
}
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
|
-
}
|
|
2138
|
-
}
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
},
|
|
2143
|
-
"f-page-content-main": {
|
|
2144
|
-
description: "",
|
|
2145
|
-
type: "object",
|
|
2146
|
-
properties: {}
|
|
2147
|
-
}
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
2150
|
-
}
|
|
2151
|
-
},
|
|
2152
|
-
"f-page-content": {
|
|
2153
|
-
description: "",
|
|
2154
|
-
type: "object",
|
|
2155
|
-
properties: {
|
|
2156
|
-
contents: {
|
|
2157
|
-
type: "object",
|
|
2158
|
-
properties: {
|
|
2159
|
-
"f-page-content-nav": {
|
|
2160
|
-
description: "",
|
|
2161
|
-
type: "object",
|
|
2162
|
-
properties: {
|
|
2163
|
-
contents: {
|
|
2164
|
-
type: "object",
|
|
2165
|
-
properties: {
|
|
2166
|
-
"f-list-nav": {
|
|
2167
|
-
description: "",
|
|
2168
|
-
type: "object"
|
|
2169
|
-
},
|
|
2170
|
-
"f-list-nav-left": {
|
|
2171
|
-
description: "",
|
|
2172
|
-
type: "object"
|
|
2173
|
-
},
|
|
2174
|
-
"f-struct-data-grid-in-nav": {
|
|
2175
|
-
description: "",
|
|
2176
|
-
type: "object",
|
|
2177
|
-
properties: {
|
|
2178
|
-
contents: {
|
|
2179
|
-
type: "object",
|
|
2180
|
-
properties: {
|
|
2181
|
-
"f-section-form": {
|
|
2182
|
-
description: "",
|
|
2183
|
-
type: "object",
|
|
2184
|
-
properties: {
|
|
2185
|
-
rules: {
|
|
2186
|
-
type: "object",
|
|
2187
|
-
properties: {
|
|
2188
|
-
canAccept: {
|
|
2189
|
-
type: "boolean",
|
|
2190
|
-
const: !1
|
|
2191
|
-
},
|
|
2192
|
-
fixed: {
|
|
2193
|
-
type: "boolean",
|
|
2194
|
-
const: !0
|
|
2195
|
-
},
|
|
2196
|
-
hidePadding: {
|
|
2197
|
-
type: "boolean",
|
|
2198
|
-
const: !0
|
|
2199
|
-
}
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
},
|
|
2204
|
-
"f-section-grid": {
|
|
2205
|
-
description: "",
|
|
2206
|
-
type: "object",
|
|
2207
|
-
properties: {
|
|
2208
|
-
rules: {
|
|
2209
|
-
type: "object",
|
|
2210
|
-
properties: {
|
|
2211
|
-
canAccept: {
|
|
2212
|
-
type: "boolean",
|
|
2213
|
-
const: !1
|
|
2214
|
-
},
|
|
2215
|
-
fixed: {
|
|
2216
|
-
type: "boolean",
|
|
2217
|
-
const: !0
|
|
2218
|
-
},
|
|
2219
|
-
hidePadding: {
|
|
2220
|
-
type: "boolean",
|
|
2221
|
-
const: !0
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
},
|
|
2229
|
-
rules: {
|
|
2230
|
-
type: "object",
|
|
2231
|
-
properties: {
|
|
2232
|
-
canAccept: {
|
|
2233
|
-
type: "boolean",
|
|
2234
|
-
const: !1
|
|
2235
|
-
},
|
|
2236
|
-
fixed: {
|
|
2237
|
-
type: "boolean",
|
|
2238
|
-
const: !0
|
|
2239
|
-
},
|
|
2240
|
-
hidePadding: {
|
|
2241
|
-
type: "boolean",
|
|
2242
|
-
const: !0
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
}
|
|
2250
|
-
},
|
|
2251
|
-
rules: {
|
|
2252
|
-
type: "object",
|
|
2253
|
-
properties: {
|
|
2254
|
-
canAccept: {
|
|
2255
|
-
type: "boolean",
|
|
2256
|
-
const: !1
|
|
2257
|
-
},
|
|
2258
|
-
fixed: {
|
|
2259
|
-
type: "boolean",
|
|
2260
|
-
const: !0
|
|
2261
|
-
},
|
|
2262
|
-
hidePadding: {
|
|
2263
|
-
type: "boolean",
|
|
2264
|
-
const: !0
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
},
|
|
2269
|
-
"f-page-content-main": {
|
|
2270
|
-
description: "",
|
|
2271
|
-
type: "object",
|
|
2272
|
-
properties: {
|
|
2273
|
-
rules: {
|
|
2274
|
-
type: "object",
|
|
2275
|
-
properties: {
|
|
2276
|
-
canAccept: {
|
|
2277
|
-
type: "boolean",
|
|
2278
|
-
const: !1
|
|
2279
|
-
},
|
|
2280
|
-
fixed: {
|
|
2281
|
-
type: "boolean",
|
|
2282
|
-
const: !1
|
|
2283
|
-
},
|
|
2284
|
-
hidePadding: {
|
|
2285
|
-
type: "boolean",
|
|
2286
|
-
const: !0
|
|
2287
|
-
}
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
},
|
|
2294
|
-
rules: {
|
|
2295
|
-
type: "object",
|
|
2296
|
-
properties: {
|
|
2297
|
-
canAccept: {
|
|
2298
|
-
type: "boolean",
|
|
2299
|
-
const: !1
|
|
2300
|
-
},
|
|
2301
|
-
fixed: {
|
|
2302
|
-
type: "boolean",
|
|
2303
|
-
const: !0
|
|
2304
|
-
},
|
|
2305
|
-
hidePadding: {
|
|
2306
|
-
type: "boolean",
|
|
2307
|
-
const: !0
|
|
2308
|
-
}
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
},
|
|
2315
|
-
rules: {
|
|
2316
|
-
type: "object",
|
|
2317
|
-
properties: {
|
|
2318
|
-
canAccept: {
|
|
2319
|
-
type: "object",
|
|
2320
|
-
const: {
|
|
2321
|
-
anyOf: [
|
|
2322
|
-
{
|
|
2323
|
-
children: 0
|
|
2324
|
-
},
|
|
2325
|
-
{
|
|
2326
|
-
children: {
|
|
2327
|
-
length: {
|
|
2328
|
-
not: 1
|
|
2329
|
-
},
|
|
2330
|
-
"f-struct-like-card": !0
|
|
2331
|
-
}
|
|
2332
|
-
},
|
|
2333
|
-
{
|
|
2334
|
-
children: {
|
|
2335
|
-
"scroll-spy": !1,
|
|
2336
|
-
"f-page-content": !1,
|
|
2337
|
-
"f-struct-like-card": !1
|
|
2338
|
-
}
|
|
2339
|
-
}
|
|
2340
|
-
]
|
|
2341
|
-
}
|
|
2342
|
-
},
|
|
2343
|
-
fixed: {
|
|
2344
|
-
type: "boolean",
|
|
2345
|
-
const: !0
|
|
2346
|
-
},
|
|
2347
|
-
hidePadding: {
|
|
2348
|
-
type: "boolean",
|
|
2349
|
-
const: !0
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
|
-
}
|
|
2353
|
-
}
|
|
2354
|
-
},
|
|
2355
|
-
"f-page-footer": {
|
|
2356
|
-
description: "The class of page footer designed by farris.",
|
|
2357
|
-
type: "string"
|
|
2358
|
-
}
|
|
2359
|
-
}
|
|
2360
|
-
},
|
|
2361
|
-
rules: {
|
|
2362
|
-
type: "object",
|
|
2363
|
-
properties: {
|
|
2364
|
-
canAccept: {
|
|
2365
|
-
type: "boolean",
|
|
2366
|
-
const: !1
|
|
2367
|
-
},
|
|
2368
|
-
fixed: {
|
|
2369
|
-
type: "boolean",
|
|
2370
|
-
const: !0
|
|
2371
|
-
},
|
|
2372
|
-
hidePadding: {
|
|
2373
|
-
type: "boolean",
|
|
2374
|
-
const: !0
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2379
|
-
},
|
|
2380
|
-
"f-page-is-managelist": {
|
|
2381
|
-
description: "The root class of mangement list page.",
|
|
2382
|
-
type: "string"
|
|
2383
|
-
},
|
|
2384
|
-
"f-page-card": {
|
|
2385
|
-
description: "",
|
|
2386
|
-
type: "object"
|
|
2387
|
-
},
|
|
2388
|
-
"f-page-is-mainsubcard": {
|
|
2389
|
-
description: "",
|
|
2390
|
-
type: "object"
|
|
2391
|
-
}
|
|
2392
|
-
}, Jt = {
|
|
2393
|
-
$schema: Wt,
|
|
2394
|
-
$id: Ut,
|
|
2395
|
-
title: qt,
|
|
2396
|
-
description: Ht,
|
|
2397
|
-
type: zt,
|
|
2398
|
-
properties: Gt
|
|
2399
|
-
}, re = /* @__PURE__ */ new Map();
|
|
2400
|
-
function Ae() {
|
|
2401
|
-
function n(l, C, w, j) {
|
|
2402
|
-
var I;
|
|
2403
|
-
if (typeof w == "number")
|
|
2404
|
-
return ((I = j[l]) == null ? void 0 : I.length) === w;
|
|
2405
|
-
if (typeof w == "object") {
|
|
2406
|
-
const D = Object.keys(w)[0], A = w[D];
|
|
2407
|
-
if (D === "not")
|
|
2408
|
-
return Number(j[l].length) !== Number(A);
|
|
2409
|
-
if (D === "moreThan")
|
|
2410
|
-
return Number(j[l].length) >= Number(A);
|
|
2411
|
-
if (D === "lessThan")
|
|
2412
|
-
return Number(j[l].length) <= Number(A);
|
|
2413
|
-
}
|
|
2414
|
-
return !1;
|
|
2415
|
-
}
|
|
2416
|
-
function e(l, C, w, j) {
|
|
2417
|
-
return typeof w == "boolean" ? j.childrenClassList.includes(C) === !!w : !1;
|
|
2418
|
-
}
|
|
2419
|
-
function t(l, C, w, j) {
|
|
2420
|
-
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2421
|
-
}
|
|
2422
|
-
function s(l, C, w, j) {
|
|
2423
|
-
return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
|
|
2424
|
-
}
|
|
2425
|
-
const c = /* @__PURE__ */ new Map([
|
|
2426
|
-
["length", n],
|
|
2427
|
-
["hasChildren", e],
|
|
2428
|
-
["hasSibling", s],
|
|
2429
|
-
["hasParent", t]
|
|
2430
|
-
]);
|
|
2431
|
-
function g(l, C) {
|
|
2432
|
-
const w = l;
|
|
2433
|
-
return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((j) => {
|
|
2434
|
-
if (j === "length")
|
|
2435
|
-
return { target: w, operator: "length", param: null, value: C[j] };
|
|
2436
|
-
const I = j, D = C[j];
|
|
2437
|
-
return { target: w, operator: l === "children" ? "hasChildren" : l === "parent" ? "hasParent" : "hasSibling", param: I, value: D };
|
|
2438
|
-
}) : [];
|
|
2439
|
-
}
|
|
2440
|
-
function d(l, C) {
|
|
2441
|
-
if (c.has(l.operator)) {
|
|
2442
|
-
const w = c.get(l.operator);
|
|
2443
|
-
return w && w(l.target, l.param, l.value, C) || !1;
|
|
2444
|
-
}
|
|
2445
|
-
return !1;
|
|
2446
|
-
}
|
|
2447
|
-
function P(l, C) {
|
|
2448
|
-
return Object.keys(l).reduce((D, A) => {
|
|
2449
|
-
const $ = g(A, l[A]);
|
|
2450
|
-
return D.push(...$), D;
|
|
2451
|
-
}, []).reduce((D, A) => D && d(A, C), !0);
|
|
2452
|
-
}
|
|
2453
|
-
function S(l, C) {
|
|
2454
|
-
const w = Object.keys(l), j = w.includes("allOf"), I = w.includes("anyOf"), D = j || I, v = (D ? l[D ? j ? "allOf" : "anyOf" : "allOf"] : [l]).map((x) => P(x, C));
|
|
2455
|
-
return j ? !v.includes(!1) : v.includes(!0);
|
|
2456
|
-
}
|
|
2457
|
-
function y(l, C) {
|
|
2458
|
-
const w = l.const;
|
|
2459
|
-
return w ? typeof w == "boolean" ? w : typeof w == "object" ? S(w, C) : !1 : !1;
|
|
2460
|
-
}
|
|
2461
|
-
function T(l) {
|
|
2462
|
-
return (C) => {
|
|
2463
|
-
const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
2464
|
-
return l && l.properties && Object.keys(l.properties).reduce((j, I) => {
|
|
2465
|
-
const D = l.properties[I];
|
|
2466
|
-
return j[I] = y(D, C), j;
|
|
2467
|
-
}, w), w;
|
|
2468
|
-
};
|
|
2469
|
-
}
|
|
2470
|
-
function p(l, C, w) {
|
|
2471
|
-
if (C.type === "object" && C.properties) {
|
|
2472
|
-
const { rules: j, contents: I } = C.properties;
|
|
2473
|
-
w.set(l, T(j)), I && Object.keys(I.properties).forEach(
|
|
2474
|
-
(D) => p(D, I.properties[D], w)
|
|
2475
|
-
);
|
|
2476
|
-
}
|
|
2477
|
-
}
|
|
2478
|
-
function i() {
|
|
2479
|
-
const { properties: l } = Jt;
|
|
2480
|
-
Object.keys(l).forEach((C) => {
|
|
2481
|
-
p(C, l[C], re);
|
|
2482
|
-
});
|
|
2483
|
-
}
|
|
2484
|
-
function f(l, C) {
|
|
2485
|
-
const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
2486
|
-
return re.has(l) ? re.get(l)(C) : w;
|
|
2487
|
-
}
|
|
2488
|
-
return i(), { getRuleValue: f };
|
|
2489
|
-
}
|
|
2490
|
-
class Qt extends ee {
|
|
1731
|
+
class Ft extends ee {
|
|
2491
1732
|
constructor(e, t) {
|
|
2492
1733
|
super(e, t);
|
|
2493
1734
|
}
|
|
@@ -2556,85 +1797,40 @@ class Qt extends ee {
|
|
|
2556
1797
|
};
|
|
2557
1798
|
}
|
|
2558
1799
|
}
|
|
2559
|
-
function
|
|
2560
|
-
const
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? v.sourceType === "control" && v.controlCategory === "input" || v.sourceType === "move" && v.controlType === "form-group" : !0;
|
|
2564
|
-
}
|
|
2565
|
-
function p(v) {
|
|
2566
|
-
return !Vt().basalDragulaRuleForContainer(v) || !P || !T(v), !1;
|
|
2567
|
-
}
|
|
2568
|
-
function i() {
|
|
2569
|
-
g.value = !1, d.value = !1;
|
|
2570
|
-
const v = n, m = v.appearance && v.appearance.class || "", x = m.split(" "), k = v.buttons || [], u = k.length ? k[0] : null, r = u && u.appearance ? u.appearance.class : "", o = r ? r.split(" ") : [], a = k.length ? k.reduce((_, W) => {
|
|
2571
|
-
const q = W && W.appearance ? W.appearance.class : "", te = q ? q.split(" ") : [];
|
|
2572
|
-
return _.push(...te), _;
|
|
2573
|
-
}, []) : [], h = t == null ? void 0 : t.schema, B = h && h.appearance && h.appearance.class || "", E = B ? B.split(" ") : [];
|
|
2574
|
-
y = {
|
|
2575
|
-
componentClass: m,
|
|
2576
|
-
componentClassList: x,
|
|
2577
|
-
childContents: k,
|
|
2578
|
-
firstChildContent: u,
|
|
2579
|
-
firstChildClass: r,
|
|
2580
|
-
firstChildClassList: o,
|
|
2581
|
-
parent: h,
|
|
2582
|
-
parentClass: B,
|
|
2583
|
-
parentClassList: E,
|
|
2584
|
-
children: k,
|
|
2585
|
-
childrenClassList: a
|
|
2586
|
-
};
|
|
2587
|
-
const { canAccept: R, fixed: L, hidePadding: N } = c.getRuleValue(x[0], y);
|
|
2588
|
-
return P = R, S = N, !0;
|
|
2589
|
-
}
|
|
2590
|
-
function f(v) {
|
|
2591
|
-
}
|
|
2592
|
-
function l() {
|
|
2593
|
-
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
2594
|
-
}
|
|
2595
|
-
function C(v, m) {
|
|
2596
|
-
return m.text = v.label, m;
|
|
1800
|
+
function Lt(n, e) {
|
|
1801
|
+
const t = n.schema;
|
|
1802
|
+
function s(b) {
|
|
1803
|
+
return !1;
|
|
2597
1804
|
}
|
|
2598
|
-
function
|
|
2599
|
-
|
|
2600
|
-
if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
2601
|
-
const o = String(v.innerText), a = U("form-group");
|
|
2602
|
-
return a.editor = x, a.label = o, a;
|
|
2603
|
-
}
|
|
2604
|
-
return x;
|
|
1805
|
+
function i(b, l) {
|
|
1806
|
+
return l.text = b.label, l;
|
|
2605
1807
|
}
|
|
2606
|
-
function
|
|
1808
|
+
function p() {
|
|
2607
1809
|
return !1;
|
|
2608
1810
|
}
|
|
2609
|
-
function
|
|
1811
|
+
function u() {
|
|
2610
1812
|
return !1;
|
|
2611
1813
|
}
|
|
2612
|
-
function
|
|
1814
|
+
function y() {
|
|
2613
1815
|
return !0;
|
|
2614
1816
|
}
|
|
2615
|
-
function
|
|
2616
|
-
return
|
|
1817
|
+
function w() {
|
|
1818
|
+
return !0;
|
|
2617
1819
|
}
|
|
2618
|
-
function
|
|
2619
|
-
return new
|
|
1820
|
+
function h(b) {
|
|
1821
|
+
return new Ft(b, e).getPropertyConfig(t);
|
|
2620
1822
|
}
|
|
2621
1823
|
return {
|
|
2622
|
-
canAccepts:
|
|
2623
|
-
checkCanAddComponent:
|
|
2624
|
-
checkCanDeleteComponent:
|
|
2625
|
-
checkCanMoveComponent:
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
onAcceptMovedChildElement: f,
|
|
2630
|
-
onResolveNewComponentSchema: C,
|
|
2631
|
-
resolveComponentContext: i,
|
|
2632
|
-
getPropsConfig: $,
|
|
2633
|
-
triggerBelongedComponentToMoveWhenMoved: g,
|
|
2634
|
-
triggerBelongedComponentToDeleteWhenDeleted: d
|
|
1824
|
+
canAccepts: s,
|
|
1825
|
+
checkCanAddComponent: y,
|
|
1826
|
+
checkCanDeleteComponent: u,
|
|
1827
|
+
checkCanMoveComponent: p,
|
|
1828
|
+
hideNestedPaddingInDesginerView: w,
|
|
1829
|
+
onResolveNewComponentSchema: i,
|
|
1830
|
+
getPropsConfig: h
|
|
2635
1831
|
};
|
|
2636
1832
|
}
|
|
2637
|
-
const
|
|
1833
|
+
const Vt = {
|
|
2638
1834
|
id: { type: String, default: "" },
|
|
2639
1835
|
componentId: { type: String, default: "" },
|
|
2640
1836
|
canAdd: { type: Boolean, default: !1 },
|
|
@@ -2647,12 +1843,12 @@ const Yt = {
|
|
|
2647
1843
|
* 组件值
|
|
2648
1844
|
*/
|
|
2649
1845
|
modelValue: { type: Object }
|
|
2650
|
-
}, X =
|
|
2651
|
-
function
|
|
2652
|
-
const t = e.getBoundingClientRect(), s = n.getBoundingClientRect(),
|
|
2653
|
-
return
|
|
1846
|
+
}, X = S(0);
|
|
1847
|
+
function Ut(n, e) {
|
|
1848
|
+
const t = e.getBoundingClientRect(), s = n.getBoundingClientRect(), i = s.top >= t.top, p = s.top <= t.bottom;
|
|
1849
|
+
return i && p;
|
|
2654
1850
|
}
|
|
2655
|
-
function
|
|
1851
|
+
function Wt(n) {
|
|
2656
1852
|
if (!n)
|
|
2657
1853
|
return;
|
|
2658
1854
|
let e;
|
|
@@ -2663,238 +1859,230 @@ function Kt(n) {
|
|
|
2663
1859
|
return;
|
|
2664
1860
|
const s = e.querySelector(".component-btn-group");
|
|
2665
1861
|
if (s) {
|
|
2666
|
-
if (!
|
|
1862
|
+
if (!Ut(e, n)) {
|
|
2667
1863
|
s.style.display = "none";
|
|
2668
1864
|
return;
|
|
2669
1865
|
}
|
|
2670
1866
|
s.style.display = "";
|
|
2671
|
-
const
|
|
2672
|
-
if (
|
|
2673
|
-
const
|
|
2674
|
-
|
|
1867
|
+
const p = s.getBoundingClientRect(), u = s.querySelector("div");
|
|
1868
|
+
if (u) {
|
|
1869
|
+
const y = u.getBoundingClientRect();
|
|
1870
|
+
u.style.top = p.top + "px", u.style.left = p.left - y.width + "px";
|
|
2675
1871
|
}
|
|
2676
1872
|
}
|
|
2677
1873
|
}
|
|
2678
|
-
function
|
|
2679
|
-
var
|
|
1874
|
+
function qt(n, e, t) {
|
|
1875
|
+
var B;
|
|
2680
1876
|
function s() {
|
|
2681
1877
|
}
|
|
2682
|
-
const
|
|
2683
|
-
function
|
|
1878
|
+
const i = "", p = S();
|
|
1879
|
+
function u() {
|
|
2684
1880
|
return !0;
|
|
2685
1881
|
}
|
|
2686
|
-
function
|
|
1882
|
+
function y() {
|
|
2687
1883
|
return !1;
|
|
2688
1884
|
}
|
|
2689
|
-
function
|
|
1885
|
+
function w() {
|
|
2690
1886
|
return !0;
|
|
2691
1887
|
}
|
|
2692
|
-
function
|
|
1888
|
+
function h() {
|
|
2693
1889
|
return !0;
|
|
2694
1890
|
}
|
|
2695
|
-
function
|
|
1891
|
+
function b() {
|
|
2696
1892
|
return !0;
|
|
2697
1893
|
}
|
|
2698
|
-
function
|
|
2699
|
-
if (!
|
|
1894
|
+
function l(P) {
|
|
1895
|
+
if (!P || !P.value)
|
|
2700
1896
|
return null;
|
|
2701
|
-
const
|
|
2702
|
-
return
|
|
1897
|
+
const x = S(P == null ? void 0 : P.value.parent), C = l(x);
|
|
1898
|
+
return C || null;
|
|
2703
1899
|
}
|
|
2704
|
-
function
|
|
2705
|
-
const { componentInstance:
|
|
2706
|
-
return !
|
|
1900
|
+
function c(P = e) {
|
|
1901
|
+
const { componentInstance: x, designerItemElementRef: C } = P;
|
|
1902
|
+
return !x || !x.value ? null : x.value.canMove || x.value.canAdd || x.value.canDelete ? C : c(P.parent);
|
|
2707
1903
|
}
|
|
2708
|
-
function f(
|
|
1904
|
+
function f(P) {
|
|
2709
1905
|
return !!t;
|
|
2710
1906
|
}
|
|
2711
|
-
function
|
|
1907
|
+
function v() {
|
|
2712
1908
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
2713
1909
|
}
|
|
2714
|
-
function
|
|
2715
|
-
}
|
|
2716
|
-
function w(v, m) {
|
|
1910
|
+
function k() {
|
|
2717
1911
|
}
|
|
2718
|
-
function
|
|
2719
|
-
const { componentType: m } = v;
|
|
2720
|
-
let x = U(m, v);
|
|
2721
|
-
const k = m.toLowerCase().replace("-", "_");
|
|
2722
|
-
return x && !x.id && x.type === m && (x.id = `${k}_${Math.random().toString().slice(2, 6)}`), x;
|
|
1912
|
+
function A(P, x) {
|
|
2723
1913
|
}
|
|
2724
|
-
function
|
|
2725
|
-
const
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
return r && !r.id && r.type === x && (r.id = `${o}_${Math.random().toString().slice(2, 6)}`), r;
|
|
1914
|
+
function $(P) {
|
|
1915
|
+
const { componentType: x } = P;
|
|
1916
|
+
let C = Q(x, P);
|
|
1917
|
+
const I = x.toLowerCase().replace("-", "_");
|
|
1918
|
+
return C && !C.id && C.type === x && (C.id = `${I}_${Math.random().toString().slice(2, 6)}`), C;
|
|
2730
1919
|
}
|
|
2731
|
-
function
|
|
1920
|
+
function _(P) {
|
|
2732
1921
|
}
|
|
2733
|
-
function
|
|
1922
|
+
function T(...P) {
|
|
2734
1923
|
return [];
|
|
2735
1924
|
}
|
|
2736
|
-
return
|
|
2737
|
-
canMove:
|
|
2738
|
-
canSelectParent:
|
|
2739
|
-
canAdd:
|
|
2740
|
-
canDelete:
|
|
2741
|
-
canNested: !
|
|
1925
|
+
return p.value = {
|
|
1926
|
+
canMove: u(),
|
|
1927
|
+
canSelectParent: y(),
|
|
1928
|
+
canAdd: h(),
|
|
1929
|
+
canDelete: w(),
|
|
1930
|
+
canNested: !b(),
|
|
2742
1931
|
contents: [],
|
|
2743
1932
|
elementRef: n,
|
|
2744
|
-
parent: (
|
|
1933
|
+
parent: (B = e.parent) == null ? void 0 : B.componentInstance,
|
|
2745
1934
|
schema: e.schema,
|
|
2746
|
-
styles:
|
|
1935
|
+
styles: i,
|
|
2747
1936
|
canAccepts: f,
|
|
2748
|
-
getBelongedComponentInstance:
|
|
2749
|
-
getDraggableDesignItemElement:
|
|
2750
|
-
getDraggingDisplayText:
|
|
2751
|
-
getPropConfig:
|
|
2752
|
-
getDragScopeElement:
|
|
2753
|
-
onAcceptMovedChildElement:
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
addNewChildComponentSchema: j,
|
|
1937
|
+
getBelongedComponentInstance: l,
|
|
1938
|
+
getDraggableDesignItemElement: c,
|
|
1939
|
+
getDraggingDisplayText: v,
|
|
1940
|
+
getPropConfig: T,
|
|
1941
|
+
getDragScopeElement: k,
|
|
1942
|
+
onAcceptMovedChildElement: A,
|
|
1943
|
+
onChildElementMovedOut: _,
|
|
1944
|
+
addNewChildComponentSchema: $,
|
|
2757
1945
|
updateDragAndDropRules: s,
|
|
2758
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
2759
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
2760
|
-
},
|
|
1946
|
+
triggerBelongedComponentToMoveWhenMoved: S(!1),
|
|
1947
|
+
triggerBelongedComponentToDeleteWhenDeleted: S(!1)
|
|
1948
|
+
}, p;
|
|
2761
1949
|
}
|
|
2762
|
-
const
|
|
1950
|
+
const Ee = /* @__PURE__ */ U({
|
|
2763
1951
|
name: "FDesignerInnerItem",
|
|
2764
|
-
props:
|
|
1952
|
+
props: Vt,
|
|
2765
1953
|
emits: ["selectionChange", "addComponent", "removeComponent"],
|
|
2766
1954
|
setup(n, e) {
|
|
2767
|
-
const t =
|
|
2768
|
-
designerItemElementRef:
|
|
1955
|
+
const t = S(n.canMove), s = S(n.canAdd), i = S(n.canDelete), p = S(!1), u = S(n.contentKey), y = S(n.childType), w = S(n.childLabel), h = S(n.modelValue), b = S(""), l = S(), c = V("canvas-dragula"), f = S(), v = V("design-item-context"), k = {
|
|
1956
|
+
designerItemElementRef: l,
|
|
2769
1957
|
componentInstance: f,
|
|
2770
|
-
schema:
|
|
2771
|
-
parent:
|
|
1958
|
+
schema: h.value,
|
|
1959
|
+
parent: v,
|
|
2772
1960
|
setupContext: e
|
|
2773
1961
|
};
|
|
2774
|
-
|
|
2775
|
-
const
|
|
1962
|
+
_e("design-item-context", k);
|
|
1963
|
+
const A = N(() => ({
|
|
2776
1964
|
"farris-component": !0,
|
|
2777
1965
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
2778
1966
|
"flex-fill": n.id == "root-component",
|
|
2779
|
-
"position-relative": t.value ||
|
|
2780
|
-
"farris-nested":
|
|
1967
|
+
"position-relative": t.value || i.value,
|
|
1968
|
+
"farris-nested": p.value,
|
|
2781
1969
|
"can-move": t.value,
|
|
2782
|
-
"d-none":
|
|
2783
|
-
})),
|
|
1970
|
+
"d-none": l.value && l.value.classList.contains("d-none")
|
|
1971
|
+
})), $ = N(() => {
|
|
2784
1972
|
const o = {};
|
|
2785
|
-
return
|
|
2786
|
-
const [
|
|
2787
|
-
return
|
|
1973
|
+
return b.value && b.value.split(";").reduce((a, m) => {
|
|
1974
|
+
const [M, D] = m.split(":");
|
|
1975
|
+
return M && (a[M] = D), a;
|
|
2788
1976
|
}, o), o;
|
|
2789
1977
|
});
|
|
2790
|
-
function
|
|
2791
|
-
if (
|
|
2792
|
-
const
|
|
2793
|
-
if (
|
|
2794
|
-
const
|
|
2795
|
-
|
|
1978
|
+
function _(o, a) {
|
|
1979
|
+
if (v && v.schema[u.value]) {
|
|
1980
|
+
const m = v.schema[u.value].findIndex((M) => M.id === a.id);
|
|
1981
|
+
if (m > -1) {
|
|
1982
|
+
const M = v.schema[u.value].length, D = v.schema[u.value][m % M];
|
|
1983
|
+
v.designerItemElementRef.value.querySelector(`#${D.id}-design-item`), v.schema[u.value].splice(m, 1), v.componentInstance.value.updateDragAndDropRules(), X.value++, e.emit("removeComponent");
|
|
2796
1984
|
}
|
|
2797
1985
|
}
|
|
2798
1986
|
}
|
|
2799
|
-
function
|
|
1987
|
+
function T(o) {
|
|
2800
1988
|
if (f.value.addNewChildComponentSchema) {
|
|
2801
1989
|
const a = {
|
|
2802
|
-
componentType:
|
|
2803
|
-
label:
|
|
1990
|
+
componentType: y.value,
|
|
1991
|
+
label: w.value,
|
|
2804
1992
|
parentComponentInstance: f.value,
|
|
2805
1993
|
targetPosition: -1
|
|
2806
|
-
},
|
|
2807
|
-
|
|
1994
|
+
}, m = f.value.addNewChildComponentSchema(a);
|
|
1995
|
+
h.value[u.value].push(m), e.emit("addComponent");
|
|
2808
1996
|
}
|
|
2809
1997
|
}
|
|
2810
|
-
function
|
|
2811
|
-
return s.value &&
|
|
1998
|
+
function B() {
|
|
1999
|
+
return s.value && g("div", {
|
|
2812
2000
|
role: "button",
|
|
2813
2001
|
class: "btn component-settings-button",
|
|
2814
2002
|
title: "新增",
|
|
2815
2003
|
ref: "removeComponent",
|
|
2816
2004
|
onClick: (o) => {
|
|
2817
|
-
|
|
2005
|
+
T();
|
|
2818
2006
|
}
|
|
2819
|
-
}, [
|
|
2007
|
+
}, [g("i", {
|
|
2820
2008
|
class: "f-icon f-icon-plus-circle"
|
|
2821
2009
|
}, null)]);
|
|
2822
2010
|
}
|
|
2823
|
-
function
|
|
2824
|
-
return
|
|
2011
|
+
function P(o) {
|
|
2012
|
+
return i.value && g("div", {
|
|
2825
2013
|
role: "button",
|
|
2826
2014
|
class: "btn component-settings-button",
|
|
2827
2015
|
title: "删除",
|
|
2828
2016
|
ref: "removeComponent",
|
|
2829
|
-
onClick:
|
|
2830
|
-
}, [
|
|
2017
|
+
onClick: Fe((a) => _(a, o), ["stop"])
|
|
2018
|
+
}, [g("i", {
|
|
2831
2019
|
class: "f-icon f-icon-yxs_delete"
|
|
2832
2020
|
}, null)]);
|
|
2833
2021
|
}
|
|
2834
|
-
function
|
|
2835
|
-
return t.value &&
|
|
2022
|
+
function x() {
|
|
2023
|
+
return t.value && g("div", {
|
|
2836
2024
|
role: "button",
|
|
2837
2025
|
class: "btn component-settings-button",
|
|
2838
2026
|
title: "移动",
|
|
2839
2027
|
ref: "moveComponent"
|
|
2840
|
-
}, [
|
|
2028
|
+
}, [g("i", {
|
|
2841
2029
|
"data-dragging-icon": "true",
|
|
2842
2030
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
2843
2031
|
}, null)]);
|
|
2844
2032
|
}
|
|
2845
|
-
function
|
|
2846
|
-
return
|
|
2033
|
+
function C(o) {
|
|
2034
|
+
return g("div", {
|
|
2847
2035
|
class: "component-btn-group",
|
|
2848
2036
|
"data-noattach": "true"
|
|
2849
|
-
}, [
|
|
2037
|
+
}, [g("div", null, [B(), x(), P(o)])]);
|
|
2850
2038
|
}
|
|
2851
|
-
|
|
2852
|
-
|
|
2039
|
+
q(() => n.modelValue, (o) => {
|
|
2040
|
+
h.value = o, k.schema = o;
|
|
2853
2041
|
});
|
|
2854
|
-
function
|
|
2042
|
+
function I(o) {
|
|
2855
2043
|
const a = o.target;
|
|
2856
|
-
|
|
2044
|
+
Wt(a);
|
|
2857
2045
|
}
|
|
2858
|
-
function
|
|
2046
|
+
function O() {
|
|
2859
2047
|
var o, a;
|
|
2860
|
-
(a = (o =
|
|
2048
|
+
(a = (o = h.value) == null ? void 0 : o.contents) != null && a.length && l.value && l.value.addEventListener("scroll", I);
|
|
2861
2049
|
}
|
|
2862
|
-
function
|
|
2863
|
-
const o =
|
|
2864
|
-
return
|
|
2050
|
+
function d() {
|
|
2051
|
+
const o = l.value, a = S(o.children[1]);
|
|
2052
|
+
return qt(a, k).value;
|
|
2865
2053
|
}
|
|
2866
2054
|
H(() => {
|
|
2867
|
-
if (
|
|
2868
|
-
const o =
|
|
2869
|
-
f.value = o && o.componentInstance ? o.componentInstance.value :
|
|
2055
|
+
if (l.value) {
|
|
2056
|
+
const o = l.value.querySelector(`[data-dragref='${h.value.id}-container']`);
|
|
2057
|
+
f.value = o && o.componentInstance ? o.componentInstance.value : d(), c && o && c.attachComponents(o, h.value), p.value = f.value.canNested !== void 0 ? f.value.canNested : p.value, s.value = f.value.canAdd !== void 0 ? f.value.canAdd : s.value, i.value = f.value.canDelete !== void 0 ? f.value.canDelete : i.value, t.value = f.value.canMove !== void 0 ? f.value.canMove : t.value, b.value = f.value.styles || "", l.value && (l.value.componentInstance = f, l.value.designItemContext = k);
|
|
2870
2058
|
}
|
|
2871
|
-
|
|
2872
|
-
}),
|
|
2873
|
-
|
|
2059
|
+
O(), X.value++;
|
|
2060
|
+
}), Ne(() => {
|
|
2061
|
+
l.value && l.value.removeEventListener("scroll", I);
|
|
2874
2062
|
});
|
|
2875
2063
|
function r(o) {
|
|
2876
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
2877
|
-
const a =
|
|
2064
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((m) => m.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
|
|
2065
|
+
const a = l.value;
|
|
2878
2066
|
if (a) {
|
|
2879
|
-
const
|
|
2880
|
-
if (!(
|
|
2881
|
-
Array.from(
|
|
2882
|
-
const
|
|
2883
|
-
|
|
2067
|
+
const m = document.getElementsByClassName("dgComponentSelected");
|
|
2068
|
+
if (!(m && m.length === 1 && m[0] === l.value)) {
|
|
2069
|
+
Array.from(m).forEach((E) => E.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", h.value.type, h.value, n.componentId, f.value);
|
|
2070
|
+
const D = f.value.getDraggableDesignItemElement(k);
|
|
2071
|
+
D && D.value && D.value.classList.add("dgComponentSelected");
|
|
2884
2072
|
}
|
|
2885
2073
|
}
|
|
2886
2074
|
X.value++;
|
|
2887
2075
|
}
|
|
2888
|
-
return () =>
|
|
2076
|
+
return () => g("div", {
|
|
2889
2077
|
id: `${n.id}-design-item`,
|
|
2890
|
-
ref:
|
|
2891
|
-
class:
|
|
2892
|
-
style:
|
|
2078
|
+
ref: l,
|
|
2079
|
+
class: A.value,
|
|
2080
|
+
style: $.value,
|
|
2893
2081
|
onClick: r
|
|
2894
|
-
}, [
|
|
2082
|
+
}, [C(h.value), e.slots.default && e.slots.default()]);
|
|
2895
2083
|
}
|
|
2896
2084
|
});
|
|
2897
|
-
class
|
|
2085
|
+
class Ht extends ee {
|
|
2898
2086
|
constructor(e, t) {
|
|
2899
2087
|
super(e, t);
|
|
2900
2088
|
}
|
|
@@ -2957,33 +2145,33 @@ class tn extends ee {
|
|
|
2957
2145
|
}
|
|
2958
2146
|
];
|
|
2959
2147
|
var s = this;
|
|
2960
|
-
const
|
|
2961
|
-
|
|
2148
|
+
const i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), p = {};
|
|
2149
|
+
p[s.viewModelId] = {
|
|
2962
2150
|
type: "events-editor",
|
|
2963
2151
|
editor: {
|
|
2964
|
-
initialData:
|
|
2152
|
+
initialData: i
|
|
2965
2153
|
}
|
|
2966
2154
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
2967
2155
|
title: "事件",
|
|
2968
2156
|
hideTitle: !0,
|
|
2969
|
-
properties:
|
|
2157
|
+
properties: p,
|
|
2970
2158
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2971
2159
|
refreshPanelAfterChanged: !0,
|
|
2972
2160
|
tabId: "commands",
|
|
2973
2161
|
tabName: "交互",
|
|
2974
|
-
setPropertyRelates(
|
|
2975
|
-
const
|
|
2976
|
-
delete e[s.viewModelId],
|
|
2162
|
+
setPropertyRelates(u, y) {
|
|
2163
|
+
const w = u.propertyValue;
|
|
2164
|
+
delete e[s.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, w.events, w));
|
|
2977
2165
|
}
|
|
2978
2166
|
};
|
|
2979
2167
|
}
|
|
2980
2168
|
}
|
|
2981
|
-
class
|
|
2169
|
+
class zt extends ee {
|
|
2982
2170
|
constructor(e, t) {
|
|
2983
2171
|
super(e, t);
|
|
2984
2172
|
}
|
|
2985
2173
|
getPropertyConfig(e) {
|
|
2986
|
-
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
|
|
2174
|
+
return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
|
|
2987
2175
|
}
|
|
2988
2176
|
getBasicPropConfig() {
|
|
2989
2177
|
this.propertyConfig.categories.basic = {
|
|
@@ -3021,6 +2209,20 @@ class nn extends ee {
|
|
|
3021
2209
|
}
|
|
3022
2210
|
};
|
|
3023
2211
|
}
|
|
2212
|
+
getbBehaviorConfig() {
|
|
2213
|
+
this.propertyConfig.categories.behavior = {
|
|
2214
|
+
title: "行为",
|
|
2215
|
+
description: "Behavior",
|
|
2216
|
+
properties: {
|
|
2217
|
+
disabled: {
|
|
2218
|
+
title: "禁用状态",
|
|
2219
|
+
type: "boolean",
|
|
2220
|
+
description: "按钮禁用状态",
|
|
2221
|
+
refreshPanelAfterChanged: !0
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
}
|
|
3024
2226
|
getAppearanceProperties(e) {
|
|
3025
2227
|
this.propertyConfig.categories.appearance = {
|
|
3026
2228
|
title: "样式",
|
|
@@ -3029,12 +2231,8 @@ class nn extends ee {
|
|
|
3029
2231
|
class: {
|
|
3030
2232
|
title: "class",
|
|
3031
2233
|
type: "string",
|
|
3032
|
-
description: ""
|
|
3033
|
-
|
|
3034
|
-
style: {
|
|
3035
|
-
title: "style",
|
|
3036
|
-
type: "string",
|
|
3037
|
-
description: ""
|
|
2234
|
+
description: "",
|
|
2235
|
+
$converter: "/converter/appearance.converter"
|
|
3038
2236
|
}
|
|
3039
2237
|
}
|
|
3040
2238
|
};
|
|
@@ -3045,277 +2243,247 @@ class nn extends ee {
|
|
|
3045
2243
|
label: "onClick",
|
|
3046
2244
|
name: "点击事件"
|
|
3047
2245
|
}
|
|
3048
|
-
], s = this,
|
|
3049
|
-
|
|
2246
|
+
], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), p = {};
|
|
2247
|
+
p[s.viewModelId] = {
|
|
3050
2248
|
type: "events-editor",
|
|
3051
2249
|
editor: {
|
|
3052
|
-
initialData:
|
|
2250
|
+
initialData: i
|
|
3053
2251
|
}
|
|
3054
2252
|
}, this.propertyConfig.categories.eventsEditor = {
|
|
3055
2253
|
title: "事件",
|
|
3056
2254
|
hideTitle: !0,
|
|
3057
|
-
properties:
|
|
2255
|
+
properties: p,
|
|
3058
2256
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
3059
2257
|
refreshPanelAfterChanged: !0,
|
|
3060
2258
|
tabId: "commands",
|
|
3061
2259
|
tabName: "交互",
|
|
3062
|
-
setPropertyRelates(
|
|
3063
|
-
const
|
|
3064
|
-
delete e[s.viewModelId],
|
|
2260
|
+
setPropertyRelates(u, y) {
|
|
2261
|
+
const w = u.propertyValue;
|
|
2262
|
+
delete e[s.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, w.events, w));
|
|
3065
2263
|
}
|
|
3066
2264
|
};
|
|
3067
2265
|
}
|
|
3068
2266
|
}
|
|
3069
|
-
function
|
|
3070
|
-
|
|
3071
|
-
const t = M(!1), s = M(!1);
|
|
3072
|
-
let c = !1, g = !1;
|
|
3073
|
-
function d(w) {
|
|
2267
|
+
function Gt(n, e) {
|
|
2268
|
+
function t(y) {
|
|
3074
2269
|
return !1;
|
|
3075
2270
|
}
|
|
3076
|
-
function
|
|
3077
|
-
}
|
|
3078
|
-
function S() {
|
|
3079
|
-
return "";
|
|
3080
|
-
}
|
|
3081
|
-
function y(w, j) {
|
|
3082
|
-
return j.text = w.label, j;
|
|
3083
|
-
}
|
|
3084
|
-
function T(w, j, I) {
|
|
3085
|
-
const D = n.schema;
|
|
3086
|
-
if ((D.appearance && D.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3087
|
-
const v = String(w.innerText), m = U("form-group");
|
|
3088
|
-
return m.editor = I, m.label = v, m;
|
|
3089
|
-
}
|
|
3090
|
-
return I;
|
|
3091
|
-
}
|
|
3092
|
-
function p() {
|
|
2271
|
+
function s() {
|
|
3093
2272
|
return !1;
|
|
3094
2273
|
}
|
|
3095
2274
|
function i() {
|
|
3096
|
-
return !
|
|
2275
|
+
return !0;
|
|
3097
2276
|
}
|
|
3098
|
-
function
|
|
2277
|
+
function p() {
|
|
3099
2278
|
return !1;
|
|
3100
2279
|
}
|
|
3101
|
-
function
|
|
3102
|
-
|
|
3103
|
-
}
|
|
3104
|
-
function C(w) {
|
|
3105
|
-
let j;
|
|
2280
|
+
function u(y) {
|
|
2281
|
+
let w;
|
|
3106
2282
|
switch (n.schema.type) {
|
|
3107
2283
|
case "tab-toolbar-item":
|
|
3108
|
-
|
|
2284
|
+
w = new Ht(y, e);
|
|
3109
2285
|
break;
|
|
3110
2286
|
default:
|
|
3111
|
-
|
|
2287
|
+
w = new zt(y, e);
|
|
3112
2288
|
}
|
|
3113
|
-
return
|
|
2289
|
+
return w.getPropertyConfig(n.schema);
|
|
3114
2290
|
}
|
|
3115
2291
|
return {
|
|
3116
|
-
canAccepts:
|
|
3117
|
-
|
|
2292
|
+
canAccepts: t,
|
|
2293
|
+
checkCanMoveComponent: s,
|
|
3118
2294
|
checkCanDeleteComponent: i,
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
hideNestedPaddingInDesginerView: l,
|
|
3122
|
-
onAcceptNewChildElement: T,
|
|
3123
|
-
onAcceptMovedChildElement: P,
|
|
3124
|
-
onResolveNewComponentSchema: y,
|
|
3125
|
-
getPropsConfig: C,
|
|
3126
|
-
triggerBelongedComponentToMoveWhenMoved: t,
|
|
3127
|
-
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
2295
|
+
checkCanAddComponent: p,
|
|
2296
|
+
getPropsConfig: u
|
|
3128
2297
|
};
|
|
3129
2298
|
}
|
|
3130
|
-
const
|
|
2299
|
+
const Be = /* @__PURE__ */ U({
|
|
3131
2300
|
name: "FResponseToolbarItemDesign",
|
|
3132
2301
|
props: Me,
|
|
3133
2302
|
emits: ["Click"],
|
|
3134
2303
|
setup(n, e) {
|
|
3135
|
-
|
|
3136
|
-
const t =
|
|
2304
|
+
S(), S();
|
|
2305
|
+
const t = S(n.alignment), s = {
|
|
3137
2306
|
id: "__more_buttons__",
|
|
3138
2307
|
text: "More"
|
|
3139
|
-
},
|
|
3140
|
-
|
|
3141
|
-
const
|
|
2308
|
+
}, i = S(new z(s));
|
|
2309
|
+
N(() => i.value.children.length > 0);
|
|
2310
|
+
const p = S(), u = V("designer-host-service"), y = V("design-item-context"), w = Gt(y, u), h = Ce(p, y, w);
|
|
3142
2311
|
V("toolbar-item-handler", () => {
|
|
3143
2312
|
}), H(() => {
|
|
3144
|
-
|
|
3145
|
-
}), e.expose(
|
|
3146
|
-
function
|
|
2313
|
+
p.value.componentInstance = h;
|
|
2314
|
+
}), e.expose(h.value);
|
|
2315
|
+
function b() {
|
|
3147
2316
|
const f = {
|
|
3148
2317
|
"f-icon": !0
|
|
3149
|
-
},
|
|
3150
|
-
return Y(f,
|
|
2318
|
+
}, v = n.icon ? n.icon.trim() : "";
|
|
2319
|
+
return Y(f, v);
|
|
3151
2320
|
}
|
|
3152
|
-
function
|
|
2321
|
+
function l() {
|
|
3153
2322
|
return !!(n.icon && n.icon.trim());
|
|
3154
2323
|
}
|
|
3155
|
-
function
|
|
2324
|
+
function c() {
|
|
3156
2325
|
const f = {
|
|
3157
2326
|
btn: !0,
|
|
3158
2327
|
"f-rt-btn": !0,
|
|
3159
2328
|
"f-btn-ml": t.value === "right",
|
|
3160
2329
|
"f-btn-mr": t.value === "left",
|
|
3161
|
-
"btn-icontext": !!(n.icon && n.icon.trim())
|
|
2330
|
+
"btn-icontext": !!(n.icon && n.icon.trim()),
|
|
2331
|
+
disabled: n.disabled === !0
|
|
3162
2332
|
};
|
|
3163
2333
|
return Y(f, n.class);
|
|
3164
2334
|
}
|
|
3165
|
-
return
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
ref: g,
|
|
3169
|
-
"data-dragref": `${P.schema.id}-container`,
|
|
2335
|
+
return () => g("div", {
|
|
2336
|
+
ref: p,
|
|
2337
|
+
"data-dragref": `${y.schema.id}-container`,
|
|
3170
2338
|
class: "farris-component position-relative",
|
|
3171
2339
|
style: "display:inline-block!important;"
|
|
3172
|
-
}, [
|
|
2340
|
+
}, [g("button", {
|
|
3173
2341
|
type: "button",
|
|
3174
|
-
class:
|
|
2342
|
+
class: c(),
|
|
3175
2343
|
id: n.id
|
|
3176
|
-
}, [
|
|
3177
|
-
class:
|
|
2344
|
+
}, [l() && g("i", {
|
|
2345
|
+
class: b()
|
|
3178
2346
|
}, null), n.text])]);
|
|
3179
2347
|
}
|
|
3180
|
-
}), Ie = /* @__PURE__ */
|
|
2348
|
+
}), Ie = /* @__PURE__ */ U({
|
|
3181
2349
|
name: "FResponseToolbarDesign",
|
|
3182
|
-
props:
|
|
2350
|
+
props: At,
|
|
3183
2351
|
emits: ["Click"],
|
|
3184
2352
|
setup(n, e) {
|
|
3185
|
-
const t =
|
|
3186
|
-
let s = new Array(t.value.length).fill(
|
|
3187
|
-
const
|
|
2353
|
+
const t = S(n.items);
|
|
2354
|
+
let s = new Array(t.value.length).fill(S());
|
|
2355
|
+
const i = S(), p = S(), u = S(n.alignment), y = {
|
|
3188
2356
|
id: "__more_buttons__",
|
|
3189
2357
|
text: "More"
|
|
3190
|
-
},
|
|
3191
|
-
|
|
3192
|
-
const
|
|
2358
|
+
}, w = S(new z(y)), h = xe();
|
|
2359
|
+
N(() => w.value.children.length > 0);
|
|
2360
|
+
const b = S(), l = V("designer-host-service"), c = V("design-item-context"), f = Lt(c, l), v = Ce(b, c, f);
|
|
3193
2361
|
V("toolbar-item-handler", () => {
|
|
3194
2362
|
}), H(() => {
|
|
3195
|
-
|
|
3196
|
-
}), e.expose(
|
|
3197
|
-
const
|
|
2363
|
+
b.value.componentInstance = v;
|
|
2364
|
+
}), e.expose(v.value);
|
|
2365
|
+
const k = N(() => Y({
|
|
3198
2366
|
"f-toolbar": !0,
|
|
3199
2367
|
"f-response-toolbar": !0,
|
|
3200
2368
|
"position-relative": !0
|
|
3201
|
-
}, n.customClass)),
|
|
2369
|
+
}, n.customClass)), A = N(() => ({
|
|
3202
2370
|
"d-flex": !0,
|
|
3203
2371
|
"flex-nowrap": !0,
|
|
3204
|
-
"justify-content-end":
|
|
3205
|
-
"justify-content-start":
|
|
2372
|
+
"justify-content-end": u.value === "right",
|
|
2373
|
+
"justify-content-start": u.value === "left"
|
|
3206
2374
|
})), {
|
|
3207
|
-
renderToolbarDropdown:
|
|
3208
|
-
clearAllDropDown:
|
|
3209
|
-
} =
|
|
3210
|
-
function
|
|
3211
|
-
t.value.filter((
|
|
3212
|
-
|
|
3213
|
-
}),
|
|
2375
|
+
renderToolbarDropdown: $,
|
|
2376
|
+
clearAllDropDown: _
|
|
2377
|
+
} = Nt(n, h, v);
|
|
2378
|
+
function T() {
|
|
2379
|
+
t.value.filter((d) => d.children && d.children.length > 0).forEach((d) => {
|
|
2380
|
+
d.expanded = !1;
|
|
2381
|
+
}), w.value.expanded = !1, _();
|
|
3214
2382
|
}
|
|
3215
|
-
const
|
|
3216
|
-
function
|
|
3217
|
-
const r =
|
|
3218
|
-
let o =
|
|
3219
|
-
const a = Array.from(r.children),
|
|
3220
|
-
if (
|
|
3221
|
-
const
|
|
2383
|
+
const B = /* @__PURE__ */ new Map(), P = [];
|
|
2384
|
+
function x(d) {
|
|
2385
|
+
const r = p.value;
|
|
2386
|
+
let o = d;
|
|
2387
|
+
const a = Array.from(r.children), m = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
|
|
2388
|
+
if (m) {
|
|
2389
|
+
const j = m.computedStyleMap().get("margin-left"), F = m.computedStyleMap().get("margin-right"), W = (j ? j.value : 0) + m.getBoundingClientRect().width + (F ? F.value : 0);
|
|
3222
2390
|
o -= W;
|
|
3223
2391
|
}
|
|
3224
|
-
const
|
|
3225
|
-
for (const
|
|
3226
|
-
const
|
|
3227
|
-
o <
|
|
3228
|
-
id:
|
|
3229
|
-
width:
|
|
3230
|
-
})) : o -=
|
|
2392
|
+
const M = a.filter((j) => j.id !== "__more_buttons__");
|
|
2393
|
+
for (const j of M) {
|
|
2394
|
+
const F = j.computedStyleMap().get("margin-left"), W = j.computedStyleMap().get("margin-right"), G = (F ? F.value : 0) + j.getBoundingClientRect().width + (W ? W.value : 0);
|
|
2395
|
+
o < G ? (B.set(j.id, !0), P.push({
|
|
2396
|
+
id: j.id,
|
|
2397
|
+
width: G
|
|
2398
|
+
})) : o -= G;
|
|
3231
2399
|
}
|
|
3232
|
-
if (
|
|
3233
|
-
for (let
|
|
3234
|
-
const
|
|
3235
|
-
if (o >=
|
|
3236
|
-
o -=
|
|
2400
|
+
if (P.length)
|
|
2401
|
+
for (let j = P.length - 1; j >= 0; j--) {
|
|
2402
|
+
const F = P[j].width;
|
|
2403
|
+
if (o >= F)
|
|
2404
|
+
o -= F, B.delete(P[j].id), P.pop();
|
|
3237
2405
|
else
|
|
3238
2406
|
break;
|
|
3239
2407
|
}
|
|
3240
|
-
const
|
|
3241
|
-
|
|
3242
|
-
const
|
|
3243
|
-
|
|
2408
|
+
const D = Object.assign({}, w.value);
|
|
2409
|
+
D.children = [];
|
|
2410
|
+
const E = new z(D), L = t.value.reduce((j, F) => (B.has(F.id) && E.children.push(F), F.visible = !B.has(F.id), j.push(F), j), []);
|
|
2411
|
+
w.value = E, t.value = L;
|
|
3244
2412
|
}
|
|
3245
|
-
const
|
|
3246
|
-
if (
|
|
3247
|
-
const o =
|
|
3248
|
-
(o <
|
|
2413
|
+
const C = new ResizeObserver((d) => {
|
|
2414
|
+
if (d.length) {
|
|
2415
|
+
const o = d[0].contentRect.width, m = p.value.getBoundingClientRect().width;
|
|
2416
|
+
(o < m || P.length) && x(o);
|
|
3249
2417
|
}
|
|
3250
2418
|
});
|
|
3251
2419
|
H(() => {
|
|
3252
|
-
const
|
|
3253
|
-
|
|
3254
|
-
}),
|
|
3255
|
-
|
|
3256
|
-
}),
|
|
2420
|
+
const d = i.value;
|
|
2421
|
+
C.observe(d), document.body.addEventListener("click", T);
|
|
2422
|
+
}), ye(() => {
|
|
2423
|
+
C.disconnect(), document.body.removeEventListener("click", T);
|
|
2424
|
+
}), q(() => n.items, () => {
|
|
3257
2425
|
t.value = n.items;
|
|
3258
2426
|
}, {
|
|
3259
2427
|
deep: !0
|
|
3260
|
-
}),
|
|
3261
|
-
s = new Array(t.value.length).fill(
|
|
2428
|
+
}), q(t, (d) => {
|
|
2429
|
+
s = new Array(t.value.length).fill(S());
|
|
3262
2430
|
});
|
|
3263
|
-
function
|
|
3264
|
-
|
|
2431
|
+
function I(d, r, o, a) {
|
|
2432
|
+
c && c.setupContext && c.setupContext.emit("selectionChange", d, r, o, a);
|
|
3265
2433
|
}
|
|
3266
|
-
function
|
|
3267
|
-
const
|
|
3268
|
-
|
|
2434
|
+
function O() {
|
|
2435
|
+
const d = p.value.querySelector(".dgComponentFocused.dgComponentSelected");
|
|
2436
|
+
d == null || d.classList.remove("dgComponentSelected"), d == null || d.classList.remove("dgComponentFocused");
|
|
3269
2437
|
}
|
|
3270
|
-
return () =>
|
|
3271
|
-
ref:
|
|
3272
|
-
"data-dragref": `${
|
|
3273
|
-
class:
|
|
3274
|
-
}, [
|
|
3275
|
-
ref:
|
|
3276
|
-
class:
|
|
3277
|
-
}, [
|
|
3278
|
-
ref:
|
|
2438
|
+
return () => g("div", {
|
|
2439
|
+
ref: b,
|
|
2440
|
+
"data-dragref": `${c.schema.id}-container`,
|
|
2441
|
+
class: k.value
|
|
2442
|
+
}, [g("div", {
|
|
2443
|
+
ref: i,
|
|
2444
|
+
class: A.value
|
|
2445
|
+
}, [g("div", {
|
|
2446
|
+
ref: p,
|
|
3279
2447
|
class: "d-inline-block f-response-content",
|
|
3280
2448
|
style: "white-space: nowrap;"
|
|
3281
|
-
}, [t.value.map((
|
|
2449
|
+
}, [t.value.map((d, r) => g(Ee, {
|
|
3282
2450
|
ref: s[r],
|
|
3283
2451
|
class: "p-0 display-inline-block",
|
|
3284
|
-
modelValue:
|
|
3285
|
-
"onUpdate:modelValue": (o) =>
|
|
2452
|
+
modelValue: d,
|
|
2453
|
+
"onUpdate:modelValue": (o) => d = o,
|
|
3286
2454
|
canMove: !0,
|
|
3287
2455
|
childType: "response-toolbar-item",
|
|
3288
2456
|
childLabel: "按钮",
|
|
3289
2457
|
contentKey: "buttons",
|
|
3290
2458
|
componentId: n.componentId,
|
|
3291
|
-
id:
|
|
2459
|
+
id: d.id,
|
|
3292
2460
|
style: "padding:0 !important;display:inline-block",
|
|
3293
|
-
onSelectionChange:
|
|
3294
|
-
onRemoveComponent:
|
|
2461
|
+
onSelectionChange: I,
|
|
2462
|
+
onRemoveComponent: O
|
|
3295
2463
|
}, {
|
|
3296
2464
|
default: () => {
|
|
3297
2465
|
var o;
|
|
3298
|
-
return [
|
|
3299
|
-
id:
|
|
3300
|
-
|
|
3301
|
-
text:
|
|
3302
|
-
icon:
|
|
3303
|
-
class: ((o =
|
|
2466
|
+
return [g(Be, {
|
|
2467
|
+
id: d.id,
|
|
2468
|
+
disabled: d.disabled,
|
|
2469
|
+
text: d.text,
|
|
2470
|
+
icon: d.icon,
|
|
2471
|
+
class: ((o = d.appearance) == null ? void 0 : o.class) || "btn-secondary",
|
|
3304
2472
|
alignment: n.alignment || "right",
|
|
3305
2473
|
componentId: n.componentId
|
|
3306
2474
|
}, null)];
|
|
3307
2475
|
}
|
|
3308
2476
|
}))])])]);
|
|
3309
2477
|
}
|
|
3310
|
-
}),
|
|
2478
|
+
}), me = ce;
|
|
3311
2479
|
Z.register = (n, e, t) => {
|
|
3312
|
-
n["response-toolbar"] = Z, e["response-toolbar"] =
|
|
2480
|
+
n["response-toolbar"] = Z, e["response-toolbar"] = ce;
|
|
3313
2481
|
};
|
|
3314
2482
|
Z.registerDesigner = (n, e, t) => {
|
|
3315
|
-
n["response-toolbar"] = Ie, e["response-toolbar"] =
|
|
2483
|
+
n["response-toolbar"] = Ie, e["response-toolbar"] = ce, n["response-toolbar-item"] = Be, e["response-toolbar-item"] = Ot;
|
|
3316
2484
|
};
|
|
3317
|
-
|
|
3318
|
-
const
|
|
2485
|
+
Ve(Z);
|
|
2486
|
+
const Jt = {
|
|
3319
2487
|
id: { type: String, default: "" },
|
|
3320
2488
|
componentId: { type: String, default: "" },
|
|
3321
2489
|
type: { type: String, default: "" },
|
|
@@ -3330,104 +2498,104 @@ const rn = {
|
|
|
3330
2498
|
*/
|
|
3331
2499
|
modelValue: { type: Object },
|
|
3332
2500
|
ignore: { type: Boolean, default: !1 }
|
|
3333
|
-
},
|
|
2501
|
+
}, he = /* @__PURE__ */ U({
|
|
3334
2502
|
name: "FDesignerTemplateItem",
|
|
3335
|
-
props:
|
|
2503
|
+
props: Jt,
|
|
3336
2504
|
emits: ["selectionChange"],
|
|
3337
2505
|
setup(n, e) {
|
|
3338
|
-
const t =
|
|
2506
|
+
const t = S(), s = N(() => ({
|
|
3339
2507
|
"farris-component": !0
|
|
3340
2508
|
}));
|
|
3341
|
-
function
|
|
3342
|
-
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((
|
|
3343
|
-
const
|
|
3344
|
-
if (
|
|
3345
|
-
const
|
|
3346
|
-
|
|
2509
|
+
function i(p) {
|
|
2510
|
+
Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((y) => y.classList.remove("dgComponentFocused")), p && (p.preventDefault(), p.stopPropagation());
|
|
2511
|
+
const u = t.value;
|
|
2512
|
+
if (u) {
|
|
2513
|
+
const y = document.getElementsByClassName("dgComponentSelected");
|
|
2514
|
+
y && y.length === 1 && y[0] === t.value || (Array.from(y).forEach((h) => h.classList.remove("dgComponentSelected")), u.classList.add("dgComponentFocused"));
|
|
3347
2515
|
}
|
|
3348
2516
|
X.value++;
|
|
3349
2517
|
}
|
|
3350
|
-
return () =>
|
|
2518
|
+
return () => g("div", {
|
|
3351
2519
|
id: `${n.id}-design-item`,
|
|
3352
2520
|
ref: t,
|
|
3353
2521
|
class: s.value,
|
|
3354
|
-
onClick:
|
|
2522
|
+
onClick: i
|
|
3355
2523
|
}, [e.slots.default && e.slots.default()]);
|
|
3356
2524
|
}
|
|
3357
|
-
}),
|
|
2525
|
+
}), Qt = /* @__PURE__ */ U({
|
|
3358
2526
|
name: "FPageHeaderDesign",
|
|
3359
|
-
props:
|
|
2527
|
+
props: st,
|
|
3360
2528
|
emits: ["Click"],
|
|
3361
2529
|
setup(n, e) {
|
|
3362
|
-
const t =
|
|
2530
|
+
const t = S(), s = V("designer-host-service"), i = V("design-item-context"), p = lt(i.schema, s), u = it(t, i, p), y = S(i.schema.toolbar || {
|
|
3363
2531
|
type: "response-toolbar",
|
|
3364
2532
|
buttons: []
|
|
3365
|
-
}),
|
|
2533
|
+
}), w = S(me(y.value));
|
|
3366
2534
|
H(() => {
|
|
3367
|
-
t.value.componentInstance =
|
|
3368
|
-
}),
|
|
3369
|
-
|
|
2535
|
+
t.value.componentInstance = u;
|
|
2536
|
+
}), q(() => i.schema.toolbar, () => {
|
|
2537
|
+
y.value = i.schema.toolbar || {
|
|
3370
2538
|
type: "response-toolbar",
|
|
3371
2539
|
buttons: []
|
|
3372
|
-
},
|
|
2540
|
+
}, w.value = me(y.value);
|
|
3373
2541
|
}, {
|
|
3374
2542
|
deep: !0
|
|
3375
2543
|
});
|
|
3376
|
-
const
|
|
3377
|
-
function
|
|
3378
|
-
|
|
2544
|
+
const h = N(() => [...w.value.items]);
|
|
2545
|
+
function b(l, c, f, v) {
|
|
2546
|
+
i && i.setupContext && i.setupContext.emit("selectionChange", l, c, f, v);
|
|
3379
2547
|
}
|
|
3380
|
-
return e.expose(
|
|
2548
|
+
return e.expose(u.value), () => g("div", {
|
|
3381
2549
|
ref: t
|
|
3382
|
-
}, [
|
|
2550
|
+
}, [g("nav", {
|
|
3383
2551
|
class: "f-page-header-base"
|
|
3384
|
-
}, [
|
|
2552
|
+
}, [g("div", {
|
|
3385
2553
|
class: "f-title"
|
|
3386
|
-
}, [
|
|
3387
|
-
default: () => [
|
|
2554
|
+
}, [g(he, null, {
|
|
2555
|
+
default: () => [g("span", {
|
|
3388
2556
|
class: "f-title-icon f-text-orna-manage"
|
|
3389
|
-
}, [
|
|
2557
|
+
}, [g("i", {
|
|
3390
2558
|
class: n.icon
|
|
3391
2559
|
}, null)])]
|
|
3392
|
-
}),
|
|
3393
|
-
default: () => [
|
|
2560
|
+
}), g(he, null, {
|
|
2561
|
+
default: () => [g("h4", {
|
|
3394
2562
|
class: "f-title-text"
|
|
3395
2563
|
}, [n.title])]
|
|
3396
|
-
})]),
|
|
2564
|
+
})]), g(Ee, {
|
|
3397
2565
|
class: "col-6 text-right",
|
|
3398
|
-
modelValue:
|
|
3399
|
-
"onUpdate:modelValue": (
|
|
2566
|
+
modelValue: y.value,
|
|
2567
|
+
"onUpdate:modelValue": (l) => y.value = l,
|
|
3400
2568
|
canAdd: !0,
|
|
3401
2569
|
childType: "response-toolbar-item",
|
|
3402
2570
|
childLabel: "按钮",
|
|
3403
2571
|
contentKey: "buttons",
|
|
3404
|
-
id:
|
|
2572
|
+
id: y.value.id,
|
|
3405
2573
|
componentId: n.componentId,
|
|
3406
|
-
onSelectionChange:
|
|
2574
|
+
onSelectionChange: b
|
|
3407
2575
|
}, {
|
|
3408
|
-
default: () => [
|
|
2576
|
+
default: () => [g(Ie, {
|
|
3409
2577
|
customClass: "w-100",
|
|
3410
|
-
items:
|
|
2578
|
+
items: h.value,
|
|
3411
2579
|
componentId: n.componentId
|
|
3412
2580
|
}, null)]
|
|
3413
2581
|
})])]);
|
|
3414
2582
|
}
|
|
3415
|
-
}),
|
|
2583
|
+
}), nn = {
|
|
3416
2584
|
install(n) {
|
|
3417
|
-
n.component(
|
|
2585
|
+
n.component(ne.name, ne);
|
|
3418
2586
|
},
|
|
3419
2587
|
register(n, e, t, s) {
|
|
3420
|
-
n["page-header"] =
|
|
2588
|
+
n["page-header"] = ne, e["page-header"] = pe, s["page-header"] = { eventHandlerResolver: rt };
|
|
3421
2589
|
},
|
|
3422
2590
|
registerDesigner(n, e, t) {
|
|
3423
|
-
n["page-header"] =
|
|
2591
|
+
n["page-header"] = Qt, e["page-header"] = pe;
|
|
3424
2592
|
}
|
|
3425
2593
|
};
|
|
3426
2594
|
export {
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
2595
|
+
ne as PageHeader,
|
|
2596
|
+
nn as default,
|
|
2597
|
+
rt as eventHandlerResolver,
|
|
2598
|
+
st as pageHeaderDesignerProps,
|
|
2599
|
+
ae as pageHeaderProps,
|
|
2600
|
+
pe as propsResolver
|
|
3433
2601
|
};
|