@atscript/vue-wf 0.1.89 → 0.1.90

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.
@@ -226,6 +226,14 @@ var as_wf_form_default = /* @__PURE__ */ defineComponent({
226
226
  type: Function,
227
227
  required: false
228
228
  },
229
+ hideRootTitle: {
230
+ type: Boolean,
231
+ required: false
232
+ },
233
+ hideSubmit: {
234
+ type: Boolean,
235
+ required: false
236
+ },
229
237
  navigate: {
230
238
  type: Function,
231
239
  required: false
@@ -375,7 +383,7 @@ var as_wf_form_default = /* @__PURE__ */ defineComponent({
375
383
  fn: withCtx((scope) => [renderSlot(_ctx.$slots, "wf.finish.option", normalizeProps(guardReactiveProps(scope)))]),
376
384
  key: "4"
377
385
  } : void 0
378
- ]), 1032, ["payload", "navigate"])])])) : unref(wf).formDef.value && unref(wf).formData.value ? (openBlock(), createElementBlock("div", _hoisted_4, [unref(wf).error.value ? renderSlot(_ctx.$slots, "form.error", {
386
+ ]), 1032, ["payload", "navigate"])])])) : unref(wf).formDef.value && unref(wf).formData.value ? (openBlock(), createElementBlock("div", _hoisted_4, [unref(wf).error.value ? renderSlot(_ctx.$slots, "wf.error", {
379
387
  key: 0,
380
388
  error: unref(wf).error.value,
381
389
  retry: unref(wf).retry
@@ -389,36 +397,49 @@ var as_wf_form_default = /* @__PURE__ */ defineComponent({
389
397
  "first-validation": __props.firstValidation,
390
398
  components: __props.components,
391
399
  "client-factory": __props.clientFactory,
400
+ "hide-root-title": __props.hideRootTitle,
401
+ "hide-submit": __props.hideSubmit,
392
402
  loading: unref(wf).loading.value,
393
403
  onSubmit,
394
404
  onAction,
395
405
  onUnsupportedAction: onAction
396
- }, createSlots({
397
- "form.header": withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.header", normalizeProps(guardReactiveProps({
398
- ...slotProps,
399
- loading: unref(wf).loading.value
400
- })))]),
401
- "form.before": withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.before", normalizeProps(guardReactiveProps({
402
- ...slotProps,
403
- loading: unref(wf).loading.value
404
- })))]),
405
- "form.after": withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.after", normalizeProps(guardReactiveProps({
406
- ...slotProps,
407
- loading: unref(wf).loading.value
408
- })))]),
409
- "form.footer": withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.footer", normalizeProps(guardReactiveProps({
410
- ...slotProps,
411
- loading: unref(wf).loading.value
412
- })))]),
413
- _: 2
414
- }, [_ctx.$slots["form.submit"] ? {
415
- name: "form.submit",
416
- fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.submit", normalizeProps(guardReactiveProps({
417
- ...slotProps,
418
- loading: unref(wf).loading.value
419
- })))]),
420
- key: "0"
421
- } : void 0]), 1032, [
406
+ }, createSlots({ _: 2 }, [
407
+ _ctx.$slots["form.header"] ? {
408
+ name: "form.header",
409
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.header", normalizeProps(guardReactiveProps(slotProps)))]),
410
+ key: "0"
411
+ } : void 0,
412
+ _ctx.$slots["form.before"] ? {
413
+ name: "form.before",
414
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.before", normalizeProps(guardReactiveProps(slotProps)))]),
415
+ key: "1"
416
+ } : void 0,
417
+ _ctx.$slots["form.after"] ? {
418
+ name: "form.after",
419
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.after", normalizeProps(guardReactiveProps(slotProps)))]),
420
+ key: "2"
421
+ } : void 0,
422
+ _ctx.$slots["form.error"] ? {
423
+ name: "form.error",
424
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.error", normalizeProps(guardReactiveProps(slotProps)))]),
425
+ key: "3"
426
+ } : void 0,
427
+ _ctx.$slots["form.submit"] ? {
428
+ name: "form.submit",
429
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.submit", normalizeProps(guardReactiveProps(slotProps)))]),
430
+ key: "4"
431
+ } : void 0,
432
+ _ctx.$slots["form.footer"] ? {
433
+ name: "form.footer",
434
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.footer", normalizeProps(guardReactiveProps(slotProps)))]),
435
+ key: "5"
436
+ } : void 0,
437
+ _ctx.$slots["form.loading"] ? {
438
+ name: "form.loading",
439
+ fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "form.loading", normalizeProps(guardReactiveProps(slotProps)))]),
440
+ key: "6"
441
+ } : void 0
442
+ ]), 1032, [
422
443
  "def",
423
444
  "form-data",
424
445
  "types",
@@ -427,6 +448,8 @@ var as_wf_form_default = /* @__PURE__ */ defineComponent({
427
448
  "first-validation",
428
449
  "components",
429
450
  "client-factory",
451
+ "hide-root-title",
452
+ "hide-submit",
430
453
  "loading"
431
454
  ]))])) : createCommentVNode("v-if", true)]);
