@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,10 +1,14 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as z, computed as M, defineComponent as E, provide as q, createVNode as S, watch as te, inject as D, onMounted as W } from "vue";
|
|
2
2
|
import { isPlainObject as V, cloneDeep as ne } from "lodash-es";
|
|
3
3
|
import "bignumber.js";
|
|
4
4
|
const G = {}, Y = {};
|
|
5
5
|
function L(t) {
|
|
6
|
-
const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), l = Object.keys(e).reduce((u,
|
|
7
|
-
|
|
6
|
+
const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), l = Object.keys(e).reduce((u, v) => ((!r || !o.find((P) => P === v)) && (u[v] = e[v].type === "object" && e[v].properties ? L(e[v]) : ne(e[v].default)), u), {});
|
|
7
|
+
if (n && (!r || !o.find((u) => u === "id"))) {
|
|
8
|
+
const u = n.toLowerCase().replace(/-/g, "_");
|
|
9
|
+
l.id = `${u}_${Math.random().toString().slice(2, 6)}`;
|
|
10
|
+
}
|
|
11
|
+
return l;
|
|
8
12
|
}
|
|
9
13
|
function X(t, e = {}, n) {
|
|
10
14
|
const o = G[t];
|
|
@@ -17,7 +21,7 @@ function X(t, e = {}, n) {
|
|
|
17
21
|
}
|
|
18
22
|
function oe(t, e) {
|
|
19
23
|
const n = L(e);
|
|
20
|
-
return Object.keys(
|
|
24
|
+
return Object.keys(n).reduce((o, r) => (o[r] && V(o[r]) && V(t[r] || !t[r]) ? Object.assign(o[r], t[r] || {}) : o[r] = t[r], o), n), n;
|
|
21
25
|
}
|
|
22
26
|
function ae(t, e) {
|
|
23
27
|
return Object.keys(t).filter((o) => t[o] != null).reduce((o, r) => {
|
|
@@ -39,22 +43,22 @@ function ie(t, e, n = /* @__PURE__ */ new Map()) {
|
|
|
39
43
|
return ae(o, n);
|
|
40
44
|
}
|
|
41
45
|
function re(t = {}) {
|
|
42
|
-
function e(i, f,
|
|
43
|
-
if (typeof
|
|
44
|
-
return
|
|
45
|
-
if (typeof
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
46
|
+
function e(i, f, c, b) {
|
|
47
|
+
if (typeof c == "number")
|
|
48
|
+
return b[i].length === c;
|
|
49
|
+
if (typeof c == "object") {
|
|
50
|
+
const C = Object.keys(c)[0], O = c[C];
|
|
51
|
+
if (C === "not")
|
|
52
|
+
return Number(b[i].length) !== Number(O);
|
|
53
|
+
if (C === "moreThan")
|
|
54
|
+
return Number(b[i].length) >= Number(O);
|
|
55
|
+
if (C === "lessThan")
|
|
56
|
+
return Number(b[i].length) <= Number(O);
|
|
53
57
|
}
|
|
54
58
|
return !1;
|
|
55
59
|
}
|
|
56
|
-
function n(i, f,
|
|
57
|
-
return
|
|
60
|
+
function n(i, f, c, b) {
|
|
61
|
+
return b[i] && b[i].propertyValue && String(b[i].propertyValue.value) === String(c);
|
|
58
62
|
}
|
|
59
63
|
const o = /* @__PURE__ */ new Map([
|
|
60
64
|
["length", e],
|
|
@@ -62,37 +66,37 @@ function re(t = {}) {
|
|
|
62
66
|
]);
|
|
63
67
|
Object.keys(t).reduce((i, f) => (i.set(f, t[f]), i), o);
|
|
64
68
|
function r(i, f) {
|
|
65
|
-
const
|
|
66
|
-
return typeof f == "number" ? [{ target:
|
|
67
|
-
if (
|
|
68
|
-
return { target:
|
|
69
|
-
const
|
|
70
|
-
return { target:
|
|
69
|
+
const c = i;
|
|
70
|
+
return typeof f == "number" ? [{ target: c, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: c, operator: "getProperty", param: i, value: !!f }] : typeof f == "object" ? Object.keys(f).map((b) => {
|
|
71
|
+
if (b === "length")
|
|
72
|
+
return { target: c, operator: "length", param: null, value: f[b] };
|
|
73
|
+
const C = b, O = f[b];
|
|
74
|
+
return { target: c, operator: "getProperty", param: C, value: O };
|
|
71
75
|
}) : [];
|
|
72
76
|
}
|
|
73
77
|
function l(i) {
|
|
74
|
-
return Object.keys(i).reduce((
|
|
75
|
-
const
|
|
76
|
-
return
|
|
78
|
+
return Object.keys(i).reduce((c, b) => {
|
|
79
|
+
const C = r(b, i[b]);
|
|
80
|
+
return c.push(...C), c;
|
|
77
81
|
}, []);
|
|
78
82
|
}
|
|
79
83
|
function u(i, f) {
|
|
80
84
|
if (o.has(i.operator)) {
|
|
81
|
-
const
|
|
82
|
-
return
|
|
85
|
+
const c = o.get(i.operator);
|
|
86
|
+
return c && c(i.target, i.param, i.value, f) || !1;
|
|
83
87
|
}
|
|
84
88
|
return !1;
|
|
85
89
|
}
|
|
86
|
-
function
|
|
87
|
-
return l(i).reduce((
|
|
90
|
+
function v(i, f) {
|
|
91
|
+
return l(i).reduce((C, O) => C && u(O, f), !0);
|
|
88
92
|
}
|
|
89
|
-
function
|
|
90
|
-
const
|
|
91
|
-
return
|
|
93
|
+
function P(i, f) {
|
|
94
|
+
const c = Object.keys(i), b = c.includes("allOf"), C = c.includes("anyOf"), O = b || C, p = (O ? i[O ? b ? "allOf" : "anyOf" : "allOf"] : [i]).map((d) => v(d, f));
|
|
95
|
+
return b ? !p.includes(!1) : p.includes(!0);
|
|
92
96
|
}
|
|
93
|
-
return { parseValueSchema:
|
|
97
|
+
return { parseValueSchema: P };
|
|
94
98
|
}
|
|
95
|
-
const
|
|
99
|
+
const H = {
|
|
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,22 +134,23 @@ const S = {
|
|
|
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" }
|
|
137
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
138
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
134
139
|
}, le = {}, se = {};
|
|
135
140
|
re();
|
|
136
|
-
function
|
|
141
|
+
function _(t, e, n = /* @__PURE__ */ new Map(), o = (u, v, P, i) => v, r = {}, l = (u) => u) {
|
|
137
142
|
return G[e.title] = e, Y[e.title] = o, le[e.title] = r, se[e.title] = l, (u = {}) => {
|
|
138
|
-
const
|
|
139
|
-
return Object.assign(
|
|
143
|
+
const v = ie(u, e, n), P = Object.keys(t).reduce((i, f) => (i[f] = t[f].default, i), {});
|
|
144
|
+
return Object.assign(P, v);
|
|
140
145
|
};
|
|
141
146
|
}
|
|
142
147
|
function ce(t, e) {
|
|
143
148
|
return { customClass: e.class, customStyle: e.style };
|
|
144
149
|
}
|
|
145
|
-
const
|
|
150
|
+
const U = /* @__PURE__ */ new Map([
|
|
146
151
|
["appearance", ce]
|
|
147
152
|
]);
|
|
148
|
-
function
|
|
153
|
+
function Q(t, e, n) {
|
|
149
154
|
return e;
|
|
150
155
|
}
|
|
151
156
|
const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/layout.schema.json", fe = "layout", ye = "A Farris Container Component", me = "object", de = {
|
|
@@ -203,7 +208,7 @@ const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
203
208
|
type: me,
|
|
204
209
|
properties: de,
|
|
205
210
|
required: he
|
|
206
|
-
}, be = "layout", ge = "A Farris Component", ze = "object",
|
|
211
|
+
}, be = "layout", ge = "A Farris Component", ze = "object", Pe = {
|
|
207
212
|
basic: {
|
|
208
213
|
description: "Basic Infomation",
|
|
209
214
|
title: "基本信息",
|
|
@@ -238,81 +243,81 @@ const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
238
243
|
}
|
|
239
244
|
}
|
|
240
245
|
}
|
|
241
|
-
},
|
|
246
|
+
}, we = {
|
|
242
247
|
title: be,
|
|
243
248
|
description: ge,
|
|
244
249
|
type: ze,
|
|
245
|
-
categories:
|
|
250
|
+
categories: Pe
|
|
246
251
|
}, F = {
|
|
247
252
|
customStyle: { type: String, defaut: "" },
|
|
248
253
|
customClass: { type: String, defaut: "" }
|
|
249
|
-
},
|
|
254
|
+
}, J = _(F, ve, U, Q, we);
|
|
250
255
|
function Z(t) {
|
|
251
|
-
const e =
|
|
256
|
+
const e = z(-1), n = z(-1), o = z(0), r = z(0), l = z(!1), u = z(!1), v = M(() => ({
|
|
252
257
|
display: l.value ? "block" : "none",
|
|
253
258
|
left: `${o.value}px`,
|
|
254
259
|
cursor: "e-resize"
|
|
255
|
-
})),
|
|
260
|
+
})), P = M(() => ({
|
|
256
261
|
display: u.value ? "block" : "none",
|
|
257
262
|
top: `${r.value}px`,
|
|
258
263
|
cursor: "n-resize"
|
|
259
|
-
})), i =
|
|
264
|
+
})), i = M(() => ({
|
|
260
265
|
display: u.value || l.value ? "block" : "none"
|
|
261
266
|
}));
|
|
262
|
-
function f(
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
const { left: a, right:
|
|
266
|
-
let
|
|
267
|
-
|
|
267
|
+
function f(h, p, m, d) {
|
|
268
|
+
const R = t.value;
|
|
269
|
+
if (R) {
|
|
270
|
+
const { left: a, right: s, width: g } = R.getBoundingClientRect();
|
|
271
|
+
let y = h.clientX - a;
|
|
272
|
+
d === "right" && (y = s - h.clientX), y > p && (y = p), y < m && (y = m), d === "right" && (y = g - y), o.value = y;
|
|
268
273
|
}
|
|
269
274
|
}
|
|
270
|
-
function
|
|
271
|
-
const
|
|
272
|
-
if (
|
|
273
|
-
const { top: a, bottom:
|
|
274
|
-
let
|
|
275
|
-
|
|
275
|
+
function c(h, p, m, d) {
|
|
276
|
+
const R = t.value;
|
|
277
|
+
if (R) {
|
|
278
|
+
const { top: a, bottom: s, height: g } = R.getBoundingClientRect();
|
|
279
|
+
let y = h.clientY - a;
|
|
280
|
+
d === "bottom" && (y = s - h.clientY), y > p && (y = p), y < m && (y = m), d === "bottom" && (y = g - y), r.value = y;
|
|
276
281
|
}
|
|
277
282
|
}
|
|
278
|
-
function
|
|
279
|
-
const
|
|
280
|
-
if (
|
|
281
|
-
const { width: p, height:
|
|
282
|
-
return { width: p, height:
|
|
283
|
+
function b() {
|
|
284
|
+
const h = t.value;
|
|
285
|
+
if (h) {
|
|
286
|
+
const { width: p, height: m } = h.getBoundingClientRect();
|
|
287
|
+
return { width: p, height: m };
|
|
283
288
|
}
|
|
284
289
|
return null;
|
|
285
290
|
}
|
|
286
|
-
function
|
|
287
|
-
const
|
|
288
|
-
return
|
|
289
|
-
const
|
|
290
|
-
return p = Object.assign(p, { [
|
|
291
|
+
function C() {
|
|
292
|
+
const h = t.value;
|
|
293
|
+
return h ? Array.from(h.querySelectorAll("[data-position]")).reduce((p, m) => {
|
|
294
|
+
const d = m.getAttribute("data-position");
|
|
295
|
+
return p = Object.assign(p, { [d]: m }), p;
|
|
291
296
|
}, {}) : null;
|
|
292
297
|
}
|
|
293
|
-
function
|
|
294
|
-
const
|
|
295
|
-
if (
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
298
|
-
return
|
|
299
|
-
if (
|
|
300
|
-
return a ?
|
|
298
|
+
function O(h, p) {
|
|
299
|
+
const m = b(), d = C();
|
|
300
|
+
if (m && d) {
|
|
301
|
+
const R = d == null ? void 0 : d.right, a = d == null ? void 0 : d.left;
|
|
302
|
+
if (h === "left" && a)
|
|
303
|
+
return R ? m.width - R.clientWidth - p : m.width - p;
|
|
304
|
+
if (h === "right" && R)
|
|
305
|
+
return a ? m.width - a.clientWidth - p : m.width - p;
|
|
301
306
|
}
|
|
302
307
|
}
|
|
303
|
-
function
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
308
|
-
return
|
|
309
|
-
if (
|
|
310
|
-
return a ?
|
|
308
|
+
function w(h, p) {
|
|
309
|
+
const m = b(), d = C();
|
|
310
|
+
if (m && d) {
|
|
311
|
+
const R = d == null ? void 0 : d.bottom, a = d == null ? void 0 : d.top;
|
|
312
|
+
if (h === "top" && a)
|
|
313
|
+
return R ? m.height - R.clientHeight - p : m.height - p;
|
|
314
|
+
if (h === "bottom" && R)
|
|
315
|
+
return a ? m.height - a.clientHeight - p : m.height - p;
|
|
311
316
|
}
|
|
312
317
|
}
|
|
313
318
|
return {
|
|
314
|
-
horizontalResizeHandleStyle:
|
|
315
|
-
verticalResizeHandleStyle:
|
|
319
|
+
horizontalResizeHandleStyle: v,
|
|
320
|
+
verticalResizeHandleStyle: P,
|
|
316
321
|
resizeOverlayStyle: i,
|
|
317
322
|
showHorizontalResizeHandle: l,
|
|
318
323
|
showVerticalResizeHandle: u,
|
|
@@ -321,12 +326,12 @@ function Z(t) {
|
|
|
321
326
|
verticalResizeHandleOffset: r,
|
|
322
327
|
horizontalResizeHandleOffset: o,
|
|
323
328
|
draggingHorizontalResizeHandle: f,
|
|
324
|
-
draggingVerticalResizeHandle:
|
|
325
|
-
getPanelMaxHeight:
|
|
326
|
-
getPanelMaxWidth:
|
|
329
|
+
draggingVerticalResizeHandle: c,
|
|
330
|
+
getPanelMaxHeight: w,
|
|
331
|
+
getPanelMaxWidth: O
|
|
327
332
|
};
|
|
328
333
|
}
|
|
329
|
-
const
|
|
334
|
+
const Ce = ["moz", "ms", "webkit"];
|
|
330
335
|
function Be() {
|
|
331
336
|
let t = 0;
|
|
332
337
|
return (e) => {
|
|
@@ -336,19 +341,19 @@ function Be() {
|
|
|
336
341
|
return t = n + o, r;
|
|
337
342
|
};
|
|
338
343
|
}
|
|
339
|
-
function
|
|
344
|
+
function Re() {
|
|
340
345
|
if (typeof window > "u")
|
|
341
346
|
return () => 0;
|
|
342
347
|
if (window.requestAnimationFrame)
|
|
343
348
|
return window.requestAnimationFrame.bind(window);
|
|
344
|
-
const t =
|
|
349
|
+
const t = Ce.filter((e) => `${e}RequestAnimationFrame` in window)[0];
|
|
345
350
|
return t ? window[`${t}RequestAnimationFrame`] : Be();
|
|
346
351
|
}
|
|
347
|
-
|
|
348
|
-
function
|
|
352
|
+
Re();
|
|
353
|
+
function Oe(t, e) {
|
|
349
354
|
return ((e == null ? void 0 : e.split(" ")) || []).reduce((o, r) => (r && (o[r] = !0), o), t), t;
|
|
350
355
|
}
|
|
351
|
-
function
|
|
356
|
+
function Se(t, e) {
|
|
352
357
|
return ((e == null ? void 0 : e.split(";")) || []).reduce((o, r) => {
|
|
353
358
|
if (r) {
|
|
354
359
|
const l = r.split(":");
|
|
@@ -362,33 +367,33 @@ const j = /* @__PURE__ */ E({
|
|
|
362
367
|
props: F,
|
|
363
368
|
emits: [],
|
|
364
369
|
setup(t, e) {
|
|
365
|
-
const n =
|
|
370
|
+
const n = z(), o = Z(n), {
|
|
366
371
|
horizontalResizeHandleStyle: r,
|
|
367
372
|
verticalResizeHandleStyle: l,
|
|
368
373
|
resizeOverlayStyle: u
|
|
369
374
|
} = o;
|
|
370
|
-
|
|
375
|
+
q("layout", {
|
|
371
376
|
useResizeHandleComposition: o
|
|
372
377
|
});
|
|
373
|
-
const
|
|
378
|
+
const v = M(() => Oe({
|
|
374
379
|
"f-layout": !0
|
|
375
|
-
}, t == null ? void 0 : t.customClass)),
|
|
376
|
-
return () =>
|
|
377
|
-
class:
|
|
378
|
-
style:
|
|
380
|
+
}, t == null ? void 0 : t.customClass)), P = M(() => Se({}, t == null ? void 0 : t.customStyle));
|
|
381
|
+
return () => S("div", {
|
|
382
|
+
class: v.value,
|
|
383
|
+
style: P.value,
|
|
379
384
|
ref: n
|
|
380
|
-
}, [e.slots.default && e.slots.default(),
|
|
385
|
+
}, [e.slots.default && e.slots.default(), S("div", {
|
|
381
386
|
class: "f-layout-resize-overlay",
|
|
382
387
|
style: u.value
|
|
383
|
-
}, null),
|
|
388
|
+
}, null), S("div", {
|
|
384
389
|
class: "f-layout-horizontal-resize-proxy",
|
|
385
390
|
style: r.value
|
|
386
|
-
}, null),
|
|
391
|
+
}, null), S("div", {
|
|
387
392
|
class: "f-layout-vertical-resize-proxy",
|
|
388
393
|
style: l.value
|
|
389
394
|
}, null)]);
|
|
390
395
|
}
|
|
391
|
-
}),
|
|
396
|
+
}), ke = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-design.gitee.io/layout-pane.schema.json", Te = "layout-pane", He = "A Farris Container Component", je = "object", De = {
|
|
392
397
|
id: {
|
|
393
398
|
description: "The unique identifier for a layout pane",
|
|
394
399
|
type: "string"
|
|
@@ -452,13 +457,13 @@ const j = /* @__PURE__ */ E({
|
|
|
452
457
|
default: !0
|
|
453
458
|
}
|
|
454
459
|
}, Ee = {
|
|
455
|
-
$schema:
|
|
456
|
-
$id:
|
|
457
|
-
title:
|
|
458
|
-
description:
|
|
460
|
+
$schema: ke,
|
|
461
|
+
$id: Me,
|
|
462
|
+
title: Te,
|
|
463
|
+
description: He,
|
|
459
464
|
type: je,
|
|
460
|
-
properties:
|
|
461
|
-
},
|
|
465
|
+
properties: De
|
|
466
|
+
}, $e = "layout-pane", Ae = "A Farris Container Component", Le = "object", Fe = {
|
|
462
467
|
basic: {
|
|
463
468
|
description: "Basic Infomation",
|
|
464
469
|
title: "基本信息",
|
|
@@ -491,7 +496,7 @@ const j = /* @__PURE__ */ E({
|
|
|
491
496
|
description: "Appearance",
|
|
492
497
|
properties: {
|
|
493
498
|
class: {
|
|
494
|
-
title: "class",
|
|
499
|
+
title: "class样式",
|
|
495
500
|
type: "string",
|
|
496
501
|
description: ""
|
|
497
502
|
},
|
|
@@ -554,8 +559,8 @@ const j = /* @__PURE__ */ E({
|
|
|
554
559
|
}
|
|
555
560
|
}
|
|
556
561
|
}, Ne = {
|
|
557
|
-
title:
|
|
558
|
-
description:
|
|
562
|
+
title: $e,
|
|
563
|
+
description: Ae,
|
|
559
564
|
type: Le,
|
|
560
565
|
categories: Fe
|
|
561
566
|
}, N = {
|
|
@@ -577,99 +582,99 @@ const j = /* @__PURE__ */ E({
|
|
|
577
582
|
minWidth: { type: Number, default: 100 },
|
|
578
583
|
/** 面板最小高度 */
|
|
579
584
|
minHeight: { type: Number, default: 100 }
|
|
580
|
-
}, x =
|
|
585
|
+
}, x = _(N, Ee, U, Q, Ne);
|
|
581
586
|
function K(t, e, n, o, r) {
|
|
582
587
|
const {
|
|
583
588
|
horizontalResizeBarPosition: l,
|
|
584
589
|
horizontalResizeHandleOffset: u,
|
|
585
|
-
showHorizontalResizeHandle:
|
|
586
|
-
showVerticalResizeHandle:
|
|
590
|
+
showHorizontalResizeHandle: v,
|
|
591
|
+
showVerticalResizeHandle: P,
|
|
587
592
|
verticalResizeBarPosition: i,
|
|
588
593
|
verticalResizeHandleOffset: f,
|
|
589
|
-
draggingHorizontalResizeHandle:
|
|
590
|
-
draggingVerticalResizeHandle:
|
|
591
|
-
getPanelMaxHeight:
|
|
592
|
-
getPanelMaxWidth:
|
|
594
|
+
draggingHorizontalResizeHandle: c,
|
|
595
|
+
draggingVerticalResizeHandle: b,
|
|
596
|
+
getPanelMaxHeight: C,
|
|
597
|
+
getPanelMaxWidth: O
|
|
593
598
|
} = r;
|
|
594
|
-
let
|
|
595
|
-
function
|
|
596
|
-
if ((
|
|
597
|
-
const { left:
|
|
598
|
-
let B =
|
|
599
|
+
let w = "", h, p, m;
|
|
600
|
+
function d(s) {
|
|
601
|
+
if ((w === "left" || w === "right") && p) {
|
|
602
|
+
const { left: g } = p.getBoundingClientRect(), { width: y } = h.getBoundingClientRect(), T = s.clientX - g;
|
|
603
|
+
let B = w === "left" ? (y || 0) + (T - l.value) : (y || 0) - (T - l.value);
|
|
599
604
|
B = n.value > 0 ? Math.max(n.value, B) : B;
|
|
600
|
-
const
|
|
601
|
-
|
|
605
|
+
const k = O(w, n.value);
|
|
606
|
+
k != null && (B = k > B ? B : k), t.value = B;
|
|
602
607
|
}
|
|
603
|
-
if ((
|
|
604
|
-
const { top:
|
|
605
|
-
let B =
|
|
608
|
+
if ((w === "top" || w === "bottom") && p) {
|
|
609
|
+
const { top: g } = p.getBoundingClientRect(), { height: y } = h.getBoundingClientRect(), T = s.clientY - g;
|
|
610
|
+
let B = w === "top" ? (y || 0) + (T - i.value) : (y || 0) - (T - i.value);
|
|
606
611
|
B = o.value > 0 ? Math.max(o.value, B) : B;
|
|
607
|
-
const
|
|
608
|
-
|
|
612
|
+
const k = C(w, o.value);
|
|
613
|
+
k != null && (B = k > B ? B : k), e.value = B;
|
|
609
614
|
}
|
|
610
|
-
u.value = 0, f.value = 0, l.value = -1, i.value = -1,
|
|
611
|
-
}
|
|
612
|
-
function
|
|
613
|
-
if (
|
|
614
|
-
const { left: B } = p.getBoundingClientRect(),
|
|
615
|
-
u.value =
|
|
616
|
-
const
|
|
617
|
-
|
|
615
|
+
u.value = 0, f.value = 0, l.value = -1, i.value = -1, v.value = !1, P.value = !1, document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", d), document.body.style.userSelect = "", w = "", h = null, p = null;
|
|
616
|
+
}
|
|
617
|
+
function R(s, g, y) {
|
|
618
|
+
if (w = g, h = y, v.value = !0, p = s.composedPath().find((B) => (B.className || "").split(" ")[0] === "f-layout"), p) {
|
|
619
|
+
const { left: B } = p.getBoundingClientRect(), k = s.clientX - B;
|
|
620
|
+
u.value = k, l.value = k;
|
|
621
|
+
const $ = O(w, n.value) || 0;
|
|
622
|
+
m = (ee) => c(ee, $, n.value, w), document.addEventListener("mousemove", m), document.addEventListener("mouseup", d), document.body.style.userSelect = "none";
|
|
618
623
|
}
|
|
619
624
|
}
|
|
620
|
-
function a(
|
|
621
|
-
if (
|
|
625
|
+
function a(s, g, y) {
|
|
626
|
+
if (w = g, h = y, P.value = !0, p = s.composedPath().find((B) => (B.className || "").split(" ")[0] === "f-layout"), p) {
|
|
622
627
|
const { top: B } = p.getBoundingClientRect();
|
|
623
|
-
f.value =
|
|
624
|
-
const
|
|
625
|
-
|
|
628
|
+
f.value = s.clientY - B, i.value = s.clientY - B;
|
|
629
|
+
const k = C(w, o.value) || 0;
|
|
630
|
+
m = ($) => b($, k, o.value, w), document.addEventListener("mousemove", m), document.addEventListener("mouseup", d), document.body.style.userSelect = "none";
|
|
626
631
|
}
|
|
627
632
|
}
|
|
628
|
-
return { onClickHorizontalResizeBar:
|
|
633
|
+
return { onClickHorizontalResizeBar: R, onClickVerticalResizeBar: a };
|
|
629
634
|
}
|
|
630
|
-
const
|
|
635
|
+
const A = /* @__PURE__ */ E({
|
|
631
636
|
name: "FLayoutPane",
|
|
632
637
|
props: N,
|
|
633
638
|
emits: [],
|
|
634
639
|
setup(t, e) {
|
|
635
|
-
const n =
|
|
640
|
+
const n = z(t.minHeight <= 0 ? 100 : t.minHeight), o = z(t.minWidth <= 0 ? 100 : t.minWidth), r = z(t.width <= 0 ? 100 : t.width), l = z(t.height <= 100 ? 100 : t.height), u = z(Math.max(n.value, l.value)), v = z(Math.max(o.value, r.value)), P = z(), i = z(t.position), f = z(t.resizable);
|
|
636
641
|
te(() => t.resizable, (a) => {
|
|
637
642
|
f.value = a;
|
|
638
643
|
});
|
|
639
|
-
const
|
|
640
|
-
useResizeHandleComposition:
|
|
641
|
-
} =
|
|
642
|
-
onClickHorizontalResizeBar:
|
|
643
|
-
onClickVerticalResizeBar:
|
|
644
|
-
} =
|
|
644
|
+
const c = D("layout"), {
|
|
645
|
+
useResizeHandleComposition: b
|
|
646
|
+
} = c, C = K(v, u, o, n, b), {
|
|
647
|
+
onClickHorizontalResizeBar: O,
|
|
648
|
+
onClickVerticalResizeBar: w
|
|
649
|
+
} = C, h = M(() => ({
|
|
645
650
|
"f-layout-resize-bar": !0,
|
|
646
651
|
"f-layout-resize-bar-e": i.value === "left",
|
|
647
652
|
"f-layout-resize-bar-n": i.value === "bottom",
|
|
648
653
|
"f-layout-resize-bar-s": i.value === "top",
|
|
649
654
|
"f-layout-resize-bar-w": i.value === "right"
|
|
650
|
-
})), p =
|
|
651
|
-
function
|
|
652
|
-
(
|
|
655
|
+
})), p = M(() => i.value !== "center" && f.value);
|
|
656
|
+
function m(a, s) {
|
|
657
|
+
(s === "left" || s === "right") && O(a, s, P.value), (s === "top" || s === "bottom") && w(a, s, P.value);
|
|
653
658
|
}
|
|
654
|
-
const
|
|
659
|
+
const d = M(() => {
|
|
655
660
|
const a = {
|
|
656
661
|
"f-layout-pane": !0,
|
|
657
662
|
"f-page-content-nav": i.value === "left" || i.value === "right",
|
|
658
663
|
"f-page-content-main": i.value === "center"
|
|
659
664
|
};
|
|
660
|
-
return t.customClass && String(t.customClass).split(" ").reduce((
|
|
661
|
-
}),
|
|
665
|
+
return t.customClass && String(t.customClass).split(" ").reduce((s, g) => (s[g] = !0, s), a), a;
|
|
666
|
+
}), R = M(() => {
|
|
662
667
|
const a = {};
|
|
663
|
-
return (
|
|
668
|
+
return (v.value && i.value === "left" || i.value === "right") && (a.width = `${v.value}px`), (u.value && i.value === "bottom" || i.value === "top") && (a.height = `${u.value}px`), t.visible || (a.display = "none"), a;
|
|
664
669
|
});
|
|
665
|
-
return () =>
|
|
666
|
-
ref:
|
|
667
|
-
class:
|
|
668
|
-
style:
|
|
670
|
+
return () => S("div", {
|
|
671
|
+
ref: P,
|
|
672
|
+
class: d.value,
|
|
673
|
+
style: R.value,
|
|
669
674
|
"data-position": i.value
|
|
670
|
-
}, [e.slots.default && e.slots.default(), p.value &&
|
|
671
|
-
class:
|
|
672
|
-
onMousedown: (a) =>
|
|
675
|
+
}, [e.slots.default && e.slots.default(), p.value && S("span", {
|
|
676
|
+
class: h.value,
|
|
677
|
+
onMousedown: (a) => m(a, i.value)
|
|
673
678
|
}, null)]);
|
|
674
679
|
}
|
|
675
680
|
});
|
|
@@ -680,118 +685,123 @@ function Ve(t, e) {
|
|
|
680
685
|
return { canAccepts: n };
|
|
681
686
|
}
|
|
682
687
|
function I(t, e, n) {
|
|
683
|
-
var
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
}
|
|
687
|
-
o();
|
|
688
|
-
const r = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", u = g();
|
|
689
|
-
function b() {
|
|
688
|
+
var R;
|
|
689
|
+
const o = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", l = z();
|
|
690
|
+
function u() {
|
|
690
691
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
691
692
|
}
|
|
692
|
-
function
|
|
693
|
+
function v() {
|
|
693
694
|
return !1;
|
|
694
695
|
}
|
|
695
|
-
function
|
|
696
|
+
function P() {
|
|
696
697
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
|
|
697
698
|
}
|
|
698
|
-
function
|
|
699
|
+
function i() {
|
|
699
700
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
|
|
700
701
|
}
|
|
701
|
-
function
|
|
702
|
+
function f(a) {
|
|
702
703
|
if (!a || !a.value)
|
|
703
704
|
return null;
|
|
704
705
|
if (a.value.schema && a.value.schema.type === "component")
|
|
705
706
|
return a.value;
|
|
706
|
-
const
|
|
707
|
-
return
|
|
707
|
+
const s = z(a == null ? void 0 : a.value.parent), g = f(s);
|
|
708
|
+
return g || null;
|
|
708
709
|
}
|
|
709
|
-
function
|
|
710
|
-
const { componentInstance:
|
|
711
|
-
return !
|
|
710
|
+
function c(a = e) {
|
|
711
|
+
const { componentInstance: s, designerItemElementRef: g } = a;
|
|
712
|
+
return !s || !s.value ? null : s.value.canMove ? g : c(a.parent);
|
|
712
713
|
}
|
|
713
|
-
function
|
|
714
|
+
function b(a) {
|
|
714
715
|
return !!n && n.canAccepts(a);
|
|
715
716
|
}
|
|
716
|
-
function
|
|
717
|
+
function C() {
|
|
717
718
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
718
719
|
}
|
|
719
|
-
function
|
|
720
|
+
function O() {
|
|
720
721
|
}
|
|
721
|
-
function
|
|
722
|
-
|
|
722
|
+
function w(a, s) {
|
|
723
|
+
s && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(s);
|
|
723
724
|
}
|
|
724
|
-
function
|
|
725
|
-
const { componentType:
|
|
726
|
-
let
|
|
727
|
-
n && n.onResolveNewComponentSchema && (
|
|
728
|
-
const
|
|
729
|
-
return
|
|
725
|
+
function h(a, s) {
|
|
726
|
+
const { componentType: g } = a;
|
|
727
|
+
let y = X(g, a, s);
|
|
728
|
+
n && n.onResolveNewComponentSchema && (y = n.onResolveNewComponentSchema(a, y));
|
|
729
|
+
const T = g.toLowerCase().replace(/-/g, "_");
|
|
730
|
+
return y && !y.id && y.type === g && (y.id = `${T}_${Math.random().toString().slice(2, 6)}`), y;
|
|
730
731
|
}
|
|
731
|
-
function
|
|
732
|
+
function p(a) {
|
|
732
733
|
}
|
|
733
734
|
function m(...a) {
|
|
734
735
|
if (n && n.getPropsConfig)
|
|
735
736
|
return n.getPropsConfig(...a);
|
|
736
737
|
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
738
|
+
function d() {
|
|
739
|
+
n && n.onRemoveComponent && n.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((a) => {
|
|
740
|
+
var y;
|
|
741
|
+
let s = a.id;
|
|
742
|
+
a.type === "component-ref" && (s = a.component);
|
|
743
|
+
const g = t.value.querySelector(`#${s}-design-item`);
|
|
744
|
+
(y = g == null ? void 0 : g.componentInstance) != null && y.value.onRemoveComponent && g.componentInstance.value.onRemoveComponent();
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
return l.value = {
|
|
748
|
+
canMove: u(),
|
|
749
|
+
canSelectParent: v(),
|
|
750
|
+
canDelete: P(),
|
|
751
|
+
canNested: !i(),
|
|
742
752
|
contents: e == null ? void 0 : e.schema.contents,
|
|
743
753
|
elementRef: t,
|
|
744
|
-
parent: (
|
|
754
|
+
parent: (R = e == null ? void 0 : e.parent) == null ? void 0 : R.componentInstance,
|
|
745
755
|
schema: e == null ? void 0 : e.schema,
|
|
746
|
-
styles:
|
|
747
|
-
designerClass:
|
|
748
|
-
canAccepts:
|
|
749
|
-
getBelongedComponentInstance:
|
|
750
|
-
getDraggableDesignItemElement:
|
|
751
|
-
getDraggingDisplayText:
|
|
756
|
+
styles: o,
|
|
757
|
+
designerClass: r,
|
|
758
|
+
canAccepts: b,
|
|
759
|
+
getBelongedComponentInstance: f,
|
|
760
|
+
getDraggableDesignItemElement: c,
|
|
761
|
+
getDraggingDisplayText: C,
|
|
752
762
|
getPropConfig: m,
|
|
753
|
-
getDragScopeElement:
|
|
754
|
-
onAcceptMovedChildElement:
|
|
755
|
-
onChildElementMovedOut:
|
|
756
|
-
addNewChildComponentSchema:
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
},
|
|
763
|
+
getDragScopeElement: O,
|
|
764
|
+
onAcceptMovedChildElement: w,
|
|
765
|
+
onChildElementMovedOut: p,
|
|
766
|
+
addNewChildComponentSchema: h,
|
|
767
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || z(!1),
|
|
768
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || z(!1),
|
|
769
|
+
onRemoveComponent: d
|
|
770
|
+
}, l;
|
|
761
771
|
}
|
|
762
|
-
const
|
|
772
|
+
const qe = /* @__PURE__ */ E({
|
|
763
773
|
name: "FLayoutDesign",
|
|
764
774
|
props: F,
|
|
765
775
|
emits: [],
|
|
766
776
|
setup(t, e) {
|
|
767
777
|
var f;
|
|
768
|
-
const n =
|
|
778
|
+
const n = z(), o = D("design-item-context"), r = Ve(o.schema, (f = o.parent) == null ? void 0 : f.schema), l = I(n, o, r);
|
|
769
779
|
l.value.canNested = !1;
|
|
770
780
|
const u = Z(n), {
|
|
771
|
-
horizontalResizeHandleStyle:
|
|
772
|
-
verticalResizeHandleStyle:
|
|
781
|
+
horizontalResizeHandleStyle: v,
|
|
782
|
+
verticalResizeHandleStyle: P,
|
|
773
783
|
resizeOverlayStyle: i
|
|
774
784
|
} = u;
|
|
775
|
-
return
|
|
785
|
+
return q("layout", {
|
|
776
786
|
useResizeHandleComposition: u
|
|
777
|
-
}),
|
|
787
|
+
}), W(() => {
|
|
778
788
|
n.value.componentInstance = l;
|
|
779
|
-
}), e.expose(l.value), () =>
|
|
789
|
+
}), e.expose(l.value), () => S("div", {
|
|
780
790
|
class: "f-layout f-page-content",
|
|
781
791
|
ref: n
|
|
782
|
-
}, [e.slots.default && e.slots.default(),
|
|
792
|
+
}, [e.slots.default && e.slots.default(), S("div", {
|
|
783
793
|
class: "f-layout-resize-overlay",
|
|
784
794
|
style: i.value
|
|
785
|
-
}, null),
|
|
795
|
+
}, null), S("div", {
|
|
786
796
|
class: "f-layout-horizontal-resize-proxy",
|
|
787
|
-
style:
|
|
788
|
-
}, null),
|
|
797
|
+
style: v.value
|
|
798
|
+
}, null), S("div", {
|
|
789
799
|
class: "f-layout-vertical-resize-proxy",
|
|
790
|
-
style:
|
|
800
|
+
style: P.value
|
|
791
801
|
}, null)]);
|
|
792
802
|
}
|
|
793
803
|
});
|
|
794
|
-
function
|
|
804
|
+
function We() {
|
|
795
805
|
function t(e, n) {
|
|
796
806
|
var u;
|
|
797
807
|
if (!e)
|
|
@@ -800,7 +810,7 @@ function qe() {
|
|
|
800
810
|
if (!o)
|
|
801
811
|
return !1;
|
|
802
812
|
const r = o.schema.type, l = n == null ? void 0 : n.formSchemaUtils.getComponentById(o.belongedComponentId);
|
|
803
|
-
return !((e.
|
|
813
|
+
return !((e.componentCategory === "input" || e.componentType === "form-group") && ![H["response-layout-item"].type, H["response-form"].type].includes(r) || (e.componentType === H.tabs.type || e.componentType === H.section.type) && ((l == null ? void 0 : l.componentType) !== "frame" || ![H["content-container"].type, H["splitter-pane"].type, H["response-layout-item"].type].includes(r)));
|
|
804
814
|
}
|
|
805
815
|
return {
|
|
806
816
|
basalDragulaRuleForContainer: t
|
|
@@ -809,7 +819,7 @@ function qe() {
|
|
|
809
819
|
function Ge(t, e) {
|
|
810
820
|
const n = t.schema;
|
|
811
821
|
function o(l) {
|
|
812
|
-
return !!
|
|
822
|
+
return !!We().basalDragulaRuleForContainer(l);
|
|
813
823
|
}
|
|
814
824
|
function r() {
|
|
815
825
|
const l = ["f-layout-pane"];
|
|
@@ -822,67 +832,67 @@ const Ye = /* @__PURE__ */ E({
|
|
|
822
832
|
props: N,
|
|
823
833
|
emits: [],
|
|
824
834
|
setup(t, e) {
|
|
825
|
-
const n =
|
|
826
|
-
|
|
827
|
-
const r =
|
|
828
|
-
u.value.canNested = !1, u.value.canMove = !1, u.value.canDelete = !1,
|
|
835
|
+
const n = z(), o = z();
|
|
836
|
+
D("designer-host-service");
|
|
837
|
+
const r = D("design-item-context"), l = Ge(r), u = I(o, r, l);
|
|
838
|
+
u.value.canNested = !1, u.value.canMove = !1, u.value.canDelete = !1, W(() => {
|
|
829
839
|
o.value.componentInstance = u;
|
|
830
840
|
}), e.expose(u.value);
|
|
831
|
-
const
|
|
832
|
-
useResizeHandleComposition:
|
|
833
|
-
} =
|
|
834
|
-
onClickHorizontalResizeBar:
|
|
835
|
-
onClickVerticalResizeBar:
|
|
836
|
-
} =
|
|
841
|
+
const v = z(Math.max(t.minHeight, t.height)), P = z(Math.max(t.minWidth, t.width)), i = z(t.minHeight), f = z(t.minWidth), c = z(t.position), b = D("layout"), {
|
|
842
|
+
useResizeHandleComposition: C
|
|
843
|
+
} = b, O = K(P, v, f, i, C), {
|
|
844
|
+
onClickHorizontalResizeBar: w,
|
|
845
|
+
onClickVerticalResizeBar: h
|
|
846
|
+
} = O, p = M(() => ({
|
|
837
847
|
"f-layout-resize-bar": !0,
|
|
838
|
-
"f-layout-resize-bar-e":
|
|
839
|
-
"f-layout-resize-bar-n":
|
|
840
|
-
"f-layout-resize-bar-s":
|
|
841
|
-
"f-layout-resize-bar-w":
|
|
848
|
+
"f-layout-resize-bar-e": c.value === "left",
|
|
849
|
+
"f-layout-resize-bar-n": c.value === "bottom",
|
|
850
|
+
"f-layout-resize-bar-s": c.value === "top",
|
|
851
|
+
"f-layout-resize-bar-w": c.value === "right"
|
|
842
852
|
}));
|
|
843
|
-
function
|
|
844
|
-
(
|
|
853
|
+
function m(a, s) {
|
|
854
|
+
(s === "left" || s === "right") && w(a, s, n.value), (s === "top" || s === "bottom") && h(a, s, n.value);
|
|
845
855
|
}
|
|
846
|
-
const
|
|
856
|
+
const d = M(() => {
|
|
847
857
|
const a = {
|
|
848
858
|
"f-layout-pane": !0,
|
|
849
|
-
"f-page-content-nav":
|
|
850
|
-
"f-page-content-main":
|
|
859
|
+
"f-page-content-nav": c.value === "left" || c.value === "right",
|
|
860
|
+
"f-page-content-main": c.value === "center"
|
|
851
861
|
};
|
|
852
|
-
return t.customClass && String(t.customClass).split(" ").reduce((
|
|
853
|
-
}),
|
|
862
|
+
return t.customClass && String(t.customClass).split(" ").reduce((s, g) => (s[g] = !0, s), a), a;
|
|
863
|
+
}), R = M(() => {
|
|
854
864
|
const a = {
|
|
855
865
|
flex: "1"
|
|
856
866
|
};
|
|
857
|
-
return (
|
|
867
|
+
return (P.value && c.value === "left" || c.value === "right") && (a.width = `${P.value}px`), (v.value && c.value === "bottom" || c.value === "top") && (a.height = `${v.value}px`), a;
|
|
858
868
|
});
|
|
859
|
-
return () =>
|
|
869
|
+
return () => S("div", {
|
|
860
870
|
ref: n,
|
|
861
|
-
class:
|
|
862
|
-
style:
|
|
863
|
-
}, [
|
|
871
|
+
class: d.value,
|
|
872
|
+
style: R.value
|
|
873
|
+
}, [S("div", {
|
|
864
874
|
ref: o,
|
|
865
875
|
class: "drag-container",
|
|
866
876
|
"data-dragref": `${r.schema.id}-container`
|
|
867
|
-
}, [e.slots.default && e.slots.default()]),
|
|
877
|
+
}, [e.slots.default && e.slots.default()]), S("span", {
|
|
868
878
|
class: p.value,
|
|
869
|
-
onMousedown: (a) =>
|
|
879
|
+
onMousedown: (a) => m(a, c.value)
|
|
870
880
|
}, null)]);
|
|
871
881
|
}
|
|
872
882
|
});
|
|
873
883
|
j.install = (t) => {
|
|
874
|
-
t.component(j.name, j), t.component(
|
|
884
|
+
t.component(j.name, j), t.component(A.name, A);
|
|
875
885
|
};
|
|
876
886
|
j.register = (t, e, n, o) => {
|
|
877
|
-
t.layout = j, e.layout =
|
|
887
|
+
t.layout = j, e.layout = J, t["layout-pane"] = A, e["layout-pane"] = x;
|
|
878
888
|
};
|
|
879
889
|
j.registerDesigner = (t, e, n) => {
|
|
880
|
-
t.layout =
|
|
890
|
+
t.layout = qe, e.layout = J, t["layout-pane"] = Ye, e["layout-pane"] = x;
|
|
881
891
|
};
|
|
882
892
|
export {
|
|
883
893
|
j as FLayout,
|
|
884
|
-
|
|
894
|
+
A as FLayoutPane,
|
|
885
895
|
j as default,
|
|
886
896
|
F as layoutProps,
|
|
887
|
-
|
|
897
|
+
J as layoutPropsResolver
|
|
888
898
|
};
|