@atscript/vue-form 0.1.189 → 0.1.190

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 (203) hide show
  1. package/dist/{_shape-C-TxQCFa.cjs → _shape-BDO-1MzF.cjs} +34 -0
  2. package/dist/{_shape-bdsPEB8P.mjs → _shape-DhwW2SvD.mjs} +23 -1
  3. package/dist/{as-action-B_vPR2YE.cjs → as-action-B3NIgGTV.cjs} +4 -0
  4. package/dist/{as-action-BzdLJvyy.mjs → as-action-B69WsGIB.mjs} +4 -0
  5. package/dist/as-action.cjs +1 -1
  6. package/dist/as-action.d.cts +1 -1
  7. package/dist/as-action.d.mts +1 -1
  8. package/dist/as-action.mjs +1 -1
  9. package/dist/{as-action.vue-BmHLq5PU.d.cts → as-action.vue-DW10afXf.d.cts} +1 -1
  10. package/dist/{as-action.vue-BskkSynK.d.mts → as-action.vue-FAmO9MMw.d.mts} +1 -1
  11. package/dist/{as-array-BKC7bBXf.mjs → as-array-B0wekrwk.mjs} +12 -8
  12. package/dist/{as-array-C4Vv6k5I.cjs → as-array-BJYlPXad.cjs} +12 -8
  13. package/dist/{as-array-clear-btn-ConR3zxV.mjs → as-array-clear-btn-Bi4wDHOv.mjs} +2 -2
  14. package/dist/{as-array-clear-btn-DeWeUqoX.cjs → as-array-clear-btn-CzojQsEk.cjs} +2 -2
  15. package/dist/as-array.cjs +1 -1
  16. package/dist/as-array.d.cts +1 -1
  17. package/dist/as-array.d.mts +1 -1
  18. package/dist/as-array.mjs +1 -1
  19. package/dist/{as-array.vue-BWUhWKKn.d.cts → as-array.vue-DetU1gZz.d.cts} +1 -1
  20. package/dist/{as-array.vue-C4mSQIUB.d.mts → as-array.vue-Q8eE5Ut1.d.mts} +1 -1
  21. package/dist/{as-checkbox-Dux-KJVN.mjs → as-checkbox-BKQPJbiW.mjs} +7 -3
  22. package/dist/{as-checkbox-NjLPm4Kk.cjs → as-checkbox-Dg4CqOYy.cjs} +7 -3
  23. package/dist/as-checkbox.cjs +1 -1
  24. package/dist/as-checkbox.d.cts +1 -1
  25. package/dist/as-checkbox.d.mts +1 -1
  26. package/dist/as-checkbox.mjs +1 -1
  27. package/dist/{as-checkbox.vue-B_LntkDl.d.cts → as-checkbox.vue-BCZqbPZs.d.cts} +1 -1
  28. package/dist/{as-checkbox.vue-CPLwFPve.d.mts → as-checkbox.vue-D3PPVWiS.d.mts} +1 -1
  29. package/dist/{as-collapsible-FoPTu4lF.mjs → as-collapsible-DJqAZXR7.mjs} +2 -2
  30. package/dist/{as-collapsible-BXQ481-h.cjs → as-collapsible-Dtt4QN7s.cjs} +2 -2
  31. package/dist/as-collapsible.cjs +1 -1
  32. package/dist/as-collapsible.d.cts +1 -1
  33. package/dist/as-collapsible.d.mts +1 -1
  34. package/dist/as-collapsible.mjs +1 -1
  35. package/dist/{as-collapsible.vue-9XMYb39s.d.cts → as-collapsible.vue-Bxenwlh8.d.cts} +1 -1
  36. package/dist/{as-collapsible.vue-BtUZuqGF.d.mts → as-collapsible.vue-lYcXVC_E.d.mts} +1 -1
  37. package/dist/{as-date-DSvDDvwH.cjs → as-date-BKR1O5BR.cjs} +7 -3
  38. package/dist/{as-date-DUUpb8ph.mjs → as-date-BoBkff96.mjs} +7 -3
  39. package/dist/as-date.cjs +1 -1
  40. package/dist/as-date.d.cts +1 -1
  41. package/dist/as-date.d.mts +1 -1
  42. package/dist/as-date.mjs +1 -1
  43. package/dist/{as-date.vue-CQZp-yqF.d.mts → as-date.vue-ByntHQIq.d.mts} +1 -1
  44. package/dist/{as-date.vue-DQVHGLMc.d.cts → as-date.vue-CS14s3fE.d.cts} +1 -1
  45. package/dist/{as-datetime-Dy1tGMrO.mjs → as-datetime-Ci3H4Fjy.mjs} +7 -3
  46. package/dist/{as-datetime-DZBCBpov.cjs → as-datetime-DH5tE6dB.cjs} +7 -3
  47. package/dist/as-datetime.cjs +1 -1
  48. package/dist/as-datetime.d.cts +1 -1
  49. package/dist/as-datetime.d.mts +1 -1
  50. package/dist/as-datetime.mjs +1 -1
  51. package/dist/{as-datetime.vue-DrWth1Pe.d.mts → as-datetime.vue-B-O9jSjL.d.mts} +1 -1
  52. package/dist/{as-datetime.vue-TMgV54Z5.d.cts → as-datetime.vue-BJAZj8Pi.d.cts} +1 -1
  53. package/dist/{as-decimal-DYBEUokN.cjs → as-decimal-BuvchyCs.cjs} +7 -3
  54. package/dist/{as-decimal-HvUQANde.mjs → as-decimal-CseZXB7F.mjs} +7 -3
  55. package/dist/as-decimal.cjs +1 -1
  56. package/dist/as-decimal.d.cts +1 -1
  57. package/dist/as-decimal.d.mts +1 -1
  58. package/dist/as-decimal.mjs +1 -1
  59. package/dist/{as-decimal.vue-Bw9vY0br.d.mts → as-decimal.vue-CQXnsDs9.d.mts} +1 -1
  60. package/dist/{as-decimal.vue-D-C_ywhy.d.cts → as-decimal.vue-F9YMotuz.d.cts} +1 -1
  61. package/dist/{as-field-C3lIiHCI.cjs → as-field-BHUA1YpM.cjs} +93 -57
  62. package/dist/{as-field-R3KYssad.mjs → as-field-CvjOHQ9H.mjs} +94 -52
  63. package/dist/{as-field-shell-BQPySL71.mjs → as-field-shell-CSxqm12l.mjs} +8 -4
  64. package/dist/{as-field-shell-BOeyo1FP.cjs → as-field-shell-P7p47Pbr.cjs} +8 -4
  65. package/dist/as-field-shell.cjs +1 -1
  66. package/dist/as-field-shell.d.cts +1 -1
  67. package/dist/as-field-shell.d.mts +1 -1
  68. package/dist/as-field-shell.mjs +1 -1
  69. package/dist/{as-field-shell.vue-CouocQ2f.d.cts → as-field-shell.vue-CQSSK4hh.d.mts} +1 -1
  70. package/dist/{as-field-shell.vue-DIYpxzud.d.mts → as-field-shell.vue-DsYdUv7b.d.cts} +1 -1
  71. package/dist/as-field.cjs +1 -1
  72. package/dist/as-field.mjs +1 -1
  73. package/dist/{as-form-CRDqdXnl.mjs → as-form-BYi1rubO.mjs} +5 -5
  74. package/dist/{as-form-BTNctHb9.cjs → as-form-rI4daFP2.cjs} +5 -5
  75. package/dist/as-form.cjs +1 -1
  76. package/dist/as-form.d.cts +1 -1
  77. package/dist/as-form.d.mts +1 -1
  78. package/dist/as-form.mjs +1 -1
  79. package/dist/{as-form.vue-BI5mC0o7.d.cts → as-form.vue-C7yj7eRt.d.cts} +34 -3
  80. package/dist/{as-form.vue-BJ79OYA6.d.mts → as-form.vue-xvFFkRdo.d.mts} +34 -3
  81. package/dist/{as-input-BRJYoNF0.cjs → as-input-DNIY5kGw.cjs} +6 -2
  82. package/dist/{as-input-C3MkFToh.mjs → as-input-DVeDzKkd.mjs} +6 -2
  83. package/dist/{as-input-control-DAbaW7GG.cjs → as-input-control-D8xoJfr7.cjs} +7 -3
  84. package/dist/{as-input-control-B3h--Qe0.mjs → as-input-control-Wygcey6h.mjs} +7 -3
  85. package/dist/as-input.cjs +1 -1
  86. package/dist/as-input.d.cts +1 -1
  87. package/dist/as-input.d.mts +1 -1
  88. package/dist/as-input.mjs +1 -1
  89. package/dist/{as-input.vue-D4UQSSmo.d.cts → as-input.vue-BE5H25Xa.d.mts} +1 -1
  90. package/dist/{as-input.vue-Q5EXxW3x.d.mts → as-input.vue-DsSCA6KN.d.cts} +1 -1
  91. package/dist/{as-iterator-Bd1fXGs6.mjs → as-iterator-BTJ37tre.mjs} +2 -2
  92. package/dist/{as-iterator-BB7DB04y.cjs → as-iterator-rF5FyWGS.cjs} +2 -2
  93. package/dist/as-iterator.cjs +1 -1
  94. package/dist/as-iterator.mjs +1 -1
  95. package/dist/{as-multi-select-DPpAKUzQ.cjs → as-multi-select-CXFofdQ1.cjs} +6 -2
  96. package/dist/{as-multi-select-4awmF8mN.mjs → as-multi-select-CkMSlX1e.mjs} +6 -2
  97. package/dist/as-multi-select.cjs +1 -1
  98. package/dist/as-multi-select.d.cts +1 -1
  99. package/dist/as-multi-select.d.mts +1 -1
  100. package/dist/as-multi-select.mjs +1 -1
  101. package/dist/{as-multi-select.vue-Ce-V2A81.d.mts → as-multi-select.vue-BDt4AtNm.d.mts} +1 -1
  102. package/dist/{as-multi-select.vue-Iy3G3eu8.d.cts → as-multi-select.vue-CpuSkukC.d.cts} +1 -1
  103. package/dist/{as-number-CAVTkGcp.cjs → as-number-BwzyMxl4.cjs} +8 -4
  104. package/dist/{as-number-WcRwaMOt.mjs → as-number-mQHbJDoh.mjs} +8 -4
  105. package/dist/as-number.cjs +1 -1
  106. package/dist/as-number.d.cts +1 -1
  107. package/dist/as-number.d.mts +1 -1
  108. package/dist/as-number.mjs +1 -1
  109. package/dist/{as-number.vue-FKc6UVot.d.mts → as-number.vue-89e-jfVe.d.cts} +1 -1
  110. package/dist/{as-number.vue-PH0wnd3B.d.cts → as-number.vue-CCTMDQYH.d.mts} +1 -1
  111. package/dist/{as-object-Bnyck833.cjs → as-object-DIj1yGSZ.cjs} +9 -5
  112. package/dist/{as-object-3Tlk8bjl.mjs → as-object-JuruOEiL.mjs} +9 -5
  113. package/dist/as-object.cjs +1 -1
  114. package/dist/as-object.d.cts +1 -1
  115. package/dist/as-object.d.mts +1 -1
  116. package/dist/as-object.mjs +1 -1
  117. package/dist/{as-object.vue-B0qKMWPB.d.cts → as-object.vue-CVpEmBqS.d.mts} +1 -1
  118. package/dist/{as-object.vue-DLCEWLe4.d.mts → as-object.vue-tIaVshqY.d.cts} +1 -1
  119. package/dist/{as-paragraph-CQCdz9FR.mjs → as-paragraph-B49pXlhP.mjs} +4 -0
  120. package/dist/{as-paragraph-0opsr433.cjs → as-paragraph-wAHRsd_e.cjs} +4 -0
  121. package/dist/as-paragraph.cjs +1 -1
  122. package/dist/as-paragraph.d.cts +1 -1
  123. package/dist/as-paragraph.d.mts +1 -1
  124. package/dist/as-paragraph.mjs +1 -1
  125. package/dist/{as-paragraph.vue-BIrekTzU.d.mts → as-paragraph.vue-BUdQBjDf.d.cts} +1 -1
  126. package/dist/{as-paragraph.vue-C8JeTZ1s.d.cts → as-paragraph.vue-CS_GUIlF.d.mts} +1 -1
  127. package/dist/{as-radio-8udWHC-l.mjs → as-radio-C5mVvsVH.mjs} +7 -3
  128. package/dist/{as-radio-P9rzMYNp.cjs → as-radio-DQO5uQL3.cjs} +7 -3
  129. package/dist/as-radio.cjs +1 -1
  130. package/dist/as-radio.d.cts +1 -1
  131. package/dist/as-radio.d.mts +1 -1
  132. package/dist/as-radio.mjs +1 -1
  133. package/dist/{as-radio.vue-Rwknlgr7.d.mts → as-radio.vue-BcTgNQsc.d.mts} +1 -1
  134. package/dist/{as-radio.vue-jeHiMfc7.d.cts → as-radio.vue-BmmP8H-m.d.cts} +1 -1
  135. package/dist/as-ref-DHGlYdUh.mjs +422 -0
  136. package/dist/as-ref-fha5dEeo.cjs +427 -0
  137. package/dist/as-ref.cjs +1 -1
  138. package/dist/as-ref.d.cts +1 -1
  139. package/dist/as-ref.d.mts +1 -1
  140. package/dist/as-ref.mjs +1 -1
  141. package/dist/as-ref.vue-DZeTp8EO.d.cts +19 -0
  142. package/dist/as-ref.vue-Gwv8EEKY.d.mts +19 -0
  143. package/dist/{as-select-DVbegHcv.cjs → as-select-B_ZB1_a5.cjs} +20 -7
  144. package/dist/{as-select-3fZCzWku.mjs → as-select-C1lqeKqt.mjs} +21 -8
  145. package/dist/as-select.cjs +1 -1
  146. package/dist/as-select.d.cts +1 -1
  147. package/dist/as-select.d.mts +1 -1
  148. package/dist/as-select.mjs +1 -1
  149. package/dist/{as-select.vue-BIpvu4ba.d.mts → as-select.vue-BMNGb5eH.d.mts} +1 -1
  150. package/dist/{as-select.vue-eMp1zUQE.d.cts → as-select.vue-C3NvSQ2N.d.cts} +1 -1
  151. package/dist/{as-time-W1ExfNxT.cjs → as-time-D7oluFpZ.cjs} +7 -3
  152. package/dist/{as-time-BtTiGWOr.mjs → as-time-D9VTZzsD.mjs} +7 -3
  153. package/dist/as-time.cjs +1 -1
  154. package/dist/as-time.d.cts +1 -1
  155. package/dist/as-time.d.mts +1 -1
  156. package/dist/as-time.mjs +1 -1
  157. package/dist/{as-time.vue-DAeXJ0Zv.d.cts → as-time.vue-CcEfdWI8.d.cts} +1 -1
  158. package/dist/{as-time.vue-DudhL8yx.d.mts → as-time.vue-Dc5ruv4m.d.mts} +1 -1
  159. package/dist/{as-tuple-dfvCxm4R.cjs → as-tuple--4iQOc9p.cjs} +10 -6
  160. package/dist/{as-tuple-CBOp5N1c.mjs → as-tuple-DwP6bvW7.mjs} +10 -6
  161. package/dist/as-tuple.cjs +1 -1
  162. package/dist/as-tuple.d.cts +1 -1
  163. package/dist/as-tuple.d.mts +1 -1
  164. package/dist/as-tuple.mjs +1 -1
  165. package/dist/{as-tuple.vue-C2KTK2RH.d.cts → as-tuple.vue-Cyzfh6Z0.d.mts} +1 -1
  166. package/dist/{as-tuple.vue-CLIDqVFv.d.mts → as-tuple.vue-DzC4tINc.d.cts} +1 -1
  167. package/dist/{as-union-B0h0AlsZ.cjs → as-union-CvSnU1YB.cjs} +9 -5
  168. package/dist/{as-union-izUcMyQt.mjs → as-union-Cy7zefJl.mjs} +9 -5
  169. package/dist/as-union.cjs +1 -1
  170. package/dist/as-union.d.cts +1 -1
  171. package/dist/as-union.d.mts +1 -1
  172. package/dist/as-union.mjs +1 -1
  173. package/dist/{as-union.vue-43Gq2Lh0.d.cts → as-union.vue-CvN-SR9q.d.cts} +1 -1
  174. package/dist/{as-union.vue-CllUYjuh.d.mts → as-union.vue-CwNJYhKj.d.mts} +1 -1
  175. package/dist/{as-variant-picker-D0I5qR2w.mjs → as-variant-picker-3P9wXCUf.mjs} +3 -3
  176. package/dist/{as-variant-picker-oELBST6P.cjs → as-variant-picker-BYrf1YUe.cjs} +3 -3
  177. package/dist/index.cjs +29 -29
  178. package/dist/index.d.cts +22 -22
  179. package/dist/index.d.mts +22 -22
  180. package/dist/index.mjs +28 -28
  181. package/dist/locale.cjs +1 -1
  182. package/dist/locale.mjs +1 -1
  183. package/dist/{types-BbGuPzZk.d.cts → types-COv2t_de.d.cts} +32 -2
  184. package/dist/{types-DxmDaJXr.d.mts → types-DSXbJndw.d.mts} +32 -2
  185. package/dist/{use-as-date-DFcdIfyr.cjs → use-as-date-CAmqx1O7.cjs} +4 -0
  186. package/dist/{use-as-date-DgPRL0O2.mjs → use-as-date-CpXG9klN.mjs} +4 -0
  187. package/dist/{use-as-model-texts-CLzPZ6Go.cjs → use-as-model-texts-DtqNcugR.cjs} +2 -2
  188. package/dist/{use-as-model-texts-D3uf3X8L.mjs → use-as-model-texts-Duq04LpS.mjs} +2 -2
  189. package/dist/{use-as-value-help-BWiBDup3.mjs → use-as-value-help-D16evDGm.mjs} +93 -10
  190. package/dist/{use-as-value-help-BG6aN4yQ.cjs → use-as-value-help-XPeNhfJY.cjs} +97 -8
  191. package/dist/{use-form-context-C5Q9Gznl.cjs → use-form-context-7CK50mTi.cjs} +1 -1
  192. package/dist/{use-form-context-Cw-ETG8f.mjs → use-form-context-ba0N--m6.mjs} +1 -1
  193. package/package.json +9 -9
  194. package/dist/as-ref-BvPM3G73.cjs +0 -353
  195. package/dist/as-ref-C-U7wotf.mjs +0 -348
  196. package/dist/as-ref.vue-D0A4vPXL.d.mts +0 -9
  197. package/dist/as-ref.vue-WufE6ltR.d.cts +0 -9
  198. /package/dist/{_editing-hold-ChPIf1ZC.cjs → _editing-hold-Bj0kZjCr.cjs} +0 -0
  199. /package/dist/{_editing-hold-DVfB2wc_.mjs → _editing-hold-C6emgUTM.mjs} +0 -0
  200. /package/dist/{use-as-locale-WBFjL_OO.mjs → use-as-locale-CznDr-7i.mjs} +0 -0
  201. /package/dist/{use-as-locale-BHltz8Wp.cjs → use-as-locale-eo7FyfaZ.cjs} +0 -0
  202. /package/dist/{variant-label-zYWRiOjJ.mjs → variant-label-CmzTQC2B.mjs} +0 -0
  203. /package/dist/{variant-label-CYIvHn4B.cjs → variant-label-_GLezszT.cjs} +0 -0
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-decimal.vue-Bw9vY0br.mjs";
1
+ import { t as _default } from "./as-decimal.vue-CQXnsDs9.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_decimal_default } from "./as-decimal-HvUQANde.mjs";
1
+ import { t as as_decimal_default } from "./as-decimal-CseZXB7F.mjs";
2
2
  export { as_decimal_default as default };
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-DxmDaJXr.mjs";
1
+ import { s as TAsComponentProps } from "./types-DSXbJndw.mjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-decimal.vue.d.ts
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
1
+ import { s as TAsComponentProps } from "./types-COv2t_de.cjs";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/defaults/as-decimal.vue.d.ts
@@ -1,6 +1,8 @@
1
- const require_use_form_context = require("./use-form-context-C5Q9Gznl.cjs");
2
- const require_use_as_locale = require("./use-as-locale-BHltz8Wp.cjs");
3
- const require_use_as_model_texts = require("./use-as-model-texts-CLzPZ6Go.cjs");
1
+ const require_use_form_context = require("./use-form-context-7CK50mTi.cjs");
2
+ const require_use_as_value_help = require("./use-as-value-help-XPeNhfJY.cjs");
3
+ const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
4
+ const require_use_as_model_texts = require("./use-as-model-texts-DtqNcugR.cjs");
5
+ const require__shape = require("./_shape-BDO-1MzF.cjs");
4
6
  let vue = require("vue");