432
455
  };
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-wf-form.vue-CkpfsyQH.mjs";
1
+ import { t as _default } from "./as-wf-form.vue-CQgoNeRH.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_wf_form_default } from "./as-wf-form-LYEJi20H.mjs";
1
+ import { t as as_wf_form_default } from "./as-wf-form-DJq4U5XH.mjs";
2
2
  export { as_wf_form_default as default };
@@ -73,6 +73,10 @@ interface AsWfFormProps extends UseWfFormOptions {
73
73
  components?: Record<string, Component>;
74
74
  /** Per-form client factory override (FK value-help). Forwarded to AsForm. */
75
75
  clientFactory?: ClientFactory;
76
+ /** Forwarded to `<AsForm>`. Suppress the root field's title (e.g. when a chrome already shows the form label). */
77
+ hideRootTitle?: boolean;
78
+ /** Forwarded to `<AsForm>`. Suppress the default submit button when the host owns the submit affordance. */
79
+ hideSubmit?: boolean;
76
80
  /**
77
81
  * Consumer-provided navigation handler forwarded to `<AsWfFinish>`. Pairs
78
82
  * with `@atscript/db-client`'s `Client({ navigate })` option so one handler
@@ -128,40 +132,119 @@ declare var __VLS_1: {
128
132
  error: {};
129
133
  retry: () => Promise<void>;
130
134
  }, __VLS_46: {
135
+ title: string | undefined;
136
+ description: string | undefined;
137
+ data: Record<string, unknown>;
138
+ errors: Record<string, string | undefined> | undefined;
139
+ formError: string | undefined;
140
+ disabled: boolean;
131
141
  loading: boolean;
132
- clearErrors: () => void;
142
+ submitText: string;
143
+ submit: () => void;
133
144
  reset: () => Promise<void>;
145
+ clearErrors: () => void;
134
146
  setErrors: (errors: Record<string, string>) => void;
147
+ dismissError: (path: string) => void;
148
+ dismissFormError: () => void;
135
149
  formContext: Record<string, unknown> | undefined;
136
- disabled: boolean;
137
150
  }, __VLS_49: {
151
+ title: string | undefined;
152
+ description: string | undefined;
153
+ data: Record<string, unknown>;
154
+ errors: Record<string, string | undefined> | undefined;
155
+ formError: string | undefined;
156
+ disabled: boolean;
138
157
  loading: boolean;
139
- clearErrors: () => void;
158
+ submitText: string;
159
+ submit: () => void;
140
160
  reset: () => Promise<void>;
161
+ clearErrors: () => void;
141
162
  setErrors: (errors: Record<string, string>) => void;
163
+ dismissError: (path: string) => void;
164
+ dismissFormError: () => void;
142
165
  formContext: Record<string, unknown> | undefined;
143
- disabled: boolean;
144
166
  }, __VLS_52: {
167
+ title: string | undefined;
168
+ description: string | undefined;
169
+ data: Record<string, unknown>;
170
+ errors: Record<string, string | undefined> | undefined;
171
+ formError: string | undefined;
172
+ disabled: boolean;
145
173
  loading: boolean;
146
- clearErrors: () => void;
174
+ submitText: string;
175
+ submit: () => void;
147
176
  reset: () => Promise<void>;
177
+ clearErrors: () => void;
148
178
  setErrors: (errors: Record<string, string>) => void;
149
- disabled: boolean;
179
+ dismissError: (path: string) => void;
180
+ dismissFormError: () => void;
150
181
  formContext: Record<string, unknown> | undefined;
151
182
  }, __VLS_55: {
152
- loading: boolean;
183
+ message: string;
184
+ dismiss: () => void;
185
+ title: string | undefined;
186
+ description: string | undefined;
187
+ data: Record<string, unknown>;
188
+ errors: Record<string, string | undefined> | undefined;
189
+ formError: string | undefined;
153
190
  disabled: boolean;
154
- text: string;
155
- clearErrors: () => void;
191
+ loading: boolean;
192
+ submitText: string;
193
+ submit: () => void;
156
194
  reset: () => Promise<void>;
195
+ clearErrors: () => void;
157
196
  setErrors: (errors: Record<string, string>) => void;
197
+ dismissError: (path: string) => void;
198
+ dismissFormError: () => void;
158
199
  formContext: Record<string, unknown> | undefined;
159
200
  }, __VLS_58: {
201
+ text: string;
202
+ title: string | undefined;
203
+ description: string | undefined;
204
+ data: Record<string, unknown>;
205
+ errors: Record<string, string | undefined> | undefined;
206
+ formError: string | undefined;
207
+ disabled: boolean;
160
208
  loading: boolean;
209
+ submitText: string;
210
+ submit: () => void;
211
+ reset: () => Promise<void>;
212
+ clearErrors: () => void;
213
+ setErrors: (errors: Record<string, string>) => void;
214
+ dismissError: (path: string) => void;
215
+ dismissFormError: () => void;
216
+ formContext: Record<string, unknown> | undefined;
217
+ }, __VLS_61: {
218
+ title: string | undefined;
219
+ description: string | undefined;
220
+ data: Record<string, unknown>;
221
+ errors: Record<string, string | undefined> | undefined;
222
+ formError: string | undefined;
161
223
  disabled: boolean;
224
+ loading: boolean;
225
+ submitText: string;
226
+ submit: () => void;
227
+ reset: () => Promise<void>;
162
228
  clearErrors: () => void;
229
+ setErrors: (errors: Record<string, string>) => void;
230
+ dismissError: (path: string) => void;
231
+ dismissFormError: () => void;
232
+ formContext: Record<string, unknown> | undefined;
233
+ }, __VLS_64: {
234
+ title: string | undefined;
235
+ description: string | undefined;
236
+ data: Record<string, unknown>;
237
+ errors: Record<string, string | undefined> | undefined;
238
+ formError: string | undefined;
239
+ disabled: boolean;
240
+ loading: boolean;
241
+ submitText: string;
242
+ submit: () => void;
163
243
  reset: () => Promise<void>;
244
+ clearErrors: () => void;
164
245
  setErrors: (errors: Record<string, string>) => void;
246
+ dismissError: (path: string) => void;
247
+ dismissFormError: () => void;
165
248
  formContext: Record<string, unknown> | undefined;
166
249
  };
167
250
  type __VLS_Slots = {} & {
@@ -183,7 +266,7 @@ type __VLS_Slots = {} & {
183
266
  } & {
184
267
  'wf.finish.option'?: (props: typeof __VLS_31) => any;
185
268
  } & {
186
- 'form.error'?: (props: typeof __VLS_33) => any;
269
+ 'wf.error'?: (props: typeof __VLS_33) => any;
187
270
  } & {
188
271
  'form.header'?: (props: typeof __VLS_46) => any;
189
272
  } & {
@@ -191,31 +274,35 @@ type __VLS_Slots = {} & {
191
274
  } & {
192
275
  'form.after'?: (props: typeof __VLS_52) => any;
193
276
  } & {
194
- 'form.submit'?: (props: typeof __VLS_55) => any;
277
+ 'form.error'?: (props: typeof __VLS_55) => any;
278
+ } & {
279
+ 'form.submit'?: (props: typeof __VLS_58) => any;
195
280
  } & {
196
- 'form.footer'?: (props: typeof __VLS_58) => any;
281
+ 'form.footer'?: (props: typeof __VLS_61) => any;
282
+ } & {
283
+ 'form.loading'?: (props: typeof __VLS_64) => any;
197
284
  };
198
285
  declare const __VLS_base: vue.DefineComponent<AsWfFormProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
199
- dismiss: () => any;
200
- action: (action: WfActionRequest) => any;
286
+ finished: (response: unknown) => any;
201
287
  error: (error: {
202
288
  message: string;
203
289
  status?: number;
204
290
  }) => any;
205
- finished: (response: unknown) => any;
206
291
  submit: (data: unknown) => any;
207
292
  loading: (isLoading: boolean) => any;
293
+ dismiss: () => any;
294
+ action: (action: WfActionRequest) => any;
208
295
  form: (def: FormDef, context?: Record<string, unknown> | undefined) => any;
209
296
  }, string, vue.PublicProps, Readonly<AsWfFormProps> & Readonly<{
210
- onDismiss?: (() => any) | undefined;
211
- onAction?: ((action: WfActionRequest) => any) | undefined;
297
+ onFinished?: ((response: unknown) => any) | undefined;
212
298
  onError?: ((error: {
213
299
  message: string;
214
300
  status?: number;
215
301
  }) => any) | undefined;
216
- onFinished?: ((response: unknown) => any) | undefined;
217
302
  onSubmit?: ((data: unknown) => any) | undefined;
218
303
  onLoading?: ((isLoading: boolean) => any) | undefined;
304
+ onDismiss?: (() => any) | undefined;
305
+ onAction?: ((action: WfActionRequest) => any) | undefined;
219
306
  onForm?: ((def: FormDef, context?: Record<string, unknown> | undefined) => any) | undefined;
220
307
  }>, {
221
308
  tokenTransport: "body" | "cookie" | "query";
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
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";
2
+ import { i as useWfForm, n as UseWfFormOptions, r as UseWfFormReturn, t as _default$1 } from "./as-wf-form.vue-CQgoNeRH.mjs";
3
3
  import { t as _default } from "./as-wf-finish.vue-BhXMooP3.mjs";
4
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-LYEJi20H.mjs";
1
+ import { n as useWfForm, t as as_wf_form_default } from "./as-wf-form-DJq4U5XH.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.89",
3
+ "version": "0.1.90",
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.89"
53
+ "@atscript/ui": "^0.1.90"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@atscript/core": "^0.1.70",
@@ -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.9",
65
- "@atscript/moost-wf": "^0.1.89",
66
- "@atscript/vue-form": "^0.1.89"
65
+ "@atscript/moost-wf": "^0.1.90",
66
+ "@atscript/vue-form": "^0.1.90"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@atscript/typescript": "^0.1.70",
70
70
  "vue": "^3",
71
- "@atscript/vue-form": "^0.1.89"
71
+ "@atscript/vue-form": "^0.1.90"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "node ../../scripts/gen-exports.mjs && vp pack",