@shwfed/config 2.7.8 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.mjs +97 -34
- package/dist/module.json +1 -1
- package/dist/preview/assets/{badge-KAEXz3VO.js → badge-Ddz0ExD-.js} +1 -1
- package/dist/preview/assets/{config-DbirfZyy.js → config---5_lEKG.js} +1 -1
- package/dist/preview/assets/{config-ZczGik30.js → config-5qIYVWZh.js} +1 -1
- package/dist/preview/assets/config-B8zbFg3y.js +1 -0
- package/dist/preview/assets/{config-DbfJWa8K.js → config-Bn619USg.js} +1 -1
- package/dist/preview/assets/{config-C-QRPeN1.js → config-CUeBTyLb.js} +1 -1
- package/dist/preview/assets/config-DN_3WauN.js +1 -0
- package/dist/preview/assets/config-U-3fWb-2.js +1 -0
- package/dist/preview/assets/config-q5VV9rp7.js +1 -0
- package/dist/preview/assets/config-vePqHFvZ.js +1 -0
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-CQ6MUPKO.js → definition.vue_vue_type_script_setup_true_lang-fQa65UMX.js} +1 -1
- package/dist/preview/assets/index-BKaqQGb-.js +688 -0
- package/dist/preview/assets/index-Bj8xIK5h.js +1 -0
- package/dist/preview/assets/index-BlHAyQdm.css +1 -0
- package/dist/preview/assets/{index-Bv_aA34a.js → index-CzWhSvDG.js} +1 -1
- package/dist/preview/assets/{item-SC0WQMVu.js → item-DHarupON.js} +1 -1
- package/dist/preview/assets/{runtime-DcStOiOi.js → runtime-560tuaHv.js} +1 -1
- package/dist/preview/assets/{runtime-Ckuz5Kxm.js → runtime-C2rQ3L3-.js} +1 -1
- package/dist/preview/assets/{runtime-BPOf7Yqz.js → runtime-CKghL8I_.js} +1 -1
- package/dist/preview/assets/runtime-CMsaNery.js +1 -0
- package/dist/preview/assets/runtime-CMuCGJZm.js +1 -0
- package/dist/preview/assets/{runtime-DO0anKbw.js → runtime-DOM_La4X.js} +1 -1
- package/dist/preview/assets/{runtime-EVgYW6_7.js → runtime-DQHb9t0r.js} +1 -1
- package/dist/preview/assets/{runtime-CnKlH0mi.js → runtime-Dgl3wVfD.js} +1 -1
- package/dist/preview/assets/{runtime-i32sR7d3.js → runtime-aLgWVLET.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue +28 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +17 -17
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +4 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue +25 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +2 -7
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +4 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.js +8 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/config.vue +2 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.d.ts +5 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.js +8 -3
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/runtime.vue +12 -1
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +8 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.js +3 -3
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue +15 -25
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/runtime.vue +11 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +4 -4
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +13 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +10 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +16 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +13 -5
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +25 -5
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +4 -1
- package/dist/runtime/components/form/index.vue +15 -3
- package/dist/runtime/components/form/schema.d.ts +4 -0
- package/dist/runtime/components/form/schema.js +1 -0
- package/dist/runtime/components/form/unit-config.vue +6 -1
- package/dist/runtime/components/form/utils/form-vars.js +4 -0
- package/dist/runtime/components/form/utils/resolve.d.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +13 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +4 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +10 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +4 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +16 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +3 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +13 -5
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.js +3 -1
- package/dist/runtime/components/table/config.vue +35 -1
- package/dist/runtime/components/table/index.d.vue.ts +2 -0
- package/dist/runtime/components/table/index.vue +8 -0
- package/dist/runtime/components/table/index.vue.d.ts +2 -0
- package/dist/runtime/components/table/row-provider.vue +8 -0
- package/dist/runtime/components/table/schema.d.ts +4 -0
- package/dist/runtime/components/table/schema.js +4 -0
- package/dist/runtime/components/table/utils/resolve.d.ts +7 -0
- package/dist/runtime/components/table/utils/shared.js +4 -0
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.d.vue.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue +9 -1
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue.d.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +2 -2
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +33 -4
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +2 -2
- package/dist/runtime/components/ui/expression-editor/picker-entries.d.ts +3 -2
- package/dist/runtime/components/ui/expression-editor/picker-entries.js +14 -3
- package/dist/runtime/components/ui/expression-editor/selection-chip-extension.d.ts +4 -0
- package/dist/runtime/components/ui/expression-editor/selection-chip-extension.js +119 -0
- package/dist/runtime/components/ui/expression-editor/selection-refs.d.ts +8 -0
- package/dist/runtime/components/ui/expression-editor/selection-refs.js +29 -0
- package/dist/runtime/share/event-bus.d.ts +12 -12
- package/dist/runtime/share/use-persisted-query.d.ts +21 -0
- package/dist/runtime/share/use-persisted-query.js +33 -0
- package/dist/runtime/utils/cel-context.d.ts +22 -0
- package/dist/runtime/utils/cel-context.js +8 -0
- package/dist/runtime/utils/selections-registry.d.ts +77 -0
- package/dist/runtime/utils/selections-registry.js +49 -0
- package/package.json +1 -1
- package/dist/preview/assets/config-BXx5syNf.js +0 -1
- package/dist/preview/assets/config-Bb9Yeh33.js +0 -1
- package/dist/preview/assets/config-CkKx7sVR.js +0 -1
- package/dist/preview/assets/config-CtbYlZCL.js +0 -1
- package/dist/preview/assets/config-DPlbFBRi.js +0 -1
- package/dist/preview/assets/index-C9P-6gZd.css +0 -1
- package/dist/preview/assets/index-CJFU9znN.js +0 -1
- package/dist/preview/assets/index-DUOkekYu.js +0 -680
- package/dist/preview/assets/runtime-CC2caFS9.js +0 -1
- package/dist/preview/assets/runtime-CLaRFZzt.js +0 -1
- package/dist/runtime/share/form-validate.d.ts +0 -18
- package/dist/runtime/share/form-validate.js +0 -8
package/dist/mcp.mjs
CHANGED
|
@@ -81637,6 +81637,14 @@ function schema$1h(configure) {
|
|
|
81637
81637
|
用户确认后将立即被求值,当 HTTP 请求被成功构造后,调度器将尽可能快地安排执行这个请求
|
|
81638
81638
|
`
|
|
81639
81639
|
}),
|
|
81640
|
+
before: optional(Triggers.annotations({
|
|
81641
|
+
title: "确认前",
|
|
81642
|
+
description: md`
|
|
81643
|
+
确认弹窗弹出前按列表顺序执行的操作。任一操作中止(例如表单校验未通过)将取消确认弹窗与请求。
|
|
81644
|
+
|
|
81645
|
+
放在表单里的提交按钮应在此处首先触发所在表单的「校验」操作,使校验成为显式的提交前步骤。
|
|
81646
|
+
`
|
|
81647
|
+
})),
|
|
81640
81648
|
markdown: Locale.annotations({
|
|
81641
81649
|
title: "确认信息",
|
|
81642
81650
|
description: "弹窗确认信息,支持 `{{ expression }}` 插值"
|
|
@@ -81719,6 +81727,14 @@ function schema$1g(configure) {
|
|
|
81719
81727
|
点击后将立即被求值,当 HTTP 请求被成功构造后,调度器将尽可能快地安排执行这个请求
|
|
81720
81728
|
`
|
|
81721
81729
|
}),
|
|
81730
|
+
before: optional(Triggers.annotations({
|
|
81731
|
+
title: "请求前",
|
|
81732
|
+
description: md`
|
|
81733
|
+
请求发起前按列表顺序执行的操作。任一操作中止(例如表单校验未通过)将取消本次请求。
|
|
81734
|
+
|
|
81735
|
+
放在表单里的提交按钮应在此处首先触发所在表单的「校验」操作,使校验成为显式的提交前步骤。
|
|
81736
|
+
`
|
|
81737
|
+
})),
|
|
81722
81738
|
messageExpression: optional(CelMessage.annotations({
|
|
81723
81739
|
title: "消息",
|
|
81724
81740
|
description: md`
|
|
@@ -82035,7 +82051,7 @@ const metadata$1b = {
|
|
|
82035
82051
|
name: "下载文件",
|
|
82036
82052
|
icon: "fluent:arrow-download-20-regular"
|
|
82037
82053
|
};
|
|
82038
|
-
const JSON_VAR$
|
|
82054
|
+
const JSON_VAR$5 = {
|
|
82039
82055
|
type: "dyn",
|
|
82040
82056
|
label: "HTTP 响应体",
|
|
82041
82057
|
description: "第一步 `请求` 的响应体(已解析 JSON);用于构造第二步下载请求"
|
|
@@ -82043,7 +82059,7 @@ const JSON_VAR$4 = {
|
|
|
82043
82059
|
function configureWithJson$4(configure) {
|
|
82044
82060
|
return (env) => {
|
|
82045
82061
|
configure(env);
|
|
82046
|
-
env.registerVariable("json", JSON_VAR$
|
|
82062
|
+
env.registerVariable("json", JSON_VAR$5.type, { description: JSON_VAR$5.description });
|
|
82047
82063
|
};
|
|
82048
82064
|
}
|
|
82049
82065
|
function schema$1b(configure) {
|
|
@@ -82114,7 +82130,7 @@ function schema$1b(configure) {
|
|
|
82114
82130
|
}
|
|
82115
82131
|
const __vite_glob_0_6$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82116
82132
|
__proto__: null,
|
|
82117
|
-
JSON_VAR: JSON_VAR$
|
|
82133
|
+
JSON_VAR: JSON_VAR$5,
|
|
82118
82134
|
compatibilityDate: compatibilityDate$1b,
|
|
82119
82135
|
metadata: metadata$1b,
|
|
82120
82136
|
schema: schema$1b,
|
|
@@ -82692,9 +82708,9 @@ function schema$17(configure) {
|
|
|
82692
82708
|
type: Literal2(type$17),
|
|
82693
82709
|
compatibilityDate: Literal2(compatibilityDate$17),
|
|
82694
82710
|
...commonFieldFields(configure),
|
|
82695
|
-
content:
|
|
82711
|
+
content: LocaleMarkdown({ configure }).annotations({
|
|
82696
82712
|
title: "内容",
|
|
82697
|
-
description: "渲染为 Markdown
|
|
82713
|
+
description: "渲染为 Markdown 的多语言文本,支持 `{{ 表达式 }}` 插值"
|
|
82698
82714
|
})
|
|
82699
82715
|
}).annotations({
|
|
82700
82716
|
title: "MarkdownField",
|
|
@@ -82787,10 +82803,6 @@ function schema$15(configure) {
|
|
|
82787
82803
|
description: "鼠标悬停在标签上时展示的说明"
|
|
82788
82804
|
})),
|
|
82789
82805
|
orientation: optional(FieldOrientationSchema),
|
|
82790
|
-
rows: optional(Number$.pipe(int(), positive()).annotations({
|
|
82791
|
-
title: "行数",
|
|
82792
|
-
description: "输入框的初始可见行数;留空使用默认高度"
|
|
82793
|
-
})),
|
|
82794
82806
|
binding: optional(String$.pipe(minLength(1)).annotations({
|
|
82795
82807
|
title: "绑定路径",
|
|
82796
82808
|
description: "写入表单状态的 `dot-prop` 路径,例如 `user.bio`;留空则为非受控字段,不写入表单状态"
|
|
@@ -82803,6 +82815,10 @@ function schema$15(configure) {
|
|
|
82803
82815
|
title: "只读条件",
|
|
82804
82816
|
description: "返回 `true` 时仅以纯文本展示当前值"
|
|
82805
82817
|
})),
|
|
82818
|
+
maxLength: optional(Number$.pipe(int(), positive()).annotations({
|
|
82819
|
+
title: "字数限制",
|
|
82820
|
+
description: "允许输入的最大字符数;达到上限后无法继续输入,并在右下角展示字数计数"
|
|
82821
|
+
})),
|
|
82806
82822
|
derived: derivedField(configure, "string")
|
|
82807
82823
|
}).annotations({
|
|
82808
82824
|
title: "TextareaField",
|
|
@@ -89143,7 +89159,7 @@ const metadata$U = {
|
|
|
89143
89159
|
w: { initial: 8, min: 8, max: Infinity },
|
|
89144
89160
|
h: { initial: 6, min: 6, max: Infinity, grow: true }
|
|
89145
89161
|
};
|
|
89146
|
-
const JSON_VAR$
|
|
89162
|
+
const JSON_VAR$4 = {
|
|
89147
89163
|
type: "dyn",
|
|
89148
89164
|
label: "HTTP 响应体",
|
|
89149
89165
|
description: "第一步 `请求` 的响应体(已解析 JSON);用于构造第二步下载请求"
|
|
@@ -89151,7 +89167,7 @@ const JSON_VAR$3 = {
|
|
|
89151
89167
|
function configureWithJson$3(configure) {
|
|
89152
89168
|
return (env) => {
|
|
89153
89169
|
configure(env);
|
|
89154
|
-
env.registerVariable("json", JSON_VAR$
|
|
89170
|
+
env.registerVariable("json", JSON_VAR$4.type, { description: JSON_VAR$4.description });
|
|
89155
89171
|
};
|
|
89156
89172
|
}
|
|
89157
89173
|
function schema$U(configure) {
|
|
@@ -89240,7 +89256,7 @@ function schema$U(configure) {
|
|
|
89240
89256
|
}
|
|
89241
89257
|
const __vite_glob_0_15$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
89242
89258
|
__proto__: null,
|
|
89243
|
-
JSON_VAR: JSON_VAR$
|
|
89259
|
+
JSON_VAR: JSON_VAR$4,
|
|
89244
89260
|
compatibilityDate: compatibilityDate$U,
|
|
89245
89261
|
metadata: metadata$U,
|
|
89246
89262
|
schema: schema$U,
|
|
@@ -89259,7 +89275,7 @@ const OPTION_VAR$2 = {
|
|
|
89259
89275
|
label: "当前选项",
|
|
89260
89276
|
description: "`选项` 表达式产出的数组中迭代到的单个元素"
|
|
89261
89277
|
};
|
|
89262
|
-
const JSON_VAR$
|
|
89278
|
+
const JSON_VAR$3 = {
|
|
89263
89279
|
type: "dyn",
|
|
89264
89280
|
label: "HTTP 响应体",
|
|
89265
89281
|
description: "HTTP 响应体(已解析 JSON);请求失败或尚未完成时为 `null`"
|
|
@@ -89273,7 +89289,7 @@ function configureWithOption$3(configure) {
|
|
|
89273
89289
|
function configureWithJson$2(configure) {
|
|
89274
89290
|
return (env) => {
|
|
89275
89291
|
configure(env);
|
|
89276
|
-
env.registerVariable("json", JSON_VAR$
|
|
89292
|
+
env.registerVariable("json", JSON_VAR$3.type, { description: JSON_VAR$3.description });
|
|
89277
89293
|
};
|
|
89278
89294
|
}
|
|
89279
89295
|
const isListType$c = (actual) => actual === "dyn" || actual.startsWith("list");
|
|
@@ -89336,7 +89352,7 @@ function schema$T(configure) {
|
|
|
89336
89352
|
}
|
|
89337
89353
|
const __vite_glob_0_16$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
89338
89354
|
__proto__: null,
|
|
89339
|
-
JSON_VAR: JSON_VAR$
|
|
89355
|
+
JSON_VAR: JSON_VAR$3,
|
|
89340
89356
|
OPTION_VAR: OPTION_VAR$2,
|
|
89341
89357
|
compatibilityDate: compatibilityDate$T,
|
|
89342
89358
|
metadata: metadata$T,
|
|
@@ -90988,6 +91004,7 @@ const Icon = vueExports.defineComponent((props, { emit }) => {
|
|
|
90988
91004
|
],
|
|
90989
91005
|
emits: ["load"]
|
|
90990
91006
|
});
|
|
91007
|
+
const SELECTIONS_VAR = "selections";
|
|
90991
91008
|
const Align = Literal2("left", "center", "right").annotations({
|
|
90992
91009
|
description: "对齐方式"
|
|
90993
91010
|
});
|
|
@@ -91080,6 +91097,9 @@ function registerRowVariablesIfAbsent(env) {
|
|
|
91080
91097
|
if (!declared.has("index")) {
|
|
91081
91098
|
env.registerVariable("index", "number", { label: "行序号", description: "行索引" });
|
|
91082
91099
|
}
|
|
91100
|
+
if (!declared.has(SELECTIONS_VAR)) {
|
|
91101
|
+
env.registerVariable(SELECTIONS_VAR, "dyn", { label: "选中项", description: "本行各选择列当前选中项的完整对象(按列标识)" });
|
|
91102
|
+
}
|
|
91083
91103
|
}
|
|
91084
91104
|
function configureWithRow(configure) {
|
|
91085
91105
|
return (env) => {
|
|
@@ -92337,7 +92357,7 @@ const OPTION_VAR$1 = {
|
|
|
92337
92357
|
label: "当前选项",
|
|
92338
92358
|
description: "`选项` 表达式产出的数组中迭代到的单个元素"
|
|
92339
92359
|
};
|
|
92340
|
-
const JSON_VAR$
|
|
92360
|
+
const JSON_VAR$2 = {
|
|
92341
92361
|
type: "dyn",
|
|
92342
92362
|
label: "HTTP 响应体",
|
|
92343
92363
|
description: "HTTP 响应体(已解析 JSON);请求失败或尚未完成时为 `null`"
|
|
@@ -92356,7 +92376,7 @@ function schema$A(configure) {
|
|
|
92356
92376
|
configure: (env) => {
|
|
92357
92377
|
configure(env);
|
|
92358
92378
|
registerRowVariablesIfAbsent(env);
|
|
92359
|
-
env.registerVariable("json", JSON_VAR$
|
|
92379
|
+
env.registerVariable("json", JSON_VAR$2.type, { description: JSON_VAR$2.description });
|
|
92360
92380
|
},
|
|
92361
92381
|
resultType: isListType$b
|
|
92362
92382
|
});
|
|
@@ -92465,7 +92485,7 @@ function toColumnDef$e(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
92465
92485
|
}
|
|
92466
92486
|
const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
92467
92487
|
__proto__: null,
|
|
92468
|
-
JSON_VAR: JSON_VAR$
|
|
92488
|
+
JSON_VAR: JSON_VAR$2,
|
|
92469
92489
|
OPTION_VAR: OPTION_VAR$1,
|
|
92470
92490
|
compatibilityDate: compatibilityDate$A,
|
|
92471
92491
|
metadata: metadata$A,
|
|
@@ -92607,7 +92627,7 @@ const OPTION_VAR = {
|
|
|
92607
92627
|
label: "当前选项",
|
|
92608
92628
|
description: "`选项` 表达式产出的数组中迭代到的单个元素"
|
|
92609
92629
|
};
|
|
92610
|
-
const JSON_VAR = {
|
|
92630
|
+
const JSON_VAR$1 = {
|
|
92611
92631
|
type: "dyn",
|
|
92612
92632
|
label: "HTTP 响应体",
|
|
92613
92633
|
description: "HTTP 响应体(已解析 JSON);请求失败或尚未完成时为 `null`"
|
|
@@ -92626,7 +92646,7 @@ function schema$y(configure) {
|
|
|
92626
92646
|
configure: (env) => {
|
|
92627
92647
|
configure(env);
|
|
92628
92648
|
registerRowVariablesIfAbsent(env);
|
|
92629
|
-
env.registerVariable("json", JSON_VAR.type, { description: JSON_VAR.description });
|
|
92649
|
+
env.registerVariable("json", JSON_VAR$1.type, { description: JSON_VAR$1.description });
|
|
92630
92650
|
},
|
|
92631
92651
|
resultType: isListType$a
|
|
92632
92652
|
});
|
|
@@ -92735,7 +92755,7 @@ function toColumnDef$c(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
92735
92755
|
}
|
|
92736
92756
|
const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
92737
92757
|
__proto__: null,
|
|
92738
|
-
JSON_VAR,
|
|
92758
|
+
JSON_VAR: JSON_VAR$1,
|
|
92739
92759
|
OPTION_VAR,
|
|
92740
92760
|
compatibilityDate: compatibilityDate$y,
|
|
92741
92761
|
metadata: metadata$y,
|
|
@@ -94059,7 +94079,10 @@ const type$p = "com.shwfed.table.column.combobox-multi";
|
|
|
94059
94079
|
const compatibilityDate$p = "2026-05-28";
|
|
94060
94080
|
const metadata$p = {
|
|
94061
94081
|
name: "多选",
|
|
94062
|
-
icon: "fluent:chevron-down-20-regular"
|
|
94082
|
+
icon: "fluent:chevron-down-20-regular",
|
|
94083
|
+
// Publishes its resolved options (array) to the per-row `selections` registry
|
|
94084
|
+
// (runtime.vue), readable via `selections["<id>"]`.
|
|
94085
|
+
selection: true
|
|
94063
94086
|
};
|
|
94064
94087
|
const isListType$5 = (actual) => actual === "dyn" || actual.startsWith("list");
|
|
94065
94088
|
const isKeywordsType$1 = (actual) => actual === "dyn" || actual.startsWith("list") || actual.startsWith("optional");
|
|
@@ -94345,7 +94368,10 @@ const type$o = "com.shwfed.table.column.combobox-single";
|
|
|
94345
94368
|
const compatibilityDate$o = "2026-05-28";
|
|
94346
94369
|
const metadata$o = {
|
|
94347
94370
|
name: "单选",
|
|
94348
|
-
icon: "fluent:chevron-down-20-regular"
|
|
94371
|
+
icon: "fluent:chevron-down-20-regular",
|
|
94372
|
+
// Publishes its resolved option (the source record) to the per-row
|
|
94373
|
+
// `selections` registry (runtime.vue), readable via `selections["<id>"]`.
|
|
94374
|
+
selection: true
|
|
94349
94375
|
};
|
|
94350
94376
|
const isListType$4 = (actual) => actual === "dyn" || actual.startsWith("list");
|
|
94351
94377
|
const isKeywordsType = (actual) => actual === "dyn" || actual.startsWith("list") || actual.startsWith("optional");
|
|
@@ -94631,7 +94657,9 @@ const type$n = "com.shwfed.table.column.tree-combobox-multi";
|
|
|
94631
94657
|
const compatibilityDate$n = "2026-05-28";
|
|
94632
94658
|
const metadata$n = {
|
|
94633
94659
|
name: "下拉树(多选)",
|
|
94634
|
-
icon: "fluent:tree-evergreen-20-regular"
|
|
94660
|
+
icon: "fluent:tree-evergreen-20-regular",
|
|
94661
|
+
// Publishes its resolved nodes (array) to the per-row `selections` registry (runtime.vue), readable via `selections["<id>"]`.
|
|
94662
|
+
selection: true
|
|
94635
94663
|
};
|
|
94636
94664
|
const isListLike$5 = (t) => t === "dyn" || t.startsWith("list") || t.startsWith("optional");
|
|
94637
94665
|
const isKeyType$5 = (t) => t === "string" || t === "number" || t === "dyn";
|
|
@@ -94795,7 +94823,9 @@ const type$m = "com.shwfed.table.column.tree-combobox-single";
|
|
|
94795
94823
|
const compatibilityDate$m = "2026-05-28";
|
|
94796
94824
|
const metadata$m = {
|
|
94797
94825
|
name: "下拉树(单选)",
|
|
94798
|
-
icon: "fluent:tree-evergreen-20-regular"
|
|
94826
|
+
icon: "fluent:tree-evergreen-20-regular",
|
|
94827
|
+
// Publishes its resolved node (backend record) to the per-row `selections` registry (runtime.vue), readable via `selections["<id>"]`.
|
|
94828
|
+
selection: true
|
|
94799
94829
|
};
|
|
94800
94830
|
const isListLike$4 = (t) => t === "dyn" || t.startsWith("list") || t.startsWith("optional");
|
|
94801
94831
|
const isKeyType$4 = (t) => t === "string" || t === "number" || t === "dyn";
|
|
@@ -95478,6 +95508,10 @@ function TableConfig(configure) {
|
|
|
95478
95508
|
pagination: optional(Pagination).annotations({
|
|
95479
95509
|
title: "分页"
|
|
95480
95510
|
}),
|
|
95511
|
+
persistQuery: optional(Boolean$.annotations({
|
|
95512
|
+
title: "搜索条件持久化",
|
|
95513
|
+
description: "开启后,搜索条件表单的当前值会写入浏览器会话存储(sessionStorage),刷新页面后自动恢复,直到关闭标签页或离开站点。需要表格已配置 ID。"
|
|
95514
|
+
})),
|
|
95481
95515
|
initialState: optional(InitialState)
|
|
95482
95516
|
}).pipe(filter((cfg) => {
|
|
95483
95517
|
if (cfg.dataSource?.total !== void 0 && cfg.pagination === void 0) {
|
|
@@ -96240,7 +96274,10 @@ const metadata$d = {
|
|
|
96240
96274
|
name: "下拉多选",
|
|
96241
96275
|
icon: "fluent:chevron-down-20-regular",
|
|
96242
96276
|
w: { initial: 8, min: 4, max: Infinity },
|
|
96243
|
-
h: { initial: 2, min: 2, max: 2 }
|
|
96277
|
+
h: { initial: 2, min: 2, max: 2 },
|
|
96278
|
+
// Publishes its resolved options (array, in selection order) to the
|
|
96279
|
+
// `selections` registry (runtime.vue), readable via `selections["<id>"]`.
|
|
96280
|
+
selection: true
|
|
96244
96281
|
};
|
|
96245
96282
|
const isListType$2 = (actual) => actual === "dyn" || actual.startsWith("list") || actual.startsWith("optional");
|
|
96246
96283
|
function configureWithOption$1(configure) {
|
|
@@ -96432,7 +96469,10 @@ const metadata$c = {
|
|
|
96432
96469
|
name: "下拉单选",
|
|
96433
96470
|
icon: "fluent:chevron-down-20-regular",
|
|
96434
96471
|
w: { initial: 8, min: 4, max: Infinity },
|
|
96435
|
-
h: { initial: 2, min: 2, max: 2 }
|
|
96472
|
+
h: { initial: 2, min: 2, max: 2 },
|
|
96473
|
+
// Publishes its resolved option to the `selections` registry (runtime.vue), so
|
|
96474
|
+
// a sibling expression can read the full chosen record via `selections["<id>"]`.
|
|
96475
|
+
selection: true
|
|
96436
96476
|
};
|
|
96437
96477
|
const isListType$1 = (actual) => actual === "dyn" || actual.startsWith("list") || actual.startsWith("optional");
|
|
96438
96478
|
function configureWithOption(configure) {
|
|
@@ -96650,7 +96690,10 @@ const metadata$b = {
|
|
|
96650
96690
|
name: "下拉树(多选)",
|
|
96651
96691
|
icon: "fluent:tree-evergreen-20-regular",
|
|
96652
96692
|
w: { initial: 8, min: 4, max: Infinity },
|
|
96653
|
-
h: { initial: 2, min: 2, max: 2 }
|
|
96693
|
+
h: { initial: 2, min: 2, max: 2 },
|
|
96694
|
+
// Publishes its resolved nodes (array, in selection order) to the `selections`
|
|
96695
|
+
// registry (runtime.vue), readable via `selections["<id>"]`.
|
|
96696
|
+
selection: true
|
|
96654
96697
|
};
|
|
96655
96698
|
const NODE_VAR$1 = {
|
|
96656
96699
|
type: "dyn",
|
|
@@ -96787,7 +96830,10 @@ const metadata$a = {
|
|
|
96787
96830
|
name: "下拉树(单选)",
|
|
96788
96831
|
icon: "fluent:tree-evergreen-20-regular",
|
|
96789
96832
|
w: { initial: 8, min: 4, max: Infinity },
|
|
96790
|
-
h: { initial: 2, min: 2, max: 2 }
|
|
96833
|
+
h: { initial: 2, min: 2, max: 2 },
|
|
96834
|
+
// Publishes its resolved node (the backend record) to the `selections`
|
|
96835
|
+
// registry (runtime.vue), readable via `selections["<id>"]`.
|
|
96836
|
+
selection: true
|
|
96791
96837
|
};
|
|
96792
96838
|
const NODE_VAR = {
|
|
96793
96839
|
type: "dyn",
|
|
@@ -96916,7 +96962,10 @@ const metadata$9 = {
|
|
|
96916
96962
|
name: "树(多选)",
|
|
96917
96963
|
icon: "fluent:tree-evergreen-20-regular",
|
|
96918
96964
|
w: { initial: 8, min: 4, max: Infinity },
|
|
96919
|
-
h: { initial: 8, min: 4, max: Infinity, grow: true }
|
|
96965
|
+
h: { initial: 8, min: 4, max: Infinity, grow: true },
|
|
96966
|
+
// Publishes its resolved nodes (array, in selection order) to the `selections`
|
|
96967
|
+
// registry (runtime.vue), readable via `selections["<id>"]`.
|
|
96968
|
+
selection: true
|
|
96920
96969
|
};
|
|
96921
96970
|
function schema$9(configure) {
|
|
96922
96971
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
@@ -97063,7 +97112,10 @@ const metadata$8 = {
|
|
|
97063
97112
|
name: "树(单选)",
|
|
97064
97113
|
icon: "fluent:tree-evergreen-20-regular",
|
|
97065
97114
|
w: { initial: 8, min: 4, max: Infinity },
|
|
97066
|
-
h: { initial: 8, min: 4, max: Infinity, grow: true }
|
|
97115
|
+
h: { initial: 8, min: 4, max: Infinity, grow: true },
|
|
97116
|
+
// Publishes its resolved node (the backend record) to the `selections`
|
|
97117
|
+
// registry (runtime.vue), readable via `selections["<id>"]`.
|
|
97118
|
+
selection: true
|
|
97067
97119
|
};
|
|
97068
97120
|
function schema$8(configure) {
|
|
97069
97121
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
@@ -97382,6 +97434,9 @@ function registerFormVariablesIfAbsent(env) {
|
|
|
97382
97434
|
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
97383
97435
|
if (!declared.has("now")) env.registerVariable("now", "Date", { label: "当前时间", description: "当前日期/时间" });
|
|
97384
97436
|
if (!declared.has("form")) env.registerVariable("form", "dyn", { label: "表单值", description: "当前表单状态" });
|
|
97437
|
+
if (!declared.has("undoable")) env.registerVariable("undoable", "bool", { label: "可撤销", description: "当前是否有可撤销的修改" });
|
|
97438
|
+
if (!declared.has("redoable")) env.registerVariable("redoable", "bool", { label: "可重做", description: "当前是否有可重做的修改" });
|
|
97439
|
+
if (!declared.has(SELECTIONS_VAR)) env.registerVariable(SELECTIONS_VAR, "dyn", { label: "选中项", description: "各选择字段当前选中项的完整对象(按字段标识)" });
|
|
97385
97440
|
}
|
|
97386
97441
|
const KIND$1 = "shwfed.component.form";
|
|
97387
97442
|
function unitFields(configure) {
|
|
@@ -98040,10 +98095,15 @@ const metadata$1 = {
|
|
|
98040
98095
|
w: { initial: 12, min: 4, max: Infinity },
|
|
98041
98096
|
h: { initial: 6, min: 4, max: Infinity }
|
|
98042
98097
|
};
|
|
98098
|
+
const JSON_VAR = {
|
|
98099
|
+
type: "optional<dyn>",
|
|
98100
|
+
label: "HTTP 响应体",
|
|
98101
|
+
description: "HTTP 响应体(配置了请求时为已解析 JSON,否则为 none)"
|
|
98102
|
+
};
|
|
98043
98103
|
function registerJson(env) {
|
|
98044
|
-
env.registerVariable("json",
|
|
98045
|
-
label:
|
|
98046
|
-
description:
|
|
98104
|
+
env.registerVariable("json", JSON_VAR.type, {
|
|
98105
|
+
label: JSON_VAR.label,
|
|
98106
|
+
description: JSON_VAR.description
|
|
98047
98107
|
});
|
|
98048
98108
|
}
|
|
98049
98109
|
const BADGE_VARIANTS = ["default", "secondary", "destructive", "outline"];
|
|
@@ -98142,6 +98202,7 @@ function defaultBody$1() {
|
|
|
98142
98202
|
const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
98143
98203
|
__proto__: null,
|
|
98144
98204
|
BADGE_VARIANTS,
|
|
98205
|
+
JSON_VAR,
|
|
98145
98206
|
badgeSchema,
|
|
98146
98207
|
compatibilityDate: compatibilityDate$1,
|
|
98147
98208
|
defaultBody: defaultBody$1,
|
|
@@ -98425,6 +98486,7 @@ const formSubmitCancel = {
|
|
|
98425
98486
|
'取消按钮用 `event.dispatch` 触发 `close` operation,target 是打开本表单的那个外层按钮的 id(`<modal-button-id>`)。modal.layout 类型的 action 在挂载时会把"打开它的按钮"作为可达 target 暴露给内部环境。',
|
|
98426
98487
|
"保存按钮用 `http.request.json`:",
|
|
98427
98488
|
" - `expression` 构造 HTTP 调用;`hostname` 和 `token` 是页面级全局 CEL 变量(见 MCP server 说明),不要在 fragment 内硬编码。`body(form)` 把整个表单当 body 发出去。",
|
|
98489
|
+
" - `before` 在请求发起前先触发所在表单的 `validate` 操作 —— 表单校验现在是显式的提交前步骤(不再隐式)。`<form-id>` 是包裹本 actions 字段的那个 form 的 id。校验不通过会中止链路,请求不会发出。",
|
|
98428
98490
|
" - `messageExpression` 从响应里抽消息字符串显示给用户(成功 / 失败统一走这个)。",
|
|
98429
98491
|
' - `resultExpression` 返回字面量 `"success"` 或 `"error"` —— 只有 `"success"` 才会触发 `onSuccess`。',
|
|
98430
98492
|
" - `onSuccess` 先关闭 modal,再触发外层表格的 `search` 操作让数据刷新。`<table-id>` 是 page 里那张 table 的 id。",
|
|
@@ -98462,6 +98524,7 @@ const formSubmitCancel = {
|
|
|
98462
98524
|
type: "com.shwfed.actions.button.http.request.json",
|
|
98463
98525
|
compatibilityDate: "2026-04-18",
|
|
98464
98526
|
expression: "http.post(hostname + '/api/endpoint').header('access_token', token).header('Content-Type', 'application/json').body(form)",
|
|
98527
|
+
before: [{ target: "<form-id>", operation: "validate" }],
|
|
98465
98528
|
messageExpression: "string(json.message)",
|
|
98466
98529
|
resultExpression: "json.code == 0 ? 'success' : 'error'",
|
|
98467
98530
|
onSuccess: [
|
package/dist/module.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as M,G as $,u as z,o as E,w as p,a as f,z as F,c as w,A as x,b as m,_ as y,H as I,I as L,J as N,K as O,L as A,e as t,g as J,f as P,h as g,i as S,j as V,p as G,l as H,k as K,r as T,m as U,s as W,M as D,N as Q,t as R,q as X,v as Y}from"./index-
|
|
1
|
+
import{d as M,G as $,u as z,o as E,w as p,a as f,z as F,c as w,A as x,b as m,_ as y,H as I,I as L,J as N,K as O,L as A,e as t,g as J,f as P,h as g,i as S,j as V,p as G,l as H,k as K,r as T,m as U,s as W,M as D,N as Q,t as R,q as X,v as Y}from"./index-BKaqQGb-.js";const ee=M({name:"ShwfedBlockCardBadge",inheritAttrs:!1,__name:"badge",props:{badge:{}},setup(n){const a=n,{locale:k}=$(),j=W(),o=T(void 0);function i(){return U(j)}const b=t(()=>o.value===void 0?X():Y(o.value)),l=t(()=>D(a.badge.content,k.value)||""),C=t(()=>l.value?Q(l.value,g,{...i(),json:b.value}):""),B=t(()=>{const e=a.badge.show;if(!e)return!0;try{return R(g(e,{...i(),json:b.value}))}catch(r){return console.warn("[shwfed-card-badge] show evaluation failed",r),!0}});async function s(){const e=a.badge.request;if(!e)return;const r=i(),q=J(function*(){const v=yield*P(yield*g(e,r));return S(v)});try{o.value=await V(G(q,H))}catch(v){console.warn("[shwfed-card-badge] fetch failed",v)}}const c=t(()=>!!a.badge.request&&(a.badge.interval??0)>0),_=t(()=>Math.max(1,a.badge.interval??1)*1e3),u=K(),{pause:h,resume:d}=z(()=>{s()},_,{immediate:!1});return E(()=>{s(),c.value&&u.value&&d()}),p(u,e=>{c.value&&(e?(s(),d()):h())}),p(()=>[a.badge.request??"",a.badge.interval??0].join("|"),()=>{s(),c.value&&u.value?d():h()}),(e,r)=>l.value&&B.value?(f(),F(O,{key:0},[n.badge.dot?(f(),w(m(y),x({key:0,variant:n.badge.variant??"default",class:"size-2.5 min-w-0 rounded-full p-0"},e.$attrs),null,16,["variant"])):(f(),w(m(y),x({key:1,variant:n.badge.variant??"default"},e.$attrs),{default:I(()=>[L(m(N),{source:C.value,class:"max-w-none text-inherit [&_*]:text-inherit [&_p]:m-0"},null,8,["source"])]),_:1},16,["variant"]))],64)):A("",!0)}});export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as k,Q as V,ae as b,z as m,I as e,H as l,b as a,a as f,U as _,V as v,W as u,X as r,J as p,Y as S,T as x,af as h,ag as y,ah as z,ai as T,K as w,
|
|
1
|
+
import{d as k,Q as V,ae as b,z as m,I as e,H as l,b as a,a as f,U as _,V as v,W as u,X as r,J as p,Y as S,T as x,af as h,ag as y,ah as z,ai as T,K as w,a2 as D,aj as N,a3 as C,a4 as F}from"./index-BKaqQGb-.js";const M={class:"flex flex-col gap-3"},U=k({name:"ShwfedNavigationActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(g){const t=V(g,"modelValue"),c=b(()=>{}),d=o=>C(c,o)??o,n=o=>F(c,o),$=[{value:"_self",label:"当前页面打开"},{value:"_blank",label:"新页面打开"}];return(o,i)=>(f(),m("div",M,[e(a(x),{orientation:"vertical"},{default:l(()=>[e(a(_),{class:"text-xs text-zinc-500"},v({default:l(()=>[u(" "+r(d("url")),1)]),_:2},[n("url")?{name:"tooltip",fn:l(()=>[e(a(p),{source:n("url"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(a(S),{"model-value":t.value.url??"",placeholder:"例:'/detail/' + string(row.id)","result-type":"string",class:"min-h-10","onUpdate:modelValue":i[0]||(i[0]=s=>t.value={...t.value,url:s})},null,8,["model-value"])]),_:1}),e(a(x),{orientation:"vertical"},{default:l(()=>[e(a(_),{class:"text-xs text-zinc-500"},v({default:l(()=>[u(" "+r(d("mode")),1)]),_:2},[n("mode")?{name:"tooltip",fn:l(()=>[e(a(p),{source:n("mode"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(a(h),{"model-value":t.value.mode??"_self","onUpdate:modelValue":i[1]||(i[1]=s=>t.value={...t.value,mode:s})},{default:l(()=>[e(a(y),{class:"w-full"},{default:l(()=>[e(a(z))]),_:1}),e(a(T),null,{default:l(()=>[(f(),m(w,null,D($,s=>e(a(N),{key:s.value,value:s.value},{default:l(()=>[u(r(s.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])]),_:1})]))}});export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as G,Q as ee,ak as le,al as te,w as I,am as A,z as v,c as H,I as n,H as s,b as l,an as ae,L as oe,K as W,ao as ne,X as p,S as c,ap as F,aq as R,ar as se,e as x,r as ie,y as K,a as d,as as O,at as h,a9 as j,au as q,U as B,V as b,W as L,J as U,Z as de,T as V,av as X,a3 as ue,a4 as ve,aw as ce,ax as re,ay as me,az as fe}from"./index-
|
|
1
|
+
import{d as G,Q as ee,ak as le,al as te,w as I,am as A,z as v,c as H,I as n,H as s,b as l,an as ae,L as oe,K as W,ao as ne,X as p,S as c,ap as F,aq as R,ar as se,e as x,r as ie,y as K,a as d,as as O,at as h,a9 as j,au as q,U as B,V as b,W as L,J as U,Z as de,T as V,av as X,a3 as ue,a4 as ve,aw as ce,ax as re,ay as me,az as fe}from"./index-BKaqQGb-.js";const pe={key:0,class:"flex min-h-96 items-center justify-center p-8 text-sm text-zinc-400"},xe={key:1},ke={key:2,class:"p-6 text-sm text-red-500"},ye={key:2,class:"flex flex-col gap-4"},ge={class:"grid grid-cols-2 gap-4"},Ie={key:0,class:"flex gap-2 min-h-96"},Be={class:"flex w-56 shrink-0 flex-col"},be={class:"flex flex-1 flex-col gap-2"},Le={class:"flex-1"},Ue={key:1,class:"flex flex-col gap-2"},Ve={class:"h-96"},De=G({name:"ShwfedModalLayoutActionConfig",__name:"config",props:se({configure:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(_){const i=ee(_,"modelValue"),Y=_,D=x(()=>Y.configure??(()=>{})),E=le(()=>{}),k=a=>ue(E,a)??a,r=a=>ve(E,a),J=x({get:()=>i.value.slot??ce(),set:a=>{i.value={...i.value,slot:a}}}),t=te(J,{configure:D.value});function P(a){i.value={...i.value,modalTitle:a}}function T(a,e){const o=e.trim(),g={...i.value};o.length===0?Reflect.deleteProperty(g,a):g[a]=o,i.value=g}function S(){const a=t.layouts.value;t.layouts.value=[...a,{name:"新布局",layout:{columns:1,placements:{}}}],t.activeLayoutIndex.value=a.length}function z(a,e){t.addBlock(a,e)}function M(a){t.removeBlock(a)}function w(a){t.removeBlocks(a)}const u=ie(null),m=x(()=>{const a=u.value;return a?t.blocks.value.find(e=>e.id===a)??null:null}),$=x(()=>{const a=m.value;return a?re()?.(a.type,a.compatibilityDate)??null:null});function C(a){u.value=a}function Q(){u.value=null}I(()=>t.blocks.value.map(a=>a.id),a=>{const e=u.value;e&&!a.includes(e)&&(u.value=null)});function Z(a){const e=u.value;e&&t.updateBlock(e,a)}const N=K(me,null);if(N){const a=N.add();I(m,e=>{e?(a.label.value=t.getBlockLabel(e),a.back.value=Q):(a.label.value=null,a.back.value=null)},{immediate:!0}),A(()=>{a.dispose()})}const f=K(fe,null),y=x(()=>f?.target.value??null);return I(u,a=>{f?.drilled&&(f.drilled.value=!!a)},{immediate:!0}),A(()=>{f?.drilled&&(f.drilled.value=!1)}),(a,e)=>(d(),v(W,null,[y.value&&!u.value?(d(),H(ae,{key:0,to:y.value},[n(l(h),{class:"flex-1"},{default:s(()=>[n(O,{"model-value":l(t).layouts.value,"active-index":l(t).activeLayoutIndex.value,"onUpdate:modelValue":e[0]||(e[0]=o=>{l(t).layouts.value=o}),"onUpdate:activeIndex":e[1]||(e[1]=o=>{l(t).activeLayoutIndex.value=o})},null,8,["model-value","active-index"])]),_:1}),n(l(q),{variant:"ghost",size:"sm",onClick:e[2]||(e[2]=o=>S())},{default:s(()=>[n(l(j),{icon:"fluent:add-20-regular",class:"size-4"}),e[17]||(e[17]=c("span",null,"新增布局",-1))]),_:1})],8,["to"])):oe("",!0),u.value?(d(),v(W,{key:1},[m.value?$.value?(d(),v("div",xe,[(d(),H(ne($.value.config),{"model-value":m.value,configure:D.value,"onUpdate:modelValue":e[3]||(e[3]=o=>Z(o))},null,8,["model-value","configure"]))])):(d(),v("div",ke," 未注册的块类型:"+p(m.value.type)+"@"+p(m.value.compatibilityDate),1)):(d(),v("div",pe," 块已不存在 "))],64)):(d(),v("div",ye,[n(l(V),{orientation:"vertical"},{default:s(()=>[n(l(B),{class:"text-xs text-zinc-500"},b({default:s(()=>[L(" "+p(k("modalTitle")),1)]),_:2},[r("modalTitle")?{name:"tooltip",fn:s(()=>[n(l(U),{source:r("modalTitle"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),n(l(de),{markdown:"","model-value":i.value.modalTitle,"translate-hint":k("modalTitle"),"onUpdate:modelValue":P},null,8,["model-value","translate-hint"])]),_:1}),c("div",ge,[n(l(V),{orientation:"vertical"},{default:s(()=>[n(l(B),{class:"text-xs text-zinc-500"},b({default:s(()=>[L(" "+p(k("modalWidth")),1)]),_:2},[r("modalWidth")?{name:"tooltip",fn:s(()=>[n(l(U),{source:r("modalWidth"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),n(l(X),{"model-value":i.value.modalWidth??"",placeholder:"例:720px / 60vw","onUpdate:modelValue":e[4]||(e[4]=o=>T("modalWidth",String(o)))},null,8,["model-value"])]),_:1}),n(l(V),{orientation:"vertical"},{default:s(()=>[n(l(B),{class:"text-xs text-zinc-500"},b({default:s(()=>[L(" "+p(k("modalMinHeight")),1)]),_:2},[r("modalMinHeight")?{name:"tooltip",fn:s(()=>[n(l(U),{source:r("modalMinHeight"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),n(l(X),{"model-value":i.value.modalMinHeight??"",placeholder:"例:400px / 60vh","onUpdate:modelValue":e[5]||(e[5]=o=>T("modalMinHeight",String(o)))},null,8,["model-value"])]),_:1})]),y.value?(d(),v("div",Ue,[n(F,{"model-value":l(t).layouts.value,index:l(t).activeLayoutIndex.value,"onUpdate:modelValue":e[13]||(e[13]=o=>{l(t).layouts.value=o})},null,8,["model-value","index"]),c("div",Ve,[n(R,{"model-value":l(t).layouts.value,"active-index":l(t).activeLayoutIndex.value,"selected-item-ids":l(t).selectedBlockIds.value,items:l(t).blocks.value,"find-entry":l(t).findBlockMeta,"get-item-label":l(t).getBlockLabel,"picker-entries":l(t).pickerEntries.value,"can-delete":!0,"item-noun":"块","onUpdate:modelValue":e[14]||(e[14]=o=>{l(t).layouts.value=o}),"onUpdate:activeIndex":e[15]||(e[15]=o=>{l(t).activeLayoutIndex.value=o}),"onUpdate:selectedItemIds":e[16]||(e[16]=o=>{l(t).selectedBlockIds.value=o}),onAddNew:z,onDrillDown:C,onDeleteItem:M,onDeleteItems:w},null,8,["model-value","active-index","selected-item-ids","items","find-entry","get-item-label","picker-entries"])])])):(d(),v("div",Ie,[c("div",Be,[n(l(h),{class:"flex-1"},{default:s(()=>[n(O,{"model-value":l(t).layouts.value,"active-index":l(t).activeLayoutIndex.value,"onUpdate:modelValue":e[6]||(e[6]=o=>{l(t).layouts.value=o}),"onUpdate:activeIndex":e[7]||(e[7]=o=>{l(t).activeLayoutIndex.value=o})},null,8,["model-value","active-index"])]),_:1}),n(l(q),{variant:"ghost",size:"sm",onClick:e[8]||(e[8]=o=>S())},{default:s(()=>[n(l(j),{icon:"fluent:add-20-regular",class:"size-4"}),e[18]||(e[18]=c("span",null,"新增布局",-1))]),_:1})]),c("div",be,[n(F,{"model-value":l(t).layouts.value,index:l(t).activeLayoutIndex.value,"onUpdate:modelValue":e[9]||(e[9]=o=>{l(t).layouts.value=o})},null,8,["model-value","index"]),c("div",Le,[n(R,{"model-value":l(t).layouts.value,"active-index":l(t).activeLayoutIndex.value,"selected-item-ids":l(t).selectedBlockIds.value,items:l(t).blocks.value,"find-entry":l(t).findBlockMeta,"get-item-label":l(t).getBlockLabel,"picker-entries":l(t).pickerEntries.value,"can-delete":!0,"item-noun":"块","onUpdate:modelValue":e[10]||(e[10]=o=>{l(t).layouts.value=o}),"onUpdate:activeIndex":e[11]||(e[11]=o=>{l(t).activeLayoutIndex.value=o}),"onUpdate:selectedItemIds":e[12]||(e[12]=o=>{l(t).selectedBlockIds.value=o}),onAddNew:z,onDrillDown:C,onDeleteItem:M,onDeleteItems:w},null,8,["model-value","active-index","selected-item-ids","items","find-entry","get-item-label","picker-entries"])])])]))]))],64))}});export{De as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as U,Q as k,aB as y,z as w,S as x,I as t,H as n,b as s,K as D,a2 as C,a as z,U as i,W as u,J as c,Y as d,T as p,aC as g,V as f,X as _,$ as F,a3 as H,a4 as $,e as S}from"./index-BKaqQGb-.js";const B={class:"flex flex-col gap-3"},L={class:"grid grid-cols-2 gap-3"},N={class:"flex items-start gap-2"},I={class:"grid grid-cols-2 gap-3"},A=U({name:"ShwfedHttpDownloadActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(q){const l=k(q,"modelValue"),E=y(()=>{}),m=a=>H(E,a)??a,r=a=>$(E,a),T=["onSuccess","onWarning","onError","onInfo"],h=S({get:()=>l.value.template?.request??"",set:a=>{l.value={...l.value,template:{...l.value.template,request:a}}}}),V=S({get:()=>l.value.template?.download??"",set:a=>{const e=l.value.template??{request:""};if(a.length===0){const{download:o,...v}=e;l.value={...l.value,template:v}}else l.value={...l.value,template:{...e,download:a}}}});function b(a){const e={...l.value};a.length===0?delete e.messageExpression:e.messageExpression=a,l.value=e}function j(a){const e={...l.value};a.length===0?delete e.resultExpression:e.resultExpression=a,l.value=e}function R(a,e){const o={...l.value};e.length===0?Reflect.deleteProperty(o,a):o[a]=e,l.value=o}return(a,e)=>(z(),w("div",B,[x("div",L,[t(s(p),{orientation:"vertical"},{default:n(()=>[t(s(i),{class:"text-xs text-zinc-500"},{tooltip:n(()=>[t(s(c),{source:r("template")??"返回 `HttpRequest` 的 CEL 表达式;未配置「下载请求」时直接下载其响应",block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),default:n(()=>[e[2]||(e[2]=u(" 请求 ",-1))]),_:1}),t(s(d),{"model-value":h.value,multiline:"",placeholder:"例:http.get('https://api.example.com/files/123')","result-type":"HttpRequest",class:"min-h-16","onUpdate:modelValue":e[0]||(e[0]=o=>h.value=o)},null,8,["model-value"])]),_:1}),t(s(p),{orientation:"vertical"},{default:n(()=>[t(s(i),{class:"text-xs text-zinc-500"},{tooltip:n(()=>[t(s(c),{source:"可选的第二步:用第一步响应 `json` 中的凭据构造真正的下载请求,例如 `json.data.key`",block:"",class:"prose prose-sm prose-zinc"})]),default:n(()=>[e[3]||(e[3]=u(" 下载请求 ",-1))]),_:1}),t(s(d),{"model-value":V.value,multiline:"",placeholder:"例:http.get('https://api.example.com/download').query('key', json.data.key)","result-type":"HttpRequest","extra-vars":{json:s(g)},class:"min-h-16","onUpdate:modelValue":e[1]||(e[1]=o=>V.value=o)},null,8,["model-value","extra-vars"])]),_:1})]),x("div",N,[t(s(p),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:n(()=>[t(s(i),{class:"text-xs text-zinc-500"},f({default:n(()=>[u(" "+_(m("messageExpression")),1)]),_:2},[r("messageExpression")?{name:"tooltip",fn:n(()=>[t(s(c),{source:r("messageExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),t(s(d),{"model-value":l.value.messageExpression??"",placeholder:"例:string(json.message)","result-type":"string","extra-vars":{json:s(g)},"onUpdate:modelValue":b},null,8,["model-value","extra-vars"])]),_:1}),t(s(p),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:n(()=>[t(s(i),{class:"text-xs text-zinc-500"},f({default:n(()=>[u(" "+_(m("resultExpression")),1)]),_:2},[r("resultExpression")?{name:"tooltip",fn:n(()=>[t(s(c),{source:r("resultExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),t(s(d),{"model-value":l.value.resultExpression??"",placeholder:"例:json.code == 0 ? 'success' : 'error'","result-type":"string","extra-vars":{json:s(g)},"onUpdate:modelValue":j},null,8,["model-value","extra-vars"])]),_:1})]),x("div",I,[(z(),w(D,null,C(T,o=>t(s(p),{key:o,orientation:"vertical",class:"min-w-0"},{default:n(()=>[t(s(i),{class:"text-xs text-zinc-500"},f({default:n(()=>[u(" "+_(m(o)),1)]),_:2},[r(o)?{name:"tooltip",fn:n(()=>[t(s(c),{source:r(o),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),t(F,{triggers:l.value[o]??[],"onUpdate:triggers":v=>R(o,v)},null,8,["triggers","onUpdate:triggers"])]),_:2},1024)),64))])]))}});export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as x,Q as k,
|
|
1
|
+
import{d as x,Q as k,b0 as V,z as g,I as e,H as l,b as a,a as S,U as u,V as m,W as d,X as f,J as p,av as z,T as _,Z as $,a3 as b,a4 as w}from"./index-BKaqQGb-.js";const T={class:"flex flex-col gap-4"},y=x({name:"ShwfedMarkdownItemConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(v){const t=k(v,"modelValue"),c=V(),r=o=>b(c,o)??o,s=o=>w(c,o);return(o,n)=>(S(),g("div",T,[e(a(_),{orientation:"vertical"},{default:l(()=>[e(a(u),{class:"text-xs text-zinc-500"},m({default:l(()=>[d(" "+f(r("name")),1)]),_:2},[s("name")?{name:"tooltip",fn:l(()=>[e(a(p),{source:s("name"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(a(z),{"model-value":t.value.name,placeholder:"仅用于编辑器内识别","onUpdate:modelValue":n[0]||(n[0]=i=>t.value={...t.value,name:String(i)})},null,8,["model-value"])]),_:1}),e(a(_),{orientation:"vertical"},{default:l(()=>[e(a(u),{class:"text-xs text-zinc-500"},m({default:l(()=>[d(" "+f(r("content")),1)]),_:2},[s("content")?{name:"tooltip",fn:l(()=>[e(a(p),{source:s("content"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(a($),{markdown:"",multiline:"","model-value":t.value.content,"onUpdate:modelValue":n[1]||(n[1]=i=>t.value={...t.value,content:i})},null,8,["model-value"])]),_:1})]))}});export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as _,Q as y,a6 as x,a7 as b,z as c,S as i,I as n,H as o,b as t,a as l,a8 as v,a9 as u,aa as g,ab as D,K as S,
|
|
1
|
+
import{d as _,Q as y,a6 as x,a7 as b,z as c,S as i,I as n,H as o,b as t,a as l,a8 as v,a9 as u,aa as g,ab as D,K as S,a2 as h,c as $,ac as k,X as p,ad as w}from"./index-BKaqQGb-.js";const z={class:"flex flex-col gap-3"},B={class:"flex-1"},C={class:"ml-auto text-xs tabular-nums text-zinc-400"},I=_({name:"ShwfedPrototypeActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(m){const r=y(m,"modelValue"),d=(()=>{const s=new Map;for(const e of x){if(e.type===b||e.deprecated)continue;const a=s.get(e.type);(!a||e.compatibilityDate>a.compatibilityDate)&&s.set(e.type,{type:e.type,compatibilityDate:e.compatibilityDate,name:e.metadata.name,icon:e.metadata.icon})}return[...s.values()].sort((e,a)=>e.name.localeCompare(a.name,"zh"))})();function f(s,e){r.value={type:s,compatibilityDate:e}}return(s,e)=>(l(),c("div",z,[e[0]||(e[0]=i("p",{class:"text-xs text-zinc-500"}," 原型按钮点击后无任何副作用,用于占位。选择下方任意类型可将其转换为正式按钮 —— 此转换仅能进行一次。 ",-1)),n(t(w),null,{default:o(()=>[n(t(v),{align:"inline-start"},{default:o(()=>[n(t(u),{icon:"fluent:arrow-swap-20-regular"})]),_:1}),n(t(g),null,{default:o(()=>[n(t(D),null,{default:o(()=>[(l(!0),c(S,null,h(t(d),a=>(l(),$(t(k),{key:a.type,value:a.type,onSelect:V=>f(a.type,a.compatibilityDate)},{default:o(()=>[n(t(u),{icon:a.icon,class:"size-4 shrink-0"},null,8,["icon"]),i("span",B,p(a.name),1),i("span",C,p(a.compatibilityDate),1)]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})]),_:1})]))}});export{I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as E,a as z,z as S,x as U,O as $,b as s,P as j,Q as B,R as F,c as C,H as l,S as v,I as e,T as u,U as d,V as p,W as m,X as f,J as g,Y as k,Z as H,$ as y,a0 as N,a1 as O,K as R,a2 as h,a3 as D,a4 as P}from"./index-BKaqQGb-.js";const q=E({__name:"FieldGroup",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(_){const n=_;return(x,i)=>(z(),S("div",{"data-slot":"field-group",class:$(s(j)("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",n.class))},[U(x.$slots,"default")],2))}}),I={class:"grid grid-cols-2 gap-4"},J={class:"grid grid-cols-2 gap-4"},L={class:"flex items-start gap-2"},A={class:"grid grid-cols-2 gap-3"},W=E({name:"ShwfedHttpRequestConfirmActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(_){const n=B(_,"modelValue"),x=F(()=>{}),i=r=>D(x,r)??r,a=r=>P(x,r);function c(r){const t={...n.value,...r};for(const[o,b]of Object.entries(r))b===void 0&&Reflect.deleteProperty(t,o);n.value=t}const w=["onSuccess","onWarning","onError","onInfo"];function V(r,t){c({[r]:t.length===0?void 0:t})}function T(r){c({before:r.length===0?void 0:r})}return(r,t)=>(z(),C(s(q),null,{default:l(()=>[v("div",I,[e(s(u),{orientation:"vertical"},{default:l(()=>[e(s(d),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("expression")),1)]),_:2},[a("expression")?{name:"tooltip",fn:l(()=>[e(s(g),{source:a("expression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(k),{"model-value":n.value.expression,multiline:"",placeholder:"例:http.post('/api/foo').body({ id: row.id })","result-type":"HttpRequest",class:"min-h-16","onUpdate:modelValue":t[0]||(t[0]=o=>c({expression:o}))},null,8,["model-value"])]),_:1}),e(s(u),{orientation:"vertical"},{default:l(()=>[e(s(d),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("markdown")),1)]),_:2},[a("markdown")?{name:"tooltip",fn:l(()=>[e(s(g),{source:a("markdown"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(H),{markdown:"","model-value":n.value.markdown,"onUpdate:modelValue":t[1]||(t[1]=o=>c({markdown:o}))},null,8,["model-value"])]),_:1})]),e(s(u),{orientation:"vertical"},{default:l(()=>[e(s(d),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("before")),1)]),_:2},[a("before")?{name:"tooltip",fn:l(()=>[e(s(g),{source:a("before"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(y,{triggers:n.value.before??[],"onUpdate:triggers":t[2]||(t[2]=o=>T(o))},null,8,["triggers"])]),_:1}),v("div",J,[e(s(u),{orientation:"vertical"},{default:l(()=>[e(s(d),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("icon")),1)]),_:2},[a("icon")?{name:"tooltip",fn:l(()=>[e(s(g),{source:a("icon"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(N),{"model-value":n.value.icon??"","onUpdate:modelValue":t[3]||(t[3]=o=>c(o.trim()===""?{icon:void 0}:{icon:o}))},null,8,["model-value"])]),_:1}),e(s(u),{orientation:"vertical"},{default:l(()=>[e(s(d),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("color")),1)]),_:2},[a("color")?{name:"tooltip",fn:l(()=>[e(s(g),{source:a("color"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(O),{"model-value":n.value.color??"","onUpdate:modelValue":t[4]||(t[4]=o=>c(o.trim()===""?{color:void 0}:{color:o}))},null,8,["model-value"])]),_:1})]),v("div",L,[e(s(u),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:l(()=>[e(s(d),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("messageExpression")),1)]),_:2},[a("messageExpression")?{name:"tooltip",fn:l(()=>[e(s(g),{source:a("messageExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(k),{"model-value":n.value.messageExpression??"",placeholder:"例:string(json.message)","result-type":"string","extra-vars":{json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},"onUpdate:modelValue":t[5]||(t[5]=o=>c({messageExpression:o===""?void 0:o}))},null,8,["model-value"])]),_:1}),e(s(u),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:l(()=>[e(s(d),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("resultExpression")),1)]),_:2},[a("resultExpression")?{name:"tooltip",fn:l(()=>[e(s(g),{source:a("resultExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(k),{"model-value":n.value.resultExpression??"",placeholder:"例:json.code == 0 ? 'success' : 'error'","result-type":"string","extra-vars":{json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},"onUpdate:modelValue":t[6]||(t[6]=o=>c({resultExpression:o===""?void 0:o}))},null,8,["model-value"])]),_:1})]),v("div",A,[(z(),S(R,null,h(w,o=>e(s(u),{key:o,orientation:"vertical",class:"min-w-0"},{default:l(()=>[e(s(d),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i(o)),1)]),_:2},[a(o)?{name:"tooltip",fn:l(()=>[e(s(g),{source:a(o),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(y,{triggers:n.value[o]??[],"onUpdate:triggers":b=>V(o,b)},null,8,["triggers","onUpdate:triggers"])]),_:2},1024)),64))])]),_:1}))}});export{W as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as k,Q as w,a5 as R,z as v,I as e,H as a,b as t,S as _,K as F,a2 as H,a as E,U as u,V as c,W as d,X as p,J as f,Y as g,T as m,$ as b,a3 as N,a4 as $}from"./index-BKaqQGb-.js";const j={class:"flex flex-col gap-3"},B={class:"flex items-start gap-2"},D={class:"grid grid-cols-2 gap-3"},q=k({name:"ShwfedHttpRequestActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(h){const l=w(h,"modelValue"),x=R(()=>{}),i=o=>N(x,o)??o,n=o=>$(x,o),S=["onSuccess","onWarning","onError","onInfo"];function z(o){const s={...l.value};o.length===0?delete s.messageExpression:s.messageExpression=o,l.value=s}function T(o){const s={...l.value};o.length===0?delete s.resultExpression:s.resultExpression=o,l.value=s}function y(o,s){const r={...l.value};s.length===0?Reflect.deleteProperty(r,o):r[o]=s,l.value=r}function V(o){const s={...l.value};o.length===0?Reflect.deleteProperty(s,"before"):s.before=o,l.value=s}return(o,s)=>(E(),v("div",j,[e(t(m),{orientation:"vertical"},{default:a(()=>[e(t(u),{class:"text-xs text-zinc-500"},c({default:a(()=>[d(" "+p(i("expression")),1)]),_:2},[n("expression")?{name:"tooltip",fn:a(()=>[e(t(f),{source:n("expression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(t(g),{"model-value":l.value.expression,multiline:"",placeholder:"例:http.post('/api/foo').body({ id: row.id })","result-type":"HttpRequest",class:"min-h-16","onUpdate:modelValue":s[0]||(s[0]=r=>l.value={...l.value,expression:r})},null,8,["model-value"])]),_:1}),e(t(m),{orientation:"vertical"},{default:a(()=>[e(t(u),{class:"text-xs text-zinc-500"},c({default:a(()=>[d(" "+p(i("before")),1)]),_:2},[n("before")?{name:"tooltip",fn:a(()=>[e(t(f),{source:n("before"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(b,{triggers:l.value.before??[],"onUpdate:triggers":s[1]||(s[1]=r=>V(r))},null,8,["triggers"])]),_:1}),_("div",B,[e(t(m),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:a(()=>[e(t(u),{class:"text-xs text-zinc-500"},c({default:a(()=>[d(" "+p(i("messageExpression")),1)]),_:2},[n("messageExpression")?{name:"tooltip",fn:a(()=>[e(t(f),{source:n("messageExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(t(g),{"model-value":l.value.messageExpression??"",placeholder:"例:string(json.message)","result-type":"string","extra-vars":{json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},"onUpdate:modelValue":z},null,8,["model-value"])]),_:1}),e(t(m),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:a(()=>[e(t(u),{class:"text-xs text-zinc-500"},c({default:a(()=>[d(" "+p(i("resultExpression")),1)]),_:2},[n("resultExpression")?{name:"tooltip",fn:a(()=>[e(t(f),{source:n("resultExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(t(g),{"model-value":l.value.resultExpression??"",placeholder:"例:json.code == 0 ? 'success' : 'error'","result-type":"string","extra-vars":{json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},"onUpdate:modelValue":T},null,8,["model-value"])]),_:1})]),_("div",D,[(E(),v(F,null,H(S,r=>e(t(m),{key:r,orientation:"vertical",class:"min-w-0"},{default:a(()=>[e(t(u),{class:"text-xs text-zinc-500"},c({default:a(()=>[d(" "+p(i(r)),1)]),_:2},[n(r)?{name:"tooltip",fn:a(()=>[e(t(f),{source:n(r),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(b,{triggers:l.value[r]??[],"onUpdate:triggers":U=>y(r,U)},null,8,["triggers","onUpdate:triggers"])]),_:2},1024)),64))])]))}});export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as g,Q as d,a3 as u,aA as f,z as m,I as s,H as i,b as r,a as p,U as _,W as v,X as x,$ as h,T,e as V}from"./index-BKaqQGb-.js";const C={class:"flex flex-col gap-3"},$=g({name:"ShwfedEventDispatchActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(l){const t=d(l,"modelValue"),o=u(f(),"triggers")??"触发的操作",n=V(()=>t.value.triggers??[]);function c(a){const e={...t.value};a.length===0?Reflect.deleteProperty(e,"triggers"):e.triggers=a,t.value=e}return(a,e)=>(p(),m("div",C,[s(r(T),{orientation:"vertical"},{default:i(()=>[s(r(_),{class:"text-xs text-zinc-500"},{default:i(()=>[v(x(r(o)),1)]),_:1}),s(h,{triggers:n.value,"onUpdate:triggers":c},null,8,["triggers"])]),_:1})]))}});export{$ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as v,Q as S,aD as h,a as V,z as k,I as s,H as l,b as t,U as r,V as u,W as d,X as p,J as m,Y as T,T as f,$ as y,a3 as z,a4 as $}from"./index-BKaqQGb-.js";const w={class:"flex flex-col gap-3"},b=v({name:"ShwfedStateWriteActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(_){const o=S(_,"modelValue"),i=h(()=>{}),c=e=>z(i,e)??e,n=e=>$(i,e);function g(e){const a={...o.value};e.length===0?Reflect.deleteProperty(a,"onSuccess"):a.onSuccess=e,o.value=a}return(e,a)=>(V(),k("div",w,[s(t(f),{orientation:"vertical"},{default:l(()=>[s(t(r),{class:"text-xs text-zinc-500"},u({default:l(()=>[d(" "+p(c("expression")),1)]),_:2},[n("expression")?{name:"tooltip",fn:l(()=>[s(t(m),{source:n("expression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(t(T),{"model-value":o.value.expression,multiline:"",placeholder:"例:{ invoices: rows, totalAmount: rows.map(r, r.amount).sum() }","result-type":"map",class:"min-h-16","onUpdate:modelValue":a[0]||(a[0]=x=>o.value={...o.value,expression:x})},null,8,["model-value"])]),_:1}),s(t(f),{orientation:"vertical"},{default:l(()=>[s(t(r),{class:"text-xs text-zinc-500"},u({default:l(()=>[d(" "+p(c("onSuccess")),1)]),_:2},[n("onSuccess")?{name:"tooltip",fn:l(()=>[s(t(m),{source:n("onSuccess"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(y,{triggers:o.value.onSuccess??[],"onUpdate:triggers":g},null,8,["triggers"])]),_:1})]))}});export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,
|
|
1
|
+
import{d as f,aZ as u,o as m,a_ as p,am as g,L as l,y,a$ as I}from"./index-BKaqQGb-.js";const w=f({name:"ShwfedActionDefinition",inheritAttrs:!1,__name:"definition",props:{actionId:{},effect:{}},setup(r){const n=r,a=u(),t=y(I,void 0),i=crypto.randomUUID(),c=import.meta.dev;let e,s=!1;function d(){!c||s||(s=!0,console.warn("[shwfed-action-definition] must be used inside <shwfed-actions>."))}function o(){if(!t){d();return}e&&e!==n.actionId&&t.unregisterAction(e,i),t.registerAction({ownerId:i,actionId:n.actionId,effect:n.effect,render:a.default}),e=n.actionId}return o(),m(()=>{o()}),p(()=>{o()}),g(()=>{!t||!e||t.unregisterAction(e,i)}),(_,A)=>l("",!0)}});export{w as _};
|