@stonecrop/aform 0.60.0 → 0.60.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/aform.js CHANGED
@@ -1,4 +1,4 @@
1
- import { hasBadgeOptions, isBadgeDescriptor, lookupBadge, partsPatch, readParts, selectChoices } from "@stonecrop/schema";
1
+ import { flattenFields, hasBadgeOptions, isBadgeDescriptor, lookupBadge, partsPatch, readParts, selectChoices } from "@stonecrop/schema";
2
2
  import { TABLE_TUPLE_CURRENCY_PICKER, TABLE_TUPLE_QUANTITY_PICKER, install as install$1, isTableTuplePickerModal } from "@stonecrop/atable";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, toDisplayString, toHandlers, unref, useId, useModel, useTemplateRef, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
4
4
  import { currencyAmountEntryPattern, currencyAmountSeparators, currencyInputFractionDigits, formatCurrencyAmount, formatCurrencyAmountInput, formatCurrencySymbol, fromISODate, isSemver, isSemverPrefix, parseCurrencyAmountInput, roundToPrecision, useArithmeticInput } from "@stonecrop/utilities";
@@ -114,6 +114,15 @@ function resolvedFieldsToColumns(fields) {
114
114
  return columns;
115
115
  }
116
116
  // src/composables/fieldErrorA11y.ts
117
+ /**
118
+ * The message a field shows: the errors it is handed, joined, and nothing when it is handed none.
119
+ *
120
+ * A field only shows; it never words. Wording an error reported without a message is AForm's job
121
+ * (see `wordErrors`), since only the form knows which field each error came from.
122
+ */
123
+ function fieldErrorText(errors) {
124
+ return (errors ?? []).filter(Boolean).join("; ");
125
+ }
117
126
  function fieldErrorA11y(uuid, errorText, extraDescribedBy) {
118
127
  const errorId = computed(() => uuid ? `${uuid}-error` : void 0);
119
128
  const hasError = computed(() => Boolean(errorText.value));
@@ -151,7 +160,7 @@ var ACheckbox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
151
160
  required: { type: Boolean },
152
161
  mode: {},
153
162
  uuid: {},
154
- validation: { default: () => ({ errorMessage: "" }) },
163
+ validation: {},
155
164
  errors: {}
156
165
  }, {
157
166
  "modelValue": { type: [
@@ -164,7 +173,7 @@ var ACheckbox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
164
173
  }),
165
174
  emits: ["update:modelValue"],
166
175
  setup(__props) {
167
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
176
+ const errorText = computed(() => fieldErrorText(__props.errors));
168
177
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
169
178
  const checkbox = useModel(__props, "modelValue");
170
179
  return (_ctx, _cache) => {
@@ -199,7 +208,7 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
199
208
  return target;
200
209
  };
201
210
  // src/components/form/ACheckbox.vue
202
- var ACheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ACheckbox_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-f28e7db6"]]);
211
+ var ACheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(ACheckbox_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-fd79e86d"]]);
203
212
  // src/utils/linkValue.ts
204
213
  function linkId(value) {
205
214
  if (value == null) return void 0;
@@ -461,7 +470,7 @@ var ADropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
461
470
  required: { type: Boolean },
462
471
  mode: {},
463
472
  uuid: {},
464
- validation: { default: () => ({ errorMessage: "" }) },
473
+ validation: {},
465
474
  errors: {},
466
475
  options: { default: () => [] },
467
476
  format: {},
@@ -510,7 +519,7 @@ var ADropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
510
519
  const badgeDescriptor = computed(() => linkPicker.value ? null : resolveFieldBadge(search.value, __props.options, formatFn.value));
511
520
  const inputAccentStyle = computed(() => badgeInputAccentStyle(badgeDescriptor.value ?? void 0));
512
521
  const displayAccentStyle = computed(() => badgeInputAccentStyle(badgeDescriptor.value ?? void 0));
513
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
522
+ const errorText = computed(() => fieldErrorText(__props.errors));
514
523
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
515
524
  const modelValue = useModel(__props, "modelValue");
516
525
  const linkModel = useModel(__props, "linkValue");
@@ -854,7 +863,7 @@ var ADropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
854
863
  }, toDisplayString(errorText.value), 9, _hoisted_11$5)), [[vShow, errorText.value]]) : createCommentVNode("", true)], 64))], 2);
