@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.
@@ -1,125 +1,134 @@
1
- import { defineComponent as oe, ref as v, computed as G, withDirectives as Fe, createVNode as x, resolveDirective as be, watch as te, createTextVNode as ve, mergeProps as ae } from "vue";
2
- import { LocaleService as we } from "../locale/index.esm.js";
3
- import Ie from "../../designer/accordion/index.esm.js";
4
- import Ve from "../../designer/avatar/index.esm.js";
5
- import ke from "../../designer/button-edit/index.esm.js";
6
- import Be from "../../designer/button-group/index.esm.js";
7
- import de, { calendarProps as Te } from "../calendar/index.esm.js";
8
- import Ee from "../../designer/capsule/index.esm.js";
9
- import ie from "../../designer/checkbox/index.esm.js";
10
- import le from "../../designer/checkbox-group/index.esm.js";
11
- import Le from "../../designer/combo-list/index.esm.js";
12
- import Pe from "../../designer/combo-tree/index.esm.js";
13
- import Ue from "../../designer/component/index.esm.js";
14
- import xe from "../../designer/color-picker/index.esm.js";
15
- import Ne from "../content-container/index.esm.js";
16
- import De from "../../designer/date-picker/index.esm.js";
17
- import Me from "../../designer/data-grid/index.esm.js";
18
- import Re from "../../designer/dropdown/index.esm.js";
19
- import qe from "../../designer/dynamic-form/index.esm.js";
20
- import Ae from "../events-editor/index.esm.js";
21
- import Oe from "../filter-bar/index.esm.js";
22
- import $e from "../field-selector/index.esm.js";
23
- import Ge from "../../designer/binding-selector/index.esm.js";
24
- import je from "../../designer/image-cropper/index.esm.js";
25
- import We from "../../designer/input-group/index.esm.js";
26
- import Ke from "../layout/index.esm.js";
27
- import Xe from "../list-nav/index.esm.js";
28
- import _e from "../../designer/list-view/index.esm.js";
29
- import me, { lookupProps as Je } from "../lookup/index.esm.js";
30
- import Qe from "../mapping-editor/index.esm.js";
31
- import ze from "../../designer/nav/index.esm.js";
32
- import Ye from "../../designer/number-range/index.esm.js";
33
- import Ze from "../../designer/number-spinner/index.esm.js";
34
- import Se from "../../designer/order/index.esm.js";
35
- import He from "../page-header/index.esm.js";
36
- import et from "../../designer/page-footer/index.esm.js";
37
- import tt from "../../designer/pagination/index.esm.js";
38
- import ot from "../../designer/progress/index.esm.js";
39
- import nt from "../query-solution/index.esm.js";
40
- import rt from "../../designer/radio-group/index.esm.js";
41
- import at from "../../designer/rate/index.esm.js";
42
- import it from "../../designer/response-toolbar/index.esm.js";
43
- import lt from "../response-layout/index.esm.js";
44
- import st, { useResponseLayoutEditorSetting as ut } from "../../designer/response-layout-editor/index.esm.js";
45
- import ct from "../../designer/search-box/index.esm.js";
46
- import dt from "../../designer/section/index.esm.js";
47
- import mt from "../../designer/smoke-detector/index.esm.js";
48
- import ft from "../../designer/splitter/index.esm.js";
49
- import pt from "../../designer/step/index.esm.js";
50
- import gt from "../../designer/switch/index.esm.js";
51
- import yt from "../../designer/tabs/index.esm.js";
52
- import ht from "../../designer/tags/index.esm.js";
53
- import Ct from "../../designer/text/index.esm.js";
54
- import Ft from "../../designer/time-picker/index.esm.js";
55
- import bt from "../../designer/transfer/index.esm.js";
56
- import vt from "../../designer/tree-view/index.esm.js";
57
- import wt from "../../designer/uploader/index.esm.js";
58
- import It from "../../designer/verify-detail/index.esm.js";
59
- import Vt from "../../designer/video/index.esm.js";
60
- import kt from "../../designer/textarea/index.esm.js";
61
- import Bt from "../schema-selector/index.esm.js";
62
- import Tt from "../../designer/tree-grid/index.esm.js";
63
- import Et from "../event-parameter/index.esm.js";
64
- import Lt from "../../designer/filter-condition-editor/index.esm.js";
65
- import Pt from "../fieldset/index.esm.js";
66
- import Ut from "../../designer/sort-condition-editor/index.esm.js";
67
- import xt from "../../designer/menu-lookup/index.esm.js";
68
- import Nt from "../../designer/drawer/index.esm.js";
69
- import Dt from "../../designer/json-editor/index.esm.js";
70
- import Mt from "../property-editor/index.esm.js";
71
- import Rt from "../../designer/expression-editor/index.esm.js";
72
- import qt from "../../designer/code-editor/index.esm.js";
73
- import At from "../../designer/html-template/index.esm.js";
74
- import Ot from "../collection-property-editor/index.esm.js";
75
- import $t from "../../designer/modal/index.esm.js";
76
- import Gt from "../external-container/index.esm.js";
77
- import fe, { languageTextBoxProps as jt } from "../language-textbox/index.esm.js";
78
- import Wt from "../image/index.esm.js";
79
- import Kt from "../comment/index.esm.js";
80
- import { schemaResolverMap as Xt, propertyEffectMap as _t, propertyConfigSchemaMap as Jt, schemaMap as pe, createPropsResolver as Qt } from "../dynamic-resolver/index.esm.js";
81
- import { useThirdComponent as zt, isMobilePhone as Yt, useGuid as se } from "../common/index.esm.js";
82
- import Zt, { buttonEditProps as St } from "../button-edit/index.esm.js";
83
- import Ht, { checkboxProps as eo } from "../checkbox/index.esm.js";
84
- import to, { checkboxGroupProps as oo } from "../checkbox-group/index.esm.js";
85
- import no, { comboListProps as ro } from "../combo-list/index.esm.js";
86
- import ao, { datePickerProps as io } from "../date-picker/index.esm.js";
87
- import lo, { inputGroupProps as so } from "../input-group/index.esm.js";
88
- import uo, { numberRangeProps as co } from "../number-range/index.esm.js";
89
- import mo, { numberSpinnerProps as fo } from "../number-spinner/index.esm.js";
90
- import po, { progressProps as go } from "../progress/index.esm.js";
91
- import yo, { radioGroupProps as ho } from "../radio-group/index.esm.js";
92
- import Co, { rateProps as Fo } from "../rate/index.esm.js";
93
- import bo, { switchProps as vo } from "../switch/index.esm.js";
94
- import wo, { timePickerProps as Io } from "../time-picker/index.esm.js";
95
- import Vo, { textAreaProps as ko } from "../textarea/index.esm.js";
96
- import { DgControl as ne, refreshCanvas as Bo, UseTemplateDragAndDropRules as To, useDragulaCommonRule as Eo } from "../designer-canvas/index.esm.js";
97
- import { BaseControlProperty as Lo, FormBindingType as ee } from "../property-panel/index.esm.js";
98
- const Po = {
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
- }, re = /* @__PURE__ */ oe({
114
+ }, se = /* @__PURE__ */ H({
106
115
  name: "FResponseForm",
107
- props: Po,
116
+ props: Me,
108
117
  emits: [],
109
- setup(e, o) {
110
- const m = v(), p = G(() => {
111
- const r = we.getLocale(), V = e.customClass.split(" "), y = {
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 V.reduce((w, f) => (w[f] = !0, w), y), e.adaptForLanguage && r && (y["farris-form-controls-inline"] = r !== "en"), y;
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 && Fe(x("div", {
117
- ref: m,
118
- class: p.value,
125
+ return () => e.visible && Ie(F("div", {
126
+ ref: n,
127
+ class: a.value,
119
128
  style: e.customStyle
120
- }, [o.slots.default && o.slots.default()]), [[be("area-response")]]);
129
+ }, [t.slots.default && t.slots.default()]), [[Be("area-response")]]);
121
130
  }
122
- }), Uo = {
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
- }, ge = /* @__PURE__ */ oe({
142
+ }, $e = /* @__PURE__ */ H({
134
143
  name: "FDynamicFormLabel",
135
- props: Uo,
144
+ props: ln,
136
145
  emits: [],
137
- setup(e, o) {
138
- v(e.title || e.text);
139
- const m = v(e.required), p = v(e.text), r = v(e.valid), V = v(e.inValidTip);
140
- te(() => e.text, () => {
141
- p.value = e.text;
142
- }), te(() => e.required, (B, I) => {
143
- B !== I && (m.value = B);
144
- }), te([() => e.valid, () => e.inValidTip], ([B, I]) => {
145
- r.value = B, V.value = I;
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 y = G(() => r.value ? p.value : V.value), w = G(() => r.value ? "" : "color:red"), f = G(() => ({
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": m.value && (e.showType === "none" || !p.value)
151
- })), h = G(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || m.value || !!p.value && e.showType !== "none");
152
- return () => h.value && x("label", {
153
- class: f.value,
154
- title: y.value,
155
- style: w.value
156
- }, [!r.value && x("span", {
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: V.value
160
- }, null), x("span", {
168
+ title: s.value
169
+ }, null), F("span", {
161
170
  class: "farris-label-text"
162
- }, [m.value && x("span", {
171
+ }, [n.value && F("span", {
163
172
  class: "farris-label-info text-danger"
164
- }, [ve("*")]), e.showType === "visible" && p.value])]);
173
+ }, [ee("*")]), e.showType === "visible" && a.value])]);
165
174
  }
166
- }), { globalStorageKey: xo } = zt(), a = {}, i = {}, l = {}, s = {};
167
- async function No() {
175
+ }), { globalStorageKey: un } = Ne(), p = {}, m = {}, f = {}, y = {};
176
+ async function cn() {
168
177
  {
169
178
  const e = {
170
- schemaMap: pe,
171
- propertyConfigSchemaMap: Jt,
172
- propertyEffectMap: _t,
173
- schemaResolverMap: Xt
179
+ schemaMap: Le,
180
+ propertyConfigSchemaMap: Fo,
181
+ propertyEffectMap: Co,
182
+ schemaResolverMap: vo
174
183
  };
175
- Ve.register(a, i, l, s), Ie.register(a, i, l, s), ke.register(a, i, l, s), Be.register(a, i, l, s), de.register(a, i, l, s, e), Ee.register(a, i, l, s), ie.register(a, i, l, s, e), le.register(a, i, l, s, e), ie.register(a, i, l, s, e), le.register(a, i, l, s, e), Le.register(a, i, l, s, e), Pe.register(a, i, l, s), Ue.register(a, i, l, s), Ne.register(a, i, l, s, e), xe.register(a, i, l, s), De.register(a, i, l, s, e), Me.register(a, i, l, s, e), Re.register(a, i, l, s), qe.register(a, i, l, s, e), Ae.register(a, i, l, s), Rt.register(a, i, l, s), Oe.register(a, i, l, s), $e.register(a, i, l, s), Lt.register(a, i, l, s), je.register(a, i, l, s), We.register(a, i, l, s, e), Ke.register(a, i, l, s, e), _e.register(a, i, l, s, e), Xe.register(a, i, l, s), me.register(a, i, l, s, e), Qe.register(a, i, l, s), ze.register(a, i, l, s), Ye.register(a, i, l, s), Ze.register(a, i, l, s, e), Se.register(a, i, l, s), He.register(a, i, l, s, e), et.register(a, i, l, s), tt.register(a, i, l, s), ot.register(a, i, l, s), nt.register(a, i, l, s, e), rt.register(a, i, l, s, e), at.register(a, i, l, s), lt.register(a, i, l, s, e), st.register(a, i, l, s), it.register(a, i, l, s), Bt.register(a, i, l), ct.register(a, i, l, s), dt.register(a, i, l, s, e), mt.register(a, i, l, s), ft.register(a, i, l, s), pt.register(a, i, l, s), gt.register(a, i, l, s, e), Ut.register(a, i, l, s), yt.register(a, i, l, s, e), ht.register(a, i, l, s), Ct.register(a, i, l, s), Ft.register(a, i, l, s, e), bt.register(a, i, l, s), vt.register(a, i, l, s), It.register(a, i, l, s), wt.register(a, i, l, s), Vt.register(a, i, l, s), kt.register(a, i, l, s, e), Tt.register(a, i, l, s), Ge.register(a, i, l, s), Et.register(a, i, l, s), Pt.register(a, i, l, s, e), xt.register(a, i, l, s), Nt.register(a, i, l, s), Dt.register(a, i, l, s), Mt.register(a, i, l, s), qt.register(a, i, l, s), At.register(a, i, l, s, e), Ot.register(a, i, l, s), $t.register(a, i, l, s), Gt.register(a, i, l, s), fe.register(a, i, l, s, e), Wt.register(a, i, l, s, e), Kt.register(a, i, l, s);
176
- const o = window[xo];
177
- if (o)
178
- for (const m in o)
179
- o[m].createPropsResolver = Qt, o[m].register(a, i, l);
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 ye() {
183
- No();
184
- function e(y) {
185
- const w = a[y];
186
- if (!w)
187
- throw new Error(`Could not find the editor of type '${y}'`);
188
- return w;
189
- }
190
- function o(y, w) {
191
- const f = i[y];
192
- return f ? f(w) : {};
193
- }
194
- function m(y) {
195
- switch (y) {
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 p(y) {
270
- switch (y) {
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 r(y) {
278
- switch (y) {
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 V(y) {
285
- switch (y) {
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: o, resolveEditorType: e, getChangeFunctionName: m, getClearFunctionName: p, getMousedownFunctionName: r, getMouseupFunctionName: V };
300
+ return { resolveEditorProps: t, resolveEditorType: e, getChangeFunctionName: n, getClearFunctionName: a, getMousedownFunctionName: o, getMouseupFunctionName: s };
292
301
  }
293
- const Do = {
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
- }, ue = /* @__PURE__ */ oe({
316
+ }, fe = /* @__PURE__ */ H({
308
317
  name: "FDynamicFormInput",
309
- props: Do,
318
+ props: Ue,
310
319
  emits: ["change", "update:modelValue", "mousedown", "mouseup"],
311
- setup(e, o) {
312
- const m = v(e.id), p = v(e.editor), r = v(e.modelValue), {
313
- resolveEditorProps: V,
314
- resolveEditorType: y,
315
- getChangeFunctionName: w,
316
- getMousedownFunctionName: f,
317
- getMouseupFunctionName: h,
318
- getClearFunctionName: B
319
- } = ye();
320
- function I(L, k, T) {
321
- r.value = k !== void 0 ? k : L, o.emit("update:modelValue", r.value), o.emit("change", r.value, {
322
- newValue: L,
323
- newModelValue: k,
324
- parameters: T
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 N(L) {
328
- o.emit("mousedown", L);
336
+ function w(b) {
337
+ t.emit("mousedown", b);
329
338
  }
330
- function A(L) {
331
- o.emit("mouseup", L);
339
+ function x(b) {
340
+ t.emit("mouseup", b);
332
341
  }
333
342
  function $() {
334
- o.emit("update:modelValue", "");
343
+ t.emit("update:modelValue", "");
335
344
  }
336
- function j(L) {
337
- return (...k) => {
338
- $(), typeof L == "function" && L(...k);
345
+ function U(b) {
346
+ return (...B) => {
347
+ $(), typeof b == "function" && b(...B);
339
348
  };
340
349
  }
341
- function J(L) {
342
- return (k, T, q) => {
343
- I(k, T, q), typeof L == "function" && L(k, T, q);
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 K = G(() => {
347
- const L = y(p.value.type), k = V(p.value.type, p.value);
348
- k.focusOnCreated = e.focusOnCreated, k.selectOnCreated = e.selectOnCreated;
349
- const T = w(p.value.type), q = B(p.value.type);
350
- q && (k[q] = j(k[q])), T && (k[T] = J(k[T]));
351
- const D = f(p.value.type);
352
- k[D] = N;
353
- const Y = h(p.value.type);
354
- return k[Y] = A, k.id = m.value, () => x(L, ae(k, {
355
- modelValue: r.value,
356
- "onUpdate:modelValue": (M) => r.value = M
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 te([() => e.id, () => e.editor, () => e.modelValue], ([L, k, T]) => {
360
- m.value = L, p.value = k, r.value = T;
361
- }), () => K.value();
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
- }), Mo = {
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
- }, he = /* @__PURE__ */ oe({
380
+ }, Re = /* @__PURE__ */ H({
372
381
  name: "FValidationMessage",
373
- props: Mo,
382
+ props: dn,
374
383
  emits: [],
375
- setup(e, o) {
376
- const m = v(e.errors);
377
- te(() => e.errors, (V) => {
378
- m.value = V;
384
+ setup(e, t) {
385
+ const n = V(e.errors);
386
+ oe(() => e.errors, (s) => {
387
+ n.value = s;
379
388
  });
380
- const p = v(!0), r = G(() => {
381
- if (m.value) {
382
- const V = Object.keys(m.value).map((y) => {
383
- var w;
384
- return (w = m.value[y]) == null ? void 0 : w.name;
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 V.length ? V.join(" ") : "";
395
+ return s.length ? s.join(" ") : "";
387
396
  }
388
397
  return "";
389
398
  });
390
- return () => r.value && x("div", {
399
+ return () => o.value && F("div", {
391
400
  class: "farris-feedback f-state-invalid",
392
- onClick: () => p.value = !p.value
393
- }, [!p.value && x("span", {
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), p.value && x("span", {
404
+ }, null), a.value && F("span", {
396
405
  class: "f-feedback-message"
397
- }, [r.value])]);
406
+ }, [o.value])]);
398
407
  }
399
408
  });
400
- function Ro(e, o) {
401
- e["button-edit"] = Zt, e.calendar = de, e["check-box"] = Ht, e["check-group"] = to, e["combo-list"] = no, e["date-picker"] = ao, e["input-group"] = lo, e.lookup = me, e["number-range"] = uo, e["number-spinner"] = mo, e.progress = po, e["radio-group"] = yo, e.rate = Co, e.switch = bo, e["time-picker"] = wo, e.textarea = Vo, e["language-textbox"] = fe, o["button-edit"] = St, o.calendar = Te, o["check-box"] = eo, o["check-group"] = oo, o["combo-list"] = ro, o["date-picker"] = io, o["input-group"] = so, o.lookup = Je, o["number-range"] = co, o["number-spinner"] = fo, o.progress = go, o["radio-group"] = ho, o.rate = Fo, o.switch = vo, o["time-picker"] = Io, o.textarea = ko, o["language-textbox"] = jt;
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 qo() {
404
- const e = {}, o = {};
405
- Ro(e, o);
406
- function m(f) {
407
- return e[f || "input-group"];
408
- }
409
- function p(f, h) {
410
- const B = o[f || "input-group"], I = Object.keys(B).reduce((N, A) => (N[A] = B[A].default, N), {});
411
- return Object.assign(I, h);
412
- }
413
- function r(f) {
414
- switch (f) {
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 V(f) {
455
- switch (f) {
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 y(f) {
463
- switch (f) {
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 w(f) {
470
- switch (f) {
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: p, resolveEditorType: m, getChangeFunctionName: r, getClearFunctionName: V, getMousedownFunctionName: y, getMouseupFunctionName: w };
485
+ return { resolveEditorProps: a, resolveEditorType: n, getChangeFunctionName: o, getClearFunctionName: s, getMousedownFunctionName: i, getMouseupFunctionName: h };
477
486
  }
478
- const Ce = {
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
- }, ce = /* @__PURE__ */ oe({
508
+ }, Ve = /* @__PURE__ */ H({
500
509
  name: "FFormControl",
501
- props: Ce,
510
+ props: pe,
502
511
  emits: ["change", "update:modelValue"],
503
- setup(e, o) {
504
- var Y;
505
- const m = v(e.id), p = v(e.customClass), r = v(e.editor), V = v(e.label), y = v(e.modelValue), w = v(e.readonly), f = v(((Y = e.editor) == null ? void 0 : Y.required) || e.required), h = v(e.showLabel), B = v(e.visible);
506
- v(e.type);
507
- const I = v(), N = v(e.errors), A = G(() => h.value ? e.showLabelType : "none"), {
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: j,
510
- getChangeFunctionName: J,
511
- getClearFunctionName: K
512
- } = qo(), L = G(() => ({
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": w.value
525
+ "q-state-readonly": h.value
517
526
  }));
518
- function k(M, X, R) {
519
- y.value = X !== void 0 ? X : M, o.emit("update:modelValue", y.value), o.emit("change", y.value, {
520
- newValue: M,
521
- newModelValue: X,
522
- parameters: R
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 T() {
526
- o.emit("update:modelValue", "");
534
+ function M() {
535
+ t.emit("update:modelValue", "");
527
536
  }
528
- const q = G(() => {
529
- const M = r.value.type || "input-group", X = j(M), R = $(M, r.value), Z = J(M), z = K(r.value.type);
530
- return z && (R[z] = T), R[Z] = k, (R.id == null || R.id === "") && (R.id = m.value), M === "number-range" && r.value.onBeginValueChange && typeof r.value.onBeginValueChange == "function" ? (r.value.onBeginValueChange && typeof r.value.onBeginValueChange == "function" && (R.onBeginValueChange = r.value.onBeginValueChange), r.value.onEndValueChange && typeof r.value.onEndValueChange == "function" && (R.onEndValueChange = r.value.onEndValueChange)) : M === "lookup" && r.value["onUpdate:idValue"] && typeof r.value["onUpdate:idValue"] == "function" && (R["onUpdate:idValue"] = r.value["onUpdate:idValue"], R.id = m.value), () => x(X, ae({
531
- ref: I
532
- }, R, {
533
- modelValue: y.value,
534
- "onUpdate:modelValue": (E) => y.value = E
535
- }), o.slots);
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 D() {
538
- return x(he, {
539
- id: `${m.value}-validation-message`,
540
- errors: N.value
546
+ function S() {
547
+ return F(Re, {
548
+ id: `${n.value}-validation-message`,
549
+ errors: w.value
541
550
  }, null);
542
551
  }
543
- return te([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([M, X, R, Z, z, E, O, t, n, u]) => {
544
- var d;
545
- m.value = M, p.value = X, r.value = R, V.value = Z, y.value = z, w.value = E, f.value = ((d = r.value) == null ? void 0 : d.required) || O, h.value = t, B.value = n, N.value = u;
546
- }), o.expose({
547
- editorRef: I
548
- }), () => B.value && x("div", {
549
- id: `${m.value}-input-group`,
550
- class: p.value,
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
- }, [x("div", {
561
+ }, [F("div", {
553
562
  class: "farris-group-wrap"
554
- }, [x("div", {
555
- class: L.value
556
- }, [x(ge, {
557
- id: `${m.value}-lable`,
558
- showType: A.value,
559
- required: f.value,
560
- text: V.value,
561
- title: V.value
562
- }, null), x("div", {
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
- }, [q.value(), D()])])])]);
573
+ }, [O.value(), S()])])])]);
565
574
  }
566
- }), Pr = /* @__PURE__ */ oe({
575
+ }), fn = /* @__PURE__ */ H({
567
576
  name: "FDynamicFormGroup",
568
- props: Ce,
577
+ props: pe,
569
578
  emits: ["change", "update:modelValue"],
570
- setup(e, o) {
571
- var z;
572
- const m = v(e.id), p = v(e.customClass), r = v(e.editor), V = v(e.label), y = v(e.modelValue), w = v(e.readonly), f = v(((z = e.editor) == null ? void 0 : z.required) || e.required), h = v(e.showLabel), B = v(e.visible);
573
- v(e.type);
574
- const I = v(), N = v(e.errors), A = Yt(), $ = v(e.editor.type || "input-group"), j = G(() => h.value ? e.showLabelType : "none"), {
575
- resolveEditorProps: J,
576
- resolveEditorType: K,
577
- getChangeFunctionName: L,
578
- getClearFunctionName: k
579
- } = ye(), T = G(() => {
580
- const E = {
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": w.value,
585
- "form-group--in-mobile": A
593
+ "q-state-readonly": h.value,
594
+ "form-group--in-mobile": x
586
595
  };
587
- return E["form-group--has-" + $.value] = !0, E;
588
- }), q = G(() => {
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(E, O, t) {
595
- y.value = O !== void 0 ? O : E, o.emit("update:modelValue", y.value), o.emit("change", y.value, {
596
- newValue: E,
597
- newModelValue: O,
598
- parameters: t
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 Y() {
602
- o.emit("update:modelValue", "");
610
+ function K() {
611
+ t.emit("update:modelValue", "");
603
612
  }
604
- function M(E) {
605
- return (...O) => {
606
- Y(), typeof E == "function" && E(...O);
613
+ function R(D) {
614
+ return (...W) => {
615
+ K(), typeof D == "function" && D(...W);
607
616
  };
608
617
  }
609
- function X(E) {
610
- return (O, t, n) => {
611
- D(O, t, n), typeof E == "function" && E(O, t, n);
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 R = G(() => {
615
- const E = r.value.type || "input-group", O = K(E), t = J(E, r.value), n = L(E), u = k(r.value.type);
616
- return u && (t[u] = M(t[u])), n && (t[n] = X(t[n])), (t.id == null || t.id === "") && (t.id = m.value), E === "number-range" && r.value.onBeginValueChange && typeof r.value.onBeginValueChange == "function" ? (r.value.onBeginValueChange && typeof r.value.onBeginValueChange == "function" && (t.onBeginValueChange = r.value.onBeginValueChange), r.value.onEndValueChange && typeof r.value.onEndValueChange == "function" && (t.onEndValueChange = r.value.onEndValueChange)) : E === "lookup" && r.value["onUpdate:idValue"] && typeof r.value["onUpdate:idValue"] == "function" ? (t["onUpdate:idValue"] = r.value["onUpdate:idValue"], t.id = m.value) : E === "collection-property-editor" && r.value.onSelectionChange && typeof r.value.onSelectionChange == "function" ? t.onSelectionChange = r.value.onSelectionChange : E === "property-editor" && (t.onBeforeOpenVariables = r.value.onBeforeOpenVariables), () => x(O, ae({
617
- ref: I
618
- }, t, {
619
- modelValue: y.value,
620
- "onUpdate:modelValue": (d) => y.value = d
621
- }), o.slots);
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 Z() {
624
- return x(he, {
625
- id: `${m.value}-validation-message`,
626
- errors: N.value
632
+ function Q() {
633
+ return F(Re, {
634
+ id: `${n.value}-validation-message`,
635
+ errors: w.value
627
636
  }, null);
628
637
  }
629
- return te([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([E, O, t, n, u, d, C, F, b, g]) => {
630
- var c;
631
- m.value = E, p.value = O, r.value = t, V.value = n, y.value = u, w.value = d, f.value = ((c = r.value) == null ? void 0 : c.required) || C, h.value = F, B.value = b, N.value = g;
632
- }), o.expose({
633
- editorRef: I
634
- }), () => B.value && x("div", {
635
- id: `${m.value}-form-group`,
636
- class: p.value,
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
- }, [x("div", {
647
+ }, [F("div", {
639
648
  class: "farris-group-wrap",
640
- style: q.value
641
- }, [x("div", {
642
- class: T.value
643
- }, [x(ge, {
644
- id: `${m.value}-lable`,
645
- showType: j.value,
646
- required: f.value,
647
- text: V.value,
648
- title: V.value
649
- }, null), x("div", {
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
- }, [R.value(), Z()])])])]);
660
+ }, [j.value(), Q()])])])]);
652
661
  }
653
662
  });
654
- function Ao(e, o) {
655
- function m(f, h = null) {
656
- if (h)
657
- return h;
658
- const B = e.getComponentById(o);
659
- return e.selectNode(B, (I) => I.id === f);
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 p(f) {
662
- const h = e.getComponentById(f);
663
- return !(!h || !h.componentType || !h.componentType.startsWith("form"));
670
+ function a(d) {
671
+ const g = e.getComponentById(d);
672
+ return !(!g || !g.componentType || !g.componentType.startsWith("form"));
664
673
  }
665
- function r(f) {
666
- const h = new Set(f);
667
- return Array.from(h).length === 1;
674
+ function o(d) {
675
+ const g = new Set(d);
676
+ return Array.from(g).length === 1;
668
677
  }
669
- function V(f) {
670
- const h = m(f.id), B = ut(e), I = [];
671
- B.getResonseFormLayoutConfig(h, I, 1);
672
- const N = I.map((T) => T.columnInSM), A = I.map((T) => T.columnInMD), $ = I.map((T) => T.columnInLG), j = I.map((T) => T.columnInEL), J = r(N) ? N[0] : 0, K = r(A) ? A[0] : 0, L = r($) ? $[0] : 0, k = r(j) ? j[0] : 0;
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: J,
675
- uniqueColClassInMD: K,
676
- uniqueColClassInLG: L,
677
- uniqueColClassInEL: k
683
+ uniqueColClassInSM: A,
684
+ uniqueColClassInMD: L,
685
+ uniqueColClassInLG: b,
686
+ uniqueColClassInEL: B
678
687
  };
679
688
  }
680
- function y(f, h) {
681
- let B, I, N, A, $ = [];
682
- if (f) {
683
- const T = f.split(" "), q = T.filter((D) => D.startsWith("col-"));
684
- B = q.find((D) => /^col-([1-9]|10|11|12)$/.test(D)), I = q.find((D) => /^col-md-([1-9]|10|11|12)$/.test(D)), N = q.find((D) => /^col-xl-([1-9]|10|11|12)$/.test(D)), A = q.find((D) => /^col-el-([1-9]|10|11|12)$/.test(D)), $ = T.filter((D) => !D.startsWith("col-"));
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 j = h.uniqueColClassInSM ? "col-" + h.uniqueColClassInSM : B, J = h.uniqueColClassInMD ? "col-md-" + h.uniqueColClassInMD : I, K = h.uniqueColClassInLG ? "col-xl-" + h.uniqueColClassInLG : N, L = h.uniqueColClassInEL ? "col-el-" + h.uniqueColClassInEL : A;
687
- return [j, J, K, L].concat($).join(" ");
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 w(f, h, B) {
690
- f = m(B, f), f.contents.forEach((I) => {
691
- if (I.type === ne.fieldset.type) {
692
- w(I, h, I.id);
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
- I.appearance || (I.appearance = {});
696
- const N = I.appearance.class;
697
- I.appearance.class = y(N, h);
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: p, assembleUnifiedLayoutContext: V, changeFormControlsByUnifiedLayoutConfig: w };
709
+ return { checkIsInFormComponent: a, assembleUnifiedLayoutContext: s, changeFormControlsByUnifiedLayoutConfig: h };
701
710
  }
702
- class Oo extends Lo {
703
- constructor(o, m) {
704
- super(o, m);
705
- }
706
- getPropertyConfig(o, m) {
707
- const p = this;
708
- this.propertyConfig.categories.basic = this.getBasicPropConfig(o);
709
- const { checkIsInFormComponent: r, assembleUnifiedLayoutContext: V, changeFormControlsByUnifiedLayoutConfig: y } = Ao(this.formSchemaUtils, this.componentId), w = this.getAppearanceConfig(o), f = r(this.componentId);
710
- return w.properties.adaptForLanguage = {
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: f,
722
+ visible: d,
714
723
  type: "boolean"
715
- }, w.properties.labelAutoOverflow = {
724
+ }, h.properties.labelAutoOverflow = {
716
725
  title: "控件标签换行",
717
726
  description: "控件标签字数超长时,换行显示。控件标签与输入框在一行展示时,此属性有效。",
718
- visible: f,
727
+ visible: d,
719
728
  type: "boolean"
720
- }, w.properties.unifiedLayout = {
729
+ }, h.properties.unifiedLayout = {
721
730
  title: "统一布局配置",
722
731
  description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
723
- visible: f,
732
+ visible: d,
724
733
  refreshPanelAfterChanged: !0,
725
734
  editor: {
726
735
  type: "response-form-layout-setting",
727
- initialState: V(o)
736
+ initialState: s(t)
728
737
  }
729
- }, w.setPropertyRelates = function(h, B) {
730
- if (h)
731
- switch (h && h.propertyID) {
738
+ }, h.setPropertyRelates = function(g, C) {
739
+ if (g)
740
+ switch (g && g.propertyID) {
732
741
  case "unifiedLayout": {
733
- y(null, h.propertyValue, o.id), p.updateElementByParentContainer(o.id, m);
742
+ i(null, g.propertyValue, t.id), a.updateElementByParentContainer(t.id, n);
734
743
  break;
735
744
  }
736
745
  case "labelAutoOverflow": {
737
- p.setLabelAutoOverflow(o, h.propertyValue), Bo();
746
+ a.setLabelAutoOverflow(t, g.propertyValue), en();
738
747
  break;
739
748
  }
740
749
  }
741
- }, this.propertyConfig.categories.appearance = w, this.propertyConfig.categories.behavior = this.getBehaviorConfig(o), this.propertyConfig;
750
+ }, this.propertyConfig.categories.appearance = h, this.propertyConfig.categories.behavior = this.getBehaviorConfig(t), this.propertyConfig;
742
751
  }
743
- setLabelAutoOverflow(o, m, p) {
744
- if (!p) {
745
- const r = this.formSchemaUtils.getComponentById(this.componentId);
746
- p = this.formSchemaUtils.selectNode(r, (V) => V.id === o.id);
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
- p && p.contents && p.contents.length && p.contents.forEach((r) => {
749
- if (r.type === ne.fieldset.type) {
750
- this.setLabelAutoOverflow(null, m, r);
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
- r.appearance || (r.appearance = {
762
+ o.appearance || (o.appearance = {
754
763
  class: ""
755
- }), r.appearance.class || (r.appearance.class = ""), m ? r.appearance.class.includes("farris-group-multi-label") || (r.appearance.class = r.appearance.class + " farris-group-multi-label") : r.appearance.class = r.appearance.class.replace("farris-group-multi-label", "").trim();
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 Ur(e, o) {
760
- const m = e.schema, p = new To(), { canMove: r, canAccept: V, canDelete: y } = p.getTemplateRule(e, o);
761
- function w(t, n) {
762
- const { sourceElement: u } = t, { componentInstance: d } = u, C = o == null ? void 0 : o.formSchemaUtils;
763
- if (!C)
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 F = C.getComponentById(d.value.belongedComponentId), b = C.getViewModelById(F.viewModel), g = C.getComponentById(e.componentInstance.value.belongedComponentId), c = C.getViewModelById(g.viewModel);
766
- return n ? b != null && b.id && (c != null && c.id) && b.id !== c.id ? b.bindTo === c.bindTo : !0 : (b == null ? void 0 : b.id) === (c == null ? void 0 : c.id);
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 f(t) {
769
- const { bindingTargetId: n } = t;
770
- if (!o)
777
+ function d(r) {
778
+ const { bindingTargetId: c } = r;
779
+ if (!t)
771
780
  return;
772
- const { formSchemaUtils: u, schemaService: d } = o, C = u.getComponentById(e.componentInstance.value.belongedComponentId), F = d.getFieldByIDAndVMID(n, C.viewModel);
773
- return !!(F != null && F.schemaField);
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 h(t) {
776
- const n = p.getComponentContext(e);
777
- if (n && n.componentClassList && n.componentClassList.includes("f-form-layout") && n.componentClassList.includes("farris-form")) {
778
- if (t.sourceType === "control" && (t.componentCategory === "input" || t.componentType === "fieldset"))
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 (t.sourceType === "move") {
781
- if (t.componentType === "form-group")
782
- return w(t, !0);
783
- if (t.componentType === "fieldset")
784
- return w(t, !1);
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 t.sourceType === "field" && t.componentCategory === "input" ? f(t) : !1;
795
+ return r.sourceType === "field" && r.componentCategory === "input" ? d(r) : !1;
787
796
  }
788
797
  return !0;
789
798
  }
790
- function B(t) {
791
- return !(!Eo().basalDragulaRuleForContainer(t, o) || !V || !h(t));
792
- }
793
- function I(t) {
794
- var c;
795
- const n = t.componentInstance, u = n.value.schema, d = o == null ? void 0 : o.formSchemaUtils, C = o == null ? void 0 : o.designViewModelUtils, F = d.getViewModelIdByComponentId(n.value.belongedComponentId), b = C.getDgViewModel(F), g = n.value.parent;
796
- if (g && ne.fieldset && ((c = g.schema) == null ? void 0 : c.type) === ne.fieldset.type && b) {
797
- const P = { groupId: null, groupName: null };
798
- switch (u.binding.type) {
799
- case ee.Form: {
800
- b.changeField(u.binding.field, P);
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 ee.Variable: {
804
- d.modifyViewModelFieldById(F, u.binding.field, P, !0);
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 N(t, n, u) {
811
- const d = n.fields.find((c) => c.id === t), C = o == null ? void 0 : o.designViewModelUtils, F = C.getDgViewModel(n.id), b = F.fields.find((c) => c.id === t);
812
- F.removeField([t]);
813
- const g = C.getDgViewModel(u);
814
- g.addField(b), d.fieldSchema && g.changeField(b.id, d.fieldSchema);
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 A(t, n, u, d = []) {
817
- const C = n.id, F = t.binding.field, b = n.fields.findIndex((c) => c.id === F);
818
- if (b > -1 && (u.fields.push(n.fields[b]), n.fields.splice(b, 1)), C === "root-viewmodel" && u.id !== "root-viewmodel") {
819
- t.binding.path && !t.binding.path.includes("root-component.") && (t.binding.path = "root-component." + t.binding.path);
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 (u.id === "root-viewmodel" && C !== "root-viewmodel" && t.binding.path && t.binding.path.includes("root-component.")) {
823
- t.binding.path = t.binding.path.replace("root-component.", "");
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 g = n.states.find((c) => c.id === F);
827
- g && (u.states = u.states ? u.states : [], u.states.findIndex((c) => c.id === g.id) < 0 && (u.states.push(g), d.push(g.id)));
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 $(t, n, u, d = []) {
830
- var b;
831
- if (!t)
838
+ function $(r, c, v, T = []) {
839
+ var N;
840
+ if (!r)
832
841
  return;
833
- const C = n.id === "root-viewmodel" && u.id !== "root-viewmodel", F = u.id === "root-viewmodel" && n.id !== "root-viewmodel";
834
- Object.keys(t).forEach((g) => {
835
- if (g === "binding")
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 c = t[g];
838
- if (c && typeof c == "object" && c.type === ee.Variable && c.field) {
839
- if (C) {
840
- c.path && !c.path.includes("root-component.") && (c.path = "root-component." + c.path);
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 (F && c.path && c.path.includes("root-component.")) {
844
- c.path = c.path.replace("root-component.", "");
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 P = n.states.find((U) => U.id === c.field);
848
- if (P) {
849
- d.push(P.id), u.states = u.states ? u.states : [];
850
- const U = u.states.find((S) => S.code === P.code);
851
- if (U)
852
- c.field = U.id;
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 S = Object.assign({}, { newId: se().guid() }, P);
855
- u.states.push(S), c.field = S.newId;
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
- }), (b = u.states) != null && b.length && u.states.map((g) => {
860
- g.newId && (g.id = g.newId, delete g.newId);
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 j(t, n, u) {
864
- if (t && (n(t, u), t.contents))
865
- for (const d of t.contents)
866
- j(d, n, u);
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 J(t = [], n) {
869
- if (!t.length)
877
+ function A(r = [], c) {
878
+ if (!r.length)
870
879
  return;
871
- const u = o == null ? void 0 : o.formSchemaUtils, d = u.getComponentByViewModelId(n), C = [], F = (g, c) => {
872
- g && (Object.keys(g).forEach((P) => {
873
- const U = g[P];
874
- U && typeof U == "object" && U.type === ee.Variable && t.includes(U.field) && !c.includes(U.field) && c.push(U.field);
875
- }), g.editor && F(g.editor, c));
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
- j(d, F, C);
878
- const b = u.getViewModelById(n);
879
- t.forEach((g) => {
880
- C.includes(g) || (b.states = b.states.filter((c) => c.id !== g));
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 K(t) {
884
- const n = se().guid(), u = Object.assign({}, t, {
885
- id: n,
886
- code: t.code + n.slice(0, 4),
887
- name: t.name + n.slice(0, 4)
888
- }), F = (o == null ? void 0 : o.formSchemaUtils).getCommands().find((b) => b.id === t.cmpId);
889
- return F && F.refedHandlers.push({
890
- host: n,
891
- handler: t.handlerName
892
- }), u;
893
- }
894
- function L(t, n, u) {
895
- var P, U, S;
896
- const d = {}, C = t.type === "form-group" && t.editor ? t.editor.type : t.type, F = (P = pe[C]) == null ? void 0 : P.events;
897
- if (!F)
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(t).forEach((H) => {
900
- const Q = Object.keys(F).find((_) => _ === H);
901
- if (Q && t[Q]) {
902
- const _ = n.commands.find((W) => W.code === t[Q]);
903
- if (_) {
904
- let W = d[_.code];
905
- W || (W = K(_), d[_.code] = W, u.commands.push(W)), t[Q] = W.code;
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 g = (o == null ? void 0 : o.designViewModelUtils).getDgViewModel(u.id), c = ["valueChanging", "valueChanged"];
910
- if (((U = t.binding) == null ? void 0 : U.type) === ee.Form) {
911
- const H = (S = u.fields) == null ? void 0 : S.find((Q) => Q.id === t.binding.field);
912
- H && c.forEach((Q) => {
913
- if (H[Q]) {
914
- const _ = n.commands.find((W) => W.code === H[Q]);
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 (d[_.code])
918
- g.changeField(H.id, { [Q]: d[_.code].code });
926
+ if (T[X.code])
927
+ I.changeField(re.id, { [Y]: T[X.code].code });
919
928
  else {
920
- const W = K(_);
921
- d[_.code] = W, u.commands.push(W), g.changeField(H.id, { [Q]: W.code });
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 k(t) {
928
- const n = o == null ? void 0 : o.formSchemaUtils, u = t.componentInstance, d = u.value.schema, C = n.getViewModelIdByComponentId(u.value.belongedComponentId), F = n.getViewModelById(C), b = n.getComponentById(e.componentInstance.value.belongedComponentId), g = n.getViewModelById(b.viewModel);
929
- if (C !== g.id) {
930
- const c = d.binding.type, P = d.binding.field, U = [];
931
- switch (c) {
932
- case ee.Form: {
933
- N(P, F, g.id);
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 ee.Variable: {
937
- A(d, F, g, U);
945
+ case ae.Variable: {
946
+ x(T, P, I, G);
938
947
  break;
939
948
  }
940
949
  }
941
- $(d, F, g, U), $(d.editor, F, g, U), L(d, F, g), C !== "root-viewmodel" && J(U, C);
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 T(t) {
945
- if (!t || !t.componentInstance)
953
+ function M(r) {
954
+ if (!r || !r.componentInstance)
946
955
  return;
947
- const u = t.componentInstance.value.schema;
948
- !u.binding || !u.binding.field || (I(t), k(t));
956
+ const v = r.componentInstance.value.schema;
957
+ !v.binding || !v.binding.field || (u(r), B(r));
949
958
  }
950
- function q() {
951
- return m.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
959
+ function O() {
960
+ return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
952
961
  }
953
- function D(t) {
954
- let n = "";
955
- switch (t) {
962
+ function S(r) {
963
+ let c = "";
964
+ switch (r) {
956
965
  case 1: {
957
- n = "col-12 col-md-12 col-xl-12 col-el-12";
966
+ c = "col-12 col-md-12 col-xl-12 col-el-12";
958
967
  break;
959
968
  }
960
969
  case 2: {
961
- n = "col-12 col-md-6 col-xl-6 col-el-6";
970
+ c = "col-12 col-md-6 col-xl-6 col-el-6";
962
971
  break;
963
972
  }
964
973
  case 3: {
965
- n = "col-12 col-md-6 col-xl-4 col-el-4";
974
+ c = "col-12 col-md-6 col-xl-4 col-el-4";
966
975
  break;
967
976
  }
968
977
  case 4: {
969
- n = "col-12 col-md-6 col-xl-3 col-el-2";
978
+ c = "col-12 col-md-6 col-xl-3 col-el-2";
970
979
  break;
971
980
  }
972
981
  }
973
- return n;
982
+ return c;
974
983
  }
975
- function Y(t, n) {
976
- let u = !1;
984
+ function K(r, c) {
985
+ let v = !1;
977
986
  if (e.schema && Object.prototype.hasOwnProperty.call(e.schema, "labelAutoOverflow"))
978
- u = e.schema.labelAutoOverflow;
987
+ v = e.schema.labelAutoOverflow;
979
988
  else {
980
- const d = o == null ? void 0 : o.formSchemaUtils, C = d == null ? void 0 : d.selectNode(n, (F) => F.type === ne["response-form"].type);
981
- C && (u = C.labelAutoOverflow);
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 u && (t += " farris-group-multi-label"), t;
984
- }
985
- function M(t) {
986
- const n = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
987
- if (n && n.schema && n.schema.componentType) {
988
- const { formColumns: u } = n.schema;
989
- let d = D(u);
990
- d = o == null ? void 0 : o.formSchemaUtils.getControlClassByFormUnifiedLayout(d, n.schema.id, e.schema), d = Y(d, n.schema), t.appearance || (t.appearance = {}), t.appearance.class = d;
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 X(t, n, u, d) {
994
- const { bindingSourceContext: C, parentComponentInstance: F } = t;
995
- if (C != null && C.entityFieldNode && F) {
996
- const b = o == null ? void 0 : o.designViewModelUtils, c = (o == null ? void 0 : o.formSchemaUtils).getViewModelIdByComponentId(F.belongedComponentId), P = b.getDgViewModel(c);
997
- P.removeField([C.entityFieldNode.id]), P.addField(C.designViewModelField), n && P.changeField(C.entityFieldNode.id, { editor: { $type: n }, groupId: u, groupName: d });
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 R(t, n) {
1001
- var F, b, g;
1002
- const u = m;
1003
- if ((u.appearance && u.appearance.class || "").split(" ").includes("f-form-layout") && t.componentCategory === "input") {
1004
- const { label: c } = t;
1005
- let P;
1006
- const U = o == null ? void 0 : o.controlCreatorUtils;
1007
- return (F = t.bindingSourceContext) != null && F.entityFieldNode ? P = U.setFormFieldProperty((b = t.bindingSourceContext) == null ? void 0 : b.entityFieldNode, n == null ? void 0 : n.type) : (P = U.createFormGroupWithoutField(n == null ? void 0 : n.type), P.label = c), M(P), X(t, (g = P.editor) == null ? void 0 : g.type), P;
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 n;
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
- function Z() {
1012
- return r;
1592
+ });
1593
+ function Ln(e, t) {
1594
+ function n() {
1595
+ return !0;
1013
1596
  }
1014
- function z() {
1015
- return y;
1597
+ function a() {
1598
+ return !0;
1016
1599
  }
1017
- function E() {
1600
+ function o() {
1018
1601
  return !1;
1019
1602
  }
1020
- function O(t) {
1021
- return new Oo(t, o).getPropertyConfig(m, e.componentInstance.value);
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: B,
1025
- checkCanDeleteComponent: z,
1026
- checkCanMoveComponent: Z,
1027
- getStyles: q,
1028
- getPropsConfig: O,
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
- re.install = (e) => {
1038
- e.component(re.name, re).component(ue.name, ue).component(ce.name, ce);
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
- Pr as FDynamicFormGroup,
1042
- ue as FDynamicFormInput,
1043
- ge as FDynamicFormLabel,
1044
- ce as FFormControl,
1045
- re as FResponseForm,
1046
- re as default,
1047
- Ce as dynamicFormGroupProps,
1048
- Do as dynamicFormInputProps,
1049
- Po as responseFormProps,
1050
- Ur as useDesignerRules,
1051
- ye as useTypeResolver
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
  };