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