@shwfed/config 2.7.6 → 2.7.8
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 +165 -52
- package/dist/module.json +1 -1
- package/dist/preview/assets/badge-KAEXz3VO.js +1 -0
- package/dist/preview/assets/{config-C947O8za.js → config-BXx5syNf.js} +1 -1
- package/dist/preview/assets/{config-DhAntnE5.js → config-Bb9Yeh33.js} +1 -1
- package/dist/preview/assets/config-C-QRPeN1.js +1 -0
- package/dist/preview/assets/config-CkKx7sVR.js +1 -0
- package/dist/preview/assets/config-CtbYlZCL.js +1 -0
- package/dist/preview/assets/{config-Bl8L6943.js → config-DPlbFBRi.js} +1 -1
- package/dist/preview/assets/config-DbfJWa8K.js +1 -0
- package/dist/preview/assets/{config-DppExb4h.js → config-DbirfZyy.js} +1 -1
- package/dist/preview/assets/{config-B7hXY5FF.js → config-ZczGik30.js} +1 -1
- package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-CQ6MUPKO.js +1 -0
- package/dist/preview/assets/{index-DiC1rvCq.js → index-Bv_aA34a.js} +1 -1
- package/dist/preview/assets/{index-B0PL01fm.css → index-C9P-6gZd.css} +1 -1
- package/dist/preview/assets/index-CJFU9znN.js +1 -0
- package/dist/preview/assets/index-DUOkekYu.js +680 -0
- package/dist/preview/assets/item-SC0WQMVu.js +1 -0
- package/dist/preview/assets/{runtime-DmV_M4B_.js → runtime-BPOf7Yqz.js} +1 -1
- package/dist/preview/assets/runtime-CC2caFS9.js +1 -0
- package/dist/preview/assets/runtime-CLaRFZzt.js +1 -0
- package/dist/preview/assets/runtime-Ckuz5Kxm.js +1 -0
- package/dist/preview/assets/{runtime-BQnHKogz.js → runtime-CnKlH0mi.js} +1 -1
- package/dist/preview/assets/runtime-DO0anKbw.js +1 -0
- package/dist/preview/assets/{runtime-kLWO8JbC.js → runtime-DcStOiOi.js} +1 -1
- package/dist/preview/assets/runtime-EVgYW6_7.js +1 -0
- package/dist/preview/assets/runtime-i32sR7d3.js +1 -0
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-21/com.shwfed.actions.button.navigation/runtime.vue +16 -2
- package/dist/runtime/components/block-layout-editor/index.vue +1 -4
- 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-05-17/com.shwfed.block.chart.xy/runtime.vue +2 -2
- package/dist/runtime/components/config/blocks/2026-06-01/com.shwfed.block.animated.number/item.vue +2 -2
- package/dist/runtime/components/config/blocks/2026-06-01/com.shwfed.block.animated.number/schema.js +2 -2
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/badge.vue +3 -2
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.js +2 -2
- package/dist/runtime/components/form/config.vue +24 -16
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/runtime.vue +6 -5
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/runtime.vue +3 -4
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.vue +3 -4
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.vue +3 -4
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +6 -5
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +6 -5
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +2 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +3 -4
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +3 -4
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +3 -4
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +3 -4
- package/dist/runtime/components/form/schema.d.ts +1 -1
- package/dist/runtime/components/form/schema.js +8 -3
- package/dist/runtime/components/form/utils/initial.d.ts +5 -4
- package/dist/runtime/components/form/utils/initial.js +2 -2
- 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/runtime.vue +7 -6
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.vue +7 -6
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.vue +7 -6
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.vue +7 -6
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/runtime.vue +7 -6
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/runtime.vue +7 -6
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.vue +3 -4
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.vue +3 -4
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +7 -6
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +7 -6
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +3 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +3 -4
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.js +2 -2
- package/dist/runtime/components/table/config.vue +0 -36
- package/dist/runtime/components/table/index.vue +3 -4
- package/dist/runtime/components/table/schema.js +3 -3
- 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 +36 -0
- package/dist/runtime/share/expression.js +38 -17
- package/dist/runtime/share/request.d.ts +29 -0
- package/dist/runtime/share/request.js +11 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +3 -3
- package/dist/runtime/vendor/cel-js/PROMPT.md +44 -3
- package/dist/runtime/vendor/cel-js/lib/functions.js +2 -2
- package/dist/runtime/vendor/cel-js/lib/macros.js +66 -14
- package/dist/runtime/vendor/cel-js/lib/optional.js +52 -1
- package/package.json +1 -1
- package/dist/preview/assets/badge-C-IvPZBx.js +0 -1
- package/dist/preview/assets/config-DXlCQMVi.js +0 -1
- package/dist/preview/assets/config-Dj0rEZRq.js +0 -1
- package/dist/preview/assets/config-_aVQvlhc.js +0 -1
- package/dist/preview/assets/config-l01zamcS.js +0 -1
- package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-BbuC0qEM.js +0 -1
- package/dist/preview/assets/index-BNaI1T0H.js +0 -680
- package/dist/preview/assets/index-BwoBmSxu.js +0 -1
- package/dist/preview/assets/item-GFiAkFW6.js +0 -1
- package/dist/preview/assets/runtime-5h5U6Ozr.js +0 -1
- package/dist/preview/assets/runtime-B6dXW6zW.js +0 -1
- package/dist/preview/assets/runtime-BEOIc4zU.js +0 -1
- package/dist/preview/assets/runtime-Bx7G-5dR.js +0 -1
- package/dist/preview/assets/runtime-TNDFpOlo.js +0 -1
- package/dist/preview/assets/runtime-g9hb36Vh.js +0 -1
package/dist/mcp.mjs
CHANGED
|
@@ -37700,6 +37700,57 @@ function register(registry2) {
|
|
|
37700
37700
|
}
|
|
37701
37701
|
})
|
|
37702
37702
|
);
|
|
37703
|
+
registry2.registerFunctionOverload(
|
|
37704
|
+
"optional<A>.flatMap(ast, ast): optional<dyn>",
|
|
37705
|
+
createFlatMapExpander()
|
|
37706
|
+
);
|
|
37707
|
+
}
|
|
37708
|
+
function createFlatMapExpander() {
|
|
37709
|
+
const functionDesc = "optional.flatMap(var, body)";
|
|
37710
|
+
const invalidVar2 = `${functionDesc} invalid iteration variable`;
|
|
37711
|
+
const invalidReceiver = `${functionDesc} receiver`;
|
|
37712
|
+
const invalidBody = `${functionDesc} body`;
|
|
37713
|
+
function ensureOptional(value, ast, description2) {
|
|
37714
|
+
if (isOption(value)) return value;
|
|
37715
|
+
throw evaluationError("optional_expected", `${description2} must be optional`, ast);
|
|
37716
|
+
}
|
|
37717
|
+
function ensureOptionalType(checker, node, ctx, description2) {
|
|
37718
|
+
const type2 = checker.check(node, ctx);
|
|
37719
|
+
if (type2.kind === "optional") return type2;
|
|
37720
|
+
if (type2.kind === "dyn") return checker.getType("optional");
|
|
37721
|
+
throw checker.createError("optional_expected", `${description2} must be optional, got '${type2}'`, node);
|
|
37722
|
+
}
|
|
37723
|
+
function typeCheck(checker, macro, ctx) {
|
|
37724
|
+
const receiverType = ensureOptionalType(checker, macro.receiver, ctx, invalidReceiver);
|
|
37725
|
+
const innerType = receiverType.valueType ?? checker.getType("dyn");
|
|
37726
|
+
macro.iterCtx = ctx.forkWithVariable(macro.iterVarName, innerType);
|
|
37727
|
+
return ensureOptionalType(checker, macro.body, macro.iterCtx, invalidBody);
|
|
37728
|
+
}
|
|
37729
|
+
function evaluate2(ev, macro, ctx) {
|
|
37730
|
+
return gen(function* () {
|
|
37731
|
+
const recv = yield* ev.eval(macro.receiver, ctx);
|
|
37732
|
+
const optional2 = ensureOptional(recv, macro.receiver, invalidReceiver);
|
|
37733
|
+
if (isNone(optional2)) return none$4();
|
|
37734
|
+
const iterCtx = macro.iterCtx.reuse(ctx);
|
|
37735
|
+
const result = yield* ev.eval(macro.body, iterCtx.setIterValue(optional2.value, ev));
|
|
37736
|
+
return ensureOptional(result, macro.body, invalidBody);
|
|
37737
|
+
});
|
|
37738
|
+
}
|
|
37739
|
+
return (opts) => {
|
|
37740
|
+
const { args: args2, receiver, ast } = opts;
|
|
37741
|
+
const iterVar = args2[0];
|
|
37742
|
+
if (iterVar.op !== "id") throw parseError("invalid_macro_argument", invalidVar2, iterVar);
|
|
37743
|
+
return {
|
|
37744
|
+
ast,
|
|
37745
|
+
receiver,
|
|
37746
|
+
functionDesc,
|
|
37747
|
+
iterVarName: iterVar.args,
|
|
37748
|
+
body: args2[1],
|
|
37749
|
+
iterCtx: void 0,
|
|
37750
|
+
evaluate: evaluate2,
|
|
37751
|
+
typeCheck
|
|
37752
|
+
};
|
|
37753
|
+
};
|
|
37703
37754
|
}
|
|
37704
37755
|
const hasOwn = Object.hasOwn;
|
|
37705
37756
|
const objKeys = Object.keys;
|
|
@@ -41268,7 +41319,7 @@ function registerFunctions(registry2) {
|
|
|
41268
41319
|
functionOverload("Date.format(string): string", (d, fmt) => format$2(d, fmt));
|
|
41269
41320
|
registry2.registerType("File", File);
|
|
41270
41321
|
registry2.registerType("URL", URL);
|
|
41271
|
-
functionOverload("URL.
|
|
41322
|
+
functionOverload("URL.query(string): optional<string>", (url, key) => optionalOf(url.searchParams.get(key) ?? void 0));
|
|
41272
41323
|
register(registry2);
|
|
41273
41324
|
}
|
|
41274
41325
|
function stringSize(str) {
|
|
@@ -43926,27 +43977,79 @@ function assertIdentifier(node, message2) {
|
|
|
43926
43977
|
if (node.op === "id") return node.args;
|
|
43927
43978
|
throw parseError("invalid_macro_argument", message2, node);
|
|
43928
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
|
+
}
|
|
43929
43995
|
function createMapExpander(hasFilter) {
|
|
43930
43996
|
const functionDesc = hasFilter ? "map(var, filter, transform)" : "map(var, transform)";
|
|
43931
43997
|
const invalidMsg = `${functionDesc} invalid predicate iteration variable`;
|
|
43932
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
|
+
}
|
|
43933
44041
|
return (opts) => {
|
|
43934
44042
|
const { args: args2, receiver, ast: callAst } = opts;
|
|
43935
|
-
const [iterVar, predicate, transform2] = hasFilter ? args2 : [args2[0], null, args2[1]];
|
|
43936
|
-
let step2 = transform2.clone(OPERATORS.accuPush, transform2);
|
|
43937
|
-
if (predicate) {
|
|
43938
|
-
const accuValue = predicate.clone(OPERATORS.accuValue, void 0);
|
|
43939
|
-
step2 = predicate.clone(OPERATORS.ternary, [predicate.setMeta("label", label), step2, accuValue]);
|
|
43940
|
-
}
|
|
43941
44043
|
return {
|
|
43942
|
-
|
|
43943
|
-
|
|
43944
|
-
|
|
43945
|
-
|
|
43946
|
-
|
|
43947
|
-
|
|
43948
|
-
|
|
43949
|
-
|
|
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
|
|
43950
44053
|
};
|
|
43951
44054
|
};
|
|
43952
44055
|
}
|
|
@@ -45411,9 +45514,18 @@ const Locale = Tuple(
|
|
|
45411
45514
|
title: "Locale",
|
|
45412
45515
|
description: "本地化文本列表,zh 必须为首项"
|
|
45413
45516
|
});
|
|
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
|
+
}
|
|
45414
45526
|
function matchesResultType(actual, expected) {
|
|
45415
|
-
if (typeof expected === "string") return
|
|
45416
|
-
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));
|
|
45417
45529
|
return expected(actual);
|
|
45418
45530
|
}
|
|
45419
45531
|
function formatExpectedType(expected) {
|
|
@@ -45427,6 +45539,21 @@ function registerScopeAddressVar(env) {
|
|
|
45427
45539
|
description: "按 UUID 寻址被遮蔽的祖先作用域"
|
|
45428
45540
|
});
|
|
45429
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
|
+
}
|
|
45430
45557
|
function buildDescription(baseline, env, resultType) {
|
|
45431
45558
|
const defs = env.getDefinitions();
|
|
45432
45559
|
const baselineVarNames = new Set(baseline.variables.map((v) => v.name));
|
|
@@ -45460,21 +45587,7 @@ function Expression(options) {
|
|
|
45460
45587
|
const description2 = buildDescription(baseline, env, options.resultType);
|
|
45461
45588
|
return String$.pipe(
|
|
45462
45589
|
filter(
|
|
45463
|
-
(expression) =>
|
|
45464
|
-
const result = env.check(expression);
|
|
45465
|
-
if (isLeft(result)) {
|
|
45466
|
-
const error2 = result.left;
|
|
45467
|
-
const summary2 = error2 instanceof CelError ? error2.summary : String(error2);
|
|
45468
|
-
return `表达式无效:${summary2}`;
|
|
45469
|
-
}
|
|
45470
|
-
if (options.resultType) {
|
|
45471
|
-
const actualType = result.right;
|
|
45472
|
-
if (!matchesResultType(actualType, options.resultType)) {
|
|
45473
|
-
return `表达式返回类型不匹配,期望 ${formatExpectedType(options.resultType)},实际为 ${actualType}`;
|
|
45474
|
-
}
|
|
45475
|
-
}
|
|
45476
|
-
return true;
|
|
45477
|
-
},
|
|
45590
|
+
(expression) => evaluateExpression(env, expression, options.resultType) ?? true,
|
|
45478
45591
|
{
|
|
45479
45592
|
title: "CEL Expression",
|
|
45480
45593
|
description: description2
|
|
@@ -89166,7 +89279,7 @@ function configureWithJson$2(configure) {
|
|
|
89166
89279
|
const isListType$c = (actual) => actual === "dyn" || actual.startsWith("list");
|
|
89167
89280
|
function schema$T(configure) {
|
|
89168
89281
|
const CelBool = Expression({ configure, resultType: "bool" });
|
|
89169
|
-
const CelHttpRequest = Expression({ configure, resultType:
|
|
89282
|
+
const CelHttpRequest = Expression({ configure, resultType: HttpRequestResult });
|
|
89170
89283
|
const CelOptions = Expression({ configure: configureWithJson$2(configure), resultType: isListType$c });
|
|
89171
89284
|
const CelOptionValue = Expression({ configure: configureWithOption$3(configure), resultType: "dyn" });
|
|
89172
89285
|
const LocaleOptionLabel = LocaleMarkdown({ configure: configureWithOption$3(configure) });
|
|
@@ -92237,7 +92350,7 @@ function schema$A(configure) {
|
|
|
92237
92350
|
configure(env);
|
|
92238
92351
|
registerRowVariablesIfAbsent(env);
|
|
92239
92352
|
},
|
|
92240
|
-
resultType:
|
|
92353
|
+
resultType: HttpRequestResult
|
|
92241
92354
|
});
|
|
92242
92355
|
const CelOptions = Expression({
|
|
92243
92356
|
configure: (env) => {
|
|
@@ -92507,7 +92620,7 @@ function schema$y(configure) {
|
|
|
92507
92620
|
configure(env);
|
|
92508
92621
|
registerRowVariablesIfAbsent(env);
|
|
92509
92622
|
},
|
|
92510
|
-
resultType:
|
|
92623
|
+
resultType: HttpRequestResult
|
|
92511
92624
|
});
|
|
92512
92625
|
const CelOptions = Expression({
|
|
92513
92626
|
configure: (env) => {
|
|
@@ -92888,7 +93001,7 @@ function remoteOptionsSchema$7(configure) {
|
|
|
92888
93001
|
configure(env);
|
|
92889
93002
|
registerRowVariablesIfAbsent(env);
|
|
92890
93003
|
},
|
|
92891
|
-
resultType:
|
|
93004
|
+
resultType: HttpRequestResult
|
|
92892
93005
|
});
|
|
92893
93006
|
const CelOptions = Expression({
|
|
92894
93007
|
configure: (env) => {
|
|
@@ -93120,7 +93233,7 @@ function remoteOptionsSchema$6(configure) {
|
|
|
93120
93233
|
configure(env);
|
|
93121
93234
|
registerRowVariablesIfAbsent(env);
|
|
93122
93235
|
},
|
|
93123
|
-
resultType:
|
|
93236
|
+
resultType: HttpRequestResult
|
|
93124
93237
|
});
|
|
93125
93238
|
const CelOptions = Expression({
|
|
93126
93239
|
configure: (env) => {
|
|
@@ -93299,7 +93412,7 @@ function remoteOptionsSchema$5(configure) {
|
|
|
93299
93412
|
configure(env);
|
|
93300
93413
|
registerRowVariablesIfAbsent(env);
|
|
93301
93414
|
},
|
|
93302
|
-
resultType:
|
|
93415
|
+
resultType: HttpRequestResult
|
|
93303
93416
|
});
|
|
93304
93417
|
const CelOptions = Expression({
|
|
93305
93418
|
configure: (env) => {
|
|
@@ -93531,7 +93644,7 @@ function remoteOptionsSchema$4(configure) {
|
|
|
93531
93644
|
configure(env);
|
|
93532
93645
|
registerRowVariablesIfAbsent(env);
|
|
93533
93646
|
},
|
|
93534
|
-
resultType:
|
|
93647
|
+
resultType: HttpRequestResult
|
|
93535
93648
|
});
|
|
93536
93649
|
const CelOptions = Expression({
|
|
93537
93650
|
configure: (env) => {
|
|
@@ -93695,7 +93808,7 @@ function schema$r(configure) {
|
|
|
93695
93808
|
};
|
|
93696
93809
|
const CelDataSourceRequest = Expression({
|
|
93697
93810
|
configure: dataSourceConfigure,
|
|
93698
|
-
resultType:
|
|
93811
|
+
resultType: HttpRequestResult
|
|
93699
93812
|
});
|
|
93700
93813
|
const CelDataSourceData = Expression({
|
|
93701
93814
|
configure: (env) => {
|
|
@@ -93836,7 +93949,7 @@ function schema$q(configure) {
|
|
|
93836
93949
|
};
|
|
93837
93950
|
const CelDataSourceRequest = Expression({
|
|
93838
93951
|
configure: dataSourceConfigure,
|
|
93839
|
-
resultType:
|
|
93952
|
+
resultType: HttpRequestResult
|
|
93840
93953
|
});
|
|
93841
93954
|
const CelDataSourceData = Expression({
|
|
93842
93955
|
configure: (env) => {
|
|
@@ -93989,7 +94102,7 @@ function remoteOptionsSchema$3(configure) {
|
|
|
93989
94102
|
configure(env);
|
|
93990
94103
|
registerRowVariablesIfAbsent(env);
|
|
93991
94104
|
},
|
|
93992
|
-
resultType:
|
|
94105
|
+
resultType: HttpRequestResult
|
|
93993
94106
|
});
|
|
93994
94107
|
const CelOptions = Expression({
|
|
93995
94108
|
configure: (env) => {
|
|
@@ -94275,7 +94388,7 @@ function remoteOptionsSchema$2(configure) {
|
|
|
94275
94388
|
configure(env);
|
|
94276
94389
|
registerRowVariablesIfAbsent(env);
|
|
94277
94390
|
},
|
|
94278
|
-
resultType:
|
|
94391
|
+
resultType: HttpRequestResult
|
|
94279
94392
|
});
|
|
94280
94393
|
const CelOptions = Expression({
|
|
94281
94394
|
configure: (env) => {
|
|
@@ -94542,7 +94655,7 @@ function schema$n(configure) {
|
|
|
94542
94655
|
};
|
|
94543
94656
|
const CelDataSourceRequest = Expression({
|
|
94544
94657
|
configure: dataSourceConfigure,
|
|
94545
|
-
resultType:
|
|
94658
|
+
resultType: HttpRequestResult
|
|
94546
94659
|
});
|
|
94547
94660
|
const CelDataSourceData = Expression({
|
|
94548
94661
|
configure: (env) => {
|
|
@@ -94706,7 +94819,7 @@ function schema$m(configure) {
|
|
|
94706
94819
|
};
|
|
94707
94820
|
const CelDataSourceRequest = Expression({
|
|
94708
94821
|
configure: dataSourceConfigure,
|
|
94709
|
-
resultType:
|
|
94822
|
+
resultType: HttpRequestResult
|
|
94710
94823
|
});
|
|
94711
94824
|
const CelDataSourceData = Expression({
|
|
94712
94825
|
configure: (env) => {
|
|
@@ -95224,7 +95337,7 @@ function DataSource(configure, extras) {
|
|
|
95224
95337
|
configure: (env) => {
|
|
95225
95338
|
configure(env);
|
|
95226
95339
|
},
|
|
95227
|
-
resultType:
|
|
95340
|
+
resultType: HttpRequestResult
|
|
95228
95341
|
});
|
|
95229
95342
|
const CelRows = Expression({
|
|
95230
95343
|
configure: (env) => {
|
|
@@ -95255,7 +95368,7 @@ function tableDataSource(configure) {
|
|
|
95255
95368
|
configure(env);
|
|
95256
95369
|
registerDataSourceRequestVars(env);
|
|
95257
95370
|
},
|
|
95258
|
-
resultType:
|
|
95371
|
+
resultType: HttpRequestResult
|
|
95259
95372
|
});
|
|
95260
95373
|
const CelRows = Expression({
|
|
95261
95374
|
configure: (env) => {
|
|
@@ -96178,7 +96291,7 @@ function itemSchema$2(configure) {
|
|
|
96178
96291
|
function remoteOptionsSchema$1(configure) {
|
|
96179
96292
|
const CelRequest = Union2(
|
|
96180
96293
|
Literal2(""),
|
|
96181
|
-
Expression({ configure, resultType:
|
|
96294
|
+
Expression({ configure, resultType: HttpRequestResult })
|
|
96182
96295
|
);
|
|
96183
96296
|
const CelOptions = Expression({ configure: configureWithJson$1(configure), resultType: isListType$2 });
|
|
96184
96297
|
const CelOptionValue = Expression({ configure: configureWithOption$1(configure), resultType: "dyn" });
|
|
@@ -96370,7 +96483,7 @@ function itemSchema$1(configure) {
|
|
|
96370
96483
|
function remoteOptionsSchema(configure) {
|
|
96371
96484
|
const CelRequest = Union2(
|
|
96372
96485
|
Literal2(""),
|
|
96373
|
-
Expression({ configure, resultType:
|
|
96486
|
+
Expression({ configure, resultType: HttpRequestResult })
|
|
96374
96487
|
);
|
|
96375
96488
|
const CelOptions = Expression({ configure: configureWithJson(configure), resultType: isListType$1 });
|
|
96376
96489
|
const CelOptionValue = Expression({ configure: configureWithOption(configure), resultType: "dyn" });
|
|
@@ -97303,7 +97416,7 @@ function FormConfig(configure) {
|
|
|
97303
97416
|
registerFormVariablesIfAbsent(env);
|
|
97304
97417
|
configure(env);
|
|
97305
97418
|
};
|
|
97306
|
-
const CelInitialRequest = Expression({ configure: formConfigure, resultType:
|
|
97419
|
+
const CelInitialRequest = Expression({ configure: formConfigure, resultType: HttpRequestResult });
|
|
97307
97420
|
const CelInitialData = Expression({
|
|
97308
97421
|
configure: (env) => {
|
|
97309
97422
|
formConfigure(env);
|
|
@@ -97810,7 +97923,7 @@ function registerJson$1(env) {
|
|
|
97810
97923
|
function dataSourceSchema(configure) {
|
|
97811
97924
|
const CelRequest = Expression({
|
|
97812
97925
|
configure,
|
|
97813
|
-
resultType:
|
|
97926
|
+
resultType: HttpRequestResult
|
|
97814
97927
|
});
|
|
97815
97928
|
const CelNumber = Expression({
|
|
97816
97929
|
configure: (env) => {
|
|
@@ -97937,7 +98050,7 @@ const BADGE_VARIANTS = ["default", "secondary", "destructive", "outline"];
|
|
|
97937
98050
|
function badgeSchema(configure) {
|
|
97938
98051
|
const CelRequest = Expression({
|
|
97939
98052
|
configure,
|
|
97940
|
-
resultType:
|
|
98053
|
+
resultType: HttpRequestResult
|
|
97941
98054
|
});
|
|
97942
98055
|
const Content = LocaleMarkdown({
|
|
97943
98056
|
configure: (env) => {
|
package/dist/module.json
CHANGED
|
@@ -0,0 +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-DUOkekYu.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
|
|
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-DUOkekYu.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 v,
|
|
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-DUOkekYu.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};
|
|
@@ -0,0 +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-DUOkekYu.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 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-DUOkekYu.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};
|
|
@@ -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,a2 as h,T,e as V}from"./index-DUOkekYu.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
|
|
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-DUOkekYu.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};
|
|
@@ -0,0 +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-DUOkekYu.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 k,
|
|
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-DUOkekYu.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
|
|
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-DUOkekYu.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 f,a_ as u,o as m,a$ as p,am as g,L as l,y,b0 as I}from"./index-DUOkekYu.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 _};
|