@shwfed/config 2.7.7 → 2.8.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 +128 -55
- package/dist/module.json +1 -1
- package/dist/preview/assets/{badge-B0tiCpa_.js → badge-BI1mdo92.js} +1 -1
- package/dist/preview/assets/{config-jDPbLgBr.js → config-BNF2r9jW.js} +1 -1
- package/dist/preview/assets/{config-CGvnv-5x.js → config-BxuGYvER.js} +1 -1
- package/dist/preview/assets/{config-GCvXe12z.js → config-Cy5w3JWQ.js} +1 -1
- package/dist/preview/assets/{config-BG9TRQcv.js → config-DqUnpWZk.js} +1 -1
- package/dist/preview/assets/{config-C-XJ-8Rs.js → config-Du5SuNSb.js} +1 -1
- package/dist/preview/assets/{config-Dafqx9xC.js → config-DuzQXHvg.js} +1 -1
- package/dist/preview/assets/{config-Bfb2sH6S.js → config-OrJljNWU.js} +1 -1
- package/dist/preview/assets/{config-DqMRy1WL.js → config-XgVqueyq.js} +1 -1
- package/dist/preview/assets/{config-DDPihojt.js → config-ggyCcWNZ.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-DBXfCj4Q.js → definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js} +1 -1
- package/dist/preview/assets/{index-D7jDE3kp.js → index-BvLLQuQr.js} +1 -1
- package/dist/preview/assets/{index-B0PL01fm.css → index-DsMR5NfK.css} +1 -1
- package/dist/preview/assets/{index-CHzOsSTW.js → index-Yv78vz4W.js} +168 -168
- package/dist/preview/assets/index-yrBKwEfk.js +1 -0
- package/dist/preview/assets/{item-DV-Garrg.js → item-DMtXi_cx.js} +1 -1
- package/dist/preview/assets/{runtime-DKtlQWwc.js → runtime-2S3Yr051.js} +1 -1
- package/dist/preview/assets/{runtime-UmLaEUGf.js → runtime-BUPuX-Gq.js} +1 -1
- package/dist/preview/assets/{runtime-BovPWken.js → runtime-C4jFTZ4Z.js} +1 -1
- package/dist/preview/assets/{runtime-DA77AmOP.js → runtime-CA58Mif7.js} +1 -1
- package/dist/preview/assets/{runtime-BxBBFFHA.js → runtime-CWqQzWuc.js} +1 -1
- package/dist/preview/assets/{runtime-D-LBi56N.js → runtime-CjJBU_e1.js} +1 -1
- package/dist/preview/assets/{runtime-DHTqFEQI.js → runtime-DeUmGsM_.js} +1 -1
- package/dist/preview/assets/{runtime-CwmJ9MLQ.js → runtime-DnXoWy2A.js} +1 -1
- package/dist/preview/assets/{runtime-Cyjx6haa.js → runtime-wVZ1xP8L.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/block-layout-editor/index.vue +1 -4
- 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-05-17/com.shwfed.block.chart.xy/config.vue +5 -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/config.vue +24 -16
- 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/index.vue +5 -1
- package/dist/runtime/components/form/schema.d.ts +1 -1
- package/dist/runtime/components/form/schema.js +6 -1
- package/dist/runtime/components/form/utils/form-vars.js +2 -0
- package/dist/runtime/components/form/utils/schema-meta.d.ts +2 -0
- package/dist/runtime/components/form/utils/schema-meta.js +24 -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-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/config.vue +30 -36
- 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/schema.d.ts +4 -0
- package/dist/runtime/components/table/schema.js +4 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +4 -3
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +135 -111
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +4 -3
- package/dist/runtime/share/expression.d.ts +23 -0
- package/dist/runtime/share/expression.js +37 -17
- package/dist/runtime/share/use-persisted-query.d.ts +21 -0
- package/dist/runtime/share/use-persisted-query.js +33 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +2 -2
- package/dist/runtime/vendor/cel-js/PROMPT.md +15 -6
- package/dist/runtime/vendor/cel-js/lib/macros.js +66 -14
- package/package.json +1 -1
- package/dist/preview/assets/index-CSfKAdi7.js +0 -1
package/dist/mcp.mjs
CHANGED
|
@@ -43977,27 +43977,79 @@ function assertIdentifier(node, message2) {
|
|
|
43977
43977
|
if (node.op === "id") return node.args;
|
|
43978
43978
|
throw parseError("invalid_macro_argument", message2, node);
|
|
43979
43979
|
}
|
|
43980
|
+
function buildMapComprehension(callAst, receiver, iterVar, predicate, transform2, invalidMsg, label) {
|
|
43981
|
+
let step2 = transform2.clone(OPERATORS.accuPush, transform2);
|
|
43982
|
+
if (predicate) {
|
|
43983
|
+
const accuValue = predicate.clone(OPERATORS.accuValue, void 0);
|
|
43984
|
+
step2 = predicate.clone(OPERATORS.ternary, [predicate.setMeta("label", label), step2, accuValue]);
|
|
43985
|
+
}
|
|
43986
|
+
return callAst.clone(OPERATORS.comprehension, {
|
|
43987
|
+
errorsAreFatal: true,
|
|
43988
|
+
iterable: receiver,
|
|
43989
|
+
iterVarName: assertIdentifier(iterVar, invalidMsg),
|
|
43990
|
+
init: callAst.clone(OPERATORS.list, []),
|
|
43991
|
+
step: step2,
|
|
43992
|
+
result: identity
|
|
43993
|
+
});
|
|
43994
|
+
}
|
|
43980
43995
|
function createMapExpander(hasFilter) {
|
|
43981
43996
|
const functionDesc = hasFilter ? "map(var, filter, transform)" : "map(var, transform)";
|
|
43982
43997
|
const invalidMsg = `${functionDesc} invalid predicate iteration variable`;
|
|
43983
43998
|
const label = `${functionDesc} filter predicate must return bool`;
|
|
43999
|
+
if (hasFilter) {
|
|
44000
|
+
return (opts) => {
|
|
44001
|
+
const { args: args2, receiver, ast: callAst } = opts;
|
|
44002
|
+
return { callAst: buildMapComprehension(callAst, receiver, args2[0], args2[1], args2[2], invalidMsg, label) };
|
|
44003
|
+
};
|
|
44004
|
+
}
|
|
44005
|
+
function functorMap(ev, macro, ctx, recv) {
|
|
44006
|
+
return gen(function* () {
|
|
44007
|
+
if (isNone(recv)) return none$4();
|
|
44008
|
+
const iterCtx = macro.iterCtx.reuse(ctx);
|
|
44009
|
+
const result = yield* ev.eval(macro.body, iterCtx.setIterValue(recv.value, ev));
|
|
44010
|
+
return some(result);
|
|
44011
|
+
});
|
|
44012
|
+
}
|
|
44013
|
+
function typeCheck(chk, macro, ctx) {
|
|
44014
|
+
const recvType = chk.check(macro.receiver, ctx);
|
|
44015
|
+
if (recvType.kind === "optional") {
|
|
44016
|
+
macro.mode = "optional";
|
|
44017
|
+
const innerType = recvType.valueType ?? chk.getType("dyn");
|
|
44018
|
+
macro.iterCtx = ctx.forkWithVariable(macro.iterVarName, innerType);
|
|
44019
|
+
const bodyType = chk.check(macro.body, macro.iterCtx);
|
|
44020
|
+
return chk.registry.getOptionalType(bodyType);
|
|
44021
|
+
}
|
|
44022
|
+
if (recvType.kind === "dyn") {
|
|
44023
|
+
macro.mode = "dyn";
|
|
44024
|
+
macro.iterCtx = ctx.forkWithVariable(macro.iterVarName, chk.getType("dyn"));
|
|
44025
|
+
chk.check(macro.comprehension, ctx);
|
|
44026
|
+
return chk.getType("dyn");
|
|
44027
|
+
}
|
|
44028
|
+
macro.mode = "list";
|
|
44029
|
+
return chk.check(macro.comprehension, ctx);
|
|
44030
|
+
}
|
|
44031
|
+
function evaluate2(ev, macro, ctx) {
|
|
44032
|
+
if (macro.mode === "list") return ev.eval(macro.comprehension, ctx);
|
|
44033
|
+
if (macro.mode === "optional") {
|
|
44034
|
+
return flatMap$3(ev.eval(macro.receiver, ctx), (recv) => functorMap(ev, macro, ctx, recv));
|
|
44035
|
+
}
|
|
44036
|
+
return flatMap$3(
|
|
44037
|
+
ev.eval(macro.receiver, ctx),
|
|
44038
|
+
(recv) => isOption(recv) ? functorMap(ev, macro, ctx, recv) : ev.eval(macro.comprehension, ctx)
|
|
44039
|
+
);
|
|
44040
|
+
}
|
|
43984
44041
|
return (opts) => {
|
|
43985
44042
|
const { args: args2, receiver, ast: callAst } = opts;
|
|
43986
|
-
const [iterVar, predicate, transform2] = hasFilter ? args2 : [args2[0], null, args2[1]];
|
|
43987
|
-
let step2 = transform2.clone(OPERATORS.accuPush, transform2);
|
|
43988
|
-
if (predicate) {
|
|
43989
|
-
const accuValue = predicate.clone(OPERATORS.accuValue, void 0);
|
|
43990
|
-
step2 = predicate.clone(OPERATORS.ternary, [predicate.setMeta("label", label), step2, accuValue]);
|
|
43991
|
-
}
|
|
43992
44043
|
return {
|
|
43993
|
-
|
|
43994
|
-
|
|
43995
|
-
|
|
43996
|
-
|
|
43997
|
-
|
|
43998
|
-
|
|
43999
|
-
|
|
44000
|
-
|
|
44044
|
+
ast: callAst,
|
|
44045
|
+
receiver,
|
|
44046
|
+
iterVarName: assertIdentifier(args2[0], invalidMsg),
|
|
44047
|
+
body: args2[1],
|
|
44048
|
+
comprehension: buildMapComprehension(callAst, receiver, args2[0], null, args2[1], invalidMsg, label),
|
|
44049
|
+
iterCtx: void 0,
|
|
44050
|
+
mode: "list",
|
|
44051
|
+
typeCheck,
|
|
44052
|
+
evaluate: evaluate2
|
|
44001
44053
|
};
|
|
44002
44054
|
};
|
|
44003
44055
|
}
|
|
@@ -45463,9 +45515,17 @@ const Locale = Tuple(
|
|
|
45463
45515
|
description: "本地化文本列表,zh 必须为首项"
|
|
45464
45516
|
});
|
|
45465
45517
|
const HttpRequestResult = (t) => t === "HttpRequest" || t === "optional<HttpRequest>" || t === "optional<dyn>" || t === "dyn";
|
|
45518
|
+
function matchesScalarType(actual, expected) {
|
|
45519
|
+
if (expected === "dyn" || actual === "dyn") return true;
|
|
45520
|
+
if (actual === expected) return true;
|
|
45521
|
+
if (actual.startsWith(`${expected}<`)) return true;
|
|
45522
|
+
if (actual === `optional<${expected}>` || actual === "optional<dyn>") return true;
|
|
45523
|
+
if (actual.startsWith(`optional<${expected}<`)) return true;
|
|
45524
|
+
return false;
|
|
45525
|
+
}
|
|
45466
45526
|
function matchesResultType(actual, expected) {
|
|
45467
|
-
if (typeof expected === "string") return
|
|
45468
|
-
if (Array.isArray(expected)) return expected.
|
|
45527
|
+
if (typeof expected === "string") return matchesScalarType(actual, expected);
|
|
45528
|
+
if (Array.isArray(expected)) return expected.some((e) => matchesScalarType(actual, e));
|
|
45469
45529
|
return expected(actual);
|
|
45470
45530
|
}
|
|
45471
45531
|
function formatExpectedType(expected) {
|
|
@@ -45479,6 +45539,21 @@ function registerScopeAddressVar(env) {
|
|
|
45479
45539
|
description: "按 UUID 寻址被遮蔽的祖先作用域"
|
|
45480
45540
|
});
|
|
45481
45541
|
}
|
|
45542
|
+
function evaluateExpression(env, expression, resultType) {
|
|
45543
|
+
const result = env.check(expression);
|
|
45544
|
+
if (isLeft(result)) {
|
|
45545
|
+
const error2 = result.left;
|
|
45546
|
+
const summary2 = error2 instanceof CelError ? error2.summary : String(error2);
|
|
45547
|
+
return `表达式无效:${summary2}`;
|
|
45548
|
+
}
|
|
45549
|
+
if (resultType) {
|
|
45550
|
+
const actualType = result.right;
|
|
45551
|
+
if (!matchesResultType(actualType, resultType)) {
|
|
45552
|
+
return `表达式返回类型不匹配,期望 ${formatExpectedType(resultType)},实际为 ${actualType}`;
|
|
45553
|
+
}
|
|
45554
|
+
}
|
|
45555
|
+
return null;
|
|
45556
|
+
}
|
|
45482
45557
|
function buildDescription(baseline, env, resultType) {
|
|
45483
45558
|
const defs = env.getDefinitions();
|
|
45484
45559
|
const baselineVarNames = new Set(baseline.variables.map((v) => v.name));
|
|
@@ -45512,21 +45587,7 @@ function Expression(options) {
|
|
|
45512
45587
|
const description2 = buildDescription(baseline, env, options.resultType);
|
|
45513
45588
|
return String$.pipe(
|
|
45514
45589
|
filter(
|
|
45515
|
-
(expression) =>
|
|
45516
|
-
const result = env.check(expression);
|
|
45517
|
-
if (isLeft(result)) {
|
|
45518
|
-
const error2 = result.left;
|
|
45519
|
-
const summary2 = error2 instanceof CelError ? error2.summary : String(error2);
|
|
45520
|
-
return `表达式无效:${summary2}`;
|
|
45521
|
-
}
|
|
45522
|
-
if (options.resultType) {
|
|
45523
|
-
const actualType = result.right;
|
|
45524
|
-
if (!matchesResultType(actualType, options.resultType)) {
|
|
45525
|
-
return `表达式返回类型不匹配,期望 ${formatExpectedType(options.resultType)},实际为 ${actualType}`;
|
|
45526
|
-
}
|
|
45527
|
-
}
|
|
45528
|
-
return true;
|
|
45529
|
-
},
|
|
45590
|
+
(expression) => evaluateExpression(env, expression, options.resultType) ?? true,
|
|
45530
45591
|
{
|
|
45531
45592
|
title: "CEL Expression",
|
|
45532
45593
|
description: description2
|
|
@@ -81974,7 +82035,7 @@ const metadata$1b = {
|
|
|
81974
82035
|
name: "下载文件",
|
|
81975
82036
|
icon: "fluent:arrow-download-20-regular"
|
|
81976
82037
|
};
|
|
81977
|
-
const JSON_VAR$
|
|
82038
|
+
const JSON_VAR$5 = {
|
|
81978
82039
|
type: "dyn",
|
|
81979
82040
|
label: "HTTP 响应体",
|
|
81980
82041
|
description: "第一步 `请求` 的响应体(已解析 JSON);用于构造第二步下载请求"
|
|
@@ -81982,7 +82043,7 @@ const JSON_VAR$4 = {
|
|
|
81982
82043
|
function configureWithJson$4(configure) {
|
|
81983
82044
|
return (env) => {
|
|
81984
82045
|
configure(env);
|
|
81985
|
-
env.registerVariable("json", JSON_VAR$
|
|
82046
|
+
env.registerVariable("json", JSON_VAR$5.type, { description: JSON_VAR$5.description });
|
|
81986
82047
|
};
|
|
81987
82048
|
}
|
|
81988
82049
|
function schema$1b(configure) {
|
|
@@ -82053,7 +82114,7 @@ function schema$1b(configure) {
|
|
|
82053
82114
|
}
|
|
82054
82115
|
const __vite_glob_0_6$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82055
82116
|
__proto__: null,
|
|
82056
|
-
JSON_VAR: JSON_VAR$
|
|
82117
|
+
JSON_VAR: JSON_VAR$5,
|
|
82057
82118
|
compatibilityDate: compatibilityDate$1b,
|
|
82058
82119
|
metadata: metadata$1b,
|
|
82059
82120
|
schema: schema$1b,
|
|
@@ -82631,9 +82692,9 @@ function schema$17(configure) {
|
|
|
82631
82692
|
type: Literal2(type$17),
|
|
82632
82693
|
compatibilityDate: Literal2(compatibilityDate$17),
|
|
82633
82694
|
...commonFieldFields(configure),
|
|
82634
|
-
content:
|
|
82695
|
+
content: LocaleMarkdown({ configure }).annotations({
|
|
82635
82696
|
title: "内容",
|
|
82636
|
-
description: "渲染为 Markdown
|
|
82697
|
+
description: "渲染为 Markdown 的多语言文本,支持 `{{ 表达式 }}` 插值"
|
|
82637
82698
|
})
|
|
82638
82699
|
}).annotations({
|
|
82639
82700
|
title: "MarkdownField",
|
|
@@ -82726,10 +82787,6 @@ function schema$15(configure) {
|
|
|
82726
82787
|
description: "鼠标悬停在标签上时展示的说明"
|
|
82727
82788
|
})),
|
|
82728
82789
|
orientation: optional(FieldOrientationSchema),
|
|
82729
|
-
rows: optional(Number$.pipe(int(), positive()).annotations({
|
|
82730
|
-
title: "行数",
|
|
82731
|
-
description: "输入框的初始可见行数;留空使用默认高度"
|
|
82732
|
-
})),
|
|
82733
82790
|
binding: optional(String$.pipe(minLength(1)).annotations({
|
|
82734
82791
|
title: "绑定路径",
|
|
82735
82792
|
description: "写入表单状态的 `dot-prop` 路径,例如 `user.bio`;留空则为非受控字段,不写入表单状态"
|
|
@@ -82742,6 +82799,10 @@ function schema$15(configure) {
|
|
|
82742
82799
|
title: "只读条件",
|
|
82743
82800
|
description: "返回 `true` 时仅以纯文本展示当前值"
|
|
82744
82801
|
})),
|
|
82802
|
+
maxLength: optional(Number$.pipe(int(), positive()).annotations({
|
|
82803
|
+
title: "字数限制",
|
|
82804
|
+
description: "允许输入的最大字符数;达到上限后无法继续输入,并在右下角展示字数计数"
|
|
82805
|
+
})),
|
|
82745
82806
|
derived: derivedField(configure, "string")
|
|
82746
82807
|
}).annotations({
|
|
82747
82808
|
title: "TextareaField",
|
|
@@ -89082,7 +89143,7 @@ const metadata$U = {
|
|
|
89082
89143
|
w: { initial: 8, min: 8, max: Infinity },
|
|
89083
89144
|
h: { initial: 6, min: 6, max: Infinity, grow: true }
|
|
89084
89145
|
};
|
|
89085
|
-
const JSON_VAR$
|
|
89146
|
+
const JSON_VAR$4 = {
|
|
89086
89147
|
type: "dyn",
|
|
89087
89148
|
label: "HTTP 响应体",
|
|
89088
89149
|
description: "第一步 `请求` 的响应体(已解析 JSON);用于构造第二步下载请求"
|
|
@@ -89090,7 +89151,7 @@ const JSON_VAR$3 = {
|
|
|
89090
89151
|
function configureWithJson$3(configure) {
|
|
89091
89152
|
return (env) => {
|
|
89092
89153
|
configure(env);
|
|
89093
|
-
env.registerVariable("json", JSON_VAR$
|
|
89154
|
+
env.registerVariable("json", JSON_VAR$4.type, { description: JSON_VAR$4.description });
|
|
89094
89155
|
};
|
|
89095
89156
|
}
|
|
89096
89157
|
function schema$U(configure) {
|
|
@@ -89179,7 +89240,7 @@ function schema$U(configure) {
|
|
|
89179
89240
|
}
|
|
89180
89241
|
const __vite_glob_0_15$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
89181
89242
|
__proto__: null,
|
|
89182
|
-
JSON_VAR: JSON_VAR$
|
|
89243
|
+
JSON_VAR: JSON_VAR$4,
|
|
89183
89244
|
compatibilityDate: compatibilityDate$U,
|
|
89184
89245
|
metadata: metadata$U,
|
|
89185
89246
|
schema: schema$U,
|
|
@@ -89198,7 +89259,7 @@ const OPTION_VAR$2 = {
|
|
|
89198
89259
|
label: "当前选项",
|
|
89199
89260
|
description: "`选项` 表达式产出的数组中迭代到的单个元素"
|
|
89200
89261
|
};
|
|
89201
|
-
const JSON_VAR$
|
|
89262
|
+
const JSON_VAR$3 = {
|
|
89202
89263
|
type: "dyn",
|
|
89203
89264
|
label: "HTTP 响应体",
|
|
89204
89265
|
description: "HTTP 响应体(已解析 JSON);请求失败或尚未完成时为 `null`"
|
|
@@ -89212,7 +89273,7 @@ function configureWithOption$3(configure) {
|
|
|
89212
89273
|
function configureWithJson$2(configure) {
|
|
89213
89274
|
return (env) => {
|
|
89214
89275
|
configure(env);
|
|
89215
|
-
env.registerVariable("json", JSON_VAR$
|
|
89276
|
+
env.registerVariable("json", JSON_VAR$3.type, { description: JSON_VAR$3.description });
|
|
89216
89277
|
};
|
|
89217
89278
|
}
|
|
89218
89279
|
const isListType$c = (actual) => actual === "dyn" || actual.startsWith("list");
|
|
@@ -89275,7 +89336,7 @@ function schema$T(configure) {
|
|
|
89275
89336
|
}
|
|
89276
89337
|
const __vite_glob_0_16$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
89277
89338
|
__proto__: null,
|
|
89278
|
-
JSON_VAR: JSON_VAR$
|
|
89339
|
+
JSON_VAR: JSON_VAR$3,
|
|
89279
89340
|
OPTION_VAR: OPTION_VAR$2,
|
|
89280
89341
|
compatibilityDate: compatibilityDate$T,
|
|
89281
89342
|
metadata: metadata$T,
|
|
@@ -92276,7 +92337,7 @@ const OPTION_VAR$1 = {
|
|
|
92276
92337
|
label: "当前选项",
|
|
92277
92338
|
description: "`选项` 表达式产出的数组中迭代到的单个元素"
|
|
92278
92339
|
};
|
|
92279
|
-
const JSON_VAR$
|
|
92340
|
+
const JSON_VAR$2 = {
|
|
92280
92341
|
type: "dyn",
|
|
92281
92342
|
label: "HTTP 响应体",
|
|
92282
92343
|
description: "HTTP 响应体(已解析 JSON);请求失败或尚未完成时为 `null`"
|
|
@@ -92295,7 +92356,7 @@ function schema$A(configure) {
|
|
|
92295
92356
|
configure: (env) => {
|
|
92296
92357
|
configure(env);
|
|
92297
92358
|
registerRowVariablesIfAbsent(env);
|
|
92298
|
-
env.registerVariable("json", JSON_VAR$
|
|
92359
|
+
env.registerVariable("json", JSON_VAR$2.type, { description: JSON_VAR$2.description });
|
|
92299
92360
|
},
|
|
92300
92361
|
resultType: isListType$b
|
|
92301
92362
|
});
|
|
@@ -92404,7 +92465,7 @@ function toColumnDef$e(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
92404
92465
|
}
|
|
92405
92466
|
const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
92406
92467
|
__proto__: null,
|
|
92407
|
-
JSON_VAR: JSON_VAR$
|
|
92468
|
+
JSON_VAR: JSON_VAR$2,
|
|
92408
92469
|
OPTION_VAR: OPTION_VAR$1,
|
|
92409
92470
|
compatibilityDate: compatibilityDate$A,
|
|
92410
92471
|
metadata: metadata$A,
|
|
@@ -92546,7 +92607,7 @@ const OPTION_VAR = {
|
|
|
92546
92607
|
label: "当前选项",
|
|
92547
92608
|
description: "`选项` 表达式产出的数组中迭代到的单个元素"
|
|
92548
92609
|
};
|
|
92549
|
-
const JSON_VAR = {
|
|
92610
|
+
const JSON_VAR$1 = {
|
|
92550
92611
|
type: "dyn",
|
|
92551
92612
|
label: "HTTP 响应体",
|
|
92552
92613
|
description: "HTTP 响应体(已解析 JSON);请求失败或尚未完成时为 `null`"
|
|
@@ -92565,7 +92626,7 @@ function schema$y(configure) {
|
|
|
92565
92626
|
configure: (env) => {
|
|
92566
92627
|
configure(env);
|
|
92567
92628
|
registerRowVariablesIfAbsent(env);
|
|
92568
|
-
env.registerVariable("json", JSON_VAR.type, { description: JSON_VAR.description });
|
|
92629
|
+
env.registerVariable("json", JSON_VAR$1.type, { description: JSON_VAR$1.description });
|
|
92569
92630
|
},
|
|
92570
92631
|
resultType: isListType$a
|
|
92571
92632
|
});
|
|
@@ -92674,7 +92735,7 @@ function toColumnDef$c(value, { getLocaleText, $cel, inheritedContext }) {
|
|
|
92674
92735
|
}
|
|
92675
92736
|
const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
92676
92737
|
__proto__: null,
|
|
92677
|
-
JSON_VAR,
|
|
92738
|
+
JSON_VAR: JSON_VAR$1,
|
|
92678
92739
|
OPTION_VAR,
|
|
92679
92740
|
compatibilityDate: compatibilityDate$y,
|
|
92680
92741
|
metadata: metadata$y,
|
|
@@ -95417,6 +95478,10 @@ function TableConfig(configure) {
|
|
|
95417
95478
|
pagination: optional(Pagination).annotations({
|
|
95418
95479
|
title: "分页"
|
|
95419
95480
|
}),
|
|
95481
|
+
persistQuery: optional(Boolean$.annotations({
|
|
95482
|
+
title: "搜索条件持久化",
|
|
95483
|
+
description: "开启后,搜索条件表单的当前值会写入浏览器会话存储(sessionStorage),刷新页面后自动恢复,直到关闭标签页或离开站点。需要表格已配置 ID。"
|
|
95484
|
+
})),
|
|
95420
95485
|
initialState: optional(InitialState)
|
|
95421
95486
|
}).pipe(filter((cfg) => {
|
|
95422
95487
|
if (cfg.dataSource?.total !== void 0 && cfg.pagination === void 0) {
|
|
@@ -97321,6 +97386,8 @@ function registerFormVariablesIfAbsent(env) {
|
|
|
97321
97386
|
const declared = new Set(env.getDefinitions().variables.map((v) => v.name));
|
|
97322
97387
|
if (!declared.has("now")) env.registerVariable("now", "Date", { label: "当前时间", description: "当前日期/时间" });
|
|
97323
97388
|
if (!declared.has("form")) env.registerVariable("form", "dyn", { label: "表单值", description: "当前表单状态" });
|
|
97389
|
+
if (!declared.has("undoable")) env.registerVariable("undoable", "bool", { label: "可撤销", description: "当前是否有可撤销的修改" });
|
|
97390
|
+
if (!declared.has("redoable")) env.registerVariable("redoable", "bool", { label: "可重做", description: "当前是否有可重做的修改" });
|
|
97324
97391
|
}
|
|
97325
97392
|
const KIND$1 = "shwfed.component.form";
|
|
97326
97393
|
function unitFields(configure) {
|
|
@@ -97979,10 +98046,15 @@ const metadata$1 = {
|
|
|
97979
98046
|
w: { initial: 12, min: 4, max: Infinity },
|
|
97980
98047
|
h: { initial: 6, min: 4, max: Infinity }
|
|
97981
98048
|
};
|
|
98049
|
+
const JSON_VAR = {
|
|
98050
|
+
type: "optional<dyn>",
|
|
98051
|
+
label: "HTTP 响应体",
|
|
98052
|
+
description: "HTTP 响应体(配置了请求时为已解析 JSON,否则为 none)"
|
|
98053
|
+
};
|
|
97982
98054
|
function registerJson(env) {
|
|
97983
|
-
env.registerVariable("json",
|
|
97984
|
-
label:
|
|
97985
|
-
description:
|
|
98055
|
+
env.registerVariable("json", JSON_VAR.type, {
|
|
98056
|
+
label: JSON_VAR.label,
|
|
98057
|
+
description: JSON_VAR.description
|
|
97986
98058
|
});
|
|
97987
98059
|
}
|
|
97988
98060
|
const BADGE_VARIANTS = ["default", "secondary", "destructive", "outline"];
|
|
@@ -98081,6 +98153,7 @@ function defaultBody$1() {
|
|
|
98081
98153
|
const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
98082
98154
|
__proto__: null,
|
|
98083
98155
|
BADGE_VARIANTS,
|
|
98156
|
+
JSON_VAR,
|
|
98084
98157
|
badgeSchema,
|
|
98085
98158
|
compatibilityDate: compatibilityDate$1,
|
|
98086
98159
|
defaultBody: defaultBody$1,
|
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-Yv78vz4W.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 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,a2 as y,a3 as z,a4 as w}from"./index-
|
|
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,a2 as y,a3 as z,a4 as w}from"./index-Yv78vz4W.js";const D={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=>w(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",D,[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 y,Q as U,a5 as w,z as v,I as e,H as n,b as s,S as _,K as F,a1 as H,a as E,U as c,V as u,W as d,X as p,J as m,Y as f,T as x,a2 as N,a3 as R,a4 as j}from"./index-
|
|
1
|
+
import{d as y,Q as U,a5 as w,z as v,I as e,H as n,b as s,S as _,K as F,a1 as H,a as E,U as c,V as u,W as d,X as p,J as m,Y as f,T as x,a2 as N,a3 as R,a4 as j}from"./index-Yv78vz4W.js";const k={class:"flex flex-col gap-3"},D={class:"flex items-start gap-2"},$={class:"grid grid-cols-2 gap-3"},B=y({name:"ShwfedHttpRequestActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(h){const o=U(h,"modelValue"),g=w(()=>{}),i=t=>R(g,t)??t,r=t=>j(g,t),S=["onSuccess","onWarning","onError","onInfo"];function T(t){const l={...o.value};t.length===0?delete l.messageExpression:l.messageExpression=t,o.value=l}function b(t){const l={...o.value};t.length===0?delete l.resultExpression:l.resultExpression=t,o.value=l}function V(t,l){const a={...o.value};l.length===0?Reflect.deleteProperty(a,t):a[t]=l,o.value=a}return(t,l)=>(E(),v("div",k,[e(s(x),{orientation:"vertical"},{default:n(()=>[e(s(c),{class:"text-xs text-zinc-500"},u({default:n(()=>[d(" "+p(i("expression")),1)]),_:2},[r("expression")?{name:"tooltip",fn:n(()=>[e(s(m),{source:r("expression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(f),{"model-value":o.value.expression,multiline:"",placeholder:"例:http.post('/api/foo').body({ id: row.id })","result-type":"HttpRequest",class:"min-h-16","onUpdate:modelValue":l[0]||(l[0]=a=>o.value={...o.value,expression:a})},null,8,["model-value"])]),_:1}),_("div",D,[e(s(x),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:n(()=>[e(s(c),{class:"text-xs text-zinc-500"},u({default:n(()=>[d(" "+p(i("messageExpression")),1)]),_:2},[r("messageExpression")?{name:"tooltip",fn:n(()=>[e(s(m),{source:r("messageExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(f),{"model-value":o.value.messageExpression??"",placeholder:"例:string(json.message)","result-type":"string","extra-vars":{json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},"onUpdate:modelValue":T},null,8,["model-value"])]),_:1}),e(s(x),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:n(()=>[e(s(c),{class:"text-xs text-zinc-500"},u({default:n(()=>[d(" "+p(i("resultExpression")),1)]),_:2},[r("resultExpression")?{name:"tooltip",fn:n(()=>[e(s(m),{source:r("resultExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(s(f),{"model-value":o.value.resultExpression??"",placeholder:"例:json.code == 0 ? 'success' : 'error'","result-type":"string","extra-vars":{json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},"onUpdate:modelValue":b},null,8,["model-value"])]),_:1})]),_("div",$,[(E(),v(F,null,H(S,a=>e(s(x),{key:a,orientation:"vertical",class:"min-w-0"},{default:n(()=>[e(s(c),{class:"text-xs text-zinc-500"},u({default:n(()=>[d(" "+p(i(a)),1)]),_:2},[r(a)?{name:"tooltip",fn:n(()=>[e(s(m),{source:r(a),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),e(N,{triggers:o.value[a]??[],"onUpdate:triggers":z=>V(a,z)},null,8,["triggers","onUpdate:triggers"])]),_:2},1024)),64))])]))}});export{B as default};
|
|
@@ -1 +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,a1 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 _,a2 as F,a3 as H,a4 as B,e as S}from"./index-
|
|
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,a1 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 _,a2 as F,a3 as H,a4 as B,e as S}from"./index-Yv78vz4W.js";const L={class:"flex flex-col gap-3"},N={class:"grid grid-cols-2 gap-3"},$={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=>B(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",L,[x("div",N,[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",$,[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,b1 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-
|
|
1
|
+
import{d as x,Q as k,b1 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-Yv78vz4W.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 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,a2 as h,T,e as V}from"./index-
|
|
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,a2 as h,T,e as V}from"./index-Yv78vz4W.js";const C={class:"flex flex-col gap-3"},k=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{k 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,a1 as h,c as $,ac as k,X as p,ad as w}from"./index-
|
|
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,a1 as h,c as $,ac as k,X as p,ad as w}from"./index-Yv78vz4W.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};
|
|
@@ -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-Yv78vz4W.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};
|
|
@@ -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,a1 as D,aj as N,a3 as C,a4 as F}from"./index-
|
|
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,a1 as D,aj as N,a3 as C,a4 as F}from"./index-Yv78vz4W.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 y,a as z,z as E,x as V,O as T,b as e,P as U,Q as $,R as j,c as F,H as l,S as v,I as s,T as d,U as u,V as p,W as m,X as f,J as g,Y as b,Z as h,$ as B,a0 as C,K as H,a1 as N,a2 as O,a3 as R,a4 as D}from"./index-
|
|
1
|
+
import{d as y,a as z,z as E,x as V,O as T,b as e,P as U,Q as $,R as j,c as F,H as l,S as v,I as s,T as d,U as u,V as p,W as m,X as f,J as g,Y as b,Z as h,$ as B,a0 as C,K as H,a1 as N,a2 as O,a3 as R,a4 as D}from"./index-Yv78vz4W.js";const P=y({__name:"FieldGroup",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(_){const r=_;return(x,i)=>(z(),E("div",{"data-slot":"field-group",class:T(e(U)("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",r.class))},[V(x.$slots,"default")],2))}}),q={class:"grid grid-cols-2 gap-4"},I={class:"grid grid-cols-2 gap-4"},J={class:"flex items-start gap-2"},L={class:"grid grid-cols-2 gap-3"},M=y({name:"ShwfedHttpRequestConfirmActionConfig",__name:"config",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(_){const r=$(_,"modelValue"),x=j(()=>{}),i=n=>R(x,n)??n,a=n=>D(x,n);function c(n){const t={...r.value,...n};for(const[o,k]of Object.entries(n))k===void 0&&Reflect.deleteProperty(t,o);r.value=t}const S=["onSuccess","onWarning","onError","onInfo"];function w(n,t){c({[n]:t.length===0?void 0:t})}return(n,t)=>(z(),F(e(P),null,{default:l(()=>[v("div",q,[s(e(d),{orientation:"vertical"},{default:l(()=>[s(e(u),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("expression")),1)]),_:2},[a("expression")?{name:"tooltip",fn:l(()=>[s(e(g),{source:a("expression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(e(b),{"model-value":r.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}),s(e(d),{orientation:"vertical"},{default:l(()=>[s(e(u),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("markdown")),1)]),_:2},[a("markdown")?{name:"tooltip",fn:l(()=>[s(e(g),{source:a("markdown"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(e(h),{markdown:"","model-value":r.value.markdown,"onUpdate:modelValue":t[1]||(t[1]=o=>c({markdown:o}))},null,8,["model-value"])]),_:1})]),v("div",I,[s(e(d),{orientation:"vertical"},{default:l(()=>[s(e(u),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("icon")),1)]),_:2},[a("icon")?{name:"tooltip",fn:l(()=>[s(e(g),{source:a("icon"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(e(B),{"model-value":r.value.icon??"","onUpdate:modelValue":t[2]||(t[2]=o=>c(o.trim()===""?{icon:void 0}:{icon:o}))},null,8,["model-value"])]),_:1}),s(e(d),{orientation:"vertical"},{default:l(()=>[s(e(u),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("color")),1)]),_:2},[a("color")?{name:"tooltip",fn:l(()=>[s(e(g),{source:a("color"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(e(C),{"model-value":r.value.color??"","onUpdate:modelValue":t[3]||(t[3]=o=>c(o.trim()===""?{color:void 0}:{color:o}))},null,8,["model-value"])]),_:1})]),v("div",J,[s(e(d),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:l(()=>[s(e(u),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("messageExpression")),1)]),_:2},[a("messageExpression")?{name:"tooltip",fn:l(()=>[s(e(g),{source:a("messageExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(e(b),{"model-value":r.value.messageExpression??"",placeholder:"例:string(json.message)","result-type":"string","extra-vars":{json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},"onUpdate:modelValue":t[4]||(t[4]=o=>c({messageExpression:o===""?void 0:o}))},null,8,["model-value"])]),_:1}),s(e(d),{orientation:"vertical",class:"flex-1 basis-0 min-w-0"},{default:l(()=>[s(e(u),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i("resultExpression")),1)]),_:2},[a("resultExpression")?{name:"tooltip",fn:l(()=>[s(e(g),{source:a("resultExpression"),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(e(b),{"model-value":r.value.resultExpression??"",placeholder:"例:json.code == 0 ? 'success' : 'error'","result-type":"string","extra-vars":{json:{type:"dyn",label:"HTTP 响应体(已解析 JSON)"}},"onUpdate:modelValue":t[5]||(t[5]=o=>c({resultExpression:o===""?void 0:o}))},null,8,["model-value"])]),_:1})]),v("div",L,[(z(),E(H,null,N(S,o=>s(e(d),{key:o,orientation:"vertical",class:"min-w-0"},{default:l(()=>[s(e(u),{class:"text-xs text-zinc-500"},p({default:l(()=>[m(" "+f(i(o)),1)]),_:2},[a(o)?{name:"tooltip",fn:l(()=>[s(e(g),{source:a(o),block:"",class:"prose prose-sm prose-zinc"},null,8,["source"])]),key:"0"}:void 0]),1024),s(O,{triggers:r.value[o]??[],"onUpdate:triggers":k=>w(o,k)},null,8,["triggers","onUpdate:triggers"])]),_:2},1024)),64))])]),_:1}))}});export{M as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,a_ as u,o as m,a$ as p,am as g,L as l,y,b0 as I}from"./index-
|
|
1
|
+
import{d as f,a_ as u,o as m,a$ as p,am as g,L as l,y,b0 as I}from"./index-Yv78vz4W.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 _};
|