@fishbelly/form-morph-arco 0.1.1 → 0.2.0

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.
Files changed (38) hide show
  1. package/README.md +248 -211
  2. package/dist/components/ArcoFormItem.vue.d.ts +1 -1
  3. package/dist/components/ArcoFormShell.vue.d.ts +5 -0
  4. package/dist/containers/CardContainer.vue.d.ts +1 -1
  5. package/dist/containers/DividerContainer.vue.d.ts +1 -1
  6. package/dist/containers/SectionContainer.vue.d.ts +1 -1
  7. package/dist/fields/CascaderInput.vue.d.ts +1 -1
  8. package/dist/fields/CheckboxInput.vue.d.ts +1 -1
  9. package/dist/fields/ColorInput.vue.d.ts +1 -1
  10. package/dist/fields/DateInput.vue.d.ts +1 -1
  11. package/dist/fields/NumberInput.vue.d.ts +1 -1
  12. package/dist/fields/RadioInput.vue.d.ts +1 -1
  13. package/dist/fields/RateInput.vue.d.ts +1 -1
  14. package/dist/fields/SelectInput.vue.d.ts +1 -1
  15. package/dist/fields/SliderInput.vue.d.ts +1 -1
  16. package/dist/fields/StaticText.vue.d.ts +1 -1
  17. package/dist/fields/SwitchInput.vue.d.ts +1 -1
  18. package/dist/fields/TextInput.vue.d.ts +1 -1
  19. package/dist/fields/TimeInput.vue.d.ts +1 -1
  20. package/dist/fields/TreeSelectInput.vue.d.ts +1 -1
  21. package/dist/fields/UploadInput.vue.d.ts +1 -1
  22. package/dist/fields/treeValue.d.ts +8 -0
  23. package/dist/i18n.d.ts +12 -0
  24. package/dist/index.d.ts +15 -6
  25. package/dist/index.js +766 -551
  26. package/dist/index.js.map +1 -1
  27. package/dist/locale.d.ts +14 -0
  28. package/dist/locales/en-US.d.ts +3 -0
  29. package/dist/locales/en-US.js +139 -0
  30. package/dist/locales/en-US.js.map +1 -0
  31. package/dist/locales/zh-CN.d.ts +34 -0
  32. package/dist/shell.d.ts +12 -0
  33. package/dist/style.css +1 -1
  34. package/package.json +6 -2
  35. package/dist/__tests__/dateValue.test.d.ts +0 -1
  36. package/dist/__tests__/fieldConfig.test.d.ts +0 -1
  37. package/dist/__tests__/uploadInput.test.d.ts +0 -1
  38. package/dist/__tests__/uploadValue.test.d.ts +0 -1
