@atscript/vue-form 0.1.132 → 0.1.134

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 (179) hide show
  1. package/dist/{as-action-B712j9xf.cjs → as-action-DNRackS9.cjs} +4 -0
  2. package/dist/{as-action-CCjN5EFP.mjs → as-action-DqR9HlEa.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-BL8_a0fE.d.cts → as-action.vue-DOOr8wOc.d.mts} +1 -1
  8. package/dist/{as-action.vue-CcOPK2qI.d.mts → as-action.vue-wcB6Dkpu.d.cts} +1 -1
  9. package/dist/{as-array-Bvth1kh0.mjs → as-array-BS_1QWvc.mjs} +9 -3
  10. package/dist/{as-array-NLKtsCn8.cjs → as-array-DlHekRMZ.cjs} +9 -3
  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-Be1tDTdH.d.cts → as-array.vue-BoKbyO1a.d.cts} +1 -1
  16. package/dist/{as-array.vue-CtBBY2gF.d.mts → as-array.vue-Cd2X9Aj9.d.mts} +1 -1
  17. package/dist/{as-checkbox-Bg5MN2x8.mjs → as-checkbox-DosdhEuS.mjs} +5 -1
  18. package/dist/{as-checkbox-C-NoKSv6.cjs → as-checkbox-QO5Oh13K.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-B6zk5IbU.d.cts → as-checkbox.vue-C2kipqKM.d.mts} +1 -1
  24. package/dist/{as-checkbox.vue-CXpsn_WG.d.mts → as-checkbox.vue-DdttMJAS.d.cts} +1 -1
  25. package/dist/{as-collapsible-nMEolKb7.cjs → as-collapsible-CQyuXwj9.cjs} +15 -3
  26. package/dist/{as-collapsible-_RN5621d.mjs → as-collapsible-DHSlSMfY.mjs} +15 -3
  27. package/dist/as-collapsible.cjs +1 -1
  28. package/dist/as-collapsible.d.cts +1 -1
  29. package/dist/as-collapsible.d.mts +1 -1
  30. package/dist/as-collapsible.mjs +1 -1
  31. package/dist/{as-collapsible.vue-34S3TEq5.d.cts → as-collapsible.vue-1JSWgRMg.d.cts} +1 -1
  32. package/dist/{as-collapsible.vue-CIfMlTQ6.d.mts → as-collapsible.vue-B6Bs3fZU.d.mts} +1 -1
  33. package/dist/{as-date-DCZ0t3-h.cjs → as-date-DPNqfBaq.cjs} +6 -2
  34. package/dist/{as-date-DF8WzVgY.mjs → as-date-gGh6aNHW.mjs} +6 -2
  35. package/dist/as-date.cjs +1 -1
  36. package/dist/as-date.d.cts +1 -1
  37. package/dist/as-date.d.mts +1 -1
  38. package/dist/as-date.mjs +1 -1
  39. package/dist/{as-date.vue-BZiy1s5s.d.cts → as-date.vue-BZ1cNMbN.d.mts} +1 -1
  40. package/dist/{as-date.vue-DWWoojir.d.mts → as-date.vue-BiUgcOwZ.d.cts} +1 -1
  41. package/dist/{as-datetime-BhhbOw99.cjs → as-datetime-BDUWhEuq.cjs} +6 -2
  42. package/dist/{as-datetime-wuk9i8Tz.mjs → as-datetime-DqXt3riD.mjs} +6 -2
  43. package/dist/as-datetime.cjs +1 -1
  44. package/dist/as-datetime.d.cts +1 -1
  45. package/dist/as-datetime.d.mts +1 -1
  46. package/dist/as-datetime.mjs +1 -1
  47. package/dist/{as-datetime.vue-DYEHokj_.d.cts → as-datetime.vue-BVc6jcUI.d.cts} +1 -1
  48. package/dist/{as-datetime.vue-NblA-SVE.d.mts → as-datetime.vue-DLuL9Zp3.d.mts} +1 -1
  49. package/dist/{as-decimal-B1_3ivMF.cjs → as-decimal-BcvgGV03.cjs} +5 -1
  50. package/dist/{as-decimal-CVp3Wtrz.mjs → as-decimal-Ck4oZ3uK.mjs} +5 -1
  51. package/dist/as-decimal.cjs +1 -1
  52. package/dist/as-decimal.d.cts +1 -1
  53. package/dist/as-decimal.d.mts +1 -1
  54. package/dist/as-decimal.mjs +1 -1
  55. package/dist/{as-decimal.vue-BoNNIhbL.d.mts → as-decimal.vue-BfhaMuCz.d.mts} +1 -1
  56. package/dist/{as-decimal.vue-D3eGMvC0.d.cts → as-decimal.vue-Cc9pNTqj.d.cts} +1 -1
  57. package/dist/{as-field-Ig0b9u6L.mjs → as-field-BJ1WciIp.mjs} +20 -6
  58. package/dist/{as-field-CPs6XuAQ.cjs → as-field-C502boQy.cjs} +19 -5
  59. package/dist/{as-field-shell-_XX9G3PP.cjs → as-field-shell-BrJpCzIA.cjs} +40 -14
  60. package/dist/{as-field-shell-BErcR8c9.mjs → as-field-shell-Bxqa_ZsU.mjs} +40 -14
  61. package/dist/as-field-shell.cjs +1 -1
  62. package/dist/as-field-shell.d.cts +1 -1
  63. package/dist/as-field-shell.d.mts +1 -1
  64. package/dist/as-field-shell.mjs +1 -1
  65. package/dist/{as-field-shell.vue-CLDHaWN0.d.cts → as-field-shell.vue-B1ep312_.d.cts} +11 -1
  66. package/dist/{as-field-shell.vue-DssDDSal.d.mts → as-field-shell.vue-BDtmxN8W.d.mts} +11 -1
  67. package/dist/as-field.cjs +1 -1
  68. package/dist/as-field.mjs +1 -1
  69. package/dist/{as-form-CUcSK8l-.mjs → as-form-B4nL-BjV.mjs} +14 -8
  70. package/dist/{as-form-Cxd-3uDW.cjs → as-form-Dw0Xo5zF.cjs} +14 -8
  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-D7yYIL7K.d.cts → as-form.vue-DiV2bl5k.d.cts} +2 -2
  76. package/dist/{as-form.vue-gLfk4dns.d.mts → as-form.vue-DsgeJ_jU.d.mts} +2 -2
  77. package/dist/{as-input-CLdDhrzx.mjs → as-input-65rtLZt3.mjs} +6 -2
  78. package/dist/{as-input-CGJZNsPn.cjs → as-input-UkZxRSD4.cjs} +6 -2
  79. package/dist/{as-input-control-BofS4mCo.mjs → as-input-control-4W60Kbyl.mjs} +4 -0
  80. package/dist/{as-input-control-B7F2q99A.cjs → as-input-control-Dtvrw_PS.cjs} +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-CCAEWqK8.d.mts → as-input.vue--S9S4-N-.d.mts} +1 -1
  86. package/dist/{as-input.vue-Nc9Q3RPh.d.cts → as-input.vue-D-RM35Rp.d.cts} +1 -1
  87. package/dist/{as-iterator-DTA-Td2M.mjs → as-iterator-BU5Hj5K6.mjs} +1 -1
  88. package/dist/{as-iterator-DO3kLK3y.cjs → as-iterator-QM6LyYvA.cjs} +1 -1
  89. package/dist/as-iterator.cjs +1 -1
  90. package/dist/as-iterator.mjs +1 -1
  91. package/dist/{as-multi-select-BzXxFUZU.mjs → as-multi-select-AC05uVzY.mjs} +5 -1
  92. package/dist/{as-multi-select-DcBATdiH.cjs → as-multi-select-BedSzod1.cjs} +5 -1
  93. package/dist/as-multi-select.cjs +1 -1
  94. package/dist/as-multi-select.d.cts +1 -1
  95. package/dist/as-multi-select.d.mts +1 -1
  96. package/dist/as-multi-select.mjs +1 -1
  97. package/dist/{as-multi-select.vue-D9mseRFm.d.cts → as-multi-select.vue-D1OnCH-x.d.cts} +1 -1
  98. package/dist/{as-multi-select.vue-DKpOsOmM.d.mts → as-multi-select.vue-DRe3VNeM.d.mts} +1 -1
  99. package/dist/{as-number-Cros_r8k.mjs → as-number-B7zYsrwk.mjs} +6 -2
  100. package/dist/{as-number-Bv33W-S9.cjs → as-number-DZyfbo_R.cjs} +6 -2
  101. package/dist/as-number.cjs +1 -1
  102. package/dist/as-number.d.cts +1 -1
  103. package/dist/as-number.d.mts +1 -1
  104. package/dist/as-number.mjs +1 -1
  105. package/dist/{as-number.vue-CZC0-zs8.d.cts → as-number.vue-BUUl1Y_9.d.mts} +1 -1
  106. package/dist/{as-number.vue-DrvjSOdq.d.mts → as-number.vue-DE33Giq3.d.cts} +1 -1
  107. package/dist/{as-object-CeF8o1Rw.cjs → as-object-CIqxuJxh.cjs} +8 -2
  108. package/dist/{as-object-CcC7Oe-q.mjs → as-object-yZj_RlnR.mjs} +8 -2
  109. package/dist/as-object.cjs +1 -1
  110. package/dist/as-object.d.cts +1 -1
  111. package/dist/as-object.d.mts +1 -1
  112. package/dist/as-object.mjs +1 -1
  113. package/dist/{as-object.vue-BItO19fw.d.mts → as-object.vue-PUhmGqhY.d.cts} +1 -1
  114. package/dist/{as-object.vue-DbHog5M-.d.cts → as-object.vue-pL1w2onW.d.mts} +1 -1
  115. package/dist/{as-paragraph-CPhDTH_V.cjs → as-paragraph-kKM4T1Dq.cjs} +4 -0
  116. package/dist/{as-paragraph-BP3-0EY4.mjs → as-paragraph-ov2mvW2V.mjs} +4 -0
  117. package/dist/as-paragraph.cjs +1 -1
  118. package/dist/as-paragraph.d.cts +1 -1
  119. package/dist/as-paragraph.d.mts +1 -1
  120. package/dist/as-paragraph.mjs +1 -1
  121. package/dist/{as-paragraph.vue-BGDpjceO.d.mts → as-paragraph.vue-BUfbXaiy.d.cts} +1 -1
  122. package/dist/{as-paragraph.vue-D36pdOoc.d.cts → as-paragraph.vue-aKtn76iW.d.mts} +1 -1
  123. package/dist/{as-radio-CjrO1d-4.cjs → as-radio-C06SIAFY.cjs} +5 -1
  124. package/dist/{as-radio-CNeg0NQ0.mjs → as-radio-Dg9c4dGh.mjs} +5 -1
  125. package/dist/as-radio.cjs +1 -1
  126. package/dist/as-radio.d.cts +1 -1
  127. package/dist/as-radio.d.mts +1 -1
  128. package/dist/as-radio.mjs +1 -1
  129. package/dist/{as-radio.vue-EfrhKcBF.d.cts → as-radio.vue-DQ9GnafC.d.mts} +1 -1
  130. package/dist/{as-radio.vue-WywkI-zY.d.mts → as-radio.vue-h4XkpaW0.d.cts} +1 -1
  131. package/dist/{as-ref-CMDYGqL6.cjs → as-ref-BEcSuAfh.cjs} +5 -1
  132. package/dist/{as-ref-v00Tyeum.mjs → as-ref-BodUflj-.mjs} +5 -1
  133. package/dist/as-ref.cjs +1 -1
  134. package/dist/as-ref.d.cts +1 -1
  135. package/dist/as-ref.d.mts +1 -1
  136. package/dist/as-ref.mjs +1 -1
  137. package/dist/{as-ref.vue-BD_vsu7I.d.mts → as-ref.vue-ec447Bmx.d.cts} +1 -1
  138. package/dist/{as-ref.vue-Cxg-A5QR.d.cts → as-ref.vue-njC9usEd.d.mts} +1 -1
  139. package/dist/{as-select-BZUE0TJD.mjs → as-select-CrTKlmhd.mjs} +5 -1
  140. package/dist/{as-select-CeFTgQo6.cjs → as-select-DzEUs8Od.cjs} +5 -1
  141. package/dist/as-select.cjs +1 -1
  142. package/dist/as-select.d.cts +1 -1
  143. package/dist/as-select.d.mts +1 -1
  144. package/dist/as-select.mjs +1 -1
  145. package/dist/{as-select.vue-DoAG5njV.d.mts → as-select.vue-DGwIGxEr.d.mts} +1 -1
  146. package/dist/{as-select.vue-hd94jaH_.d.cts → as-select.vue-DV0C1MsH.d.cts} +1 -1
  147. package/dist/{as-time-BMwVQp45.cjs → as-time-Bybj2FVd.cjs} +6 -2
  148. package/dist/{as-time-CQ2GWcPn.mjs → as-time-hfgmHDVL.mjs} +6 -2
  149. package/dist/as-time.cjs +1 -1
  150. package/dist/as-time.d.cts +1 -1
  151. package/dist/as-time.d.mts +1 -1
  152. package/dist/as-time.mjs +1 -1
  153. package/dist/{as-time.vue-DMy_Au0C.d.cts → as-time.vue-CmvsgHJd.d.cts} +1 -1
  154. package/dist/{as-time.vue-DgW7qSAM.d.mts → as-time.vue-CpQRa8tU.d.mts} +1 -1
  155. package/dist/{as-tuple-DfAPZOeN.mjs → as-tuple-45EjcoJB.mjs} +9 -3
  156. package/dist/{as-tuple-0QlOQ5bO.cjs → as-tuple-BB8zVKTY.cjs} +9 -3
  157. package/dist/as-tuple.cjs +1 -1
  158. package/dist/as-tuple.d.cts +1 -1
  159. package/dist/as-tuple.d.mts +1 -1
  160. package/dist/as-tuple.mjs +1 -1
  161. package/dist/{as-tuple.vue-BDwz5FeN.d.mts → as-tuple.vue-Bvlf7sFv.d.mts} +1 -1
  162. package/dist/{as-tuple.vue-DZ2Soqyw.d.cts → as-tuple.vue-zZkuYxet.d.cts} +1 -1
  163. package/dist/{as-union-CovWOnmN.cjs → as-union-DT8XDZSt.cjs} +4 -0
  164. package/dist/{as-union-Car_1kUS.mjs → as-union-Gz8gEjmn.mjs} +4 -0
  165. package/dist/as-union.cjs +1 -1
  166. package/dist/as-union.d.cts +1 -1
  167. package/dist/as-union.d.mts +1 -1
  168. package/dist/as-union.mjs +1 -1
  169. package/dist/{as-union.vue-D9Mh0M3_.d.mts → as-union.vue-CYgwfCd3.d.mts} +1 -1
  170. package/dist/{as-union.vue-DQKWNuhd.d.cts → as-union.vue-K9ZSRg0G.d.cts} +1 -1
  171. package/dist/index.cjs +23 -23
  172. package/dist/index.d.cts +21 -21
  173. package/dist/index.d.mts +21 -21
  174. package/dist/index.mjs +23 -23
  175. package/dist/{types-nuUi10Kl.d.mts → types-Crwu2D-w.d.cts} +33 -1
  176. package/dist/{types-B8aPXWL5.d.cts → types-QI-iGjsL.d.mts} +33 -1
  177. package/dist/{use-as-date-CslHBPmQ.cjs → use-as-date-BazILwxT.cjs} +4 -0
  178. package/dist/{use-as-date-B6RGkjjB.mjs → use-as-date-DXJhqwyJ.mjs} +4 -0
  179. package/package.json +10 -10