855
864
  };
856
865
  }
857
- }), [["__scopeId", "data-v-a96ab394"]]);
866
+ }), [["__scopeId", "data-v-486dd9d1"]]);
858
867
  // src/components/form/ACurrencyInput.vue?vue&type=script&setup=true&lang.ts
859
868
  var _hoisted_1$23 = { class: "aform_form-element acurrency" };
860
869
  var _hoisted_2$19 = { class: "aform_display-value" };
@@ -904,7 +913,7 @@ var ACurrencyInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
904
913
  required: { type: Boolean },
905
914
  mode: {},
906
915
  uuid: {},
907
- validation: { default: () => ({ errorMessage: "" }) },
916
+ validation: {},
908
917
  errors: {},
909
918
  options: { default: () => ({}) },
910
919
  currencyLabel: { default: "Currency" }
@@ -914,7 +923,7 @@ var ACurrencyInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
914
923
  }),
915
924
  emits: ["update:modelValue"],
916
925
  setup(__props) {
917
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
926
+ const errorText = computed(() => fieldErrorText(__props.errors));
918
927
  const helperId = computed(() => __props.uuid ? `${__props.uuid}-helper` : void 0);
919
928
  const modelValue = useModel(__props, "modelValue");
920
929
  const shown = computed(() => {
@@ -1191,7 +1200,7 @@ var ACurrencyInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
1191
1200
  ], 64))]);
1192
1201
  };
1193
1202
  }
1194
- }), [["__scopeId", "data-v-c18d0c0d"]]);
1203
+ }), [["__scopeId", "data-v-2aebb435"]]);
1195
1204
  // src/utils/typedDay.ts
1196
1205
  var TYPED_DAY_FORMAT = {
1197
1206
  calendar: "gregory",
@@ -1273,7 +1282,7 @@ var ADatePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
1273
1282
  required: { type: Boolean },
1274
1283
  mode: {},
1275
1284
  uuid: {},
1276
- validation: { default: () => ({ errorMessage: "" }) },
1285
+ validation: {},
1277
1286
  errors: {}
1278
1287
  }, {
1279
1288
  "modelValue": {},
@@ -1281,7 +1290,7 @@ var ADatePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
1281
1290
  }),
1282
1291
  emits: /*@__PURE__*/ mergeModels(["get-date"], ["update:modelValue"]),
1283
1292
  setup(__props, { expose: __expose, emit: __emit }) {
1284
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
1293
+ const errorText = computed(() => fieldErrorText(__props.errors));
1285
1294
  const { errorId } = fieldErrorA11y(__props.uuid, errorText);
1286
1295
  const date = useModel(__props, "modelValue");
1287
1296
  const selectedDate = ref(fromISODate(date.value ?? "") ?? Temporal.Now.plainDateISO());
@@ -1569,7 +1578,7 @@ var ADatePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
1569
1578
  }, toDisplayString(errorText.value), 9, _hoisted_14$1), [[vShow, errorText.value]])], 64));
1570
1579
  };
1571
1580
  }
1572
- }), [["__scopeId", "data-v-d0133599"]]);
1581
+ }), [["__scopeId", "data-v-2d02eab2"]]);
1573
1582
  // src/components/form/ADateTimeInput.vue?vue&type=script&setup=true&lang.ts
1574
1583
  var _hoisted_1$21 = { class: "adate_time" };
1575
1584
  var _hoisted_2$17 = { class: "adate_time_fields" };
@@ -1970,7 +1979,7 @@ var ADate_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
1970
1979
  required: { type: Boolean },
1971
1980
  mode: {},
1972
1981
  uuid: {},
1973
- validation: { default: () => ({ errorMessage: "" }) },
1982
+ validation: {},
1974
1983
  errors: {}
1975
1984
  }, {
1976
1985
  "modelValue": {},
@@ -1978,7 +1987,7 @@ var ADate_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
1978
1987
  }),
