@atscript/vue-form 0.1.206 → 0.1.207

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 (209) hide show
  1. package/dist/{as-action-rT6WXLph.cjs → as-action-BGIbuTxh.cjs} +3 -3
  2. package/dist/{as-action-kBskX68v.mjs → as-action-CPQ64nNi.mjs} +3 -3
  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-B7RrjGhF.d.cts → as-action.vue-BjGc3z94.d.mts} +1 -1
  8. package/dist/{as-action.vue-Dtez-EWu.d.mts → as-action.vue-wGCmd-ww.d.cts} +1 -1
  9. package/dist/{as-array-C5lqDDLN.cjs → as-array-BCmGCZul.cjs} +10 -10
  10. package/dist/{as-array-Tt_4kl5r.mjs → as-array-CHVronOS.mjs} +10 -10
  11. package/dist/{as-array-clear-btn-Dk88CYmS.cjs → as-array-clear-btn-BolX7Wpe.cjs} +1 -1
  12. package/dist/{as-array-clear-btn-DGUQY_7_.mjs → as-array-clear-btn-DOBKhLCy.mjs} +1 -1
  13. package/dist/as-array.cjs +1 -1
  14. package/dist/as-array.d.cts +1 -1
  15. package/dist/as-array.d.mts +1 -1
  16. package/dist/as-array.mjs +1 -1
  17. package/dist/{as-array.vue-Ca_xan2n.d.mts → as-array.vue-BB22gE0u.d.cts} +1 -1
  18. package/dist/{as-array.vue-Dp_zd3ZM.d.cts → as-array.vue-CgYp_DSb.d.mts} +1 -1
  19. package/dist/{as-checkbox-D7NywgIa.cjs → as-checkbox-BKWtScvS.cjs} +7 -17
  20. package/dist/{as-checkbox-CCX9E19U.mjs → as-checkbox-BX5N5GHR.mjs} +7 -17
  21. package/dist/as-checkbox.cjs +1 -1
  22. package/dist/as-checkbox.d.cts +1 -1
  23. package/dist/as-checkbox.d.mts +1 -1
  24. package/dist/as-checkbox.mjs +1 -1
  25. package/dist/{as-checkbox.vue-BClSBx1g.d.mts → as-checkbox.vue-CQzeu4IP.d.mts} +1 -1
  26. package/dist/{as-checkbox.vue-Bf3qqcKu.d.cts → as-checkbox.vue-RTW5hwvE.d.cts} +1 -1
  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-BXdpM7_K.d.cts → as-collapsible.vue-BKN4DmSy.d.mts} +1 -1
  32. package/dist/{as-collapsible.vue-CUhn1EVX.d.mts → as-collapsible.vue-CPmozkkf.d.cts} +1 -1
  33. package/dist/{as-date-3haOaiAG.mjs → as-date-Bkrp2GY4.mjs} +6 -6
  34. package/dist/{as-date-Ubw_1-Ai.cjs → as-date-C6tT9FPz.cjs} +6 -6
  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-B5NWZ5ON.d.cts → as-date.vue-BpfWumrA.d.cts} +1 -1
  40. package/dist/{as-date.vue-CJQOrfj3.d.mts → as-date.vue-DJ125nVS.d.mts} +1 -1
  41. package/dist/{as-datetime--7bl-yGW.cjs → as-datetime-DWLW4W7O.cjs} +6 -6
  42. package/dist/{as-datetime-BTekpasP.mjs → as-datetime-Dt_AWrCG.mjs} +6 -6
  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-BvmFdGxe.d.cts → as-datetime.vue-DO3tkof1.d.cts} +1 -1
  48. package/dist/{as-datetime.vue-CzMz_RUy.d.mts → as-datetime.vue-DfFAaVdS.d.mts} +1 -1
  49. package/dist/{as-decimal-7CIE6UKX.mjs → as-decimal-BUr24VTI.mjs} +5 -5
  50. package/dist/{as-decimal-DWPRXsYY.cjs → as-decimal-DuWZDjbg.cjs} +5 -5
  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-DdVqHtMT.d.cts → as-decimal.vue-BODauGXK.d.mts} +1 -1
  56. package/dist/{as-decimal.vue-DyDt1ds0.d.mts → as-decimal.vue-C42_-oK9.d.cts} +1 -1
  57. package/dist/{as-field-jh5AWref.mjs → as-field-iQ2H3VGd.mjs} +30 -42
  58. package/dist/{as-field-DAClnYiP.cjs → as-field-lMMfms8d.cjs} +29 -41
  59. package/dist/{as-field-shell-Cu8jxZYj.cjs → as-field-shell-BPesuJKa.cjs} +6 -6
  60. package/dist/{as-field-shell-DPzfvPo0.mjs → as-field-shell-QMsYyJ8r.mjs} +6 -6
  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-CPy2uA-b.d.mts → as-field-shell.vue-CQqwykWy.d.cts} +1 -1
  66. package/dist/{as-field-shell.vue-D-8AWUGW.d.cts → as-field-shell.vue-o7T2u4aw.d.mts} +1 -1
  67. package/dist/as-field.cjs +1 -1
  68. package/dist/as-field.d.mts +1 -1
  69. package/dist/as-field.mjs +1 -1
  70. package/dist/{as-form-B8d1MVTB.mjs → as-form-CuMRP5aZ.mjs} +26 -9
  71. package/dist/{as-form-r5pkXt5U.cjs → as-form-DE3TVGV-.cjs} +25 -8
  72. package/dist/as-form.cjs +1 -1
  73. package/dist/as-form.d.cts +1 -1
  74. package/dist/as-form.d.mts +1 -1
  75. package/dist/as-form.mjs +1 -1
  76. package/dist/{as-form.vue-BvRHy6mu.d.cts → as-form.vue-B9MZrw7V.d.cts} +16 -38
  77. package/dist/{as-form.vue-D1AS3Xf6.d.mts → as-form.vue-DwqofFJa.d.mts} +16 -38
  78. package/dist/{as-input-tKw19JnF.mjs → as-input-BEP6nX82.mjs} +6 -6
  79. package/dist/{as-input-BTbu0eF-.cjs → as-input-BrgRxZag.cjs} +6 -6
  80. package/dist/{as-input-control-1igViaqC.mjs → as-input-control-CINIJm-h.mjs} +13 -5
  81. package/dist/{as-input-control-uJpmle-G.cjs → as-input-control-DXJBrgih.cjs} +13 -5
  82. package/dist/as-input.cjs +1 -1
  83. package/dist/as-input.d.cts +1 -1
  84. package/dist/as-input.d.mts +1 -1
  85. package/dist/as-input.mjs +1 -1
  86. package/dist/{as-input.vue-CuC3DYeR.d.cts → as-input.vue-Cl8DTJqr.d.cts} +1 -1
  87. package/dist/{as-input.vue-DawR7pA-.d.mts → as-input.vue-CqV91VOb.d.mts} +1 -1
  88. package/dist/{as-iterator-B1o83rKV.mjs → as-iterator-DbCm61j1.mjs} +1 -1
  89. package/dist/{as-iterator-q_w9HBHt.cjs → as-iterator-DeLt7-BO.cjs} +1 -1
  90. package/dist/as-iterator.cjs +1 -1
  91. package/dist/as-iterator.d.mts +1 -1
  92. package/dist/as-iterator.mjs +1 -1
  93. package/dist/{as-multi-select-DPQ9_Qf1.cjs → as-multi-select-CJ3iRsiL.cjs} +4 -4
  94. package/dist/{as-multi-select-DhOlsgdq.mjs → as-multi-select-Ca2ULklw.mjs} +4 -4
  95. package/dist/as-multi-select.cjs +1 -1
  96. package/dist/as-multi-select.d.cts +1 -1
  97. package/dist/as-multi-select.d.mts +1 -1
  98. package/dist/as-multi-select.mjs +1 -1
  99. package/dist/{as-multi-select.vue-CbVBJq8N.d.mts → as-multi-select.vue-B6M_f7u-.d.cts} +1 -1
  100. package/dist/{as-multi-select.vue-CXC47PBk.d.cts → as-multi-select.vue-Cvvy1kMm.d.mts} +1 -1
  101. package/dist/{as-number-CJmX5rb1.cjs → as-number-CHXaKqtg.cjs} +5 -5
  102. package/dist/{as-number-CVjNUjiS.mjs → as-number-CgHRTx6P.mjs} +5 -5
  103. package/dist/as-number.cjs +1 -1
  104. package/dist/as-number.d.cts +1 -1
  105. package/dist/as-number.d.mts +1 -1
  106. package/dist/as-number.mjs +1 -1
  107. package/dist/{as-number.vue-BdNvLZca.d.mts → as-number.vue-5U6oFVJC.d.cts} +1 -1
  108. package/dist/{as-number.vue-hJuiJJ70.d.cts → as-number.vue-BN6_1oQf.d.mts} +1 -1
  109. package/dist/{as-object-DY5IEc94.mjs → as-object-BCeBkKCo.mjs} +7 -7
  110. package/dist/{as-object-Dq5CPM3i.cjs → as-object-Babu0BIk.cjs} +7 -7
  111. package/dist/as-object.cjs +1 -1
  112. package/dist/as-object.d.cts +1 -1
  113. package/dist/as-object.d.mts +1 -1
  114. package/dist/as-object.mjs +1 -1
  115. package/dist/{as-object.vue-DHFGLetx.d.cts → as-object.vue-BNCOIwjS.d.mts} +1 -1
  116. package/dist/{as-object.vue-DVK_BKOL.d.mts → as-object.vue-BnUdIcLW.d.cts} +1 -1
  117. package/dist/{as-paragraph-CaytophZ.cjs → as-paragraph-DHtc4LrM.cjs} +3 -3
  118. package/dist/{as-paragraph-ChOqmJe2.mjs → as-paragraph-ScTsCm_J.mjs} +3 -3
  119. package/dist/as-paragraph.cjs +1 -1
  120. package/dist/as-paragraph.d.cts +1 -1
  121. package/dist/as-paragraph.d.mts +1 -1
  122. package/dist/as-paragraph.mjs +1 -1
  123. package/dist/{as-paragraph.vue-6mBonWFb.d.mts → as-paragraph.vue-80Q1bZMd.d.cts} +1 -1
  124. package/dist/{as-paragraph.vue-B_aPmK-B.d.cts → as-paragraph.vue-Dhy9ke_Z.d.mts} +1 -1
  125. package/dist/{as-radio-C6PnEdjD.cjs → as-radio-BFM_CPvW.cjs} +4 -4
  126. package/dist/{as-radio-BW9K8h6V.mjs → as-radio-CL6Np-X5.mjs} +4 -4
  127. package/dist/as-radio.cjs +1 -1
  128. package/dist/as-radio.d.cts +1 -1
  129. package/dist/as-radio.d.mts +1 -1
  130. package/dist/as-radio.mjs +1 -1
  131. package/dist/{as-radio.vue-BFxeAHfl.d.mts → as-radio.vue-ByorW-nk.d.cts} +1 -1
  132. package/dist/{as-radio.vue-B_tDoVl1.d.cts → as-radio.vue-CLdvEAmZ.d.mts} +1 -1
  133. package/dist/{as-ref-DTsWT_zU.cjs → as-ref-CEj1RBnH.cjs} +14 -14
  134. package/dist/{as-ref-CXtYo-UZ.mjs → as-ref-D14yC6np.mjs} +14 -14
  135. package/dist/as-ref.cjs +1 -1
  136. package/dist/as-ref.d.cts +1 -1
  137. package/dist/as-ref.d.mts +1 -1
  138. package/dist/as-ref.mjs +1 -1
  139. package/dist/{as-ref.vue-CqFDKTYk.d.mts → as-ref.vue--ISeV6VM.d.cts} +1 -1
  140. package/dist/{as-ref.vue-gCsaCDQx.d.cts → as-ref.vue-DW7vsBE6.d.mts} +1 -1
  141. package/dist/{as-select-DOvo86Oc.cjs → as-select-B-ZeOCu5.cjs} +7 -16
  142. package/dist/{as-select-CbZNupL6.mjs → as-select-BME-vti2.mjs} +8 -17
  143. package/dist/as-select.cjs +1 -1
  144. package/dist/as-select.d.cts +1 -1
  145. package/dist/as-select.d.mts +1 -1
  146. package/dist/as-select.mjs +1 -1
  147. package/dist/{as-select.vue-BN3zvSGs.d.mts → as-select.vue-BEfTkycX.d.cts} +1 -1
  148. package/dist/{as-select.vue-Bh7ppdg9.d.cts → as-select.vue-C45NS5Rq.d.mts} +1 -1
  149. package/dist/{as-time-CfnhY3Pf.cjs → as-time-CnuojSkh.cjs} +6 -6
  150. package/dist/{as-time-BDpnkjy8.mjs → as-time-HRZh7pdx.mjs} +6 -6
  151. package/dist/as-time.cjs +1 -1
  152. package/dist/as-time.d.cts +1 -1
  153. package/dist/as-time.d.mts +1 -1
  154. package/dist/as-time.mjs +1 -1
  155. package/dist/{as-time.vue-C-ruJhmX.d.mts → as-time.vue--Qmcr-O0.d.cts} +1 -1
  156. package/dist/{as-time.vue-C_0z-HOS.d.cts → as-time.vue-0M0m0DXe.d.mts} +1 -1
  157. package/dist/{as-tuple-C5_dcvsH.cjs → as-tuple-XpcKK1LK.cjs} +8 -8
  158. package/dist/{as-tuple--wL64cCu.mjs → as-tuple-qHmf6fwJ.mjs} +8 -8
  159. package/dist/as-tuple.cjs +1 -1
  160. package/dist/as-tuple.d.cts +1 -1
  161. package/dist/as-tuple.d.mts +1 -1
  162. package/dist/as-tuple.mjs +1 -1
  163. package/dist/{as-tuple.vue-BDiSN-np.d.cts → as-tuple.vue-CKbx_YFz.d.mts} +1 -1
  164. package/dist/{as-tuple.vue-CGWun6Iw.d.mts → as-tuple.vue-Di5D2HD4.d.cts} +1 -1
  165. package/dist/{as-union-DAnpGBeK.mjs → as-union-Ca5o9xw2.mjs} +7 -7
  166. package/dist/{as-union-D3NoKN1H.cjs → as-union-CwB0ACpI.cjs} +7 -7
  167. package/dist/as-union.cjs +1 -1
  168. package/dist/as-union.d.cts +1 -1
  169. package/dist/as-union.d.mts +1 -1
  170. package/dist/as-union.mjs +1 -1
  171. package/dist/{as-union.vue-BpcREl7L.d.mts → as-union.vue-UnG0zG81.d.cts} +1 -1
  172. package/dist/{as-union.vue-DuUeLY1X.d.cts → as-union.vue-eGlHN_hp.d.mts} +1 -1
  173. package/dist/{as-variant-picker-CihlFH-c.mjs → as-variant-picker-CKSLKefM.mjs} +2 -2
  174. package/dist/{as-variant-picker-CpCxKFtT.cjs → as-variant-picker-CceIhZUk.cjs} +2 -2
  175. package/dist/index.cjs +29 -27
  176. package/dist/index.d.cts +23 -23
  177. package/dist/index.d.mts +25 -25
  178. package/dist/index.mjs +29 -28
  179. package/dist/locale.cjs +2 -0
  180. package/dist/locale.d.cts +2 -2
  181. package/dist/locale.d.mts +2 -2
  182. package/dist/locale.mjs +2 -1
  183. package/dist/{types-271BUWyf.d.mts → types-C5Gx4ZuF.d.mts} +86 -8
  184. package/dist/{types-DbjorSCn.d.cts → types-D23g9Vs-.d.cts} +86 -8
  185. package/dist/{use-as-date-iSu5NS79.mjs → use-as-date-B2hKWXAl.mjs} +3 -3
  186. package/dist/{use-as-date-BigwPKEs.cjs → use-as-date-BWJbi_j2.cjs} +3 -3
  187. package/dist/{use-as-value-help-DE8KCbqo.mjs → use-as-value-help-B5yNO1tE.mjs} +45 -28
  188. package/dist/{use-as-value-help-CQMUkP1r.cjs → use-as-value-help-ZR_BvS0L.cjs} +48 -25
  189. package/dist/{use-as-locale-D4NDG8Vg.d.mts → use-value-help-texts-BL1qfGA2.d.cts} +26 -2
  190. package/dist/use-value-help-texts-LySFdZya.mjs +52 -0
  191. package/dist/{use-as-locale-CtvT6oO5.d.cts → use-value-help-texts-fzgKU4NG.d.mts} +26 -2
  192. package/dist/use-value-help-texts-ikiPKy-U.cjs +57 -0
  193. package/package.json +9 -9
  194. /package/dist/{_editing-hold-D2uqwszu.cjs → _editing-hold-DbM25sc_.cjs} +0 -0
  195. /package/dist/{_editing-hold-D_X5gXHh.mjs → _editing-hold-s65mkJu2.mjs} +0 -0
  196. /package/dist/{_shape-A661ZxnJ.mjs → _shape-CnW2sBRs.mjs} +0 -0
  197. /package/dist/{_shape-7OdPsQao.cjs → _shape-DPDZTV_T.cjs} +0 -0
  198. /package/dist/{as-adornment-shell-CBaksXGT.mjs → as-adornment-shell-C_z_q-mz.mjs} +0 -0
  199. /package/dist/{as-adornment-shell-CmS9BOFm.cjs → as-adornment-shell-CgwCACXA.cjs} +0 -0
  200. /package/dist/{as-collapsible-CvBoWb0D.mjs → as-collapsible-B9KPgJyo.mjs} +0 -0
  201. /package/dist/{as-collapsible-CTOLQ3IK.cjs → as-collapsible-C37-3_Rp.cjs} +0 -0
  202. /package/dist/{as-field.vue-BWaTLJd6.d.mts → as-field.vue-BMg2Ep8h.d.mts} +0 -0
  203. /package/dist/{as-iterator.vue-BUCohjxw.d.mts → as-iterator.vue-BdUxcovH.d.mts} +0 -0
  204. /package/dist/{use-as-model-texts-C3V56UDt.cjs → use-as-model-texts-BSFCEwAa.cjs} +0 -0
  205. /package/dist/{use-as-model-texts-Cpx5bHJQ.mjs → use-as-model-texts-BXSEzUWJ.mjs} +0 -0
  206. /package/dist/{use-as-optional-add-flow-DMDd4Ms0.cjs → use-as-optional-add-flow-CsUjhfkc.cjs} +0 -0
  207. /package/dist/{use-as-optional-add-flow-C1Ol6KO2.mjs → use-as-optional-add-flow-WA-R6yXz.mjs} +0 -0
  208. /package/dist/{variant-label-_GLezszT.cjs → variant-label-CSzBE4T6.cjs} +0 -0
  209. /package/dist/{variant-label-CmzTQC2B.mjs → variant-label-Drm3s-28.mjs} +0 -0