@@ -1,7 +1,7 @@
1
1
  import { _ as TYPES_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_PATCH_KEY, f as FORM_STATE_KEY, g as ROOT_DATA_KEY, h as PATH_PREFIX_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as LEVEL_KEY, o as COMPONENTS_KEY, p as HIDE_ROOT_TITLE_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY } from "./use-form-context-cDW2GW4-.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_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, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isTupleField, isUnionField, joinPath, resolveAttrs, resolveFieldProp, resolveFormProp, 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_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, getByPath, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isTupleField, isUnionField, joinPath, 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) {
@@ -263,7 +263,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
263
263
  const componentName = getFieldMeta(prop, UI_FORM_COMPONENT);
264
264
  const prefixIcon = getFieldMeta(prop, UI_FORM_PREFIX_ICON);
265
265
  const suffixIcon = getFieldMeta(prop, UI_FORM_SUFFIX_ICON);
266
- const valueHelp = extractValueHelp(prop);
266
+ const valueHelp = props.field.valueHelpInfo;
267
267
  const currencyLiteral = getFieldMeta(prop, DB_AMOUNT_CURRENCY);
268
268
  const currencyRefField = getFieldMeta(prop, DB_AMOUNT_CURRENCY_REF);
269
269
  const unitLiteral = getFieldMeta(prop, DB_UNIT);