5
7
  let _atscript_ui = require("@atscript/ui");
6
8
  let _atscript_ui_fns = require("@atscript/ui-fns");
@@ -155,53 +157,72 @@ function useAsOptionalField(field) {
155
157
  };
156
158
  }
157
159
  //#endregion
158
- //#region src/composables/use-as-data.ts
159
- const EMPTY_PATH = (0, vue.computed)(() => "");
160
- const EMPTY_DATA = (0, vue.computed)(() => void 0);
160
+ //#region src/composables/use-as-value-help-options.ts
161
+ /** One dev-mode warning per binding (url + field). */
162
+ const warned = /* @__PURE__ */ new Set();
163
+ function isDev() {
164
+ try {
165
+ return process.env.NODE_ENV !== "production";
166
+ } catch {
167
+ return true;
168
+ }
169
+ }
170
+ const isEmpty = (v) => v === void 0 || v === null || v === "";
161
171
  /**
162
- * Reactive access to form data at any point in the `<AsForm>` tree: readers
163
- * plus `setValueAt` / `setSibling` writers. Outside a form, all readers
164
- * return `undefined` and the writers do nothing.
165
- *
166
- * Call sites get a `ComputedRef` so they can compose it directly with
167
- * other reactive primitives without an extra `computed()` wrapper.
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.
168
178
  */
