@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,115 +1,154 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { isPlainObject as V, cloneDeep as
|
|
1
|
+
import { ref as g, computed as R, defineComponent as E, provide as W, createVNode as M, watch as te, inject as H, onMounted as q } from "vue";
|
|
2
|
+
import { isPlainObject as V, cloneDeep as ne } from "lodash-es";
|
|
3
3
|
import "bignumber.js";
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), l = Object.keys(e).reduce((
|
|
7
|
-
return (!r || !o.find((
|
|
4
|
+
const G = {}, Y = {};
|
|
5
|
+
function L(t) {
|
|
6
|
+
const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), l = Object.keys(e).reduce((u, b) => ((!r || !o.find((z) => z == b)) && (u[b] = e[b].type === "object" && e[b].properties ? L(e[b]) : ne(e[b].default)), u), {});
|
|
7
|
+
return n && (!r || !o.find((u) => u == "id")) && (l.id = `${n}-${Date.now()}`), l;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
const o =
|
|
9
|
+
function X(t, e = {}, n) {
|
|
10
|
+
const o = G[t];
|
|
11
11
|
if (o) {
|
|
12
|
-
let r =
|
|
13
|
-
const l =
|
|
14
|
-
return r = l ? l({ getSchemaByType:
|
|
12
|
+
let r = L(o);
|
|
13
|
+
const l = Y[t];
|
|
14
|
+
return r = l ? l({ getSchemaByType: X }, r, e, n) : r, r;
|
|
15
15
|
}
|
|
16
16
|
return null;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const n =
|
|
18
|
+
function oe(t, e) {
|
|
19
|
+
const n = L(e);
|
|
20
20
|
return Object.keys(t).reduce((o, r) => (o[r] && V(o[r]) && V(t[r]) ? Object.assign(o[r], t[r]) : o[r] = t[r], o), n), n;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ae(t, e) {
|
|
23
23
|
return Object.keys(t).filter((o) => t[o] != null).reduce((o, r) => {
|
|
24
24
|
if (e.has(r)) {
|
|
25
25
|
const l = e.get(r);
|
|
26
26
|
if (typeof l == "string")
|
|
27
27
|
o[l] = t[r];
|
|
28
28
|
else {
|
|
29
|
-
const
|
|
30
|
-
Object.assign(o,
|
|
29
|
+
const u = l(r, t[r], t);
|
|
30
|
+
Object.assign(o, u);
|
|
31
31
|
}
|
|
32
32
|
} else
|
|
33
33
|
o[r] = t[r];
|
|
34
34
|
return o;
|
|
35
35
|
}, {});
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const o =
|
|
39
|
-
return
|
|
37
|
+
function ie(t, e, n = /* @__PURE__ */ new Map()) {
|
|
38
|
+
const o = oe(t, e);
|
|
39
|
+
return ae(o, n);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
function e(
|
|
43
|
-
if (typeof
|
|
44
|
-
return
|
|
45
|
-
if (typeof
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
41
|
+
function re(t = {}) {
|
|
42
|
+
function e(i, f, s, h) {
|
|
43
|
+
if (typeof s == "number")
|
|
44
|
+
return h[i].length === s;
|
|
45
|
+
if (typeof s == "object") {
|
|
46
|
+
const P = Object.keys(s)[0], k = s[P];
|
|
47
|
+
if (P === "not")
|
|
48
|
+
return Number(h[i].length) !== Number(k);
|
|
49
|
+
if (P === "moreThan")
|
|
50
|
+
return Number(h[i].length) >= Number(k);
|
|
51
|
+
if (P === "lessThan")
|
|
52
|
+
return Number(h[i].length) <= Number(k);
|
|
53
53
|
}
|
|
54
54
|
return !1;
|
|
55
55
|
}
|
|
56
|
-
function n(
|
|
57
|
-
return
|
|
56
|
+
function n(i, f, s, h) {
|
|
57
|
+
return h[i] && h[i].propertyValue && String(h[i].propertyValue.value) === String(s);
|
|
58
58
|
}
|
|
59
59
|
const o = /* @__PURE__ */ new Map([
|
|
60
60
|
["length", e],
|
|
61
61
|
["getProperty", n]
|
|
62
62
|
]);
|
|
63
|
-
Object.keys(t).reduce((
|
|
64
|
-
function r(
|
|
65
|
-
const
|
|
66
|
-
return typeof
|
|
67
|
-
if (
|
|
68
|
-
return { target:
|
|
69
|
-
const
|
|
70
|
-
return { target:
|
|
63
|
+
Object.keys(t).reduce((i, f) => (i.set(f, t[f]), i), o);
|
|
64
|
+
function r(i, f) {
|
|
65
|
+
const s = i;
|
|
66
|
+
return typeof f == "number" ? [{ target: s, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!f }] : typeof f == "object" ? Object.keys(f).map((h) => {
|
|
67
|
+
if (h === "length")
|
|
68
|
+
return { target: s, operator: "length", param: null, value: f[h] };
|
|
69
|
+
const P = h, k = f[h];
|
|
70
|
+
return { target: s, operator: "getProperty", param: P, value: k };
|
|
71
71
|
}) : [];
|
|
72
72
|
}
|
|
73
|
-
function l(
|
|
74
|
-
return Object.keys(
|
|
75
|
-
const
|
|
76
|
-
return
|
|
73
|
+
function l(i) {
|
|
74
|
+
return Object.keys(i).reduce((s, h) => {
|
|
75
|
+
const P = r(h, i[h]);
|
|
76
|
+
return s.push(...P), s;
|
|
77
77
|
}, []);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
if (o.has(
|
|
81
|
-
const
|
|
82
|
-
return
|
|
79
|
+
function u(i, f) {
|
|
80
|
+
if (o.has(i.operator)) {
|
|
81
|
+
const s = o.get(i.operator);
|
|
82
|
+
return s && s(i.target, i.param, i.value, f) || !1;
|
|
83
83
|
}
|
|
84
84
|
return !1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return l(
|
|
86
|
+
function b(i, f) {
|
|
87
|
+
return l(i).reduce((P, k) => P && u(k, f), !0);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
const
|
|
91
|
-
return
|
|
89
|
+
function z(i, f) {
|
|
90
|
+
const s = Object.keys(i), h = s.includes("allOf"), P = s.includes("anyOf"), k = h || P, p = (k ? i[k ? h ? "allOf" : "anyOf" : "allOf"] : [i]).map((m) => b(m, f));
|
|
91
|
+
return h ? !p.includes(!1) : p.includes(!0);
|
|
92
92
|
}
|
|
93
|
-
return { parseValueSchema:
|
|
93
|
+
return { parseValueSchema: z };
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
const S = {
|
|
96
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
97
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
98
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
99
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
100
|
+
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
101
|
+
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
102
|
+
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
103
|
+
"number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
|
|
104
|
+
"date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
|
|
105
|
+
switch: { type: "switch", name: "开关", icon: "SwitchField" },
|
|
106
|
+
"radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
|
|
107
|
+
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
108
|
+
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
109
|
+
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
110
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
111
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
112
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
113
|
+
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
114
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
115
|
+
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
116
|
+
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
117
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
118
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
119
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
120
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
121
|
+
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
122
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
123
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
124
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
125
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
126
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
127
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
128
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
129
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
130
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
131
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
132
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
133
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
134
|
+
}, le = {}, se = {};
|
|
135
|
+
re();
|
|
136
|
+
function U(t, e, n = /* @__PURE__ */ new Map(), o = (u, b, z) => b, r = {}, l = (u) => u) {
|
|
137
|
+
return G[e.title] = e, Y[e.title] = o, le[e.title] = r, se[e.title] = l, (u = {}) => {
|
|
138
|
+
const b = ie(u, e, n), z = Object.keys(t).reduce((i, f) => (i[f] = t[f].default, i), {});
|
|
139
|
+
return Object.assign(z, b);
|
|
101
140
|
};
|
|
102
141
|
}
|
|
103
|
-
function
|
|
142
|
+
function ce(t, e) {
|
|
104
143
|
return { customClass: e.class, customStyle: e.style };
|
|
105
144
|
}
|
|
106
|
-
const
|
|
107
|
-
["appearance",
|
|
145
|
+
const _ = /* @__PURE__ */ new Map([
|
|
146
|
+
["appearance", ce]
|
|
108
147
|
]);
|
|
109
|
-
function
|
|
148
|
+
function J(t, e, n) {
|
|
110
149
|
return e;
|
|
111
150
|
}
|
|
112
|
-
const
|
|
151
|
+
const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/layout.schema.json", fe = "layout", ye = "A Farris Container Component", me = "object", de = {
|
|
113
152
|
id: {
|
|
114
153
|
description: "The unique identifier for layout component",
|
|
115
154
|
type: "string"
|
|
@@ -152,19 +191,19 @@ const ce = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
152
191
|
type: "boolean",
|
|
153
192
|
default: !0
|
|
154
193
|
}
|
|
155
|
-
},
|
|
194
|
+
}, he = [
|
|
156
195
|
"id",
|
|
157
196
|
"type",
|
|
158
197
|
"contents"
|
|
159
|
-
],
|
|
160
|
-
$schema:
|
|
161
|
-
$id:
|
|
198
|
+
], ve = {
|
|
199
|
+
$schema: ue,
|
|
200
|
+
$id: pe,
|
|
162
201
|
title: fe,
|
|
163
|
-
description:
|
|
164
|
-
type:
|
|
165
|
-
properties:
|
|
166
|
-
required:
|
|
167
|
-
},
|
|
202
|
+
description: ye,
|
|
203
|
+
type: me,
|
|
204
|
+
properties: de,
|
|
205
|
+
required: he
|
|
206
|
+
}, be = "layout", ge = "A Farris Component", ze = "object", Ce = {
|
|
168
207
|
basic: {
|
|
169
208
|
description: "Basic Infomation",
|
|
170
209
|
title: "基本信息",
|
|
@@ -199,96 +238,96 @@ const ce = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
199
238
|
}
|
|
200
239
|
}
|
|
201
240
|
}
|
|
202
|
-
},
|
|
203
|
-
title:
|
|
241
|
+
}, Pe = {
|
|
242
|
+
title: be,
|
|
204
243
|
description: ge,
|
|
205
|
-
type:
|
|
206
|
-
categories:
|
|
207
|
-
},
|
|
244
|
+
type: ze,
|
|
245
|
+
categories: Ce
|
|
246
|
+
}, F = {
|
|
208
247
|
customStyle: { type: String, defaut: "" },
|
|
209
248
|
customClass: { type: String, defaut: "" }
|
|
210
|
-
}, Q =
|
|
211
|
-
function
|
|
212
|
-
const e =
|
|
249
|
+
}, Q = U(F, ve, _, J, Pe);
|
|
250
|
+
function Z(t) {
|
|
251
|
+
const e = g(-1), n = g(-1), o = g(0), r = g(0), l = g(!1), u = g(!1), b = R(() => ({
|
|
213
252
|
display: l.value ? "block" : "none",
|
|
214
253
|
left: `${o.value}px`,
|
|
215
254
|
cursor: "e-resize"
|
|
216
|
-
})),
|
|
217
|
-
display:
|
|
255
|
+
})), z = R(() => ({
|
|
256
|
+
display: u.value ? "block" : "none",
|
|
218
257
|
top: `${r.value}px`,
|
|
219
258
|
cursor: "n-resize"
|
|
220
|
-
})),
|
|
221
|
-
display:
|
|
259
|
+
})), i = R(() => ({
|
|
260
|
+
display: u.value || l.value ? "block" : "none"
|
|
222
261
|
}));
|
|
223
|
-
function
|
|
224
|
-
const
|
|
225
|
-
if (
|
|
226
|
-
const { left:
|
|
227
|
-
let
|
|
228
|
-
|
|
262
|
+
function f(v, p, y, m) {
|
|
263
|
+
const O = t.value;
|
|
264
|
+
if (O) {
|
|
265
|
+
const { left: a, right: c, width: w } = O.getBoundingClientRect();
|
|
266
|
+
let d = v.clientX - a;
|
|
267
|
+
m === "right" && (d = c - v.clientX), d > p && (d = p), d < y && (d = y), m === "right" && (d = w - d), o.value = d;
|
|
229
268
|
}
|
|
230
269
|
}
|
|
231
|
-
function
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
234
|
-
const { top:
|
|
235
|
-
let
|
|
236
|
-
|
|
270
|
+
function s(v, p, y, m) {
|
|
271
|
+
const O = t.value;
|
|
272
|
+
if (O) {
|
|
273
|
+
const { top: a, bottom: c, height: w } = O.getBoundingClientRect();
|
|
274
|
+
let d = v.clientY - a;
|
|
275
|
+
m === "bottom" && (d = c - v.clientY), d > p && (d = p), d < y && (d = y), m === "bottom" && (d = w - d), r.value = d;
|
|
237
276
|
}
|
|
238
277
|
}
|
|
239
|
-
function
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
242
|
-
const { width:
|
|
243
|
-
return { width:
|
|
278
|
+
function h() {
|
|
279
|
+
const v = t.value;
|
|
280
|
+
if (v) {
|
|
281
|
+
const { width: p, height: y } = v.getBoundingClientRect();
|
|
282
|
+
return { width: p, height: y };
|
|
244
283
|
}
|
|
245
284
|
return null;
|
|
246
285
|
}
|
|
247
|
-
function
|
|
248
|
-
const
|
|
249
|
-
return
|
|
250
|
-
const
|
|
251
|
-
return
|
|
286
|
+
function P() {
|
|
287
|
+
const v = t.value;
|
|
288
|
+
return v ? Array.from(v.querySelectorAll("[data-position]")).reduce((p, y) => {
|
|
289
|
+
const m = y.getAttribute("data-position");
|
|
290
|
+
return p = Object.assign(p, { [m]: y }), p;
|
|
252
291
|
}, {}) : null;
|
|
253
292
|
}
|
|
254
|
-
function
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
259
|
-
return
|
|
260
|
-
if (
|
|
261
|
-
return
|
|
293
|
+
function k(v, p) {
|
|
294
|
+
const y = h(), m = P();
|
|
295
|
+
if (y && m) {
|
|
296
|
+
const O = m == null ? void 0 : m.right, a = m == null ? void 0 : m.left;
|
|
297
|
+
if (v === "left" && a)
|
|
298
|
+
return O ? y.width - O.clientWidth - p : y.width - p;
|
|
299
|
+
if (v === "right" && O)
|
|
300
|
+
return a ? y.width - a.clientWidth - p : y.width - p;
|
|
262
301
|
}
|
|
263
302
|
}
|
|
264
|
-
function
|
|
265
|
-
const
|
|
266
|
-
if (
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
269
|
-
return
|
|
270
|
-
if (
|
|
271
|
-
return
|
|
303
|
+
function C(v, p) {
|
|
304
|
+
const y = h(), m = P();
|
|
305
|
+
if (y && m) {
|
|
306
|
+
const O = m == null ? void 0 : m.bottom, a = m == null ? void 0 : m.top;
|
|
307
|
+
if (v === "top" && a)
|
|
308
|
+
return O ? y.height - O.clientHeight - p : y.height - p;
|
|
309
|
+
if (v === "bottom" && O)
|
|
310
|
+
return a ? y.height - a.clientHeight - p : y.height - p;
|
|
272
311
|
}
|
|
273
312
|
}
|
|
274
313
|
return {
|
|
275
|
-
horizontalResizeHandleStyle:
|
|
276
|
-
verticalResizeHandleStyle:
|
|
277
|
-
resizeOverlayStyle:
|
|
314
|
+
horizontalResizeHandleStyle: b,
|
|
315
|
+
verticalResizeHandleStyle: z,
|
|
316
|
+
resizeOverlayStyle: i,
|
|
278
317
|
showHorizontalResizeHandle: l,
|
|
279
|
-
showVerticalResizeHandle:
|
|
318
|
+
showVerticalResizeHandle: u,
|
|
280
319
|
horizontalResizeBarPosition: e,
|
|
281
320
|
verticalResizeBarPosition: n,
|
|
282
321
|
verticalResizeHandleOffset: r,
|
|
283
322
|
horizontalResizeHandleOffset: o,
|
|
284
|
-
draggingHorizontalResizeHandle:
|
|
285
|
-
draggingVerticalResizeHandle:
|
|
286
|
-
getPanelMaxHeight:
|
|
287
|
-
getPanelMaxWidth:
|
|
323
|
+
draggingHorizontalResizeHandle: f,
|
|
324
|
+
draggingVerticalResizeHandle: s,
|
|
325
|
+
getPanelMaxHeight: C,
|
|
326
|
+
getPanelMaxWidth: k
|
|
288
327
|
};
|
|
289
328
|
}
|
|
290
329
|
const we = ["moz", "ms", "webkit"];
|
|
291
|
-
function
|
|
330
|
+
function Be() {
|
|
292
331
|
let t = 0;
|
|
293
332
|
return (e) => {
|
|
294
333
|
const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - t)), r = setTimeout(() => {
|
|
@@ -303,13 +342,13 @@ function Oe() {
|
|
|
303
342
|
if (window.requestAnimationFrame)
|
|
304
343
|
return window.requestAnimationFrame.bind(window);
|
|
305
344
|
const t = we.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
306
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
345
|
+
return t ? window[`${t}RequestAnimationFrame`] : Be();
|
|
307
346
|
}
|
|
308
347
|
Oe();
|
|
309
|
-
function
|
|
348
|
+
function ke(t, e) {
|
|
310
349
|
return ((e == null ? void 0 : e.split(" ")) || []).reduce((o, r) => (r && (o[r] = !0), o), t), t;
|
|
311
350
|
}
|
|
312
|
-
function
|
|
351
|
+
function Me(t, e) {
|
|
313
352
|
return ((e == null ? void 0 : e.split(";")) || []).reduce((o, r) => {
|
|
314
353
|
if (r) {
|
|
315
354
|
const l = r.split(":");
|
|
@@ -318,38 +357,38 @@ function He(t, e) {
|
|
|
318
357
|
return o;
|
|
319
358
|
}, t), t;
|
|
320
359
|
}
|
|
321
|
-
const
|
|
360
|
+
const j = /* @__PURE__ */ E({
|
|
322
361
|
name: "FLayout",
|
|
323
|
-
props:
|
|
362
|
+
props: F,
|
|
324
363
|
emits: [],
|
|
325
364
|
setup(t, e) {
|
|
326
|
-
const n =
|
|
365
|
+
const n = g(), o = Z(n), {
|
|
327
366
|
horizontalResizeHandleStyle: r,
|
|
328
367
|
verticalResizeHandleStyle: l,
|
|
329
|
-
resizeOverlayStyle:
|
|
368
|
+
resizeOverlayStyle: u
|
|
330
369
|
} = o;
|
|
331
370
|
W("layout", {
|
|
332
371
|
useResizeHandleComposition: o
|
|
333
372
|
});
|
|
334
|
-
const
|
|
373
|
+
const b = R(() => ke({
|
|
335
374
|
"f-layout": !0
|
|
336
|
-
}, t == null ? void 0 : t.customClass)),
|
|
337
|
-
return () =>
|
|
338
|
-
class:
|
|
339
|
-
style:
|
|
375
|
+
}, t == null ? void 0 : t.customClass)), z = R(() => Me({}, t == null ? void 0 : t.customStyle));
|
|
376
|
+
return () => M("div", {
|
|
377
|
+
class: b.value,
|
|
378
|
+
style: z.value,
|
|
340
379
|
ref: n
|
|
341
|
-
}, [e.slots.default && e.slots.default(),
|
|
380
|
+
}, [e.slots.default && e.slots.default(), M("div", {
|
|
342
381
|
class: "f-layout-resize-overlay",
|
|
343
|
-
style:
|
|
344
|
-
}, null),
|
|
382
|
+
style: u.value
|
|
383
|
+
}, null), M("div", {
|
|
345
384
|
class: "f-layout-horizontal-resize-proxy",
|
|
346
385
|
style: r.value
|
|
347
|
-
}, null),
|
|
386
|
+
}, null), M("div", {
|
|
348
387
|
class: "f-layout-vertical-resize-proxy",
|
|
349
388
|
style: l.value
|
|
350
389
|
}, null)]);
|
|
351
390
|
}
|
|
352
|
-
}),
|
|
391
|
+
}), Te = "https://json-schema.org/draft/2020-12/schema", Re = "https://farris-design.gitee.io/layout-pane.schema.json", De = "layout-pane", Se = "A Farris Container Component", je = "object", He = {
|
|
353
392
|
id: {
|
|
354
393
|
description: "The unique identifier for a layout pane",
|
|
355
394
|
type: "string"
|
|
@@ -413,13 +452,13 @@ const A = /* @__PURE__ */ $({
|
|
|
413
452
|
default: !0
|
|
414
453
|
}
|
|
415
454
|
}, Ee = {
|
|
416
|
-
$schema:
|
|
417
|
-
$id:
|
|
418
|
-
title:
|
|
419
|
-
description:
|
|
420
|
-
type:
|
|
421
|
-
properties:
|
|
422
|
-
},
|
|
455
|
+
$schema: Te,
|
|
456
|
+
$id: Re,
|
|
457
|
+
title: De,
|
|
458
|
+
description: Se,
|
|
459
|
+
type: je,
|
|
460
|
+
properties: He
|
|
461
|
+
}, Ae = "layout-pane", $e = "A Farris Container Component", Le = "object", Fe = {
|
|
423
462
|
basic: {
|
|
424
463
|
description: "Basic Infomation",
|
|
425
464
|
title: "基本信息",
|
|
@@ -514,12 +553,12 @@ const A = /* @__PURE__ */ $({
|
|
|
514
553
|
}
|
|
515
554
|
}
|
|
516
555
|
}
|
|
517
|
-
},
|
|
518
|
-
title:
|
|
519
|
-
description:
|
|
520
|
-
type:
|
|
521
|
-
categories:
|
|
522
|
-
},
|
|
556
|
+
}, Ne = {
|
|
557
|
+
title: Ae,
|
|
558
|
+
description: $e,
|
|
559
|
+
type: Le,
|
|
560
|
+
categories: Fe
|
|
561
|
+
}, N = {
|
|
523
562
|
customClass: { type: String, defaut: "" },
|
|
524
563
|
customStyle: { type: String, defaut: "" },
|
|
525
564
|
/** 记录原始定义宽度 */
|
|
@@ -538,327 +577,312 @@ const A = /* @__PURE__ */ $({
|
|
|
538
577
|
minWidth: { type: Number, default: 100 },
|
|
539
578
|
/** 面板最小高度 */
|
|
540
579
|
minHeight: { type: Number, default: 100 }
|
|
541
|
-
},
|
|
542
|
-
function
|
|
580
|
+
}, x = U(N, Ee, _, J, Ne);
|
|
581
|
+
function K(t, e, n, o, r) {
|
|
543
582
|
const {
|
|
544
583
|
horizontalResizeBarPosition: l,
|
|
545
|
-
horizontalResizeHandleOffset:
|
|
546
|
-
showHorizontalResizeHandle:
|
|
547
|
-
showVerticalResizeHandle:
|
|
548
|
-
verticalResizeBarPosition:
|
|
549
|
-
verticalResizeHandleOffset:
|
|
550
|
-
draggingHorizontalResizeHandle:
|
|
551
|
-
draggingVerticalResizeHandle:
|
|
552
|
-
getPanelMaxHeight:
|
|
553
|
-
getPanelMaxWidth:
|
|
584
|
+
horizontalResizeHandleOffset: u,
|
|
585
|
+
showHorizontalResizeHandle: b,
|
|
586
|
+
showVerticalResizeHandle: z,
|
|
587
|
+
verticalResizeBarPosition: i,
|
|
588
|
+
verticalResizeHandleOffset: f,
|
|
589
|
+
draggingHorizontalResizeHandle: s,
|
|
590
|
+
draggingVerticalResizeHandle: h,
|
|
591
|
+
getPanelMaxHeight: P,
|
|
592
|
+
getPanelMaxWidth: k
|
|
554
593
|
} = r;
|
|
555
|
-
let
|
|
556
|
-
function
|
|
557
|
-
if ((
|
|
558
|
-
const { left:
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
const
|
|
562
|
-
|
|
594
|
+
let C = "", v, p, y;
|
|
595
|
+
function m(c) {
|
|
596
|
+
if ((C === "left" || C === "right") && p) {
|
|
597
|
+
const { left: w } = p.getBoundingClientRect(), { width: d } = v.getBoundingClientRect(), D = c.clientX - w;
|
|
598
|
+
let B = C === "left" ? (d || 0) + (D - l.value) : (d || 0) - (D - l.value);
|
|
599
|
+
B = n.value > 0 ? Math.max(n.value, B) : B;
|
|
600
|
+
const T = k(C, n.value);
|
|
601
|
+
T != null && (B = T > B ? B : T), t.value = B;
|
|
563
602
|
}
|
|
564
|
-
if ((
|
|
565
|
-
const { top:
|
|
566
|
-
let
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
|
|
603
|
+
if ((C === "top" || C === "bottom") && p) {
|
|
604
|
+
const { top: w } = p.getBoundingClientRect(), { height: d } = v.getBoundingClientRect(), D = c.clientY - w;
|
|
605
|
+
let B = C === "top" ? (d || 0) + (D - i.value) : (d || 0) - (D - i.value);
|
|
606
|
+
B = o.value > 0 ? Math.max(o.value, B) : B;
|
|
607
|
+
const T = P(C, o.value);
|
|
608
|
+
T != null && (B = T > B ? B : T), e.value = B;
|
|
570
609
|
}
|
|
571
|
-
|
|
572
|
-
}
|
|
573
|
-
function
|
|
574
|
-
if (
|
|
575
|
-
const { left:
|
|
576
|
-
|
|
577
|
-
const
|
|
578
|
-
|
|
610
|
+
u.value = 0, f.value = 0, l.value = -1, i.value = -1, b.value = !1, z.value = !1, document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", m), document.body.style.userSelect = "", C = "", v = null, p = null;
|
|
611
|
+
}
|
|
612
|
+
function O(c, w, d) {
|
|
613
|
+
if (C = w, v = d, b.value = !0, p = c.composedPath().find((B) => (B.className || "").split(" ")[0] === "f-layout"), p) {
|
|
614
|
+
const { left: B } = p.getBoundingClientRect(), T = c.clientX - B;
|
|
615
|
+
u.value = T, l.value = T;
|
|
616
|
+
const A = k(C, n.value) || 0;
|
|
617
|
+
y = (ee) => s(ee, A, n.value, C), document.addEventListener("mousemove", y), document.addEventListener("mouseup", m), document.body.style.userSelect = "none";
|
|
579
618
|
}
|
|
580
619
|
}
|
|
581
|
-
function
|
|
582
|
-
if (
|
|
583
|
-
const { top:
|
|
584
|
-
|
|
585
|
-
const
|
|
586
|
-
|
|
620
|
+
function a(c, w, d) {
|
|
621
|
+
if (C = w, v = d, z.value = !0, p = c.composedPath().find((B) => (B.className || "").split(" ")[0] === "f-layout"), p) {
|
|
622
|
+
const { top: B } = p.getBoundingClientRect();
|
|
623
|
+
f.value = c.clientY - B, i.value = c.clientY - B;
|
|
624
|
+
const T = P(C, o.value) || 0;
|
|
625
|
+
y = (A) => h(A, T, o.value, C), document.addEventListener("mousemove", y), document.addEventListener("mouseup", m), document.body.style.userSelect = "none";
|
|
587
626
|
}
|
|
588
627
|
}
|
|
589
|
-
return { onClickHorizontalResizeBar:
|
|
628
|
+
return { onClickHorizontalResizeBar: O, onClickVerticalResizeBar: a };
|
|
590
629
|
}
|
|
591
|
-
const
|
|
630
|
+
const $ = /* @__PURE__ */ E({
|
|
592
631
|
name: "FLayoutPane",
|
|
593
|
-
props:
|
|
632
|
+
props: N,
|
|
594
633
|
emits: [],
|
|
595
634
|
setup(t, e) {
|
|
596
|
-
const n =
|
|
597
|
-
|
|
598
|
-
|
|
635
|
+
const n = g(t.minHeight <= 0 ? 100 : t.minHeight), o = g(t.minWidth <= 0 ? 100 : t.minWidth), r = g(t.width <= 0 ? 100 : t.width), l = g(t.height <= 100 ? 100 : t.height), u = g(Math.max(n.value, l.value)), b = g(Math.max(o.value, r.value)), z = g(), i = g(t.position), f = g(t.resizable);
|
|
636
|
+
te(() => t.resizable, (a) => {
|
|
637
|
+
f.value = a;
|
|
599
638
|
});
|
|
600
|
-
const
|
|
601
|
-
useResizeHandleComposition:
|
|
602
|
-
} =
|
|
603
|
-
onClickHorizontalResizeBar:
|
|
604
|
-
onClickVerticalResizeBar:
|
|
605
|
-
} =
|
|
639
|
+
const s = H("layout"), {
|
|
640
|
+
useResizeHandleComposition: h
|
|
641
|
+
} = s, P = K(b, u, o, n, h), {
|
|
642
|
+
onClickHorizontalResizeBar: k,
|
|
643
|
+
onClickVerticalResizeBar: C
|
|
644
|
+
} = P, v = R(() => ({
|
|
606
645
|
"f-layout-resize-bar": !0,
|
|
607
|
-
"f-layout-resize-bar-e":
|
|
608
|
-
"f-layout-resize-bar-n":
|
|
609
|
-
"f-layout-resize-bar-s":
|
|
610
|
-
"f-layout-resize-bar-w":
|
|
611
|
-
})),
|
|
612
|
-
function
|
|
613
|
-
(
|
|
646
|
+
"f-layout-resize-bar-e": i.value === "left",
|
|
647
|
+
"f-layout-resize-bar-n": i.value === "bottom",
|
|
648
|
+
"f-layout-resize-bar-s": i.value === "top",
|
|
649
|
+
"f-layout-resize-bar-w": i.value === "right"
|
|
650
|
+
})), p = R(() => i.value !== "center" && f.value);
|
|
651
|
+
function y(a, c) {
|
|
652
|
+
(c === "left" || c === "right") && k(a, c, z.value), (c === "top" || c === "bottom") && C(a, c, z.value);
|
|
614
653
|
}
|
|
615
|
-
const
|
|
616
|
-
const
|
|
654
|
+
const m = R(() => {
|
|
655
|
+
const a = {
|
|
617
656
|
"f-layout-pane": !0,
|
|
618
|
-
"f-page-content-nav":
|
|
619
|
-
"f-page-content-main":
|
|
657
|
+
"f-page-content-nav": i.value === "left" || i.value === "right",
|
|
658
|
+
"f-page-content-main": i.value === "center"
|
|
620
659
|
};
|
|
621
|
-
return t.customClass && String(t.customClass).split(" ").reduce((
|
|
622
|
-
}),
|
|
623
|
-
const
|
|
624
|
-
return (
|
|
660
|
+
return t.customClass && String(t.customClass).split(" ").reduce((c, w) => (c[w] = !0, c), a), a;
|
|
661
|
+
}), O = R(() => {
|
|
662
|
+
const a = {};
|
|
663
|
+
return (b.value && i.value === "left" || i.value === "right") && (a.width = `${b.value}px`), (u.value && i.value === "bottom" || i.value === "top") && (a.height = `${u.value}px`), t.visible || (a.display = "none"), a;
|
|
625
664
|
});
|
|
626
|
-
return () =>
|
|
627
|
-
ref:
|
|
628
|
-
class:
|
|
629
|
-
style:
|
|
630
|
-
"data-position":
|
|
631
|
-
}, [e.slots.default && e.slots.default(),
|
|
632
|
-
class:
|
|
633
|
-
onMousedown: (
|
|
665
|
+
return () => M("div", {
|
|
666
|
+
ref: z,
|
|
667
|
+
class: m.value,
|
|
668
|
+
style: O.value,
|
|
669
|
+
"data-position": i.value
|
|
670
|
+
}, [e.slots.default && e.slots.default(), p.value && M("span", {
|
|
671
|
+
class: v.value,
|
|
672
|
+
onMousedown: (a) => y(a, i.value)
|
|
634
673
|
}, null)]);
|
|
635
674
|
}
|
|
636
675
|
});
|
|
637
|
-
function
|
|
676
|
+
function Ve(t, e) {
|
|
638
677
|
function n() {
|
|
639
678
|
return !1;
|
|
640
679
|
}
|
|
641
680
|
return { canAccepts: n };
|
|
642
681
|
}
|
|
643
|
-
function
|
|
644
|
-
var
|
|
682
|
+
function I(t, e, n) {
|
|
683
|
+
var O;
|
|
645
684
|
function o() {
|
|
646
685
|
n != null && n.resolveComponentContext && n.resolveComponentContext();
|
|
647
686
|
}
|
|
648
687
|
o();
|
|
649
|
-
const r = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "",
|
|
650
|
-
function
|
|
688
|
+
const r = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", u = g();
|
|
689
|
+
function b() {
|
|
651
690
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
652
691
|
}
|
|
653
|
-
function
|
|
692
|
+
function z() {
|
|
654
693
|
return !1;
|
|
655
694
|
}
|
|
656
|
-
function
|
|
695
|
+
function i() {
|
|
657
696
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
658
697
|
}
|
|
659
|
-
function
|
|
698
|
+
function f() {
|
|
660
699
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
661
700
|
}
|
|
662
|
-
function
|
|
663
|
-
if (!
|
|
701
|
+
function s(a) {
|
|
702
|
+
if (!a || !a.value)
|
|
664
703
|
return null;
|
|
665
|
-
if (
|
|
666
|
-
return
|
|
667
|
-
const
|
|
668
|
-
return
|
|
704
|
+
if (a.value.schema && a.value.schema.type === "component")
|
|
705
|
+
return a.value;
|
|
706
|
+
const c = g(a == null ? void 0 : a.value.parent), w = s(c);
|
|
707
|
+
return w || null;
|
|
669
708
|
}
|
|
670
|
-
function
|
|
671
|
-
const { componentInstance:
|
|
672
|
-
return !
|
|
709
|
+
function h(a = e) {
|
|
710
|
+
const { componentInstance: c, designerItemElementRef: w } = a;
|
|
711
|
+
return !c || !c.value ? null : c.value.canMove ? w : h(a.parent);
|
|
673
712
|
}
|
|
674
|
-
function
|
|
675
|
-
return !!n && n.canAccepts(
|
|
713
|
+
function P(a) {
|
|
714
|
+
return !!n && n.canAccepts(a);
|
|
676
715
|
}
|
|
677
|
-
function
|
|
716
|
+
function k() {
|
|
678
717
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
679
718
|
}
|
|
680
|
-
function
|
|
681
|
-
}
|
|
682
|
-
function b(i, y) {
|
|
683
|
-
y && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(y);
|
|
719
|
+
function C() {
|
|
684
720
|
}
|
|
685
|
-
function
|
|
686
|
-
|
|
687
|
-
let j = T(f, i, y);
|
|
688
|
-
n && n.onResolveNewComponentSchema && (j = n.onResolveNewComponentSchema(i, j));
|
|
689
|
-
const z = f.toLowerCase().replace("-", "_");
|
|
690
|
-
return j && !j.id && j.type === f && (j.id = `${z}_${Math.random().toString().slice(2, 6)}`), j;
|
|
721
|
+
function v(a, c) {
|
|
722
|
+
c && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(c);
|
|
691
723
|
}
|
|
692
|
-
function
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
return M && !M.id && M.type === f && (M.id = `${R}_${Math.random().toString().slice(2, 6)}`), M;
|
|
724
|
+
function p(a, c) {
|
|
725
|
+
const { componentType: w } = a;
|
|
726
|
+
let d = X(w, a, c);
|
|
727
|
+
n && n.onResolveNewComponentSchema && (d = n.onResolveNewComponentSchema(a, d));
|
|
728
|
+
const D = w.toLowerCase().replace("-", "_");
|
|
729
|
+
return d && !d.id && d.type === w && (d.id = `${D}_${Math.random().toString().slice(2, 6)}`), d;
|
|
699
730
|
}
|
|
700
|
-
function
|
|
731
|
+
function y(a) {
|
|
701
732
|
}
|
|
702
|
-
function
|
|
733
|
+
function m(...a) {
|
|
703
734
|
if (n && n.getPropsConfig)
|
|
704
|
-
return n.getPropsConfig(...
|
|
735
|
+
return n.getPropsConfig(...a);
|
|
705
736
|
}
|
|
706
|
-
return
|
|
707
|
-
canMove:
|
|
708
|
-
canSelectParent:
|
|
709
|
-
canDelete:
|
|
710
|
-
canNested: !
|
|
737
|
+
return u.value = {
|
|
738
|
+
canMove: b(),
|
|
739
|
+
canSelectParent: z(),
|
|
740
|
+
canDelete: i(),
|
|
741
|
+
canNested: !f(),
|
|
711
742
|
contents: e == null ? void 0 : e.schema.contents,
|
|
712
743
|
elementRef: t,
|
|
713
|
-
parent: (
|
|
744
|
+
parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
|
|
714
745
|
schema: e == null ? void 0 : e.schema,
|
|
715
746
|
styles: r,
|
|
716
747
|
designerClass: l,
|
|
717
|
-
canAccepts:
|
|
718
|
-
getBelongedComponentInstance:
|
|
719
|
-
getDraggableDesignItemElement:
|
|
720
|
-
getDraggingDisplayText:
|
|
721
|
-
getPropConfig:
|
|
722
|
-
getDragScopeElement:
|
|
723
|
-
onAcceptMovedChildElement:
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
addNewChildComponentSchema: u,
|
|
748
|
+
canAccepts: P,
|
|
749
|
+
getBelongedComponentInstance: s,
|
|
750
|
+
getDraggableDesignItemElement: h,
|
|
751
|
+
getDraggingDisplayText: k,
|
|
752
|
+
getPropConfig: m,
|
|
753
|
+
getDragScopeElement: C,
|
|
754
|
+
onAcceptMovedChildElement: v,
|
|
755
|
+
onChildElementMovedOut: y,
|
|
756
|
+
addNewChildComponentSchema: p,
|
|
727
757
|
updateDragAndDropRules: o,
|
|
728
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
729
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
730
|
-
},
|
|
758
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || g(!1),
|
|
759
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || g(!1)
|
|
760
|
+
}, u;
|
|
731
761
|
}
|
|
732
|
-
const
|
|
762
|
+
const We = /* @__PURE__ */ E({
|
|
733
763
|
name: "FLayoutDesign",
|
|
734
|
-
props:
|
|
764
|
+
props: F,
|
|
735
765
|
emits: [],
|
|
736
766
|
setup(t, e) {
|
|
737
|
-
var
|
|
738
|
-
const n =
|
|
767
|
+
var f;
|
|
768
|
+
const n = g(), o = H("design-item-context"), r = Ve(o.schema, (f = o.parent) == null ? void 0 : f.schema), l = I(n, o, r);
|
|
739
769
|
l.value.canNested = !1;
|
|
740
|
-
const
|
|
741
|
-
horizontalResizeHandleStyle:
|
|
742
|
-
verticalResizeHandleStyle:
|
|
743
|
-
resizeOverlayStyle:
|
|
744
|
-
} =
|
|
770
|
+
const u = Z(n), {
|
|
771
|
+
horizontalResizeHandleStyle: b,
|
|
772
|
+
verticalResizeHandleStyle: z,
|
|
773
|
+
resizeOverlayStyle: i
|
|
774
|
+
} = u;
|
|
745
775
|
return W("layout", {
|
|
746
|
-
useResizeHandleComposition:
|
|
776
|
+
useResizeHandleComposition: u
|
|
747
777
|
}), q(() => {
|
|
748
778
|
n.value.componentInstance = l;
|
|
749
|
-
}), e.expose(l.value), () =>
|
|
779
|
+
}), e.expose(l.value), () => M("div", {
|
|
750
780
|
class: "f-layout f-page-content",
|
|
751
781
|
ref: n
|
|
752
|
-
}, [e.slots.default && e.slots.default(),
|
|
782
|
+
}, [e.slots.default && e.slots.default(), M("div", {
|
|
753
783
|
class: "f-layout-resize-overlay",
|
|
754
|
-
style:
|
|
755
|
-
}, null),
|
|
784
|
+
style: i.value
|
|
785
|
+
}, null), M("div", {
|
|
756
786
|
class: "f-layout-horizontal-resize-proxy",
|
|
757
|
-
style:
|
|
758
|
-
}, null),
|
|
787
|
+
style: b.value
|
|
788
|
+
}, null), M("div", {
|
|
759
789
|
class: "f-layout-vertical-resize-proxy",
|
|
760
|
-
style:
|
|
790
|
+
style: z.value
|
|
761
791
|
}, null)]);
|
|
762
792
|
}
|
|
763
793
|
});
|
|
764
|
-
function
|
|
765
|
-
function t(e) {
|
|
766
|
-
var
|
|
794
|
+
function qe() {
|
|
795
|
+
function t(e, n) {
|
|
796
|
+
var u;
|
|
767
797
|
if (!e)
|
|
768
798
|
return !1;
|
|
769
|
-
const
|
|
770
|
-
if (!
|
|
799
|
+
const o = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
|
|
800
|
+
if (!o)
|
|
771
801
|
return !1;
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
const s = n.schema.type, m = (s === "response-form" || s === "content-container") && o && o.includes("farris-form");
|
|
775
|
-
if (n.schema.type !== "response-layout-item" && !m)
|
|
776
|
-
return !1;
|
|
777
|
-
}
|
|
778
|
-
return e.controlType !== "field-set";
|
|
802
|
+
const r = o.schema.type, l = n == null ? void 0 : n.formSchemaUtils.getComponentById(o.belongedComponentId);
|
|
803
|
+
return !((e.controlCategory === "input" || e.controlType === "form-group") && ![S["response-layout-item"].type, S["response-form"].type].includes(r) || (e.controlType === S.tabs.type || e.controlType === S.section.type) && ((l == null ? void 0 : l.componentType) !== "frame" || ![S["content-container"].type, S["splitter-pane"].type, S["response-layout-item"].type].includes(r)));
|
|
779
804
|
}
|
|
780
805
|
return {
|
|
781
806
|
basalDragulaRuleForContainer: t
|
|
782
807
|
};
|
|
783
808
|
}
|
|
784
|
-
function
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
function o(l, s, m) {
|
|
789
|
-
return m;
|
|
809
|
+
function Ge(t, e) {
|
|
810
|
+
const n = t.schema;
|
|
811
|
+
function o(l) {
|
|
812
|
+
return !!qe().basalDragulaRuleForContainer(l);
|
|
790
813
|
}
|
|
791
814
|
function r() {
|
|
792
815
|
const l = ["f-layout-pane"];
|
|
793
|
-
return (
|
|
816
|
+
return (n.position === "left" || n.position === "right") && l.push("f-page-content-nav"), n.position === "center" && l.push("f-page-content-main"), l.join(" ");
|
|
794
817
|
}
|
|
795
|
-
return { canAccepts:
|
|
818
|
+
return { canAccepts: o, getDesignerClass: r };
|
|
796
819
|
}
|
|
797
|
-
const Ye = /* @__PURE__ */
|
|
820
|
+
const Ye = /* @__PURE__ */ E({
|
|
798
821
|
name: "FLayoutPaneDesign",
|
|
799
|
-
props:
|
|
822
|
+
props: N,
|
|
800
823
|
emits: [],
|
|
801
824
|
setup(t, e) {
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
825
|
+
const n = g(), o = g();
|
|
826
|
+
H("designer-host-service");
|
|
827
|
+
const r = H("design-item-context"), l = Ge(r), u = I(o, r, l);
|
|
828
|
+
u.value.canNested = !1, u.value.canMove = !1, u.value.canDelete = !1, q(() => {
|
|
829
|
+
o.value.componentInstance = u;
|
|
830
|
+
}), e.expose(u.value);
|
|
831
|
+
const b = g(Math.max(t.minHeight, t.height)), z = g(Math.max(t.minWidth, t.width)), i = g(t.minHeight), f = g(t.minWidth), s = g(t.position), h = H("layout"), {
|
|
832
|
+
useResizeHandleComposition: P
|
|
833
|
+
} = h, k = K(z, b, f, i, P), {
|
|
834
|
+
onClickHorizontalResizeBar: C,
|
|
835
|
+
onClickVerticalResizeBar: v
|
|
836
|
+
} = k, p = R(() => ({
|
|
813
837
|
"f-layout-resize-bar": !0,
|
|
814
|
-
"f-layout-resize-bar-e":
|
|
815
|
-
"f-layout-resize-bar-n":
|
|
816
|
-
"f-layout-resize-bar-s":
|
|
817
|
-
"f-layout-resize-bar-w":
|
|
838
|
+
"f-layout-resize-bar-e": s.value === "left",
|
|
839
|
+
"f-layout-resize-bar-n": s.value === "bottom",
|
|
840
|
+
"f-layout-resize-bar-s": s.value === "top",
|
|
841
|
+
"f-layout-resize-bar-w": s.value === "right"
|
|
818
842
|
}));
|
|
819
|
-
function
|
|
820
|
-
(
|
|
843
|
+
function y(a, c) {
|
|
844
|
+
(c === "left" || c === "right") && C(a, c, n.value), (c === "top" || c === "bottom") && v(a, c, n.value);
|
|
821
845
|
}
|
|
822
|
-
const
|
|
823
|
-
const
|
|
846
|
+
const m = R(() => {
|
|
847
|
+
const a = {
|
|
824
848
|
"f-layout-pane": !0,
|
|
825
|
-
"f-page-content-nav":
|
|
826
|
-
"f-page-content-main":
|
|
849
|
+
"f-page-content-nav": s.value === "left" || s.value === "right",
|
|
850
|
+
"f-page-content-main": s.value === "center"
|
|
827
851
|
};
|
|
828
|
-
return t.customClass && String(t.customClass).split(" ").reduce((
|
|
829
|
-
}),
|
|
830
|
-
const
|
|
852
|
+
return t.customClass && String(t.customClass).split(" ").reduce((c, w) => (c[w] = !0, c), a), a;
|
|
853
|
+
}), O = R(() => {
|
|
854
|
+
const a = {
|
|
831
855
|
flex: "1"
|
|
832
856
|
};
|
|
833
|
-
return (
|
|
857
|
+
return (z.value && s.value === "left" || s.value === "right") && (a.width = `${z.value}px`), (b.value && s.value === "bottom" || s.value === "top") && (a.height = `${b.value}px`), a;
|
|
834
858
|
});
|
|
835
|
-
return () =>
|
|
859
|
+
return () => M("div", {
|
|
836
860
|
ref: n,
|
|
837
|
-
class:
|
|
838
|
-
style:
|
|
839
|
-
}, [
|
|
861
|
+
class: m.value,
|
|
862
|
+
style: O.value
|
|
863
|
+
}, [M("div", {
|
|
840
864
|
ref: o,
|
|
841
865
|
class: "drag-container",
|
|
842
866
|
"data-dragref": `${r.schema.id}-container`
|
|
843
|
-
}, [e.slots.default && e.slots.default()]),
|
|
844
|
-
class:
|
|
845
|
-
onMousedown: (
|
|
867
|
+
}, [e.slots.default && e.slots.default()]), M("span", {
|
|
868
|
+
class: p.value,
|
|
869
|
+
onMousedown: (a) => y(a, s.value)
|
|
846
870
|
}, null)]);
|
|
847
871
|
}
|
|
848
872
|
});
|
|
849
|
-
|
|
850
|
-
t.component(
|
|
873
|
+
j.install = (t) => {
|
|
874
|
+
t.component(j.name, j), t.component($.name, $);
|
|
851
875
|
};
|
|
852
|
-
|
|
853
|
-
t.layout =
|
|
876
|
+
j.register = (t, e, n, o) => {
|
|
877
|
+
t.layout = j, e.layout = Q, t["layout-pane"] = $, e["layout-pane"] = x;
|
|
854
878
|
};
|
|
855
|
-
|
|
856
|
-
t.layout =
|
|
879
|
+
j.registerDesigner = (t, e, n) => {
|
|
880
|
+
t.layout = We, e.layout = Q, t["layout-pane"] = Ye, e["layout-pane"] = x;
|
|
857
881
|
};
|
|
858
882
|
export {
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
883
|
+
j as FLayout,
|
|
884
|
+
$ as FLayoutPane,
|
|
885
|
+
j as default,
|
|
886
|
+
F as layoutProps,
|
|
863
887
|
Q as layoutPropsResolver
|
|
864
888
|
};
|