@@ -334,6 +334,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
334
334
  const inputId = `as-field-${useId()}`;
335
335
  const errorId = `${inputId}-err`;
336
336
  const descId = `${inputId}-desc`;
337
+ const statusId = `${inputId}-status`;
337
338
  const formActionMeta = getFieldMeta(prop, UI_FORM_ACTION);
338
339
  const wfActionWithData = getFieldMeta(prop, WF_ACTION_WITH_DATA);
339
340
  const formAction = formActionMeta ? {
@@ -493,7 +494,8 @@ var as_field_default = /* @__PURE__ */ defineComponent({
493
494
  hasAdornment,
494
495
  inputId,
495
496
  errorId,
496
- descId
497
+ descId,
498
+ statusId
497
499
  };
498
500
  const displayProps = computed(() => {
499
501
  const titleValue = isRoot && hideRootTitle ? void 0 : unwrap(title);
@@ -527,12 +529,10 @@ var as_field_default = /* @__PURE__ */ defineComponent({
527
529
  const componentProps = computed(() => {
528
530
  const dp = displayProps.value;
529
531
  const err = mergedError.value;
530
- const ariaDescribedBy = err || dp.hint ? errorId : dp.description ? descId : void 0;
531
532
  return {
532
533
  ...invariantProps,
533
534
  ...dp,
534
535
  error: err,
535
- ariaDescribedBy,
536
536
  class: [
537
537
  "as-grid-item",
538
538
  {
@@ -543,11 +543,25 @@ var as_field_default = /* @__PURE__ */ defineComponent({
543
543
  ]
544
544
  };
545
545
  });
546
+ const ariaDescribedBy = computed(() => {
547
+ const dp = displayProps.value;
548
+ const err = mergedError.value;
549
+ const ids = [];
550
+ if (err || dp.hint) ids.push(errorId);
551
+ else if (dp.description) ids.push(descId);
552
+ if (isDirty.value) ids.push(statusId);
553
+ return ids.length > 0 ? ids.join(" ") : void 0;
554
+ });
546
555
  return (_ctx, _cache) => {
547
556
  return resolvedComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(resolvedComponent.value), mergeProps({ key: 0 }, componentProps.value, {
548
557
  "is-dirty": unref(isDirty),
558
+ ariaDescribedBy: ariaDescribedBy.value,
549
559
  onAction: unref(handleAction)
550
- }), null, 16, ["is-dirty", "onAction"])) : (openBlock(), createElementBlock("div", _hoisted_1, " [" + toDisplayString(unwrap(unref(label))) + "] No component for type \"" + toDisplayString(__props.field.customType ?? __props.field.type) + "\"" + toDisplayString(unref(componentName) ? ` (component "${unref(componentName)}" not supplied)` : ""), 1));
560
+ }), null, 16, [
561
+ "is-dirty",
562
+ "ariaDescribedBy",
563
+ "onAction"
564
+ ])) : (openBlock(), createElementBlock("div", _hoisted_1, " [" + toDisplayString(unwrap(unref(label))) + "] No component for type \"" + toDisplayString(__props.field.customType ?? __props.field.type) + "\"" + toDisplayString(unref(componentName) ? ` (component "${unref(componentName)}" not supplied)` : ""), 1));
551
565
  };
552
566
  }
553
567
  });
