@atscript/vue-form 0.1.103 → 0.1.104

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.
Files changed (185) hide show
  1. package/dist/{as-action-lLooKipk.cjs → as-action-B712j9xf.cjs} +4 -0
  2. package/dist/{as-action-BoZtbaXt.mjs → as-action-CCjN5EFP.mjs} +4 -0
  3. package/dist/as-action.cjs +1 -1
  4. package/dist/as-action.d.cts +1 -1
  5. package/dist/as-action.d.mts +1 -1
  6. package/dist/as-action.mjs +1 -1
  7. package/dist/{as-action.vue-BCbopk0S.d.cts → as-action.vue-BL8_a0fE.d.cts} +1 -1
  8. package/dist/{as-action.vue-BtQX09n-.d.mts → as-action.vue-CcOPK2qI.d.mts} +1 -1
  9. package/dist/{as-array-4rQYVD9_.mjs → as-array-BGG38Y1L.mjs} +5 -1
  10. package/dist/{as-array-C6tCzZir.cjs → as-array-DVc9_ood.cjs} +5 -1
  11. package/dist/as-array.cjs +1 -1
  12. package/dist/as-array.d.cts +1 -1
  13. package/dist/as-array.d.mts +1 -1
  14. package/dist/as-array.mjs +1 -1
  15. package/dist/{as-array.vue-Ci4xO292.d.cts → as-array.vue-Be1tDTdH.d.cts} +1 -1
  16. package/dist/{as-array.vue-I42wuF6e.d.mts → as-array.vue-CtBBY2gF.d.mts} +1 -1
  17. package/dist/{as-checkbox-C3i6ZmRk.mjs → as-checkbox-DwLRHmXj.mjs} +5 -1
  18. package/dist/{as-checkbox-oxG8_Isu.cjs → as-checkbox-sgF16SuJ.cjs} +5 -1
  19. package/dist/as-checkbox.cjs +1 -1
  20. package/dist/as-checkbox.d.cts +1 -1
  21. package/dist/as-checkbox.d.mts +1 -1
  22. package/dist/as-checkbox.mjs +1 -1
  23. package/dist/{as-checkbox.vue-BoY72SV8.d.mts → as-checkbox.vue-B6zk5IbU.d.cts} +1 -1
  24. package/dist/{as-checkbox.vue-DqIm0ms2.d.cts → as-checkbox.vue-CXpsn_WG.d.mts} +1 -1
  25. package/dist/as-collapsible.d.cts +1 -18
  26. package/dist/as-collapsible.d.mts +1 -19
  27. package/dist/as-collapsible.vue-34S3TEq5.d.cts +20 -0
  28. package/dist/as-collapsible.vue-CIfMlTQ6.d.mts +20 -0
  29. package/dist/{as-date-BfISLr-e.mjs → as-date-CfCa2Kp1.mjs} +6 -2
  30. package/dist/{as-date-C7pJIpe-.cjs → as-date-hCCTd52o.cjs} +6 -2
  31. package/dist/as-date.cjs +1 -1
  32. package/dist/as-date.d.cts +1 -1
  33. package/dist/as-date.d.mts +1 -1
  34. package/dist/as-date.mjs +1 -1
  35. package/dist/{as-date.vue-BfSVrED7.d.mts → as-date.vue-BZiy1s5s.d.cts} +1 -1
  36. package/dist/{as-date.vue-SdlJH5fn.d.cts → as-date.vue-DWWoojir.d.mts} +1 -1
  37. package/dist/{as-datetime-F3In2A6l.mjs → as-datetime-B1I_zREk.mjs} +6 -2
  38. package/dist/{as-datetime-DFTI8Wcr.cjs → as-datetime-DDlWca2Q.cjs} +6 -2
  39. package/dist/as-datetime.cjs +1 -1
  40. package/dist/as-datetime.d.cts +1 -1
  41. package/dist/as-datetime.d.mts +1 -1
  42. package/dist/as-datetime.mjs +1 -1
  43. package/dist/{as-datetime.vue-B47V1siL.d.mts → as-datetime.vue-DYEHokj_.d.cts} +1 -1
  44. package/dist/{as-datetime.vue-DUp_TDOW.d.cts → as-datetime.vue-NblA-SVE.d.mts} +1 -1
  45. package/dist/{as-decimal-DIO8bD2Y.mjs → as-decimal-CQM5OfqB.mjs} +5 -1
  46. package/dist/{as-decimal-CJAHWYjW.cjs → as-decimal-DM10ycwv.cjs} +5 -1
  47. package/dist/as-decimal.cjs +1 -1
  48. package/dist/as-decimal.d.cts +1 -1
  49. package/dist/as-decimal.d.mts +1 -1
  50. package/dist/as-decimal.mjs +1 -1
  51. package/dist/{as-decimal.vue-Bhq4C1Ix.d.cts → as-decimal.vue-BoNNIhbL.d.mts} +1 -1
  52. package/dist/{as-decimal.vue-DitPZpS_.d.mts → as-decimal.vue-D3eGMvC0.d.cts} +1 -1
  53. package/dist/{as-field-DLW-csEu.mjs → as-field-5rz47opo.mjs} +10 -4
  54. package/dist/{as-field-shell-CW3DDHnq.cjs → as-field-shell-C4epFfvE.cjs} +29 -23
  55. package/dist/{as-field-shell-BHYEjGcn.mjs → as-field-shell-DLvPV8WS.mjs} +29 -23
  56. package/dist/as-field-shell.cjs +1 -1
  57. package/dist/as-field-shell.d.cts +1 -1
  58. package/dist/as-field-shell.d.mts +1 -1
  59. package/dist/as-field-shell.mjs +1 -1
  60. package/dist/{as-field-shell.vue-Ct1ixFqc.d.cts → as-field-shell.vue-CLDHaWN0.d.cts} +1 -1
  61. package/dist/{as-field-shell.vue-K4Flr3gw.d.mts → as-field-shell.vue-DssDDSal.d.mts} +1 -1
  62. package/dist/{as-field-BKa4D63r.cjs → as-field-vktmRs-V.cjs} +9 -3
  63. package/dist/as-field.cjs +1 -1
  64. package/dist/as-field.d.cts +1 -24
  65. package/dist/as-field.d.mts +1 -25
  66. package/dist/as-field.mjs +1 -1
  67. package/dist/as-field.vue-A2cJj-Ih.d.cts +26 -0
  68. package/dist/as-field.vue-CmjIDgQ5.d.mts +26 -0
  69. package/dist/{as-form-CrMA0HdQ.cjs → as-form-B4DKpAVk.cjs} +75 -37
  70. package/dist/{as-form-OsyP7m-A.mjs → as-form-me0zA-52.mjs} +77 -39
  71. package/dist/as-form.cjs +1 -1
  72. package/dist/as-form.d.cts +1 -1
  73. package/dist/as-form.d.mts +1 -1
  74. package/dist/as-form.mjs +1 -1
  75. package/dist/as-form.vue-D5d1Y2ff.d.cts +1425 -0
  76. package/dist/as-form.vue-DH3phgWP.d.mts +1425 -0
  77. package/dist/{as-input-CqxNYh5q.cjs → as-input-Bp1Ltp15.cjs} +6 -2
  78. package/dist/{as-input-D7aA22Yx.mjs → as-input-DF--i7kY.mjs} +6 -2
  79. package/dist/{as-input-control-BYo_dfQA.cjs → as-input-control-B7F2q99A.cjs} +4 -0
  80. package/dist/{as-input-control-Bx-isLZN.mjs → as-input-control-BofS4mCo.mjs} +4 -0
  81. package/dist/as-input.cjs +1 -1
  82. package/dist/as-input.d.cts +1 -1
  83. package/dist/as-input.d.mts +1 -1
  84. package/dist/as-input.mjs +1 -1
  85. package/dist/{as-input.vue-BHsVVncq.d.cts → as-input.vue-CCAEWqK8.d.mts} +1 -1
  86. package/dist/{as-input.vue-DgZrW4pc.d.mts → as-input.vue-Nc9Q3RPh.d.cts} +1 -1
  87. package/dist/{as-iterator-DsDKfpTh.cjs → as-iterator-Bd-bKTMY.cjs} +1 -1
  88. package/dist/{as-iterator-DW7giLlz.mjs → as-iterator-BjIF-O-J.mjs} +1 -1
  89. package/dist/as-iterator.cjs +1 -1
  90. package/dist/as-iterator.d.cts +1 -20
  91. package/dist/as-iterator.d.mts +1 -21
  92. package/dist/as-iterator.mjs +1 -1
  93. package/dist/as-iterator.vue-BZeozFr-.d.cts +22 -0
  94. package/dist/as-iterator.vue-C8HW6n25.d.mts +22 -0
  95. package/dist/{as-multi-select-DQUInqwY.cjs → as-multi-select-b1l34vP5.cjs} +5 -1
  96. package/dist/{as-multi-select-Bsf4Y_mv.mjs → as-multi-select-mp-aM3LV.mjs} +5 -1
  97. package/dist/as-multi-select.cjs +1 -1
  98. package/dist/as-multi-select.d.cts +1 -1
  99. package/dist/as-multi-select.d.mts +1 -1
  100. package/dist/as-multi-select.mjs +1 -1
  101. package/dist/{as-multi-select.vue--bavpcN-.d.cts → as-multi-select.vue-D9mseRFm.d.cts} +1 -1
  102. package/dist/{as-multi-select.vue-rsDUkzxa.d.mts → as-multi-select.vue-DKpOsOmM.d.mts} +1 -1
  103. package/dist/{as-number-B8MCg-ph.mjs → as-number-De9zTltV.mjs} +6 -2
  104. package/dist/{as-number-CFdK5xjM.cjs → as-number-joydTMcJ.cjs} +6 -2
  105. package/dist/as-number.cjs +1 -1
  106. package/dist/as-number.d.cts +1 -1
  107. package/dist/as-number.d.mts +1 -1
  108. package/dist/as-number.mjs +1 -1
  109. package/dist/{as-number.vue-D2DrbnQu.d.cts → as-number.vue-CZC0-zs8.d.cts} +1 -1
  110. package/dist/{as-number.vue-Oml2y6Nt.d.mts → as-number.vue-DrvjSOdq.d.mts} +1 -1
  111. package/dist/{as-object-CN3KZFXO.mjs → as-object-CQMTYtcY.mjs} +5 -1
  112. package/dist/{as-object-B4sF9sIh.cjs → as-object-DgeItRdH.cjs} +5 -1
  113. package/dist/as-object.cjs +1 -1
  114. package/dist/as-object.d.cts +1 -1
  115. package/dist/as-object.d.mts +1 -1
  116. package/dist/as-object.mjs +1 -1
  117. package/dist/{as-object.vue-BljKYrMo.d.cts → as-object.vue-BItO19fw.d.mts} +1 -1
  118. package/dist/{as-object.vue-DAq7Kha3.d.mts → as-object.vue-DbHog5M-.d.cts} +1 -1
  119. package/dist/{as-paragraph-GIGj6UgL.mjs → as-paragraph-BP3-0EY4.mjs} +4 -0
  120. package/dist/{as-paragraph-BA-c863H.cjs → as-paragraph-CPhDTH_V.cjs} +4 -0
  121. package/dist/as-paragraph.cjs +1 -1
  122. package/dist/as-paragraph.d.cts +1 -1
  123. package/dist/as-paragraph.d.mts +1 -1
  124. package/dist/as-paragraph.mjs +1 -1
  125. package/dist/{as-paragraph.vue-CBU_olev.d.mts → as-paragraph.vue-BGDpjceO.d.mts} +1 -1
  126. package/dist/{as-paragraph.vue-LxXA7VPD.d.cts → as-paragraph.vue-D36pdOoc.d.cts} +1 -1
  127. package/dist/{as-radio-BeOQdoeq.cjs → as-radio-Dlmxk1vr.cjs} +5 -1
  128. package/dist/{as-radio-CFaDbRPe.mjs → as-radio-SwpgM1xP.mjs} +5 -1
  129. package/dist/as-radio.cjs +1 -1
  130. package/dist/as-radio.d.cts +1 -1
  131. package/dist/as-radio.d.mts +1 -1
  132. package/dist/as-radio.mjs +1 -1
  133. package/dist/{as-radio.vue-Dk4nlz-d.d.cts → as-radio.vue-EfrhKcBF.d.cts} +1 -1
  134. package/dist/{as-radio.vue-TVMliE1e.d.mts → as-radio.vue-WywkI-zY.d.mts} +1 -1
  135. package/dist/{as-ref-CNQgr6zE.mjs → as-ref-8JnEuan0.mjs} +5 -1
  136. package/dist/{as-ref-RawBvR6v.cjs → as-ref-BCpvUq8E.cjs} +5 -1
  137. package/dist/as-ref.cjs +1 -1
  138. package/dist/as-ref.d.cts +1 -1
  139. package/dist/as-ref.d.mts +1 -1
  140. package/dist/as-ref.mjs +1 -1
  141. package/dist/{as-ref.vue-CUxxGqyg.d.mts → as-ref.vue-BD_vsu7I.d.mts} +1 -1
  142. package/dist/{as-ref.vue-CnzqRblA.d.cts → as-ref.vue-Cxg-A5QR.d.cts} +1 -1
  143. package/dist/{as-select-Cr00CPKf.mjs → as-select-C3ukCyGQ.mjs} +5 -1
  144. package/dist/{as-select-LJIvBPiv.cjs → as-select-CtSNZXtC.cjs} +5 -1
  145. package/dist/as-select.cjs +1 -1
  146. package/dist/as-select.d.cts +1 -1
  147. package/dist/as-select.d.mts +1 -1
  148. package/dist/as-select.mjs +1 -1
  149. package/dist/{as-select.vue-CKjAg-Y2.d.mts → as-select.vue-DoAG5njV.d.mts} +1 -1
  150. package/dist/{as-select.vue-ZZtjsmcO.d.cts → as-select.vue-hd94jaH_.d.cts} +1 -1
  151. package/dist/{as-time-CE2FaqZ3.mjs → as-time-QJ9YiVj9.mjs} +6 -2
  152. package/dist/{as-time-CqCF0pKQ.cjs → as-time-nAPtGL3t.cjs} +6 -2
  153. package/dist/as-time.cjs +1 -1
  154. package/dist/as-time.d.cts +1 -1
  155. package/dist/as-time.d.mts +1 -1
  156. package/dist/as-time.mjs +1 -1
  157. package/dist/{as-time.vue-BCEE4uCV.d.mts → as-time.vue-DMy_Au0C.d.cts} +1 -1
  158. package/dist/{as-time.vue-BUAvE5m3.d.cts → as-time.vue-DgW7qSAM.d.mts} +1 -1
  159. package/dist/{as-tuple-B3ysbvxB.cjs → as-tuple-CFn7aZYt.cjs} +5 -1
  160. package/dist/{as-tuple-CeJWgP6l.mjs → as-tuple-CJXpGGKj.mjs} +5 -1
  161. package/dist/as-tuple.cjs +1 -1
  162. package/dist/as-tuple.d.cts +1 -1
  163. package/dist/as-tuple.d.mts +1 -1
  164. package/dist/as-tuple.mjs +1 -1
  165. package/dist/{as-tuple.vue-WN7k43tv.d.mts → as-tuple.vue-BDwz5FeN.d.mts} +1 -1
  166. package/dist/{as-tuple.vue-cy0ThAGl.d.cts → as-tuple.vue-DZ2Soqyw.d.cts} +1 -1
  167. package/dist/{as-union-Djhjo69H.cjs → as-union-BDRNBacb.cjs} +4 -0
  168. package/dist/{as-union-BPlYyGVk.mjs → as-union-DZWgGqqM.mjs} +4 -0
  169. package/dist/as-union.cjs +1 -1
  170. package/dist/as-union.d.cts +1 -1
  171. package/dist/as-union.d.mts +1 -1
  172. package/dist/as-union.mjs +1 -1
  173. package/dist/{as-union.vue-AqH35ozq.d.cts → as-union.vue-D9Mh0M3_.d.mts} +1 -1
  174. package/dist/{as-union.vue-Ew3Bany8.d.mts → as-union.vue-DQKWNuhd.d.cts} +1 -1
  175. package/dist/index.cjs +22 -22
  176. package/dist/index.d.cts +24 -1081
  177. package/dist/index.d.mts +24 -1081
  178. package/dist/index.mjs +22 -22
  179. package/dist/{types-BYfe1QEF.d.cts → types-B8aPXWL5.d.cts} +13 -0
  180. package/dist/{types-CV9ss4UN.d.mts → types-nuUi10Kl.d.mts} +13 -0
  181. package/dist/{use-as-date-XLE8HBbo.mjs → use-as-date-B6RGkjjB.mjs} +4 -0
  182. package/dist/{use-as-date-DY8b1_V4.cjs → use-as-date-CslHBPmQ.cjs} +4 -0
  183. package/package.json +6 -6
  184. package/dist/as-form.vue-2NZSk1F9.d.mts +0 -285
  185. package/dist/as-form.vue-Dg_5GYWG.d.cts +0 -285
