@atscript/vue-form 0.1.88 → 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.
- package/dist/{as-form-BpcP_wIF.cjs → as-form-BRuzVUsN.cjs} +34 -41
- package/dist/{as-form-Cb5orGFC.mjs → as-form-cszNv3LX.mjs} +36 -43
- package/dist/as-form.cjs +1 -1
- package/dist/as-form.d.cts +1 -1
- package/dist/as-form.d.mts +1 -1
- package/dist/as-form.mjs +1 -1
- package/dist/{as-form.vue-DLL244uG.d.mts → as-form.vue-Dop7SBeF.d.mts} +92 -11
- package/dist/{as-form.vue-jWfGgDC2.d.cts → as-form.vue-yGdKLYxn.d.cts} +92 -11
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +24 -2
- package/dist/index.d.mts +24 -2
- package/dist/index.mjs +1 -1
- package/package.json +9 -9
|
@@ -207,6 +207,29 @@ function useAsForm(options) {
|
|
|
207
207
|
}));
|
|
208
208
|
const submitText = (0, vue.computed)(() => (0, _atscript_ui.resolveFormProp)(options.def().type, _atscript_ui.UI_FORM_FN_SUBMIT_TEXT, _atscript_ui.UI_FORM_SUBMIT_TEXT, ctx.value) ?? "Submit");
|
|
209
209
|
const submitDisabled = (0, vue.computed)(() => options.loading?.() === true || ((0, _atscript_ui.resolveFormProp)(options.def().type, _atscript_ui.UI_FORM_FN_SUBMIT_DISABLED, void 0, ctx.value) ?? false));
|
|
210
|
+
const resolveRootProp = (fnKey, staticKey) => {
|
|
211
|
+
const root = options.def().rootField;
|
|
212
|
+
return root ? (0, _atscript_ui.resolveFieldProp)(root.prop, fnKey, staticKey, ctx.value) : void 0;
|
|
213
|
+
};
|
|
214
|
+
const title = (0, vue.computed)(() => resolveRootProp(_atscript_ui.UI_FORM_FN_TITLE, _atscript_ui.META_LABEL));
|
|
215
|
+
const description = (0, vue.computed)(() => resolveRootProp(_atscript_ui.UI_FORM_FN_DESCRIPTION, _atscript_ui.META_DESCRIPTION));
|
|
216
|
+
const slotProps = (0, vue.computed)(() => ({
|
|
217
|
+
title: title.value,
|
|
218
|
+
description: description.value,
|
|
219
|
+
data: data.value,
|
|
220
|
+
errors: ext.effective.value,
|
|
221
|
+
formError: ext.formError.value,
|
|
222
|
+
disabled: submitDisabled.value,
|
|
223
|
+
loading: options.loading?.() === true,
|
|
224
|
+
submitText: submitText.value,
|
|
225
|
+
submit: onSubmit,
|
|
226
|
+
reset: resetState,
|
|
227
|
+
clearErrors,
|
|
228
|
+
setErrors,
|
|
229
|
+
dismissError: ext.dismissAt,
|
|
230
|
+
dismissFormError: ext.dismissForm,
|
|
231
|
+
formContext: formContext.value
|
|
232
|
+
}));
|
|
210
233
|
function supportsAction(def, actionId) {
|
|
211
234
|
return def.fields.some((f) => {
|
|
212
235
|
if ((0, _atscript_ui.getFieldMeta)(f.prop, _atscript_ui.UI_FORM_ACTION)?.id === actionId) return true;
|
|
@@ -260,6 +283,9 @@ function useAsForm(options) {
|
|
|
260
283
|
onSubmit,
|
|
261
284
|
submitText,
|
|
262
285
|
submitDisabled,
|
|
286
|
+
title,
|
|
287
|
+
description,
|
|
288
|
+
slotProps,
|
|
263
289
|
invokeAction,
|
|
264
290
|
dismissError: ext.dismissAt,
|
|
265
291
|
dismissFormError: ext.dismissForm,
|
|
@@ -369,46 +395,19 @@ var as_form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
369
395
|
inert: __props.loading,
|
|
370
396
|
onSubmit: _cache[1] || (_cache[1] = (0, vue.withModifiers)((...args) => (0, vue.unref)(form).onSubmit && (0, vue.unref)(form).onSubmit(...args), ["prevent"]))
|
|
371
397
|
}, [
|
|
372
|
-
(0, vue.renderSlot)(_ctx.$slots, "form.header",
|
|
373
|
-
|
|
374
|
-
reset: (0, vue.unref)(form).reset,
|
|
375
|
-
setErrors: (0, vue.unref)(form).setErrors,
|
|
376
|
-
formContext: __props.formContext,
|
|
377
|
-
disabled: (0, vue.unref)(form).submitDisabled.value
|
|
378
|
-
}),
|
|
379
|
-
(0, vue.renderSlot)(_ctx.$slots, "form.before", {
|
|
380
|
-
clearErrors: (0, vue.unref)(form).clearErrors,
|
|
381
|
-
reset: (0, vue.unref)(form).reset,
|
|
382
|
-
setErrors: (0, vue.unref)(form).setErrors,
|
|
383
|
-
formContext: __props.formContext,
|
|
384
|
-
disabled: (0, vue.unref)(form).submitDisabled.value
|
|
385
|
-
}),
|
|
398
|
+
(0, vue.renderSlot)(_ctx.$slots, "form.header", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(form).slotProps.value))),
|
|
399
|
+
(0, vue.renderSlot)(_ctx.$slots, "form.before", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(form).slotProps.value))),
|
|
386
400
|
(0, vue.createVNode)(require_as_field.as_field_default, { field: __props.def.rootField }, null, 8, ["field"]),
|
|
387
|
-
(0, vue.renderSlot)(_ctx.$slots, "form.after",
|
|
388
|
-
|
|
389
|
-
reset: (0, vue.unref)(form).reset,
|
|
390
|
-
setErrors: (0, vue.unref)(form).setErrors,
|
|
391
|
-
disabled: (0, vue.unref)(form).submitDisabled.value,
|
|
392
|
-
formContext: __props.formContext
|
|
393
|
-
}),
|
|
394
|
-
(0, vue.unref)(form).formError.value ? (0, vue.renderSlot)(_ctx.$slots, "form.error", {
|
|
395
|
-
key: 0,
|
|
401
|
+
(0, vue.renderSlot)(_ctx.$slots, "form.after", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(form).slotProps.value))),
|
|
402
|
+
(0, vue.unref)(form).formError.value ? (0, vue.renderSlot)(_ctx.$slots, "form.error", (0, vue.mergeProps)({ key: 0 }, (0, vue.unref)(form).slotProps.value, {
|
|
396
403
|
message: (0, vue.unref)(form).formError.value,
|
|
397
404
|
dismiss: (0, vue.unref)(form).dismissFormError
|
|
398
|
-
}, () => [(0, vue.createElementVNode)("div", _hoisted_2, [(0, vue.createElementVNode)("span", _hoisted_3, (0, vue.toDisplayString)((0, vue.unref)(form).formError.value), 1), (0, vue.createElementVNode)("button", {
|
|
405
|
+
}), () => [(0, vue.createElementVNode)("div", _hoisted_2, [(0, vue.createElementVNode)("span", _hoisted_3, (0, vue.toDisplayString)((0, vue.unref)(form).formError.value), 1), (0, vue.createElementVNode)("button", {
|
|
399
406
|
type: "button",
|
|
400
407
|
class: "as-form-error-dismiss",
|
|
401
408
|
onClick: _cache[0] || (_cache[0] = (...args) => (0, vue.unref)(form).dismissFormError && (0, vue.unref)(form).dismissFormError(...args))
|
|
402
409
|
}, " Dismiss ")])]) : (0, vue.createCommentVNode)("v-if", true),
|
|
403
|
-
!__props.hideSubmit ? (0, vue.renderSlot)(_ctx.$slots, "form.submit", {
|
|
404
|
-
key: 1,
|
|
405
|
-
disabled: (0, vue.unref)(form).submitDisabled.value,
|
|
406
|
-
text: (0, vue.unref)(form).submitText.value,
|
|
407
|
-
clearErrors: (0, vue.unref)(form).clearErrors,
|
|
408
|
-
reset: (0, vue.unref)(form).reset,
|
|
409
|
-
setErrors: (0, vue.unref)(form).setErrors,
|
|
410
|
-
formContext: __props.formContext
|
|
411
|
-
}, () => [(0, vue.createElementVNode)("button", {
|
|
410
|
+
!__props.hideSubmit ? (0, vue.renderSlot)(_ctx.$slots, "form.submit", (0, vue.mergeProps)({ key: 1 }, (0, vue.unref)(form).slotProps.value, { text: (0, vue.unref)(form).submitText.value }), () => [(0, vue.createElementVNode)("button", {
|
|
412
411
|
class: "as-submit-btn",
|
|
413
412
|
disabled: (0, vue.unref)(form).submitDisabled.value
|
|
414
413
|
}, (0, vue.toDisplayString)((0, vue.unref)(form).submitText.value), 9, _hoisted_4)]) : (0, vue.createCommentVNode)("v-if", true),
|
|
@@ -417,14 +416,8 @@ var as_form_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
417
416
|
def: __props.def,
|
|
418
417
|
fields: __props.def.pushDownFields
|
|
419
418
|
}, null, 8, ["def", "fields"])])) : (0, vue.createCommentVNode)("v-if", true),
|
|
420
|
-
(0, vue.renderSlot)(_ctx.$slots, "form.footer",
|
|
421
|
-
|
|
422
|
-
clearErrors: (0, vue.unref)(form).clearErrors,
|
|
423
|
-
reset: (0, vue.unref)(form).reset,
|
|
424
|
-
setErrors: (0, vue.unref)(form).setErrors,
|
|
425
|
-
formContext: __props.formContext
|
|
426
|
-
}),
|
|
427
|
-
__props.loading ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_6, [(0, vue.renderSlot)(_ctx.$slots, "form.loading", {}, () => [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("span", {
|
|
419
|
+
(0, vue.renderSlot)(_ctx.$slots, "form.footer", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(form).slotProps.value))),
|
|
420
|
+
__props.loading ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_6, [(0, vue.renderSlot)(_ctx.$slots, "form.loading", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(form).slotProps.value)), () => [_cache[2] || (_cache[2] = (0, vue.createElementVNode)("span", {
|
|
428
421
|
class: "as-form-overlay-icon",
|
|
429
422
|
"aria-hidden": "true"
|
|
430
423
|
}, null, -1))])])) : (0, vue.createCommentVNode)("v-if", true)
|
|
@@ -3,8 +3,8 @@ import { n as provideAsNestedSectionsStore, r as useAsNestedSectionsStore, t as
|
|
|
3
3
|
import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-CBykDEjZ.mjs";
|
|
4
4
|
import { t as as_field_default } from "./as-field-CryuaPPU.mjs";
|
|
5
5
|
import { t as as_iterator_default } from "./as-iterator-B0Jf2zn4.mjs";
|
|
6
|
-
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, openBlock, provide, reactive, ref, renderSlot, toDisplayString, toRaw, toValue, unref, watch, watchEffect, withModifiers } from "vue";
|
|
7
|
-
import { UI_FORM_ACTION, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_SUBMIT_TEXT, WF_ACTION_WITH_DATA, buildDescendantErrorCounts, getFieldMeta, getFormValidator, iteratePathAncestors, mergeErrorMaps, resolveFormProp } from "@atscript/ui";
|
|
6
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeProps, openBlock, provide, reactive, ref, renderSlot, toDisplayString, toRaw, toValue, unref, watch, watchEffect, withModifiers } from "vue";
|
|
7
|
+
import { META_DESCRIPTION, META_LABEL, UI_FORM_ACTION, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_SUBMIT_TEXT, WF_ACTION_WITH_DATA, buildDescendantErrorCounts, getFieldMeta, getFormValidator, iteratePathAncestors, mergeErrorMaps, resolveFieldProp, resolveFormProp } from "@atscript/ui";
|
|
8
8
|
//#region src/composables/use-as-external-errors.ts
|
|
9
9
|
/**
|
|
10
10
|
* Local dismissal state for externally-supplied errors.
|
|
@@ -207,6 +207,29 @@ function useAsForm(options) {
|
|
|
207
207
|
}));
|
|
208
208
|
const submitText = computed(() => resolveFormProp(options.def().type, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_SUBMIT_TEXT, ctx.value) ?? "Submit");
|
|
209
209
|
const submitDisabled = computed(() => options.loading?.() === true || (resolveFormProp(options.def().type, UI_FORM_FN_SUBMIT_DISABLED, void 0, ctx.value) ?? false));
|
|
210
|
+
const resolveRootProp = (fnKey, staticKey) => {
|
|
211
|
+
const root = options.def().rootField;
|
|
212
|
+
return root ? resolveFieldProp(root.prop, fnKey, staticKey, ctx.value) : void 0;
|
|
213
|
+
};
|
|
214
|
+
const title = computed(() => resolveRootProp(UI_FORM_FN_TITLE, META_LABEL));
|
|
215
|
+
const description = computed(() => resolveRootProp(UI_FORM_FN_DESCRIPTION, META_DESCRIPTION));
|
|
216
|
+
const slotProps = computed(() => ({
|
|
217
|
+
title: title.value,
|
|
218
|
+
description: description.value,
|
|
219
|
+
data: data.value,
|
|
220
|
+
errors: ext.effective.value,
|
|
221
|
+
formError: ext.formError.value,
|
|
222
|
+
disabled: submitDisabled.value,
|
|
223
|
+
loading: options.loading?.() === true,
|
|
224
|
+
submitText: submitText.value,
|
|
225
|
+
submit: onSubmit,
|
|
226
|
+
reset: resetState,
|
|
227
|
+
clearErrors,
|
|
228
|
+
setErrors,
|
|
229
|
+
dismissError: ext.dismissAt,
|
|
230
|
+
dismissFormError: ext.dismissForm,
|
|
231
|
+
formContext: formContext.value
|
|
232
|
+
}));
|
|
210
233
|
function supportsAction(def, actionId) {
|
|
211
234
|
return def.fields.some((f) => {
|
|
212
235
|
if (getFieldMeta(f.prop, UI_FORM_ACTION)?.id === actionId) return true;
|
|
@@ -260,6 +283,9 @@ function useAsForm(options) {
|
|
|
260
283
|
onSubmit,
|
|
261
284
|
submitText,
|
|
262
285
|
submitDisabled,
|
|
286
|
+
title,
|
|
287
|
+
description,
|
|
288
|
+
slotProps,
|
|
263
289
|
invokeAction,
|
|
264
290
|
dismissError: ext.dismissAt,
|
|
265
291
|
dismissFormError: ext.dismissForm,
|
|
@@ -369,46 +395,19 @@ var as_form_default = /* @__PURE__ */ defineComponent({
|
|
|
369
395
|
inert: __props.loading,
|
|
370
396
|
onSubmit: _cache[1] || (_cache[1] = withModifiers((...args) => unref(form).onSubmit && unref(form).onSubmit(...args), ["prevent"]))
|
|
371
397
|
}, [
|
|
372
|
-
renderSlot(_ctx.$slots, "form.header",
|
|
373
|
-
|
|
374
|
-
reset: unref(form).reset,
|
|
375
|
-
setErrors: unref(form).setErrors,
|
|
376
|
-
formContext: __props.formContext,
|
|
377
|
-
disabled: unref(form).submitDisabled.value
|
|
378
|
-
}),
|
|
379
|
-
renderSlot(_ctx.$slots, "form.before", {
|
|
380
|
-
clearErrors: unref(form).clearErrors,
|
|
381
|
-
reset: unref(form).reset,
|
|
382
|
-
setErrors: unref(form).setErrors,
|
|
383
|
-
formContext: __props.formContext,
|
|
384
|
-
disabled: unref(form).submitDisabled.value
|
|
385
|
-
}),
|
|
398
|
+
renderSlot(_ctx.$slots, "form.header", normalizeProps(guardReactiveProps(unref(form).slotProps.value))),
|
|
399
|
+
renderSlot(_ctx.$slots, "form.before", normalizeProps(guardReactiveProps(unref(form).slotProps.value))),
|
|
386
400
|
createVNode(as_field_default, { field: __props.def.rootField }, null, 8, ["field"]),
|
|
387
|
-
renderSlot(_ctx.$slots, "form.after",
|
|
388
|
-
|
|
389
|
-
reset: unref(form).reset,
|
|
390
|
-
setErrors: unref(form).setErrors,
|
|
391
|
-
disabled: unref(form).submitDisabled.value,
|
|
392
|
-
formContext: __props.formContext
|
|
393
|
-
}),
|
|
394
|
-
unref(form).formError.value ? renderSlot(_ctx.$slots, "form.error", {
|
|
395
|
-
key: 0,
|
|
401
|
+
renderSlot(_ctx.$slots, "form.after", normalizeProps(guardReactiveProps(unref(form).slotProps.value))),
|
|
402
|
+
unref(form).formError.value ? renderSlot(_ctx.$slots, "form.error", mergeProps({ key: 0 }, unref(form).slotProps.value, {
|
|
396
403
|
message: unref(form).formError.value,
|
|
397
404
|
dismiss: unref(form).dismissFormError
|
|
398
|
-
}, () => [createElementVNode("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(unref(form).formError.value), 1), createElementVNode("button", {
|
|
405
|
+
}), () => [createElementVNode("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(unref(form).formError.value), 1), createElementVNode("button", {
|
|
399
406
|
type: "button",
|
|
400
407
|
class: "as-form-error-dismiss",
|
|
401
408
|
onClick: _cache[0] || (_cache[0] = (...args) => unref(form).dismissFormError && unref(form).dismissFormError(...args))
|
|
402
409
|
}, " Dismiss ")])]) : createCommentVNode("v-if", true),
|
|
403
|
-
!__props.hideSubmit ? renderSlot(_ctx.$slots, "form.submit", {
|
|
404
|
-
key: 1,
|
|
405
|
-
disabled: unref(form).submitDisabled.value,
|
|
406
|
-
text: unref(form).submitText.value,
|
|
407
|
-
clearErrors: unref(form).clearErrors,
|
|
408
|
-
reset: unref(form).reset,
|
|
409
|
-
setErrors: unref(form).setErrors,
|
|
410
|
-
formContext: __props.formContext
|
|
411
|
-
}, () => [createElementVNode("button", {
|
|
410
|
+
!__props.hideSubmit ? renderSlot(_ctx.$slots, "form.submit", mergeProps({ key: 1 }, unref(form).slotProps.value, { text: unref(form).submitText.value }), () => [createElementVNode("button", {
|
|
412
411
|
class: "as-submit-btn",
|
|
413
412
|
disabled: unref(form).submitDisabled.value
|
|
414
413
|
}, toDisplayString(unref(form).submitText.value), 9, _hoisted_4)]) : createCommentVNode("v-if", true),
|
|
@@ -417,14 +416,8 @@ var as_form_default = /* @__PURE__ */ defineComponent({
|
|
|
417
416
|
def: __props.def,
|
|
418
417
|
fields: __props.def.pushDownFields
|
|
419
418
|
}, null, 8, ["def", "fields"])])) : createCommentVNode("v-if", true),
|
|
420
|
-
renderSlot(_ctx.$slots, "form.footer",
|
|
421
|
-
|
|
422
|
-
clearErrors: unref(form).clearErrors,
|
|
423
|
-
reset: unref(form).reset,
|
|
424
|
-
setErrors: unref(form).setErrors,
|
|
425
|
-
formContext: __props.formContext
|
|
426
|
-
}),
|
|
427
|
-
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_6, [renderSlot(_ctx.$slots, "form.loading", {}, () => [_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
419
|
+
renderSlot(_ctx.$slots, "form.footer", normalizeProps(guardReactiveProps(unref(form).slotProps.value))),
|
|
420
|
+
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_6, [renderSlot(_ctx.$slots, "form.loading", normalizeProps(guardReactiveProps(unref(form).slotProps.value)), () => [_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
428
421
|
class: "as-form-overlay-icon",
|
|
429
422
|
"aria-hidden": "true"
|
|
430
423
|
}, null, -1))])])) : createCommentVNode("v-if", true)
|
package/dist/as-form.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_form = require("./as-form-
|
|
1
|
+
const require_as_form = require("./as-form-BRuzVUsN.cjs");
|
|
2
2
|
module.exports = require_as_form.as_form_default;
|
package/dist/as-form.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as _default, t as Props } from "./as-form.vue-
|
|
1
|
+
import { n as _default, t as Props } from "./as-form.vue-yGdKLYxn.cjs";
|
|
2
2
|
export { Props, _default as default };
|
package/dist/as-form.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as _default, t as Props } from "./as-form.vue-
|
|
1
|
+
import { n as _default, t as Props } from "./as-form.vue-Dop7SBeF.mjs";
|
|
2
2
|
export { Props, _default as default };
|
package/dist/as-form.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_form_default } from "./as-form-
|
|
1
|
+
import { t as as_form_default } from "./as-form-cszNv3LX.mjs";
|
|
2
2
|
export { as_form_default as default };
|
|
@@ -77,11 +77,11 @@ interface Props<TF, TC> {
|
|
|
77
77
|
}
|
|
78
78
|
declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
79
79
|
props: vue.PublicProps & __VLS_PrettifyLocal<Props<TFormData, TFormContext> & {
|
|
80
|
-
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
81
80
|
onError?: ((errors: {
|
|
82
81
|
path: string;
|
|
83
82
|
message: string;
|
|
84
83
|
}[]) => any) | undefined;
|
|
84
|
+
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
85
85
|
onAction?: ((name: string, data: TFormData) => any) | undefined;
|
|
86
86
|
"onUnsupported-action"?: ((name: string, data: TFormData) => any) | undefined;
|
|
87
87
|
onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TFormData) => any) | undefined;
|
|
@@ -92,52 +92,133 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
92
92
|
attrs: any;
|
|
93
93
|
slots: {
|
|
94
94
|
'form.header'?: (props: {
|
|
95
|
-
|
|
95
|
+
title: string | undefined;
|
|
96
|
+
description: string | undefined;
|
|
97
|
+
data: TFormData;
|
|
98
|
+
errors: Record<string, string | undefined> | undefined;
|
|
99
|
+
formError: string | undefined;
|
|
100
|
+
disabled: boolean;
|
|
101
|
+
loading: boolean;
|
|
102
|
+
submitText: string;
|
|
103
|
+
submit: () => void;
|
|
96
104
|
reset: () => Promise<void>;
|
|
105
|
+
clearErrors: () => void;
|
|
97
106
|
setErrors: (errors: Record<string, string>) => void;
|
|
107
|
+
dismissError: (path: string) => void;
|
|
108
|
+
dismissFormError: () => void;
|
|
98
109
|
formContext: TFormContext | undefined;
|
|
99
|
-
disabled: boolean;
|
|
100
110
|
}) => any;
|
|
101
111
|
} & {
|
|
102
112
|
'form.before'?: (props: {
|
|
103
|
-
|
|
113
|
+
title: string | undefined;
|
|
114
|
+
description: string | undefined;
|
|
115
|
+
data: TFormData;
|
|
116
|
+
errors: Record<string, string | undefined> | undefined;
|
|
117
|
+
formError: string | undefined;
|
|
118
|
+
disabled: boolean;
|
|
119
|
+
loading: boolean;
|
|
120
|
+
submitText: string;
|
|
121
|
+
submit: () => void;
|
|
104
122
|
reset: () => Promise<void>;
|
|
123
|
+
clearErrors: () => void;
|
|
105
124
|
setErrors: (errors: Record<string, string>) => void;
|
|
125
|
+
dismissError: (path: string) => void;
|
|
126
|
+
dismissFormError: () => void;
|
|
106
127
|
formContext: TFormContext | undefined;
|
|
107
|
-
disabled: boolean;
|
|
108
128
|
}) => any;
|
|
109
129
|
} & {
|
|
110
130
|
'form.after'?: (props: {
|
|
111
|
-
|
|
131
|
+
title: string | undefined;
|
|
132
|
+
description: string | undefined;
|
|
133
|
+
data: TFormData;
|
|
134
|
+
errors: Record<string, string | undefined> | undefined;
|
|
135
|
+
formError: string | undefined;
|
|
136
|
+
disabled: boolean;
|
|
137
|
+
loading: boolean;
|
|
138
|
+
submitText: string;
|
|
139
|
+
submit: () => void;
|
|
112
140
|
reset: () => Promise<void>;
|
|
141
|
+
clearErrors: () => void;
|
|
113
142
|
setErrors: (errors: Record<string, string>) => void;
|
|
114
|
-
|
|
143
|
+
dismissError: (path: string) => void;
|
|
144
|
+
dismissFormError: () => void;
|
|
115
145
|
formContext: TFormContext | undefined;
|
|
116
146
|
}) => any;
|
|
117
147
|
} & {
|
|
118
148
|
'form.error'?: (props: {
|
|
119
149
|
message: string;
|
|
120
150
|
dismiss: () => void;
|
|
151
|
+
title: string | undefined;
|
|
152
|
+
description: string | undefined;
|
|
153
|
+
data: TFormData;
|
|
154
|
+
errors: Record<string, string | undefined> | undefined;
|
|
155
|
+
formError: string | undefined;
|
|
156
|
+
disabled: boolean;
|
|
157
|
+
loading: boolean;
|
|
158
|
+
submitText: string;
|
|
159
|
+
submit: () => void;
|
|
160
|
+
reset: () => Promise<void>;
|
|
161
|
+
clearErrors: () => void;
|
|
162
|
+
setErrors: (errors: Record<string, string>) => void;
|
|
163
|
+
dismissError: (path: string) => void;
|
|
164
|
+
dismissFormError: () => void;
|
|
165
|
+
formContext: TFormContext | undefined;
|
|
121
166
|
}) => any;
|
|
122
167
|
} & {
|
|
123
168
|
'form.submit'?: (props: {
|
|
124
|
-
disabled: boolean;
|
|
125
169
|
text: string;
|
|
126
|
-
|
|
170
|
+
title: string | undefined;
|
|
171
|
+
description: string | undefined;
|
|
172
|
+
data: TFormData;
|
|
173
|
+
errors: Record<string, string | undefined> | undefined;
|
|
174
|
+
formError: string | undefined;
|
|
175
|
+
disabled: boolean;
|
|
176
|
+
loading: boolean;
|
|
177
|
+
submitText: string;
|
|
178
|
+
submit: () => void;
|
|
127
179
|
reset: () => Promise<void>;
|
|
180
|
+
clearErrors: () => void;
|
|
128
181
|
setErrors: (errors: Record<string, string>) => void;
|
|
182
|
+
dismissError: (path: string) => void;
|
|
183
|
+
dismissFormError: () => void;
|
|
129
184
|
formContext: TFormContext | undefined;
|
|
130
185
|
}) => any;
|
|
131
186
|
} & {
|
|
132
187
|
'form.footer'?: (props: {
|
|
188
|
+
title: string | undefined;
|
|
189
|
+
description: string | undefined;
|
|
190
|
+
data: TFormData;
|
|
191
|
+
errors: Record<string, string | undefined> | undefined;
|
|
192
|
+
formError: string | undefined;
|
|
133
193
|
disabled: boolean;
|
|
134
|
-
|
|
194
|
+
loading: boolean;
|
|
195
|
+
submitText: string;
|
|
196
|
+
submit: () => void;
|
|
135
197
|
reset: () => Promise<void>;
|
|
198
|
+
clearErrors: () => void;
|
|
136
199
|
setErrors: (errors: Record<string, string>) => void;
|
|
200
|
+
dismissError: (path: string) => void;
|
|
201
|
+
dismissFormError: () => void;
|
|
137
202
|
formContext: TFormContext | undefined;
|
|
138
203
|
}) => any;
|
|
139
204
|
} & {
|
|
140
|
-
'form.loading'?: (props: {
|
|
205
|
+
'form.loading'?: (props: {
|
|
206
|
+
title: string | undefined;
|
|
207
|
+
description: string | undefined;
|
|
208
|
+
data: TFormData;
|
|
209
|
+
errors: Record<string, string | undefined> | undefined;
|
|
210
|
+
formError: string | undefined;
|
|
211
|
+
disabled: boolean;
|
|
212
|
+
loading: boolean;
|
|
213
|
+
submitText: string;
|
|
214
|
+
submit: () => void;
|
|
215
|
+
reset: () => Promise<void>;
|
|
216
|
+
clearErrors: () => void;
|
|
217
|
+
setErrors: (errors: Record<string, string>) => void;
|
|
218
|
+
dismissError: (path: string) => void;
|
|
219
|
+
dismissFormError: () => void;
|
|
220
|
+
formContext: TFormContext | undefined;
|
|
221
|
+
}) => any;
|
|
141
222
|
};
|
|
142
223
|
emit: {
|
|
143
224
|
(e: "submit", data: TFormData): void;
|
|
@@ -77,11 +77,11 @@ interface Props<TF, TC> {
|
|
|
77
77
|
}
|
|
78
78
|
declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
79
79
|
props: vue.PublicProps & __VLS_PrettifyLocal<Props<TFormData, TFormContext> & {
|
|
80
|
-
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
81
80
|
onError?: ((errors: {
|
|
82
81
|
path: string;
|
|
83
82
|
message: string;
|
|
84
83
|
}[]) => any) | undefined;
|
|
84
|
+
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
85
85
|
onAction?: ((name: string, data: TFormData) => any) | undefined;
|
|
86
86
|
"onUnsupported-action"?: ((name: string, data: TFormData) => any) | undefined;
|
|
87
87
|
onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TFormData) => any) | undefined;
|
|
@@ -92,52 +92,133 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
92
92
|
attrs: any;
|
|
93
93
|
slots: {
|
|
94
94
|
'form.header'?: (props: {
|
|
95
|
-
|
|
95
|
+
title: string | undefined;
|
|
96
|
+
description: string | undefined;
|
|
97
|
+
data: TFormData;
|
|
98
|
+
errors: Record<string, string | undefined> | undefined;
|
|
99
|
+
formError: string | undefined;
|
|
100
|
+
disabled: boolean;
|
|
101
|
+
loading: boolean;
|
|
102
|
+
submitText: string;
|
|
103
|
+
submit: () => void;
|
|
96
104
|
reset: () => Promise<void>;
|
|
105
|
+
clearErrors: () => void;
|
|
97
106
|
setErrors: (errors: Record<string, string>) => void;
|
|
107
|
+
dismissError: (path: string) => void;
|
|
108
|
+
dismissFormError: () => void;
|
|
98
109
|
formContext: TFormContext | undefined;
|
|
99
|
-
disabled: boolean;
|
|
100
110
|
}) => any;
|
|
101
111
|
} & {
|
|
102
112
|
'form.before'?: (props: {
|
|
103
|
-
|
|
113
|
+
title: string | undefined;
|
|
114
|
+
description: string | undefined;
|
|
115
|
+
data: TFormData;
|
|
116
|
+
errors: Record<string, string | undefined> | undefined;
|
|
117
|
+
formError: string | undefined;
|
|
118
|
+
disabled: boolean;
|
|
119
|
+
loading: boolean;
|
|
120
|
+
submitText: string;
|
|
121
|
+
submit: () => void;
|
|
104
122
|
reset: () => Promise<void>;
|
|
123
|
+
clearErrors: () => void;
|
|
105
124
|
setErrors: (errors: Record<string, string>) => void;
|
|
125
|
+
dismissError: (path: string) => void;
|
|
126
|
+
dismissFormError: () => void;
|
|
106
127
|
formContext: TFormContext | undefined;
|
|
107
|
-
disabled: boolean;
|
|
108
128
|
}) => any;
|
|
109
129
|
} & {
|
|
110
130
|
'form.after'?: (props: {
|
|
111
|
-
|
|
131
|
+
title: string | undefined;
|
|
132
|
+
description: string | undefined;
|
|
133
|
+
data: TFormData;
|
|
134
|
+
errors: Record<string, string | undefined> | undefined;
|
|
135
|
+
formError: string | undefined;
|
|
136
|
+
disabled: boolean;
|
|
137
|
+
loading: boolean;
|
|
138
|
+
submitText: string;
|
|
139
|
+
submit: () => void;
|
|
112
140
|
reset: () => Promise<void>;
|
|
141
|
+
clearErrors: () => void;
|
|
113
142
|
setErrors: (errors: Record<string, string>) => void;
|
|
114
|
-
|
|
143
|
+
dismissError: (path: string) => void;
|
|
144
|
+
dismissFormError: () => void;
|
|
115
145
|
formContext: TFormContext | undefined;
|
|
116
146
|
}) => any;
|
|
117
147
|
} & {
|
|
118
148
|
'form.error'?: (props: {
|
|
119
149
|
message: string;
|
|
120
150
|
dismiss: () => void;
|
|
151
|
+
title: string | undefined;
|
|
152
|
+
description: string | undefined;
|
|
153
|
+
data: TFormData;
|
|
154
|
+
errors: Record<string, string | undefined> | undefined;
|
|
155
|
+
formError: string | undefined;
|
|
156
|
+
disabled: boolean;
|
|
157
|
+
loading: boolean;
|
|
158
|
+
submitText: string;
|
|
159
|
+
submit: () => void;
|
|
160
|
+
reset: () => Promise<void>;
|
|
161
|
+
clearErrors: () => void;
|
|
162
|
+
setErrors: (errors: Record<string, string>) => void;
|
|
163
|
+
dismissError: (path: string) => void;
|
|
164
|
+
dismissFormError: () => void;
|
|
165
|
+
formContext: TFormContext | undefined;
|
|
121
166
|
}) => any;
|
|
122
167
|
} & {
|
|
123
168
|
'form.submit'?: (props: {
|
|
124
|
-
disabled: boolean;
|
|
125
169
|
text: string;
|
|
126
|
-
|
|
170
|
+
title: string | undefined;
|
|
171
|
+
description: string | undefined;
|
|
172
|
+
data: TFormData;
|
|
173
|
+
errors: Record<string, string | undefined> | undefined;
|
|
174
|
+
formError: string | undefined;
|
|
175
|
+
disabled: boolean;
|
|
176
|
+
loading: boolean;
|
|
177
|
+
submitText: string;
|
|
178
|
+
submit: () => void;
|
|
127
179
|
reset: () => Promise<void>;
|
|
180
|
+
clearErrors: () => void;
|
|
128
181
|
setErrors: (errors: Record<string, string>) => void;
|
|
182
|
+
dismissError: (path: string) => void;
|
|
183
|
+
dismissFormError: () => void;
|
|
129
184
|
formContext: TFormContext | undefined;
|
|
130
185
|
}) => any;
|
|
131
186
|
} & {
|
|
132
187
|
'form.footer'?: (props: {
|
|
188
|
+
title: string | undefined;
|
|
189
|
+
description: string | undefined;
|
|
190
|
+
data: TFormData;
|
|
191
|
+
errors: Record<string, string | undefined> | undefined;
|
|
192
|
+
formError: string | undefined;
|
|
133
193
|
disabled: boolean;
|
|
134
|
-
|
|
194
|
+
loading: boolean;
|
|
195
|
+
submitText: string;
|
|
196
|
+
submit: () => void;
|
|
135
197
|
reset: () => Promise<void>;
|
|
198
|
+
clearErrors: () => void;
|
|
136
199
|
setErrors: (errors: Record<string, string>) => void;
|
|
200
|
+
dismissError: (path: string) => void;
|
|
201
|
+
dismissFormError: () => void;
|
|
137
202
|
formContext: TFormContext | undefined;
|
|
138
203
|
}) => any;
|
|
139
204
|
} & {
|
|
140
|
-
'form.loading'?: (props: {
|
|
205
|
+
'form.loading'?: (props: {
|
|
206
|
+
title: string | undefined;
|
|
207
|
+
description: string | undefined;
|
|
208
|
+
data: TFormData;
|
|
209
|
+
errors: Record<string, string | undefined> | undefined;
|
|
210
|
+
formError: string | undefined;
|
|
211
|
+
disabled: boolean;
|
|
212
|
+
loading: boolean;
|
|
213
|
+
submitText: string;
|
|
214
|
+
submit: () => void;
|
|
215
|
+
reset: () => Promise<void>;
|
|
216
|
+
clearErrors: () => void;
|
|
217
|
+
setErrors: (errors: Record<string, string>) => void;
|
|
218
|
+
dismissError: (path: string) => void;
|
|
219
|
+
dismissFormError: () => void;
|
|
220
|
+
formContext: TFormContext | undefined;
|
|
221
|
+
}) => any;
|
|
141
222
|
};
|
|
142
223
|
emit: {
|
|
143
224
|
(e: "submit", data: TFormData): void;
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
3
3
|
const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-jdMRxjBE.cjs");
|
|
4
4
|
const require_use_as_value_help = require("./use-as-value-help-uANI3zWa.cjs");
|
|
5
|
-
const require_as_form = require("./as-form-
|
|
5
|
+
const require_as_form = require("./as-form-BRuzVUsN.cjs");
|
|
6
6
|
const require_as_field = require("./as-field--sdVpUAw.cjs");
|
|
7
7
|
const require_use_as_locale = require("./use-as-locale-C4z5stwD.cjs");
|
|
8
8
|
const require_as_iterator = require("./as-iterator-WKkr9lwG.cjs");
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as TAsComponentEmits, c as TAsUnionContext, i as TAsCollapsibleSlots, n as TAsChangeType, o as TAsComponentProps, r as TAsCollapsibleProps, s as TAsTypeComponents, t as TAsBaseComponentProps } from "./types-BYfe1QEF.cjs";
|
|
2
2
|
import _default$3 from "./as-collapsible.cjs";
|
|
3
3
|
import _default$7 from "./as-field.cjs";
|
|
4
|
-
import { a as TFormRule, i as TFormFieldRegistration, n as _default$9, o as TFormState, r as TFormFieldCallbacks } from "./as-form.vue-
|
|
4
|
+
import { a as TFormRule, i as TFormFieldRegistration, n as _default$9, o as TFormState, r as TFormFieldCallbacks } from "./as-form.vue-yGdKLYxn.cjs";
|
|
5
5
|
import _default$11 from "./as-iterator.cjs";
|
|
6
6
|
import { t as _default } from "./as-action.vue-BCbopk0S.cjs";
|
|
7
7
|
import { t as _default$1 } from "./as-array.vue-Ci4xO292.cjs";
|
|
@@ -24,7 +24,7 @@ import * as vue from "vue";
|
|
|
24
24
|
import { Component, ComputedRef, MaybeRef, Ref, ShallowRef, WritableComputedRef } from "vue";
|
|
25
25
|
import * as _atscript_ui0 from "@atscript/ui";
|
|
26
26
|
import { ClientFactory, ClientFactory as ClientFactory$1, FormArrayFieldDef, FormDef, FormFieldDef, FormTupleFieldDef, FormUnionFieldDef, FormUnionVariant, ResolvedValueHelp, ValueHelpInfo, getDefaultClientFactory, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
|
|
27
|
-
//#region ../../node_modules/.pnpm/@atscript+typescript@0.1.
|
|
27
|
+
//#region ../../node_modules/.pnpm/@atscript+typescript@0.1.70_@atscript+core@0.1.70_@emnapi+core@1.10.0_@emnapi+runtime@1_b6a579a982251a44a51d12461f43e362/node_modules/@atscript/typescript/dist/utils.d.ts
|
|
28
28
|
interface TError {
|
|
29
29
|
path: string;
|
|
30
30
|
message: string;
|
|
@@ -373,6 +373,28 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
373
373
|
submitText: ComputedRef<string>;
|
|
374
374
|
/** Resolved submit-button disabled state (`@ui.form.fn.submitDisabled`). */
|
|
375
375
|
submitDisabled: ComputedRef<boolean>;
|
|
376
|
+
/** Resolved form-level title (`@ui.form.fn.title` / `@meta.label`); may be `undefined`. */
|
|
377
|
+
title: ComputedRef<string | undefined>;
|
|
378
|
+
/** Resolved form-level description (`@ui.form.fn.description` / `@meta.description`). */
|
|
379
|
+
description: ComputedRef<string | undefined>;
|
|
380
|
+
/** Unified slot-props bag spread onto every `<AsForm>` slot. */
|
|
381
|
+
slotProps: ComputedRef<{
|
|
382
|
+
title: string | undefined;
|
|
383
|
+
description: string | undefined;
|
|
384
|
+
data: TFormData;
|
|
385
|
+
errors: Record<string, string | undefined> | undefined;
|
|
386
|
+
formError: string | undefined;
|
|
387
|
+
disabled: boolean;
|
|
388
|
+
loading: boolean;
|
|
389
|
+
submitText: string;
|
|
390
|
+
submit: () => void;
|
|
391
|
+
reset: () => Promise<void>;
|
|
392
|
+
clearErrors: () => void;
|
|
393
|
+
setErrors: (errors: Record<string, string>) => void;
|
|
394
|
+
dismissError: (path: string) => void;
|
|
395
|
+
dismissFormError: () => void;
|
|
396
|
+
formContext: TFormContext | undefined;
|
|
397
|
+
}>;
|
|
376
398
|
/** Dispatch an action — invoked by `<AsAction>`. */
|
|
377
399
|
invokeAction: (name: string) => void;
|
|
378
400
|
/** Dismiss a single external leaf error. */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as TAsComponentEmits, c as TAsUnionContext, i as TAsCollapsibleSlots, n as TAsChangeType, o as TAsComponentProps, r as TAsCollapsibleProps, s as TAsTypeComponents, t as TAsBaseComponentProps } from "./types-CV9ss4UN.mjs";
|
|
2
2
|
import _default$3 from "./as-collapsible.mjs";
|
|
3
3
|
import _default$7 from "./as-field.mjs";
|
|
4
|
-
import { a as TFormRule, i as TFormFieldRegistration, n as _default$9, o as TFormState, r as TFormFieldCallbacks } from "./as-form.vue-
|
|
4
|
+
import { a as TFormRule, i as TFormFieldRegistration, n as _default$9, o as TFormState, r as TFormFieldCallbacks } from "./as-form.vue-Dop7SBeF.mjs";
|
|
5
5
|
import _default$11 from "./as-iterator.mjs";
|
|
6
6
|
import { t as _default } from "./as-action.vue-BtQX09n-.mjs";
|
|
7
7
|
import { t as _default$1 } from "./as-array.vue-I42wuF6e.mjs";
|
|
@@ -24,7 +24,7 @@ import * as vue from "vue";
|
|
|
24
24
|
import { Component, ComputedRef, MaybeRef, Ref, ShallowRef, WritableComputedRef } from "vue";
|
|
25
25
|
import * as _atscript_ui0 from "@atscript/ui";
|
|
26
26
|
import { ClientFactory, ClientFactory as ClientFactory$1, FormArrayFieldDef, FormDef, FormFieldDef, FormTupleFieldDef, FormUnionFieldDef, FormUnionVariant, ResolvedValueHelp, ValueHelpInfo, getDefaultClientFactory, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
|
|
27
|
-
//#region ../../node_modules/.pnpm/@atscript+typescript@0.1.
|
|
27
|
+
//#region ../../node_modules/.pnpm/@atscript+typescript@0.1.70_@atscript+core@0.1.70_@emnapi+core@1.10.0_@emnapi+runtime@1_b6a579a982251a44a51d12461f43e362/node_modules/@atscript/typescript/dist/utils.d.ts
|
|
28
28
|
interface TError {
|
|
29
29
|
path: string;
|
|
30
30
|
message: string;
|
|
@@ -373,6 +373,28 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
373
373
|
submitText: ComputedRef<string>;
|
|
374
374
|
/** Resolved submit-button disabled state (`@ui.form.fn.submitDisabled`). */
|
|
375
375
|
submitDisabled: ComputedRef<boolean>;
|
|
376
|
+
/** Resolved form-level title (`@ui.form.fn.title` / `@meta.label`); may be `undefined`. */
|
|
377
|
+
title: ComputedRef<string | undefined>;
|
|
378
|
+
/** Resolved form-level description (`@ui.form.fn.description` / `@meta.description`). */
|
|
379
|
+
description: ComputedRef<string | undefined>;
|
|
380
|
+
/** Unified slot-props bag spread onto every `<AsForm>` slot. */
|
|
381
|
+
slotProps: ComputedRef<{
|
|
382
|
+
title: string | undefined;
|
|
383
|
+
description: string | undefined;
|
|
384
|
+
data: TFormData;
|
|
385
|
+
errors: Record<string, string | undefined> | undefined;
|
|
386
|
+
formError: string | undefined;
|
|
387
|
+
disabled: boolean;
|
|
388
|
+
loading: boolean;
|
|
389
|
+
submitText: string;
|
|
390
|
+
submit: () => void;
|
|
391
|
+
reset: () => Promise<void>;
|
|
392
|
+
clearErrors: () => void;
|
|
393
|
+
setErrors: (errors: Record<string, string>) => void;
|
|
394
|
+
dismissError: (path: string) => void;
|
|
395
|
+
dismissFormError: () => void;
|
|
396
|
+
formContext: TFormContext | undefined;
|
|
397
|
+
}>;
|
|
376
398
|
/** Dispatch an action — invoked by `<AsAction>`. */
|
|
377
399
|
invokeAction: (name: string) => void;
|
|
378
400
|
/** Dismiss a single external leaf error. */
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { m as PATH_PREFIX_KEY, n as useAsUnionVariant, s as DISMISS_EXTERNAL_AT_KEY, t as formatIndexedLabelParts } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
2
|
import { n as provideAsNestedSectionsStore, r as useAsNestedSectionsStore } from "./use-as-nested-sections-store-lhi0z5z1.mjs";
|
|
3
3
|
import { n as useAsValueHelp } from "./use-as-value-help-CBykDEjZ.mjs";
|
|
4
|
-
import { i as useAsExternalErrors, n as useAsForm, r as useAsState, t as as_form_default } from "./as-form-
|
|
4
|
+
import { i as useAsExternalErrors, n as useAsForm, r as useAsState, t as as_form_default } from "./as-form-cszNv3LX.mjs";
|
|
5
5
|
import { n as useAsData, r as useAsField, t as as_field_default } from "./as-field-CryuaPPU.mjs";
|
|
6
6
|
import { n as useAsLocale, t as provideAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
|
|
7
7
|
import { t as as_iterator_default } from "./as-iterator-B0Jf2zn4.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/vue-form",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.90",
|
|
4
4
|
"description": "Type-driven form rendering for Atscript with Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -157,29 +157,29 @@
|
|
|
157
157
|
"access": "public"
|
|
158
158
|
},
|
|
159
159
|
"dependencies": {
|
|
160
|
-
"@atscript/ui": "^0.1.
|
|
160
|
+
"@atscript/ui": "^0.1.90"
|
|
161
161
|
},
|
|
162
162
|
"devDependencies": {
|
|
163
|
-
"@atscript/core": "^0.1.
|
|
164
|
-
"@atscript/db-client": "^0.1.
|
|
165
|
-
"@atscript/typescript": "^0.1.
|
|
163
|
+
"@atscript/core": "^0.1.70",
|
|
164
|
+
"@atscript/db-client": "^0.1.97",
|
|
165
|
+
"@atscript/typescript": "^0.1.70",
|
|
166
166
|
"@tsdown/css": "^0.21.4",
|
|
167
167
|
"@vitejs/plugin-vue": "^6",
|
|
168
168
|
"@vue/test-utils": "^2",
|
|
169
169
|
"happy-dom": "^18",
|
|
170
170
|
"reka-ui": "^2.9.8",
|
|
171
|
-
"unplugin-atscript": "^0.1.
|
|
171
|
+
"unplugin-atscript": "^0.1.70",
|
|
172
172
|
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
|
|
173
173
|
"vue": "^3",
|
|
174
174
|
"vue-tsc": "~3.2.9",
|
|
175
175
|
"vunor": "^0.2.1",
|
|
176
|
-
"@atscript/ui-fns": "^0.1.
|
|
176
|
+
"@atscript/ui-fns": "^0.1.90"
|
|
177
177
|
},
|
|
178
178
|
"peerDependencies": {
|
|
179
|
-
"@atscript/db-client": "^0.1.
|
|
179
|
+
"@atscript/db-client": "^0.1.97",
|
|
180
180
|
"reka-ui": "^2.9.8",
|
|
181
181
|
"vue": "^3",
|
|
182
|
-
"@atscript/ui-fns": "^0.1.
|
|
182
|
+
"@atscript/ui-fns": "^0.1.90"
|
|
183
183
|
},
|
|
184
184
|
"scripts": {
|
|
185
185
|
"build": "node ../../scripts/gen-exports.mjs && vp pack",
|