@stonecrop/aform 0.58.1 → 0.58.3

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
@@ -3117,6 +3117,7 @@ var AFormLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
3117
3117
  const dropdownResults = ref([]);
3118
3118
  const activeIndex = ref(null);
3119
3119
  const navigator = inject("aformLinkNavigator", null);
3120
+ const canNavigate = computed(() => hasValidId.value && !!__props.doctype && !!navigator);
3120
3121
  const resolver = inject("aformLinkResolver", null);
3121
3122
  watch(() => linkId(modelValue.value), async (id) => {
3122
3123
  if (id && linkDisplayText(shownLink.value)) {
@@ -3149,7 +3150,6 @@ var AFormLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
3149
3150
  const handleNavigate = () => {
3150
3151
  const id = linkId(modelValue.value);
3151
3152
  if (navigator && __props.doctype && id !== void 0) navigator.navigate(__props.doctype, id);
3152
- else if (navigator && !__props.doctype) console.warn("[AFormLink] Navigation requested but `doctype` prop is missing. Add `options` (or `doctype`) to the Link field definition to enable navigation.");
3153
3153
  };
3154
3154
  const isResultSelected = (option) => {
3155
3155
  const id = linkId(modelValue.value);
@@ -3230,7 +3230,7 @@ var AFormLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
3230
3230
  withKeys(closeDropdown, ["esc"]),
3231
3231
  withKeys(leaveField, ["tab"])
3232
3232
  ]
3233
- }, null, 42, _hoisted_5$6), [[vModelText, searchText.value]]), hasValidId.value && !__props.disabled && !__props.embedded ? (openBlock(), createElementBlock("button", {
3233
+ }, null, 42, _hoisted_5$6), [[vModelText, searchText.value]]), canNavigate.value && !__props.disabled && !__props.embedded ? (openBlock(), createElementBlock("button", {
3234
3234
  key: 0,
3235
3235
  type: "button",
3236
3236
  class: "aform_form-btn",
@@ -3273,7 +3273,7 @@ var AFormLink_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
3273
3273
  ])) : createCommentVNode("", true)])), [[unref(vOnClickOutside), onClickOutside]]), __props.label && !__props.embedded ? (openBlock(), createElementBlock("label", _hoisted_13, toDisplayString(__props.label), 1)) : createCommentVNode("", true)], 64))], 2);
3274
3274
  };
3275
3275
  }
3276
- }), [["__scopeId", "data-v-98ee7f65"]]);
3276
+ }), [["__scopeId", "data-v-ade07034"]]);
3277
3277
  // src/components/form/ANumericInput.vue?vue&type=script&setup=true&lang.ts
3278
3278
  var _hoisted_1$11 = { class: "aform_form-element" };
3279
3279
  var _hoisted_2$7 = { class: "aform_display-value" };