169
- function useAsData() {
170
- const wrapped = (0, vue.inject)(require_use_form_context.ROOT_DATA_KEY, EMPTY_DATA);
171
- const pathPrefix = (0, vue.inject)(require_use_form_context.PATH_PREFIX_KEY, EMPTY_PATH);
172
- const handleChange = (0, vue.inject)(require_use_form_context.CHANGE_HANDLER_KEY, void 0);
173
- const rootData = (0, vue.computed)(() => {
174
- return wrapped.value?.value;
179
+ function useAsValueHelpOptions(opts) {
180
+ const { info, model, onBlur } = opts;
181
+ const vh = require_use_as_value_help.useAsValueHelp({
182
+ info,
183
+ model,
184
+ onBlur,
185
+ limit: _atscript_ui.VALUE_HELP_OPTIONS_CAP + 1
175
186
  });
176
- function getValueAt(path) {
177
- return (0, vue.computed)(() => {
178
- const w = wrapped.value;
179
- if (!w) return void 0;
180
- return (0, _atscript_ui.getByPath)(w, path);
181
- });
182
- }
183
- function siblingValue(name) {
184
- return (0, vue.computed)(() => {
185
- const w = wrapped.value;
186
- if (!w) return void 0;
187
- return (0, _atscript_ui.getByPath)(w, (0, _atscript_ui.joinPath)(pathPrefix.value, name));
188
- });
189
- }
190
- function setValueAt(path, value) {
191
- const w = wrapped.value;
192
- if (!w) return;
193
- (0, _atscript_ui.setByPath)(w, path, value);
194
- handleChange?.("update", path, value);
195
- }
196
- function setSibling(name, value) {
197
- setValueAt((0, _atscript_ui.joinPath)(pathPrefix.value, name), value);
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)) {
193
+ warned.add(key);
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
+ }
196
+ });
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);
202
+ 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;
212
+ });
213
+ function pick(value) {
214
+ if (isEmpty(value)) {
215
+ vh.clear(value);
216
+ return;
217
+ }
218
+ const row = require__shape.soleRow(vh.results.value, info.targetField, value);
219
+ if (row) vh.selectItem(row);
220
+ else vh.commitValue(value);
198
221
  }