@@ -263,7 +263,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
263
263
  const componentName = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_COMPONENT);
264
264
  const prefixIcon = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_PREFIX_ICON);
265
265
  const suffixIcon = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_SUFFIX_ICON);
266
- const valueHelp = (0, _atscript_ui.extractValueHelp)(prop);
266
+ const valueHelp = props.field.valueHelpInfo;
267
267
  const currencyLiteral = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.DB_AMOUNT_CURRENCY);
268
268
  const currencyRefField = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.DB_AMOUNT_CURRENCY_REF);
269
269
  const unitLiteral = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.DB_UNIT);
@@ -334,6 +334,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
334
334
  const inputId = `as-field-${(0, vue.useId)()}`;
335
335
  const errorId = `${inputId}-err`;
336
336
  const descId = `${inputId}-desc`;
337
+ const statusId = `${inputId}-status`;
337
338
  const formActionMeta = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.UI_FORM_ACTION);
338
339
  const wfActionWithData = (0, _atscript_ui.getFieldMeta)(prop, _atscript_ui.WF_ACTION_WITH_DATA);
339
340
  const formAction = formActionMeta ? {
@@ -493,7 +494,8 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
493
494
  hasAdornment,
494
495
  inputId,
495
496
  errorId,
496
- descId
497
+ descId,
498
+ statusId
497
499
  };
498
500
  const displayProps = (0, vue.computed)(() => {
499
501
  const titleValue = isRoot && hideRootTitle ? void 0 : unwrap(title);
@@ -527,12 +529,10 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
527
529
  const componentProps = (0, vue.computed)(() => {
528
530
  const dp = displayProps.value;
529
531
  const err = mergedError.value;
530
- const ariaDescribedBy = err || dp.hint ? errorId : dp.description ? descId : void 0;
531
532
  return {
532
533
  ...invariantProps,
533
534
  ...dp,
534
535
  error: err,
535
- ariaDescribedBy,
536
536
  class: [
537
537
  "as-grid-item",
538
538
  {
@@ -543,11 +543,25 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
543
543
  ]
544
544
  };
545
545
  });
546
+ const ariaDescribedBy = (0, vue.computed)(() => {
547
+ const dp = displayProps.value;
548
+ const err = mergedError.value;
549
+ const ids = [];
550
+ if (err || dp.hint) ids.push(errorId);
551
+ else if (dp.description) ids.push(descId);
552
+ if (isDirty.value) ids.push(statusId);
553
+ return ids.length > 0 ? ids.join(" ") : void 0;
554
+ });
546
555
  return (_ctx, _cache) => {
547
556
  return resolvedComponent.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(resolvedComponent.value), (0, vue.mergeProps)({ key: 0 }, componentProps.value, {
548
557
  "is-dirty": (0, vue.unref)(isDirty),
558
+ ariaDescribedBy: ariaDescribedBy.value,
549
559
  onAction: (0, vue.unref)(handleAction)
550
- }), null, 16, ["is-dirty", "onAction"])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, " [" + (0, vue.toDisplayString)(unwrap((0, vue.unref)(label))) + "] No component for type \"" + (0, vue.toDisplayString)(__props.field.customType ?? __props.field.type) + "\"" + (0, vue.toDisplayString)((0, vue.unref)(componentName) ? ` (component "${(0, vue.unref)(componentName)}" not supplied)` : ""), 1));
560
+ }), null, 16, [
561
+ "is-dirty",
562
+ "ariaDescribedBy",
563
+ "onAction"
564
+ ])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, " [" + (0, vue.toDisplayString)(unwrap((0, vue.unref)(label))) + "] No component for type \"" + (0, vue.toDisplayString)(__props.field.customType ?? __props.field.type) + "\"" + (0, vue.toDisplayString)((0, vue.unref)(componentName) ? ` (component "${(0, vue.unref)(componentName)}" not supplied)` : ""), 1));
551
565
  };
552
566
  }
553
567
  });
@@ -70,7 +70,8 @@ const _hoisted_12 = {
70
70
  class: "as-error-slot",
71
71
  "aria-hidden": "true"
72
72
  };
73
- const _hoisted_13 = ["disabled"];
73
+ const _hoisted_13 = ["id"];
74
+ const _hoisted_14 = ["disabled"];
74
75
  //#endregion
75
76
  //#region src/components/defaults/as-field-shell.vue
76
77
  var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -219,6 +220,10 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
219
220
  type: String,
220
221
  required: true
221
222
  },
