@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
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/avatar/index.esm.js +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var A = (t, s, i) =>
|
|
4
|
-
import { responseLayoutEditorSettingProps as
|
|
5
|
-
import { defineComponent as B, ref as u, watch as R, onBeforeMount as H, createVNode as a, createTextVNode as N, computed as U, onMounted as q, inject as
|
|
6
|
-
import { FModalService as
|
|
7
|
-
import { useDesignerComponent as
|
|
1
|
+
var Q = Object.defineProperty;
|
|
2
|
+
var Z = (t, s, i) => s in t ? Q(t, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[s] = i;
|
|
3
|
+
var A = (t, s, i) => Z(t, typeof s != "symbol" ? s + "" : s, i);
|
|
4
|
+
import { responseLayoutEditorSettingProps as _, ResponseLayoutEditorSetting as ee } from "../../components/response-layout-editor/index.esm.js";
|
|
5
|
+
import { defineComponent as B, ref as u, watch as R, onBeforeMount as H, createVNode as a, createTextVNode as N, computed as U, onMounted as q, inject as J, provide as te } from "vue";
|
|
6
|
+
import { FModalService as ne } from "../../components/modal/index.esm.js";
|
|
7
|
+
import { useDesignerComponent as ae, DgControl as X } from "../../components/designer-canvas/index.esm.js";
|
|
8
8
|
import { cloneDeep as G } from "lodash-es";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { resolveAppearance as
|
|
15
|
-
const
|
|
9
|
+
import oe from "../../components/capsule/index.esm.js";
|
|
10
|
+
import le from "../../components/switch/index.esm.js";
|
|
11
|
+
import re from "../../components/combo-list/index.esm.js";
|
|
12
|
+
import ie from "../../components/radio-button/index.esm.js";
|
|
13
|
+
import ue from "../../components/rate/index.esm.js";
|
|
14
|
+
import { resolveAppearance as se, createPropsResolver as ce } from "../../components/dynamic-resolver/index.esm.js";
|
|
15
|
+
const de = {
|
|
16
16
|
/** 接受传入的原始数据的defaultState */
|
|
17
17
|
initialState: { type: Object },
|
|
18
18
|
/** 页面高度 */
|
|
@@ -22,10 +22,10 @@ const ce = {
|
|
|
22
22
|
modelValue: { type: Object },
|
|
23
23
|
/** 打开弹窗前进行校验 */
|
|
24
24
|
beforeOpen: { type: Object }
|
|
25
|
-
},
|
|
25
|
+
}, fe = {
|
|
26
26
|
/** 接受传入的原始数据的defaultState */
|
|
27
27
|
initialState: { type: Object, default: {} }
|
|
28
|
-
},
|
|
28
|
+
}, ve = {
|
|
29
29
|
/** 记录默认模式及分组状态 */
|
|
30
30
|
defaultStates: { type: Object, default: { mode: "" } },
|
|
31
31
|
/** 当前开关模式 */
|
|
@@ -37,9 +37,9 @@ const ce = {
|
|
|
37
37
|
/** 用户设置的屏幕分辨率缩写变化-例:中等屏幕 */
|
|
38
38
|
onScreenNameChanged: { type: Function, default: () => {
|
|
39
39
|
} }
|
|
40
|
-
},
|
|
40
|
+
}, me = /* @__PURE__ */ B({
|
|
41
41
|
name: "FScreenResolutionSelector",
|
|
42
|
-
props:
|
|
42
|
+
props: ve,
|
|
43
43
|
emits: ["screenNameChanged", "currentScreenResolutionChanged", "switchInStandardModeChanged"],
|
|
44
44
|
setup(t, s) {
|
|
45
45
|
const i = u([{
|
|
@@ -62,25 +62,25 @@ const ce = {
|
|
|
62
62
|
code: "EL",
|
|
63
63
|
value: "EL",
|
|
64
64
|
active: !1
|
|
65
|
-
}]), r = u(t.defaultStates), n = u("MD"), S = u("中等屏幕"),
|
|
66
|
-
function y(
|
|
65
|
+
}]), r = u(t.defaultStates), n = u("MD"), S = u("中等屏幕"), h = u(!0);
|
|
66
|
+
function y(v) {
|
|
67
67
|
i.value.forEach((e) => {
|
|
68
|
-
e.active = e.code ===
|
|
68
|
+
e.active = e.code === v, e.active && (n.value = e.code, S.value = e.name, s.emit("screenNameChanged", S.value), s.emit("currentScreenResolutionChanged", n.value));
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
function I() {
|
|
72
|
-
s.emit("switchInStandardModeChanged",
|
|
72
|
+
s.emit("switchInStandardModeChanged", h.value);
|
|
73
73
|
}
|
|
74
|
-
R(
|
|
74
|
+
R(h, () => {
|
|
75
75
|
}), H(() => {
|
|
76
|
-
r.value.model === "standard" ?
|
|
76
|
+
r.value.model === "standard" ? h.value = !0 : (h.value = !1, I());
|
|
77
77
|
});
|
|
78
78
|
function C() {
|
|
79
|
-
return a(
|
|
79
|
+
return a(oe, {
|
|
80
80
|
class: "f-layout-editor-screen-resolution-selector-frame",
|
|
81
81
|
items: i.value,
|
|
82
82
|
modelValue: n.value,
|
|
83
|
-
"onUpdate:modelValue": (
|
|
83
|
+
"onUpdate:modelValue": (v) => n.value = v,
|
|
84
84
|
onChange: y
|
|
85
85
|
}, null);
|
|
86
86
|
}
|
|
@@ -92,18 +92,18 @@ const ce = {
|
|
|
92
92
|
class: "f-layout-editor-screen-resolution-selector-form"
|
|
93
93
|
}, [N("表单布局配置")])]), C(), a("div", {
|
|
94
94
|
class: "f-layout-editor-screen-resolution-selector-switch"
|
|
95
|
-
}, [a(
|
|
95
|
+
}, [a(le, {
|
|
96
96
|
class: "f-layout-editor-show-switch",
|
|
97
|
-
modelValue:
|
|
98
|
-
"onUpdate:modelValue": (
|
|
97
|
+
modelValue: h.value,
|
|
98
|
+
"onUpdate:modelValue": (v) => h.value = v,
|
|
99
99
|
onModelValueChanged: I
|
|
100
|
-
}, null),
|
|
100
|
+
}, null), h.value ? a("div", {
|
|
101
101
|
class: "f-layout-editor-show-switch-label"
|
|
102
102
|
}, [N("标准模式")]) : a("div", {
|
|
103
103
|
class: "f-layout-editor-show-switch-label"
|
|
104
104
|
}, [N("自定义模式")])])]);
|
|
105
105
|
}
|
|
106
|
-
}),
|
|
106
|
+
}), pe = {
|
|
107
107
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
108
108
|
currentScreenResolution: { type: String, default: "" },
|
|
109
109
|
/** 模式开关 */
|
|
@@ -112,21 +112,21 @@ const ce = {
|
|
|
112
112
|
currentArea: { type: Object, default: [] },
|
|
113
113
|
/** 接受组件列表区传入的二维数组 */
|
|
114
114
|
twoDimensionalArray: { type: Array, default: [] }
|
|
115
|
-
},
|
|
115
|
+
}, he = {
|
|
116
116
|
/** 单个组件的预览状态 */
|
|
117
117
|
item: { type: Object, default: {} },
|
|
118
118
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
119
119
|
currentScreenResolution: { type: String, default: "" },
|
|
120
120
|
/** 接受switch状态,若为自定义模式,则需要改变Col-num的num来源;*/
|
|
121
121
|
switchInStandardMode: { type: Boolean, default: !1 }
|
|
122
|
-
},
|
|
122
|
+
}, ge = /* @__PURE__ */ B({
|
|
123
123
|
name: "FColumnWidthView",
|
|
124
|
-
props:
|
|
124
|
+
props: he,
|
|
125
125
|
emits: [],
|
|
126
126
|
setup(t, s) {
|
|
127
127
|
const i = u(t.item), r = u(t.currentScreenResolution), n = U(() => `col-${i.value[`columnIn${r.value}`]}`);
|
|
128
|
-
return R([() => t.item, () => t.currentScreenResolution], ([S,
|
|
129
|
-
S !== y && (i.value = S),
|
|
128
|
+
return R([() => t.item, () => t.currentScreenResolution], ([S, h], [y, I]) => {
|
|
129
|
+
S !== y && (i.value = S), h !== I && (r.value = h);
|
|
130
130
|
}), () => a("div", {
|
|
131
131
|
class: n.value
|
|
132
132
|
}, [a("div", {
|
|
@@ -136,12 +136,12 @@ const ce = {
|
|
|
136
136
|
class: "f-layout-editor-column-width-view-label"
|
|
137
137
|
}, [i.value.label])])]);
|
|
138
138
|
}
|
|
139
|
-
}),
|
|
139
|
+
}), ye = /* @__PURE__ */ B({
|
|
140
140
|
name: "FPreview",
|
|
141
|
-
props:
|
|
141
|
+
props: pe,
|
|
142
142
|
emits: ["update:twoDimensionalArray"],
|
|
143
143
|
setup(t, s) {
|
|
144
|
-
const i = u(t.currentScreenResolution), r = u(t.switchInStandardMode), n = u(t.currentArea), S = u(t.twoDimensionalArray),
|
|
144
|
+
const i = u(t.currentScreenResolution), r = u(t.switchInStandardMode), n = u(t.currentArea), S = u(t.twoDimensionalArray), h = u([]);
|
|
145
145
|
R([() => t.currentArea, () => t.switchInStandardMode, () => t.currentScreenResolution], ([e, o, c], [d, m, w]) => {
|
|
146
146
|
e !== d && (n.value = e), o !== m && (r.value = o), c !== w && (i.value = c);
|
|
147
147
|
});
|
|
@@ -155,20 +155,20 @@ const ce = {
|
|
|
155
155
|
function I() {
|
|
156
156
|
const e = [];
|
|
157
157
|
let o = 1;
|
|
158
|
-
return
|
|
158
|
+
return h.value.forEach((c) => {
|
|
159
159
|
const d = y(c, o);
|
|
160
160
|
o += d.length, e.push(d);
|
|
161
161
|
}), e;
|
|
162
162
|
}
|
|
163
163
|
function C() {
|
|
164
|
-
|
|
164
|
+
h.value = G(S.value), h.value = I();
|
|
165
165
|
}
|
|
166
166
|
R(() => t.twoDimensionalArray, () => {
|
|
167
167
|
S.value = t.twoDimensionalArray, C();
|
|
168
168
|
}), q(() => {
|
|
169
169
|
C();
|
|
170
170
|
});
|
|
171
|
-
function
|
|
171
|
+
function v() {
|
|
172
172
|
if (r.value)
|
|
173
173
|
return "";
|
|
174
174
|
const e = Array.from({
|
|
@@ -186,15 +186,15 @@ const ce = {
|
|
|
186
186
|
class: "f-layout-editor-preview f-utils-fill-flex-column"
|
|
187
187
|
}, [a("div", {
|
|
188
188
|
class: "f-layout-editor-preview-header"
|
|
189
|
-
}, [N("预览区")]),
|
|
189
|
+
}, [N("预览区")]), v(), a("div", {
|
|
190
190
|
class: "f-layout-editor-preview-view f-utils-overflow-xhya"
|
|
191
191
|
}, [a("div", {
|
|
192
192
|
class: "f-layout-editor-preview-row-group"
|
|
193
|
-
}, [
|
|
193
|
+
}, [h.value.map((e) => {
|
|
194
194
|
var o, c;
|
|
195
195
|
return ((o = e[0][0]) == null ? void 0 : o.group.toString()) === ((c = n.value[0]) == null ? void 0 : c.id) && e.map((d) => a("div", {
|
|
196
196
|
class: "f-layout-editor-row"
|
|
197
|
-
}, [d.map((m) => a(
|
|
197
|
+
}, [d.map((m) => a(ge, {
|
|
198
198
|
item: m,
|
|
199
199
|
"onUpdate:item": (w) => m = w,
|
|
200
200
|
currentScreenResolution: i.value,
|
|
@@ -202,7 +202,7 @@ const ce = {
|
|
|
202
202
|
}, null))]));
|
|
203
203
|
})])])]);
|
|
204
204
|
}
|
|
205
|
-
}),
|
|
205
|
+
}), Se = {
|
|
206
206
|
/** 用户切换屏幕分辨率-缩写-例:MD; */
|
|
207
207
|
currentScreenResolution: { type: String, default: "" },
|
|
208
208
|
/** 检测用户是否切换模式 */
|
|
@@ -220,7 +220,7 @@ const ce = {
|
|
|
220
220
|
onOriginalDataChanged: { type: Function, default: () => {
|
|
221
221
|
} }
|
|
222
222
|
};
|
|
223
|
-
function
|
|
223
|
+
function Ce(t, s) {
|
|
224
224
|
const i = u(-1), r = u(!1);
|
|
225
225
|
function n(e) {
|
|
226
226
|
if (e.target.offsetParent) {
|
|
@@ -236,7 +236,7 @@ function Se(t, s) {
|
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function h(e, o) {
|
|
240
240
|
e.stopPropagation(), n(e), S(o);
|
|
241
241
|
}
|
|
242
242
|
function y(e) {
|
|
@@ -252,18 +252,18 @@ function Se(t, s) {
|
|
|
252
252
|
function C(e) {
|
|
253
253
|
e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move");
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function v(e, o) {
|
|
256
256
|
o && (o.moving = !1), r.value = !1;
|
|
257
257
|
}
|
|
258
258
|
return {
|
|
259
|
-
dragstart:
|
|
259
|
+
dragstart: h,
|
|
260
260
|
dragenter: I,
|
|
261
261
|
dragover: C,
|
|
262
|
-
dragend:
|
|
262
|
+
dragend: v,
|
|
263
263
|
isDragging: r
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
|
-
const
|
|
266
|
+
const we = {
|
|
267
267
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
268
268
|
currentScreenResolution: { type: String, default: "" },
|
|
269
269
|
/** 传入的单个控件的响应式列宽值 */
|
|
@@ -273,9 +273,9 @@ const Ce = {
|
|
|
273
273
|
/** 列数值变化事件 */
|
|
274
274
|
fieldChanged: { type: Function, default: () => {
|
|
275
275
|
} }
|
|
276
|
-
},
|
|
276
|
+
}, Ie = /* @__PURE__ */ B({
|
|
277
277
|
name: "FColumnWidthEditor",
|
|
278
|
-
props:
|
|
278
|
+
props: we,
|
|
279
279
|
emits: ["fieldChanged"],
|
|
280
280
|
setup(t, s) {
|
|
281
281
|
const i = {
|
|
@@ -283,14 +283,14 @@ const Ce = {
|
|
|
283
283
|
MD: ["1", "2"],
|
|
284
284
|
LG: ["1", "2", "3", "4"],
|
|
285
285
|
EL: ["1", "2", "3", "4", "5", "6"]
|
|
286
|
-
}, r = u(t.currentScreenResolution), n = u(t.field), S = u(t.switchInStandardMode),
|
|
286
|
+
}, r = u(t.currentScreenResolution), n = u(t.field), S = u(t.switchInStandardMode), h = u(), y = u(""), I = u(), C = u("customize"), v = u(), e = J("ResponseLayoutEditorDraggableComposition"), {
|
|
287
287
|
dragstart: o,
|
|
288
288
|
dragenter: c,
|
|
289
289
|
dragover: d,
|
|
290
290
|
dragend: m
|
|
291
291
|
} = e;
|
|
292
292
|
function w() {
|
|
293
|
-
|
|
293
|
+
h.value = i == null ? void 0 : i[r.value], S.value ? (y.value = `displayWidthIn${r.value}`, C.value = `${n.value[y.value]}`) : (y.value = `columnIn${r.value}`, v.value = n.value[y.value]);
|
|
294
294
|
}
|
|
295
295
|
function D(g) {
|
|
296
296
|
if (S.value === !0) {
|
|
@@ -301,12 +301,12 @@ const Ce = {
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
function b(g) {
|
|
304
|
-
|
|
304
|
+
v.value = g;
|
|
305
305
|
const M = n.value[`columnIn${r.value}`] / n.value[`displayWidthIn${r.value}`];
|
|
306
|
-
n.value[`columnIn${r.value}`] =
|
|
306
|
+
n.value[`columnIn${r.value}`] = v.value, n.value[`displayWidthIn${r.value}`] = v.value / M, s.emit("fieldChanged", n.value);
|
|
307
307
|
}
|
|
308
308
|
function W() {
|
|
309
|
-
return a(
|
|
309
|
+
return a(ue, {
|
|
310
310
|
enableHalf: !0,
|
|
311
311
|
size: "extraLarge",
|
|
312
312
|
pointSystem: 12,
|
|
@@ -314,17 +314,17 @@ const Ce = {
|
|
|
314
314
|
lightColor: "#5D89FE",
|
|
315
315
|
darkColor: "#e7e9f3",
|
|
316
316
|
iconClass: "f-icon-column-rectangle",
|
|
317
|
-
modelValue:
|
|
318
|
-
"onUpdate:modelValue": (g) =>
|
|
317
|
+
modelValue: v.value,
|
|
318
|
+
"onUpdate:modelValue": (g) => v.value = g,
|
|
319
319
|
enableScore: !1,
|
|
320
|
-
onSelectedValue: () => b(
|
|
320
|
+
onSelectedValue: () => b(v.value)
|
|
321
321
|
}, null);
|
|
322
322
|
}
|
|
323
323
|
function L() {
|
|
324
324
|
const g = [];
|
|
325
|
-
|
|
325
|
+
h.value = i == null ? void 0 : i[r.value];
|
|
326
326
|
const M = n.value[`displayWidthIn${r.value}`];
|
|
327
|
-
return
|
|
327
|
+
return h.value.forEach(($) => {
|
|
328
328
|
const O = {
|
|
329
329
|
text: $,
|
|
330
330
|
active: M.toString() === $
|
|
@@ -334,7 +334,7 @@ const Ce = {
|
|
|
334
334
|
}
|
|
335
335
|
function E() {
|
|
336
336
|
const g = L();
|
|
337
|
-
return a(
|
|
337
|
+
return a(ie, {
|
|
338
338
|
enumData: g,
|
|
339
339
|
suffixValue: "列",
|
|
340
340
|
onSelectedValueChanged: D
|
|
@@ -369,7 +369,7 @@ const Ce = {
|
|
|
369
369
|
class: "f-layout-editor-column-width-editor-rectangle"
|
|
370
370
|
}, [W(), a("div", {
|
|
371
371
|
class: "f-layout-editor-rate-show-column"
|
|
372
|
-
}, [
|
|
372
|
+
}, [v.value, N("列")]), a("span", {
|
|
373
373
|
class: "f-layout-editor-drag-handler f-icon f-icon-drag-vertical",
|
|
374
374
|
draggable: "true",
|
|
375
375
|
onDragstart: (g) => o(g, n.value)
|
|
@@ -385,34 +385,34 @@ const Ce = {
|
|
|
385
385
|
}, [(M = n == null ? void 0 : n.value) == null ? void 0 : M.label]), f()]);
|
|
386
386
|
}
|
|
387
387
|
return R(() => [t.field, t.switchInStandardMode, t.currentScreenResolution], ([g, M, $], [O, j, l]) => {
|
|
388
|
-
$ !== l && (r.value = $,
|
|
388
|
+
$ !== l && (r.value = $, h.value = i[r.value], w()), M !== j && (S.value = M), S.value === !1 && w(), g !== O && (n.value = g);
|
|
389
389
|
}), q(() => {
|
|
390
390
|
w();
|
|
391
391
|
}), () => a("div", {
|
|
392
392
|
class: "f-layout-editor-column-width-editor"
|
|
393
393
|
}, [P(), T()]);
|
|
394
394
|
}
|
|
395
|
-
}),
|
|
395
|
+
}), De = /* @__PURE__ */ B({
|
|
396
396
|
name: "FFieldList",
|
|
397
|
-
props:
|
|
397
|
+
props: Se,
|
|
398
398
|
emits: ["update:currentArea", "twoDimensionalArrayChanged", "originalDataChanged"],
|
|
399
399
|
setup(t, s) {
|
|
400
|
-
const i = u(t.currentScreenResolution), r = u(t.switchInStandardMode), n = u(t.originalData), S = u(t.originalDataCopy),
|
|
400
|
+
const i = u(t.currentScreenResolution), r = u(t.switchInStandardMode), n = u(t.originalData), S = u(t.originalDataCopy), h = u(t.defaultStates), y = u(""), I = u([]), C = u(t.currentArea), v = u(0), e = u(), o = u(0), c = u("1"), d = u([]);
|
|
401
401
|
function m() {
|
|
402
402
|
const l = [];
|
|
403
|
-
return n.value.forEach((
|
|
404
|
-
l.indexOf(
|
|
403
|
+
return n.value.forEach((p) => {
|
|
404
|
+
l.indexOf(p.group) === -1 && l.push(p.group);
|
|
405
405
|
}), l;
|
|
406
406
|
}
|
|
407
407
|
function w() {
|
|
408
|
-
c.value =
|
|
408
|
+
c.value = h.value.defaultGroupNumber.toString(), y.value = `区域${c.value}`, C.value = [I.value[Number(c.value) - 1]], s.emit("update:currentArea", C.value);
|
|
409
409
|
}
|
|
410
410
|
function D() {
|
|
411
|
-
var
|
|
411
|
+
var p;
|
|
412
412
|
const l = m();
|
|
413
413
|
for (let F = 0; F < l.length; F++) {
|
|
414
414
|
const x = {
|
|
415
|
-
id: (
|
|
415
|
+
id: (p = l[F]) == null ? void 0 : p.toString(),
|
|
416
416
|
label: "区域" + l[F]
|
|
417
417
|
};
|
|
418
418
|
I.value.push(x);
|
|
@@ -422,38 +422,38 @@ const Ce = {
|
|
|
422
422
|
function b() {
|
|
423
423
|
let l = [];
|
|
424
424
|
e.value = [];
|
|
425
|
-
let
|
|
425
|
+
let p = 1;
|
|
426
426
|
n.value.forEach((F) => {
|
|
427
|
-
F.group ===
|
|
427
|
+
F.group === p || (p += 1, e.value.push(l), l = []), l.push(F);
|
|
428
428
|
}), e.value.push(l);
|
|
429
429
|
}
|
|
430
|
-
function W(l,
|
|
430
|
+
function W(l, p) {
|
|
431
431
|
let x = 12;
|
|
432
|
-
return
|
|
432
|
+
return v.value = 1 + p, l.forEach((V) => {
|
|
433
433
|
V.showTopBorder = 0;
|
|
434
434
|
const k = V[`columnIn${i.value}`];
|
|
435
|
-
x >= k ? (V.componentRow =
|
|
435
|
+
x >= k ? (V.componentRow = v.value, x -= k) : (v.value += 1, V.componentRow = v.value, x = 12 - k, V.showTopBorder = 1);
|
|
436
436
|
}), l[0].showTopBorder = 1, l;
|
|
437
437
|
}
|
|
438
438
|
function L(l) {
|
|
439
|
-
let
|
|
439
|
+
let p = [];
|
|
440
440
|
for (const F of l)
|
|
441
|
-
|
|
442
|
-
n.value = G(
|
|
441
|
+
p = p.concat(F);
|
|
442
|
+
n.value = G(p), o.value = 0;
|
|
443
443
|
}
|
|
444
444
|
function E() {
|
|
445
445
|
e.value[C.value[0].id - 1] = G(d.value);
|
|
446
446
|
const l = [];
|
|
447
|
-
o.value = 0, e.value.forEach((
|
|
448
|
-
const F = W(
|
|
447
|
+
o.value = 0, e.value.forEach((p) => {
|
|
448
|
+
const F = W(p, o.value);
|
|
449
449
|
l.push(F), o.value = F[F.length - 1].componentRow;
|
|
450
450
|
}), L(l);
|
|
451
451
|
}
|
|
452
452
|
function P() {
|
|
453
453
|
b();
|
|
454
454
|
const l = [];
|
|
455
|
-
return o.value = 0, e.value.forEach((
|
|
456
|
-
const F = W(
|
|
455
|
+
return o.value = 0, e.value.forEach((p) => {
|
|
456
|
+
const F = W(p, o.value);
|
|
457
457
|
l.push(F), o.value = F[F.length - 1].componentRow;
|
|
458
458
|
}), s.emit("twoDimensionalArrayChanged", e.value), L(l), n.value;
|
|
459
459
|
}
|
|
@@ -466,15 +466,15 @@ const Ce = {
|
|
|
466
466
|
n.value = G(P()), s.emit("originalDataChanged", n.value);
|
|
467
467
|
}
|
|
468
468
|
function g(l) {
|
|
469
|
-
d.value.forEach((
|
|
470
|
-
|
|
469
|
+
d.value.forEach((p) => {
|
|
470
|
+
p.id === l.id && Object.assign(p, l);
|
|
471
471
|
}), E(), T(), f();
|
|
472
472
|
}
|
|
473
473
|
function M(l) {
|
|
474
|
-
for (let
|
|
474
|
+
for (let p = 0; p < l.length; p++)
|
|
475
475
|
C.value = [{
|
|
476
|
-
id: l[
|
|
477
|
-
label: l[
|
|
476
|
+
id: l[p].id,
|
|
477
|
+
label: l[p].label
|
|
478
478
|
}];
|
|
479
479
|
s.emit("update:currentArea", C.value), f(), E();
|
|
480
480
|
}
|
|
@@ -485,7 +485,7 @@ const Ce = {
|
|
|
485
485
|
class: "f-layout-editor-field-list-header"
|
|
486
486
|
}, [N("组件列表")]), a("div", {
|
|
487
487
|
class: "f-layout-editor-choose-group"
|
|
488
|
-
}, [a(
|
|
488
|
+
}, [a(re, {
|
|
489
489
|
modelValue: c.value,
|
|
490
490
|
"onUpdate:modelValue": (l) => c.value = l,
|
|
491
491
|
placeholder: "当前可编辑组",
|
|
@@ -500,31 +500,31 @@ const Ce = {
|
|
|
500
500
|
function O() {
|
|
501
501
|
return a("div", {
|
|
502
502
|
class: "f-layout-editor-field-list-content f-utils-overflow-xhya"
|
|
503
|
-
}, [d.value.map((l) => a(
|
|
503
|
+
}, [d.value.map((l) => a(Ie, {
|
|
504
504
|
key: l.label,
|
|
505
505
|
currentScreenResolution: i.value,
|
|
506
506
|
field: l,
|
|
507
|
-
"onUpdate:field": (
|
|
507
|
+
"onUpdate:field": (p) => l = p,
|
|
508
508
|
switchInStandardMode: r.value,
|
|
509
|
-
"onUpdate:switchInStandardMode": (
|
|
509
|
+
"onUpdate:switchInStandardMode": (p) => r.value = p,
|
|
510
510
|
onFieldChanged: g
|
|
511
511
|
}, null))]);
|
|
512
512
|
}
|
|
513
|
-
const j =
|
|
513
|
+
const j = Ce(d, () => {
|
|
514
514
|
E(), T(), f();
|
|
515
515
|
});
|
|
516
|
-
return
|
|
517
|
-
l !==
|
|
518
|
-
}), R(C, (l,
|
|
519
|
-
l !==
|
|
520
|
-
}), R(() => t.currentGroup, (l,
|
|
521
|
-
l !==
|
|
522
|
-
}), R(() => t.currentScreenResolution, (l,
|
|
523
|
-
l !==
|
|
524
|
-
}), R(() => t.switchInStandardMode, (l,
|
|
525
|
-
l !==
|
|
526
|
-
}), R(
|
|
527
|
-
l !==
|
|
516
|
+
return te("ResponseLayoutEditorDraggableComposition", j), R(() => t.currentArea, (l, p) => {
|
|
517
|
+
l !== p && (C.value = t.currentArea, f());
|
|
518
|
+
}), R(C, (l, p) => {
|
|
519
|
+
l !== p && f();
|
|
520
|
+
}), R(() => t.currentGroup, (l, p) => {
|
|
521
|
+
l !== p && (y.value = t.currentGroup);
|
|
522
|
+
}), R(() => t.currentScreenResolution, (l, p) => {
|
|
523
|
+
l !== p && (i.value = t.currentScreenResolution, T(), b(), C.value[0] && (d.value = G(e.value[Number(C.value[0].id) - 1])));
|
|
524
|
+
}), R(() => t.switchInStandardMode, (l, p) => {
|
|
525
|
+
l !== p && (r.value = t.switchInStandardMode, n.value = G(S.value));
|
|
526
|
+
}), R(h, (l, p) => {
|
|
527
|
+
l !== p && T();
|
|
528
528
|
}), H(() => {
|
|
529
529
|
D(), P(), f();
|
|
530
530
|
}), () => a("div", {
|
|
@@ -541,15 +541,15 @@ const Ce = {
|
|
|
541
541
|
}, [$(), O()])
|
|
542
542
|
)]);
|
|
543
543
|
}
|
|
544
|
-
}),
|
|
544
|
+
}), be = /* @__PURE__ */ B({
|
|
545
545
|
name: "FResponseLayoutEditor",
|
|
546
|
-
props:
|
|
546
|
+
props: fe,
|
|
547
547
|
emits: ["close", "submit"],
|
|
548
548
|
setup(t, s) {
|
|
549
|
-
const i = u(t.initialState), r = u(), n = u(), S = u(""),
|
|
549
|
+
const i = u(t.initialState), r = u(), n = u(), S = u(""), h = u(""), y = u(!0), I = u([{
|
|
550
550
|
id: "1",
|
|
551
551
|
label: "区域1"
|
|
552
|
-
}]), C = u([]),
|
|
552
|
+
}]), C = u([]), v = u();
|
|
553
553
|
u(t.width), u(t.height), R(() => t.initialState, (f) => {
|
|
554
554
|
i.value = f;
|
|
555
555
|
}), R([() => t.currentArea, () => t.switchInStandardMode], ([f, T], [g, M]) => {
|
|
@@ -559,7 +559,7 @@ const Ce = {
|
|
|
559
559
|
S.value = f;
|
|
560
560
|
}
|
|
561
561
|
function o(f) {
|
|
562
|
-
|
|
562
|
+
h.value = f;
|
|
563
563
|
}
|
|
564
564
|
function c(f) {
|
|
565
565
|
y.value = f;
|
|
@@ -580,12 +580,12 @@ const Ce = {
|
|
|
580
580
|
s.emit("submit", r.value);
|
|
581
581
|
}
|
|
582
582
|
function W() {
|
|
583
|
-
return a(
|
|
583
|
+
return a(De, {
|
|
584
584
|
class: "f-utils-fill-flex-column",
|
|
585
585
|
defaultStates: n.value,
|
|
586
|
-
originalDataCopy:
|
|
587
|
-
currentScreenResolution:
|
|
588
|
-
"onUpdate:currentScreenResolution": (f) =>
|
|
586
|
+
originalDataCopy: v.value,
|
|
587
|
+
currentScreenResolution: h.value,
|
|
588
|
+
"onUpdate:currentScreenResolution": (f) => h.value = f,
|
|
589
589
|
originalData: r.value,
|
|
590
590
|
"onUpdate:originalData": (f) => r.value = f,
|
|
591
591
|
switchInStandardMode: y.value,
|
|
@@ -598,12 +598,12 @@ const Ce = {
|
|
|
598
598
|
}, null);
|
|
599
599
|
}
|
|
600
600
|
function L() {
|
|
601
|
-
return a(
|
|
601
|
+
return a(ye, {
|
|
602
602
|
class: "f-utils-fill-flex-column",
|
|
603
603
|
currentArea: I.value,
|
|
604
604
|
"onUpdate:currentArea": (f) => I.value = f,
|
|
605
|
-
currentScreenResolution:
|
|
606
|
-
"onUpdate:currentScreenResolution": (f) =>
|
|
605
|
+
currentScreenResolution: h.value,
|
|
606
|
+
"onUpdate:currentScreenResolution": (f) => h.value = f,
|
|
607
607
|
switchInStandardMode: y.value,
|
|
608
608
|
twoDimensionalArray: C.value,
|
|
609
609
|
"onUpdate:twoDimensionalArray": (f) => C.value = f
|
|
@@ -611,12 +611,12 @@ const Ce = {
|
|
|
611
611
|
}
|
|
612
612
|
const E = U(() => y.value ? "f-layout-editor-left-standard f-utils-fill-flex-column" : "f-layout-editor-left-customize f-utils-fill-flex-column"), P = U(() => y.value ? "f-layout-editor-right-standard f-utils-fill-flex-column" : "f-layout-editor-right-customize f-utils-fill-flex-column");
|
|
613
613
|
return H(() => {
|
|
614
|
-
r.value = G(i.value.importData),
|
|
614
|
+
r.value = G(i.value.importData), v.value = G(i.value.importData), n.value = i.value.defaultState, S.value = "中等屏幕", h.value = "MD";
|
|
615
615
|
}), (f) => a("div", {
|
|
616
616
|
class: "f-layout-editor f-utils-flex-column"
|
|
617
617
|
}, [a("div", {
|
|
618
618
|
class: "f-layout-editor-top"
|
|
619
|
-
}, [a(
|
|
619
|
+
}, [a(me, {
|
|
620
620
|
defaultStates: n.value,
|
|
621
621
|
onScreenNameChanged: e,
|
|
622
622
|
onCurrentScreenResolutionChanged: o,
|
|
@@ -649,17 +649,17 @@ const Ce = {
|
|
|
649
649
|
}
|
|
650
650
|
}), z = /* @__PURE__ */ B({
|
|
651
651
|
name: "FResponseLayoutEditorSettingDesign",
|
|
652
|
-
props:
|
|
652
|
+
props: de,
|
|
653
653
|
emits: [],
|
|
654
654
|
setup(t, s) {
|
|
655
|
-
const i = u(t.initialState), r = u(t.width), n = u(t.height), S = u(),
|
|
655
|
+
const i = u(t.initialState), r = u(t.width), n = u(t.height), S = u(), h = J("design-item-context"), y = ae(S, h);
|
|
656
656
|
q(() => {
|
|
657
657
|
S.value.componentInstance = y;
|
|
658
658
|
}), s.expose(y.value);
|
|
659
659
|
function I() {
|
|
660
|
-
const C =
|
|
660
|
+
const C = ne.show({
|
|
661
661
|
// title: '响应式列宽编辑器',
|
|
662
|
-
render: () => a(
|
|
662
|
+
render: () => a(be, {
|
|
663
663
|
initialState: i,
|
|
664
664
|
width: r,
|
|
665
665
|
height: n
|
|
@@ -695,25 +695,25 @@ const Ce = {
|
|
|
695
695
|
class: "f-column-width-setting-button-center"
|
|
696
696
|
}, [N("高级设置")])])]);
|
|
697
697
|
}
|
|
698
|
-
}),
|
|
699
|
-
["appearance",
|
|
698
|
+
}), Me = /* @__PURE__ */ new Map([
|
|
699
|
+
["appearance", se]
|
|
700
700
|
]);
|
|
701
|
-
function
|
|
701
|
+
function Fe(t, s, i, r) {
|
|
702
702
|
const n = t.getSchemaByType("section");
|
|
703
703
|
return n.id = `${r}-section`, n.appearance = { class: "f-section-form f-section-in-main" }, n.mainTitle = "标题", n.contents = [s], n;
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function Ae(t, s, i, r) {
|
|
706
706
|
const n = t.getSchemaByType("component");
|
|
707
707
|
return n.id = `${r}-component`, n.componentType = "form-col-1", n.appearance = {
|
|
708
708
|
class: "f-struct-form f-struct-wrapper"
|
|
709
709
|
}, n.contents = [s], n;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Ee(t, s, i) {
|
|
712
712
|
s.appearance = { class: "f-form-layout farris-form farris-form-controls-inline" };
|
|
713
|
-
const r =
|
|
714
|
-
return
|
|
713
|
+
const r = Fe(t, s, i, s.id);
|
|
714
|
+
return Ae(t, r, i, s.id);
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const Re = "https://json-schema.org/draft/2020-12/schema", Ne = "https://farris-design.gitee.io/response-layout-editor-setting.schema.json", Le = "response-layout-editor-setting", Te = "A Farris Data Collection Component", We = "object", $e = {
|
|
717
717
|
id: {
|
|
718
718
|
description: "The unique identifier for response layout editor",
|
|
719
719
|
type: "string"
|
|
@@ -742,18 +742,18 @@ const Ee = "https://json-schema.org/draft/2020-12/schema", Re = "https://farris-
|
|
|
742
742
|
description: "",
|
|
743
743
|
type: "function"
|
|
744
744
|
}
|
|
745
|
-
},
|
|
745
|
+
}, Ge = [
|
|
746
746
|
"id",
|
|
747
747
|
"type"
|
|
748
|
-
],
|
|
749
|
-
$schema:
|
|
750
|
-
$id:
|
|
751
|
-
title:
|
|
752
|
-
description:
|
|
753
|
-
type:
|
|
754
|
-
properties:
|
|
755
|
-
required:
|
|
756
|
-
},
|
|
748
|
+
], Pe = {
|
|
749
|
+
$schema: Re,
|
|
750
|
+
$id: Ne,
|
|
751
|
+
title: Le,
|
|
752
|
+
description: Te,
|
|
753
|
+
type: We,
|
|
754
|
+
properties: $e,
|
|
755
|
+
required: Ge
|
|
756
|
+
}, Be = "response-form", Oe = "A Farris Component", xe = "object", Ve = {
|
|
757
757
|
basic: {
|
|
758
758
|
description: "Basic Infomation",
|
|
759
759
|
title: "基本信息",
|
|
@@ -775,13 +775,13 @@ const Ee = "https://json-schema.org/draft/2020-12/schema", Re = "https://farris-
|
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
},
|
|
779
|
-
title:
|
|
780
|
-
description:
|
|
781
|
-
type:
|
|
782
|
-
categories:
|
|
778
|
+
}, je = {
|
|
779
|
+
title: Be,
|
|
780
|
+
description: Oe,
|
|
781
|
+
type: xe,
|
|
782
|
+
categories: Ve
|
|
783
783
|
};
|
|
784
|
-
class
|
|
784
|
+
class Y {
|
|
785
785
|
constructor() {
|
|
786
786
|
/** 控件标题 */
|
|
787
787
|
A(this, "label", "");
|
|
@@ -815,8 +815,8 @@ function et(t) {
|
|
|
815
815
|
let s, i;
|
|
816
816
|
const r = /* @__PURE__ */ new Map();
|
|
817
817
|
let n = [];
|
|
818
|
-
function S(
|
|
819
|
-
const c =
|
|
818
|
+
function S(v, e) {
|
|
819
|
+
const c = ((v == null ? void 0 : v.split(" ")) || []).filter((b) => b.startsWith("col-"));
|
|
820
820
|
if (c.length === 0) {
|
|
821
821
|
e.isSupportedClass = !1;
|
|
822
822
|
return;
|
|
@@ -824,33 +824,40 @@ function et(t) {
|
|
|
824
824
|
let d = c.find((b) => /^col-([1-9]|10|11|12)$/.test(b)), m = c.find((b) => /^col-md-([1-9]|10|11|12)$/.test(b)), w = c.find((b) => /^col-xl-([1-9]|10|11|12)$/.test(b)), D = c.find((b) => /^col-el-([1-9]|10|11|12)$/.test(b));
|
|
825
825
|
d = d || "col-12", e.columnInSM = parseInt(d.replace("col-", ""), 10), e.displayWidthInSM = e.columnInSM / 12, e.displayWidthInSM !== 1 && (e.isSupportedClass = !1), m = m || "col-md-" + e.columnInSM, e.columnInMD = parseInt(m.replace("col-md-", ""), 10), e.displayWidthInMD = e.columnInMD / 6, [1, 2].includes(e.displayWidthInMD) || (e.isSupportedClass = !1), w = w || "col-xl-" + e.columnInMD, e.columnInLG = parseInt(w.replace("col-xl-", ""), 10), e.displayWidthInLG = e.columnInLG / 3, [1, 2, 3, 4].includes(e.displayWidthInLG) || (e.isSupportedClass = !1), D = D || "col-el-" + e.columnInLG, e.columnInEL = parseInt(D.replace("col-el-", ""), 10), e.displayWidthInEL = e.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(e.displayWidthInEL) || (e.isSupportedClass = !1);
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function h(v, e, o, c = !1) {
|
|
828
828
|
let d = !1;
|
|
829
|
-
|
|
829
|
+
if (!v.contents || v.contents.length === 0) {
|
|
830
|
+
const m = new Y();
|
|
831
|
+
S(v.layout, m), e.push(m);
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
v.contents.forEach((m) => {
|
|
830
835
|
if (m.type === "fieldset") {
|
|
831
|
-
o += 1,
|
|
836
|
+
o += 1, h(m, e, o, !0), d = !0;
|
|
832
837
|
return;
|
|
833
838
|
}
|
|
839
|
+
if (m.type === "dynamic-form")
|
|
840
|
+
return;
|
|
834
841
|
d && (o += 1, d = !1);
|
|
835
|
-
const w = m.appearance && m.appearance.class, D = new
|
|
836
|
-
w ? S(w, D) : D.isSupportedClass = !1, D.label = m.label || m.id, D.id = m.id, D.group = o, c && (D.fieldSetId =
|
|
842
|
+
const w = m.appearance && m.appearance.class, D = new Y();
|
|
843
|
+
w ? S(w, D) : D.isSupportedClass = !1, D.label = m.label || m.id, D.id = m.id, D.group = o, c && (D.fieldSetId = v.id), i === m.id && (s = o), r.set(m.id, m), e.push(D);
|
|
837
844
|
});
|
|
838
845
|
}
|
|
839
|
-
function y(
|
|
840
|
-
const e = t.getComponentById(
|
|
846
|
+
function y(v) {
|
|
847
|
+
const e = t.getComponentById(v);
|
|
841
848
|
if (!e || !e.componentType || !e.componentType.startsWith("form"))
|
|
842
849
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
843
850
|
const o = t.selectNode(e, (c) => c.type === X["response-form"].type);
|
|
844
851
|
return !o || !o.contents || o.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: o };
|
|
845
852
|
}
|
|
846
|
-
function I(
|
|
847
|
-
e = e ||
|
|
853
|
+
function I(v, e) {
|
|
854
|
+
e = e || v.id;
|
|
848
855
|
const { result: o, message: c, formNode: d } = y(e);
|
|
849
856
|
if (!o)
|
|
850
857
|
return { result: o, message: c };
|
|
851
|
-
i =
|
|
858
|
+
i = v.id, n = [], r.clear();
|
|
852
859
|
const m = d.contents[0].type === X.fieldset.type ? 0 : 1;
|
|
853
|
-
|
|
860
|
+
h(d, n, m);
|
|
854
861
|
const w = n.find((b) => !b.isSupportedClass);
|
|
855
862
|
return {
|
|
856
863
|
defaultState: {
|
|
@@ -860,13 +867,13 @@ function et(t) {
|
|
|
860
867
|
importData: n
|
|
861
868
|
};
|
|
862
869
|
}
|
|
863
|
-
function C(
|
|
870
|
+
function C(v, e) {
|
|
864
871
|
e = e;
|
|
865
872
|
const { result: o, formNode: c } = y(e);
|
|
866
873
|
if (!o)
|
|
867
874
|
return "";
|
|
868
875
|
const d = [];
|
|
869
|
-
return
|
|
876
|
+
return v.forEach((m) => {
|
|
870
877
|
var b;
|
|
871
878
|
const w = r.get(m.id), D = w.appearance && w.appearance.class;
|
|
872
879
|
if (D) {
|
|
@@ -884,18 +891,18 @@ function et(t) {
|
|
|
884
891
|
checkCanFindFormNode: y,
|
|
885
892
|
checkCanOpenLayoutEditor: I,
|
|
886
893
|
changeFormControlsByResponseLayoutConfig: C,
|
|
887
|
-
getResonseFormLayoutConfig:
|
|
894
|
+
getResonseFormLayoutConfig: h
|
|
888
895
|
};
|
|
889
896
|
}
|
|
890
|
-
const
|
|
897
|
+
const K = ce(_, Pe, Me, Ee, je);
|
|
891
898
|
z.register = (t, s, i, r) => {
|
|
892
|
-
t["response-layout-editor-setting"] =
|
|
899
|
+
t["response-layout-editor-setting"] = ee, s["response-layout-editor-setting"] = K;
|
|
893
900
|
};
|
|
894
901
|
z.registerDesigner = (t, s, i) => {
|
|
895
|
-
t["response-layout-editor-setting"] = z, s["response-layout-editor-setting"] =
|
|
902
|
+
t["response-layout-editor-setting"] = z, s["response-layout-editor-setting"] = K;
|
|
896
903
|
};
|
|
897
904
|
export {
|
|
898
905
|
z as default,
|
|
899
|
-
|
|
906
|
+
K as propsResolver,
|
|
900
907
|
et as useResponseLayoutEditorSetting
|
|
901
908
|
};
|