199
222
  return {
200
- rootData,
201
- getValueAt,
202
- siblingValue,
203
- setValueAt,
204
- setSibling
223
+ options,
224
+ overflow,
225
+ pick
205
226
  };
206
227
  }
207
228
  //#endregion
@@ -297,12 +318,13 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
297
318
  let resolvedPrefix;
298
319
  let resolvedSuffix;
299
320
  let resolvedScale;
321
+ const siblingPrefix = props.field.path.slice(0, props.field.path.lastIndexOf(".") + 1);
300
322
  if (hasAdornment) {
301
- const _data = useAsData();
323
+ const _data = require_use_as_value_help.useAsData();
302
324
  const { locale: _locale } = require_use_as_locale.useAsLocale();
303
325
  if (currencyLiteral !== void 0) resolvedCurrencyCode = currencyLiteral;
304
326
  else if (currencyRefField !== void 0) {
305
- const ref = _data.siblingValue(currencyRefField);
327
+ const ref = _data.siblingValue(siblingPrefix + currencyRefField);
306
328
  resolvedCurrencyCode = (0, vue.computed)(() => {
307
329
  const v = ref.value;
308
330
  return typeof v === "string" && v.length > 0 ? v : void 0;
@@ -310,14 +332,14 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
310
332
  }
311
333
  if (unitLiteral !== void 0) resolvedUnitCode = unitLiteral;
312
334
  else if (unitRefField !== void 0) {
313
- const ref = _data.siblingValue(unitRefField);
335
+ const ref = _data.siblingValue(siblingPrefix + unitRefField);
314
336
  resolvedUnitCode = (0, vue.computed)(() => {
315
337
  const v = ref.value;
316
338
  return typeof v === "string" && v.length > 0 ? v : void 0;
317
339
  });
318
340
  }
319
341
  const readCode = (v) => (0, vue.isRef)(v) ? v.value : v;
320
- const prefixRefValue = prefixRefField ? _data.siblingValue(prefixRefField) : void 0;
342
+ const prefixRefValue = prefixRefField ? _data.siblingValue(siblingPrefix + prefixRefField) : void 0;
321
343
  resolvedPrefix = (0, vue.computed)(() => {
322
344
  if (prefixLiteral !== void 0 && prefixLiteral.length > 0) return (0, _atscript_ui.userText)(_atscript_ui.UI_FORM_PREFIX, prefixLiteral, modelT());
323
345
  if (prefixRefValue) {
@@ -327,7 +349,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
327
349
  const code = readCode(resolvedCurrencyCode);
328
350
  if (code) return (0, _atscript_ui.getCurrencyDisplayParts)(code, _locale.value).symbol;
329
351
  });
330
- const suffixRefValue = suffixRefField ? _data.siblingValue(suffixRefField) : void 0;
352
+ const suffixRefValue = suffixRefField ? _data.siblingValue(siblingPrefix + suffixRefField) : void 0;
331
353
  resolvedSuffix = (0, vue.computed)(() => {
332
354
  if (suffixLiteral !== void 0 && suffixLiteral.length > 0) return (0, _atscript_ui.userText)(_atscript_ui.UI_FORM_SUFFIX, suffixLiteral, modelT());
333
355
  if (suffixRefValue) {
@@ -385,6 +407,7 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
385
407
  if (componentName) return components?.value?.[componentName];
386
408
  const map = types?.value;
387
409
  if (!map) return void 0;
410
+ if (boundOptions?.overflow.value && map.ref) return map.ref;
388
411
  return (props.field.customType ? map[props.field.customType] : void 0) ?? map[props.field.type];
389
412
  });
390
413
  let disabled;
@@ -499,6 +522,22 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
499
522
  handleChange("update", absolutePath.value, current);
500
523
  }
501
524
  };
525
+ const boundOptions = valueHelp && options === void 0 && (props.field.type === "select" || props.field.type === "radio") ? useAsValueHelpOptions({
526
+ info: valueHelp,
527
+ model,
528
+ onBlur
529
+ }) : void 0;
530
+ if (boundOptions) options = boundOptions.options;
531
+ const valueLabelMeta = (0, _atscript_ui.valueLabelOf)(prop);
532
+ let valueLabel;
533
+ if (valueLabelMeta) {
534
+ const text = require_use_as_value_help.useAsData().siblingValue(siblingPrefix + valueLabelMeta.field);
535
+ valueLabel = (0, vue.computed)(() => {
536
+ const v = model.value;
537
+ if (v === void 0 || v === null || v === "" || typeof v === "object") return void 0;
538
+ return (0, _atscript_ui.arrangeText)(String(v), text.value, valueLabelMeta.arrangement);
539
+ });
540
+ }
502
541
  if (!isStructured && !isUnion) (0, vue.watch)(model, (value, prev) => {
503
542
  if (value === prev) return;
504
543
  const path = absolutePath.value;
@@ -515,7 +554,8 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
515
554
  return model.value;
516
555
  },
517
556
  set value(v) {
518
- model.value = v;
557
+ if (boundOptions && !boundOptions.overflow.value) boundOptions.pick(v);
558
+ else model.value = v;
519
559
  }
520
560
  },
521
561
  type: props.field.type,
@@ -596,10 +636,12 @@ var as_field_default = /* @__PURE__ */ (0, vue.defineComponent)({
596
636
  return resolvedComponent.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(resolvedComponent.value), (0, vue.mergeProps)({ key: 0 }, componentProps.value, {
597
637
  "is-dirty": (0, vue.unref)(isDirty),
598
638
  ariaDescribedBy: ariaDescribedBy.value,
639
+ "value-label": (0, vue.unref)(valueLabel),
599
640
  onAction: (0, vue.unref)(handleAction)
600
641
  }), null, 16, [
601
642
  "is-dirty",
602
643
  "ariaDescribedBy",
644
+ "value-label",
603
645
  "onAction"
604
646
  ])) : ((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));
605
647
  };
@@ -612,12 +654,6 @@ Object.defineProperty(exports, "as_field_default", {
612
654
  return as_field_default;
613
655
  }
614
656
  });
615
- Object.defineProperty(exports, "useAsData", {
616
- enumerable: true,
617
- get: function() {
618
- return useAsData;
619
- }
620
- });
621
657
  Object.defineProperty(exports, "useAsField", {
622
658
  enumerable: true,
623
659
  get: function() {
@@ -1,8 +1,10 @@
1
- import { _ as PATH_PREFIX_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_NORMALIZED_DATA_KEY, f as FORM_PATCH_KEY, h as LEVEL_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as HIDE_ROOT_TITLE_KEY, o as COMPONENTS_KEY, p as FORM_STATE_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY, v as ROOT_DATA_KEY, y as TYPES_KEY } from "./use-form-context-Cw-ETG8f.mjs";
2
- import { a as useAsLocale, o as useAsTexts } from "./use-as-locale-WBFjL_OO.mjs";
3
- import { t as useAsModelTexts } from "./use-as-model-texts-D3uf3X8L.mjs";
1
+ import { _ as PATH_PREFIX_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_NORMALIZED_DATA_KEY, f as FORM_PATCH_KEY, h as LEVEL_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as HIDE_ROOT_TITLE_KEY, o as COMPONENTS_KEY, p as FORM_STATE_KEY, r as useFormContext, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY, y as TYPES_KEY } from "./use-form-context-ba0N--m6.mjs";
2
+ import { n as useAsValueHelp, r as useAsData } from "./use-as-value-help-D16evDGm.mjs";
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-Duq04LpS.mjs";
5
+ import { a as soleRow } from "./_shape-DhwW2SvD.mjs";
4
6
  import { computed, createBlock, createElementBlock, defineComponent, inject, isRef, mergeProps, onUnmounted, openBlock, provide, ref, resolveDynamicComponent, toDisplayString, unref, useId, watch } from "vue";
5
- 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, WF_ACTION_WITH_DATA, buildGridClasses, createFieldValidator, fieldText, getByPath, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isTupleField, isUnionField, joinPath, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, setByPath, userText } 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, arrangeText, buildGridClasses, createFieldValidator, fieldText, getCurrencyDecimals, getCurrencyDisplayParts, getFieldMeta, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isTupleField, isUnionField, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, userText, valueHelpOptions, valueLabelOf } from "@atscript/ui";
6
8
  import { buildFieldEntry } from "@atscript/ui-fns";
7
9
  //#region src/composables/use-as-field.ts
8
10
  function useAsField(opts) {
@@ -155,53 +157,72 @@ function useAsOptionalField(field) {
155
157
  };
156
158
  }
157
159
  //#endregion
158
- //#region src/composables/use-as-data.ts
159
- const EMPTY_PATH = computed(() => "");
160
- const EMPTY_DATA = computed(() => void 0);
160
+ //#region src/composables/use-as-value-help-options.ts
161
+ /** One dev-mode warning per binding (url + field). */
162
+ const warned = /* @__PURE__ */ new Set();
163
+ function isDev() {
164
+ try {
165
+ return process.env.NODE_ENV !== "production";
166
+ } catch {
167
+ return true;
168
+ }
169
+ }
170
+ const isEmpty = (v) => v === void 0 || v === null || v === "";
161
171
  /**
162
- * Reactive access to form data at any point in the `<AsForm>` tree: readers
163
- * plus `setValueAt` / `setSibling` writers. Outside a form, all readers
164
- * return `undefined` and the writers do nothing.
165
- *
166
- * Call sites get a `ComputedRef` so they can compose it directly with
167
- * other reactive primitives without an extra `computed()` wrapper.
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.
168
178
  */
169
- function useAsData() {
170
- const wrapped = inject(ROOT_DATA_KEY, EMPTY_DATA);
171
- const pathPrefix = inject(PATH_PREFIX_KEY, EMPTY_PATH);
172
- const handleChange = inject(CHANGE_HANDLER_KEY, void 0);
173
- const rootData = computed(() => {
174
- return wrapped.value?.value;
179
+ function useAsValueHelpOptions(opts) {
180
+ const { info, model, onBlur } = opts;
181
+ const vh = useAsValueHelp({
182
+ info,
183
+ model,
184
+ onBlur,
185
+ limit: VALUE_HELP_OPTIONS_CAP + 1
175
186
  });
176
- function getValueAt(path) {
177
- return computed(() => {
178
- const w = wrapped.value;
179
- if (!w) return void 0;
180
- return getByPath(w, path);
181
- });
182
- }
183
- function siblingValue(name) {
184
- return computed(() => {
185
- const w = wrapped.value;
186
- if (!w) return void 0;
187
- return getByPath(w, joinPath(pathPrefix.value, name));
188
- });
189
- }
190
- function setValueAt(path, value) {
191
- const w = wrapped.value;
192
- if (!w) return;
193
- setByPath(w, path, value);
194
- handleChange?.("update", path, value);
195
- }
196
- function setSibling(name, value) {
197
- setValueAt(joinPath(pathPrefix.value, name), value);
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)) {
193
+ warned.add(key);
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
+ }
196
+ });
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);
202
+ 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;
212
+ });
213
+ function pick(value) {
214
+ if (isEmpty(value)) {
215
+ vh.clear(value);
216
+ return;
217
+ }
218
+ const row = soleRow(vh.results.value, info.targetField, value);
219
+ if (row) vh.selectItem(row);
220
+ else vh.commitValue(value);
198
221
  }
