@piveau/piveau-hub-ui-modules 4.4.22 → 4.4.24
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/data-provider-interface/DataProviderInterface.vue.d.ts +0 -3
- package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs +27 -27
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +47 -47
- package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +138 -118
- package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/components/SpatialInput.vue.d.ts +1 -4
- package/dist/data-provider-interface/components/SpatialInput.vue.mjs +95 -96
- package/dist/data-provider-interface/components/SpatialInput.vue.mjs.map +1 -1
- package/dist/data-provider-interface/composables/useDpiEditMode.mjs +30 -36
- package/dist/data-provider-interface/composables/useDpiEditMode.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapde/page-content-config.mjs +1 -1
- package/dist/data-provider-interface/config/dcatapde/page-content-config.mjs.map +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.d.ts +0 -3
- package/dist/data-provider-interface/views/OverviewPage/CatalogueOverview.vue.d.ts +0 -1
- package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.d.ts +0 -2
- package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.d.ts +0 -1
- package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.mjs +88 -88
- package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.d.ts +0 -1
- package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.mjs +161 -155
- package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/OverviewPage/PropertyEntry.vue.d.ts +0 -1
- package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +0 -3
- package/dist/datasetDetails/distributions/Distribution.vue.mjs +38 -41
- package/dist/datasetDetails/distributions/Distribution.vue.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -401,7 +401,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
401
401
|
data: ObjectConstructor;
|
|
402
402
|
dpiLocale: StringConstructor;
|
|
403
403
|
}>, {}, {}, {}, {
|
|
404
|
-
showDataService(): boolean | undefined;
|
|
405
404
|
manualSwitch(propData: any, head: any): false | "head" | "auto" | "man" | "liMan" | "liAuto" | undefined;
|
|
406
405
|
showMultilingualValue(property: any, value: any): boolean | "";
|
|
407
406
|
checkadms(str: any): boolean | undefined;
|
|
@@ -661,7 +660,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
661
660
|
data: ObjectConstructor;
|
|
662
661
|
dpiLocale: StringConstructor;
|
|
663
662
|
}>, {}, {}, {}, {
|
|
664
|
-
showDataService(): boolean | undefined;
|
|
665
663
|
manualSwitch(propData: any, head: any): false | "head" | "auto" | "man" | "liMan" | "liAuto" | undefined;
|
|
666
664
|
showMultilingualValue(property: any, value: any): boolean | "";
|
|
667
665
|
checkadms(str: any): boolean | undefined;
|
|
@@ -851,7 +849,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
851
849
|
data: ObjectConstructor;
|
|
852
850
|
dpiLocale: StringConstructor;
|
|
853
851
|
}>, {}, {}, {}, {
|
|
854
|
-
showDataService(): boolean | undefined;
|
|
855
852
|
manualSwitch(propData: any, head: any): false | "head" | "auto" | "man" | "liMan" | "liAuto" | undefined;
|
|
856
853
|
showMultilingualValue(property: any, value: any): boolean | "";
|
|
857
854
|
checkadms(str: any): boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataProviderInterface.vue.mjs","sources":["../../lib/data-provider-interface/DataProviderInterface.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between dpi position-relative w-100\" :key=\"property\">\n <!-- CONTENT -->\n <router-view v-if=\"isReady\" ref=\"view\" :key=\"key\">\n </router-view>\n </div>\n</template>\n\n<script lang=\"ts\">\n/* eslint-disable no-nested-ternary, no-lonely-if, no-param-reassign */\nimport { DpiContext, setupDpiContext } from './composables/useDpiContext';\nimport { computed, defineAsyncComponent, defineComponent, PropType , ref, toRef, toRefs, toValue, watch, watchEffect} from 'vue';\nimport { mapActions, mapGetters, useStore } from 'vuex';\nimport dpiSpecs from './config/dpi-spec-config';\nimport { useRuntimeEnv } from '../composables/useRuntimeEnv';\nimport { useRoute } from 'vue-router';\nimport { useAsyncState, watchOnce } from '@vueuse/core';\nimport { useDpiEditMode } from './composables/useDpiEditMode';\n\n\n\nexport default defineComponent({\n name: 'DataProviderInterface',\n components: {\n InputPage: defineAsyncComponent(() => import('./views/InputPage.vue')),\n },\n props: {\n name: {\n type: String,\n default: '',\n },\n dpiContext: {\n type: Object as PropType<DpiContext>,\n default: () => undefined,\n }\n },\n metaInfo() {\n return {\n title: `${this.$t('message.metadata.upload')} | ${this.$t('message.header.navigation.data.datasets')}`,\n meta: [\n { name: 'description', vmid: 'description', content: `${this.$t('message.datasets.meta.description')}` },\n { name: 'keywords', vmid: 'keywords', content: `${this.$env.metadata.keywords} ${this.$t('message.datasets.meta.description')}}` },\n { name: 'robots', content: 'noindex, follow' },\n ],\n };\n },\n data() {\n return {\n property: this.$route.params.property,\n id: this.$route.params.id,\n };\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n mode() {\n return this.property === 'catalogues'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editCatalogue')\n : this.$t('message.dataupload.createNewCatalogue')\n : this.property === 'datasets'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editDataset')\n : this.$t('message.dataupload.createNewDataset')\n : 'Edit Distribution';\n },\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n ...mapActions('auth', [\n 'populateDraftAndEdit',\n ]),\n getClearPath() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;;\n },\n handleScroll() {\n try {\n if (document.getElementById(\"stepperAnchor\")?.offsetTop || 0 >= 35) {\n document.getElementById(\"stepperAnchor\")?.classList.add(\"border-bottom-lightgray\");\n }\n else {\n document.getElementById(\"stepperAnchor\")?.classList.remove(\"border-bottom-lightgray\");\n }\n } catch (error) {\n \n }\n }\n\n },\n created() {\n window.addEventListener('scroll', this.handleScroll);\n this.populateDraftAndEdit();\n },\n mounted() {\n this.saveLocalstorageValues(this.property);\n },\n unmounted() {\n window.removeEventListener('scroll', this.handleScroll);\n },\n setup(props) {\n const route = useRoute()\n const store = useStore()\n const env = useRuntimeEnv()\n const userSpec = env.content.dataProviderInterface.specification as 'dcatap' | 'dcatapde' | 'dcatapdeODB'\n const fallbackSpec = dpiSpecs[userSpec]\n const dpiContext = toRef(props, 'dpiContext')\n\n const resolvedDpiContext = computed<DpiContext>(() => {\n const _dpiContext = toValue(dpiContext)\n\n return {\n specification: fallbackSpec,\n specificationName: userSpec,\n edit: {\n enabled: route.query.edit === 'true',\n id: route.query.id as string || undefined,\n fromDraft: route.query.fromDraft === 'true',\n },\n ..._dpiContext\n }\n })\n\n setupDpiContext(resolvedDpiContext)\n\n watchEffect(() => {\n store.dispatch('dpiStore/setSpecification', resolvedDpiContext.value.specification)\n store.dispatch('dpiStore/setSpecificationname', resolvedDpiContext.value.specificationName)\n })\n\n const key = computed(() => {\n return `${route.query.key}@${resolvedDpiContext.value.specificationName}`\n })\n\n const { isReady } = useDpiEditMode(resolvedDpiContext)\n\n return {\n resolvedDpiContext,\n key,\n isReady,\n }\n\n }\n});\n</script>\n\n<style lang=\"scss\">\n.border-bottom-lightgray {\n border-bottom: 1px solid lightgray;\n}\n.stickyStepper {\n position: sticky;\n top: 0;\n background: #ffffff;\n z-index: 999;\n}\n\n.stickyStepper .SSfirstRow {\n margin: 1vh 0;\n display: flex;\n align-items: center;\n}\n\n.stickyStepper .stickyNav {\n border-left: 1px solid black;\n margin-left: 1vh;\n padding-left: 1vh;\n}\n\n#stepper {\n width: 100% !important;\n}\n\n#input {\n padding: 10px;\n}\n\n.small-headline {\n font-size: 1.5rem;\n min-width: max-content;\n}\n\n.property {\n margin: 20px;\n background-color: #ffffff;\n border: solid 0.5px rgb(225, 225, 225);\n margin-top: 30px;\n}\n\n.infoBox .material-icons {\n font-size: 20px;\n vertical-align: text-bottom;\n margin-right: 5px;\n margin-bottom: 1px;\n}\n\n.infoBox {\n width: 100%;\n height: 30%;\n background-color: #f7f7f7;\n padding: 5%;\n border-radius: 0.25rem;\n margin-top: 20px;\n\n .input_subpage_nav {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 15px;\n }\n}\n\n.besides {\n .formkit-input-group-repeatable {\n display: flex;\n flex-direction: row;\n background-color: transparent;\n padding: 0px;\n }\n}\n\n.main {\n width: 75%;\n margin: 0 5px 0 5px;\n}\n\n.sub {\n width: 20%;\n margin: 0 5px 0 5px;\n}\n\n#subStepperBox {\n position: sticky;\n top: 154px;\n z-index: 10;\n width: 100%;\n padding: 0 10%;\n\n .step-progress__bar {\n border-top: none !important;\n }\n\n .step-progress__step--active {\n .step-progress__step-label {\n background-color: lightsteelblue !important;\n }\n\n }\n}\n\n.step-progress__step span{\n \n color:white !important;\n \n}\n// Stepper Customizing -------------\n\n// #stepper,\n// #subStepper {\n// .step-progress__step {\n// display: flex;\n// align-items: center;\n// justify-content: center;\n// height: 70%;\n// width: 20%;\n// display: flex;\n// align-items: center;\n// z-index: 1;\n\n\n// span {\n// color: grey;\n// font-size: 18px;\n// display: none;\n// }\n\n// div {\n// padding: 1rem;\n// height: 100%;\n// display: flex;\n// align-items: center;\n// color: white;\n// font-weight: 300;\n\n// }\n\n// .step-progress__step-label {\n\n// background: lightgrey;\n// background-size: 400% 400%;\n// background-position: 100% 0%;\n// transition: all 300ms ease-in-out;\n// border-right: 1px white solid;\n// font-size: 14px;\n// display: flex;\n// align-items: center;\n// justify-content: center;\n\n\n// }\n\n\n// .step-progress__step-label:hover {\n// background-position: 65% 0%;\n// color: black;\n\n// }\n\n// }\n\n// .step-progress__step--active {\n\n// z-index: 7 !important;\n\n\n// span {\n// color: black;\n// }\n\n// div {\n// background: white;\n// }\n\n// .step-progress__step-label {\n// background: rgb(236, 236, 236);\n// background-position: 50% 0%;\n// box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12) !important;\n// transform: scale(1.1);\n// z-index: 8;\n// font-size: 16px;\n// }\n\n// }\n\n// .step-progress__step--valid {\n// div {\n// color: white;\n\n// }\n\n// .step-progress__step-label {\n// background: rgba(0, 235, 0, 0.2);\n// color: lightslategrey;\n\n\n// }\n\n// .step-progress__step-label:hover {\n// color: black;\n// }\n// }\n\n// .step-progress__step--active .step-progress__step-label {\n// color: rgb(31, 31, 31);\n// }\n\n// .step-progress__wrapper-after {\n// display: none;\n// }\n\n// .step-progress__step-icon {\n// display: none !important;\n// }\n\n// .step-progress__bar {\n// margin: 0;\n// height: 5rem;\n// border-top: 1px solid lightslategray;\n\n// }\n\n// .step-progress__step-label {\n// position: unset;\n// transform: unset;\n// flex-grow: 1;\n// }\n\n// .step-progress__step {}\n\n// .step-progress__wrapper-before {\n// display: none !important;\n// }\n\n// #stepper .step-progress__step::after {\n// display: none !important;\n// }\n// }\n#stepper .step-progress__step{\n border: solid white 20px;\n}\n#stepper .step-progress__step-icon, #subStepper .step-progress__step-icon {\n font-size: 25px;\n}\n.step-progress__step-label{\n cursor: pointer;\n}\n// Input Form Margins & Borders ----\n\n.formkit-input[data-classification=group] [data-is-repeatable] {\n border: none;\n padding: 1em 1em 1em 0em;\n}\n\n.formkit-input[data-classification=group] [data-is-repeatable] .formkit-input-group-repeatable {\n border-bottom: none;\n}\n\n.formkit-input-element--checkbox {\n margin-right: 5px;\n}\n\n.formkit-input-wrapper {\n font-family: \"Ubuntu\";\n}\n\n.formkit-input[data-classification=button] button[data-ghost] {\n font-weight: 400;\n}\n\n.formkit-input-error {\n color: #e13737 !important;\n font-weight: 400 !important;\n}\n\n// General Formkit Styling ----\n\n.formkit {\n &-input {\n .formkit {\n &-input {\n &-element {\n max-width: 100%;\n }\n\n &-error {\n font-weight: bold;\n }\n }\n }\n }\n\n .formkit-input-group-add-more {\n display: flex;\n justify-content: flex-end;\n\n button {\n border: black;\n }\n }\n\n .formkit-input {\n &[data-classification=\"text\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n &[data-classification=\"select\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n }\n\n .formkit-input[data-classification=\"button\"] {\n button {\n &[data-ghost] {\n color: white;\n background-color: #001d85;\n border-color: #001d85;\n border-radius: 1.875rem;\n\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n }\n }\n}\n\n.formkit-input.besides {\n border-bottom: 1px solid lightgrey !important;\n}\n\n.formkit-input-label {\n font-weight: 500 !important;\n}\n\n.formkit-input-element {\n\n &--textarea {\n width: 100%;\n }\n}\n\n.formkit-input-element--group {\n display: block !important;\n}\n\n.formkit-input.besides>.formkit-input-wrapper>.formkit-input-label {\n\n\n text-decoration: underline !important;\n}\n\n// #stepper,\n// #subStepper {\n\n\n// .step-progress__step::after {\n// display: none;\n// }\n\n// .step-progress__step-label {\n// cursor: pointer;\n// }\n// }\n</style>\n"],"names":["_resolveComponent","property","_createElementBlock","isReady","_ctx","_openBlock","_createBlock","_component_router_view","_createCommentVNode"],"mappings":";;;;;YACEA,EAIM,aAAA;SAJmHC,EAAQ,GAAAC,EAAA,OAAA;AAAA,IAAA,OAAA;AAAA,IAE5GC,KAAAA,EAAAA;AAAAA,EAAAA,GAAAA;AAAAA,IAASC,EAAA,WAAAC,KAAoBC,EAAAC,GAAA;AAAA,MAAA,KAAA;AAAA,MAHpD,KAAAH,EAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"DataProviderInterface.vue.mjs","sources":["../../lib/data-provider-interface/DataProviderInterface.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between dpi position-relative w-100\" :key=\"property\">\n <!-- CONTENT -->\n <router-view v-if=\"isReady\" ref=\"view\" :key=\"key\">\n </router-view>\n </div>\n</template>\n\n<script lang=\"ts\">\n/* eslint-disable no-nested-ternary, no-lonely-if, no-param-reassign */\nimport { DpiContext, setupDpiContext } from './composables/useDpiContext';\nimport { computed, defineAsyncComponent, defineComponent, PropType , ref, toRef, toRefs, toValue, watch, watchEffect} from 'vue';\nimport { mapActions, mapGetters, useStore } from 'vuex';\nimport dpiSpecs from './config/dpi-spec-config';\nimport { useRuntimeEnv } from '../composables/useRuntimeEnv';\nimport { useRoute } from 'vue-router';\nimport { useAsyncState, watchOnce } from '@vueuse/core';\nimport { useDpiEditMode } from './composables/useDpiEditMode';\n\n\n\nexport default defineComponent({\n name: 'DataProviderInterface',\n components: {\n InputPage: defineAsyncComponent(() => import('./views/InputPage.vue')),\n },\n props: {\n name: {\n type: String,\n default: '',\n },\n dpiContext: {\n type: Object as PropType<DpiContext>,\n default: () => undefined,\n }\n },\n metaInfo() {\n return {\n title: `${this.$t('message.metadata.upload')} | ${this.$t('message.header.navigation.data.datasets')}`,\n meta: [\n { name: 'description', vmid: 'description', content: `${this.$t('message.datasets.meta.description')}` },\n { name: 'keywords', vmid: 'keywords', content: `${this.$env.metadata.keywords} ${this.$t('message.datasets.meta.description')}}` },\n { name: 'robots', content: 'noindex, follow' },\n ],\n };\n },\n data() {\n return {\n property: this.$route.params.property,\n id: this.$route.params.id,\n };\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n mode() {\n return this.property === 'catalogues'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editCatalogue')\n : this.$t('message.dataupload.createNewCatalogue')\n : this.property === 'datasets'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editDataset')\n : this.$t('message.dataupload.createNewDataset')\n : 'Edit Distribution';\n },\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n ...mapActions('auth', [\n 'populateDraftAndEdit',\n ]),\n getClearPath() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;;\n },\n handleScroll() {\n try {\n if (document.getElementById(\"stepperAnchor\")?.offsetTop || 0 >= 35) {\n document.getElementById(\"stepperAnchor\")?.classList.add(\"border-bottom-lightgray\");\n }\n else {\n document.getElementById(\"stepperAnchor\")?.classList.remove(\"border-bottom-lightgray\");\n }\n } catch (error) {\n \n }\n }\n\n },\n created() {\n window.addEventListener('scroll', this.handleScroll);\n this.populateDraftAndEdit();\n },\n mounted() {\n this.saveLocalstorageValues(this.property);\n },\n unmounted() {\n window.removeEventListener('scroll', this.handleScroll);\n },\n setup(props) {\n const route = useRoute()\n const store = useStore()\n const env = useRuntimeEnv()\n const userSpec = env.content.dataProviderInterface.specification as 'dcatap' | 'dcatapde' | 'dcatapdeODB'\n const fallbackSpec = dpiSpecs[userSpec]\n const dpiContext = toRef(props, 'dpiContext')\n\n const resolvedDpiContext = computed<DpiContext>(() => {\n const _dpiContext = toValue(dpiContext)\n\n return {\n specification: fallbackSpec,\n specificationName: userSpec,\n edit: {\n enabled: route.query.edit === 'true',\n id: route.query.id as string || undefined,\n fromDraft: route.query.fromDraft === 'true',\n },\n ..._dpiContext\n }\n })\n\n const specification = computed(() => {\n return resolvedDpiContext.value.specification\n })\n\n const specificationName = computed(() => {\n return resolvedDpiContext.value.specificationName\n })\n\n setupDpiContext(resolvedDpiContext)\n\n watchEffect(() => {\n store.dispatch('dpiStore/setSpecification', specification.value)\n store.dispatch('dpiStore/setSpecificationname', specificationName.value)\n })\n\n const key = computed(() => {\n return `${route.query.key}@${specificationName.value}`\n })\n\n const { isReady } = useDpiEditMode(resolvedDpiContext)\n\n return {\n resolvedDpiContext,\n key,\n isReady,\n }\n\n }\n});\n</script>\n\n<style lang=\"scss\">\n.border-bottom-lightgray {\n border-bottom: 1px solid lightgray;\n}\n.stickyStepper {\n position: sticky;\n top: 0;\n background: #ffffff;\n z-index: 999;\n}\n\n.stickyStepper .SSfirstRow {\n margin: 1vh 0;\n display: flex;\n align-items: center;\n}\n\n.stickyStepper .stickyNav {\n border-left: 1px solid black;\n margin-left: 1vh;\n padding-left: 1vh;\n}\n\n#stepper {\n width: 100% !important;\n}\n\n#input {\n padding: 10px;\n}\n\n.small-headline {\n font-size: 1.5rem;\n min-width: max-content;\n}\n\n.property {\n margin: 20px;\n background-color: #ffffff;\n border: solid 0.5px rgb(225, 225, 225);\n margin-top: 30px;\n}\n\n.infoBox .material-icons {\n font-size: 20px;\n vertical-align: text-bottom;\n margin-right: 5px;\n margin-bottom: 1px;\n}\n\n.infoBox {\n width: 100%;\n height: 30%;\n background-color: #f7f7f7;\n padding: 5%;\n border-radius: 0.25rem;\n margin-top: 20px;\n\n .input_subpage_nav {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 15px;\n }\n}\n\n.besides {\n .formkit-input-group-repeatable {\n display: flex;\n flex-direction: row;\n background-color: transparent;\n padding: 0px;\n }\n}\n\n.main {\n width: 75%;\n margin: 0 5px 0 5px;\n}\n\n.sub {\n width: 20%;\n margin: 0 5px 0 5px;\n}\n\n#subStepperBox {\n position: sticky;\n top: 154px;\n z-index: 10;\n width: 100%;\n padding: 0 10%;\n\n .step-progress__bar {\n border-top: none !important;\n }\n\n .step-progress__step--active {\n .step-progress__step-label {\n background-color: lightsteelblue !important;\n }\n\n }\n}\n\n.step-progress__step span{\n \n color:white !important;\n \n}\n// Stepper Customizing -------------\n\n// #stepper,\n// #subStepper {\n// .step-progress__step {\n// display: flex;\n// align-items: center;\n// justify-content: center;\n// height: 70%;\n// width: 20%;\n// display: flex;\n// align-items: center;\n// z-index: 1;\n\n\n// span {\n// color: grey;\n// font-size: 18px;\n// display: none;\n// }\n\n// div {\n// padding: 1rem;\n// height: 100%;\n// display: flex;\n// align-items: center;\n// color: white;\n// font-weight: 300;\n\n// }\n\n// .step-progress__step-label {\n\n// background: lightgrey;\n// background-size: 400% 400%;\n// background-position: 100% 0%;\n// transition: all 300ms ease-in-out;\n// border-right: 1px white solid;\n// font-size: 14px;\n// display: flex;\n// align-items: center;\n// justify-content: center;\n\n\n// }\n\n\n// .step-progress__step-label:hover {\n// background-position: 65% 0%;\n// color: black;\n\n// }\n\n// }\n\n// .step-progress__step--active {\n\n// z-index: 7 !important;\n\n\n// span {\n// color: black;\n// }\n\n// div {\n// background: white;\n// }\n\n// .step-progress__step-label {\n// background: rgb(236, 236, 236);\n// background-position: 50% 0%;\n// box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12) !important;\n// transform: scale(1.1);\n// z-index: 8;\n// font-size: 16px;\n// }\n\n// }\n\n// .step-progress__step--valid {\n// div {\n// color: white;\n\n// }\n\n// .step-progress__step-label {\n// background: rgba(0, 235, 0, 0.2);\n// color: lightslategrey;\n\n\n// }\n\n// .step-progress__step-label:hover {\n// color: black;\n// }\n// }\n\n// .step-progress__step--active .step-progress__step-label {\n// color: rgb(31, 31, 31);\n// }\n\n// .step-progress__wrapper-after {\n// display: none;\n// }\n\n// .step-progress__step-icon {\n// display: none !important;\n// }\n\n// .step-progress__bar {\n// margin: 0;\n// height: 5rem;\n// border-top: 1px solid lightslategray;\n\n// }\n\n// .step-progress__step-label {\n// position: unset;\n// transform: unset;\n// flex-grow: 1;\n// }\n\n// .step-progress__step {}\n\n// .step-progress__wrapper-before {\n// display: none !important;\n// }\n\n// #stepper .step-progress__step::after {\n// display: none !important;\n// }\n// }\n#stepper .step-progress__step{\n border: solid white 20px;\n}\n#stepper .step-progress__step-icon, #subStepper .step-progress__step-icon {\n font-size: 25px;\n}\n.step-progress__step-label{\n cursor: pointer;\n}\n// Input Form Margins & Borders ----\n\n.formkit-input[data-classification=group] [data-is-repeatable] {\n border: none;\n padding: 1em 1em 1em 0em;\n}\n\n.formkit-input[data-classification=group] [data-is-repeatable] .formkit-input-group-repeatable {\n border-bottom: none;\n}\n\n.formkit-input-element--checkbox {\n margin-right: 5px;\n}\n\n.formkit-input-wrapper {\n font-family: \"Ubuntu\";\n}\n\n.formkit-input[data-classification=button] button[data-ghost] {\n font-weight: 400;\n}\n\n.formkit-input-error {\n color: #e13737 !important;\n font-weight: 400 !important;\n}\n\n// General Formkit Styling ----\n\n.formkit {\n &-input {\n .formkit {\n &-input {\n &-element {\n max-width: 100%;\n }\n\n &-error {\n font-weight: bold;\n }\n }\n }\n }\n\n .formkit-input-group-add-more {\n display: flex;\n justify-content: flex-end;\n\n button {\n border: black;\n }\n }\n\n .formkit-input {\n &[data-classification=\"text\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n &[data-classification=\"select\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n }\n\n .formkit-input[data-classification=\"button\"] {\n button {\n &[data-ghost] {\n color: white;\n background-color: #001d85;\n border-color: #001d85;\n border-radius: 1.875rem;\n\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n }\n }\n}\n\n.formkit-input.besides {\n border-bottom: 1px solid lightgrey !important;\n}\n\n.formkit-input-label {\n font-weight: 500 !important;\n}\n\n.formkit-input-element {\n\n &--textarea {\n width: 100%;\n }\n}\n\n.formkit-input-element--group {\n display: block !important;\n}\n\n.formkit-input.besides>.formkit-input-wrapper>.formkit-input-label {\n\n\n text-decoration: underline !important;\n}\n\n// #stepper,\n// #subStepper {\n\n\n// .step-progress__step::after {\n// display: none;\n// }\n\n// .step-progress__step-label {\n// cursor: pointer;\n// }\n// }\n</style>\n"],"names":["_resolveComponent","property","_createElementBlock","isReady","_ctx","_openBlock","_createBlock","_component_router_view","_createCommentVNode"],"mappings":";;;;;YACEA,EAIM,aAAA;SAJmHC,EAAQ,GAAAC,EAAA,OAAA;AAAA,IAAA,OAAA;AAAA,IAE5GC,KAAAA,EAAAA;AAAAA,EAAAA,GAAAA;AAAAA,IAASC,EAAA,WAAAC,KAAoBC,EAAAC,GAAA;AAAA,MAAA,KAAA;AAAA,MAHpD,KAAAH,EAAA;AAAA,IAAA,CAAA,KAAAI,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { setupDpiContext as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { mapGetters as
|
|
4
|
-
import { config as
|
|
5
|
-
import { useRuntimeEnv as
|
|
6
|
-
import { useRoute as
|
|
7
|
-
import { useDpiEditMode as
|
|
8
|
-
const
|
|
1
|
+
import { setupDpiContext as h } from "./composables/useDpiContext.mjs";
|
|
2
|
+
import { defineComponent as g, defineAsyncComponent as v, toRef as y, computed as s, toValue as $, watchEffect as E } from "vue";
|
|
3
|
+
import { mapGetters as S, mapActions as n, useStore as w } from "vuex";
|
|
4
|
+
import { config as C } from "./config/dpi-spec-config.mjs";
|
|
5
|
+
import { useRuntimeEnv as D } from "../composables/useRuntimeEnv.mjs";
|
|
6
|
+
import { useRoute as I } from "vue-router";
|
|
7
|
+
import { useDpiEditMode as b } from "./composables/useDpiEditMode.mjs";
|
|
8
|
+
const M = g({
|
|
9
9
|
name: "DataProviderInterface",
|
|
10
10
|
components: {
|
|
11
|
-
InputPage:
|
|
11
|
+
InputPage: v(() => import("./views/InputPage.vue.mjs"))
|
|
12
12
|
},
|
|
13
13
|
props: {
|
|
14
14
|
name: {
|
|
@@ -38,7 +38,7 @@ const N = h({
|
|
|
38
38
|
};
|
|
39
39
|
},
|
|
40
40
|
computed: {
|
|
41
|
-
|
|
41
|
+
...S("auth", [
|
|
42
42
|
"getIsEditMode"
|
|
43
43
|
]),
|
|
44
44
|
mode() {
|
|
@@ -46,19 +46,19 @@ const N = h({
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
methods: {
|
|
49
|
-
...
|
|
49
|
+
...n("dpiStore", [
|
|
50
50
|
"saveLocalstorageValues"
|
|
51
51
|
]),
|
|
52
|
-
...
|
|
52
|
+
...n("auth", [
|
|
53
53
|
"populateDraftAndEdit"
|
|
54
54
|
]),
|
|
55
55
|
getClearPath() {
|
|
56
56
|
return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;
|
|
57
57
|
},
|
|
58
58
|
handleScroll() {
|
|
59
|
-
var a, t,
|
|
59
|
+
var a, t, e;
|
|
60
60
|
try {
|
|
61
|
-
(a = document.getElementById("stepperAnchor")) != null && a.offsetTop || 0 >= 35 ? (t = document.getElementById("stepperAnchor")) == null || t.classList.add("border-bottom-lightgray") : (
|
|
61
|
+
(a = document.getElementById("stepperAnchor")) != null && a.offsetTop || 0 >= 35 ? (t = document.getElementById("stepperAnchor")) == null || t.classList.add("border-bottom-lightgray") : (e = document.getElementById("stepperAnchor")) == null || e.classList.remove("border-bottom-lightgray");
|
|
62
62
|
} catch {
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -73,31 +73,31 @@ const N = h({
|
|
|
73
73
|
window.removeEventListener("scroll", this.handleScroll);
|
|
74
74
|
},
|
|
75
75
|
setup(a) {
|
|
76
|
-
const t =
|
|
77
|
-
const
|
|
76
|
+
const t = I(), e = w(), i = D().content.dataProviderInterface.specification, c = C[i], p = y(a, "dpiContext"), o = s(() => {
|
|
77
|
+
const f = $(p);
|
|
78
78
|
return {
|
|
79
|
-
specification:
|
|
80
|
-
specificationName:
|
|
79
|
+
specification: c,
|
|
80
|
+
specificationName: i,
|
|
81
81
|
edit: {
|
|
82
82
|
enabled: t.query.edit === "true",
|
|
83
83
|
id: t.query.id || void 0,
|
|
84
84
|
fromDraft: t.query.fromDraft === "true"
|
|
85
85
|
},
|
|
86
|
-
...
|
|
86
|
+
...f
|
|
87
87
|
};
|
|
88
|
+
}), m = s(() => o.value.specification), r = s(() => o.value.specificationName);
|
|
89
|
+
h(o), E(() => {
|
|
90
|
+
e.dispatch("dpiStore/setSpecification", m.value), e.dispatch("dpiStore/setSpecificationname", r.value);
|
|
88
91
|
});
|
|
89
|
-
|
|
90
|
-
o.dispatch("dpiStore/setSpecification", e.value.specification), o.dispatch("dpiStore/setSpecificationname", e.value.specificationName);
|
|
91
|
-
});
|
|
92
|
-
const c = i(() => `${t.query.key}@${e.value.specificationName}`), { isReady: m } = D(e);
|
|
92
|
+
const u = s(() => `${t.query.key}@${r.value}`), { isReady: l } = b(o);
|
|
93
93
|
return {
|
|
94
|
-
resolvedDpiContext:
|
|
95
|
-
key:
|
|
96
|
-
isReady:
|
|
94
|
+
resolvedDpiContext: o,
|
|
95
|
+
key: u,
|
|
96
|
+
isReady: l
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
export {
|
|
101
|
-
|
|
101
|
+
M as default
|
|
102
102
|
};
|
|
103
103
|
//# sourceMappingURL=DataProviderInterface.vue2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataProviderInterface.vue2.mjs","sources":["../../lib/data-provider-interface/DataProviderInterface.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between dpi position-relative w-100\" :key=\"property\">\n <!-- CONTENT -->\n <router-view v-if=\"isReady\" ref=\"view\" :key=\"key\">\n </router-view>\n </div>\n</template>\n\n<script lang=\"ts\">\n/* eslint-disable no-nested-ternary, no-lonely-if, no-param-reassign */\nimport { DpiContext, setupDpiContext } from './composables/useDpiContext';\nimport { computed, defineAsyncComponent, defineComponent, PropType , ref, toRef, toRefs, toValue, watch, watchEffect} from 'vue';\nimport { mapActions, mapGetters, useStore } from 'vuex';\nimport dpiSpecs from './config/dpi-spec-config';\nimport { useRuntimeEnv } from '../composables/useRuntimeEnv';\nimport { useRoute } from 'vue-router';\nimport { useAsyncState, watchOnce } from '@vueuse/core';\nimport { useDpiEditMode } from './composables/useDpiEditMode';\n\n\n\nexport default defineComponent({\n name: 'DataProviderInterface',\n components: {\n InputPage: defineAsyncComponent(() => import('./views/InputPage.vue')),\n },\n props: {\n name: {\n type: String,\n default: '',\n },\n dpiContext: {\n type: Object as PropType<DpiContext>,\n default: () => undefined,\n }\n },\n metaInfo() {\n return {\n title: `${this.$t('message.metadata.upload')} | ${this.$t('message.header.navigation.data.datasets')}`,\n meta: [\n { name: 'description', vmid: 'description', content: `${this.$t('message.datasets.meta.description')}` },\n { name: 'keywords', vmid: 'keywords', content: `${this.$env.metadata.keywords} ${this.$t('message.datasets.meta.description')}}` },\n { name: 'robots', content: 'noindex, follow' },\n ],\n };\n },\n data() {\n return {\n property: this.$route.params.property,\n id: this.$route.params.id,\n };\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n mode() {\n return this.property === 'catalogues'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editCatalogue')\n : this.$t('message.dataupload.createNewCatalogue')\n : this.property === 'datasets'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editDataset')\n : this.$t('message.dataupload.createNewDataset')\n : 'Edit Distribution';\n },\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n ...mapActions('auth', [\n 'populateDraftAndEdit',\n ]),\n getClearPath() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;;\n },\n handleScroll() {\n try {\n if (document.getElementById(\"stepperAnchor\")?.offsetTop || 0 >= 35) {\n document.getElementById(\"stepperAnchor\")?.classList.add(\"border-bottom-lightgray\");\n }\n else {\n document.getElementById(\"stepperAnchor\")?.classList.remove(\"border-bottom-lightgray\");\n }\n } catch (error) {\n \n }\n }\n\n },\n created() {\n window.addEventListener('scroll', this.handleScroll);\n this.populateDraftAndEdit();\n },\n mounted() {\n this.saveLocalstorageValues(this.property);\n },\n unmounted() {\n window.removeEventListener('scroll', this.handleScroll);\n },\n setup(props) {\n const route = useRoute()\n const store = useStore()\n const env = useRuntimeEnv()\n const userSpec = env.content.dataProviderInterface.specification as 'dcatap' | 'dcatapde' | 'dcatapdeODB'\n const fallbackSpec = dpiSpecs[userSpec]\n const dpiContext = toRef(props, 'dpiContext')\n\n const resolvedDpiContext = computed<DpiContext>(() => {\n const _dpiContext = toValue(dpiContext)\n\n return {\n specification: fallbackSpec,\n specificationName: userSpec,\n edit: {\n enabled: route.query.edit === 'true',\n id: route.query.id as string || undefined,\n fromDraft: route.query.fromDraft === 'true',\n },\n ..._dpiContext\n }\n })\n\n setupDpiContext(resolvedDpiContext)\n\n watchEffect(() => {\n store.dispatch('dpiStore/setSpecification', resolvedDpiContext.value.specification)\n store.dispatch('dpiStore/setSpecificationname', resolvedDpiContext.value.specificationName)\n })\n\n const key = computed(() => {\n return `${route.query.key}@${resolvedDpiContext.value.specificationName}`\n })\n\n const { isReady } = useDpiEditMode(resolvedDpiContext)\n\n return {\n resolvedDpiContext,\n key,\n isReady,\n }\n\n }\n});\n</script>\n\n<style lang=\"scss\">\n.border-bottom-lightgray {\n border-bottom: 1px solid lightgray;\n}\n.stickyStepper {\n position: sticky;\n top: 0;\n background: #ffffff;\n z-index: 999;\n}\n\n.stickyStepper .SSfirstRow {\n margin: 1vh 0;\n display: flex;\n align-items: center;\n}\n\n.stickyStepper .stickyNav {\n border-left: 1px solid black;\n margin-left: 1vh;\n padding-left: 1vh;\n}\n\n#stepper {\n width: 100% !important;\n}\n\n#input {\n padding: 10px;\n}\n\n.small-headline {\n font-size: 1.5rem;\n min-width: max-content;\n}\n\n.property {\n margin: 20px;\n background-color: #ffffff;\n border: solid 0.5px rgb(225, 225, 225);\n margin-top: 30px;\n}\n\n.infoBox .material-icons {\n font-size: 20px;\n vertical-align: text-bottom;\n margin-right: 5px;\n margin-bottom: 1px;\n}\n\n.infoBox {\n width: 100%;\n height: 30%;\n background-color: #f7f7f7;\n padding: 5%;\n border-radius: 0.25rem;\n margin-top: 20px;\n\n .input_subpage_nav {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 15px;\n }\n}\n\n.besides {\n .formkit-input-group-repeatable {\n display: flex;\n flex-direction: row;\n background-color: transparent;\n padding: 0px;\n }\n}\n\n.main {\n width: 75%;\n margin: 0 5px 0 5px;\n}\n\n.sub {\n width: 20%;\n margin: 0 5px 0 5px;\n}\n\n#subStepperBox {\n position: sticky;\n top: 154px;\n z-index: 10;\n width: 100%;\n padding: 0 10%;\n\n .step-progress__bar {\n border-top: none !important;\n }\n\n .step-progress__step--active {\n .step-progress__step-label {\n background-color: lightsteelblue !important;\n }\n\n }\n}\n\n.step-progress__step span{\n \n color:white !important;\n \n}\n// Stepper Customizing -------------\n\n// #stepper,\n// #subStepper {\n// .step-progress__step {\n// display: flex;\n// align-items: center;\n// justify-content: center;\n// height: 70%;\n// width: 20%;\n// display: flex;\n// align-items: center;\n// z-index: 1;\n\n\n// span {\n// color: grey;\n// font-size: 18px;\n// display: none;\n// }\n\n// div {\n// padding: 1rem;\n// height: 100%;\n// display: flex;\n// align-items: center;\n// color: white;\n// font-weight: 300;\n\n// }\n\n// .step-progress__step-label {\n\n// background: lightgrey;\n// background-size: 400% 400%;\n// background-position: 100% 0%;\n// transition: all 300ms ease-in-out;\n// border-right: 1px white solid;\n// font-size: 14px;\n// display: flex;\n// align-items: center;\n// justify-content: center;\n\n\n// }\n\n\n// .step-progress__step-label:hover {\n// background-position: 65% 0%;\n// color: black;\n\n// }\n\n// }\n\n// .step-progress__step--active {\n\n// z-index: 7 !important;\n\n\n// span {\n// color: black;\n// }\n\n// div {\n// background: white;\n// }\n\n// .step-progress__step-label {\n// background: rgb(236, 236, 236);\n// background-position: 50% 0%;\n// box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12) !important;\n// transform: scale(1.1);\n// z-index: 8;\n// font-size: 16px;\n// }\n\n// }\n\n// .step-progress__step--valid {\n// div {\n// color: white;\n\n// }\n\n// .step-progress__step-label {\n// background: rgba(0, 235, 0, 0.2);\n// color: lightslategrey;\n\n\n// }\n\n// .step-progress__step-label:hover {\n// color: black;\n// }\n// }\n\n// .step-progress__step--active .step-progress__step-label {\n// color: rgb(31, 31, 31);\n// }\n\n// .step-progress__wrapper-after {\n// display: none;\n// }\n\n// .step-progress__step-icon {\n// display: none !important;\n// }\n\n// .step-progress__bar {\n// margin: 0;\n// height: 5rem;\n// border-top: 1px solid lightslategray;\n\n// }\n\n// .step-progress__step-label {\n// position: unset;\n// transform: unset;\n// flex-grow: 1;\n// }\n\n// .step-progress__step {}\n\n// .step-progress__wrapper-before {\n// display: none !important;\n// }\n\n// #stepper .step-progress__step::after {\n// display: none !important;\n// }\n// }\n#stepper .step-progress__step{\n border: solid white 20px;\n}\n#stepper .step-progress__step-icon, #subStepper .step-progress__step-icon {\n font-size: 25px;\n}\n.step-progress__step-label{\n cursor: pointer;\n}\n// Input Form Margins & Borders ----\n\n.formkit-input[data-classification=group] [data-is-repeatable] {\n border: none;\n padding: 1em 1em 1em 0em;\n}\n\n.formkit-input[data-classification=group] [data-is-repeatable] .formkit-input-group-repeatable {\n border-bottom: none;\n}\n\n.formkit-input-element--checkbox {\n margin-right: 5px;\n}\n\n.formkit-input-wrapper {\n font-family: \"Ubuntu\";\n}\n\n.formkit-input[data-classification=button] button[data-ghost] {\n font-weight: 400;\n}\n\n.formkit-input-error {\n color: #e13737 !important;\n font-weight: 400 !important;\n}\n\n// General Formkit Styling ----\n\n.formkit {\n &-input {\n .formkit {\n &-input {\n &-element {\n max-width: 100%;\n }\n\n &-error {\n font-weight: bold;\n }\n }\n }\n }\n\n .formkit-input-group-add-more {\n display: flex;\n justify-content: flex-end;\n\n button {\n border: black;\n }\n }\n\n .formkit-input {\n &[data-classification=\"text\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n &[data-classification=\"select\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n }\n\n .formkit-input[data-classification=\"button\"] {\n button {\n &[data-ghost] {\n color: white;\n background-color: #001d85;\n border-color: #001d85;\n border-radius: 1.875rem;\n\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n }\n }\n}\n\n.formkit-input.besides {\n border-bottom: 1px solid lightgrey !important;\n}\n\n.formkit-input-label {\n font-weight: 500 !important;\n}\n\n.formkit-input-element {\n\n &--textarea {\n width: 100%;\n }\n}\n\n.formkit-input-element--group {\n display: block !important;\n}\n\n.formkit-input.besides>.formkit-input-wrapper>.formkit-input-label {\n\n\n text-decoration: underline !important;\n}\n\n// #stepper,\n// #subStepper {\n\n\n// .step-progress__step::after {\n// display: none;\n// }\n\n// .step-progress__step-label {\n// cursor: pointer;\n// }\n// }\n</style>\n"],"names":["_sfc_main","defineComponent","defineAsyncComponent","mapGetters","mapActions","_a","_b","_c","props","route","useRoute","store","useStore","userSpec","useRuntimeEnv","fallbackSpec","dpiSpecs","dpiContext","toRef","resolvedDpiContext","computed","_dpiContext","toValue","setupDpiContext","watchEffect","key","isReady","useDpiEditMode"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"DataProviderInterface.vue2.mjs","sources":["../../lib/data-provider-interface/DataProviderInterface.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between dpi position-relative w-100\" :key=\"property\">\n <!-- CONTENT -->\n <router-view v-if=\"isReady\" ref=\"view\" :key=\"key\">\n </router-view>\n </div>\n</template>\n\n<script lang=\"ts\">\n/* eslint-disable no-nested-ternary, no-lonely-if, no-param-reassign */\nimport { DpiContext, setupDpiContext } from './composables/useDpiContext';\nimport { computed, defineAsyncComponent, defineComponent, PropType , ref, toRef, toRefs, toValue, watch, watchEffect} from 'vue';\nimport { mapActions, mapGetters, useStore } from 'vuex';\nimport dpiSpecs from './config/dpi-spec-config';\nimport { useRuntimeEnv } from '../composables/useRuntimeEnv';\nimport { useRoute } from 'vue-router';\nimport { useAsyncState, watchOnce } from '@vueuse/core';\nimport { useDpiEditMode } from './composables/useDpiEditMode';\n\n\n\nexport default defineComponent({\n name: 'DataProviderInterface',\n components: {\n InputPage: defineAsyncComponent(() => import('./views/InputPage.vue')),\n },\n props: {\n name: {\n type: String,\n default: '',\n },\n dpiContext: {\n type: Object as PropType<DpiContext>,\n default: () => undefined,\n }\n },\n metaInfo() {\n return {\n title: `${this.$t('message.metadata.upload')} | ${this.$t('message.header.navigation.data.datasets')}`,\n meta: [\n { name: 'description', vmid: 'description', content: `${this.$t('message.datasets.meta.description')}` },\n { name: 'keywords', vmid: 'keywords', content: `${this.$env.metadata.keywords} ${this.$t('message.datasets.meta.description')}}` },\n { name: 'robots', content: 'noindex, follow' },\n ],\n };\n },\n data() {\n return {\n property: this.$route.params.property,\n id: this.$route.params.id,\n };\n },\n computed: {\n ...mapGetters('auth', [\n 'getIsEditMode',\n ]),\n mode() {\n return this.property === 'catalogues'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editCatalogue')\n : this.$t('message.dataupload.createNewCatalogue')\n : this.property === 'datasets'\n ? this.getIsEditMode\n ? this.$t('message.dataupload.menu.editDataset')\n : this.$t('message.dataupload.createNewDataset')\n : 'Edit Distribution';\n },\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n ...mapActions('auth', [\n 'populateDraftAndEdit',\n ]),\n getClearPath() {\n return `${this.$env.content.dataProviderInterface.basePath}/${this.property}?locale=${this.$i18n.locale}&clear=true`;;\n },\n handleScroll() {\n try {\n if (document.getElementById(\"stepperAnchor\")?.offsetTop || 0 >= 35) {\n document.getElementById(\"stepperAnchor\")?.classList.add(\"border-bottom-lightgray\");\n }\n else {\n document.getElementById(\"stepperAnchor\")?.classList.remove(\"border-bottom-lightgray\");\n }\n } catch (error) {\n \n }\n }\n\n },\n created() {\n window.addEventListener('scroll', this.handleScroll);\n this.populateDraftAndEdit();\n },\n mounted() {\n this.saveLocalstorageValues(this.property);\n },\n unmounted() {\n window.removeEventListener('scroll', this.handleScroll);\n },\n setup(props) {\n const route = useRoute()\n const store = useStore()\n const env = useRuntimeEnv()\n const userSpec = env.content.dataProviderInterface.specification as 'dcatap' | 'dcatapde' | 'dcatapdeODB'\n const fallbackSpec = dpiSpecs[userSpec]\n const dpiContext = toRef(props, 'dpiContext')\n\n const resolvedDpiContext = computed<DpiContext>(() => {\n const _dpiContext = toValue(dpiContext)\n\n return {\n specification: fallbackSpec,\n specificationName: userSpec,\n edit: {\n enabled: route.query.edit === 'true',\n id: route.query.id as string || undefined,\n fromDraft: route.query.fromDraft === 'true',\n },\n ..._dpiContext\n }\n })\n\n const specification = computed(() => {\n return resolvedDpiContext.value.specification\n })\n\n const specificationName = computed(() => {\n return resolvedDpiContext.value.specificationName\n })\n\n setupDpiContext(resolvedDpiContext)\n\n watchEffect(() => {\n store.dispatch('dpiStore/setSpecification', specification.value)\n store.dispatch('dpiStore/setSpecificationname', specificationName.value)\n })\n\n const key = computed(() => {\n return `${route.query.key}@${specificationName.value}`\n })\n\n const { isReady } = useDpiEditMode(resolvedDpiContext)\n\n return {\n resolvedDpiContext,\n key,\n isReady,\n }\n\n }\n});\n</script>\n\n<style lang=\"scss\">\n.border-bottom-lightgray {\n border-bottom: 1px solid lightgray;\n}\n.stickyStepper {\n position: sticky;\n top: 0;\n background: #ffffff;\n z-index: 999;\n}\n\n.stickyStepper .SSfirstRow {\n margin: 1vh 0;\n display: flex;\n align-items: center;\n}\n\n.stickyStepper .stickyNav {\n border-left: 1px solid black;\n margin-left: 1vh;\n padding-left: 1vh;\n}\n\n#stepper {\n width: 100% !important;\n}\n\n#input {\n padding: 10px;\n}\n\n.small-headline {\n font-size: 1.5rem;\n min-width: max-content;\n}\n\n.property {\n margin: 20px;\n background-color: #ffffff;\n border: solid 0.5px rgb(225, 225, 225);\n margin-top: 30px;\n}\n\n.infoBox .material-icons {\n font-size: 20px;\n vertical-align: text-bottom;\n margin-right: 5px;\n margin-bottom: 1px;\n}\n\n.infoBox {\n width: 100%;\n height: 30%;\n background-color: #f7f7f7;\n padding: 5%;\n border-radius: 0.25rem;\n margin-top: 20px;\n\n .input_subpage_nav {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 15px;\n }\n}\n\n.besides {\n .formkit-input-group-repeatable {\n display: flex;\n flex-direction: row;\n background-color: transparent;\n padding: 0px;\n }\n}\n\n.main {\n width: 75%;\n margin: 0 5px 0 5px;\n}\n\n.sub {\n width: 20%;\n margin: 0 5px 0 5px;\n}\n\n#subStepperBox {\n position: sticky;\n top: 154px;\n z-index: 10;\n width: 100%;\n padding: 0 10%;\n\n .step-progress__bar {\n border-top: none !important;\n }\n\n .step-progress__step--active {\n .step-progress__step-label {\n background-color: lightsteelblue !important;\n }\n\n }\n}\n\n.step-progress__step span{\n \n color:white !important;\n \n}\n// Stepper Customizing -------------\n\n// #stepper,\n// #subStepper {\n// .step-progress__step {\n// display: flex;\n// align-items: center;\n// justify-content: center;\n// height: 70%;\n// width: 20%;\n// display: flex;\n// align-items: center;\n// z-index: 1;\n\n\n// span {\n// color: grey;\n// font-size: 18px;\n// display: none;\n// }\n\n// div {\n// padding: 1rem;\n// height: 100%;\n// display: flex;\n// align-items: center;\n// color: white;\n// font-weight: 300;\n\n// }\n\n// .step-progress__step-label {\n\n// background: lightgrey;\n// background-size: 400% 400%;\n// background-position: 100% 0%;\n// transition: all 300ms ease-in-out;\n// border-right: 1px white solid;\n// font-size: 14px;\n// display: flex;\n// align-items: center;\n// justify-content: center;\n\n\n// }\n\n\n// .step-progress__step-label:hover {\n// background-position: 65% 0%;\n// color: black;\n\n// }\n\n// }\n\n// .step-progress__step--active {\n\n// z-index: 7 !important;\n\n\n// span {\n// color: black;\n// }\n\n// div {\n// background: white;\n// }\n\n// .step-progress__step-label {\n// background: rgb(236, 236, 236);\n// background-position: 50% 0%;\n// box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12) !important;\n// transform: scale(1.1);\n// z-index: 8;\n// font-size: 16px;\n// }\n\n// }\n\n// .step-progress__step--valid {\n// div {\n// color: white;\n\n// }\n\n// .step-progress__step-label {\n// background: rgba(0, 235, 0, 0.2);\n// color: lightslategrey;\n\n\n// }\n\n// .step-progress__step-label:hover {\n// color: black;\n// }\n// }\n\n// .step-progress__step--active .step-progress__step-label {\n// color: rgb(31, 31, 31);\n// }\n\n// .step-progress__wrapper-after {\n// display: none;\n// }\n\n// .step-progress__step-icon {\n// display: none !important;\n// }\n\n// .step-progress__bar {\n// margin: 0;\n// height: 5rem;\n// border-top: 1px solid lightslategray;\n\n// }\n\n// .step-progress__step-label {\n// position: unset;\n// transform: unset;\n// flex-grow: 1;\n// }\n\n// .step-progress__step {}\n\n// .step-progress__wrapper-before {\n// display: none !important;\n// }\n\n// #stepper .step-progress__step::after {\n// display: none !important;\n// }\n// }\n#stepper .step-progress__step{\n border: solid white 20px;\n}\n#stepper .step-progress__step-icon, #subStepper .step-progress__step-icon {\n font-size: 25px;\n}\n.step-progress__step-label{\n cursor: pointer;\n}\n// Input Form Margins & Borders ----\n\n.formkit-input[data-classification=group] [data-is-repeatable] {\n border: none;\n padding: 1em 1em 1em 0em;\n}\n\n.formkit-input[data-classification=group] [data-is-repeatable] .formkit-input-group-repeatable {\n border-bottom: none;\n}\n\n.formkit-input-element--checkbox {\n margin-right: 5px;\n}\n\n.formkit-input-wrapper {\n font-family: \"Ubuntu\";\n}\n\n.formkit-input[data-classification=button] button[data-ghost] {\n font-weight: 400;\n}\n\n.formkit-input-error {\n color: #e13737 !important;\n font-weight: 400 !important;\n}\n\n// General Formkit Styling ----\n\n.formkit {\n &-input {\n .formkit {\n &-input {\n &-element {\n max-width: 100%;\n }\n\n &-error {\n font-weight: bold;\n }\n }\n }\n }\n\n .formkit-input-group-add-more {\n display: flex;\n justify-content: flex-end;\n\n button {\n border: black;\n }\n }\n\n .formkit-input {\n &[data-classification=\"text\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n &[data-classification=\"select\"] .formkit-input-wrapper {\n display: flex;\n flex-direction: column;\n }\n }\n\n .formkit-input[data-classification=\"button\"] {\n button {\n &[data-ghost] {\n color: white;\n background-color: #001d85;\n border-color: #001d85;\n border-radius: 1.875rem;\n\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n }\n }\n}\n\n.formkit-input.besides {\n border-bottom: 1px solid lightgrey !important;\n}\n\n.formkit-input-label {\n font-weight: 500 !important;\n}\n\n.formkit-input-element {\n\n &--textarea {\n width: 100%;\n }\n}\n\n.formkit-input-element--group {\n display: block !important;\n}\n\n.formkit-input.besides>.formkit-input-wrapper>.formkit-input-label {\n\n\n text-decoration: underline !important;\n}\n\n// #stepper,\n// #subStepper {\n\n\n// .step-progress__step::after {\n// display: none;\n// }\n\n// .step-progress__step-label {\n// cursor: pointer;\n// }\n// }\n</style>\n"],"names":["_sfc_main","defineComponent","defineAsyncComponent","mapGetters","mapActions","_a","_b","_c","props","route","useRoute","store","useStore","userSpec","useRuntimeEnv","fallbackSpec","dpiSpecs","dpiContext","toRef","resolvedDpiContext","computed","_dpiContext","toValue","specification","specificationName","setupDpiContext","watchEffect","key","isReady","useDpiEditMode"],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getCurrentInstance as te, computed as L, ref as h, onMounted as ne, watch as
|
|
1
|
+
import { getCurrentInstance as te, computed as L, ref as h, onMounted as ne, watch as X, watchEffect as ae, openBlock as r, createElementBlock as i, unref as u, toDisplayString as v, createCommentVNode as $, createTextVNode as p, createElementVNode as s, withDirectives as J, isRef as N, vModelText as le, Fragment as S, renderList as T, vShow as oe, normalizeClass as se } from "vue";
|
|
2
2
|
import { useStore as re } from "vuex";
|
|
3
|
-
import { getTranslationFor as
|
|
3
|
+
import { getTranslationFor as M } from "../../utils/helpers.mjs";
|
|
4
4
|
import { getNode as ie } from "@formkit/core";
|
|
5
|
-
import { onClickOutside as
|
|
5
|
+
import { onClickOutside as R } from "../../external/@vueuse/core/index";
|
|
6
6
|
import { useI18n as ue } from "vue-i18n";
|
|
7
7
|
import ce from "qs";
|
|
8
8
|
import de from "axios";
|
|
@@ -26,35 +26,35 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
26
26
|
props: {
|
|
27
27
|
context: Object
|
|
28
28
|
},
|
|
29
|
-
setup(
|
|
29
|
+
setup(z) {
|
|
30
30
|
let k = te().appContext.app.config.globalProperties.$env;
|
|
31
|
-
const a =
|
|
32
|
-
let g = L(() => a.context.value), c, b = a.context.attrs.voc, G = L(() =>
|
|
31
|
+
const a = z, j = re(), { t: D, locale: V } = ue();
|
|
32
|
+
let g = L(() => a.context.value), c, b = a.context.attrs.voc, G = L(() => D("message.dataupload.info.searchVocabulary")), K = L(() => D("message.dataupload.info.matchesNothingFound")), _ = h({
|
|
33
33
|
value: { name: G }
|
|
34
|
-
}), f = h(),
|
|
34
|
+
}), f = h(), E = h(null), H = h(null), x = h({}), m = [], C = [], q = h({
|
|
35
35
|
value: !1
|
|
36
36
|
});
|
|
37
37
|
h();
|
|
38
|
-
let
|
|
38
|
+
let A = h({});
|
|
39
39
|
ne(async () => {
|
|
40
40
|
x.value = "";
|
|
41
41
|
});
|
|
42
|
-
let
|
|
42
|
+
let U = L(() => {
|
|
43
43
|
try {
|
|
44
44
|
if (a.context.attrs.class.includes("inDistribution"))
|
|
45
45
|
return !0;
|
|
46
46
|
} catch {
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
|
|
50
|
-
}),
|
|
49
|
+
X(_, async () => {
|
|
50
|
+
}), X(A, async () => {
|
|
51
51
|
});
|
|
52
|
-
const
|
|
52
|
+
const F = async (n) => {
|
|
53
53
|
if (n != null) {
|
|
54
54
|
let e = b === "iana-media-types" || b === "spdx-checksum-algorithm", t;
|
|
55
|
-
return await
|
|
55
|
+
return await j.dispatch("dpiStore/requestResourceName", { voc: b, uri: n, envs: k }).then(
|
|
56
56
|
(o) => {
|
|
57
|
-
a.context.attrs.property === "dcatde:politicalGeocodingURI" ? o != null && (t = e ? o.data.result.results.filter((l) => l.resource === n).map((l) => l.alt_label)[0].en :
|
|
57
|
+
a.context.attrs.property === "dcatde:politicalGeocodingURI" ? o != null && (t = e ? o.data.result.results.filter((l) => l.resource === n).map((l) => l.alt_label)[0].en : M(o.data.result.alt_label, V.value, [])) : o != null && (t = e ? o.data.result.results.filter((l) => l.resource === n).map((l) => l.pref_label)[0].en : M(o.data.result.pref_label, V.value, []));
|
|
58
58
|
}
|
|
59
59
|
), t;
|
|
60
60
|
}
|
|
@@ -63,15 +63,15 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
63
63
|
const n = g.value;
|
|
64
64
|
if (n.hasOwnProperty("name") && n.name === n.resource) {
|
|
65
65
|
let e;
|
|
66
|
-
a.context.attrs.multiple || (e =
|
|
66
|
+
a.context.attrs.multiple || (e = F(n.resource), a.context.node.input({ name: await e, resource: n.resource }));
|
|
67
67
|
}
|
|
68
68
|
if (n.length >= 1) {
|
|
69
69
|
let e = [];
|
|
70
70
|
for (let t = 0; t < n.length; t++)
|
|
71
|
-
n[t].name === n[t].resource && (e.push({ name: await
|
|
71
|
+
n[t].name === n[t].resource && (e.push({ name: await F(n[t].resource), resource: n[t].resource }), a.context.node.input(e));
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
-
function
|
|
74
|
+
function P(n) {
|
|
75
75
|
let e = { step: "", prop: a.context.node.name }, t = JSON.parse(localStorage.getItem("dpi_datasets"));
|
|
76
76
|
for (let o = 0; o < Object.keys(t).length; o++)
|
|
77
77
|
for (let d = 0; d < Object.keys(t)[o].length; d++) {
|
|
@@ -83,10 +83,10 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
83
83
|
} catch {
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
window.removeEventListener("click",
|
|
86
|
+
window.removeEventListener("click", R);
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
let
|
|
88
|
+
R(E, (n) => f.value = !1), R(H, (n) => x.value = "");
|
|
89
|
+
let W = async (n, e) => {
|
|
90
90
|
let t = 10;
|
|
91
91
|
e != null && (t = t + 10);
|
|
92
92
|
let o = ce.stringify({
|
|
@@ -108,13 +108,13 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
108
108
|
let w = [];
|
|
109
109
|
g.value.length > 0 && g.value.forEach((y) => {
|
|
110
110
|
w.push({ name: y.name, resource: y.resource, activeValue: !0 });
|
|
111
|
-
}), l.data.results.length > 9 && (C[C.length + 1] = { name: "...", resource: "invalid", activeValue: !1 }),
|
|
111
|
+
}), l.data.results.length > 9 && (C[C.length + 1] = { name: "...", resource: "invalid", activeValue: !1 }), A.value = Y(w, C);
|
|
112
112
|
}).catch(function(l) {
|
|
113
113
|
console.log(l);
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
116
|
async function Q(n) {
|
|
117
|
-
n.resource === "invalid" ? I(5) : (
|
|
117
|
+
n.resource === "invalid" ? I(5) : (O({ name: n.name, resource: n.resource }), I());
|
|
118
118
|
}
|
|
119
119
|
function Y(n, e) {
|
|
120
120
|
let t = n.concat(e), o = [], d = /* @__PURE__ */ new Set();
|
|
@@ -125,10 +125,10 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
125
125
|
const I = async (n) => {
|
|
126
126
|
let e = ie("Mandatory").value["dct:description"];
|
|
127
127
|
for (let t = 0; t < e.length; t++)
|
|
128
|
-
e[t]["@language"] === "en" && (n != null ? await
|
|
128
|
+
e[t]["@language"] === "en" && (n != null ? await W(e[t]["@value"], 5) : await W(e[t]["@value"]));
|
|
129
129
|
};
|
|
130
130
|
a.context.classes.outer += " autocompleteInput " + a.context.attrs.identifier;
|
|
131
|
-
const
|
|
131
|
+
const O = async (n) => {
|
|
132
132
|
if (x.value = "", Object.keys(n).length !== 1) {
|
|
133
133
|
if (g.value.length > 0 && (m = g.value), a.context.attrs.multiple)
|
|
134
134
|
if (m.length != 0) {
|
|
@@ -139,33 +139,33 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
139
139
|
else {
|
|
140
140
|
if (n.resource === "invalid")
|
|
141
141
|
return;
|
|
142
|
-
n === "erase" ? (await a.context.node.input({}),
|
|
142
|
+
n === "erase" ? (await a.context.node.input({}), P(n)) : (c = { name: n.name, resource: n.resource }, await a.context.node.input(c));
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
P();
|
|
145
145
|
}
|
|
146
146
|
}, Z = async (n) => {
|
|
147
147
|
let e = n.target.value;
|
|
148
|
-
await
|
|
148
|
+
await j.dispatch("dpiStore/requestAutocompleteSuggestions", { voc: b, text: e, base: k.api.baseUrl }).then((t) => {
|
|
149
149
|
const d = t.data.result.results.filter((l) => l.id !== "OP_DATPRO").map((l) => ({
|
|
150
|
-
name:
|
|
150
|
+
name: M(l.pref_label, V.value, []) + " (" + l.id + ")",
|
|
151
151
|
resource: l.resource
|
|
152
152
|
}));
|
|
153
153
|
d.length === 0 ? _.value = { value: { name: K } } : _.value = d;
|
|
154
154
|
});
|
|
155
155
|
};
|
|
156
156
|
function ee(n) {
|
|
157
|
-
a.context.node.input({}),
|
|
157
|
+
a.context.node.input({}), O("erase");
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
k.content.dataProviderInterface.annifIntegration && I(), g.value.length > 0 && (m = g.value), m.splice(m.findIndex((e) => e.name == n.name), 1), c = m, a.context.node.input(c),
|
|
159
|
+
function B(n) {
|
|
160
|
+
k.content.dataProviderInterface.annifIntegration && I(), g.value.length > 0 && (m = g.value), m.splice(m.findIndex((e) => e.name == n.name), 1), c = m, a.context.node.input(c), P();
|
|
161
161
|
}
|
|
162
162
|
return (n, e) => (r(), i("div", fe, [
|
|
163
|
-
u(
|
|
163
|
+
u(U) ? (r(), i("h4", pe, v(n.$t("message.dataupload.distributions." + a.context.attrs.identifier + ".label")), 1)) : $("", !0),
|
|
164
164
|
e[14] || (e[14] = p()),
|
|
165
|
-
a.context.attrs.identifier != "licence" && !u(
|
|
165
|
+
a.context.attrs.identifier != "licence" && !u(U) ? (r(), i("h4", {
|
|
166
166
|
key: 1,
|
|
167
167
|
innerHTML: n.$t("message.dataupload.datasets." + a.context.attrs.identifier + ".label")
|
|
168
|
-
}, null, 8, me)) :
|
|
168
|
+
}, null, 8, me)) : $("", !0),
|
|
169
169
|
e[15] || (e[15] = p()),
|
|
170
170
|
s("div", ve, [
|
|
171
171
|
s("div", ge, [
|
|
@@ -178,29 +178,29 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
178
178
|
})
|
|
179
179
|
])) : (r(), i("div", xe, [
|
|
180
180
|
s("div", ke, [
|
|
181
|
-
|
|
181
|
+
J(s("input", {
|
|
182
182
|
ref_key: "acInput",
|
|
183
|
-
ref:
|
|
183
|
+
ref: H,
|
|
184
184
|
class: "autocompleteInputfield",
|
|
185
185
|
placeholder: a.context.attrs.placeholder,
|
|
186
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) =>
|
|
186
|
+
"onUpdate:modelValue": e[0] || (e[0] = (t) => N(x) ? x.value = t : x = t),
|
|
187
187
|
type: "text",
|
|
188
188
|
onKeyup: e[1] || (e[1] = (t) => Z(t)),
|
|
189
|
-
onClick: e[2] || (e[2] = (t) =>
|
|
189
|
+
onClick: e[2] || (e[2] = (t) => N(f) ? f.value = !u(f) : f = !u(f))
|
|
190
190
|
}, null, 40, be), [
|
|
191
191
|
[le, u(x)]
|
|
192
192
|
])
|
|
193
193
|
]),
|
|
194
194
|
e[11] || (e[11] = p()),
|
|
195
|
-
|
|
195
|
+
J(s("ul", {
|
|
196
196
|
ref_key: "dropdownList",
|
|
197
|
-
ref:
|
|
197
|
+
ref: E,
|
|
198
198
|
class: "autocompleteResultList"
|
|
199
199
|
}, [
|
|
200
200
|
(r(!0), i(S, null, T(u(_), (t) => (r(), i("li", {
|
|
201
201
|
key: t,
|
|
202
202
|
onClick: (o) => {
|
|
203
|
-
|
|
203
|
+
O(t), N(f) ? f.value = !u(f) : f = !u(f);
|
|
204
204
|
},
|
|
205
205
|
class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
|
|
206
206
|
}, v(t.name), 9, we))), 128))
|
|
@@ -221,7 +221,7 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
221
221
|
e[5] || (e[5] = p()),
|
|
222
222
|
s("div", {
|
|
223
223
|
class: "removeX",
|
|
224
|
-
onClick: (o) =>
|
|
224
|
+
onClick: (o) => B(t)
|
|
225
225
|
}, null, 8, Le)
|
|
226
226
|
], 8, Ie)
|
|
227
227
|
])
|
|
@@ -237,13 +237,13 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
237
237
|
class: "navlikeButton",
|
|
238
238
|
type: "button",
|
|
239
239
|
onClick: e[3] || (e[3] = (t) => {
|
|
240
|
-
I(), u(
|
|
240
|
+
I(), u(q).value = !0;
|
|
241
241
|
})
|
|
242
242
|
}, v(n.$t("message.dataupload.info.tryIt")), 1)
|
|
243
243
|
]),
|
|
244
244
|
e[8] || (e[8] = p()),
|
|
245
|
-
u(
|
|
246
|
-
(r(!0), i(S, null, T(u(
|
|
245
|
+
u(q).value ? (r(), i("div", Ve, [
|
|
246
|
+
(r(!0), i(S, null, T(u(A), (t) => (r(), i("div", {
|
|
247
247
|
key: t,
|
|
248
248
|
class: "d-flex"
|
|
249
249
|
}, [
|
|
@@ -258,7 +258,7 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
258
258
|
])
|
|
259
259
|
], 10, Ae)
|
|
260
260
|
]))), 128))
|
|
261
|
-
])) :
|
|
261
|
+
])) : $("", !0)
|
|
262
262
|
])
|
|
263
263
|
])) : (r(), i("div", Oe, [
|
|
264
264
|
(r(!0), i(S, null, T(a.context.value, (t) => (r(), i("div", {
|
|
@@ -269,7 +269,7 @@ const fe = { class: "formkitProperty" }, pe = {
|
|
|
269
269
|
e[10] || (e[10] = p()),
|
|
270
270
|
s("div", {
|
|
271
271
|
class: "removeX",
|
|
272
|
-
onClick: (o) =>
|
|
272
|
+
onClick: (o) => B(t)
|
|
273
273
|
}, null, 8, $e)
|
|
274
274
|
]))), 128))
|
|
275
275
|
])),
|