@farris/ui-vue 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +1764 -623
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +125 -125
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/designer/avatar/index.esm.js +1333 -100
- package/designer/avatar/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +2418 -2418
- package/designer/data-grid/index.umd.cjs +3 -3
- package/designer/dynamic-form/index.esm.js +31 -31
- package/designer/dynamic-form/index.umd.cjs +1 -1
- package/designer/farris-designer.all.esm.js +122 -122
- package/designer/farris-designer.all.umd.cjs +5 -5
- package/farris.all.esm.js +25978 -25961
- package/farris.all.umd.cjs +28 -28
- package/package.json +1 -1
- package/types/avatar/src/property-config/avatar.property-config.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +5 -0
- package/types/dynamic-view/src/components/maps.d.ts +96 -120
|
@@ -1,125 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import
|
|
92
|
-
import
|
|
93
|
-
import
|
|
94
|
-
import
|
|
95
|
-
import
|
|
96
|
-
import
|
|
97
|
-
import {
|
|
98
|
-
|
|
1
|
+
var Ze = Object.defineProperty;
|
|
2
|
+
var We = (e, t, n) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var le = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as H, ref as V, computed as Z, withDirectives as Ie, createVNode as F, resolveDirective as Be, watch as oe, createTextVNode as ee, mergeProps as ce, inject as te, onMounted as me } from "vue";
|
|
5
|
+
import { LocaleService as Je } from "../locale/index.esm.js";
|
|
6
|
+
import ze from "../../designer/accordion/index.esm.js";
|
|
7
|
+
import Xe from "../../designer/avatar/index.esm.js";
|
|
8
|
+
import Ke from "../../designer/button-edit/index.esm.js";
|
|
9
|
+
import Qe from "../../designer/button-group/index.esm.js";
|
|
10
|
+
import xe, { calendarProps as _e } from "../calendar/index.esm.js";
|
|
11
|
+
import Ye from "../../designer/capsule/index.esm.js";
|
|
12
|
+
import ve from "../../designer/checkbox/index.esm.js";
|
|
13
|
+
import Ce from "../../designer/checkbox-group/index.esm.js";
|
|
14
|
+
import He from "../../designer/combo-list/index.esm.js";
|
|
15
|
+
import et from "../../designer/combo-tree/index.esm.js";
|
|
16
|
+
import tt from "../../designer/component/index.esm.js";
|
|
17
|
+
import ot from "../../designer/color-picker/index.esm.js";
|
|
18
|
+
import nt from "../content-container/index.esm.js";
|
|
19
|
+
import rt from "../../designer/date-picker/index.esm.js";
|
|
20
|
+
import at from "../../designer/data-grid/index.esm.js";
|
|
21
|
+
import it from "../../designer/dropdown/index.esm.js";
|
|
22
|
+
import st, { dynamicFormGroupProps as lt, FDynamicFormLabel as ut } from "../dynamic-form/index.esm.js";
|
|
23
|
+
import ct from "../events-editor/index.esm.js";
|
|
24
|
+
import dt from "../filter-bar/index.esm.js";
|
|
25
|
+
import pt from "../field-selector/index.esm.js";
|
|
26
|
+
import mt from "../../designer/binding-selector/index.esm.js";
|
|
27
|
+
import ft from "../../designer/image-cropper/index.esm.js";
|
|
28
|
+
import gt from "../../designer/input-group/index.esm.js";
|
|
29
|
+
import yt from "../layout/index.esm.js";
|
|
30
|
+
import ht from "../list-nav/index.esm.js";
|
|
31
|
+
import vt from "../../designer/list-view/index.esm.js";
|
|
32
|
+
import Ee, { lookupProps as Ct } from "../lookup/index.esm.js";
|
|
33
|
+
import Ft from "../mapping-editor/index.esm.js";
|
|
34
|
+
import bt from "../../designer/nav/index.esm.js";
|
|
35
|
+
import wt from "../../designer/number-range/index.esm.js";
|
|
36
|
+
import Vt from "../../designer/number-spinner/index.esm.js";
|
|
37
|
+
import kt from "../../designer/order/index.esm.js";
|
|
38
|
+
import Tt from "../page-header/index.esm.js";
|
|
39
|
+
import It from "../../designer/page-footer/index.esm.js";
|
|
40
|
+
import Bt from "../../designer/pagination/index.esm.js";
|
|
41
|
+
import xt from "../../designer/progress/index.esm.js";
|
|
42
|
+
import Et from "../query-solution/index.esm.js";
|
|
43
|
+
import Pt from "../../designer/radio-group/index.esm.js";
|
|
44
|
+
import Lt from "../../designer/rate/index.esm.js";
|
|
45
|
+
import Nt from "../../designer/response-toolbar/index.esm.js";
|
|
46
|
+
import Mt from "../response-layout/index.esm.js";
|
|
47
|
+
import $t, { useResponseLayoutEditorSetting as Dt } from "../../designer/response-layout-editor/index.esm.js";
|
|
48
|
+
import Ut from "../../designer/search-box/index.esm.js";
|
|
49
|
+
import Rt from "../../designer/section/index.esm.js";
|
|
50
|
+
import At from "../../designer/smoke-detector/index.esm.js";
|
|
51
|
+
import qt from "../../designer/splitter/index.esm.js";
|
|
52
|
+
import St from "../../designer/step/index.esm.js";
|
|
53
|
+
import Gt from "../../designer/switch/index.esm.js";
|
|
54
|
+
import Ot from "../../designer/tabs/index.esm.js";
|
|
55
|
+
import jt from "../../designer/tags/index.esm.js";
|
|
56
|
+
import Zt from "../../designer/text/index.esm.js";
|
|
57
|
+
import Wt from "../../designer/time-picker/index.esm.js";
|
|
58
|
+
import Jt from "../../designer/transfer/index.esm.js";
|
|
59
|
+
import zt from "../../designer/tree-view/index.esm.js";
|
|
60
|
+
import Xt from "../../designer/uploader/index.esm.js";
|
|
61
|
+
import Kt from "../../designer/verify-detail/index.esm.js";
|
|
62
|
+
import Qt from "../../designer/video/index.esm.js";
|
|
63
|
+
import _t from "../../designer/textarea/index.esm.js";
|
|
64
|
+
import Yt from "../schema-selector/index.esm.js";
|
|
65
|
+
import Ht from "../../designer/tree-grid/index.esm.js";
|
|
66
|
+
import eo from "../event-parameter/index.esm.js";
|
|
67
|
+
import to from "../../designer/filter-condition-editor/index.esm.js";
|
|
68
|
+
import oo from "../fieldset/index.esm.js";
|
|
69
|
+
import no from "../../designer/sort-condition-editor/index.esm.js";
|
|
70
|
+
import ro from "../../designer/menu-lookup/index.esm.js";
|
|
71
|
+
import ao from "../../designer/drawer/index.esm.js";
|
|
72
|
+
import io from "../../designer/json-editor/index.esm.js";
|
|
73
|
+
import so from "../property-editor/index.esm.js";
|
|
74
|
+
import lo from "../../designer/expression-editor/index.esm.js";
|
|
75
|
+
import uo from "../../designer/code-editor/index.esm.js";
|
|
76
|
+
import co from "../../designer/html-template/index.esm.js";
|
|
77
|
+
import po from "../collection-property-editor/index.esm.js";
|
|
78
|
+
import mo from "../../designer/modal/index.esm.js";
|
|
79
|
+
import fo from "../external-container/index.esm.js";
|
|
80
|
+
import Pe, { languageTextBoxProps as go } from "../language-textbox/index.esm.js";
|
|
81
|
+
import yo from "../image/index.esm.js";
|
|
82
|
+
import ho from "../comment/index.esm.js";
|
|
83
|
+
import { schemaResolverMap as vo, propertyEffectMap as Co, propertyConfigSchemaMap as Fo, schemaMap as Le, createPropsResolver as de, propertyConfigSchemaMapForDesigner as bo, resolveAppearance as wo, createFormGroupEditorResolver as Vo } from "../dynamic-resolver/index.esm.js";
|
|
84
|
+
import { useThirdComponent as Ne, isMobilePhone as ko, useGuid as Fe, areaResponseDirective as To, useTextBoxDesign as Io, FormSchemaEntityField$Type as be, FormSchemaEntityFieldTypeName as we } from "../common/index.esm.js";
|
|
85
|
+
import Bo, { buttonEditProps as xo } from "../button-edit/index.esm.js";
|
|
86
|
+
import Eo, { checkboxProps as Po } from "../checkbox/index.esm.js";
|
|
87
|
+
import Lo, { checkboxGroupProps as No } from "../checkbox-group/index.esm.js";
|
|
88
|
+
import ue, { comboListProps as Mo } from "../combo-list/index.esm.js";
|
|
89
|
+
import $o, { datePickerProps as Do } from "../date-picker/index.esm.js";
|
|
90
|
+
import Uo, { inputGroupProps as Ro } from "../input-group/index.esm.js";
|
|
91
|
+
import Ao, { numberRangeProps as qo } from "../number-range/index.esm.js";
|
|
92
|
+
import So, { numberSpinnerProps as Go } from "../number-spinner/index.esm.js";
|
|
93
|
+
import Oo, { progressProps as jo } from "../progress/index.esm.js";
|
|
94
|
+
import Zo, { radioGroupProps as Wo } from "../radio-group/index.esm.js";
|
|
95
|
+
import Jo, { rateProps as zo } from "../rate/index.esm.js";
|
|
96
|
+
import Xo, { switchProps as Ko } from "../switch/index.esm.js";
|
|
97
|
+
import Qo, { timePickerProps as _o } from "../time-picker/index.esm.js";
|
|
98
|
+
import Yo, { textAreaProps as Ho } from "../textarea/index.esm.js";
|
|
99
|
+
import { DgControl as l, refreshCanvas as en, UseTemplateDragAndDropRules as tn, useDragulaCommonRule as on, useDesignerComponent as ye } from "../designer-canvas/index.esm.js";
|
|
100
|
+
import { BaseControlProperty as nn, FormBindingType as ae, InputBaseProperty as rn } from "../property-panel/index.esm.js";
|
|
101
|
+
import "../../designer/dynamic-form/index.esm.js";
|
|
102
|
+
import "../nav/index.esm.js";
|
|
103
|
+
import "../step/index.esm.js";
|
|
104
|
+
import "../html-template/index.esm.js";
|
|
105
|
+
import { cloneDeep as an } from "lodash-es";
|
|
106
|
+
import { FMessageBoxService as sn } from "../message-box/index.esm.js";
|
|
107
|
+
const Me = {
|
|
99
108
|
customClass: { type: String, default: "" },
|
|
100
109
|
customStyle: { type: String, defaut: "" },
|
|
101
110
|
/** 控制是否可见 */
|
|
102
111
|
visible: { type: Boolean, default: !0 },
|
|
103
112
|
/** 内部控件布局是否响应国际化 */
|
|
104
113
|
adaptForLanguage: { type: Boolean, default: !0 }
|
|
105
|
-
},
|
|
114
|
+
}, se = /* @__PURE__ */ H({
|
|
106
115
|
name: "FResponseForm",
|
|
107
|
-
props:
|
|
116
|
+
props: Me,
|
|
108
117
|
emits: [],
|
|
109
|
-
setup(e,
|
|
110
|
-
const
|
|
111
|
-
const
|
|
118
|
+
setup(e, t) {
|
|
119
|
+
const n = V(), a = Z(() => {
|
|
120
|
+
const o = Je.getLocale(), s = e.customClass.split(" "), i = {
|
|
112
121
|
"drag-container": !0
|
|
113
122
|
};
|
|
114
|
-
return
|
|
123
|
+
return s.reduce((h, d) => (h[d] = !0, h), i), e.adaptForLanguage && o && (i["farris-form-controls-inline"] = o !== "en"), i;
|
|
115
124
|
});
|
|
116
|
-
return () => e.visible &&
|
|
117
|
-
ref:
|
|
118
|
-
class:
|
|
125
|
+
return () => e.visible && Ie(F("div", {
|
|
126
|
+
ref: n,
|
|
127
|
+
class: a.value,
|
|
119
128
|
style: e.customStyle
|
|
120
|
-
}, [
|
|
129
|
+
}, [t.slots.default && t.slots.default()]), [[Be("area-response")]]);
|
|
121
130
|
}
|
|
122
|
-
}),
|
|
131
|
+
}), ln = {
|
|
123
132
|
id: { type: String },
|
|
124
133
|
required: { type: Boolean, default: !1 },
|
|
125
134
|
text: { type: String, default: "" },
|
|
@@ -130,69 +139,69 @@ const Po = {
|
|
|
130
139
|
* 实际支持 'visible'可见 | 'reserve-space' 占位不显示
|
|
131
140
|
*/
|
|
132
141
|
showType: { type: String, default: "visible" }
|
|
133
|
-
},
|
|
142
|
+
}, $e = /* @__PURE__ */ H({
|
|
134
143
|
name: "FDynamicFormLabel",
|
|
135
|
-
props:
|
|
144
|
+
props: ln,
|
|
136
145
|
emits: [],
|
|
137
|
-
setup(e,
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}),
|
|
143
|
-
|
|
144
|
-
}),
|
|
145
|
-
|
|
146
|
+
setup(e, t) {
|
|
147
|
+
V(e.title || e.text);
|
|
148
|
+
const n = V(e.required), a = V(e.text), o = V(e.valid), s = V(e.inValidTip);
|
|
149
|
+
oe(() => e.text, () => {
|
|
150
|
+
a.value = e.text;
|
|
151
|
+
}), oe(() => e.required, (C, u) => {
|
|
152
|
+
C !== u && (n.value = C);
|
|
153
|
+
}), oe([() => e.valid, () => e.inValidTip], ([C, u]) => {
|
|
154
|
+
o.value = C, s.value = u;
|
|
146
155
|
});
|
|
147
|
-
const
|
|
156
|
+
const i = Z(() => o.value ? a.value : s.value), h = Z(() => o.value ? "" : "color:red"), d = Z(() => ({
|
|
148
157
|
"col-form-label": !0,
|
|
149
158
|
// 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
|
|
150
|
-
"f-width-auto":
|
|
151
|
-
})),
|
|
152
|
-
return () =>
|
|
153
|
-
class:
|
|
154
|
-
title:
|
|
155
|
-
style:
|
|
156
|
-
}, [!
|
|
159
|
+
"f-width-auto": n.value && (e.showType === "none" || !a.value)
|
|
160
|
+
})), g = Z(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || n.value || !!a.value && e.showType !== "none");
|
|
161
|
+
return () => g.value && F("label", {
|
|
162
|
+
class: d.value,
|
|
163
|
+
title: i.value,
|
|
164
|
+
style: h.value
|
|
165
|
+
}, [!o.value && F("span", {
|
|
157
166
|
class: "f-icon f-icon-warning mr-1",
|
|
158
167
|
style: "color: red; min-width: 16px;",
|
|
159
|
-
title:
|
|
160
|
-
}, null),
|
|
168
|
+
title: s.value
|
|
169
|
+
}, null), F("span", {
|
|
161
170
|
class: "farris-label-text"
|
|
162
|
-
}, [
|
|
171
|
+
}, [n.value && F("span", {
|
|
163
172
|
class: "farris-label-info text-danger"
|
|
164
|
-
}, [
|
|
173
|
+
}, [ee("*")]), e.showType === "visible" && a.value])]);
|
|
165
174
|
}
|
|
166
|
-
}), { globalStorageKey:
|
|
167
|
-
async function
|
|
175
|
+
}), { globalStorageKey: un } = Ne(), p = {}, m = {}, f = {}, y = {};
|
|
176
|
+
async function cn() {
|
|
168
177
|
{
|
|
169
178
|
const e = {
|
|
170
|
-
schemaMap:
|
|
171
|
-
propertyConfigSchemaMap:
|
|
172
|
-
propertyEffectMap:
|
|
173
|
-
schemaResolverMap:
|
|
179
|
+
schemaMap: Le,
|
|
180
|
+
propertyConfigSchemaMap: Fo,
|
|
181
|
+
propertyEffectMap: Co,
|
|
182
|
+
schemaResolverMap: vo
|
|
174
183
|
};
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
178
|
-
for (const
|
|
179
|
-
|
|
184
|
+
Xe.register(p, m, f, y), ze.register(p, m, f, y), Ke.register(p, m, f, y), Qe.register(p, m, f, y), xe.register(p, m, f, y, e), Ye.register(p, m, f, y), ve.register(p, m, f, y, e), Ce.register(p, m, f, y, e), ve.register(p, m, f, y, e), Ce.register(p, m, f, y, e), He.register(p, m, f, y, e), et.register(p, m, f, y), tt.register(p, m, f, y), nt.register(p, m, f, y, e), ot.register(p, m, f, y), rt.register(p, m, f, y, e), at.register(p, m, f, y, e), it.register(p, m, f, y), st.register(p, m, f, y, e), ct.register(p, m, f, y), lo.register(p, m, f, y), dt.register(p, m, f, y), pt.register(p, m, f, y), to.register(p, m, f, y), ft.register(p, m, f, y), gt.register(p, m, f, y, e), yt.register(p, m, f, y, e), vt.register(p, m, f, y, e), ht.register(p, m, f, y), Ee.register(p, m, f, y, e), Ft.register(p, m, f, y), bt.register(p, m, f, y), wt.register(p, m, f, y), Vt.register(p, m, f, y, e), kt.register(p, m, f, y), Tt.register(p, m, f, y, e), It.register(p, m, f, y), Bt.register(p, m, f, y), xt.register(p, m, f, y), Et.register(p, m, f, y, e), Pt.register(p, m, f, y, e), Lt.register(p, m, f, y), Mt.register(p, m, f, y, e), $t.register(p, m, f, y), Nt.register(p, m, f, y), Yt.register(p, m, f), Ut.register(p, m, f, y), Rt.register(p, m, f, y, e), At.register(p, m, f, y), qt.register(p, m, f, y), St.register(p, m, f, y), Gt.register(p, m, f, y, e), no.register(p, m, f, y), Ot.register(p, m, f, y, e), jt.register(p, m, f, y), Zt.register(p, m, f, y), Wt.register(p, m, f, y, e), Jt.register(p, m, f, y), zt.register(p, m, f, y), Kt.register(p, m, f, y), Xt.register(p, m, f, y), Qt.register(p, m, f, y), _t.register(p, m, f, y, e), Ht.register(p, m, f, y), mt.register(p, m, f, y), eo.register(p, m, f, y), oo.register(p, m, f, y, e), ro.register(p, m, f, y), ao.register(p, m, f, y), io.register(p, m, f, y), so.register(p, m, f, y), uo.register(p, m, f, y), co.register(p, m, f, y, e), po.register(p, m, f, y), mo.register(p, m, f, y), fo.register(p, m, f, y), Pe.register(p, m, f, y, e), yo.register(p, m, f, y, e), ho.register(p, m, f, y);
|
|
185
|
+
const t = window[un];
|
|
186
|
+
if (t)
|
|
187
|
+
for (const n in t)
|
|
188
|
+
t[n].createPropsResolver = de, t[n].register(p, m, f);
|
|
180
189
|
}
|
|
181
190
|
}
|
|
182
|
-
function
|
|
183
|
-
|
|
184
|
-
function e(
|
|
185
|
-
const
|
|
186
|
-
if (!
|
|
187
|
-
throw new Error(`Could not find the editor of type '${
|
|
188
|
-
return
|
|
189
|
-
}
|
|
190
|
-
function
|
|
191
|
-
const
|
|
192
|
-
return
|
|
193
|
-
}
|
|
194
|
-
function
|
|
195
|
-
switch (
|
|
191
|
+
function De() {
|
|
192
|
+
cn();
|
|
193
|
+
function e(i) {
|
|
194
|
+
const h = p[i];
|
|
195
|
+
if (!h)
|
|
196
|
+
throw new Error(`Could not find the editor of type '${i}'`);
|
|
197
|
+
return h;
|
|
198
|
+
}
|
|
199
|
+
function t(i, h) {
|
|
200
|
+
const d = m[i];
|
|
201
|
+
return d ? d(h) : {};
|
|
202
|
+
}
|
|
203
|
+
function n(i) {
|
|
204
|
+
switch (i) {
|
|
196
205
|
case "check-box":
|
|
197
206
|
return "onChangeValue";
|
|
198
207
|
case "switch":
|
|
@@ -266,31 +275,31 @@ function ye() {
|
|
|
266
275
|
return "onUpdate:modelValue";
|
|
267
276
|
}
|
|
268
277
|
}
|
|
269
|
-
function
|
|
270
|
-
switch (
|
|
278
|
+
function a(i) {
|
|
279
|
+
switch (i) {
|
|
271
280
|
case "combo-list":
|
|
272
281
|
case "input-group":
|
|
273
282
|
case "textarea":
|
|
274
283
|
return "onClear";
|
|
275
284
|
}
|
|
276
285
|
}
|
|
277
|
-
function
|
|
278
|
-
switch (
|
|
286
|
+
function o(i) {
|
|
287
|
+
switch (i) {
|
|
279
288
|
case "input-group":
|
|
280
289
|
case "textarea":
|
|
281
290
|
return "onMousedownEvent";
|
|
282
291
|
}
|
|
283
292
|
}
|
|
284
|
-
function
|
|
285
|
-
switch (
|
|
293
|
+
function s(i) {
|
|
294
|
+
switch (i) {
|
|
286
295
|
case "input-group":
|
|
287
296
|
case "textarea":
|
|
288
297
|
return "onMouseupEvent";
|
|
289
298
|
}
|
|
290
299
|
}
|
|
291
|
-
return { resolveEditorProps:
|
|
300
|
+
return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: n, getClearFunctionName: a, getMousedownFunctionName: o, getMouseupFunctionName: s };
|
|
292
301
|
}
|
|
293
|
-
const
|
|
302
|
+
const Ue = {
|
|
294
303
|
id: { type: String, default: "" },
|
|
295
304
|
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
296
305
|
editor: { type: Object, default: {} },
|
|
@@ -304,63 +313,63 @@ const Do = {
|
|
|
304
313
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
305
314
|
*/
|
|
306
315
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
307
|
-
},
|
|
316
|
+
}, fe = /* @__PURE__ */ H({
|
|
308
317
|
name: "FDynamicFormInput",
|
|
309
|
-
props:
|
|
318
|
+
props: Ue,
|
|
310
319
|
emits: ["change", "update:modelValue", "mousedown", "mouseup"],
|
|
311
|
-
setup(e,
|
|
312
|
-
const
|
|
313
|
-
resolveEditorProps:
|
|
314
|
-
resolveEditorType:
|
|
315
|
-
getChangeFunctionName:
|
|
316
|
-
getMousedownFunctionName:
|
|
317
|
-
getMouseupFunctionName:
|
|
318
|
-
getClearFunctionName:
|
|
319
|
-
} =
|
|
320
|
-
function
|
|
321
|
-
|
|
322
|
-
newValue:
|
|
323
|
-
newModelValue:
|
|
324
|
-
parameters:
|
|
320
|
+
setup(e, t) {
|
|
321
|
+
const n = V(e.id), a = V(e.editor), o = V(e.modelValue), {
|
|
322
|
+
resolveEditorProps: s,
|
|
323
|
+
resolveEditorType: i,
|
|
324
|
+
getChangeFunctionName: h,
|
|
325
|
+
getMousedownFunctionName: d,
|
|
326
|
+
getMouseupFunctionName: g,
|
|
327
|
+
getClearFunctionName: C
|
|
328
|
+
} = De();
|
|
329
|
+
function u(b, B, M) {
|
|
330
|
+
o.value = B !== void 0 ? B : b, t.emit("update:modelValue", o.value), t.emit("change", o.value, {
|
|
331
|
+
newValue: b,
|
|
332
|
+
newModelValue: B,
|
|
333
|
+
parameters: M
|
|
325
334
|
});
|
|
326
335
|
}
|
|
327
|
-
function
|
|
328
|
-
|
|
336
|
+
function w(b) {
|
|
337
|
+
t.emit("mousedown", b);
|
|
329
338
|
}
|
|
330
|
-
function
|
|
331
|
-
|
|
339
|
+
function x(b) {
|
|
340
|
+
t.emit("mouseup", b);
|
|
332
341
|
}
|
|
333
342
|
function $() {
|
|
334
|
-
|
|
343
|
+
t.emit("update:modelValue", "");
|
|
335
344
|
}
|
|
336
|
-
function
|
|
337
|
-
return (...
|
|
338
|
-
$(), typeof
|
|
345
|
+
function U(b) {
|
|
346
|
+
return (...B) => {
|
|
347
|
+
$(), typeof b == "function" && b(...B);
|
|
339
348
|
};
|
|
340
349
|
}
|
|
341
|
-
function
|
|
342
|
-
return (
|
|
343
|
-
|
|
350
|
+
function A(b) {
|
|
351
|
+
return (B, M, O) => {
|
|
352
|
+
u(B, M, O), typeof b == "function" && b(B, M, O);
|
|
344
353
|
};
|
|
345
354
|
}
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
return
|
|
355
|
-
modelValue:
|
|
356
|
-
"onUpdate:modelValue": (
|
|
355
|
+
const L = Z(() => {
|
|
356
|
+
const b = i(a.value.type), B = s(a.value.type, a.value);
|
|
357
|
+
B.focusOnCreated = e.focusOnCreated, B.selectOnCreated = e.selectOnCreated;
|
|
358
|
+
const M = h(a.value.type), O = C(a.value.type);
|
|
359
|
+
O && (B[O] = U(B[O])), M && (B[M] = A(B[M]));
|
|
360
|
+
const S = d(a.value.type);
|
|
361
|
+
B[S] = w;
|
|
362
|
+
const K = g(a.value.type);
|
|
363
|
+
return B[K] = x, B.id = n.value, () => F(b, ce(B, {
|
|
364
|
+
modelValue: o.value,
|
|
365
|
+
"onUpdate:modelValue": (R) => o.value = R
|
|
357
366
|
}), null);
|
|
358
367
|
});
|
|
359
|
-
return
|
|
360
|
-
|
|
361
|
-
}), () =>
|
|
368
|
+
return oe([() => e.id, () => e.editor, () => e.modelValue], ([b, B, M]) => {
|
|
369
|
+
n.value = b, a.value = B, o.value = M;
|
|
370
|
+
}), () => L.value();
|
|
362
371
|
}
|
|
363
|
-
}),
|
|
372
|
+
}), dn = {
|
|
364
373
|
/**
|
|
365
374
|
* 显示的错误信息
|
|
366
375
|
*/
|
|
@@ -368,50 +377,50 @@ const Do = {
|
|
|
368
377
|
type: Object,
|
|
369
378
|
default: null
|
|
370
379
|
}
|
|
371
|
-
},
|
|
380
|
+
}, Re = /* @__PURE__ */ H({
|
|
372
381
|
name: "FValidationMessage",
|
|
373
|
-
props:
|
|
382
|
+
props: dn,
|
|
374
383
|
emits: [],
|
|
375
|
-
setup(e,
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
384
|
+
setup(e, t) {
|
|
385
|
+
const n = V(e.errors);
|
|
386
|
+
oe(() => e.errors, (s) => {
|
|
387
|
+
n.value = s;
|
|
379
388
|
});
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
382
|
-
const
|
|
383
|
-
var
|
|
384
|
-
return (
|
|
389
|
+
const a = V(!0), o = Z(() => {
|
|
390
|
+
if (n.value) {
|
|
391
|
+
const s = Object.keys(n.value).map((i) => {
|
|
392
|
+
var h;
|
|
393
|
+
return (h = n.value[i]) == null ? void 0 : h.name;
|
|
385
394
|
});
|
|
386
|
-
return
|
|
395
|
+
return s.length ? s.join(" ") : "";
|
|
387
396
|
}
|
|
388
397
|
return "";
|
|
389
398
|
});
|
|
390
|
-
return () =>
|
|
399
|
+
return () => o.value && F("div", {
|
|
391
400
|
class: "farris-feedback f-state-invalid",
|
|
392
|
-
onClick: () =>
|
|
393
|
-
}, [!
|
|
401
|
+
onClick: () => a.value = !a.value
|
|
402
|
+
}, [!a.value && F("span", {
|
|
394
403
|
class: "f-icon f-icon-message_warning f-feedback-icon"
|
|
395
|
-
}, null),
|
|
404
|
+
}, null), a.value && F("span", {
|
|
396
405
|
class: "f-feedback-message"
|
|
397
|
-
}, [
|
|
406
|
+
}, [o.value])]);
|
|
398
407
|
}
|
|
399
408
|
});
|
|
400
|
-
function
|
|
401
|
-
e["button-edit"] =
|
|
409
|
+
function pn(e, t) {
|
|
410
|
+
e["button-edit"] = Bo, e.calendar = xe, e["check-box"] = Eo, e["check-group"] = Lo, e["combo-list"] = ue, e["date-picker"] = $o, e["input-group"] = Uo, e.lookup = Ee, e["number-range"] = Ao, e["number-spinner"] = So, e.progress = Oo, e["radio-group"] = Zo, e.rate = Jo, e.switch = Xo, e["time-picker"] = Qo, e.textarea = Yo, e["language-textbox"] = Pe, t["button-edit"] = xo, t.calendar = _e, t["check-box"] = Po, t["check-group"] = No, t["combo-list"] = Mo, t["date-picker"] = Do, t["input-group"] = Ro, t.lookup = Ct, t["number-range"] = qo, t["number-spinner"] = Go, t.progress = jo, t["radio-group"] = Wo, t.rate = zo, t.switch = Ko, t["time-picker"] = _o, t.textarea = Ho, t["language-textbox"] = go;
|
|
402
411
|
}
|
|
403
|
-
function
|
|
404
|
-
const e = {},
|
|
405
|
-
|
|
406
|
-
function
|
|
407
|
-
return e[
|
|
408
|
-
}
|
|
409
|
-
function
|
|
410
|
-
const
|
|
411
|
-
return Object.assign(
|
|
412
|
-
}
|
|
413
|
-
function
|
|
414
|
-
switch (
|
|
412
|
+
function mn() {
|
|
413
|
+
const e = {}, t = {};
|
|
414
|
+
pn(e, t);
|
|
415
|
+
function n(d) {
|
|
416
|
+
return e[d || "input-group"];
|
|
417
|
+
}
|
|
418
|
+
function a(d, g) {
|
|
419
|
+
const C = t[d || "input-group"], u = Object.keys(C).reduce((w, x) => (w[x] = C[x].default, w), {});
|
|
420
|
+
return Object.assign(u, g);
|
|
421
|
+
}
|
|
422
|
+
function o(d) {
|
|
423
|
+
switch (d) {
|
|
415
424
|
case "check-box":
|
|
416
425
|
return "onChangeValue";
|
|
417
426
|
case "switch":
|
|
@@ -451,31 +460,31 @@ function qo() {
|
|
|
451
460
|
return "onChange";
|
|
452
461
|
}
|
|
453
462
|
}
|
|
454
|
-
function
|
|
455
|
-
switch (
|
|
463
|
+
function s(d) {
|
|
464
|
+
switch (d) {
|
|
456
465
|
case "combo-list":
|
|
457
466
|
case "input-group":
|
|
458
467
|
case "textarea":
|
|
459
468
|
return "onClear";
|
|
460
469
|
}
|
|
461
470
|
}
|
|
462
|
-
function
|
|
463
|
-
switch (
|
|
471
|
+
function i(d) {
|
|
472
|
+
switch (d) {
|
|
464
473
|
case "input-group":
|
|
465
474
|
case "textarea":
|
|
466
475
|
return "onMousedownEvent";
|
|
467
476
|
}
|
|
468
477
|
}
|
|
469
|
-
function
|
|
470
|
-
switch (
|
|
478
|
+
function h(d) {
|
|
479
|
+
switch (d) {
|
|
471
480
|
case "input-group":
|
|
472
481
|
case "textarea":
|
|
473
482
|
return "onMouseupEvent";
|
|
474
483
|
}
|
|
475
484
|
}
|
|
476
|
-
return { resolveEditorProps:
|
|
485
|
+
return { resolveEditorProps: a, resolveEditorType: n, getChangeFunctionName: o, getClearFunctionName: s, getMousedownFunctionName: i, getMouseupFunctionName: h };
|
|
477
486
|
}
|
|
478
|
-
const
|
|
487
|
+
const pe = {
|
|
479
488
|
id: { type: String, default: "" },
|
|
480
489
|
customClass: { type: String, default: "" },
|
|
481
490
|
customStyle: { type: String, default: "" },
|
|
@@ -496,557 +505,1689 @@ const Ce = {
|
|
|
496
505
|
componentId: { type: String, default: "" },
|
|
497
506
|
errors: { type: Object, default: null },
|
|
498
507
|
fill: { type: Boolean, default: !1 }
|
|
499
|
-
},
|
|
508
|
+
}, Ve = /* @__PURE__ */ H({
|
|
500
509
|
name: "FFormControl",
|
|
501
|
-
props:
|
|
510
|
+
props: pe,
|
|
502
511
|
emits: ["change", "update:modelValue"],
|
|
503
|
-
setup(e,
|
|
504
|
-
var
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const
|
|
512
|
+
setup(e, t) {
|
|
513
|
+
var K;
|
|
514
|
+
const n = V(e.id), a = V(e.customClass), o = V(e.editor), s = V(e.label), i = V(e.modelValue), h = V(e.readonly), d = V(((K = e.editor) == null ? void 0 : K.required) || e.required), g = V(e.showLabel), C = V(e.visible);
|
|
515
|
+
V(e.type);
|
|
516
|
+
const u = V(), w = V(e.errors), x = Z(() => g.value ? e.showLabelType : "none"), {
|
|
508
517
|
resolveEditorProps: $,
|
|
509
|
-
resolveEditorType:
|
|
510
|
-
getChangeFunctionName:
|
|
511
|
-
getClearFunctionName:
|
|
512
|
-
} =
|
|
518
|
+
resolveEditorType: U,
|
|
519
|
+
getChangeFunctionName: A,
|
|
520
|
+
getClearFunctionName: L
|
|
521
|
+
} = mn(), b = Z(() => ({
|
|
513
522
|
"form-group": !0,
|
|
514
523
|
"farris-form-group": !0,
|
|
515
524
|
"common-group": !0,
|
|
516
|
-
"q-state-readonly":
|
|
525
|
+
"q-state-readonly": h.value
|
|
517
526
|
}));
|
|
518
|
-
function
|
|
519
|
-
|
|
520
|
-
newValue:
|
|
521
|
-
newModelValue:
|
|
522
|
-
parameters:
|
|
527
|
+
function B(R, J, j) {
|
|
528
|
+
i.value = J !== void 0 ? J : R, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
|
|
529
|
+
newValue: R,
|
|
530
|
+
newModelValue: J,
|
|
531
|
+
parameters: j
|
|
523
532
|
});
|
|
524
533
|
}
|
|
525
|
-
function
|
|
526
|
-
|
|
534
|
+
function M() {
|
|
535
|
+
t.emit("update:modelValue", "");
|
|
527
536
|
}
|
|
528
|
-
const
|
|
529
|
-
const
|
|
530
|
-
return
|
|
531
|
-
ref:
|
|
532
|
-
},
|
|
533
|
-
modelValue:
|
|
534
|
-
"onUpdate:modelValue": (
|
|
535
|
-
}),
|
|
537
|
+
const O = Z(() => {
|
|
538
|
+
const R = o.value.type || "input-group", J = U(R), j = $(R, o.value), Q = A(R), _ = L(o.value.type);
|
|
539
|
+
return _ && (j[_] = M), j[Q] = B, (j.id == null || j.id === "") && (j.id = n.value), R === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (j.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (j.onEndValueChange = o.value.onEndValueChange)) : R === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" && (j["onUpdate:idValue"] = o.value["onUpdate:idValue"], j.id = n.value), () => F(J, ce({
|
|
540
|
+
ref: u
|
|
541
|
+
}, j, {
|
|
542
|
+
modelValue: i.value,
|
|
543
|
+
"onUpdate:modelValue": (D) => i.value = D
|
|
544
|
+
}), t.slots);
|
|
536
545
|
});
|
|
537
|
-
function
|
|
538
|
-
return
|
|
539
|
-
id: `${
|
|
540
|
-
errors:
|
|
546
|
+
function S() {
|
|
547
|
+
return F(Re, {
|
|
548
|
+
id: `${n.value}-validation-message`,
|
|
549
|
+
errors: w.value
|
|
541
550
|
}, null);
|
|
542
551
|
}
|
|
543
|
-
return
|
|
544
|
-
var
|
|
545
|
-
|
|
546
|
-
}),
|
|
547
|
-
editorRef:
|
|
548
|
-
}), () =>
|
|
549
|
-
id: `${
|
|
550
|
-
class:
|
|
552
|
+
return oe([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([R, J, j, Q, _, D, W, r, c, v]) => {
|
|
553
|
+
var T;
|
|
554
|
+
n.value = R, a.value = J, o.value = j, s.value = Q, i.value = _, h.value = D, d.value = ((T = o.value) == null ? void 0 : T.required) || W, g.value = r, C.value = c, w.value = v;
|
|
555
|
+
}), t.expose({
|
|
556
|
+
editorRef: u
|
|
557
|
+
}), () => C.value && F("div", {
|
|
558
|
+
id: `${n.value}-input-group`,
|
|
559
|
+
class: a.value,
|
|
551
560
|
style: e.customStyle
|
|
552
|
-
}, [
|
|
561
|
+
}, [F("div", {
|
|
553
562
|
class: "farris-group-wrap"
|
|
554
|
-
}, [
|
|
555
|
-
class:
|
|
556
|
-
}, [
|
|
557
|
-
id: `${
|
|
558
|
-
showType:
|
|
559
|
-
required:
|
|
560
|
-
text:
|
|
561
|
-
title:
|
|
562
|
-
}, null),
|
|
563
|
+
}, [F("div", {
|
|
564
|
+
class: b.value
|
|
565
|
+
}, [F($e, {
|
|
566
|
+
id: `${n.value}-lable`,
|
|
567
|
+
showType: x.value,
|
|
568
|
+
required: d.value,
|
|
569
|
+
text: s.value,
|
|
570
|
+
title: s.value
|
|
571
|
+
}, null), F("div", {
|
|
563
572
|
class: "farris-input-wrap"
|
|
564
|
-
}, [
|
|
573
|
+
}, [O.value(), S()])])])]);
|
|
565
574
|
}
|
|
566
|
-
}),
|
|
575
|
+
}), fn = /* @__PURE__ */ H({
|
|
567
576
|
name: "FDynamicFormGroup",
|
|
568
|
-
props:
|
|
577
|
+
props: pe,
|
|
569
578
|
emits: ["change", "update:modelValue"],
|
|
570
|
-
setup(e,
|
|
571
|
-
var
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
resolveEditorProps:
|
|
576
|
-
resolveEditorType:
|
|
577
|
-
getChangeFunctionName:
|
|
578
|
-
getClearFunctionName:
|
|
579
|
-
} =
|
|
580
|
-
const
|
|
579
|
+
setup(e, t) {
|
|
580
|
+
var _;
|
|
581
|
+
const n = V(e.id), a = V(e.customClass), o = V(e.editor), s = V(e.label), i = V(e.modelValue), h = V(e.readonly), d = V(((_ = e.editor) == null ? void 0 : _.required) || e.required), g = V(e.showLabel), C = V(e.visible);
|
|
582
|
+
V(e.type);
|
|
583
|
+
const u = V(), w = V(e.errors), x = ko(), $ = V(e.editor.type || "input-group"), U = Z(() => g.value ? e.showLabelType : "none"), {
|
|
584
|
+
resolveEditorProps: A,
|
|
585
|
+
resolveEditorType: L,
|
|
586
|
+
getChangeFunctionName: b,
|
|
587
|
+
getClearFunctionName: B
|
|
588
|
+
} = De(), M = Z(() => {
|
|
589
|
+
const D = {
|
|
581
590
|
"form-group": !0,
|
|
582
591
|
"farris-form-group": !0,
|
|
583
592
|
"common-group": !0,
|
|
584
|
-
"q-state-readonly":
|
|
585
|
-
"form-group--in-mobile":
|
|
593
|
+
"q-state-readonly": h.value,
|
|
594
|
+
"form-group--in-mobile": x
|
|
586
595
|
};
|
|
587
|
-
return
|
|
588
|
-
}),
|
|
596
|
+
return D["form-group--has-" + $.value] = !0, D;
|
|
597
|
+
}), O = Z(() => {
|
|
589
598
|
if (e.fill)
|
|
590
599
|
return {
|
|
591
600
|
maxWidth: "none"
|
|
592
601
|
};
|
|
593
602
|
});
|
|
594
|
-
function D
|
|
595
|
-
|
|
596
|
-
newValue:
|
|
597
|
-
newModelValue:
|
|
598
|
-
parameters:
|
|
603
|
+
function S(D, W, r) {
|
|
604
|
+
i.value = W !== void 0 ? W : D, t.emit("update:modelValue", i.value), t.emit("change", i.value, {
|
|
605
|
+
newValue: D,
|
|
606
|
+
newModelValue: W,
|
|
607
|
+
parameters: r
|
|
599
608
|
});
|
|
600
609
|
}
|
|
601
|
-
function
|
|
602
|
-
|
|
610
|
+
function K() {
|
|
611
|
+
t.emit("update:modelValue", "");
|
|
603
612
|
}
|
|
604
|
-
function
|
|
605
|
-
return (...
|
|
606
|
-
|
|
613
|
+
function R(D) {
|
|
614
|
+
return (...W) => {
|
|
615
|
+
K(), typeof D == "function" && D(...W);
|
|
607
616
|
};
|
|
608
617
|
}
|
|
609
|
-
function
|
|
610
|
-
return (
|
|
611
|
-
|
|
618
|
+
function J(D) {
|
|
619
|
+
return (W, r, c) => {
|
|
620
|
+
S(W, r, c), typeof D == "function" && D(W, r, c);
|
|
612
621
|
};
|
|
613
622
|
}
|
|
614
|
-
const
|
|
615
|
-
const
|
|
616
|
-
return
|
|
617
|
-
ref:
|
|
618
|
-
},
|
|
619
|
-
modelValue:
|
|
620
|
-
"onUpdate:modelValue": (
|
|
621
|
-
}),
|
|
623
|
+
const j = Z(() => {
|
|
624
|
+
const D = o.value.type || "input-group", W = L(D), r = A(D, o.value), c = b(D), v = B(o.value.type);
|
|
625
|
+
return v && (r[v] = R(r[v])), c && (r[c] = J(r[c])), (r.id == null || r.id === "") && (r.id = n.value), D === "number-range" && o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" ? (o.value.onBeginValueChange && typeof o.value.onBeginValueChange == "function" && (r.onBeginValueChange = o.value.onBeginValueChange), o.value.onEndValueChange && typeof o.value.onEndValueChange == "function" && (r.onEndValueChange = o.value.onEndValueChange)) : D === "lookup" && o.value["onUpdate:idValue"] && typeof o.value["onUpdate:idValue"] == "function" ? (r["onUpdate:idValue"] = o.value["onUpdate:idValue"], r.id = n.value) : D === "collection-property-editor" && o.value.onSelectionChange && typeof o.value.onSelectionChange == "function" ? r.onSelectionChange = o.value.onSelectionChange : D === "property-editor" && (r.onBeforeOpenVariables = o.value.onBeforeOpenVariables), () => F(W, ce({
|
|
626
|
+
ref: u
|
|
627
|
+
}, r, {
|
|
628
|
+
modelValue: i.value,
|
|
629
|
+
"onUpdate:modelValue": (T) => i.value = T
|
|
630
|
+
}), t.slots);
|
|
622
631
|
});
|
|
623
|
-
function
|
|
624
|
-
return
|
|
625
|
-
id: `${
|
|
626
|
-
errors:
|
|
632
|
+
function Q() {
|
|
633
|
+
return F(Re, {
|
|
634
|
+
id: `${n.value}-validation-message`,
|
|
635
|
+
errors: w.value
|
|
627
636
|
}, null);
|
|
628
637
|
}
|
|
629
|
-
return
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
}),
|
|
633
|
-
editorRef:
|
|
634
|
-
}), () =>
|
|
635
|
-
id: `${
|
|
636
|
-
class:
|
|
638
|
+
return oe([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([D, W, r, c, v, T, E, P, N, I]) => {
|
|
639
|
+
var k;
|
|
640
|
+
n.value = D, a.value = W, o.value = r, s.value = c, i.value = v, h.value = T, d.value = ((k = o.value) == null ? void 0 : k.required) || E, g.value = P, C.value = N, w.value = I;
|
|
641
|
+
}), t.expose({
|
|
642
|
+
editorRef: u
|
|
643
|
+
}), () => C.value && F("div", {
|
|
644
|
+
id: `${n.value}-form-group`,
|
|
645
|
+
class: a.value,
|
|
637
646
|
style: e.customStyle
|
|
638
|
-
}, [
|
|
647
|
+
}, [F("div", {
|
|
639
648
|
class: "farris-group-wrap",
|
|
640
|
-
style:
|
|
641
|
-
}, [
|
|
642
|
-
class:
|
|
643
|
-
}, [
|
|
644
|
-
id: `${
|
|
645
|
-
showType:
|
|
646
|
-
required:
|
|
647
|
-
text:
|
|
648
|
-
title:
|
|
649
|
-
}, null),
|
|
649
|
+
style: O.value
|
|
650
|
+
}, [F("div", {
|
|
651
|
+
class: M.value
|
|
652
|
+
}, [F($e, {
|
|
653
|
+
id: `${n.value}-lable`,
|
|
654
|
+
showType: U.value,
|
|
655
|
+
required: d.value,
|
|
656
|
+
text: s.value,
|
|
657
|
+
title: s.value
|
|
658
|
+
}, null), F("div", {
|
|
650
659
|
class: "farris-input-wrap"
|
|
651
|
-
}, [
|
|
660
|
+
}, [j.value(), Q()])])])]);
|
|
652
661
|
}
|
|
653
662
|
});
|
|
654
|
-
function
|
|
655
|
-
function
|
|
656
|
-
if (
|
|
657
|
-
return
|
|
658
|
-
const
|
|
659
|
-
return e.selectNode(
|
|
663
|
+
function gn(e, t) {
|
|
664
|
+
function n(d, g = null) {
|
|
665
|
+
if (g)
|
|
666
|
+
return g;
|
|
667
|
+
const C = e.getComponentById(t);
|
|
668
|
+
return e.selectNode(C, (u) => u.id === d);
|
|
660
669
|
}
|
|
661
|
-
function
|
|
662
|
-
const
|
|
663
|
-
return !(!
|
|
670
|
+
function a(d) {
|
|
671
|
+
const g = e.getComponentById(d);
|
|
672
|
+
return !(!g || !g.componentType || !g.componentType.startsWith("form"));
|
|
664
673
|
}
|
|
665
|
-
function
|
|
666
|
-
const
|
|
667
|
-
return Array.from(
|
|
674
|
+
function o(d) {
|
|
675
|
+
const g = new Set(d);
|
|
676
|
+
return Array.from(g).length === 1;
|
|
668
677
|
}
|
|
669
|
-
function
|
|
670
|
-
const
|
|
671
|
-
|
|
672
|
-
const
|
|
678
|
+
function s(d) {
|
|
679
|
+
const g = n(d.id), C = Dt(e), u = [];
|
|
680
|
+
C.getResonseFormLayoutConfig(g, u, 1);
|
|
681
|
+
const w = u.map((M) => M.columnInSM), x = u.map((M) => M.columnInMD), $ = u.map((M) => M.columnInLG), U = u.map((M) => M.columnInEL), A = o(w) ? w[0] : 0, L = o(x) ? x[0] : 0, b = o($) ? $[0] : 0, B = o(U) ? U[0] : 0;
|
|
673
682
|
return {
|
|
674
|
-
uniqueColClassInSM:
|
|
675
|
-
uniqueColClassInMD:
|
|
676
|
-
uniqueColClassInLG:
|
|
677
|
-
uniqueColClassInEL:
|
|
683
|
+
uniqueColClassInSM: A,
|
|
684
|
+
uniqueColClassInMD: L,
|
|
685
|
+
uniqueColClassInLG: b,
|
|
686
|
+
uniqueColClassInEL: B
|
|
678
687
|
};
|
|
679
688
|
}
|
|
680
|
-
function
|
|
681
|
-
let
|
|
682
|
-
if (
|
|
683
|
-
const
|
|
684
|
-
|
|
689
|
+
function i(d, g) {
|
|
690
|
+
let C, u, w, x, $ = [];
|
|
691
|
+
if (d) {
|
|
692
|
+
const M = d.split(" "), O = M.filter((S) => S.startsWith("col-"));
|
|
693
|
+
C = O.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), u = O.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), w = O.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), x = O.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S)), $ = M.filter((S) => !S.startsWith("col-"));
|
|
685
694
|
}
|
|
686
|
-
const
|
|
687
|
-
return [
|
|
695
|
+
const U = g.uniqueColClassInSM ? "col-" + g.uniqueColClassInSM : C, A = g.uniqueColClassInMD ? "col-md-" + g.uniqueColClassInMD : u, L = g.uniqueColClassInLG ? "col-xl-" + g.uniqueColClassInLG : w, b = g.uniqueColClassInEL ? "col-el-" + g.uniqueColClassInEL : x;
|
|
696
|
+
return [U, A, L, b].concat($).join(" ");
|
|
688
697
|
}
|
|
689
|
-
function
|
|
690
|
-
|
|
691
|
-
if (
|
|
692
|
-
|
|
698
|
+
function h(d, g, C) {
|
|
699
|
+
d = n(C, d), d.contents.forEach((u) => {
|
|
700
|
+
if (u.type === l.fieldset.type) {
|
|
701
|
+
h(u, g, u.id);
|
|
693
702
|
return;
|
|
694
703
|
}
|
|
695
|
-
|
|
696
|
-
const
|
|
697
|
-
|
|
704
|
+
u.appearance || (u.appearance = {});
|
|
705
|
+
const w = u.appearance.class;
|
|
706
|
+
u.appearance.class = i(w, g);
|
|
698
707
|
});
|
|
699
708
|
}
|
|
700
|
-
return { checkIsInFormComponent:
|
|
709
|
+
return { checkIsInFormComponent: a, assembleUnifiedLayoutContext: s, changeFormControlsByUnifiedLayoutConfig: h };
|
|
701
710
|
}
|
|
702
|
-
class
|
|
703
|
-
constructor(
|
|
704
|
-
super(
|
|
705
|
-
}
|
|
706
|
-
getPropertyConfig(
|
|
707
|
-
const
|
|
708
|
-
this.propertyConfig.categories.basic = this.getBasicPropConfig(
|
|
709
|
-
const { checkIsInFormComponent:
|
|
710
|
-
return
|
|
711
|
+
class yn extends nn {
|
|
712
|
+
constructor(t, n) {
|
|
713
|
+
super(t, n);
|
|
714
|
+
}
|
|
715
|
+
getPropertyConfig(t, n) {
|
|
716
|
+
const a = this;
|
|
717
|
+
this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
|
|
718
|
+
const { checkIsInFormComponent: o, assembleUnifiedLayoutContext: s, changeFormControlsByUnifiedLayoutConfig: i } = gn(this.formSchemaUtils, this.componentId), h = this.getAppearanceConfig(t), d = o(this.componentId);
|
|
719
|
+
return h.properties.adaptForLanguage = {
|
|
711
720
|
title: "控件布局响应国际化",
|
|
712
721
|
description: "启用国际化后:简体中文、繁体中文环境下控件标签与输入框在一行展示,其他语言环境下控件标签与输入框上下排列。",
|
|
713
|
-
visible:
|
|
722
|
+
visible: d,
|
|
714
723
|
type: "boolean"
|
|
715
|
-
},
|
|
724
|
+
}, h.properties.labelAutoOverflow = {
|
|
716
725
|
title: "控件标签换行",
|
|
717
726
|
description: "控件标签字数超长时,换行显示。控件标签与输入框在一行展示时,此属性有效。",
|
|
718
|
-
visible:
|
|
727
|
+
visible: d,
|
|
719
728
|
type: "boolean"
|
|
720
|
-
},
|
|
729
|
+
}, h.properties.unifiedLayout = {
|
|
721
730
|
title: "统一布局配置",
|
|
722
731
|
description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
|
|
723
|
-
visible:
|
|
732
|
+
visible: d,
|
|
724
733
|
refreshPanelAfterChanged: !0,
|
|
725
734
|
editor: {
|
|
726
735
|
type: "response-form-layout-setting",
|
|
727
|
-
initialState:
|
|
736
|
+
initialState: s(t)
|
|
728
737
|
}
|
|
729
|
-
},
|
|
730
|
-
if (
|
|
731
|
-
switch (
|
|
738
|
+
}, h.setPropertyRelates = function(g, C) {
|
|
739
|
+
if (g)
|
|
740
|
+
switch (g && g.propertyID) {
|
|
732
741
|
case "unifiedLayout": {
|
|
733
|
-
|
|
742
|
+
i(null, g.propertyValue, t.id), a.updateElementByParentContainer(t.id, n);
|
|
734
743
|
break;
|
|
735
744
|
}
|
|
736
745
|
case "labelAutoOverflow": {
|
|
737
|
-
|
|
746
|
+
a.setLabelAutoOverflow(t, g.propertyValue), en();
|
|
738
747
|
break;
|
|
739
748
|
}
|
|
740
749
|
}
|
|
741
|
-
}, this.propertyConfig.categories.appearance =
|
|
750
|
+
}, this.propertyConfig.categories.appearance = h, this.propertyConfig.categories.behavior = this.getBehaviorConfig(t), this.propertyConfig;
|
|
742
751
|
}
|
|
743
|
-
setLabelAutoOverflow(
|
|
744
|
-
if (!
|
|
745
|
-
const
|
|
746
|
-
|
|
752
|
+
setLabelAutoOverflow(t, n, a) {
|
|
753
|
+
if (!a) {
|
|
754
|
+
const o = this.formSchemaUtils.getComponentById(this.componentId);
|
|
755
|
+
a = this.formSchemaUtils.selectNode(o, (s) => s.id === t.id);
|
|
747
756
|
}
|
|
748
|
-
|
|
749
|
-
if (
|
|
750
|
-
this.setLabelAutoOverflow(null,
|
|
757
|
+
a && a.contents && a.contents.length && a.contents.forEach((o) => {
|
|
758
|
+
if (o.type === l.fieldset.type) {
|
|
759
|
+
this.setLabelAutoOverflow(null, n, o);
|
|
751
760
|
return;
|
|
752
761
|
}
|
|
753
|
-
|
|
762
|
+
o.appearance || (o.appearance = {
|
|
754
763
|
class: ""
|
|
755
|
-
}),
|
|
764
|
+
}), o.appearance.class || (o.appearance.class = ""), n ? o.appearance.class.includes("farris-group-multi-label") || (o.appearance.class = o.appearance.class + " farris-group-multi-label") : o.appearance.class = o.appearance.class.replace("farris-group-multi-label", "").trim();
|
|
756
765
|
});
|
|
757
766
|
}
|
|
758
767
|
}
|
|
759
|
-
function
|
|
760
|
-
const
|
|
761
|
-
function
|
|
762
|
-
const { sourceElement:
|
|
763
|
-
if (!
|
|
768
|
+
function hn(e, t) {
|
|
769
|
+
const n = e.schema, a = new tn(), { canMove: o, canAccept: s, canDelete: i } = a.getTemplateRule(e, t);
|
|
770
|
+
function h(r, c) {
|
|
771
|
+
const { sourceElement: v } = r, { componentInstance: T } = v, E = t == null ? void 0 : t.formSchemaUtils;
|
|
772
|
+
if (!E)
|
|
764
773
|
return !0;
|
|
765
|
-
const
|
|
766
|
-
return
|
|
774
|
+
const P = E.getComponentById(T.value.belongedComponentId), N = E.getViewModelById(P.viewModel), I = E.getComponentById(e.componentInstance.value.belongedComponentId), k = E.getViewModelById(I.viewModel);
|
|
775
|
+
return c ? N != null && N.id && (k != null && k.id) && N.id !== k.id ? N.bindTo === k.bindTo : !0 : (N == null ? void 0 : N.id) === (k == null ? void 0 : k.id);
|
|
767
776
|
}
|
|
768
|
-
function
|
|
769
|
-
const { bindingTargetId:
|
|
770
|
-
if (!
|
|
777
|
+
function d(r) {
|
|
778
|
+
const { bindingTargetId: c } = r;
|
|
779
|
+
if (!t)
|
|
771
780
|
return;
|
|
772
|
-
const { formSchemaUtils:
|
|
773
|
-
return !!(
|
|
781
|
+
const { formSchemaUtils: v, schemaService: T } = t, E = v.getComponentById(e.componentInstance.value.belongedComponentId), P = T.getFieldByIDAndVMID(c, E.viewModel);
|
|
782
|
+
return !!(P != null && P.schemaField);
|
|
774
783
|
}
|
|
775
|
-
function
|
|
776
|
-
const
|
|
777
|
-
if (
|
|
778
|
-
if (
|
|
784
|
+
function g(r) {
|
|
785
|
+
const c = a.getComponentContext(e);
|
|
786
|
+
if (c && c.componentClassList && c.componentClassList.includes("f-form-layout") && c.componentClassList.includes("farris-form")) {
|
|
787
|
+
if (r.sourceType === "control" && (r.componentCategory === "input" || r.componentType === "fieldset"))
|
|
779
788
|
return !0;
|
|
780
|
-
if (
|
|
781
|
-
if (
|
|
782
|
-
return
|
|
783
|
-
if (
|
|
784
|
-
return
|
|
789
|
+
if (r.sourceType === "move") {
|
|
790
|
+
if (r.componentType === "form-group")
|
|
791
|
+
return h(r, !0);
|
|
792
|
+
if (r.componentType === "fieldset")
|
|
793
|
+
return h(r, !1);
|
|
785
794
|
}
|
|
786
|
-
return
|
|
795
|
+
return r.sourceType === "field" && r.componentCategory === "input" ? d(r) : !1;
|
|
787
796
|
}
|
|
788
797
|
return !0;
|
|
789
798
|
}
|
|
790
|
-
function
|
|
791
|
-
return !(!
|
|
792
|
-
}
|
|
793
|
-
function
|
|
794
|
-
var
|
|
795
|
-
const
|
|
796
|
-
if (
|
|
797
|
-
const
|
|
798
|
-
switch (
|
|
799
|
-
case
|
|
800
|
-
|
|
799
|
+
function C(r) {
|
|
800
|
+
return !(!on().basalDragulaRuleForContainer(r, t) || !s || !g(r));
|
|
801
|
+
}
|
|
802
|
+
function u(r) {
|
|
803
|
+
var k;
|
|
804
|
+
const c = r.componentInstance, v = c.value.schema, T = t == null ? void 0 : t.formSchemaUtils, E = t == null ? void 0 : t.designViewModelUtils, P = T.getViewModelIdByComponentId(c.value.belongedComponentId), N = E.getDgViewModel(P), I = c.value.parent;
|
|
805
|
+
if (I && l.fieldset && ((k = I.schema) == null ? void 0 : k.type) === l.fieldset.type && N) {
|
|
806
|
+
const q = { groupId: null, groupName: null };
|
|
807
|
+
switch (v.binding.type) {
|
|
808
|
+
case ae.Form: {
|
|
809
|
+
N.changeField(v.binding.field, q);
|
|
801
810
|
break;
|
|
802
811
|
}
|
|
803
|
-
case
|
|
804
|
-
|
|
812
|
+
case ae.Variable: {
|
|
813
|
+
T.modifyViewModelFieldById(P, v.binding.field, q, !0);
|
|
805
814
|
break;
|
|
806
815
|
}
|
|
807
816
|
}
|
|
808
817
|
}
|
|
809
818
|
}
|
|
810
|
-
function
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
const
|
|
814
|
-
|
|
819
|
+
function w(r, c, v) {
|
|
820
|
+
const T = c.fields.find((k) => k.id === r), E = t == null ? void 0 : t.designViewModelUtils, P = E.getDgViewModel(c.id), N = P.fields.find((k) => k.id === r);
|
|
821
|
+
P.removeField([r]);
|
|
822
|
+
const I = E.getDgViewModel(v);
|
|
823
|
+
I.addField(N), T.fieldSchema && I.changeField(N.id, T.fieldSchema);
|
|
815
824
|
}
|
|
816
|
-
function
|
|
817
|
-
const
|
|
818
|
-
if (
|
|
819
|
-
|
|
825
|
+
function x(r, c, v, T = []) {
|
|
826
|
+
const E = c.id, P = r.binding.field, N = c.fields.findIndex((k) => k.id === P);
|
|
827
|
+
if (N > -1 && (v.fields.push(c.fields[N]), c.fields.splice(N, 1)), E === "root-viewmodel" && v.id !== "root-viewmodel") {
|
|
828
|
+
r.binding.path && !r.binding.path.includes("root-component.") && (r.binding.path = "root-component." + r.binding.path);
|
|
820
829
|
return;
|
|
821
830
|
}
|
|
822
|
-
if (
|
|
823
|
-
|
|
831
|
+
if (v.id === "root-viewmodel" && E !== "root-viewmodel" && r.binding.path && r.binding.path.includes("root-component.")) {
|
|
832
|
+
r.binding.path = r.binding.path.replace("root-component.", "");
|
|
824
833
|
return;
|
|
825
834
|
}
|
|
826
|
-
const
|
|
827
|
-
|
|
835
|
+
const I = c.states.find((k) => k.id === P);
|
|
836
|
+
I && (v.states = v.states ? v.states : [], v.states.findIndex((k) => k.id === I.id) < 0 && (v.states.push(I), T.push(I.id)));
|
|
828
837
|
}
|
|
829
|
-
function $(
|
|
830
|
-
var
|
|
831
|
-
if (!
|
|
838
|
+
function $(r, c, v, T = []) {
|
|
839
|
+
var N;
|
|
840
|
+
if (!r)
|
|
832
841
|
return;
|
|
833
|
-
const
|
|
834
|
-
Object.keys(
|
|
835
|
-
if (
|
|
842
|
+
const E = c.id === "root-viewmodel" && v.id !== "root-viewmodel", P = v.id === "root-viewmodel" && c.id !== "root-viewmodel";
|
|
843
|
+
Object.keys(r).forEach((I) => {
|
|
844
|
+
if (I === "binding")
|
|
836
845
|
return;
|
|
837
|
-
const
|
|
838
|
-
if (
|
|
839
|
-
if (
|
|
840
|
-
|
|
846
|
+
const k = r[I];
|
|
847
|
+
if (k && typeof k == "object" && k.type === ae.Variable && k.field) {
|
|
848
|
+
if (E) {
|
|
849
|
+
k.path && !k.path.includes("root-component.") && (k.path = "root-component." + k.path);
|
|
841
850
|
return;
|
|
842
851
|
}
|
|
843
|
-
if (
|
|
844
|
-
|
|
852
|
+
if (P && k.path && k.path.includes("root-component.")) {
|
|
853
|
+
k.path = k.path.replace("root-component.", "");
|
|
845
854
|
return;
|
|
846
855
|
}
|
|
847
|
-
const
|
|
848
|
-
if (
|
|
849
|
-
|
|
850
|
-
const
|
|
851
|
-
if (
|
|
852
|
-
|
|
856
|
+
const q = c.states.find((G) => G.id === k.field);
|
|
857
|
+
if (q) {
|
|
858
|
+
T.push(q.id), v.states = v.states ? v.states : [];
|
|
859
|
+
const G = v.states.find((ne) => ne.code === q.code);
|
|
860
|
+
if (G)
|
|
861
|
+
k.field = G.id;
|
|
853
862
|
else {
|
|
854
|
-
const
|
|
855
|
-
|
|
863
|
+
const ne = Object.assign({}, { newId: Fe().guid() }, q);
|
|
864
|
+
v.states.push(ne), k.field = ne.newId;
|
|
856
865
|
}
|
|
857
866
|
}
|
|
858
867
|
}
|
|
859
|
-
}), (
|
|
860
|
-
|
|
868
|
+
}), (N = v.states) != null && N.length && v.states.map((I) => {
|
|
869
|
+
I.newId && (I.id = I.newId, delete I.newId);
|
|
861
870
|
});
|
|
862
871
|
}
|
|
863
|
-
function
|
|
864
|
-
if (
|
|
865
|
-
for (const
|
|
866
|
-
|
|
872
|
+
function U(r, c, v) {
|
|
873
|
+
if (r && (c(r, v), r.contents))
|
|
874
|
+
for (const T of r.contents)
|
|
875
|
+
U(T, c, v);
|
|
867
876
|
}
|
|
868
|
-
function
|
|
869
|
-
if (!
|
|
877
|
+
function A(r = [], c) {
|
|
878
|
+
if (!r.length)
|
|
870
879
|
return;
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
const
|
|
874
|
-
|
|
875
|
-
}),
|
|
880
|
+
const v = t == null ? void 0 : t.formSchemaUtils, T = v.getComponentByViewModelId(c), E = [], P = (I, k) => {
|
|
881
|
+
I && (Object.keys(I).forEach((q) => {
|
|
882
|
+
const G = I[q];
|
|
883
|
+
G && typeof G == "object" && G.type === ae.Variable && r.includes(G.field) && !k.includes(G.field) && k.push(G.field);
|
|
884
|
+
}), I.editor && P(I.editor, k));
|
|
876
885
|
};
|
|
877
|
-
|
|
878
|
-
const
|
|
879
|
-
|
|
880
|
-
|
|
886
|
+
U(T, P, E);
|
|
887
|
+
const N = v.getViewModelById(c);
|
|
888
|
+
r.forEach((I) => {
|
|
889
|
+
E.includes(I) || (N.states = N.states.filter((k) => k.id !== I));
|
|
881
890
|
});
|
|
882
891
|
}
|
|
883
|
-
function
|
|
884
|
-
const
|
|
885
|
-
id:
|
|
886
|
-
code:
|
|
887
|
-
name:
|
|
888
|
-
}),
|
|
889
|
-
return
|
|
890
|
-
host:
|
|
891
|
-
handler:
|
|
892
|
-
}),
|
|
893
|
-
}
|
|
894
|
-
function
|
|
895
|
-
var
|
|
896
|
-
const
|
|
897
|
-
if (!
|
|
892
|
+
function L(r) {
|
|
893
|
+
const c = Fe().guid(), v = Object.assign({}, r, {
|
|
894
|
+
id: c,
|
|
895
|
+
code: r.code + c.slice(0, 4),
|
|
896
|
+
name: r.name + c.slice(0, 4)
|
|
897
|
+
}), P = (t == null ? void 0 : t.formSchemaUtils).getCommands().find((N) => N.id === r.cmpId);
|
|
898
|
+
return P && P.refedHandlers.push({
|
|
899
|
+
host: c,
|
|
900
|
+
handler: r.handlerName
|
|
901
|
+
}), v;
|
|
902
|
+
}
|
|
903
|
+
function b(r, c, v) {
|
|
904
|
+
var q, G, ne;
|
|
905
|
+
const T = {}, E = r.type === "form-group" && r.editor ? r.editor.type : r.type, P = (q = Le[E]) == null ? void 0 : q.events;
|
|
906
|
+
if (!P)
|
|
898
907
|
return;
|
|
899
|
-
Object.keys(
|
|
900
|
-
const
|
|
901
|
-
if (
|
|
902
|
-
const
|
|
903
|
-
if (
|
|
904
|
-
let
|
|
905
|
-
|
|
908
|
+
Object.keys(r).forEach((re) => {
|
|
909
|
+
const Y = Object.keys(P).find((X) => X === re);
|
|
910
|
+
if (Y && r[Y]) {
|
|
911
|
+
const X = c.commands.find((z) => z.code === r[Y]);
|
|
912
|
+
if (X) {
|
|
913
|
+
let z = T[X.code];
|
|
914
|
+
z || (z = L(X), T[X.code] = z, v.commands.push(z)), r[Y] = z.code;
|
|
906
915
|
}
|
|
907
916
|
}
|
|
908
917
|
});
|
|
909
|
-
const
|
|
910
|
-
if (((
|
|
911
|
-
const
|
|
912
|
-
|
|
913
|
-
if (
|
|
914
|
-
const
|
|
915
|
-
if (!
|
|
918
|
+
const I = (t == null ? void 0 : t.designViewModelUtils).getDgViewModel(v.id), k = ["valueChanging", "valueChanged"];
|
|
919
|
+
if (((G = r.binding) == null ? void 0 : G.type) === ae.Form) {
|
|
920
|
+
const re = (ne = v.fields) == null ? void 0 : ne.find((Y) => Y.id === r.binding.field);
|
|
921
|
+
re && k.forEach((Y) => {
|
|
922
|
+
if (re[Y]) {
|
|
923
|
+
const X = c.commands.find((z) => z.code === re[Y]);
|
|
924
|
+
if (!X)
|
|
916
925
|
return;
|
|
917
|
-
if (
|
|
918
|
-
|
|
926
|
+
if (T[X.code])
|
|
927
|
+
I.changeField(re.id, { [Y]: T[X.code].code });
|
|
919
928
|
else {
|
|
920
|
-
const
|
|
921
|
-
|
|
929
|
+
const z = L(X);
|
|
930
|
+
T[X.code] = z, v.commands.push(z), I.changeField(re.id, { [Y]: z.code });
|
|
922
931
|
}
|
|
923
932
|
}
|
|
924
933
|
});
|
|
925
934
|
}
|
|
926
935
|
}
|
|
927
|
-
function
|
|
928
|
-
const
|
|
929
|
-
if (
|
|
930
|
-
const
|
|
931
|
-
switch (
|
|
932
|
-
case
|
|
933
|
-
|
|
936
|
+
function B(r) {
|
|
937
|
+
const c = t == null ? void 0 : t.formSchemaUtils, v = r.componentInstance, T = v.value.schema, E = c.getViewModelIdByComponentId(v.value.belongedComponentId), P = c.getViewModelById(E), N = c.getComponentById(e.componentInstance.value.belongedComponentId), I = c.getViewModelById(N.viewModel);
|
|
938
|
+
if (E !== I.id) {
|
|
939
|
+
const k = T.binding.type, q = T.binding.field, G = [];
|
|
940
|
+
switch (k) {
|
|
941
|
+
case ae.Form: {
|
|
942
|
+
w(q, P, I.id);
|
|
934
943
|
break;
|
|
935
944
|
}
|
|
936
|
-
case
|
|
937
|
-
|
|
945
|
+
case ae.Variable: {
|
|
946
|
+
x(T, P, I, G);
|
|
938
947
|
break;
|
|
939
948
|
}
|
|
940
949
|
}
|
|
941
|
-
$(
|
|
950
|
+
$(T, P, I, G), $(T.editor, P, I, G), b(T, P, I), E !== "root-viewmodel" && A(G, E);
|
|
942
951
|
}
|
|
943
952
|
}
|
|
944
|
-
function
|
|
945
|
-
if (!
|
|
953
|
+
function M(r) {
|
|
954
|
+
if (!r || !r.componentInstance)
|
|
946
955
|
return;
|
|
947
|
-
const
|
|
948
|
-
!
|
|
956
|
+
const v = r.componentInstance.value.schema;
|
|
957
|
+
!v.binding || !v.binding.field || (u(r), B(r));
|
|
949
958
|
}
|
|
950
|
-
function
|
|
951
|
-
return
|
|
959
|
+
function O() {
|
|
960
|
+
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
952
961
|
}
|
|
953
|
-
function
|
|
954
|
-
let
|
|
955
|
-
switch (
|
|
962
|
+
function S(r) {
|
|
963
|
+
let c = "";
|
|
964
|
+
switch (r) {
|
|
956
965
|
case 1: {
|
|
957
|
-
|
|
966
|
+
c = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
958
967
|
break;
|
|
959
968
|
}
|
|
960
969
|
case 2: {
|
|
961
|
-
|
|
970
|
+
c = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
962
971
|
break;
|
|
963
972
|
}
|
|
964
973
|
case 3: {
|
|
965
|
-
|
|
974
|
+
c = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
966
975
|
break;
|
|
967
976
|
}
|
|
968
977
|
case 4: {
|
|
969
|
-
|
|
978
|
+
c = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
970
979
|
break;
|
|
971
980
|
}
|
|
972
981
|
}
|
|
973
|
-
return
|
|
982
|
+
return c;
|
|
974
983
|
}
|
|
975
|
-
function
|
|
976
|
-
let
|
|
984
|
+
function K(r, c) {
|
|
985
|
+
let v = !1;
|
|
977
986
|
if (e.schema && Object.prototype.hasOwnProperty.call(e.schema, "labelAutoOverflow"))
|
|
978
|
-
|
|
987
|
+
v = e.schema.labelAutoOverflow;
|
|
979
988
|
else {
|
|
980
|
-
const
|
|
981
|
-
|
|
989
|
+
const T = t == null ? void 0 : t.formSchemaUtils, E = T == null ? void 0 : T.selectNode(c, (P) => P.type === l["response-form"].type);
|
|
990
|
+
E && (v = E.labelAutoOverflow);
|
|
982
991
|
}
|
|
983
|
-
return
|
|
984
|
-
}
|
|
985
|
-
function
|
|
986
|
-
const
|
|
987
|
-
if (
|
|
988
|
-
const { formColumns:
|
|
989
|
-
let
|
|
990
|
-
|
|
992
|
+
return v && (r += " farris-group-multi-label"), r;
|
|
993
|
+
}
|
|
994
|
+
function R(r) {
|
|
995
|
+
const c = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
996
|
+
if (c && c.schema && c.schema.componentType) {
|
|
997
|
+
const { formColumns: v } = c.schema;
|
|
998
|
+
let T = S(v);
|
|
999
|
+
T = t == null ? void 0 : t.formSchemaUtils.getControlClassByFormUnifiedLayout(T, c.schema.id, e.schema), T = K(T, c.schema), r.appearance || (r.appearance = {}), r.appearance.class = T;
|
|
991
1000
|
}
|
|
992
1001
|
}
|
|
993
|
-
function
|
|
994
|
-
const { bindingSourceContext:
|
|
995
|
-
if (
|
|
996
|
-
const
|
|
997
|
-
|
|
1002
|
+
function J(r, c, v, T) {
|
|
1003
|
+
const { bindingSourceContext: E, parentComponentInstance: P } = r;
|
|
1004
|
+
if (E != null && E.entityFieldNode && P) {
|
|
1005
|
+
const N = t == null ? void 0 : t.designViewModelUtils, k = (t == null ? void 0 : t.formSchemaUtils).getViewModelIdByComponentId(P.belongedComponentId), q = N.getDgViewModel(k);
|
|
1006
|
+
q.removeField([E.entityFieldNode.id]), q.addField(E.designViewModelField), c && q.changeField(E.entityFieldNode.id, { editor: { $type: c }, groupId: v, groupName: T });
|
|
998
1007
|
}
|
|
999
1008
|
}
|
|
1000
|
-
function
|
|
1001
|
-
var
|
|
1002
|
-
const
|
|
1003
|
-
if ((
|
|
1004
|
-
const { label:
|
|
1005
|
-
let
|
|
1006
|
-
const
|
|
1007
|
-
return (
|
|
1009
|
+
function j(r, c) {
|
|
1010
|
+
var P, N, I;
|
|
1011
|
+
const v = n;
|
|
1012
|
+
if ((v.appearance && v.appearance.class || "").split(" ").includes("f-form-layout") && r.componentCategory === "input") {
|
|
1013
|
+
const { label: k } = r;
|
|
1014
|
+
let q;
|
|
1015
|
+
const G = t == null ? void 0 : t.controlCreatorUtils;
|
|
1016
|
+
return (P = r.bindingSourceContext) != null && P.entityFieldNode ? q = G.setFormFieldProperty((N = r.bindingSourceContext) == null ? void 0 : N.entityFieldNode, c == null ? void 0 : c.type) : (q = G.createFormGroupWithoutField(c == null ? void 0 : c.type), q.label = k), R(q), J(r, (I = q.editor) == null ? void 0 : I.type), q;
|
|
1008
1017
|
}
|
|
1009
|
-
return
|
|
1018
|
+
return c;
|
|
1019
|
+
}
|
|
1020
|
+
function Q() {
|
|
1021
|
+
return o;
|
|
1022
|
+
}
|
|
1023
|
+
function _() {
|
|
1024
|
+
return i;
|
|
1025
|
+
}
|
|
1026
|
+
function D() {
|
|
1027
|
+
return !1;
|
|
1028
|
+
}
|
|
1029
|
+
function W(r) {
|
|
1030
|
+
return new yn(r, t).getPropertyConfig(n, e.componentInstance.value);
|
|
1031
|
+
}
|
|
1032
|
+
return {
|
|
1033
|
+
canAccepts: C,
|
|
1034
|
+
checkCanDeleteComponent: _,
|
|
1035
|
+
checkCanMoveComponent: Q,
|
|
1036
|
+
getStyles: O,
|
|
1037
|
+
getPropsConfig: W,
|
|
1038
|
+
hideNestedPaddingInDesginerView: D,
|
|
1039
|
+
onAcceptMovedChildElement: M,
|
|
1040
|
+
onResolveNewComponentSchema: j,
|
|
1041
|
+
moveInputBetweenComponent: B,
|
|
1042
|
+
resolveFormGroupAppearance: R,
|
|
1043
|
+
syncFieldToViewModel: J
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
const vn = /* @__PURE__ */ H({
|
|
1047
|
+
name: "FResponseFormDesign",
|
|
1048
|
+
directives: {
|
|
1049
|
+
"area-response": To
|
|
1050
|
+
},
|
|
1051
|
+
props: pe,
|
|
1052
|
+
emits: [],
|
|
1053
|
+
setup(e, t) {
|
|
1054
|
+
const n = V(), a = te("design-item-context"), o = te("designer-host-service"), s = hn(a, o), i = ye(n, a, s);
|
|
1055
|
+
me(() => {
|
|
1056
|
+
n.value.componentInstance = i;
|
|
1057
|
+
}), t.expose(i.value);
|
|
1058
|
+
const h = Z(() => {
|
|
1059
|
+
const d = e.customClass.split(" "), g = {
|
|
1060
|
+
"drag-container": !0
|
|
1061
|
+
};
|
|
1062
|
+
return d.reduce((C, u) => (C[u] = !0, C), g), g;
|
|
1063
|
+
});
|
|
1064
|
+
return () => Ie(F("div", {
|
|
1065
|
+
ref: n,
|
|
1066
|
+
class: h.value,
|
|
1067
|
+
style: e.customClass,
|
|
1068
|
+
"data-dragref": `${a.schema.id}-container`,
|
|
1069
|
+
"data-associate": `${a.schema.id}-component`
|
|
1070
|
+
}, [t.slots.default && t.slots.default()]), [[Be("area-response")]]);
|
|
1071
|
+
}
|
|
1072
|
+
}), Cn = {}, Fn = {}, { globalStorageKey: si } = Ne(), bn = {
|
|
1073
|
+
id: { Type: String, default: "" },
|
|
1074
|
+
/** 是否自动完成 */
|
|
1075
|
+
autocomplete: { Type: String, default: "off" },
|
|
1076
|
+
/** 自定义CLASS */
|
|
1077
|
+
customClass: { Type: String, default: "" },
|
|
1078
|
+
/** 禁用 */
|
|
1079
|
+
disabled: { Type: Boolean, default: !1 },
|
|
1080
|
+
/** 允许编辑 */
|
|
1081
|
+
editable: { Type: Boolean, default: !0 },
|
|
1082
|
+
/** 启用清除按钮 */
|
|
1083
|
+
enableClear: { Type: Boolean, default: !0 },
|
|
1084
|
+
/** 启用提示文本 */
|
|
1085
|
+
enableTitle: { Type: Boolean, default: !0 },
|
|
1086
|
+
/** 能否查看密码 */
|
|
1087
|
+
enableViewPassword: { Type: Boolean, default: !0 },
|
|
1088
|
+
/** 始终显示占位符文本 */
|
|
1089
|
+
forcePlaceholder: { Type: Boolean, default: !1 },
|
|
1090
|
+
/** 扩展按钮 */
|
|
1091
|
+
groupText: { Type: String, default: "" },
|
|
1092
|
+
/** 密码模式 */
|
|
1093
|
+
showType: { Type: String, default: "text" },
|
|
1094
|
+
/** 密码模式 --废弃*/
|
|
1095
|
+
type: { Type: String, default: "text" },
|
|
1096
|
+
/** 最大值 */
|
|
1097
|
+
max: { type: [Number, String] },
|
|
1098
|
+
/** 最小值 */
|
|
1099
|
+
min: { type: [Number, String] },
|
|
1100
|
+
/** 最大长度 */
|
|
1101
|
+
maxLength: { Type: Number || void 0, default: void 0 },
|
|
1102
|
+
/** 最小长度 */
|
|
1103
|
+
minLength: { Type: Number || void 0, default: void 0 },
|
|
1104
|
+
/** 组件值 */
|
|
1105
|
+
modelValue: { Type: String || Boolean, default: "" },
|
|
1106
|
+
/** 隐藏边线 */
|
|
1107
|
+
showBorder: { Type: Boolean, default: !0 },
|
|
1108
|
+
/** 步长 */
|
|
1109
|
+
step: { Type: Number, default: 1 },
|
|
1110
|
+
/** 启用提示信息 */
|
|
1111
|
+
placeholder: { Type: String, default: "" },
|
|
1112
|
+
precision: { Type: Number, default: 0 },
|
|
1113
|
+
/** 只读 */
|
|
1114
|
+
readonly: { Type: Boolean, default: !1 },
|
|
1115
|
+
/** 当组件禁用或只读时显示后边的按钮 */
|
|
1116
|
+
showButtonWhenDisabled: { Type: Boolean, default: !1 },
|
|
1117
|
+
/** tab索引 */
|
|
1118
|
+
tabIndex: { Type: Number, default: 0 },
|
|
1119
|
+
/** 文本在输入框中的对齐方式 */
|
|
1120
|
+
textAlign: { Type: String, default: "left" },
|
|
1121
|
+
/** 是否启用前置扩展信息;在输入框前面 显示 ① 图标鼠标滑过后显示 */
|
|
1122
|
+
useExtendInfo: { Type: Boolean, default: !1 },
|
|
1123
|
+
/** 前置扩展信息 */
|
|
1124
|
+
extendInfo: { Type: String, default: "" },
|
|
1125
|
+
/** 输入值 */
|
|
1126
|
+
value: { Type: String, default: "" },
|
|
1127
|
+
/** 是否撑开高度 */
|
|
1128
|
+
autoHeight: { type: Boolean, default: !1 },
|
|
1129
|
+
/** 自动聚焦 */
|
|
1130
|
+
autofocus: { type: Boolean, default: !1 },
|
|
1131
|
+
/** 文本区域可见的行数 */
|
|
1132
|
+
rows: { type: Number, default: 2 },
|
|
1133
|
+
/** 展示输入文本数量 */
|
|
1134
|
+
showCount: { type: Boolean, default: !1 },
|
|
1135
|
+
showZero: { type: Boolean, default: !1 },
|
|
1136
|
+
/**
|
|
1137
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
1138
|
+
*/
|
|
1139
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
1140
|
+
/**
|
|
1141
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
1142
|
+
*/
|
|
1143
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
1144
|
+
/**
|
|
1145
|
+
* modelValue 更新时机, 默认 blur; 可选值:blur | input
|
|
1146
|
+
* - blur: 离开焦点时更新
|
|
1147
|
+
* - change: 输入时更新
|
|
1148
|
+
*/
|
|
1149
|
+
updateOn: { type: String, default: "blur" },
|
|
1150
|
+
formatValidation: { type: Object, default: {} },
|
|
1151
|
+
/**
|
|
1152
|
+
* 是否启用快捷键
|
|
1153
|
+
*/
|
|
1154
|
+
keyboard: { type: Boolean, default: !0 }
|
|
1155
|
+
}, Ae = [
|
|
1156
|
+
{ key: "none", value: "无" },
|
|
1157
|
+
{ key: "cellNumber", value: "手机号" },
|
|
1158
|
+
{ key: "tel", value: "座机号/传真号" },
|
|
1159
|
+
{ key: "telOrCell", value: "手机号/座机号/传真号" },
|
|
1160
|
+
{ key: "postCode", value: "邮编" },
|
|
1161
|
+
{ key: "email", value: "电子邮箱" },
|
|
1162
|
+
{ key: "idCode", value: "身份证号" },
|
|
1163
|
+
{ key: "carCode", value: "车牌号" },
|
|
1164
|
+
{ key: "subjectCode", value: "10位数字会计科目代码" },
|
|
1165
|
+
{ key: "custom", value: "自定义" }
|
|
1166
|
+
];
|
|
1167
|
+
function wn(e) {
|
|
1168
|
+
switch (e) {
|
|
1169
|
+
case "none":
|
|
1170
|
+
return "";
|
|
1171
|
+
case "cellNumber":
|
|
1172
|
+
return "^1[0-9]{10}$";
|
|
1173
|
+
case "tel":
|
|
1174
|
+
return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$";
|
|
1175
|
+
case "telOrCell":
|
|
1176
|
+
return "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$|^1[0-9]{10}$";
|
|
1177
|
+
case "postCode":
|
|
1178
|
+
return "^[1-9]\\d{5}(?!\\d)$";
|
|
1179
|
+
case "workCode":
|
|
1180
|
+
return "^\\d{8}$";
|
|
1181
|
+
case "email":
|
|
1182
|
+
return "^[A-Za-z\\d]+([-_.][A-Za-z\\d]+)*@([A-Za-z\\d]+[-.])+[A-Za-z]{2,5}$";
|
|
1183
|
+
case "idCode":
|
|
1184
|
+
return "^[1-9]\\d{5}[1-9]\\d{3}((0[1-9])|(1[0-2]))(0[1-9]|([1|2][0-9])|3[0-1])((\\d{4})|\\d{3}X)$";
|
|
1185
|
+
case "carCode":
|
|
1186
|
+
return "^([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][·\\s]?[A-HJ-NP-Z0-9]{4,5}[挂学警港澳]?|粤[Z港澳][·\\s]?[港澳][0-9A-HJ-NP-Z]{4}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?([DF][0-9A-HJ-NP-Z][0-9]{4}|[0-9]{5}[DF])[挂港澳]?|[使领][0-9]{3}[·\\s]?[0-9]{3}|临[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z][·\\s]?[0-9A-Z]{4,5}|[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼][A-Z]?[·\\s]?警[0-9A-Z]{4}|[军海空][A-Z][·\\s]?[0-9]{4,5}|WJ(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]|\\d{2})[·\\s]?[0-9A-Z]{4,5})$";
|
|
1187
|
+
case "carCodeNew":
|
|
1188
|
+
return "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$";
|
|
1189
|
+
case "subjectCode":
|
|
1190
|
+
return "^\\d{10}$";
|
|
1191
|
+
}
|
|
1192
|
+
return "";
|
|
1193
|
+
}
|
|
1194
|
+
function Vn(e) {
|
|
1195
|
+
var t;
|
|
1196
|
+
return "请输入正确的" + ((t = Ae.find((n) => n.key === e)) == null ? void 0 : t.value);
|
|
1197
|
+
}
|
|
1198
|
+
const kn = {
|
|
1199
|
+
convertTo: (e, t, n, a) => {
|
|
1200
|
+
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation.type = n, e.editor.formatValidation.expression = wn(n), e.editor.formatValidation.message = Vn(n);
|
|
1201
|
+
},
|
|
1202
|
+
convertFrom: (e, t, n) => e.editor.formatValidation ? t === "type" ? e.editor.formatValidation[t] || "none" : e.editor.formatValidation[t] : "none"
|
|
1203
|
+
}, ke = {
|
|
1204
|
+
convertTo: (e, t, n, a) => {
|
|
1205
|
+
e.editor.formatValidation || (e.editor.formatValidation = { type: "none" }), e.editor.formatValidation[t] = n;
|
|
1206
|
+
},
|
|
1207
|
+
convertFrom: (e, t, n) => e.editor.formatValidation ? e.editor.formatValidation[t] : e.editor[t]
|
|
1208
|
+
};
|
|
1209
|
+
class Tn extends rn {
|
|
1210
|
+
constructor(t, n) {
|
|
1211
|
+
super(t, n);
|
|
1212
|
+
}
|
|
1213
|
+
getPropertyConfig(t, n) {
|
|
1214
|
+
return super.getPropertyConfig(t, n), this.propertyConfig.categories.formatValidation = this.getFormatValidation(t), this.propertyConfig;
|
|
1215
|
+
}
|
|
1216
|
+
getEditorProperties(t) {
|
|
1217
|
+
var a, o;
|
|
1218
|
+
let n;
|
|
1219
|
+
if (((a = t == null ? void 0 : t.binding) == null ? void 0 : a.type) === "Form") {
|
|
1220
|
+
const s = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1221
|
+
(o = s == null ? void 0 : s.schemaField) != null && o.type && (n = s.schemaField.type.length);
|
|
1222
|
+
}
|
|
1223
|
+
return this.getComponentConfig(t, {}, {
|
|
1224
|
+
maxLength: {
|
|
1225
|
+
description: "文本字数最大长度",
|
|
1226
|
+
title: "最大长度",
|
|
1227
|
+
type: "number",
|
|
1228
|
+
editor: {
|
|
1229
|
+
nullable: !0,
|
|
1230
|
+
min: 0,
|
|
1231
|
+
useThousands: !1,
|
|
1232
|
+
max: n,
|
|
1233
|
+
needValid: !0
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
showType: {
|
|
1237
|
+
description: "指定是文本框还是密码框",
|
|
1238
|
+
title: "展示类型",
|
|
1239
|
+
type: "enum",
|
|
1240
|
+
editor: {
|
|
1241
|
+
type: "combo-list",
|
|
1242
|
+
data: [
|
|
1243
|
+
{ id: "text", name: "文本框" },
|
|
1244
|
+
{ id: "password", name: "密码框" }
|
|
1245
|
+
]
|
|
1246
|
+
},
|
|
1247
|
+
refreshPanelAfterChanged: !0,
|
|
1248
|
+
defaultValue: "text"
|
|
1249
|
+
},
|
|
1250
|
+
enableViewPassword: {
|
|
1251
|
+
description: "",
|
|
1252
|
+
title: "能否查看密码",
|
|
1253
|
+
visible: t.editor.showType === "password",
|
|
1254
|
+
type: "boolean"
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
getGridFieldEdtiorProperties(t) {
|
|
1259
|
+
var a, o;
|
|
1260
|
+
let n;
|
|
1261
|
+
if (((a = t == null ? void 0 : t.binding) == null ? void 0 : a.type) === "Form") {
|
|
1262
|
+
const s = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
1263
|
+
(o = s == null ? void 0 : s.schemaField) != null && o.type && (n = s.schemaField.type.length);
|
|
1264
|
+
}
|
|
1265
|
+
return this.getComponentConfig(t, {}, {
|
|
1266
|
+
maxLength: {
|
|
1267
|
+
description: "文本字数最大长度",
|
|
1268
|
+
title: "最大长度",
|
|
1269
|
+
type: "number",
|
|
1270
|
+
editor: {
|
|
1271
|
+
nullable: !0,
|
|
1272
|
+
min: 0,
|
|
1273
|
+
useThousands: !1,
|
|
1274
|
+
max: n
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
showType: {
|
|
1278
|
+
description: "指定是文本框还是密码框",
|
|
1279
|
+
title: "展示类型",
|
|
1280
|
+
type: "enum",
|
|
1281
|
+
editor: {
|
|
1282
|
+
type: "combo-list",
|
|
1283
|
+
data: [
|
|
1284
|
+
{ id: "text", name: "文本框" },
|
|
1285
|
+
{ id: "password", name: "密码框" }
|
|
1286
|
+
]
|
|
1287
|
+
},
|
|
1288
|
+
refreshPanelAfterChanged: !0,
|
|
1289
|
+
defaultValue: "text"
|
|
1290
|
+
},
|
|
1291
|
+
enableViewPassword: {
|
|
1292
|
+
description: "",
|
|
1293
|
+
title: "能否查看密码",
|
|
1294
|
+
visible: t.editor.showType === "password",
|
|
1295
|
+
type: "boolean"
|
|
1296
|
+
}
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
getFormatValidation(t) {
|
|
1300
|
+
var a, o, s, i;
|
|
1301
|
+
const n = {
|
|
1302
|
+
title: "输入格式校验",
|
|
1303
|
+
description: "输入校验",
|
|
1304
|
+
hide: !((a = t.binding) != null && a.field),
|
|
1305
|
+
properties: {
|
|
1306
|
+
type: {
|
|
1307
|
+
title: "格式类型",
|
|
1308
|
+
type: "enum",
|
|
1309
|
+
description: "格式类型",
|
|
1310
|
+
defaultValue: "",
|
|
1311
|
+
editor: {
|
|
1312
|
+
type: "combo-list",
|
|
1313
|
+
textField: "value",
|
|
1314
|
+
valueField: "key",
|
|
1315
|
+
idField: "key",
|
|
1316
|
+
editable: !1,
|
|
1317
|
+
data: Ae
|
|
1318
|
+
},
|
|
1319
|
+
refreshPanelAfterChanged: !0,
|
|
1320
|
+
$converter: kn,
|
|
1321
|
+
parentPropertyID: "formatValidation"
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
1325
|
+
return (o = t.editor.formatValidation) != null && o.type && ((s = t.editor.formatValidation) == null ? void 0 : s.type) !== "none" && (n.properties.message = {
|
|
1326
|
+
title: "输入错误提示",
|
|
1327
|
+
type: "string",
|
|
1328
|
+
description: "输入错误提示",
|
|
1329
|
+
$converter: ke,
|
|
1330
|
+
parentPropertyID: "formatValidation"
|
|
1331
|
+
}), ((i = t.editor.formatValidation) == null ? void 0 : i.type) === "custom" && (n.properties.expression = {
|
|
1332
|
+
title: "匹配正则",
|
|
1333
|
+
type: "string",
|
|
1334
|
+
description: "匹配正则",
|
|
1335
|
+
$converter: ke,
|
|
1336
|
+
parentPropertyID: "formatValidation"
|
|
1337
|
+
}), n;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
function In(e, t) {
|
|
1341
|
+
const n = e.schema;
|
|
1342
|
+
function a(o, s) {
|
|
1343
|
+
return new Tn(o, t).getPropertyConfig(n, s);
|
|
1344
|
+
}
|
|
1345
|
+
return { getPropsConfig: a };
|
|
1346
|
+
}
|
|
1347
|
+
const Bn = /* @__PURE__ */ H({
|
|
1348
|
+
name: "FInputGroupDesign",
|
|
1349
|
+
props: bn,
|
|
1350
|
+
emits: ["updateExtendInfo", "clear", "valueChange", "clickHandle", "blurHandle", "focusHandle", "enterHandle", "iconMouseEnter", "iconMouseLeave", "keyupHandle", "keydownHandle", "inputClick"],
|
|
1351
|
+
setup(e, t) {
|
|
1352
|
+
const n = V(e.modelValue), a = V(e.modelValue), o = Io(e, t, n, a), {
|
|
1353
|
+
inputGroupClass: s,
|
|
1354
|
+
inputType: i,
|
|
1355
|
+
inputGroupStyle: h
|
|
1356
|
+
} = o, d = V(), g = te("designer-host-service"), C = te("design-item-context"), u = In(C, g), w = ye(d, C, u), x = Z(() => e.showType === "password" ? "password" : "");
|
|
1357
|
+
return me(() => {
|
|
1358
|
+
d.value.componentInstance = w;
|
|
1359
|
+
}), t.expose(w.value), () => F("div", {
|
|
1360
|
+
id: "inputGroup",
|
|
1361
|
+
ref: d,
|
|
1362
|
+
class: s.value,
|
|
1363
|
+
style: h.value
|
|
1364
|
+
}, [F("input", {
|
|
1365
|
+
class: "form-control",
|
|
1366
|
+
type: e.showType,
|
|
1367
|
+
placeholder: e.placeholder,
|
|
1368
|
+
value: x.value
|
|
1369
|
+
}, null), e.showType === "password" && e.enableViewPassword && F("span", {
|
|
1370
|
+
class: "input-group-append"
|
|
1371
|
+
}, [F("span", {
|
|
1372
|
+
class: "input-group-text"
|
|
1373
|
+
}, [F("span", {
|
|
1374
|
+
class: "f-icon f-icon-eye"
|
|
1375
|
+
}, null)])])]);
|
|
1376
|
+
}
|
|
1377
|
+
});
|
|
1378
|
+
function xn() {
|
|
1379
|
+
function e(i, h) {
|
|
1380
|
+
const d = Fn[i];
|
|
1381
|
+
return d ? d(h) : {};
|
|
1382
|
+
}
|
|
1383
|
+
function t(i) {
|
|
1384
|
+
return Cn[i] || Bn;
|
|
1385
|
+
}
|
|
1386
|
+
function n(i) {
|
|
1387
|
+
}
|
|
1388
|
+
function a(i) {
|
|
1389
|
+
}
|
|
1390
|
+
function o(i) {
|
|
1391
|
+
}
|
|
1392
|
+
function s(i) {
|
|
1393
|
+
}
|
|
1394
|
+
return { getChangeFunctionName: n, getClearFunctionName: a, resolveEditorProps: e, resolveEditorType: t, getMousedownFunctionName: o, getMouseupFunctionName: s };
|
|
1395
|
+
}
|
|
1396
|
+
const ie = class ie {
|
|
1397
|
+
/**
|
|
1398
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
1399
|
+
*/
|
|
1400
|
+
static getEditorTypesByMDataType(t, n = !1, a = "") {
|
|
1401
|
+
if (n)
|
|
1402
|
+
return [{ key: l["language-textbox"].type, value: l["language-textbox"].name }];
|
|
1403
|
+
let o = ie.fieldControlTypeMapping[t];
|
|
1404
|
+
if (a === "data-grid-column" && (o != null && o.length)) {
|
|
1405
|
+
const s = [l["check-group"].type, l["radio-group"].type, l.image.type, l["rich-text-editor"].type];
|
|
1406
|
+
o = o.filter((i) => !s.includes(i.key));
|
|
1407
|
+
}
|
|
1408
|
+
return o;
|
|
1409
|
+
}
|
|
1410
|
+
/**
|
|
1411
|
+
* 获取所有输入类控件
|
|
1412
|
+
*/
|
|
1413
|
+
static getAllInputTypes() {
|
|
1414
|
+
const t = [];
|
|
1415
|
+
for (const n in ie.fieldControlTypeMapping)
|
|
1416
|
+
ie.fieldControlTypeMapping[n].forEach((a) => {
|
|
1417
|
+
t.find((o) => o.key === a.key && o.value === a.value) || t.push({ key: a.key, value: a.value });
|
|
1418
|
+
});
|
|
1419
|
+
return t;
|
|
1420
|
+
}
|
|
1421
|
+
/**
|
|
1422
|
+
* 提供schema字段基础属性和DOM控件属性的映射
|
|
1423
|
+
* @param control 控件元数据
|
|
1424
|
+
*/
|
|
1425
|
+
static mappingDomPropAndSchemaProp(t, n) {
|
|
1426
|
+
var s;
|
|
1427
|
+
const a = (s = t.editor) == null ? void 0 : s.type, o = [];
|
|
1428
|
+
return (t.type === l["data-grid-column"].type || t.type === l["tree-grid-column"].type) && n && n.categoryId && n.categoryId.indexOf("gridFieldEditor") < 0 && o.push({ domField: "title", schemaField: "name" }), o.push({ domField: "label", schemaField: "name" }), o.push({ domField: "editor.required", schemaField: "require" }), o.push({ domField: "editor.readonly", schemaField: "readonly" }), (a === l["input-group"].type || a === l.textarea.type || a === l["number-spinner"].type) && o.push({ domField: "editor.maxLength", schemaField: "type.length" }), a === l["number-spinner"].type && o.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === l["data-grid-column"].type || t.type === l["tree-grid-column"].type) && o.push({ domField: "formatter.precision", schemaField: "type.precision" }), (a === l["combo-list"].type || a === l["radio-group"].type) && o.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === l["data-grid-column"].type || t.type === l["tree-grid-column"].type) && o.push({ domField: "formatter.data", schemaField: "type.enumValues" }), a === l["date-picker"].type && (o.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), o.push({ domField: "editor.fieldType", schemaField: "type.name" })), a === l["number-spinner"].type && (o.push({ domField: "editor.max", schemaField: "editor.maxValue" }), o.push({ domField: "editor.min", schemaField: "editor.minValue" })), a === l.lookup.type && (o.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), o.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), o.push({ domField: "editor.textField", schemaField: "editor.textField" }), o.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), o.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), o.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), o.push({ domField: "path", schemaField: "bindingPath" }), o.push({ domField: "binding.path", schemaField: "bindingField" }), o.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === l["data-grid-column"].type || t.type === l["tree-grid-column"].type) && o.push({ domField: "field", schemaField: "bindingPath" }), o;
|
|
1429
|
+
}
|
|
1430
|
+
};
|
|
1431
|
+
/**
|
|
1432
|
+
* <字段类型,可配置的控件类型列表>的映射
|
|
1433
|
+
*/
|
|
1434
|
+
le(ie, "fieldControlTypeMapping", {
|
|
1435
|
+
String: [
|
|
1436
|
+
{ key: l["input-group"].type, value: l["input-group"].name },
|
|
1437
|
+
{ key: l.lookup.type, value: l.lookup.name },
|
|
1438
|
+
{ key: l.image.type, value: l.image.name },
|
|
1439
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name },
|
|
1440
|
+
{ key: l.switch.type, value: l.switch.name },
|
|
1441
|
+
{ key: l["check-box"].type, value: l["check-box"].name },
|
|
1442
|
+
{ key: l["check-group"].type, value: l["check-group"].name },
|
|
1443
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name },
|
|
1444
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
1445
|
+
{ key: l.textarea.type, value: l.textarea.name },
|
|
1446
|
+
{ key: l["time-picker"].type, value: l["time-picker"].name }
|
|
1447
|
+
],
|
|
1448
|
+
Text: [
|
|
1449
|
+
{ key: l.textarea.type, value: l.textarea.name },
|
|
1450
|
+
{ key: l.lookup.type, value: l.lookup.name },
|
|
1451
|
+
{ key: l.image.type, value: l.image.name },
|
|
1452
|
+
{ key: l["rich-text-editor"].type, value: l["rich-text-editor"].name }
|
|
1453
|
+
],
|
|
1454
|
+
Decimal: [
|
|
1455
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
1456
|
+
],
|
|
1457
|
+
Integer: [
|
|
1458
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
1459
|
+
],
|
|
1460
|
+
Number: [
|
|
1461
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name },
|
|
1462
|
+
{ key: l.switch.type, value: l.switch.name },
|
|
1463
|
+
{ key: l["check-box"].type, value: l["check-box"].name }
|
|
1464
|
+
],
|
|
1465
|
+
BigNumber: [
|
|
1466
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
1467
|
+
],
|
|
1468
|
+
Date: [
|
|
1469
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name }
|
|
1470
|
+
],
|
|
1471
|
+
DateTime: [
|
|
1472
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name }
|
|
1473
|
+
],
|
|
1474
|
+
Boolean: [
|
|
1475
|
+
{ key: l.switch.type, value: l.switch.name },
|
|
1476
|
+
{ key: l["check-box"].type, value: l["check-box"].name }
|
|
1477
|
+
],
|
|
1478
|
+
Enum: [
|
|
1479
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
1480
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name }
|
|
1481
|
+
],
|
|
1482
|
+
Object: [
|
|
1483
|
+
{ key: l.lookup.type, value: l.lookup.name },
|
|
1484
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
1485
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name }
|
|
1486
|
+
]
|
|
1487
|
+
});
|
|
1488
|
+
let Te = ie;
|
|
1489
|
+
var ge = /* @__PURE__ */ ((e) => (e.Form = "Form", e.Variable = "Variable", e))(ge || {}), qe = /* @__PURE__ */ ((e) => (e.SimpleField = "SimpleField", e.ComplexField = "ComplexField", e))(qe || {});
|
|
1490
|
+
function En(e, t, n) {
|
|
1491
|
+
function a() {
|
|
1492
|
+
const i = n.componentId;
|
|
1493
|
+
if (!i)
|
|
1494
|
+
return !1;
|
|
1495
|
+
const h = e.formSchemaUtils.getViewModelIdByComponentId(i);
|
|
1496
|
+
if (!h)
|
|
1497
|
+
return !1;
|
|
1498
|
+
const { schema: d } = t, { designViewModelUtils: g } = e, C = g.getDgViewModel(h), u = C == null ? void 0 : C.fields.find((w) => w.id === d.binding.field);
|
|
1499
|
+
return !(!u || u.$type !== qe.SimpleField);
|
|
1500
|
+
}
|
|
1501
|
+
function o() {
|
|
1502
|
+
const { schema: i } = t;
|
|
1503
|
+
return !!e.formSchemaUtils.getVariableById(i.binding.field);
|
|
1504
|
+
}
|
|
1505
|
+
function s() {
|
|
1506
|
+
var d;
|
|
1507
|
+
const { schema: i } = t;
|
|
1508
|
+
let h = !0;
|
|
1509
|
+
if (!e || !((d = i.binding) != null && d.field))
|
|
1510
|
+
return h;
|
|
1511
|
+
switch (i.binding.type) {
|
|
1512
|
+
case ge.Form: {
|
|
1513
|
+
h = a();
|
|
1514
|
+
break;
|
|
1515
|
+
}
|
|
1516
|
+
case ge.Variable:
|
|
1517
|
+
h = o();
|
|
1518
|
+
}
|
|
1519
|
+
return h;
|
|
1520
|
+
}
|
|
1521
|
+
return { checkBindingFieldValidation: s };
|
|
1522
|
+
}
|
|
1523
|
+
const Pn = /* @__PURE__ */ H({
|
|
1524
|
+
name: "FDynamicFormGroupDesign",
|
|
1525
|
+
props: lt,
|
|
1526
|
+
emits: ["change", "update:modelValue"],
|
|
1527
|
+
setup(e, t) {
|
|
1528
|
+
var K;
|
|
1529
|
+
const n = V(e.id), a = V(e.customClass), o = V(e.editor), s = V(e.label), i = V(e.modelValue), h = V(!0), d = V(((K = e.editor) == null ? void 0 : K.required) === !0), g = V(e.showLabel);
|
|
1530
|
+
V(e.type);
|
|
1531
|
+
const C = V(), u = te("designer-host-service"), w = te("design-item-context"), x = Z(() => g.value ? e.showLabelType : "none"), {
|
|
1532
|
+
resolveEditorProps: $,
|
|
1533
|
+
resolveEditorType: U
|
|
1534
|
+
} = xn(), A = Z(() => ({
|
|
1535
|
+
"form-group": !0,
|
|
1536
|
+
"farris-form-group": !0,
|
|
1537
|
+
"common-group": !0,
|
|
1538
|
+
"q-state-readonly": h.value,
|
|
1539
|
+
"form-group-in-canvas": !0
|
|
1540
|
+
})), L = Z(() => {
|
|
1541
|
+
const R = o.value.type || "input-group", J = U(R), j = $(R, o.value);
|
|
1542
|
+
return () => F(J, ce({
|
|
1543
|
+
ref: C
|
|
1544
|
+
}, j, {
|
|
1545
|
+
modelValue: i.value,
|
|
1546
|
+
"onUpdate:modelValue": (Q) => i.value = Q
|
|
1547
|
+
}), null);
|
|
1548
|
+
});
|
|
1549
|
+
oe([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.showLabel], ([R, J, j, Q, _, D, W]) => {
|
|
1550
|
+
var r;
|
|
1551
|
+
n.value = R, a.value = J, o.value = {
|
|
1552
|
+
...j
|
|
1553
|
+
}, s.value = Q, i.value = _, h.value = D, d.value = ((r = o.value) == null ? void 0 : r.required) === !0, g.value = W;
|
|
1554
|
+
}, {
|
|
1555
|
+
deep: !0
|
|
1556
|
+
});
|
|
1557
|
+
const B = !te("external-container-id"), {
|
|
1558
|
+
checkBindingFieldValidation: M
|
|
1559
|
+
} = En(u, w, e);
|
|
1560
|
+
function O() {
|
|
1561
|
+
const R = B ? M() : !0;
|
|
1562
|
+
return F(ut, {
|
|
1563
|
+
id: `${n.value}-lable`,
|
|
1564
|
+
showType: x.value,
|
|
1565
|
+
required: d.value,
|
|
1566
|
+
text: s.value,
|
|
1567
|
+
title: s.value,
|
|
1568
|
+
valid: R,
|
|
1569
|
+
inValidTip: "绑定信息已失效,请切换绑定或移除控件"
|
|
1570
|
+
}, null);
|
|
1571
|
+
}
|
|
1572
|
+
const S = Z(() => {
|
|
1573
|
+
if (e.fill)
|
|
1574
|
+
return {
|
|
1575
|
+
maxWidth: "none"
|
|
1576
|
+
};
|
|
1577
|
+
});
|
|
1578
|
+
return t.expose({
|
|
1579
|
+
editorRef: C
|
|
1580
|
+
}), () => F("div", {
|
|
1581
|
+
id: `${n.value}-input-group`,
|
|
1582
|
+
class: a.value
|
|
1583
|
+
}, [F("div", {
|
|
1584
|
+
class: "farris-group-wrap",
|
|
1585
|
+
style: S.value
|
|
1586
|
+
}, [F("div", {
|
|
1587
|
+
class: A.value
|
|
1588
|
+
}, [O(), F("div", {
|
|
1589
|
+
class: "farris-input-wrap"
|
|
1590
|
+
}, [L.value()])])])]);
|
|
1010
1591
|
}
|
|
1011
|
-
|
|
1012
|
-
|
|
1592
|
+
});
|
|
1593
|
+
function Ln(e, t) {
|
|
1594
|
+
function n() {
|
|
1595
|
+
return !0;
|
|
1013
1596
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1597
|
+
function a() {
|
|
1598
|
+
return !0;
|
|
1016
1599
|
}
|
|
1017
|
-
function
|
|
1600
|
+
function o() {
|
|
1018
1601
|
return !1;
|
|
1019
1602
|
}
|
|
1020
|
-
function
|
|
1021
|
-
return
|
|
1603
|
+
function s() {
|
|
1604
|
+
return !0;
|
|
1605
|
+
}
|
|
1606
|
+
function i(u) {
|
|
1607
|
+
var L;
|
|
1608
|
+
const w = t == null ? void 0 : t.designViewModelUtils, x = t == null ? void 0 : t.formSchemaUtils, $ = (L = e == null ? void 0 : e.componentInstance.value) == null ? void 0 : L.belongedComponentId;
|
|
1609
|
+
if (!$ || !w || !x)
|
|
1610
|
+
return;
|
|
1611
|
+
const U = x.getViewModelIdByComponentId($), A = w.getDgViewModel(U);
|
|
1612
|
+
A && A.removeField([u]);
|
|
1613
|
+
}
|
|
1614
|
+
function h(u, w) {
|
|
1615
|
+
const x = t == null ? void 0 : t.formSchemaUtils, { schema: $ } = e;
|
|
1616
|
+
if (x.getComponents().find((A) => {
|
|
1617
|
+
let L = x.getControlsInCmpWidthBinding(A.viewModel, u);
|
|
1618
|
+
if (L = L.filter((b) => {
|
|
1619
|
+
var M;
|
|
1620
|
+
if (b.id === $.id)
|
|
1621
|
+
return !1;
|
|
1622
|
+
const B = w.type === "visible" ? b[w.type] : (M = b.editor) == null ? void 0 : M[w.type];
|
|
1623
|
+
if (B && B.type === "Expression" && B.expressionId === w.id)
|
|
1624
|
+
return !0;
|
|
1625
|
+
}), L.length)
|
|
1626
|
+
return !0;
|
|
1627
|
+
}))
|
|
1628
|
+
return !0;
|
|
1629
|
+
}
|
|
1630
|
+
function d(u) {
|
|
1631
|
+
var $;
|
|
1632
|
+
const w = t == null ? void 0 : t.formSchemaUtils, { schema: x } = e;
|
|
1633
|
+
if (w.getExpressions().length) {
|
|
1634
|
+
const U = w.getExpressions(), A = U.findIndex((L) => L.target === u);
|
|
1635
|
+
A > -1 && (($ = U[A].rules) == null || $.map((L) => {
|
|
1636
|
+
var b;
|
|
1637
|
+
switch (L.type) {
|
|
1638
|
+
case "visible":
|
|
1639
|
+
case "readonly":
|
|
1640
|
+
case "required": {
|
|
1641
|
+
const B = L.type === "visible" ? x[L.type] : (b = x.editor) == null ? void 0 : b[L.type];
|
|
1642
|
+
B && B.type === "Expression" && B.expressionId === L.id && (h(u, L) || (L.needDelete = !0));
|
|
1643
|
+
break;
|
|
1644
|
+
}
|
|
1645
|
+
default:
|
|
1646
|
+
h(u, L) || (L.needDelete = !0);
|
|
1647
|
+
}
|
|
1648
|
+
}), U[A].rules = U[A].rules.filter((L) => !L.needDelete));
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
function g() {
|
|
1652
|
+
var w, x;
|
|
1653
|
+
const u = (w = e == null ? void 0 : e.parent) == null ? void 0 : w.componentInstance.value;
|
|
1654
|
+
((x = u == null ? void 0 : u.schema) == null ? void 0 : x.type) === l["response-layout-item"].type && (u != null && u.schema.appearance.class) && (u.schema.appearance.class = u.schema.appearance.class.replace("f-form-layout", ""), u.schema.appearance.class = u.schema.appearance.class.replace("farris-form", ""), u.schema.appearance.class = u.schema.appearance.class.replace("farris-form-controls-inline", ""), u.schema.appearance.class = u.schema.appearance.class.replace("farris-form-auto", ""), u.schema.appearance.class = u.schema.appearance.class.trim().replace(" ", " "));
|
|
1655
|
+
}
|
|
1656
|
+
function C() {
|
|
1657
|
+
const { schema: u } = e, w = u.binding && u.binding.field;
|
|
1658
|
+
w && (i(w), d(w)), g();
|
|
1022
1659
|
}
|
|
1023
1660
|
return {
|
|
1024
|
-
canAccepts:
|
|
1025
|
-
checkCanDeleteComponent:
|
|
1026
|
-
checkCanMoveComponent:
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
hideNestedPaddingInDesginerView: E,
|
|
1030
|
-
onAcceptMovedChildElement: T,
|
|
1031
|
-
onResolveNewComponentSchema: R,
|
|
1032
|
-
moveInputBetweenComponent: k,
|
|
1033
|
-
resolveFormGroupAppearance: M,
|
|
1034
|
-
syncFieldToViewModel: X
|
|
1661
|
+
canAccepts: o,
|
|
1662
|
+
checkCanDeleteComponent: a,
|
|
1663
|
+
checkCanMoveComponent: n,
|
|
1664
|
+
hideNestedPaddingInDesginerView: s,
|
|
1665
|
+
onRemoveComponent: C
|
|
1035
1666
|
};
|
|
1036
1667
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1668
|
+
const Nn = /* @__PURE__ */ H({
|
|
1669
|
+
name: "FFormGroupDesign",
|
|
1670
|
+
props: pe,
|
|
1671
|
+
emits: [],
|
|
1672
|
+
setup(e, t) {
|
|
1673
|
+
const n = V(), a = te("design-item-context"), o = te("designer-host-service"), s = Ln(a, o), i = ye(n, a, s);
|
|
1674
|
+
return me(() => {
|
|
1675
|
+
n.value.componentInstance = i, i.value.getPropConfig = (...h) => {
|
|
1676
|
+
var g, C, u;
|
|
1677
|
+
let d = bo[e.editor.type];
|
|
1678
|
+
return d && Object.keys(d).length === 0 && ((g = n.value) != null && g.editorRef) && ((u = (C = n.value) == null ? void 0 : C.editorRef) != null && u.getPropConfig) && (d = n.value.editorRef.getPropConfig(...h, i.value)), d;
|
|
1679
|
+
};
|
|
1680
|
+
}), t.expose(i.value), () => F(Pn, ce(e, {
|
|
1681
|
+
ref: n
|
|
1682
|
+
}), null);
|
|
1683
|
+
}
|
|
1684
|
+
}), he = /* @__PURE__ */ new Map([
|
|
1685
|
+
["appearance", wo]
|
|
1686
|
+
]), Mn = /* @__PURE__ */ new Map([]), $n = "root-viewmodel";
|
|
1687
|
+
class Dn {
|
|
1688
|
+
constructor(t, n) {
|
|
1689
|
+
le(this, "formSchemaUtils");
|
|
1690
|
+
le(this, "controlCreatorUtils");
|
|
1691
|
+
le(this, "designViewModelUtils");
|
|
1692
|
+
this.resolver = t, this.designerHostService = n, this.formSchemaUtils = this.designerHostService.formSchemaUtils, this.controlCreatorUtils = this.designerHostService.controlCreatorUtils, this.designViewModelUtils = this.designerHostService.designViewModelUtils;
|
|
1693
|
+
}
|
|
1694
|
+
createComponent(t) {
|
|
1695
|
+
const n = this.createComponentRefNode(t), a = this.createComponentNode(t), o = this.createViewModeNode(t), s = this.formSchemaUtils.getFormSchema();
|
|
1696
|
+
return s.module.viewmodels.push(o), s.module.components.push(a), this.designViewModelUtils.assembleDesignViewModel(), n;
|
|
1697
|
+
}
|
|
1698
|
+
createComponentRefNode(t) {
|
|
1699
|
+
const n = this.resolver.getSchemaByType("component-ref");
|
|
1700
|
+
return Object.assign(n, {
|
|
1701
|
+
id: `${t.componentId}-component-ref`,
|
|
1702
|
+
component: `${t.componentId}-component`
|
|
1703
|
+
}), n;
|
|
1704
|
+
}
|
|
1705
|
+
createComponentNode(t) {
|
|
1706
|
+
const n = this.resolver.getSchemaByType("component"), a = this.createFormComponentContents(t);
|
|
1707
|
+
return Object.assign(n, {
|
|
1708
|
+
id: `${t.componentId}-component`,
|
|
1709
|
+
viewModel: `${t.componentId}-component-viewmodel`,
|
|
1710
|
+
componentType: t.componentType,
|
|
1711
|
+
appearance: {
|
|
1712
|
+
class: this.getFormComponentClass(t)
|
|
1713
|
+
},
|
|
1714
|
+
formColumns: t.formColumns,
|
|
1715
|
+
contents: a
|
|
1716
|
+
}), n;
|
|
1717
|
+
}
|
|
1718
|
+
/**
|
|
1719
|
+
* 获取卡片组件层级的class样式
|
|
1720
|
+
*/
|
|
1721
|
+
getFormComponentClass(t) {
|
|
1722
|
+
var a, o;
|
|
1723
|
+
const { templateId: n } = this.formSchemaUtils.getFormSchema().module;
|
|
1724
|
+
if (n === "double-list-in-tab-template" && ((o = (a = t.parentComponentInstance) == null ? void 0 : a.schema) == null ? void 0 : o.type) === "tab-page") {
|
|
1725
|
+
const s = t.parentComponentInstance.parent && t.parentComponentInstance.parent.schema;
|
|
1726
|
+
if ((s == null ? void 0 : s.type) === "tabs" && (s == null ? void 0 : s.fill) === !0)
|
|
1727
|
+
return "f-struct-wrapper f-utils-fill-flex-column";
|
|
1728
|
+
}
|
|
1729
|
+
return "f-struct-wrapper";
|
|
1730
|
+
}
|
|
1731
|
+
createFormComponentContents(t) {
|
|
1732
|
+
var h, d;
|
|
1733
|
+
const n = this.resolver.getSchemaByType("section");
|
|
1734
|
+
Object.assign(n, {
|
|
1735
|
+
id: t.componentId + "-form-section",
|
|
1736
|
+
appearance: {
|
|
1737
|
+
class: "f-section-form f-section-in-mainsubcard"
|
|
1738
|
+
},
|
|
1739
|
+
mainTitle: t.componentName
|
|
1740
|
+
});
|
|
1741
|
+
const a = this.resolver.getSchemaByType("response-form"), o = [];
|
|
1742
|
+
Object.assign(a, {
|
|
1743
|
+
id: t.componentId + "-form",
|
|
1744
|
+
appearance: {
|
|
1745
|
+
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
1746
|
+
},
|
|
1747
|
+
contents: o,
|
|
1748
|
+
controlsInline: !0
|
|
1749
|
+
}), n.contents = [a];
|
|
1750
|
+
const { selectedFields: s } = t;
|
|
1751
|
+
s == null || s.forEach((g) => {
|
|
1752
|
+
if (g.$type === be.SimpleField) {
|
|
1753
|
+
const C = an(g), u = this.resolveControlClassByFormColumns(t), w = this.controlCreatorUtils.setFormFieldProperty(C, "", u);
|
|
1754
|
+
w && o.push(w);
|
|
1755
|
+
}
|
|
1756
|
+
});
|
|
1757
|
+
const { templateId: i } = this.formSchemaUtils.getFormSchema().module;
|
|
1758
|
+
if (i === "double-list-in-tab-template" && ((d = (h = t.parentComponentInstance) == null ? void 0 : h.schema) == null ? void 0 : d.type) === "tab-page") {
|
|
1759
|
+
const g = t.parentComponentInstance.parent && t.parentComponentInstance.parent.schema;
|
|
1760
|
+
(g == null ? void 0 : g.type) === "tabs" && (g == null ? void 0 : g.fill) === !0 && (n.appearance.class = "f-section-grid f-section-in-main px-0 pt-0", n.fill = !0);
|
|
1761
|
+
}
|
|
1762
|
+
return [n];
|
|
1763
|
+
}
|
|
1764
|
+
resolveControlClassByFormColumns(t) {
|
|
1765
|
+
let n = "";
|
|
1766
|
+
switch (t.formColumns) {
|
|
1767
|
+
case 1: {
|
|
1768
|
+
n = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
1769
|
+
break;
|
|
1770
|
+
}
|
|
1771
|
+
case 2: {
|
|
1772
|
+
n = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
1773
|
+
break;
|
|
1774
|
+
}
|
|
1775
|
+
case 3: {
|
|
1776
|
+
n = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
1777
|
+
break;
|
|
1778
|
+
}
|
|
1779
|
+
case 4: {
|
|
1780
|
+
n = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
1781
|
+
break;
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
return n;
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* 添加viewModel节点
|
|
1788
|
+
*/
|
|
1789
|
+
createViewModeNode(t) {
|
|
1790
|
+
return {
|
|
1791
|
+
id: `${t.componentId}-component-viewmodel`,
|
|
1792
|
+
code: `${t.componentId}-component-viewmodel`,
|
|
1793
|
+
name: t.componentName,
|
|
1794
|
+
bindTo: t.bindTo,
|
|
1795
|
+
parent: $n,
|
|
1796
|
+
fields: this.assembleViewModelFields(t),
|
|
1797
|
+
commands: [],
|
|
1798
|
+
states: [],
|
|
1799
|
+
enableValidation: !0
|
|
1800
|
+
};
|
|
1801
|
+
}
|
|
1802
|
+
/**
|
|
1803
|
+
* 组装viewModel fields 节点
|
|
1804
|
+
*/
|
|
1805
|
+
assembleViewModelFields(t) {
|
|
1806
|
+
const n = [], { selectedFields: a } = t;
|
|
1807
|
+
return a == null || a.forEach((o) => {
|
|
1808
|
+
if (o.$type === be.SimpleField) {
|
|
1809
|
+
let s = "blur";
|
|
1810
|
+
const i = o.type.name;
|
|
1811
|
+
(i === we.Enum || i === we.Boolean) && (s = "change"), n.push({
|
|
1812
|
+
type: "Form",
|
|
1813
|
+
id: o.id,
|
|
1814
|
+
fieldName: o.bindingField,
|
|
1815
|
+
groupId: null,
|
|
1816
|
+
groupName: null,
|
|
1817
|
+
updateOn: s,
|
|
1818
|
+
fieldSchema: {}
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
}), n;
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
function Un(e, t, n, a) {
|
|
1825
|
+
var s, i, h, d, g, C;
|
|
1826
|
+
const o = n.parentComponentInstance;
|
|
1827
|
+
if (o && a) {
|
|
1828
|
+
const u = (s = o.schema) == null ? void 0 : s.type, x = {
|
|
1829
|
+
componentId: `form-${Math.random().toString(36).slice(2, 6)}`,
|
|
1830
|
+
componentName: ((i = n.bindingSourceContext) == null ? void 0 : i.entityTitle) || ((d = (h = n.bindingSourceContext) == null ? void 0 : h.bindingEntity) == null ? void 0 : d.name) || "标题",
|
|
1831
|
+
componentType: "form",
|
|
1832
|
+
formColumns: u === "splitter-pane" ? 1 : 4,
|
|
1833
|
+
parentContainerId: o.schema.id,
|
|
1834
|
+
parentComponentInstance: o,
|
|
1835
|
+
bindTo: ((g = n.bindingSourceContext) == null ? void 0 : g.bindTo) || "/",
|
|
1836
|
+
selectedFields: (C = n.bindingSourceContext) == null ? void 0 : C.bindingEntityFields
|
|
1837
|
+
};
|
|
1838
|
+
return new Dn(e, a).createComponent(x);
|
|
1839
|
+
} else
|
|
1840
|
+
return t;
|
|
1841
|
+
}
|
|
1842
|
+
function Rn(e, t, n) {
|
|
1843
|
+
return t;
|
|
1844
|
+
}
|
|
1845
|
+
const An = "https://json-schema.org/draft/2020-12/schema", qn = "https://farris-design.gitee.io/grid-field-editor.schema.json", Sn = "response-form-layout-setting", Gn = "A Farris Data Grid Component", On = "object", jn = {
|
|
1846
|
+
id: {
|
|
1847
|
+
description: "The unique identifier for a Input Group",
|
|
1848
|
+
type: "string"
|
|
1849
|
+
},
|
|
1850
|
+
type: {
|
|
1851
|
+
description: "The type string of Input Group component",
|
|
1852
|
+
type: "string",
|
|
1853
|
+
default: "response-form-layout-setting"
|
|
1854
|
+
},
|
|
1855
|
+
initialState: {
|
|
1856
|
+
description: "",
|
|
1857
|
+
type: "object"
|
|
1858
|
+
}
|
|
1859
|
+
}, Zn = [
|
|
1860
|
+
"id",
|
|
1861
|
+
"type"
|
|
1862
|
+
], Wn = {
|
|
1863
|
+
$schema: An,
|
|
1864
|
+
$id: qn,
|
|
1865
|
+
title: Sn,
|
|
1866
|
+
description: Gn,
|
|
1867
|
+
type: On,
|
|
1868
|
+
properties: jn,
|
|
1869
|
+
required: Zn
|
|
1870
|
+
}, Se = {
|
|
1871
|
+
initialState: {
|
|
1872
|
+
type: Object,
|
|
1873
|
+
default: {
|
|
1874
|
+
uniqueColClassInSM: 12,
|
|
1875
|
+
uniqueColClassInMD: 6,
|
|
1876
|
+
uniqueColClassInLG: 3,
|
|
1877
|
+
uniqueColClassInEL: 2
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
}, Jn = de(Se, Wn, Mn, Rn), zn = /* @__PURE__ */ H({
|
|
1881
|
+
name: "FResponseFormLayoutSetting",
|
|
1882
|
+
props: Se,
|
|
1883
|
+
emits: ["change"],
|
|
1884
|
+
setup(e, t) {
|
|
1885
|
+
const n = [1], a = [1, 2], o = [1, 2, 3, 4], s = [1, 2, 3, 4, 6];
|
|
1886
|
+
let i = [], h = [], d = [], g = [];
|
|
1887
|
+
const C = V(e.initialState), u = V(-1), w = V(-1), x = V(-1), $ = V(-1);
|
|
1888
|
+
function U() {
|
|
1889
|
+
const b = "自定义", B = 12 / C.value.uniqueColClassInSM;
|
|
1890
|
+
n.includes(B) ? u.value = B : (i.push({
|
|
1891
|
+
value: 0,
|
|
1892
|
+
name: b
|
|
1893
|
+
}), u.value = 0);
|
|
1894
|
+
const M = 12 / C.value.uniqueColClassInMD;
|
|
1895
|
+
a.includes(M) ? w.value = M : (h.push({
|
|
1896
|
+
value: 0,
|
|
1897
|
+
name: b
|
|
1898
|
+
}), w.value = 0);
|
|
1899
|
+
const O = 12 / C.value.uniqueColClassInLG;
|
|
1900
|
+
o.includes(O) ? x.value = O : (d.push({
|
|
1901
|
+
value: 0,
|
|
1902
|
+
name: b
|
|
1903
|
+
}), x.value = 0);
|
|
1904
|
+
const S = 12 / C.value.uniqueColClassInEL;
|
|
1905
|
+
s.includes(S) ? $.value = S : (g.push({
|
|
1906
|
+
value: 0,
|
|
1907
|
+
name: b
|
|
1908
|
+
}), $.value = 0), i = [...i], h = [...h], d = [...d], g = [...g];
|
|
1909
|
+
}
|
|
1910
|
+
function A() {
|
|
1911
|
+
n.forEach((b) => {
|
|
1912
|
+
i.push({
|
|
1913
|
+
value: b,
|
|
1914
|
+
name: b + ""
|
|
1915
|
+
});
|
|
1916
|
+
}), a.forEach((b) => {
|
|
1917
|
+
h.push({
|
|
1918
|
+
value: b,
|
|
1919
|
+
name: b + ""
|
|
1920
|
+
});
|
|
1921
|
+
}), o.forEach((b) => {
|
|
1922
|
+
d.push({
|
|
1923
|
+
value: b,
|
|
1924
|
+
name: b + ""
|
|
1925
|
+
});
|
|
1926
|
+
}), s.forEach((b) => {
|
|
1927
|
+
g.push({
|
|
1928
|
+
value: b,
|
|
1929
|
+
name: b + ""
|
|
1930
|
+
});
|
|
1931
|
+
});
|
|
1932
|
+
}
|
|
1933
|
+
function L() {
|
|
1934
|
+
sn.question("应用统一布局,将重置区域内部所有控件的宽度样式,确定应用?", "", () => {
|
|
1935
|
+
C.value.uniqueColClassInSM = u.value === 0 ? null : 12 / u.value, C.value.uniqueColClassInMD = w.value === 0 ? null : 12 / w.value, C.value.uniqueColClassInLG = x.value === 0 ? null : 12 / x.value, C.value.uniqueColClassInEL = $.value === 0 ? null : 12 / $.value, t.emit("change", C.value);
|
|
1936
|
+
}, () => {
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1939
|
+
return me(() => {
|
|
1940
|
+
A(), U();
|
|
1941
|
+
}), () => F("div", null, [F("div", {
|
|
1942
|
+
class: "f-form-layout farris-form farris-form-controls-inline"
|
|
1943
|
+
}, [F("div", {
|
|
1944
|
+
class: "form-group farris-form-group screenGroup"
|
|
1945
|
+
}, [F("span", {
|
|
1946
|
+
class: "screenName"
|
|
1947
|
+
}, [ee(" 小屏幕 ")]), F("div", {
|
|
1948
|
+
class: "d-flex ml-2 screen-input"
|
|
1949
|
+
}, [F(ue, {
|
|
1950
|
+
data: i,
|
|
1951
|
+
idField: "value",
|
|
1952
|
+
valueField: "value",
|
|
1953
|
+
editable: !1,
|
|
1954
|
+
enableClear: !1,
|
|
1955
|
+
modelValue: u.value,
|
|
1956
|
+
"onUpdate:modelValue": (b) => u.value = b
|
|
1957
|
+
}, null), F("span", {
|
|
1958
|
+
class: "ml-2 columnText"
|
|
1959
|
+
}, [ee("列")])])]), F("div", {
|
|
1960
|
+
class: "form-group farris-form-group screenGroup"
|
|
1961
|
+
}, [F("span", {
|
|
1962
|
+
class: "screenName"
|
|
1963
|
+
}, [ee("中等屏幕")]), F("div", {
|
|
1964
|
+
class: "d-flex ml-2 screen-input"
|
|
1965
|
+
}, [F(ue, {
|
|
1966
|
+
data: h,
|
|
1967
|
+
idField: "value",
|
|
1968
|
+
valueField: "value",
|
|
1969
|
+
editable: !1,
|
|
1970
|
+
enableClear: !1,
|
|
1971
|
+
modelValue: w.value,
|
|
1972
|
+
"onUpdate:modelValue": (b) => w.value = b
|
|
1973
|
+
}, null), F("span", {
|
|
1974
|
+
class: "ml-2 columnText"
|
|
1975
|
+
}, [ee("列")])])]), F("div", {
|
|
1976
|
+
class: "form-group farris-form-group screenGroup"
|
|
1977
|
+
}, [F("span", {
|
|
1978
|
+
class: "screenName"
|
|
1979
|
+
}, [ee("大屏幕")]), F("div", {
|
|
1980
|
+
class: "d-flex ml-2 screen-input"
|
|
1981
|
+
}, [F(ue, {
|
|
1982
|
+
data: d,
|
|
1983
|
+
idField: "value",
|
|
1984
|
+
valueField: "value",
|
|
1985
|
+
editable: !1,
|
|
1986
|
+
enableClear: !1,
|
|
1987
|
+
modelValue: x.value,
|
|
1988
|
+
"onUpdate:modelValue": (b) => x.value = b
|
|
1989
|
+
}, null), F("span", {
|
|
1990
|
+
class: "ml-2 columnText"
|
|
1991
|
+
}, [ee("列")])])]), F("div", {
|
|
1992
|
+
class: "form-group farris-form-group screenGroup"
|
|
1993
|
+
}, [F("span", {
|
|
1994
|
+
class: "screenName"
|
|
1995
|
+
}, [ee("极大屏幕")]), F("div", {
|
|
1996
|
+
class: "d-flex ml-2 screen-input"
|
|
1997
|
+
}, [F(ue, {
|
|
1998
|
+
data: g,
|
|
1999
|
+
idField: "value",
|
|
2000
|
+
valueField: "value",
|
|
2001
|
+
editable: !1,
|
|
2002
|
+
enableClear: !1,
|
|
2003
|
+
modelValue: $.value,
|
|
2004
|
+
"onUpdate:modelValue": (b) => $.value = b
|
|
2005
|
+
}, null), F("span", {
|
|
2006
|
+
class: "ml-2 columnText"
|
|
2007
|
+
}, [ee("列")])])])]), F("div", {
|
|
2008
|
+
class: "applyBtn"
|
|
2009
|
+
}, [F("button", {
|
|
2010
|
+
class: "btn f-rt-btn btn-primary",
|
|
2011
|
+
type: "button",
|
|
2012
|
+
onClick: () => L()
|
|
2013
|
+
}, [ee("应用")])])]);
|
|
2014
|
+
}
|
|
2015
|
+
}), Xn = "https://json-schema.org/draft/2020-12/schema", Kn = "https://farris-design.gitee.io/response-form.schema.json", Qn = "response-form", _n = "A Farris Data Collection Component", Yn = "object", Hn = {
|
|
2016
|
+
id: {
|
|
2017
|
+
description: "The unique identifier for a form group",
|
|
2018
|
+
type: "string"
|
|
2019
|
+
},
|
|
2020
|
+
type: {
|
|
2021
|
+
description: "The type string of form group component",
|
|
2022
|
+
type: "string",
|
|
2023
|
+
default: "response-form"
|
|
2024
|
+
},
|
|
2025
|
+
appearance: {
|
|
2026
|
+
description: "",
|
|
2027
|
+
type: "object",
|
|
2028
|
+
properties: {
|
|
2029
|
+
class: {
|
|
2030
|
+
type: "string"
|
|
2031
|
+
},
|
|
2032
|
+
style: {
|
|
2033
|
+
type: "string"
|
|
2034
|
+
}
|
|
2035
|
+
},
|
|
2036
|
+
default: {}
|
|
2037
|
+
},
|
|
2038
|
+
contents: {
|
|
2039
|
+
description: "",
|
|
2040
|
+
type: "array",
|
|
2041
|
+
default: []
|
|
2042
|
+
},
|
|
2043
|
+
visible: {
|
|
2044
|
+
description: "",
|
|
2045
|
+
type: "boolean",
|
|
2046
|
+
default: !0
|
|
2047
|
+
},
|
|
2048
|
+
labelAutoOverflow: {
|
|
2049
|
+
description: "",
|
|
2050
|
+
type: "boolean",
|
|
2051
|
+
default: !1
|
|
2052
|
+
},
|
|
2053
|
+
adaptForLanguage: {
|
|
2054
|
+
description: "",
|
|
2055
|
+
type: "boolean",
|
|
2056
|
+
default: !0
|
|
2057
|
+
}
|
|
2058
|
+
}, er = [
|
|
2059
|
+
"id",
|
|
2060
|
+
"type",
|
|
2061
|
+
"contents"
|
|
2062
|
+
], tr = {
|
|
2063
|
+
$schema: Xn,
|
|
2064
|
+
$id: Kn,
|
|
2065
|
+
title: Qn,
|
|
2066
|
+
description: _n,
|
|
2067
|
+
type: Yn,
|
|
2068
|
+
properties: Hn,
|
|
2069
|
+
required: er
|
|
2070
|
+
}, or = "https://json-schema.org/draft/2020-12/schema", nr = "https://farris-design.gitee.io/form-group.schema.json", rr = "form-group", ar = "A Farris Input Component", ir = "object", sr = {
|
|
2071
|
+
id: {
|
|
2072
|
+
description: "The unique identifier for a form group",
|
|
2073
|
+
type: "string"
|
|
2074
|
+
},
|
|
2075
|
+
type: {
|
|
2076
|
+
description: "The type string of form group component",
|
|
2077
|
+
type: "string",
|
|
2078
|
+
default: "form-group"
|
|
2079
|
+
},
|
|
2080
|
+
appearance: {
|
|
2081
|
+
description: "",
|
|
2082
|
+
type: "object",
|
|
2083
|
+
properties: {
|
|
2084
|
+
class: {
|
|
2085
|
+
type: "string"
|
|
2086
|
+
},
|
|
2087
|
+
style: {
|
|
2088
|
+
type: "string"
|
|
2089
|
+
}
|
|
2090
|
+
},
|
|
2091
|
+
default: {}
|
|
2092
|
+
},
|
|
2093
|
+
enableLinkLabel: {
|
|
2094
|
+
description: "",
|
|
2095
|
+
type: "boolean",
|
|
2096
|
+
default: !1
|
|
2097
|
+
},
|
|
2098
|
+
editor: {
|
|
2099
|
+
description: "",
|
|
2100
|
+
type: "object",
|
|
2101
|
+
default: null
|
|
2102
|
+
},
|
|
2103
|
+
label: {
|
|
2104
|
+
description: "",
|
|
2105
|
+
type: "string",
|
|
2106
|
+
default: ""
|
|
2107
|
+
},
|
|
2108
|
+
lableWidth: {
|
|
2109
|
+
description: "",
|
|
2110
|
+
type: "number"
|
|
2111
|
+
},
|
|
2112
|
+
binding: {
|
|
2113
|
+
description: "",
|
|
2114
|
+
type: "object",
|
|
2115
|
+
default: {}
|
|
2116
|
+
},
|
|
2117
|
+
visible: {
|
|
2118
|
+
description: "",
|
|
2119
|
+
type: "boolean",
|
|
2120
|
+
default: !0
|
|
2121
|
+
},
|
|
2122
|
+
required: {
|
|
2123
|
+
description: "",
|
|
2124
|
+
type: "boolean",
|
|
2125
|
+
default: !1
|
|
2126
|
+
},
|
|
2127
|
+
errors: {
|
|
2128
|
+
description: "",
|
|
2129
|
+
type: "object",
|
|
2130
|
+
default: null
|
|
2131
|
+
},
|
|
2132
|
+
name: {
|
|
2133
|
+
description: "The name string of form group component",
|
|
2134
|
+
type: "string",
|
|
2135
|
+
default: "form group"
|
|
2136
|
+
},
|
|
2137
|
+
showLabelType: {
|
|
2138
|
+
description: "",
|
|
2139
|
+
type: "string"
|
|
2140
|
+
},
|
|
2141
|
+
fill: {
|
|
2142
|
+
type: "boolean",
|
|
2143
|
+
default: !1
|
|
2144
|
+
}
|
|
2145
|
+
}, lr = [
|
|
2146
|
+
"id",
|
|
2147
|
+
"type",
|
|
2148
|
+
"editor"
|
|
2149
|
+
], Ge = {
|
|
2150
|
+
$schema: or,
|
|
2151
|
+
$id: nr,
|
|
2152
|
+
title: rr,
|
|
2153
|
+
description: ar,
|
|
2154
|
+
type: ir,
|
|
2155
|
+
properties: sr,
|
|
2156
|
+
required: lr
|
|
2157
|
+
}, Oe = de(Me, tr, he, Un), je = de(
|
|
2158
|
+
pe,
|
|
2159
|
+
Ge,
|
|
2160
|
+
he,
|
|
2161
|
+
void 0
|
|
2162
|
+
), ur = Vo(), cr = de(
|
|
2163
|
+
Ue,
|
|
2164
|
+
Ge,
|
|
2165
|
+
he,
|
|
2166
|
+
void 0
|
|
2167
|
+
);
|
|
2168
|
+
se.register = (e, t, n, a) => {
|
|
2169
|
+
e["form-group"] = fn, t["form-group"] = je, e["response-form"] = se, t["response-form"] = Oe, e["form-input"] = fe, t["form-input"] = cr, a["form-group"] = { editorResolver: ur }, e["response-form-layout-setting"] = zn, t["response-form-layout-setting"] = Jn;
|
|
2170
|
+
};
|
|
2171
|
+
se.registerDesigner = (e, t, n) => {
|
|
2172
|
+
e["form-group"] = Nn, t["form-group"] = je, e["response-form"] = vn, t["response-form"] = Oe;
|
|
2173
|
+
};
|
|
2174
|
+
se.install = (e) => {
|
|
2175
|
+
e.component(se.name, se).component(fe.name, fe).component(Ve.name, Ve);
|
|
1039
2176
|
};
|
|
1040
2177
|
export {
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
2178
|
+
fn as FDynamicFormGroup,
|
|
2179
|
+
fe as FDynamicFormInput,
|
|
2180
|
+
$e as FDynamicFormLabel,
|
|
2181
|
+
Ve as FFormControl,
|
|
2182
|
+
se as FResponseForm,
|
|
2183
|
+
se as default,
|
|
2184
|
+
pe as dynamicFormGroupProps,
|
|
2185
|
+
Ue as dynamicFormInputProps,
|
|
2186
|
+
ur as editorResolver,
|
|
2187
|
+
je as formGroupPropsResolver,
|
|
2188
|
+
cr as formInputPropsResolver,
|
|
2189
|
+
Oe as formPropsResolver,
|
|
2190
|
+
Me as responseFormProps,
|
|
2191
|
+
hn as useDesignerRules,
|
|
2192
|
+
De as useTypeResolver
|
|
1052
2193
|
};
|