@@ -1,10 +1,10 @@
1
1
  import { _ as LOCK_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_NORMALIZED_DATA_KEY, f as FORM_OPTIONAL_KEY, g as LEVEL_KEY, h as HIDE_ROOT_TITLE_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as FORM_STATE_KEY, o as COMPONENTS_KEY, p as FORM_PATCH_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY, x as TYPES_KEY, y as PATH_PREFIX_KEY } from "./use-form-context-0FtVVTvf.mjs";
2
- import { n as useAsValueHelp, r as useAsData } from "./use-as-value-help-DE8KCbqo.mjs";
2
+ import { i as useAsData, n as useAsValueHelp } from "./use-as-value-help-B5yNO1tE.mjs";
3
3
  import { a as useAsLocale, o as useAsTexts } from "./use-as-locale-CznDr-7i.mjs";
4
- import { t as useAsModelTexts } from "./use-as-model-texts-Cpx5bHJQ.mjs";
5
- import { r as soleRow } from "./_shape-A661ZxnJ.mjs";
4
+ import { t as useAsModelTexts } from "./use-as-model-texts-BXSEzUWJ.mjs";
5
+ import { r as soleRow } from "./_shape-CnW2sBRs.mjs";
6
6
  import { computed, createBlock, createElementBlock, defineComponent, inject, isRef, mergeProps, onUnmounted, openBlock, provide, ref, resolveDynamicComponent, toDisplayString, unref, useId, watch } from "vue";