package/dist/index.js CHANGED
@@ -1,9 +1,49 @@
1
- import { FORM_RUNTIME_KEY as ve, defineFieldType as V, definePlugin as ge } from "@fishbelly/form-morph";
2
- import { defineComponent as x, computed as m, openBlock as p, createBlock as k, unref as h, withCtx as A, createElementBlock as I, Fragment as X, renderList as Z, createTextVNode as W, toDisplayString as U, inject as ie, ref as j, onBeforeUnmount as de, createVNode as H, normalizeClass as E, provide as we, reactive as se, renderSlot as Y, onMounted as ke, nextTick as le, normalizeStyle as Ve, createCommentVNode as q, createElementVNode as te } from "vue";
3
- import { Textarea as xe, InputPassword as ze, Input as Te, InputNumber as Ce, Select as Se, RadioGroup as Le, Radio as Be, CheckboxGroup as Ie, Checkbox as $e, Switch as Ae, Slider as De, Rate as Fe, RangePicker as Pe, DatePicker as Ue, TimePicker as Ne, Upload as Me, Button as Re, Cascader as Oe, TreeSelect as je, ColorPicker as We, FormItem as Ee, Form as Ye, Card as He, Divider as qe } from "@arco-design/web-vue";
4
- import { IconUpload as Ke, IconCompass as Ge } from "@arco-design/web-vue/es/icon";
5
- import { formInjectionKey as ae } from "@arco-design/web-vue/es/form/context";
6
- const K = /* @__PURE__ */ x({
1
+ import { useLocale as Ve, FORM_RUNTIME_KEY as Ee, matchesFileAccept as ye, resolveLabelWidth as Re, localeCandidates as Oe, normalizeLocale as We, defineFieldType as w, definePlugin as je } from "@fishbelly/form-morph";
2
+ import { defineComponent as k, computed as c, openBlock as p, createBlock as g, unref as h, withCtx as F, createElementBlock as C, Fragment as _, renderList as re, createTextVNode as Z, toDisplayString as B, inject as ze, ref as H, onMounted as Ce, onBeforeUnmount as Le, createCommentVNode as Y, createVNode as G, normalizeClass as ee, provide as Ke, reactive as Te, renderSlot as le, nextTick as he, resolveDynamicComponent as He, normalizeProps as Ye, guardReactiveProps as qe, normalizeStyle as Ge, createElementVNode as ve, h as Ze } from "vue";
3
+ import { Textarea as Je, InputPassword as Qe, Input as Xe, InputNumber as _e, Select as el, RadioGroup as ll, Radio as tl, CheckboxGroup as al, Checkbox as ol, Switch as nl, Slider as rl, Rate as il, RangePicker as dl, DatePicker as sl, TimePicker as ul, Upload as cl, Button as pl, Cascader as ml, TreeSelect as fl, ColorPicker as yl, FormItem as hl, ConfigProvider as vl, Form as bl, Card as gl, Divider as wl } from "@arco-design/web-vue";
4
+ import { IconUpload as kl, IconCheckCircleFill as xl, IconCompass as Vl } from "@arco-design/web-vue/es/icon";
5
+ import { formInjectionKey as be } from "@arco-design/web-vue/es/form/context";
6
+ import zl from "@arco-design/web-vue/es/locale/lang/en-us";
7
+ import Cl from "@arco-design/web-vue/es/locale/lang/zh-cn";
8
+ const Se = {
9
+ "field.input.placeholder": "请输入",
10
+ "field.textarea.placeholder": "请输入",
11
+ "field.password.placeholder": "请输入密码",
12
+ "field.number.placeholder": "请输入数字",
13
+ "field.select.placeholder": "请选择",
14
+ "field.multi-select.placeholder": "请选择",
15
+ "field.cascader.placeholder": "请选择",
16
+ "field.tree-select.placeholder": "请选择",
17
+ "field.date.placeholder": "请选择日期",
18
+ "field.time.placeholder": "请选择时间",
19
+ "field.static-text.content": "静态文本内容",
20
+ "field.static-text.placeholder": "静态文本内容(请在右侧属性面板填写)",
21
+ "field.upload.button": "点击上传",
22
+ "field.upload.release": "松开上传",
23
+ "field.upload.count": "已上传 {count} 个文件",
24
+ "field.upload.notice.type": "文件类型不支持",
25
+ "field.upload.notice.rejected": "{count} 个文件类型不支持",
26
+ "field.upload.notice.limit": "最多上传 {limit} 个文件",
27
+ "field.upload.notice.separator": ";",
28
+ "field.upload.acceptHint": "支持 {accept},可拖拽上传",
29
+ "field.upload.acceptAllHint": "支持所有文件格式,可拖拽上传",
30
+ "field.upload.empty": "未上传",
31
+ "field.upload.attachment": "附件"
32
+ };
33
+ function Ll(e, t) {
34
+ return t ? e.replace(
35
+ /\{(\w+)\}/g,
36
+ (l, a) => t[a] === void 0 ? l : String(t[a])
37
+ ) : e;
38
+ }
39
+ function O() {
40
+ const { t: e, hasMessage: t } = Ve();
41
+ function l(a, n) {
42
+ return t(a) ? e(a, n) : Ll(Se[a], n);
43
+ }
44
+ return { tField: l };
45
+ }
46
+ const te = /* @__PURE__ */ k({
7
47
  __name: "TextInput",
8
48
  props: {
9
49
  modelValue: {},
@@ -17,46 +57,50 @@ const K = /* @__PURE__ */ x({
17
57
  },
18
58
  emits: ["update:modelValue"],
19
59
  setup(e, { emit: t }) {
20
- const l = e, a = t, n = m(() => l.node.type === "textarea"), r = m(() => l.node.type === "password"), o = m(() => l.modelValue === null || l.modelValue === void 0 ? "" : String(l.modelValue));
21
- function i(d) {
22
- a("update:modelValue", d);
60
+ const l = e, a = t, { tField: n } = O(), o = c(() => l.node.type === "textarea"), r = c(() => l.node.type === "password"), u = c(() => l.modelValue === null || l.modelValue === void 0 ? "" : String(l.modelValue)), i = c(() => {
61
+ var m;
62
+ const f = (m = l.node.props) == null ? void 0 : m.placeholder;
63
+ return typeof f == "string" && f ? f : o.value ? n("field.textarea.placeholder") : r.value ? n("field.password.placeholder") : n("field.input.placeholder");
64
+ });
65
+ function s(f) {
66
+ a("update:modelValue", f);
23
67
  }
24
- return (d, u) => {
25
- var v, f, y, $, F, g, w, C, z, T, S, N;
26
- return n.value ? (p(), k(h(xe), {
68
+ return (f, m) => {
69
+ var v, L, I, D, T, z, A, P, b;
70
+ return o.value ? (p(), g(h(Je), {
27
71
  key: 0,
28
- "model-value": o.value,
29
- placeholder: ((v = e.node.props) == null ? void 0 : v.placeholder) ?? "请输入",
30
- "max-length": ((f = e.node.props) == null ? void 0 : f.maxLength) ?? void 0,
31
- "auto-size": ((y = e.node.props) == null ? void 0 : y.autoSize) === !0,
32
- "show-word-limit": (($ = e.node.props) == null ? void 0 : $.showWordLimit) === !0,
33
- "allow-clear": ((F = e.node.props) == null ? void 0 : F.allowClear) === !0,
34
- rows: ((g = e.node.props) == null ? void 0 : g.rows) ?? 4,
72
+ "model-value": u.value,
73
+ placeholder: i.value,
74
+ "max-length": ((v = e.node.props) == null ? void 0 : v.maxLength) ?? void 0,
75
+ "auto-size": ((L = e.node.props) == null ? void 0 : L.autoSize) === !0,
76
+ "show-word-limit": ((I = e.node.props) == null ? void 0 : I.showWordLimit) === !0,
77
+ "allow-clear": ((D = e.node.props) == null ? void 0 : D.allowClear) === !0,
78
+ rows: ((T = e.node.props) == null ? void 0 : T.rows) ?? 4,
35
79
  disabled: e.disabled || e.readonly,
36
80
  size: e.size,
37
- "onUpdate:modelValue": i
38
- }, null, 8, ["model-value", "placeholder", "max-length", "auto-size", "show-word-limit", "allow-clear", "rows", "disabled", "size"])) : r.value ? (p(), k(h(ze), {
81
+ "onUpdate:modelValue": s
82
+ }, null, 8, ["model-value", "placeholder", "max-length", "auto-size", "show-word-limit", "allow-clear", "rows", "disabled", "size"])) : r.value ? (p(), g(h(Qe), {
39
83
  key: 1,
40
- "model-value": o.value,
41
- placeholder: ((w = e.node.props) == null ? void 0 : w.placeholder) ?? "请输入",
42
- "max-length": ((C = e.node.props) == null ? void 0 : C.maxLength) ?? void 0,
43
- "allow-clear": ((z = e.node.props) == null ? void 0 : z.allowClear) !== !1,
84
+ "model-value": u.value,
85
+ placeholder: i.value,
86
+ "max-length": ((z = e.node.props) == null ? void 0 : z.maxLength) ?? void 0,
87
+ "allow-clear": ((A = e.node.props) == null ? void 0 : A.allowClear) !== !1,
44
88
  disabled: e.disabled || e.readonly,
45
89
  size: e.size,
46
- "onUpdate:modelValue": i
47
- }, null, 8, ["model-value", "placeholder", "max-length", "allow-clear", "disabled", "size"])) : (p(), k(h(Te), {
90
+ "onUpdate:modelValue": s
91
+ }, null, 8, ["model-value", "placeholder", "max-length", "allow-clear", "disabled", "size"])) : (p(), g(h(Xe), {
48
92
  key: 2,
49
- "model-value": o.value,
50
- placeholder: ((T = e.node.props) == null ? void 0 : T.placeholder) ?? "请输入",
51
- "max-length": ((S = e.node.props) == null ? void 0 : S.maxLength) ?? void 0,
52
- "allow-clear": ((N = e.node.props) == null ? void 0 : N.allowClear) !== !1,
93
+ "model-value": u.value,
94
+ placeholder: i.value,
95
+ "max-length": ((P = e.node.props) == null ? void 0 : P.maxLength) ?? void 0,
96
+ "allow-clear": ((b = e.node.props) == null ? void 0 : b.allowClear) !== !1,
53
97
  disabled: e.disabled || e.readonly,
54
98
  size: e.size,
55
- "onUpdate:modelValue": i
99
+ "onUpdate:modelValue": s
56
100
  }, null, 8, ["model-value", "placeholder", "max-length", "allow-clear", "disabled", "size"]));
57
101
  };
58
102
  }
59
- }), Je = /* @__PURE__ */ x({
103
+ }), Tl = /* @__PURE__ */ k({
60
104
  __name: "NumberInput",
61
105
  props: {
62
106
  modelValue: {},
@@ -70,30 +114,34 @@ const K = /* @__PURE__ */ x({
70
114
  },
71
115
  emits: ["update:modelValue"],
72
116
  setup(e, { emit: t }) {
73
- const l = e, a = t, n = m(() => {
117
+ const l = e, a = t, { tField: n } = O(), o = c(() => {
74
118
  if (l.modelValue === null || l.modelValue === void 0 || l.modelValue === "") return;
75
- const o = Number(l.modelValue);
76
- return Number.isFinite(o) ? o : void 0;
119
+ const i = Number(l.modelValue);
120
+ return Number.isFinite(i) ? i : void 0;
121
+ }), r = c(() => {
122
+ var s;
123
+ const i = (s = l.node.props) == null ? void 0 : s.placeholder;
124
+ return typeof i == "string" && i ? i : n("field.number.placeholder");
77
125
  });
78
- function r(o) {
79
- a("update:modelValue", o === void 0 || o === "" ? null : o);
126
+ function u(i) {
127
+ a("update:modelValue", i === void 0 || i === "" ? null : i);
80
128
  }
81
- return (o, i) => {
82
- var d, u, v, f, y;
83
- return p(), k(h(Ce), {
84
- "model-value": n.value,
85
- placeholder: ((d = e.node.props) == null ? void 0 : d.placeholder) ?? "请输入数字",
86
- min: ((u = e.node.props) == null ? void 0 : u.min) ?? void 0,
87
- max: ((v = e.node.props) == null ? void 0 : v.max) ?? void 0,
88
- step: ((f = e.node.props) == null ? void 0 : f.step) ?? void 0,
89
- precision: ((y = e.node.props) == null ? void 0 : y.precision) ?? void 0,
129
+ return (i, s) => {
130
+ var f, m, v, L;
131
+ return p(), g(h(_e), {
132
+ "model-value": o.value,
133
+ placeholder: r.value,
134
+ min: ((f = e.node.props) == null ? void 0 : f.min) ?? void 0,
135
+ max: ((m = e.node.props) == null ? void 0 : m.max) ?? void 0,
136
+ step: ((v = e.node.props) == null ? void 0 : v.step) ?? void 0,
137
+ precision: ((L = e.node.props) == null ? void 0 : L.precision) ?? void 0,
90
138
  disabled: e.disabled || e.readonly,
91
139
  size: e.size,
92
- "onUpdate:modelValue": r
140
+ "onUpdate:modelValue": u
93
141
  }, null, 8, ["model-value", "placeholder", "min", "max", "step", "precision", "disabled", "size"]);
94
142
  };
95
143
  }
96
- }), oe = /* @__PURE__ */ x({
144
+ }), ge = /* @__PURE__ */ k({
97
145
  __name: "SelectInput",
98
146
  props: {
99
147
  modelValue: {},
@@ -107,30 +155,34 @@ const K = /* @__PURE__ */ x({
107
155
  },
108
156
  emits: ["update:modelValue"],
109
157
  setup(e, { emit: t }) {
110
- const l = e, a = t, n = m(() => {
111
- var i;
112
- return l.node.type === "multi-select" || ((i = l.node.props) == null ? void 0 : i.multiple) === !0;
113
- }), r = m(() => n.value ? Array.isArray(l.modelValue) ? l.modelValue : [] : l.modelValue === null || l.modelValue === void 0 ? void 0 : l.modelValue);
114
- function o(i) {
115
- a("update:modelValue", i === void 0 ? null : i);
158
+ const l = e, a = t, { tField: n } = O(), o = c(() => {
159
+ var s;
160
+ return l.node.type === "multi-select" || ((s = l.node.props) == null ? void 0 : s.multiple) === !0;
161
+ }), r = c(() => o.value ? Array.isArray(l.modelValue) ? l.modelValue : [] : l.modelValue === null || l.modelValue === void 0 ? void 0 : l.modelValue), u = c(() => {
162
+ var f;
163
+ const s = (f = l.node.props) == null ? void 0 : f.placeholder;
164
+ return typeof s == "string" && s ? s : o.value ? n("field.multi-select.placeholder") : n("field.select.placeholder");
165
+ });
166
+ function i(s) {
167
+ a("update:modelValue", s === void 0 ? null : s);
116
168
  }
117
- return (i, d) => {
118
- var u, v, f, y;
119
- return p(), k(h(Se), {
169
+ return (s, f) => {
170
+ var m, v, L;
171
+ return p(), g(h(el), {
120
172
  "model-value": r.value,
121
173
  options: e.options,
122
- multiple: n.value,
123
- placeholder: ((u = e.node.props) == null ? void 0 : u.placeholder) ?? "请选择",
124
- "allow-search": ((v = e.node.props) == null ? void 0 : v.allowSearch) === !0,
125
- "max-tag-count": ((f = e.node.props) == null ? void 0 : f.maxTagCount) ?? void 0,
174
+ multiple: o.value,
175
+ placeholder: u.value,
176
+ "allow-search": ((m = e.node.props) == null ? void 0 : m.allowSearch) === !0,
177
+ "max-tag-count": ((v = e.node.props) == null ? void 0 : v.maxTagCount) ?? void 0,
126
178
  disabled: e.disabled || e.readonly,
127
179
  size: e.size,
128
- "allow-clear": ((y = e.node.props) == null ? void 0 : y.allowClear) !== !1,
129
- "onUpdate:modelValue": o
180
+ "allow-clear": ((L = e.node.props) == null ? void 0 : L.allowClear) !== !1,
181
+ "onUpdate:modelValue": i
130
182
  }, null, 8, ["model-value", "options", "multiple", "placeholder", "allow-search", "max-tag-count", "disabled", "size", "allow-clear"]);
131
183
  };
132
184
  }
133
- }), Qe = /* @__PURE__ */ x({
185
+ }), Sl = /* @__PURE__ */ k({
134
186
  __name: "RadioInput",
135
187
  props: {
136
188
  modelValue: {},
@@ -144,30 +196,30 @@ const K = /* @__PURE__ */ x({
144
196
  },
145
197
  emits: ["update:modelValue"],
146
198
  setup(e, { emit: t }) {
147
- const l = e, a = t, n = m(() => {
148
- const o = l.modelValue;
149
- if (typeof o == "string" || typeof o == "number" || typeof o == "boolean") return o;
199
+ const l = e, a = t, n = c(() => {
200
+ const r = l.modelValue;
201
+ if (typeof r == "string" || typeof r == "number" || typeof r == "boolean") return r;
150
202
  });
151
- function r(o) {
152
- a("update:modelValue", o);
203
+ function o(r) {
204
+ a("update:modelValue", r);
153
205
  }
154
- return (o, i) => {
155
- var d;
156
- return p(), k(h(Le), {
206
+ return (r, u) => {
207
+ var i;
208
+ return p(), g(h(ll), {
157
209
  "model-value": n.value,
158
- direction: ((d = e.node.props) == null ? void 0 : d.direction) === "vertical" ? "vertical" : "horizontal",
210
+ direction: ((i = e.node.props) == null ? void 0 : i.direction) === "vertical" ? "vertical" : "horizontal",
159
211
  disabled: e.disabled || e.readonly,
160
212
  size: e.size,
161
- onChange: r
213
+ onChange: o
162
214
  }, {
163
- default: A(() => [
164
- (p(!0), I(X, null, Z(e.options, (u) => (p(), k(h(Be), {
165
- key: String(u.value),
166
- value: u.value,
167
- disabled: u.disabled
215
+ default: F(() => [
216
+ (p(!0), C(_, null, re(e.options, (s) => (p(), g(h(tl), {
217
+ key: String(s.value),
218
+ value: s.value,
219
+ disabled: s.disabled
168
220
  }, {
169
- default: A(() => [
170
- W(U(u.label), 1)
221
+ default: F(() => [
222
+ Z(B(s.label), 1)
171
223
  ]),
172
224
  _: 2
173
225
  }, 1032, ["value", "disabled"]))), 128))
@@ -176,7 +228,7 @@ const K = /* @__PURE__ */ x({
176
228
  }, 8, ["model-value", "direction", "disabled", "size"]);
177
229
  };
178
230
  }
179
- }), Xe = /* @__PURE__ */ x({
231
+ }), Bl = /* @__PURE__ */ k({
180
232
  __name: "CheckboxInput",
181
233
  props: {
182
234
  modelValue: {},
@@ -190,27 +242,27 @@ const K = /* @__PURE__ */ x({
190
242
  },
191
243
  emits: ["update:modelValue"],
192
244
  setup(e, { emit: t }) {
193
- const l = e, a = t, n = m(() => Array.isArray(l.modelValue) ? l.modelValue : []);
194
- function r(o) {
195
- a("update:modelValue", Array.isArray(o) ? o : []);
245
+ const l = e, a = t, n = c(() => Array.isArray(l.modelValue) ? l.modelValue : []);
246
+ function o(r) {
247
+ a("update:modelValue", Array.isArray(r) ? r : []);
196
248
  }
197
- return (o, i) => {
198
- var d;
199
- return p(), k(h(Ie), {
249
+ return (r, u) => {
250
+ var i;
251
+ return p(), g(h(al), {
200
252
  "model-value": n.value,
201
- direction: ((d = e.node.props) == null ? void 0 : d.direction) === "vertical" ? "vertical" : "horizontal",
253
+ direction: ((i = e.node.props) == null ? void 0 : i.direction) === "vertical" ? "vertical" : "horizontal",
202
254
  disabled: e.disabled || e.readonly,
203
255
  size: e.size,
204
- onChange: r
256
+ onChange: o
205
257
  }, {
206
- default: A(() => [
207
- (p(!0), I(X, null, Z(e.options, (u) => (p(), k(h($e), {
208
- key: String(u.value),
209
- value: u.value,
210
- disabled: u.disabled
258
+ default: F(() => [
259
+ (p(!0), C(_, null, re(e.options, (s) => (p(), g(h(ol), {
260
+ key: String(s.value),
261
+ value: s.value,
262
+ disabled: s.disabled
211
263
  }, {
212
- default: A(() => [
213
- W(U(u.label), 1)
264
+ default: F(() => [
265
+ Z(B(s.label), 1)
214
266
  ]),
215
267
  _: 2
216
268
  }, 1032, ["value", "disabled"]))), 128))
@@ -219,7 +271,7 @@ const K = /* @__PURE__ */ x({
219
271
  }, 8, ["model-value", "direction", "disabled", "size"]);
220
272
  };
221
273
  }
222
- }), Ze = /* @__PURE__ */ x({
274
+ }), Al = /* @__PURE__ */ k({
223
275
  __name: "SwitchInput",
224
276
  props: {
225
277
  modelValue: {},
@@ -233,20 +285,20 @@ const K = /* @__PURE__ */ x({
233
285
  },
234
286
  emits: ["update:modelValue"],
235
287
  setup(e, { emit: t }) {
236
- const l = e, a = t, n = m(() => l.size === "mini" || l.size === "small" ? "small" : "medium");
237
- return (r, o) => {
238
- var i, d;
239
- return p(), k(h(Ae), {
288
+ const l = e, a = t, n = c(() => l.size === "mini" || l.size === "small" ? "small" : "medium");
289
+ return (o, r) => {
290
+ var u, i;
291
+ return p(), g(h(nl), {
240
292
  "model-value": e.modelValue === !0,
241
- "checked-text": ((i = e.node.props) == null ? void 0 : i.checkedText) ?? void 0,
242
- "unchecked-text": ((d = e.node.props) == null ? void 0 : d.uncheckedText) ?? void 0,
293
+ "checked-text": ((u = e.node.props) == null ? void 0 : u.checkedText) ?? void 0,
294
+ "unchecked-text": ((i = e.node.props) == null ? void 0 : i.uncheckedText) ?? void 0,
243
295
  disabled: e.disabled || e.readonly,
244
296
  size: n.value,
245
- "onUpdate:modelValue": o[0] || (o[0] = (u) => a("update:modelValue", !!u))
297
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => a("update:modelValue", !!s))
246
298
  }, null, 8, ["model-value", "checked-text", "unchecked-text", "disabled", "size"]);
247
299
  };
248
300
  }
249
- }), _e = /* @__PURE__ */ x({
301
+ }), Fl = /* @__PURE__ */ k({
250
302
  __name: "SliderInput",
251
303
  props: {
252
304
  modelValue: {},
@@ -260,27 +312,27 @@ const K = /* @__PURE__ */ x({
260
312
  },
261
313
  emits: ["update:modelValue"],
262
314
  setup(e, { emit: t }) {
263
- const l = e, a = t, n = m(() => {
264
- var i;
265
- const r = Number(((i = l.node.props) == null ? void 0 : i.min) ?? 0);
266
- if (l.modelValue === null || l.modelValue === void 0 || l.modelValue === "") return r;
267
- const o = Number(l.modelValue);
268
- return Number.isFinite(o) ? o : r;
315
+ const l = e, a = t, n = c(() => {
316
+ var u;
317
+ const o = Number(((u = l.node.props) == null ? void 0 : u.min) ?? 0);
318
+ if (l.modelValue === null || l.modelValue === void 0 || l.modelValue === "") return o;
319
+ const r = Number(l.modelValue);
320
+ return Number.isFinite(r) ? r : o;
269
321
  });
270
- return (r, o) => {
271
- var i, d, u, v;
272
- return p(), k(h(De), {
322
+ return (o, r) => {
323
+ var u, i, s, f;
324
+ return p(), g(h(rl), {
273
325
  "model-value": n.value,
274
- min: ((i = e.node.props) == null ? void 0 : i.min) ?? 0,
275
- max: ((d = e.node.props) == null ? void 0 : d.max) ?? 100,
276
- step: ((u = e.node.props) == null ? void 0 : u.step) ?? 1,
277
- "show-input": ((v = e.node.props) == null ? void 0 : v.showInput) === !0,
326
+ min: ((u = e.node.props) == null ? void 0 : u.min) ?? 0,
327
+ max: ((i = e.node.props) == null ? void 0 : i.max) ?? 100,
328
+ step: ((s = e.node.props) == null ? void 0 : s.step) ?? 1,
329
+ "show-input": ((f = e.node.props) == null ? void 0 : f.showInput) === !0,
278
330
  disabled: e.disabled || e.readonly,
279
- onChange: o[0] || (o[0] = (f) => a("update:modelValue", f))
331
+ onChange: r[0] || (r[0] = (m) => a("update:modelValue", m))
280
332
  }, null, 8, ["model-value", "min", "max", "step", "show-input", "disabled"]);
281
333
  };
282
334
  }
283
- }), el = /* @__PURE__ */ x({
335
+ }), Il = /* @__PURE__ */ k({
284
336
  __name: "RateInput",
285
337
  props: {
286
338
  modelValue: {},
@@ -294,32 +346,32 @@ const K = /* @__PURE__ */ x({
294
346
  },
295
347
  emits: ["update:modelValue"],
296
348
  setup(e, { emit: t }) {
297
- const l = e, a = t, n = m(() => {
298
- const r = Number(l.modelValue);
299
- return Number.isFinite(r) ? r : 0;
349
+ const l = e, a = t, n = c(() => {
350
+ const o = Number(l.modelValue);
351
+ return Number.isFinite(o) ? o : 0;
300
352
  });
301
- return (r, o) => {
302
- var i, d;
303
- return p(), k(h(Fe), {
353
+ return (o, r) => {
354
+ var u, i;
355
+ return p(), g(h(il), {
304
356
  "model-value": n.value,
305
- count: ((i = e.node.props) == null ? void 0 : i.count) ?? 5,
306
- "allow-half": ((d = e.node.props) == null ? void 0 : d.allowHalf) === !0,
357
+ count: ((u = e.node.props) == null ? void 0 : u.count) ?? 5,
358
+ "allow-half": ((i = e.node.props) == null ? void 0 : i.allowHalf) === !0,
307
359
  disabled: e.disabled || e.readonly,
308
- onChange: o[0] || (o[0] = (u) => a("update:modelValue", u))
360
+ onChange: r[0] || (r[0] = (s) => a("update:modelValue", s))
309
361
  }, null, 8, ["model-value", "count", "allow-half", "disabled"]);
310
362
  };
311
363
  }
312
364
  });
313
- function ll(e) {
365
+ function $l(e) {
314
366
  return !Array.isArray(e) || e.length === 0 ? [] : [
315
367
  e[0] instanceof Date ? e[0].getTime() : null,
316
368
  e[1] instanceof Date ? e[1].getTime() : null
317
369
  ];
318
370
  }
319
- function tl(e) {
371
+ function Dl(e) {
320
372
  return e ? [] : null;
321
373
  }
322
- const ne = /* @__PURE__ */ x({
374
+ const we = /* @__PURE__ */ k({
323
375
  __name: "DateInput",
324
376
  props: {
325
377
  modelValue: {},
@@ -333,57 +385,57 @@ const ne = /* @__PURE__ */ x({
333
385
  },
334
386
  emits: ["update:modelValue"],
335
387
  setup(e, { emit: t }) {
336
- const l = e, a = t, n = m(() => l.node.type === "date-range");
337
- function r(f) {
338
- if (f == null || f === "") return;
339
- const y = Number(f);
340
- return Number.isFinite(y) ? new Date(y) : void 0;
388
+ const l = e, a = t, n = c(() => l.node.type === "date-range");
389
+ function o(m) {
390
+ if (m == null || m === "") return;
391
+ const v = Number(m);
392
+ return Number.isFinite(v) ? new Date(v) : void 0;
341
393
  }
342
- const o = m(() => r(l.modelValue)), i = m(() => {
394
+ const r = c(() => o(l.modelValue)), u = c(() => {
343
395
  if (!(!Array.isArray(l.modelValue) || l.modelValue.length === 0))
344
- return [r(l.modelValue[0]), r(l.modelValue[1])];
396
+ return [o(l.modelValue[0]), o(l.modelValue[1])];
345
397
  });
346
- function d(f, y) {
347
- if (!y) {
398
+ function i(m, v) {
399
+ if (!v) {
348
400
  a("update:modelValue", null);
349
401
  return;
350
402
  }
351
- y instanceof Date && a("update:modelValue", y.getTime());
403
+ v instanceof Date && a("update:modelValue", v.getTime());
352
404
  }
353
- function u(f, y) {
354
- a("update:modelValue", ll(y));
405
+ function s(m, v) {
406
+ a("update:modelValue", $l(v));
355
407
  }
356
- function v() {
357
- a("update:modelValue", tl(n.value));
408
+ function f() {
409
+ a("update:modelValue", Dl(n.value));
358
410
  }
359
- return (f, y) => {
360
- var $, F, g, w, C, z, T, S;
361
- return n.value ? (p(), k(h(Pe), {
411
+ return (m, v) => {
412
+ var L, I, D, T, z, A, P, b;
413
+ return n.value ? (p(), g(h(dl), {
362
414
  key: 0,
363
- "model-value": i.value,
364
- placeholder: (($ = e.node.props) == null ? void 0 : $.placeholder) ?? void 0,
365
- "show-time": ((F = e.node.props) == null ? void 0 : F.showTime) === !0,
366
- format: ((g = e.node.props) == null ? void 0 : g.format) ?? void 0,
367
- "allow-clear": ((w = e.node.props) == null ? void 0 : w.allowClear) !== !1,
415
+ "model-value": u.value,
416
+ placeholder: ((L = e.node.props) == null ? void 0 : L.placeholder) ?? void 0,
417
+ "show-time": ((I = e.node.props) == null ? void 0 : I.showTime) === !0,
418
+ format: ((D = e.node.props) == null ? void 0 : D.format) ?? void 0,
419
+ "allow-clear": ((T = e.node.props) == null ? void 0 : T.allowClear) !== !1,
368
420
  disabled: e.disabled || e.readonly,
369
421
  size: e.size,
370
- onChange: u,
371
- onClear: v
372
- }, null, 8, ["model-value", "placeholder", "show-time", "format", "allow-clear", "disabled", "size"])) : (p(), k(h(Ue), {
422
+ onChange: s,
423
+ onClear: f
424
+ }, null, 8, ["model-value", "placeholder", "show-time", "format", "allow-clear", "disabled", "size"])) : (p(), g(h(sl), {
373
425
  key: 1,
374
- "model-value": o.value,
375
- placeholder: ((C = e.node.props) == null ? void 0 : C.placeholder) ?? void 0,
376
- "show-time": ((z = e.node.props) == null ? void 0 : z.showTime) === !0,
377
- format: ((T = e.node.props) == null ? void 0 : T.format) ?? void 0,
378
- "allow-clear": ((S = e.node.props) == null ? void 0 : S.allowClear) !== !1,
426
+ "model-value": r.value,
427
+ placeholder: ((z = e.node.props) == null ? void 0 : z.placeholder) ?? void 0,
428
+ "show-time": ((A = e.node.props) == null ? void 0 : A.showTime) === !0,
429
+ format: ((P = e.node.props) == null ? void 0 : P.format) ?? void 0,
430
+ "allow-clear": ((b = e.node.props) == null ? void 0 : b.allowClear) !== !1,
379
431
  disabled: e.disabled || e.readonly,
380
432
  size: e.size,
381
- onChange: d,
382
- onClear: v
433
+ onChange: i,
434
+ onClear: f
383
435
  }, null, 8, ["model-value", "placeholder", "show-time", "format", "allow-clear", "disabled", "size"]));
384
436
  };
385
437
  }
386
- }), al = /* @__PURE__ */ x({
438
+ }), Pl = /* @__PURE__ */ k({
387
439
  __name: "TimeInput",
388
440
  props: {
389
441
  modelValue: {},
@@ -397,44 +449,48 @@ const ne = /* @__PURE__ */ x({
397
449
  },
398
450
  emits: ["update:modelValue"],
399
451
  setup(e, { emit: t }) {
400
- const l = t;
401
- function a(r) {
402
- l("update:modelValue", r ?? "");
452
+ const l = e, a = t, { tField: n } = O(), o = c(() => {
453
+ var s;
454
+ const i = (s = l.node.props) == null ? void 0 : s.placeholder;
455
+ return typeof i == "string" && i ? i : n("field.time.placeholder");
456
+ });
457
+ function r(i) {
458
+ a("update:modelValue", i ?? "");
403
459
  }
404
- function n() {
405
- l("update:modelValue", "");
460
+ function u() {
461
+ a("update:modelValue", "");
406
462
  }
407
- return (r, o) => {
408
- var i, d, u;
409
- return p(), k(h(Ne), {
463
+ return (i, s) => {
464
+ var f, m;
465
+ return p(), g(h(ul), {
410
466
  "model-value": e.modelValue === null || e.modelValue === void 0 ? "" : String(e.modelValue),
411
- placeholder: ((i = e.node.props) == null ? void 0 : i.placeholder) ?? "请选择时间",
412
- format: ((d = e.node.props) == null ? void 0 : d.format) ?? void 0,
413
- "allow-clear": ((u = e.node.props) == null ? void 0 : u.allowClear) !== !1,
467
+ placeholder: o.value,
468
+ format: ((f = e.node.props) == null ? void 0 : f.format) ?? void 0,
469
+ "allow-clear": ((m = e.node.props) == null ? void 0 : m.allowClear) !== !1,
414
470
  disabled: e.disabled || e.readonly,
415
471
  size: e.size,
416
- onChange: a,
417
- onClear: n
472
+ onChange: r,
473
+ onClear: u
418
474
  }, null, 8, ["model-value", "placeholder", "format", "allow-clear", "disabled", "size"]);
419
475
  };
420
476
  }
421
- }), ol = /* @__PURE__ */ new Set(["uid", "status", "percent", "response", "file", "originFile", "isUploading"]);
422
- function J(e) {
477
+ }), Nl = /* @__PURE__ */ new Set(["uid", "status", "percent", "response", "file", "originFile", "isUploading"]);
478
+ function oe(e) {
423
479
  return typeof File < "u" && e instanceof File;
424
480
  }
425
- function ue(e) {
481
+ function Be(e) {
426
482
  const t = e.response;
427
483
  return t && typeof t == "object" ? t.data : void 0;
428
484
  }
429
- function nl(e) {
485
+ function Ml(e) {
430
486
  const t = {};
431
487
  return Object.entries(e).forEach(([l, a]) => {
432
- ol.has(l) || (t[l] = a);
488
+ Nl.has(l) || (t[l] = a);
433
489
  }), t;
434
490
  }
435
- function rl(e) {
491
+ function ke(e) {
436
492
  if (e == null) return e;
437
- if (J(e))
493
+ if (oe(e))
438
494
  return {
439
495
  uid: `file-${e.name}-${e.lastModified}`,
440
496
  name: e.name,
@@ -444,9 +500,9 @@ function rl(e) {
444
500
  type: e.type
445
501
  };
446
502
  if (typeof e != "object") return e;
447
- const t = e, l = ue(t);
503
+ const t = e, l = Be(t);
448
504
  if (l && typeof l == "object") return l;
449
- const a = J(t.file) ? t.file : void 0;
505
+ const a = oe(t.file) ? t.file : void 0;
450
506
  if (a) {
451
507
  const n = {
452
508
  uid: t.uid ?? `file-${a.name}-${a.lastModified}`,
@@ -454,22 +510,22 @@ function rl(e) {
454
510
  file: a
455
511
  };
456
512
  t.url && (n.url = t.url), t.status && (n.status = t.status);
457
- const r = a.size ?? t.size, o = a.type ?? t.type;
458
- return r !== void 0 && (n.size = r), o !== void 0 && (n.type = o), n;
513
+ const o = a.size ?? t.size, r = a.type ?? t.type;
514
+ return o !== void 0 && (n.size = o), r !== void 0 && (n.type = r), n;
459
515
  }
460
- return typeof l == "string" || typeof l == "number" ? { id: l } : nl(t);
516
+ return typeof l == "string" || typeof l == "number" ? { id: l } : Ml(t);
461
517
  }
462
- function il(e) {
518
+ function Ul(e) {
463
519
  return Array.isArray(e) ? e.map((t, l) => {
464
- if (J(t))
520
+ if (oe(t))
465
521
  return { uid: `local-${l}`, name: t.name, file: t, status: "done" };
466
522
  if (t && typeof t == "object") {
467
- const a = t, n = ue(a), r = n && typeof n == "object" ? n : a, o = r.id ?? a.id, i = r.originalName ?? r.name ?? a.name, d = r.fileUrl ?? r.url ?? a.url, u = {
523
+ const a = t, n = Be(a), o = n && typeof n == "object" ? n : a, r = o.id ?? a.id, u = o.originalName ?? o.name ?? a.name, i = o.fileUrl ?? o.url ?? a.url, s = {
468
524
  ...a,
469
- uid: a.uid ?? (o !== void 0 ? `remote-${String(o)}` : `remote-${l}`),
525
+ uid: a.uid ?? (r !== void 0 ? `remote-${String(r)}` : `remote-${l}`),
470
526
  status: a.status ?? "done"
471
527
  };
472
- return i !== void 0 && (u.name = i), d !== void 0 && (u.url = d), !a.response && o !== void 0 && (u.response = { data: r }), u;
528
+ return u !== void 0 && (s.name = u), i !== void 0 && (s.url = i), !a.response && r !== void 0 && (s.response = { data: o }), s;
473
529
  }
474
530
  return {
475
531
  uid: `remote-${l}`,
@@ -479,13 +535,26 @@ function il(e) {
479
535
  };
480
536
  }) : [];
481
537
  }
482
- const dl = {
538
+ const El = {
483
539
  key: 0,
484
540
  class: "fm-upload-view"
485
- }, sl = ["href"], ul = { key: 1 }, cl = {
541
+ }, Rl = ["href"], Ol = { key: 1 }, Wl = {
542
+ key: 0,
543
+ class: "fm-upload-view__empty"
544
+ }, jl = {
486
545
  key: 1,
546
+ class: "fm-upload-view__summary"
547
+ }, Kl = {
548
+ key: 2,
487
549
  class: "fm-upload-view__empty"
488
- }, pl = ["title"], ml = /* @__PURE__ */ x({
550
+ }, Hl = ["title"], Yl = {
551
+ key: 0,
552
+ class: "fm-upload-field__status"
553
+ }, ql = {
554
+ key: 1,
555
+ class: "fm-upload-field__notice",
556
+ role: "status"
557
+ }, Gl = /* @__PURE__ */ k({
489
558
  __name: "UploadInput",
490
559
  props: {
491
560
  modelValue: {},
@@ -499,175 +568,207 @@ const dl = {
499
568
  },
500
569
  emits: ["update:modelValue"],
501
570
  setup(e, { emit: t }) {
502
- const l = e, a = t, n = ie(ve, null), r = j(null), o = (s) => {
503
- var c;
504
- return ((c = n == null ? void 0 : n.resolveAssetUrl) == null ? void 0 : c.call(n, s)) ?? s;
571
+ const l = e, a = t, n = ze(Ee, null), { tField: o } = O(), r = H(null), u = (d) => {
572
+ var y;
573
+ return ((y = n == null ? void 0 : n.resolveAssetUrl) == null ? void 0 : y.call(n, d)) ?? d;
505
574
  };
506
- function i(s) {
507
- return s && typeof s == "object" ? s : null;
575
+ function i(d) {
576
+ return d && typeof d == "object" ? d : null;
508
577
  }
509
- const d = /* @__PURE__ */ new Set(["http:", "https:", "blob:"]);
510
- function u(s) {
511
- const c = s.trim();
512
- if (!c) return "";
578
+ const s = /* @__PURE__ */ new Set(["http:", "https:", "blob:"]);
579
+ function f(d) {
580
+ const y = d.trim();
581
+ if (!y) return "";
513
582
  try {
514
- const b = new URL(c, "http://form-morph.local").protocol;
515
- return d.has(b) ? c : "";
583
+ const x = new URL(y, "http://form-morph.local").protocol;
584
+ return s.has(x) ? y : "";
516
585
  } catch {
517
586
  return "";
518
587
  }
519
588
  }
520
- function v(s) {
521
- const c = i(s);
522
- if (!c) return "";
523
- const b = c.url ?? c.fileUrl;
524
- return typeof b == "string" && b ? u(o(b)) : "";
589
+ function m(d) {
590
+ const y = i(d);
591
+ if (!y) return "";
592
+ const x = y.url ?? y.fileUrl;
593
+ return typeof x == "string" && x ? f(u(x)) : "";
525
594
  }
526
- function f(s) {
527
- const c = i(s);
528
- return String(c ? c.originalName ?? c.name ?? c.id ?? "附件" : s ?? "");
595
+ function v(d) {
596
+ const y = i(d);
597
+ return String(y ? y.originalName ?? y.name ?? y.id ?? o("field.upload.attachment") : d ?? "");
529
598
  }
530
- function y(s, c) {
531
- const b = i(s);
532
- return b ? String(b.uid ?? b.id ?? c) : c;
599
+ function L(d, y) {
600
+ const x = i(d);
601
+ return x ? String(x.uid ?? x.id ?? y) : y;
533
602
  }
534
- const $ = m(
535
- () => il(l.modelValue).map((s) => {
536
- const c = i(s);
537
- if (!c) return s;
538
- const b = c.url ?? c.fileUrl;
539
- if (typeof b != "string" || !b) return s;
540
- const L = v(s);
541
- return c.url === L ? s : { ...c, url: L || void 0 };
603
+ const I = c(
604
+ () => Ul(l.modelValue).map((d) => {
605
+ const y = i(d);
606
+ if (!y) return d;
607
+ const x = y.url ?? y.fileUrl;
608
+ if (typeof x != "string" || !x) return d;
609
+ const U = m(d);
610
+ return y.url === U ? d : { ...y, url: U || void 0 };
542
611
  })
543
- ), F = m(
612
+ ), D = c(
544
613
  () => l.mode === "view" || l.mode === "print" || l.disabled || l.readonly
545
- ), g = m(
614
+ ), T = c(() => {
615
+ var d;
616
+ return ((d = l.node.props) == null ? void 0 : d.showFileList) !== !1;
617
+ }), z = c(() => I.value.length), A = c(
546
618
  () => {
547
- var s;
548
- return typeof ((s = l.node.props) == null ? void 0 : s.accept) == "string" ? l.node.props.accept : "";
619
+ var d;
620
+ return typeof ((d = l.node.props) == null ? void 0 : d.accept) == "string" ? l.node.props.accept : "";
549
621
  }
550
- ), w = m(() => {
551
- var s;
552
- return ((s = l.node.props) == null ? void 0 : s.multiple) === !0;
553
- }), C = m(() => {
554
- const s = g.value.trim();
555
- return s ? `支持 ${s},可拖拽上传` : "支持所有文件格式,可拖拽上传";
556
- }), z = j(!1);
557
- let T = 0, S;
558
- function N() {
559
- S && (clearTimeout(S), S = void 0);
622
+ ), P = c(() => {
623
+ var d;
624
+ return ((d = l.node.props) == null ? void 0 : d.multiple) === !0;
625
+ }), b = c(() => {
626
+ var y;
627
+ const d = Number((y = l.node.props) == null ? void 0 : y.limit);
628
+ return Number.isFinite(d) && d > 0 ? Math.floor(d) : void 0;
629
+ }), V = c(() => {
630
+ const d = A.value.trim();
631
+ return d ? o("field.upload.acceptHint", { accept: d }) : o("field.upload.acceptAllHint");
632
+ }), S = H(!1), N = H("");
633
+ let $ = 0, E, W;
634
+ function q(d) {
635
+ N.value = d, W && clearTimeout(W), W = setTimeout(() => {
636
+ N.value = "", W = void 0;
637
+ }, 3200);
560
638
  }
561
- function R() {
562
- N(), z.value = !0;
639
+ function J() {
640
+ E && (clearTimeout(E), E = void 0);
563
641
  }
564
- function _(s) {
565
- var b;
566
- const c = (b = s.dataTransfer) == null ? void 0 : b.types;
567
- return !!(c && Array.from(c).includes("Files"));
642
+ function ie() {
643
+ J(), S.value = !0;
568
644
  }
569
- function ee(s, c) {
570
- const b = c.split(",").map((O) => O.trim()).filter(Boolean);
571
- if (!b.length) return !0;
572
- const L = s.name.toLowerCase(), B = (s.type || "").toLowerCase(), M = B.split("/")[0], D = L.includes(".") ? `.${L.split(".").pop()}` : "";
573
- return b.some((O) => {
574
- const P = O.toLowerCase();
575
- return P === B || `${M}${D.replace(".", "/")}` === P || /^\*(\/\*)?$/.test(P) ? !0 : /\/\*/.test(P) ? B.replace(/\/.*$/, "") === P.replace(/\/.*$/, "") : /\..*/.test(P) ? (P === ".jpg" || P === ".jpeg" ? [".jpg", ".jpeg"] : [P]).includes(D) : !1;
576
- });
645
+ function de(d) {
646
+ var x;
647
+ const y = (x = d.dataTransfer) == null ? void 0 : x.types;
648
+ return !!(y && Array.from(y).includes("Files"));
577
649
  }
578
- function ce(s) {
579
- return ee(s, g.value);
650
+ function Fe(d) {
651
+ return ye({ name: d.name, type: d.type }, A.value) ? !0 : (q(o("field.upload.notice.type")), !1);
580
652
  }
581
- function pe(s, c, b) {
582
- const L = Array.from(s ?? []).filter((B) => ee(B, c));
583
- return b ? L : L.slice(0, 1);
653
+ function se() {
654
+ $ = 0, J(), S.value = !1;
584
655
  }
585
- function me(s) {
586
- _(s) && (s.preventDefault(), T += 1, R());
656
+ function Ie(d) {
657
+ de(d) && (d.preventDefault(), $ += 1, ie());
587
658
  }
588
- function fe(s) {
589
- _(s) && (s.preventDefault(), s.dataTransfer && (s.dataTransfer.dropEffect = "copy"), T = Math.max(T, 1), R());
659
+ function $e(d) {
660
+ de(d) && (d.preventDefault(), d.dataTransfer && (d.dataTransfer.dropEffect = "copy"), $ = Math.max($, 1), ie());
590
661
  }
591
- function ye(s) {
592
- z.value && (s.preventDefault(), T = Math.max(0, T - 1), !(T > 0) && (N(), S = setTimeout(() => {
593
- z.value = !1, S = void 0;
662
+ function De(d) {
663
+ S.value && (d.preventDefault(), $ = Math.max(0, $ - 1), !($ > 0) && (J(), E = setTimeout(() => {
664
+ S.value = !1, E = void 0;
594
665
  }, 80)));
595
666
  }
596
- function be(s) {
597
- var L, B, M;
598
- s.preventDefault(), T = 0, N(), z.value = !1;
599
- const c = s.target;
600
- if (c instanceof Element && c.closest(".arco-upload")) return;
601
- const b = pe((L = s.dataTransfer) == null ? void 0 : L.files, g.value, w.value);
602
- b.length && ((M = (B = r.value) == null ? void 0 : B.upload) == null || M.call(B, b));
667
+ function Pe(d) {
668
+ var ce, pe, me, X, fe;
669
+ d.preventDefault(), se();
670
+ const y = d.target;
671
+ if (y instanceof Element && y.closest(".arco-upload")) return;
672
+ const x = Array.from(((ce = d.dataTransfer) == null ? void 0 : ce.files) ?? []), U = x.filter(
673
+ (j) => ye({ name: j.name, type: j.type }, A.value)
674
+ ), M = x.length - U.length;
675
+ let R = P.value ? U : U.slice(0, 1), ue = !1;
676
+ if (b.value) {
677
+ const j = Math.max(0, b.value - z.value);
678
+ R.length > j && (ue = !0, R = R.slice(0, j));
679
+ }
680
+ const Q = [];
681
+ if (M && Q.push(o("field.upload.notice.rejected", { count: M })), ue && Q.push(o("field.upload.notice.limit", { limit: b.value ?? 0 })), Q.length && q(Q.join(o("field.upload.notice.separator"))), !R.length) return;
682
+ const Me = typeof ((pe = l.node.props) == null ? void 0 : pe.action) == "string" ? l.node.props.action.trim() : "";
683
+ if (((me = l.node.props) == null ? void 0 : me.autoUpload) === !0 && Me) {
684
+ (fe = (X = r.value) == null ? void 0 : X.upload) == null || fe.call(X, R);
685
+ return;
686
+ }
687
+ const Ue = Array.isArray(l.modelValue) ? l.modelValue : [];
688
+ a("update:modelValue", [...Ue, ...R.map((j) => ke(j))]);
603
689
  }
604
- de(N);
605
- function he(s) {
606
- a("update:modelValue", Array.isArray(s) ? s.map(rl) : []);
690
+ function K() {
691
+ S.value && se();
607
692
  }
608
- return (s, c) => {
609
- var b, L, B, M;
610
- return F.value ? (p(), I("div", dl, [
611
- $.value.length ? (p(!0), I(X, { key: 0 }, Z($.value, (D, O) => (p(), I("div", {
612
- key: y(D, O),
613
- class: "fm-upload-view__item"
614
- }, [
615
- v(D) ? (p(), I("a", {
616
- key: 0,
617
- class: "fm-upload-view__link",
618
- href: v(D),
619
- target: "_blank",
620
- rel: "noopener"
621
- }, U(f(D)), 9, sl)) : (p(), I("span", ul, U(f(D)), 1))
622
- ]))), 128)) : (p(), I("span", cl, "未上传"))
623
- ])) : (p(), I("div", {
693
+ Ce(() => {
694
+ window.addEventListener("dragend", K), window.addEventListener("drop", K), window.addEventListener("blur", K);
695
+ }), Le(() => {
696
+ window.removeEventListener("dragend", K), window.removeEventListener("drop", K), window.removeEventListener("blur", K), J(), W && clearTimeout(W);
697
+ });
698
+ function Ne(d) {
699
+ a("update:modelValue", Array.isArray(d) ? d.map(ke) : []);
700
+ }
701
+ return (d, y) => {
702
+ var x, U;
703
+ return D.value ? (p(), C("div", El, [
704
+ T.value ? (p(), C(_, { key: 0 }, [
705
+ (p(!0), C(_, null, re(I.value, (M, R) => (p(), C("div", {
706
+ key: L(M, R),
707
+ class: "fm-upload-view__item"
708
+ }, [
709
+ m(M) ? (p(), C("a", {
710
+ key: 0,
711
+ class: "fm-upload-view__link",
712
+ href: m(M),
713
+ target: "_blank",
714
+ rel: "noopener"
715
+ }, B(v(M)), 9, Rl)) : (p(), C("span", Ol, B(v(M)), 1))
716
+ ]))), 128)),
717
+ z.value ? Y("", !0) : (p(), C("span", Wl, B(h(o)("field.upload.empty")), 1))
718
+ ], 64)) : z.value ? (p(), C("span", jl, B(h(o)("field.upload.count", { count: z.value })), 1)) : (p(), C("span", Kl, B(h(o)("field.upload.empty")), 1))
719
+ ])) : (p(), C("div", {
624
720
  key: 1,
625
721
  class: "fm-upload-field",
626
- title: C.value,
627
- onDragenter: me,
628
- onDragover: fe,
629
- onDragleave: ye,
630
- onDrop: be
722
+ title: V.value,
723
+ onDragenter: Ie,
724
+ onDragover: $e,
725
+ onDragleave: De,
726
+ onDrop: Pe
631
727
  }, [
632
- H(h(Me), {
728
+ G(h(cl), {
633
729
  ref_key: "uploadRef",
634
730
  ref: r,
635
- "file-list": $.value,
636
- "auto-upload": ((b = e.node.props) == null ? void 0 : b.autoUpload) === !0,
637
- accept: g.value || void 0,
638
- action: ((L = e.node.props) == null ? void 0 : L.action) ?? void 0,
639
- limit: ((B = e.node.props) == null ? void 0 : B.limit) ?? void 0,
640
- multiple: w.value,
731
+ "file-list": I.value,
732
+ "auto-upload": ((x = e.node.props) == null ? void 0 : x.autoUpload) === !0,
733
+ accept: A.value || void 0,
734
+ action: ((U = e.node.props) == null ? void 0 : U.action) ?? void 0,
735
+ limit: b.value,
736
+ multiple: P.value,
641
737
  disabled: e.disabled || e.readonly,
642
- "show-file-list": ((M = e.node.props) == null ? void 0 : M.showFileList) !== !1,
643
- "on-before-upload": ce,
644
- onChange: c[0] || (c[0] = (D) => he(D))
738
+ "show-file-list": T.value,
739
+ "on-before-upload": Fe,
740
+ onChange: y[0] || (y[0] = (M) => Ne(M))
645
741
  }, {
646
- "upload-button": A(() => [
647
- H(h(Re), {
742
+ "upload-button": F(() => [
743
+ G(h(pl), {
648
744
  type: "primary",
649
745
  disabled: e.disabled || e.readonly
650
746
  }, {
651
- icon: A(() => [
652
- H(h(Ke))
747
+ icon: F(() => [
748
+ G(h(kl))
653
749
  ]),
654
- default: A(() => [
655
- W(" " + U(z.value ? "松开上传" : "点击上传"), 1)
750
+ default: F(() => [
751
+ Z(" " + B(S.value ? h(o)("field.upload.release") : h(o)("field.upload.button")), 1)
656
752
  ]),
657
753
  _: 1
658
754
  }, 8, ["disabled"])
659
755
  ]),
660
756
  _: 1
661
- }, 8, ["file-list", "auto-upload", "accept", "action", "limit", "multiple", "disabled", "show-file-list"])
662
- ], 40, pl));
757
+ }, 8, ["file-list", "auto-upload", "accept", "action", "limit", "multiple", "disabled", "show-file-list"]),
758
+ !T.value && z.value ? (p(), C("span", Yl, [
759
+ G(h(xl), { class: "fm-upload-field__status-icon" }),
760
+ Z(" " + B(h(o)("field.upload.count", { count: z.value })), 1)
761
+ ])) : Y("", !0),
762
+ N.value ? (p(), C("span", ql, B(N.value), 1)) : Y("", !0)
763
+ ], 40, Hl));
663
764
  };
664
765
  }
665
- }), fl = (e, t) => {
766
+ }), Zl = (e, t) => {
666
767
  const l = e.__vccOpts || e;
667
768
  for (const [a, n] of t)
668
769
  l[a] = n;
669
770
  return l;
670
- }, re = /* @__PURE__ */ fl(ml, [["__scopeId", "data-v-9e64a989"]]), yl = /* @__PURE__ */ x({
771
+ }, xe = /* @__PURE__ */ Zl(Gl, [["__scopeId", "data-v-8abfe030"]]), Jl = /* @__PURE__ */ k({
671
772
  __name: "CascaderInput",
672
773
  props: {
673
774
  modelValue: {},
@@ -681,26 +782,42 @@ const dl = {
681
782
  },
682
783
  emits: ["update:modelValue"],
683
784
  setup(e, { emit: t }) {
684
- const l = t;
685
- function a(n) {
686
- l("update:modelValue", n ?? null);
785
+ const l = e, a = t, { tField: n } = O(), o = c(() => {
786
+ var i;
787
+ const u = (i = l.node.props) == null ? void 0 : i.placeholder;
788
+ return typeof u == "string" && u ? u : n("field.cascader.placeholder");
789
+ });
790
+ function r(u) {
791
+ a("update:modelValue", u ?? null);
687
792
  }
688
- return (n, r) => {
689
- var o, i, d, u;
690
- return p(), k(h(Oe), {
793
+ return (u, i) => {
794
+ var s, f, m;
795
+ return p(), g(h(ml), {
691
796
  "model-value": e.modelValue ?? void 0,
692
797
  options: e.options,
693
- placeholder: ((o = e.node.props) == null ? void 0 : o.placeholder) ?? "请选择",
694
- "allow-search": ((i = e.node.props) == null ? void 0 : i.allowSearch) === !0,
695
- "change-on-select": ((d = e.node.props) == null ? void 0 : d.changeOnSelect) === !0,
798
+ placeholder: o.value,
799
+ "allow-search": ((s = e.node.props) == null ? void 0 : s.allowSearch) === !0,
800
+ "change-on-select": ((f = e.node.props) == null ? void 0 : f.changeOnSelect) === !0,
696
801
  disabled: e.disabled || e.readonly,
697
802
  size: e.size,
698
- "allow-clear": ((u = e.node.props) == null ? void 0 : u.allowClear) !== !1,
699
- onChange: a
803
+ "allow-clear": ((m = e.node.props) == null ? void 0 : m.allowClear) !== !1,
804
+ onChange: r
700
805
  }, null, 8, ["model-value", "options", "placeholder", "allow-search", "change-on-select", "disabled", "size", "allow-clear"]);
701
806
  };
702
807
  }
703
- }), bl = /* @__PURE__ */ x({
808
+ });
809
+ function Ql(e) {
810
+ return typeof e == "boolean" ? String(e) : e;
811
+ }
812
+ function Ae(e = []) {
813
+ return e.map((t) => ({
814
+ key: Ql(t.value),
815
+ title: String(t.label),
816
+ disabled: t.disabled,
817
+ children: Array.isArray(t.children) ? Ae(t.children) : void 0
818
+ }));
819
+ }
820
+ const Xl = /* @__PURE__ */ k({
704
821
  __name: "TreeSelectInput",
705
822
  props: {
706
823
  modelValue: {},
@@ -714,34 +831,29 @@ const dl = {
714
831
  },
715
832
  emits: ["update:modelValue"],
716
833
  setup(e, { emit: t }) {
717
- const l = e, a = t;
718
- function n(i) {
719
- return i.map((d) => ({
720
- title: String(d.label),
721
- value: d.value,
722
- disabled: d.disabled,
723
- children: Array.isArray(d.children) ? n(d.children) : void 0
724
- }));
725
- }
726
- const r = m(() => n(l.options ?? []));
727
- function o(i) {
834
+ const l = e, a = t, { tField: n } = O(), o = c(() => Ae(l.options ?? [])), r = c(() => {
835
+ var s;
836
+ const i = (s = l.node.props) == null ? void 0 : s.placeholder;
837
+ return typeof i == "string" && i ? i : n("field.tree-select.placeholder");
838
+ });
839
+ function u(i) {
728
840
  a("update:modelValue", i ?? null);
729
841
  }
730
- return (i, d) => {
731
- var u, v, f;
732
- return p(), k(h(je), {
733
- data: r.value,
842
+ return (i, s) => {
843
+ var f, m;
844
+ return p(), g(h(fl), {
845
+ data: o.value,
734
846
  "model-value": e.modelValue ?? void 0,
735
- placeholder: ((u = e.node.props) == null ? void 0 : u.placeholder) ?? "请选择",
736
- "allow-search": ((v = e.node.props) == null ? void 0 : v.allowSearch) === !0,
847
+ placeholder: r.value,
848
+ "allow-search": ((f = e.node.props) == null ? void 0 : f.allowSearch) === !0,
737
849
  disabled: e.disabled || e.readonly,
738
850
  size: e.size,
739
- "allow-clear": ((f = e.node.props) == null ? void 0 : f.allowClear) !== !1,
740
- onChange: o
851
+ "allow-clear": ((m = e.node.props) == null ? void 0 : m.allowClear) !== !1,
852
+ onChange: u
741
853
  }, null, 8, ["data", "model-value", "placeholder", "allow-search", "disabled", "size", "allow-clear"]);
742
854
  };
743
855
  }
744
- }), hl = /* @__PURE__ */ x({
856
+ }), _l = /* @__PURE__ */ k({
745
857
  __name: "ColorInput",
746
858
  props: {
747
859
  modelValue: {},
@@ -757,17 +869,17 @@ const dl = {
757
869
  setup(e, { emit: t }) {
758
870
  const l = t;
759
871
  return (a, n) => {
760
- var r;
761
- return p(), k(h(We), {
872
+ var o;
873
+ return p(), g(h(yl), {
762
874
  "model-value": e.modelValue === null || e.modelValue === void 0 ? "" : String(e.modelValue),
763
- "disabled-alpha": ((r = e.node.props) == null ? void 0 : r.disabledAlpha) === !0,
875
+ "disabled-alpha": ((o = e.node.props) == null ? void 0 : o.disabledAlpha) === !0,
764
876
  disabled: e.disabled || e.readonly,
765
877
  size: e.size,
766
- onChange: n[0] || (n[0] = (o) => l("update:modelValue", o ?? ""))
878
+ onChange: n[0] || (n[0] = (r) => l("update:modelValue", r ?? ""))
767
879
  }, null, 8, ["model-value", "disabled-alpha", "disabled", "size"]);
768
880
  };
769
881
  }
770
- }), vl = /* @__PURE__ */ x({
882
+ }), et = /* @__PURE__ */ k({
771
883
  __name: "StaticText",
772
884
  props: {
773
885
  modelValue: {},
@@ -780,22 +892,24 @@ const dl = {
780
892
  error: {}
781
893
  },
782
894
  setup(e) {
783
- const t = e, l = m(() => {
784
- var o;
785
- const r = (o = t.node.props) == null ? void 0 : o.content;
895
+ const t = e, { tField: l } = O(), a = c(() => {
896
+ var u;
897
+ const r = (u = t.node.props) == null ? void 0 : u.content;
786
898
  return r == null ? "" : String(r);
787
- }), a = m(() => t.mode === "design"), n = m(() => a.value && !l.value ? "静态文本内容(请在右侧属性面板填写)" : "");
788
- return (r, o) => {
899
+ }), n = c(() => t.mode === "design"), o = c(
900
+ () => n.value && !a.value ? l("field.static-text.placeholder") : ""
901
+ );
902
+ return (r, u) => {
789
903
  var i;
790
- return p(), I("div", {
791
- class: E(["fm-static-text", [
904
+ return p(), C("div", {
905
+ class: ee(["fm-static-text", [
792
906
  (i = e.node.props) != null && i.type ? `fm-static-text--${String(e.node.props.type)}` : void 0,
793
- { "fm-static-text--empty": !!n.value }
907
+ { "fm-static-text--empty": !!o.value }
794
908
  ]])
795
- }, U(l.value || n.value), 3);
909
+ }, B(a.value || o.value), 3);
796
910
  };
797
911
  }
798
- }), gl = /* @__PURE__ */ x({
912
+ }), lt = /* @__PURE__ */ k({
799
913
  __name: "ArcoFormItem",
800
914
  props: {
801
915
  node: {},
@@ -809,15 +923,15 @@ const dl = {
809
923
  reserveMessage: { type: Boolean, default: !0 }
810
924
  },
811
925
  setup(e) {
812
- const t = e, l = m(() => {
813
- var d;
814
- return ((d = t.node.layout) == null ? void 0 : d.hideLabel) === !0;
815
- }), a = m(() => t.node.label || t.node.name || t.node.type), r = ie(ae, null) !== null;
816
- r || we(
817
- ae,
818
- se({
819
- layout: m(() => t.vertical ? "vertical" : "horizontal"),
820
- labelAlign: m(() => t.labelAlign === "left" ? "left" : "right"),
926
+ const t = e, l = c(() => Re(t.labelWidth)), a = c(() => {
927
+ var f;
928
+ return ((f = t.node.layout) == null ? void 0 : f.hideLabel) === !0;
929
+ }), n = c(() => t.node.label || t.node.name || t.node.type), r = ze(be, null) !== null;
930
+ r || Ke(
931
+ be,
932
+ Te({
933
+ layout: c(() => t.vertical ? "vertical" : "horizontal"),
934
+ labelAlign: c(() => t.labelAlign === "left" ? "left" : "right"),
821
935
  autoLabelWidth: !1,
822
936
  maxLabelWidth: 0,
823
937
  setLabelWidth: () => {
@@ -826,35 +940,50 @@ const dl = {
826
940
  }
827
941
  })
828
942
  );
829
- const o = m(() => {
830
- if (t.vertical || l.value) return;
831
- const d = t.labelWidth;
832
- return typeof d == "number" ? `${d}px` : typeof d == "string" && d && d !== "auto" ? d : r ? void 0 : "108px";
833
- }), i = m(() => t.vertical ? { div: !0 } : { div: !1, wrap: !1 });
834
- return (d, u) => (p(), k(h(Ee), {
835
- class: E(["fm-arco-form-item", {
943
+ const u = c(() => {
944
+ if (!(t.vertical || a.value))
945
+ return l.value ? l.value : r ? void 0 : "108px";
946
+ }), i = c(() => !!l.value), s = c(() => t.vertical ? { div: !0 } : { div: !1, wrap: !1 });
947
+ return (f, m) => (p(), g(h(hl), {
948
+ class: ee(["fm-arco-form-item", {
836
949
  "fm-arco-form-item--vertical": e.vertical,
837
950
  "fm-arco-form-item--label-left": e.labelAlign === "left",
838
951
  "fm-arco-form-item--view": e.view,
952
+ "fm-arco-form-item--label-width": i.value,
839
953
  "fm-arco-form-item--no-message-space": !e.reserveMessage
840
954
  }]),
841
- label: l.value ? void 0 : a.value,
842
- "hide-label": l.value,
955
+ label: a.value ? void 0 : n.value,
956
+ "hide-label": a.value,
843
957
  required: e.state.required && !e.view,
844
958
  tooltip: e.node.help || void 0,
845
959
  help: e.error || void 0,
846
960
  "validate-status": e.error ? "error" : void 0,
847
961
  disabled: e.disabled,
848
- "label-col-flex": o.value,
849
- "row-props": i.value
962
+ "label-col-flex": u.value,
963
+ "row-props": s.value
850
964
  }, {
851
- default: A(() => [
852
- Y(d.$slots, "default")
965
+ default: F(() => [
966
+ le(f.$slots, "default")
853
967
  ]),
854
968
  _: 3
855
969
  }, 8, ["class", "label", "hide-label", "required", "tooltip", "help", "validate-status", "disabled", "label-col-flex", "row-props"]));
856
970
  }
857
- }), wl = /* @__PURE__ */ x({
971
+ }), tt = {
972
+ "zh-CN": Cl,
973
+ "en-US": zl
974
+ };
975
+ function at(e) {
976
+ return { ...tt, ...e ?? {} };
977
+ }
978
+ function ot(e, t = "zh-CN", l) {
979
+ const a = at(l);
980
+ for (const n of Oe(e, t)) {
981
+ const o = a[n];
982
+ if (o) return o;
983
+ }
984
+ return a[We(t)] ?? a["zh-CN"];
985
+ }
986
+ const nt = /* @__PURE__ */ k({
858
987
  __name: "ArcoFormShell",
859
988
  props: {
860
989
  layout: {},
@@ -864,68 +993,85 @@ const dl = {
864
993
  size: {},
865
994
  model: {},
866
995
  rules: {},
867
- scrollToFirstError: { type: Boolean }
996
+ scrollToFirstError: { type: Boolean },
997
+ localeMap: {},
998
+ syncLibraryLocale: { type: Boolean }
868
999
  },
869
1000
  emits: ["submit"],
870
1001
  setup(e, { expose: t, emit: l }) {
871
- const a = e, n = l, r = se({}), o = j(null), i = j(0), d = m(() => a.autoLabelWidth !== !1 && a.layout !== "vertical"), u = m(
872
- () => d.value && i.value > 0 ? { "--fm-label-col-width": `${i.value}px` } : {}
1002
+ const a = e, n = k({
1003
+ name: "ArcoSlotProvider",
1004
+ setup(b, { slots: V }) {
1005
+ return () => {
1006
+ var S;
1007
+ return (S = V.default) == null ? void 0 : S.call(V);
1008
+ };
1009
+ }
1010
+ }), { locale: o } = Ve(), r = c(
1011
+ () => a.syncLibraryLocale === !1 ? void 0 : ot(o.value, "zh-CN", a.localeMap)
1012
+ ), u = c(() => r.value ? vl : n), i = c(() => r.value ? { locale: r.value } : {}), s = l, f = Te({}), m = H(null), v = H(0), L = c(() => a.autoLabelWidth !== !1 && a.layout !== "vertical"), I = c(
1013
+ () => L.value && v.value > 0 ? { "--fm-label-col-width": `${v.value}px` } : {}
873
1014
  );
874
- function v() {
875
- var C;
876
- const g = (C = o.value) == null ? void 0 : C.$el;
877
- if (!d.value || !g || !g.querySelector(".fm-node")) return;
878
- let w = 0;
879
- g.querySelectorAll(".arco-form-item-label").forEach((z) => {
880
- const T = Math.ceil(z.scrollWidth || 0);
881
- T > w && (w = T);
882
- }), w > 0 && w !== i.value && (i.value = w);
1015
+ function D() {
1016
+ var S;
1017
+ const b = (S = m.value) == null ? void 0 : S.$el;
1018
+ if (!L.value || !b || !b.querySelector(".fm-node")) return;
1019
+ let V = 0;
1020
+ b.querySelectorAll(".arco-form-item-label").forEach((N) => {
1021
+ const $ = Math.ceil(N.scrollWidth || 0);
1022
+ $ > V && (V = $);
1023
+ }), V > 0 && V !== v.value && (v.value = V);
883
1024
  }
884
- let f = null, y = null;
885
- function $() {
886
- y && clearTimeout(y), y = setTimeout(() => {
887
- y = null, le(v);
1025
+ let T = null, z = null;
1026
+ function A() {
1027
+ z && clearTimeout(z), z = setTimeout(() => {
1028
+ z = null, he(D);
888
1029
  }, 30);
889
1030
  }
890
- ke(() => {
891
- var w, C;
892
- le(v), typeof document < "u" && ((w = document.fonts) != null && w.ready) && document.fonts.ready.then($);
893
- const g = (C = o.value) == null ? void 0 : C.$el;
894
- !g || typeof MutationObserver > "u" || (f = new MutationObserver((z) => {
895
- z.some((S) => {
896
- var R;
897
- return S.type === "childList" ? !0 : !!((R = S.target.parentElement) != null && R.closest(".arco-form-item-label"));
898
- }) && $();
899
- }), f.observe(g, { childList: !0, subtree: !0, characterData: !0 }));
900
- }), de(() => {
901
- y && clearTimeout(y), f == null || f.disconnect(), f = null;
1031
+ Ce(() => {
1032
+ var V, S;
1033
+ he(D), typeof document < "u" && ((V = document.fonts) != null && V.ready) && document.fonts.ready.then(A);
1034
+ const b = (S = m.value) == null ? void 0 : S.$el;
1035
+ !b || typeof MutationObserver > "u" || (T = new MutationObserver((N) => {
1036
+ N.some((E) => {
1037
+ var q;
1038
+ return E.type === "childList" ? !0 : !!((q = E.target.parentElement) != null && q.closest(".arco-form-item-label"));
1039
+ }) && A();
1040
+ }), T.observe(b, { childList: !0, subtree: !0, characterData: !0 }));
1041
+ }), Le(() => {
1042
+ z && clearTimeout(z), T == null || T.disconnect(), T = null;
902
1043
  });
903
- function F() {
904
- var g, w;
905
- return (w = (g = o.value) == null ? void 0 : g.validate) == null ? void 0 : w.call(g);
1044
+ function P() {
1045
+ var b, V;
1046
+ return (V = (b = m.value) == null ? void 0 : b.validate) == null ? void 0 : V.call(b);
906
1047
  }
907
- return t({ validate: F }), (g, w) => (p(), k(h(Ye), {
908
- ref_key: "formRef",
909
- ref: o,
910
- model: a.model ?? r,
911
- class: E(["fm-arco-form", { "fm-arco-form--label-synced": d.value && i.value > 0 }]),
912
- style: Ve(u.value),
913
- layout: a.layout ?? "horizontal",
914
- "label-align": a.labelAlign ?? "right",
915
- "auto-label-width": a.autoLabelWidth !== !1,
916
- disabled: a.disabled,
917
- size: a.size,
918
- rules: a.rules,
919
- "scroll-to-first-error": a.scrollToFirstError === !0,
920
- onSubmit: w[0] || (w[0] = (C, z) => n("submit", z))
921
- }, {
922
- default: A(() => [
923
- Y(g.$slots, "default")
1048
+ return t({ validate: P }), (b, V) => (p(), g(He(u.value), Ye(qe(i.value)), {
1049
+ default: F(() => [
1050
+ G(h(bl), {
1051
+ ref_key: "formRef",
1052
+ ref: m,
1053
+ model: a.model ?? f,
1054
+ class: ee(["fm-arco-form", { "fm-arco-form--label-synced": L.value && v.value > 0 }]),
1055
+ style: Ge(I.value),
1056
+ layout: a.layout ?? "horizontal",
1057
+ "label-align": a.labelAlign ?? "right",
1058
+ "auto-label-width": a.autoLabelWidth !== !1,
1059
+ disabled: a.disabled,
1060
+ size: a.size,
1061
+ rules: a.rules,
1062
+ "scroll-to-first-error": a.scrollToFirstError === !0,
1063
+ onSubmit: V[0] || (V[0] = (S, N) => s("submit", N))
1064
+ }, {
1065
+ default: F(() => [
1066
+ le(b.$slots, "default")
1067
+ ]),
1068
+ _: 3
1069
+ }, 8, ["model", "class", "style", "layout", "label-align", "auto-label-width", "disabled", "size", "rules", "scroll-to-first-error"])
924
1070
  ]),
925
1071
  _: 3
926
- }, 8, ["model", "class", "style", "layout", "label-align", "auto-label-width", "disabled", "size", "rules", "scroll-to-first-error"]));
1072
+ }, 16));
927
1073
  }
928
- }), kl = /* @__PURE__ */ x({
1074
+ }), rt = /* @__PURE__ */ k({
929
1075
  __name: "CardContainer",
930
1076
  props: {
931
1077
  modelValue: {},
@@ -940,26 +1086,26 @@ const dl = {
940
1086
  setup(e) {
941
1087
  return (t, l) => {
942
1088
  var a, n;
943
- return p(), k(h(He), {
1089
+ return p(), g(h(gl), {
944
1090
  class: "fm-arco-card",
945
1091
  title: e.node.label,
946
1092
  bordered: ((a = e.node.props) == null ? void 0 : a.bordered) !== !1,
947
1093
  "header-style": (n = e.node.props) == null ? void 0 : n.headerStyle
948
1094
  }, {
949
- default: A(() => [
950
- Y(t.$slots, "default")
1095
+ default: F(() => [
1096
+ le(t.$slots, "default")
951
1097
  ]),
952
1098
  _: 3
953
1099
  }, 8, ["title", "bordered", "header-style"]);
954
1100
  };
955
1101
  }
956
- }), Vl = {
1102
+ }), it = {
957
1103
  key: 0,
958
1104
  class: "fm-arco-section__header"
959
- }, xl = { class: "fm-arco-section__title" }, zl = {
1105
+ }, dt = { class: "fm-arco-section__title" }, st = {
960
1106
  key: 1,
961
1107
  class: "fm-arco-section__desc"
962
- }, Tl = { class: "fm-arco-section__content" }, Cl = /* @__PURE__ */ x({
1108
+ }, ut = { class: "fm-arco-section__content" }, ct = /* @__PURE__ */ k({
963
1109
  __name: "SectionContainer",
964
1110
  props: {
965
1111
  modelValue: {},
@@ -972,35 +1118,35 @@ const dl = {
972
1118
  error: {}
973
1119
  },
974
1120
  setup(e) {
975
- const t = e, l = m(() => {
1121
+ const t = e, l = c(() => {
976
1122
  var a;
977
1123
  return (((a = t.node.children) == null ? void 0 : a.length) ?? 0) > 0;
978
1124
  });
979
1125
  return (a, n) => {
980
- var r, o;
981
- return p(), I("section", {
982
- class: E(["fm-arco-section", {
983
- "fm-arco-section--plain": ((r = e.node.props) == null ? void 0 : r.plain) === !0,
1126
+ var o, r;
1127
+ return p(), C("section", {
1128
+ class: ee(["fm-arco-section", {
1129
+ "fm-arco-section--plain": ((o = e.node.props) == null ? void 0 : o.plain) === !0,
984
1130
  "fm-arco-section--empty": !l.value
985
1131
  }])
986
1132
  }, [
987
- e.node.label || e.node.help ? (p(), I("header", Vl, [
988
- ((o = e.node.props) == null ? void 0 : o.icon) !== !1 ? (p(), k(h(Ge), {
1133
+ e.node.label || e.node.help ? (p(), C("header", it, [
1134
+ ((r = e.node.props) == null ? void 0 : r.icon) !== !1 ? (p(), g(h(Vl), {
989
1135
  key: 0,
990
1136
  class: "fm-arco-section__icon",
991
1137
  size: 18,
992
1138
  "aria-hidden": "true"
993
- })) : q("", !0),
994
- te("span", xl, U(e.node.label), 1),
995
- e.node.help ? (p(), I("span", zl, U(e.node.help), 1)) : q("", !0)
996
- ])) : q("", !0),
997
- te("div", Tl, [
998
- Y(a.$slots, "default")
1139
+ })) : Y("", !0),
1140
+ ve("span", dt, B(e.node.label), 1),
1141
+ e.node.help ? (p(), C("span", st, B(e.node.help), 1)) : Y("", !0)
1142
+ ])) : Y("", !0),
1143
+ ve("div", ut, [
1144
+ le(a.$slots, "default")
999
1145
  ])
1000
1146
  ], 2);
1001
1147
  };
1002
1148
  }
1003
- }), Sl = /* @__PURE__ */ x({
1149
+ }), pt = /* @__PURE__ */ k({
1004
1150
  __name: "DividerContainer",
1005
1151
  props: {
1006
1152
  modelValue: {},
@@ -1015,75 +1161,98 @@ const dl = {
1015
1161
  setup(e) {
1016
1162
  return (t, l) => {
1017
1163
  var a, n;
1018
- return p(), k(h(qe), {
1164
+ return p(), g(h(wl), {
1019
1165
  orientation: ((a = e.node.props) == null ? void 0 : a.orientation) ?? "center",
1020
1166
  type: ((n = e.node.props) == null ? void 0 : n.dividerType) === "dashed" ? "dashed" : "solid"
1021
1167
  }, {
1022
- default: A(() => [
1023
- W(U(e.node.label), 1)
1168
+ default: F(() => [
1169
+ Z(B(e.node.label), 1)
1024
1170
  ]),
1025
1171
  _: 1
1026
1172
  }, 8, ["orientation", "type"]);
1027
1173
  };
1028
1174
  }
1029
- }), G = [
1175
+ });
1176
+ function mt(e = {}) {
1177
+ return k({
1178
+ name: "ArcoFormShellConfigured",
1179
+ inheritAttrs: !1,
1180
+ setup(t, { attrs: l, slots: a, expose: n }) {
1181
+ const o = H(null);
1182
+ return n({ validate: () => {
1183
+ var r, u;
1184
+ return (u = (r = o.value) == null ? void 0 : r.validate) == null ? void 0 : u.call(r);
1185
+ } }), () => Ze(
1186
+ nt,
1187
+ {
1188
+ ...l,
1189
+ ref: o,
1190
+ localeMap: e.uiLocales,
1191
+ syncLibraryLocale: e.syncLibraryLocale
1192
+ },
1193
+ a
1194
+ );
1195
+ }
1196
+ });
1197
+ }
1198
+ const ae = [
1030
1199
  { key: "placeholder", label: "占位提示", control: "text" },
1031
1200
  { key: "allowClear", label: "允许清空", control: "switch" },
1032
1201
  { key: "maxLength", label: "最大长度", control: "number", min: 1 }
1033
- ], Q = [
1202
+ ], ne = [
1034
1203
  { key: "placeholder", label: "占位提示", control: "text" },
1035
1204
  { key: "allowSearch", label: "允许搜索", control: "switch" },
1036
1205
  { key: "allowClear", label: "允许清空", control: "switch" },
1037
1206
  { key: "maxTagCount", label: "最多展示标签", control: "number", min: 1 }
1038
- ], Ll = Q.filter((e) => e.key !== "maxTagCount"), Bl = [
1039
- V({
1207
+ ], ft = ne.filter((e) => e.key !== "maxTagCount"), yt = [
1208
+ w({
1040
1209
  type: "input",
1041
1210
  label: "单行文本",
1042
1211
  category: "基础字段",
1043
1212
  kind: "field",
1044
1213
  valueType: "string",
1045
1214
  aliases: ["text", "text-input", "string"],
1046
- widget: K,
1215
+ widget: te,
1047
1216
  defaultLayout: { span: 12 },
1048
1217
  defaultProps: { placeholder: "请输入" },
1049
- inspector: G
1218
+ inspector: ae
1050
1219
  }),
1051
- V({
1220
+ w({
1052
1221
  type: "textarea",
1053
1222
  label: "多行文本",
1054
1223
  category: "基础字段",
1055
1224
  kind: "field",
1056
1225
  valueType: "string",
1057
1226
  aliases: ["text-area"],
1058
- widget: K,
1227
+ widget: te,
1059
1228
  defaultLayout: { span: 24 },
1060
1229
  defaultProps: { placeholder: "请输入", rows: 4 },
1061
1230
  inspector: [
1062
- ...G,
1231
+ ...ae,
1063
1232
  { key: "rows", label: "行数", control: "number", min: 2, max: 20 },
1064
1233
  { key: "autoSize", label: "自适应高度", control: "switch" },
1065
1234
  { key: "showWordLimit", label: "显示字数", control: "switch" }
1066
1235
  ]
1067
1236
  }),
1068
- V({
1237
+ w({
1069
1238
  type: "password",
1070
1239
  label: "密码输入",
1071
1240
  category: "基础字段",
1072
1241
  kind: "field",
1073
1242
  valueType: "string",
1074
- widget: K,
1243
+ widget: te,
1075
1244
  defaultLayout: { span: 12 },
1076
1245
  defaultProps: { placeholder: "请输入密码" },
1077
- inspector: G
1246
+ inspector: ae
1078
1247
  }),
1079
- V({
1248
+ w({
1080
1249
  type: "number",
1081
1250
  label: "数字输入",
1082
1251
  category: "基础字段",
1083
1252
  kind: "field",
1084
1253
  valueType: "number",
1085
1254
  aliases: ["input-number", "inputnumber"],
1086
- widget: Je,
1255
+ widget: Tl,
1087
1256
  defaultLayout: { span: 12 },
1088
1257
  defaultProps: { placeholder: "请输入数字" },
1089
1258
  inspector: [
@@ -1094,7 +1263,7 @@ const dl = {
1094
1263
  { key: "precision", label: "精度", control: "number", min: 0, max: 10 }
1095
1264
  ]
1096
1265
  }),
1097
- V({
1266
+ w({
1098
1267
  type: "select",
1099
1268
  label: "下拉选择",
1100
1269
  category: "选择字段",
@@ -1102,12 +1271,12 @@ const dl = {
1102
1271
  valueType: "string",
1103
1272
  aliases: ["dropdown"],
1104
1273
  supportsOptions: !0,
1105
- widget: oe,
1274
+ widget: ge,
1106
1275
  defaultLayout: { span: 12 },
1107
1276
  defaultProps: { placeholder: "请选择", allowClear: !0 },
1108
- inspector: Q
1277
+ inspector: ne
1109
1278
  }),
1110
- V({
1279
+ w({
1111
1280
  type: "multi-select",
1112
1281
  label: "多选下拉",
1113
1282
  category: "选择字段",
@@ -1115,19 +1284,19 @@ const dl = {
1115
1284
  valueType: "string[]",
1116
1285
  aliases: ["multiselect", "multiple-select", "multi"],
1117
1286
  supportsOptions: !0,
1118
- widget: oe,
1287
+ widget: ge,
1119
1288
  defaultLayout: { span: 12 },
1120
1289
  defaultProps: { placeholder: "请选择", allowClear: !0 },
1121
- inspector: Q
1290
+ inspector: ne
1122
1291
  }),
1123
- V({
1292
+ w({
1124
1293
  type: "radio",
1125
1294
  label: "单选框",
1126
1295
  category: "选择字段",
1127
1296
  kind: "field",
1128
1297
  valueType: "string",
1129
1298
  supportsOptions: !0,
1130
- widget: Qe,
1299
+ widget: Sl,
1131
1300
  defaultLayout: { span: 12 },
1132
1301
  inspector: [
1133
1302
  {
@@ -1141,14 +1310,14 @@ const dl = {
1141
1310
  }
1142
1311
  ]
1143
1312
  }),
1144
- V({
1313
+ w({
1145
1314
  type: "checkbox",
1146
1315
  label: "复选框",
1147
1316
  category: "选择字段",
1148
1317
  kind: "field",
1149
1318
  valueType: "string[]",
1150
1319
  supportsOptions: !0,
1151
- widget: Xe,
1320
+ widget: Bl,
1152
1321
  defaultLayout: { span: 12 },
1153
1322
  inspector: [
1154
1323
  {
@@ -1162,26 +1331,26 @@ const dl = {
1162
1331
  }
1163
1332
  ]
1164
1333
  }),
1165
- V({
1334
+ w({
1166
1335
  type: "switch",
1167
1336
  label: "开关",
1168
1337
  category: "选择字段",
1169
1338
  kind: "field",
1170
1339
  valueType: "boolean",
1171
- widget: Ze,
1340
+ widget: Al,
1172
1341
  defaultLayout: { span: 8 },
1173
1342
  inspector: [
1174
1343
  { key: "checkedText", label: "开启文案", control: "text" },
1175
1344
  { key: "uncheckedText", label: "关闭文案", control: "text" }
1176
1345
  ]
1177
1346
  }),
1178
- V({
1347
+ w({
1179
1348
  type: "slider",
1180
1349
  label: "滑动条",
1181
1350
  category: "选择字段",
1182
1351
  kind: "field",
1183
1352
  valueType: "number",
1184
- widget: _e,
1353
+ widget: Fl,
1185
1354
  defaultLayout: { span: 12 },
1186
1355
  inspector: [
1187
1356
  { key: "min", label: "最小值", control: "number" },
@@ -1190,27 +1359,27 @@ const dl = {
1190
1359
  { key: "showInput", label: "显示输入框", control: "switch" }
1191
1360
  ]
1192
1361
  }),
1193
- V({
1362
+ w({
1194
1363
  type: "rate",
1195
1364
  label: "评分",
1196
1365
  category: "选择字段",
1197
1366
  kind: "field",
1198
1367
  valueType: "number",
1199
- widget: el,
1368
+ widget: Il,
1200
1369
  defaultLayout: { span: 8 },
1201
1370
  inspector: [
1202
1371
  { key: "count", label: "星星数量", control: "number", min: 1, max: 10 },
1203
1372
  { key: "allowHalf", label: "允许半星", control: "switch" }
1204
1373
  ]
1205
1374
  }),
1206
- V({
1375
+ w({
1207
1376
  type: "date",
1208
1377
  label: "日期",
1209
1378
  category: "日期时间",
1210
1379
  kind: "field",
1211
1380
  valueType: "timestamp",
1212
1381
  aliases: ["datepicker", "date-picker"],
1213
- widget: ne,
1382
+ widget: we,
1214
1383
  defaultLayout: { span: 12 },
1215
1384
  defaultProps: { placeholder: "请选择日期" },
1216
1385
  inspector: [
@@ -1219,14 +1388,14 @@ const dl = {
1219
1388
  { key: "allowClear", label: "允许清空", control: "switch" }
1220
1389
  ]
1221
1390
  }),
1222
- V({
1391
+ w({
1223
1392
  type: "date-range",
1224
1393
  label: "日期范围",
1225
1394
  category: "日期时间",
1226
1395
  kind: "field",
1227
1396
  valueType: "timestamp[]",
1228
1397
  aliases: ["daterange", "date-picker-range", "rangepicker"],
1229
- widget: ne,
1398
+ widget: we,
1230
1399
  defaultLayout: { span: 12 },
1231
1400
  defaultProps: { placeholder: ["开始日期", "结束日期"] },
1232
1401
  inspector: [
@@ -1235,14 +1404,14 @@ const dl = {
1235
1404
  { key: "allowClear", label: "允许清空", control: "switch" }
1236
1405
  ]
1237
1406
  }),
1238
- V({
1407
+ w({
1239
1408
  type: "time",
1240
1409
  label: "时间",
1241
1410
  category: "日期时间",
1242
1411
  kind: "field",
1243
1412
  valueType: "string",
1244
1413
  aliases: ["timepicker", "time-picker"],
1245
- widget: al,
1414
+ widget: Pl,
1246
1415
  defaultLayout: { span: 12 },
1247
1416
  defaultProps: { placeholder: "请选择时间" },
1248
1417
  inspector: [
@@ -1250,19 +1419,20 @@ const dl = {
1250
1419
  { key: "allowClear", label: "允许清空", control: "switch" }
1251
1420
  ]
1252
1421
  }),
1253
- V({
1422
+ w({
1254
1423
  type: "upload",
1255
1424
  label: "文件上传",
1256
1425
  category: "高级字段",
1257
1426
  kind: "field",
1258
1427
  valueType: "file[]",
1259
1428
  aliases: ["file", "file-upload"],
1260
- widget: re,
1261
- viewWidget: re,
1429
+ widget: xe,
1430
+ viewWidget: xe,
1262
1431
  defaultLayout: { span: 24 },
1263
- defaultProps: { autoUpload: !1 },
1432
+ defaultProps: { autoUpload: !1, showFileList: !0 },
1264
1433
  inspector: [
1265
1434
  { key: "accept", label: "文件类型", control: "text", placeholder: ".pdf,.png" },
1435
+ { key: "maxSize", label: "大小上限 (MB)", control: "number", min: 0, placeholder: "例如 10" },
1266
1436
  { key: "action", label: "上传地址", control: "text", placeholder: "https://api.example.com/upload" },
1267
1437
  { key: "autoUpload", label: "自动上传", control: "switch" },
1268
1438
  { key: "limit", label: "数量限制", control: "number", min: 1 },
@@ -1270,14 +1440,14 @@ const dl = {
1270
1440
  { key: "showFileList", label: "显示文件列表", control: "switch" }
1271
1441
  ]
1272
1442
  }),
1273
- V({
1443
+ w({
1274
1444
  type: "cascader",
1275
1445
  label: "级联选择",
1276
1446
  category: "高级字段",
1277
1447
  kind: "field",
1278
1448
  valueType: "string[]",
1279
1449
  supportsOptions: !0,
1280
- widget: yl,
1450
+ widget: Jl,
1281
1451
  defaultLayout: { span: 12 },
1282
1452
  defaultProps: { placeholder: "请选择", allowClear: !0 },
1283
1453
  inspector: [
@@ -1287,7 +1457,7 @@ const dl = {
1287
1457
  { key: "changeOnSelect", label: "选择即变化", control: "switch" }
1288
1458
  ]
1289
1459
  }),
1290
- V({
1460
+ w({
1291
1461
  type: "tree-select",
1292
1462
  label: "树选择",
1293
1463
  category: "高级字段",
@@ -1295,29 +1465,29 @@ const dl = {
1295
1465
  valueType: "string",
1296
1466
  aliases: ["treeselect"],
1297
1467
  supportsOptions: !0,
1298
- widget: bl,
1468
+ widget: Xl,
1299
1469
  defaultLayout: { span: 12 },
1300
1470
  defaultProps: { placeholder: "请选择", allowClear: !0 },
1301
- inspector: Ll
1471
+ inspector: ft
1302
1472
  }),
1303
- V({
1473
+ w({
1304
1474
  type: "color",
1305
1475
  label: "颜色选择",
1306
1476
  category: "高级字段",
1307
1477
  kind: "field",
1308
1478
  valueType: "string",
1309
- widget: hl,
1479
+ widget: _l,
1310
1480
  defaultLayout: { span: 8 },
1311
1481
  inspector: [{ key: "disabledAlpha", label: "禁用透明度", control: "switch" }]
1312
1482
  }),
1313
- V({
1483
+ w({
1314
1484
  type: "static-text",
1315
1485
  label: "静态文本",
1316
1486
  category: "展示组件",
1317
1487
  kind: "display",
1318
1488
  valueType: "void",
1319
1489
  aliases: ["static", "statictext"],
1320
- widget: vl,
1490
+ widget: et,
1321
1491
  defaultLayout: { span: 24, hideLabel: !0 },
1322
1492
  defaultProps: { content: "静态文本内容", type: "default" },
1323
1493
  inspector: [
@@ -1336,25 +1506,25 @@ const dl = {
1336
1506
  }
1337
1507
  ]
1338
1508
  }),
1339
- V({
1509
+ w({
1340
1510
  type: "card",
1341
1511
  label: "卡片容器",
1342
1512
  category: "布局容器",
1343
1513
  kind: "container",
1344
1514
  isContainer: !0,
1345
1515
  valueType: "void",
1346
- widget: kl,
1516
+ widget: rt,
1347
1517
  defaultLayout: { span: 24 },
1348
1518
  inspector: [{ key: "bordered", label: "显示边框", control: "switch" }]
1349
1519
  }),
1350
- V({
1520
+ w({
1351
1521
  type: "section",
1352
1522
  label: "分组区块",
1353
1523
  category: "布局容器",
1354
1524
  kind: "container",
1355
1525
  isContainer: !0,
1356
1526
  valueType: "void",
1357
- widget: Cl,
1527
+ widget: ct,
1358
1528
  defaultLayout: { span: 24 },
1359
1529
  defaultProps: { icon: !0, plain: !1 },
1360
1530
  inspector: [
@@ -1362,14 +1532,14 @@ const dl = {
1362
1532
  { key: "plain", label: "无背景", control: "switch" }
1363
1533
  ]
1364
1534
  }),
1365
- V({
1535
+ w({
1366
1536
  type: "divider",
1367
1537
  label: "分割线",
1368
1538
  category: "布局容器",
1369
1539
  kind: "display",
1370
1540
  valueType: "void",
1371
1541
  aliases: ["line"],
1372
- widget: Sl,
1542
+ widget: pt,
1373
1543
  defaultLayout: { span: 24, hideLabel: !0 },
1374
1544
  defaultProps: { orientation: "center", dividerType: "solid" },
1375
1545
  inspector: [
@@ -1394,45 +1564,90 @@ const dl = {
1394
1564
  }
1395
1565
  ]
1396
1566
  })
1397
- ], Il = Bl.map(
1398
- (e) => e.kind === "container" ? e : { ...e, fieldWrapper: gl }
1567
+ ], ht = {
1568
+ 基础字段: "category.basic",
1569
+ 选择字段: "category.selection",
1570
+ 日期时间: "category.datetime",
1571
+ 高级字段: "category.advanced",
1572
+ 展示组件: "category.display",
1573
+ 布局容器: "category.container"
1574
+ }, vt = {
1575
+ "static-text": { content: "field.static-text.content" }
1576
+ }, bt = ["start", "end"];
1577
+ function gt(e, t) {
1578
+ return Array.isArray(t) ? t.map(
1579
+ (l, a) => `field.${e}.placeholder.${bt[a] ?? String(a)}`
1580
+ ) : `field.${e}.placeholder`;
1581
+ }
1582
+ function wt(e) {
1583
+ var a;
1584
+ const t = e.type, l = {};
1585
+ return e.defaultProps && "placeholder" in e.defaultProps && (l.placeholder = gt(t, e.defaultProps.placeholder)), {
1586
+ ...e,
1587
+ labelKey: `field.${t}.label`,
1588
+ categoryKey: ht[e.category ?? ""],
1589
+ propMessageKeys: {
1590
+ ...l,
1591
+ ...vt[t] ?? {}
1592
+ },
1593
+ inspector: (a = e.inspector) == null ? void 0 : a.map((n) => {
1594
+ var o;
1595
+ return {
1596
+ ...n,
1597
+ labelKey: `field.${t}.inspector.${n.key}`,
1598
+ options: (o = n.options) == null ? void 0 : o.map((r) => ({
1599
+ ...r,
1600
+ labelKey: `field.${t}.inspector.${n.key}.option.${String(r.value)}`
1601
+ }))
1602
+ };
1603
+ })
1604
+ };
1605
+ }
1606
+ const kt = yt.map(wt).map(
1607
+ (e) => e.kind === "container" ? e : { ...e, fieldWrapper: lt }
1399
1608
  );
1400
- function $l(e = {}) {
1401
- return ge({
1609
+ function xt(e = {}) {
1610
+ return je({
1402
1611
  name: e.name ?? "@fishbelly/form-morph-arco",
1403
- version: "0.1.1",
1612
+ version: "0.2.0",
1404
1613
  apiVersion: 1,
1405
1614
  contributes: {
1406
- fieldTypes: Il,
1407
- formShell: wl
1615
+ fieldTypes: kt,
1616
+ formShell: mt(e),
1617
+ locales: {
1618
+ "zh-CN": Se,
1619
+ ...e.locales ?? {}
1620
+ }
1408
1621
  }
1409
1622
  });
1410
1623
  }
1411
- const Ml = $l();
1624
+ const At = xt();
1412
1625
  export {
1413
- gl as ArcoFormItem,
1414
- wl as ArcoFormShell,
1415
- kl as CardContainer,
1416
- yl as CascaderInput,
1417
- Xe as CheckboxInput,
1418
- hl as ColorInput,
1419
- ne as DateInput,
1420
- Sl as DividerContainer,
1421
- Je as NumberInput,
1422
- Qe as RadioInput,
1423
- el as RateInput,
1424
- Cl as SectionContainer,
1425
- oe as SelectInput,
1426
- _e as SliderInput,
1427
- vl as StaticText,
1428
- Ze as SwitchInput,
1429
- K as TextInput,
1430
- al as TimeInput,
1431
- bl as TreeSelectInput,
1432
- re as UploadInput,
1433
- Il as arcoFieldTypes,
1434
- Ml as arcoPack,
1435
- $l as createArcoPack,
1436
- Ml as default
1626
+ lt as ArcoFormItem,
1627
+ nt as ArcoFormShell,
1628
+ rt as CardContainer,
1629
+ Jl as CascaderInput,
1630
+ Bl as CheckboxInput,
1631
+ _l as ColorInput,
1632
+ we as DateInput,
1633
+ pt as DividerContainer,
1634
+ Tl as NumberInput,
1635
+ Sl as RadioInput,
1636
+ Il as RateInput,
1637
+ ct as SectionContainer,
1638
+ ge as SelectInput,
1639
+ Fl as SliderInput,
1640
+ et as StaticText,
1641
+ Al as SwitchInput,
1642
+ te as TextInput,
1643
+ Pl as TimeInput,
1644
+ Xl as TreeSelectInput,
1645
+ xe as UploadInput,
1646
+ kt as arcoFieldTypes,
1647
+ At as arcoPack,
1648
+ Se as arcoZhCN,
1649
+ mt as createArcoFormShell,
1650
+ xt as createArcoPack,
1651
+ At as default
1437
1652
  };
1438
1653
  //# sourceMappingURL=index.js.map