@atscript/vue-form 0.1.175 → 0.1.177
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/_editing-hold-ChPIf1ZC.cjs +65 -0
- package/dist/_editing-hold-DVfB2wc_.mjs +54 -0
- package/dist/{_shape-BAim7zm2.cjs → _shape-C-TxQCFa.cjs} +17 -1
- package/dist/{_shape-CLX3JSFZ.mjs → _shape-bdsPEB8P.mjs} +12 -2
- package/dist/as-action.cjs +1 -1
- package/dist/as-action.d.mts +1 -1
- package/dist/as-action.mjs +1 -1
- package/dist/{as-action.vue-CPFAPJbB.d.mts → as-action.vue-CQbDa3g4.d.mts} +1 -1
- package/dist/{as-array-ha4DpqUM.mjs → as-array-CGsGZFi8.mjs} +12 -17
- package/dist/{as-array-B1s5sXYV.cjs → as-array-DMN1xd4A.cjs} +11 -16
- package/dist/{as-array-clear-btn-bUM9vztK.mjs → as-array-clear-btn-CKlJCXkv.mjs} +1 -1
- package/dist/{as-array-clear-btn-CNSn7HrC.cjs → as-array-clear-btn-CMvSOc1R.cjs} +1 -1
- package/dist/as-array.cjs +1 -1
- package/dist/as-array.d.mts +1 -1
- package/dist/as-array.mjs +1 -1
- package/dist/{as-array.vue-CPAuKOJp.d.mts → as-array.vue-DpKFsuRS.d.mts} +1 -1
- package/dist/{as-checkbox-Baz513zf.mjs → as-checkbox-B0OB5a9J.mjs} +2 -2
- package/dist/{as-checkbox-OKhewGzL.cjs → as-checkbox-CIgpJSiD.cjs} +2 -2
- package/dist/as-checkbox.cjs +1 -1
- package/dist/as-checkbox.d.mts +1 -1
- package/dist/as-checkbox.mjs +1 -1
- package/dist/{as-checkbox.vue-DTwhk8as.d.mts → as-checkbox.vue-Db6OT_lL.d.mts} +1 -1
- package/dist/{as-collapsible-B_YnV9V8.mjs → as-collapsible-B7pG3XLt.mjs} +1 -1
- package/dist/{as-collapsible-COchVoS0.cjs → as-collapsible-D3UhCddg.cjs} +1 -1
- package/dist/as-collapsible.cjs +1 -1
- package/dist/as-collapsible.d.mts +1 -1
- package/dist/as-collapsible.mjs +1 -1
- package/dist/{as-collapsible.vue-D-C-9GqT.d.mts → as-collapsible.vue-By-ZBZt3.d.mts} +1 -1
- package/dist/{as-date-VN6VPCZ-.mjs → as-date-CLd_CV0y.mjs} +4 -4
- package/dist/{as-date-4GYZJ-NC.cjs → as-date-ClMkBzD6.cjs} +4 -4
- package/dist/as-date.cjs +1 -1
- package/dist/as-date.d.mts +1 -1
- package/dist/as-date.mjs +1 -1
- package/dist/{as-date.vue-Orrtd1W8.d.mts → as-date.vue-BUaHHI42.d.mts} +1 -1
- package/dist/{as-datetime-CWzURHq_.mjs → as-datetime-D6DXx0j9.mjs} +4 -4
- package/dist/{as-datetime-CCN03o-l.cjs → as-datetime-DdNS4GKj.cjs} +4 -4
- package/dist/as-datetime.cjs +1 -1
- package/dist/as-datetime.d.mts +1 -1
- package/dist/as-datetime.mjs +1 -1
- package/dist/{as-datetime.vue-Cj3rQjQT.d.mts → as-datetime.vue-D3WJpAVe.d.mts} +1 -1
- package/dist/{as-decimal-BC09yeEc.cjs → as-decimal-BbE2SktW.cjs} +2 -2
- package/dist/{as-decimal-C8ZbnZ-W.mjs → as-decimal-D8emq_SN.mjs} +2 -2
- package/dist/as-decimal.cjs +1 -1
- package/dist/as-decimal.d.mts +1 -1
- package/dist/as-decimal.mjs +1 -1
- package/dist/{as-decimal.vue-BUoGa9Ni.d.mts → as-decimal.vue-BVDyP4LN.d.mts} +1 -1
- package/dist/{as-field-D6clFBPR.mjs → as-field-CUIvj5hx.mjs} +7 -11
- package/dist/{as-field-CeJbqaGj.cjs → as-field-gBXYA3zZ.cjs} +6 -10
- package/dist/{as-field-shell-nSZx4aV0.mjs → as-field-shell-DjYBbigs.mjs} +36 -23
- package/dist/{as-field-shell-DviDLKgc.cjs → as-field-shell-R8DyS1tc.cjs} +36 -23
- package/dist/as-field-shell.cjs +1 -1
- package/dist/as-field-shell.d.mts +1 -1
- package/dist/as-field-shell.mjs +1 -1
- package/dist/{as-field-shell.vue-BLF9cYdM.d.mts → as-field-shell.vue-DBufTHVO.d.mts} +1 -1
- package/dist/as-field.cjs +1 -1
- package/dist/as-field.d.mts +1 -1
- package/dist/as-field.mjs +1 -1
- package/dist/{as-form-Bo-QNGot.cjs → as-form-ChlZL6WP.cjs} +49 -23
- package/dist/{as-form-D-RQUPnK.mjs → as-form-DCxGV2-w.mjs} +50 -24
- 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-Cl036Br1.d.cts → as-form.vue-D2osFDt6.d.cts} +26 -9
- package/dist/{as-form.vue-9rtEZqEU.d.mts → as-form.vue-DJAftKr2.d.mts} +27 -10
- package/dist/{as-input-GVFsgqbJ.cjs → as-input-C1Iw2AkY.cjs} +3 -3
- package/dist/{as-input-B5eBOvaM.mjs → as-input-MVamvBMv.mjs} +3 -3
- package/dist/{as-input-control-Dc9TPspz.mjs → as-input-control-B3h--Qe0.mjs} +17 -5
- package/dist/{as-input-control-B04eAMwA.cjs → as-input-control-DAbaW7GG.cjs} +16 -4
- package/dist/as-input.cjs +1 -1
- package/dist/as-input.d.mts +1 -1
- package/dist/as-input.mjs +1 -1
- package/dist/{as-input.vue-C7EKOcQU.d.mts → as-input.vue-BiPsULeF.d.mts} +1 -1
- package/dist/{as-iterator-D643RugN.cjs → as-iterator-B7h3xaKQ.cjs} +2 -2
- package/dist/{as-iterator-CgGSiI_d.mjs → as-iterator-BTcoyKFq.mjs} +2 -2
- package/dist/as-iterator.cjs +1 -1
- package/dist/as-iterator.d.mts +1 -1
- package/dist/as-iterator.mjs +1 -1
- package/dist/{as-multi-select-BhPKb69b.mjs → as-multi-select-BQZvt3Fr.mjs} +1 -1
- package/dist/{as-multi-select-BygHZ0wu.cjs → as-multi-select-DDNIusOV.cjs} +1 -1
- package/dist/as-multi-select.cjs +1 -1
- package/dist/as-multi-select.d.mts +1 -1
- package/dist/as-multi-select.mjs +1 -1
- package/dist/{as-multi-select.vue-BS9X_0fY.d.mts → as-multi-select.vue-Bmngkww7.d.mts} +1 -1
- package/dist/{as-number-bFJlxd6T.cjs → as-number-BUid7j2k.cjs} +3 -3
- package/dist/{as-number-BCZD5zX6.mjs → as-number-CT3DSCBF.mjs} +3 -3
- package/dist/as-number.cjs +1 -1
- package/dist/as-number.d.mts +1 -1
- package/dist/as-number.mjs +1 -1
- package/dist/{as-number.vue-CJSPy4zg.d.mts → as-number.vue-C2QSKpVL.d.mts} +1 -1
- package/dist/{as-object-aItYU-IN.cjs → as-object-CB8Un-GN.cjs} +5 -5
- package/dist/{as-object-sly2aTBc.mjs → as-object-DaUkalfF.mjs} +5 -5
- package/dist/as-object.cjs +1 -1
- package/dist/as-object.d.mts +1 -1
- package/dist/as-object.mjs +1 -1
- package/dist/{as-object.vue-DKEhwHCH.d.mts → as-object.vue-DFo_5DXv.d.mts} +1 -1
- package/dist/as-paragraph.cjs +1 -1
- package/dist/as-paragraph.d.mts +1 -1
- package/dist/as-paragraph.mjs +1 -1
- package/dist/{as-paragraph.vue-Cu4woZ9u.d.mts → as-paragraph.vue-DiHaNFSX.d.mts} +1 -1
- package/dist/{as-radio-Bxw-nuBQ.cjs → as-radio-B9eRK1Sr.cjs} +1 -1
- package/dist/{as-radio-DszOJUnp.mjs → as-radio-QqVLOzED.mjs} +1 -1
- package/dist/as-radio.cjs +1 -1
- package/dist/as-radio.d.mts +1 -1
- package/dist/as-radio.mjs +1 -1
- package/dist/{as-radio.vue-dro8-E3x.d.mts → as-radio.vue-C_ZjbI4s.d.mts} +1 -1
- package/dist/{as-ref-Dsd81GCS.mjs → as-ref-BUxC1GPm.mjs} +43 -42
- package/dist/{as-ref-DCYYySDN.cjs → as-ref-C4euogko.cjs} +42 -41
- package/dist/as-ref.cjs +1 -1
- package/dist/as-ref.d.mts +1 -1
- package/dist/as-ref.mjs +1 -1
- package/dist/{as-ref.vue-B7wixo40.d.mts → as-ref.vue-DaXQsjsX.d.mts} +1 -1
- package/dist/{as-select-CER1fT_R.mjs → as-select-BNm4pgAW.mjs} +1 -1
- package/dist/{as-select-ClWgJvtq.cjs → as-select-BvfuZLwz.cjs} +1 -1
- package/dist/as-select.cjs +1 -1
- package/dist/as-select.d.mts +1 -1
- package/dist/as-select.mjs +1 -1
- package/dist/{as-select.vue-DKBV1tqr.d.mts → as-select.vue-IGtjEyQD.d.mts} +1 -1
- package/dist/{as-time-C91Kljns.cjs → as-time-B74WYv_l.cjs} +4 -4
- package/dist/{as-time--hMNPNqj.mjs → as-time-Cz_jvm6T.mjs} +4 -4
- package/dist/as-time.cjs +1 -1
- package/dist/as-time.d.mts +1 -1
- package/dist/as-time.mjs +1 -1
- package/dist/{as-time.vue-DTUPfGLQ.d.mts → as-time.vue-CKVgGb-m.d.mts} +1 -1
- package/dist/{as-tuple-wuPJs4H-.cjs → as-tuple-5EyboNQq.cjs} +8 -9
- package/dist/{as-tuple-57xADF_i.mjs → as-tuple-BtREHMCP.mjs} +9 -10
- package/dist/as-tuple.cjs +1 -1
- package/dist/as-tuple.d.mts +1 -1
- package/dist/as-tuple.mjs +1 -1
- package/dist/{as-tuple.vue-CF5tHv89.d.mts → as-tuple.vue-CDOHXKBr.d.mts} +1 -1
- package/dist/{as-union-DXzqX-M1.mjs → as-union-BF-YDJDs.mjs} +9 -10
- package/dist/{as-union-BDC13rY3.cjs → as-union-CcZalTHx.cjs} +8 -9
- package/dist/as-union.cjs +1 -1
- package/dist/as-union.d.mts +1 -1
- package/dist/as-union.mjs +1 -1
- package/dist/{as-union.vue-DJGnj0xV.d.mts → as-union.vue-BcaUH5bH.d.mts} +1 -1
- package/dist/{as-variant-picker-DJ_sqKD3.mjs → as-variant-picker-D6qxuUZA.mjs} +1 -1
- package/dist/{as-variant-picker-BxOP4dkG.cjs → as-variant-picker-LRFryLRJ.cjs} +1 -1
- package/dist/index.cjs +27 -27
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +24 -24
- package/dist/index.mjs +27 -27
- package/dist/locale.d.mts +1 -1
- package/dist/{use-as-model-texts-DJf4hBHf.mjs → use-as-model-texts-BfvRuqNS.mjs} +1 -1
- package/dist/{use-as-model-texts-x-ioNOC1.cjs → use-as-model-texts-C1El8R0H.cjs} +1 -1
- package/dist/{use-as-value-help-B2Ds6Iek.cjs → use-as-value-help-CV8z7cQ6.cjs} +3 -6
- package/dist/{use-as-value-help-C3-5RMoO.mjs → use-as-value-help-D-uxj0Zx.mjs} +3 -6
- package/dist/{use-form-context-D7fCP5H4.mjs → use-form-context-B1-J096b.mjs} +5 -1
- package/dist/{use-form-context-ClLGWXWa.cjs → use-form-context-DxcGtsex.cjs} +4 -0
- package/package.json +9 -9
- /package/dist/{as-action-C0gSyG19.cjs → as-action-B_vPR2YE.cjs} +0 -0
- /package/dist/{as-action-BOalk1GL.mjs → as-action-BzdLJvyy.mjs} +0 -0
- /package/dist/{as-adornment-shell-grq1H0D-.mjs → as-adornment-shell-CBaksXGT.mjs} +0 -0
- /package/dist/{as-adornment-shell-COhqCppW.cjs → as-adornment-shell-CmS9BOFm.cjs} +0 -0
- /package/dist/{as-field.vue-jAOaV9zg.d.mts → as-field.vue-BWaTLJd6.d.mts} +0 -0
- /package/dist/{as-iterator.vue-DisW8puF.d.mts → as-iterator.vue-BUCohjxw.d.mts} +0 -0
- /package/dist/{as-paragraph-DfX1uEE_.cjs → as-paragraph-0opsr433.cjs} +0 -0
- /package/dist/{as-paragraph-BALTsswa.mjs → as-paragraph-CQCdz9FR.mjs} +0 -0
- /package/dist/{types-DitKqqD_.d.mts → types-B0Ey_eD-.d.mts} +0 -0
- /package/dist/{use-as-date-Dp3IDhLj.cjs → use-as-date-DFcdIfyr.cjs} +0 -0
- /package/dist/{use-as-date-B3sBae9e.mjs → use-as-date-DgPRL0O2.mjs} +0 -0
- /package/dist/{use-as-locale-TRSJHpw-.d.mts → use-as-locale-D4NDG8Vg.d.mts} +0 -0
- /package/dist/{use-as-optional-add-flow-nwBB3Mdk.cjs → use-as-optional-add-flow-C7f0blhC.cjs} +0 -0
- /package/dist/{use-as-optional-add-flow-DRZT-aIT.mjs → use-as-optional-add-flow-fOglspPV.mjs} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as PATH_PREFIX_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_NORMALIZED_DATA_KEY, f as FORM_PATCH_KEY, g as MODEL_TEXTS_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as HIDE_ROOT_TITLE_KEY, o as COMPONENTS_KEY, p as FORM_STATE_KEY, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY, v as ROOT_DATA_KEY, y as TYPES_KEY } from "./use-form-context-
|
|
1
|
+
import { _ as PATH_PREFIX_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_NORMALIZED_DATA_KEY, f as FORM_PATCH_KEY, g as MODEL_TEXTS_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as HIDE_ROOT_TITLE_KEY, o as COMPONENTS_KEY, p as FORM_STATE_KEY, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY, v as ROOT_DATA_KEY, y as TYPES_KEY } from "./use-form-context-B1-J096b.mjs";
|
|
2
2
|
import { i as useAsNestedSectionsStore, n as provideAsNestedSectionsStore, t as DESCENDANT_ERROR_COUNTS_KEY } from "./use-as-nested-sections-store-Dfo971PK.mjs";
|
|
3
3
|
import { o as useAsTexts } from "./use-as-locale-BEzm7jbp.mjs";
|
|
4
|
-
import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-
|
|
5
|
-
import { t as as_field_default } from "./as-field-
|
|
6
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
4
|
+
import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-D-uxj0Zx.mjs";
|
|
5
|
+
import { t as as_field_default } from "./as-field-CUIvj5hx.mjs";
|
|
6
|
+
import { t as as_iterator_default } from "./as-iterator-BTcoyKFq.mjs";
|
|
7
7
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, isProxy, isRef, mergeProps, nextTick, normalizeProps, openBlock, provide, reactive, ref, renderSlot, shallowRef, toDisplayString, toRaw, toValue, unref, watch, watchEffect, withModifiers } from "vue";
|
|
8
|
-
import { FORM_ERROR_KEY, META_DESCRIPTION, META_LABEL, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_SUBMIT_TEXT, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, collectDirtyPaths, deepClone, getByPath, getDeclaredFormActions, getFormValidator, iteratePathAncestors, mergeErrorMaps, omitPaths, omitSkippedNavFields, resolveFormProp, setByPath, unionVariantChanged } from "@atscript/ui";
|
|
8
|
+
import { FORM_ERROR_KEY, META_DESCRIPTION, META_LABEL, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_SUBMIT_TEXT, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, collectDirtyPaths, createFormData, createFormValueResolver, deepClone, deleteByPath, getByPath, getDeclaredFormActions, getFormValidator, iteratePathAncestors, mergeErrorMaps, omitPaths, omitSkippedNavFields, resolveFormProp, setByPath, unionVariantChanged } from "@atscript/ui";
|
|
9
9
|
//#region src/composables/use-as-form-patch.ts
|
|
10
10
|
/**
|
|
11
11
|
* Internal factory invoked by `useAsForm` when `trackChanges` is enabled. Owns
|
|
@@ -46,11 +46,12 @@ import { FORM_ERROR_KEY, META_DESCRIPTION, META_LABEL, UI_FORM_FN_DESCRIPTION, U
|
|
|
46
46
|
* container reference is also the write target for
|
|
47
47
|
* `rebaseOnto` — mutating its `.value` preserves the bound
|
|
48
48
|
* `:form-data` identity so the deep watch fires once.
|
|
49
|
-
* @param onRebased optional callback fired
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* detects its index once at setup and won't
|
|
53
|
-
* data swap. No-op for `rebase()` (which doesn't
|
|
49
|
+
* @param onRebased optional callback fired when `rebaseOnto` — or a swap of the
|
|
50
|
+
* container's `value` — lands a different union variant, so the
|
|
51
|
+
* host can force-remount the field subtree (e.g. bump a key):
|
|
52
|
+
* the variant picker detects its index once at setup and won't
|
|
53
|
+
* re-detect on a data swap. No-op for `rebase()` (which doesn't
|
|
54
|
+
* move data).
|
|
54
55
|
*/
|
|
55
56
|
function createAsFormPatch(def, getData, onRebased) {
|
|
56
57
|
let baseline;
|
|
@@ -73,8 +74,10 @@ function createAsFormPatch(def, getData, onRebased) {
|
|
|
73
74
|
baselineRev.value++;
|
|
74
75
|
}
|
|
75
76
|
capture();
|
|
77
|
+
let rebasing = false;
|
|
76
78
|
watch(() => getData().value, (next, prev) => {
|
|
77
79
|
if (next === prev) return;
|
|
80
|
+
if (!rebasing && unionVariantChanged(def(), { value: prev }, { value: next })) onRebased?.();
|
|
78
81
|
if (baseline === void 0) {
|
|
79
82
|
capture();
|
|
80
83
|
return;
|
|
@@ -127,11 +130,19 @@ function createAsFormPatch(def, getData, onRebased) {
|
|
|
127
130
|
* {@link AsFormPatchHandle.rebaseOnto}). One reactive write, then an explicit
|
|
128
131
|
* re-baseline to the upstream snapshot.
|
|
129
132
|
*/
|
|
133
|
+
function write(value) {
|
|
134
|
+
rebasing = true;
|
|
135
|
+
try {
|
|
136
|
+
setByPath(getData(), "", value);
|
|
137
|
+
} finally {
|
|
138
|
+
rebasing = false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
130
141
|
function rebaseOnto(upstream, opts) {
|
|
131
142
|
const u = deepClone(upstream, toRaw);
|
|
132
143
|
if (baseline === void 0) {
|
|
133
144
|
const before = deepClone(getData(), toRaw);
|
|
134
|
-
|
|
145
|
+
write(u.value);
|
|
135
146
|
if (unionVariantChanged(def(), before, u)) onRebased?.();
|
|
136
147
|
capture();
|
|
137
148
|
return {
|
|
@@ -142,7 +153,7 @@ function createAsFormPatch(def, getData, onRebased) {
|
|
|
142
153
|
const current = deepClone(getData(), toRaw);
|
|
143
154
|
const { next, conflicts, reapplied } = buildFormRebase(def(), baseline, current, u, opts);
|
|
144
155
|
const variantMoved = unionVariantChanged(def(), current, next);
|
|
145
|
-
|
|
156
|
+
write(next.value);
|
|
146
157
|
baseline = u;
|
|
147
158
|
baselineRev.value++;
|
|
148
159
|
if (variantMoved) onRebased?.();
|
|
@@ -427,12 +438,6 @@ function useAsForm(options) {
|
|
|
427
438
|
remountKey.value++;
|
|
428
439
|
}) : void 0;
|
|
429
440
|
if (patch) provide(FORM_PATCH_KEY, patch);
|
|
430
|
-
const reset = async () => {
|
|
431
|
-
internalErrors.value = {};
|
|
432
|
-
rootErrorDismissed.value = false;
|
|
433
|
-
await resetState();
|
|
434
|
-
patch?.rebase();
|
|
435
|
-
};
|
|
436
441
|
provide(ROOT_DATA_KEY, data);
|
|
437
442
|
provide(PATH_PREFIX_KEY, computed(() => ""));
|
|
438
443
|
provide(TYPES_KEY, computed(() => options.types()));
|
|
@@ -458,6 +463,28 @@ function useAsForm(options) {
|
|
|
458
463
|
rootErrorDismissed.value = true;
|
|
459
464
|
ext.dismissForm();
|
|
460
465
|
}
|
|
466
|
+
const reset = async () => {
|
|
467
|
+
internalErrors.value = {};
|
|
468
|
+
rootErrorDismissed.value = false;
|
|
469
|
+
const def = options.def();
|
|
470
|
+
const container = data.value;
|
|
471
|
+
const empty = createFormData(def.type, createFormValueResolver({}, formContext.value ?? {}));
|
|
472
|
+
const errorPaths = Object.keys(ext.effective.value ?? {});
|
|
473
|
+
const before = errorPaths.map((path) => getByPath(container, path));
|
|
474
|
+
if (typeof container.value === "object" && container.value !== null) for (const { path } of def.fields) {
|
|
475
|
+
const value = getByPath(empty, path);
|
|
476
|
+
if (value === void 0) deleteByPath(container, path);
|
|
477
|
+
else setByPath(container, path, value);
|
|
478
|
+
}
|
|
479
|
+
else container.value = empty.value;
|
|
480
|
+
errorPaths.forEach((path, i) => {
|
|
481
|
+
if (getByPath(container, path) !== before[i]) ext.dismissAt(path);
|
|
482
|
+
});
|
|
483
|
+
remountKey.value++;
|
|
484
|
+
await nextTick();
|
|
485
|
+
await resetState();
|
|
486
|
+
patch?.rebase();
|
|
487
|
+
};
|
|
461
488
|
provide(DESCENDANT_ERROR_COUNTS_KEY, computed(() => buildDescendantErrorCounts(allErrors.value)));
|
|
462
489
|
watch(allErrors, (errors) => {
|
|
463
490
|
for (const errPath of Object.keys(errors)) for (const ancestor of iteratePathAncestors(errPath)) sectionsStore.setOpen(ancestor, true);
|
|
@@ -568,10 +595,6 @@ const _hoisted_2 = {
|
|
|
568
595
|
const _hoisted_3 = { class: "as-form-error-message" };
|
|
569
596
|
const _hoisted_4 = ["disabled"];
|
|
570
597
|
const _hoisted_5 = {
|
|
571
|
-
key: 2,
|
|
572
|
-
class: "as-form-grid"
|
|
573
|
-
};
|
|
574
|
-
const _hoisted_6 = {
|
|
575
598
|
key: 3,
|
|
576
599
|
class: "as-form-overlay"
|
|
577
600
|
};
|
|
@@ -708,12 +731,15 @@ var as_form_default = /* @__PURE__ */ defineComponent({
|
|
|
708
731
|
disabled: unref(form).submitDisabled.value
|
|
709
732
|
}, toDisplayString(unref(form).submitText.value), 9, _hoisted_4)]) : createCommentVNode("v-if", true),
|
|
710
733
|
createCommentVNode(" `@ui.form.pushDown` fields render in their own grid below submit. "),
|
|
711
|
-
__props.def.pushDownFields.length ? (openBlock(), createElementBlock("div",
|
|
734
|
+
__props.def.pushDownFields.length ? (openBlock(), createElementBlock("div", {
|
|
735
|
+
key: unref(form).remountKey.value,
|
|
736
|
+
class: "as-form-grid"
|
|
737
|
+
}, [createVNode(as_iterator_default, {
|
|
712
738
|
def: __props.def,
|
|
713
739
|
fields: __props.def.pushDownFields
|
|
714
740
|
}, null, 8, ["def", "fields"])])) : createCommentVNode("v-if", true),
|
|
715
741
|
renderSlot(_ctx.$slots, "form.footer", normalizeProps(guardReactiveProps(unref(form).slotProps.value))),
|
|
716
|
-
__props.loading ? (openBlock(), createElementBlock("div",
|
|
742
|
+
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "form.loading", normalizeProps(guardReactiveProps(unref(form).slotProps.value)), () => [_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
717
743
|
class: "as-form-overlay-icon",
|
|
718
744
|
"aria-hidden": "true"
|
|
719
745
|
}, 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-ChlZL6WP.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-D2osFDt6.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-DJAftKr2.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-DCxGV2-w.mjs";
|
|
2
2
|
export { as_form_default as default };
|
|
@@ -79,7 +79,13 @@ interface UseAsFieldOptions<TValue = any, TFormData = any, TContext = any> {
|
|
|
79
79
|
setValue: (v: TValue) => void;
|
|
80
80
|
rules?: TFormRule<TValue, TFormData, TContext>[];
|
|
81
81
|
path: () => string;
|
|
82
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Value written on form reset, after the form has reset its data to the
|
|
84
|
+
* empty-form values. Left out (the usual case), the field keeps the value
|
|
85
|
+
* that reset gives it; pass it (`undefined` included) for a value the form
|
|
86
|
+
* data does not hold, e.g. when `getValue` / `setValue` reach state outside
|
|
87
|
+
* the form data.
|
|
88
|
+
*/
|
|
83
89
|
resetValue?: TValue;
|
|
84
90
|
}
|
|
85
91
|
interface UseAsFieldReturn<TValue = any> {
|
|
@@ -339,9 +345,15 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
339
345
|
/** Errors discovered by the local validator on the most-recent submit. */
|
|
340
346
|
internalErrors: Ref<Record<string, string>>;
|
|
341
347
|
/**
|
|
342
|
-
*
|
|
343
|
-
* `
|
|
344
|
-
*
|
|
348
|
+
* Return the form's fields to what a newly created form holds
|
|
349
|
+
* (`createFormData` — annotation defaults included, optional fields absent;
|
|
350
|
+
* loaded values are not kept). Properties of the data that are not form
|
|
351
|
+
* fields (an edit form's version column, navigation rows) are left as they
|
|
352
|
+
* are. The field subtree remounts (`remountKey`); touched state, submit and
|
|
353
|
+
* live errors are cleared; a server error (`errors`) is dismissed where the
|
|
354
|
+
* reset changed the value — on other paths, and the external `__form`
|
|
355
|
+
* banner, it stays. When `trackChanges` is enabled, the post-reset state
|
|
356
|
+
* becomes the new clean baseline.
|
|
345
357
|
*/
|
|
346
358
|
reset: () => Promise<void>;
|
|
347
359
|
/**
|
|
@@ -395,9 +407,10 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
395
407
|
*/
|
|
396
408
|
patch: AsFormPatchHandle | undefined;
|
|
397
409
|
/**
|
|
398
|
-
* Remount key for the field subtree. Bound as `:key` on the root `<AsField
|
|
399
|
-
*
|
|
400
|
-
*
|
|
410
|
+
* Remount key for the field subtree. Bound as `:key` on the root `<AsField>`
|
|
411
|
+
* (and on the pushed-down fields). Bumped by every `reset()`, and — with
|
|
412
|
+
* `trackChanges` — when `patch.rebaseOnto` or a swap of the data's `value`
|
|
413
|
+
* lands a different union variant, forcing the variant picker to re-detect.
|
|
401
414
|
*/
|
|
402
415
|
remountKey: Ref<number>;
|
|
403
416
|
/** Dispatch an action — invoked by `<AsAction>`. */
|
|
@@ -550,7 +563,11 @@ interface UseAsValueHelpReturn {
|
|
|
550
563
|
labelIsFkValue: ComputedRef<boolean>;
|
|
551
564
|
kickoff: () => Promise<void>;
|
|
552
565
|
selectItem: (item: Record<string, unknown>) => void;
|
|
553
|
-
|
|
566
|
+
/**
|
|
567
|
+
* Clear the picker: set the model to `value` (`undefined` — unset — when
|
|
568
|
+
* omitted) and empty the search text.
|
|
569
|
+
*/
|
|
570
|
+
clear: (value?: unknown) => void;
|
|
554
571
|
}
|
|
555
572
|
declare function useAsValueHelp(options: UseAsValueHelpOptions): UseAsValueHelpReturn;
|
|
556
573
|
//#endregion
|
|
@@ -1194,8 +1211,8 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1194
1211
|
path: string;
|
|
1195
1212
|
message: string;
|
|
1196
1213
|
}[]) => any) | undefined;
|
|
1197
|
-
onAction?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
|
|
1198
1214
|
onSubmit?: ((data: TAsFormValue<TFormData>) => any) | undefined;
|
|
1215
|
+
onAction?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
|
|
1199
1216
|
"onUnsupported-action"?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
|
|
1200
1217
|
onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TAsFormValue<TFormData>) => any) | undefined;
|
|
1201
1218
|
}> & (typeof globalThis extends {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as TAsUnionContext, n as TAsChangeType, o as TAsComponentProps, s as TAsTypeComponents } from "./types-
|
|
1
|
+
import { c as TAsUnionContext, n as TAsChangeType, o as TAsComponentProps, s as TAsTypeComponents } from "./types-B0Ey_eD-.mjs";
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
import { Component, ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, WritableComputedRef } from "vue";
|
|
4
4
|
import * as _atscript_ui0 from "@atscript/ui";
|
|
@@ -79,7 +79,13 @@ interface UseAsFieldOptions<TValue = any, TFormData = any, TContext = any> {
|
|
|
79
79
|
setValue: (v: TValue) => void;
|
|
80
80
|
rules?: TFormRule<TValue, TFormData, TContext>[];
|
|
81
81
|
path: () => string;
|
|
82
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Value written on form reset, after the form has reset its data to the
|
|
84
|
+
* empty-form values. Left out (the usual case), the field keeps the value
|
|
85
|
+
* that reset gives it; pass it (`undefined` included) for a value the form
|
|
86
|
+
* data does not hold, e.g. when `getValue` / `setValue` reach state outside
|
|
87
|
+
* the form data.
|
|
88
|
+
*/
|
|
83
89
|
resetValue?: TValue;
|
|
84
90
|
}
|
|
85
91
|
interface UseAsFieldReturn<TValue = any> {
|
|
@@ -339,9 +345,15 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
339
345
|
/** Errors discovered by the local validator on the most-recent submit. */
|
|
340
346
|
internalErrors: Ref<Record<string, string>>;
|
|
341
347
|
/**
|
|
342
|
-
*
|
|
343
|
-
* `
|
|
344
|
-
*
|
|
348
|
+
* Return the form's fields to what a newly created form holds
|
|
349
|
+
* (`createFormData` — annotation defaults included, optional fields absent;
|
|
350
|
+
* loaded values are not kept). Properties of the data that are not form
|
|
351
|
+
* fields (an edit form's version column, navigation rows) are left as they
|
|
352
|
+
* are. The field subtree remounts (`remountKey`); touched state, submit and
|
|
353
|
+
* live errors are cleared; a server error (`errors`) is dismissed where the
|
|
354
|
+
* reset changed the value — on other paths, and the external `__form`
|
|
355
|
+
* banner, it stays. When `trackChanges` is enabled, the post-reset state
|
|
356
|
+
* becomes the new clean baseline.
|
|
345
357
|
*/
|
|
346
358
|
reset: () => Promise<void>;
|
|
347
359
|
/**
|
|
@@ -395,9 +407,10 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
395
407
|
*/
|
|
396
408
|
patch: AsFormPatchHandle | undefined;
|
|
397
409
|
/**
|
|
398
|
-
* Remount key for the field subtree. Bound as `:key` on the root `<AsField
|
|
399
|
-
*
|
|
400
|
-
*
|
|
410
|
+
* Remount key for the field subtree. Bound as `:key` on the root `<AsField>`
|
|
411
|
+
* (and on the pushed-down fields). Bumped by every `reset()`, and — with
|
|
412
|
+
* `trackChanges` — when `patch.rebaseOnto` or a swap of the data's `value`
|
|
413
|
+
* lands a different union variant, forcing the variant picker to re-detect.
|
|
401
414
|
*/
|
|
402
415
|
remountKey: Ref<number>;
|
|
403
416
|
/** Dispatch an action — invoked by `<AsAction>`. */
|
|
@@ -550,7 +563,11 @@ interface UseAsValueHelpReturn {
|
|
|
550
563
|
labelIsFkValue: ComputedRef<boolean>;
|
|
551
564
|
kickoff: () => Promise<void>;
|
|
552
565
|
selectItem: (item: Record<string, unknown>) => void;
|
|
553
|
-
|
|
566
|
+
/**
|
|
567
|
+
* Clear the picker: set the model to `value` (`undefined` — unset — when
|
|
568
|
+
* omitted) and empty the search text.
|
|
569
|
+
*/
|
|
570
|
+
clear: (value?: unknown) => void;
|
|
554
571
|
}
|
|
555
572
|
declare function useAsValueHelp(options: UseAsValueHelpOptions): UseAsValueHelpReturn;
|
|
556
573
|
//#endregion
|
|
@@ -1194,8 +1211,8 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1194
1211
|
path: string;
|
|
1195
1212
|
message: string;
|
|
1196
1213
|
}[]) => any) | undefined;
|
|
1197
|
-
onAction?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
|
|
1198
1214
|
onSubmit?: ((data: TAsFormValue<TFormData>) => any) | undefined;
|
|
1215
|
+
onAction?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
|
|
1199
1216
|
"onUnsupported-action"?: ((name: string, data: TAsFormValue<TFormData>) => any) | undefined;
|
|
1200
1217
|
onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TAsFormValue<TFormData>) => any) | undefined;
|
|
1201
1218
|
}> & (typeof globalThis extends {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
2
|
-
const require_as_input_control = require("./as-input-control-
|
|
3
|
-
const require_as_adornment_shell = require("./as-adornment-shell-
|
|
1
|
+
const require_as_field_shell = require("./as-field-shell-R8DyS1tc.cjs");
|
|
2
|
+
const require_as_input_control = require("./as-input-control-DAbaW7GG.cjs");
|
|
3
|
+
const require_as_adornment_shell = require("./as-adornment-shell-CmS9BOFm.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/components/defaults/as-input.vue
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
2
|
-
import { t as as_input_control_default } from "./as-input-control-
|
|
3
|
-
import { t as as_adornment_shell_default } from "./as-adornment-shell-
|
|
1
|
+
import { t as as_field_shell_default } from "./as-field-shell-DjYBbigs.mjs";
|
|
2
|
+
import { t as as_input_control_default } from "./as-input-control-B3h--Qe0.mjs";
|
|
3
|
+
import { t as as_adornment_shell_default } from "./as-adornment-shell-CBaksXGT.mjs";
|
|
4
4
|
import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, withCtx } from "vue";
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/components/defaults/as-input.vue
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as committedValue, t as committedText } from "./_shape-bdsPEB8P.mjs";
|
|
2
|
+
import { computed, createElementBlock, defineComponent, openBlock, vModelDynamic, vModelText, withDirectives } from "vue";
|
|
2
3
|
//#region src/components/internal/as-input-control.vue?vue&type=script&setup=true&lang.ts
|
|
3
4
|
const _hoisted_1 = [
|
|
4
5
|
"id",
|
|
@@ -225,6 +226,17 @@ var as_input_control_default = /* @__PURE__ */ defineComponent({
|
|
|
225
226
|
setup(__props) {
|
|
226
227
|
const props = __props;
|
|
227
228
|
/**
|
|
229
|
+
* The model as the input edits it. Emptied, the input commits `undefined` on
|
|
230
|
+
* an optional field; on a required one `""`, or `null` for the native number
|
|
231
|
+
* input (AsNumber without adornments) — the rule of the other number inputs.
|
|
232
|
+
*/
|
|
233
|
+
const inputModel = computed({
|
|
234
|
+
get: () => props.model.value,
|
|
235
|
+
set: (v) => {
|
|
236
|
+
props.model.value = v === "" && props.type === "number" ? committedValue(null, props.optional) : committedText(v, props.optional);
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
/**
|
|
228
240
|
* UX polish — numeric inputs select-all on focus so the next keystroke
|
|
229
241
|
* replaces the existing value. Skipped for text/password/textarea where
|
|
230
242
|
* the cursor-at-position behaviour is expected (clicking inside a long
|
|
@@ -239,7 +251,7 @@ var as_input_control_default = /* @__PURE__ */ defineComponent({
|
|
|
239
251
|
return __props.type === "textarea" ? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
240
252
|
key: 0,
|
|
241
253
|
id: __props.inputId,
|
|
242
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
254
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputModel.value = $event),
|
|
243
255
|
onBlur: _cache[1] || (_cache[1] = (...args) => __props.onBlur && __props.onBlur(...args)),
|
|
244
256
|
placeholder: __props.placeholder,
|
|
245
257
|
name: __props.name,
|
|
@@ -250,10 +262,10 @@ var as_input_control_default = /* @__PURE__ */ defineComponent({
|
|
|
250
262
|
"aria-invalid": !!__props.error || void 0,
|
|
251
263
|
"aria-describedby": __props.ariaDescribedBy,
|
|
252
264
|
"aria-label": !__props.label ? __props.name : void 0
|
|
253
|
-
}, null, 40, _hoisted_1)), [[vModelText,
|
|
265
|
+
}, null, 40, _hoisted_1)), [[vModelText, inputModel.value]]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
254
266
|
key: 1,
|
|
255
267
|
id: __props.inputId,
|
|
256
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) =>
|
|
268
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => inputModel.value = $event),
|
|
257
269
|
onFocus,
|
|
258
270
|
onBlur: _cache[3] || (_cache[3] = (...args) => __props.onBlur && __props.onBlur(...args)),
|
|
259
271
|
placeholder: __props.placeholder,
|
|
@@ -266,7 +278,7 @@ var as_input_control_default = /* @__PURE__ */ defineComponent({
|
|
|
266
278
|
"aria-invalid": !!__props.error || void 0,
|
|
267
279
|
"aria-describedby": __props.ariaDescribedBy,
|
|
268
280
|
"aria-label": !__props.label ? __props.name : void 0
|
|
269
|
-
}, null, 40, _hoisted_2)), [[vModelDynamic,
|
|
281
|
+
}, null, 40, _hoisted_2)), [[vModelDynamic, inputModel.value]]);
|
|
270
282
|
};
|
|
271
283
|
}
|
|
272
284
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const require__shape = require("./_shape-C-TxQCFa.cjs");
|
|
1
2
|
let vue = require("vue");
|
|
2
3
|
//#region src/components/internal/as-input-control.vue?vue&type=script&setup=true&lang.ts
|
|
3
4
|
const _hoisted_1 = [
|
|
@@ -225,6 +226,17 @@ var as_input_control_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
225
226
|
setup(__props) {
|
|
226
227
|
const props = __props;
|
|
227
228
|
/**
|
|
229
|
+
* The model as the input edits it. Emptied, the input commits `undefined` on
|
|
230
|
+
* an optional field; on a required one `""`, or `null` for the native number
|
|
231
|
+
* input (AsNumber without adornments) — the rule of the other number inputs.
|
|
232
|
+
*/
|
|
233
|
+
const inputModel = (0, vue.computed)({
|
|
234
|
+
get: () => props.model.value,
|
|
235
|
+
set: (v) => {
|
|
236
|
+
props.model.value = v === "" && props.type === "number" ? require__shape.committedValue(null, props.optional) : require__shape.committedText(v, props.optional);
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
/**
|
|
228
240
|
* UX polish — numeric inputs select-all on focus so the next keystroke
|
|
229
241
|
* replaces the existing value. Skipped for text/password/textarea where
|
|
230
242
|
* the cursor-at-position behaviour is expected (clicking inside a long
|
|
@@ -239,7 +251,7 @@ var as_input_control_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
239
251
|
return __props.type === "textarea" ? (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("textarea", {
|
|
240
252
|
key: 0,
|
|
241
253
|
id: __props.inputId,
|
|
242
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
254
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputModel.value = $event),
|
|
243
255
|
onBlur: _cache[1] || (_cache[1] = (...args) => __props.onBlur && __props.onBlur(...args)),
|
|
244
256
|
placeholder: __props.placeholder,
|
|
245
257
|
name: __props.name,
|
|
@@ -250,10 +262,10 @@ var as_input_control_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
250
262
|
"aria-invalid": !!__props.error || void 0,
|
|
251
263
|
"aria-describedby": __props.ariaDescribedBy,
|
|
252
264
|
"aria-label": !__props.label ? __props.name : void 0
|
|
253
|
-
}, null, 40, _hoisted_1)), [[vue.vModelText,
|
|
265
|
+
}, null, 40, _hoisted_1)), [[vue.vModelText, inputModel.value]]) : (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("input", {
|
|
254
266
|
key: 1,
|
|
255
267
|
id: __props.inputId,
|
|
256
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) =>
|
|
268
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => inputModel.value = $event),
|
|
257
269
|
onFocus,
|
|
258
270
|
onBlur: _cache[3] || (_cache[3] = (...args) => __props.onBlur && __props.onBlur(...args)),
|
|
259
271
|
placeholder: __props.placeholder,
|
|
@@ -266,7 +278,7 @@ var as_input_control_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
266
278
|
"aria-invalid": !!__props.error || void 0,
|
|
267
279
|
"aria-describedby": __props.ariaDescribedBy,
|
|
268
280
|
"aria-label": !__props.label ? __props.name : void 0
|
|
269
|
-
}, null, 40, _hoisted_2)), [[vue.vModelDynamic,
|
|
281
|
+
}, null, 40, _hoisted_2)), [[vue.vModelDynamic, inputModel.value]]);
|
|
270
282
|
};
|
|
271
283
|
}
|
|
272
284
|
});
|
package/dist/as-input.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_input = require("./as-input-
|
|
1
|
+
const require_as_input = require("./as-input-C1Iw2AkY.cjs");
|
|
2
2
|
module.exports = require_as_input.as_input_default;
|
package/dist/as-input.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-input.vue-
|
|
1
|
+
import { t as _default } from "./as-input.vue-BiPsULeF.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-input.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_input_default } from "./as-input-
|
|
1
|
+
import { t as as_input_default } from "./as-input-MVamvBMv.mjs";
|
|
2
2
|
export { as_input_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_form_context = require("./use-form-context-
|
|
2
|
-
const require_as_field = require("./as-field-
|
|
1
|
+
const require_use_form_context = require("./use-form-context-DxcGtsex.cjs");
|
|
2
|
+
const require_as_field = require("./as-field-gBXYA3zZ.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_ui = require("@atscript/ui");
|
|
5
5
|
//#region src/composables/use-as-level.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as PATH_PREFIX_KEY, h as LEVEL_KEY } from "./use-form-context-
|
|
2
|
-
import { t as as_field_default } from "./as-field-
|
|
1
|
+
import { _ as PATH_PREFIX_KEY, h as LEVEL_KEY } from "./use-form-context-B1-J096b.mjs";
|
|
2
|
+
import { t as as_field_default } from "./as-field-CUIvj5hx.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createElementBlock, defineComponent, inject, openBlock, provide, renderList } from "vue";
|
|
4
4
|
import { joinPath } from "@atscript/ui";
|
|
5
5
|
//#region src/composables/use-as-level.ts
|
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-B7h3xaKQ.cjs");
|
|
2
2
|
module.exports = require_as_iterator.as_iterator_default;
|
package/dist/as-iterator.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-iterator.vue-
|
|
1
|
+
import { t as _default } from "./as-iterator.vue-BUCohjxw.mjs";
|
|
2
2
|
export { _default as 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-BTcoyKFq.mjs";
|
|
2
2
|
export { as_iterator_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as useAsTexts } from "./use-as-locale-BEzm7jbp.mjs";
|
|
2
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
2
|
+
import { t as as_field_shell_default } from "./as-field-shell-DjYBbigs.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderList, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
4
4
|
import { hasFieldMeta, optKey, optLabel, optionValue } from "@atscript/ui";
|
|
5
5
|
import { ComboboxAnchor, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxPortal, ComboboxRoot, ComboboxViewport, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText, TagsInputRoot } from "reka-ui";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_use_as_locale = require("./use-as-locale-CnNyyqcF.cjs");
|
|
2
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
2
|
+
const require_as_field_shell = require("./as-field-shell-R8DyS1tc.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_ui = require("@atscript/ui");
|
|
5
5
|
let reka_ui = require("reka-ui");
|
package/dist/as-multi-select.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_multi_select = require("./as-multi-select-
|
|
1
|
+
const require_as_multi_select = require("./as-multi-select-DDNIusOV.cjs");
|
|
2
2
|
module.exports = require_as_multi_select.as_multi_select_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-multi-select.vue-
|
|
1
|
+
import { t as _default } from "./as-multi-select.vue-Bmngkww7.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-multi-select.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_multi_select_default } from "./as-multi-select-
|
|
1
|
+
import { t as as_multi_select_default } from "./as-multi-select-BQZvt3Fr.mjs";
|
|
2
2
|
export { as_multi_select_default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_use_as_locale = require("./use-as-locale-CnNyyqcF.cjs");
|
|
2
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
2
|
+
const require_as_field_shell = require("./as-field-shell-R8DyS1tc.cjs");
|
|
3
|
+
const require__shape = require("./_shape-C-TxQCFa.cjs");
|
|
4
|
+
const require_as_input_control = require("./as-input-control-DAbaW7GG.cjs");
|
|
5
5
|
let vue = require("vue");
|
|
6
6
|
let _atscript_ui = require("@atscript/ui");
|
|
7
7
|
//#region src/composables/use-as-number.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as useAsLocale } from "./use-as-locale-BEzm7jbp.mjs";
|
|
2
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
2
|
+
import { t as as_field_shell_default } from "./as-field-shell-DjYBbigs.mjs";
|
|
3
|
+
import { n as committedValue } from "./_shape-bdsPEB8P.mjs";
|
|
4
|
+
import { t as as_input_control_default } from "./as-input-control-B3h--Qe0.mjs";
|
|
5
5
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, ref, toDisplayString, withCtx } from "vue";
|
|
6
6
|
import { getDecimalSeparator, parseDecimalInput } from "@atscript/ui";
|
|
7
7
|
//#region src/composables/use-as-number.ts
|
package/dist/as-number.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_number = require("./as-number-
|
|
1
|
+
const require_as_number = require("./as-number-BUid7j2k.cjs");
|
|
2
2
|
module.exports = require_as_number.as_number_default;
|
package/dist/as-number.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-number.vue-
|
|
1
|
+
import { t as _default } from "./as-number.vue-C2QSKpVL.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-number.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_number_default } from "./as-number-
|
|
1
|
+
import { t as as_number_default } from "./as-number-CT3DSCBF.mjs";
|
|
2
2
|
export { as_number_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_use_form_context = require("./use-form-context-
|
|
1
|
+
const require_use_form_context = require("./use-form-context-DxcGtsex.cjs");
|
|
2
2
|
const require_use_as_locale = require("./use-as-locale-CnNyyqcF.cjs");
|
|
3
|
-
const require_as_iterator = require("./as-iterator-
|
|
4
|
-
const require_as_collapsible = require("./as-collapsible-
|
|
5
|
-
const require_as_variant_picker = require("./as-variant-picker-
|
|
6
|
-
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-
|
|
3
|
+
const require_as_iterator = require("./as-iterator-B7h3xaKQ.cjs");
|
|
4
|
+
const require_as_collapsible = require("./as-collapsible-D3UhCddg.cjs");
|
|
5
|
+
const require_as_variant_picker = require("./as-variant-picker-LRFryLRJ.cjs");
|
|
6
|
+
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-C7f0blhC.cjs");
|
|
7
7
|
let vue = require("vue");
|
|
8
8
|
let _atscript_ui = require("@atscript/ui");
|
|
9
9
|
//#region src/components/defaults/as-object.vue?vue&type=script&setup=true&lang.ts
|