223
+ statusId: {
224
+ type: String,
225
+ required: false
226
+ },
222
227
  ariaDescribedBy: {
223
228
  type: String,
224
229
  required: false
@@ -286,6 +291,7 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
286
291
  const labelParts = (0, vue.computed)(() => require_use_form_context.formatIndexedLabelParts(props.label, props.arrayIndex));
287
292
  const { rootRef, enableOptional } = require_focus_after_toggle.useAsFocusFirstAfter(props.onToggleOptional);
288
293
  const showOptionalClear = (0, vue.computed)(() => !!props.optional && optionalEnabled.value && !props.chromeless);
294
+ const statusId = (0, vue.computed)(() => props.statusId || `${props.inputId}-status`);
289
295
  const showEmptyPlaceholder = (0, vue.computed)(() => !!props.optional && !optionalEnabled.value && !props.chromeless && !props.hideEmptyPlaceholder);
290
296
  return (_ctx, _cache) => {
291
297
  return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
@@ -301,7 +307,9 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
301
307
  key: 0,
302
308
  inputId: __props.inputId,
303
309
  descId: __props.descId,
304
- optionalEnabled: optionalEnabled.value
310
+ optionalEnabled: optionalEnabled.value,
311
+ isDirty: !!__props.isDirty,
312
+ statusId: statusId.value
305
313
  }) : !__props.chromeless ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [labelParts.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("label", {
306
314
  key: 0,
307
315
  for: __props.inputId,
@@ -344,18 +352,36 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
344
352
  descId: __props.descId
345
353
  })]),
346
354
  (0, vue.renderSlot)(_ctx.$slots, "after-input", { descId: __props.descId }),
347
- __props.error || __props.hint || __props.formAction ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_10, [__props.error || __props.hint ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
348
- key: 0,
349
- id: __props.errorId,
350
- class: "as-error-slot",
351
- role: __props.error ? "alert" : void 0
352
- }, (0, vue.toDisplayString)(__props.error || __props.hint), 9, _hoisted_11)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_12)), __props.formAction ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
353
- key: 2,
354
- type: "button",
355
- class: "as-field-action-link",
356
- disabled: __props.disabled,
357
- onClick: _cache[2] || (_cache[2] = ($event) => emit("action", __props.formAction.id))
358
- }, (0, vue.toDisplayString)(__props.formAction.label), 9, _hoisted_13)) : (0, vue.createCommentVNode)("v-if", true)])) : (0, vue.createCommentVNode)("v-if", true)
355
+ __props.error || __props.hint || __props.formAction || __props.isDirty || _ctx.$slots.status ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_10, [
356
+ (0, vue.createCommentVNode)(" `status` owns the whole error/hint/announcement area: overriding it\n replaces the default markup wholesale (keep `statusId` on your own\n node so `aria-describedby` still resolves). "),
357
+ (0, vue.renderSlot)(_ctx.$slots, "status", {
358
+ isDirty: !!__props.isDirty,
359
+ error: __props.error,
360
+ hint: __props.hint,
361
+ statusId: statusId.value,
362
+ inputId: __props.inputId
363
+ }, () => [
364
+ __props.error || __props.hint ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
365
+ key: 0,
366
+ id: __props.errorId,
367
+ class: "as-error-slot",
368
+ role: __props.error ? "alert" : void 0
369
+ }, (0, vue.toDisplayString)(__props.error || __props.hint), 9, _hoisted_11)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_12)),
370
+ (0, vue.createCommentVNode)(" Visually hidden: the `data-dirty` rail is the sighted cue, this\n is its AT counterpart. `role=\"status\"` would make it a live\n region and re-announce on every keystroke — it is referenced\n through `aria-describedby` instead, which AsField appends on\n exactly this `isDirty` condition, so a clean field never points\n at a missing node. "),
371
+ __props.isDirty ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
372
+ key: 2,
373
+ id: statusId.value,
374
+ class: "as-field-status"
375
+ }, "Modified", 8, _hoisted_13)) : (0, vue.createCommentVNode)("v-if", true)
376
+ ]),
377
+ __props.formAction ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
378
+ key: 0,
379
+ type: "button",
380
+ class: "as-field-action-link",
381
+ disabled: __props.disabled,
382
+ onClick: _cache[2] || (_cache[2] = ($event) => emit("action", __props.formAction.id))
383
+ }, (0, vue.toDisplayString)(__props.formAction.label), 9, _hoisted_14)) : (0, vue.createCommentVNode)("v-if", true)
384
+ ])) : (0, vue.createCommentVNode)("v-if", true)
359
385
  ], 64))
360
386
  ], 14, _hoisted_1)), [[vue.vShow, !__props.hidden]]);
361
387
  };
@@ -70,7 +70,8 @@ const _hoisted_12 = {
70
70
  class: "as-error-slot",
71
71
  "aria-hidden": "true"
72
72
  };
73
- const _hoisted_13 = ["disabled"];
73
+ const _hoisted_13 = ["id"];
74
+ const _hoisted_14 = ["disabled"];
74
75
  //#endregion
75
76
  //#region src/components/defaults/as-field-shell.vue