1979
1988
  emits: ["update:modelValue"],
1980
1989
  setup(__props) {
1981
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
1990
+ const errorText = computed(() => fieldErrorText(__props.errors));
1982
1991
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
1983
1992
  const modelValue = useModel(__props, "modelValue");
1984
1993
  const boxDay = computed({
@@ -2043,7 +2052,7 @@ var ADate_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
2043
2052
  ], 64))], 32);
2044
2053
  };
2045
2054
  }
2046
- }), [["__scopeId", "data-v-16f8f8f2"]]);
2055
+ }), [["__scopeId", "data-v-ea25d026"]]);
2047
2056
  // src/components/form/ABadge.vue
2048
2057
  var ABadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2049
2058
  __name: "ABadge",
@@ -2131,7 +2140,7 @@ var ASegmentedControl_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
2131
2140
  required: { type: Boolean },
2132
2141
  mode: {},
2133
2142
  uuid: {},
2134
- validation: { default: () => ({ errorMessage: "" }) },
2143
+ validation: {},
2135
2144
  errors: {},
2136
2145
  options: { default: () => void 0 },
2137
2146
  size: { default: "sm" },
@@ -2165,7 +2174,7 @@ var ASegmentedControl_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
2165
2174
  selected.value = value;
2166
2175
  }
2167
2176
  });
2168
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
2177
+ const errorText = computed(() => fieldErrorText(__props.errors));
2169
2178
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
2170
2179
  const fallbackId = useId();
2171
2180
  const groupName = computed(() => __props.uuid ?? `aform-segmented-${fallbackId}`);
@@ -2270,7 +2279,7 @@ var ASegmentedControl_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
2270
2279
  ], 64))], 2);
2271
2280
  };
2272
2281
  }
2273
- }), [["__scopeId", "data-v-8b740fd8"]]);
2282
+ }), [["__scopeId", "data-v-07144f65"]]);
2274
2283
  // src/components/form/ADateTime.vue?vue&type=script&setup=true&lang.ts
2275
2284
  var _hoisted_1$17 = { class: "aform_display-value" };
2276
2285
  var _hoisted_2$13 = { class: "aform_field-label" };
@@ -2296,7 +2305,7 @@ var ADateTime_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
2296
2305
  required: { type: Boolean },
2297
2306
  mode: {},
2298
2307
  uuid: {},
2299
- validation: { default: () => ({ errorMessage: "" }) },
2308
+ validation: {},
2300
2309
  errors: {},
2301
2310
  allowMilitaryTime: {
2302
2311
  type: Boolean,
@@ -2312,7 +2321,7 @@ var ADateTime_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
2312
2321
  }),
2313
2322
  emits: ["update:modelValue"],
2314
2323
  setup(__props) {
2315
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
2324
+ const errorText = computed(() => fieldErrorText(__props.errors));
2316
2325
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
2317
2326
  const modelValue = useModel(__props, "modelValue");
2318
2327
  /** Now, cut down to the smallest unit the picker shows, so a pick that leaves the time alone saves the time shown. */
@@ -2450,7 +2459,7 @@ var ADateTime_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
2450
2459
  ], 64))], 32);
2451
2460
  };
2452
2461
  }
2453
- }), [["__scopeId", "data-v-05cbbabe"]]);
2462
+ }), [["__scopeId", "data-v-e0566056"]]);
2454
2463
  // src/components/form/ADuration.vue?vue&type=script&setup=true&lang.ts
2455
2464
  var _hoisted_1$16 = { class: "aduration" };
2456
2465
  var _hoisted_2$12 = { class: "aform_display-value" };
@@ -2561,7 +2570,7 @@ var ADateRange_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
2561
2570
  required: { type: Boolean },
2562
2571
  mode: {},
2563
2572
  uuid: {},
2564
- validation: { default: () => ({ errorMessage: "" }) },
2573
+ validation: {},
2565
2574
  errors: {}