@@ -1,285 +0,0 @@
1
- import { n as TAsChangeType, o as TAsComponentProps, s as TAsTypeComponents } from "./types-BYfe1QEF.cjs";
2
- import * as vue from "vue";
3
- import { Component } from "vue";
4
- import * as _atscript_ui0 from "@atscript/ui";
5
- import { ClientFactory, FormDef } from "@atscript/ui";
6
-
7
- //#region src/composables/types.d.ts
8
- type TFormRule<TValue, TFormData, TContext> = (v: TValue, data?: TFormData, context?: TContext) => boolean | string;
9
- interface TFormFieldCallbacks {
10
- validate: () => boolean | string;
11
- clearErrors: () => void;
12
- reset: () => void;
13
- setExternalError: (msg?: string) => void;
14
- }
15
- interface TFormFieldRegistration {
16
- path: () => string;
17
- callbacks: TFormFieldCallbacks;
18
- }
19
- interface TFormState {
20
- firstSubmitHappened: boolean;
21
- firstValidation: "on-change" | "touched-on-blur" | "on-blur" | "on-submit" | "none";
22
- /**
23
- * Fields registered AFTER `firstSubmitHappened` flipped to true. They stay
24
- * in this set until either the user edits the field (model watch removes
25
- * the id) or the next submit fires (set is cleared). Live validation is
26
- * suppressed for these fields so a freshly-added array item doesn't render
27
- * red required-field errors before the user has had a chance to type.
28
- */
29
- freshFields: Set<symbol>;
30
- register: (id: symbol, registration: TFormFieldRegistration) => void;
31
- unregister: (id: symbol) => void;
32
- }
33
- //#endregion
34
- //#region src/components/as-form.vue.d.ts
35
- interface Props<TF, TC> {
36
- def: FormDef;
37
- formData?: TF;
38
- formContext?: TC;
39
- firstValidation?: TFormState["firstValidation"];
40
- components?: Record<string, Component<TAsComponentProps>>;
41
- /**
42
- * Type-to-component map for field rendering. Maps field types to Vue components.
43
- * Must include entries for all built-in field types. Use `createDefaultTypes()`
44
- * for a pre-filled map, or supply your own.
45
- */
46
- types: TAsTypeComponents;
47
- errors?: Record<string, string | undefined>;
48
- /**
49
- * Per-form client factory override. Creates `Client` instances from URL paths
50
- * for FK value-help pickers inside this form. Falls back to the app-wide
51
- * default (`setDefaultClientFactory`) and then to the built-in `new Client(url)`
52
- * factory when unset.
53
- */
54
- clientFactory?: ClientFactory;
55
- /**
56
- * Suppress the root field's title rendering. Use when the form is mounted
57
- * inside a chrome that already shows the form's `@meta.label` (e.g. a
58
- * dialog header). Nested fields keep their own headings.
59
- */
60
- hideRootTitle?: boolean;
61
- /**
62
- * Suppress the default submit button. Use when the host chrome owns the
63
- * submit affordance (e.g. a dialog footer with its own submit button
64
- * wired via HTML5 `<button form="...">`). Vue 3 treats an empty
65
- * `<template #form.submit />` as "slot not provided" and falls back to
66
- * the default button — this prop is the explicit way to skip it.
67
- */
68
- hideSubmit?: boolean;
69
- /**
70
- * When true, freezes the form: the body becomes `inert` (blocks pointer
71
- * events + keyboard focus) and a loading overlay paints over the entire
72
- * form area. Used by `<AsWfForm>` to lock interaction during a server
73
- * round-trip so the user can't edit a field whose response is racing in.
74
- * Visual is shared with `<AsTable>`'s query overlay via vunor
75
- * `inner-loading`.
76
- */
77
- loading?: boolean;
78
- /**
79
- * Enable change tracking. When set, the form captures a deep-clone baseline
80
- * of its data and surfaces both a changed-fields list and an `@atscript/db`
81
- * patch object. The tracking surface (`isDirty` / `changes` / `getPatch` /
82
- * `getChanges`) is spread into every slot AND exposed on the component
83
- * instance (template ref → `asForm.value.getPatch()`); descendants read it
84
- * with `useAsFormPatch()`. Off by default — zero overhead when unset.
85
- */
86
- trackChanges?: boolean;
87
- }
88
- 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<{
89
- props: vue.PublicProps & __VLS_PrettifyLocal<Props<TFormData, TFormContext> & {
90
- onError?: ((errors: {
91
- path: string;
92
- message: string;
93
- }[]) => any) | undefined;
94
- onAction?: ((name: string, data: TFormData) => any) | undefined;
95
- onSubmit?: ((data: TFormData) => any) | undefined;
96
- "onUnsupported-action"?: ((name: string, data: TFormData) => any) | undefined;
97
- onChange?: ((type: TAsChangeType, path: string, value: unknown, formData: TFormData) => any) | undefined;
98
- }> & (typeof globalThis extends {
99
- __VLS_PROPS_FALLBACK: infer P;
100
- } ? P : {});
101
- expose: (exposed: vue.ShallowUnwrapRef<{
102
- submit: () => void;
103
- reset: () => Promise<void>; /** True when `track-changes` is on AND data differs from baseline. */
104
- readonly isDirty: boolean; /** Revert-aware per-field change list (empty when tracking is off). */
105
- readonly changes: _atscript_ui0.FormFieldChange[]; /** Build the `@atscript/db` patch object on demand (`{}` when off). */
106
- getPatch: ((opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>) | (() => {}); /** Build the per-field change list on demand (`[]` when off). */
107
- getChanges: () => _atscript_ui0.FormFieldChange[]; /** Re-baseline to current data after a successful save (no-op when off). */
108
- rebase: () => void;
109
- }>) => void;
110
- attrs: any;
111
- slots: {
112
- 'form.header'?: (props: {
113
- title: string | undefined;
114
- description: string | undefined;
115
- data: TFormData;
116
- errors: Record<string, string | undefined> | undefined;
117
- formError: string | undefined;
118
- disabled: boolean;
119
- loading: boolean;
120
- submitText: string;
121
- submit: () => void;
122
- reset: () => Promise<void>;
123
- clearErrors: () => void;
124
- setErrors: (errors: Record<string, string>) => void;
125
- dismissError: (path: string) => void;
126
- dismissFormError: () => void;
127
- formContext: TFormContext | undefined;
128
- isDirty: boolean;
129
- changes: readonly _atscript_ui0.FormFieldChange[];
130
- getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
131
- getChanges: () => _atscript_ui0.FormFieldChange[];
132
- }) => any;
133
- } & {
134
- 'form.before'?: (props: {
135
- title: string | undefined;
136
- description: string | undefined;
137
- data: TFormData;
138
- errors: Record<string, string | undefined> | undefined;
139
- formError: string | undefined;
140
- disabled: boolean;
141
- loading: boolean;
142
- submitText: string;
143
- submit: () => void;
144
- reset: () => Promise<void>;
145
- clearErrors: () => void;
146
- setErrors: (errors: Record<string, string>) => void;
147
- dismissError: (path: string) => void;
148
- dismissFormError: () => void;
149
- formContext: TFormContext | undefined;
150
- isDirty: boolean;
151
- changes: readonly _atscript_ui0.FormFieldChange[];
152
- getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
153
- getChanges: () => _atscript_ui0.FormFieldChange[];
154
- }) => any;
155
- } & {
156
- 'form.after'?: (props: {
157
- title: string | undefined;
158
- description: string | undefined;
159
- data: TFormData;
160
- errors: Record<string, string | undefined> | undefined;
161
- formError: string | undefined;
162
- disabled: boolean;
163
- loading: boolean;
164
- submitText: string;
165
- submit: () => void;
166
- reset: () => Promise<void>;
167
- clearErrors: () => void;
168
- setErrors: (errors: Record<string, string>) => void;
169
- dismissError: (path: string) => void;
170
- dismissFormError: () => void;
171
- formContext: TFormContext | undefined;
172
- isDirty: boolean;
173
- changes: readonly _atscript_ui0.FormFieldChange[];
174
- getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
175
- getChanges: () => _atscript_ui0.FormFieldChange[];
176
- }) => any;
177
- } & {
178
- 'form.error'?: (props: {
179
- message: string;
180
- dismiss: () => void;
181
- title: string | undefined;
182
- description: string | undefined;
183
- data: TFormData;
184
- errors: Record<string, string | undefined> | undefined;
185
- formError: string | undefined;
186
- disabled: boolean;
187
- loading: boolean;
188
- submitText: string;
189
- submit: () => void;
190
- reset: () => Promise<void>;
191
- clearErrors: () => void;
192
- setErrors: (errors: Record<string, string>) => void;
193
- dismissError: (path: string) => void;
194
- dismissFormError: () => void;
195
- formContext: TFormContext | undefined;
196
- isDirty: boolean;
197
- changes: readonly _atscript_ui0.FormFieldChange[];
198
- getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
199
- getChanges: () => _atscript_ui0.FormFieldChange[];
200
- }) => any;
201
- } & {
202
- 'form.submit'?: (props: {
203
- text: string;
204
- title: string | undefined;
205
- description: string | undefined;
206
- data: TFormData;
207
- errors: Record<string, string | undefined> | undefined;
208
- formError: string | undefined;
209
- disabled: boolean;
210
- loading: boolean;
211
- submitText: string;
212
- submit: () => void;
213
- reset: () => Promise<void>;
214
- clearErrors: () => void;
215
- setErrors: (errors: Record<string, string>) => void;
216
- dismissError: (path: string) => void;
217
- dismissFormError: () => void;
218
- formContext: TFormContext | undefined;
219
- isDirty: boolean;
220
- changes: readonly _atscript_ui0.FormFieldChange[];
221
- getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
222
- getChanges: () => _atscript_ui0.FormFieldChange[];
223
- }) => any;
224
- } & {
225
- 'form.footer'?: (props: {
226
- title: string | undefined;
227
- description: string | undefined;
228
- data: TFormData;
229
- errors: Record<string, string | undefined> | undefined;
230
- formError: string | undefined;
231
- disabled: boolean;
232
- loading: boolean;
233
- submitText: string;
234
- submit: () => void;
235
- reset: () => Promise<void>;
236
- clearErrors: () => void;
237
- setErrors: (errors: Record<string, string>) => void;
238
- dismissError: (path: string) => void;
239
- dismissFormError: () => void;
240
- formContext: TFormContext | undefined;
241
- isDirty: boolean;
242
- changes: readonly _atscript_ui0.FormFieldChange[];
243
- getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
244
- getChanges: () => _atscript_ui0.FormFieldChange[];
245
- }) => any;
246
- } & {
247
- 'form.loading'?: (props: {
248
- title: string | undefined;
249
- description: string | undefined;
250
- data: TFormData;
251
- errors: Record<string, string | undefined> | undefined;
252
- formError: string | undefined;
253
- disabled: boolean;
254
- loading: boolean;
255
- submitText: string;
256
- submit: () => void;
257
- reset: () => Promise<void>;
258
- clearErrors: () => void;
259
- setErrors: (errors: Record<string, string>) => void;
260
- dismissError: (path: string) => void;
261
- dismissFormError: () => void;
262
- formContext: TFormContext | undefined;
263
- isDirty: boolean;
264
- changes: readonly _atscript_ui0.FormFieldChange[];
265
- getPatch: (opts?: _atscript_ui0.FormDiffOptions) => Record<string, unknown>;
266
- getChanges: () => _atscript_ui0.FormFieldChange[];
267
- }) => any;
268
- };
269
- emit: {
270
- (e: "submit", data: TFormData): void;
271
- (e: "error", errors: {
272
- path: string;
273
- message: string;
274
- }[]): void;
275
- (e: "action", name: string, data: TFormData): void;
276
- (e: "unsupported-action", name: string, data: TFormData): void;
277
- (e: "change", type: TAsChangeType, path: string, value: unknown, formData: TFormData): void;
278
- };
279
- }>) => vue.VNode & {
280
- __ctx?: Awaited<typeof __VLS_setup>;
281
- };
282
- declare const _default: typeof __VLS_export;
283
- type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
284
- //#endregion
285
- export { TFormRule as a, TFormFieldRegistration as i, _default as n, TFormState as o, TFormFieldCallbacks as r, Props as t };