@atscript/vue-form 0.1.96 → 0.1.98
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-array-DNJOnZ2j.mjs → as-array-B_LjJ0oi.mjs} +1 -1
- package/dist/{as-array-CIwvhCCk.cjs → as-array-DAeDxzYV.cjs} +1 -1
- package/dist/as-array.cjs +1 -1
- package/dist/as-array.mjs +1 -1
- package/dist/{as-field-CryuaPPU.mjs → as-field-CDB-HIfz.mjs} +7 -4
- package/dist/{as-field--sdVpUAw.cjs → as-field-DGnC4dew.cjs} +6 -3
- package/dist/as-field.cjs +1 -1
- package/dist/as-field.mjs +1 -1
- package/dist/{as-form-cszNv3LX.mjs → as-form-Cezf4SZG.mjs} +4 -7
- package/dist/{as-form-BRuzVUsN.cjs → as-form-ZobuKJBo.cjs} +3 -6
- 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-yGdKLYxn.d.cts → as-form.vue-DoWDasax.d.cts} +1 -1
- package/dist/{as-form.vue-Dop7SBeF.d.mts → as-form.vue-jEaSCN0P.d.mts} +1 -1
- package/dist/{as-iterator-B0Jf2zn4.mjs → as-iterator---gxkT-L.mjs} +1 -1
- package/dist/{as-iterator-WKkr9lwG.cjs → as-iterator-BWXIzbJF.cjs} +1 -1
- package/dist/as-iterator.cjs +1 -1
- package/dist/as-iterator.mjs +1 -1
- package/dist/{as-object-D6AHBb5w.cjs → as-object-BJxJJM13.cjs} +1 -1
- package/dist/{as-object-Dl3ranqm.mjs → as-object-Dr7CttaK.mjs} +1 -1
- package/dist/as-object.cjs +1 -1
- package/dist/as-object.mjs +1 -1
- package/dist/{as-tuple-NwaomSYF.mjs → as-tuple-BUzs7nm6.mjs} +1 -1
- package/dist/{as-tuple-Co8__kEm.cjs → as-tuple-DaY_Mw-y.cjs} +1 -1
- package/dist/as-tuple.cjs +1 -1
- package/dist/as-tuple.mjs +1 -1
- package/dist/index.cjs +7 -6
- package/dist/index.d.cts +13 -12
- package/dist/index.d.mts +13 -12
- package/dist/index.mjs +7 -7
- package/package.json +12 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as CHANGE_HANDLER_KEY, n as useAsUnionVariant, r as useFormContext } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
|
-
import { t as as_field_default } from "./as-field-
|
|
2
|
+
import { t as as_field_default } from "./as-field-CDB-HIfz.mjs";
|
|
3
3
|
import { t as as_collapsible_default } from "./as-collapsible-DQOxKGGj.mjs";
|
|
4
4
|
import { t as as_variant_picker_default } from "./as-variant-picker-B3GLhKyt.mjs";
|
|
5
5
|
import { t as useAsDropdown } from "./use-as-dropdown-B2Shb7wn.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
2
|
-
const require_as_field = require("./as-field
|
|
2
|
+
const require_as_field = require("./as-field-DGnC4dew.cjs");
|
|
3
3
|
const require_as_collapsible = require("./as-collapsible-B0rlXU0x.cjs");
|
|
4
4
|
const require_as_variant_picker = require("./as-variant-picker-JlEhh7YO.cjs");
|
|
5
5
|
const require_use_as_dropdown = require("./use-as-dropdown-Bj9toVdw.cjs");
|
package/dist/as-array.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_array = require("./as-array-
|
|
1
|
+
const require_as_array = require("./as-array-DAeDxzYV.cjs");
|
|
2
2
|
module.exports = require_as_array.as_array_default;
|
package/dist/as-array.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_array_default } from "./as-array-
|
|
1
|
+
import { t as as_array_default } from "./as-array-B_LjJ0oi.mjs";
|
|
2
2
|
export { as_array_default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_STATE_KEY, f as HIDE_ROOT_TITLE_KEY, g as TYPES_KEY, h as ROOT_DATA_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as PATH_PREFIX_KEY, o as COMPONENTS_KEY, p as LEVEL_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
2
|
import { n as useAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
|
|
3
3
|
import { computed, createBlock, createElementBlock, defineComponent, inject, isRef, mergeProps, onUnmounted, openBlock, provide, ref, resolveDynamicComponent, toDisplayString, unref, useId, watch } from "vue";
|
|
4
|
-
import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_LABEL, META_READONLY, META_REQUIRED, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HIDDEN, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_VALIDATE, WF_ACTION_WITH_DATA, buildGridClasses, createFieldValidator, createFormData, createFormValueResolver, extractValueHelp, getByPath, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, isArrayField, isObjectField, isTupleField, isUnionField, resolveAttrs, resolveFieldProp, resolveGridSpec, resolveOptions, resolveSingularLabel } from "@atscript/ui";
|
|
4
|
+
import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_LABEL, META_READONLY, META_REQUIRED, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HIDDEN, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_VALIDATE, WF_ACTION_WITH_DATA, buildGridClasses, createFieldValidator, createFormData, createFormValueResolver, extractValueHelp, getByPath, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, isArrayField, isObjectField, isTupleField, isUnionField, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel } from "@atscript/ui";
|
|
5
5
|
import { buildFieldEntry } from "@atscript/ui-fns";
|
|
6
6
|
//#region src/composables/use-as-field.ts
|
|
7
7
|
function useAsField(opts) {
|
|
@@ -174,6 +174,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
|
|
|
174
174
|
const isUnion = isUnionField(props.field);
|
|
175
175
|
const parentLevel = inject(LEVEL_KEY, computed(() => -1));
|
|
176
176
|
const myLevel = isStructured || isUnion ? parentLevel.value + 1 : -1;
|
|
177
|
+
const isRoot = myLevel === 0;
|
|
177
178
|
if (isStructured || isUnion) {
|
|
178
179
|
provide(PATH_PREFIX_KEY, computed(() => absolutePath.value));
|
|
179
180
|
provide(LEVEL_KEY, computed(() => myLevel));
|
|
@@ -355,14 +356,16 @@ var as_field_default = /* @__PURE__ */ defineComponent({
|
|
|
355
356
|
hidden: unwrap(hidden),
|
|
356
357
|
readonly: unwrap(readonly)
|
|
357
358
|
})) : void 0;
|
|
359
|
+
const rootScope = isRoot ? computed(() => buildScope()) : void 0;
|
|
360
|
+
const resolveHeaderProp = (fnKey, staticKey) => isRoot ? resolveFormProp(prop, fnKey, staticKey, rootScope.value) : resolveFieldProp(prop, fnKey, staticKey, fs.value);
|
|
358
361
|
label = maybeComputed(hasFn.has("label"), () => resolveFieldProp(prop, UI_FORM_FN_LABEL, META_LABEL, fs.value) ?? props.field.name, getFieldMeta(prop, META_LABEL) ?? props.field.name);
|
|
359
|
-
description = maybeComputed(hasFn.has("description"), () =>
|
|
362
|
+
description = maybeComputed(hasFn.has("description"), () => resolveHeaderProp(UI_FORM_FN_DESCRIPTION, META_DESCRIPTION), getFieldMeta(prop, META_DESCRIPTION));
|
|
360
363
|
hint = maybeComputed(hasFn.has("hint"), () => resolveFieldProp(prop, UI_FORM_FN_HINT, UI_FORM_HINT, fs.value), getFieldMeta(prop, UI_FORM_HINT));
|
|
361
364
|
placeholder = maybeComputed(hasFn.has("placeholder"), () => resolveFieldProp(prop, UI_FORM_FN_PLACEHOLDER, UI_FORM_PLACEHOLDER, fs.value), getFieldMeta(prop, UI_FORM_PLACEHOLDER));
|
|
362
365
|
styles = maybeComputed(hasFn.has("styles"), () => resolveFieldProp(prop, UI_FORM_FN_STYLES, UI_FORM_STYLES, fs.value), getFieldMeta(prop, UI_FORM_STYLES));
|
|
363
366
|
options = maybeComputed(hasFn.has("options"), () => resolveOptions(prop, fs.value), resolveOptions(prop, emptyScope));
|
|
364
367
|
attrs = hasFn.has("attr") ? computed(() => resolveAttrs(prop, fs.value)) : getFieldMeta(prop, UI_FORM_ATTR) !== void 0 ? resolveAttrs(prop, emptyScope) : void 0;
|
|
365
|
-
title = isStructured || isUnion ? maybeComputed(hasFn.has("title"), () =>
|
|
368
|
+
title = isStructured || isUnion ? maybeComputed(hasFn.has("title"), () => resolveHeaderProp(UI_FORM_FN_TITLE, META_LABEL) ?? props.field.name, getFieldMeta(prop, META_LABEL) ?? props.field.name) : void 0;
|
|
366
369
|
const hasFnClasses = hasFn.has("classes");
|
|
367
370
|
classesBase = hasFnClasses || typeof disabled !== "boolean" ? computed(() => buildFieldClasses(hasFnClasses ? resolveFieldProp(prop, UI_FORM_FN_CLASSES, void 0, fs.value) : getFieldMeta(prop, UI_FORM_CLASSES), unwrap(disabled), hasMetaRequired, optional)) : buildFieldClasses(getFieldMeta(prop, UI_FORM_CLASSES), disabled, hasMetaRequired, optional);
|
|
368
371
|
phantomValue = props.field.phantom ? maybeComputed(hasFn.has("value"), () => resolveFieldProp(prop, UI_FORM_FN_VALUE, META_DEFAULT, fs.value), getFieldMeta(prop, META_DEFAULT)) : void 0;
|
|
@@ -432,7 +435,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
|
|
|
432
435
|
descId
|
|
433
436
|
};
|
|
434
437
|
const displayProps = computed(() => {
|
|
435
|
-
const titleValue =
|
|
438
|
+
const titleValue = isRoot && hideRootTitle ? void 0 : unwrap(title);
|
|
436
439
|
return {
|
|
437
440
|
value: unwrap(phantomValue),
|
|
438
441
|
label: unwrap(label),
|
|
@@ -174,6 +174,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
174
174
|
const isUnion = (0, _atscript_ui.isUnionField)(props.field);
|
|
175
175
|
const parentLevel = (0, vue.inject)(require_use_form_context.LEVEL_KEY, (0, vue.computed)(() => -1));
|
|
176
176
|
const myLevel = isStructured || isUnion ? parentLevel.value + 1 : -1;
|
|
177
|
+
const isRoot = myLevel === 0;
|
|
177
178
|
if (isStructured || isUnion) {
|
|
178
179
|
(0, vue.provide)(require_use_form_context.PATH_PREFIX_KEY, (0, vue.computed)(() => absolutePath.value));
|
|
179
180
|
(0, vue.provide)(require_use_form_context.LEVEL_KEY, (0, vue.computed)(() => myLevel));
|
|
@@ -355,14 +356,16 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
355
356
|
hidden: unwrap(hidden),
|
|
356
357
|
readonly: unwrap(readonly)
|
|
357
358
|
})) : void 0;
|
|
359
|
+
const rootScope = isRoot ? (0, vue.computed)(() => buildScope()) : void 0;
|
|
360
|
+
const resolveHeaderProp = (fnKey, staticKey) => isRoot ? (0, _atscript_ui.resolveFormProp)(prop, fnKey, staticKey, rootScope.value) : (0, _atscript_ui.resolveFieldProp)(prop, fnKey, staticKey, fs.value);
|
|
358
361
|
label = maybeComputed(hasFn.has("label"), () => (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_LABEL, _atscript_ui.META_LABEL, fs.value) ?? props.field.name, (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_LABEL) ?? props.field.name);
|
|
359
|
-
description = maybeComputed(hasFn.has("description"), () => (
|
|
362
|
+
description = maybeComputed(hasFn.has("description"), () => resolveHeaderProp(_atscript_ui.UI_FORM_FN_DESCRIPTION, _atscript_ui.META_DESCRIPTION), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_DESCRIPTION));
|
|
360
363
|
hint = maybeComputed(hasFn.has("hint"), () => (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_HINT, _atscript_ui.UI_FORM_HINT, fs.value), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_HINT));
|
|
361
364
|
placeholder = maybeComputed(hasFn.has("placeholder"), () => (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_PLACEHOLDER, _atscript_ui.UI_FORM_PLACEHOLDER, fs.value), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_PLACEHOLDER));
|
|
362
365
|
styles = maybeComputed(hasFn.has("styles"), () => (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_STYLES, _atscript_ui.UI_FORM_STYLES, fs.value), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_STYLES));
|
|
363
366
|
options = maybeComputed(hasFn.has("options"), () => (0, _atscript_ui.resolveOptions)(prop, fs.value), (0, _atscript_ui.resolveOptions)(prop, emptyScope));
|
|
364
367
|
attrs = hasFn.has("attr") ? (0, vue.computed)(() => (0, _atscript_ui.resolveAttrs)(prop, fs.value)) : (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_ATTR) !== void 0 ? (0, _atscript_ui.resolveAttrs)(prop, emptyScope) : void 0;
|
|
365
|
-
title = isStructured || isUnion ? maybeComputed(hasFn.has("title"), () => (
|
|
368
|
+
title = isStructured || isUnion ? maybeComputed(hasFn.has("title"), () => resolveHeaderProp(_atscript_ui.UI_FORM_FN_TITLE, _atscript_ui.META_LABEL) ?? props.field.name, (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_LABEL) ?? props.field.name) : void 0;
|
|
366
369
|
const hasFnClasses = hasFn.has("classes");
|
|
367
370
|
classesBase = hasFnClasses || typeof disabled !== "boolean" ? (0, vue.computed)(() => buildFieldClasses(hasFnClasses ? (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_CLASSES, void 0, fs.value) : (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_CLASSES), unwrap(disabled), hasMetaRequired, optional)) : buildFieldClasses((0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_CLASSES), disabled, hasMetaRequired, optional);
|
|
368
371
|
phantomValue = props.field.phantom ? maybeComputed(hasFn.has("value"), () => (0, _atscript_ui.resolveFieldProp)(prop, _atscript_ui.UI_FORM_FN_VALUE, _atscript_ui.META_DEFAULT, fs.value), (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.META_DEFAULT)) : void 0;
|
|
@@ -432,7 +435,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
432
435
|
descId
|
|
433
436
|
};
|
|
434
437
|
const displayProps = (0, vue.computed)(() => {
|
|
435
|
-
const titleValue =
|
|
438
|
+
const titleValue = isRoot && hideRootTitle ? void 0 : unwrap(title);
|
|
436
439
|
return {
|
|
437
440
|
value: unwrap(phantomValue),
|
|
438
441
|
label: unwrap(label),
|
package/dist/as-field.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_field = require("./as-field
|
|
1
|
+
const require_as_field = require("./as-field-DGnC4dew.cjs");
|
|
2
2
|
module.exports = require_as_field.as_field_default;
|
package/dist/as-field.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_field_default } from "./as-field-
|
|
1
|
+
import { t as as_field_default } from "./as-field-CDB-HIfz.mjs";
|
|
2
2
|
export { as_field_default as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_STATE_KEY, f as HIDE_ROOT_TITLE_KEY, g as TYPES_KEY, h as ROOT_DATA_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as PATH_PREFIX_KEY, o as COMPONENTS_KEY, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
2
|
import { n as provideAsNestedSectionsStore, r as useAsNestedSectionsStore, t as DESCENDANT_ERROR_COUNTS_KEY } from "./use-as-nested-sections-store-lhi0z5z1.mjs";
|
|
3
3
|
import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-CBykDEjZ.mjs";
|
|
4
|
-
import { t as as_field_default } from "./as-field-
|
|
5
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
4
|
+
import { t as as_field_default } from "./as-field-CDB-HIfz.mjs";
|
|
5
|
+
import { t as as_iterator_default } from "./as-iterator---gxkT-L.mjs";
|
|
6
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,
|
|
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, 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,10 +207,7 @@ 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
|
-
};
|
|
210
|
+
const resolveRootProp = (fnKey, staticKey) => resolveFormProp(options.def().type, fnKey, staticKey, ctx.value);
|
|
214
211
|
const title = computed(() => resolveRootProp(UI_FORM_FN_TITLE, META_LABEL));
|
|
215
212
|
const description = computed(() => resolveRootProp(UI_FORM_FN_DESCRIPTION, META_DESCRIPTION));
|
|
216
213
|
const slotProps = computed(() => ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
2
2
|
const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-jdMRxjBE.cjs");
|
|
3
3
|
const require_use_as_value_help = require("./use-as-value-help-uANI3zWa.cjs");
|
|
4
|
-
const require_as_field = require("./as-field
|
|
5
|
-
const require_as_iterator = require("./as-iterator-
|
|
4
|
+
const require_as_field = require("./as-field-DGnC4dew.cjs");
|
|
5
|
+
const require_as_iterator = require("./as-iterator-BWXIzbJF.cjs");
|
|
6
6
|
let vue = require("vue");
|
|
7
7
|
let _atscript_ui = require("@atscript/ui");
|
|
8
8
|
//#region src/composables/use-as-external-errors.ts
|
|
@@ -207,10 +207,7 @@ 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
|
-
};
|
|
210
|
+
const resolveRootProp = (fnKey, staticKey) => (0, _atscript_ui.resolveFormProp)(options.def().type, fnKey, staticKey, ctx.value);
|
|
214
211
|
const title = (0, vue.computed)(() => resolveRootProp(_atscript_ui.UI_FORM_FN_TITLE, _atscript_ui.META_LABEL));
|
|
215
212
|
const description = (0, vue.computed)(() => resolveRootProp(_atscript_ui.UI_FORM_FN_DESCRIPTION, _atscript_ui.META_DESCRIPTION));
|
|
216
213
|
const slotProps = (0, vue.computed)(() => ({
|
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-ZobuKJBo.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-DoWDasax.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-jEaSCN0P.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-Cezf4SZG.mjs";
|
|
2
2
|
export { as_form_default as default };
|
|
@@ -77,12 +77,12 @@ 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
|
+
onAction?: ((name: string, data: TFormData) => any) | undefined;
|
|
80
81
|
onError?: ((errors: {
|
|
81
82
|
path: string;
|
|
82
83
|
message: string;
|
|
83
84
|
}[]) => any) | undefined;
|
|
84
85
|
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
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;
|
|
88
88
|
}> & (typeof globalThis extends {
|
|
@@ -77,12 +77,12 @@ 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
|
+
onAction?: ((name: string, data: TFormData) => any) | undefined;
|
|
80
81
|
onError?: ((errors: {
|
|
81
82
|
path: string;
|
|
82
83
|
message: string;
|
|
83
84
|
}[]) => any) | undefined;
|
|
84
85
|
onSubmit?: ((data: TFormData) => any) | undefined;
|
|
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;
|
|
88
88
|
}> & (typeof globalThis extends {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { m as PATH_PREFIX_KEY } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
|
-
import { t as as_field_default } from "./as-field-
|
|
2
|
+
import { t as as_field_default } from "./as-field-CDB-HIfz.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createElementBlock, defineComponent, inject, openBlock, provide, renderList } from "vue";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/as-iterator.vue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
2
|
-
const require_as_field = require("./as-field
|
|
2
|
+
const require_as_field = require("./as-field-DGnC4dew.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/as-iterator.vue
|
package/dist/as-iterator.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_iterator = require("./as-iterator-
|
|
1
|
+
const require_as_iterator = require("./as-iterator-BWXIzbJF.cjs");
|
|
2
2
|
module.exports = require_as_iterator.as_iterator_default;
|
package/dist/as-iterator.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
1
|
+
import { t as as_iterator_default } from "./as-iterator---gxkT-L.mjs";
|
|
2
2
|
export { as_iterator_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
2
|
-
const require_as_iterator = require("./as-iterator-
|
|
2
|
+
const require_as_iterator = require("./as-iterator-BWXIzbJF.cjs");
|
|
3
3
|
const require_as_collapsible = require("./as-collapsible-B0rlXU0x.cjs");
|
|
4
4
|
const require_as_variant_picker = require("./as-variant-picker-JlEhh7YO.cjs");
|
|
5
5
|
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-C85F2VoU.cjs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useAsUnionVariant } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
2
|
+
import { t as as_iterator_default } from "./as-iterator---gxkT-L.mjs";
|
|
3
3
|
import { t as as_collapsible_default } from "./as-collapsible-DQOxKGGj.mjs";
|
|
4
4
|
import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-B3GLhKyt.mjs";
|
|
5
5
|
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-CQctXLZI.mjs";
|
package/dist/as-object.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_object = require("./as-object-
|
|
1
|
+
const require_as_object = require("./as-object-BJxJJM13.cjs");
|
|
2
2
|
module.exports = require_as_object.as_object_default;
|
package/dist/as-object.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_object_default } from "./as-object-
|
|
1
|
+
import { t as as_object_default } from "./as-object-Dr7CttaK.mjs";
|
|
2
2
|
export { as_object_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as CHANGE_HANDLER_KEY, n as useAsUnionVariant, r as useFormContext } from "./use-form-context-bAj7UoSe.mjs";
|
|
2
|
-
import { t as as_field_default } from "./as-field-
|
|
2
|
+
import { t as as_field_default } from "./as-field-CDB-HIfz.mjs";
|
|
3
3
|
import { t as as_collapsible_default } from "./as-collapsible-DQOxKGGj.mjs";
|
|
4
4
|
import { t as as_variant_picker_default } from "./as-variant-picker-B3GLhKyt.mjs";
|
|
5
5
|
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-CQctXLZI.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_use_form_context = require("./use-form-context-Dwr8Ai1v.cjs");
|
|
2
|
-
const require_as_field = require("./as-field
|
|
2
|
+
const require_as_field = require("./as-field-DGnC4dew.cjs");
|
|
3
3
|
const require_as_collapsible = require("./as-collapsible-B0rlXU0x.cjs");
|
|
4
4
|
const require_as_variant_picker = require("./as-variant-picker-JlEhh7YO.cjs");
|
|
5
5
|
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-C85F2VoU.cjs");
|
package/dist/as-tuple.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_tuple = require("./as-tuple-
|
|
1
|
+
const require_as_tuple = require("./as-tuple-DaY_Mw-y.cjs");
|
|
2
2
|
module.exports = require_as_tuple.as_tuple_default;
|
package/dist/as-tuple.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_tuple_default } from "./as-tuple-
|
|
1
|
+
import { t as as_tuple_default } from "./as-tuple-BUzs7nm6.mjs";
|
|
2
2
|
export { as_tuple_default as default };
|
package/dist/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@ 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-
|
|
6
|
-
const require_as_field = require("./as-field
|
|
5
|
+
const require_as_form = require("./as-form-ZobuKJBo.cjs");
|
|
6
|
+
const require_as_field = require("./as-field-DGnC4dew.cjs");
|
|
7
7
|
const require_use_as_locale = require("./use-as-locale-C4z5stwD.cjs");
|
|
8
|
-
const require_as_iterator = require("./as-iterator-
|
|
8
|
+
const require_as_iterator = require("./as-iterator-BWXIzbJF.cjs");
|
|
9
9
|
const require_focus_after_toggle = require("./focus-after-toggle-CWxiPZWi.cjs");
|
|
10
10
|
const require_as_collapsible = require("./as-collapsible-B0rlXU0x.cjs");
|
|
11
11
|
const require_as_field_shell = require("./as-field-shell-zeno02I1.cjs");
|
|
@@ -18,10 +18,10 @@ const require_as_checkbox = require("./as-checkbox-Cva4XHFW.cjs");
|
|
|
18
18
|
const require_as_paragraph = require("./as-paragraph-BA-c863H.cjs");
|
|
19
19
|
const require_as_action = require("./as-action-lLooKipk.cjs");
|
|
20
20
|
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-C85F2VoU.cjs");
|
|
21
|
-
const require_as_object = require("./as-object-
|
|
22
|
-
const require_as_array = require("./as-array-
|
|
21
|
+
const require_as_object = require("./as-object-BJxJJM13.cjs");
|
|
22
|
+
const require_as_array = require("./as-array-DAeDxzYV.cjs");
|
|
23
23
|
const require_as_union = require("./as-union-Cz5cm7BP.cjs");
|
|
24
|
-
const require_as_tuple = require("./as-tuple-
|
|
24
|
+
const require_as_tuple = require("./as-tuple-DaY_Mw-y.cjs");
|
|
25
25
|
const require_as_ref = require("./as-ref-BOAHVeR-.cjs");
|
|
26
26
|
const require_as_decimal = require("./as-decimal-DhrdOvUQ.cjs");
|
|
27
27
|
const require_as_number = require("./as-number-BQWwSipg.cjs");
|
|
@@ -114,6 +114,7 @@ exports.AsFieldShell = require_as_field_shell.as_field_shell_default;
|
|
|
114
114
|
exports.AsForm = require_as_form.as_form_default;
|
|
115
115
|
exports.AsInput = require_as_input.as_input_default;
|
|
116
116
|
exports.AsIterator = require_as_iterator.as_iterator_default;
|
|
117
|
+
exports.AsMultiSelect = require_as_multi_select.as_multi_select_default;
|
|
117
118
|
exports.AsNumber = require_as_number.as_number_default;
|
|
118
119
|
exports.AsObject = require_as_object.as_object_default;
|
|
119
120
|
exports.AsParagraph = require_as_paragraph.as_paragraph_default;
|
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-DoWDasax.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";
|
|
@@ -11,20 +11,21 @@ import { t as _default$5 } from "./as-datetime.vue-DUp_TDOW.cjs";
|
|
|
11
11
|
import { t as _default$6 } from "./as-decimal.vue-Bhq4C1Ix.cjs";
|
|
12
12
|
import { t as _default$8 } from "./as-field-shell.vue-Ct1ixFqc.cjs";
|
|
13
13
|
import { t as _default$10 } from "./as-input.vue-BHsVVncq.cjs";
|
|
14
|
-
import { t as _default$12 } from "./as-
|
|
15
|
-
import { t as _default$13 } from "./as-
|
|
16
|
-
import { t as _default$14 } from "./as-
|
|
17
|
-
import { t as _default$15 } from "./as-
|
|
18
|
-
import { t as _default$16 } from "./as-
|
|
19
|
-
import { t as _default$17 } from "./as-
|
|
20
|
-
import { t as _default$18 } from "./as-
|
|
21
|
-
import { t as _default$19 } from "./as-
|
|
22
|
-
import { t as _default$20 } from "./as-
|
|
14
|
+
import { t as _default$12 } from "./as-multi-select.vue--bavpcN-.cjs";
|
|
15
|
+
import { t as _default$13 } from "./as-number.vue-D2DrbnQu.cjs";
|
|
16
|
+
import { t as _default$14 } from "./as-object.vue-BljKYrMo.cjs";
|
|
17
|
+
import { t as _default$15 } from "./as-paragraph.vue-LxXA7VPD.cjs";
|
|
18
|
+
import { t as _default$16 } from "./as-radio.vue-Dk4nlz-d.cjs";
|
|
19
|
+
import { t as _default$17 } from "./as-ref.vue-CnzqRblA.cjs";
|
|
20
|
+
import { t as _default$18 } from "./as-select.vue-ZZtjsmcO.cjs";
|
|
21
|
+
import { t as _default$19 } from "./as-time.vue-BUAvE5m3.cjs";
|
|
22
|
+
import { t as _default$20 } from "./as-tuple.vue-cy0ThAGl.cjs";
|
|
23
|
+
import { t as _default$21 } from "./as-union.vue-AqH35ozq.cjs";
|
|
23
24
|
import * as vue from "vue";
|
|
24
25
|
import { Component, ComputedRef, MaybeRef, Ref, ShallowRef, WritableComputedRef } from "vue";
|
|
25
26
|
import * as _atscript_ui0 from "@atscript/ui";
|
|
26
27
|
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.
|
|
28
|
+
//#region ../../node_modules/.pnpm/@atscript+typescript@0.1.75_@atscript+core@0.1.75_@emnapi+core@1.10.0_@emnapi+runtime@1_1b3e0defc4eb50693fd278a520fcc345/node_modules/@atscript/typescript/dist/utils.d.ts
|
|
28
29
|
interface TError {
|
|
29
30
|
path: string;
|
|
30
31
|
message: string;
|
|
@@ -992,4 +993,4 @@ type AsErrorDismiss = (path: string) => void;
|
|
|
992
993
|
*/
|
|
993
994
|
declare function useAsErrorDismiss(): AsErrorDismiss;
|
|
994
995
|
//#endregion
|
|
995
|
-
export { _default as AsAction, _default$1 as AsArray, _default$2 as AsCheckbox, _default$3 as AsCollapsible, _default$4 as AsDate, _default$5 as AsDatetime, _default$6 as AsDecimal, type AsErrorDismiss, _default$7 as AsField, _default$8 as AsFieldShell, _default$9 as AsForm, _default$10 as AsInput, _default$11 as AsIterator, type AsNestedSectionsStore, _default$
|
|
996
|
+
export { _default as AsAction, _default$1 as AsArray, _default$2 as AsCheckbox, _default$3 as AsCollapsible, _default$4 as AsDate, _default$5 as AsDatetime, _default$6 as AsDecimal, type AsErrorDismiss, _default$7 as AsField, _default$8 as AsFieldShell, _default$9 as AsForm, _default$10 as AsInput, _default$11 as AsIterator, _default$12 as AsMultiSelect, type AsNestedSectionsStore, _default$13 as AsNumber, _default$14 as AsObject, _default$15 as AsParagraph, _default$16 as AsRadio, _default$17 as AsRef, _default$18 as AsSelect, _default$19 as AsTime, _default$20 as AsTuple, _default$21 as AsUnion, type ClientFactory, type TAsBaseComponentProps, type TAsChangeType, type TAsCollapsibleProps, type TAsCollapsibleSlots, type TAsComponentEmits, type TAsComponentProps, type TAsTypeComponents, type TAsUnionContext, type TFormFieldCallbacks, type TFormFieldRegistration, type TFormRule, type TFormState, type TFormSubmitValidator, type UseAsArrayReturn, type UseAsDataReturn, type UseAsDateOptions, type UseAsDateReturn, type UseAsDecimalOptions, type UseAsDecimalReturn, type UseAsDualInputOptions, type UseAsDualInputReturn, type UseAsExternalErrorsOptions, type UseAsExternalErrorsReturn, type UseAsFieldOptions, type UseAsFieldReturn, type UseAsFormOptions, type UseAsFormReturn, type UseAsLocaleReturn, type UseAsNumberOptions, type UseAsNumberReturn, type UseAsOptionalAddFlowOptions, type UseAsOptionalAddFlowReturn, type UseAsPathReturn, type UseAsStateReturn, type UseAsTriStateCheckboxOptions, type UseAsTriStateCheckboxReturn, type UseAsTupleReturn, type UseAsTypeMapReturn, type UseAsUnionReturn, type UseAsValueHelpOptions, type UseAsValueHelpReturn, createAsFormDef, createDefaultTypes, focusFirstAfter, focusNewFocusableAfter, formatIndexedLabelParts, getDefaultClientFactory, provideAsLocale, provideAsNestedSectionsStore, resetDefaultClientFactory, setDefaultClientFactory, useAsArray, useAsData, useAsDate, useAsDecimal, useAsDropdown, useAsDualInput, useAsErrorDismiss, useAsExternalErrors, useAsField, useAsFocusFirstAfter, useAsForm, useAsLocale, useAsNestedSectionsStore, useAsNumber, useAsOptionalAddFlow, useAsPath, useAsState, useAsTriStateCheckbox, useAsTuple, useAsTypeMap, useAsUnion, useAsUnionVariant, useAsValueHelp };
|
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-jEaSCN0P.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";
|
|
@@ -11,20 +11,21 @@ import { t as _default$5 } from "./as-datetime.vue-B47V1siL.mjs";
|
|
|
11
11
|
import { t as _default$6 } from "./as-decimal.vue-DitPZpS_.mjs";
|
|
12
12
|
import { t as _default$8 } from "./as-field-shell.vue-K4Flr3gw.mjs";
|
|
13
13
|
import { t as _default$10 } from "./as-input.vue-DgZrW4pc.mjs";
|
|
14
|
-
import { t as _default$12 } from "./as-
|
|
15
|
-
import { t as _default$13 } from "./as-
|
|
16
|
-
import { t as _default$14 } from "./as-
|
|
17
|
-
import { t as _default$15 } from "./as-
|
|
18
|
-
import { t as _default$16 } from "./as-
|
|
19
|
-
import { t as _default$17 } from "./as-
|
|
20
|
-
import { t as _default$18 } from "./as-
|
|
21
|
-
import { t as _default$19 } from "./as-
|
|
22
|
-
import { t as _default$20 } from "./as-
|
|
14
|
+
import { t as _default$12 } from "./as-multi-select.vue-rsDUkzxa.mjs";
|
|
15
|
+
import { t as _default$13 } from "./as-number.vue-Oml2y6Nt.mjs";
|
|
16
|
+
import { t as _default$14 } from "./as-object.vue-DAq7Kha3.mjs";
|
|
17
|
+
import { t as _default$15 } from "./as-paragraph.vue-CBU_olev.mjs";
|
|
18
|
+
import { t as _default$16 } from "./as-radio.vue-TVMliE1e.mjs";
|
|
19
|
+
import { t as _default$17 } from "./as-ref.vue-CUxxGqyg.mjs";
|
|
20
|
+
import { t as _default$18 } from "./as-select.vue-CKjAg-Y2.mjs";
|
|
21
|
+
import { t as _default$19 } from "./as-time.vue-BCEE4uCV.mjs";
|
|
22
|
+
import { t as _default$20 } from "./as-tuple.vue-WN7k43tv.mjs";
|
|
23
|
+
import { t as _default$21 } from "./as-union.vue-Ew3Bany8.mjs";
|
|
23
24
|
import * as vue from "vue";
|
|
24
25
|
import { Component, ComputedRef, MaybeRef, Ref, ShallowRef, WritableComputedRef } from "vue";
|
|
25
26
|
import * as _atscript_ui0 from "@atscript/ui";
|
|
26
27
|
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.
|
|
28
|
+
//#region ../../node_modules/.pnpm/@atscript+typescript@0.1.75_@atscript+core@0.1.75_@emnapi+core@1.10.0_@emnapi+runtime@1_1b3e0defc4eb50693fd278a520fcc345/node_modules/@atscript/typescript/dist/utils.d.ts
|
|
28
29
|
interface TError {
|
|
29
30
|
path: string;
|
|
30
31
|
message: string;
|
|
@@ -992,4 +993,4 @@ type AsErrorDismiss = (path: string) => void;
|
|
|
992
993
|
*/
|
|
993
994
|
declare function useAsErrorDismiss(): AsErrorDismiss;
|
|
994
995
|
//#endregion
|
|
995
|
-
export { _default as AsAction, _default$1 as AsArray, _default$2 as AsCheckbox, _default$3 as AsCollapsible, _default$4 as AsDate, _default$5 as AsDatetime, _default$6 as AsDecimal, type AsErrorDismiss, _default$7 as AsField, _default$8 as AsFieldShell, _default$9 as AsForm, _default$10 as AsInput, _default$11 as AsIterator, type AsNestedSectionsStore, _default$
|
|
996
|
+
export { _default as AsAction, _default$1 as AsArray, _default$2 as AsCheckbox, _default$3 as AsCollapsible, _default$4 as AsDate, _default$5 as AsDatetime, _default$6 as AsDecimal, type AsErrorDismiss, _default$7 as AsField, _default$8 as AsFieldShell, _default$9 as AsForm, _default$10 as AsInput, _default$11 as AsIterator, _default$12 as AsMultiSelect, type AsNestedSectionsStore, _default$13 as AsNumber, _default$14 as AsObject, _default$15 as AsParagraph, _default$16 as AsRadio, _default$17 as AsRef, _default$18 as AsSelect, _default$19 as AsTime, _default$20 as AsTuple, _default$21 as AsUnion, type ClientFactory, type TAsBaseComponentProps, type TAsChangeType, type TAsCollapsibleProps, type TAsCollapsibleSlots, type TAsComponentEmits, type TAsComponentProps, type TAsTypeComponents, type TAsUnionContext, type TFormFieldCallbacks, type TFormFieldRegistration, type TFormRule, type TFormState, type TFormSubmitValidator, type UseAsArrayReturn, type UseAsDataReturn, type UseAsDateOptions, type UseAsDateReturn, type UseAsDecimalOptions, type UseAsDecimalReturn, type UseAsDualInputOptions, type UseAsDualInputReturn, type UseAsExternalErrorsOptions, type UseAsExternalErrorsReturn, type UseAsFieldOptions, type UseAsFieldReturn, type UseAsFormOptions, type UseAsFormReturn, type UseAsLocaleReturn, type UseAsNumberOptions, type UseAsNumberReturn, type UseAsOptionalAddFlowOptions, type UseAsOptionalAddFlowReturn, type UseAsPathReturn, type UseAsStateReturn, type UseAsTriStateCheckboxOptions, type UseAsTriStateCheckboxReturn, type UseAsTupleReturn, type UseAsTypeMapReturn, type UseAsUnionReturn, type UseAsValueHelpOptions, type UseAsValueHelpReturn, createAsFormDef, createDefaultTypes, focusFirstAfter, focusNewFocusableAfter, formatIndexedLabelParts, getDefaultClientFactory, provideAsLocale, provideAsNestedSectionsStore, resetDefaultClientFactory, setDefaultClientFactory, useAsArray, useAsData, useAsDate, useAsDecimal, useAsDropdown, useAsDualInput, useAsErrorDismiss, useAsExternalErrors, useAsField, useAsFocusFirstAfter, useAsForm, useAsLocale, useAsNestedSectionsStore, useAsNumber, useAsOptionalAddFlow, useAsPath, useAsState, useAsTriStateCheckbox, useAsTuple, useAsTypeMap, useAsUnion, useAsUnionVariant, useAsValueHelp };
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
5
|
-
import { n as useAsData, r as useAsField, t as as_field_default } from "./as-field-
|
|
4
|
+
import { i as useAsExternalErrors, n as useAsForm, r as useAsState, t as as_form_default } from "./as-form-Cezf4SZG.mjs";
|
|
5
|
+
import { n as useAsData, r as useAsField, t as as_field_default } from "./as-field-CDB-HIfz.mjs";
|
|
6
6
|
import { n as useAsLocale, t as provideAsLocale } from "./use-as-locale-BrFdAgnU.mjs";
|
|
7
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
7
|
+
import { t as as_iterator_default } from "./as-iterator---gxkT-L.mjs";
|
|
8
8
|
import { n as focusNewFocusableAfter, r as useAsFocusFirstAfter, t as focusFirstAfter } from "./focus-after-toggle-Dtl3P6CS.mjs";
|
|
9
9
|
import { t as as_collapsible_default } from "./as-collapsible-DQOxKGGj.mjs";
|
|
10
10
|
import { t as as_field_shell_default } from "./as-field-shell-D0mNXfQZ.mjs";
|
|
@@ -17,10 +17,10 @@ import { n as useAsTriStateCheckbox, t as as_checkbox_default } from "./as-check
|
|
|
17
17
|
import { t as as_paragraph_default } from "./as-paragraph-GIGj6UgL.mjs";
|
|
18
18
|
import { t as as_action_default } from "./as-action-BoZtbaXt.mjs";
|
|
19
19
|
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-CQctXLZI.mjs";
|
|
20
|
-
import { t as as_object_default } from "./as-object-
|
|
21
|
-
import { n as useAsArray, t as as_array_default } from "./as-array-
|
|
20
|
+
import { t as as_object_default } from "./as-object-Dr7CttaK.mjs";
|
|
21
|
+
import { n as useAsArray, t as as_array_default } from "./as-array-B_LjJ0oi.mjs";
|
|
22
22
|
import { n as useAsTypeMap, r as useAsUnion, t as as_union_default } from "./as-union-B5OFQLJX.mjs";
|
|
23
|
-
import { n as useAsTuple, t as as_tuple_default } from "./as-tuple-
|
|
23
|
+
import { n as useAsTuple, t as as_tuple_default } from "./as-tuple-BUzs7nm6.mjs";
|
|
24
24
|
import { t as as_ref_default } from "./as-ref-D6zp_PIG.mjs";
|
|
25
25
|
import { n as useAsDualInput, r as useAsDecimal, t as as_decimal_default } from "./as-decimal-DtQuZmPA.mjs";
|
|
26
26
|
import { n as useAsNumber, t as as_number_default } from "./as-number-BIhBVXih.mjs";
|
|
@@ -101,4 +101,4 @@ function useAsErrorDismiss() {
|
|
|
101
101
|
return inject(DISMISS_EXTERNAL_AT_KEY, null) ?? NOOP;
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
|
-
export { as_action_default as AsAction, as_array_default as AsArray, as_checkbox_default as AsCheckbox, as_collapsible_default as AsCollapsible, as_date_default as AsDate, as_datetime_default as AsDatetime, as_decimal_default as AsDecimal, as_field_default as AsField, as_field_shell_default as AsFieldShell, as_form_default as AsForm, as_input_default as AsInput, as_iterator_default as AsIterator, as_number_default as AsNumber, as_object_default as AsObject, as_paragraph_default as AsParagraph, as_radio_default as AsRadio, as_ref_default as AsRef, as_select_default as AsSelect, as_time_default as AsTime, as_tuple_default as AsTuple, as_union_default as AsUnion, createAsFormDef, createDefaultTypes, focusFirstAfter, focusNewFocusableAfter, formatIndexedLabelParts, getDefaultClientFactory, provideAsLocale, provideAsNestedSectionsStore, resetDefaultClientFactory, setDefaultClientFactory, useAsArray, useAsData, useAsDate, useAsDecimal, useAsDropdown, useAsDualInput, useAsErrorDismiss, useAsExternalErrors, useAsField, useAsFocusFirstAfter, useAsForm, useAsLocale, useAsNestedSectionsStore, useAsNumber, useAsOptionalAddFlow, useAsPath, useAsState, useAsTriStateCheckbox, useAsTuple, useAsTypeMap, useAsUnion, useAsUnionVariant, useAsValueHelp };
|
|
104
|
+
export { as_action_default as AsAction, as_array_default as AsArray, as_checkbox_default as AsCheckbox, as_collapsible_default as AsCollapsible, as_date_default as AsDate, as_datetime_default as AsDatetime, as_decimal_default as AsDecimal, as_field_default as AsField, as_field_shell_default as AsFieldShell, as_form_default as AsForm, as_input_default as AsInput, as_iterator_default as AsIterator, as_multi_select_default as AsMultiSelect, as_number_default as AsNumber, as_object_default as AsObject, as_paragraph_default as AsParagraph, as_radio_default as AsRadio, as_ref_default as AsRef, as_select_default as AsSelect, as_time_default as AsTime, as_tuple_default as AsTuple, as_union_default as AsUnion, createAsFormDef, createDefaultTypes, focusFirstAfter, focusNewFocusableAfter, formatIndexedLabelParts, getDefaultClientFactory, provideAsLocale, provideAsNestedSectionsStore, resetDefaultClientFactory, setDefaultClientFactory, useAsArray, useAsData, useAsDate, useAsDecimal, useAsDropdown, useAsDualInput, useAsErrorDismiss, useAsExternalErrors, useAsField, useAsFocusFirstAfter, useAsForm, useAsLocale, useAsNestedSectionsStore, useAsNumber, useAsOptionalAddFlow, useAsPath, useAsState, useAsTriStateCheckbox, useAsTuple, useAsTypeMap, useAsUnion, useAsUnionVariant, useAsValueHelp };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/vue-form",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.98",
|
|
4
4
|
"description": "Type-driven form rendering for Atscript with Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
"styles.d.ts"
|
|
30
30
|
],
|
|
31
31
|
"type": "module",
|
|
32
|
+
"sideEffects": [
|
|
33
|
+
"**/*.css"
|
|
34
|
+
],
|
|
32
35
|
"main": "dist/index.mjs",
|
|
33
36
|
"types": "dist/index.d.mts",
|
|
34
37
|
"exports": {
|
|
@@ -157,29 +160,29 @@
|
|
|
157
160
|
"access": "public"
|
|
158
161
|
},
|
|
159
162
|
"dependencies": {
|
|
160
|
-
"@atscript/ui": "^0.1.
|
|
163
|
+
"@atscript/ui": "^0.1.98"
|
|
161
164
|
},
|
|
162
165
|
"devDependencies": {
|
|
163
|
-
"@atscript/core": "^0.1.
|
|
164
|
-
"@atscript/db-client": "^0.1.
|
|
165
|
-
"@atscript/typescript": "^0.1.
|
|
166
|
+
"@atscript/core": "^0.1.75",
|
|
167
|
+
"@atscript/db-client": "^0.1.104",
|
|
168
|
+
"@atscript/typescript": "^0.1.75",
|
|
166
169
|
"@tsdown/css": "^0.21.4",
|
|
167
170
|
"@vitejs/plugin-vue": "^6",
|
|
168
171
|
"@vue/test-utils": "^2",
|
|
169
172
|
"happy-dom": "^18",
|
|
170
173
|
"reka-ui": "^2.9.8",
|
|
171
|
-
"unplugin-atscript": "^0.1.
|
|
174
|
+
"unplugin-atscript": "^0.1.75",
|
|
172
175
|
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
|
|
173
176
|
"vue": "^3",
|
|
174
177
|
"vue-tsc": "~3.2.9",
|
|
175
178
|
"vunor": "^0.2.1",
|
|
176
|
-
"@atscript/ui-fns": "^0.1.
|
|
179
|
+
"@atscript/ui-fns": "^0.1.98"
|
|
177
180
|
},
|
|
178
181
|
"peerDependencies": {
|
|
179
|
-
"@atscript/db-client": "^0.1.
|
|
182
|
+
"@atscript/db-client": "^0.1.104",
|
|
180
183
|
"reka-ui": "^2.9.8",
|
|
181
184
|
"vue": "^3",
|
|
182
|
-
"@atscript/ui-fns": "^0.1.
|
|
185
|
+
"@atscript/ui-fns": "^0.1.98"
|
|
183
186
|
},
|
|
184
187
|
"scripts": {
|
|
185
188
|
"build": "node ../../scripts/gen-exports.mjs && vp pack",
|