@atscript/vue-wf 0.1.69 → 0.1.71
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/as-wf-finish.d.mts +1 -1
- package/dist/{as-wf-finish.vue-H_xgcelS.d.mts → as-wf-finish.vue-BhXMooP3.d.mts} +3 -3
- package/dist/{as-wf-form-CwWizwko.mjs → as-wf-form-DVRd6Jvc.mjs} +7 -7
- package/dist/as-wf-form.d.mts +1 -1
- package/dist/as-wf-form.mjs +1 -1
- package/dist/{as-wf-form.vue-CXAonfNF.d.mts → as-wf-form.vue-CkpfsyQH.d.mts} +3 -3
- package/dist/{index-DZLKOai5.d.mts → index-C5MmoWFB.d.mts} +5 -5
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
package/dist/as-wf-finish.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-wf-finish.vue-
|
|
1
|
+
import { t as _default } from "./as-wf-finish.vue-BhXMooP3.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as WfMessage, n as WfButton, r as WfFinished, t as
|
|
1
|
+
import { i as WfMessage, n as WfButton, r as WfFinished, t as WfActionRequest } from "./index-C5MmoWFB.mjs";
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/defaults/as-wf-finish.vue.d.ts
|
|
@@ -48,10 +48,10 @@ type __VLS_Slots = {} & {
|
|
|
48
48
|
};
|
|
49
49
|
declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
50
50
|
dismiss: () => any;
|
|
51
|
-
action: (action:
|
|
51
|
+
action: (action: WfActionRequest) => any;
|
|
52
52
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
53
53
|
onDismiss?: (() => any) | undefined;
|
|
54
|
-
onAction?: ((action:
|
|
54
|
+
onAction?: ((action: WfActionRequest) => any) | undefined;
|
|
55
55
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
56
56
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
57
57
|
declare const _default: typeof __VLS_export;
|
|
@@ -129,21 +129,21 @@ function useWfForm(options) {
|
|
|
129
129
|
if (new URLSearchParams(window.location.search).get(tokenName)) console.warn(`[useWfForm] URL contains ?${tokenName}=… but no \`initialToken\` was passed and \`tokenTransport\` is "${transport}". Workflow will start fresh instead of resuming the magic-link flow. Pass \`initial-token="route.query.${tokenName}"\` or set \`tokenTransport: "query"\`.`);
|
|
130
130
|
}
|
|
131
131
|
const body = { [wfidName]: options.name };
|
|
132
|
-
if (input) body.input = input;
|
|
132
|
+
if (input) body.input = { formData: input };
|
|
133
133
|
if (initialToken) body[tokenName] = initialToken;
|
|
134
134
|
await post(body);
|
|
135
135
|
}
|
|
136
136
|
async function submit(data) {
|
|
137
|
-
await post({ input: data });
|
|
137
|
+
await post({ input: { formData: data } });
|
|
138
138
|
}
|
|
139
139
|
async function action(name) {
|
|
140
|
-
await post({ action: name });
|
|
140
|
+
await post({ input: { action: name } });
|
|
141
141
|
}
|
|
142
142
|
async function actionWithData(name, data) {
|
|
143
|
-
await post({
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
143
|
+
await post({ input: {
|
|
144
|
+
action: name,
|
|
145
|
+
formData: data
|
|
146
|
+
} });
|
|
147
147
|
}
|
|
148
148
|
async function retry() {
|
|
149
149
|
if (lastRequestBody) await post(lastRequestBody);
|
package/dist/as-wf-form.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-wf-form.vue-
|
|
1
|
+
import { t as _default } from "./as-wf-form.vue-CkpfsyQH.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-wf-form.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_wf_form_default } from "./as-wf-form-
|
|
1
|
+
import { t as as_wf_form_default } from "./as-wf-form-DVRd6Jvc.mjs";
|
|
2
2
|
export { as_wf_form_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as WfMessage, n as WfButton, r as WfFinished, t as
|
|
1
|
+
import { i as WfMessage, n as WfButton, r as WfFinished, t as WfActionRequest } from "./index-C5MmoWFB.mjs";
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
import { Component, Ref, ShallowRef } from "vue";
|
|
4
4
|
import { ClientFactory, FormDef } from "@atscript/ui";
|
|
@@ -197,7 +197,7 @@ type __VLS_Slots = {} & {
|
|
|
197
197
|
};
|
|
198
198
|
declare const __VLS_base: vue.DefineComponent<AsWfFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
199
199
|
dismiss: () => any;
|
|
200
|
-
action: (action:
|
|
200
|
+
action: (action: WfActionRequest) => any;
|
|
201
201
|
error: (error: {
|
|
202
202
|
message: string;
|
|
203
203
|
status?: number;
|
|
@@ -208,7 +208,7 @@ declare const __VLS_base: vue.DefineComponent<AsWfFormProps, {}, {}, {}, {}, vue
|
|
|
208
208
|
form: (def: FormDef, context?: Record<string, unknown> | undefined) => any;
|
|
209
209
|
}, string, vue.PublicProps, Readonly<AsWfFormProps> & Readonly<{
|
|
210
210
|
onDismiss?: (() => any) | undefined;
|
|
211
|
-
onAction?: ((action:
|
|
211
|
+
onAction?: ((action: WfActionRequest) => any) | undefined;
|
|
212
212
|
onError?: ((error: {
|
|
213
213
|
message: string;
|
|
214
214
|
status?: number;
|
|
@@ -13,11 +13,11 @@ interface WfMessage {
|
|
|
13
13
|
}
|
|
14
14
|
type WfNext = {
|
|
15
15
|
trigger: "immediate";
|
|
16
|
-
action:
|
|
16
|
+
action: WfActionRequest;
|
|
17
17
|
} | {
|
|
18
18
|
trigger: "auto";
|
|
19
19
|
timeoutMs: number;
|
|
20
|
-
action:
|
|
20
|
+
action: WfActionRequest;
|
|
21
21
|
skipButton?: {
|
|
22
22
|
label: string;
|
|
23
23
|
behavior?: "now" | "cancel";
|
|
@@ -29,9 +29,9 @@ type WfNext = {
|
|
|
29
29
|
};
|
|
30
30
|
interface WfButton {
|
|
31
31
|
label: string;
|
|
32
|
-
action:
|
|
32
|
+
action: WfActionRequest;
|
|
33
33
|
}
|
|
34
|
-
type
|
|
34
|
+
type WfActionRequest = {
|
|
35
35
|
type: "redirect";
|
|
36
36
|
target: string;
|
|
37
37
|
reason?: string;
|
|
@@ -41,4 +41,4 @@ type WfAction = {
|
|
|
41
41
|
type: "dismiss";
|
|
42
42
|
};
|
|
43
43
|
//#endregion
|
|
44
|
-
export { WfNext as a, WfMessage as i, WfButton as n, WfFinished as r,
|
|
44
|
+
export { WfNext as a, WfMessage as i, WfButton as n, WfFinished as r, WfActionRequest as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as WfNext, i as WfMessage, n as WfButton, r as WfFinished, t as
|
|
2
|
-
import { i as useWfForm, n as UseWfFormOptions, r as UseWfFormReturn, t as _default$1 } from "./as-wf-form.vue-
|
|
3
|
-
import { t as _default } from "./as-wf-finish.vue-
|
|
4
|
-
export { _default as AsWfFinish, _default$1 as AsWfForm, type UseWfFormOptions, type UseWfFormReturn, type
|
|
1
|
+
import { a as WfNext, i as WfMessage, n as WfButton, r as WfFinished, t as WfActionRequest } from "./index-C5MmoWFB.mjs";
|
|
2
|
+
import { i as useWfForm, n as UseWfFormOptions, r as UseWfFormReturn, t as _default$1 } from "./as-wf-form.vue-CkpfsyQH.mjs";
|
|
3
|
+
import { t as _default } from "./as-wf-finish.vue-BhXMooP3.mjs";
|
|
4
|
+
export { _default as AsWfFinish, _default$1 as AsWfForm, type UseWfFormOptions, type UseWfFormReturn, type WfActionRequest, type WfButton, type WfFinished, type WfMessage, type WfNext, useWfForm };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as useWfForm, t as as_wf_form_default } from "./as-wf-form-
|
|
1
|
+
import { n as useWfForm, t as as_wf_form_default } from "./as-wf-form-DVRd6Jvc.mjs";
|
|
2
2
|
import { t as as_wf_finish_default } from "./as-wf-finish-CfbsKJhX.mjs";
|
|
3
3
|
export { as_wf_finish_default as AsWfFinish, as_wf_form_default as AsWfForm, useWfForm };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/vue-wf",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.71",
|
|
4
4
|
"description": "Workflow form integration for Vue 3 — HTTP round-trip loop driven by atscript type metadata",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@atscript/ui": "^0.1.
|
|
53
|
+
"@atscript/ui": "^0.1.71"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@atscript/core": "^0.1.58",
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
|
|
63
63
|
"vue": "^3",
|
|
64
64
|
"vue-tsc": "^3.2.6",
|
|
65
|
-
"@atscript/moost-wf": "^0.1.
|
|
66
|
-
"@atscript/vue-form": "^0.1.
|
|
65
|
+
"@atscript/moost-wf": "^0.1.71",
|
|
66
|
+
"@atscript/vue-form": "^0.1.71"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@atscript/typescript": "^0.1.58",
|
|
70
70
|
"vue": "^3",
|
|
71
|
-
"@atscript/vue-form": "^0.1.
|
|
71
|
+
"@atscript/vue-form": "^0.1.71"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "node ../../scripts/gen-exports.mjs && vp pack",
|