@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as g, computed as C, defineComponent as M, provide as W, createVNode as w, inject as k, onMounted as q } from "vue";
|
|
2
2
|
import { isPlainObject as $, cloneDeep as I } from "lodash-es";
|
|
3
3
|
import "bignumber.js";
|
|
4
4
|
const G = {}, X = {};
|
|
5
5
|
function E(t) {
|
|
6
|
-
const { properties: e, title: n, ignore: a } = t, i = a && Array.isArray(a),
|
|
7
|
-
|
|
6
|
+
const { properties: e, title: n, ignore: a } = t, i = a && Array.isArray(a), s = Object.keys(e).reduce((o, f) => ((!i || !a.find((v) => v === f)) && (o[f] = e[f].type === "object" && e[f].properties ? E(e[f]) : I(e[f].default)), o), {});
|
|
7
|
+
if (n && (!i || !a.find((o) => o === "id"))) {
|
|
8
|
+
const o = n.toLowerCase().replace(/-/g, "_");
|
|
9
|
+
s.id = `${o}_${Math.random().toString().slice(2, 6)}`;
|
|
10
|
+
}
|
|
11
|
+
return s;
|
|
8
12
|
}
|
|
9
13
|
function Y(t, e = {}, n) {
|
|
10
14
|
const a = G[t];
|
|
11
15
|
if (a) {
|
|
12
16
|
let i = E(a);
|
|
13
|
-
const
|
|
14
|
-
return i =
|
|
17
|
+
const s = X[t];
|
|
18
|
+
return i = s ? s({ getSchemaByType: Y }, i, e, n) : i, i;
|
|
15
19
|
}
|
|
16
20
|
return null;
|
|
17
21
|
}
|
|
18
22
|
function ee(t, e) {
|
|
19
23
|
const n = E(e);
|
|
20
|
-
return Object.keys(
|
|
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;
|
|
21
25
|
}
|
|
22
26
|
function te(t, e) {
|
|
23
27
|
return Object.keys(t).filter((a) => t[a] != null).reduce((a, i) => {
|
|
24
28
|
if (e.has(i)) {
|
|
25
|
-
const
|
|
26
|
-
if (typeof
|
|
27
|
-
a[
|
|
29
|
+
const s = e.get(i);
|
|
30
|
+
if (typeof s == "string")
|
|
31
|
+
a[s] = t[i];
|
|
28
32
|
else {
|
|
29
|
-
const
|
|
30
|
-
Object.assign(a,
|
|
33
|
+
const o = s(i, t[i], t);
|
|
34
|
+
Object.assign(a, o);
|
|
31
35
|
}
|
|
32
36
|
} else
|
|
33
37
|
a[i] = t[i];
|
|
@@ -43,13 +47,13 @@ function ae(t = {}) {
|
|
|
43
47
|
if (typeof m == "number")
|
|
44
48
|
return r[l].length === m;
|
|
45
49
|
if (typeof m == "object") {
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
return Number(r[l].length) !== Number(
|
|
49
|
-
if (
|
|
50
|
-
return Number(r[l].length) >= Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(r[l].length) <= Number(
|
|
50
|
+
const y = Object.keys(m)[0], d = m[y];
|
|
51
|
+
if (y === "not")
|
|
52
|
+
return Number(r[l].length) !== Number(d);
|
|
53
|
+
if (y === "moreThan")
|
|
54
|
+
return Number(r[l].length) >= Number(d);
|
|
55
|
+
if (y === "lessThan")
|
|
56
|
+
return Number(r[l].length) <= Number(d);
|
|
53
57
|
}
|
|
54
58
|
return !1;
|
|
55
59
|
}
|
|
@@ -66,33 +70,33 @@ function ae(t = {}) {
|
|
|
66
70
|
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) => {
|
|
67
71
|
if (r === "length")
|
|
68
72
|
return { target: m, operator: "length", param: null, value: c[r] };
|
|
69
|
-
const
|
|
70
|
-
return { target: m, operator: "getProperty", param:
|
|
73
|
+
const y = r, d = c[r];
|
|
74
|
+
return { target: m, operator: "getProperty", param: y, value: d };
|
|
71
75
|
}) : [];
|
|
72
76
|
}
|
|
73
|
-
function
|
|
77
|
+
function s(l) {
|
|
74
78
|
return Object.keys(l).reduce((m, r) => {
|
|
75
|
-
const
|
|
76
|
-
return m.push(...
|
|
79
|
+
const y = i(r, l[r]);
|
|
80
|
+
return m.push(...y), m;
|
|
77
81
|
}, []);
|
|
78
82
|
}
|
|
79
|
-
function
|
|
83
|
+
function o(l, c) {
|
|
80
84
|
if (a.has(l.operator)) {
|
|
81
85
|
const m = a.get(l.operator);
|
|
82
86
|
return m && m(l.target, l.param, l.value, c) || !1;
|
|
83
87
|
}
|
|
84
88
|
return !1;
|
|
85
89
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
90
|
+
function f(l, c) {
|
|
91
|
+
return s(l).reduce((y, d) => y && o(d, c), !0);
|
|
88
92
|
}
|
|
89
|
-
function
|
|
90
|
-
const m = Object.keys(l), r = m.includes("allOf"),
|
|
91
|
-
return r ? !
|
|
93
|
+
function v(l, c) {
|
|
94
|
+
const m = Object.keys(l), r = m.includes("allOf"), y = m.includes("anyOf"), d = r || y, R = (d ? l[d ? r ? "allOf" : "anyOf" : "allOf"] : [l]).map((u) => f(u, c));
|
|
95
|
+
return r ? !R.includes(!1) : R.includes(!0);
|
|
92
96
|
}
|
|
93
|
-
return { parseValueSchema:
|
|
97
|
+
return { parseValueSchema: v };
|
|
94
98
|
}
|
|
95
|
-
const
|
|
99
|
+
const O = {
|
|
96
100
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
97
101
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
98
102
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -130,20 +134,21 @@ const L = {
|
|
|
130
134
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
131
135
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
132
136
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
133
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
134
|
-
|
|
137
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
138
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
139
|
+
}, ie = {}, oe = {};
|
|
135
140
|
ae();
|
|
136
|
-
function
|
|
137
|
-
return G[e.title] = e, X[e.title] = a, ie[e.title] = i,
|
|
138
|
-
const
|
|
139
|
-
return Object.assign(
|
|
141
|
+
function _(t, e, n = /* @__PURE__ */ new Map(), a = (o, f, v, l) => f, i = {}, s = (o) => o) {
|
|
142
|
+
return G[e.title] = e, X[e.title] = a, ie[e.title] = i, oe[e.title] = s, (o = {}) => {
|
|
143
|
+
const f = ne(o, e, n), v = Object.keys(t).reduce((l, c) => (l[c] = t[c].default, l), {});
|
|
144
|
+
return Object.assign(v, f);
|
|
140
145
|
};
|
|
141
146
|
}
|
|
142
|
-
function
|
|
147
|
+
function U(t, e) {
|
|
143
148
|
return { customClass: e.class, customStyle: e.style };
|
|
144
149
|
}
|
|
145
|
-
const
|
|
146
|
-
["appearance",
|
|
150
|
+
const se = /* @__PURE__ */ new Map([
|
|
151
|
+
["appearance", U]
|
|
147
152
|
]);
|
|
148
153
|
function re(t, e, n) {
|
|
149
154
|
const a = t.getSchemaByType("splitter-pane");
|
|
@@ -161,7 +166,7 @@ function ce(t, e, n) {
|
|
|
161
166
|
const a = n.parentComponentInstance;
|
|
162
167
|
return String(a.schema.appearance.class || "").split(" ").includes("f-page-main") && (e.appearance = { class: "f-page-content" }), re(t, e), le(t, e), e;
|
|
163
168
|
}
|
|
164
|
-
const
|
|
169
|
+
const pe = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-design.gitee.io/splitter.schema.json", fe = "splitter", me = "A Farris Container Component", de = "object", ye = {
|
|
165
170
|
id: {
|
|
166
171
|
description: "The unique identifier for a splitter",
|
|
167
172
|
type: "string"
|
|
@@ -199,13 +204,13 @@ const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
199
204
|
]
|
|
200
205
|
}
|
|
201
206
|
}, he = {
|
|
202
|
-
$schema:
|
|
203
|
-
$id:
|
|
207
|
+
$schema: pe,
|
|
208
|
+
$id: ue,
|
|
204
209
|
title: fe,
|
|
205
210
|
description: me,
|
|
206
211
|
type: de,
|
|
207
212
|
properties: ye
|
|
208
|
-
}, ve = "splitter", be = "A Farris Container Component", ge = "object",
|
|
213
|
+
}, ve = "splitter", be = "A Farris Container Component", ge = "object", ze = {
|
|
209
214
|
basic: {
|
|
210
215
|
description: "Basic Infomation",
|
|
211
216
|
title: "基本信息",
|
|
@@ -248,46 +253,46 @@ const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
248
253
|
}
|
|
249
254
|
}
|
|
250
255
|
}
|
|
251
|
-
},
|
|
256
|
+
}, Ce = {
|
|
252
257
|
title: ve,
|
|
253
258
|
description: be,
|
|
254
259
|
type: ge,
|
|
255
|
-
categories:
|
|
256
|
-
},
|
|
260
|
+
categories: ze
|
|
261
|
+
}, F = {
|
|
257
262
|
customStyle: { type: String, default: "" },
|
|
258
263
|
customClass: { type: String, default: "" },
|
|
259
264
|
direction: { Type: String, default: "row" }
|
|
260
|
-
}, N =
|
|
261
|
-
function
|
|
262
|
-
const e =
|
|
263
|
-
display: o.value ? "block" : "none",
|
|
264
|
-
left: `${a.value}px`
|
|
265
|
-
})), h = P(() => ({
|
|
265
|
+
}, N = _(F, he, se, ce, Ce);
|
|
266
|
+
function Q(t) {
|
|
267
|
+
const e = g(-1), n = g(-1), a = g(0), i = g(0), s = g(!1), o = g(!1), f = C(() => ({
|
|
266
268
|
display: s.value ? "block" : "none",
|
|
269
|
+
left: `${a.value}px`
|
|
270
|
+
})), v = C(() => ({
|
|
271
|
+
display: o.value ? "block" : "none",
|
|
267
272
|
top: `${i.value}px`
|
|
268
|
-
})), l =
|
|
269
|
-
display:
|
|
273
|
+
})), l = C(() => ({
|
|
274
|
+
display: o.value || s.value ? "block" : "none"
|
|
270
275
|
}));
|
|
271
276
|
function c(r) {
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
274
|
-
const { left:
|
|
275
|
-
a.value = r.clientX -
|
|
277
|
+
const y = t.value;
|
|
278
|
+
if (y) {
|
|
279
|
+
const { left: d } = y.getBoundingClientRect();
|
|
280
|
+
a.value = r.clientX - d;
|
|
276
281
|
}
|
|
277
282
|
}
|
|
278
283
|
function m(r) {
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
const { top:
|
|
282
|
-
i.value = r.clientY -
|
|
284
|
+
const y = t.value;
|
|
285
|
+
if (y) {
|
|
286
|
+
const { top: d } = y.getBoundingClientRect();
|
|
287
|
+
i.value = r.clientY - d;
|
|
283
288
|
}
|
|
284
289
|
}
|
|
285
290
|
return {
|
|
286
|
-
horizontalResizeHandleStyle:
|
|
287
|
-
verticalResizeHandleStyle:
|
|
291
|
+
horizontalResizeHandleStyle: f,
|
|
292
|
+
verticalResizeHandleStyle: v,
|
|
288
293
|
resizeOverlayStyle: l,
|
|
289
|
-
showHorizontalResizeHandle:
|
|
290
|
-
showVerticalResizeHandle:
|
|
294
|
+
showHorizontalResizeHandle: s,
|
|
295
|
+
showVerticalResizeHandle: o,
|
|
291
296
|
horizontalResizeBarPosition: e,
|
|
292
297
|
verticalResizeBarPosition: n,
|
|
293
298
|
verticalResizeHandleOffset: i,
|
|
@@ -306,7 +311,7 @@ function we() {
|
|
|
306
311
|
return t = n + a, i;
|
|
307
312
|
};
|
|
308
313
|
}
|
|
309
|
-
function
|
|
314
|
+
function Re() {
|
|
310
315
|
if (typeof window > "u")
|
|
311
316
|
return () => 0;
|
|
312
317
|
if (window.requestAnimationFrame)
|
|
@@ -314,58 +319,58 @@ function Se() {
|
|
|
314
319
|
const t = Pe.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
315
320
|
return t ? window[`${t}RequestAnimationFrame`] : we();
|
|
316
321
|
}
|
|
317
|
-
|
|
322
|
+
Re();
|
|
318
323
|
function B(t, e) {
|
|
319
324
|
return ((e == null ? void 0 : e.split(" ")) || []).reduce((a, i) => (i && (a[i] = !0), a), t), t;
|
|
320
325
|
}
|
|
321
|
-
function
|
|
326
|
+
function L(t, e) {
|
|
322
327
|
return ((e == null ? void 0 : e.split(";")) || []).reduce((a, i) => {
|
|
323
328
|
if (i) {
|
|
324
|
-
const
|
|
325
|
-
a[
|
|
329
|
+
const s = i.split(":");
|
|
330
|
+
a[s[0]] = s[1];
|
|
326
331
|
}
|
|
327
332
|
return a;
|
|
328
333
|
}, t), t;
|
|
329
334
|
}
|
|
330
|
-
const
|
|
335
|
+
const H = /* @__PURE__ */ M({
|
|
331
336
|
name: "FSplitter",
|
|
332
|
-
props:
|
|
337
|
+
props: F,
|
|
333
338
|
emits: [],
|
|
334
339
|
setup(t, e) {
|
|
335
|
-
const n =
|
|
340
|
+
const n = g(), a = Q(n), {
|
|
336
341
|
horizontalResizeHandleStyle: i,
|
|
337
|
-
verticalResizeHandleStyle:
|
|
338
|
-
resizeOverlayStyle:
|
|
342
|
+
verticalResizeHandleStyle: s,
|
|
343
|
+
resizeOverlayStyle: o
|
|
339
344
|
} = a;
|
|
340
345
|
W("splitter", {
|
|
341
346
|
useResizeHandleComposition: a
|
|
342
347
|
});
|
|
343
|
-
const
|
|
348
|
+
const f = C(() => B({
|
|
344
349
|
"f-splitter": !0
|
|
345
|
-
}, t == null ? void 0 : t.customClass)),
|
|
350
|
+
}, t == null ? void 0 : t.customClass)), v = C(() => {
|
|
346
351
|
const l = {
|
|
347
352
|
"flex-direction": t.direction === "row" ? "row" : "column"
|
|
348
353
|
};
|
|
349
|
-
return
|
|
354
|
+
return L(l, t == null ? void 0 : t.customStyle);
|
|
350
355
|
});
|
|
351
356
|
return () => w("div", {
|
|
352
|
-
class:
|
|
357
|
+
class: f.value,
|
|
353
358
|
ref: n,
|
|
354
|
-
style:
|
|
359
|
+
style: v.value
|
|
355
360
|
}, [e.slots.default && e.slots.default(), w("div", {
|
|
356
361
|
class: "f-splitter-resize-overlay",
|
|
357
|
-
style:
|
|
362
|
+
style: o.value
|
|
358
363
|
}, null), w("div", {
|
|
359
364
|
class: "f-splitter-horizontal-resize-proxy",
|
|
360
365
|
style: i.value
|
|
361
366
|
}, null), w("div", {
|
|
362
367
|
class: "f-splitter-vertical-resize-proxy",
|
|
363
|
-
style:
|
|
368
|
+
style: s.value
|
|
364
369
|
}, null)]);
|
|
365
370
|
}
|
|
366
|
-
}),
|
|
367
|
-
["appearance",
|
|
368
|
-
]),
|
|
371
|
+
}), Se = /* @__PURE__ */ new Map([
|
|
372
|
+
["appearance", U]
|
|
373
|
+
]), Te = "https://json-schema.org/draft/2020-12/schema", De = "https://farris-design.gitee.io/splitter-pane.schema.json", Oe = "splitter-pane", ke = "A Farris Container Component", Me = "object", Be = {
|
|
369
374
|
id: {
|
|
370
375
|
description: "The unique identifier for a splitter",
|
|
371
376
|
type: "string"
|
|
@@ -441,14 +446,14 @@ const j = /* @__PURE__ */ k({
|
|
|
441
446
|
type: "number",
|
|
442
447
|
default: !0
|
|
443
448
|
}
|
|
444
|
-
},
|
|
445
|
-
$schema:
|
|
446
|
-
$id:
|
|
447
|
-
title:
|
|
448
|
-
description:
|
|
449
|
-
type:
|
|
449
|
+
}, Le = {
|
|
450
|
+
$schema: Te,
|
|
451
|
+
$id: De,
|
|
452
|
+
title: Oe,
|
|
453
|
+
description: ke,
|
|
454
|
+
type: Me,
|
|
450
455
|
properties: Be
|
|
451
|
-
},
|
|
456
|
+
}, He = "splitter-pane", je = "A Farris Container Component", Ee = "object", Fe = {
|
|
452
457
|
basic: {
|
|
453
458
|
description: "Basic Infomation",
|
|
454
459
|
title: "基本信息",
|
|
@@ -548,12 +553,12 @@ const j = /* @__PURE__ */ k({
|
|
|
548
553
|
}
|
|
549
554
|
}
|
|
550
555
|
}
|
|
551
|
-
},
|
|
552
|
-
title:
|
|
553
|
-
description:
|
|
556
|
+
}, Ae = {
|
|
557
|
+
title: He,
|
|
558
|
+
description: je,
|
|
554
559
|
type: Ee,
|
|
555
|
-
categories:
|
|
556
|
-
},
|
|
560
|
+
categories: Fe
|
|
561
|
+
}, A = {
|
|
557
562
|
customClass: { type: String, defaut: "" },
|
|
558
563
|
customStyle: { type: String, default: "" },
|
|
559
564
|
width: { type: Number },
|
|
@@ -565,7 +570,7 @@ const j = /* @__PURE__ */ k({
|
|
|
565
570
|
visible: { type: Boolean, default: !0 },
|
|
566
571
|
/** True to allow the pane can be resized. */
|
|
567
572
|
resizable: { type: Boolean, default: !1 },
|
|
568
|
-
|
|
573
|
+
/** 指定拖拽的方向,可以指定多个方向,e向东,n向北,s向南,w向西
|
|
569
574
|
* 因为位置在右侧,不一定就是w方向可拖拽的
|
|
570
575
|
*/
|
|
571
576
|
resizeHandle: { type: String, default: "" },
|
|
@@ -575,203 +580,208 @@ const j = /* @__PURE__ */ k({
|
|
|
575
580
|
minWidth: { type: Number, default: 0 },
|
|
576
581
|
/** 面板最小高度 */
|
|
577
582
|
minHeight: { type: Number, default: 0 }
|
|
578
|
-
}, V =
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
583
|
+
}, V = _(
|
|
584
|
+
A,
|
|
585
|
+
Le,
|
|
586
|
+
Se,
|
|
582
587
|
void 0,
|
|
583
|
-
|
|
588
|
+
Ae
|
|
584
589
|
);
|
|
585
|
-
function
|
|
586
|
-
const n =
|
|
590
|
+
function J(t, e) {
|
|
591
|
+
const n = g(t.width), a = g(t.height), {
|
|
587
592
|
horizontalResizeBarPosition: i,
|
|
588
|
-
horizontalResizeHandleOffset:
|
|
589
|
-
showHorizontalResizeHandle:
|
|
590
|
-
showVerticalResizeHandle:
|
|
591
|
-
verticalResizeBarPosition:
|
|
593
|
+
horizontalResizeHandleOffset: s,
|
|
594
|
+
showHorizontalResizeHandle: o,
|
|
595
|
+
showVerticalResizeHandle: f,
|
|
596
|
+
verticalResizeBarPosition: v,
|
|
592
597
|
verticalResizeHandleOffset: l,
|
|
593
598
|
draggingHorizontalResizeHandle: c,
|
|
594
599
|
draggingVerticalResizeHandle: m
|
|
595
600
|
} = e;
|
|
596
|
-
let r = "",
|
|
597
|
-
function
|
|
598
|
-
if ((r === "left" || r === "right") &&
|
|
599
|
-
const { left:
|
|
601
|
+
let r = "", y, d;
|
|
602
|
+
function P(p) {
|
|
603
|
+
if ((r === "left" || r === "right") && d) {
|
|
604
|
+
const { left: u } = d.getBoundingClientRect(), { width: z } = y.getBoundingClientRect(), h = p.clientX - u, b = r === "left" ? (z || 0) + (h - i.value) : (z || 0) - (h - i.value);
|
|
600
605
|
n.value = t.minWidth > 0 ? Math.max(t.minWidth, b) : b;
|
|
601
606
|
}
|
|
602
|
-
if ((r === "top" || r === "bottom") &&
|
|
603
|
-
const { top:
|
|
607
|
+
if ((r === "top" || r === "bottom") && d) {
|
|
608
|
+
const { top: u } = d.getBoundingClientRect(), { height: z } = y.getBoundingClientRect(), h = p.clientY - u, b = r === "top" ? (z || 0) + (h - v.value) : (z || 0) - (h - v.value);
|
|
604
609
|
a.value = t.minHeight > 0 ? Math.max(t.minHeight, b) : b;
|
|
605
610
|
}
|
|
606
|
-
|
|
611
|
+
s.value = 0, l.value = 0, i.value = -1, v.value = -1, o.value = !1, f.value = !1, document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", P), document.body.style.userSelect = "", r = "", y = null, d = null;
|
|
607
612
|
}
|
|
608
|
-
function
|
|
609
|
-
if (r =
|
|
610
|
-
const { left: b } =
|
|
611
|
-
|
|
613
|
+
function T(p, u, z) {
|
|
614
|
+
if (r = u, y = z, o.value = !0, d = p.composedPath().find((b) => b.className.split(" ")[0] === "f-splitter"), d) {
|
|
615
|
+
const { left: b } = d.getBoundingClientRect();
|
|
616
|
+
s.value = p.clientX - b, i.value = p.clientX - b, document.addEventListener("mousemove", c), document.addEventListener("mouseup", P), document.body.style.userSelect = "none";
|
|
612
617
|
}
|
|
613
618
|
}
|
|
614
|
-
function
|
|
615
|
-
if (r =
|
|
616
|
-
const { top: b } =
|
|
617
|
-
l.value =
|
|
619
|
+
function R(p, u, z) {
|
|
620
|
+
if (r = u, y = z, f.value = !0, d = p.composedPath().find((b) => b.className.split(" ")[0] === "f-splitter"), d) {
|
|
621
|
+
const { top: b } = d.getBoundingClientRect();
|
|
622
|
+
l.value = p.clientY - b, v.value = p.clientY - b, document.addEventListener("mousemove", m), document.addEventListener("mouseup", P), document.body.style.userSelect = "none";
|
|
618
623
|
}
|
|
619
624
|
}
|
|
620
625
|
return {
|
|
621
626
|
actualWidth: n,
|
|
622
627
|
actualHeight: a,
|
|
623
|
-
onClickSplitterHorizontalResizeBar:
|
|
624
|
-
onClickSplitterVerticalResizeBar:
|
|
628
|
+
onClickSplitterHorizontalResizeBar: T,
|
|
629
|
+
onClickSplitterVerticalResizeBar: R
|
|
625
630
|
};
|
|
626
631
|
}
|
|
627
|
-
const
|
|
632
|
+
const j = /* @__PURE__ */ M({
|
|
628
633
|
name: "FSplitterPane",
|
|
629
|
-
props:
|
|
634
|
+
props: A,
|
|
630
635
|
emits: [],
|
|
631
636
|
setup(t, e) {
|
|
632
|
-
const n =
|
|
637
|
+
const n = g(), a = k("splitter"), {
|
|
633
638
|
useResizeHandleComposition: i
|
|
634
|
-
} = a,
|
|
635
|
-
actualHeight:
|
|
636
|
-
actualWidth:
|
|
637
|
-
onClickSplitterHorizontalResizeBar:
|
|
639
|
+
} = a, s = J(t, i), {
|
|
640
|
+
actualHeight: o,
|
|
641
|
+
actualWidth: f,
|
|
642
|
+
onClickSplitterHorizontalResizeBar: v,
|
|
638
643
|
onClickSplitterVerticalResizeBar: l
|
|
639
|
-
} =
|
|
640
|
-
const
|
|
644
|
+
} = s, c = g(t.position), m = C(() => {
|
|
645
|
+
const p = {
|
|
641
646
|
"f-splitter-pane": !0,
|
|
642
647
|
"f-splitter-pane-main": c.value === "center",
|
|
643
648
|
"has-resize-bar": t.resizable
|
|
644
649
|
};
|
|
645
|
-
return
|
|
646
|
-
}), r =
|
|
647
|
-
const
|
|
648
|
-
return (
|
|
649
|
-
}),
|
|
650
|
+
return p["f-splitter-pane-" + c.value] = !0, B(p, t == null ? void 0 : t.customClass);
|
|
651
|
+
}), r = C(() => t.resizeHandle ? t.resizeHandle.split(",").filter((p) => ["e", "n", "s", "w"].find((u) => u === p)) : []), y = C(() => {
|
|
652
|
+
const p = {};
|
|
653
|
+
return (f.value && c.value === "left" || c.value === "right" || r.value.find((u) => u === "e") || r.value.find((u) => u === "w")) && (p.width = `${f.value}px`), (o.value && c.value === "bottom" || c.value === "top" || r.value.find((u) => u === "s") || r.value.find((u) => u === "n")) && (p.height = `${o.value}px`), L(p, t == null ? void 0 : t.customStyle);
|
|
654
|
+
}), d = C(() => ({
|
|
650
655
|
"f-splitter-resize-bar": !0,
|
|
651
656
|
"f-splitter-resize-bar-e": c.value === "left",
|
|
652
657
|
"f-splitter-resize-bar-n": c.value === "bottom",
|
|
653
658
|
"f-splitter-resize-bar-s": c.value === "top",
|
|
654
659
|
"f-splitter-resize-bar-w": c.value === "right"
|
|
655
660
|
}));
|
|
656
|
-
function
|
|
657
|
-
f = R(f), ["left", "right"].find((z) => z == f) && h(u, f, n.value), ["top", "bottom"].find((z) => z == f) && l(u, f, n.value);
|
|
658
|
-
}
|
|
659
|
-
function R(u) {
|
|
661
|
+
function P(p) {
|
|
660
662
|
return {
|
|
661
663
|
e: "left",
|
|
662
664
|
w: "right",
|
|
663
665
|
s: "top",
|
|
664
666
|
n: "bottom"
|
|
665
|
-
}[
|
|
667
|
+
}[p] || p;
|
|
668
|
+
}
|
|
669
|
+
function T(p, u) {
|
|
670
|
+
u = P(u), ["left", "right"].find((z) => z === u) && v(p, u, n.value), ["top", "bottom"].find((z) => z === u) && l(p, u, n.value);
|
|
666
671
|
}
|
|
667
|
-
function
|
|
668
|
-
return
|
|
669
|
-
class: "f-splitter-resize-bar f-splitter-resize-bar-" +
|
|
670
|
-
onMousedown: (
|
|
672
|
+
function R() {
|
|
673
|
+
return r.value.length > 0 ? r.value.map((p) => w("span", {
|
|
674
|
+
class: "f-splitter-resize-bar f-splitter-resize-bar-" + p,
|
|
675
|
+
onMousedown: (u) => T(u, p)
|
|
671
676
|
}, null)) : w("span", {
|
|
672
|
-
class:
|
|
673
|
-
onMousedown: (
|
|
677
|
+
class: d.value,
|
|
678
|
+
onMousedown: (p) => T(p, c.value)
|
|
674
679
|
}, null);
|
|
675
680
|
}
|
|
676
681
|
return () => w("div", {
|
|
677
682
|
ref: n,
|
|
678
683
|
class: m.value,
|
|
679
|
-
style:
|
|
680
|
-
}, [e.slots.default && e.slots.default(), t.resizable &&
|
|
684
|
+
style: y.value
|
|
685
|
+
}, [e.slots.default && e.slots.default(), t.resizable && R()]);
|
|
681
686
|
}
|
|
682
687
|
});
|
|
683
688
|
function Z(t, e, n) {
|
|
684
689
|
var z;
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
}
|
|
688
|
-
a();
|
|
689
|
-
const i = n && n.getStyles && n.getStyles() || "", o = n && n.getDesignerClass && n.getDesignerClass() || "", s = C();
|
|
690
|
-
function d() {
|
|
690
|
+
const a = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", s = g();
|
|
691
|
+
function o() {
|
|
691
692
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
692
693
|
}
|
|
693
|
-
function
|
|
694
|
+
function f() {
|
|
694
695
|
return !1;
|
|
695
696
|
}
|
|
696
|
-
function
|
|
697
|
+
function v() {
|
|
697
698
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
698
699
|
}
|
|
699
|
-
function
|
|
700
|
+
function l() {
|
|
700
701
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
701
702
|
}
|
|
702
|
-
function
|
|
703
|
-
if (!
|
|
703
|
+
function c(h) {
|
|
704
|
+
if (!h || !h.value)
|
|
704
705
|
return null;
|
|
705
|
-
if (
|
|
706
|
-
return
|
|
707
|
-
const b =
|
|
708
|
-
return
|
|
706
|
+
if (h.value.schema && h.value.schema.type === "component")
|
|
707
|
+
return h.value;
|
|
708
|
+
const b = g(h == null ? void 0 : h.value.parent), S = c(b);
|
|
709
|
+
return S || null;
|
|
709
710
|
}
|
|
710
|
-
function
|
|
711
|
-
const { componentInstance: b, designerItemElementRef:
|
|
712
|
-
return !b || !b.value ? null : b.value.canMove ?
|
|
711
|
+
function m(h = e) {
|
|
712
|
+
const { componentInstance: b, designerItemElementRef: S } = h;
|
|
713
|
+
return !b || !b.value ? null : b.value.canMove ? S : m(h.parent);
|
|
713
714
|
}
|
|
714
|
-
function
|
|
715
|
-
return !!n && n.canAccepts(
|
|
715
|
+
function r(h) {
|
|
716
|
+
return !!n && n.canAccepts(h);
|
|
716
717
|
}
|
|
717
718
|
function y() {
|
|
718
719
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
719
720
|
}
|
|
720
|
-
function
|
|
721
|
+
function d() {
|
|
721
722
|
}
|
|
722
|
-
function
|
|
723
|
+
function P(h, b) {
|
|
723
724
|
b && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(b);
|
|
724
725
|
}
|
|
725
|
-
function
|
|
726
|
-
const { componentType:
|
|
727
|
-
let
|
|
728
|
-
n && n.onResolveNewComponentSchema && (
|
|
729
|
-
const K =
|
|
730
|
-
return
|
|
726
|
+
function T(h, b) {
|
|
727
|
+
const { componentType: S } = h;
|
|
728
|
+
let D = Y(S, h, b);
|
|
729
|
+
n && n.onResolveNewComponentSchema && (D = n.onResolveNewComponentSchema(h, D));
|
|
730
|
+
const K = S.toLowerCase().replace(/-/g, "_");
|
|
731
|
+
return D && !D.id && D.type === S && (D.id = `${K}_${Math.random().toString().slice(2, 6)}`), D;
|
|
731
732
|
}
|
|
732
|
-
function
|
|
733
|
+
function R(h) {
|
|
733
734
|
}
|
|
734
|
-
function
|
|
735
|
+
function p(...h) {
|
|
735
736
|
if (n && n.getPropsConfig)
|
|
736
|
-
return n.getPropsConfig(...
|
|
737
|
+
return n.getPropsConfig(...h);
|
|
738
|
+
}
|
|
739
|
+
function u() {
|
|
740
|
+
n && n.onRemoveComponent && n.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((h) => {
|
|
741
|
+
var D;
|
|
742
|
+
let b = h.id;
|
|
743
|
+
h.type === "component-ref" && (b = h.component);
|
|
744
|
+
const S = t.value.querySelector(`#${b}-design-item`);
|
|
745
|
+
(D = S == null ? void 0 : S.componentInstance) != null && D.value.onRemoveComponent && S.componentInstance.value.onRemoveComponent();
|
|
746
|
+
});
|
|
737
747
|
}
|
|
738
748
|
return s.value = {
|
|
739
|
-
canMove:
|
|
740
|
-
canSelectParent:
|
|
741
|
-
canDelete:
|
|
742
|
-
canNested: !
|
|
749
|
+
canMove: o(),
|
|
750
|
+
canSelectParent: f(),
|
|
751
|
+
canDelete: v(),
|
|
752
|
+
canNested: !l(),
|
|
743
753
|
contents: e == null ? void 0 : e.schema.contents,
|
|
744
754
|
elementRef: t,
|
|
745
755
|
parent: (z = e == null ? void 0 : e.parent) == null ? void 0 : z.componentInstance,
|
|
746
756
|
schema: e == null ? void 0 : e.schema,
|
|
747
|
-
styles:
|
|
748
|
-
designerClass:
|
|
749
|
-
canAccepts:
|
|
750
|
-
getBelongedComponentInstance:
|
|
751
|
-
getDraggableDesignItemElement:
|
|
757
|
+
styles: a,
|
|
758
|
+
designerClass: i,
|
|
759
|
+
canAccepts: r,
|
|
760
|
+
getBelongedComponentInstance: c,
|
|
761
|
+
getDraggableDesignItemElement: m,
|
|
752
762
|
getDraggingDisplayText: y,
|
|
753
|
-
getPropConfig:
|
|
754
|
-
getDragScopeElement:
|
|
755
|
-
onAcceptMovedChildElement:
|
|
756
|
-
onChildElementMovedOut:
|
|
757
|
-
addNewChildComponentSchema:
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
763
|
+
getPropConfig: p,
|
|
764
|
+
getDragScopeElement: d,
|
|
765
|
+
onAcceptMovedChildElement: P,
|
|
766
|
+
onChildElementMovedOut: R,
|
|
767
|
+
addNewChildComponentSchema: T,
|
|
768
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || g(!1),
|
|
769
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || g(!1),
|
|
770
|
+
onRemoveComponent: u
|
|
761
771
|
}, s;
|
|
762
772
|
}
|
|
763
773
|
class x {
|
|
764
774
|
getTemplateRule(e, n) {
|
|
765
|
-
const a = n == null ? void 0 : n.formSchemaUtils, i = a == null ? void 0 : a.getFormTemplateRule(),
|
|
775
|
+
const a = n == null ? void 0 : n.formSchemaUtils, i = a == null ? void 0 : a.getFormTemplateRule(), s = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
766
776
|
if (!i)
|
|
767
|
-
return
|
|
768
|
-
const
|
|
769
|
-
return
|
|
770
|
-
if (!
|
|
777
|
+
return s;
|
|
778
|
+
const o = this.getComponentContext(e), { componentClassList: f } = o;
|
|
779
|
+
return f.forEach((v) => {
|
|
780
|
+
if (!v || !i[v])
|
|
771
781
|
return;
|
|
772
|
-
const { canMove: l, canDelete: c, canAccept: m } = i[
|
|
773
|
-
|
|
774
|
-
}),
|
|
782
|
+
const { canMove: l, canDelete: c, canAccept: m } = i[v];
|
|
783
|
+
s.canMove = s.canMove && this.resolveRuleValue(l, o), s.canDelete = s.canDelete && this.resolveRuleValue(c, o), s.canAccept = s.canAccept && this.resolveRuleValue(m, o);
|
|
784
|
+
}), s;
|
|
775
785
|
}
|
|
776
786
|
resolveRuleValue(e, n) {
|
|
777
787
|
return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, n);
|
|
@@ -779,50 +789,50 @@ class x {
|
|
|
779
789
|
parseRuleValueSchema(e, n) {
|
|
780
790
|
const a = e.invalidContext || [];
|
|
781
791
|
let i = !0;
|
|
782
|
-
for (const
|
|
783
|
-
if (
|
|
784
|
-
if (
|
|
785
|
-
const
|
|
786
|
-
if (
|
|
792
|
+
for (const s of a) {
|
|
793
|
+
if (s.firstLevelChild) {
|
|
794
|
+
if (s.firstLevelChild.class) {
|
|
795
|
+
const { firstLevelChildClassList: o } = n;
|
|
796
|
+
if (o && !o.includes(s.firstLevelChild.class)) {
|
|
787
797
|
i = !1;
|
|
788
798
|
continue;
|
|
789
799
|
}
|
|
790
800
|
}
|
|
791
|
-
if (
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
801
|
+
if (s.firstLevelChild.type) {
|
|
802
|
+
const { firstLevelChildSchema: o } = n;
|
|
803
|
+
if (!o || o.type !== s.firstLevelChild.type) {
|
|
794
804
|
i = !1;
|
|
795
805
|
continue;
|
|
796
806
|
}
|
|
797
807
|
}
|
|
798
808
|
}
|
|
799
|
-
if (
|
|
800
|
-
if (
|
|
801
|
-
const
|
|
802
|
-
if (
|
|
809
|
+
if (s.secondLevelChild) {
|
|
810
|
+
if (s.secondLevelChild.class) {
|
|
811
|
+
const { secondLevelChildClassList: o } = n;
|
|
812
|
+
if (o && !o.includes(s.secondLevelChild.class)) {
|
|
803
813
|
i = !1;
|
|
804
814
|
continue;
|
|
805
815
|
}
|
|
806
816
|
}
|
|
807
|
-
if (
|
|
808
|
-
const
|
|
809
|
-
if (
|
|
817
|
+
if (s.secondLevelChild.type) {
|
|
818
|
+
const { secondLevelChildSchema: o } = n;
|
|
819
|
+
if (!o || o.type !== s.secondLevelChild.type) {
|
|
810
820
|
i = !1;
|
|
811
821
|
continue;
|
|
812
822
|
}
|
|
813
823
|
}
|
|
814
824
|
}
|
|
815
|
-
if (
|
|
816
|
-
if (
|
|
817
|
-
const
|
|
818
|
-
if (
|
|
825
|
+
if (s.parent) {
|
|
826
|
+
if (s.parent.class) {
|
|
827
|
+
const { parentClassList: o } = n;
|
|
828
|
+
if (o && !o.includes(s.parent.class)) {
|
|
819
829
|
i = !1;
|
|
820
830
|
continue;
|
|
821
831
|
}
|
|
822
832
|
}
|
|
823
|
-
if (
|
|
824
|
-
const
|
|
825
|
-
if (
|
|
833
|
+
if (s.parent.type) {
|
|
834
|
+
const { parentSchema: o } = n;
|
|
835
|
+
if (o && o.type !== s.parent.type) {
|
|
826
836
|
i = !1;
|
|
827
837
|
continue;
|
|
828
838
|
}
|
|
@@ -834,66 +844,66 @@ class x {
|
|
|
834
844
|
return !i;
|
|
835
845
|
}
|
|
836
846
|
getComponentContext(e) {
|
|
837
|
-
var
|
|
838
|
-
const n = e.schema, a = n.appearance && n.appearance.class || "", i = a.split(" ") || [],
|
|
847
|
+
var P, T, R, p;
|
|
848
|
+
const n = e.schema, a = n.appearance && n.appearance.class || "", i = a.split(" ") || [], s = n.contents || [], o = s.length ? s[0] : null, f = o && o.appearance ? o.appearance.class : "", v = f ? f.split(" ") : [], l = (P = o == null ? void 0 : o.contents) != null && P.length ? o == null ? void 0 : o.contents[0] : null, c = l && l.appearance ? l.appearance.class : "", m = c ? c.split(" ") : [], r = n.type === "component" ? (R = (T = e.parent) == null ? void 0 : T.parent) == null ? void 0 : R.schema : (p = e.parent) == null ? void 0 : p.schema, y = r && r.appearance && r.appearance.class || "", d = y ? y.split(" ") : [];
|
|
839
849
|
return {
|
|
840
850
|
componentClass: a,
|
|
841
851
|
componentClassList: i,
|
|
842
|
-
childContents:
|
|
843
|
-
firstLevelChildSchema:
|
|
844
|
-
firstLevelChildClass:
|
|
845
|
-
firstLevelChildClassList:
|
|
852
|
+
childContents: s,
|
|
853
|
+
firstLevelChildSchema: o,
|
|
854
|
+
firstLevelChildClass: f,
|
|
855
|
+
firstLevelChildClassList: v,
|
|
846
856
|
secondLevelChildSchema: l,
|
|
847
857
|
secondLevelChildClass: c,
|
|
848
858
|
secondLevelChildClassList: m,
|
|
849
859
|
parentSchema: r,
|
|
850
|
-
parentClass:
|
|
851
|
-
parentClassList:
|
|
860
|
+
parentClass: y,
|
|
861
|
+
parentClassList: d
|
|
852
862
|
};
|
|
853
863
|
}
|
|
854
864
|
}
|
|
855
865
|
function $e(t, e) {
|
|
856
866
|
const n = new x(), { canMove: a, canDelete: i } = n.getTemplateRule(t, e);
|
|
857
|
-
function
|
|
867
|
+
function s() {
|
|
858
868
|
return !1;
|
|
859
869
|
}
|
|
860
|
-
function
|
|
870
|
+
function o() {
|
|
861
871
|
return i;
|
|
862
872
|
}
|
|
863
|
-
function
|
|
873
|
+
function f() {
|
|
864
874
|
return a;
|
|
865
875
|
}
|
|
866
|
-
function
|
|
876
|
+
function v() {
|
|
867
877
|
return !0;
|
|
868
878
|
}
|
|
869
|
-
return { canAccepts:
|
|
879
|
+
return { canAccepts: s, checkCanDeleteComponent: o, checkCanMoveComponent: f, hideNestedPaddingInDesginerView: v };
|
|
870
880
|
}
|
|
871
|
-
const Ne = /* @__PURE__ */
|
|
881
|
+
const Ne = /* @__PURE__ */ M({
|
|
872
882
|
name: "FSplitterDesign",
|
|
873
|
-
props:
|
|
883
|
+
props: F,
|
|
874
884
|
emits: [],
|
|
875
885
|
setup(t, e) {
|
|
876
|
-
const n =
|
|
877
|
-
|
|
878
|
-
const
|
|
879
|
-
horizontalResizeHandleStyle:
|
|
886
|
+
const n = g(), a = k("designer-host-service"), i = k("design-item-context"), s = $e(i, a), o = Z(n, i, s);
|
|
887
|
+
o.value.canNested = !1;
|
|
888
|
+
const f = Q(n), {
|
|
889
|
+
horizontalResizeHandleStyle: v,
|
|
880
890
|
verticalResizeHandleStyle: l,
|
|
881
891
|
resizeOverlayStyle: c
|
|
882
|
-
} =
|
|
892
|
+
} = f;
|
|
883
893
|
W("splitter", {
|
|
884
|
-
useResizeHandleComposition:
|
|
894
|
+
useResizeHandleComposition: f
|
|
885
895
|
});
|
|
886
|
-
const m =
|
|
896
|
+
const m = C(() => B({
|
|
887
897
|
"f-splitter": !0
|
|
888
|
-
}, t == null ? void 0 : t.customClass)), r =
|
|
889
|
-
const
|
|
898
|
+
}, t == null ? void 0 : t.customClass)), r = C(() => {
|
|
899
|
+
const y = {
|
|
890
900
|
"flex-direction": t.direction === "row" ? "row" : "column"
|
|
891
901
|
};
|
|
892
|
-
return
|
|
902
|
+
return L(y, t == null ? void 0 : t.customStyle);
|
|
893
903
|
});
|
|
894
904
|
return q(() => {
|
|
895
|
-
n.value.componentInstance =
|
|
896
|
-
}), e.expose(
|
|
905
|
+
n.value.componentInstance = o;
|
|
906
|
+
}), e.expose(o.value), () => w("div", {
|
|
897
907
|
class: m.value,
|
|
898
908
|
ref: n,
|
|
899
909
|
style: r.value
|
|
@@ -902,7 +912,7 @@ const Ne = /* @__PURE__ */ k({
|
|
|
902
912
|
style: c.value
|
|
903
913
|
}, null), w("div", {
|
|
904
914
|
class: "f-splitter-horizontal-resize-proxy",
|
|
905
|
-
style:
|
|
915
|
+
style: v.value
|
|
906
916
|
}, null), w("div", {
|
|
907
917
|
class: "f-splitter-vertical-resize-proxy",
|
|
908
918
|
style: l.value
|
|
@@ -911,14 +921,14 @@ const Ne = /* @__PURE__ */ k({
|
|
|
911
921
|
});
|
|
912
922
|
function Ve() {
|
|
913
923
|
function t(e, n) {
|
|
914
|
-
var
|
|
924
|
+
var o;
|
|
915
925
|
if (!e)
|
|
916
926
|
return !1;
|
|
917
|
-
const a = ((
|
|
927
|
+
const a = ((o = e.targetContainer) == null ? void 0 : o.componentInstance) && e.targetContainer.componentInstance.value;
|
|
918
928
|
if (!a)
|
|
919
929
|
return !1;
|
|
920
|
-
const i = a.schema.type,
|
|
921
|
-
return !((e.
|
|
930
|
+
const i = a.schema.type, s = n == null ? void 0 : n.formSchemaUtils.getComponentById(a.belongedComponentId);
|
|
931
|
+
return !((e.componentCategory === "input" || e.componentType === "form-group") && ![O["response-layout-item"].type, O["response-form"].type].includes(i) || (e.componentType === O.tabs.type || e.componentType === O.section.type) && ((s == null ? void 0 : s.componentType) !== "frame" || ![O["content-container"].type, O["splitter-pane"].type, O["response-layout-item"].type].includes(i)));
|
|
922
932
|
}
|
|
923
933
|
return {
|
|
924
934
|
basalDragulaRuleForContainer: t
|
|
@@ -926,83 +936,83 @@ function Ve() {
|
|
|
926
936
|
}
|
|
927
937
|
function We(t, e) {
|
|
928
938
|
const n = new x(), { canAccept: a } = n.getTemplateRule(t, e);
|
|
929
|
-
function i(
|
|
930
|
-
return Ve().basalDragulaRuleForContainer(
|
|
939
|
+
function i(f) {
|
|
940
|
+
return Ve().basalDragulaRuleForContainer(f, e) ? a : !1;
|
|
931
941
|
}
|
|
932
|
-
function
|
|
942
|
+
function s() {
|
|
933
943
|
return !1;
|
|
934
944
|
}
|
|
935
|
-
function
|
|
945
|
+
function o() {
|
|
936
946
|
return !1;
|
|
937
947
|
}
|
|
938
948
|
return {
|
|
939
949
|
canAccepts: i,
|
|
940
|
-
checkCanMoveComponent:
|
|
941
|
-
checkCanDeleteComponent:
|
|
950
|
+
checkCanMoveComponent: s,
|
|
951
|
+
checkCanDeleteComponent: o
|
|
942
952
|
};
|
|
943
953
|
}
|
|
944
|
-
const qe = /* @__PURE__ */
|
|
954
|
+
const qe = /* @__PURE__ */ M({
|
|
945
955
|
name: "FSplitterPaneDesign",
|
|
946
|
-
props:
|
|
956
|
+
props: A,
|
|
947
957
|
emits: [],
|
|
948
958
|
setup(t, e) {
|
|
949
|
-
const n =
|
|
950
|
-
|
|
951
|
-
n.value.componentInstance =
|
|
952
|
-
}), e.expose(
|
|
953
|
-
const
|
|
954
|
-
useResizeHandleComposition:
|
|
955
|
-
} =
|
|
959
|
+
const n = g(), a = k("designer-host-service"), i = k("design-item-context"), s = We(i, a), o = Z(n, i, s);
|
|
960
|
+
o.value.styles = "padding:0;box-shadow:none;", o.value.canNested = !1, o.value.canMove = !1, o.value.canDelete = !1, q(() => {
|
|
961
|
+
n.value.componentInstance = o;
|
|
962
|
+
}), e.expose(o.value);
|
|
963
|
+
const f = k("splitter"), {
|
|
964
|
+
useResizeHandleComposition: v
|
|
965
|
+
} = f, l = J(t, v), {
|
|
956
966
|
actualHeight: c,
|
|
957
967
|
actualWidth: m
|
|
958
|
-
} = l, r =
|
|
959
|
-
const
|
|
968
|
+
} = l, r = g(t.position), y = C(() => {
|
|
969
|
+
const p = {
|
|
960
970
|
"f-splitter-pane": !0,
|
|
961
971
|
"f-splitter-pane-main": r.value === "center",
|
|
962
972
|
"has-resize-bar": t.resizable,
|
|
963
973
|
"f-component-splitter-pane": !0,
|
|
964
974
|
"drag-container": !0
|
|
965
975
|
};
|
|
966
|
-
return
|
|
967
|
-
}),
|
|
968
|
-
const
|
|
969
|
-
return (m.value && r.value === "left" || r.value === "right" ||
|
|
970
|
-
}),
|
|
976
|
+
return p["f-splitter-pane-" + r.value] = !0, B(p, t == null ? void 0 : t.customClass);
|
|
977
|
+
}), d = C(() => t.resizeHandle ? t.resizeHandle.split(",").filter((p) => ["e", "n", "s", "w"].find((u) => u === p)) : []), P = C(() => {
|
|
978
|
+
const p = {};
|
|
979
|
+
return (m.value && r.value === "left" || r.value === "right" || d.value.find((u) => u === "e") || d.value.find((u) => u === "w")) && (p.width = `${m.value}px`), (c.value && r.value === "bottom" || r.value === "top" || d.value.find((u) => u === "s") || d.value.find((u) => u === "n")) && (p.height = `${c.value}px`), L(p, t == null ? void 0 : t.customStyle);
|
|
980
|
+
}), T = C(() => ({
|
|
971
981
|
"f-splitter-resize-bar": !0,
|
|
972
982
|
"f-splitter-resize-bar-e": r.value === "left",
|
|
973
983
|
"f-splitter-resize-bar-n": r.value === "bottom",
|
|
974
984
|
"f-splitter-resize-bar-s": r.value === "top",
|
|
975
985
|
"f-splitter-resize-bar-w": r.value === "right"
|
|
976
986
|
}));
|
|
977
|
-
function
|
|
978
|
-
return
|
|
979
|
-
class: "f-splitter-resize-bar f-splitter-resize-bar-" +
|
|
987
|
+
function R() {
|
|
988
|
+
return d.value.length > 0 ? d.value.map((p) => w("span", {
|
|
989
|
+
class: "f-splitter-resize-bar f-splitter-resize-bar-" + p
|
|
980
990
|
}, null)) : w("span", {
|
|
981
|
-
class:
|
|
991
|
+
class: T.value
|
|
982
992
|
}, null);
|
|
983
993
|
}
|
|
984
994
|
return () => w("div", {
|
|
985
995
|
ref: n,
|
|
986
996
|
"data-dragref": `${i.schema.id}-container`,
|
|
987
|
-
class:
|
|
988
|
-
style:
|
|
989
|
-
}, [e.slots.default && e.slots.default(), t.resizable &&
|
|
997
|
+
class: y.value,
|
|
998
|
+
style: P.value
|
|
999
|
+
}, [e.slots.default && e.slots.default(), t.resizable && R()]);
|
|
990
1000
|
}
|
|
991
|
-
}),
|
|
1001
|
+
}), _e = {
|
|
992
1002
|
install(t) {
|
|
993
|
-
t.component(
|
|
1003
|
+
t.component(H.name, H), t.component(j.name, j);
|
|
994
1004
|
},
|
|
995
1005
|
register(t, e, n, a) {
|
|
996
|
-
t.splitter =
|
|
1006
|
+
t.splitter = H, e.splitter = N, t["splitter-pane"] = j, e["splitter-pane"] = V;
|
|
997
1007
|
},
|
|
998
1008
|
registerDesigner(t, e, n) {
|
|
999
1009
|
t.splitter = Ne, e.splitter = N, t["splitter-pane"] = qe, e["splitter-pane"] = V;
|
|
1000
1010
|
}
|
|
1001
1011
|
};
|
|
1002
1012
|
export {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1013
|
+
H as FSplitter,
|
|
1014
|
+
j as FSplitterPane,
|
|
1015
|
+
_e as default,
|
|
1016
|
+
F as splitterProps,
|
|
1007
1017
|
N as splitterPropsResolver
|
|
1008
1018
|
};
|