@atscript/vue-form 0.1.195 → 0.1.197
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-action.d.cts +1 -1
- package/dist/as-action.d.mts +1 -1
- package/dist/{as-action.vue-DW10afXf.d.cts → as-action.vue-Cz7I0w6k.d.mts} +1 -1
- package/dist/{as-action.vue-FAmO9MMw.d.mts → as-action.vue-CzG-4mHk.d.cts} +1 -1
- package/dist/{as-array-CRIAxARI.mjs → as-array-DU84P1VU.mjs} +2 -2
- package/dist/{as-array-CCMxWRC5.cjs → as-array-X_bXvloD.cjs} +2 -2
- package/dist/as-array.cjs +1 -1
- package/dist/as-array.d.cts +1 -1
- package/dist/as-array.d.mts +1 -1
- package/dist/as-array.mjs +1 -1
- package/dist/{as-array.vue-DetU1gZz.d.cts → as-array.vue-BspRfMHl.d.cts} +1 -1
- package/dist/{as-array.vue-Q8eE5Ut1.d.mts → as-array.vue-DTrR21eK.d.mts} +1 -1
- package/dist/{as-checkbox-Dg4CqOYy.cjs → as-checkbox-DHe7ow33.cjs} +1 -1
- package/dist/{as-checkbox-BKQPJbiW.mjs → as-checkbox-Dcl1hwmW.mjs} +1 -1
- package/dist/as-checkbox.cjs +1 -1
- package/dist/as-checkbox.d.cts +1 -1
- package/dist/as-checkbox.d.mts +1 -1
- package/dist/as-checkbox.mjs +1 -1
- package/dist/{as-checkbox.vue-BCZqbPZs.d.cts → as-checkbox.vue-CcifJWeG.d.mts} +1 -1
- package/dist/{as-checkbox.vue-D3PPVWiS.d.mts → as-checkbox.vue-CliEtXzy.d.cts} +1 -1
- package/dist/{as-collapsible-uMubiaTj.mjs → as-collapsible-Cq4JQZo8.mjs} +1 -1
- package/dist/{as-collapsible-BL8JzLzV.cjs → as-collapsible-DBVrSPb1.cjs} +1 -1
- package/dist/as-collapsible.cjs +1 -1
- package/dist/as-collapsible.d.cts +1 -1
- package/dist/as-collapsible.d.mts +1 -1
- package/dist/as-collapsible.mjs +1 -1
- package/dist/{as-collapsible.vue-Bxenwlh8.d.cts → as-collapsible.vue-DmfY2xZi.d.mts} +1 -1
- package/dist/{as-collapsible.vue-lYcXVC_E.d.mts → as-collapsible.vue-c4kJaqr8.d.cts} +1 -1
- package/dist/{as-date-BKR1O5BR.cjs → as-date-CzpK7FFU.cjs} +1 -1
- package/dist/{as-date-BoBkff96.mjs → as-date-DJC3ll7B.mjs} +1 -1
- package/dist/as-date.cjs +1 -1
- package/dist/as-date.d.cts +1 -1
- package/dist/as-date.d.mts +1 -1
- package/dist/as-date.mjs +1 -1
- package/dist/{as-date.vue-ByntHQIq.d.mts → as-date.vue-DlZIPl1M.d.cts} +1 -1
- package/dist/{as-date.vue-CS14s3fE.d.cts → as-date.vue-HBqgKpbV.d.mts} +1 -1
- package/dist/{as-datetime-Ci3H4Fjy.mjs → as-datetime-Bk__Ct69.mjs} +1 -1
- package/dist/{as-datetime-DH5tE6dB.cjs → as-datetime-CU2pYPsb.cjs} +1 -1
- package/dist/as-datetime.cjs +1 -1
- package/dist/as-datetime.d.cts +1 -1
- package/dist/as-datetime.d.mts +1 -1
- package/dist/as-datetime.mjs +1 -1
- package/dist/{as-datetime.vue-B-O9jSjL.d.mts → as-datetime.vue-BOewNSCq.d.mts} +1 -1
- package/dist/{as-datetime.vue-BJAZj8Pi.d.cts → as-datetime.vue-CTkKY2Cc.d.cts} +1 -1
- package/dist/{as-decimal-BuvchyCs.cjs → as-decimal-B6MeEFmb.cjs} +1 -1
- package/dist/{as-decimal-CseZXB7F.mjs → as-decimal-BAiy9Cjz.mjs} +1 -1
- package/dist/as-decimal.cjs +1 -1
- package/dist/as-decimal.d.cts +1 -1
- package/dist/as-decimal.d.mts +1 -1
- package/dist/as-decimal.mjs +1 -1
- package/dist/{as-decimal.vue-CQXnsDs9.d.mts → as-decimal.vue-C6SpdtjD.d.cts} +1 -1
- package/dist/{as-decimal.vue-F9YMotuz.d.cts → as-decimal.vue-DmjoBpWm.d.mts} +1 -1
- package/dist/{as-field-shell-CSxqm12l.mjs → as-field-shell-DfPH23qM.mjs} +1 -1
- package/dist/{as-field-shell-P7p47Pbr.cjs → as-field-shell-DoVSv3X2.cjs} +1 -1
- package/dist/as-field-shell.cjs +1 -1
- package/dist/as-field-shell.d.cts +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-CQSSK4hh.d.mts → as-field-shell.vue-Cypm-sNO.d.mts} +1 -1
- package/dist/{as-field-shell.vue-DsYdUv7b.d.cts → as-field-shell.vue-DHIauZOI.d.cts} +1 -1
- package/dist/{as-form-BYi1rubO.mjs → as-form-CzMK2vTB.mjs} +52 -22
- package/dist/{as-form-rI4daFP2.cjs → as-form-plSsUeFk.cjs} +51 -21
- 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-C7yj7eRt.d.cts → as-form.vue-CHV8k7wP.d.cts} +9 -2
- package/dist/{as-form.vue-xvFFkRdo.d.mts → as-form.vue-sPeXmeeF.d.mts} +9 -2
- package/dist/{as-input-DVeDzKkd.mjs → as-input-Dl7R32s4.mjs} +1 -1
- package/dist/{as-input-DNIY5kGw.cjs → as-input-Wf71dw3g.cjs} +1 -1
- package/dist/as-input.cjs +1 -1
- package/dist/as-input.d.cts +1 -1
- package/dist/as-input.d.mts +1 -1
- package/dist/as-input.mjs +1 -1
- package/dist/{as-input.vue-BE5H25Xa.d.mts → as-input.vue-CTeXkWxQ.d.mts} +1 -1
- package/dist/{as-input.vue-DsSCA6KN.d.cts → as-input.vue-D-cM4wBe.d.cts} +1 -1
- package/dist/{as-multi-select-CXFofdQ1.cjs → as-multi-select-BoWBD88H.cjs} +1 -1
- package/dist/{as-multi-select-CkMSlX1e.mjs → as-multi-select-CaBpEOU2.mjs} +1 -1
- package/dist/as-multi-select.cjs +1 -1
- package/dist/as-multi-select.d.cts +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-BDt4AtNm.d.mts → as-multi-select.vue-CvZHtvck.d.cts} +1 -1
- package/dist/{as-multi-select.vue-CpuSkukC.d.cts → as-multi-select.vue-DVSSEboS.d.mts} +1 -1
- package/dist/{as-number-BwzyMxl4.cjs → as-number-BxcjlrtO.cjs} +1 -1
- package/dist/{as-number-mQHbJDoh.mjs → as-number-CQ6W7cEP.mjs} +1 -1
- package/dist/as-number.cjs +1 -1
- package/dist/as-number.d.cts +1 -1
- package/dist/as-number.d.mts +1 -1
- package/dist/as-number.mjs +1 -1
- package/dist/{as-number.vue-89e-jfVe.d.cts → as-number.vue-7XSQA1oV.d.cts} +1 -1
- package/dist/{as-number.vue-CCTMDQYH.d.mts → as-number.vue-CEcDCyhs.d.mts} +1 -1
- package/dist/{as-object-DiMUc4A3.mjs → as-object-C8ddVjjZ.mjs} +2 -2
- package/dist/{as-object-CXzKbkhV.cjs → as-object-CRZ8MzXq.cjs} +2 -2
- package/dist/as-object.cjs +1 -1
- package/dist/as-object.d.cts +1 -1
- package/dist/as-object.d.mts +1 -1
- package/dist/as-object.mjs +1 -1
- package/dist/{as-object.vue-CVpEmBqS.d.mts → as-object.vue-eoznJfgx.d.mts} +1 -1
- package/dist/{as-object.vue-tIaVshqY.d.cts → as-object.vue-l5nTngPG.d.cts} +1 -1
- package/dist/as-paragraph.d.cts +1 -1
- package/dist/as-paragraph.d.mts +1 -1
- package/dist/{as-paragraph.vue-BUdQBjDf.d.cts → as-paragraph.vue-BRByQ1K4.d.cts} +1 -1
- package/dist/{as-paragraph.vue-CS_GUIlF.d.mts → as-paragraph.vue-CwNr9kox.d.mts} +1 -1
- package/dist/{as-radio-DQO5uQL3.cjs → as-radio-CjZST1ug.cjs} +1 -1
- package/dist/{as-radio-C5mVvsVH.mjs → as-radio-gmYSDmA0.mjs} +1 -1
- package/dist/as-radio.cjs +1 -1
- package/dist/as-radio.d.cts +1 -1
- package/dist/as-radio.d.mts +1 -1
- package/dist/as-radio.mjs +1 -1
- package/dist/{as-radio.vue-BcTgNQsc.d.mts → as-radio.vue-CmOKjYGn.d.cts} +1 -1
- package/dist/{as-radio.vue-BmmP8H-m.d.cts → as-radio.vue-rTZDD-Um.d.mts} +1 -1
- package/dist/{as-ref-BWcpK0lg.mjs → as-ref-BBfZbvOd.mjs} +1 -1
- package/dist/{as-ref-DctAXQ2K.cjs → as-ref-DemuzDv8.cjs} +1 -1
- package/dist/as-ref.cjs +1 -1
- package/dist/as-ref.d.cts +1 -1
- package/dist/as-ref.d.mts +1 -1
- package/dist/as-ref.mjs +1 -1
- package/dist/{as-ref.vue-DZeTp8EO.d.cts → as-ref.vue-C1Qg56oh.d.cts} +1 -1
- package/dist/{as-ref.vue-Gwv8EEKY.d.mts → as-ref.vue-CRUzXTRQ.d.mts} +1 -1
- package/dist/{as-select-B_ZB1_a5.cjs → as-select-BhJDP5e1.cjs} +1 -1
- package/dist/{as-select-C1lqeKqt.mjs → as-select-Dvhdd605.mjs} +1 -1
- package/dist/as-select.cjs +1 -1
- package/dist/as-select.d.cts +1 -1
- package/dist/as-select.d.mts +1 -1
- package/dist/as-select.mjs +1 -1
- package/dist/{as-select.vue-BMNGb5eH.d.mts → as-select.vue-DlQ93_AO.d.cts} +1 -1
- package/dist/{as-select.vue-C3NvSQ2N.d.cts → as-select.vue-DnfV-12W.d.mts} +1 -1
- package/dist/{as-time-D9VTZzsD.mjs → as-time-CNJj5Jja.mjs} +1 -1
- package/dist/{as-time-D7oluFpZ.cjs → as-time-DLWM1tBe.cjs} +1 -1
- package/dist/as-time.cjs +1 -1
- package/dist/as-time.d.cts +1 -1
- package/dist/as-time.d.mts +1 -1
- package/dist/as-time.mjs +1 -1
- package/dist/{as-time.vue-CcEfdWI8.d.cts → as-time.vue-DAuXlrGs.d.cts} +1 -1
- package/dist/{as-time.vue-Dc5ruv4m.d.mts → as-time.vue-PRLKRy84.d.mts} +1 -1
- package/dist/{as-tuple-CajPk-6G.mjs → as-tuple-C5bsIyck.mjs} +2 -2
- package/dist/{as-tuple-CGmi17XX.cjs → as-tuple-DkbGVtTZ.cjs} +2 -2
- package/dist/as-tuple.cjs +1 -1
- package/dist/as-tuple.d.cts +1 -1
- package/dist/as-tuple.d.mts +1 -1
- package/dist/as-tuple.mjs +1 -1
- package/dist/{as-tuple.vue-Cyzfh6Z0.d.mts → as-tuple.vue-Chqi1IO6.d.mts} +1 -1
- package/dist/{as-tuple.vue-DzC4tINc.d.cts → as-tuple.vue-DEL4sOwq.d.cts} +1 -1
- package/dist/{as-union-Cy7zefJl.mjs → as-union-5oOye2iv.mjs} +1 -1
- package/dist/{as-union-CvSnU1YB.cjs → as-union-Br5-t5Co.cjs} +1 -1
- package/dist/as-union.cjs +1 -1
- package/dist/as-union.d.cts +1 -1
- package/dist/as-union.d.mts +1 -1
- package/dist/as-union.mjs +1 -1
- package/dist/{as-union.vue-CvN-SR9q.d.cts → as-union.vue-BCdmqdYk.d.mts} +1 -1
- package/dist/{as-union.vue-CwNJYhKj.d.mts → as-union.vue-CKGLn4ni.d.cts} +1 -1
- package/dist/{focus-after-toggle-B8DDrJ7d.cjs → focus-after-toggle-BhZGqrUK.cjs} +1 -1
- package/dist/{focus-after-toggle-CWw0i0B6.mjs → focus-after-toggle-DAwak7c1.mjs} +1 -1
- package/dist/index.cjs +20 -20
- package/dist/index.d.cts +21 -21
- package/dist/index.d.mts +21 -21
- package/dist/index.mjs +20 -20
- package/dist/{types-COv2t_de.d.cts → types-BmF8iDTN.d.cts} +23 -2
- package/dist/{types-DSXbJndw.d.mts → types-ChQuWLmd.d.mts} +23 -2
- package/dist/{use-as-optional-add-flow-CdnxNOUT.mjs → use-as-optional-add-flow-C1Ol6KO2.mjs} +1 -1
- package/dist/{use-as-optional-add-flow-B7Pp6r-k.cjs → use-as-optional-add-flow-DMDd4Ms0.cjs} +1 -1
- package/package.json +10 -10
|
@@ -289,6 +289,18 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
289
289
|
* focused element.
|
|
290
290
|
*/
|
|
291
291
|
reset: () => Promise<void>;
|
|
292
|
+
/**
|
|
293
|
+
* Discard unsaved edits: return the form's fields to the change-tracking
|
|
294
|
+
* baseline — the loaded data, or what the last `reset()`, `patch.rebase()`,
|
|
295
|
+
* `patch.rebaseOnto(upstream)` or clean swap of the data's `value` made the
|
|
296
|
+
* baseline. Otherwise like {@link reset} (fields only, remount, error
|
|
297
|
+
* clearing, focus), except that no `resetValue` is written and the baseline
|
|
298
|
+
* stays, so the form is clean afterwards. Without `trackChanges`, or before
|
|
299
|
+
* real data has arrived, it does nothing.
|
|
300
|
+
*
|
|
301
|
+
* @since 0.1.196
|
|
302
|
+
*/
|
|
303
|
+
revert: () => Promise<void>;
|
|
292
304
|
/**
|
|
293
305
|
* Imperatively clear ALL error state: per-field (touched / blur / submit /
|
|
294
306
|
* external via `useAsState().clearErrors`) plus the form-level submit-time
|
|
@@ -323,7 +335,8 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
323
335
|
loading: boolean;
|
|
324
336
|
submitText: string;
|
|
325
337
|
submit: () => TAsFormSubmitResult<TFormData>;
|
|
326
|
-
reset: () => Promise<void>;
|
|
338
|
+
reset: () => Promise<void>; /** Fields back to the change-tracking baseline (a no-op when tracking is off). */
|
|
339
|
+
revert: () => Promise<void>;
|
|
327
340
|
clearErrors: () => void;
|
|
328
341
|
setErrors: (errors: Record<string, string>) => void;
|
|
329
342
|
dismissError: (path: string) => void;
|
|
@@ -342,7 +355,7 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
342
355
|
patch: AsFormPatchHandle | undefined;
|
|
343
356
|
/**
|
|
344
357
|
* Remount key for the field subtree. Bound as `:key` on the root `<AsField>`
|
|
345
|
-
* (and on the pushed-down fields). Bumped by every `reset()`, and — with
|
|
358
|
+
* (and on the pushed-down fields). Bumped by every `reset()` / `revert()`, and — with
|
|
346
359
|
* `trackChanges` — when `patch.rebaseOnto` or a swap of the data's `value`
|
|
347
360
|
* lands a different union variant, forcing the variant picker to re-detect.
|
|
348
361
|
*/
|
|
@@ -722,6 +735,14 @@ interface AsFormExposed<TFormData = any> extends Pick<AsFormPatchHandle, "getPat
|
|
|
722
735
|
action: (name: string) => void;
|
|
723
736
|
/** Return the fields to a new form's values and clear all errors (also re-baselines change tracking). */
|
|
724
737
|
reset: () => Promise<void>;
|
|
738
|
+
/**
|
|
739
|
+
* Discard unsaved edits: return the fields to the change-tracking baseline
|
|
740
|
+
* (the loaded data, or the last `rebase()` / `rebaseOnto()`) and clear their
|
|
741
|
+
* errors, as `reset()` does. Does nothing when `track-changes` is off.
|
|
742
|
+
*
|
|
743
|
+
* @since 0.1.196
|
|
744
|
+
*/
|
|
745
|
+
revert: () => Promise<void>;
|
|
725
746
|
/** Clear all error state (per-field and the submit-time map behind the badges). */
|
|
726
747
|
clearErrors: () => void;
|
|
727
748
|
/** Set error messages by path (e.g. mapping a server 400). */
|
package/dist/{use-as-optional-add-flow-CdnxNOUT.mjs → use-as-optional-add-flow-C1Ol6KO2.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as focusNewFocusableAfter } from "./focus-after-toggle-
|
|
1
|
+
import { n as focusNewFocusableAfter } from "./focus-after-toggle-DAwak7c1.mjs";
|
|
2
2
|
import { i as useAsNestedSectionsStore } from "./use-as-nested-sections-store-CkrMJbnN.mjs";
|
|
3
3
|
//#region src/composables/use-as-optional-add-flow.ts
|
|
4
4
|
/**
|
package/dist/{use-as-optional-add-flow-B7Pp6r-k.cjs → use-as-optional-add-flow-DMDd4Ms0.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_focus_after_toggle = require("./focus-after-toggle-
|
|
1
|
+
const require_focus_after_toggle = require("./focus-after-toggle-BhZGqrUK.cjs");
|
|
2
2
|
const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-ApstV9NL.cjs");
|
|
3
3
|
//#region src/composables/use-as-optional-add-flow.ts
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/vue-form",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.197",
|
|
4
4
|
"description": "Type-driven form rendering for Atscript with Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -165,27 +165,27 @@
|
|
|
165
165
|
"access": "public"
|
|
166
166
|
},
|
|
167
167
|
"dependencies": {
|
|
168
|
-
"@atscript/ui
|
|
169
|
-
"@atscript/ui": "^0.1.
|
|
168
|
+
"@atscript/ui": "^0.1.197",
|
|
169
|
+
"@atscript/ui-fns": "^0.1.197"
|
|
170
170
|
},
|
|
171
171
|
"devDependencies": {
|
|
172
|
-
"@atscript/core": "^0.2.
|
|
173
|
-
"@atscript/db-client": "^0.1.
|
|
174
|
-
"@atscript/typescript": "^0.2.
|
|
172
|
+
"@atscript/core": "^0.2.27",
|
|
173
|
+
"@atscript/db-client": "^0.1.202",
|
|
174
|
+
"@atscript/typescript": "^0.2.27",
|
|
175
175
|
"@tsdown/css": "^0.21.4",
|
|
176
176
|
"@vitejs/plugin-vue": "^6",
|
|
177
177
|
"@vue/test-utils": "^2",
|
|
178
178
|
"happy-dom": "^18",
|
|
179
179
|
"reka-ui": "^2.9.8",
|
|
180
|
-
"unplugin-atscript": "^0.2.
|
|
180
|
+
"unplugin-atscript": "^0.2.27",
|
|
181
181
|
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
|
|
182
182
|
"vue": "^3",
|
|
183
183
|
"vue-tsc": "~3.2.9",
|
|
184
|
-
"vunor": "^0.4.
|
|
184
|
+
"vunor": "^0.4.6"
|
|
185
185
|
},
|
|
186
186
|
"peerDependencies": {
|
|
187
|
-
"@atscript/db-client": "^0.1.
|
|
188
|
-
"@atscript/typescript": "^0.2.
|
|
187
|
+
"@atscript/db-client": "^0.1.202",
|
|
188
|
+
"@atscript/typescript": "^0.2.27",
|
|
189
189
|
"reka-ui": "^2.9.8",
|
|
190
190
|
"vue": "^3"
|
|
191
191
|
},
|