76
77
  var as_field_shell_default = /* @__PURE__ */ defineComponent({
@@ -219,6 +220,10 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
219
220
  type: String,
220
221
  required: true
221
222
  },
223
+ statusId: {
224
+ type: String,
225
+ required: false
226
+ },
222
227
  ariaDescribedBy: {
223
228
  type: String,
224
229
  required: false
@@ -286,6 +291,7 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
286
291
  const labelParts = computed(() => formatIndexedLabelParts(props.label, props.arrayIndex));
287
292
  const { rootRef, enableOptional } = useAsFocusFirstAfter(props.onToggleOptional);
288
293
  const showOptionalClear = computed(() => !!props.optional && optionalEnabled.value && !props.chromeless);
294
+ const statusId = computed(() => props.statusId || `${props.inputId}-status`);
289
295
  const showEmptyPlaceholder = computed(() => !!props.optional && !optionalEnabled.value && !props.chromeless && !props.hideEmptyPlaceholder);
290
296
  return (_ctx, _cache) => {
291
297
  return withDirectives((openBlock(), createElementBlock("div", {
@@ -301,7 +307,9 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
301
307
  key: 0,
302
308
  inputId: __props.inputId,
303
309
  descId: __props.descId,
304
- optionalEnabled: optionalEnabled.value
310
+ optionalEnabled: optionalEnabled.value,
311
+ isDirty: !!__props.isDirty,
312
+ statusId: statusId.value
305
313
  }) : !__props.chromeless ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [labelParts.value ? (openBlock(), createElementBlock("label", {
306
314
  key: 0,
307
315
  for: __props.inputId,
@@ -344,18 +352,36 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
344
352
  descId: __props.descId
345
353
  })]),
346
354
  renderSlot(_ctx.$slots, "after-input", { descId: __props.descId }),
347
- __props.error || __props.hint || __props.formAction ? (openBlock(), createElementBlock("div", _hoisted_10, [__props.error || __props.hint ? (openBlock(), createElementBlock("div", {
348
- key: 0,
349
- id: __props.errorId,
350
- class: "as-error-slot",
351
- role: __props.error ? "alert" : void 0
352
- }, toDisplayString(__props.error || __props.hint), 9, _hoisted_11)) : (openBlock(), createElementBlock("span", _hoisted_12)), __props.formAction ? (openBlock(), createElementBlock("button", {
353
- key: 2,
354
- type: "button",
355
- class: "as-field-action-link",
356
- disabled: __props.disabled,
357
- onClick: _cache[2] || (_cache[2] = ($event) => emit("action", __props.formAction.id))
358
- }, toDisplayString(__props.formAction.label), 9, _hoisted_13)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)
355
+ __props.error || __props.hint || __props.formAction || __props.isDirty || _ctx.$slots.status ? (openBlock(), createElementBlock("div", _hoisted_10, [
356
+ createCommentVNode(" `status` owns the whole error/hint/announcement area: overriding it\n replaces the default markup wholesale (keep `statusId` on your own\n node so `aria-describedby` still resolves). "),
357
+ renderSlot(_ctx.$slots, "status", {
358
+ isDirty: !!__props.isDirty,
359
+ error: __props.error,
360
+ hint: __props.hint,
361
+ statusId: statusId.value,
362
+ inputId: __props.inputId
363
+ }, () => [
364
+ __props.error || __props.hint ? (openBlock(), createElementBlock("div", {
365
+ key: 0,
366
+ id: __props.errorId,
367
+ class: "as-error-slot",
368
+ role: __props.error ? "alert" : void 0
369
+ }, toDisplayString(__props.error || __props.hint), 9, _hoisted_11)) : (openBlock(), createElementBlock("span", _hoisted_12)),
370
+ createCommentVNode(" Visually hidden: the `data-dirty` rail is the sighted cue, this\n is its AT counterpart. `role=\"status\"` would make it a live\n region and re-announce on every keystroke — it is referenced\n through `aria-describedby` instead, which AsField appends on\n exactly this `isDirty` condition, so a clean field never points\n at a missing node. "),
371
+ __props.isDirty ? (openBlock(), createElementBlock("span", {
372
+ key: 2,
373
+ id: statusId.value,
374
+ class: "as-field-status"
375
+ }, "Modified", 8, _hoisted_13)) : createCommentVNode("v-if", true)
376
+ ]),
377
+ __props.formAction ? (openBlock(), createElementBlock("button", {
378
+ key: 0,
379
+ type: "button",
380
+ class: "as-field-action-link",
381
+ disabled: __props.disabled,
382
+ onClick: _cache[2] || (_cache[2] = ($event) => emit("action", __props.formAction.id))
383
+ }, toDisplayString(__props.formAction.label), 9, _hoisted_14)) : createCommentVNode("v-if", true)
384
+ ])) : createCommentVNode("v-if", true)
359
385
  ], 64))
360
386
  ], 14, _hoisted_1)), [[vShow, !__props.hidden]]);
361
387
  };
@@ -1,2 +1,2 @@
1
- const require_as_field_shell = require("./as-field-shell-_XX9G3PP.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-BrJpCzIA.cjs");
2
2
  module.exports = require_as_field_shell.as_field_shell_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field-shell.vue-CLDHaWN0.cjs";
1
+ import { t as _default } from "./as-field-shell.vue-B1ep312_.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field-shell.vue-DssDDSal.mjs";
1
+ import { t as _default } from "./as-field-shell.vue-BDtmxN8W.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-BErcR8c9.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-Bxqa_ZsU.mjs";
2
2
  export { as_field_shell_default as default };
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-B8aPXWL5.cjs";
1
+ import { o as TAsComponentProps } from "./types-Crwu2D-w.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-field-shell.vue.d.ts
@@ -11,12 +11,20 @@ declare var __VLS_1: {
11
11
  inputId: string;
12
12
  descId: string;
13
13
  optionalEnabled: boolean;
14
+ isDirty: boolean;
15
+ statusId: string;
14
16
  }, __VLS_20: {
15
17
  inputId: string;
16
18
  errorId: string;
17
19
  descId: string;
18
20
  }, __VLS_22: {
19
21
  descId: string;
22
+ }, __VLS_24: {
23
+ isDirty: boolean;
24
+ error: string | undefined;
25
+ hint: string | undefined;
26
+ statusId: string;
27
+ inputId: string;
20
28
  };