7
- 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_LABEL_SINGULAR, 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, VALUE_HELP_OPTIONS_CAP, WF_ACTION_WITH_DATA, arrangeText, buildGridClasses, createFieldValidator, emptiedValue, fieldText, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isTupleField, isUnionField, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptionalMode, resolveOptions, resolveSingularLabel, userText, valueHelpOptions, valueLabelOf } from "@atscript/ui";
7
+ 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_LABEL_SINGULAR, 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, VALUE_HELP_OPTIONS_CAP, WF_ACTION_WITH_DATA, buildGridClasses, createFieldValidator, emptiedValue, fieldText, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isTupleField, isUnionField, listsDictionary, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptionalMode, resolveOptions, resolveSingularLabel, userText, valueHelpDropdown, valueHelpKey } from "@atscript/ui";
8
8
  import { buildFieldEntry } from "@atscript/ui-fns";
9
9
  //#region src/composables/use-as-field.ts
10
10
  function useAsField(opts) {
@@ -169,12 +169,12 @@ function isDev() {
169
169
  }
170
170
  const isEmpty = (v) => v === void 0 || v === null || v === "";
171
171
  /**
172
- * Options of a `select` / `radio` field bound to a dictionary (`@ui.valueHelp`
173
- * or `@db.rel.FK`) that declares no options of its own (since 0.1.190): one
174
- * read of the dictionary in the binding's scope — the form's host values
175
- * included, read again when they change — with the select of every
176
- * value-help read, capped at `VALUE_HELP_OPTIONS_CAP`. A longer list
177
- * sets `overflow` (and warns once in development) until a read fits again.
172
+ * Options of a `select` / `radio` field that lists its dictionary
173
+ * (`listsDictionary`, since 0.1.190): one search of `VALUE_HELP_OPTIONS_CAP + 1`
174
+ * rows in the binding's scope — the form's host values included, searched
175
+ * again when they change, and again in a new locale — as `valueHelpDropdown`
176
+ * lists them. A list longer than the cap sets `overflow` (and warns once in
177
+ * development) until a search fits again.
178
178
  */
179
179
  function useAsValueHelpOptions(opts) {
180
180
  const { info, model, onBlur } = opts;
@@ -184,31 +184,27 @@ function useAsValueHelpOptions(opts) {
184
184
  onBlur,
185
185
  limit: VALUE_HELP_OPTIONS_CAP + 1
186
186
  });
187
- const overflow = ref(false);
188
- watch(vh.results, (rows) => {
189
- overflow.value = rows.length > VALUE_HELP_OPTIONS_CAP;
190
- if (!overflow.value) return;
191
- const key = `${info.url}\0${info.targetField}`;
192
- if (isDev() && !warned.has(key)) {
187
+ /** The dictionary's options; `undefined` past the cap. */
188
+ const listed = computed(() => vh.resolved.value ? valueHelpDropdown(vh.results.value, vh.resolved.value, info) : []);
189
+ const overflow = computed(() => listed.value === void 0);
190
+ watch(overflow, (over) => {
191
+ const key = valueHelpKey(info);
192
+ if (over && isDev() && !warned.has(key)) {
193
193
  warned.add(key);
194
194
  console.warn(`[vue-form] The dictionary at ${info.url} has more than ${VALUE_HELP_OPTIONS_CAP} values for a dropdown: the field shows the search picker instead.`);
195
195
  }
196
196
  });
197
197
  const options = computed(() => {
198
- const resolved = vh.resolved.value;
199
- if (!resolved) return [];
200
- const rows = vh.results.value.slice(0, VALUE_HELP_OPTIONS_CAP);
201
- const list = valueHelpOptions(rows, resolved, info);
198
+ const list = listed.value ?? [];
202
199
  const current = model.value;
203
- if (!isEmpty(current) && !rows.some((row) => row[info.targetField] === current)) {
204
- const key = String(current);
205
- list.unshift({
206
- key,
207
- label: key,
208
- value: current
209
- });
210
- }
211
- return list;
200
+ const rows = vh.results.value;
201
+ if (isEmpty(current) || rows.some((row) => row[info.targetField] === current)) return list;
202
+ const key = String(current);
203
+ return [{
204
+ key,
205
+ label: key,
206
+ value: current
207
+ }, ...list];
212
208
  });
213
209
  function pick(value) {
214
210
  if (isEmpty(value)) {
@@ -542,22 +538,15 @@ var as_field_default = /* @__PURE__ */ defineComponent({
542
538
  handleChange("update", absolutePath.value, current);
543
539
  }
544
540
  };
545
- const boundOptions = valueHelp && options === void 0 && (props.field.type === "select" || props.field.type === "radio") ? useAsValueHelpOptions({
541
+ const ownOptions = options;
542
+ const fieldData = useAsData();
543
+ const displayText = () => fieldData.displayText(props.field, model.value, unwrap(ownOptions));
544
+ const boundOptions = listsDictionary(props.field) ? useAsValueHelpOptions({
546
545
  info: valueHelp,
547
546
  model,
548
547
  onBlur
549
548
  }) : void 0;
550
549
  if (boundOptions) options = boundOptions.options;
551
- const valueLabelMeta = valueLabelOf(prop);
552
- let valueLabel;
553
- if (valueLabelMeta) {
554
- const text = useAsData().siblingValue(siblingPrefix + valueLabelMeta.field);
555
- valueLabel = computed(() => {
556
- const v = model.value;
557
- if (v === void 0 || v === null || v === "" || typeof v === "object") return void 0;
558
- return arrangeText(String(v), text.value, valueLabelMeta.arrangement);
559
- });
560
- }
561
550
  if (!isStructured && !isUnion) watch(model, (value, prev) => {
562
551
  if (value === prev) return;
563
552
  const path = absolutePath.value;
@@ -588,6 +577,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
588
577
  level: isStructured || isUnion ? myLevel : void 0,
589
578
  path: absolutePath.value,
590
579
  valueHelp,
580
+ displayText,
591
581
  precisionScale,
592
582
  hasAdornment,
593
583
  inputId,
@@ -658,12 +648,10 @@ var as_field_default = /* @__PURE__ */ defineComponent({
658
648
  return resolvedComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(resolvedComponent.value), mergeProps({ key: 0 }, componentProps.value, {
659
649
  "is-dirty": unref(isDirty),
660
650
  ariaDescribedBy: ariaDescribedBy.value,
661
- "value-label": unref(valueLabel),
662
651
  onAction: unref(handleAction)
663
652
  }), null, 16, [
664
653
  "is-dirty",
665
654
  "ariaDescribedBy",
666
- "value-label",
667
655
  "onAction"
668
656
  ])) : (openBlock(), createElementBlock("div", _hoisted_1, " [" + toDisplayString(unwrap(unref(label)) ?? __props.field.name) + "] No component for type \"" + toDisplayString(__props.field.customType ?? __props.field.type) + "\"" + toDisplayString(unref(componentName) ? ` (component "${unref(componentName)}" not supplied)` : ""), 1));
669
657
  };
@@ -1,8 +1,8 @@
1
1
  const require_use_form_context = require("./use-form-context-U6vg1uqK.cjs");
2
- const require_use_as_value_help = require("./use-as-value-help-CQMUkP1r.cjs");
2
+ const require_use_as_value_help = require("./use-as-value-help-ZR_BvS0L.cjs");
3
3
  const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
4
- const require_use_as_model_texts = require("./use-as-model-texts-C3V56UDt.cjs");
5
- const require__shape = require("./_shape-7OdPsQao.cjs");
4
+ const require_use_as_model_texts = require("./use-as-model-texts-BSFCEwAa.cjs");
5
+ const require__shape = require("./_shape-DPDZTV_T.cjs");
6
6
  let vue = require("vue");
7
7
  let _atscript_ui = require("@atscript/ui");
8
8
  let _atscript_ui_fns = require("@atscript/ui-fns");
@@ -169,12 +169,12 @@ function isDev() {
169
169
  }
170
170
  const isEmpty = (v) => v === void 0 || v === null || v === "";
171
171
  /**
172
- * Options of a `select` / `radio` field bound to a dictionary (`@ui.valueHelp`
173
- * or `@db.rel.FK`) that declares no options of its own (since 0.1.190): one
174
- * read of the dictionary in the binding's scope — the form's host values
175
- * included, read again when they change — with the select of every
176
- * value-help read, capped at `VALUE_HELP_OPTIONS_CAP`. A longer list
177
- * sets `overflow` (and warns once in development) until a read fits again.
172
+ * Options of a `select` / `radio` field that lists its dictionary
173
+ * (`listsDictionary`, since 0.1.190): one search of `VALUE_HELP_OPTIONS_CAP + 1`
174
+ * rows in the binding's scope — the form's host values included, searched
175
+ * again when they change, and again in a new locale — as `valueHelpDropdown`
176
+ * lists them. A list longer than the cap sets `overflow` (and warns once in
177
+ * development) until a search fits again.
178
178
  */
179
179
  function useAsValueHelpOptions(opts) {
180
180
  const { info, model, onBlur } = opts;
@@ -184,31 +184,27 @@ function useAsValueHelpOptions(opts) {
184
184
  onBlur,
185
185
  limit: _atscript_ui.VALUE_HELP_OPTIONS_CAP + 1
186
186
  });
187
- const overflow = (0, vue.ref)(false);
188
- (0, vue.watch)(vh.results, (rows) => {
189
- overflow.value = rows.length > _atscript_ui.VALUE_HELP_OPTIONS_CAP;
190
- if (!overflow.value) return;
191
- const key = `${info.url}\0${info.targetField}`;
192
- if (isDev() && !warned.has(key)) {
187
+ /** The dictionary's options; `undefined` past the cap. */
188
+ const listed = (0, vue.computed)(() => vh.resolved.value ? (0, _atscript_ui.valueHelpDropdown)(vh.results.value, vh.resolved.value, info) : []);
189
+ const overflow = (0, vue.computed)(() => listed.value === void 0);
190
+ (0, vue.watch)(overflow, (over) => {
191
+ const key = (0, _atscript_ui.valueHelpKey)(info);
192
+ if (over && isDev() && !warned.has(key)) {
193
193
  warned.add(key);
194
194
  console.warn(`[vue-form] The dictionary at ${info.url} has more than ${_atscript_ui.VALUE_HELP_OPTIONS_CAP} values for a dropdown: the field shows the search picker instead.`);
195
195
  }
196
196
  });
197
197
  const options = (0, vue.computed)(() => {
198
- const resolved = vh.resolved.value;
199
- if (!resolved) return [];
200
- const rows = vh.results.value.slice(0, _atscript_ui.VALUE_HELP_OPTIONS_CAP);
201
- const list = (0, _atscript_ui.valueHelpOptions)(rows, resolved, info);
198
+ const list = listed.value ?? [];
202
199
  const current = model.value;
203
- if (!isEmpty(current) && !rows.some((row) => row[info.targetField] === current)) {
204
- const key = String(current);
205
- list.unshift({
206
- key,
207
- label: key,
208
- value: current
209
- });
210
- }
211
- return list;
200
+ const rows = vh.results.value;
201
+ if (isEmpty(current) || rows.some((row) => row[info.targetField] === current)) return list;
202
+ const key = String(current);
203
+ return [{
204
+ key,
205
+ label: key,
206
+ value: current
207
+ }, ...list];
212
208
  });
213
209
  function pick(value) {
214
210
  if (isEmpty(value)) {
@@ -542,22 +538,15 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
542
538
  handleChange("update", absolutePath.value, current);
543
539
  }
544
540
  };
545
- const boundOptions = valueHelp && options === void 0 && (props.field.type === "select" || props.field.type === "radio") ? useAsValueHelpOptions({
541
+ const ownOptions = options;
542
+ const fieldData = require_use_as_value_help.useAsData();
543
+ const displayText = () => fieldData.displayText(props.field, model.value, unwrap(ownOptions));
544
+ const boundOptions = (0, _atscript_ui.listsDictionary)(props.field) ? useAsValueHelpOptions({
546
545
  info: valueHelp,
547
546
  model,
548
547
  onBlur
549
548
  }) : void 0;
550
549
  if (boundOptions) options = boundOptions.options;
551
- const valueLabelMeta = (0, _atscript_ui.valueLabelOf)(prop);
552
- let valueLabel;
553
- if (valueLabelMeta) {
554
- const text = require_use_as_value_help.useAsData().siblingValue(siblingPrefix + valueLabelMeta.field);
555
- valueLabel = (0, vue.computed)(() => {
556
- const v = model.value;
557
- if (v === void 0 || v === null || v === "" || typeof v === "object") return void 0;
558
- return (0, _atscript_ui.arrangeText)(String(v), text.value, valueLabelMeta.arrangement);
559
- });
560
- }
561
550
  if (!isStructured && !isUnion) (0, vue.watch)(model, (value, prev) => {
562
551
  if (value === prev) return;
563
552
  const path = absolutePath.value;
@@ -588,6 +577,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
588
577
  level: isStructured || isUnion ? myLevel : void 0,
589
578
  path: absolutePath.value,
590
579
  valueHelp,
580
+ displayText,
591
581
  precisionScale,
592
582
  hasAdornment,
593
583
  inputId,
@@ -658,12 +648,10 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
658
648
  return resolvedComponent.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(resolvedComponent.value), (0, vue.mergeProps)({ key: 0 }, componentProps.value, {
659
649
  "is-dirty": (0, vue.unref)(isDirty),
660
650
  ariaDescribedBy: ariaDescribedBy.value,
661
- "value-label": (0, vue.unref)(valueLabel),
662
651
  onAction: (0, vue.unref)(handleAction)
663
652
  }), null, 16, [
664
653
  "is-dirty",
665
654
  "ariaDescribedBy",
666
- "value-label",
667
655
  "onAction"
668
656
  ])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, " [" + (0, vue.toDisplayString)(unwrap((0, vue.unref)(label)) ?? __props.field.name) + "] 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));
669
657
  };
@@ -1,9 +1,9 @@
1
1
  const require_focus_after_toggle = require("./focus-after-toggle-BhZGqrUK.cjs");
2
2
  const require_use_form_context = require("./use-form-context-U6vg1uqK.cjs");
3
3
  const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
4
- const require__shape = require("./_shape-7OdPsQao.cjs");
5
- const require_as_variant_picker = require("./as-variant-picker-CpCxKFtT.cjs");
6
- const require__editing_hold = require("./_editing-hold-D2uqwszu.cjs");
4
+ const require__shape = require("./_shape-DPDZTV_T.cjs");
5
+ const require_as_variant_picker = require("./as-variant-picker-CceIhZUk.cjs");
6
+ const require__editing_hold = require("./_editing-hold-DbM25sc_.cjs");
7
7
  let vue = require("vue");
8
8
  //#region src/components/internal/as-no-data.vue?vue&type=script&setup=true&lang.ts
9
9
  const _hoisted_1$1 = [
@@ -225,9 +225,9 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
225
225
  type: Object,
226
226
  required: false
227
227
  },
228
- valueLabel: {
229
- type: String,
230
- required: false
228
+ displayText: {
229
+ type: Function,
230
+ required: true
231
231
  },
232
232
  singularLabel: {
233
233
  type: String,
@@ -1,9 +1,9 @@
1
1
  import { i as useAsFocusFirstAfter } from "./focus-after-toggle-DAwak7c1.mjs";
2
2
  import { n as useAsUnionVariant, t as formatIndexedLabelParts } from "./use-form-context-0FtVVTvf.mjs";
3
3
  import { o as useAsTexts } from "./use-as-locale-CznDr-7i.mjs";
4
- import { t as isTriState } from "./_shape-A661ZxnJ.mjs";
5
- import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-CihlFH-c.mjs";
6
- import { n as useEditingHold } from "./_editing-hold-D_X5gXHh.mjs";
4
+ import { t as isTriState } from "./_shape-CnW2sBRs.mjs";
5
+ import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-CKSLKefM.mjs";
6
+ import { n as useEditingHold } from "./_editing-hold-s65mkJu2.mjs";
7
7
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toDisplayString, unref, vShow, withDirectives, withKeys, withModifiers } from "vue";
8
8
  //#region src/components/internal/as-no-data.vue?vue&type=script&setup=true&lang.ts
9
9
  const _hoisted_1$1 = [
@@ -225,9 +225,9 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
225
225
  type: Object,
226
226
  required: false
227
227
  },
228
- valueLabel: {
229
- type: String,
230
- required: false
228
+ displayText: {
229
+ type: Function,
230
+ required: true
231
231
  },
232
232
  singularLabel: {
233
233
  type: String,
@@ -1,2 +1,2 @@
1
- const require_as_field_shell = require("./as-field-shell-Cu8jxZYj.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-BPesuJKa.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-D-8AWUGW.cjs";
1
+ import { t as _default } from "./as-field-shell.vue-CQqwykWy.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field-shell.vue-CPy2uA-b.mjs";
1
+ import { t as _default } from "./as-field-shell.vue-o7T2u4aw.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-DPzfvPo0.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-QMsYyJ8r.mjs";
2
2
  export { as_field_shell_default as default };
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-271BUWyf.mjs";
1
+ import { s as TAsComponentProps } from "./types-D23g9Vs-.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-field-shell.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-DbjorSCn.cjs";
1
+ import { s as TAsComponentProps } from "./types-C5Gx4ZuF.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-field-shell.vue.d.ts
package/dist/as-field.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_field = require("./as-field-DAClnYiP.cjs");
1
+ const require_as_field = require("./as-field-lMMfms8d.cjs");
2
2
  module.exports = require_as_field.as_field_default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field.vue-BWaTLJd6.mjs";
1
+ import { t as _default } from "./as-field.vue-BMg2Ep8h.mjs";
2
2
  export { _default as default };
package/dist/as-field.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as as_field_default } from "./as-field-jh5AWref.mjs";
1
+ import { t as as_field_default } from "./as-field-iQ2H3VGd.mjs";
2
2
  export { as_field_default as default };
@@ -1,12 +1,13 @@
1
1
  import { r as resetKeepingFocus } from "./focus-after-toggle-DAwak7c1.mjs";
2
2
  import { _ as LOCK_KEY, a as CHANGE_HANDLER_KEY, b as ROOT_DATA_KEY, c as ERRORS_KEY, d as FORM_NORMALIZED_DATA_KEY, f as FORM_OPTIONAL_KEY, h as HIDE_ROOT_TITLE_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as FORM_STATE_KEY, o as COMPONENTS_KEY, p as FORM_PATCH_KEY, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY, v as MODEL_TEXTS_KEY, x as TYPES_KEY, y as PATH_PREFIX_KEY } from "./use-form-context-0FtVVTvf.mjs";
3
3
  import { i as useAsNestedSectionsStore, n as provideAsNestedSectionsStore, t as DESCENDANT_ERROR_COUNTS_KEY } from "./use-as-nested-sections-store-CkrMJbnN.mjs";
4
- import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-DE8KCbqo.mjs";
4
+ import { r as fieldDisplayText, t as CLIENT_FACTORY_KEY } from "./use-as-value-help-B5yNO1tE.mjs";
5
5
  import { o as useAsTexts } from "./use-as-locale-CznDr-7i.mjs";
6
- import { t as as_field_default } from "./as-field-jh5AWref.mjs";
7
- import { t as as_iterator_default } from "./as-iterator-B1o83rKV.mjs";
6
+ import { t as useValueHelpTexts } from "./use-value-help-texts-LySFdZya.mjs";
7
+ import { t as as_field_default } from "./as-field-iQ2H3VGd.mjs";
8
+ import { t as as_iterator_default } from "./as-iterator-DbCm61j1.mjs";
8
9
  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";
9
- 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, deepEqual, deleteByPath, getByPath, getDeclaredFormActions, getFormValidator, iteratePathAncestors, mergeErrorMaps, normalizeLoadedEmpty, omitDerivedFields, omitPaths, omitSkippedNavFields, resolveFormProp, setByPath, unionVariantChanged } from "@atscript/ui";
10
+ 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, deepEqual, deleteByPath, displayValue, getByPath, getDeclaredFormActions, getFormValidator, iteratePathAncestors, mergeErrorMaps, normalizeLoadedEmpty, omitDerivedFields, omitPaths, omitSkippedNavFields, resolveFormProp, setByPath, unionVariantChanged } from "@atscript/ui";
10
11
  //#region src/composables/use-as-form-patch.ts
11
12
  /**
12
13
  * Internal factory invoked by `useAsForm` when `trackChanges` is enabled. Owns
@@ -299,6 +300,11 @@ function useAsExternalErrors(options) {
299
300
  }
300
301
  //#endregion
301
302
  //#region src/composables/use-as-state.ts
303
+ /** A value as itself: a scalar written out, `""` for none (or an object). */
304
+ function plainText(value) {
305
+ if (value === null || value === void 0 || typeof value === "object") return "";
306
+ return String(value);
307
+ }
302
308
  function useAsState(opts) {
303
309
  const fieldsById = /* @__PURE__ */ new Map();
304
310
  const fieldsRevision = shallowRef(0);
@@ -312,12 +318,20 @@ function useAsState(opts) {
312
318
  fieldsRevision.value++;
313
319
  formState.freshFields.delete(id);
314
320
  };
321
+ const texts = useValueHelpTexts(opts.clientFactory ?? inject(CLIENT_FACTORY_KEY, null) ?? void 0);
322
+ const { t } = useAsTexts();
323
+ const displayText = (field, value, o) => displayValue(o ?? {}, value, {
324
+ siblingText: o?.siblingText,
325
+ valueText: () => texts.text(field, value),
326
+ t
327
+ }) ?? plainText(value);
315
328
  const formState = reactive({
316
329
  firstSubmitHappened: false,
317
330
  firstValidation: toValue(opts.firstValidation) ?? "on-change",
318
331
  freshFields: /* @__PURE__ */ new Set(),
319
332
  register,
320
- unregister
333
+ unregister,
334
+ displayText
321
335
  });
322
336
  watchEffect(() => {
323
337
  const v = toValue(opts.firstValidation) ?? "on-change";
@@ -429,9 +443,12 @@ function useAsForm(options) {
429
443
  provide(FORM_NORMALIZED_DATA_KEY, computed(() => formValidator.value.normalize(getDomainData()) ?? {}));
430
444
  const modelT = () => options.def().served ? void 0 : t;
431
445
  provide(MODEL_TEXTS_KEY, modelT);
432
- const { clearErrors: clearFieldErrors, reset: resetState, submit, setErrors, liveErrors, registeredPaths } = useAsState({
446
+ const cf = options.clientFactory?.();
447
+ if (cf) provide(CLIENT_FACTORY_KEY, cf);
448
+ const { formState, clearErrors: clearFieldErrors, reset: resetState, submit, setErrors, liveErrors, registeredPaths } = useAsState({
433
449
  formData: data,
434
450
  formContext,
451
+ clientFactory: cf,
435
452
  firstValidation: computed(() => options.firstValidation?.()),
436
453
  submitValidator: () => formValidator.value({
437
454
  data: submitting,
@@ -472,8 +489,6 @@ function useAsForm(options) {
472
489
  provide(ERRORS_KEY, ext.effective);
473
490
  provide(DISMISS_EXTERNAL_AT_KEY, ext.dismissAt);
474
491
  const sectionsStore = useAsNestedSectionsStore() ?? provideAsNestedSectionsStore();
475
- const cf = options.clientFactory?.();
476
- if (cf) provide(CLIENT_FACTORY_KEY, cf);
477
492
  const internalErrors = ref({});
478
493
  const orphanInternalErrors = computed(() => omitPaths(internalErrors.value, registeredPaths.value));
479
494
  const allErrors = computed(() => mergeErrorMaps(ext.effective.value, orphanInternalErrors.value, liveErrors.value));
@@ -544,6 +559,7 @@ function useAsForm(options) {
544
559
  const resolveRootProp = (fnKey, staticKey) => resolveFormProp(options.def().type, fnKey, staticKey, ctx.value, { t: modelT() });
545
560
  const title = computed(() => resolveRootProp(UI_FORM_FN_TITLE, META_LABEL));
546
561
  const description = computed(() => resolveRootProp(UI_FORM_FN_DESCRIPTION, META_DESCRIPTION));
562
+ const displayText = fieldDisplayText(formState, (path) => getByPath(data.value, path));
547
563
  const slotProps = computed(() => ({
548
564
  title: title.value,
549
565
  description: description.value,
@@ -565,7 +581,8 @@ function useAsForm(options) {
565
581
  changes: patch ? patch.changes.value : EMPTY_CHANGES,
566
582
  getPatch: patch ? patch.getPatch : EMPTY_GET_PATCH,
567
583
  getChanges: patch ? patch.getChanges : EMPTY_GET_CHANGES,
568
- isDirtyPath: patch ? patch.isDirtyPath : EMPTY_IS_DIRTY_PATH
584
+ isDirtyPath: patch ? patch.isDirtyPath : EMPTY_IS_DIRTY_PATH,
585
+ displayText
569
586
  }));
570
587
  function supportsAction(def, actionId) {
571
588
  return getDeclaredFormActions(def).some((a) => a.id === actionId);
@@ -1,10 +1,11 @@
1
1
  const require_focus_after_toggle = require("./focus-after-toggle-BhZGqrUK.cjs");
2
2
  const require_use_form_context = require("./use-form-context-U6vg1uqK.cjs");
3
3
  const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-ApstV9NL.cjs");
4
- const require_use_as_value_help = require("./use-as-value-help-CQMUkP1r.cjs");
4
+ const require_use_as_value_help = require("./use-as-value-help-ZR_BvS0L.cjs");
5
5
  const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
6
- const require_as_field = require("./as-field-DAClnYiP.cjs");
7
- const require_as_iterator = require("./as-iterator-q_w9HBHt.cjs");
6
+ const require_use_value_help_texts = require("./use-value-help-texts-ikiPKy-U.cjs");
7
+ const require_as_field = require("./as-field-lMMfms8d.cjs");
8
+ const require_as_iterator = require("./as-iterator-DeLt7-BO.cjs");
8
9
  let vue = require("vue");
9
10
  let _atscript_ui = require("@atscript/ui");
10
11
  //#region src/composables/use-as-form-patch.ts
@@ -299,6 +300,11 @@ function useAsExternalErrors(options) {
299
300
  }
300
301
  //#endregion
301
302
  //#region src/composables/use-as-state.ts
303
+ /** A value as itself: a scalar written out, `""` for none (or an object). */
304
+ function plainText(value) {
305
+ if (value === null || value === void 0 || typeof value === "object") return "";
306
+ return String(value);
307
+ }
302
308
  function useAsState(opts) {
303
309
  const fieldsById = /* @__PURE__ */ new Map();
304
310
  const fieldsRevision = (0, vue.shallowRef)(0);
@@ -312,12 +318,20 @@ function useAsState(opts) {
312
318
  fieldsRevision.value++;
313
319
  formState.freshFields.delete(id);
314
320
  };
321
+ const texts = require_use_value_help_texts.useValueHelpTexts(opts.clientFactory ?? (0, vue.inject)(require_use_as_value_help.CLIENT_FACTORY_KEY, null) ?? void 0);
322
+ const { t } = require_use_as_locale.useAsTexts();
323
+ const displayText = (field, value, o) => (0, _atscript_ui.displayValue)(o ?? {}, value, {
324
+ siblingText: o?.siblingText,
325
+ valueText: () => texts.text(field, value),
326
+ t
327
+ }) ?? plainText(value);
315
328
  const formState = (0, vue.reactive)({
316
329
  firstSubmitHappened: false,
317
330
  firstValidation: (0, vue.toValue)(opts.firstValidation) ?? "on-change",
318
331
  freshFields: /* @__PURE__ */ new Set(),
319
332
  register,
320
- unregister
333
+ unregister,
334
+ displayText
321
335
  });
322
336
  (0, vue.watchEffect)(() => {
323
337
  const v = (0, vue.toValue)(opts.firstValidation) ?? "on-change";
@@ -429,9 +443,12 @@ function useAsForm(options) {
429
443
  (0, vue.provide)(require_use_form_context.FORM_NORMALIZED_DATA_KEY, (0, vue.computed)(() => formValidator.value.normalize(getDomainData()) ?? {}));
430
444
  const modelT = () => options.def().served ? void 0 : t;
431
445
  (0, vue.provide)(require_use_form_context.MODEL_TEXTS_KEY, modelT);
432
- const { clearErrors: clearFieldErrors, reset: resetState, submit, setErrors, liveErrors, registeredPaths } = useAsState({
446
+ const cf = options.clientFactory?.();
447
+ if (cf) (0, vue.provide)(require_use_as_value_help.CLIENT_FACTORY_KEY, cf);
448
+ const { formState, clearErrors: clearFieldErrors, reset: resetState, submit, setErrors, liveErrors, registeredPaths } = useAsState({
433
449
  formData: data,
434
450
  formContext,
451
+ clientFactory: cf,
435
452
  firstValidation: (0, vue.computed)(() => options.firstValidation?.()),
436
453
  submitValidator: () => formValidator.value({
437
454
  data: submitting,
@@ -472,8 +489,6 @@ function useAsForm(options) {
472
489
  (0, vue.provide)(require_use_form_context.ERRORS_KEY, ext.effective);
473
490
  (0, vue.provide)(require_use_form_context.DISMISS_EXTERNAL_AT_KEY, ext.dismissAt);
474
491
  const sectionsStore = require_use_as_nested_sections_store.useAsNestedSectionsStore() ?? require_use_as_nested_sections_store.provideAsNestedSectionsStore();
475
- const cf = options.clientFactory?.();
476
- if (cf) (0, vue.provide)(require_use_as_value_help.CLIENT_FACTORY_KEY, cf);
477
492
  const internalErrors = (0, vue.ref)({});
478
493
  const orphanInternalErrors = (0, vue.computed)(() => (0, _atscript_ui.omitPaths)(internalErrors.value, registeredPaths.value));
479
494
  const allErrors = (0, vue.computed)(() => (0, _atscript_ui.mergeErrorMaps)(ext.effective.value, orphanInternalErrors.value, liveErrors.value));
@@ -544,6 +559,7 @@ function useAsForm(options) {
544
559
  const resolveRootProp = (fnKey, staticKey) => (0, _atscript_ui.resolveFormProp)(options.def().type, fnKey, staticKey, ctx.value, { t: modelT() });
545
560
  const title = (0, vue.computed)(() => resolveRootProp(_atscript_ui.UI_FORM_FN_TITLE, _atscript_ui.META_LABEL));
546
561
  const description = (0, vue.computed)(() => resolveRootProp(_atscript_ui.UI_FORM_FN_DESCRIPTION, _atscript_ui.META_DESCRIPTION));
562
+ const displayText = require_use_as_value_help.fieldDisplayText(formState, (path) => (0, _atscript_ui.getByPath)(data.value, path));
547
563
  const slotProps = (0, vue.computed)(() => ({
548
564
  title: title.value,
549
565
  description: description.value,
@@ -565,7 +581,8 @@ function useAsForm(options) {
565
581
  changes: patch ? patch.changes.value : EMPTY_CHANGES,
566
582
  getPatch: patch ? patch.getPatch : EMPTY_GET_PATCH,
567
583
  getChanges: patch ? patch.getChanges : EMPTY_GET_CHANGES,
568
- isDirtyPath: patch ? patch.isDirtyPath : EMPTY_IS_DIRTY_PATH
584
+ isDirtyPath: patch ? patch.isDirtyPath : EMPTY_IS_DIRTY_PATH,
585
+ displayText
569
586
  }));
570
587
  function supportsAction(def, actionId) {
571
588
  return (0, _atscript_ui.getDeclaredFormActions)(def).some((a) => a.id === actionId);
package/dist/as-form.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_form = require("./as-form-r5pkXt5U.cjs");
1
+ const require_as_form = require("./as-form-DE3TVGV-.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-BvRHy6mu.cjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-B9MZrw7V.cjs";
2
2
  export { Props, _default as default };
@@ -1,2 +1,2 @@
1
- import { n as _default, t as Props } from "./as-form.vue-D1AS3Xf6.mjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-DwqofFJa.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-B8d1MVTB.mjs";
1
+ import { t as as_form_default } from "./as-form-CuMRP5aZ.mjs";
2
2
  export { as_form_default as default };