inquirer-form 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +392 -73
- package/README.zh-CN.md +459 -0
- package/dist/index.d.ts +1 -1
- package/dist/inquirer-form.css +1 -1
- package/dist/inquirer-form.es.js +1539 -979
- package/dist/inquirer-form.umd.js +3 -3
- package/package.json +74 -72
package/dist/inquirer-form.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { FormItemWrapper as
|
|
3
|
-
import { ElInput as
|
|
4
|
-
import { useI18n as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as f, computed as y, createBlock as b, openBlock as i, unref as o, withCtx as V, createElementVNode as c, createElementBlock as d, createCommentVNode as x, toDisplayString as m, Fragment as I, renderList as z, toRefs as B, createVNode as h, createSlots as xe, createTextVNode as X, renderSlot as ie, ref as H, Transition as Oe, mergeProps as L, onBeforeUnmount as ye, watch as Z, resolveComponent as He, resolveDynamicComponent as he, normalizeProps as Je, guardReactiveProps as Ge, onMounted as Qe, withDirectives as oe, normalizeClass as je, vShow as ne } from "vue";
|
|
2
|
+
import { FormItemWrapper as _e, TextSetting as A, SwitchSetting as se, OptionsEditor as we, registry as j, SchemaEngine as Ve, FormDesigner as qe, serialize as We } from "agilebuilder-form";
|
|
3
|
+
import { ElInput as ee, ElTooltip as Ye, ElIcon as Ce, ElInputNumber as Ee, ElSwitch as Ke, ElSelect as Se, ElOption as ke, ElCheckboxGroup as Xe, ElCheckbox as Ze, ElForm as et } from "element-plus";
|
|
4
|
+
import { useI18n as re } from "vue-i18n";
|
|
5
|
+
const tt = { class: "inquirer-designer-card" }, lt = { class: "card-header" }, st = { class: "type-badge" }, at = { class: "message" }, ot = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "description"
|
|
8
|
-
},
|
|
8
|
+
}, nt = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "options-preview"
|
|
11
|
-
},
|
|
11
|
+
}, it = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "more"
|
|
14
|
-
},
|
|
14
|
+
}, rt = /* @__PURE__ */ f({
|
|
15
15
|
inheritAttrs: !1,
|
|
16
16
|
__name: "BaseQuestionDesigner",
|
|
17
17
|
props: {
|
|
@@ -24,38 +24,38 @@ const Qe = { class: "inquirer-designer-card" }, je = { class: "card-header" }, G
|
|
|
24
24
|
previewCount: {}
|
|
25
25
|
},
|
|
26
26
|
emits: ["select"],
|
|
27
|
-
setup(e, { emit:
|
|
28
|
-
const
|
|
29
|
-
return (
|
|
27
|
+
setup(e, { emit: l }) {
|
|
28
|
+
const t = e, a = l, r = y(() => t.previewCount ?? 3), n = y(() => t.options?.slice(0, r.value) ?? []), s = y(() => (t.options?.length ?? 0) > r.value), u = y(() => t.label || t.message || t.typeLabel), _ = y(() => t.message || "未设置 message");
|
|
29
|
+
return (p, v) => (i(), b(o(_e), {
|
|
30
30
|
selectable: "",
|
|
31
|
-
label:
|
|
31
|
+
label: u.value,
|
|
32
32
|
"is-active": e.isActive,
|
|
33
|
-
onSelect:
|
|
33
|
+
onSelect: v[0] || (v[0] = (g) => a("select"))
|
|
34
34
|
}, {
|
|
35
|
-
default:
|
|
36
|
-
c("div",
|
|
37
|
-
c("header",
|
|
38
|
-
c("span",
|
|
35
|
+
default: V(() => [
|
|
36
|
+
c("div", tt, [
|
|
37
|
+
c("header", lt, [
|
|
38
|
+
c("span", st, m(e.typeLabel), 1)
|
|
39
39
|
]),
|
|
40
|
-
c("div",
|
|
41
|
-
e.description ? (
|
|
42
|
-
|
|
43
|
-
(
|
|
44
|
-
key:
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
])) :
|
|
40
|
+
c("div", at, m(_.value), 1),
|
|
41
|
+
e.description ? (i(), d("p", ot, m(e.description), 1)) : x("", !0),
|
|
42
|
+
n.value.length ? (i(), d("ul", nt, [
|
|
43
|
+
(i(!0), d(I, null, z(n.value, (g) => (i(), d("li", {
|
|
44
|
+
key: g.value
|
|
45
|
+
}, m(g.label || g.value), 1))), 128)),
|
|
46
|
+
s.value ? (i(), d("li", it, "…")) : x("", !0)
|
|
47
|
+
])) : x("", !0)
|
|
48
48
|
])
|
|
49
49
|
]),
|
|
50
50
|
_: 1
|
|
51
51
|
}, 8, ["label", "is-active"]));
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
54
|
-
const
|
|
55
|
-
for (const [
|
|
56
|
-
|
|
57
|
-
return
|
|
58
|
-
},
|
|
53
|
+
}), q = (e, l) => {
|
|
54
|
+
const t = e.__vccOpts || e;
|
|
55
|
+
for (const [a, r] of l)
|
|
56
|
+
t[a] = r;
|
|
57
|
+
return t;
|
|
58
|
+
}, M = /* @__PURE__ */ q(rt, [["__scopeId", "data-v-b29b6f1e"]]), ut = /* @__PURE__ */ f({
|
|
59
59
|
__name: "designer",
|
|
60
60
|
props: {
|
|
61
61
|
label: {},
|
|
@@ -64,21 +64,21 @@ const Qe = { class: "inquirer-designer-card" }, je = { class: "card-header" }, G
|
|
|
64
64
|
isActive: { type: Boolean }
|
|
65
65
|
},
|
|
66
66
|
emits: ["select"],
|
|
67
|
-
setup(e, { emit:
|
|
68
|
-
const
|
|
69
|
-
return (
|
|
70
|
-
label: o(
|
|
71
|
-
message: o(
|
|
72
|
-
description: o(
|
|
67
|
+
setup(e, { emit: l }) {
|
|
68
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u } = B(t);
|
|
69
|
+
return (_, p) => (i(), b(M, {
|
|
70
|
+
label: o(r),
|
|
71
|
+
message: o(n),
|
|
72
|
+
description: o(s),
|
|
73
73
|
"type-label": "Inquirer Input",
|
|
74
|
-
"is-active": o(
|
|
75
|
-
onSelect:
|
|
74
|
+
"is-active": o(u),
|
|
75
|
+
onSelect: p[0] || (p[0] = (v) => a("select"))
|
|
76
76
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
77
77
|
}
|
|
78
|
-
}),
|
|
78
|
+
}), ct = { class: "inquirer-input" }, dt = {
|
|
79
79
|
key: 0,
|
|
80
80
|
class: "transformer-preview"
|
|
81
|
-
},
|
|
81
|
+
}, pt = /* @__PURE__ */ f({
|
|
82
82
|
__name: "runtime",
|
|
83
83
|
props: {
|
|
84
84
|
modelValue: {},
|
|
@@ -89,67 +89,62 @@ const Qe = { class: "inquirer-designer-card" }, je = { class: "card-header" }, G
|
|
|
89
89
|
displayValue: {}
|
|
90
90
|
},
|
|
91
91
|
emits: ["update:modelValue"],
|
|
92
|
-
setup(e, { emit:
|
|
93
|
-
const
|
|
94
|
-
return (
|
|
95
|
-
|
|
92
|
+
setup(e, { emit: l }) {
|
|
93
|
+
const t = e, a = l, r = y(() => t.displayValue === void 0 ? !1 : t.displayValue !== t.modelValue);
|
|
94
|
+
return (n, s) => (i(), d("div", ct, [
|
|
95
|
+
h(o(ee), {
|
|
96
96
|
"model-value": e.modelValue ?? "",
|
|
97
97
|
placeholder: e.placeholder,
|
|
98
98
|
disabled: e.disabled,
|
|
99
99
|
clearable: "",
|
|
100
|
-
"onUpdate:modelValue":
|
|
101
|
-
},
|
|
100
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => a("update:modelValue", u ?? ""))
|
|
101
|
+
}, xe({ _: 2 }, [
|
|
102
102
|
e.prefix ? {
|
|
103
103
|
name: "prepend",
|
|
104
|
-
fn:
|
|
105
|
-
|
|
104
|
+
fn: V(() => [
|
|
105
|
+
X(m(e.prefix), 1)
|
|
106
106
|
]),
|
|
107
107
|
key: "0"
|
|
108
108
|
} : void 0,
|
|
109
109
|
e.suffix ? {
|
|
110
110
|
name: "append",
|
|
111
|
-
fn:
|
|
112
|
-
|
|
111
|
+
fn: V(() => [
|
|
112
|
+
X(m(e.suffix), 1)
|
|
113
113
|
]),
|
|
114
114
|
key: "1"
|
|
115
115
|
} : void 0
|
|
116
116
|
]), 1032, ["model-value", "placeholder", "disabled"]),
|
|
117
|
-
|
|
117
|
+
r.value ? (i(), d("p", dt, m(e.displayValue), 1)) : x("", !0)
|
|
118
118
|
]));
|
|
119
119
|
}
|
|
120
|
-
}),
|
|
120
|
+
}), mt = /* @__PURE__ */ q(pt, [["__scopeId", "data-v-c4eebc18"]]), ft = { class: "base-input-config" }, ht = /* @__PURE__ */ f({
|
|
121
121
|
__name: "BaseInputConfig",
|
|
122
122
|
props: {
|
|
123
123
|
label: {},
|
|
124
124
|
field: {}
|
|
125
125
|
},
|
|
126
126
|
emits: ["update"],
|
|
127
|
-
setup(e, { emit:
|
|
128
|
-
const
|
|
129
|
-
function
|
|
130
|
-
|
|
127
|
+
setup(e, { emit: l }) {
|
|
128
|
+
const t = l;
|
|
129
|
+
function a(n) {
|
|
130
|
+
t("update", { field: n });
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
|
|
132
|
+
function r(n, s) {
|
|
133
|
+
t("update", { props: { [n]: s } });
|
|
134
134
|
}
|
|
135
|
-
return (
|
|
136
|
-
|
|
137
|
-
label:
|
|
135
|
+
return (n, s) => (i(), d("div", ft, [
|
|
136
|
+
h(o(A), {
|
|
137
|
+
label: n.$t("designer.node.field_label"),
|
|
138
138
|
modelValue: e.field,
|
|
139
|
-
"onUpdate:modelValue":
|
|
139
|
+
"onUpdate:modelValue": a
|
|
140
140
|
}, null, 8, ["label", "modelValue"]),
|
|
141
|
-
|
|
142
|
-
label: i.$t("designer.form.fields.label_label"),
|
|
143
|
-
modelValue: e.label,
|
|
144
|
-
"onUpdate:modelValue": n[0] || (n[0] = (r) => a("label", r))
|
|
145
|
-
}, null, 8, ["label", "modelValue"]),
|
|
146
|
-
ne(i.$slots, "default", { updateProp: a }, void 0, !0)
|
|
141
|
+
ie(n.$slots, "default", { updateProp: r }, void 0, !0)
|
|
147
142
|
]));
|
|
148
143
|
}
|
|
149
|
-
}),
|
|
144
|
+
}), vt = /* @__PURE__ */ q(ht, [["__scopeId", "data-v-be4e1176"]]), gt = { class: "textarea-setting" }, bt = {
|
|
150
145
|
key: 0,
|
|
151
146
|
class: "hint"
|
|
152
|
-
},
|
|
147
|
+
}, xt = /* @__PURE__ */ f({
|
|
153
148
|
__name: "TextareaSetting",
|
|
154
149
|
props: {
|
|
155
150
|
label: {},
|
|
@@ -159,25 +154,117 @@ const Qe = { class: "inquirer-designer-card" }, je = { class: "card-header" }, G
|
|
|
159
154
|
maxRows: { default: 4 }
|
|
160
155
|
},
|
|
161
156
|
emits: ["update:modelValue"],
|
|
162
|
-
setup(e, { emit:
|
|
163
|
-
const
|
|
164
|
-
return (
|
|
165
|
-
c("label", null,
|
|
166
|
-
|
|
157
|
+
setup(e, { emit: l }) {
|
|
158
|
+
const t = l;
|
|
159
|
+
return (a, r) => (i(), d("div", gt, [
|
|
160
|
+
c("label", null, m(e.label), 1),
|
|
161
|
+
h(o(ee), {
|
|
167
162
|
type: "textarea",
|
|
168
163
|
"model-value": e.modelValue,
|
|
169
164
|
autosize: { minRows: e.minRows, maxRows: e.maxRows },
|
|
170
|
-
"onUpdate:modelValue":
|
|
165
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => t("update:modelValue", n ?? ""))
|
|
171
166
|
}, null, 8, ["model-value", "autosize"]),
|
|
172
|
-
e.hint ? (
|
|
167
|
+
e.hint ? (i(), d("p", bt, m(e.hint), 1)) : x("", !0)
|
|
168
|
+
]));
|
|
169
|
+
}
|
|
170
|
+
}), yt = /* @__PURE__ */ q(xt, [["__scopeId", "data-v-9093816f"]]);
|
|
171
|
+
var _t = /* @__PURE__ */ f({
|
|
172
|
+
name: "CircleCheck",
|
|
173
|
+
__name: "circle-check",
|
|
174
|
+
setup(e) {
|
|
175
|
+
return (l, t) => (i(), d("svg", {
|
|
176
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
177
|
+
viewBox: "0 0 1024 1024"
|
|
178
|
+
}, [
|
|
179
|
+
c("path", {
|
|
180
|
+
fill: "currentColor",
|
|
181
|
+
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
|
182
|
+
}),
|
|
183
|
+
c("path", {
|
|
184
|
+
fill: "currentColor",
|
|
185
|
+
d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"
|
|
186
|
+
})
|
|
187
|
+
]));
|
|
188
|
+
}
|
|
189
|
+
}), wt = _t, Vt = /* @__PURE__ */ f({
|
|
190
|
+
name: "Compass",
|
|
191
|
+
__name: "compass",
|
|
192
|
+
setup(e) {
|
|
193
|
+
return (l, t) => (i(), d("svg", {
|
|
194
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
195
|
+
viewBox: "0 0 1024 1024"
|
|
196
|
+
}, [
|
|
197
|
+
c("path", {
|
|
198
|
+
fill: "currentColor",
|
|
199
|
+
d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
|
|
200
|
+
}),
|
|
201
|
+
c("path", {
|
|
202
|
+
fill: "currentColor",
|
|
203
|
+
d: "M725.888 315.008C676.48 428.672 624 513.28 568.576 568.64c-55.424 55.424-139.968 107.904-253.568 157.312a12.8 12.8 0 0 1-16.896-16.832c49.536-113.728 102.016-198.272 157.312-253.632 55.36-55.296 139.904-107.776 253.632-157.312a12.8 12.8 0 0 1 16.832 16.832"
|
|
204
|
+
})
|
|
205
|
+
]));
|
|
206
|
+
}
|
|
207
|
+
}), qt = Vt, Ct = /* @__PURE__ */ f({
|
|
208
|
+
name: "DataLine",
|
|
209
|
+
__name: "data-line",
|
|
210
|
+
setup(e) {
|
|
211
|
+
return (l, t) => (i(), d("svg", {
|
|
212
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
213
|
+
viewBox: "0 0 1024 1024"
|
|
214
|
+
}, [
|
|
215
|
+
c("path", {
|
|
216
|
+
fill: "currentColor",
|
|
217
|
+
d: "M359.168 768H160a32 32 0 0 1-32-32V192H64a32 32 0 0 1 0-64h896a32 32 0 1 1 0 64h-64v544a32 32 0 0 1-32 32H665.216l110.848 192h-73.856L591.36 768H433.024L322.176 960H248.32zM832 192H192v512h640zM342.656 534.656a32 32 0 1 1-45.312-45.312L444.992 341.76l125.44 94.08L679.04 300.032a32 32 0 1 1 49.92 39.936L581.632 524.224 451.008 426.24 342.656 534.592z"
|
|
218
|
+
})
|
|
173
219
|
]));
|
|
174
220
|
}
|
|
175
|
-
}),
|
|
176
|
-
|
|
221
|
+
}), Et = Ct, St = /* @__PURE__ */ f({
|
|
222
|
+
name: "EditPen",
|
|
223
|
+
__name: "edit-pen",
|
|
224
|
+
setup(e) {
|
|
225
|
+
return (l, t) => (i(), d("svg", {
|
|
226
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
227
|
+
viewBox: "0 0 1024 1024"
|
|
228
|
+
}, [
|
|
229
|
+
c("path", {
|
|
230
|
+
fill: "currentColor",
|
|
231
|
+
d: "m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"
|
|
232
|
+
})
|
|
233
|
+
]));
|
|
234
|
+
}
|
|
235
|
+
}), kt = St, $t = /* @__PURE__ */ f({
|
|
236
|
+
name: "Expand",
|
|
237
|
+
__name: "expand",
|
|
238
|
+
setup(e) {
|
|
239
|
+
return (l, t) => (i(), d("svg", {
|
|
240
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
241
|
+
viewBox: "0 0 1024 1024"
|
|
242
|
+
}, [
|
|
243
|
+
c("path", {
|
|
244
|
+
fill: "currentColor",
|
|
245
|
+
d: "M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"
|
|
246
|
+
})
|
|
247
|
+
]));
|
|
248
|
+
}
|
|
249
|
+
}), Ut = $t, It = /* @__PURE__ */ f({
|
|
250
|
+
name: "Finished",
|
|
251
|
+
__name: "finished",
|
|
252
|
+
setup(e) {
|
|
253
|
+
return (l, t) => (i(), d("svg", {
|
|
254
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
255
|
+
viewBox: "0 0 1024 1024"
|
|
256
|
+
}, [
|
|
257
|
+
c("path", {
|
|
258
|
+
fill: "currentColor",
|
|
259
|
+
d: "M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"
|
|
260
|
+
})
|
|
261
|
+
]));
|
|
262
|
+
}
|
|
263
|
+
}), Nt = It, zt = /* @__PURE__ */ f({
|
|
177
264
|
name: "InfoFilled",
|
|
178
265
|
__name: "info-filled",
|
|
179
266
|
setup(e) {
|
|
180
|
-
return (
|
|
267
|
+
return (l, t) => (i(), d("svg", {
|
|
181
268
|
xmlns: "http://www.w3.org/2000/svg",
|
|
182
269
|
viewBox: "0 0 1024 1024"
|
|
183
270
|
}, [
|
|
@@ -187,8 +274,77 @@ var cl = /* @__PURE__ */ h({
|
|
|
187
274
|
})
|
|
188
275
|
]));
|
|
189
276
|
}
|
|
190
|
-
}),
|
|
191
|
-
|
|
277
|
+
}), Bt = zt, Mt = /* @__PURE__ */ f({
|
|
278
|
+
name: "List",
|
|
279
|
+
__name: "list",
|
|
280
|
+
setup(e) {
|
|
281
|
+
return (l, t) => (i(), d("svg", {
|
|
282
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
283
|
+
viewBox: "0 0 1024 1024"
|
|
284
|
+
}, [
|
|
285
|
+
c("path", {
|
|
286
|
+
fill: "currentColor",
|
|
287
|
+
d: "M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z"
|
|
288
|
+
})
|
|
289
|
+
]));
|
|
290
|
+
}
|
|
291
|
+
}), Tt = Mt, Dt = /* @__PURE__ */ f({
|
|
292
|
+
name: "Lock",
|
|
293
|
+
__name: "lock",
|
|
294
|
+
setup(e) {
|
|
295
|
+
return (l, t) => (i(), d("svg", {
|
|
296
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
297
|
+
viewBox: "0 0 1024 1024"
|
|
298
|
+
}, [
|
|
299
|
+
c("path", {
|
|
300
|
+
fill: "currentColor",
|
|
301
|
+
d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"
|
|
302
|
+
}),
|
|
303
|
+
c("path", {
|
|
304
|
+
fill: "currentColor",
|
|
305
|
+
d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"
|
|
306
|
+
})
|
|
307
|
+
]));
|
|
308
|
+
}
|
|
309
|
+
}), At = Dt, Lt = /* @__PURE__ */ f({
|
|
310
|
+
name: "Memo",
|
|
311
|
+
__name: "memo",
|
|
312
|
+
setup(e) {
|
|
313
|
+
return (l, t) => (i(), d("svg", {
|
|
314
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
315
|
+
"xml:space": "preserve",
|
|
316
|
+
viewBox: "0 0 1024 1024"
|
|
317
|
+
}, [
|
|
318
|
+
c("path", {
|
|
319
|
+
fill: "currentColor",
|
|
320
|
+
d: "M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"
|
|
321
|
+
}),
|
|
322
|
+
c("path", {
|
|
323
|
+
fill: "currentColor",
|
|
324
|
+
d: "M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"
|
|
325
|
+
}),
|
|
326
|
+
c("path", {
|
|
327
|
+
fill: "currentColor",
|
|
328
|
+
d: "M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"
|
|
329
|
+
})
|
|
330
|
+
]));
|
|
331
|
+
}
|
|
332
|
+
}), Rt = Lt, Ft = /* @__PURE__ */ f({
|
|
333
|
+
name: "Tickets",
|
|
334
|
+
__name: "tickets",
|
|
335
|
+
setup(e) {
|
|
336
|
+
return (l, t) => (i(), d("svg", {
|
|
337
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
338
|
+
viewBox: "0 0 1024 1024"
|
|
339
|
+
}, [
|
|
340
|
+
c("path", {
|
|
341
|
+
fill: "currentColor",
|
|
342
|
+
d: "M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"
|
|
343
|
+
})
|
|
344
|
+
]));
|
|
345
|
+
}
|
|
346
|
+
}), Pt = Ft;
|
|
347
|
+
const Ot = {
|
|
192
348
|
"zh-CN": {
|
|
193
349
|
config: {
|
|
194
350
|
message: "提问文案 (message)",
|
|
@@ -244,17 +400,17 @@ const ml = {
|
|
|
244
400
|
}
|
|
245
401
|
}
|
|
246
402
|
};
|
|
247
|
-
function
|
|
248
|
-
return
|
|
403
|
+
function $e() {
|
|
404
|
+
return re({
|
|
249
405
|
inheritLocale: !0,
|
|
250
406
|
useScope: "local",
|
|
251
|
-
messages:
|
|
407
|
+
messages: Ot
|
|
252
408
|
});
|
|
253
409
|
}
|
|
254
|
-
const
|
|
410
|
+
const Ht = { class: "expression-editor" }, Jt = { class: "expression-editor__label" }, Gt = {
|
|
255
411
|
key: 0,
|
|
256
412
|
class: "expression-editor__examples"
|
|
257
|
-
},
|
|
413
|
+
}, Qt = { class: "examples-title" }, jt = { class: "examples-list" }, Wt = { class: "expression-editor__footer" }, Yt = /* @__PURE__ */ f({
|
|
258
414
|
__name: "ExpressionEditor",
|
|
259
415
|
props: {
|
|
260
416
|
label: {},
|
|
@@ -267,67 +423,67 @@ const fl = { class: "expression-editor" }, vl = { class: "expression-editor__lab
|
|
|
267
423
|
suggestions: { default: () => [] }
|
|
268
424
|
},
|
|
269
425
|
emits: ["update:modelValue"],
|
|
270
|
-
setup(e, { emit:
|
|
271
|
-
const
|
|
426
|
+
setup(e, { emit: l }) {
|
|
427
|
+
const t = e, a = l, { t: r } = $e(), n = [
|
|
272
428
|
"return input;",
|
|
273
429
|
'return input?.trim() ?? "";',
|
|
274
430
|
"return input ? input.toUpperCase() : input;",
|
|
275
431
|
"return answers.otherField;"
|
|
276
|
-
],
|
|
277
|
-
function
|
|
278
|
-
|
|
432
|
+
], s = y(() => t.placeholder || r("editor.placeholder")), u = y(() => r("editor.show_examples")), _ = y(() => r("editor.hide_examples")), p = y(() => r("editor.examples_title")), v = y(() => t.suggestions && t.suggestions.length > 0 ? t.suggestions : n), g = H(!1);
|
|
433
|
+
function w() {
|
|
434
|
+
g.value = !g.value;
|
|
279
435
|
}
|
|
280
|
-
return (
|
|
281
|
-
c("label",
|
|
282
|
-
c("span", null,
|
|
283
|
-
e.info ? (
|
|
436
|
+
return (te, G) => (i(), d("div", Ht, [
|
|
437
|
+
c("label", Jt, [
|
|
438
|
+
c("span", null, m(e.label), 1),
|
|
439
|
+
e.info ? (i(), b(o(Ye), {
|
|
284
440
|
key: 0,
|
|
285
441
|
placement: "top",
|
|
286
442
|
effect: "dark",
|
|
287
443
|
content: e.info
|
|
288
444
|
}, {
|
|
289
|
-
default:
|
|
290
|
-
|
|
291
|
-
default:
|
|
292
|
-
|
|
445
|
+
default: V(() => [
|
|
446
|
+
h(o(Ce), { class: "info-icon" }, {
|
|
447
|
+
default: V(() => [
|
|
448
|
+
h(o(Bt))
|
|
293
449
|
]),
|
|
294
450
|
_: 1
|
|
295
451
|
})
|
|
296
452
|
]),
|
|
297
453
|
_: 1
|
|
298
|
-
}, 8, ["content"])) :
|
|
454
|
+
}, 8, ["content"])) : x("", !0)
|
|
299
455
|
]),
|
|
300
|
-
|
|
456
|
+
h(o(ee), {
|
|
301
457
|
class: "code-input",
|
|
302
458
|
type: "textarea",
|
|
303
459
|
"model-value": e.modelValue,
|
|
304
460
|
autosize: { minRows: e.minRows, maxRows: e.maxRows },
|
|
305
|
-
placeholder:
|
|
306
|
-
"onUpdate:modelValue":
|
|
461
|
+
placeholder: s.value,
|
|
462
|
+
"onUpdate:modelValue": G[0] || (G[0] = (U) => a("update:modelValue", U ?? ""))
|
|
307
463
|
}, null, 8, ["model-value", "autosize", "placeholder"]),
|
|
308
|
-
|
|
309
|
-
default:
|
|
310
|
-
|
|
311
|
-
c("p",
|
|
312
|
-
c("ul",
|
|
313
|
-
(
|
|
314
|
-
c("code", null,
|
|
464
|
+
h(Oe, { name: "fade" }, {
|
|
465
|
+
default: V(() => [
|
|
466
|
+
g.value ? (i(), d("div", Gt, [
|
|
467
|
+
c("p", Qt, m(p.value), 1),
|
|
468
|
+
c("ul", jt, [
|
|
469
|
+
(i(!0), d(I, null, z(v.value, (U) => (i(), d("li", { key: U }, [
|
|
470
|
+
c("code", null, m(U), 1)
|
|
315
471
|
]))), 128))
|
|
316
472
|
])
|
|
317
|
-
])) :
|
|
473
|
+
])) : x("", !0)
|
|
318
474
|
]),
|
|
319
475
|
_: 1
|
|
320
476
|
}),
|
|
321
|
-
c("div",
|
|
477
|
+
c("div", Wt, [
|
|
322
478
|
c("button", {
|
|
323
479
|
class: "example-toggle",
|
|
324
480
|
type: "button",
|
|
325
|
-
onClick:
|
|
326
|
-
},
|
|
481
|
+
onClick: w
|
|
482
|
+
}, m(g.value ? _.value : u.value), 1)
|
|
327
483
|
])
|
|
328
484
|
]));
|
|
329
485
|
}
|
|
330
|
-
}),
|
|
486
|
+
}), le = /* @__PURE__ */ q(Yt, [["__scopeId", "data-v-7b2a61b5"]]), Kt = { class: "inline-settings" }, Xt = /* @__PURE__ */ f({
|
|
331
487
|
__name: "BaseQuestionConfig",
|
|
332
488
|
props: {
|
|
333
489
|
label: {},
|
|
@@ -347,121 +503,130 @@ const fl = { class: "expression-editor" }, vl = { class: "expression-editor__lab
|
|
|
347
503
|
showDefaultInput: { type: Boolean, default: !0 }
|
|
348
504
|
},
|
|
349
505
|
emits: ["update"],
|
|
350
|
-
setup(e, { emit:
|
|
351
|
-
const
|
|
506
|
+
setup(e, { emit: l }) {
|
|
507
|
+
const t = [
|
|
352
508
|
"return answers.age >= 18;",
|
|
353
509
|
"return answers.role === 'admin';",
|
|
354
510
|
"return Boolean(input);"
|
|
355
|
-
],
|
|
511
|
+
], a = [
|
|
356
512
|
`if (!input) return '必填';
|
|
357
513
|
return true;`,
|
|
358
514
|
`if ((input || "").length < 3) return "至少 3 个字符";
|
|
359
515
|
return true;`,
|
|
360
516
|
'return Array.isArray(input) && input.length > 0 ? true : "请选择至少一项";'
|
|
361
|
-
],
|
|
517
|
+
], r = [
|
|
362
518
|
'return input?.trim() ?? "";',
|
|
363
519
|
"return Number(input) || 0;",
|
|
364
520
|
"return input?.toLowerCase();"
|
|
365
|
-
],
|
|
521
|
+
], n = [
|
|
366
522
|
"return input ? `⭐ ${input}` : input;",
|
|
367
523
|
'return input ? `${input} (${answers.unit || ""})` : input;',
|
|
368
524
|
"return input ? input.toUpperCase() : input;"
|
|
369
|
-
], { t:
|
|
370
|
-
|
|
525
|
+
], { t: s } = $e(), u = l;
|
|
526
|
+
function _(p) {
|
|
527
|
+
u("update", {
|
|
528
|
+
props: {
|
|
529
|
+
message: p,
|
|
530
|
+
label: p
|
|
531
|
+
// 同步 message 到 label
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
return (p, v) => (i(), b(vt, {
|
|
371
536
|
label: e.label,
|
|
372
537
|
field: e.field,
|
|
373
|
-
onUpdate:
|
|
538
|
+
onUpdate: v[0] || (v[0] = (g) => u("update", g))
|
|
374
539
|
}, {
|
|
375
|
-
default:
|
|
376
|
-
|
|
377
|
-
label: o(
|
|
540
|
+
default: V(({ updateProp: g }) => [
|
|
541
|
+
h(o(A), {
|
|
542
|
+
label: o(s)("config.message"),
|
|
378
543
|
"model-value": e.message,
|
|
379
|
-
"onUpdate:modelValue":
|
|
380
|
-
}, null, 8, ["label", "model-value"
|
|
381
|
-
|
|
382
|
-
label: o(
|
|
544
|
+
"onUpdate:modelValue": _
|
|
545
|
+
}, null, 8, ["label", "model-value"]),
|
|
546
|
+
h(yt, {
|
|
547
|
+
label: o(s)("config.description"),
|
|
383
548
|
"model-value": e.description,
|
|
384
549
|
"min-rows": 2,
|
|
385
550
|
"max-rows": 3,
|
|
386
|
-
"onUpdate:modelValue": (
|
|
551
|
+
"onUpdate:modelValue": (w) => g("description", w)
|
|
387
552
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
388
|
-
e.showPlaceholder ? (
|
|
553
|
+
e.showPlaceholder ? (i(), b(o(A), {
|
|
389
554
|
key: 0,
|
|
390
|
-
label: o(
|
|
555
|
+
label: o(s)("config.placeholder"),
|
|
391
556
|
"model-value": e.placeholder,
|
|
392
|
-
"onUpdate:modelValue": (
|
|
393
|
-
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) :
|
|
394
|
-
|
|
395
|
-
e.showDefaultInput ? (
|
|
557
|
+
"onUpdate:modelValue": (w) => g("placeholder", w)
|
|
558
|
+
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : x("", !0),
|
|
559
|
+
ie(p.$slots, "defaultValue", { updateProp: g }, () => [
|
|
560
|
+
e.showDefaultInput ? (i(), b(o(A), {
|
|
396
561
|
key: 0,
|
|
397
|
-
label: o(
|
|
562
|
+
label: o(s)("config.default_value"),
|
|
398
563
|
"model-value": e.defaultValue,
|
|
399
|
-
"onUpdate:modelValue": (
|
|
400
|
-
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) :
|
|
564
|
+
"onUpdate:modelValue": (w) => g("defaultValue", w)
|
|
565
|
+
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : x("", !0)
|
|
401
566
|
], !0),
|
|
402
|
-
c("div",
|
|
403
|
-
|
|
404
|
-
label: o(
|
|
567
|
+
c("div", Kt, [
|
|
568
|
+
h(o(A), {
|
|
569
|
+
label: o(s)("config.prefix"),
|
|
405
570
|
"model-value": e.prefix,
|
|
406
|
-
"onUpdate:modelValue": (
|
|
571
|
+
"onUpdate:modelValue": (w) => g("prefix", w)
|
|
407
572
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
408
|
-
|
|
409
|
-
label: o(
|
|
573
|
+
h(o(A), {
|
|
574
|
+
label: o(s)("config.suffix"),
|
|
410
575
|
"model-value": e.suffix,
|
|
411
|
-
"onUpdate:modelValue": (
|
|
576
|
+
"onUpdate:modelValue": (w) => g("suffix", w)
|
|
412
577
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"])
|
|
413
578
|
]),
|
|
414
|
-
|
|
415
|
-
label: o(
|
|
579
|
+
h(o(se), {
|
|
580
|
+
label: o(s)("config.required"),
|
|
416
581
|
"model-value": e.required,
|
|
417
|
-
"onUpdate:modelValue": (
|
|
582
|
+
"onUpdate:modelValue": (w) => g("required", w)
|
|
418
583
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
label: o(
|
|
422
|
-
info: o(
|
|
584
|
+
ie(p.$slots, "extra", { updateProp: g }, void 0, !0),
|
|
585
|
+
h(le, {
|
|
586
|
+
label: o(s)("config.expressions.when_label"),
|
|
587
|
+
info: o(s)("config.expressions.when_info"),
|
|
423
588
|
"model-value": e.whenExpression,
|
|
424
589
|
"min-rows": 2,
|
|
425
590
|
"max-rows": 3,
|
|
426
|
-
placeholder: o(
|
|
427
|
-
suggestions:
|
|
428
|
-
"onUpdate:modelValue": (
|
|
591
|
+
placeholder: o(s)("editor.placeholder"),
|
|
592
|
+
suggestions: t,
|
|
593
|
+
"onUpdate:modelValue": (w) => g("whenExpression", w)
|
|
429
594
|
}, null, 8, ["label", "info", "model-value", "placeholder", "onUpdate:modelValue"]),
|
|
430
|
-
|
|
431
|
-
label: o(
|
|
432
|
-
info: o(
|
|
595
|
+
h(le, {
|
|
596
|
+
label: o(s)("config.expressions.validate_label"),
|
|
597
|
+
info: o(s)("config.expressions.validate_info"),
|
|
433
598
|
"model-value": e.validateExpression,
|
|
434
599
|
"min-rows": 3,
|
|
435
600
|
"max-rows": 5,
|
|
436
|
-
placeholder: o(
|
|
437
|
-
suggestions:
|
|
438
|
-
"onUpdate:modelValue": (
|
|
601
|
+
placeholder: o(s)("editor.placeholder"),
|
|
602
|
+
suggestions: a,
|
|
603
|
+
"onUpdate:modelValue": (w) => g("validateExpression", w)
|
|
439
604
|
}, null, 8, ["label", "info", "model-value", "placeholder", "onUpdate:modelValue"]),
|
|
440
|
-
|
|
441
|
-
label: o(
|
|
442
|
-
info: o(
|
|
605
|
+
h(le, {
|
|
606
|
+
label: o(s)("config.expressions.filter_label"),
|
|
607
|
+
info: o(s)("config.expressions.filter_info"),
|
|
443
608
|
"model-value": e.filterExpression,
|
|
444
609
|
"min-rows": 2,
|
|
445
610
|
"max-rows": 4,
|
|
446
|
-
placeholder: o(
|
|
447
|
-
suggestions:
|
|
448
|
-
"onUpdate:modelValue": (
|
|
611
|
+
placeholder: o(s)("editor.placeholder"),
|
|
612
|
+
suggestions: r,
|
|
613
|
+
"onUpdate:modelValue": (w) => g("filterExpression", w)
|
|
449
614
|
}, null, 8, ["label", "info", "model-value", "placeholder", "onUpdate:modelValue"]),
|
|
450
|
-
|
|
451
|
-
label: o(
|
|
452
|
-
info: o(
|
|
615
|
+
h(le, {
|
|
616
|
+
label: o(s)("config.expressions.transformer_label"),
|
|
617
|
+
info: o(s)("config.expressions.transformer_info"),
|
|
453
618
|
"model-value": e.transformerExpression,
|
|
454
619
|
"min-rows": 2,
|
|
455
620
|
"max-rows": 4,
|
|
456
|
-
placeholder: o(
|
|
457
|
-
suggestions:
|
|
458
|
-
"onUpdate:modelValue": (
|
|
621
|
+
placeholder: o(s)("editor.placeholder"),
|
|
622
|
+
suggestions: n,
|
|
623
|
+
"onUpdate:modelValue": (w) => g("transformerExpression", w)
|
|
459
624
|
}, null, 8, ["label", "info", "model-value", "placeholder", "onUpdate:modelValue"])
|
|
460
625
|
]),
|
|
461
626
|
_: 3
|
|
462
627
|
}, 8, ["label", "field"]));
|
|
463
628
|
}
|
|
464
|
-
}),
|
|
629
|
+
}), J = /* @__PURE__ */ q(Xt, [["__scopeId", "data-v-43dc3bfd"]]), Zt = /* @__PURE__ */ f({
|
|
465
630
|
__name: "config",
|
|
466
631
|
props: {
|
|
467
632
|
label: {},
|
|
@@ -478,55 +643,205 @@ return true;`,
|
|
|
478
643
|
transformerExpression: {}
|
|
479
644
|
},
|
|
480
645
|
emits: ["update"],
|
|
481
|
-
setup(e, { emit:
|
|
482
|
-
const
|
|
483
|
-
return (
|
|
484
|
-
onUpdate:
|
|
646
|
+
setup(e, { emit: l }) {
|
|
647
|
+
const t = e, a = l;
|
|
648
|
+
return (r, n) => (i(), b(J, L(t, {
|
|
649
|
+
onUpdate: n[0] || (n[0] = (s) => a("update", s))
|
|
485
650
|
}), null, 16));
|
|
486
651
|
}
|
|
487
652
|
});
|
|
488
|
-
function
|
|
653
|
+
function T(e) {
|
|
489
654
|
return `${e}_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
490
655
|
}
|
|
491
|
-
function
|
|
656
|
+
function $(e, l) {
|
|
492
657
|
return {
|
|
493
658
|
label: e,
|
|
494
|
-
value:
|
|
659
|
+
value: l ?? e
|
|
495
660
|
};
|
|
496
661
|
}
|
|
497
|
-
const
|
|
662
|
+
const D = {
|
|
663
|
+
input: kt,
|
|
664
|
+
password: At,
|
|
665
|
+
number: Et,
|
|
666
|
+
confirm: wt,
|
|
667
|
+
list: Tt,
|
|
668
|
+
rawList: Pt,
|
|
669
|
+
expand: Ut,
|
|
670
|
+
checkbox: Nt,
|
|
671
|
+
editor: Rt
|
|
672
|
+
}, Ue = {
|
|
673
|
+
"zh-CN": {
|
|
674
|
+
controls: {
|
|
675
|
+
input: {
|
|
676
|
+
label: "文本输入",
|
|
677
|
+
message: "请输入文本",
|
|
678
|
+
placeholder: "请输入内容"
|
|
679
|
+
},
|
|
680
|
+
password: {
|
|
681
|
+
label: "密码",
|
|
682
|
+
message: "请输入密码",
|
|
683
|
+
placeholder: "请输入密码"
|
|
684
|
+
},
|
|
685
|
+
number: {
|
|
686
|
+
label: "数字",
|
|
687
|
+
message: "请输入数字",
|
|
688
|
+
placeholder: "请输入数字"
|
|
689
|
+
},
|
|
690
|
+
confirm: {
|
|
691
|
+
label: "确认",
|
|
692
|
+
message: "是否确认?"
|
|
693
|
+
},
|
|
694
|
+
list: {
|
|
695
|
+
label: "单选列表",
|
|
696
|
+
message: "请选择一个选项",
|
|
697
|
+
placeholder: "请选择",
|
|
698
|
+
option: "选项"
|
|
699
|
+
},
|
|
700
|
+
rawlist: {
|
|
701
|
+
label: "序号列表",
|
|
702
|
+
message: "请选择一个选项",
|
|
703
|
+
placeholder: "请选择",
|
|
704
|
+
option: "选项"
|
|
705
|
+
},
|
|
706
|
+
expand: {
|
|
707
|
+
label: "扩展列表",
|
|
708
|
+
message: "请选择一个选项",
|
|
709
|
+
option: "选项"
|
|
710
|
+
},
|
|
711
|
+
checkbox: {
|
|
712
|
+
label: "多选框",
|
|
713
|
+
message: "请选择选项(可多选)",
|
|
714
|
+
option: "选项"
|
|
715
|
+
},
|
|
716
|
+
editor: {
|
|
717
|
+
label: "长文本",
|
|
718
|
+
message: "请输入长文本内容",
|
|
719
|
+
placeholder: "请输入详细内容"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
runtime: {
|
|
723
|
+
emptyForm: "暂无表单内容",
|
|
724
|
+
required: "此项为必填项",
|
|
725
|
+
invalidNumber: "请输入有效的数字",
|
|
726
|
+
minValue: "值不能小于 {min}",
|
|
727
|
+
maxValue: "值不能大于 {max}"
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
"en-US": {
|
|
731
|
+
controls: {
|
|
732
|
+
input: {
|
|
733
|
+
label: "Text Input",
|
|
734
|
+
message: "Please enter text",
|
|
735
|
+
placeholder: "Enter content"
|
|
736
|
+
},
|
|
737
|
+
password: {
|
|
738
|
+
label: "Password",
|
|
739
|
+
message: "Please enter password",
|
|
740
|
+
placeholder: "Enter password"
|
|
741
|
+
},
|
|
742
|
+
number: {
|
|
743
|
+
label: "Number",
|
|
744
|
+
message: "Please enter a number",
|
|
745
|
+
placeholder: "Enter number"
|
|
746
|
+
},
|
|
747
|
+
confirm: {
|
|
748
|
+
label: "Confirm",
|
|
749
|
+
message: "Confirm?"
|
|
750
|
+
},
|
|
751
|
+
list: {
|
|
752
|
+
label: "List",
|
|
753
|
+
message: "Please select an option",
|
|
754
|
+
placeholder: "Select",
|
|
755
|
+
option: "Option"
|
|
756
|
+
},
|
|
757
|
+
rawlist: {
|
|
758
|
+
label: "Raw List",
|
|
759
|
+
message: "Please select an option",
|
|
760
|
+
placeholder: "Select",
|
|
761
|
+
option: "Option"
|
|
762
|
+
},
|
|
763
|
+
expand: {
|
|
764
|
+
label: "Expand List",
|
|
765
|
+
message: "Please select an option",
|
|
766
|
+
option: "Option"
|
|
767
|
+
},
|
|
768
|
+
checkbox: {
|
|
769
|
+
label: "Checkbox",
|
|
770
|
+
message: "Please select options (multiple)",
|
|
771
|
+
option: "Option"
|
|
772
|
+
},
|
|
773
|
+
editor: {
|
|
774
|
+
label: "Editor",
|
|
775
|
+
message: "Please enter long text",
|
|
776
|
+
placeholder: "Enter detailed content"
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
runtime: {
|
|
780
|
+
emptyForm: "No form content",
|
|
781
|
+
required: "This field is required",
|
|
782
|
+
invalidNumber: "Please enter a valid number",
|
|
783
|
+
minValue: "Value cannot be less than {min}",
|
|
784
|
+
maxValue: "Value cannot be greater than {max}"
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
function el() {
|
|
789
|
+
if (typeof window < "u") {
|
|
790
|
+
const e = document.documentElement, l = e.getAttribute("lang") || e.lang;
|
|
791
|
+
if (l === "en-US" || l === "en") return "en-US";
|
|
792
|
+
}
|
|
793
|
+
return "zh-CN";
|
|
794
|
+
}
|
|
795
|
+
function tl(e) {
|
|
796
|
+
const l = el(), t = e.split(".");
|
|
797
|
+
let a = Ue[l];
|
|
798
|
+
for (const r of t)
|
|
799
|
+
if (a && typeof a == "object")
|
|
800
|
+
a = a[r];
|
|
801
|
+
else
|
|
802
|
+
return e;
|
|
803
|
+
return typeof a == "string" ? a : e;
|
|
804
|
+
}
|
|
805
|
+
function C(e, l) {
|
|
806
|
+
return tl(e);
|
|
807
|
+
}
|
|
808
|
+
const Ie = {
|
|
498
809
|
type: "inq-input",
|
|
499
810
|
category: "inputControl",
|
|
500
811
|
label: "输入",
|
|
501
|
-
icon:
|
|
812
|
+
icon: D.input,
|
|
502
813
|
isContainer: !1,
|
|
503
|
-
initialSchema: () =>
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
814
|
+
initialSchema: () => {
|
|
815
|
+
const e = C("controls.input.message");
|
|
816
|
+
return {
|
|
817
|
+
id: T("inq_input"),
|
|
818
|
+
type: "inq-input",
|
|
819
|
+
field: "question_" + Math.random().toString(36).slice(2, 6),
|
|
820
|
+
props: {
|
|
821
|
+
label: e,
|
|
822
|
+
// label 和 message 保持一致
|
|
823
|
+
message: e,
|
|
824
|
+
promptType: "input",
|
|
825
|
+
placeholder: C("controls.input.placeholder"),
|
|
826
|
+
defaultValue: "",
|
|
827
|
+
prefix: "",
|
|
828
|
+
suffix: "",
|
|
829
|
+
required: !0,
|
|
830
|
+
whenExpression: "",
|
|
831
|
+
validateExpression: "",
|
|
832
|
+
filterExpression: "",
|
|
833
|
+
transformerExpression: ""
|
|
834
|
+
}
|
|
835
|
+
};
|
|
836
|
+
},
|
|
837
|
+
designer: ut,
|
|
838
|
+
runtime: mt,
|
|
839
|
+
config: Zt,
|
|
525
840
|
locales: {
|
|
526
841
|
"zh-CN": { control: { "inq-input": { label: "输入" } } },
|
|
527
842
|
"en-US": { control: { "inq-input": { label: "Input" } } }
|
|
528
843
|
}
|
|
529
|
-
},
|
|
844
|
+
}, ll = /* @__PURE__ */ f({
|
|
530
845
|
__name: "designer",
|
|
531
846
|
props: {
|
|
532
847
|
label: {},
|
|
@@ -535,21 +850,21 @@ const he = {
|
|
|
535
850
|
isActive: { type: Boolean }
|
|
536
851
|
},
|
|
537
852
|
emits: ["select"],
|
|
538
|
-
setup(e, { emit:
|
|
539
|
-
const
|
|
540
|
-
return (
|
|
541
|
-
label: o(
|
|
542
|
-
message: o(
|
|
543
|
-
description: o(
|
|
853
|
+
setup(e, { emit: l }) {
|
|
854
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u } = B(t);
|
|
855
|
+
return (_, p) => (i(), b(M, {
|
|
856
|
+
label: o(r),
|
|
857
|
+
message: o(n),
|
|
858
|
+
description: o(s),
|
|
544
859
|
"type-label": "Inquirer Password",
|
|
545
|
-
"is-active": o(
|
|
546
|
-
onSelect:
|
|
860
|
+
"is-active": o(u),
|
|
861
|
+
onSelect: p[0] || (p[0] = (v) => a("select"))
|
|
547
862
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
548
863
|
}
|
|
549
|
-
}),
|
|
864
|
+
}), sl = { class: "inquirer-password" }, al = {
|
|
550
865
|
key: 0,
|
|
551
866
|
class: "mask-hint"
|
|
552
|
-
},
|
|
867
|
+
}, ol = /* @__PURE__ */ f({
|
|
553
868
|
__name: "runtime",
|
|
554
869
|
props: {
|
|
555
870
|
modelValue: {},
|
|
@@ -561,36 +876,36 @@ const he = {
|
|
|
561
876
|
maskSymbol: {}
|
|
562
877
|
},
|
|
563
878
|
emits: ["update:modelValue"],
|
|
564
|
-
setup(e, { emit:
|
|
565
|
-
const
|
|
566
|
-
return (
|
|
567
|
-
|
|
879
|
+
setup(e, { emit: l }) {
|
|
880
|
+
const t = l;
|
|
881
|
+
return (a, r) => (i(), d("div", sl, [
|
|
882
|
+
h(o(ee), {
|
|
568
883
|
"model-value": e.modelValue ?? "",
|
|
569
884
|
placeholder: e.placeholder,
|
|
570
885
|
disabled: e.disabled,
|
|
571
886
|
type: "password",
|
|
572
887
|
"show-password": "",
|
|
573
|
-
"onUpdate:modelValue":
|
|
574
|
-
},
|
|
888
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => t("update:modelValue", n ?? ""))
|
|
889
|
+
}, xe({ _: 2 }, [
|
|
575
890
|
e.prefix ? {
|
|
576
891
|
name: "prepend",
|
|
577
|
-
fn:
|
|
578
|
-
|
|
892
|
+
fn: V(() => [
|
|
893
|
+
X(m(e.prefix), 1)
|
|
579
894
|
]),
|
|
580
895
|
key: "0"
|
|
581
896
|
} : void 0,
|
|
582
897
|
e.suffix ? {
|
|
583
898
|
name: "append",
|
|
584
|
-
fn:
|
|
585
|
-
|
|
899
|
+
fn: V(() => [
|
|
900
|
+
X(m(e.suffix), 1)
|
|
586
901
|
]),
|
|
587
902
|
key: "1"
|
|
588
903
|
} : void 0
|
|
589
904
|
]), 1032, ["model-value", "placeholder", "disabled"]),
|
|
590
|
-
e.maskEnabled ? (
|
|
905
|
+
e.maskEnabled ? (i(), d("p", al, " 输出将使用 " + m(e.maskSymbol || "掩码") + " 掩码 ", 1)) : x("", !0)
|
|
591
906
|
]));
|
|
592
907
|
}
|
|
593
|
-
}),
|
|
908
|
+
}), nl = /* @__PURE__ */ q(ol, [["__scopeId", "data-v-027f448e"]]), il = /* @__PURE__ */ f({
|
|
594
909
|
__name: "config",
|
|
595
910
|
props: {
|
|
596
911
|
label: {},
|
|
@@ -609,62 +924,65 @@ const he = {
|
|
|
609
924
|
maskSymbol: {}
|
|
610
925
|
},
|
|
611
926
|
emits: ["update"],
|
|
612
|
-
setup(e, { emit:
|
|
613
|
-
const
|
|
614
|
-
return (
|
|
615
|
-
onUpdate:
|
|
927
|
+
setup(e, { emit: l }) {
|
|
928
|
+
const t = e, a = l;
|
|
929
|
+
return (r, n) => (i(), b(J, L(t, {
|
|
930
|
+
onUpdate: n[0] || (n[0] = (s) => a("update", s))
|
|
616
931
|
}), {
|
|
617
|
-
extra:
|
|
618
|
-
|
|
932
|
+
extra: V(({ updateProp: s }) => [
|
|
933
|
+
h(o(se), {
|
|
619
934
|
label: "掩码输出",
|
|
620
935
|
"model-value": e.maskEnabled,
|
|
621
|
-
"onUpdate:modelValue": (
|
|
936
|
+
"onUpdate:modelValue": (u) => s("maskEnabled", u)
|
|
622
937
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
623
|
-
e.maskEnabled ? (
|
|
938
|
+
e.maskEnabled ? (i(), b(o(A), {
|
|
624
939
|
key: 0,
|
|
625
940
|
label: "掩码符号",
|
|
626
941
|
"model-value": e.maskSymbol,
|
|
627
|
-
"onUpdate:modelValue": (
|
|
628
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])) :
|
|
942
|
+
"onUpdate:modelValue": (u) => s("maskSymbol", u)
|
|
943
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])) : x("", !0)
|
|
629
944
|
]),
|
|
630
945
|
_: 1
|
|
631
946
|
}, 16));
|
|
632
947
|
}
|
|
633
|
-
}),
|
|
948
|
+
}), Ne = {
|
|
634
949
|
type: "inq-password",
|
|
635
950
|
category: "inputControl",
|
|
636
951
|
label: "密码",
|
|
637
|
-
icon:
|
|
952
|
+
icon: D.password,
|
|
638
953
|
isContainer: !1,
|
|
639
|
-
initialSchema: () =>
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
954
|
+
initialSchema: () => {
|
|
955
|
+
const e = C("controls.password.message");
|
|
956
|
+
return {
|
|
957
|
+
id: T("inq_password"),
|
|
958
|
+
type: "inq-password",
|
|
959
|
+
field: "secret_" + Math.random().toString(36).slice(2, 6),
|
|
960
|
+
props: {
|
|
961
|
+
label: e,
|
|
962
|
+
message: e,
|
|
963
|
+
promptType: "password",
|
|
964
|
+
placeholder: C("controls.password.placeholder"),
|
|
965
|
+
defaultValue: "",
|
|
966
|
+
prefix: "",
|
|
967
|
+
suffix: "",
|
|
968
|
+
maskEnabled: !0,
|
|
969
|
+
maskSymbol: "*",
|
|
970
|
+
required: !0,
|
|
971
|
+
whenExpression: "",
|
|
972
|
+
validateExpression: "",
|
|
973
|
+
filterExpression: "",
|
|
974
|
+
transformerExpression: ""
|
|
975
|
+
}
|
|
976
|
+
};
|
|
977
|
+
},
|
|
978
|
+
designer: ll,
|
|
979
|
+
runtime: nl,
|
|
980
|
+
config: il,
|
|
663
981
|
locales: {
|
|
664
982
|
"zh-CN": { control: { "inq-password": { label: "密码" } } },
|
|
665
983
|
"en-US": { control: { "inq-password": { label: "Password" } } }
|
|
666
984
|
}
|
|
667
|
-
},
|
|
985
|
+
}, rl = /* @__PURE__ */ f({
|
|
668
986
|
__name: "designer",
|
|
669
987
|
props: {
|
|
670
988
|
label: {},
|
|
@@ -673,24 +991,24 @@ const he = {
|
|
|
673
991
|
isActive: { type: Boolean }
|
|
674
992
|
},
|
|
675
993
|
emits: ["select"],
|
|
676
|
-
setup(e, { emit:
|
|
677
|
-
const
|
|
678
|
-
return (
|
|
679
|
-
label: o(
|
|
680
|
-
message: o(
|
|
681
|
-
description: o(
|
|
994
|
+
setup(e, { emit: l }) {
|
|
995
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u } = B(t);
|
|
996
|
+
return (_, p) => (i(), b(M, {
|
|
997
|
+
label: o(r),
|
|
998
|
+
message: o(n),
|
|
999
|
+
description: o(s),
|
|
682
1000
|
"type-label": "Inquirer Number",
|
|
683
|
-
"is-active": o(
|
|
684
|
-
onSelect:
|
|
1001
|
+
"is-active": o(u),
|
|
1002
|
+
onSelect: p[0] || (p[0] = (v) => a("select"))
|
|
685
1003
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
686
1004
|
}
|
|
687
|
-
}),
|
|
1005
|
+
}), ul = { class: "number-runtime" }, cl = {
|
|
688
1006
|
key: 0,
|
|
689
1007
|
class: "affix"
|
|
690
|
-
},
|
|
1008
|
+
}, dl = {
|
|
691
1009
|
key: 1,
|
|
692
1010
|
class: "affix"
|
|
693
|
-
},
|
|
1011
|
+
}, pl = /* @__PURE__ */ f({
|
|
694
1012
|
__name: "runtime",
|
|
695
1013
|
props: {
|
|
696
1014
|
modelValue: {},
|
|
@@ -703,11 +1021,11 @@ const he = {
|
|
|
703
1021
|
suffix: {}
|
|
704
1022
|
},
|
|
705
1023
|
emits: ["update:modelValue"],
|
|
706
|
-
setup(e, { emit:
|
|
707
|
-
const
|
|
708
|
-
return (
|
|
709
|
-
e.prefix ? (
|
|
710
|
-
|
|
1024
|
+
setup(e, { emit: l }) {
|
|
1025
|
+
const t = l;
|
|
1026
|
+
return (a, r) => (i(), d("div", ul, [
|
|
1027
|
+
e.prefix ? (i(), d("span", cl, m(e.prefix), 1)) : x("", !0),
|
|
1028
|
+
h(o(Ee), {
|
|
711
1029
|
class: "number-runtime__input",
|
|
712
1030
|
"model-value": e.modelValue,
|
|
713
1031
|
placeholder: e.placeholder,
|
|
@@ -716,12 +1034,12 @@ const he = {
|
|
|
716
1034
|
max: e.max,
|
|
717
1035
|
step: e.step || 1,
|
|
718
1036
|
"controls-position": "right",
|
|
719
|
-
"onUpdate:modelValue":
|
|
1037
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => t("update:modelValue", n ?? void 0))
|
|
720
1038
|
}, null, 8, ["model-value", "placeholder", "disabled", "min", "max", "step"]),
|
|
721
|
-
e.suffix ? (
|
|
1039
|
+
e.suffix ? (i(), d("span", dl, m(e.suffix), 1)) : x("", !0)
|
|
722
1040
|
]));
|
|
723
1041
|
}
|
|
724
|
-
}),
|
|
1042
|
+
}), ml = /* @__PURE__ */ q(pl, [["__scopeId", "data-v-41430bc7"]]), fl = { class: "number-setting" }, hl = /* @__PURE__ */ f({
|
|
725
1043
|
__name: "NumberSetting",
|
|
726
1044
|
props: {
|
|
727
1045
|
label: {},
|
|
@@ -731,21 +1049,21 @@ const he = {
|
|
|
731
1049
|
step: { default: 1 }
|
|
732
1050
|
},
|
|
733
1051
|
emits: ["update:modelValue"],
|
|
734
|
-
setup(e, { emit:
|
|
735
|
-
const
|
|
736
|
-
return (
|
|
737
|
-
c("label", null,
|
|
738
|
-
|
|
1052
|
+
setup(e, { emit: l }) {
|
|
1053
|
+
const t = l;
|
|
1054
|
+
return (a, r) => (i(), d("div", fl, [
|
|
1055
|
+
c("label", null, m(e.label), 1),
|
|
1056
|
+
h(o(Ee), {
|
|
739
1057
|
"model-value": e.modelValue,
|
|
740
1058
|
min: e.min,
|
|
741
1059
|
max: e.max,
|
|
742
1060
|
step: e.step,
|
|
743
1061
|
"controls-position": "right",
|
|
744
|
-
"onUpdate:modelValue":
|
|
1062
|
+
"onUpdate:modelValue": r[0] || (r[0] = (n) => t("update:modelValue", n ?? void 0))
|
|
745
1063
|
}, null, 8, ["model-value", "min", "max", "step"])
|
|
746
1064
|
]));
|
|
747
1065
|
}
|
|
748
|
-
}),
|
|
1066
|
+
}), Q = /* @__PURE__ */ q(hl, [["__scopeId", "data-v-9db53040"]]), vl = /* @__PURE__ */ f({
|
|
749
1067
|
__name: "config",
|
|
750
1068
|
props: {
|
|
751
1069
|
label: {},
|
|
@@ -764,76 +1082,79 @@ const he = {
|
|
|
764
1082
|
step: {}
|
|
765
1083
|
},
|
|
766
1084
|
emits: ["update"],
|
|
767
|
-
setup(e, { emit:
|
|
768
|
-
const
|
|
769
|
-
return (
|
|
1085
|
+
setup(e, { emit: l }) {
|
|
1086
|
+
const t = e, a = l;
|
|
1087
|
+
return (r, n) => (i(), b(J, L(t, {
|
|
770
1088
|
"show-placeholder": !1,
|
|
771
|
-
onUpdate:
|
|
1089
|
+
onUpdate: n[0] || (n[0] = (s) => a("update", s))
|
|
772
1090
|
}), {
|
|
773
|
-
defaultValue:
|
|
774
|
-
|
|
1091
|
+
defaultValue: V(({ updateProp: s }) => [
|
|
1092
|
+
h(Q, {
|
|
775
1093
|
label: "默认值",
|
|
776
1094
|
"model-value": e.defaultValue,
|
|
777
|
-
"onUpdate:modelValue": (
|
|
1095
|
+
"onUpdate:modelValue": (u) => s("defaultValue", u)
|
|
778
1096
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
779
1097
|
]),
|
|
780
|
-
extra:
|
|
781
|
-
|
|
1098
|
+
extra: V(({ updateProp: s }) => [
|
|
1099
|
+
h(Q, {
|
|
782
1100
|
label: "最小值",
|
|
783
1101
|
"model-value": e.min,
|
|
784
|
-
"onUpdate:modelValue": (
|
|
1102
|
+
"onUpdate:modelValue": (u) => s("min", u)
|
|
785
1103
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
786
|
-
|
|
1104
|
+
h(Q, {
|
|
787
1105
|
label: "最大值",
|
|
788
1106
|
"model-value": e.max,
|
|
789
|
-
"onUpdate:modelValue": (
|
|
1107
|
+
"onUpdate:modelValue": (u) => s("max", u)
|
|
790
1108
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
791
|
-
|
|
1109
|
+
h(Q, {
|
|
792
1110
|
label: "步长",
|
|
793
1111
|
"model-value": e.step,
|
|
794
1112
|
min: 0,
|
|
795
1113
|
step: 0.1,
|
|
796
|
-
"onUpdate:modelValue": (
|
|
1114
|
+
"onUpdate:modelValue": (u) => s("step", u)
|
|
797
1115
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
798
1116
|
]),
|
|
799
1117
|
_: 1
|
|
800
1118
|
}, 16));
|
|
801
1119
|
}
|
|
802
|
-
}),
|
|
1120
|
+
}), ze = {
|
|
803
1121
|
type: "inq-number",
|
|
804
1122
|
category: "inputControl",
|
|
805
1123
|
label: "数字",
|
|
806
|
-
icon:
|
|
1124
|
+
icon: D.number,
|
|
807
1125
|
isContainer: !1,
|
|
808
|
-
initialSchema: () =>
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
1126
|
+
initialSchema: () => {
|
|
1127
|
+
const e = C("controls.number.message");
|
|
1128
|
+
return {
|
|
1129
|
+
id: T("inq_number"),
|
|
1130
|
+
type: "inq-number",
|
|
1131
|
+
field: "amount_" + Math.random().toString(36).slice(2, 6),
|
|
1132
|
+
props: {
|
|
1133
|
+
label: e,
|
|
1134
|
+
message: e,
|
|
1135
|
+
promptType: "number",
|
|
1136
|
+
defaultValue: 0,
|
|
1137
|
+
min: 0,
|
|
1138
|
+
max: 100,
|
|
1139
|
+
step: 1,
|
|
1140
|
+
prefix: "",
|
|
1141
|
+
suffix: "",
|
|
1142
|
+
required: !1,
|
|
1143
|
+
whenExpression: "",
|
|
1144
|
+
validateExpression: "",
|
|
1145
|
+
filterExpression: "",
|
|
1146
|
+
transformerExpression: ""
|
|
1147
|
+
}
|
|
1148
|
+
};
|
|
1149
|
+
},
|
|
1150
|
+
designer: rl,
|
|
1151
|
+
runtime: ml,
|
|
1152
|
+
config: vl,
|
|
832
1153
|
locales: {
|
|
833
1154
|
"zh-CN": { control: { "inq-number": { label: "数字" } } },
|
|
834
1155
|
"en-US": { control: { "inq-number": { label: "Number" } } }
|
|
835
1156
|
}
|
|
836
|
-
},
|
|
1157
|
+
}, gl = /* @__PURE__ */ f({
|
|
837
1158
|
__name: "designer",
|
|
838
1159
|
props: {
|
|
839
1160
|
label: {},
|
|
@@ -842,24 +1163,24 @@ const he = {
|
|
|
842
1163
|
isActive: { type: Boolean }
|
|
843
1164
|
},
|
|
844
1165
|
emits: ["select"],
|
|
845
|
-
setup(e, { emit:
|
|
846
|
-
const
|
|
847
|
-
return (
|
|
848
|
-
label: o(
|
|
849
|
-
message: o(
|
|
850
|
-
description: o(
|
|
1166
|
+
setup(e, { emit: l }) {
|
|
1167
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u } = B(t);
|
|
1168
|
+
return (_, p) => (i(), b(M, {
|
|
1169
|
+
label: o(r),
|
|
1170
|
+
message: o(n),
|
|
1171
|
+
description: o(s),
|
|
851
1172
|
"type-label": "Inquirer Confirm",
|
|
852
|
-
"is-active": o(
|
|
853
|
-
onSelect:
|
|
1173
|
+
"is-active": o(u),
|
|
1174
|
+
onSelect: p[0] || (p[0] = (v) => a("select"))
|
|
854
1175
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
855
1176
|
}
|
|
856
|
-
}),
|
|
1177
|
+
}), bl = { class: "confirm-runtime" }, xl = {
|
|
857
1178
|
key: 0,
|
|
858
1179
|
class: "affix"
|
|
859
|
-
},
|
|
1180
|
+
}, yl = { class: "state" }, _l = {
|
|
860
1181
|
key: 1,
|
|
861
1182
|
class: "affix"
|
|
862
|
-
},
|
|
1183
|
+
}, wl = /* @__PURE__ */ f({
|
|
863
1184
|
__name: "runtime",
|
|
864
1185
|
props: {
|
|
865
1186
|
modelValue: { type: Boolean },
|
|
@@ -868,23 +1189,23 @@ const he = {
|
|
|
868
1189
|
suffix: {}
|
|
869
1190
|
},
|
|
870
1191
|
emits: ["update:modelValue"],
|
|
871
|
-
setup(e, { emit:
|
|
872
|
-
const
|
|
873
|
-
function
|
|
874
|
-
|
|
1192
|
+
setup(e, { emit: l }) {
|
|
1193
|
+
const t = l;
|
|
1194
|
+
function a(r) {
|
|
1195
|
+
t("update:modelValue", !!r);
|
|
875
1196
|
}
|
|
876
|
-
return (
|
|
877
|
-
e.prefix ? (
|
|
878
|
-
|
|
1197
|
+
return (r, n) => (i(), d("div", bl, [
|
|
1198
|
+
e.prefix ? (i(), d("span", xl, m(e.prefix), 1)) : x("", !0),
|
|
1199
|
+
h(o(Ke), {
|
|
879
1200
|
"model-value": e.modelValue ?? !1,
|
|
880
1201
|
disabled: e.disabled,
|
|
881
|
-
"onUpdate:modelValue":
|
|
1202
|
+
"onUpdate:modelValue": a
|
|
882
1203
|
}, null, 8, ["model-value", "disabled"]),
|
|
883
|
-
c("span",
|
|
884
|
-
e.suffix ? (
|
|
1204
|
+
c("span", yl, m(e.modelValue ?? !1 ? "Yes" : "No"), 1),
|
|
1205
|
+
e.suffix ? (i(), d("span", _l, m(e.suffix), 1)) : x("", !0)
|
|
885
1206
|
]));
|
|
886
1207
|
}
|
|
887
|
-
}),
|
|
1208
|
+
}), Vl = /* @__PURE__ */ q(wl, [["__scopeId", "data-v-220e5de9"]]), ql = /* @__PURE__ */ f({
|
|
888
1209
|
__name: "config",
|
|
889
1210
|
props: {
|
|
890
1211
|
label: {},
|
|
@@ -900,54 +1221,57 @@ const he = {
|
|
|
900
1221
|
transformerExpression: {}
|
|
901
1222
|
},
|
|
902
1223
|
emits: ["update"],
|
|
903
|
-
setup(e, { emit:
|
|
904
|
-
const
|
|
905
|
-
return (
|
|
1224
|
+
setup(e, { emit: l }) {
|
|
1225
|
+
const t = e, a = l;
|
|
1226
|
+
return (r, n) => (i(), b(J, L(t, {
|
|
906
1227
|
"show-placeholder": !1,
|
|
907
|
-
onUpdate:
|
|
1228
|
+
onUpdate: n[0] || (n[0] = (s) => a("update", s))
|
|
908
1229
|
}), {
|
|
909
|
-
defaultValue:
|
|
910
|
-
|
|
1230
|
+
defaultValue: V(({ updateProp: s }) => [
|
|
1231
|
+
h(o(se), {
|
|
911
1232
|
label: "默认值 (Yes/No)",
|
|
912
1233
|
"model-value": e.defaultValue ?? !1,
|
|
913
|
-
"onUpdate:modelValue": (
|
|
1234
|
+
"onUpdate:modelValue": (u) => s("defaultValue", u)
|
|
914
1235
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
915
1236
|
]),
|
|
916
1237
|
_: 1
|
|
917
1238
|
}, 16));
|
|
918
1239
|
}
|
|
919
|
-
}),
|
|
1240
|
+
}), Be = {
|
|
920
1241
|
type: "inq-confirm",
|
|
921
1242
|
category: "inputControl",
|
|
922
1243
|
label: "确认",
|
|
923
|
-
icon:
|
|
1244
|
+
icon: D.confirm,
|
|
924
1245
|
isContainer: !1,
|
|
925
|
-
initialSchema: () =>
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1246
|
+
initialSchema: () => {
|
|
1247
|
+
const e = C("controls.confirm.message");
|
|
1248
|
+
return {
|
|
1249
|
+
id: T("inq_confirm"),
|
|
1250
|
+
type: "inq-confirm",
|
|
1251
|
+
field: "confirm_" + Math.random().toString(36).slice(2, 6),
|
|
1252
|
+
props: {
|
|
1253
|
+
label: e,
|
|
1254
|
+
message: e,
|
|
1255
|
+
promptType: "confirm",
|
|
1256
|
+
defaultValue: !1,
|
|
1257
|
+
prefix: "",
|
|
1258
|
+
suffix: "",
|
|
1259
|
+
required: !1,
|
|
1260
|
+
whenExpression: "",
|
|
1261
|
+
validateExpression: "",
|
|
1262
|
+
filterExpression: "",
|
|
1263
|
+
transformerExpression: ""
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
1266
|
+
},
|
|
1267
|
+
designer: gl,
|
|
1268
|
+
runtime: Vl,
|
|
1269
|
+
config: ql,
|
|
946
1270
|
locales: {
|
|
947
1271
|
"zh-CN": { control: { "inq-confirm": { label: "确认" } } },
|
|
948
1272
|
"en-US": { control: { "inq-confirm": { label: "Confirm" } } }
|
|
949
1273
|
}
|
|
950
|
-
},
|
|
1274
|
+
}, Cl = /* @__PURE__ */ f({
|
|
951
1275
|
__name: "designer",
|
|
952
1276
|
props: {
|
|
953
1277
|
label: {},
|
|
@@ -957,28 +1281,28 @@ const he = {
|
|
|
957
1281
|
choices: {}
|
|
958
1282
|
},
|
|
959
1283
|
emits: ["select"],
|
|
960
|
-
setup(e, { emit:
|
|
961
|
-
const
|
|
962
|
-
return (
|
|
963
|
-
label: o(
|
|
964
|
-
message: o(
|
|
965
|
-
description: o(
|
|
966
|
-
options: o(
|
|
1284
|
+
setup(e, { emit: l }) {
|
|
1285
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u, choices: _ } = B(t);
|
|
1286
|
+
return (p, v) => (i(), b(M, {
|
|
1287
|
+
label: o(r),
|
|
1288
|
+
message: o(n),
|
|
1289
|
+
description: o(s),
|
|
1290
|
+
options: o(_),
|
|
967
1291
|
"type-label": "Inquirer List",
|
|
968
|
-
"is-active": o(
|
|
969
|
-
onSelect:
|
|
1292
|
+
"is-active": o(u),
|
|
1293
|
+
onSelect: v[0] || (v[0] = (g) => a("select"))
|
|
970
1294
|
}, null, 8, ["label", "message", "description", "options", "is-active"]));
|
|
971
1295
|
}
|
|
972
|
-
}),
|
|
1296
|
+
}), El = { class: "inquirer-list" }, Sl = {
|
|
973
1297
|
key: 0,
|
|
974
1298
|
class: "affix"
|
|
975
|
-
},
|
|
1299
|
+
}, kl = {
|
|
976
1300
|
key: 1,
|
|
977
1301
|
class: "affix"
|
|
978
|
-
},
|
|
1302
|
+
}, $l = {
|
|
979
1303
|
key: 2,
|
|
980
1304
|
class: "list-hint"
|
|
981
|
-
},
|
|
1305
|
+
}, Ul = { key: 0 }, Il = { key: 1 }, Nl = /* @__PURE__ */ f({
|
|
982
1306
|
__name: "runtime",
|
|
983
1307
|
props: {
|
|
984
1308
|
modelValue: {},
|
|
@@ -991,41 +1315,41 @@ const he = {
|
|
|
991
1315
|
loop: { type: Boolean }
|
|
992
1316
|
},
|
|
993
1317
|
emits: ["update:modelValue"],
|
|
994
|
-
setup(e, { emit:
|
|
995
|
-
const
|
|
996
|
-
() => (
|
|
997
|
-
label:
|
|
998
|
-
value:
|
|
1318
|
+
setup(e, { emit: l }) {
|
|
1319
|
+
const t = e, a = l, r = y(
|
|
1320
|
+
() => (t.choices ?? []).map((n) => ({
|
|
1321
|
+
label: n.label || n.value,
|
|
1322
|
+
value: n.value
|
|
999
1323
|
}))
|
|
1000
1324
|
);
|
|
1001
|
-
return (
|
|
1002
|
-
e.prefix ? (
|
|
1003
|
-
|
|
1325
|
+
return (n, s) => (i(), d("div", El, [
|
|
1326
|
+
e.prefix ? (i(), d("span", Sl, m(e.prefix), 1)) : x("", !0),
|
|
1327
|
+
h(o(Se), {
|
|
1004
1328
|
class: "select-runtime",
|
|
1005
1329
|
"model-value": e.modelValue,
|
|
1006
1330
|
placeholder: e.placeholder,
|
|
1007
1331
|
disabled: e.disabled,
|
|
1008
1332
|
filterable: "",
|
|
1009
1333
|
clearable: "",
|
|
1010
|
-
"onUpdate:modelValue":
|
|
1334
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => a("update:modelValue", u))
|
|
1011
1335
|
}, {
|
|
1012
|
-
default:
|
|
1013
|
-
(
|
|
1014
|
-
key:
|
|
1015
|
-
label:
|
|
1016
|
-
value:
|
|
1336
|
+
default: V(() => [
|
|
1337
|
+
(i(!0), d(I, null, z(r.value, (u) => (i(), b(o(ke), {
|
|
1338
|
+
key: u.value,
|
|
1339
|
+
label: u.label,
|
|
1340
|
+
value: u.value
|
|
1017
1341
|
}, null, 8, ["label", "value"]))), 128))
|
|
1018
1342
|
]),
|
|
1019
1343
|
_: 1
|
|
1020
1344
|
}, 8, ["model-value", "placeholder", "disabled"]),
|
|
1021
|
-
e.suffix ? (
|
|
1022
|
-
e.loop || e.pageSize ? (
|
|
1023
|
-
e.pageSize ? (
|
|
1024
|
-
e.loop ? (
|
|
1025
|
-
])) :
|
|
1345
|
+
e.suffix ? (i(), d("span", kl, m(e.suffix), 1)) : x("", !0),
|
|
1346
|
+
e.loop || e.pageSize ? (i(), d("p", $l, [
|
|
1347
|
+
e.pageSize ? (i(), d("span", Ul, "每页 " + m(e.pageSize) + " 项", 1)) : x("", !0),
|
|
1348
|
+
e.loop ? (i(), d("span", Il, " · 循环导航开启")) : x("", !0)
|
|
1349
|
+
])) : x("", !0)
|
|
1026
1350
|
]));
|
|
1027
1351
|
}
|
|
1028
|
-
}),
|
|
1352
|
+
}), ue = /* @__PURE__ */ q(Nl, [["__scopeId", "data-v-ed3b4861"]]), ce = /* @__PURE__ */ f({
|
|
1029
1353
|
__name: "config",
|
|
1030
1354
|
props: {
|
|
1031
1355
|
label: {},
|
|
@@ -1046,73 +1370,79 @@ const he = {
|
|
|
1046
1370
|
loop: { type: Boolean }
|
|
1047
1371
|
},
|
|
1048
1372
|
emits: ["update"],
|
|
1049
|
-
setup(e, { emit:
|
|
1050
|
-
const
|
|
1051
|
-
return (
|
|
1052
|
-
onUpdate:
|
|
1373
|
+
setup(e, { emit: l }) {
|
|
1374
|
+
const t = e, a = l;
|
|
1375
|
+
return (r, n) => (i(), b(J, L(t, {
|
|
1376
|
+
onUpdate: n[0] || (n[0] = (s) => a("update", s))
|
|
1053
1377
|
}), {
|
|
1054
|
-
extra:
|
|
1055
|
-
|
|
1378
|
+
extra: V(({ updateProp: s }) => [
|
|
1379
|
+
h(o(we), {
|
|
1056
1380
|
label: "选项",
|
|
1057
1381
|
"model-value": e.choices,
|
|
1058
|
-
"onUpdate:modelValue": (
|
|
1382
|
+
"onUpdate:modelValue": (u) => s("choices", u)
|
|
1059
1383
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1060
|
-
|
|
1384
|
+
h(o(A), {
|
|
1061
1385
|
label: "默认选项值",
|
|
1062
1386
|
"model-value": e.defaultChoice,
|
|
1063
|
-
"onUpdate:modelValue": (
|
|
1387
|
+
"onUpdate:modelValue": (u) => s("defaultChoice", u)
|
|
1064
1388
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1065
|
-
|
|
1389
|
+
h(Q, {
|
|
1066
1390
|
label: "pageSize",
|
|
1067
1391
|
"model-value": e.pageSize,
|
|
1068
1392
|
min: 1,
|
|
1069
|
-
"onUpdate:modelValue": (
|
|
1393
|
+
"onUpdate:modelValue": (u) => s("pageSize", u)
|
|
1070
1394
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1071
|
-
|
|
1395
|
+
h(o(se), {
|
|
1072
1396
|
label: "循环 (loop)",
|
|
1073
1397
|
"model-value": e.loop,
|
|
1074
|
-
"onUpdate:modelValue": (
|
|
1398
|
+
"onUpdate:modelValue": (u) => s("loop", u)
|
|
1075
1399
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1076
1400
|
]),
|
|
1077
1401
|
_: 1
|
|
1078
1402
|
}, 16));
|
|
1079
1403
|
}
|
|
1080
|
-
}),
|
|
1404
|
+
}), Me = {
|
|
1081
1405
|
type: "inq-list",
|
|
1082
1406
|
category: "inputControl",
|
|
1083
1407
|
label: "列表",
|
|
1084
|
-
icon:
|
|
1408
|
+
icon: D.list,
|
|
1085
1409
|
isContainer: !1,
|
|
1086
|
-
initialSchema: () =>
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1410
|
+
initialSchema: () => {
|
|
1411
|
+
const e = C("controls.list.message");
|
|
1412
|
+
return {
|
|
1413
|
+
id: T("inq_list"),
|
|
1414
|
+
type: "inq-list",
|
|
1415
|
+
field: "list_" + Math.random().toString(36).slice(2, 6),
|
|
1416
|
+
props: {
|
|
1417
|
+
label: e,
|
|
1418
|
+
message: e,
|
|
1419
|
+
promptType: "list",
|
|
1420
|
+
placeholder: C("controls.list.placeholder"),
|
|
1421
|
+
defaultChoice: "opt_1",
|
|
1422
|
+
choices: [
|
|
1423
|
+
$(C("controls.list.option") + " 1", "opt_1"),
|
|
1424
|
+
$(C("controls.list.option") + " 2", "opt_2")
|
|
1425
|
+
],
|
|
1426
|
+
pageSize: 7,
|
|
1427
|
+
loop: !0,
|
|
1428
|
+
prefix: "",
|
|
1429
|
+
suffix: "",
|
|
1430
|
+
required: !0,
|
|
1431
|
+
whenExpression: "",
|
|
1432
|
+
validateExpression: "",
|
|
1433
|
+
filterExpression: "",
|
|
1434
|
+
transformerExpression: ""
|
|
1435
|
+
}
|
|
1436
|
+
};
|
|
1437
|
+
},
|
|
1438
|
+
designer: Cl,
|
|
1439
|
+
runtime: ue,
|
|
1440
|
+
config: ce,
|
|
1111
1441
|
locales: {
|
|
1112
1442
|
"zh-CN": { control: { "inq-list": { label: "列表" } } },
|
|
1113
1443
|
"en-US": { control: { "inq-list": { label: "List" } } }
|
|
1114
1444
|
}
|
|
1115
|
-
},
|
|
1445
|
+
}, zl = /* @__PURE__ */ f({
|
|
1116
1446
|
__name: "designer",
|
|
1117
1447
|
props: {
|
|
1118
1448
|
label: {},
|
|
@@ -1122,26 +1452,26 @@ const he = {
|
|
|
1122
1452
|
choices: {}
|
|
1123
1453
|
},
|
|
1124
1454
|
emits: ["select"],
|
|
1125
|
-
setup(e, { emit:
|
|
1126
|
-
const
|
|
1127
|
-
return (
|
|
1128
|
-
label: o(
|
|
1129
|
-
message: o(
|
|
1130
|
-
description: o(
|
|
1131
|
-
options: o(
|
|
1455
|
+
setup(e, { emit: l }) {
|
|
1456
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u, choices: _ } = B(t);
|
|
1457
|
+
return (p, v) => (i(), b(M, {
|
|
1458
|
+
label: o(r),
|
|
1459
|
+
message: o(n),
|
|
1460
|
+
description: o(s),
|
|
1461
|
+
options: o(_),
|
|
1132
1462
|
"type-label": "Inquirer Raw List",
|
|
1133
|
-
"is-active": o(
|
|
1134
|
-
onSelect:
|
|
1463
|
+
"is-active": o(u),
|
|
1464
|
+
onSelect: v[0] || (v[0] = (g) => a("select"))
|
|
1135
1465
|
}, null, 8, ["label", "message", "description", "options", "is-active"]));
|
|
1136
1466
|
}
|
|
1137
|
-
}),
|
|
1467
|
+
}), Bl = {
|
|
1138
1468
|
type: "inq-rawlist",
|
|
1139
1469
|
category: "inputControl",
|
|
1140
1470
|
label: "序号列表",
|
|
1141
|
-
icon:
|
|
1471
|
+
icon: D.rawList,
|
|
1142
1472
|
isContainer: !1,
|
|
1143
1473
|
initialSchema: () => ({
|
|
1144
|
-
id:
|
|
1474
|
+
id: T("inq_rawlist"),
|
|
1145
1475
|
type: "inq-rawlist",
|
|
1146
1476
|
field: "rawlist_" + Math.random().toString(36).slice(2, 6),
|
|
1147
1477
|
props: {
|
|
@@ -1150,7 +1480,7 @@ const he = {
|
|
|
1150
1480
|
promptType: "rawlist",
|
|
1151
1481
|
placeholder: "输入编号",
|
|
1152
1482
|
defaultChoice: "opt_a",
|
|
1153
|
-
choices: [
|
|
1483
|
+
choices: [$("Alpha", "opt_a"), $("Beta", "opt_b"), $("Gamma", "opt_c")],
|
|
1154
1484
|
pageSize: 5,
|
|
1155
1485
|
loop: !1,
|
|
1156
1486
|
prefix: "#",
|
|
@@ -1162,14 +1492,14 @@ const he = {
|
|
|
1162
1492
|
transformerExpression: ""
|
|
1163
1493
|
}
|
|
1164
1494
|
}),
|
|
1165
|
-
designer:
|
|
1166
|
-
runtime:
|
|
1167
|
-
config:
|
|
1495
|
+
designer: zl,
|
|
1496
|
+
runtime: ue,
|
|
1497
|
+
config: ce,
|
|
1168
1498
|
locales: {
|
|
1169
1499
|
"zh-CN": { control: { "inq-rawlist": { label: "序号列表" } } },
|
|
1170
1500
|
"en-US": { control: { "inq-rawlist": { label: "Raw List" } } }
|
|
1171
1501
|
}
|
|
1172
|
-
},
|
|
1502
|
+
}, Ml = /* @__PURE__ */ f({
|
|
1173
1503
|
__name: "designer",
|
|
1174
1504
|
props: {
|
|
1175
1505
|
label: {},
|
|
@@ -1179,26 +1509,26 @@ const he = {
|
|
|
1179
1509
|
choices: {}
|
|
1180
1510
|
},
|
|
1181
1511
|
emits: ["select"],
|
|
1182
|
-
setup(e, { emit:
|
|
1183
|
-
const
|
|
1184
|
-
return (
|
|
1185
|
-
label: o(
|
|
1186
|
-
message: o(
|
|
1187
|
-
description: o(
|
|
1188
|
-
options: o(
|
|
1512
|
+
setup(e, { emit: l }) {
|
|
1513
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u, choices: _ } = B(t);
|
|
1514
|
+
return (p, v) => (i(), b(M, {
|
|
1515
|
+
label: o(r),
|
|
1516
|
+
message: o(n),
|
|
1517
|
+
description: o(s),
|
|
1518
|
+
options: o(_),
|
|
1189
1519
|
"type-label": "Inquirer Expand",
|
|
1190
|
-
"is-active": o(
|
|
1191
|
-
onSelect:
|
|
1520
|
+
"is-active": o(u),
|
|
1521
|
+
onSelect: v[0] || (v[0] = (g) => a("select"))
|
|
1192
1522
|
}, null, 8, ["label", "message", "description", "options", "is-active"]));
|
|
1193
1523
|
}
|
|
1194
|
-
}),
|
|
1524
|
+
}), Tl = {
|
|
1195
1525
|
type: "inq-expand",
|
|
1196
1526
|
category: "inputControl",
|
|
1197
1527
|
label: "扩展列表",
|
|
1198
|
-
icon:
|
|
1528
|
+
icon: D.expand,
|
|
1199
1529
|
isContainer: !1,
|
|
1200
1530
|
initialSchema: () => ({
|
|
1201
|
-
id:
|
|
1531
|
+
id: T("inq_expand"),
|
|
1202
1532
|
type: "inq-expand",
|
|
1203
1533
|
field: "expand_" + Math.random().toString(36).slice(2, 6),
|
|
1204
1534
|
props: {
|
|
@@ -1208,9 +1538,9 @@ const he = {
|
|
|
1208
1538
|
placeholder: "按键选择",
|
|
1209
1539
|
defaultChoice: "opt_1",
|
|
1210
1540
|
choices: [
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1541
|
+
$("继续", "opt_1"),
|
|
1542
|
+
$("跳过", "opt_2"),
|
|
1543
|
+
$("退出", "opt_3")
|
|
1214
1544
|
],
|
|
1215
1545
|
pageSize: 5,
|
|
1216
1546
|
loop: !1,
|
|
@@ -1223,14 +1553,14 @@ const he = {
|
|
|
1223
1553
|
transformerExpression: ""
|
|
1224
1554
|
}
|
|
1225
1555
|
}),
|
|
1226
|
-
designer:
|
|
1227
|
-
runtime:
|
|
1228
|
-
config:
|
|
1556
|
+
designer: Ml,
|
|
1557
|
+
runtime: ue,
|
|
1558
|
+
config: ce,
|
|
1229
1559
|
locales: {
|
|
1230
1560
|
"zh-CN": { control: { "inq-expand": { label: "扩展列表" } } },
|
|
1231
1561
|
"en-US": { control: { "inq-expand": { label: "Expand" } } }
|
|
1232
1562
|
}
|
|
1233
|
-
},
|
|
1563
|
+
}, Dl = /* @__PURE__ */ f({
|
|
1234
1564
|
__name: "designer",
|
|
1235
1565
|
props: {
|
|
1236
1566
|
label: {},
|
|
@@ -1240,25 +1570,25 @@ const he = {
|
|
|
1240
1570
|
choices: {}
|
|
1241
1571
|
},
|
|
1242
1572
|
emits: ["select"],
|
|
1243
|
-
setup(e, { emit:
|
|
1244
|
-
const
|
|
1245
|
-
return (
|
|
1246
|
-
label: o(
|
|
1247
|
-
message: o(
|
|
1248
|
-
description: o(
|
|
1249
|
-
options: o(
|
|
1573
|
+
setup(e, { emit: l }) {
|
|
1574
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u, choices: _ } = B(t);
|
|
1575
|
+
return (p, v) => (i(), b(M, {
|
|
1576
|
+
label: o(r),
|
|
1577
|
+
message: o(n),
|
|
1578
|
+
description: o(s),
|
|
1579
|
+
options: o(_),
|
|
1250
1580
|
"type-label": "Inquirer Checkbox",
|
|
1251
|
-
"is-active": o(
|
|
1252
|
-
onSelect:
|
|
1581
|
+
"is-active": o(u),
|
|
1582
|
+
onSelect: v[0] || (v[0] = (g) => a("select"))
|
|
1253
1583
|
}, null, 8, ["label", "message", "description", "options", "is-active"]));
|
|
1254
1584
|
}
|
|
1255
|
-
}),
|
|
1585
|
+
}), Al = { class: "checkbox-wrapper" }, Ll = {
|
|
1256
1586
|
key: 0,
|
|
1257
1587
|
class: "affix"
|
|
1258
|
-
},
|
|
1588
|
+
}, Rl = {
|
|
1259
1589
|
key: 1,
|
|
1260
1590
|
class: "affix"
|
|
1261
|
-
},
|
|
1591
|
+
}, Fl = /* @__PURE__ */ f({
|
|
1262
1592
|
__name: "runtime",
|
|
1263
1593
|
props: {
|
|
1264
1594
|
modelValue: {},
|
|
@@ -1268,38 +1598,38 @@ const he = {
|
|
|
1268
1598
|
suffix: {}
|
|
1269
1599
|
},
|
|
1270
1600
|
emits: ["update:modelValue"],
|
|
1271
|
-
setup(e, { emit:
|
|
1272
|
-
const
|
|
1273
|
-
() => (
|
|
1274
|
-
label:
|
|
1275
|
-
value:
|
|
1601
|
+
setup(e, { emit: l }) {
|
|
1602
|
+
const t = e, a = l, r = y(
|
|
1603
|
+
() => (t.choices ?? []).map((n) => ({
|
|
1604
|
+
label: n.label || n.value,
|
|
1605
|
+
value: n.value
|
|
1276
1606
|
}))
|
|
1277
1607
|
);
|
|
1278
|
-
return (
|
|
1279
|
-
e.prefix ? (
|
|
1280
|
-
|
|
1608
|
+
return (n, s) => (i(), d("div", Al, [
|
|
1609
|
+
e.prefix ? (i(), d("span", Ll, m(e.prefix), 1)) : x("", !0),
|
|
1610
|
+
h(o(Xe), {
|
|
1281
1611
|
class: "checkbox-runtime",
|
|
1282
1612
|
"model-value": e.modelValue || [],
|
|
1283
1613
|
disabled: e.disabled,
|
|
1284
|
-
"onUpdate:modelValue":
|
|
1614
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => a("update:modelValue", u))
|
|
1285
1615
|
}, {
|
|
1286
|
-
default:
|
|
1287
|
-
(
|
|
1288
|
-
key:
|
|
1289
|
-
label:
|
|
1616
|
+
default: V(() => [
|
|
1617
|
+
(i(!0), d(I, null, z(r.value, (u) => (i(), b(o(Ze), {
|
|
1618
|
+
key: u.value,
|
|
1619
|
+
label: u.value
|
|
1290
1620
|
}, {
|
|
1291
|
-
default:
|
|
1292
|
-
|
|
1621
|
+
default: V(() => [
|
|
1622
|
+
X(m(u.label), 1)
|
|
1293
1623
|
]),
|
|
1294
1624
|
_: 2
|
|
1295
1625
|
}, 1032, ["label"]))), 128))
|
|
1296
1626
|
]),
|
|
1297
1627
|
_: 1
|
|
1298
1628
|
}, 8, ["model-value", "disabled"]),
|
|
1299
|
-
e.suffix ? (
|
|
1629
|
+
e.suffix ? (i(), d("span", Rl, m(e.suffix), 1)) : x("", !0)
|
|
1300
1630
|
]));
|
|
1301
1631
|
}
|
|
1302
|
-
}),
|
|
1632
|
+
}), Pl = /* @__PURE__ */ q(Fl, [["__scopeId", "data-v-5def473d"]]), Ol = { class: "multi-default" }, Hl = /* @__PURE__ */ f({
|
|
1303
1633
|
__name: "config",
|
|
1304
1634
|
props: {
|
|
1305
1635
|
label: {},
|
|
@@ -1318,79 +1648,82 @@ const he = {
|
|
|
1318
1648
|
defaultChoices: {}
|
|
1319
1649
|
},
|
|
1320
1650
|
emits: ["update"],
|
|
1321
|
-
setup(e, { emit:
|
|
1322
|
-
const
|
|
1323
|
-
return (
|
|
1324
|
-
onUpdate:
|
|
1651
|
+
setup(e, { emit: l }) {
|
|
1652
|
+
const t = e, a = l;
|
|
1653
|
+
return (r, n) => (i(), b(J, L(t, {
|
|
1654
|
+
onUpdate: n[0] || (n[0] = (s) => a("update", s))
|
|
1325
1655
|
}), {
|
|
1326
|
-
defaultValue:
|
|
1327
|
-
c("div",
|
|
1328
|
-
|
|
1329
|
-
|
|
1656
|
+
defaultValue: V(({ updateProp: s }) => [
|
|
1657
|
+
c("div", Ol, [
|
|
1658
|
+
n[1] || (n[1] = c("label", null, "默认选中值", -1)),
|
|
1659
|
+
h(o(Se), {
|
|
1330
1660
|
multiple: "",
|
|
1331
1661
|
"collapse-tags": "",
|
|
1332
1662
|
"collapse-tags-tooltip": "",
|
|
1333
1663
|
"model-value": e.defaultChoices || [],
|
|
1334
|
-
"onUpdate:modelValue": (
|
|
1664
|
+
"onUpdate:modelValue": (u) => s("defaultChoices", u)
|
|
1335
1665
|
}, {
|
|
1336
|
-
default:
|
|
1337
|
-
(
|
|
1338
|
-
key:
|
|
1339
|
-
label:
|
|
1340
|
-
value:
|
|
1666
|
+
default: V(() => [
|
|
1667
|
+
(i(!0), d(I, null, z(e.choices || [], (u) => (i(), b(o(ke), {
|
|
1668
|
+
key: u.value,
|
|
1669
|
+
label: u.label,
|
|
1670
|
+
value: u.value
|
|
1341
1671
|
}, null, 8, ["label", "value"]))), 128))
|
|
1342
1672
|
]),
|
|
1343
1673
|
_: 1
|
|
1344
1674
|
}, 8, ["model-value", "onUpdate:modelValue"])
|
|
1345
1675
|
])
|
|
1346
1676
|
]),
|
|
1347
|
-
extra:
|
|
1348
|
-
|
|
1677
|
+
extra: V(({ updateProp: s }) => [
|
|
1678
|
+
h(o(we), {
|
|
1349
1679
|
label: "选项",
|
|
1350
1680
|
"model-value": e.choices,
|
|
1351
|
-
"onUpdate:modelValue": (
|
|
1681
|
+
"onUpdate:modelValue": (u) => s("choices", u)
|
|
1352
1682
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1353
1683
|
]),
|
|
1354
1684
|
_: 1
|
|
1355
1685
|
}, 16));
|
|
1356
1686
|
}
|
|
1357
|
-
}),
|
|
1687
|
+
}), Jl = /* @__PURE__ */ q(Hl, [["__scopeId", "data-v-fa680fd2"]]), Te = {
|
|
1358
1688
|
type: "inq-checkbox",
|
|
1359
1689
|
category: "inputControl",
|
|
1360
1690
|
label: "多选",
|
|
1361
|
-
icon:
|
|
1691
|
+
icon: D.checkbox,
|
|
1362
1692
|
isContainer: !1,
|
|
1363
|
-
initialSchema: () =>
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1693
|
+
initialSchema: () => {
|
|
1694
|
+
const e = C("controls.checkbox.message");
|
|
1695
|
+
return {
|
|
1696
|
+
id: T("inq_checkbox"),
|
|
1697
|
+
type: "inq-checkbox",
|
|
1698
|
+
field: "checkbox_" + Math.random().toString(36).slice(2, 6),
|
|
1699
|
+
props: {
|
|
1700
|
+
label: e,
|
|
1701
|
+
message: e,
|
|
1702
|
+
promptType: "checkbox",
|
|
1703
|
+
choices: [
|
|
1704
|
+
$(C("controls.checkbox.option") + " 1", "opt_1"),
|
|
1705
|
+
$(C("controls.checkbox.option") + " 2", "opt_2"),
|
|
1706
|
+
$(C("controls.checkbox.option") + " 3", "opt_3")
|
|
1707
|
+
],
|
|
1708
|
+
defaultChoices: ["opt_1"],
|
|
1709
|
+
prefix: "",
|
|
1710
|
+
suffix: "",
|
|
1711
|
+
required: !1,
|
|
1712
|
+
whenExpression: "",
|
|
1713
|
+
validateExpression: "",
|
|
1714
|
+
filterExpression: "",
|
|
1715
|
+
transformerExpression: ""
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
},
|
|
1719
|
+
designer: Dl,
|
|
1720
|
+
runtime: Pl,
|
|
1721
|
+
config: Jl,
|
|
1389
1722
|
locales: {
|
|
1390
1723
|
"zh-CN": { control: { "inq-checkbox": { label: "多选" } } },
|
|
1391
1724
|
"en-US": { control: { "inq-checkbox": { label: "Checkbox" } } }
|
|
1392
1725
|
}
|
|
1393
|
-
},
|
|
1726
|
+
}, Gl = /* @__PURE__ */ f({
|
|
1394
1727
|
__name: "designer",
|
|
1395
1728
|
props: {
|
|
1396
1729
|
label: {},
|
|
@@ -1399,27 +1732,27 @@ const he = {
|
|
|
1399
1732
|
isActive: { type: Boolean }
|
|
1400
1733
|
},
|
|
1401
1734
|
emits: ["select"],
|
|
1402
|
-
setup(e, { emit:
|
|
1403
|
-
const
|
|
1404
|
-
return (
|
|
1405
|
-
label: o(
|
|
1406
|
-
message: o(
|
|
1407
|
-
description: o(
|
|
1735
|
+
setup(e, { emit: l }) {
|
|
1736
|
+
const t = e, a = l, { label: r, message: n, description: s, isActive: u } = B(t);
|
|
1737
|
+
return (_, p) => (i(), b(M, {
|
|
1738
|
+
label: o(r),
|
|
1739
|
+
message: o(n),
|
|
1740
|
+
description: o(s),
|
|
1408
1741
|
"type-label": "Inquirer Editor",
|
|
1409
|
-
"is-active": o(
|
|
1410
|
-
onSelect:
|
|
1742
|
+
"is-active": o(u),
|
|
1743
|
+
onSelect: p[0] || (p[0] = (v) => a("select"))
|
|
1411
1744
|
}, null, 8, ["label", "message", "description", "is-active"]));
|
|
1412
1745
|
}
|
|
1413
|
-
}),
|
|
1746
|
+
}), Ql = { class: "editor-runtime" }, jl = {
|
|
1414
1747
|
key: 0,
|
|
1415
1748
|
class: "affix"
|
|
1416
|
-
},
|
|
1749
|
+
}, Wl = {
|
|
1417
1750
|
key: 1,
|
|
1418
1751
|
class: "affix"
|
|
1419
|
-
},
|
|
1752
|
+
}, Yl = {
|
|
1420
1753
|
key: 2,
|
|
1421
1754
|
class: "transformer-preview"
|
|
1422
|
-
},
|
|
1755
|
+
}, Kl = /* @__PURE__ */ f({
|
|
1423
1756
|
__name: "runtime",
|
|
1424
1757
|
props: {
|
|
1425
1758
|
modelValue: {},
|
|
@@ -1431,23 +1764,23 @@ const he = {
|
|
|
1431
1764
|
displayValue: {}
|
|
1432
1765
|
},
|
|
1433
1766
|
emits: ["update:modelValue"],
|
|
1434
|
-
setup(e, { emit:
|
|
1435
|
-
const
|
|
1436
|
-
return (
|
|
1437
|
-
e.prefix ? (
|
|
1438
|
-
|
|
1767
|
+
setup(e, { emit: l }) {
|
|
1768
|
+
const t = e, a = l, r = y(() => t.displayValue === void 0 ? !1 : t.displayValue !== t.modelValue);
|
|
1769
|
+
return (n, s) => (i(), d("div", Ql, [
|
|
1770
|
+
e.prefix ? (i(), d("span", jl, m(e.prefix), 1)) : x("", !0),
|
|
1771
|
+
h(o(ee), {
|
|
1439
1772
|
type: "textarea",
|
|
1440
1773
|
rows: e.rows || 6,
|
|
1441
1774
|
"model-value": e.modelValue ?? "",
|
|
1442
1775
|
placeholder: e.placeholder,
|
|
1443
1776
|
disabled: e.disabled,
|
|
1444
|
-
"onUpdate:modelValue":
|
|
1777
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => a("update:modelValue", u ?? ""))
|
|
1445
1778
|
}, null, 8, ["rows", "model-value", "placeholder", "disabled"]),
|
|
1446
|
-
e.suffix ? (
|
|
1447
|
-
|
|
1779
|
+
e.suffix ? (i(), d("span", Wl, m(e.suffix), 1)) : x("", !0),
|
|
1780
|
+
r.value ? (i(), d("p", Yl, m(e.displayValue), 1)) : x("", !0)
|
|
1448
1781
|
]));
|
|
1449
1782
|
}
|
|
1450
|
-
}),
|
|
1783
|
+
}), Xl = /* @__PURE__ */ q(Kl, [["__scopeId", "data-v-768e57da"]]), Zl = /* @__PURE__ */ f({
|
|
1451
1784
|
__name: "config",
|
|
1452
1785
|
props: {
|
|
1453
1786
|
label: {},
|
|
@@ -1465,156 +1798,166 @@ const he = {
|
|
|
1465
1798
|
rows: {}
|
|
1466
1799
|
},
|
|
1467
1800
|
emits: ["update"],
|
|
1468
|
-
setup(e, { emit:
|
|
1469
|
-
const
|
|
1470
|
-
return (
|
|
1471
|
-
onUpdate:
|
|
1801
|
+
setup(e, { emit: l }) {
|
|
1802
|
+
const t = e, a = l;
|
|
1803
|
+
return (r, n) => (i(), b(J, L(t, {
|
|
1804
|
+
onUpdate: n[0] || (n[0] = (s) => a("update", s))
|
|
1472
1805
|
}), {
|
|
1473
|
-
extra:
|
|
1474
|
-
|
|
1806
|
+
extra: V(({ updateProp: s }) => [
|
|
1807
|
+
h(Q, {
|
|
1475
1808
|
label: "行数",
|
|
1476
1809
|
"model-value": e.rows,
|
|
1477
1810
|
min: 2,
|
|
1478
1811
|
max: 20,
|
|
1479
|
-
"onUpdate:modelValue": (
|
|
1812
|
+
"onUpdate:modelValue": (u) => s("rows", u)
|
|
1480
1813
|
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1481
1814
|
]),
|
|
1482
1815
|
_: 1
|
|
1483
1816
|
}, 16));
|
|
1484
1817
|
}
|
|
1485
|
-
}),
|
|
1818
|
+
}), De = {
|
|
1486
1819
|
type: "inq-editor",
|
|
1487
1820
|
category: "inputControl",
|
|
1488
1821
|
label: "长文本",
|
|
1489
|
-
icon:
|
|
1822
|
+
icon: D.editor,
|
|
1490
1823
|
isContainer: !1,
|
|
1491
|
-
initialSchema: () =>
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1824
|
+
initialSchema: () => {
|
|
1825
|
+
const e = C("controls.editor.message");
|
|
1826
|
+
return {
|
|
1827
|
+
id: T("inq_editor"),
|
|
1828
|
+
type: "inq-editor",
|
|
1829
|
+
field: "editor_" + Math.random().toString(36).slice(2, 6),
|
|
1830
|
+
props: {
|
|
1831
|
+
label: e,
|
|
1832
|
+
message: e,
|
|
1833
|
+
promptType: "editor",
|
|
1834
|
+
placeholder: C("controls.editor.placeholder"),
|
|
1835
|
+
rows: 6,
|
|
1836
|
+
defaultValue: "",
|
|
1837
|
+
prefix: "",
|
|
1838
|
+
suffix: "",
|
|
1839
|
+
required: !1,
|
|
1840
|
+
whenExpression: "",
|
|
1841
|
+
validateExpression: "",
|
|
1842
|
+
filterExpression: "",
|
|
1843
|
+
transformerExpression: ""
|
|
1844
|
+
}
|
|
1845
|
+
};
|
|
1846
|
+
},
|
|
1847
|
+
designer: Gl,
|
|
1848
|
+
runtime: Xl,
|
|
1849
|
+
config: Zl,
|
|
1514
1850
|
locales: {
|
|
1515
1851
|
"zh-CN": { control: { "inq-editor": { label: "长文本" } } },
|
|
1516
1852
|
"en-US": { control: { "inq-editor": { label: "Editor" } } }
|
|
1517
1853
|
}
|
|
1518
|
-
},
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1854
|
+
}, es = [
|
|
1855
|
+
Ie,
|
|
1856
|
+
Ne,
|
|
1857
|
+
ze,
|
|
1858
|
+
Be,
|
|
1859
|
+
Me,
|
|
1860
|
+
Bl,
|
|
1861
|
+
Tl,
|
|
1862
|
+
Te,
|
|
1863
|
+
De
|
|
1528
1864
|
];
|
|
1529
|
-
function
|
|
1530
|
-
|
|
1865
|
+
function Ae() {
|
|
1866
|
+
j.replaceAll(es);
|
|
1531
1867
|
}
|
|
1532
|
-
function
|
|
1533
|
-
const
|
|
1868
|
+
function P(e, l) {
|
|
1869
|
+
const t = e.initialSchema();
|
|
1534
1870
|
return {
|
|
1535
|
-
...l,
|
|
1536
1871
|
...t,
|
|
1872
|
+
...l,
|
|
1537
1873
|
props: {
|
|
1538
|
-
...
|
|
1539
|
-
...
|
|
1874
|
+
...t.props,
|
|
1875
|
+
...l.props
|
|
1540
1876
|
}
|
|
1541
1877
|
};
|
|
1542
1878
|
}
|
|
1543
|
-
function
|
|
1879
|
+
function Le(e) {
|
|
1544
1880
|
return [
|
|
1545
|
-
|
|
1881
|
+
P(Ie, {
|
|
1546
1882
|
field: "fullName",
|
|
1547
1883
|
props: {
|
|
1548
|
-
label: "
|
|
1549
|
-
message
|
|
1550
|
-
|
|
1551
|
-
|
|
1884
|
+
label: e("sample.fullName.message"),
|
|
1885
|
+
// label 和 message 保持一致
|
|
1886
|
+
message: e("sample.fullName.message"),
|
|
1887
|
+
placeholder: e("sample.fullName.placeholder"),
|
|
1888
|
+
description: e("sample.fullName.description")
|
|
1552
1889
|
}
|
|
1553
1890
|
}),
|
|
1554
|
-
|
|
1891
|
+
P(Ne, {
|
|
1555
1892
|
field: "accountPassword",
|
|
1556
1893
|
props: {
|
|
1557
|
-
label: "
|
|
1558
|
-
message
|
|
1559
|
-
|
|
1894
|
+
label: e("sample.password.message"),
|
|
1895
|
+
// label 和 message 保持一致
|
|
1896
|
+
message: e("sample.password.message"),
|
|
1897
|
+
description: e("sample.password.description")
|
|
1560
1898
|
}
|
|
1561
1899
|
}),
|
|
1562
|
-
|
|
1900
|
+
P(ze, {
|
|
1563
1901
|
field: "age",
|
|
1564
1902
|
props: {
|
|
1565
|
-
label: "
|
|
1566
|
-
message
|
|
1903
|
+
label: e("sample.age.message"),
|
|
1904
|
+
// label 和 message 保持一致
|
|
1905
|
+
message: e("sample.age.message"),
|
|
1567
1906
|
min: 0,
|
|
1568
1907
|
max: 120,
|
|
1569
1908
|
required: !0,
|
|
1570
|
-
description: "
|
|
1909
|
+
description: e("sample.age.description")
|
|
1571
1910
|
}
|
|
1572
1911
|
}),
|
|
1573
|
-
|
|
1912
|
+
P(Be, {
|
|
1574
1913
|
field: "allowContact",
|
|
1575
1914
|
props: {
|
|
1576
|
-
label: "
|
|
1577
|
-
message
|
|
1915
|
+
label: e("sample.allowContact.message"),
|
|
1916
|
+
// label 和 message 保持一致
|
|
1917
|
+
message: e("sample.allowContact.message"),
|
|
1578
1918
|
defaultValue: !0,
|
|
1579
|
-
description: "
|
|
1919
|
+
description: e("sample.allowContact.description")
|
|
1580
1920
|
}
|
|
1581
1921
|
}),
|
|
1582
|
-
|
|
1922
|
+
P(Me, {
|
|
1583
1923
|
field: "favoriteStack",
|
|
1584
1924
|
props: {
|
|
1585
|
-
label: "
|
|
1586
|
-
message
|
|
1925
|
+
label: e("sample.favoriteStack.message"),
|
|
1926
|
+
// label 和 message 保持一致
|
|
1927
|
+
message: e("sample.favoriteStack.message"),
|
|
1587
1928
|
defaultChoice: "ts",
|
|
1588
|
-
description: "
|
|
1929
|
+
description: e("sample.favoriteStack.description")
|
|
1589
1930
|
}
|
|
1590
1931
|
}),
|
|
1591
|
-
|
|
1932
|
+
P(Te, {
|
|
1592
1933
|
field: "tools",
|
|
1593
1934
|
props: {
|
|
1594
|
-
label: "
|
|
1595
|
-
message
|
|
1935
|
+
label: e("sample.tools.message"),
|
|
1936
|
+
// label 和 message 保持一致
|
|
1937
|
+
message: e("sample.tools.message"),
|
|
1596
1938
|
defaultChoices: ["git", "eslint"],
|
|
1597
1939
|
choices: [
|
|
1598
|
-
{ label: "
|
|
1599
|
-
{ label: "
|
|
1600
|
-
{ label: "
|
|
1601
|
-
{ label: "
|
|
1940
|
+
{ label: e("sample.tools.choices.git"), value: "git" },
|
|
1941
|
+
{ label: e("sample.tools.choices.eslint"), value: "eslint" },
|
|
1942
|
+
{ label: e("sample.tools.choices.vite"), value: "vite" },
|
|
1943
|
+
{ label: e("sample.tools.choices.vitest"), value: "vitest" }
|
|
1602
1944
|
],
|
|
1603
|
-
description: "
|
|
1945
|
+
description: e("sample.tools.description")
|
|
1604
1946
|
}
|
|
1605
1947
|
}),
|
|
1606
|
-
|
|
1948
|
+
P(De, {
|
|
1607
1949
|
field: "bio",
|
|
1608
1950
|
props: {
|
|
1609
|
-
label: "
|
|
1610
|
-
message
|
|
1951
|
+
label: e("sample.bio.message"),
|
|
1952
|
+
// label 和 message 保持一致
|
|
1953
|
+
message: e("sample.bio.message"),
|
|
1611
1954
|
rows: 5,
|
|
1612
|
-
description: "
|
|
1955
|
+
description: e("sample.bio.description")
|
|
1613
1956
|
}
|
|
1614
1957
|
})
|
|
1615
1958
|
];
|
|
1616
1959
|
}
|
|
1617
|
-
const
|
|
1960
|
+
const ts = /* @__PURE__ */ f({
|
|
1618
1961
|
name: "InquirerFormDesigner",
|
|
1619
1962
|
__name: "InquirerFormDesigner",
|
|
1620
1963
|
props: {
|
|
@@ -1623,14 +1966,14 @@ const wt = /* @__PURE__ */ h({
|
|
|
1623
1966
|
autoRegisterControls: { type: Boolean, default: !0 }
|
|
1624
1967
|
},
|
|
1625
1968
|
setup(e) {
|
|
1626
|
-
const
|
|
1627
|
-
let
|
|
1628
|
-
const
|
|
1629
|
-
return
|
|
1630
|
-
|
|
1631
|
-
}), (
|
|
1969
|
+
const l = e, t = new Ve(), a = y(() => l.engine ?? t);
|
|
1970
|
+
let r = null;
|
|
1971
|
+
const n = l.autoRegisterControls;
|
|
1972
|
+
return n && (r = [...j.getAll()], Ae()), l.seedSample && a.value.getSchema().controls.length === 0 && (a.value.getSchema().controls = Le()), ye(() => {
|
|
1973
|
+
n && r && j.replaceAll(r);
|
|
1974
|
+
}), (s, u) => (i(), b(o(qe), { engine: a.value }, null, 8, ["engine"]));
|
|
1632
1975
|
}
|
|
1633
|
-
}),
|
|
1976
|
+
}), ls = {
|
|
1634
1977
|
"inq-input": "input",
|
|
1635
1978
|
"inq-password": "password",
|
|
1636
1979
|
"inq-number": "number",
|
|
@@ -1640,99 +1983,99 @@ const wt = /* @__PURE__ */ h({
|
|
|
1640
1983
|
"inq-expand": "expand",
|
|
1641
1984
|
"inq-checkbox": "checkbox",
|
|
1642
1985
|
"inq-editor": "editor"
|
|
1643
|
-
},
|
|
1644
|
-
function
|
|
1645
|
-
const
|
|
1646
|
-
return
|
|
1986
|
+
}, ss = ["list", "rawlist", "expand", "checkbox"];
|
|
1987
|
+
function Re(e) {
|
|
1988
|
+
const l = e.props?.promptType;
|
|
1989
|
+
return l || (ls[e.type] ?? null);
|
|
1647
1990
|
}
|
|
1648
|
-
function
|
|
1649
|
-
return
|
|
1991
|
+
function as(e) {
|
|
1992
|
+
return ss.includes(e);
|
|
1650
1993
|
}
|
|
1651
|
-
function
|
|
1652
|
-
const
|
|
1653
|
-
if (!
|
|
1654
|
-
const
|
|
1655
|
-
if (
|
|
1656
|
-
return typeof
|
|
1657
|
-
if (
|
|
1658
|
-
return Array.isArray(
|
|
1659
|
-
if (
|
|
1660
|
-
const
|
|
1661
|
-
return Number.isNaN(
|
|
1994
|
+
function de(e) {
|
|
1995
|
+
const l = Re(e);
|
|
1996
|
+
if (!l) return;
|
|
1997
|
+
const t = e.props || {};
|
|
1998
|
+
if (l === "confirm")
|
|
1999
|
+
return typeof t.defaultValue == "boolean" ? t.defaultValue : !1;
|
|
2000
|
+
if (l === "checkbox")
|
|
2001
|
+
return Array.isArray(t.defaultChoices) ? t.defaultChoices : Array.isArray(t.defaultValue) ? t.defaultValue : [];
|
|
2002
|
+
if (l === "number") {
|
|
2003
|
+
const a = Number(t.defaultValue);
|
|
2004
|
+
return Number.isNaN(a) ? void 0 : a;
|
|
1662
2005
|
}
|
|
1663
|
-
if ((
|
|
1664
|
-
return
|
|
1665
|
-
if (
|
|
1666
|
-
return
|
|
1667
|
-
if (
|
|
2006
|
+
if ((l === "list" || l === "rawlist" || l === "expand") && typeof t.defaultChoice == "string")
|
|
2007
|
+
return t.defaultChoice;
|
|
2008
|
+
if (t.defaultValue !== void 0 && t.defaultValue !== null)
|
|
2009
|
+
return t.defaultValue;
|
|
2010
|
+
if (l === "input" || l === "password" || l === "editor")
|
|
1668
2011
|
return "";
|
|
1669
2012
|
}
|
|
1670
|
-
function
|
|
2013
|
+
function ae(e, l) {
|
|
1671
2014
|
if (!(!e || typeof e != "string"))
|
|
1672
2015
|
try {
|
|
1673
|
-
return new Function("input", "answers", e)(
|
|
1674
|
-
} catch (
|
|
1675
|
-
console.warn("[inquirer-demo] 表达式执行失败:",
|
|
2016
|
+
return new Function("input", "answers", e)(l.input, l.answers);
|
|
2017
|
+
} catch (t) {
|
|
2018
|
+
console.warn("[inquirer-demo] 表达式执行失败:", t);
|
|
1676
2019
|
return;
|
|
1677
2020
|
}
|
|
1678
2021
|
}
|
|
1679
|
-
function
|
|
1680
|
-
const
|
|
1681
|
-
if (!
|
|
1682
|
-
const
|
|
1683
|
-
return typeof
|
|
2022
|
+
function os(e, l) {
|
|
2023
|
+
const t = e.props?.whenExpression;
|
|
2024
|
+
if (!t) return !0;
|
|
2025
|
+
const a = ae(t, { input: l[e.field || ""], answers: l });
|
|
2026
|
+
return typeof a == "boolean" ? a : !0;
|
|
1684
2027
|
}
|
|
1685
|
-
function
|
|
1686
|
-
const
|
|
1687
|
-
if (!
|
|
1688
|
-
const
|
|
1689
|
-
return
|
|
2028
|
+
function ns(e, l, t) {
|
|
2029
|
+
const a = e.props?.filterExpression;
|
|
2030
|
+
if (!a) return l;
|
|
2031
|
+
const r = ae(a, { input: l, answers: t });
|
|
2032
|
+
return r === void 0 ? l : r;
|
|
1690
2033
|
}
|
|
1691
|
-
function
|
|
1692
|
-
const
|
|
1693
|
-
if (!
|
|
1694
|
-
const
|
|
1695
|
-
return
|
|
2034
|
+
function is(e, l, t) {
|
|
2035
|
+
const a = e.props?.transformerExpression;
|
|
2036
|
+
if (!a) return l;
|
|
2037
|
+
const r = ae(a, { input: l, answers: t });
|
|
2038
|
+
return r === void 0 ? l : r;
|
|
1696
2039
|
}
|
|
1697
|
-
function
|
|
1698
|
-
const
|
|
1699
|
-
if (!
|
|
2040
|
+
function ve(e, l, t) {
|
|
2041
|
+
const a = e.props?.validateExpression;
|
|
2042
|
+
if (!a && !e.props?.required)
|
|
1700
2043
|
return null;
|
|
1701
|
-
if (
|
|
1702
|
-
const
|
|
1703
|
-
if (
|
|
2044
|
+
if (a) {
|
|
2045
|
+
const r = ae(a, { input: l, answers: t });
|
|
2046
|
+
if (r === !0 || r === void 0)
|
|
1704
2047
|
return null;
|
|
1705
|
-
if (typeof
|
|
1706
|
-
return
|
|
2048
|
+
if (typeof r == "string")
|
|
2049
|
+
return r;
|
|
1707
2050
|
} else if (e.props?.required) {
|
|
1708
|
-
if (
|
|
1709
|
-
return "
|
|
1710
|
-
if (Array.isArray(
|
|
1711
|
-
return "
|
|
2051
|
+
if (l == null || l === "")
|
|
2052
|
+
return "Please input";
|
|
2053
|
+
if (Array.isArray(l) && l.length === 0)
|
|
2054
|
+
return "Please select";
|
|
1712
2055
|
}
|
|
1713
2056
|
return null;
|
|
1714
2057
|
}
|
|
1715
|
-
function
|
|
1716
|
-
if (!
|
|
1717
|
-
const
|
|
1718
|
-
|
|
2058
|
+
function rs(e, l) {
|
|
2059
|
+
if (!l.field || e[l.field] !== void 0) return;
|
|
2060
|
+
const t = de(l);
|
|
2061
|
+
t !== void 0 && (e[l.field] = t);
|
|
1719
2062
|
}
|
|
1720
|
-
function
|
|
2063
|
+
function us(e) {
|
|
1721
2064
|
if (typeof e.props?.description == "string" && e.props.description.trim().length > 0)
|
|
1722
2065
|
return e.props.description.trim();
|
|
1723
2066
|
if (typeof e.props?.message == "string" && e.props.message.trim().length > 0)
|
|
1724
2067
|
return e.props.message.trim();
|
|
1725
2068
|
}
|
|
1726
|
-
const
|
|
2069
|
+
const cs = {
|
|
1727
2070
|
key: 0,
|
|
1728
2071
|
class: "inquirer-container"
|
|
1729
|
-
},
|
|
2072
|
+
}, ds = {
|
|
1730
2073
|
key: 0,
|
|
1731
2074
|
class: "node-description"
|
|
1732
|
-
},
|
|
2075
|
+
}, ps = {
|
|
1733
2076
|
key: 1,
|
|
1734
2077
|
class: "node-error"
|
|
1735
|
-
},
|
|
2078
|
+
}, ms = /* @__PURE__ */ f({
|
|
1736
2079
|
name: "InquirerRuntimeNode",
|
|
1737
2080
|
__name: "InquirerRuntimeNode",
|
|
1738
2081
|
props: {
|
|
@@ -1740,80 +2083,80 @@ const It = {
|
|
|
1740
2083
|
formData: {}
|
|
1741
2084
|
},
|
|
1742
2085
|
emits: ["update"],
|
|
1743
|
-
setup(e, { emit:
|
|
1744
|
-
const
|
|
1745
|
-
if (
|
|
1746
|
-
return
|
|
1747
|
-
}),
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
(
|
|
1751
|
-
|
|
2086
|
+
setup(e, { emit: l }) {
|
|
2087
|
+
const t = e, a = l, r = y(() => j.get(t.node.type)), n = y(() => r.value?.runtime || null), s = y(() => t.formData || {}), u = y(() => {
|
|
2088
|
+
if (t.node.field)
|
|
2089
|
+
return s.value[t.node.field];
|
|
2090
|
+
}), _ = y(() => us(t.node)), p = H(null), v = y(() => os(t.node, s.value));
|
|
2091
|
+
Z(
|
|
2092
|
+
v,
|
|
2093
|
+
(k) => {
|
|
2094
|
+
!k && t.node.field && s.value[t.node.field] !== void 0 && (a("update", t.node.field, void 0), p.value = null);
|
|
1752
2095
|
},
|
|
1753
2096
|
{ immediate: !0 }
|
|
1754
|
-
),
|
|
1755
|
-
() =>
|
|
1756
|
-
(
|
|
1757
|
-
|
|
2097
|
+
), Z(
|
|
2098
|
+
() => u.value,
|
|
2099
|
+
(k) => {
|
|
2100
|
+
p.value = ve(t.node, k, s.value);
|
|
1758
2101
|
},
|
|
1759
2102
|
{ immediate: !0 }
|
|
1760
2103
|
);
|
|
1761
|
-
function
|
|
1762
|
-
if (!
|
|
1763
|
-
const
|
|
1764
|
-
|
|
2104
|
+
function g(k) {
|
|
2105
|
+
if (!t.node.field) return;
|
|
2106
|
+
const R = ns(t.node, k, s.value);
|
|
2107
|
+
a("update", t.node.field, R), p.value = ve(t.node, R, s.value);
|
|
1765
2108
|
}
|
|
1766
|
-
const
|
|
1767
|
-
function
|
|
1768
|
-
|
|
2109
|
+
const w = y(() => typeof t.node.props?.message == "string" && t.node.props.message.trim() ? t.node.props.message : typeof t.node.props?.label == "string" && t.node.props.label.trim() ? t.node.props.label : t.node.field || "未命名控件"), te = y(() => is(t.node, u.value, s.value)), G = y(() => r.value?.isContainer ?? !1);
|
|
2110
|
+
function U(k, R) {
|
|
2111
|
+
a("update", k, R);
|
|
1769
2112
|
}
|
|
1770
|
-
return (
|
|
1771
|
-
const
|
|
1772
|
-
return
|
|
1773
|
-
|
|
1774
|
-
(
|
|
1775
|
-
default:
|
|
1776
|
-
e.node.children && e.node.children.length ? (
|
|
1777
|
-
key:
|
|
1778
|
-
node:
|
|
2113
|
+
return (k, R) => {
|
|
2114
|
+
const W = He("InquirerRuntimeNode", !0);
|
|
2115
|
+
return v.value ? (i(), d(I, { key: 0 }, [
|
|
2116
|
+
G.value ? (i(), d("div", cs, [
|
|
2117
|
+
(i(), b(he(n.value), Je(Ge(e.node.props)), {
|
|
2118
|
+
default: V(() => [
|
|
2119
|
+
e.node.children && e.node.children.length ? (i(!0), d(I, { key: 0 }, z(e.node.children, (F) => (i(), b(W, {
|
|
2120
|
+
key: F.id,
|
|
2121
|
+
node: F,
|
|
1779
2122
|
formData: e.formData,
|
|
1780
|
-
onUpdate:
|
|
1781
|
-
}, null, 8, ["node", "formData"]))), 128)) :
|
|
2123
|
+
onUpdate: U
|
|
2124
|
+
}, null, 8, ["node", "formData"]))), 128)) : x("", !0)
|
|
1782
2125
|
]),
|
|
1783
2126
|
_: 1
|
|
1784
2127
|
}, 16))
|
|
1785
|
-
])) : (
|
|
2128
|
+
])) : (i(), b(o(_e), {
|
|
1786
2129
|
key: 1,
|
|
1787
|
-
label:
|
|
2130
|
+
label: w.value
|
|
1788
2131
|
}, {
|
|
1789
|
-
default:
|
|
1790
|
-
(
|
|
1791
|
-
modelValue:
|
|
1792
|
-
displayValue:
|
|
1793
|
-
"onUpdate:modelValue":
|
|
2132
|
+
default: V(() => [
|
|
2133
|
+
(i(), b(he(n.value), L(e.node.props, {
|
|
2134
|
+
modelValue: u.value,
|
|
2135
|
+
displayValue: te.value,
|
|
2136
|
+
"onUpdate:modelValue": g
|
|
1794
2137
|
}), {
|
|
1795
|
-
default:
|
|
1796
|
-
e.node.children && e.node.children.length ? (
|
|
1797
|
-
key:
|
|
1798
|
-
node:
|
|
2138
|
+
default: V(() => [
|
|
2139
|
+
e.node.children && e.node.children.length ? (i(!0), d(I, { key: 0 }, z(e.node.children, (F) => (i(), b(W, {
|
|
2140
|
+
key: F.id,
|
|
2141
|
+
node: F,
|
|
1799
2142
|
formData: e.formData,
|
|
1800
|
-
onUpdate:
|
|
1801
|
-
}, null, 8, ["node", "formData"]))), 128)) :
|
|
2143
|
+
onUpdate: U
|
|
2144
|
+
}, null, 8, ["node", "formData"]))), 128)) : x("", !0)
|
|
1802
2145
|
]),
|
|
1803
2146
|
_: 1
|
|
1804
2147
|
}, 16, ["modelValue", "displayValue"])),
|
|
1805
|
-
|
|
1806
|
-
|
|
2148
|
+
_.value ? (i(), d("p", ds, m(_.value), 1)) : x("", !0),
|
|
2149
|
+
p.value ? (i(), d("p", ps, m(p.value), 1)) : x("", !0)
|
|
1807
2150
|
]),
|
|
1808
2151
|
_: 1
|
|
1809
2152
|
}, 8, ["label"]))
|
|
1810
|
-
], 64)) :
|
|
2153
|
+
], 64)) : x("", !0);
|
|
1811
2154
|
};
|
|
1812
2155
|
}
|
|
1813
|
-
}),
|
|
2156
|
+
}), fs = /* @__PURE__ */ q(ms, [["__scopeId", "data-v-5d5107df"]]), hs = { class: "inquirer-web-runtime" }, vs = {
|
|
1814
2157
|
key: 0,
|
|
1815
2158
|
class: "runtime-empty"
|
|
1816
|
-
},
|
|
2159
|
+
}, gs = /* @__PURE__ */ f({
|
|
1817
2160
|
name: "InquirerFormRuntime",
|
|
1818
2161
|
__name: "InquirerFormRuntime",
|
|
1819
2162
|
props: {
|
|
@@ -1821,279 +2164,496 @@ const It = {
|
|
|
1821
2164
|
modelValue: {}
|
|
1822
2165
|
},
|
|
1823
2166
|
emits: ["update:modelValue"],
|
|
1824
|
-
setup(e, { emit:
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
2167
|
+
setup(e, { emit: l }) {
|
|
2168
|
+
const { t } = re({
|
|
2169
|
+
messages: Ue,
|
|
2170
|
+
inheritLocale: !0
|
|
2171
|
+
}), a = e, r = l, n = H({ ...a.modelValue || {} });
|
|
2172
|
+
Z(
|
|
2173
|
+
() => a.modelValue,
|
|
2174
|
+
(p) => {
|
|
2175
|
+
n.value = { ...p || {} };
|
|
1830
2176
|
},
|
|
1831
2177
|
{ deep: !0 }
|
|
1832
|
-
),
|
|
1833
|
-
() =>
|
|
2178
|
+
), Z(
|
|
2179
|
+
() => a.schema.controls,
|
|
1834
2180
|
() => {
|
|
1835
|
-
|
|
2181
|
+
s();
|
|
1836
2182
|
},
|
|
1837
2183
|
{ deep: !0, immediate: !0 }
|
|
1838
2184
|
);
|
|
1839
|
-
function
|
|
1840
|
-
|
|
2185
|
+
function s() {
|
|
2186
|
+
u(a.schema.controls), r("update:modelValue", { ...n.value });
|
|
1841
2187
|
}
|
|
1842
|
-
function
|
|
1843
|
-
|
|
1844
|
-
|
|
2188
|
+
function u(p) {
|
|
2189
|
+
p && p.forEach((v) => {
|
|
2190
|
+
rs(n.value, v), v.children?.length && u(v.children);
|
|
1845
2191
|
});
|
|
1846
2192
|
}
|
|
1847
|
-
function
|
|
1848
|
-
|
|
2193
|
+
function _(p, v) {
|
|
2194
|
+
v === void 0 ? delete n.value[p] : n.value[p] = v, r("update:modelValue", { ...n.value });
|
|
1849
2195
|
}
|
|
1850
|
-
return (
|
|
1851
|
-
|
|
2196
|
+
return (p, v) => (i(), d("div", hs, [
|
|
2197
|
+
h(o(et), {
|
|
1852
2198
|
class: "form-content",
|
|
1853
2199
|
"label-position": "top",
|
|
1854
|
-
model:
|
|
2200
|
+
model: n.value
|
|
1855
2201
|
}, {
|
|
1856
|
-
default:
|
|
1857
|
-
!e.schema.controls || e.schema.controls.length === 0 ? (
|
|
1858
|
-
key:
|
|
1859
|
-
node:
|
|
1860
|
-
formData:
|
|
1861
|
-
onUpdate:
|
|
2202
|
+
default: V(() => [
|
|
2203
|
+
!e.schema.controls || e.schema.controls.length === 0 ? (i(), d("div", vs, m(o(t)("runtime.emptyForm")), 1)) : (i(!0), d(I, { key: 1 }, z(e.schema.controls, (g) => (i(), b(fs, {
|
|
2204
|
+
key: g.id,
|
|
2205
|
+
node: g,
|
|
2206
|
+
formData: n.value,
|
|
2207
|
+
onUpdate: _
|
|
1862
2208
|
}, null, 8, ["node", "formData"]))), 128))
|
|
1863
2209
|
]),
|
|
1864
2210
|
_: 1
|
|
1865
2211
|
}, 8, ["model"])
|
|
1866
2212
|
]));
|
|
1867
2213
|
}
|
|
1868
|
-
}),
|
|
1869
|
-
function
|
|
1870
|
-
const
|
|
1871
|
-
function
|
|
1872
|
-
|
|
1873
|
-
const
|
|
1874
|
-
|
|
2214
|
+
}), Fe = /* @__PURE__ */ q(gs, [["__scopeId", "data-v-6fa4aa68"]]);
|
|
2215
|
+
function bs(e, l = {}) {
|
|
2216
|
+
const t = [];
|
|
2217
|
+
function a(r) {
|
|
2218
|
+
r && r.forEach((n) => {
|
|
2219
|
+
const s = xs(n, l);
|
|
2220
|
+
s && t.push(s), n.children?.length && a(n.children);
|
|
1875
2221
|
});
|
|
1876
2222
|
}
|
|
1877
|
-
return
|
|
2223
|
+
return a(e.controls), t;
|
|
1878
2224
|
}
|
|
1879
|
-
function
|
|
1880
|
-
const
|
|
1881
|
-
if (!
|
|
2225
|
+
function xs(e, l) {
|
|
2226
|
+
const t = Re(e);
|
|
2227
|
+
if (!t || e.props?.disabled && !l.includeDisabled)
|
|
1882
2228
|
return null;
|
|
1883
|
-
const
|
|
1884
|
-
type:
|
|
1885
|
-
name:
|
|
1886
|
-
message:
|
|
1887
|
-
default:
|
|
1888
|
-
prefix:
|
|
1889
|
-
suffix:
|
|
1890
|
-
pageSize:
|
|
2229
|
+
const a = e.field?.trim() || e.props?.alias || e.id, r = e.props?.message?.trim() || e.props?.label || a, n = de(e), s = {
|
|
2230
|
+
type: t,
|
|
2231
|
+
name: a,
|
|
2232
|
+
message: r,
|
|
2233
|
+
default: n,
|
|
2234
|
+
prefix: O(e.props?.prefix),
|
|
2235
|
+
suffix: O(e.props?.suffix),
|
|
2236
|
+
pageSize: K(e.props?.pageSize),
|
|
1891
2237
|
loop: typeof e.props?.loop == "boolean" ? e.props.loop : void 0,
|
|
1892
|
-
whenExpression:
|
|
1893
|
-
validateExpression:
|
|
1894
|
-
filterExpression:
|
|
1895
|
-
transformerExpression:
|
|
1896
|
-
mask:
|
|
1897
|
-
choices:
|
|
2238
|
+
whenExpression: O(e.props?.whenExpression),
|
|
2239
|
+
validateExpression: _s(e),
|
|
2240
|
+
filterExpression: O(e.props?.filterExpression),
|
|
2241
|
+
transformerExpression: O(e.props?.transformerExpression),
|
|
2242
|
+
mask: ys(e.props),
|
|
2243
|
+
choices: ws(t, e.props),
|
|
1898
2244
|
metadata: {
|
|
1899
2245
|
schemaNodeId: e.id,
|
|
1900
2246
|
label: e.props?.label,
|
|
1901
2247
|
placeholder: e.props?.placeholder,
|
|
1902
2248
|
required: !!e.props?.required,
|
|
1903
|
-
inquirerType:
|
|
2249
|
+
inquirerType: t,
|
|
1904
2250
|
group: e.props?.groupLabel,
|
|
1905
2251
|
description: e.props?.description
|
|
1906
2252
|
}
|
|
1907
2253
|
};
|
|
1908
|
-
return
|
|
1909
|
-
...
|
|
2254
|
+
return t === "checkbox" && (s.metadata = {
|
|
2255
|
+
...s.metadata,
|
|
1910
2256
|
defaultChoices: Array.isArray(e.props?.defaultChoices) ? e.props.defaultChoices : void 0
|
|
1911
|
-
}),
|
|
1912
|
-
...
|
|
1913
|
-
min:
|
|
1914
|
-
max:
|
|
1915
|
-
step:
|
|
1916
|
-
}),
|
|
1917
|
-
...
|
|
1918
|
-
rows:
|
|
1919
|
-
}),
|
|
2257
|
+
}), t === "number" && (s.metadata = {
|
|
2258
|
+
...s.metadata,
|
|
2259
|
+
min: K(e.props?.min),
|
|
2260
|
+
max: K(e.props?.max),
|
|
2261
|
+
step: K(e.props?.step)
|
|
2262
|
+
}), t === "editor" && (s.metadata = {
|
|
2263
|
+
...s.metadata,
|
|
2264
|
+
rows: K(e.props?.rows)
|
|
2265
|
+
}), s;
|
|
1920
2266
|
}
|
|
1921
|
-
function
|
|
2267
|
+
function ys(e = {}) {
|
|
1922
2268
|
if (e.maskEnabled)
|
|
1923
2269
|
return typeof e.maskSymbol == "string" && e.maskSymbol.trim().length > 0 ? e.maskSymbol : !0;
|
|
1924
2270
|
}
|
|
1925
|
-
function
|
|
1926
|
-
const
|
|
1927
|
-
if (
|
|
2271
|
+
function _s(e) {
|
|
2272
|
+
const l = O(e.props?.validateExpression);
|
|
2273
|
+
if (l) return l;
|
|
1928
2274
|
if (e.props?.required)
|
|
1929
|
-
return "return input ? true : '
|
|
2275
|
+
return "return input ? true : 'Please input'";
|
|
1930
2276
|
}
|
|
1931
|
-
function
|
|
1932
|
-
if (!
|
|
2277
|
+
function ws(e, l = {}) {
|
|
2278
|
+
if (!as(e))
|
|
1933
2279
|
return;
|
|
1934
|
-
const
|
|
1935
|
-
return !Array.isArray(
|
|
1936
|
-
name:
|
|
1937
|
-
value:
|
|
1938
|
-
short:
|
|
2280
|
+
const t = l.choices;
|
|
2281
|
+
return !Array.isArray(t) || t.length === 0 ? [] : t.filter((a) => typeof a?.label == "string" && typeof a?.value == "string").map((a) => ({
|
|
2282
|
+
name: a.label,
|
|
2283
|
+
value: a.value,
|
|
2284
|
+
short: O(a.short)
|
|
1939
2285
|
}));
|
|
1940
2286
|
}
|
|
1941
|
-
function
|
|
2287
|
+
function O(e) {
|
|
1942
2288
|
if (typeof e != "string") return;
|
|
1943
|
-
const
|
|
1944
|
-
return
|
|
2289
|
+
const l = e.trim();
|
|
2290
|
+
return l.length ? l : void 0;
|
|
1945
2291
|
}
|
|
1946
|
-
function
|
|
2292
|
+
function K(e) {
|
|
1947
2293
|
if (e == null) return;
|
|
1948
|
-
const
|
|
1949
|
-
return Number.isNaN(
|
|
2294
|
+
const l = Number(e);
|
|
2295
|
+
return Number.isNaN(l) ? void 0 : l;
|
|
1950
2296
|
}
|
|
1951
|
-
const
|
|
2297
|
+
const ge = {
|
|
2298
|
+
"zh-CN": {
|
|
2299
|
+
playground: {
|
|
2300
|
+
title: "Inquirer 表单设计器",
|
|
2301
|
+
subtitle: "Element Plus 风格的 CLI 表单工作台",
|
|
2302
|
+
actions: {
|
|
2303
|
+
generateSample: "生成示例表单",
|
|
2304
|
+
clearForm: "清空表单",
|
|
2305
|
+
copySchema: "复制 Schema JSON",
|
|
2306
|
+
copyInquirer: "复制 Inquirer JSON"
|
|
2307
|
+
},
|
|
2308
|
+
tabs: {
|
|
2309
|
+
designer: {
|
|
2310
|
+
label: "可视化设计器",
|
|
2311
|
+
desc: "拖拽控件,构建 Schema"
|
|
2312
|
+
},
|
|
2313
|
+
runtime: {
|
|
2314
|
+
label: "Web端预览",
|
|
2315
|
+
desc: "运行态在线预览"
|
|
2316
|
+
},
|
|
2317
|
+
export: {
|
|
2318
|
+
label: "Inquirer示例",
|
|
2319
|
+
desc: "生成 Inquirer prompt 以及调用示例"
|
|
2320
|
+
}
|
|
2321
|
+
},
|
|
2322
|
+
runtime: {
|
|
2323
|
+
formDataTitle: "FormData(实时)"
|
|
2324
|
+
},
|
|
2325
|
+
export: {
|
|
2326
|
+
copyButton: "复制 JSON",
|
|
2327
|
+
exampleTitle: "调用示例"
|
|
2328
|
+
},
|
|
2329
|
+
messages: {
|
|
2330
|
+
copied: "已复制到剪贴板"
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
},
|
|
2334
|
+
"en-US": {
|
|
2335
|
+
playground: {
|
|
2336
|
+
title: "Inquirer Form Designer",
|
|
2337
|
+
subtitle: "Element Plus styled CLI form workbench",
|
|
2338
|
+
actions: {
|
|
2339
|
+
generateSample: "Generate Sample",
|
|
2340
|
+
clearForm: "Clear Form",
|
|
2341
|
+
copySchema: "Copy Schema JSON",
|
|
2342
|
+
copyInquirer: "Copy Inquirer JSON"
|
|
2343
|
+
},
|
|
2344
|
+
tabs: {
|
|
2345
|
+
designer: {
|
|
2346
|
+
label: "Visual Designer",
|
|
2347
|
+
desc: "Drag controls, build Schema"
|
|
2348
|
+
},
|
|
2349
|
+
runtime: {
|
|
2350
|
+
label: "Web Preview",
|
|
2351
|
+
desc: "Runtime online preview"
|
|
2352
|
+
},
|
|
2353
|
+
export: {
|
|
2354
|
+
label: "Inquirer Example",
|
|
2355
|
+
desc: "Generate Inquirer prompt and usage example"
|
|
2356
|
+
}
|
|
2357
|
+
},
|
|
2358
|
+
runtime: {
|
|
2359
|
+
formDataTitle: "FormData (Live)"
|
|
2360
|
+
},
|
|
2361
|
+
export: {
|
|
2362
|
+
copyButton: "Copy JSON",
|
|
2363
|
+
exampleTitle: "Usage Example"
|
|
2364
|
+
},
|
|
2365
|
+
messages: {
|
|
2366
|
+
copied: "Copied to clipboard"
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
}, be = {
|
|
2371
|
+
"zh-CN": {
|
|
2372
|
+
sample: {
|
|
2373
|
+
fullName: {
|
|
2374
|
+
label: "姓名",
|
|
2375
|
+
message: "请输入您的姓名",
|
|
2376
|
+
placeholder: "张三",
|
|
2377
|
+
description: "该信息将用于生成问候语"
|
|
2378
|
+
},
|
|
2379
|
+
password: {
|
|
2380
|
+
label: "账户密码",
|
|
2381
|
+
message: "请输入账户密码",
|
|
2382
|
+
description: "密码不会被保存在示例应用中"
|
|
2383
|
+
},
|
|
2384
|
+
age: {
|
|
2385
|
+
label: "年龄",
|
|
2386
|
+
message: "请输入年龄",
|
|
2387
|
+
description: "用于计算问卷分层,必填"
|
|
2388
|
+
},
|
|
2389
|
+
allowContact: {
|
|
2390
|
+
label: "是否允许联系",
|
|
2391
|
+
message: "我们可以通过邮件联系您吗?",
|
|
2392
|
+
description: "若选择是,将会收到提效工具邮件"
|
|
2393
|
+
},
|
|
2394
|
+
favoriteStack: {
|
|
2395
|
+
label: "技术栈",
|
|
2396
|
+
message: "请选择主要技术栈",
|
|
2397
|
+
description: "用于统计语言偏好"
|
|
2398
|
+
},
|
|
2399
|
+
tools: {
|
|
2400
|
+
label: "常用工具",
|
|
2401
|
+
message: "请选择常用工具",
|
|
2402
|
+
description: "可多选",
|
|
2403
|
+
choices: {
|
|
2404
|
+
git: "Git",
|
|
2405
|
+
eslint: "ESLint",
|
|
2406
|
+
vite: "Vite",
|
|
2407
|
+
vitest: "Vitest"
|
|
2408
|
+
}
|
|
2409
|
+
},
|
|
2410
|
+
bio: {
|
|
2411
|
+
label: "自我介绍",
|
|
2412
|
+
message: "请输入自我介绍",
|
|
2413
|
+
description: "可用于在 inquirer 中展示更丰富的信息"
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
},
|
|
2417
|
+
"en-US": {
|
|
2418
|
+
sample: {
|
|
2419
|
+
fullName: {
|
|
2420
|
+
label: "Full Name",
|
|
2421
|
+
message: "Please enter your full name",
|
|
2422
|
+
placeholder: "John Doe",
|
|
2423
|
+
description: "This information will be used to generate greetings"
|
|
2424
|
+
},
|
|
2425
|
+
password: {
|
|
2426
|
+
label: "Account Password",
|
|
2427
|
+
message: "Please enter your account password",
|
|
2428
|
+
description: "Password will not be saved in the sample application"
|
|
2429
|
+
},
|
|
2430
|
+
age: {
|
|
2431
|
+
label: "Age",
|
|
2432
|
+
message: "Please enter your age",
|
|
2433
|
+
description: "Used for survey stratification, required"
|
|
2434
|
+
},
|
|
2435
|
+
allowContact: {
|
|
2436
|
+
label: "Allow Contact",
|
|
2437
|
+
message: "May we contact you via email?",
|
|
2438
|
+
description: "If yes, you will receive productivity tool emails"
|
|
2439
|
+
},
|
|
2440
|
+
favoriteStack: {
|
|
2441
|
+
label: "Tech Stack",
|
|
2442
|
+
message: "Please select your primary tech stack",
|
|
2443
|
+
description: "Used for language preference statistics"
|
|
2444
|
+
},
|
|
2445
|
+
tools: {
|
|
2446
|
+
label: "Common Tools",
|
|
2447
|
+
message: "Please select your common tools",
|
|
2448
|
+
description: "Multiple selections allowed",
|
|
2449
|
+
choices: {
|
|
2450
|
+
git: "Git",
|
|
2451
|
+
eslint: "ESLint",
|
|
2452
|
+
vite: "Vite",
|
|
2453
|
+
vitest: "Vitest"
|
|
2454
|
+
}
|
|
2455
|
+
},
|
|
2456
|
+
bio: {
|
|
2457
|
+
label: "Bio",
|
|
2458
|
+
message: "Please enter your bio",
|
|
2459
|
+
description: "Can be used to display richer information in inquirer"
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
}, Vs = { class: "inquirer-demo" }, qs = { class: "callout-panel" }, Cs = { class: "callout-header" }, Es = { class: "callout-title" }, Ss = { class: "callout-actions" }, ks = { class: "demo-workspace" }, $s = { class: "workspace-tabs" }, Us = ["onClick"], Is = { class: "workspace-panel designer-panel" }, Ns = { class: "workspace-panel runtime-panel" }, zs = { class: "runtime-json" }, Bs = { class: "workspace-panel export-panel" }, Ms = { class: "panel-header" }, Ts = { class: "json-viewer" }, Ds = { class: "code-snippet" }, As = /* @__PURE__ */ f({
|
|
1952
2464
|
__name: "InquirerFormPlayground",
|
|
1953
2465
|
setup(e) {
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
2466
|
+
const l = {
|
|
2467
|
+
"zh-CN": {
|
|
2468
|
+
...ge["zh-CN"],
|
|
2469
|
+
...be["zh-CN"]
|
|
2470
|
+
},
|
|
2471
|
+
"en-US": {
|
|
2472
|
+
...ge["en-US"],
|
|
2473
|
+
...be["en-US"]
|
|
2474
|
+
}
|
|
2475
|
+
}, { t } = re({
|
|
2476
|
+
messages: l,
|
|
2477
|
+
inheritLocale: !0
|
|
2478
|
+
}), a = new Ve();
|
|
2479
|
+
a.updateInfo({
|
|
2480
|
+
title: "Inquirer Form Definition",
|
|
2481
|
+
description: ""
|
|
1958
2482
|
});
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
}),
|
|
1963
|
-
|
|
2483
|
+
const r = [...j.getAll()];
|
|
2484
|
+
Ae(), Qe(() => {
|
|
2485
|
+
a.getSchema().controls.length || k();
|
|
2486
|
+
}), ye(() => {
|
|
2487
|
+
j.replaceAll(r);
|
|
2488
|
+
});
|
|
2489
|
+
const n = H({}), s = H(0), u = H(0), _ = y(() => [
|
|
2490
|
+
{
|
|
2491
|
+
key: "designer",
|
|
2492
|
+
label: t("playground.tabs.designer.label"),
|
|
2493
|
+
desc: t("playground.tabs.designer.desc")
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
key: "runtime",
|
|
2497
|
+
label: t("playground.tabs.runtime.label"),
|
|
2498
|
+
desc: t("playground.tabs.runtime.desc")
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
key: "export",
|
|
2502
|
+
label: t("playground.tabs.export.label"),
|
|
2503
|
+
desc: t("playground.tabs.export.desc")
|
|
2504
|
+
}
|
|
2505
|
+
]), p = H(_.value[0]?.key ?? "designer");
|
|
2506
|
+
Z(p, (N, E) => {
|
|
2507
|
+
N === "runtime" && E !== "runtime" && v();
|
|
1964
2508
|
});
|
|
1965
|
-
const s = L({}), a = L(0), i = L(0), n = [
|
|
1966
|
-
{ key: "designer", label: "可视化设计器", desc: "拖拽字段,构建 Schema" },
|
|
1967
|
-
{ key: "runtime", label: "运行态预览", desc: "实时数据与交互" },
|
|
1968
|
-
{ key: "export", label: "Inquirer 输出", desc: "生成 QuestionCollection + 调用" },
|
|
1969
|
-
{ key: "docs", label: "说明", desc: "当前已注册控件" }
|
|
1970
|
-
], r = L(n[0]?.key ?? "designer"), g = V(() => Ft(t.getSchema())), m = V(() => JSON.stringify(g.value, null, 2)), p = V(() => JSON.stringify(s.value, null, 2));
|
|
1971
2509
|
function v() {
|
|
1972
|
-
a.
|
|
2510
|
+
const N = {}, E = a.getSchema().controls;
|
|
2511
|
+
function S(me) {
|
|
2512
|
+
me.forEach((Y) => {
|
|
2513
|
+
if (Y.field) {
|
|
2514
|
+
const fe = de(Y);
|
|
2515
|
+
fe !== void 0 && (N[Y.field] = fe);
|
|
2516
|
+
}
|
|
2517
|
+
Y.children?.length && S(Y.children);
|
|
2518
|
+
});
|
|
2519
|
+
}
|
|
2520
|
+
E?.length && S(E), n.value = N;
|
|
2521
|
+
}
|
|
2522
|
+
const g = y(() => bs(a.getSchema())), w = y(() => JSON.stringify(g.value, null, 2)), te = y(() => JSON.stringify(n.value, null, 2));
|
|
2523
|
+
function G() {
|
|
2524
|
+
s.value++, u.value++;
|
|
1973
2525
|
}
|
|
1974
|
-
function
|
|
1975
|
-
const
|
|
1976
|
-
|
|
2526
|
+
function U(N) {
|
|
2527
|
+
const E = a.getSchema().controls;
|
|
2528
|
+
E.splice(0, E.length, ...N), a.selectNode(void 0), a.snapshot("update"), G();
|
|
1977
2529
|
}
|
|
1978
|
-
function
|
|
1979
|
-
|
|
2530
|
+
function k() {
|
|
2531
|
+
U(Le(t));
|
|
1980
2532
|
}
|
|
1981
|
-
function
|
|
1982
|
-
|
|
2533
|
+
function R() {
|
|
2534
|
+
U([]), n.value = {};
|
|
1983
2535
|
}
|
|
1984
|
-
async function
|
|
2536
|
+
async function W(N, E) {
|
|
1985
2537
|
try {
|
|
1986
|
-
await navigator.clipboard.writeText(
|
|
1987
|
-
} catch (
|
|
1988
|
-
console.warn("clipboard failed",
|
|
2538
|
+
await navigator.clipboard.writeText(N), alert(`${E} ${t("playground.messages.copied")}`);
|
|
2539
|
+
} catch (S) {
|
|
2540
|
+
console.warn("clipboard failed", S);
|
|
1989
2541
|
}
|
|
1990
2542
|
}
|
|
1991
|
-
function
|
|
1992
|
-
|
|
2543
|
+
function F() {
|
|
2544
|
+
W(We(a.getSchema()), "Schema JSON");
|
|
1993
2545
|
}
|
|
1994
|
-
function
|
|
1995
|
-
|
|
2546
|
+
function pe() {
|
|
2547
|
+
W(w.value, "Inquirer JSON");
|
|
1996
2548
|
}
|
|
1997
|
-
const
|
|
2549
|
+
const Pe = y(() => `import inquirer from 'inquirer'
|
|
1998
2550
|
import { schemaToInquirer } from 'inquirer-form'
|
|
1999
2551
|
|
|
2000
2552
|
const questions = schemaToInquirer(schema)
|
|
2001
2553
|
const answers = await inquirer.prompt(questions)
|
|
2002
2554
|
console.log(answers)`);
|
|
2003
|
-
return (
|
|
2004
|
-
c("section",
|
|
2005
|
-
c("div",
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
c("
|
|
2555
|
+
return (N, E) => (i(), d("div", Vs, [
|
|
2556
|
+
c("section", qs, [
|
|
2557
|
+
c("div", Cs, [
|
|
2558
|
+
c("div", Es, [
|
|
2559
|
+
h(o(Ce), { class: "title-icon" }, {
|
|
2560
|
+
default: V(() => [
|
|
2561
|
+
h(o(qt))
|
|
2562
|
+
]),
|
|
2563
|
+
_: 1
|
|
2564
|
+
}),
|
|
2565
|
+
c("div", null, [
|
|
2566
|
+
c("h1", null, m(o(t)("playground.title")), 1),
|
|
2567
|
+
c("p", null, m(o(t)("playground.subtitle")), 1)
|
|
2568
|
+
])
|
|
2569
|
+
]),
|
|
2570
|
+
c("div", Ss, [
|
|
2571
|
+
c("button", {
|
|
2572
|
+
type: "button",
|
|
2573
|
+
onClick: k
|
|
2574
|
+
}, m(o(t)("playground.actions.generateSample")), 1),
|
|
2575
|
+
c("button", {
|
|
2576
|
+
type: "button",
|
|
2577
|
+
onClick: R
|
|
2578
|
+
}, m(o(t)("playground.actions.clearForm")), 1),
|
|
2579
|
+
c("button", {
|
|
2580
|
+
type: "button",
|
|
2581
|
+
onClick: F
|
|
2582
|
+
}, m(o(t)("playground.actions.copySchema")), 1),
|
|
2583
|
+
c("button", {
|
|
2584
|
+
type: "button",
|
|
2585
|
+
onClick: pe
|
|
2586
|
+
}, m(o(t)("playground.actions.copyInquirer")), 1)
|
|
2014
2587
|
])
|
|
2015
2588
|
])
|
|
2016
2589
|
]),
|
|
2017
|
-
c("main",
|
|
2018
|
-
c("div",
|
|
2019
|
-
(
|
|
2020
|
-
key:
|
|
2021
|
-
class:
|
|
2022
|
-
onClick: (
|
|
2590
|
+
c("main", ks, [
|
|
2591
|
+
c("div", $s, [
|
|
2592
|
+
(i(!0), d(I, null, z(_.value, (S) => (i(), d("button", {
|
|
2593
|
+
key: S.key,
|
|
2594
|
+
class: je(["tab-item", { active: S.key === p.value }]),
|
|
2595
|
+
onClick: (me) => p.value = S.key
|
|
2023
2596
|
}, [
|
|
2024
|
-
c("span", null,
|
|
2025
|
-
c("small", null,
|
|
2026
|
-
], 10,
|
|
2597
|
+
c("span", null, m(S.label), 1),
|
|
2598
|
+
c("small", null, m(S.desc), 1)
|
|
2599
|
+
], 10, Us))), 128))
|
|
2027
2600
|
]),
|
|
2028
|
-
|
|
2029
|
-
(
|
|
2030
|
-
|
|
2031
|
-
|
|
2601
|
+
oe(c("section", Is, [
|
|
2602
|
+
(i(), b(o(qe), {
|
|
2603
|
+
showControlTabs: !1,
|
|
2604
|
+
key: s.value,
|
|
2605
|
+
engine: o(a)
|
|
2032
2606
|
}, null, 8, ["engine"]))
|
|
2033
2607
|
], 512), [
|
|
2034
|
-
[
|
|
2608
|
+
[ne, p.value === "designer"]
|
|
2035
2609
|
]),
|
|
2036
|
-
|
|
2037
|
-
(
|
|
2038
|
-
key:
|
|
2039
|
-
schema: o(
|
|
2040
|
-
modelValue:
|
|
2041
|
-
"onUpdate:modelValue":
|
|
2610
|
+
oe(c("section", Ns, [
|
|
2611
|
+
(i(), b(Fe, {
|
|
2612
|
+
key: u.value,
|
|
2613
|
+
schema: o(a).getSchema(),
|
|
2614
|
+
modelValue: n.value,
|
|
2615
|
+
"onUpdate:modelValue": E[0] || (E[0] = (S) => n.value = S)
|
|
2042
2616
|
}, null, 8, ["schema", "modelValue"])),
|
|
2043
|
-
c("div",
|
|
2044
|
-
|
|
2045
|
-
c("pre", null,
|
|
2617
|
+
c("div", zs, [
|
|
2618
|
+
c("header", null, m(o(t)("playground.runtime.formDataTitle")), 1),
|
|
2619
|
+
c("pre", null, m(te.value), 1)
|
|
2046
2620
|
])
|
|
2047
2621
|
], 512), [
|
|
2048
|
-
[
|
|
2622
|
+
[ne, p.value === "runtime"]
|
|
2049
2623
|
]),
|
|
2050
|
-
|
|
2051
|
-
c("div",
|
|
2052
|
-
|
|
2624
|
+
oe(c("section", Bs, [
|
|
2625
|
+
c("div", Ms, [
|
|
2626
|
+
E[1] || (E[1] = c("div", null, null, -1)),
|
|
2053
2627
|
c("button", {
|
|
2054
2628
|
class: "btn-copy",
|
|
2055
|
-
onClick:
|
|
2056
|
-
}, "
|
|
2629
|
+
onClick: pe
|
|
2630
|
+
}, m(o(t)("playground.export.copyButton")), 1)
|
|
2057
2631
|
]),
|
|
2058
|
-
c("pre",
|
|
2059
|
-
c("div",
|
|
2060
|
-
|
|
2632
|
+
c("pre", Ts, m(w.value), 1),
|
|
2633
|
+
c("div", Ds, [
|
|
2634
|
+
c("header", null, m(o(t)("playground.export.exampleTitle")), 1),
|
|
2061
2635
|
c("pre", null, [
|
|
2062
|
-
c("code", null,
|
|
2063
|
-
])
|
|
2064
|
-
])
|
|
2065
|
-
], 512), [
|
|
2066
|
-
[X, r.value === "export"]
|
|
2067
|
-
]),
|
|
2068
|
-
W(c("section", en, [
|
|
2069
|
-
c("div", ln, [
|
|
2070
|
-
c("ul", null, [
|
|
2071
|
-
(u(!0), d(S, null, I(o(Ee), (E) => (u(), d("li", {
|
|
2072
|
-
key: E.type
|
|
2073
|
-
}, [
|
|
2074
|
-
c("span", tn, f(E.label), 1),
|
|
2075
|
-
c("span", nn, f(E.type), 1)
|
|
2076
|
-
]))), 128))
|
|
2636
|
+
c("code", null, m(Pe.value), 1)
|
|
2077
2637
|
])
|
|
2078
2638
|
])
|
|
2079
2639
|
], 512), [
|
|
2080
|
-
[
|
|
2640
|
+
[ne, p.value === "export"]
|
|
2081
2641
|
])
|
|
2082
2642
|
])
|
|
2083
2643
|
]));
|
|
2084
2644
|
}
|
|
2085
|
-
}),
|
|
2645
|
+
}), Os = /* @__PURE__ */ q(As, [["__scopeId", "data-v-5dae1a4e"]]), Hs = {
|
|
2086
2646
|
install(e) {
|
|
2087
|
-
e.component("InquirerFormDesigner",
|
|
2647
|
+
e.component("InquirerFormDesigner", ts), e.component("InquirerFormRuntime", Fe);
|
|
2088
2648
|
}
|
|
2089
2649
|
};
|
|
2090
2650
|
export {
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2651
|
+
ts as InquirerFormDesigner,
|
|
2652
|
+
Os as InquirerFormPlayground,
|
|
2653
|
+
Fe as InquirerFormRuntime,
|
|
2654
|
+
Le as createInquirerSampleControls,
|
|
2655
|
+
Hs as default,
|
|
2656
|
+
es as inquirerControls,
|
|
2657
|
+
Ae as registerInquirerControls,
|
|
2658
|
+
bs as schemaToInquirer
|
|
2099
2659
|
};
|