@shwfed/config 2.8.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp.mjs +65 -10
- package/dist/module.json +1 -1
- package/dist/preview/assets/{badge-BI1mdo92.js → badge-BFb-1pCT.js} +1 -1
- package/dist/preview/assets/config-0DneC44h.js +1 -0
- package/dist/preview/assets/{config-OrJljNWU.js → config-ByZ0313c.js} +1 -1
- package/dist/preview/assets/config-CBypmimA.js +1 -0
- package/dist/preview/assets/config-CRxO6DVD.js +1 -0
- package/dist/preview/assets/config-CgGwKTMB.js +1 -0
- package/dist/preview/assets/{config-DuzQXHvg.js → config-DFaQa_Ua.js} +1 -1
- package/dist/preview/assets/{config-XgVqueyq.js → config-DlA3bMzk.js} +1 -1
- package/dist/preview/assets/{config-DqUnpWZk.js → config-iysOo1dH.js} +1 -1
- package/dist/preview/assets/config-rr6HpsHl.js +1 -0
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-lEhYVEcN.js → definition.vue_vue_type_script_setup_true_lang-C1MSczMq.js} +1 -1
- package/dist/preview/assets/index-BlHAyQdm.css +1 -0
- package/dist/preview/assets/index-CLQQPdxj.js +1 -0
- package/dist/preview/assets/index-CpLuDJe9.js +688 -0
- package/dist/preview/assets/{index-BvLLQuQr.js → index-CuSwhbkD.js} +1 -1
- package/dist/preview/assets/{item-DMtXi_cx.js → item-iBF7XNGG.js} +1 -1
- package/dist/preview/assets/{runtime-wVZ1xP8L.js → runtime-BPK6zdoy.js} +1 -1
- package/dist/preview/assets/runtime-BmED451i.js +1 -0
- package/dist/preview/assets/{runtime-CjJBU_e1.js → runtime-CPiaq4_s.js} +1 -1
- package/dist/preview/assets/{runtime-CWqQzWuc.js → runtime-CY9TirG6.js} +1 -1
- package/dist/preview/assets/{runtime-CA58Mif7.js → runtime-D4WPJrz9.js} +1 -1
- package/dist/preview/assets/runtime-DrKKzpjq.js +1 -0
- package/dist/preview/assets/{runtime-DnXoWy2A.js → runtime-S7Afa8F4.js} +1 -1
- package/dist/preview/assets/{runtime-DeUmGsM_.js → runtime-Uz1zCLPO.js} +1 -1
- package/dist/preview/assets/{runtime-BUPuX-Gq.js → runtime-XjumEj6A.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.d.vue.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue +28 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/config.vue.d.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/runtime.vue +17 -17
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.d.ts +4 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json/schema.js +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.d.vue.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue +25 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/config.vue.d.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/runtime.vue +2 -7
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +4 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.js +8 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.d.vue.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/config.vue.d.ts +16 -16
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +18 -18
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +13 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +10 -2
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +20 -4
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +17 -9
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +25 -5
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +4 -1
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +18 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +4 -1
- package/dist/runtime/components/form/index.vue +11 -3
- package/dist/runtime/components/form/schema.d.ts +4 -0
- package/dist/runtime/components/form/schema.js +1 -0
- package/dist/runtime/components/form/unit-config.vue +6 -1
- package/dist/runtime/components/form/utils/form-vars.js +2 -0
- package/dist/runtime/components/form/utils/resolve.d.ts +10 -0
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +13 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +4 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +10 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +4 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +16 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +3 -1
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +13 -5
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.js +3 -1
- package/dist/runtime/components/table/config.vue +5 -1
- package/dist/runtime/components/table/row-provider.vue +8 -0
- package/dist/runtime/components/table/utils/resolve.d.ts +7 -0
- package/dist/runtime/components/table/utils/shared.js +4 -0
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.d.vue.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue +9 -1
- package/dist/runtime/components/ui/expression-editor/CodeMirrorInput.vue.d.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +2 -2
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +33 -4
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +2 -2
- package/dist/runtime/components/ui/expression-editor/picker-entries.d.ts +3 -2
- package/dist/runtime/components/ui/expression-editor/picker-entries.js +14 -3
- package/dist/runtime/components/ui/expression-editor/selection-chip-extension.d.ts +4 -0
- package/dist/runtime/components/ui/expression-editor/selection-chip-extension.js +119 -0
- package/dist/runtime/components/ui/expression-editor/selection-refs.d.ts +8 -0
- package/dist/runtime/components/ui/expression-editor/selection-refs.js +29 -0
- package/dist/runtime/share/event-bus.d.ts +12 -12
- package/dist/runtime/utils/cel-context.d.ts +22 -0
- package/dist/runtime/utils/cel-context.js +8 -0
- package/dist/runtime/utils/selections-registry.d.ts +77 -0
- package/dist/runtime/utils/selections-registry.js +49 -0
- package/dist/runtime/vendor/cel-js/CLAUDE.md +2 -0
- package/dist/runtime/vendor/cel-js/PROMPT.md +8 -0
- package/dist/runtime/vendor/cel-js/lib/functions.js +4 -0
- package/package.json +1 -1
- package/dist/preview/assets/config-BNF2r9jW.js +0 -1
- package/dist/preview/assets/config-BxuGYvER.js +0 -1
- package/dist/preview/assets/config-Cy5w3JWQ.js +0 -1
- package/dist/preview/assets/config-Du5SuNSb.js +0 -1
- package/dist/preview/assets/config-ggyCcWNZ.js +0 -1
- package/dist/preview/assets/index-DsMR5NfK.css +0 -1
- package/dist/preview/assets/index-Yv78vz4W.js +0 -680
- package/dist/preview/assets/index-yrBKwEfk.js +0 -1
- package/dist/preview/assets/runtime-2S3Yr051.js +0 -1
- package/dist/preview/assets/runtime-C4jFTZ4Z.js +0 -1
- package/dist/runtime/share/form-validate.d.ts +0 -18
- package/dist/runtime/share/form-validate.js +0 -8
|
@@ -7,6 +7,7 @@ export type CELVar = {
|
|
|
7
7
|
};
|
|
8
8
|
export type CELContext = Record<string, CELVar>;
|
|
9
9
|
export declare const SCOPE_ADDRESS_VAR = "__scopes__";
|
|
10
|
+
export declare const SELECTIONS_VAR = "selections";
|
|
10
11
|
export type ScopeAccessor = Record<string, () => unknown>;
|
|
11
12
|
export declare function provideCELContext(context: CELContext): void;
|
|
12
13
|
export declare function injectCELContext(): CELContext;
|
|
@@ -43,4 +44,25 @@ export declare function provideScopeAncestor(ancestor: Ref<ScopeAncestor | null>
|
|
|
43
44
|
* first. Empty when nothing up the config tree exposes an addressable scope.
|
|
44
45
|
*/
|
|
45
46
|
export declare function useScopeAncestry(): Ref<ReadonlyArray<ScopeAncestor>>;
|
|
47
|
+
/** One selection-like field in the editing form, as the picker/chip surfaces it. */
|
|
48
|
+
export type SelectionFieldRef = Readonly<{
|
|
49
|
+
/** Field uuid keyed into `selections["<id>"]` — the registry/publish key. */
|
|
50
|
+
id: string;
|
|
51
|
+
/** The field's designer-facing name, shown instead of the raw uuid. */
|
|
52
|
+
name: string;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Advertise the form's selection-like fields to every descendant
|
|
56
|
+
* ExpressionEditor, so it can render `selections["<id>"]` as the field's name
|
|
57
|
+
* and list those fields in the variable picker. Design-time only — the runtime
|
|
58
|
+
* counterpart is `provideSelectionsRegistry` (utils/selections-registry). A form
|
|
59
|
+
* host provides the whole roster; a nested form overrides with its own (a field
|
|
60
|
+
* references its own form's siblings, not an outer form's).
|
|
61
|
+
*/
|
|
62
|
+
export declare function provideSelectionRoster(roster: Ref<ReadonlyArray<SelectionFieldRef>>): void;
|
|
63
|
+
/**
|
|
64
|
+
* The selection-like fields of the enclosing form, or empty when the editor
|
|
65
|
+
* sits outside any form (a table column expression, a standalone editor).
|
|
66
|
+
*/
|
|
67
|
+
export declare function useSelectionRoster(): Ref<ReadonlyArray<SelectionFieldRef>>;
|
|
46
68
|
export declare function celBindings(context: CELContext): Record<string, unknown>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { computed, inject, provide, shallowRef } from "vue";
|
|
2
2
|
import { injectLocal, provideLocal } from "@vueuse/core";
|
|
3
3
|
export const SCOPE_ADDRESS_VAR = "__scopes__";
|
|
4
|
+
export const SELECTIONS_VAR = "selections";
|
|
4
5
|
const CEL_CONTEXT_KEY = Symbol("cel-context");
|
|
5
6
|
export function provideCELContext(context) {
|
|
6
7
|
const parent = injectLocal(CEL_CONTEXT_KEY, {});
|
|
@@ -46,6 +47,13 @@ export function provideScopeAncestor(ancestor) {
|
|
|
46
47
|
export function useScopeAncestry() {
|
|
47
48
|
return inject(SCOPE_ANCESTRY_KEY, void 0) ?? shallowRef([]);
|
|
48
49
|
}
|
|
50
|
+
const SELECTION_ROSTER_KEY = Symbol("cel-selection-roster");
|
|
51
|
+
export function provideSelectionRoster(roster) {
|
|
52
|
+
provide(SELECTION_ROSTER_KEY, roster);
|
|
53
|
+
}
|
|
54
|
+
export function useSelectionRoster() {
|
|
55
|
+
return inject(SELECTION_ROSTER_KEY, void 0) ?? shallowRef([]);
|
|
56
|
+
}
|
|
49
57
|
export function celBindings(context) {
|
|
50
58
|
const out = {};
|
|
51
59
|
for (const [name, entry] of Object.entries(context)) {
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { ShallowRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Host-owned map of `field-uuid → the field's currently-resolved full option`.
|
|
4
|
+
*
|
|
5
|
+
* Selection-like fields (combobox, tree-select, …) persist only a *key* — the
|
|
6
|
+
* scalar `optionValue` / `nodeKey` extracts from the chosen option. The rest of
|
|
7
|
+
* the option object (a backend record's `code`, `label`, …) is in hand while the
|
|
8
|
+
* field resolves the selection but is otherwise dropped. A *sibling* expression
|
|
9
|
+
* — say a related select whose request needs the chosen option's `code` — has no
|
|
10
|
+
* way to reach it: siblings share only the form state (the `form` CEL var), and
|
|
11
|
+
* the persisted key deliberately doesn't carry the rest.
|
|
12
|
+
*
|
|
13
|
+
* This registry is that missing channel. The common host (the form root; a table
|
|
14
|
+
* row) owns one and exposes it as the `selections` CEL variable; each select-like
|
|
15
|
+
* field publishes its resolved option here under its own uuid. A sibling reads
|
|
16
|
+
* `selections["<field-uuid>"].code`. It is NOT form state, so it never rides
|
|
17
|
+
* along in the submit payload — that separation is the whole point.
|
|
18
|
+
*
|
|
19
|
+
* Keyed by field uuid, not by binding: a table cell's value lives in row data
|
|
20
|
+
* (no form binding) while a form field's lives in form state, but the uuid is the
|
|
21
|
+
* one identity both share — and the one the expression editor surfaces as a
|
|
22
|
+
* field-name chip so the designer never sees the raw uuid.
|
|
23
|
+
*/
|
|
24
|
+
export type SelectionsRegistry = {
|
|
25
|
+
/**
|
|
26
|
+
* Live uuid → resolved-option map. Read by the host's `selections` thunk. A
|
|
27
|
+
* `shallowRef`, deliberately: the stored options are opaque snapshots a
|
|
28
|
+
* sibling expression reads but never the registry mutates, so deep-proxying
|
|
29
|
+
* them is wasted work — and worse, it would replace the references we store
|
|
30
|
+
* with reactive proxies, defeating the identity-based de-dup in `set`.
|
|
31
|
+
* Reactivity rides on the `.value` swap alone (every `set`/`clear` replaces
|
|
32
|
+
* the whole map), which is exactly what a `shallowRef` tracks.
|
|
33
|
+
*/
|
|
34
|
+
entries: ShallowRef<Record<string, unknown>>;
|
|
35
|
+
/** Publish (or replace) the resolved option for a field. */
|
|
36
|
+
set: (uuid: string, option: unknown) => void;
|
|
37
|
+
/** Drop a field's entry — on clear, or when the field unmounts. */
|
|
38
|
+
clear: (uuid: string) => void;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Create a registry and provide it to descendants. Called once per host (the
|
|
42
|
+
* form root; later, a table row). The returned `entries` ref is what the host
|
|
43
|
+
* overlays as the `selections` CEL thunk.
|
|
44
|
+
*/
|
|
45
|
+
export declare function provideSelectionsRegistry(): SelectionsRegistry;
|
|
46
|
+
/**
|
|
47
|
+
* Inject the nearest registry, or `undefined` when there's no providing host
|
|
48
|
+
* (an uncontrolled field, a unit test). Callers must tolerate the absent case —
|
|
49
|
+
* publishing is best-effort.
|
|
50
|
+
*/
|
|
51
|
+
export declare function useSelectionsRegistry(): SelectionsRegistry | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Wire a selection field's publish lifecycle to the nearest registry. Call once
|
|
54
|
+
* in setup; it injects the host registry (tolerating absence), watches the
|
|
55
|
+
* resolved selection, and clears on unmount.
|
|
56
|
+
*
|
|
57
|
+
* The de-dup is the whole point. A field's resolved-option computed re-mints on
|
|
58
|
+
* every re-evaluation — and `cel.ts`'s `unwrapCelValue` deep-copies every CEL
|
|
59
|
+
* result, so a remote option's backend record is a brand-new object on each
|
|
60
|
+
* pass even when the underlying data is unchanged. Worse, `celBindings` reads
|
|
61
|
+
* the `selections` map on every `$cel` call, so any publish re-triggers every
|
|
62
|
+
* selectable's own option resolution. Publishing on each re-mint would replace
|
|
63
|
+
* the map, re-trigger resolution, re-mint, and re-publish without bound — the
|
|
64
|
+
* "Maximum recursive updates exceeded" loop. So we key on a STABLE selection
|
|
65
|
+
* identity (the persisted key, or the ordered keys for multi), never the option
|
|
66
|
+
* payload: the data is irrelevant to identity and is swept wholesale whenever
|
|
67
|
+
* the selection actually changes. An unchanged selection is a no-op, which
|
|
68
|
+
* keeps the `selections` reference stable and cuts the feedback at the source.
|
|
69
|
+
*
|
|
70
|
+
* `resolved` returns the value to publish, or `undefined` when nothing resolves
|
|
71
|
+
* (cleared). `identity` projects that value to its stable selection key;
|
|
72
|
+
* `raw` projects it to the payload stored for siblings to read.
|
|
73
|
+
*/
|
|
74
|
+
export declare function publishSelection<T>(key: string, resolved: () => T | undefined, project: {
|
|
75
|
+
identity: (value: T) => string;
|
|
76
|
+
raw: (value: T) => unknown;
|
|
77
|
+
}): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { inject, onUnmounted, provide, shallowRef, watch } from "vue";
|
|
2
|
+
const SELECTIONS_KEY = Symbol("shwfed-selections");
|
|
3
|
+
function sameSelection(a, b) {
|
|
4
|
+
if (Object.is(a, b)) return true;
|
|
5
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
6
|
+
if (a.length !== b.length) return false;
|
|
7
|
+
return a.every((item, i) => Object.is(item, b[i]));
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
export function provideSelectionsRegistry() {
|
|
12
|
+
const entries = shallowRef({});
|
|
13
|
+
const registry = {
|
|
14
|
+
entries,
|
|
15
|
+
set: (uuid, option) => {
|
|
16
|
+
if (uuid in entries.value && sameSelection(entries.value[uuid], option)) return;
|
|
17
|
+
entries.value = { ...entries.value, [uuid]: option };
|
|
18
|
+
},
|
|
19
|
+
clear: (uuid) => {
|
|
20
|
+
if (!(uuid in entries.value)) return;
|
|
21
|
+
entries.value = Object.fromEntries(
|
|
22
|
+
Object.entries(entries.value).filter(([key]) => key !== uuid)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
provide(SELECTIONS_KEY, registry);
|
|
27
|
+
return registry;
|
|
28
|
+
}
|
|
29
|
+
export function useSelectionsRegistry() {
|
|
30
|
+
return inject(SELECTIONS_KEY, void 0);
|
|
31
|
+
}
|
|
32
|
+
export function publishSelection(key, resolved, project) {
|
|
33
|
+
const registry = useSelectionsRegistry();
|
|
34
|
+
const NONE = "\0:none";
|
|
35
|
+
let last = "\0:init";
|
|
36
|
+
watch(
|
|
37
|
+
resolved,
|
|
38
|
+
(value) => {
|
|
39
|
+
if (!registry) return;
|
|
40
|
+
const id = value === void 0 ? NONE : project.identity(value);
|
|
41
|
+
if (id === last) return;
|
|
42
|
+
last = id;
|
|
43
|
+
if (value === void 0) registry.clear(key);
|
|
44
|
+
else registry.set(key, project.raw(value));
|
|
45
|
+
},
|
|
46
|
+
{ immediate: true }
|
|
47
|
+
);
|
|
48
|
+
onUnmounted(() => registry?.clear(key));
|
|
49
|
+
}
|
|
@@ -14,6 +14,8 @@ When modifying this library, keep both `CLAUDE.md` and `PROMPT.md` in sync with
|
|
|
14
14
|
|
|
15
15
|
A `range()` built-in has been added (not from upstream) — `range(number, number)`, `range(number, number, number)` and `range(Date, Date, string)`. It builds an end-exclusive list; the direction follows the operands (counts down when `start > end`); `step` is a positive magnitude; the date unit is `year` / `month` / `day` / `hour` / `minute`. Output length is capped at 100000.
|
|
16
16
|
|
|
17
|
+
A `list.enumerate(): list<map<string, dyn>>` receiver method has been added (not from upstream, in `functions.ts` beside `list.size()`) — pairs each element with its 0-based index as a plain `{index, value}` record (CEL has no tuple type). It is a plain function, not a macro (no variable binding); the index is a `Decimal` so it stays a CEL `number` for downstream arithmetic. Receiver `list` resolves to `list<dyn>`, so it matches any list.
|
|
18
|
+
|
|
17
19
|
`evaluate` now returns `Effect<T, ParseError | EvaluationError | TypeError>` instead of a plain value. The entire evaluation pipeline is Effect-based — every AST node's `evaluate` function returns an Effect, and sub-expressions are composed via `Effect.gen` / `yield*`. Promise-based async handling has been removed. User-registered functions may return `Effect` values, which are automatically flatMapped into the evaluation pipeline. Import `Effect` from `effect` and use `Effect.runSync` or `Effect.runPromise` to execute the returned Effect.
|
|
18
20
|
|
|
19
21
|
The `homogeneousAggregateLiterals` and `enableOptionalTypes` environment options have been removed. Aggregate data structures (lists, maps) are always heterogeneous — mixed-type literals are inferred as `list<dyn>` or `map<dyn, dyn>`. Optional types (`.?`, `[?]`, `optional.*` helpers) are always enabled.
|
|
@@ -131,6 +131,14 @@ items.map(i, i.price).sum() // total of mapped prices
|
|
|
131
131
|
```
|
|
132
132
|
Receiver must be statically typed `list<number>`. Works on number literals and `.map(...)` results; an unlisted variable typed as `dyn` will not match — wrap or type it first.
|
|
133
133
|
|
|
134
|
+
### List enumerate
|
|
135
|
+
```cel
|
|
136
|
+
[10, 20, 30].enumerate() // [{index: 0, value: 10}, {index: 1, value: 20}, {index: 2, value: 30}]
|
|
137
|
+
items.enumerate().map(e, e.index) // [0, 1, 2, ...]
|
|
138
|
+
items.enumerate().map(e, string(e.index) + ": " + e.value)
|
|
139
|
+
```
|
|
140
|
+
Pairs each element with its 0-based index as `{index, value}` records (CEL has no tuple type). Works on any `list`. Returns `list<map<string, dyn>>`.
|
|
141
|
+
|
|
134
142
|
### String methods
|
|
135
143
|
```cel
|
|
136
144
|
"hello".contains("ell") // true
|
|
@@ -50,6 +50,10 @@ export function registerFunctions(registry) {
|
|
|
50
50
|
functionOverload("bytes.size(): number", (v) => Decimal.from(v.length));
|
|
51
51
|
functionOverload("list.size(): number", (v) => Decimal.from(v.length ?? v.size));
|
|
52
52
|
functionOverload("map.size(): number", (v) => Decimal.from(v instanceof Map ? v.size : objKeys(v).length));
|
|
53
|
+
functionOverload(
|
|
54
|
+
"list.enumerate(): list<map<string, dyn>>",
|
|
55
|
+
(v) => v.map((value, i) => ({ index: Decimal.from(i), value }))
|
|
56
|
+
);
|
|
53
57
|
functionOverload("bytes(string): bytes", (v) => ByteOpts.fromString(v));
|
|
54
58
|
functionOverload("bytes(bytes): bytes", identity);
|
|
55
59
|
functionOverload("number(number): number", (v) => Decimal.from(v));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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};
|