21
29
  type __VLS_Slots = {} & {
22
30
  header?: (props: typeof __VLS_1) => any;
@@ -24,6 +32,8 @@ type __VLS_Slots = {} & {
24
32
  default?: (props: typeof __VLS_20) => any;
25
33
  } & {
26
34
  'after-input'?: (props: typeof __VLS_22) => any;
35
+ } & {
36
+ status?: (props: typeof __VLS_24) => any;
27
37
  };
28
38
  declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
29
39
  action: (name: string) => any;
@@ -1,4 +1,4 @@
1
- import { o as TAsComponentProps } from "./types-nuUi10Kl.mjs";
1
+ import { o as TAsComponentProps } from "./types-QI-iGjsL.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-field-shell.vue.d.ts
@@ -11,12 +11,20 @@ declare var __VLS_1: {
11
11
  inputId: string;
12
12
  descId: string;
13
13
  optionalEnabled: boolean;
14
+ isDirty: boolean;
15
+ statusId: string;
14
16
  }, __VLS_20: {
15
17
  inputId: string;
16
18
  errorId: string;
17
19
  descId: string;
18
20
  }, __VLS_22: {
19
21
  descId: string;
22
+ }, __VLS_24: {
23
+ isDirty: boolean;
24
+ error: string | undefined;
25
+ hint: string | undefined;
26
+ statusId: string;
27
+ inputId: string;
20
28
  };
21
29
  type __VLS_Slots = {} & {
22
30
  header?: (props: typeof __VLS_1) => any;
@@ -24,6 +32,8 @@ type __VLS_Slots = {} & {
24
32
  default?: (props: typeof __VLS_20) => any;
25
33
  } & {
26
34
  'after-input'?: (props: typeof __VLS_22) => any;
35
+ } & {
36
+ status?: (props: typeof __VLS_24) => any;
27
37
  };
28
38
  declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
29
39
  action: (name: string) => any;
package/dist/as-field.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_field = require("./as-field-CPs6XuAQ.cjs");
1
+ const require_as_field = require("./as-field-C502boQy.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-Ig0b9u6L.mjs";
1
+ import { t as as_field_default } from "./as-field-BJ1WciIp.mjs";
2
2
  export { as_field_default as default };
@@ -1,8 +1,8 @@
1
1
  import { _ as TYPES_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_PATCH_KEY, f as FORM_STATE_KEY, g as ROOT_DATA_KEY, h as PATH_PREFIX_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, o as COMPONENTS_KEY, p as HIDE_ROOT_TITLE_KEY, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY } from "./use-form-context-cDW2GW4-.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 { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-DrISSxCz.mjs";
4
- import { t as as_field_default } from "./as-field-Ig0b9u6L.mjs";
5
- import { t as as_iterator_default } from "./as-iterator-DTA-Td2M.mjs";
4
+ import { t as as_field_default } from "./as-field-BJ1WciIp.mjs";
5
+ import { t as as_iterator_default } from "./as-iterator-BU5Hj5K6.mjs";
6
6
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, nextTick, normalizeProps, openBlock, provide, reactive, ref, renderSlot, shallowRef, toDisplayString, toRaw, toValue, unref, watch, watchEffect, withModifiers } from "vue";
7
7
  import { 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, getDeclaredFormActions, getFormValidator, iteratePathAncestors, mergeErrorMaps, omitPaths, resolveFormProp, setByPath, unionVariantChanged } from "@atscript/ui";
8
8
  //#region src/composables/use-as-form-patch.ts
@@ -12,6 +12,10 @@ import { META_DESCRIPTION, META_LABEL, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_SUBMIT
12
12
  *
13
13
  * - captures a DEEP CLONE of the wrapped form-data the moment tracking becomes
14
14
  * active (and, if data is not yet available, when it first arrives),
15
+ * - re-captures automatically when the container's `value` is replaced by
16
+ * identity while the form is still CLEAN (since 0.1.134) — the fetch-then-fill
17
+ * `formData.value = row` on a form seeded with `createAsFormDef` defaults; a
18
+ * DIRTY swap keeps the old baseline and still needs an explicit rebase,
15
19
  * - re-baselines on `reset()` (the form's own reset path calls `rebase()`),
16
20
  * - exposes `rebase()` so a consumer can re-baseline after a successful save.
17
21
  *
@@ -72,13 +76,15 @@ function createAsFormPatch(def, getData, onRebased) {
72
76
  baselineRev.value++;
73
77
  }
74
78
  capture();
75
- if (baseline === void 0) {
76
- const stop = watch(() => getData().value, () => {
77
- if (baseline !== void 0) return;
79
+ watch(() => getData().value, (next, prev) => {
80
+ if (next === prev) return;
81
+ if (baseline === void 0) {
78
82
  capture();
79
- if (baseline !== void 0) stop();
80
- });
81
- }
83
+ return;
84
+ }
85
+ if (prev !== void 0 && buildFormDiff(def(), baseline, { value: prev }).isDirty) return;
86
+ capture();
87
+ }, { flush: "sync" });
82
88
  watch(() => getData(), () => dataRev.value++, { deep: true });
83
89
  const diff = computed(() => {
84
90
  dataRev.value;
@@ -1,8 +1,8 @@
1
1
  const require_use_form_context = require("./use-form-context-B6ZnzfxG.cjs");
2
2
  const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-u1VgBJAP.cjs");
3
3
  const require_use_as_value_help = require("./use-as-value-help-BsAriqCI.cjs");
4
- const require_as_field = require("./as-field-CPs6XuAQ.cjs");
5
- const require_as_iterator = require("./as-iterator-DO3kLK3y.cjs");
4
+ const require_as_field = require("./as-field-C502boQy.cjs");
5
+ const require_as_iterator = require("./as-iterator-QM6LyYvA.cjs");
6
6
  let vue = require("vue");
7
7
  let _atscript_ui = require("@atscript/ui");
8
8
  //#region src/composables/use-as-form-patch.ts
@@ -12,6 +12,10 @@ let _atscript_ui = require("@atscript/ui");
12
12
  *
13
13
  * - captures a DEEP CLONE of the wrapped form-data the moment tracking becomes
14
14
  * active (and, if data is not yet available, when it first arrives),
15
+ * - re-captures automatically when the container's `value` is replaced by
16
+ * identity while the form is still CLEAN (since 0.1.134) — the fetch-then-fill
17
+ * `formData.value = row` on a form seeded with `createAsFormDef` defaults; a
18
+ * DIRTY swap keeps the old baseline and still needs an explicit rebase,
15
19
  * - re-baselines on `reset()` (the form's own reset path calls `rebase()`),
16
20
  * - exposes `rebase()` so a consumer can re-baseline after a successful save.
17
21
  *
@@ -72,13 +76,15 @@ function createAsFormPatch(def, getData, onRebased) {
72
76
  baselineRev.value++;
73
77
  }
74
78
  capture();
75
- if (baseline === void 0) {
76
- const stop = (0, vue.watch)(() => getData().value, () => {
77
- if (baseline !== void 0) return;
79
+ (0, vue.watch)(() => getData().value, (next, prev) => {
80
+ if (next === prev) return;
81
+ if (baseline === void 0) {
78
82
  capture();
79
- if (baseline !== void 0) stop();
80
- });
81
- }
83
+ return;
84
+ }
85
+ if (prev !== void 0 && (0, _atscript_ui.buildFormDiff)(def(), baseline, { value: prev }).isDirty) return;
86
+ capture();
87
+ }, { flush: "sync" });
82
88
  (0, vue.watch)(() => getData(), () => dataRev.value++, { deep: true });
83
89
  const diff = (0, vue.computed)(() => {
84
90
  dataRev.value;
package/dist/as-form.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_form = require("./as-form-Cxd-3uDW.cjs");
1
+ const require_as_form = require("./as-form-Dw0Xo5zF.cjs");
2
2
  module.exports = require_as_form.as_form_default;
@@ -1,2 +1,2 @@
1
- import { n as _default, t as Props } from "./as-form.vue-D7yYIL7K.cjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-DiV2bl5k.cjs";
2
2
  export { Props, _default as default };
@@ -1,2 +1,2 @@
1
- import { n as _default, t as Props } from "./as-form.vue-gLfk4dns.mjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-DsgeJ_jU.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-CUcSK8l-.mjs";
1
+ import { t as as_form_default } from "./as-form-B4nL-BjV.mjs";
2
2
  export { as_form_default as default };
@@ -1,11 +1,11 @@
1
- import { c as TAsUnionContext, n as TAsChangeType, o as TAsComponentProps, s as TAsTypeComponents } from "./types-B8aPXWL5.cjs";
1
+ import { c as TAsUnionContext, n as TAsChangeType, o as TAsComponentProps, s as TAsTypeComponents } from "./types-Crwu2D-w.cjs";
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";
5
5
  import { ClientFactory, ClientFactory as ClientFactory$1, FormArrayFieldDef, FormDef, FormDiffOptions, FormDiffOptions as FormDiffOptions$1, FormFieldChange, FormFieldChange as FormFieldChange$1, FormFieldDef, FormRebaseOptions, FormRebaseOptions as FormRebaseOptions$1, FormTupleFieldDef, FormUnionFieldDef, FormUnionVariant, ResolvedValueHelp, TResolveOptions, ValueHelpInfo, getDefaultClientFactory, hasFieldMeta, isFieldHidden, joinPath, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
6
6
  import { TFnScope } from "@atscript/ui-fns";
7
7
 
8
- //#region ../../node_modules/.pnpm/@atscript+typescript@0.1.89_@atscript+core@0.1.89_@emnapi+core@1.10.0_@emnapi+runtime@1_b0e5f363a69ffdf76d52ca9544abe0f7/node_modules/@atscript/typescript/dist/utils.d.ts
8
+ //#region ../../node_modules/.pnpm/@atscript+typescript@0.1.93_@atscript+core@0.1.93_@emnapi+core@1.10.0_@emnapi+runtime@1_a796dd4971fc7870194f328c92da82ae/node_modules/@atscript/typescript/dist/utils.d.ts
9
9
  interface TError {
10
10
  path: string;
11
11
  message: string;
@@ -1,11 +1,11 @@
1
- import { c as TAsUnionContext, n as TAsChangeType, o as TAsComponentProps, s as TAsTypeComponents } from "./types-nuUi10Kl.mjs";
1
+ import { c as TAsUnionContext, n as TAsChangeType, o as TAsComponentProps, s as TAsTypeComponents } from "./types-QI-iGjsL.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";
5
5
  import { ClientFactory, ClientFactory as ClientFactory$1, FormArrayFieldDef, FormDef, FormDiffOptions, FormDiffOptions as FormDiffOptions$1, FormFieldChange, FormFieldChange as FormFieldChange$1, FormFieldDef, FormRebaseOptions, FormRebaseOptions as FormRebaseOptions$1, FormTupleFieldDef, FormUnionFieldDef, FormUnionVariant, ResolvedValueHelp, TResolveOptions, ValueHelpInfo, getDefaultClientFactory, hasFieldMeta as hasFieldMeta$1, isFieldHidden as isFieldHidden$1, joinPath as joinPath$1, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
6
6
  import { TFnScope } from "@atscript/ui-fns";
7
7
 
8
- //#region ../../node_modules/.pnpm/@atscript+typescript@0.1.89_@atscript+core@0.1.89_@emnapi+core@1.10.0_@emnapi+runtime@1_b0e5f363a69ffdf76d52ca9544abe0f7/node_modules/@atscript/typescript/dist/utils.d.ts
8
+ //#region ../../node_modules/.pnpm/@atscript+typescript@0.1.93_@atscript+core@0.1.93_@emnapi+core@1.10.0_@emnapi+runtime@1_a796dd4971fc7870194f328c92da82ae/node_modules/@atscript/typescript/dist/utils.d.ts
9
9
  interface TError {
10
10
  path: string;
11
11
  message: string;
@@ -1,5 +1,5 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-BErcR8c9.mjs";
2
- import { t as as_input_control_default } from "./as-input-control-BofS4mCo.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-Bxqa_ZsU.mjs";
2
+ import { t as as_input_control_default } from "./as-input-control-4W60Kbyl.mjs";
3
3
  import { t as as_adornment_shell_default } from "./as-adornment-shell-C4A2fnDp.mjs";
4
4
  import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, withCtx } from "vue";
5
5
  //#endregion
@@ -150,6 +150,10 @@ var as_input_default = /* @__PURE__ */ defineComponent({
150
150
  type: String,
151
151
  required: true
152
152
  },
153
+ statusId: {
154
+ type: String,
155
+ required: false
156
+ },
153
157
  ariaDescribedBy: {
154
158
  type: String,
155
159
  required: false
@@ -1,5 +1,5 @@
1
- const require_as_field_shell = require("./as-field-shell-_XX9G3PP.cjs");
2
- const require_as_input_control = require("./as-input-control-B7F2q99A.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-BrJpCzIA.cjs");
2
+ const require_as_input_control = require("./as-input-control-Dtvrw_PS.cjs");
3
3
  const require_as_adornment_shell = require("./as-adornment-shell-DptUMWNk.cjs");
4
4
  let vue = require("vue");
5
5
  //#endregion
@@ -150,6 +150,10 @@ var as_input_default = /* @__PURE__ */ (0, vue.defineComponent)({
150
150
  type: String,
151
151
  required: true
152
152
  },
153
+ statusId: {
154
+ type: String,
155
+ required: false
156
+ },
153
157
  ariaDescribedBy: {
154
158
  type: String,
155
159
  required: false
@@ -173,6 +173,10 @@ var as_input_control_default = /* @__PURE__ */ defineComponent({
173
173
  type: String,
174
174
  required: true
175
175
  },
176
+ statusId: {
177
+ type: String,
178
+ required: false
179
+ },
176
180
  ariaDescribedBy: {
177
181
  type: String,
178
182
  required: false
@@ -173,6 +173,10 @@ var as_input_control_default = /* @__PURE__ */ (0, vue.defineComponent)({
173
173
  type: String,
174
174
  required: true
175
175
  },
176
+ statusId: {
177
+ type: String,
178
+ required: false
179
+ },
176
180
  ariaDescribedBy: {
177
181
  type: String,
178
182
  required: false