Replaces URL usages by Url to avoid dynamic component initilization issues on Vue3.

This commit is contained in:
mateuswetah 2024-03-18 15:22:27 -03:00
parent c600f2afad
commit cb5d643839
6 changed files with 59 additions and 54 deletions

View File

@ -407,7 +407,7 @@
import FormNumeric from '../metadata-types/numeric/FormNumeric.vue';
import FormUser from '../metadata-types/user/FormUser.vue';
import FormGeoCoordinate from '../metadata-types/geocoordinate/FormGeoCoordinate.vue';
import FormURL from '../metadata-types/url/FormURL.vue';
import FormUrl from '../metadata-types/url/FormUrl.vue';
export default {
name: 'MetadatumEditionForm',
@ -420,7 +420,7 @@
'tainacan-form-numeric': FormNumeric,
'tainacan-form-user': FormUser,
'tainacan-form-geocoordinate': FormGeoCoordinate,
'tainacan-form-url': FormURL
'tainacan-form-url': FormUrl
},
mixins: [ formHooks ],
props: {

View File

@ -181,7 +181,7 @@
TainacanCompound: defineAsyncComponent(() => import('./compound/TainacanCompound.vue')),
TainacanUser: defineAsyncComponent(() => import('./user/TainacanUser.vue')),
TainacanGeocoordinate: defineAsyncComponent(() => import('./geocoordinate/TainacanGeoCoordinate.vue')),
TainacanURL: defineAsyncComponent(() => import('./url/TainacanURL.vue'))
TainacanUrl: defineAsyncComponent(() => import('./url/TainacanUrl.vue'))
},
props: {
itemMetadatum: Object,

View File

@ -1,5 +1,5 @@
<template>
<div>
<section>
<b-field
:addons="false"
:label="$i18n.getHelperTitle('tainacan-url', 'link-as-button')">
@ -16,6 +16,7 @@
</b-field>
<b-field
v-if="linkAsButton == 'no'"
:addons="false"
:label="$i18n.getHelperTitle('tainacan-url', 'force-iframe')">
&nbsp;
@ -30,8 +31,11 @@
:message="$i18n.getHelperMessage('tainacan-url', 'force-iframe')" />
</b-field>
<b-field
<transition name="filter-item">
<div
v-if="forceIframe == 'yes'"
style="break-inside: avoid;">
<b-field
:addons="false">
<label class="label is-inline-block">
{{ $i18n.getHelperTitle('tainacan-url', 'iframe-min-height') }}
@ -63,7 +67,6 @@
</b-field>
<b-field
v-if="forceIframe == 'yes'"
:addons="false"
:label="$i18n.getHelperTitle('tainacan-url', 'is-image')">
&nbsp;
@ -78,6 +81,9 @@
:message="$i18n.getHelperMessage('tainacan-url', 'is-image')" />
</b-field>
</div>
</transition>
</section>
</template>
<script>

View File

@ -31,7 +31,6 @@
<script>
export default {
name: 'TainacanMetadataTypeURL',
props: {
itemMetadatum: Object,
value: [String, Number, Array],

View File

@ -329,7 +329,7 @@
TainacanCompound: defineAsyncComponent(() => import('../metadata-types/compound/TainacanCompound.vue')),
TainacanUser: defineAsyncComponent(() => import('../metadata-types/user/TainacanUser.vue')),
TainacanGeocoordinate: defineAsyncComponent(() => import('../metadata-types/geocoordinate/TainacanGeoCoordinate.vue')),
TainacanURL: defineAsyncComponent(() => import('../metadata-types/url/TainacanURL.vue'))
TainacanUrl: defineAsyncComponent(() => import('../metadata-types/url/TainacanUrl.vue'))
},
props: {
modalTitle: String,

View File

@ -39,7 +39,7 @@ import TainacanTaxonomy from '../../../admin/components/metadata-types/taxonomy/
import TainacanCompound from '../../../admin/components/metadata-types/compound/TainacanCompound.vue';
import TainacanUser from '../../../admin/components/metadata-types/user/TainacanUser.vue';
import TainacanGeoCoordinate from '../../../admin/components/metadata-types/geocoordinate/TainacanGeoCoordinate.vue';
import TainacanURL from '../../../admin/components/metadata-types/url/TainacanURL.vue';
import TainacanUrl from '../../../admin/components/metadata-types/url/TainacanUrl.vue';
// Main components
import ItemSubmissionForm from './theme.vue';
@ -179,7 +179,7 @@ export default (element) => {
VueItemSubmission.component('tainacan-compound', TainacanCompound);
VueItemSubmission.component('tainacan-user', TainacanUser);
VueItemSubmission.component('tainacan-geocoordinate', TainacanGeoCoordinate);
VueItemSubmission.component('tainacan-url', TainacanURL);
VueItemSubmission.component('tainacan-url', TainacanUrl);
/* Others */
VueItemSubmission.component('tainacan-form-item', TainacanFormItem);