199
222
  return {
200
- rootData,
201
- getValueAt,
202
- siblingValue,
203
- setValueAt,
204
- setSibling
223
+ options,
224
+ overflow,
225
+ pick
205
226
  };
206
227
  }
207
228
  //#endregion
@@ -297,12 +318,13 @@ var as_field_default = /* @__PURE__ */ defineComponent({
297
318
  let resolvedPrefix;
298
319
  let resolvedSuffix;
299
320
  let resolvedScale;
321
+ const siblingPrefix = props.field.path.slice(0, props.field.path.lastIndexOf(".") + 1);
300
322
  if (hasAdornment) {
301
323
  const _data = useAsData();
302
324
  const { locale: _locale } = useAsLocale();
303
325
  if (currencyLiteral !== void 0) resolvedCurrencyCode = currencyLiteral;
304
326
  else if (currencyRefField !== void 0) {
305
- const ref = _data.siblingValue(currencyRefField);
327
+ const ref = _data.siblingValue(siblingPrefix + currencyRefField);
306
328
  resolvedCurrencyCode = computed(() => {
307
329
  const v = ref.value;
308
330
  return typeof v === "string" && v.length > 0 ? v : void 0;
@@ -310,14 +332,14 @@ var as_field_default = /* @__PURE__ */ defineComponent({
310
332
  }
311
333
  if (unitLiteral !== void 0) resolvedUnitCode = unitLiteral;
312
334
  else if (unitRefField !== void 0) {
313
- const ref = _data.siblingValue(unitRefField);
335
+ const ref = _data.siblingValue(siblingPrefix + unitRefField);
314
336
  resolvedUnitCode = computed(() => {
315
337
  const v = ref.value;
316
338
  return typeof v === "string" && v.length > 0 ? v : void 0;
317
339
  });
318
340
  }
319
341
  const readCode = (v) => isRef(v) ? v.value : v;
320
- const prefixRefValue = prefixRefField ? _data.siblingValue(prefixRefField) : void 0;
342
+ const prefixRefValue = prefixRefField ? _data.siblingValue(siblingPrefix + prefixRefField) : void 0;
321
343
  resolvedPrefix = computed(() => {
322
344
  if (prefixLiteral !== void 0 && prefixLiteral.length > 0) return userText(UI_FORM_PREFIX, prefixLiteral, modelT());
323
345
  if (prefixRefValue) {
@@ -327,7 +349,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
327
349
  const code = readCode(resolvedCurrencyCode);
328
350
  if (code) return getCurrencyDisplayParts(code, _locale.value).symbol;
329
351
  });
330
- const suffixRefValue = suffixRefField ? _data.siblingValue(suffixRefField) : void 0;
352
+ const suffixRefValue = suffixRefField ? _data.siblingValue(siblingPrefix + suffixRefField) : void 0;
331
353
  resolvedSuffix = computed(() => {
332
354
  if (suffixLiteral !== void 0 && suffixLiteral.length > 0) return userText(UI_FORM_SUFFIX, suffixLiteral, modelT());
333
355
  if (suffixRefValue) {
@@ -385,6 +407,7 @@ var as_field_default = /* @__PURE__ */ defineComponent({
385
407
  if (componentName) return components?.value?.[componentName];
386
408
  const map = types?.value;
387
409
  if (!map) return void 0;
410
+ if (boundOptions?.overflow.value && map.ref) return map.ref;
388
411
  return (props.field.customType ? map[props.field.customType] : void 0) ?? map[props.field.type];
389
412
  });
390
413
  let disabled;
@@ -499,6 +522,22 @@ var as_field_default = /* @__PURE__ */ defineComponent({
499
522
  handleChange("update", absolutePath.value, current);
500
523
  }
501
524
  };
525
+ const boundOptions = valueHelp && options === void 0 && (props.field.type === "select" || props.field.type === "radio") ? useAsValueHelpOptions({
526
+ info: valueHelp,
527
+ model,
528
+ onBlur
529
+ }) : void 0;
530
+ if (boundOptions) options = boundOptions.options;
531
+ const valueLabelMeta = valueLabelOf(prop);
532
+ let valueLabel;
533
+ if (valueLabelMeta) {
534
+ const text = useAsData().siblingValue(siblingPrefix + valueLabelMeta.field);
535
+ valueLabel = computed(() => {
536
+ const v = model.value;
537
+ if (v === void 0 || v === null || v === "" || typeof v === "object") return void 0;
538
+ return arrangeText(String(v), text.value, valueLabelMeta.arrangement);
539
+ });
540
+ }
502
541
  if (!isStructured && !isUnion) watch(model, (value, prev) => {
503
542
  if (value === prev) return;
504
543
  const path = absolutePath.value;
@@ -515,7 +554,8 @@ var as_field_default = /* @__PURE__ */ defineComponent({
515
554
  return model.value;
516
555
  },
517
556
  set value(v) {
518
- model.value = v;
557
+ if (boundOptions && !boundOptions.overflow.value) boundOptions.pick(v);
558
+ else model.value = v;
519
559
  }
520
560
  },
521
561
  type: props.field.type,
@@ -596,14 +636,16 @@ var as_field_default = /* @__PURE__ */ defineComponent({
596
636
  return resolvedComponent.value ? (openBlock(), createBlock(resolveDynamicComponent(resolvedComponent.value), mergeProps({ key: 0 }, componentProps.value, {
597
637
  "is-dirty": unref(isDirty),
598
638
  ariaDescribedBy: ariaDescribedBy.value,
639
+ "value-label": unref(valueLabel),
599
640
  onAction: unref(handleAction)
600
641
  }), null, 16, [
601
642
  "is-dirty",
602
643
  "ariaDescribedBy",
644
+ "value-label",
603
645
  "onAction"
604
646
  ])) : (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));
605
647
  };
606
648
  }
607
649
  });
608
650
  //#endregion
609
- export { useAsField as a, useAsFieldScope as i, useAsData as n, useAsOptionalField as r, as_field_default as t };
651
+ export { useAsField as i, useAsOptionalField as n, useAsFieldScope as r, as_field_default as t };
@@ -1,8 +1,8 @@
1
1
  import { i as useAsFocusFirstAfter } from "./focus-after-toggle-CWw0i0B6.mjs";
2
- import { n as useAsUnionVariant, t as formatIndexedLabelParts } from "./use-form-context-Cw-ETG8f.mjs";
3
- import { o as useAsTexts } from "./use-as-locale-WBFjL_OO.mjs";
4
- import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-D0I5qR2w.mjs";
5
- import { n as useEditingHold } from "./_editing-hold-DVfB2wc_.mjs";
2
+ import { n as useAsUnionVariant, t as formatIndexedLabelParts } from "./use-form-context-ba0N--m6.mjs";
3
+ import { o as useAsTexts } from "./use-as-locale-CznDr-7i.mjs";
4
+ import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-3P9wXCUf.mjs";
5
+ import { n as useEditingHold } from "./_editing-hold-C6emgUTM.mjs";
6
6
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toDisplayString, unref, vShow, withDirectives, withKeys, withModifiers } from "vue";
7
7
  //#region src/components/internal/as-no-data.vue?vue&type=script&setup=true&lang.ts
8
8
  const _hoisted_1$1 = {
@@ -210,6 +210,10 @@ var as_field_shell_default = /* @__PURE__ */ defineComponent({
210
210
  type: Object,
211
211
  required: false
212
212
  },
213
+ valueLabel: {
214
+ type: String,
215
+ required: false
216
+ },
213
217
  singularLabel: {
214
218
  type: String,
215
219
  required: false
@@ -1,8 +1,8 @@
1
1
  const require_focus_after_toggle = require("./focus-after-toggle-B8DDrJ7d.cjs");
2
- const require_use_form_context = require("./use-form-context-C5Q9Gznl.cjs");
3
- const require_use_as_locale = require("./use-as-locale-BHltz8Wp.cjs");
4
- const require_as_variant_picker = require("./as-variant-picker-oELBST6P.cjs");
5
- const require__editing_hold = require("./_editing-hold-ChPIf1ZC.cjs");
2
+ const require_use_form_context = require("./use-form-context-7CK50mTi.cjs");
3
+ const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
4
+ const require_as_variant_picker = require("./as-variant-picker-BYrf1YUe.cjs");
5
+ const require__editing_hold = require("./_editing-hold-Bj0kZjCr.cjs");
6
6
  let vue = require("vue");
7
7
  //#region src/components/internal/as-no-data.vue?vue&type=script&setup=true&lang.ts
8
8
  const _hoisted_1$1 = {
@@ -210,6 +210,10 @@ var as_field_shell_default = /* @__PURE__ */ (0, vue.defineComponent)({
210
210
  type: Object,
211
211
  required: false
212
212
  },
213
+ valueLabel: {
214
+ type: String,
215
+ required: false
216
+ },
213
217
  singularLabel: {
214
218
  type: String,
215
219
  required: false
@@ -1,2 +1,2 @@
1
- const require_as_field_shell = require("./as-field-shell-BOeyo1FP.cjs");
1
+ const require_as_field_shell = require("./as-field-shell-P7p47Pbr.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-CouocQ2f.cjs";
1
+ import { t as _default } from "./as-field-shell.vue-DsYdUv7b.cjs";
2
2
  export = _default;
@@ -1,2 +1,2 @@
1
- import { t as _default } from "./as-field-shell.vue-DIYpxzud.mjs";
1
+ import { t as _default } from "./as-field-shell.vue-CQSSK4hh.mjs";
2
2
  export { _default as default };
@@ -1,2 +1,2 @@
1
- import { t as as_field_shell_default } from "./as-field-shell-BQPySL71.mjs";
1
+ import { t as as_field_shell_default } from "./as-field-shell-CSxqm12l.mjs";
2
2
  export { as_field_shell_default as default };
@@ -1,4 +1,4 @@
1
- import { s as TAsComponentProps } from "./types-BbGuPzZk.cjs";
1
+ import { s as TAsComponentProps } from "./types-DSXbJndw.mjs";
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-DxmDaJXr.mjs";
1
+ import { s as TAsComponentProps } from "./types-COv2t_de.cjs";
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-C3lIiHCI.cjs");
1
+ const require_as_field = require("./as-field-BHUA1YpM.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-R3KYssad.mjs";
1
+ import { t as as_field_default } from "./as-field-CvjOHQ9H.mjs";
2
2
  export { as_field_default as default };
@@ -1,10 +1,10 @@
1
1
  import { r as resetKeepingFocus } from "./focus-after-toggle-CWw0i0B6.mjs";
2
- import { _ as PATH_PREFIX_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_NORMALIZED_DATA_KEY, f as FORM_PATCH_KEY, g as MODEL_TEXTS_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as HIDE_ROOT_TITLE_KEY, o as COMPONENTS_KEY, p as FORM_STATE_KEY, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY, v as ROOT_DATA_KEY, y as TYPES_KEY } from "./use-form-context-Cw-ETG8f.mjs";
2
+ import { _ as PATH_PREFIX_KEY, a as CHANGE_HANDLER_KEY, c as ERRORS_KEY, d as FORM_NORMALIZED_DATA_KEY, f as FORM_PATCH_KEY, g as MODEL_TEXTS_KEY, i as ACTION_HANDLER_KEY, l as FORM_CONTEXT_KEY, m as HIDE_ROOT_TITLE_KEY, o as COMPONENTS_KEY, p as FORM_STATE_KEY, s as DISMISS_EXTERNAL_AT_KEY, u as FORM_DATA_KEY, v as ROOT_DATA_KEY, y as TYPES_KEY } from "./use-form-context-ba0N--m6.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 { o as useAsTexts } from "./use-as-locale-WBFjL_OO.mjs";
5
- import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-BWiBDup3.mjs";
6
- import { t as as_field_default } from "./as-field-R3KYssad.mjs";
7
- import { t as as_iterator_default } from "./as-iterator-Bd1fXGs6.mjs";
4
+ import { t as CLIENT_FACTORY_KEY } from "./use-as-value-help-D16evDGm.mjs";
5
+ import { o as useAsTexts } from "./use-as-locale-CznDr-7i.mjs";
6
+ import { t as as_field_default } from "./as-field-CvjOHQ9H.mjs";
7
+ import { t as as_iterator_default } from "./as-iterator-BTJ37tre.mjs";
8
8
  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
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, deleteByPath, getByPath, getDeclaredFormActions, getFormValidator, iteratePathAncestors, mergeErrorMaps, omitPaths, omitSkippedNavFields, resolveFormProp, setByPath, unionVariantChanged } from "@atscript/ui";
10
10
  //#region src/composables/use-as-form-patch.ts
@@ -1,10 +1,10 @@
1
1
  const require_focus_after_toggle = require("./focus-after-toggle-B8DDrJ7d.cjs");
2
- const require_use_form_context = require("./use-form-context-C5Q9Gznl.cjs");
2
+ const require_use_form_context = require("./use-form-context-7CK50mTi.cjs");
3
3
  const require_use_as_nested_sections_store = require("./use-as-nested-sections-store-ApstV9NL.cjs");
4
- const require_use_as_locale = require("./use-as-locale-BHltz8Wp.cjs");
5
- const require_use_as_value_help = require("./use-as-value-help-BG6aN4yQ.cjs");
6
- const require_as_field = require("./as-field-C3lIiHCI.cjs");
7
- const require_as_iterator = require("./as-iterator-BB7DB04y.cjs");
4
+ const require_use_as_value_help = require("./use-as-value-help-XPeNhfJY.cjs");
5
+ const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
6
+ const require_as_field = require("./as-field-BHUA1YpM.cjs");
7
+ const require_as_iterator = require("./as-iterator-rF5FyWGS.cjs");
8
8
  let vue = require("vue");
9
9
  let _atscript_ui = require("@atscript/ui");
10
10
  //#region src/composables/use-as-form-patch.ts
package/dist/as-form.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const require_as_form = require("./as-form-BTNctHb9.cjs");
1
+ const require_as_form = require("./as-form-rI4daFP2.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-BI5mC0o7.cjs";
1
+ import { n as _default, t as Props } from "./as-form.vue-C7yj7eRt.cjs";
2
2
  export { Props, _default as default };