@farris/ui-vue 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -5
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4057 -4304
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2450 -2467
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3593 -3585
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +163 -2643
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +500 -486
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +485 -470
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2611 -2623
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +3825 -3837
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +3720 -3712
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +312 -296
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +4748 -4992
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4215 -4462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3015 -3027
- package/components/query-solution/index.umd.cjs +5 -5
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +293 -280
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +632 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +2994 -3006
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +749 -733
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +7750 -7990
- package/farris.all.umd.cjs +12 -12
- package/package.json +1 -1
- package/types/data-view/composition/types.d.ts +0 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
- package/components/event-parameter/index.css +0 -1
- package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
- package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
|
@@ -1,46 +1,60 @@
|
|
|
1
|
-
import { ref as g, computed as C, defineComponent as M, provide as
|
|
2
|
-
import { isPlainObject as
|
|
1
|
+
import { ref as g, computed as C, defineComponent as M, provide as q, createVNode as w, inject as k, onMounted as W } from "vue";
|
|
2
|
+
import { isPlainObject as F, cloneDeep as _ } from "lodash-es";
|
|
3
3
|
import "bignumber.js";
|
|
4
4
|
const G = {}, X = {};
|
|
5
|
-
function
|
|
6
|
-
const { properties: e, title: n, ignore:
|
|
7
|
-
if (n && (!
|
|
8
|
-
const
|
|
9
|
-
s.id = `${
|
|
5
|
+
function A(t) {
|
|
6
|
+
const { properties: e, title: n, ignore: i } = t, o = i && Array.isArray(i), s = Object.keys(e).reduce((a, f) => ((!o || !i.find((v) => v === f)) && (a[f] = e[f].type === "object" && e[f].properties ? A(e[f]) : _(e[f].default)), a), {});
|
|
7
|
+
if (n && (!o || !i.find((a) => a === "id"))) {
|
|
8
|
+
const a = n.toLowerCase().replace(/-/g, "_");
|
|
9
|
+
s.id = `${a}_${Math.random().toString().slice(2, 6)}`;
|
|
10
10
|
}
|
|
11
11
|
return s;
|
|
12
12
|
}
|
|
13
|
+
function ee(t) {
|
|
14
|
+
const { properties: e, title: n, required: i } = t;
|
|
15
|
+
if (i && Array.isArray(i)) {
|
|
16
|
+
const o = i.reduce((s, a) => (s[a] = e[a].type === "object" && e[a].properties ? A(e[a]) : _(e[a].default), s), {});
|
|
17
|
+
if (n && i.find((s) => s === "id")) {
|
|
18
|
+
const s = n.toLowerCase().replace(/-/g, "_");
|
|
19
|
+
o.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
20
|
+
}
|
|
21
|
+
return o;
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
type: n
|
|
25
|
+
};
|
|
26
|
+
}
|
|
13
27
|
function Y(t, e = {}, n) {
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
let
|
|
28
|
+
const i = G[t];
|
|
29
|
+
if (i) {
|
|
30
|
+
let o = ee(i);
|
|
17
31
|
const s = X[t];
|
|
18
|
-
return
|
|
32
|
+
return o = s ? s({ getSchemaByType: Y }, o, e, n) : o, o;
|
|
19
33
|
}
|
|
20
34
|
return null;
|
|
21
35
|
}
|
|
22
|
-
function ee(t, e) {
|
|
23
|
-
const n = E(e);
|
|
24
|
-
return Object.keys(n).reduce((a, i) => (a[i] && $(a[i]) && $(t[i] || !t[i]) ? Object.assign(a[i], t[i] || {}) : a[i] = t[i], a), n), n;
|
|
25
|
-
}
|
|
26
36
|
function te(t, e) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
const n = A(e);
|
|
38
|
+
return Object.keys(n).reduce((i, o) => (Object.prototype.hasOwnProperty.call(t, o) && (i[o] && F(i[o]) && F(t[o] || !t[o]) ? Object.assign(i[o], t[o] || {}) : i[o] = t[o]), i), n), n;
|
|
39
|
+
}
|
|
40
|
+
function ne(t, e) {
|
|
41
|
+
return Object.keys(t).filter((i) => t[i] != null).reduce((i, o) => {
|
|
42
|
+
if (e.has(o)) {
|
|
43
|
+
const s = e.get(o);
|
|
30
44
|
if (typeof s == "string")
|
|
31
|
-
|
|
45
|
+
i[s] = t[o];
|
|
32
46
|
else {
|
|
33
|
-
const
|
|
34
|
-
Object.assign(
|
|
47
|
+
const a = s(o, t[o], t);
|
|
48
|
+
Object.assign(i, a);
|
|
35
49
|
}
|
|
36
50
|
} else
|
|
37
|
-
|
|
38
|
-
return
|
|
51
|
+
i[o] = t[o];
|
|
52
|
+
return i;
|
|
39
53
|
}, {});
|
|
40
54
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
return
|
|
55
|
+
function ie(t, e, n = /* @__PURE__ */ new Map()) {
|
|
56
|
+
const i = te(t, e);
|
|
57
|
+
return ne(i, n);
|
|
44
58
|
}
|
|
45
59
|
function ae(t = {}) {
|
|
46
60
|
function e(l, c, m, r) {
|
|
@@ -60,12 +74,12 @@ function ae(t = {}) {
|
|
|
60
74
|
function n(l, c, m, r) {
|
|
61
75
|
return r[l] && r[l].propertyValue && String(r[l].propertyValue.value) === String(m);
|
|
62
76
|
}
|
|
63
|
-
const
|
|
77
|
+
const i = /* @__PURE__ */ new Map([
|
|
64
78
|
["length", e],
|
|
65
79
|
["getProperty", n]
|
|
66
80
|
]);
|
|
67
|
-
Object.keys(t).reduce((l, c) => (l.set(c, t[c]), l),
|
|
68
|
-
function
|
|
81
|
+
Object.keys(t).reduce((l, c) => (l.set(c, t[c]), l), i);
|
|
82
|
+
function o(l, c) {
|
|
69
83
|
const m = l;
|
|
70
84
|
return typeof c == "number" ? [{ target: m, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: m, operator: "getProperty", param: l, value: !!c }] : typeof c == "object" ? Object.keys(c).map((r) => {
|
|
71
85
|
if (r === "length")
|
|
@@ -76,27 +90,27 @@ function ae(t = {}) {
|
|
|
76
90
|
}
|
|
77
91
|
function s(l) {
|
|
78
92
|
return Object.keys(l).reduce((m, r) => {
|
|
79
|
-
const y =
|
|
93
|
+
const y = o(r, l[r]);
|
|
80
94
|
return m.push(...y), m;
|
|
81
95
|
}, []);
|
|
82
96
|
}
|
|
83
|
-
function
|
|
84
|
-
if (
|
|
85
|
-
const m =
|
|
97
|
+
function a(l, c) {
|
|
98
|
+
if (i.has(l.operator)) {
|
|
99
|
+
const m = i.get(l.operator);
|
|
86
100
|
return m && m(l.target, l.param, l.value, c) || !1;
|
|
87
101
|
}
|
|
88
102
|
return !1;
|
|
89
103
|
}
|
|
90
104
|
function f(l, c) {
|
|
91
|
-
return s(l).reduce((y, d) => y &&
|
|
105
|
+
return s(l).reduce((y, d) => y && a(d, c), !0);
|
|
92
106
|
}
|
|
93
107
|
function v(l, c) {
|
|
94
|
-
const m = Object.keys(l), r = m.includes("allOf"), y = m.includes("anyOf"), d = r || y,
|
|
95
|
-
return r ? !
|
|
108
|
+
const m = Object.keys(l), r = m.includes("allOf"), y = m.includes("anyOf"), d = r || y, S = (d ? l[d ? r ? "allOf" : "anyOf" : "allOf"] : [l]).map((p) => f(p, c));
|
|
109
|
+
return r ? !S.includes(!1) : S.includes(!0);
|
|
96
110
|
}
|
|
97
111
|
return { parseValueSchema: v };
|
|
98
112
|
}
|
|
99
|
-
const
|
|
113
|
+
const T = {
|
|
100
114
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
101
115
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
102
116
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -136,37 +150,37 @@ const O = {
|
|
|
136
150
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
137
151
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
138
152
|
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
139
|
-
},
|
|
153
|
+
}, oe = {}, se = {};
|
|
140
154
|
ae();
|
|
141
|
-
function
|
|
142
|
-
return G[e.title] = e, X[e.title] =
|
|
143
|
-
const f =
|
|
155
|
+
function U(t, e, n = /* @__PURE__ */ new Map(), i = (a, f, v, l) => f, o = {}, s = (a) => a) {
|
|
156
|
+
return G[e.title] = e, X[e.title] = i, oe[e.title] = o, se[e.title] = s, (a = {}) => {
|
|
157
|
+
const f = ie(a, e, n), v = Object.keys(t).reduce((l, c) => (l[c] = t[c].default, l), {});
|
|
144
158
|
return Object.assign(v, f);
|
|
145
159
|
};
|
|
146
160
|
}
|
|
147
|
-
function
|
|
161
|
+
function Q(t, e) {
|
|
148
162
|
return { customClass: e.class, customStyle: e.style };
|
|
149
163
|
}
|
|
150
|
-
const
|
|
151
|
-
["appearance",
|
|
164
|
+
const re = /* @__PURE__ */ new Map([
|
|
165
|
+
["appearance", Q]
|
|
152
166
|
]);
|
|
153
|
-
function
|
|
154
|
-
const
|
|
155
|
-
return
|
|
167
|
+
function le(t, e, n) {
|
|
168
|
+
const i = t.getSchemaByType("splitter-pane");
|
|
169
|
+
return i.appearance = {
|
|
156
170
|
class: "f-col-w6 f-page-content-nav"
|
|
157
|
-
},
|
|
171
|
+
}, i.position = "left", e.contents.unshift(i), e;
|
|
158
172
|
}
|
|
159
|
-
function
|
|
160
|
-
const
|
|
161
|
-
return
|
|
173
|
+
function ce(t, e, n) {
|
|
174
|
+
const i = t.getSchemaByType("splitter-pane");
|
|
175
|
+
return i.appearance = {
|
|
162
176
|
class: "f-page-content-main"
|
|
163
|
-
},
|
|
177
|
+
}, i.position = "main", e.contents.push(i), e;
|
|
164
178
|
}
|
|
165
|
-
function
|
|
166
|
-
const
|
|
167
|
-
return String(
|
|
179
|
+
function ue(t, e, n) {
|
|
180
|
+
const i = n.parentComponentInstance;
|
|
181
|
+
return String(i.schema.appearance.class || "").split(" ").includes("f-page-main") && (e.appearance = { class: "f-page-content" }), le(t, e), ce(t, e), e;
|
|
168
182
|
}
|
|
169
|
-
const pe = "https://json-schema.org/draft/2020-12/schema",
|
|
183
|
+
const pe = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/splitter.schema.json", me = "splitter", de = "A Farris Container Component", ye = "object", he = {
|
|
170
184
|
id: {
|
|
171
185
|
description: "The unique identifier for a splitter",
|
|
172
186
|
type: "string"
|
|
@@ -203,14 +217,19 @@ const pe = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
203
217
|
"row"
|
|
204
218
|
]
|
|
205
219
|
}
|
|
206
|
-
},
|
|
220
|
+
}, ve = [
|
|
221
|
+
"id",
|
|
222
|
+
"type",
|
|
223
|
+
"contents"
|
|
224
|
+
], be = {
|
|
207
225
|
$schema: pe,
|
|
208
|
-
$id:
|
|
209
|
-
title:
|
|
210
|
-
description:
|
|
211
|
-
type:
|
|
212
|
-
properties:
|
|
213
|
-
|
|
226
|
+
$id: fe,
|
|
227
|
+
title: me,
|
|
228
|
+
description: de,
|
|
229
|
+
type: ye,
|
|
230
|
+
properties: he,
|
|
231
|
+
required: ve
|
|
232
|
+
}, ge = "splitter", ze = "A Farris Container Component", Ce = "object", Pe = {
|
|
214
233
|
basic: {
|
|
215
234
|
description: "Basic Infomation",
|
|
216
235
|
title: "基本信息",
|
|
@@ -253,38 +272,38 @@ const pe = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
253
272
|
}
|
|
254
273
|
}
|
|
255
274
|
}
|
|
256
|
-
},
|
|
257
|
-
title:
|
|
258
|
-
description:
|
|
259
|
-
type:
|
|
260
|
-
categories:
|
|
261
|
-
},
|
|
275
|
+
}, we = {
|
|
276
|
+
title: ge,
|
|
277
|
+
description: ze,
|
|
278
|
+
type: Ce,
|
|
279
|
+
categories: Pe
|
|
280
|
+
}, $ = {
|
|
262
281
|
customStyle: { type: String, default: "" },
|
|
263
282
|
customClass: { type: String, default: "" },
|
|
264
283
|
direction: { Type: String, default: "row" }
|
|
265
|
-
}, N =
|
|
266
|
-
function
|
|
267
|
-
const e = g(-1), n = g(-1),
|
|
284
|
+
}, N = U($, be, re, ue, we);
|
|
285
|
+
function J(t) {
|
|
286
|
+
const e = g(-1), n = g(-1), i = g(0), o = g(0), s = g(!1), a = g(!1), f = C(() => ({
|
|
268
287
|
display: s.value ? "block" : "none",
|
|
269
|
-
left: `${
|
|
288
|
+
left: `${i.value}px`
|
|
270
289
|
})), v = C(() => ({
|
|
271
|
-
display:
|
|
272
|
-
top: `${
|
|
290
|
+
display: a.value ? "block" : "none",
|
|
291
|
+
top: `${o.value}px`
|
|
273
292
|
})), l = C(() => ({
|
|
274
|
-
display:
|
|
293
|
+
display: a.value || s.value ? "block" : "none"
|
|
275
294
|
}));
|
|
276
295
|
function c(r) {
|
|
277
296
|
const y = t.value;
|
|
278
297
|
if (y) {
|
|
279
298
|
const { left: d } = y.getBoundingClientRect();
|
|
280
|
-
|
|
299
|
+
i.value = r.clientX - d;
|
|
281
300
|
}
|
|
282
301
|
}
|
|
283
302
|
function m(r) {
|
|
284
303
|
const y = t.value;
|
|
285
304
|
if (y) {
|
|
286
305
|
const { top: d } = y.getBoundingClientRect();
|
|
287
|
-
|
|
306
|
+
o.value = r.clientY - d;
|
|
288
307
|
}
|
|
289
308
|
}
|
|
290
309
|
return {
|
|
@@ -292,58 +311,58 @@ function Q(t) {
|
|
|
292
311
|
verticalResizeHandleStyle: v,
|
|
293
312
|
resizeOverlayStyle: l,
|
|
294
313
|
showHorizontalResizeHandle: s,
|
|
295
|
-
showVerticalResizeHandle:
|
|
314
|
+
showVerticalResizeHandle: a,
|
|
296
315
|
horizontalResizeBarPosition: e,
|
|
297
316
|
verticalResizeBarPosition: n,
|
|
298
|
-
verticalResizeHandleOffset:
|
|
299
|
-
horizontalResizeHandleOffset:
|
|
317
|
+
verticalResizeHandleOffset: o,
|
|
318
|
+
horizontalResizeHandleOffset: i,
|
|
300
319
|
draggingHorizontalResizeHandle: c,
|
|
301
320
|
draggingVerticalResizeHandle: m
|
|
302
321
|
};
|
|
303
322
|
}
|
|
304
|
-
const
|
|
305
|
-
function
|
|
323
|
+
const Se = ["moz", "ms", "webkit"];
|
|
324
|
+
function Re() {
|
|
306
325
|
let t = 0;
|
|
307
326
|
return (e) => {
|
|
308
|
-
const n = (/* @__PURE__ */ new Date()).getTime(),
|
|
309
|
-
e(n +
|
|
310
|
-
},
|
|
311
|
-
return t = n +
|
|
327
|
+
const n = (/* @__PURE__ */ new Date()).getTime(), i = Math.max(0, 16 - (n - t)), o = setTimeout(() => {
|
|
328
|
+
e(n + i);
|
|
329
|
+
}, i);
|
|
330
|
+
return t = n + i, o;
|
|
312
331
|
};
|
|
313
332
|
}
|
|
314
|
-
function
|
|
333
|
+
function De() {
|
|
315
334
|
if (typeof window > "u")
|
|
316
335
|
return () => 0;
|
|
317
336
|
if (window.requestAnimationFrame)
|
|
318
337
|
return window.requestAnimationFrame.bind(window);
|
|
319
|
-
const t =
|
|
320
|
-
return t ? window[`${t}RequestAnimationFrame`] :
|
|
338
|
+
const t = Se.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
339
|
+
return t ? window[`${t}RequestAnimationFrame`] : Re();
|
|
321
340
|
}
|
|
322
|
-
|
|
341
|
+
De();
|
|
323
342
|
function B(t, e) {
|
|
324
|
-
return ((e == null ? void 0 : e.split(" ")) || []).reduce((
|
|
343
|
+
return ((e == null ? void 0 : e.split(" ")) || []).reduce((i, o) => (o && (i[o] = !0), i), t), t;
|
|
325
344
|
}
|
|
326
345
|
function L(t, e) {
|
|
327
|
-
return ((e == null ? void 0 : e.split(";")) || []).reduce((
|
|
328
|
-
if (
|
|
329
|
-
const s =
|
|
330
|
-
|
|
346
|
+
return ((e == null ? void 0 : e.split(";")) || []).reduce((i, o) => {
|
|
347
|
+
if (o) {
|
|
348
|
+
const s = o.split(":");
|
|
349
|
+
i[s[0]] = s[1];
|
|
331
350
|
}
|
|
332
|
-
return
|
|
351
|
+
return i;
|
|
333
352
|
}, t), t;
|
|
334
353
|
}
|
|
335
|
-
const
|
|
354
|
+
const j = /* @__PURE__ */ M({
|
|
336
355
|
name: "FSplitter",
|
|
337
|
-
props:
|
|
356
|
+
props: $,
|
|
338
357
|
emits: [],
|
|
339
358
|
setup(t, e) {
|
|
340
|
-
const n = g(),
|
|
341
|
-
horizontalResizeHandleStyle:
|
|
359
|
+
const n = g(), i = J(n), {
|
|
360
|
+
horizontalResizeHandleStyle: o,
|
|
342
361
|
verticalResizeHandleStyle: s,
|
|
343
|
-
resizeOverlayStyle:
|
|
344
|
-
} =
|
|
345
|
-
|
|
346
|
-
useResizeHandleComposition:
|
|
362
|
+
resizeOverlayStyle: a
|
|
363
|
+
} = i;
|
|
364
|
+
q("splitter", {
|
|
365
|
+
useResizeHandleComposition: i
|
|
347
366
|
});
|
|
348
367
|
const f = C(() => B({
|
|
349
368
|
"f-splitter": !0
|
|
@@ -359,18 +378,18 @@ const H = /* @__PURE__ */ M({
|
|
|
359
378
|
style: v.value
|
|
360
379
|
}, [e.slots.default && e.slots.default(), w("div", {
|
|
361
380
|
class: "f-splitter-resize-overlay",
|
|
362
|
-
style:
|
|
381
|
+
style: a.value
|
|
363
382
|
}, null), w("div", {
|
|
364
383
|
class: "f-splitter-horizontal-resize-proxy",
|
|
365
|
-
style:
|
|
384
|
+
style: o.value
|
|
366
385
|
}, null), w("div", {
|
|
367
386
|
class: "f-splitter-vertical-resize-proxy",
|
|
368
387
|
style: s.value
|
|
369
388
|
}, null)]);
|
|
370
389
|
}
|
|
371
|
-
}),
|
|
372
|
-
["appearance",
|
|
373
|
-
]), Te = "https://json-schema.org/draft/2020-12/schema",
|
|
390
|
+
}), Oe = /* @__PURE__ */ new Map([
|
|
391
|
+
["appearance", Q]
|
|
392
|
+
]), Te = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/splitter-pane.schema.json", Me = "splitter-pane", Be = "A Farris Container Component", Le = "object", je = {
|
|
374
393
|
id: {
|
|
375
394
|
description: "The unique identifier for a splitter",
|
|
376
395
|
type: "string"
|
|
@@ -446,14 +465,19 @@ const H = /* @__PURE__ */ M({
|
|
|
446
465
|
type: "number",
|
|
447
466
|
default: !0
|
|
448
467
|
}
|
|
449
|
-
},
|
|
468
|
+
}, He = [
|
|
469
|
+
"id",
|
|
470
|
+
"type",
|
|
471
|
+
"contents"
|
|
472
|
+
], Ae = {
|
|
450
473
|
$schema: Te,
|
|
451
|
-
$id:
|
|
452
|
-
title:
|
|
453
|
-
description:
|
|
454
|
-
type:
|
|
455
|
-
properties:
|
|
456
|
-
|
|
474
|
+
$id: ke,
|
|
475
|
+
title: Me,
|
|
476
|
+
description: Be,
|
|
477
|
+
type: Le,
|
|
478
|
+
properties: je,
|
|
479
|
+
required: He
|
|
480
|
+
}, $e = "splitter-pane", Ee = "A Farris Container Component", Fe = "object", Ne = {
|
|
457
481
|
basic: {
|
|
458
482
|
description: "Basic Infomation",
|
|
459
483
|
title: "基本信息",
|
|
@@ -553,12 +577,12 @@ const H = /* @__PURE__ */ M({
|
|
|
553
577
|
}
|
|
554
578
|
}
|
|
555
579
|
}
|
|
556
|
-
},
|
|
557
|
-
title:
|
|
558
|
-
description:
|
|
559
|
-
type:
|
|
560
|
-
categories:
|
|
561
|
-
},
|
|
580
|
+
}, Ve = {
|
|
581
|
+
title: $e,
|
|
582
|
+
description: Ee,
|
|
583
|
+
type: Fe,
|
|
584
|
+
categories: Ne
|
|
585
|
+
}, E = {
|
|
562
586
|
customClass: { type: String, defaut: "" },
|
|
563
587
|
customStyle: { type: String, default: "" },
|
|
564
588
|
width: { type: Number },
|
|
@@ -580,18 +604,18 @@ const H = /* @__PURE__ */ M({
|
|
|
580
604
|
minWidth: { type: Number, default: 0 },
|
|
581
605
|
/** 面板最小高度 */
|
|
582
606
|
minHeight: { type: Number, default: 0 }
|
|
583
|
-
}, V =
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
607
|
+
}, V = U(
|
|
608
|
+
E,
|
|
609
|
+
Ae,
|
|
610
|
+
Oe,
|
|
587
611
|
void 0,
|
|
588
|
-
|
|
612
|
+
Ve
|
|
589
613
|
);
|
|
590
|
-
function
|
|
591
|
-
const n = g(t.width),
|
|
592
|
-
horizontalResizeBarPosition:
|
|
614
|
+
function Z(t, e) {
|
|
615
|
+
const n = g(t.width), i = g(t.height), {
|
|
616
|
+
horizontalResizeBarPosition: o,
|
|
593
617
|
horizontalResizeHandleOffset: s,
|
|
594
|
-
showHorizontalResizeHandle:
|
|
618
|
+
showHorizontalResizeHandle: a,
|
|
595
619
|
showVerticalResizeHandle: f,
|
|
596
620
|
verticalResizeBarPosition: v,
|
|
597
621
|
verticalResizeHandleOffset: l,
|
|
@@ -599,58 +623,58 @@ function J(t, e) {
|
|
|
599
623
|
draggingVerticalResizeHandle: m
|
|
600
624
|
} = e;
|
|
601
625
|
let r = "", y, d;
|
|
602
|
-
function P(
|
|
626
|
+
function P(u) {
|
|
603
627
|
if ((r === "left" || r === "right") && d) {
|
|
604
|
-
const { left:
|
|
628
|
+
const { left: p } = d.getBoundingClientRect(), { width: z } = y.getBoundingClientRect(), h = u.clientX - p, b = r === "left" ? (z || 0) + (h - o.value) : (z || 0) - (h - o.value);
|
|
605
629
|
n.value = t.minWidth > 0 ? Math.max(t.minWidth, b) : b;
|
|
606
630
|
}
|
|
607
631
|
if ((r === "top" || r === "bottom") && d) {
|
|
608
|
-
const { top:
|
|
609
|
-
|
|
632
|
+
const { top: p } = d.getBoundingClientRect(), { height: z } = y.getBoundingClientRect(), h = u.clientY - p, b = r === "top" ? (z || 0) + (h - v.value) : (z || 0) - (h - v.value);
|
|
633
|
+
i.value = t.minHeight > 0 ? Math.max(t.minHeight, b) : b;
|
|
610
634
|
}
|
|
611
|
-
s.value = 0, l.value = 0,
|
|
635
|
+
s.value = 0, l.value = 0, o.value = -1, v.value = -1, a.value = !1, f.value = !1, document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", P), document.body.style.userSelect = "", r = "", y = null, d = null;
|
|
612
636
|
}
|
|
613
|
-
function
|
|
614
|
-
if (r =
|
|
637
|
+
function D(u, p, z) {
|
|
638
|
+
if (r = p, y = z, a.value = !0, d = u.composedPath().find((b) => b.className.split(" ")[0] === "f-splitter"), d) {
|
|
615
639
|
const { left: b } = d.getBoundingClientRect();
|
|
616
|
-
s.value =
|
|
640
|
+
s.value = u.clientX - b, o.value = u.clientX - b, document.addEventListener("mousemove", c), document.addEventListener("mouseup", P), document.body.style.userSelect = "none";
|
|
617
641
|
}
|
|
618
642
|
}
|
|
619
|
-
function
|
|
620
|
-
if (r =
|
|
643
|
+
function S(u, p, z) {
|
|
644
|
+
if (r = p, y = z, f.value = !0, d = u.composedPath().find((b) => b.className.split(" ")[0] === "f-splitter"), d) {
|
|
621
645
|
const { top: b } = d.getBoundingClientRect();
|
|
622
|
-
l.value =
|
|
646
|
+
l.value = u.clientY - b, v.value = u.clientY - b, document.addEventListener("mousemove", m), document.addEventListener("mouseup", P), document.body.style.userSelect = "none";
|
|
623
647
|
}
|
|
624
648
|
}
|
|
625
649
|
return {
|
|
626
650
|
actualWidth: n,
|
|
627
|
-
actualHeight:
|
|
628
|
-
onClickSplitterHorizontalResizeBar:
|
|
629
|
-
onClickSplitterVerticalResizeBar:
|
|
651
|
+
actualHeight: i,
|
|
652
|
+
onClickSplitterHorizontalResizeBar: D,
|
|
653
|
+
onClickSplitterVerticalResizeBar: S
|
|
630
654
|
};
|
|
631
655
|
}
|
|
632
|
-
const
|
|
656
|
+
const H = /* @__PURE__ */ M({
|
|
633
657
|
name: "FSplitterPane",
|
|
634
|
-
props:
|
|
658
|
+
props: E,
|
|
635
659
|
emits: [],
|
|
636
660
|
setup(t, e) {
|
|
637
|
-
const n = g(),
|
|
638
|
-
useResizeHandleComposition:
|
|
639
|
-
} =
|
|
640
|
-
actualHeight:
|
|
661
|
+
const n = g(), i = k("splitter"), {
|
|
662
|
+
useResizeHandleComposition: o
|
|
663
|
+
} = i, s = Z(t, o), {
|
|
664
|
+
actualHeight: a,
|
|
641
665
|
actualWidth: f,
|
|
642
666
|
onClickSplitterHorizontalResizeBar: v,
|
|
643
667
|
onClickSplitterVerticalResizeBar: l
|
|
644
668
|
} = s, c = g(t.position), m = C(() => {
|
|
645
|
-
const
|
|
669
|
+
const u = {
|
|
646
670
|
"f-splitter-pane": !0,
|
|
647
671
|
"f-splitter-pane-main": c.value === "center",
|
|
648
672
|
"has-resize-bar": t.resizable
|
|
649
673
|
};
|
|
650
|
-
return
|
|
651
|
-
}), r = C(() => t.resizeHandle ? t.resizeHandle.split(",").filter((
|
|
652
|
-
const
|
|
653
|
-
return (f.value && c.value === "left" || c.value === "right" || r.value.find((
|
|
674
|
+
return u["f-splitter-pane-" + c.value] = !0, B(u, t == null ? void 0 : t.customClass);
|
|
675
|
+
}), r = C(() => t.resizeHandle ? t.resizeHandle.split(",").filter((u) => ["e", "n", "s", "w"].find((p) => p === u)) : []), y = C(() => {
|
|
676
|
+
const u = {};
|
|
677
|
+
return (f.value && c.value === "left" || c.value === "right" || r.value.find((p) => p === "e") || r.value.find((p) => p === "w")) && (u.width = `${f.value}px`), (a.value && c.value === "bottom" || c.value === "top" || r.value.find((p) => p === "s") || r.value.find((p) => p === "n")) && (u.height = `${a.value}px`), L(u, t == null ? void 0 : t.customStyle);
|
|
654
678
|
}), d = C(() => ({
|
|
655
679
|
"f-splitter-resize-bar": !0,
|
|
656
680
|
"f-splitter-resize-bar-e": c.value === "left",
|
|
@@ -658,37 +682,37 @@ const j = /* @__PURE__ */ M({
|
|
|
658
682
|
"f-splitter-resize-bar-s": c.value === "top",
|
|
659
683
|
"f-splitter-resize-bar-w": c.value === "right"
|
|
660
684
|
}));
|
|
661
|
-
function P(
|
|
685
|
+
function P(u) {
|
|
662
686
|
return {
|
|
663
687
|
e: "left",
|
|
664
688
|
w: "right",
|
|
665
689
|
s: "top",
|
|
666
690
|
n: "bottom"
|
|
667
|
-
}[
|
|
691
|
+
}[u] || u;
|
|
668
692
|
}
|
|
669
|
-
function
|
|
670
|
-
|
|
693
|
+
function D(u, p) {
|
|
694
|
+
p = P(p), ["left", "right"].find((z) => z === p) && v(u, p, n.value), ["top", "bottom"].find((z) => z === p) && l(u, p, n.value);
|
|
671
695
|
}
|
|
672
|
-
function
|
|
673
|
-
return r.value.length > 0 ? r.value.map((
|
|
674
|
-
class: "f-splitter-resize-bar f-splitter-resize-bar-" +
|
|
675
|
-
onMousedown: (
|
|
696
|
+
function S() {
|
|
697
|
+
return r.value.length > 0 ? r.value.map((u) => w("span", {
|
|
698
|
+
class: "f-splitter-resize-bar f-splitter-resize-bar-" + u,
|
|
699
|
+
onMousedown: (p) => D(p, u)
|
|
676
700
|
}, null)) : w("span", {
|
|
677
701
|
class: d.value,
|
|
678
|
-
onMousedown: (
|
|
702
|
+
onMousedown: (u) => D(u, c.value)
|
|
679
703
|
}, null);
|
|
680
704
|
}
|
|
681
705
|
return () => w("div", {
|
|
682
706
|
ref: n,
|
|
683
707
|
class: m.value,
|
|
684
708
|
style: y.value
|
|
685
|
-
}, [e.slots.default && e.slots.default(), t.resizable &&
|
|
709
|
+
}, [e.slots.default && e.slots.default(), t.resizable && S()]);
|
|
686
710
|
}
|
|
687
711
|
});
|
|
688
|
-
function
|
|
712
|
+
function x(t, e, n) {
|
|
689
713
|
var z;
|
|
690
|
-
const
|
|
691
|
-
function
|
|
714
|
+
const i = n && n.getStyles && n.getStyles() || "", o = n && n.getDesignerClass && n.getDesignerClass() || "", s = g();
|
|
715
|
+
function a() {
|
|
692
716
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
693
717
|
}
|
|
694
718
|
function f() {
|
|
@@ -705,12 +729,12 @@ function Z(t, e, n) {
|
|
|
705
729
|
return null;
|
|
706
730
|
if (h.value.schema && h.value.schema.type === "component")
|
|
707
731
|
return h.value;
|
|
708
|
-
const b = g(h == null ? void 0 : h.value.parent),
|
|
709
|
-
return
|
|
732
|
+
const b = g(h == null ? void 0 : h.value.parent), R = c(b);
|
|
733
|
+
return R || null;
|
|
710
734
|
}
|
|
711
735
|
function m(h = e) {
|
|
712
|
-
const { componentInstance: b, designerItemElementRef:
|
|
713
|
-
return !b || !b.value ? null : b.value.canMove ?
|
|
736
|
+
const { componentInstance: b, designerItemElementRef: R } = h;
|
|
737
|
+
return !b || !b.value ? null : b.value.canMove ? R : m(h.parent);
|
|
714
738
|
}
|
|
715
739
|
function r(h) {
|
|
716
740
|
return !!n && n.canAccepts(h);
|
|
@@ -723,30 +747,30 @@ function Z(t, e, n) {
|
|
|
723
747
|
function P(h, b) {
|
|
724
748
|
b && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(b);
|
|
725
749
|
}
|
|
726
|
-
function
|
|
727
|
-
const { componentType:
|
|
728
|
-
let
|
|
729
|
-
n && n.onResolveNewComponentSchema && (
|
|
730
|
-
const
|
|
731
|
-
return
|
|
750
|
+
function D(h, b) {
|
|
751
|
+
const { componentType: R } = h;
|
|
752
|
+
let O = Y(R, h, b);
|
|
753
|
+
n && n.onResolveNewComponentSchema && (O = n.onResolveNewComponentSchema(h, O));
|
|
754
|
+
const I = R.toLowerCase().replace(/-/g, "_");
|
|
755
|
+
return O && !O.id && O.type === R && (O.id = `${I}_${Math.random().toString().slice(2, 6)}`), O;
|
|
732
756
|
}
|
|
733
|
-
function
|
|
757
|
+
function S(h) {
|
|
734
758
|
}
|
|
735
|
-
function
|
|
759
|
+
function u(...h) {
|
|
736
760
|
if (n && n.getPropsConfig)
|
|
737
761
|
return n.getPropsConfig(...h);
|
|
738
762
|
}
|
|
739
|
-
function
|
|
763
|
+
function p() {
|
|
740
764
|
n && n.onRemoveComponent && n.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((h) => {
|
|
741
|
-
var
|
|
765
|
+
var O;
|
|
742
766
|
let b = h.id;
|
|
743
767
|
h.type === "component-ref" && (b = h.component);
|
|
744
|
-
const
|
|
745
|
-
(
|
|
768
|
+
const R = t.value.querySelector(`#${b}-design-item`);
|
|
769
|
+
(O = R == null ? void 0 : R.componentInstance) != null && O.value.onRemoveComponent && R.componentInstance.value.onRemoveComponent();
|
|
746
770
|
});
|
|
747
771
|
}
|
|
748
772
|
return s.value = {
|
|
749
|
-
canMove:
|
|
773
|
+
canMove: a(),
|
|
750
774
|
canSelectParent: f(),
|
|
751
775
|
canDelete: v(),
|
|
752
776
|
canNested: !l(),
|
|
@@ -754,103 +778,103 @@ function Z(t, e, n) {
|
|
|
754
778
|
elementRef: t,
|
|
755
779
|
parent: (z = e == null ? void 0 : e.parent) == null ? void 0 : z.componentInstance,
|
|
756
780
|
schema: e == null ? void 0 : e.schema,
|
|
757
|
-
styles:
|
|
758
|
-
designerClass:
|
|
781
|
+
styles: i,
|
|
782
|
+
designerClass: o,
|
|
759
783
|
canAccepts: r,
|
|
760
784
|
getBelongedComponentInstance: c,
|
|
761
785
|
getDraggableDesignItemElement: m,
|
|
762
786
|
getDraggingDisplayText: y,
|
|
763
|
-
getPropConfig:
|
|
787
|
+
getPropConfig: u,
|
|
764
788
|
getDragScopeElement: d,
|
|
765
789
|
onAcceptMovedChildElement: P,
|
|
766
|
-
onChildElementMovedOut:
|
|
767
|
-
addNewChildComponentSchema:
|
|
790
|
+
onChildElementMovedOut: S,
|
|
791
|
+
addNewChildComponentSchema: D,
|
|
768
792
|
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || g(!1),
|
|
769
793
|
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || g(!1),
|
|
770
|
-
onRemoveComponent:
|
|
794
|
+
onRemoveComponent: p
|
|
771
795
|
}, s;
|
|
772
796
|
}
|
|
773
|
-
class
|
|
797
|
+
class K {
|
|
774
798
|
getTemplateRule(e, n) {
|
|
775
|
-
const
|
|
776
|
-
if (!
|
|
799
|
+
const i = n == null ? void 0 : n.formSchemaUtils, o = i == null ? void 0 : i.getFormTemplateRule(), s = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
800
|
+
if (!o)
|
|
777
801
|
return s;
|
|
778
|
-
const
|
|
802
|
+
const a = this.getComponentContext(e), { componentClassList: f } = a;
|
|
779
803
|
return f.forEach((v) => {
|
|
780
|
-
if (!v || !
|
|
804
|
+
if (!v || !o[v])
|
|
781
805
|
return;
|
|
782
|
-
const { canMove: l, canDelete: c, canAccept: m } =
|
|
783
|
-
s.canMove = s.canMove && this.resolveRuleValue(l,
|
|
806
|
+
const { canMove: l, canDelete: c, canAccept: m } = o[v];
|
|
807
|
+
s.canMove = s.canMove && this.resolveRuleValue(l, a), s.canDelete = s.canDelete && this.resolveRuleValue(c, a), s.canAccept = s.canAccept && this.resolveRuleValue(m, a);
|
|
784
808
|
}), s;
|
|
785
809
|
}
|
|
786
810
|
resolveRuleValue(e, n) {
|
|
787
811
|
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, n);
|
|
788
812
|
}
|
|
789
813
|
parseRuleValueSchema(e, n) {
|
|
790
|
-
const
|
|
791
|
-
let
|
|
792
|
-
for (const s of
|
|
814
|
+
const i = e.invalidContext || [];
|
|
815
|
+
let o = !0;
|
|
816
|
+
for (const s of i) {
|
|
793
817
|
if (s.firstLevelChild) {
|
|
794
818
|
if (s.firstLevelChild.class) {
|
|
795
|
-
const { firstLevelChildClassList:
|
|
796
|
-
if (
|
|
797
|
-
|
|
819
|
+
const { firstLevelChildClassList: a } = n;
|
|
820
|
+
if (a && !a.includes(s.firstLevelChild.class)) {
|
|
821
|
+
o = !1;
|
|
798
822
|
continue;
|
|
799
823
|
}
|
|
800
824
|
}
|
|
801
825
|
if (s.firstLevelChild.type) {
|
|
802
|
-
const { firstLevelChildSchema:
|
|
803
|
-
if (!
|
|
804
|
-
|
|
826
|
+
const { firstLevelChildSchema: a } = n;
|
|
827
|
+
if (!a || a.type !== s.firstLevelChild.type) {
|
|
828
|
+
o = !1;
|
|
805
829
|
continue;
|
|
806
830
|
}
|
|
807
831
|
}
|
|
808
832
|
}
|
|
809
833
|
if (s.secondLevelChild) {
|
|
810
834
|
if (s.secondLevelChild.class) {
|
|
811
|
-
const { secondLevelChildClassList:
|
|
812
|
-
if (
|
|
813
|
-
|
|
835
|
+
const { secondLevelChildClassList: a } = n;
|
|
836
|
+
if (a && !a.includes(s.secondLevelChild.class)) {
|
|
837
|
+
o = !1;
|
|
814
838
|
continue;
|
|
815
839
|
}
|
|
816
840
|
}
|
|
817
841
|
if (s.secondLevelChild.type) {
|
|
818
|
-
const { secondLevelChildSchema:
|
|
819
|
-
if (!
|
|
820
|
-
|
|
842
|
+
const { secondLevelChildSchema: a } = n;
|
|
843
|
+
if (!a || a.type !== s.secondLevelChild.type) {
|
|
844
|
+
o = !1;
|
|
821
845
|
continue;
|
|
822
846
|
}
|
|
823
847
|
}
|
|
824
848
|
}
|
|
825
849
|
if (s.parent) {
|
|
826
850
|
if (s.parent.class) {
|
|
827
|
-
const { parentClassList:
|
|
828
|
-
if (
|
|
829
|
-
|
|
851
|
+
const { parentClassList: a } = n;
|
|
852
|
+
if (a && !a.includes(s.parent.class)) {
|
|
853
|
+
o = !1;
|
|
830
854
|
continue;
|
|
831
855
|
}
|
|
832
856
|
}
|
|
833
857
|
if (s.parent.type) {
|
|
834
|
-
const { parentSchema:
|
|
835
|
-
if (
|
|
836
|
-
|
|
858
|
+
const { parentSchema: a } = n;
|
|
859
|
+
if (a && a.type !== s.parent.type) {
|
|
860
|
+
o = !1;
|
|
837
861
|
continue;
|
|
838
862
|
}
|
|
839
863
|
}
|
|
840
864
|
}
|
|
841
|
-
|
|
865
|
+
o = !0;
|
|
842
866
|
break;
|
|
843
867
|
}
|
|
844
|
-
return !
|
|
868
|
+
return !o;
|
|
845
869
|
}
|
|
846
870
|
getComponentContext(e) {
|
|
847
|
-
var P,
|
|
848
|
-
const n = e.schema,
|
|
871
|
+
var P, D, S, u;
|
|
872
|
+
const n = e.schema, i = n.appearance && n.appearance.class || "", o = i.split(" ") || [], s = n.contents || [], a = s.length ? s[0] : null, f = a && a.appearance ? a.appearance.class : "", v = f ? f.split(" ") : [], l = (P = a == null ? void 0 : a.contents) != null && P.length ? a == null ? void 0 : a.contents[0] : null, c = l && l.appearance ? l.appearance.class : "", m = c ? c.split(" ") : [], r = n.type === "component" ? (S = (D = e.parent) == null ? void 0 : D.parent) == null ? void 0 : S.schema : (u = e.parent) == null ? void 0 : u.schema, y = r && r.appearance && r.appearance.class || "", d = y ? y.split(" ") : [];
|
|
849
873
|
return {
|
|
850
|
-
componentClass:
|
|
851
|
-
componentClassList:
|
|
874
|
+
componentClass: i,
|
|
875
|
+
componentClassList: o,
|
|
852
876
|
childContents: s,
|
|
853
|
-
firstLevelChildSchema:
|
|
877
|
+
firstLevelChildSchema: a,
|
|
854
878
|
firstLevelChildClass: f,
|
|
855
879
|
firstLevelChildClassList: v,
|
|
856
880
|
secondLevelChildSchema: l,
|
|
@@ -862,35 +886,35 @@ class x {
|
|
|
862
886
|
};
|
|
863
887
|
}
|
|
864
888
|
}
|
|
865
|
-
function
|
|
866
|
-
const n = new
|
|
889
|
+
function qe(t, e) {
|
|
890
|
+
const n = new K(), { canMove: i, canDelete: o } = n.getTemplateRule(t, e);
|
|
867
891
|
function s() {
|
|
868
892
|
return !1;
|
|
869
893
|
}
|
|
870
|
-
function
|
|
871
|
-
return
|
|
894
|
+
function a() {
|
|
895
|
+
return o;
|
|
872
896
|
}
|
|
873
897
|
function f() {
|
|
874
|
-
return
|
|
898
|
+
return i;
|
|
875
899
|
}
|
|
876
900
|
function v() {
|
|
877
901
|
return !0;
|
|
878
902
|
}
|
|
879
|
-
return { canAccepts: s, checkCanDeleteComponent:
|
|
903
|
+
return { canAccepts: s, checkCanDeleteComponent: a, checkCanMoveComponent: f, hideNestedPaddingInDesginerView: v };
|
|
880
904
|
}
|
|
881
|
-
const
|
|
905
|
+
const We = /* @__PURE__ */ M({
|
|
882
906
|
name: "FSplitterDesign",
|
|
883
|
-
props:
|
|
907
|
+
props: $,
|
|
884
908
|
emits: [],
|
|
885
909
|
setup(t, e) {
|
|
886
|
-
const n = g(),
|
|
887
|
-
|
|
888
|
-
const f =
|
|
910
|
+
const n = g(), i = k("designer-host-service"), o = k("design-item-context"), s = qe(o, i), a = x(n, o, s);
|
|
911
|
+
a.value.canNested = !1;
|
|
912
|
+
const f = J(n), {
|
|
889
913
|
horizontalResizeHandleStyle: v,
|
|
890
914
|
verticalResizeHandleStyle: l,
|
|
891
915
|
resizeOverlayStyle: c
|
|
892
916
|
} = f;
|
|
893
|
-
|
|
917
|
+
q("splitter", {
|
|
894
918
|
useResizeHandleComposition: f
|
|
895
919
|
});
|
|
896
920
|
const m = C(() => B({
|
|
@@ -901,9 +925,9 @@ const Ne = /* @__PURE__ */ M({
|
|
|
901
925
|
};
|
|
902
926
|
return L(y, t == null ? void 0 : t.customStyle);
|
|
903
927
|
});
|
|
904
|
-
return
|
|
905
|
-
n.value.componentInstance =
|
|
906
|
-
}), e.expose(
|
|
928
|
+
return W(() => {
|
|
929
|
+
n.value.componentInstance = a;
|
|
930
|
+
}), e.expose(a.value), () => w("div", {
|
|
907
931
|
class: m.value,
|
|
908
932
|
ref: n,
|
|
909
933
|
style: r.value
|
|
@@ -919,100 +943,100 @@ const Ne = /* @__PURE__ */ M({
|
|
|
919
943
|
}, null)]);
|
|
920
944
|
}
|
|
921
945
|
});
|
|
922
|
-
function
|
|
946
|
+
function _e() {
|
|
923
947
|
function t(e, n) {
|
|
924
|
-
var
|
|
948
|
+
var a;
|
|
925
949
|
if (!e)
|
|
926
950
|
return !1;
|
|
927
|
-
const
|
|
928
|
-
if (!
|
|
951
|
+
const i = ((a = e.targetContainer) == null ? void 0 : a.componentInstance) && e.targetContainer.componentInstance.value;
|
|
952
|
+
if (!i)
|
|
929
953
|
return !1;
|
|
930
|
-
const
|
|
931
|
-
return !((e.componentCategory === "input" || e.componentType === "form-group") && ![
|
|
954
|
+
const o = i.schema.type, s = n == null ? void 0 : n.formSchemaUtils.getComponentById(i.belongedComponentId);
|
|
955
|
+
return !((e.componentCategory === "input" || e.componentType === "form-group") && ![T["response-layout-item"].type, T["response-form"].type].includes(o) || (e.componentType === T.tabs.type || e.componentType === T.section.type) && ((s == null ? void 0 : s.componentType) !== "frame" || ![T["content-container"].type, T["splitter-pane"].type, T["response-layout-item"].type].includes(o)));
|
|
932
956
|
}
|
|
933
957
|
return {
|
|
934
958
|
basalDragulaRuleForContainer: t
|
|
935
959
|
};
|
|
936
960
|
}
|
|
937
|
-
function
|
|
938
|
-
const n = new
|
|
939
|
-
function
|
|
940
|
-
return
|
|
961
|
+
function Ge(t, e) {
|
|
962
|
+
const n = new K(), { canAccept: i } = n.getTemplateRule(t, e);
|
|
963
|
+
function o(f) {
|
|
964
|
+
return _e().basalDragulaRuleForContainer(f, e) ? i : !1;
|
|
941
965
|
}
|
|
942
966
|
function s() {
|
|
943
967
|
return !1;
|
|
944
968
|
}
|
|
945
|
-
function
|
|
969
|
+
function a() {
|
|
946
970
|
return !1;
|
|
947
971
|
}
|
|
948
972
|
return {
|
|
949
|
-
canAccepts:
|
|
973
|
+
canAccepts: o,
|
|
950
974
|
checkCanMoveComponent: s,
|
|
951
|
-
checkCanDeleteComponent:
|
|
975
|
+
checkCanDeleteComponent: a
|
|
952
976
|
};
|
|
953
977
|
}
|
|
954
|
-
const
|
|
978
|
+
const Xe = /* @__PURE__ */ M({
|
|
955
979
|
name: "FSplitterPaneDesign",
|
|
956
|
-
props:
|
|
980
|
+
props: E,
|
|
957
981
|
emits: [],
|
|
958
982
|
setup(t, e) {
|
|
959
|
-
const n = g(),
|
|
960
|
-
|
|
961
|
-
n.value.componentInstance =
|
|
962
|
-
}), e.expose(
|
|
983
|
+
const n = g(), i = k("designer-host-service"), o = k("design-item-context"), s = Ge(o, i), a = x(n, o, s);
|
|
984
|
+
a.value.styles = "padding:0;box-shadow:none;", a.value.canNested = !1, a.value.canMove = !1, a.value.canDelete = !1, W(() => {
|
|
985
|
+
n.value.componentInstance = a;
|
|
986
|
+
}), e.expose(a.value);
|
|
963
987
|
const f = k("splitter"), {
|
|
964
988
|
useResizeHandleComposition: v
|
|
965
|
-
} = f, l =
|
|
989
|
+
} = f, l = Z(t, v), {
|
|
966
990
|
actualHeight: c,
|
|
967
991
|
actualWidth: m
|
|
968
992
|
} = l, r = g(t.position), y = C(() => {
|
|
969
|
-
const
|
|
993
|
+
const u = {
|
|
970
994
|
"f-splitter-pane": !0,
|
|
971
995
|
"f-splitter-pane-main": r.value === "center",
|
|
972
996
|
"has-resize-bar": t.resizable,
|
|
973
997
|
"f-component-splitter-pane": !0,
|
|
974
998
|
"drag-container": !0
|
|
975
999
|
};
|
|
976
|
-
return
|
|
977
|
-
}), d = C(() => t.resizeHandle ? t.resizeHandle.split(",").filter((
|
|
978
|
-
const
|
|
979
|
-
return (m.value && r.value === "left" || r.value === "right" || d.value.find((
|
|
980
|
-
}),
|
|
1000
|
+
return u["f-splitter-pane-" + r.value] = !0, B(u, t == null ? void 0 : t.customClass);
|
|
1001
|
+
}), d = C(() => t.resizeHandle ? t.resizeHandle.split(",").filter((u) => ["e", "n", "s", "w"].find((p) => p === u)) : []), P = C(() => {
|
|
1002
|
+
const u = {};
|
|
1003
|
+
return (m.value && r.value === "left" || r.value === "right" || d.value.find((p) => p === "e") || d.value.find((p) => p === "w")) && (u.width = `${m.value}px`), (c.value && r.value === "bottom" || r.value === "top" || d.value.find((p) => p === "s") || d.value.find((p) => p === "n")) && (u.height = `${c.value}px`), L(u, t == null ? void 0 : t.customStyle);
|
|
1004
|
+
}), D = C(() => ({
|
|
981
1005
|
"f-splitter-resize-bar": !0,
|
|
982
1006
|
"f-splitter-resize-bar-e": r.value === "left",
|
|
983
1007
|
"f-splitter-resize-bar-n": r.value === "bottom",
|
|
984
1008
|
"f-splitter-resize-bar-s": r.value === "top",
|
|
985
1009
|
"f-splitter-resize-bar-w": r.value === "right"
|
|
986
1010
|
}));
|
|
987
|
-
function
|
|
988
|
-
return d.value.length > 0 ? d.value.map((
|
|
989
|
-
class: "f-splitter-resize-bar f-splitter-resize-bar-" +
|
|
1011
|
+
function S() {
|
|
1012
|
+
return d.value.length > 0 ? d.value.map((u) => w("span", {
|
|
1013
|
+
class: "f-splitter-resize-bar f-splitter-resize-bar-" + u
|
|
990
1014
|
}, null)) : w("span", {
|
|
991
|
-
class:
|
|
1015
|
+
class: D.value
|
|
992
1016
|
}, null);
|
|
993
1017
|
}
|
|
994
1018
|
return () => w("div", {
|
|
995
1019
|
ref: n,
|
|
996
|
-
"data-dragref": `${
|
|
1020
|
+
"data-dragref": `${o.schema.id}-container`,
|
|
997
1021
|
class: y.value,
|
|
998
1022
|
style: P.value
|
|
999
|
-
}, [e.slots.default && e.slots.default(), t.resizable &&
|
|
1023
|
+
}, [e.slots.default && e.slots.default(), t.resizable && S()]);
|
|
1000
1024
|
}
|
|
1001
|
-
}),
|
|
1025
|
+
}), Je = {
|
|
1002
1026
|
install(t) {
|
|
1003
|
-
t.component(
|
|
1027
|
+
t.component(j.name, j), t.component(H.name, H);
|
|
1004
1028
|
},
|
|
1005
|
-
register(t, e, n,
|
|
1006
|
-
t.splitter =
|
|
1029
|
+
register(t, e, n, i) {
|
|
1030
|
+
t.splitter = j, e.splitter = N, t["splitter-pane"] = H, e["splitter-pane"] = V;
|
|
1007
1031
|
},
|
|
1008
1032
|
registerDesigner(t, e, n) {
|
|
1009
|
-
t.splitter =
|
|
1033
|
+
t.splitter = We, e.splitter = N, t["splitter-pane"] = Xe, e["splitter-pane"] = V;
|
|
1010
1034
|
}
|
|
1011
1035
|
};
|
|
1012
1036
|
export {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1037
|
+
j as FSplitter,
|
|
1038
|
+
H as FSplitterPane,
|
|
1039
|
+
Je as default,
|
|
1040
|
+
$ as splitterProps,
|
|
1017
1041
|
N as splitterPropsResolver
|
|
1018
1042
|
};
|