@shwfed/config 2.12.13 → 2.12.14
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/module.json +1 -1
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.d.vue.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.vue +118 -25
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/config.vue.d.ts +8 -0
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/runtime.vue +48 -21
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/schema.d.ts +5 -0
- package/dist/runtime/components/actions/buttons/2026-06-25/com.shwfed.actions.button.state.write/schema.js +24 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +34 -34
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/schema.d.ts +68 -68
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -13,6 +13,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
13
13
|
readonly target: string;
|
|
14
14
|
readonly operation: string;
|
|
15
15
|
}[] | undefined;
|
|
16
|
+
readonly requests?: readonly {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly request: string;
|
|
19
|
+
}[] | undefined;
|
|
16
20
|
readonly writes: readonly {
|
|
17
21
|
readonly path: string;
|
|
18
22
|
readonly value: string;
|
|
@@ -29,6 +33,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
29
33
|
readonly target: string;
|
|
30
34
|
readonly operation: string;
|
|
31
35
|
}[] | undefined;
|
|
36
|
+
readonly requests?: readonly {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly request: string;
|
|
39
|
+
}[] | undefined;
|
|
32
40
|
readonly writes: readonly {
|
|
33
41
|
readonly path: string;
|
|
34
42
|
readonly value: string;
|
|
@@ -8,6 +8,7 @@ import { Markdown } from "../../../../ui/markdown";
|
|
|
8
8
|
import { InputGroupButton } from "../../../../ui/input-group";
|
|
9
9
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
|
|
10
10
|
import TriggersField from "../../../components/triggers-field.vue";
|
|
11
|
+
import TriggerRowScope from "../../../components/trigger-row-scope.vue";
|
|
11
12
|
import { schema } from "./schema";
|
|
12
13
|
defineOptions({ name: "ShwfedStateWriteActionConfig" });
|
|
13
14
|
const value = defineModel({ type: null, ...{ required: true } });
|
|
@@ -16,9 +17,33 @@ const actionSchema = schema(() => {
|
|
|
16
17
|
const fieldTitle = (f) => getStructFieldTitle(actionSchema, f) ?? f;
|
|
17
18
|
const fieldDescription = (f) => getStructFieldDescription(actionSchema, f);
|
|
18
19
|
const writes = computed(() => value.value.writes ?? []);
|
|
20
|
+
const requests = computed(() => value.value.requests ?? []);
|
|
21
|
+
const roster = computed(
|
|
22
|
+
() => requests.value.map((r, i) => ({
|
|
23
|
+
id: r.id,
|
|
24
|
+
label: `\u7B2C ${i + 1} \u6B65`,
|
|
25
|
+
valid: true,
|
|
26
|
+
description: "HTTP \u54CD\u5E94"
|
|
27
|
+
}))
|
|
28
|
+
);
|
|
19
29
|
function patchWrites(next) {
|
|
20
30
|
value.value = { ...value.value, writes: next };
|
|
21
31
|
}
|
|
32
|
+
function patchRequests(next) {
|
|
33
|
+
const draft = { ...value.value };
|
|
34
|
+
if (next.length === 0) Reflect.deleteProperty(draft, "requests");
|
|
35
|
+
else draft.requests = next;
|
|
36
|
+
value.value = draft;
|
|
37
|
+
}
|
|
38
|
+
function updateRequestRow(index, patch) {
|
|
39
|
+
patchRequests(requests.value.map((r, i) => i === index ? { ...r, ...patch } : r));
|
|
40
|
+
}
|
|
41
|
+
function addRequestRow() {
|
|
42
|
+
patchRequests([...requests.value, { id: crypto.randomUUID(), request: "" }]);
|
|
43
|
+
}
|
|
44
|
+
function removeRequestRow(index) {
|
|
45
|
+
patchRequests(requests.value.filter((_, i) => i !== index));
|
|
46
|
+
}
|
|
22
47
|
function updateRow(index, patch) {
|
|
23
48
|
patchWrites(writes.value.map((w, i) => i === index ? { ...w, ...patch } : w));
|
|
24
49
|
}
|
|
@@ -41,40 +66,37 @@ function updateTriggers(next) {
|
|
|
41
66
|
<Field orientation="vertical">
|
|
42
67
|
<FieldLabel class="text-xs text-zinc-500">
|
|
43
68
|
<template
|
|
44
|
-
v-if="fieldDescription('
|
|
69
|
+
v-if="fieldDescription('requests')"
|
|
45
70
|
#tooltip
|
|
46
71
|
>
|
|
47
72
|
<Markdown
|
|
48
|
-
:source="fieldDescription('
|
|
73
|
+
:source="fieldDescription('requests')"
|
|
49
74
|
block
|
|
50
75
|
class="prose prose-sm prose-zinc"
|
|
51
76
|
/>
|
|
52
77
|
</template>
|
|
53
|
-
{{ fieldTitle("
|
|
78
|
+
{{ fieldTitle("requests") }}
|
|
54
79
|
</FieldLabel>
|
|
55
80
|
|
|
56
81
|
<div class="flex flex-col gap-3">
|
|
57
|
-
<!-- One
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
the `trailing` slot.
|
|
82
|
+
<!-- One「写入前」request per line: a static「第 N 步」marker notched into
|
|
83
|
+
the editor's `leading` slot (its response is referenced positionally
|
|
84
|
+
as `steps["<id>"]`), the request expression in the editor, and a
|
|
85
|
+
destructive delete in the `trailing` slot. Outside `TriggerRowScope`
|
|
86
|
+
so the request expressions keep the base scope (no `steps`). -->
|
|
61
87
|
<ExpressionEditor
|
|
62
|
-
v-for="(row, index) in
|
|
63
|
-
:key="
|
|
64
|
-
:model-value="row.
|
|
65
|
-
|
|
66
|
-
|
|
88
|
+
v-for="(row, index) in requests"
|
|
89
|
+
:key="row.id"
|
|
90
|
+
:model-value="row.request"
|
|
91
|
+
result-type="HttpRequest"
|
|
92
|
+
placeholder="请求,如 http.get('/api/rate')"
|
|
93
|
+
@update:model-value="(v) => updateRequestRow(index, { request: v })"
|
|
67
94
|
>
|
|
68
95
|
<template #leading>
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
placeholder="路径"
|
|
74
|
-
class="w-44 min-w-0 border-r border-zinc-200 bg-transparent pr-3 font-mono text-sm text-zinc-700 outline-none placeholder:text-zinc-300"
|
|
75
|
-
:aria-label="`\u5199\u5165\u8DEF\u5F84 ${index + 1}`"
|
|
76
|
-
@input="updateRow(index, { path: $event.target.value })"
|
|
77
|
-
>
|
|
96
|
+
<span
|
|
97
|
+
data-slot="state-write-request-step"
|
|
98
|
+
class="w-16 shrink-0 border-r border-zinc-200 pr-3 font-mono text-xs whitespace-nowrap text-zinc-500 select-none"
|
|
99
|
+
>第 {{ index + 1 }} 步</span>
|
|
78
100
|
</template>
|
|
79
101
|
<template #trailing>
|
|
80
102
|
<InputGroupButton
|
|
@@ -84,8 +106,8 @@ function updateTriggers(next) {
|
|
|
84
106
|
>
|
|
85
107
|
<button
|
|
86
108
|
type="button"
|
|
87
|
-
:aria-label="`\u79FB\u9664\
|
|
88
|
-
@click="
|
|
109
|
+
:aria-label="`\u79FB\u9664\u8BF7\u6C42 ${index + 1}`"
|
|
110
|
+
@click="removeRequestRow(index)"
|
|
89
111
|
>
|
|
90
112
|
<Icon icon="fluent:delete-20-regular" />
|
|
91
113
|
</button>
|
|
@@ -96,14 +118,85 @@ function updateTriggers(next) {
|
|
|
96
118
|
<Button
|
|
97
119
|
type="button"
|
|
98
120
|
class="justify-center"
|
|
99
|
-
@click="
|
|
121
|
+
@click="addRequestRow"
|
|
100
122
|
>
|
|
101
123
|
<Icon icon="fluent:add-20-regular" />
|
|
102
|
-
<span
|
|
124
|
+
<span>添加请求</span>
|
|
103
125
|
</Button>
|
|
104
126
|
</div>
|
|
105
127
|
</Field>
|
|
106
128
|
|
|
129
|
+
<Field orientation="vertical">
|
|
130
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
131
|
+
<template
|
|
132
|
+
v-if="fieldDescription('writes')"
|
|
133
|
+
#tooltip
|
|
134
|
+
>
|
|
135
|
+
<Markdown
|
|
136
|
+
:source="fieldDescription('writes')"
|
|
137
|
+
block
|
|
138
|
+
class="prose prose-sm prose-zinc"
|
|
139
|
+
/>
|
|
140
|
+
</template>
|
|
141
|
+
{{ fieldTitle("writes") }}
|
|
142
|
+
</FieldLabel>
|
|
143
|
+
|
|
144
|
+
<!-- Advertise the「写入前」requests as the step roster to the value
|
|
145
|
+
editors only: they get the「第 N 步」picker chips + `steps` inline
|
|
146
|
+
validation, while the request editors above keep the base scope. -->
|
|
147
|
+
<TriggerRowScope :roster="roster">
|
|
148
|
+
<div class="flex flex-col gap-3">
|
|
149
|
+
<!-- One write item, on a single line: a monofont binding path notched
|
|
150
|
+
into the editor's `leading` slot, the value expression in the
|
|
151
|
+
editor itself (its own `{x}` badge), and a destructive delete in
|
|
152
|
+
the `trailing` slot. Reuses the ExpressionEditor's own InputGroup. -->
|
|
153
|
+
<ExpressionEditor
|
|
154
|
+
v-for="(row, index) in writes"
|
|
155
|
+
:key="index"
|
|
156
|
+
:model-value="row.value"
|
|
157
|
+
placeholder="值,如 selected[?0].?exchangeRate"
|
|
158
|
+
@update:model-value="(v) => updateRow(index, { value: v })"
|
|
159
|
+
>
|
|
160
|
+
<template #leading>
|
|
161
|
+
<input
|
|
162
|
+
type="text"
|
|
163
|
+
data-slot="state-write-path"
|
|
164
|
+
:value="row.path"
|
|
165
|
+
placeholder="路径"
|
|
166
|
+
class="w-44 min-w-0 border-r border-zinc-200 bg-transparent pr-3 font-mono text-sm text-zinc-700 outline-none placeholder:text-zinc-300"
|
|
167
|
+
:aria-label="`\u5199\u5165\u8DEF\u5F84 ${index + 1}`"
|
|
168
|
+
@input="updateRow(index, { path: $event.target.value })"
|
|
169
|
+
>
|
|
170
|
+
</template>
|
|
171
|
+
<template #trailing>
|
|
172
|
+
<InputGroupButton
|
|
173
|
+
variant="destructive"
|
|
174
|
+
size="icon-xs"
|
|
175
|
+
as-child
|
|
176
|
+
>
|
|
177
|
+
<button
|
|
178
|
+
type="button"
|
|
179
|
+
:aria-label="`\u79FB\u9664\u5199\u5165\u9879 ${index + 1}`"
|
|
180
|
+
@click="removeRow(index)"
|
|
181
|
+
>
|
|
182
|
+
<Icon icon="fluent:delete-20-regular" />
|
|
183
|
+
</button>
|
|
184
|
+
</InputGroupButton>
|
|
185
|
+
</template>
|
|
186
|
+
</ExpressionEditor>
|
|
187
|
+
|
|
188
|
+
<Button
|
|
189
|
+
type="button"
|
|
190
|
+
class="justify-center"
|
|
191
|
+
@click="addRow"
|
|
192
|
+
>
|
|
193
|
+
<Icon icon="fluent:add-20-regular" />
|
|
194
|
+
<span>添加写入项</span>
|
|
195
|
+
</Button>
|
|
196
|
+
</div>
|
|
197
|
+
</TriggerRowScope>
|
|
198
|
+
</Field>
|
|
199
|
+
|
|
107
200
|
<Field orientation="vertical">
|
|
108
201
|
<FieldLabel class="text-xs text-zinc-500">
|
|
109
202
|
<template
|
|
@@ -13,6 +13,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
13
13
|
readonly target: string;
|
|
14
14
|
readonly operation: string;
|
|
15
15
|
}[] | undefined;
|
|
16
|
+
readonly requests?: readonly {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly request: string;
|
|
19
|
+
}[] | undefined;
|
|
16
20
|
readonly writes: readonly {
|
|
17
21
|
readonly path: string;
|
|
18
22
|
readonly value: string;
|
|
@@ -29,6 +33,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
29
33
|
readonly target: string;
|
|
30
34
|
readonly operation: string;
|
|
31
35
|
}[] | undefined;
|
|
36
|
+
readonly requests?: readonly {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly request: string;
|
|
39
|
+
}[] | undefined;
|
|
32
40
|
readonly writes: readonly {
|
|
33
41
|
readonly path: string;
|
|
34
42
|
readonly value: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { Effect } from "effect";
|
|
2
|
+
import { Effect, Option } from "effect";
|
|
3
|
+
import { Fetch } from "fx-fetch";
|
|
3
4
|
import { createDefu } from "defu";
|
|
4
5
|
import { cel as _rawCel } from "../../../../../utils/cel";
|
|
5
6
|
import { celBindings, injectCELContext } from "../../../../../utils/cel-context";
|
|
6
7
|
import { dispatchTriggers, useEventChannel } from "../../../../../share/event-bus";
|
|
8
|
+
import { asRequest } from "../../../../../share/request";
|
|
7
9
|
import { useFormState } from "../../../../form/utils/state";
|
|
8
10
|
import ShwfedActionDefinition from "../../../components/definition.vue";
|
|
9
11
|
defineOptions({ name: "ShwfedStateWriteActionRuntime" });
|
|
@@ -31,27 +33,52 @@ function mergeAtPath(current, next) {
|
|
|
31
33
|
}
|
|
32
34
|
return next;
|
|
33
35
|
}
|
|
34
|
-
const effect = Effect.suspend(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
36
|
+
const effect = Effect.suspend(() => {
|
|
37
|
+
const steps = {};
|
|
38
|
+
return Effect.forEach(
|
|
39
|
+
// 写入前: issue each request in list order against the base scope (no
|
|
40
|
+
// `steps` — requests can't reference each other). `asRequest` maps the
|
|
41
|
+
// evaluated value to `Some(builder)` / `None` (author opted out → skip the
|
|
42
|
+
// fetch, leaving `steps["<id>"]` unset). A failed `.json()` short-circuits
|
|
43
|
+
// the whole click before any write runs — the effect fails and the action
|
|
44
|
+
// runner absorbs it, exactly as a failing `value` expression does.
|
|
45
|
+
props.config.requests ?? [],
|
|
46
|
+
(request) => Effect.flatMap($cel(request.request), (evaluated) => {
|
|
47
|
+
const builder = asRequest(evaluated);
|
|
48
|
+
if (Option.isNone(builder)) return Effect.void;
|
|
49
|
+
return Effect.map(builder.value.json(), (json) => {
|
|
50
|
+
steps[request.id] = json;
|
|
51
|
+
});
|
|
52
|
+
}),
|
|
53
|
+
{ discard: true }
|
|
54
|
+
).pipe(
|
|
55
|
+
Effect.flatMap(
|
|
56
|
+
() => (
|
|
57
|
+
// Evaluate every row's `value` in list order. A row with a blank `path` is
|
|
58
|
+
// skipped (a half-authored row writes nowhere) but its value is never
|
|
59
|
+
// evaluated — `Effect.forEach` keeps the click sequential and short-circuits
|
|
60
|
+
// on the first failing expression, matching the old map-eval-then-write.
|
|
61
|
+
Effect.forEach(
|
|
62
|
+
props.config.writes ?? [],
|
|
63
|
+
(write) => {
|
|
64
|
+
const path = write.path?.trim() ?? "";
|
|
65
|
+
if (path.length === 0) return Effect.void;
|
|
66
|
+
return Effect.map($cel(write.value, { steps }), (result) => {
|
|
67
|
+
const merged = mergeAtPath(formState.getAt(path), result);
|
|
68
|
+
formState.setAt(path, merged);
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
{ discard: true }
|
|
72
|
+
)
|
|
73
|
+
)
|
|
51
74
|
),
|
|
52
|
-
() => dispatchTriggers(channel, props.config.onSuccess, $cel)
|
|
53
|
-
|
|
54
|
-
|
|
75
|
+
Effect.flatMap(() => dispatchTriggers(channel, props.config.onSuccess, $cel)),
|
|
76
|
+
// The request builders need a `Fetch` layer; `ShwfedActionDefinition` runs
|
|
77
|
+
// the effect with no requirements channel, so provide it here — same layer
|
|
78
|
+
// the request op/button use.
|
|
79
|
+
Effect.provide(Fetch.layer)
|
|
80
|
+
);
|
|
81
|
+
});
|
|
55
82
|
</script>
|
|
56
83
|
|
|
57
84
|
<template>
|
|
@@ -9,6 +9,10 @@ export declare const metadata: {
|
|
|
9
9
|
export declare function schema(configure: (env: Environment) => void): Schema.Struct<{
|
|
10
10
|
type: Schema.Literal<["com.shwfed.actions.button.state.write"]>;
|
|
11
11
|
compatibilityDate: Schema.Literal<["2026-06-25"]>;
|
|
12
|
+
requests: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
13
|
+
id: Schema.refine<string, typeof Schema.String>;
|
|
14
|
+
request: Schema.Schema<string, string, never>;
|
|
15
|
+
}>>>;
|
|
12
16
|
writes: Schema.Array$<Schema.Struct<{
|
|
13
17
|
path: Schema.SchemaClass<string, string, never>;
|
|
14
18
|
value: Schema.Schema<string, string, never>;
|
|
@@ -23,3 +27,4 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
|
|
|
23
27
|
}>;
|
|
24
28
|
export type Value = Schema.Schema.Type<ReturnType<typeof schema>>;
|
|
25
29
|
export type WriteValue = Value['writes'][number];
|
|
30
|
+
export type RequestValue = NonNullable<Value['requests']>[number];
|
|
@@ -2,6 +2,7 @@ import { Schema } from "effect";
|
|
|
2
2
|
import { Expression } from "../../../../../share/expression.js";
|
|
3
3
|
import { Triggers } from "../../../../../share/event-bus.js";
|
|
4
4
|
import { md } from "../../../../../share/markdown.js";
|
|
5
|
+
import { registerStepsVariableIfAbsent } from "../../../../operations/utils/step-vars.js";
|
|
5
6
|
export const type = "com.shwfed.actions.button.state.write";
|
|
6
7
|
export const compatibilityDate = "2026-06-25";
|
|
7
8
|
export const metadata = {
|
|
@@ -9,19 +10,41 @@ export const metadata = {
|
|
|
9
10
|
icon: "fluent:document-edit-20-regular"
|
|
10
11
|
};
|
|
11
12
|
export function schema(configure) {
|
|
13
|
+
const withSteps = (env) => {
|
|
14
|
+
configure(env);
|
|
15
|
+
registerStepsVariableIfAbsent(env);
|
|
16
|
+
};
|
|
12
17
|
const Write = Schema.Struct({
|
|
13
18
|
path: Schema.String.annotations({
|
|
14
19
|
title: "\u8DEF\u5F84",
|
|
15
20
|
description: "\u5199\u5165\u7684\u7ED1\u5B9A\u8DEF\u5F84\uFF0C\u5982 `dataJson.cus_currency`"
|
|
16
21
|
}),
|
|
17
|
-
value: Expression({ configure }).annotations({
|
|
22
|
+
value: Expression({ configure: withSteps }).annotations({
|
|
18
23
|
title: "\u503C",
|
|
19
24
|
description: "\u70B9\u51FB\u540E\u6C42\u503C\uFF0C\u7ED3\u679C\u5199\u5165\u8BE5\u8DEF\u5F84"
|
|
20
25
|
})
|
|
21
26
|
});
|
|
27
|
+
const Request = Schema.Struct({
|
|
28
|
+
id: Schema.UUID.annotations({
|
|
29
|
+
title: "ID",
|
|
30
|
+
description: '\u8BF7\u6C42\u6807\u8BC6\uFF0C\u5199\u5165\u503C\u7ECF `steps["<id>"]` \u5F15\u7528'
|
|
31
|
+
}),
|
|
32
|
+
request: Expression({ configure, resultType: "HttpRequest" }).annotations({
|
|
33
|
+
title: "\u8BF7\u6C42",
|
|
34
|
+
description: "\u6784\u9020\u4E00\u4E2A\u8BF7\u6C42\uFF0C\u670D\u52A1\u5668\u987B\u8FD4\u56DE JSON \u54CD\u5E94\uFF1B\u7ED3\u679C\u6309\u300C\u7B2C N \u6B65\u300D\u5B58\u5165 `steps`"
|
|
35
|
+
})
|
|
36
|
+
});
|
|
22
37
|
return Schema.Struct({
|
|
23
38
|
type: Schema.Literal(type),
|
|
24
39
|
compatibilityDate: Schema.Literal(compatibilityDate),
|
|
40
|
+
requests: Schema.optional(Schema.Array(Request).annotations({
|
|
41
|
+
title: "\u5199\u5165\u524D",
|
|
42
|
+
description: md`
|
|
43
|
+
点击后先按列表顺序发起这些请求,其响应可在「写入值」中经
|
|
44
|
+
\`steps["<第 N 步>"]\` 引用。任一请求失败(网络错误 / 非 2xx / 不可解析)
|
|
45
|
+
则中止,不进行任何写入。
|
|
46
|
+
`
|
|
47
|
+
})),
|
|
25
48
|
writes: Schema.Array(Write).annotations({
|
|
26
49
|
title: "\u5199\u5165\u503C",
|
|
27
50
|
description: md`
|
package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts
CHANGED
|
@@ -34,6 +34,40 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
34
34
|
readonly message: string;
|
|
35
35
|
}[]] | undefined;
|
|
36
36
|
}[];
|
|
37
|
+
readonly query?: {
|
|
38
|
+
readonly style?: string | undefined;
|
|
39
|
+
readonly id?: string | undefined;
|
|
40
|
+
readonly initial?: {
|
|
41
|
+
readonly data: string;
|
|
42
|
+
readonly request?: string | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
readonly displayName?: string | undefined;
|
|
45
|
+
readonly kind: "shwfed.component.form";
|
|
46
|
+
readonly fields: readonly any[];
|
|
47
|
+
readonly layouts: readonly {
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly layout: {
|
|
50
|
+
readonly style?: string | undefined;
|
|
51
|
+
readonly columns: number;
|
|
52
|
+
readonly gap?: number | undefined;
|
|
53
|
+
readonly rows?: number | undefined;
|
|
54
|
+
readonly placements: {
|
|
55
|
+
readonly [x: string]: {
|
|
56
|
+
readonly area: readonly [readonly [number, number], readonly [number, number]];
|
|
57
|
+
readonly v?: "stretch" | "center" | "end" | "start" | undefined;
|
|
58
|
+
readonly h?: "stretch" | "center" | "end" | "start" | undefined;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
readonly media?: string | undefined;
|
|
63
|
+
}[];
|
|
64
|
+
readonly readonly?: string | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
readonly dataSource?: {
|
|
67
|
+
readonly data: string;
|
|
68
|
+
readonly total?: string | undefined;
|
|
69
|
+
readonly request?: string | undefined;
|
|
70
|
+
} | undefined;
|
|
37
71
|
readonly actions?: {
|
|
38
72
|
readonly size: "default" | "sm" | "xs";
|
|
39
73
|
readonly style?: string | undefined;
|
|
@@ -101,40 +135,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
101
135
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
102
136
|
}[];
|
|
103
137
|
} | undefined;
|
|
104
|
-
readonly query?: {
|
|
105
|
-
readonly style?: string | undefined;
|
|
106
|
-
readonly id?: string | undefined;
|
|
107
|
-
readonly initial?: {
|
|
108
|
-
readonly data: string;
|
|
109
|
-
readonly request?: string | undefined;
|
|
110
|
-
} | undefined;
|
|
111
|
-
readonly displayName?: string | undefined;
|
|
112
|
-
readonly kind: "shwfed.component.form";
|
|
113
|
-
readonly fields: readonly any[];
|
|
114
|
-
readonly layouts: readonly {
|
|
115
|
-
readonly name: string;
|
|
116
|
-
readonly layout: {
|
|
117
|
-
readonly style?: string | undefined;
|
|
118
|
-
readonly columns: number;
|
|
119
|
-
readonly gap?: number | undefined;
|
|
120
|
-
readonly rows?: number | undefined;
|
|
121
|
-
readonly placements: {
|
|
122
|
-
readonly [x: string]: {
|
|
123
|
-
readonly area: readonly [readonly [number, number], readonly [number, number]];
|
|
124
|
-
readonly v?: "stretch" | "center" | "end" | "start" | undefined;
|
|
125
|
-
readonly h?: "stretch" | "center" | "end" | "start" | undefined;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
readonly media?: string | undefined;
|
|
130
|
-
}[];
|
|
131
|
-
readonly readonly?: string | undefined;
|
|
132
|
-
} | undefined;
|
|
133
|
-
readonly dataSource?: {
|
|
134
|
-
readonly data: string;
|
|
135
|
-
readonly total?: string | undefined;
|
|
136
|
-
readonly request?: string | undefined;
|
|
137
|
-
} | undefined;
|
|
138
138
|
readonly bottomActions?: {
|
|
139
139
|
readonly size: "default" | "sm" | "xs";
|
|
140
140
|
readonly style?: string | undefined;
|
|
@@ -282,6 +282,40 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
282
282
|
readonly message: string;
|
|
283
283
|
}[]] | undefined;
|
|
284
284
|
}[];
|
|
285
|
+
readonly query?: {
|
|
286
|
+
readonly style?: string | undefined;
|
|
287
|
+
readonly id?: string | undefined;
|
|
288
|
+
readonly initial?: {
|
|
289
|
+
readonly data: string;
|
|
290
|
+
readonly request?: string | undefined;
|
|
291
|
+
} | undefined;
|
|
292
|
+
readonly displayName?: string | undefined;
|
|
293
|
+
readonly kind: "shwfed.component.form";
|
|
294
|
+
readonly fields: readonly any[];
|
|
295
|
+
readonly layouts: readonly {
|
|
296
|
+
readonly name: string;
|
|
297
|
+
readonly layout: {
|
|
298
|
+
readonly style?: string | undefined;
|
|
299
|
+
readonly columns: number;
|
|
300
|
+
readonly gap?: number | undefined;
|
|
301
|
+
readonly rows?: number | undefined;
|
|
302
|
+
readonly placements: {
|
|
303
|
+
readonly [x: string]: {
|
|
304
|
+
readonly area: readonly [readonly [number, number], readonly [number, number]];
|
|
305
|
+
readonly v?: "stretch" | "center" | "end" | "start" | undefined;
|
|
306
|
+
readonly h?: "stretch" | "center" | "end" | "start" | undefined;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
readonly media?: string | undefined;
|
|
311
|
+
}[];
|
|
312
|
+
readonly readonly?: string | undefined;
|
|
313
|
+
} | undefined;
|
|
314
|
+
readonly dataSource?: {
|
|
315
|
+
readonly data: string;
|
|
316
|
+
readonly total?: string | undefined;
|
|
317
|
+
readonly request?: string | undefined;
|
|
318
|
+
} | undefined;
|
|
285
319
|
readonly actions?: {
|
|
286
320
|
readonly size: "default" | "sm" | "xs";
|
|
287
321
|
readonly style?: string | undefined;
|
|
@@ -349,40 +383,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
349
383
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
350
384
|
}[];
|
|
351
385
|
} | undefined;
|
|
352
|
-
readonly query?: {
|
|
353
|
-
readonly style?: string | undefined;
|
|
354
|
-
readonly id?: string | undefined;
|
|
355
|
-
readonly initial?: {
|
|
356
|
-
readonly data: string;
|
|
357
|
-
readonly request?: string | undefined;
|
|
358
|
-
} | undefined;
|
|
359
|
-
readonly displayName?: string | undefined;
|
|
360
|
-
readonly kind: "shwfed.component.form";
|
|
361
|
-
readonly fields: readonly any[];
|
|
362
|
-
readonly layouts: readonly {
|
|
363
|
-
readonly name: string;
|
|
364
|
-
readonly layout: {
|
|
365
|
-
readonly style?: string | undefined;
|
|
366
|
-
readonly columns: number;
|
|
367
|
-
readonly gap?: number | undefined;
|
|
368
|
-
readonly rows?: number | undefined;
|
|
369
|
-
readonly placements: {
|
|
370
|
-
readonly [x: string]: {
|
|
371
|
-
readonly area: readonly [readonly [number, number], readonly [number, number]];
|
|
372
|
-
readonly v?: "stretch" | "center" | "end" | "start" | undefined;
|
|
373
|
-
readonly h?: "stretch" | "center" | "end" | "start" | undefined;
|
|
374
|
-
};
|
|
375
|
-
};
|
|
376
|
-
};
|
|
377
|
-
readonly media?: string | undefined;
|
|
378
|
-
}[];
|
|
379
|
-
readonly readonly?: string | undefined;
|
|
380
|
-
} | undefined;
|
|
381
|
-
readonly dataSource?: {
|
|
382
|
-
readonly data: string;
|
|
383
|
-
readonly total?: string | undefined;
|
|
384
|
-
readonly request?: string | undefined;
|
|
385
|
-
} | undefined;
|
|
386
386
|
readonly bottomActions?: {
|
|
387
387
|
readonly size: "default" | "sm" | "xs";
|
|
388
388
|
readonly style?: string | undefined;
|