2566
2575
  }, {
2567
2576
  "modelValue": { default: () => ({
@@ -2573,7 +2582,7 @@ var ADateRange_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
2573
2582
  emits: ["update:modelValue"],
2574
2583
  setup(__props) {
2575
2584
  const fmt = (d) => fromISODate(d)?.toLocaleString() ?? "Invalid Date";
2576
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
2585
+ const errorText = computed(() => fieldErrorText(__props.errors));
2577
2586
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
2578
2587
  const modelValue = useModel(__props, "modelValue");
2579
2588
  const readDay = (day) => day ? fromISODate(day) ?? null : null;
@@ -2670,7 +2679,24 @@ var ADateRange_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
2670
2679
  ], 64))], 32);
2671
2680
  };
2672
2681
  }
2673
- }), [["__scopeId", "data-v-ac2c160b"]]);
2682
+ }), [["__scopeId", "data-v-0e870cba"]]);
2683
+ // src/utils/fieldErrors.ts
2684
+ /**
2685
+ * The errors reported on one field, worded for display.
2686
+ *
2687
+ * An error reported without a message (a trigger's `setError(field)`) takes the field's own
2688
+ * `validation.errorMessage`; one with no message and no wording to give it is dropped. A static
2689
+ * message is never an error on its own: a field cannot tell that its value failed validation, so a
2690
+ * message shown with no reported error would sit on every record, valid or not, and mark the input
2691
+ * `aria-invalid` for a screen reader.
2692
+ *
2693
+ * Applied by AForm, the only place that knows which field an error came from: a component bound to
2694
+ * several fields' parts is handed all of their errors and cannot tell whose wording each one needs.
2695
+ */
2696
+ function wordErrors(errors, validation) {
2697
+ const messages = errors.map((error) => error || validation?.errorMessage || "").filter(Boolean);
2698
+ return [...new Set(messages)];
2699
+ }
2674
2700
  // src/components/AForm.vue?vue&type=script&setup=true&lang.ts
2675
2701
  var _hoisted_1$14 = { class: "aform" };
2676
2702
  var _hoisted_2$10 = {
@@ -2782,10 +2808,18 @@ var AForm_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
2782
2808
  return declared === "edit" && !heard.value ? "read" : declared;
2783
2809
  }
2784
2810
  const fieldParts = (field) => field.kind === "field" || field.kind === "table" ? field.parts : void 0;
2811
+ const fieldsByName = computed(() => new Map(flattenFields(__props.schema).map((field) => [field.fieldname, field])));
2812
+ const formErrors = computed(() => {
2813
+ if (!__props.errors) return void 0;
2814
+ return Object.fromEntries(Object.entries(__props.errors).map(([fieldname, list]) => {
2815
+ const field = fieldsByName.value.get(fieldname);
2816
+ return [fieldname, wordErrors(list, field && "validation" in field ? field.validation : void 0)];
2817
+ }));
2818
+ });
2785
2819
  const fieldErrors = (field) => {
2786
2820
  const parts = fieldParts(field);
2787
- if (!parts) return __props.errors?.[field.fieldname];
2788
- return [.../* @__PURE__ */ new Set([field.fieldname, ...Object.values(parts)])].flatMap((fieldname) => __props.errors?.[fieldname] ?? []);
2821
+ if (!parts) return formErrors.value?.[field.fieldname];
2822
+ return [.../* @__PURE__ */ new Set([field.fieldname, ...Object.values(parts)])].flatMap((fieldname) => formErrors.value?.[fieldname] ?? []);
2789
2823
  };
2790
2824
  const childModelsCache = ref([]);
2791
2825
  watchEffect(() => {
@@ -2829,7 +2863,7 @@ var AForm_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
2829
2863
  schema: componentObj.schema,
2830
2864
  label: componentObj.label,
2831
2865
  collapsible: componentObj.collapsible,
2832
- errors: __props.errors
2866
+ errors: formErrors.value
2833
2867
  }, toHandlers(listenersWhenHeard(updateFieldsetData))), null, 16, [
2834
2868
  "data",
2835
2869
  "mode",
@@ -2871,7 +2905,7 @@ var AForm_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
2871
2905
  }), 128))]);
2872
2906
  };
2873
2907
  }
2874
- }), [["__scopeId", "data-v-9065abbb"]]);
2908
+ }), [["__scopeId", "data-v-33120a88"]]);
2875
2909
  // src/components/base/CollapseButton.vue
2876
2910
  var CollapseButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
2877
2911
  __name: "CollapseButton",
@@ -3047,7 +3081,7 @@ var AFormLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
3047
3081
  required: { type: Boolean },
3048
3082
  mode: {},
3049
3083
  uuid: {},
3050
- validation: { default: () => ({ errorMessage: "" }) },
3084
+ validation: {},
3051
3085
  errors: {},
3052
3086
  doctype: { default: () => void 0 },
3053
3087
  formatter: {
@@ -3083,7 +3117,7 @@ var AFormLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
3083
3117
  emits: ["update:modelValue"],
3084
3118
  setup(__props) {
3085
3119
  const listboxId = `${__props.uuid ?? `aform-link-${useId()}`}-listbox`;
3086
- const errorText = computed(() => __props.embedded ? "" : __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
3120
+ const errorText = computed(() => __props.embedded ? "" : fieldErrorText(__props.errors));
3087
3121
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
3088
3122
  const modelValue = useModel(__props, "modelValue");
3089
3123
  const hasValidId = computed(() => linkId(modelValue.value) !== void 0);
@@ -3273,7 +3307,7 @@ var AFormLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
3273
3307
  ])) : createCommentVNode("", true)])), [[unref(vOnClickOutside), onClickOutside]]), __props.label && !__props.embedded ? (openBlock(), createElementBlock("label", _hoisted_15, toDisplayString(__props.label), 1)) : createCommentVNode("", true)], 64))], 2);
3274
3308
  };
3275
3309
  }
3276
- }), [["__scopeId", "data-v-df32226b"]]);
3310
+ }), [["__scopeId", "data-v-cca04ca2"]]);
3277
3311
  // src/components/form/ANumericInput.vue?vue&type=script&setup=true&lang.ts
3278
3312
  var _hoisted_1$11 = { class: "aform_form-element" };
3279
3313
  var _hoisted_2$7 = { class: "aform_display-value" };
@@ -3305,7 +3339,7 @@ var ANumericInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
3305
3339
  required: { type: Boolean },
3306
3340
  mode: {},
3307
3341
  uuid: {},
3308
- validation: { default: () => ({ errorMessage: "" }) },
3342
+ validation: {},
3309
3343
  errors: {},
3310
3344
  options: { default: () => ({}) }
3311
3345
  }, {
@@ -3314,7 +3348,7 @@ var ANumericInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
3314
3348
  }),
3315
3349
  emits: ["update:modelValue"],
3316
3350
  setup(__props) {
3317
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
3351
+ const errorText = computed(() => fieldErrorText(__props.errors));
3318
3352
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
3319
3353
  const inputNumber = useModel(__props, "modelValue");
3320
3354
  const boxNumber = computed({
@@ -3361,7 +3395,7 @@ var ANumericInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
3361
3395
  ], 64))]);
3362
3396
  };
3363
3397
  }
3364
- }), [["__scopeId", "data-v-d13e377b"]]);
3398
+ }), [["__scopeId", "data-v-21f65960"]]);
3365
3399
  // src/utils/quantityValue.ts
3366
3400
  /** What a quantity box may hold, typed or pasted: digits, one decimal point and a leading minus sign. */
3367
3401
  var quantityEntryPattern = /^-?\d*\.?\d*$/;
@@ -3426,7 +3460,7 @@ var AQuantityInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
3426
3460
  required: { type: Boolean },
3427
3461
  mode: {},
3428
3462
  uuid: {},
3429
- validation: { default: () => ({ errorMessage: "" }) },
3463
+ validation: {},
3430
3464
  errors: {},
3431
3465
  options: { default: () => ({}) },
3432
3466
  uomLabel: { default: "UOM" }
@@ -3436,7 +3470,7 @@ var AQuantityInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
3436
3470
  }),
3437
3471
  emits: ["update:modelValue"],
3438
3472
  setup(__props) {
3439
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
3473
+ const errorText = computed(() => fieldErrorText(__props.errors));
3440
3474
  const helperId = computed(() => __props.uuid ? `${__props.uuid}-helper` : void 0);
3441
3475
  const helperDescribedBy = computed(() => showStock.value && !errorText.value ? helperId.value : void 0);
3442
3476
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText, helperDescribedBy);
@@ -3565,7 +3599,7 @@ var AQuantityInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
3565
3599
  ], 64))]);
3566
3600
  };
3567
3601
  }
3568
- }), [["__scopeId", "data-v-72062eb6"]]);
3602
+ }), [["__scopeId", "data-v-c08ba0bf"]]);
3569
3603
  // src/components/form/ASemverInput.vue?vue&type=script&setup=true&lang.ts
3570
3604
  var _hoisted_1$9 = { class: "aform_form-element" };
3571
3605
  var _hoisted_2$5 = { class: "aform_display-value" };
@@ -3591,7 +3625,7 @@ var ASemverInput_default = /* @__PURE__ */ defineComponent({
3591
3625
  required: { type: Boolean },
3592
3626
  mode: {},
3593
3627
  uuid: {},
3594
- validation: { default: () => ({ errorMessage: "" }) },
3628
+ validation: {},
3595
3629
  errors: {}
3596
3630
  }, {
3597
3631
  "modelValue": {},
@@ -3599,7 +3633,7 @@ var ASemverInput_default = /* @__PURE__ */ defineComponent({
3599
3633
  }),
3600
3634
  emits: ["update:modelValue"],
3601
3635
  setup(__props) {
3602
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
3636
+ const errorText = computed(() => fieldErrorText(__props.errors));
3603
3637
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
3604
3638
  const version = useModel(__props, "modelValue");
3605
3639
  const text = ref("");
@@ -3759,7 +3793,7 @@ var ATextInput_default = /* @__PURE__ */ defineComponent({
3759
3793
  required: { type: Boolean },
3760
3794
  mode: {},
3761
3795
  uuid: {},
3762
- validation: { default: () => ({ errorMessage: "" }) },
3796
+ validation: {},
3763
3797
  errors: {}
3764
3798
  }, {
3765
3799
  "modelValue": {},
@@ -3767,7 +3801,7 @@ var ATextInput_default = /* @__PURE__ */ defineComponent({
3767
3801
  }),
3768
3802
  emits: ["update:modelValue"],
3769
3803
  setup(__props) {
3770
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
3804
+ const errorText = computed(() => fieldErrorText(__props.errors));
3771
3805
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
3772
3806
  const maskFilled = ref(true);
3773
3807
  const inputText = useModel(__props, "modelValue");
@@ -3823,7 +3857,7 @@ var ATextboxInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
3823
3857
  required: { type: Boolean },
3824
3858
  mode: {},
3825
3859
  uuid: {},
3826
- validation: { default: () => ({ errorMessage: "" }) },
3860
+ validation: {},
3827
3861
  errors: {},
3828
3862
  placeholder: { default: "" },
3829
3863
  rows: { default: 4 },
@@ -3834,7 +3868,7 @@ var ATextboxInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
3834
3868
  }),
3835
3869
  emits: ["update:modelValue"],
3836
3870
  setup(__props) {
3837
- const errorText = computed(() => __props.errors?.length ? __props.errors.join("; ") : __props.validation.errorMessage ?? "");
3871
+ const errorText = computed(() => fieldErrorText(__props.errors));
3838
3872
  const { errorId, describedBy, invalid } = fieldErrorA11y(__props.uuid, errorText);
3839
3873
  const inputText = useModel(__props, "modelValue");
3840
3874
  return (_ctx, _cache) => {
@@ -3863,7 +3897,7 @@ var ATextboxInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
3863
3897
  ], 64))]);
3864
3898
  };
3865
3899
  }
3866
- }), [["__scopeId", "data-v-19e611fa"]]);
3900
+ }), [["__scopeId", "data-v-14b32545"]]);
3867
3901
  // src/components/utilities/Login.vue?vue&type=script&setup=true&lang.ts
3868
3902
  var _hoisted_1$6 = { class: "login-container" };
3869
3903
  var _hoisted_2$2 = { class: "account-container" };