@piveau/piveau-hub-ui-modules 4.5.6 → 4.5.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DatasetDetailsDataset.vue.mjs","sources":["../../lib/datasetDetails/DatasetDetailsDataset.vue"],"sourcesContent":["<template>\n <div>\n <resource-access-popup ref=\"externalResourceModal\" />\n <span property=\"dc:issued\" :content=\"getReleaseDate\"></span>\n <span property=\"dc:modified\" :content=\"getModificationDate\"></span>\n <div v-if=\"loadingDatasetDetails\">\n <dataset-details-skeleton type=\"DatasetDetails\"></dataset-details-skeleton>\n </div>\n <div v-if=\"!loadingDatasetDetails\" class=\"dsd-dataset\">\n <dataset-details-description\n v-if=\"showDatasetDescription\"\n :dateIncorrect=\"dateIncorrect\"\n :machineTranslated=\"machineTranslated\"\n :translationNotAvailable=\"translationNotAvailable\"\n />\n <distributions\n :openModal=\"openModal\"\n :getDistributions=\"getDistributions\"\n :expandedDistributions=\"expandedDistributions\"\n :expandedDistributionDescriptions=\"expandedDistributionDescriptions\"\n :displayedDistributions=\"displayedDistributions\"\n :isDistributionsAllDisplayed=\"isDistributionsAllDisplayed\"\n :distributions=\"distributions\"\n :setDistributionsDisplayCount=\"setDistributionsDisplayCount\"\n :pages=\"pages\"\n :showDownloadUrls=\"showDownloadUrls\"\n :isOnlyOneUrl=\"isOnlyOneUrl\"\n :getDistributionFormat=\"getDistributionFormat\"\n :distributionFormatTruncated=\"distributionFormatTruncated\"\n :getDistributionTitle=\"getDistributionTitle\"\n :distributionVisibleContent=\"distributionVisibleContent\"\n :distributionExpandedContent=\"distributionExpandedContent\"\n :distributionDescriptionIsExpanded=\"distributionDescriptionIsExpanded\"\n :distributionDescriptionIsExpandable=\"distributionDescriptionIsExpandable\"\n :distributionIsExpanded=\"distributionIsExpanded\"\n :showNumber=\"showNumber\"\n :showObject=\"showObject\"\n :showDownloadDropdown=\"showDownloadDropdown\"\n :showLicence=\"showLicence\"\n :showLicensingAssistant=\"showLicensingAssistant\"\n :filterDateFormatEU=\"filterDateFormatEU\"\n :showArray=\"showArray\"\n :showObjectArray=\"showObjectArray\"\n :getVisualisationLink=\"getVisualisationLink\"\n :getDownloadUrl=\"getDownloadUrl\"\n :trackGoto=\"trackGoto\"\n :showAccessUrls=\"showAccessUrls\"\n :replaceHttp=\"replaceHttp\"\n :previewLinkCallback=\"previewLinkCallback\"\n :toggleDistribution=\"toggleDistribution\"\n :toggleDistributionDescription=\"toggleDistributionDescription\"\n :increaseNumDisplayedDistributions=\"increaseNumDisplayedDistributions\"\n :nonOverflowingIncrementsForDistributions=\"nonOverflowingIncrementsForDistributions\"\n :appendCurrentLocaleToURL=\"appendCurrentLocaleToURL\"\n :isUrlInvalid=\"isUrlInvalid\"\n :openIfValidUrl=\"openIfValidUrl\"\n :showTooltipVisualiseButton=\"showTooltipVisualiseButton\"\n :showPublisher=\"showPublisher\"\n :embed=\"embed\"\n />\n\n <dataset-details-features\n :getKeywords=\"getKeywords\"\n :pages=\"pages\"\n :increaseNumDisplayedPages=\"increaseNumDisplayedPages\"\n :nonOverflowingIncrementsForPages=\"nonOverflowingIncrementsForPages\"\n :showKeyword=\"showKeyword\"\n :trackGoto=\"trackGoto\"\n :showObjectArray=\"showObjectArray\"\n :showArray=\"showArray\"\n :showObject=\"showObject\"\n />\n\n <dataset-details-properties v-if=\"showDatasetProperties\">\n <template #property-header><slot name=\"property-header\"></slot></template>\n <template #property-table-before><slot name=\"property-table-before\"></slot></template>\n <template #property-table><slot name=\"property-table\"></slot></template>\n <template #property-table-after><slot name=\"property-table-after\"></slot></template>\n </dataset-details-properties>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n // @ts-nocheck\n /* eslint-disable no-confusing-arrow, no-nested-ternary, no-return-assign, no-confusing-arrow */\n import $ from 'jquery';\n import { mapActions, mapGetters } from 'vuex';\n import {\n has,\n isNil,\n isArray,\n isObject,\n isString,\n isNumber,\n isEmpty,\n } from 'lodash';\n import AppLink from '../widgets/AppLink.vue';\n import Tooltip from '../widgets/Tooltip.vue';\n import Distributions from './distributions/Distributions.vue';\n import dateFilters from '../filters/dateFilters';\n import {\n getTranslationFor, getCountryFlagImg, truncate, replaceHttp, appendCurrentLocaleToURL\n } from '../utils/helpers';\n import ResourceAccessPopup from '../widgets/ResourceAccessPopup.vue';\n import DatasetDetailsExtendedMetaData\n from \"../datasetDetails/features/DatasetDetailsIsUsedBy.vue\";\n import DatasetDetailsSkeleton from \"../datasetDetails/DatasetDetailsSkeleton.vue\";\n import * as metaInfo from '../composables/head';\n\n export default {\n name: 'datasetDetailsDataset',\n components: {\n DatasetDetailsSkeleton,\n DatasetDetailsExtendedMetaData,\n AppLink,\n Tooltip,\n Distributions,\n ResourceAccessPopup\n },\n props: {\n distributionVisibleContent: {\n type: Array,\n default: () => ['license', 'licenseAttributionByText', 'modificationDate'],\n },\n distributionExpandedContent: {\n type: Array,\n default: () => [\n 'releaseDate',\n 'language',\n 'availability',\n 'status',\n 'rights',\n 'mediaType',\n 'byteSize',\n 'checksum',\n 'pages',\n 'type',\n 'compressFormat',\n 'packageFormat',\n 'hasPolicy',\n 'conformsTo',\n 'spatialResolutionInMeters',\n 'temporalResolution',\n ],\n },\n showDatasetDescription: {\n type: Boolean,\n default: () => true,\n },\n showDatasetProperties: {\n type: Boolean,\n default: () => true,\n },\n showPublisher: {\n type: Boolean,\n default: () => false,\n },\n embed: {\n type: Boolean,\n default: () => false,\n },\n },\n data() {\n return {\n defaultLocale: this.$env.languages.locale,\n // has to be INITIAL_DATASET_DESCRIPTION_LENGTH\n isDatasetDescriptionExpanded: false,\n loadingDatasetDetails: false,\n machineTranslated: false,\n translationNotAvailable: false,\n expandedDistributions: [],\n expandedDistributionDescriptions: [],\n distributions: {\n displayAll: this.$env.content.datasetDetails.distributions.displayAll,\n displayCount: this.$env.content.datasetDetails.distributions.displayCount,\n incrementSteps: this.$env.content.datasetDetails.distributions.incrementSteps,\n descriptionMaxLines: this.$env.content.datasetDetails.distributions.descriptionMaxLines,\n descriptionMaxChars: this.$env.content.datasetDetails.distributions.descriptionMaxChars,\n },\n pages: {\n isVisible: this.$env.content.datasetDetails.pages.isVisible,\n displayAll: this.$env.content.datasetDetails.pages.displayAll,\n displayCount: this.$env.content.datasetDetails.pages.displayCount,\n incrementSteps: this.$env.content.datasetDetails.pages.incrementSteps,\n descriptionMaxLines: this.$env.content.datasetDetails.pages.descriptionMaxLines,\n descriptionMaxChars: this.$env.content.datasetDetails.pages.descriptionMaxChars,\n },\n showDescription: true,\n };\n },\n computed: {\n // import store-getters\n ...mapGetters('datasetDetails', [\n 'getKeywords',\n 'getAccessRights',\n 'getAccrualPeriodicity',\n 'getCatalog',\n 'getContactPoints',\n 'getDateIncorrect',\n 'getDescription',\n 'getDistributions',\n 'getID',\n 'getLanguages',\n 'getLicences',\n 'getModificationDate',\n 'getOtherIdentifiers',\n 'getPages',\n 'getPublisher',\n 'getReleaseDate',\n 'getSpatial',\n 'getTranslationMetaData',\n 'getTitle'\n ]),\n dateIncorrect() {\n return this.getDateIncorrect;\n },\n displayedDistributions() {\n const sorted = [...this.getDistributions].sort((a, b) => {\n if (getTranslationFor(a.title, this.$route.query.locale, this.getLanguages) < getTranslationFor(b.title, this.$route.query.locale, this.getLanguages)) { return -1; }\n if (getTranslationFor(a.title, this.$route.query.locale, this.getLanguages) > getTranslationFor(b.title, this.$route.query.locale, this.getLanguages)) { return 1; }\n return 0;\n });\n return this.distributions.displayAll\n ? Object.freeze(sorted)\n : Object.freeze(sorted.slice(0, this.distributions.displayCount));\n },\n isDistributionsAllDisplayed() {\n return this.distributions.displayCount === this.getDistributions.length;\n },\n remainingDistributions() {\n return this.getDistributions.length - this.distributions.displayCount;\n }\n },\n methods: {\n ...mapActions('datasetDetails', [\n 'loadDatasetDetails',\n 'setLoading',\n ]),\n has,\n isNil,\n isArray,\n isObject,\n isString,\n isNumber,\n appendCurrentLocaleToURL,\n getTranslationFor,\n getCountryFlagImg,\n truncate,\n replaceHttp,\n initDatasetDetails() {\n this.piwikMetaPush();\n setTimeout(() => {\n if (typeof this.$piwik?.resume === \"function\") this.$piwik.resume();\n }, 500);\n this.$nextTick(() => {\n // Display/hide translation banners\n this.setTranslationBanners();\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n });\n },\n setDistributionsDisplayCount(count: number) {\n this.distributions.displayCount = count;\n },\n openModal(callback, toggleDownloadPopup) {\n this.$refs.externalResourceModal.openModal(callback, toggleDownloadPopup)\n },\n previewLinkCallback(distribution) {\n return () => {\n this.$emit('track-link', this.getVisualisationLink(distribution), 'link');\n window.open(this.getVisualisationLink(distribution), '_blank');\n };\n },\n filterDateFormatEU(date) {\n return dateFilters.formatEU(date);\n },\n /* ABSTRACT SHOW FUNCTIONS */\n showString(string) {\n return !isNil(string) && isString(string);\n },\n showNumber(number) {\n return !isNil(number) && isNumber(number);\n },\n showObject(object) {\n return !isNil(object) && isObject(object) && !Object.values(object).reduce((keyUndefined, currentValue) => keyUndefined && currentValue === undefined, true);\n },\n showArray(array) {\n return !isNil(array) && isArray(array) && array.length > 0;\n },\n showObjectArray(objectArray) {\n return this.showArray(objectArray) && !objectArray.reduce((objectUndefined, currentObject) => objectUndefined && Object.values(currentObject).reduce((keyUndefined, currentValue) => keyUndefined && currentValue === undefined, true), true);\n },\n /* SPECIFIC SHOW FUNCTIONS */\n /* for now show all licences */\n showLicence(licence) {\n // return (has(licence, 'id') && !isNil(licence.id))\n // || (has(licence, 'label') && !isNil(licence.label))\n return true\n },\n showLicensingAssistant(distribution) {\n return has(distribution, 'licence.la_url') && this.showString(distribution.licence.la_url);\n },\n showDownloadDropdown(distribution) {\n return this.showAccessUrls(distribution) || this.showDownloadUrls(distribution);\n },\n isOnlyOneUrl(distribution) {\n return (this.showAccessUrls(distribution) && !this.showDownloadUrls(distribution))\n || (!this.showAccessUrls(distribution) && this.showDownloadUrls(distribution) && distribution.downloadUrls.length === 1);\n },\n getDownloadUrl(distribution) {\n let url;\n if (this.showAccessUrls(distribution) && !this.showDownloadUrls(distribution)) {\n url = distribution.accessUrl[0];\n }\n if (!this.showAccessUrls(distribution) && this.showDownloadUrls(distribution) && distribution.downloadUrls.length === 1) {\n url = distribution.downloadUrls[0];\n }\n return url;\n },\n showAccessUrls(distribution) {\n return has(distribution, 'accessUrl') && this.showArray(distribution.accessUrl);\n },\n showDownloadUrls(distribution) {\n return has(distribution, 'downloadUrls') && this.showArray(distribution.downloadUrls);\n },\n showKeyword(keyword) {\n return has(keyword, 'id')\n && has(keyword, 'title')\n && !isNil(keyword.id)\n && !isNil(keyword.title);\n },\n\n /* GETTER / SETTER FUNCTIONS */\n\n setDatasetOriginalLanguage(originalLanguage) {\n this.$i18n.locale = originalLanguage;\n },\n distributionIsExpanded(id) {\n setTimeout(() => {\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n }, 500);\n return this.expandedDistributions.includes(id);\n },\n distributionDescriptionIsExpanded(id) {\n return this.expandedDistributionDescriptions.includes(id);\n },\n distributionDescriptionIsExpandable(description) {\n return isNil(description) ? false : description.length > this.distributions.descriptionMaxChars;\n },\n getDistributionFormat(distribution) {\n return has(distribution, 'format.label') && !isNil(distribution.format.label) ? distribution.format.label : '';\n },\n distributionFormatTruncated(distribution) {\n return this.getDistributionFormat(distribution).length > 4;\n },\n getDistributionTitle(distribution) {\n return distribution.title\n ? getTranslationFor(distribution.title, this.$route.query.locale, this.getLanguages)\n : this.getID || '-';\n },\n getVisualisationLink(distribution) {\n // Return Visualisation Link\n const accessUrl = distribution.downloadUrls && distribution.downloadUrls.length ? distribution.downloadUrls[0] : distribution.accessUrl[0];\n return `/data/visualisation/?file=${encodeURIComponent(accessUrl)}`;\n },\n // getSubjectLink(subject) {\n // return { path: `/datasets?subject=${subject.id}`, query: Object.assign({}, { locale: this.$route.query.locale }) };\n // },\n toggleDistribution(id) {\n const index = this.expandedDistributions.indexOf(id);\n if (index > -1) this.expandedDistributions.splice(index, 1);\n else this.expandedDistributions.push(id);\n },\n toggleDistributionDescription(id) {\n const index = this.expandedDistributionDescriptions.indexOf(id);\n if (index > -1) this.expandedDistributionDescriptions.splice(index, 1);\n else this.expandedDistributionDescriptions.push(id);\n },\n setTranslationBanners() {\n if (!this.$i18n) return;\n const translationMetaData = this.getTranslationMetaData;\n // Check if translation of dataset is available in selected language\n if (!isNil(translationMetaData.details) && has(translationMetaData.details, this.$route.query.locale)) {\n // Check if dataset if machine translated\n this.machineTranslated = translationMetaData.details[this.$route.query.locale].machine_translated;\n } else {\n // No translation of this dataset available for the selected language\n this.translationNotAvailable = true;\n }\n },\n // Emit a Matomo event when user clicks on 'go to resource' element\n trackGoto() {\n const paq = window._paq || []; // eslint-disable-line\n // paq.push(['trackEvent', 'GoToResource', 'Clicked']);\n this.$piwik.trackGotoResource();\n },\n clamp(n, min, max) {\n return Math.min(Math.max(n, min), max);\n },\n // Increases the current number of distributions displayed\n // and clamps the result so that it never exceeds the number of all distributions.\n increaseNumDisplayedDistributions(increment) {\n const clampedSum = this.clamp(this.distributions.displayCount + increment, 0, this.getDistributions.length);\n this.distributions.displayCount = clampedSum;\n },\n nonOverflowingIncrementsForDistributions(incrementStep) {\n return this.distributions.displayCount + incrementStep <= this.getDistributions.length;\n },\n // Increases the current number of distributions displayed\n // and clamps the result so that it never exceeds the number of all distributions.\n increaseNumDisplayedPages(increment) {\n const clampedSum = this.clamp(this.pages.displayCount + increment, 0, this.getPages.length);\n this.pages.displayCount = clampedSum;\n },\n nonOverflowingIncrementsForPages(incrementStep) {\n return this.pages.displayCount + incrementStep <= this.getPages.length;\n },\n piwikMetaPush() {\n this.$piwik.trackDatasetDetailsPageView(null, null, {\n dataset_AccessRights: this.getAccessRights,\n dataset_AccrualPeriodicity: this.getAccrualPeriodicity,\n dataset_Catalog: this.getCatalog,\n // dataset_Categories: this.getCategories,\n // dataset_ConformsTo: this.getConformsTo,\n // dataset_ContactPoints: this.getContactPoints,\n // dataset_Country: this.getCountry,\n // dataset_Creator: this.getCreator,\n // dataset_Description: this.getDescription,\n // dataset_Distributions: this.getDistributions,\n // dataset_DistributionFormats: this.getDistributionFormats,\n // dataset_Documentations: this.getDocumentations,\n // dataset_Frequency: this.getFrequency,\n // dataset_HasVersion: this.getHasVersion,\n dataset_ID: this.getID,\n // dataset_Identifiers: this.getIdentifiers,\n // dataset_IdName: this.getIdName,\n // dataset_IsVersionOf: this.getIsVersionOf,\n // datest_Keywords: this.getKeywords,\n // dataset_LandingPages: this.getLandingPagesResource,\n // dataset_Languages: this.getLanguages,\n // dataset_Licences: this.getLicences,\n // dataset_Loading: this.getLoading,\n // dataset_ModificationDate: this.getModificationDate,\n // dataset_OriginalLanguage: this.getOriginalLanguage,\n // dataset_OtherIdentifiers: this.getOtherIdentifiers,\n // dataset_Pages: this.getPages,\n // dataset_Provenances: this.getProvenances,\n dataset_Publisher: this.getPublisher,\n // dataset_RelatedResources: this.getRelatedResources,\n // dataset_ReleaseDate: this.getReleaseDate,\n // dataset_Sources: this.getSources,\n // dataset_Spatial: this.getSpatial,\n // dataset_SpatialResource: this.getSpatialResource,\n // dataset_Temporal: this.getTemporal,\n dataset_Title: this.getTitle,\n // dataset_TranslationMetaData: this.getTranslationMetaData,\n // dataset_VersionInfo: this.getVersionInfo,\n // dataset_VersionNotes: this.getVersionNotes,\n });\n },\n isUrlInvalid(url) {\n if (url) {\n try {\n /* eslint-disable no-useless-escape */\n return !(new RegExp(\"^((https?:\\/\\/(www\\.)?)([-a-zA-Z0-9@:%._\\+~#=]{1,256})([-a-zA-Z0-9()@:%_\\+.~#?&//=]*))$\", \"i\")).test(decodeURIComponent(url.split(\"=\").pop()));\n /* eslint-enable no-useless-escape */\n } catch (e) {\n console.error(e);\n }\n }\n },\n openIfValidUrl(isValid, previewLinkCallback, distribution, event) {\n if (isValid) {\n // for (let key in this.$children) {\n // if(this.$children[key].$refs[\"externalResourceModal\"]) {\n // this.$children[key].$refs[\"externalResourceModal\"].openModal(previewLinkCallback(distribution), false);\n // }\n // }\n this.openModal(previewLinkCallback(distribution), false);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n showTooltipVisualiseButton(invalidUrl) {\n if (invalidUrl) {\n return this.$t('message.tooltip.invalidVisualise');\n }\n return ''\n },\n },\n mounted() {\n // Duplicated API call, execute only if data not already loaded\n if (this.$route.params.ds_id !== this.getID) {\n this.$Progress.start();\n this.loadingDatasetDetails = true;\n this.loadDatasetDetails(this.$route.params.ds_id)\n .then(() => {\n this.$Progress.finish();\n this.loadingDatasetDetails = false;\n this.initDatasetDetails();\n })\n .catch((err) => {\n console.warn(err); // eslint-disable-line\n this.$Progress.fail();\n if (typeof this.$piwik?.resume === \"function\") this.$piwik.resume();\n this.$router.replace({\n name: 'NotFound',\n query: { locale: this.$route.query.locale, dataset: this.$route.params.ds_id },\n });\n })\n .finally(() => this.$root.$emit('contentLoaded'));\n } else {\n this.initDatasetDetails();\n this.$root.$emit('contentLoaded')\n }\n\n const distributionsConf = this.$env.content.datasetDetails && this.$env.content.datasetDetails.distributions;\n if (distributionsConf) {\n this.distributions.displayAll = distributionsConf.displayAll || this.distributions.displayAll;\n this.distributions.displayCount = parseInt(distributionsConf.displayCount, 10) || this.distributions.displayCount;\n\n if (typeof distributionsConf.incrementSteps === 'string') {\n // Need to parse as json array since env variables are string only\n distributionsConf.incrementSteps = JSON.parse(distributionsConf.incrementSteps);\n }\n this.distributions.incrementSteps = distributionsConf.incrementSteps || this.distributions.incrementSteps;\n }\n\n if (this.distributions.displayAll) this.distributions.displayCount = this.getDistributions.length;\n\n const pagesConf = this.$env.content.datasetDetails && this.$env.content.datasetDetails.pages;\n if (pagesConf) {\n this.pages.displayAll = pagesConf.displayAll || this.pages.displayAll;\n this.pages.displayCount = parseInt(pagesConf.displayCount, 10) || this.pages.displayCount;\n\n if (typeof pagesConf.incrementSteps === 'string') {\n // Need to parse as json array since env variables are string only\n pagesConf.incrementSteps = JSON.parse(pagesConf.incrementSteps);\n }\n this.pages.incrementSteps = pagesConf.incrementSteps || this.pages.incrementSteps;\n }\n\n if (this.pages.displayAll) this.pages.displayCount = this.getPages.length;\n },\n beforeUnmount() {\n $('.tooltip').remove();\n },\n setup() {\n metaInfo.useDatasetDetailsDatasetHead();\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n\n .catalogue-label {\n white-space: pre-line;\n }\n\n .cursor-pointer {\n cursor: pointer;\n }\n\n .tag-color {\n background-color: var(--tag-color);\n }\n\n .btn-color {\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n\n .heading, .arrow, .copy-text {\n cursor: pointer;\n }\n\n .details-link {\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n .text-break {\n word-break: break-word;\n }\n\n td {\n padding-left: 0 !important;\n padding-top: 1% !important;\n padding-bottom: 1% !important;\n }\n\n .download-all-btn {\n min-width: 100px;\n height: 31px;\n }\n\n .d-inline-table {\n display: inline-table;\n }\n\n /*** BOOTSTRAP ***/\n button:focus {\n outline:0;\n }\n .options, .download {\n .dropdown-menu {\n .dropdown-item {\n &:hover {\n color: initial;\n background-color: initial;\n }\n }\n }\n }\n.spinner-grow {\n width: 20px;\n height: 20px;\n}\n\n /*** FONT AWESOME ICONS ***/\n .fa-check-square {\n color: #28a745;\n width: 16px;\n height: 16px;\n }\n\n /*** MATERIAL ICONS ***/\n %modal-icon {\n font-size: 18px;\n cursor: default;\n }\n\n .help-icon {\n @extend %modal-icon;\n }\n\n .check-icon {\n @extend %modal-icon;\n color: #28a745;\n }\n\n .material-icons.small-icon {\n font-size: 20px;\n }\n\n .distributions {\n\n &__item {\n position: relative;\n\n &--preview {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, white 55%);\n z-index: 10;\n }\n }\n\n &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n }\n .mt-4 {\n margin-top: 1.5rem !important;\n }\n\n .keywords {\n\n &__item {\n position: relative;\n }\n\n &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n }\n .sectionList {\n list-style-type: '→ ';\n margin-left:6.5%;\n }\n @media only screen and (max-width: 991px) {\n .sectionList {\n margin-left: 0;\n }\n}\n</style>\n"],"names":["_hoisted_1","_hoisted_3","_hoisted_4","_component_dataset_details_properties","_resolveComponent","_openBlock","_createElementBlock","_createVNode","_component_resource_access_popup","_cache","_createTextVNode","getReleaseDate","_ctx","getModificationDate","_hoisted_2","$data","_component_dataset_details_skeleton","_createCommentVNode","$props","_createBlock","_component_dataset_details_description","$options","_component_distributions","getDistributions","getKeywords","_component_dataset_details_features","_withCtx","_renderSlot"],"mappings":";;;;AAAA,MAAAA,IAAA,CAAA,SAAA,oBAAAC,IAAA,EAAA,KAAA,KAQuCC,IAAM;AAAA,EAAA,KAAA;AAAA;;;4KAwErCC,IAAAC,EAAA,4BAAA;AAhFR,SAAAC,EAAA,GAAAC,EAAA,OAAA,MAAA;AAAA,IAGIC,EAA4DC,GAAA,EAAA,KAAA,wBAAA,GAAA,MAAA,GAAA;AAAA,IAAAC,EAAtD,OAASA,EAAW,CAAA,IAAAC,EAAA;AAAA,IAAWC,EAAAA,QAAAA;AAAAA,MAHzC,UAAA;AAAA,MAAA,SAAAC,EAAA;AAAA,OAIuE,MAAA,GAAAZ,CAAA;AAAA,IAAAS,EAA7D,OAASA,EAAa,CAAA,IAAAC,EAAA;AAAA,IAAWG,EAAAA,QAAAA;AAAAA,MAJ3C,UAAA;AAAA,MAAA,SAAAD,EAAA;AAAA,IAKe,GAAA,MAAA,GAAAE,CAAA;AAAA,IAAAL,EAAA,CAAA,MAAAA,EAAX,CAEM,IAAAC,EAAA;AAAA,IADJK,EAAA,yBAAAV,EAAA,GAAAC,EAAA,OAAAL,GAAA;AAAA,MANNM,EAAAS,GAAA,EAAA,MAAA,iBAAA,CAAA;AAAA,IAAA,CAAA,KAQgBC,EAAqB,IAAA,EA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AAAuB,EAAA,MAAA;AAAA,UACpDC,EAAAf,EAAA,QAAqB,mBAA2C,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA;UAChEe,EAAAf,EAAc,QAAC,yBAAmC,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA;UAClDe,EAAAf,EAAA,QAAoB,kBAA0C,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA;UA7EjFe,EAAAf,EAAA,QAAA,wBAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA,QAAA,GAAA;AAAA,MAAA,CAAA,KAAAK,EAAA,IAAA,EAAA;AAAA,IAAA,CAAA;AAAA;;;"}
1
+ {"version":3,"file":"DatasetDetailsDataset.vue.mjs","sources":["../../lib/datasetDetails/DatasetDetailsDataset.vue"],"sourcesContent":["<template>\n <div>\n <resource-access-popup ref=\"externalResourceModal\" />\n <span property=\"dc:issued\" :content=\"getReleaseDate\"></span>\n <span property=\"dc:modified\" :content=\"getModificationDate\"></span>\n <div v-if=\"loadingDatasetDetails\">\n <dataset-details-skeleton type=\"DatasetDetails\"></dataset-details-skeleton>\n </div>\n <div v-if=\"!loadingDatasetDetails\" class=\"dsd-dataset\">\n <dataset-details-description\n v-if=\"showDatasetDescription\"\n :dateIncorrect=\"dateIncorrect\"\n :machineTranslated=\"machineTranslated\"\n :translationNotAvailable=\"translationNotAvailable\"\n />\n <distributions\n :openModal=\"openModal\"\n :getDistributions=\"getDistributions\"\n :expandedDistributions=\"expandedDistributions\"\n :expandedDistributionDescriptions=\"expandedDistributionDescriptions\"\n :displayedDistributions=\"displayedDistributions\"\n :isDistributionsAllDisplayed=\"isDistributionsAllDisplayed\"\n :distributions=\"distributions\"\n :setDistributionsDisplayCount=\"setDistributionsDisplayCount\"\n :pages=\"pages\"\n :showDownloadUrls=\"showDownloadUrls\"\n :isOnlyOneUrl=\"isOnlyOneUrl\"\n :getDistributionFormat=\"getDistributionFormat\"\n :distributionFormatTruncated=\"distributionFormatTruncated\"\n :getDistributionTitle=\"getDistributionTitle\"\n :distributionVisibleContent=\"distributionVisibleContent\"\n :distributionExpandedContent=\"distributionExpandedContent\"\n :distributionDescriptionIsExpanded=\"distributionDescriptionIsExpanded\"\n :distributionDescriptionIsExpandable=\"distributionDescriptionIsExpandable\"\n :distributionIsExpanded=\"distributionIsExpanded\"\n :showNumber=\"showNumber\"\n :showObject=\"showObject\"\n :showDownloadDropdown=\"showDownloadDropdown\"\n :showLicence=\"showLicence\"\n :showLicensingAssistant=\"showLicensingAssistant\"\n :filterDateFormatEU=\"filterDateFormatEU\"\n :showArray=\"showArray\"\n :showObjectArray=\"showObjectArray\"\n :getVisualisationLink=\"getVisualisationLink\"\n :getDownloadUrl=\"getDownloadUrl\"\n :trackGoto=\"trackGoto\"\n :showAccessUrls=\"showAccessUrls\"\n :replaceHttp=\"replaceHttp\"\n :previewLinkCallback=\"previewLinkCallback\"\n :toggleDistribution=\"toggleDistribution\"\n :toggleDistributionDescription=\"toggleDistributionDescription\"\n :increaseNumDisplayedDistributions=\"increaseNumDisplayedDistributions\"\n :nonOverflowingIncrementsForDistributions=\"nonOverflowingIncrementsForDistributions\"\n :appendCurrentLocaleToURL=\"appendCurrentLocaleToURL\"\n :isUrlInvalid=\"isUrlInvalid\"\n :openIfValidUrl=\"openIfValidUrl\"\n :showTooltipVisualiseButton=\"showTooltipVisualiseButton\"\n :showPublisher=\"showPublisher\"\n :embed=\"embed\"\n />\n <dataset-details-features\n :getKeywords=\"getKeywords\"\n :pages=\"pages\"\n :increaseNumDisplayedPages=\"increaseNumDisplayedPages\"\n :nonOverflowingIncrementsForPages=\"nonOverflowingIncrementsForPages\"\n :showKeyword=\"showKeyword\"\n :trackGoto=\"trackGoto\"\n :showObjectArray=\"showObjectArray\"\n :showArray=\"showArray\"\n :showObject=\"showObject\"\n />\n <dataset-details-properties v-if=\"showDatasetProperties\">\n <template #property-header><slot name=\"property-header\"></slot></template>\n <template #property-table-before><slot name=\"property-table-before\"></slot></template>\n <template #property-table><slot name=\"property-table\"></slot></template>\n <template #property-table-after><slot name=\"property-table-after\"></slot></template>\n </dataset-details-properties>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n // @ts-nocheck\n /* eslint-disable no-confusing-arrow, no-nested-ternary, no-return-assign, no-confusing-arrow */\n import $ from 'jquery';\n import { mapActions, mapGetters } from 'vuex';\n import {\n has,\n isNil,\n isArray,\n isObject,\n isString,\n isNumber,\n isEmpty,\n } from 'lodash';\n import AppLink from '../widgets/AppLink.vue';\n import Tooltip from '../widgets/Tooltip.vue';\n import Distributions from './distributions/Distributions.vue';\n import dateFilters from '../filters/dateFilters';\n import {\n getTranslationFor, getCountryFlagImg, truncate, replaceHttp, appendCurrentLocaleToURL\n } from '../utils/helpers';\n import ResourceAccessPopup from '../widgets/ResourceAccessPopup.vue';\n import DatasetDetailsExtendedMetaData\n from \"../datasetDetails/features/DatasetDetailsIsUsedBy.vue\";\n import DatasetDetailsSkeleton from \"../datasetDetails/DatasetDetailsSkeleton.vue\";\n import * as metaInfo from '../composables/head';\n\n export default {\n name: 'datasetDetailsDataset',\n components: {\n DatasetDetailsSkeleton,\n DatasetDetailsExtendedMetaData,\n AppLink,\n Tooltip,\n Distributions,\n ResourceAccessPopup\n },\n props: {\n distributionVisibleContent: {\n type: Array,\n default: () => ['license', 'licenseAttributionByText', 'modificationDate'],\n },\n distributionExpandedContent: {\n type: Array,\n default: () => [\n 'releaseDate',\n 'language',\n 'availability',\n 'status',\n 'rights',\n 'mediaType',\n 'byteSize',\n 'checksum',\n 'pages',\n 'type',\n 'compressFormat',\n 'packageFormat',\n 'hasPolicy',\n 'conformsTo',\n 'spatialResolutionInMeters',\n 'temporalResolution',\n ],\n },\n showDatasetDescription: {\n type: Boolean,\n default: () => true,\n },\n showDatasetProperties: {\n type: Boolean,\n default: () => true,\n },\n showPublisher: {\n type: Boolean,\n default: () => false,\n },\n embed: {\n type: Boolean,\n default: () => false,\n },\n },\n data() {\n return {\n defaultLocale: this.$env.languages.locale,\n // has to be INITIAL_DATASET_DESCRIPTION_LENGTH\n isDatasetDescriptionExpanded: false,\n loadingDatasetDetails: false,\n machineTranslated: false,\n translationNotAvailable: false,\n expandedDistributions: [],\n expandedDistributionDescriptions: [],\n distributions: {\n displayAll: this.$env.content.datasetDetails.distributions.displayAll,\n displayCount: this.$env.content.datasetDetails.distributions.displayCount,\n incrementSteps: this.$env.content.datasetDetails.distributions.incrementSteps,\n descriptionMaxLines: this.$env.content.datasetDetails.distributions.descriptionMaxLines,\n descriptionMaxChars: this.$env.content.datasetDetails.distributions.descriptionMaxChars,\n },\n pages: {\n isVisible: this.$env.content.datasetDetails.pages.isVisible,\n displayAll: this.$env.content.datasetDetails.pages.displayAll,\n displayCount: this.$env.content.datasetDetails.pages.displayCount,\n incrementSteps: this.$env.content.datasetDetails.pages.incrementSteps,\n descriptionMaxLines: this.$env.content.datasetDetails.pages.descriptionMaxLines,\n descriptionMaxChars: this.$env.content.datasetDetails.pages.descriptionMaxChars,\n },\n showDescription: true,\n };\n },\n computed: {\n // import store-getters\n ...mapGetters('datasetDetails', [\n 'getKeywords',\n 'getAccessRights',\n 'getAccrualPeriodicity',\n 'getCatalog',\n 'getContactPoints',\n 'getDateIncorrect',\n 'getDescription',\n 'getDistributions',\n 'getID',\n 'getLanguages',\n 'getLicences',\n 'getModificationDate',\n 'getOtherIdentifiers',\n 'getPages',\n 'getPublisher',\n 'getReleaseDate',\n 'getSpatial',\n 'getTranslationMetaData',\n 'getTitle'\n ]),\n dateIncorrect() {\n return this.getDateIncorrect;\n },\n displayedDistributions() {\n const sorted = [...this.getDistributions].sort((a, b) => {\n if (getTranslationFor(a.title, this.$route.query.locale, this.getLanguages) < getTranslationFor(b.title, this.$route.query.locale, this.getLanguages)) { return -1; }\n if (getTranslationFor(a.title, this.$route.query.locale, this.getLanguages) > getTranslationFor(b.title, this.$route.query.locale, this.getLanguages)) { return 1; }\n return 0;\n });\n return this.distributions.displayAll\n ? Object.freeze(sorted)\n : Object.freeze(sorted.slice(0, this.distributions.displayCount));\n },\n isDistributionsAllDisplayed() {\n return this.distributions.displayCount === this.getDistributions.length;\n },\n remainingDistributions() {\n return this.getDistributions.length - this.distributions.displayCount;\n }\n },\n methods: {\n ...mapActions('datasetDetails', [\n 'loadDatasetDetails',\n 'setLoading',\n ]),\n has,\n isNil,\n isArray,\n isObject,\n isString,\n isNumber,\n appendCurrentLocaleToURL,\n getTranslationFor,\n getCountryFlagImg,\n truncate,\n replaceHttp,\n initDatasetDetails() {\n this.piwikMetaPush();\n setTimeout(() => {\n if (typeof this.$piwik?.resume === \"function\") this.$piwik.resume();\n }, 500);\n this.$nextTick(() => {\n // Display/hide translation banners\n this.setTranslationBanners();\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n });\n },\n setDistributionsDisplayCount(count: number) {\n this.distributions.displayCount = count;\n },\n openModal(callback, toggleDownloadPopup) {\n this.$refs.externalResourceModal.openModal(callback, toggleDownloadPopup)\n },\n previewLinkCallback(distribution) {\n return () => {\n this.$emit('track-link', this.getVisualisationLink(distribution), 'link');\n window.open(this.getVisualisationLink(distribution), '_blank');\n };\n },\n filterDateFormatEU(date) {\n return dateFilters.formatEU(date);\n },\n /* ABSTRACT SHOW FUNCTIONS */\n showString(string) {\n return !isNil(string) && isString(string);\n },\n showNumber(number) {\n return !isNil(number) && isNumber(number);\n },\n showObject(object) {\n return !isNil(object) && isObject(object) && !Object.values(object).reduce((keyUndefined, currentValue) => keyUndefined && currentValue === undefined, true);\n },\n showArray(array) {\n return !isNil(array) && isArray(array) && array.length > 0;\n },\n showObjectArray(objectArray) {\n return this.showArray(objectArray) && !objectArray.reduce((objectUndefined, currentObject) => objectUndefined && Object.values(currentObject).reduce((keyUndefined, currentValue) => keyUndefined && currentValue === undefined, true), true);\n },\n /* SPECIFIC SHOW FUNCTIONS */\n /* for now show all licences */\n showLicence(licence) {\n // return (has(licence, 'id') && !isNil(licence.id))\n // || (has(licence, 'label') && !isNil(licence.label))\n return true\n },\n showLicensingAssistant(distribution) {\n return has(distribution, 'licence.la_url') && this.showString(distribution.licence.la_url);\n },\n showDownloadDropdown(distribution) {\n return this.showAccessUrls(distribution) || this.showDownloadUrls(distribution);\n },\n isOnlyOneUrl(distribution) {\n return (this.showAccessUrls(distribution) && !this.showDownloadUrls(distribution))\n || (!this.showAccessUrls(distribution) && this.showDownloadUrls(distribution) && distribution.downloadUrls.length === 1);\n },\n getDownloadUrl(distribution) {\n let url;\n if (this.showAccessUrls(distribution) && !this.showDownloadUrls(distribution)) {\n url = distribution.accessUrl[0];\n }\n if (!this.showAccessUrls(distribution) && this.showDownloadUrls(distribution) && distribution.downloadUrls.length === 1) {\n url = distribution.downloadUrls[0];\n }\n return url;\n },\n showAccessUrls(distribution) {\n return has(distribution, 'accessUrl') && this.showArray(distribution.accessUrl);\n },\n showDownloadUrls(distribution) {\n return has(distribution, 'downloadUrls') && this.showArray(distribution.downloadUrls);\n },\n showKeyword(keyword) {\n return has(keyword, 'id')\n && has(keyword, 'title')\n && !isNil(keyword.id)\n && !isNil(keyword.title);\n },\n\n /* GETTER / SETTER FUNCTIONS */\n\n setDatasetOriginalLanguage(originalLanguage) {\n this.$i18n.locale = originalLanguage;\n },\n distributionIsExpanded(id) {\n setTimeout(() => {\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n }, 500);\n return this.expandedDistributions.includes(id);\n },\n distributionDescriptionIsExpanded(id) {\n return this.expandedDistributionDescriptions.includes(id);\n },\n distributionDescriptionIsExpandable(description) {\n return isNil(description) ? false : description.length > this.distributions.descriptionMaxChars;\n },\n getDistributionFormat(distribution) {\n return has(distribution, 'format.label') && !isNil(distribution.format.label) ? distribution.format.label : '';\n },\n distributionFormatTruncated(distribution) {\n return this.getDistributionFormat(distribution).length > 4;\n },\n getDistributionTitle(distribution) {\n return distribution.title\n ? getTranslationFor(distribution.title, this.$route.query.locale, this.getLanguages)\n : this.getID || '-';\n },\n getVisualisationLink(distribution) {\n // Return Visualisation Link\n const accessUrl = distribution.downloadUrls && distribution.downloadUrls.length ? distribution.downloadUrls[0] : distribution.accessUrl[0];\n return `/data/visualisation/?file=${encodeURIComponent(accessUrl)}`;\n },\n // getSubjectLink(subject) {\n // return { path: `/datasets?subject=${subject.id}`, query: Object.assign({}, { locale: this.$route.query.locale }) };\n // },\n toggleDistribution(id) {\n const index = this.expandedDistributions.indexOf(id);\n if (index > -1) this.expandedDistributions.splice(index, 1);\n else this.expandedDistributions.push(id);\n },\n toggleDistributionDescription(id) {\n const index = this.expandedDistributionDescriptions.indexOf(id);\n if (index > -1) this.expandedDistributionDescriptions.splice(index, 1);\n else this.expandedDistributionDescriptions.push(id);\n },\n setTranslationBanners() {\n if (!this.$i18n) return;\n const translationMetaData = this.getTranslationMetaData;\n // Check if translation of dataset is available in selected language\n if (!isNil(translationMetaData.details) && has(translationMetaData.details, this.$route.query.locale)) {\n // Check if dataset if machine translated\n this.machineTranslated = translationMetaData.details[this.$route.query.locale].machine_translated;\n } else {\n // No translation of this dataset available for the selected language\n this.translationNotAvailable = true;\n }\n },\n // Emit a Matomo event when user clicks on 'go to resource' element\n trackGoto() {\n const paq = window._paq || []; // eslint-disable-line\n // paq.push(['trackEvent', 'GoToResource', 'Clicked']);\n this.$piwik.trackGotoResource();\n },\n clamp(n, min, max) {\n return Math.min(Math.max(n, min), max);\n },\n // Increases the current number of distributions displayed\n // and clamps the result so that it never exceeds the number of all distributions.\n increaseNumDisplayedDistributions(increment) {\n const clampedSum = this.clamp(this.distributions.displayCount + increment, 0, this.getDistributions.length);\n this.distributions.displayCount = clampedSum;\n },\n nonOverflowingIncrementsForDistributions(incrementStep) {\n return this.distributions.displayCount + incrementStep <= this.getDistributions.length;\n },\n // Increases the current number of distributions displayed\n // and clamps the result so that it never exceeds the number of all distributions.\n increaseNumDisplayedPages(increment) {\n const clampedSum = this.clamp(this.pages.displayCount + increment, 0, this.getPages.length);\n this.pages.displayCount = clampedSum;\n },\n nonOverflowingIncrementsForPages(incrementStep) {\n return this.pages.displayCount + incrementStep <= this.getPages.length;\n },\n piwikMetaPush() {\n this.$piwik.trackDatasetDetailsPageView(null, null, {\n dataset_AccessRights: this.getAccessRights,\n dataset_AccrualPeriodicity: this.getAccrualPeriodicity,\n dataset_Catalog: this.getCatalog,\n // dataset_Categories: this.getCategories,\n // dataset_ConformsTo: this.getConformsTo,\n // dataset_ContactPoints: this.getContactPoints,\n // dataset_Country: this.getCountry,\n // dataset_Creator: this.getCreator,\n // dataset_Description: this.getDescription,\n // dataset_Distributions: this.getDistributions,\n // dataset_DistributionFormats: this.getDistributionFormats,\n // dataset_Documentations: this.getDocumentations,\n // dataset_Frequency: this.getFrequency,\n // dataset_HasVersion: this.getHasVersion,\n dataset_ID: this.getID,\n // dataset_Identifiers: this.getIdentifiers,\n // dataset_IdName: this.getIdName,\n // dataset_IsVersionOf: this.getIsVersionOf,\n // datest_Keywords: this.getKeywords,\n // dataset_LandingPages: this.getLandingPagesResource,\n // dataset_Languages: this.getLanguages,\n // dataset_Licences: this.getLicences,\n // dataset_Loading: this.getLoading,\n // dataset_ModificationDate: this.getModificationDate,\n // dataset_OriginalLanguage: this.getOriginalLanguage,\n // dataset_OtherIdentifiers: this.getOtherIdentifiers,\n // dataset_Pages: this.getPages,\n // dataset_Provenances: this.getProvenances,\n dataset_Publisher: this.getPublisher,\n // dataset_RelatedResources: this.getRelatedResources,\n // dataset_ReleaseDate: this.getReleaseDate,\n // dataset_Sources: this.getSources,\n // dataset_Spatial: this.getSpatial,\n // dataset_SpatialResource: this.getSpatialResource,\n // dataset_Temporal: this.getTemporal,\n dataset_Title: this.getTitle,\n // dataset_TranslationMetaData: this.getTranslationMetaData,\n // dataset_VersionInfo: this.getVersionInfo,\n // dataset_VersionNotes: this.getVersionNotes,\n });\n },\n isUrlInvalid(url) {\n if (url) {\n try {\n /* eslint-disable no-useless-escape */\n return !(new RegExp(\"^((https?:\\/\\/(www\\.)?)([-a-zA-Z0-9@:%._\\+~#=]{1,256})([-a-zA-Z0-9()@:%_\\+.~#?&//=]*))$\", \"i\")).test(decodeURIComponent(url.split(\"=\").pop()));\n /* eslint-enable no-useless-escape */\n } catch (e) {\n console.error(e);\n }\n }\n },\n openIfValidUrl(isValid, previewLinkCallback, distribution, event) {\n if (isValid) {\n // for (let key in this.$children) {\n // if(this.$children[key].$refs[\"externalResourceModal\"]) {\n // this.$children[key].$refs[\"externalResourceModal\"].openModal(previewLinkCallback(distribution), false);\n // }\n // }\n this.openModal(previewLinkCallback(distribution), false);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n showTooltipVisualiseButton(invalidUrl) {\n if (invalidUrl) {\n return this.$t('message.tooltip.invalidVisualise');\n }\n return ''\n },\n },\n mounted() {\n // Duplicated API call, execute only if data not already loaded\n if (this.$route.params.ds_id !== this.getID) {\n this.$Progress.start();\n this.loadingDatasetDetails = true;\n this.loadDatasetDetails(this.$route.params.ds_id)\n .then(() => {\n this.$Progress.finish();\n this.loadingDatasetDetails = false;\n this.initDatasetDetails();\n })\n .catch((err) => {\n console.warn(err); // eslint-disable-line\n this.$Progress.fail();\n if (typeof this.$piwik?.resume === \"function\") this.$piwik.resume();\n this.$router.replace({\n name: 'NotFound',\n query: { locale: this.$route.query.locale, dataset: this.$route.params.ds_id },\n });\n })\n .finally(() => this.$root.$emit('contentLoaded'));\n } else {\n this.initDatasetDetails();\n this.$root.$emit('contentLoaded')\n }\n\n const distributionsConf = this.$env.content.datasetDetails && this.$env.content.datasetDetails.distributions;\n if (distributionsConf) {\n this.distributions.displayAll = distributionsConf.displayAll || this.distributions.displayAll;\n this.distributions.displayCount = parseInt(distributionsConf.displayCount, 10) || this.distributions.displayCount;\n\n if (typeof distributionsConf.incrementSteps === 'string') {\n // Need to parse as json array since env variables are string only\n distributionsConf.incrementSteps = JSON.parse(distributionsConf.incrementSteps);\n }\n this.distributions.incrementSteps = distributionsConf.incrementSteps || this.distributions.incrementSteps;\n }\n\n if (this.distributions.displayAll) this.distributions.displayCount = this.getDistributions.length;\n\n const pagesConf = this.$env.content.datasetDetails && this.$env.content.datasetDetails.pages;\n if (pagesConf) {\n this.pages.displayAll = pagesConf.displayAll || this.pages.displayAll;\n this.pages.displayCount = parseInt(pagesConf.displayCount, 10) || this.pages.displayCount;\n\n if (typeof pagesConf.incrementSteps === 'string') {\n // Need to parse as json array since env variables are string only\n pagesConf.incrementSteps = JSON.parse(pagesConf.incrementSteps);\n }\n this.pages.incrementSteps = pagesConf.incrementSteps || this.pages.incrementSteps;\n }\n\n if (this.pages.displayAll) this.pages.displayCount = this.getPages.length;\n },\n beforeUnmount() {\n $('.tooltip').remove();\n },\n setup() {\n metaInfo.useDatasetDetailsDatasetHead();\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n\n .catalogue-label {\n white-space: pre-line;\n }\n\n .cursor-pointer {\n cursor: pointer;\n }\n\n .tag-color {\n background-color: var(--tag-color);\n }\n\n .btn-color {\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n\n .heading, .arrow, .copy-text {\n cursor: pointer;\n }\n\n .details-link {\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n .text-break {\n word-break: break-word;\n }\n\n td {\n padding-left: 0 !important;\n padding-top: 1% !important;\n padding-bottom: 1% !important;\n }\n\n .download-all-btn {\n min-width: 100px;\n height: 31px;\n }\n\n .d-inline-table {\n display: inline-table;\n }\n\n /*** BOOTSTRAP ***/\n button:focus {\n outline:0;\n }\n .options, .download {\n .dropdown-menu {\n .dropdown-item {\n &:hover {\n color: initial;\n background-color: initial;\n }\n }\n }\n }\n.spinner-grow {\n width: 20px;\n height: 20px;\n}\n\n /*** FONT AWESOME ICONS ***/\n .fa-check-square {\n color: #28a745;\n width: 16px;\n height: 16px;\n }\n\n /*** MATERIAL ICONS ***/\n %modal-icon {\n font-size: 18px;\n cursor: default;\n }\n\n .help-icon {\n @extend %modal-icon;\n }\n\n .check-icon {\n @extend %modal-icon;\n color: #28a745;\n }\n\n .material-icons.small-icon {\n font-size: 20px;\n }\n\n .distributions {\n\n &__item {\n position: relative;\n\n &--preview {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, white 55%);\n z-index: 10;\n }\n }\n\n &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n }\n .mt-4 {\n margin-top: 1.5rem !important;\n }\n\n .keywords {\n\n &__item {\n position: relative;\n }\n\n &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n }\n .sectionList {\n list-style-type: '→ ';\n margin-left:6.5%;\n }\n @media only screen and (max-width: 991px) {\n .sectionList {\n margin-left: 0;\n }\n}\n</style>\n"],"names":["_hoisted_1","_hoisted_3","_hoisted_4","_component_dataset_details_properties","_resolveComponent","_openBlock","_createElementBlock","_createVNode","_component_resource_access_popup","_cache","_createTextVNode","getReleaseDate","_ctx","getModificationDate","_hoisted_2","$data","_component_dataset_details_skeleton","_createCommentVNode","$props","_createBlock","_component_dataset_details_description","$options","_component_distributions","getDistributions","getKeywords","_component_dataset_details_features","_withCtx","_renderSlot"],"mappings":";;;;AAAA,MAAAA,IAAA,CAAA,SAAA,oBAAAC,IAAA,EAAA,KAAA,KAQuCC,IAAM;AAAA,EAAA,KAAA;AAAA;;;4KAsErCC,IAAAC,EAAA,4BAAA;AA9ER,SAAAC,EAAA,GAAAC,EAAA,OAAA,MAAA;AAAA,IAGIC,EAA4DC,GAAA,EAAA,KAAA,wBAAA,GAAA,MAAA,GAAA;AAAA,IAAAC,EAAtD,OAASA,EAAW,CAAA,IAAAC,EAAA;AAAA,IAAWC,EAAAA,QAAAA;AAAAA,MAHzC,UAAA;AAAA,MAAA,SAAAC,EAAA;AAAA,OAIuE,MAAA,GAAAZ,CAAA;AAAA,IAAAS,EAA7D,OAASA,EAAa,CAAA,IAAAC,EAAA;AAAA,IAAWG,E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AA,QACjB,WAAWA,EAAA;AAAA,QACX,iBAAYA,EAAA;AAAA,QAAA,WAAAA,EAAA;AAAA;SAEmB,MAAqB,GAAA,CAAA,eAAA,SAAA,6BAAA,oCAAA,eAAA,aAAA,mBAAA,aAAA,YAAA,CAAA;AAAA,MAAAZ,EAAA,CAAA,MAAAA,EAAvD,CAK6B,IAAAC,EAAA;AAAA,MAAAQ,EAJhB,8BAAoDC,EAAAhB,GAAA,EAAA,KAAA,KAAA;AAAA,QAAA,mBAAAuB,EAAA,MAAA;AAAA,UACpDC,EAAAf,EAAA,QAAqB,mBAA2C,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA;UAChEe,EAAAf,EAAc,QAAC,yBAAmC,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA;UAClDe,EAAAf,EAAA,QAAoB,kBAA0C,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA;UA3EjFe,EAAAf,EAAA,QAAA,wBAAA,CAAA,GAAA,QAAA,EAAA;AAAA,QAAA,CAAA;AAAA,QAAA,GAAA;AAAA,MAAA,CAAA,KAAAK,EAAA,IAAA,EAAA;AAAA,IAAA,CAAA;AAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DatasetDetailsDataset.vue2.mjs","sources":["../../lib/datasetDetails/DatasetDetailsDataset.vue"],"sourcesContent":["<template>\n <div>\n <resource-access-popup ref=\"externalResourceModal\" />\n <span property=\"dc:issued\" :content=\"getReleaseDate\"></span>\n <span property=\"dc:modified\" :content=\"getModificationDate\"></span>\n <div v-if=\"loadingDatasetDetails\">\n <dataset-details-skeleton type=\"DatasetDetails\"></dataset-details-skeleton>\n </div>\n <div v-if=\"!loadingDatasetDetails\" class=\"dsd-dataset\">\n <dataset-details-description\n v-if=\"showDatasetDescription\"\n :dateIncorrect=\"dateIncorrect\"\n :machineTranslated=\"machineTranslated\"\n :translationNotAvailable=\"translationNotAvailable\"\n />\n <distributions\n :openModal=\"openModal\"\n :getDistributions=\"getDistributions\"\n :expandedDistributions=\"expandedDistributions\"\n :expandedDistributionDescriptions=\"expandedDistributionDescriptions\"\n :displayedDistributions=\"displayedDistributions\"\n :isDistributionsAllDisplayed=\"isDistributionsAllDisplayed\"\n :distributions=\"distributions\"\n :setDistributionsDisplayCount=\"setDistributionsDisplayCount\"\n :pages=\"pages\"\n :showDownloadUrls=\"showDownloadUrls\"\n :isOnlyOneUrl=\"isOnlyOneUrl\"\n :getDistributionFormat=\"getDistributionFormat\"\n :distributionFormatTruncated=\"distributionFormatTruncated\"\n :getDistributionTitle=\"getDistributionTitle\"\n :distributionVisibleContent=\"distributionVisibleContent\"\n :distributionExpandedContent=\"distributionExpandedContent\"\n :distributionDescriptionIsExpanded=\"distributionDescriptionIsExpanded\"\n :distributionDescriptionIsExpandable=\"distributionDescriptionIsExpandable\"\n :distributionIsExpanded=\"distributionIsExpanded\"\n :showNumber=\"showNumber\"\n :showObject=\"showObject\"\n :showDownloadDropdown=\"showDownloadDropdown\"\n :showLicence=\"showLicence\"\n :showLicensingAssistant=\"showLicensingAssistant\"\n :filterDateFormatEU=\"filterDateFormatEU\"\n :showArray=\"showArray\"\n :showObjectArray=\"showObjectArray\"\n :getVisualisationLink=\"getVisualisationLink\"\n :getDownloadUrl=\"getDownloadUrl\"\n :trackGoto=\"trackGoto\"\n :showAccessUrls=\"showAccessUrls\"\n :replaceHttp=\"replaceHttp\"\n :previewLinkCallback=\"previewLinkCallback\"\n :toggleDistribution=\"toggleDistribution\"\n :toggleDistributionDescription=\"toggleDistributionDescription\"\n :increaseNumDisplayedDistributions=\"increaseNumDisplayedDistributions\"\n :nonOverflowingIncrementsForDistributions=\"nonOverflowingIncrementsForDistributions\"\n :appendCurrentLocaleToURL=\"appendCurrentLocaleToURL\"\n :isUrlInvalid=\"isUrlInvalid\"\n :openIfValidUrl=\"openIfValidUrl\"\n :showTooltipVisualiseButton=\"showTooltipVisualiseButton\"\n :showPublisher=\"showPublisher\"\n :embed=\"embed\"\n />\n\n <dataset-details-features\n :getKeywords=\"getKeywords\"\n :pages=\"pages\"\n :increaseNumDisplayedPages=\"increaseNumDisplayedPages\"\n :nonOverflowingIncrementsForPages=\"nonOverflowingIncrementsForPages\"\n :showKeyword=\"showKeyword\"\n :trackGoto=\"trackGoto\"\n :showObjectArray=\"showObjectArray\"\n :showArray=\"showArray\"\n :showObject=\"showObject\"\n />\n\n <dataset-details-properties v-if=\"showDatasetProperties\">\n <template #property-header><slot name=\"property-header\"></slot></template>\n <template #property-table-before><slot name=\"property-table-before\"></slot></template>\n <template #property-table><slot name=\"property-table\"></slot></template>\n <template #property-table-after><slot name=\"property-table-after\"></slot></template>\n </dataset-details-properties>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n // @ts-nocheck\n /* eslint-disable no-confusing-arrow, no-nested-ternary, no-return-assign, no-confusing-arrow */\n import $ from 'jquery';\n import { mapActions, mapGetters } from 'vuex';\n import {\n has,\n isNil,\n isArray,\n isObject,\n isString,\n isNumber,\n isEmpty,\n } from 'lodash';\n import AppLink from '../widgets/AppLink.vue';\n import Tooltip from '../widgets/Tooltip.vue';\n import Distributions from './distributions/Distributions.vue';\n import dateFilters from '../filters/dateFilters';\n import {\n getTranslationFor, getCountryFlagImg, truncate, replaceHttp, appendCurrentLocaleToURL\n } from '../utils/helpers';\n import ResourceAccessPopup from '../widgets/ResourceAccessPopup.vue';\n import DatasetDetailsExtendedMetaData\n from \"../datasetDetails/features/DatasetDetailsIsUsedBy.vue\";\n import DatasetDetailsSkeleton from \"../datasetDetails/DatasetDetailsSkeleton.vue\";\n import * as metaInfo from '../composables/head';\n\n export default {\n name: 'datasetDetailsDataset',\n components: {\n DatasetDetailsSkeleton,\n DatasetDetailsExtendedMetaData,\n AppLink,\n Tooltip,\n Distributions,\n ResourceAccessPopup\n },\n props: {\n distributionVisibleContent: {\n type: Array,\n default: () => ['license', 'licenseAttributionByText', 'modificationDate'],\n },\n distributionExpandedContent: {\n type: Array,\n default: () => [\n 'releaseDate',\n 'language',\n 'availability',\n 'status',\n 'rights',\n 'mediaType',\n 'byteSize',\n 'checksum',\n 'pages',\n 'type',\n 'compressFormat',\n 'packageFormat',\n 'hasPolicy',\n 'conformsTo',\n 'spatialResolutionInMeters',\n 'temporalResolution',\n ],\n },\n showDatasetDescription: {\n type: Boolean,\n default: () => true,\n },\n showDatasetProperties: {\n type: Boolean,\n default: () => true,\n },\n showPublisher: {\n type: Boolean,\n default: () => false,\n },\n embed: {\n type: Boolean,\n default: () => false,\n },\n },\n data() {\n return {\n defaultLocale: this.$env.languages.locale,\n // has to be INITIAL_DATASET_DESCRIPTION_LENGTH\n isDatasetDescriptionExpanded: false,\n loadingDatasetDetails: false,\n machineTranslated: false,\n translationNotAvailable: false,\n expandedDistributions: [],\n expandedDistributionDescriptions: [],\n distributions: {\n displayAll: this.$env.content.datasetDetails.distributions.displayAll,\n displayCount: this.$env.content.datasetDetails.distributions.displayCount,\n incrementSteps: this.$env.content.datasetDetails.distributions.incrementSteps,\n descriptionMaxLines: this.$env.content.datasetDetails.distributions.descriptionMaxLines,\n descriptionMaxChars: this.$env.content.datasetDetails.distributions.descriptionMaxChars,\n },\n pages: {\n isVisible: this.$env.content.datasetDetails.pages.isVisible,\n displayAll: this.$env.content.datasetDetails.pages.displayAll,\n displayCount: this.$env.content.datasetDetails.pages.displayCount,\n incrementSteps: this.$env.content.datasetDetails.pages.incrementSteps,\n descriptionMaxLines: this.$env.content.datasetDetails.pages.descriptionMaxLines,\n descriptionMaxChars: this.$env.content.datasetDetails.pages.descriptionMaxChars,\n },\n showDescription: true,\n };\n },\n computed: {\n // import store-getters\n ...mapGetters('datasetDetails', [\n 'getKeywords',\n 'getAccessRights',\n 'getAccrualPeriodicity',\n 'getCatalog',\n 'getContactPoints',\n 'getDateIncorrect',\n 'getDescription',\n 'getDistributions',\n 'getID',\n 'getLanguages',\n 'getLicences',\n 'getModificationDate',\n 'getOtherIdentifiers',\n 'getPages',\n 'getPublisher',\n 'getReleaseDate',\n 'getSpatial',\n 'getTranslationMetaData',\n 'getTitle'\n ]),\n dateIncorrect() {\n return this.getDateIncorrect;\n },\n displayedDistributions() {\n const sorted = [...this.getDistributions].sort((a, b) => {\n if (getTranslationFor(a.title, this.$route.query.locale, this.getLanguages) < getTranslationFor(b.title, this.$route.query.locale, this.getLanguages)) { return -1; }\n if (getTranslationFor(a.title, this.$route.query.locale, this.getLanguages) > getTranslationFor(b.title, this.$route.query.locale, this.getLanguages)) { return 1; }\n return 0;\n });\n return this.distributions.displayAll\n ? Object.freeze(sorted)\n : Object.freeze(sorted.slice(0, this.distributions.displayCount));\n },\n isDistributionsAllDisplayed() {\n return this.distributions.displayCount === this.getDistributions.length;\n },\n remainingDistributions() {\n return this.getDistributions.length - this.distributions.displayCount;\n }\n },\n methods: {\n ...mapActions('datasetDetails', [\n 'loadDatasetDetails',\n 'setLoading',\n ]),\n has,\n isNil,\n isArray,\n isObject,\n isString,\n isNumber,\n appendCurrentLocaleToURL,\n getTranslationFor,\n getCountryFlagImg,\n truncate,\n replaceHttp,\n initDatasetDetails() {\n this.piwikMetaPush();\n setTimeout(() => {\n if (typeof this.$piwik?.resume === \"function\") this.$piwik.resume();\n }, 500);\n this.$nextTick(() => {\n // Display/hide translation banners\n this.setTranslationBanners();\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n });\n },\n setDistributionsDisplayCount(count: number) {\n this.distributions.displayCount = count;\n },\n openModal(callback, toggleDownloadPopup) {\n this.$refs.externalResourceModal.openModal(callback, toggleDownloadPopup)\n },\n previewLinkCallback(distribution) {\n return () => {\n this.$emit('track-link', this.getVisualisationLink(distribution), 'link');\n window.open(this.getVisualisationLink(distribution), '_blank');\n };\n },\n filterDateFormatEU(date) {\n return dateFilters.formatEU(date);\n },\n /* ABSTRACT SHOW FUNCTIONS */\n showString(string) {\n return !isNil(string) && isString(string);\n },\n showNumber(number) {\n return !isNil(number) && isNumber(number);\n },\n showObject(object) {\n return !isNil(object) && isObject(object) && !Object.values(object).reduce((keyUndefined, currentValue) => keyUndefined && currentValue === undefined, true);\n },\n showArray(array) {\n return !isNil(array) && isArray(array) && array.length > 0;\n },\n showObjectArray(objectArray) {\n return this.showArray(objectArray) && !objectArray.reduce((objectUndefined, currentObject) => objectUndefined && Object.values(currentObject).reduce((keyUndefined, currentValue) => keyUndefined && currentValue === undefined, true), true);\n },\n /* SPECIFIC SHOW FUNCTIONS */\n /* for now show all licences */\n showLicence(licence) {\n // return (has(licence, 'id') && !isNil(licence.id))\n // || (has(licence, 'label') && !isNil(licence.label))\n return true\n },\n showLicensingAssistant(distribution) {\n return has(distribution, 'licence.la_url') && this.showString(distribution.licence.la_url);\n },\n showDownloadDropdown(distribution) {\n return this.showAccessUrls(distribution) || this.showDownloadUrls(distribution);\n },\n isOnlyOneUrl(distribution) {\n return (this.showAccessUrls(distribution) && !this.showDownloadUrls(distribution))\n || (!this.showAccessUrls(distribution) && this.showDownloadUrls(distribution) && distribution.downloadUrls.length === 1);\n },\n getDownloadUrl(distribution) {\n let url;\n if (this.showAccessUrls(distribution) && !this.showDownloadUrls(distribution)) {\n url = distribution.accessUrl[0];\n }\n if (!this.showAccessUrls(distribution) && this.showDownloadUrls(distribution) && distribution.downloadUrls.length === 1) {\n url = distribution.downloadUrls[0];\n }\n return url;\n },\n showAccessUrls(distribution) {\n return has(distribution, 'accessUrl') && this.showArray(distribution.accessUrl);\n },\n showDownloadUrls(distribution) {\n return has(distribution, 'downloadUrls') && this.showArray(distribution.downloadUrls);\n },\n showKeyword(keyword) {\n return has(keyword, 'id')\n && has(keyword, 'title')\n && !isNil(keyword.id)\n && !isNil(keyword.title);\n },\n\n /* GETTER / SETTER FUNCTIONS */\n\n setDatasetOriginalLanguage(originalLanguage) {\n this.$i18n.locale = originalLanguage;\n },\n distributionIsExpanded(id) {\n setTimeout(() => {\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n }, 500);\n return this.expandedDistributions.includes(id);\n },\n distributionDescriptionIsExpanded(id) {\n return this.expandedDistributionDescriptions.includes(id);\n },\n distributionDescriptionIsExpandable(description) {\n return isNil(description) ? false : description.length > this.distributions.descriptionMaxChars;\n },\n getDistributionFormat(distribution) {\n return has(distribution, 'format.label') && !isNil(distribution.format.label) ? distribution.format.label : '';\n },\n distributionFormatTruncated(distribution) {\n return this.getDistributionFormat(distribution).length > 4;\n },\n getDistributionTitle(distribution) {\n return distribution.title\n ? getTranslationFor(distribution.title, this.$route.query.locale, this.getLanguages)\n : this.getID || '-';\n },\n getVisualisationLink(distribution) {\n // Return Visualisation Link\n const accessUrl = distribution.downloadUrls && distribution.downloadUrls.length ? distribution.downloadUrls[0] : distribution.accessUrl[0];\n return `/data/visualisation/?file=${encodeURIComponent(accessUrl)}`;\n },\n // getSubjectLink(subject) {\n // return { path: `/datasets?subject=${subject.id}`, query: Object.assign({}, { locale: this.$route.query.locale }) };\n // },\n toggleDistribution(id) {\n const index = this.expandedDistributions.indexOf(id);\n if (index > -1) this.expandedDistributions.splice(index, 1);\n else this.expandedDistributions.push(id);\n },\n toggleDistributionDescription(id) {\n const index = this.expandedDistributionDescriptions.indexOf(id);\n if (index > -1) this.expandedDistributionDescriptions.splice(index, 1);\n else this.expandedDistributionDescriptions.push(id);\n },\n setTranslationBanners() {\n if (!this.$i18n) return;\n const translationMetaData = this.getTranslationMetaData;\n // Check if translation of dataset is available in selected language\n if (!isNil(translationMetaData.details) && has(translationMetaData.details, this.$route.query.locale)) {\n // Check if dataset if machine translated\n this.machineTranslated = translationMetaData.details[this.$route.query.locale].machine_translated;\n } else {\n // No translation of this dataset available for the selected language\n this.translationNotAvailable = true;\n }\n },\n // Emit a Matomo event when user clicks on 'go to resource' element\n trackGoto() {\n const paq = window._paq || []; // eslint-disable-line\n // paq.push(['trackEvent', 'GoToResource', 'Clicked']);\n this.$piwik.trackGotoResource();\n },\n clamp(n, min, max) {\n return Math.min(Math.max(n, min), max);\n },\n // Increases the current number of distributions displayed\n // and clamps the result so that it never exceeds the number of all distributions.\n increaseNumDisplayedDistributions(increment) {\n const clampedSum = this.clamp(this.distributions.displayCount + increment, 0, this.getDistributions.length);\n this.distributions.displayCount = clampedSum;\n },\n nonOverflowingIncrementsForDistributions(incrementStep) {\n return this.distributions.displayCount + incrementStep <= this.getDistributions.length;\n },\n // Increases the current number of distributions displayed\n // and clamps the result so that it never exceeds the number of all distributions.\n increaseNumDisplayedPages(increment) {\n const clampedSum = this.clamp(this.pages.displayCount + increment, 0, this.getPages.length);\n this.pages.displayCount = clampedSum;\n },\n nonOverflowingIncrementsForPages(incrementStep) {\n return this.pages.displayCount + incrementStep <= this.getPages.length;\n },\n piwikMetaPush() {\n this.$piwik.trackDatasetDetailsPageView(null, null, {\n dataset_AccessRights: this.getAccessRights,\n dataset_AccrualPeriodicity: this.getAccrualPeriodicity,\n dataset_Catalog: this.getCatalog,\n // dataset_Categories: this.getCategories,\n // dataset_ConformsTo: this.getConformsTo,\n // dataset_ContactPoints: this.getContactPoints,\n // dataset_Country: this.getCountry,\n // dataset_Creator: this.getCreator,\n // dataset_Description: this.getDescription,\n // dataset_Distributions: this.getDistributions,\n // dataset_DistributionFormats: this.getDistributionFormats,\n // dataset_Documentations: this.getDocumentations,\n // dataset_Frequency: this.getFrequency,\n // dataset_HasVersion: this.getHasVersion,\n dataset_ID: this.getID,\n // dataset_Identifiers: this.getIdentifiers,\n // dataset_IdName: this.getIdName,\n // dataset_IsVersionOf: this.getIsVersionOf,\n // datest_Keywords: this.getKeywords,\n // dataset_LandingPages: this.getLandingPagesResource,\n // dataset_Languages: this.getLanguages,\n // dataset_Licences: this.getLicences,\n // dataset_Loading: this.getLoading,\n // dataset_ModificationDate: this.getModificationDate,\n // dataset_OriginalLanguage: this.getOriginalLanguage,\n // dataset_OtherIdentifiers: this.getOtherIdentifiers,\n // dataset_Pages: this.getPages,\n // dataset_Provenances: this.getProvenances,\n dataset_Publisher: this.getPublisher,\n // dataset_RelatedResources: this.getRelatedResources,\n // dataset_ReleaseDate: this.getReleaseDate,\n // dataset_Sources: this.getSources,\n // dataset_Spatial: this.getSpatial,\n // dataset_SpatialResource: this.getSpatialResource,\n // dataset_Temporal: this.getTemporal,\n dataset_Title: this.getTitle,\n // dataset_TranslationMetaData: this.getTranslationMetaData,\n // dataset_VersionInfo: this.getVersionInfo,\n // dataset_VersionNotes: this.getVersionNotes,\n });\n },\n isUrlInvalid(url) {\n if (url) {\n try {\n /* eslint-disable no-useless-escape */\n return !(new RegExp(\"^((https?:\\/\\/(www\\.)?)([-a-zA-Z0-9@:%._\\+~#=]{1,256})([-a-zA-Z0-9()@:%_\\+.~#?&//=]*))$\", \"i\")).test(decodeURIComponent(url.split(\"=\").pop()));\n /* eslint-enable no-useless-escape */\n } catch (e) {\n console.error(e);\n }\n }\n },\n openIfValidUrl(isValid, previewLinkCallback, distribution, event) {\n if (isValid) {\n // for (let key in this.$children) {\n // if(this.$children[key].$refs[\"externalResourceModal\"]) {\n // this.$children[key].$refs[\"externalResourceModal\"].openModal(previewLinkCallback(distribution), false);\n // }\n // }\n this.openModal(previewLinkCallback(distribution), false);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n showTooltipVisualiseButton(invalidUrl) {\n if (invalidUrl) {\n return this.$t('message.tooltip.invalidVisualise');\n }\n return ''\n },\n },\n mounted() {\n // Duplicated API call, execute only if data not already loaded\n if (this.$route.params.ds_id !== this.getID) {\n this.$Progress.start();\n this.loadingDatasetDetails = true;\n this.loadDatasetDetails(this.$route.params.ds_id)\n .then(() => {\n this.$Progress.finish();\n this.loadingDatasetDetails = false;\n this.initDatasetDetails();\n })\n .catch((err) => {\n console.warn(err); // eslint-disable-line\n this.$Progress.fail();\n if (typeof this.$piwik?.resume === \"function\") this.$piwik.resume();\n this.$router.replace({\n name: 'NotFound',\n query: { locale: this.$route.query.locale, dataset: this.$route.params.ds_id },\n });\n })\n .finally(() => this.$root.$emit('contentLoaded'));\n } else {\n this.initDatasetDetails();\n this.$root.$emit('contentLoaded')\n }\n\n const distributionsConf = this.$env.content.datasetDetails && this.$env.content.datasetDetails.distributions;\n if (distributionsConf) {\n this.distributions.displayAll = distributionsConf.displayAll || this.distributions.displayAll;\n this.distributions.displayCount = parseInt(distributionsConf.displayCount, 10) || this.distributions.displayCount;\n\n if (typeof distributionsConf.incrementSteps === 'string') {\n // Need to parse as json array since env variables are string only\n distributionsConf.incrementSteps = JSON.parse(distributionsConf.incrementSteps);\n }\n this.distributions.incrementSteps = distributionsConf.incrementSteps || this.distributions.incrementSteps;\n }\n\n if (this.distributions.displayAll) this.distributions.displayCount = this.getDistributions.length;\n\n const pagesConf = this.$env.content.datasetDetails && this.$env.content.datasetDetails.pages;\n if (pagesConf) {\n this.pages.displayAll = pagesConf.displayAll || this.pages.displayAll;\n this.pages.displayCount = parseInt(pagesConf.displayCount, 10) || this.pages.displayCount;\n\n if (typeof pagesConf.incrementSteps === 'string') {\n // Need to parse as json array since env variables are string only\n pagesConf.incrementSteps = JSON.parse(pagesConf.incrementSteps);\n }\n this.pages.incrementSteps = pagesConf.incrementSteps || this.pages.incrementSteps;\n }\n\n if (this.pages.displayAll) this.pages.displayCount = this.getPages.length;\n },\n beforeUnmount() {\n $('.tooltip').remove();\n },\n setup() {\n metaInfo.useDatasetDetailsDatasetHead();\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n\n .catalogue-label {\n white-space: pre-line;\n }\n\n .cursor-pointer {\n cursor: pointer;\n }\n\n .tag-color {\n background-color: var(--tag-color);\n }\n\n .btn-color {\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n\n .heading, .arrow, .copy-text {\n cursor: pointer;\n }\n\n .details-link {\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n .text-break {\n word-break: break-word;\n }\n\n td {\n padding-left: 0 !important;\n padding-top: 1% !important;\n padding-bottom: 1% !important;\n }\n\n .download-all-btn {\n min-width: 100px;\n height: 31px;\n }\n\n .d-inline-table {\n display: inline-table;\n }\n\n /*** BOOTSTRAP ***/\n button:focus {\n outline:0;\n }\n .options, .download {\n .dropdown-menu {\n .dropdown-item {\n &:hover {\n color: initial;\n background-color: initial;\n }\n }\n }\n }\n.spinner-grow {\n width: 20px;\n height: 20px;\n}\n\n /*** FONT AWESOME ICONS ***/\n .fa-check-square {\n color: #28a745;\n width: 16px;\n height: 16px;\n }\n\n /*** MATERIAL ICONS ***/\n %modal-icon {\n font-size: 18px;\n cursor: default;\n }\n\n .help-icon {\n @extend %modal-icon;\n }\n\n .check-icon {\n @extend %modal-icon;\n color: #28a745;\n }\n\n .material-icons.small-icon {\n font-size: 20px;\n }\n\n .distributions {\n\n &__item {\n position: relative;\n\n &--preview {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, white 55%);\n z-index: 10;\n }\n }\n\n &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n }\n .mt-4 {\n margin-top: 1.5rem !important;\n }\n\n .keywords {\n\n &__item {\n position: relative;\n }\n\n &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n }\n .sectionList {\n list-style-type: '→ ';\n margin-left:6.5%;\n }\n @media only screen and (max-width: 991px) {\n .sectionList {\n margin-left: 0;\n }\n}\n</style>\n"],"names":["_sfc_main","DatasetDetailsSkeleton","DatasetDetailsExtendedMetaData","AppLink","Tooltip","Distributions","ResourceAccessPopup","mapGetters","sorted","a","b","getTranslationFor","mapActions","has","isNil","isArray","isObject","isString","isNumber","appendCurrentLocaleToURL","getCountryFlagImg","truncate","replaceHttp","_a","$","count","callback","toggleDownloadPopup","distribution","date","dateFilters","string","number","object","keyUndefined","currentValue","array","objectArray","objectUndefined","currentObject","licence","url","keyword","originalLanguage","id","description","accessUrl","index","translationMetaData","n","min","max","increment","clampedSum","incrementStep","isValid","previewLinkCallback","event","invalidUrl","err","distributionsConf","pagesConf","metaInfo.useDatasetDetailsDatas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C,IAAY,KAAK,KAAK,QAAQ,kBAAkB,KAAK,KAAK,QAAQ,eAAe;AACvF,IAAIA,MACF,KAAK,MAAM,aAAaA,EAAU,cAAc,KAAK,MAAM,YACtD,KAAA,MAAM,eAAe,SAASA,EAAU,cAAc,EAAE,KAAK,KAAK,MAAM,cAEzE,OAAOA,EAAU,kBAAmB,aAEtCA,EAAU,iBAAiB,KAAK,MAAMA,EAAU,cAAc,IAEhE,KAAK,MAAM,iBAAiBA,EAAU,kBAAkB,KAAK,MAAM,iBAGjE,KAAK,MAAM,eAAiB,KAAA,MAAM,eAAe,KAAK,SAAS;AAAA,EACrE;AAAA,EACA,gBAAgB;AACZ,IAAArC,EAAA,UAAU,EAAE;EAChB;AAAA,EACA,QAAQ;AACNsC,IAAAA;EACF;AACF;"}
1
+ {"version":3,"file":"DatasetDetailsDataset.vue2.mjs","sources":["../../lib/datasetDetails/DatasetDetailsDataset.vue"],"sourcesContent":["<template>\n <div>\n <resource-access-popup ref=\"externalResourceModal\" />\n <span property=\"dc:issued\" :content=\"getReleaseDate\"></span>\n <span property=\"dc:modified\" :content=\"getModificationDate\"></span>\n <div v-if=\"loadingDatasetDetails\">\n <dataset-details-skeleton type=\"DatasetDetails\"></dataset-details-skeleton>\n </div>\n <div v-if=\"!loadingDatasetDetails\" class=\"dsd-dataset\">\n <dataset-details-description\n v-if=\"showDatasetDescription\"\n :dateIncorrect=\"dateIncorrect\"\n :machineTranslated=\"machineTranslated\"\n :translationNotAvailable=\"translationNotAvailable\"\n />\n <distributions\n :openModal=\"openModal\"\n :getDistributions=\"getDistributions\"\n :expandedDistributions=\"expandedDistributions\"\n :expandedDistributionDescriptions=\"expandedDistributionDescriptions\"\n :displayedDistributions=\"displayedDistributions\"\n :isDistributionsAllDisplayed=\"isDistributionsAllDisplayed\"\n :distributions=\"distributions\"\n :setDistributionsDisplayCount=\"setDistributionsDisplayCount\"\n :pages=\"pages\"\n :showDownloadUrls=\"showDownloadUrls\"\n :isOnlyOneUrl=\"isOnlyOneUrl\"\n :getDistributionFormat=\"getDistributionFormat\"\n :distributionFormatTruncated=\"distributionFormatTruncated\"\n :getDistributionTitle=\"getDistributionTitle\"\n :distributionVisibleContent=\"distributionVisibleContent\"\n :distributionExpandedContent=\"distributionExpandedContent\"\n :distributionDescriptionIsExpanded=\"distributionDescriptionIsExpanded\"\n :distributionDescriptionIsExpandable=\"distributionDescriptionIsExpandable\"\n :distributionIsExpanded=\"distributionIsExpanded\"\n :showNumber=\"showNumber\"\n :showObject=\"showObject\"\n :showDownloadDropdown=\"showDownloadDropdown\"\n :showLicence=\"showLicence\"\n :showLicensingAssistant=\"showLicensingAssistant\"\n :filterDateFormatEU=\"filterDateFormatEU\"\n :showArray=\"showArray\"\n :showObjectArray=\"showObjectArray\"\n :getVisualisationLink=\"getVisualisationLink\"\n :getDownloadUrl=\"getDownloadUrl\"\n :trackGoto=\"trackGoto\"\n :showAccessUrls=\"showAccessUrls\"\n :replaceHttp=\"replaceHttp\"\n :previewLinkCallback=\"previewLinkCallback\"\n :toggleDistribution=\"toggleDistribution\"\n :toggleDistributionDescription=\"toggleDistributionDescription\"\n :increaseNumDisplayedDistributions=\"increaseNumDisplayedDistributions\"\n :nonOverflowingIncrementsForDistributions=\"nonOverflowingIncrementsForDistributions\"\n :appendCurrentLocaleToURL=\"appendCurrentLocaleToURL\"\n :isUrlInvalid=\"isUrlInvalid\"\n :openIfValidUrl=\"openIfValidUrl\"\n :showTooltipVisualiseButton=\"showTooltipVisualiseButton\"\n :showPublisher=\"showPublisher\"\n :embed=\"embed\"\n />\n <dataset-details-features\n :getKeywords=\"getKeywords\"\n :pages=\"pages\"\n :increaseNumDisplayedPages=\"increaseNumDisplayedPages\"\n :nonOverflowingIncrementsForPages=\"nonOverflowingIncrementsForPages\"\n :showKeyword=\"showKeyword\"\n :trackGoto=\"trackGoto\"\n :showObjectArray=\"showObjectArray\"\n :showArray=\"showArray\"\n :showObject=\"showObject\"\n />\n <dataset-details-properties v-if=\"showDatasetProperties\">\n <template #property-header><slot name=\"property-header\"></slot></template>\n <template #property-table-before><slot name=\"property-table-before\"></slot></template>\n <template #property-table><slot name=\"property-table\"></slot></template>\n <template #property-table-after><slot name=\"property-table-after\"></slot></template>\n </dataset-details-properties>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n // @ts-nocheck\n /* eslint-disable no-confusing-arrow, no-nested-ternary, no-return-assign, no-confusing-arrow */\n import $ from 'jquery';\n import { mapActions, mapGetters } from 'vuex';\n import {\n has,\n isNil,\n isArray,\n isObject,\n isString,\n isNumber,\n isEmpty,\n } from 'lodash';\n import AppLink from '../widgets/AppLink.vue';\n import Tooltip from '../widgets/Tooltip.vue';\n import Distributions from './distributions/Distributions.vue';\n import dateFilters from '../filters/dateFilters';\n import {\n getTranslationFor, getCountryFlagImg, truncate, replaceHttp, appendCurrentLocaleToURL\n } from '../utils/helpers';\n import ResourceAccessPopup from '../widgets/ResourceAccessPopup.vue';\n import DatasetDetailsExtendedMetaData\n from \"../datasetDetails/features/DatasetDetailsIsUsedBy.vue\";\n import DatasetDetailsSkeleton from \"../datasetDetails/DatasetDetailsSkeleton.vue\";\n import * as metaInfo from '../composables/head';\n\n export default {\n name: 'datasetDetailsDataset',\n components: {\n DatasetDetailsSkeleton,\n DatasetDetailsExtendedMetaData,\n AppLink,\n Tooltip,\n Distributions,\n ResourceAccessPopup\n },\n props: {\n distributionVisibleContent: {\n type: Array,\n default: () => ['license', 'licenseAttributionByText', 'modificationDate'],\n },\n distributionExpandedContent: {\n type: Array,\n default: () => [\n 'releaseDate',\n 'language',\n 'availability',\n 'status',\n 'rights',\n 'mediaType',\n 'byteSize',\n 'checksum',\n 'pages',\n 'type',\n 'compressFormat',\n 'packageFormat',\n 'hasPolicy',\n 'conformsTo',\n 'spatialResolutionInMeters',\n 'temporalResolution',\n ],\n },\n showDatasetDescription: {\n type: Boolean,\n default: () => true,\n },\n showDatasetProperties: {\n type: Boolean,\n default: () => true,\n },\n showPublisher: {\n type: Boolean,\n default: () => false,\n },\n embed: {\n type: Boolean,\n default: () => false,\n },\n },\n data() {\n return {\n defaultLocale: this.$env.languages.locale,\n // has to be INITIAL_DATASET_DESCRIPTION_LENGTH\n isDatasetDescriptionExpanded: false,\n loadingDatasetDetails: false,\n machineTranslated: false,\n translationNotAvailable: false,\n expandedDistributions: [],\n expandedDistributionDescriptions: [],\n distributions: {\n displayAll: this.$env.content.datasetDetails.distributions.displayAll,\n displayCount: this.$env.content.datasetDetails.distributions.displayCount,\n incrementSteps: this.$env.content.datasetDetails.distributions.incrementSteps,\n descriptionMaxLines: this.$env.content.datasetDetails.distributions.descriptionMaxLines,\n descriptionMaxChars: this.$env.content.datasetDetails.distributions.descriptionMaxChars,\n },\n pages: {\n isVisible: this.$env.content.datasetDetails.pages.isVisible,\n displayAll: this.$env.content.datasetDetails.pages.displayAll,\n displayCount: this.$env.content.datasetDetails.pages.displayCount,\n incrementSteps: this.$env.content.datasetDetails.pages.incrementSteps,\n descriptionMaxLines: this.$env.content.datasetDetails.pages.descriptionMaxLines,\n descriptionMaxChars: this.$env.content.datasetDetails.pages.descriptionMaxChars,\n },\n showDescription: true,\n };\n },\n computed: {\n // import store-getters\n ...mapGetters('datasetDetails', [\n 'getKeywords',\n 'getAccessRights',\n 'getAccrualPeriodicity',\n 'getCatalog',\n 'getContactPoints',\n 'getDateIncorrect',\n 'getDescription',\n 'getDistributions',\n 'getID',\n 'getLanguages',\n 'getLicences',\n 'getModificationDate',\n 'getOtherIdentifiers',\n 'getPages',\n 'getPublisher',\n 'getReleaseDate',\n 'getSpatial',\n 'getTranslationMetaData',\n 'getTitle'\n ]),\n dateIncorrect() {\n return this.getDateIncorrect;\n },\n displayedDistributions() {\n const sorted = [...this.getDistributions].sort((a, b) => {\n if (getTranslationFor(a.title, this.$route.query.locale, this.getLanguages) < getTranslationFor(b.title, this.$route.query.locale, this.getLanguages)) { return -1; }\n if (getTranslationFor(a.title, this.$route.query.locale, this.getLanguages) > getTranslationFor(b.title, this.$route.query.locale, this.getLanguages)) { return 1; }\n return 0;\n });\n return this.distributions.displayAll\n ? Object.freeze(sorted)\n : Object.freeze(sorted.slice(0, this.distributions.displayCount));\n },\n isDistributionsAllDisplayed() {\n return this.distributions.displayCount === this.getDistributions.length;\n },\n remainingDistributions() {\n return this.getDistributions.length - this.distributions.displayCount;\n }\n },\n methods: {\n ...mapActions('datasetDetails', [\n 'loadDatasetDetails',\n 'setLoading',\n ]),\n has,\n isNil,\n isArray,\n isObject,\n isString,\n isNumber,\n appendCurrentLocaleToURL,\n getTranslationFor,\n getCountryFlagImg,\n truncate,\n replaceHttp,\n initDatasetDetails() {\n this.piwikMetaPush();\n setTimeout(() => {\n if (typeof this.$piwik?.resume === \"function\") this.$piwik.resume();\n }, 500);\n this.$nextTick(() => {\n // Display/hide translation banners\n this.setTranslationBanners();\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n });\n },\n setDistributionsDisplayCount(count: number) {\n this.distributions.displayCount = count;\n },\n openModal(callback, toggleDownloadPopup) {\n this.$refs.externalResourceModal.openModal(callback, toggleDownloadPopup)\n },\n previewLinkCallback(distribution) {\n return () => {\n this.$emit('track-link', this.getVisualisationLink(distribution), 'link');\n window.open(this.getVisualisationLink(distribution), '_blank');\n };\n },\n filterDateFormatEU(date) {\n return dateFilters.formatEU(date);\n },\n /* ABSTRACT SHOW FUNCTIONS */\n showString(string) {\n return !isNil(string) && isString(string);\n },\n showNumber(number) {\n return !isNil(number) && isNumber(number);\n },\n showObject(object) {\n return !isNil(object) && isObject(object) && !Object.values(object).reduce((keyUndefined, currentValue) => keyUndefined && currentValue === undefined, true);\n },\n showArray(array) {\n return !isNil(array) && isArray(array) && array.length > 0;\n },\n showObjectArray(objectArray) {\n return this.showArray(objectArray) && !objectArray.reduce((objectUndefined, currentObject) => objectUndefined && Object.values(currentObject).reduce((keyUndefined, currentValue) => keyUndefined && currentValue === undefined, true), true);\n },\n /* SPECIFIC SHOW FUNCTIONS */\n /* for now show all licences */\n showLicence(licence) {\n // return (has(licence, 'id') && !isNil(licence.id))\n // || (has(licence, 'label') && !isNil(licence.label))\n return true\n },\n showLicensingAssistant(distribution) {\n return has(distribution, 'licence.la_url') && this.showString(distribution.licence.la_url);\n },\n showDownloadDropdown(distribution) {\n return this.showAccessUrls(distribution) || this.showDownloadUrls(distribution);\n },\n isOnlyOneUrl(distribution) {\n return (this.showAccessUrls(distribution) && !this.showDownloadUrls(distribution))\n || (!this.showAccessUrls(distribution) && this.showDownloadUrls(distribution) && distribution.downloadUrls.length === 1);\n },\n getDownloadUrl(distribution) {\n let url;\n if (this.showAccessUrls(distribution) && !this.showDownloadUrls(distribution)) {\n url = distribution.accessUrl[0];\n }\n if (!this.showAccessUrls(distribution) && this.showDownloadUrls(distribution) && distribution.downloadUrls.length === 1) {\n url = distribution.downloadUrls[0];\n }\n return url;\n },\n showAccessUrls(distribution) {\n return has(distribution, 'accessUrl') && this.showArray(distribution.accessUrl);\n },\n showDownloadUrls(distribution) {\n return has(distribution, 'downloadUrls') && this.showArray(distribution.downloadUrls);\n },\n showKeyword(keyword) {\n return has(keyword, 'id')\n && has(keyword, 'title')\n && !isNil(keyword.id)\n && !isNil(keyword.title);\n },\n\n /* GETTER / SETTER FUNCTIONS */\n\n setDatasetOriginalLanguage(originalLanguage) {\n this.$i18n.locale = originalLanguage;\n },\n distributionIsExpanded(id) {\n setTimeout(() => {\n $('[data-toggle=\"tooltip\"]').tooltip({\n container: 'body',\n });\n }, 500);\n return this.expandedDistributions.includes(id);\n },\n distributionDescriptionIsExpanded(id) {\n return this.expandedDistributionDescriptions.includes(id);\n },\n distributionDescriptionIsExpandable(description) {\n return isNil(description) ? false : description.length > this.distributions.descriptionMaxChars;\n },\n getDistributionFormat(distribution) {\n return has(distribution, 'format.label') && !isNil(distribution.format.label) ? distribution.format.label : '';\n },\n distributionFormatTruncated(distribution) {\n return this.getDistributionFormat(distribution).length > 4;\n },\n getDistributionTitle(distribution) {\n return distribution.title\n ? getTranslationFor(distribution.title, this.$route.query.locale, this.getLanguages)\n : this.getID || '-';\n },\n getVisualisationLink(distribution) {\n // Return Visualisation Link\n const accessUrl = distribution.downloadUrls && distribution.downloadUrls.length ? distribution.downloadUrls[0] : distribution.accessUrl[0];\n return `/data/visualisation/?file=${encodeURIComponent(accessUrl)}`;\n },\n // getSubjectLink(subject) {\n // return { path: `/datasets?subject=${subject.id}`, query: Object.assign({}, { locale: this.$route.query.locale }) };\n // },\n toggleDistribution(id) {\n const index = this.expandedDistributions.indexOf(id);\n if (index > -1) this.expandedDistributions.splice(index, 1);\n else this.expandedDistributions.push(id);\n },\n toggleDistributionDescription(id) {\n const index = this.expandedDistributionDescriptions.indexOf(id);\n if (index > -1) this.expandedDistributionDescriptions.splice(index, 1);\n else this.expandedDistributionDescriptions.push(id);\n },\n setTranslationBanners() {\n if (!this.$i18n) return;\n const translationMetaData = this.getTranslationMetaData;\n // Check if translation of dataset is available in selected language\n if (!isNil(translationMetaData.details) && has(translationMetaData.details, this.$route.query.locale)) {\n // Check if dataset if machine translated\n this.machineTranslated = translationMetaData.details[this.$route.query.locale].machine_translated;\n } else {\n // No translation of this dataset available for the selected language\n this.translationNotAvailable = true;\n }\n },\n // Emit a Matomo event when user clicks on 'go to resource' element\n trackGoto() {\n const paq = window._paq || []; // eslint-disable-line\n // paq.push(['trackEvent', 'GoToResource', 'Clicked']);\n this.$piwik.trackGotoResource();\n },\n clamp(n, min, max) {\n return Math.min(Math.max(n, min), max);\n },\n // Increases the current number of distributions displayed\n // and clamps the result so that it never exceeds the number of all distributions.\n increaseNumDisplayedDistributions(increment) {\n const clampedSum = this.clamp(this.distributions.displayCount + increment, 0, this.getDistributions.length);\n this.distributions.displayCount = clampedSum;\n },\n nonOverflowingIncrementsForDistributions(incrementStep) {\n return this.distributions.displayCount + incrementStep <= this.getDistributions.length;\n },\n // Increases the current number of distributions displayed\n // and clamps the result so that it never exceeds the number of all distributions.\n increaseNumDisplayedPages(increment) {\n const clampedSum = this.clamp(this.pages.displayCount + increment, 0, this.getPages.length);\n this.pages.displayCount = clampedSum;\n },\n nonOverflowingIncrementsForPages(incrementStep) {\n return this.pages.displayCount + incrementStep <= this.getPages.length;\n },\n piwikMetaPush() {\n this.$piwik.trackDatasetDetailsPageView(null, null, {\n dataset_AccessRights: this.getAccessRights,\n dataset_AccrualPeriodicity: this.getAccrualPeriodicity,\n dataset_Catalog: this.getCatalog,\n // dataset_Categories: this.getCategories,\n // dataset_ConformsTo: this.getConformsTo,\n // dataset_ContactPoints: this.getContactPoints,\n // dataset_Country: this.getCountry,\n // dataset_Creator: this.getCreator,\n // dataset_Description: this.getDescription,\n // dataset_Distributions: this.getDistributions,\n // dataset_DistributionFormats: this.getDistributionFormats,\n // dataset_Documentations: this.getDocumentations,\n // dataset_Frequency: this.getFrequency,\n // dataset_HasVersion: this.getHasVersion,\n dataset_ID: this.getID,\n // dataset_Identifiers: this.getIdentifiers,\n // dataset_IdName: this.getIdName,\n // dataset_IsVersionOf: this.getIsVersionOf,\n // datest_Keywords: this.getKeywords,\n // dataset_LandingPages: this.getLandingPagesResource,\n // dataset_Languages: this.getLanguages,\n // dataset_Licences: this.getLicences,\n // dataset_Loading: this.getLoading,\n // dataset_ModificationDate: this.getModificationDate,\n // dataset_OriginalLanguage: this.getOriginalLanguage,\n // dataset_OtherIdentifiers: this.getOtherIdentifiers,\n // dataset_Pages: this.getPages,\n // dataset_Provenances: this.getProvenances,\n dataset_Publisher: this.getPublisher,\n // dataset_RelatedResources: this.getRelatedResources,\n // dataset_ReleaseDate: this.getReleaseDate,\n // dataset_Sources: this.getSources,\n // dataset_Spatial: this.getSpatial,\n // dataset_SpatialResource: this.getSpatialResource,\n // dataset_Temporal: this.getTemporal,\n dataset_Title: this.getTitle,\n // dataset_TranslationMetaData: this.getTranslationMetaData,\n // dataset_VersionInfo: this.getVersionInfo,\n // dataset_VersionNotes: this.getVersionNotes,\n });\n },\n isUrlInvalid(url) {\n if (url) {\n try {\n /* eslint-disable no-useless-escape */\n return !(new RegExp(\"^((https?:\\/\\/(www\\.)?)([-a-zA-Z0-9@:%._\\+~#=]{1,256})([-a-zA-Z0-9()@:%_\\+.~#?&//=]*))$\", \"i\")).test(decodeURIComponent(url.split(\"=\").pop()));\n /* eslint-enable no-useless-escape */\n } catch (e) {\n console.error(e);\n }\n }\n },\n openIfValidUrl(isValid, previewLinkCallback, distribution, event) {\n if (isValid) {\n // for (let key in this.$children) {\n // if(this.$children[key].$refs[\"externalResourceModal\"]) {\n // this.$children[key].$refs[\"externalResourceModal\"].openModal(previewLinkCallback(distribution), false);\n // }\n // }\n this.openModal(previewLinkCallback(distribution), false);\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n showTooltipVisualiseButton(invalidUrl) {\n if (invalidUrl) {\n return this.$t('message.tooltip.invalidVisualise');\n }\n return ''\n },\n },\n mounted() {\n // Duplicated API call, execute only if data not already loaded\n if (this.$route.params.ds_id !== this.getID) {\n this.$Progress.start();\n this.loadingDatasetDetails = true;\n this.loadDatasetDetails(this.$route.params.ds_id)\n .then(() => {\n this.$Progress.finish();\n this.loadingDatasetDetails = false;\n this.initDatasetDetails();\n })\n .catch((err) => {\n console.warn(err); // eslint-disable-line\n this.$Progress.fail();\n if (typeof this.$piwik?.resume === \"function\") this.$piwik.resume();\n this.$router.replace({\n name: 'NotFound',\n query: { locale: this.$route.query.locale, dataset: this.$route.params.ds_id },\n });\n })\n .finally(() => this.$root.$emit('contentLoaded'));\n } else {\n this.initDatasetDetails();\n this.$root.$emit('contentLoaded')\n }\n\n const distributionsConf = this.$env.content.datasetDetails && this.$env.content.datasetDetails.distributions;\n if (distributionsConf) {\n this.distributions.displayAll = distributionsConf.displayAll || this.distributions.displayAll;\n this.distributions.displayCount = parseInt(distributionsConf.displayCount, 10) || this.distributions.displayCount;\n\n if (typeof distributionsConf.incrementSteps === 'string') {\n // Need to parse as json array since env variables are string only\n distributionsConf.incrementSteps = JSON.parse(distributionsConf.incrementSteps);\n }\n this.distributions.incrementSteps = distributionsConf.incrementSteps || this.distributions.incrementSteps;\n }\n\n if (this.distributions.displayAll) this.distributions.displayCount = this.getDistributions.length;\n\n const pagesConf = this.$env.content.datasetDetails && this.$env.content.datasetDetails.pages;\n if (pagesConf) {\n this.pages.displayAll = pagesConf.displayAll || this.pages.displayAll;\n this.pages.displayCount = parseInt(pagesConf.displayCount, 10) || this.pages.displayCount;\n\n if (typeof pagesConf.incrementSteps === 'string') {\n // Need to parse as json array since env variables are string only\n pagesConf.incrementSteps = JSON.parse(pagesConf.incrementSteps);\n }\n this.pages.incrementSteps = pagesConf.incrementSteps || this.pages.incrementSteps;\n }\n\n if (this.pages.displayAll) this.pages.displayCount = this.getPages.length;\n },\n beforeUnmount() {\n $('.tooltip').remove();\n },\n setup() {\n metaInfo.useDatasetDetailsDatasetHead();\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n\n .catalogue-label {\n white-space: pre-line;\n }\n\n .cursor-pointer {\n cursor: pointer;\n }\n\n .tag-color {\n background-color: var(--tag-color);\n }\n\n .btn-color {\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n }\n\n .heading, .arrow, .copy-text {\n cursor: pointer;\n }\n\n .details-link {\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n .text-break {\n word-break: break-word;\n }\n\n td {\n padding-left: 0 !important;\n padding-top: 1% !important;\n padding-bottom: 1% !important;\n }\n\n .download-all-btn {\n min-width: 100px;\n height: 31px;\n }\n\n .d-inline-table {\n display: inline-table;\n }\n\n /*** BOOTSTRAP ***/\n button:focus {\n outline:0;\n }\n .options, .download {\n .dropdown-menu {\n .dropdown-item {\n &:hover {\n color: initial;\n background-color: initial;\n }\n }\n }\n }\n.spinner-grow {\n width: 20px;\n height: 20px;\n}\n\n /*** FONT AWESOME ICONS ***/\n .fa-check-square {\n color: #28a745;\n width: 16px;\n height: 16px;\n }\n\n /*** MATERIAL ICONS ***/\n %modal-icon {\n font-size: 18px;\n cursor: default;\n }\n\n .help-icon {\n @extend %modal-icon;\n }\n\n .check-icon {\n @extend %modal-icon;\n color: #28a745;\n }\n\n .material-icons.small-icon {\n font-size: 20px;\n }\n\n .distributions {\n\n &__item {\n position: relative;\n\n &--preview {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, white 55%);\n z-index: 10;\n }\n }\n\n &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n }\n .mt-4 {\n margin-top: 1.5rem !important;\n }\n\n .keywords {\n\n &__item {\n position: relative;\n }\n\n &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n }\n .sectionList {\n list-style-type: '→ ';\n margin-left:6.5%;\n }\n @media only screen and (max-width: 991px) {\n .sectionList {\n margin-left: 0;\n }\n}\n</style>\n"],"names":["_sfc_main","DatasetDetailsSkeleton","DatasetDetailsExtendedMetaData","AppLink","Tooltip","Distributions","ResourceAccessPopup","mapGetters","sorted","a","b","getTranslationFor","mapActions","has","isNil","isArray","isObject","isString","isNumber","appendCurrentLocaleToURL","getCountryFlagImg","truncate","replaceHttp","_a","$","count","callback","toggleDownloadPopup","distribution","date","dateFilters","string","number","object","keyUndefined","currentValue","array","objectArray","objectUndefined","currentObject","licence","url","keyword","originalLanguage","id","description","accessUrl","index","translationMetaData","n","min","max","increment","clampedSum","incrementStep","isValid","previewLinkCallback","event","invalidUrl","err","distributionsConf","pagesConf","metaInfo.useDatasetDetailsDatasetHead"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4GE,MAAeA,IAAA;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,wBAAAC;AAAA,IAAA,gCACAC;AAAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,qBAAAC;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,4BAA4B;AAAA,MAC1B,MAAM;AAA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AAM,iBAAiBA,EAAU,kBAAkB,KAAK,MAAM,iBAGjE,KAAK,MAAM,eAAiB,KAAA,MAAM,eAAe,KAAK,SAAS;AAAA,EACrE;AAAA,EACA,gBAAgB;AACZ,IAAArC,EAAA,UAAU,EAAE;EAChB;AAAA,EACA,QAAQ;AACNsC,IAAAA;EACF;AACF;"}
@@ -1,6 +1,6 @@
1
1
  import { mapGetters as d } from "vuex";
2
2
  import u from "./DownloadAllDistributions.vue.mjs";
3
- import { resolveComponent as b, openBlock as n, createElementBlock as D, createElementVNode as i, toDisplayString as r, createTextVNode as s, createBlock as c, createCommentVNode as m } from "vue";
3
+ import { resolveComponent as b, openBlock as n, createElementBlock as D, createElementVNode as i, toDisplayString as r, createTextVNode as s, createBlock as m, createCommentVNode as c } from "vue";
4
4
  import "./DistributionsHeader.vue2.mjs";
5
5
  import p from "../../_virtual/_plugin-vue_export-helper.mjs";
6
6
  const g = {
@@ -24,26 +24,29 @@ const g = {
24
24
  "getLanguages"
25
25
  ])
26
26
  }
27
- }, h = { class: "distributions-header-container w-100" }, w = { class: "distributions-header-title-container dsd-item d-flex justify-content-between align-items-center" }, _ = { class: "distributions-header-title" }, f = ["title"], v = { class: "distributions-header-title-count-container" }, U = { class: "distributions-header-title-count" };
27
+ }, h = { class: "distributions-header-container w-100" }, w = {
28
+ class: "distributions-header-title-container dsd-item d-flex flex-column align-items-start",
29
+ style: { position: "relative", left: "-15px" }
30
+ }, f = { class: "distributions-header-title" }, _ = ["title"], v = { class: "distributions-header-title-count-container" }, U = { class: "distributions-header-title-count" };
28
31
  function T(o, t, e, k, l, y) {
29
32
  const a = b("download-all-distributions");
30
33
  return n(), D("div", h, [
31
34
  i("div", w, [
32
- i("div", _, [
35
+ i("div", f, [
33
36
  i("h2", {
34
37
  title: o.$t("message.tooltip.datasetDetails.distribution"),
35
38
  "data-toggle": "tooltip",
36
39
  "data-placement": "top",
37
40
  "data-cy": "dataset-distributions",
38
41
  class: "distributions-header-title-title"
39
- }, r(o.$t("message.metadata.distributions")), 9, f),
42
+ }, r(o.$t("message.metadata.distributions")), 9, _),
40
43
  t[0] || (t[0] = s()),
41
44
  i("div", v, [
42
45
  i("h3", U, r(o.getDistributions ? o.getDistributions.length.toLocaleString("fi") : 0), 1)
43
46
  ])
44
47
  ]),
45
48
  t[1] || (t[1] = s()),
46
- l.downloadAllTop ? (n(), c(a, {
49
+ l.downloadAllTop ? (n(), m(a, {
47
50
  key: 0,
48
51
  primary: !0,
49
52
  small: !0,
@@ -53,13 +56,13 @@ function T(o, t, e, k, l, y) {
53
56
  getDistributionTitle: e.getDistributionTitle,
54
57
  showDownloadUrls: e.showDownloadUrls,
55
58
  isUrlInvalid: e.isUrlInvalid
56
- }, null, 8, ["getDistributions", "getDistributionDescription", "openModal", "getDistributionTitle", "showDownloadUrls", "isUrlInvalid"])) : m("", !0)
59
+ }, null, 8, ["getDistributions", "getDistributionDescription", "openModal", "getDistributionTitle", "showDownloadUrls", "isUrlInvalid"])) : c("", !0)
57
60
  ]),
58
61
  t[2] || (t[2] = s()),
59
62
  t[3] || (t[3] = i("hr", { class: "distributions-header-bottom-hr" }, null, -1))
60
63
  ]);
61
64
  }
62
- const V = /* @__PURE__ */ p(g, [["render", T], ["__scopeId", "data-v-98e2c004"]]);
65
+ const V = /* @__PURE__ */ p(g, [["render", T], ["__scopeId", "data-v-990d4ce1"]]);
63
66
  export {
64
67
  V as default
65
68
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DistributionsHeader.vue.mjs","sources":["../../../lib/datasetDetails/distributions/DistributionsHeader.vue"],"sourcesContent":["<template>\n <div class=\"distributions-header-container w-100\">\n <div class=\"distributions-header-title-container dsd-item d-flex justify-content-between align-items-center\">\n <div class=\"distributions-header-title\">\n <h2 :title=\"$t('message.tooltip.datasetDetails.distribution')\"\n data-toggle=\"tooltip\"\n data-placement=\"top\"\n data-cy=\"dataset-distributions\"\n class=\"distributions-header-title-title\">\n {{ $t('message.metadata.distributions') }} \n </h2>\n \n <div class=\"distributions-header-title-count-container\">\n <h3 class=\"distributions-header-title-count\">{{ getDistributions ? getDistributions.length.toLocaleString('fi') : 0 }}</h3>\n </div>\n \n </div>\n <download-all-distributions\n v-if=\"downloadAllTop\"\n :primary=\"true\"\n :small=\"true\"\n :getDistributions=\"getDistributions\"\n :getDistributionDescription=\"getDistributionDescription\"\n :openModal=\"openModal\"\n :getDistributionTitle=\"getDistributionTitle\"\n :showDownloadUrls=\"showDownloadUrls\"\n :isUrlInvalid=\"isUrlInvalid\"\n />\n </div>\n <hr class=\"distributions-header-bottom-hr\">\n </div>\n</template>\n\n<script>\nimport {mapGetters} from \"vuex\";\nimport DownloadAllDistributions\n from \"../../datasetDetails/distributions/DownloadAllDistributions\";\n\nexport default {\n name: \"DistributionsHeader\",\n components: {DownloadAllDistributions},\n props: [\n 'getDistributionDescription',\n 'openModal',\n 'getDistributionTitle',\n 'showDownloadUrls',\n 'isUrlInvalid',\n ],\n data() {\n return {\n downloadAllTop: this.$env.content.datasetDetails.bulkDownload.buttonPosition === \"top\"\n };\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getDistributions',\n 'getLanguages'\n ])\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n .distributions-header-title {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n\n .distributions-header-title-title {\n margin-right: 8px;\n }\n\n .distributions-header-title-count {\n &::before {\n content: '('\n }\n &::after {\n content: ')'\n }\n }\n</style>\n"],"names":["_sfc_main","DownloadAllDistributions","mapGetters","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_openBlock","_createElementBlock","_createElementVNode","_ctx","_toDisplayString","_cache","_createTextVNode","$data","_createBlock","_component_download_all_distributions","$props","_createCommentVNode"],"mappings":";;;;;AAsCA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY,EAAC,0BAAAC,EAAwB;AAAA,EACrC,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA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,QAC1C,kBAAkBA,EAAgB;AAAA,QAClC,cAAcA,EAAY;AAAA,kJA1BnCC,EAAA,IAAA,EAAA;AAAA;IAAAN,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA;AAAA,oBA6BIJ,EAA2C,MAAA,EAAvC,OAAM,iCAAgC,GAAA,MAAA,EAAA;AAAA;;;"}
1
+ {"version":3,"file":"DistributionsHeader.vue.mjs","sources":["../../../lib/datasetDetails/distributions/DistributionsHeader.vue"],"sourcesContent":["<template>\n <div class=\"distributions-header-container w-100\">\n <!-- Adjusting the container for correct alignment -->\n <div class=\"distributions-header-title-container dsd-item d-flex flex-column align-items-start\" style=\"position: relative; left: -15px;\">\n <div class=\"distributions-header-title\">\n <h2 :title=\"$t('message.tooltip.datasetDetails.distribution')\"\n data-toggle=\"tooltip\"\n data-placement=\"top\"\n data-cy=\"dataset-distributions\"\n class=\"distributions-header-title-title\">\n {{ $t('message.metadata.distributions') }} \n </h2>\n \n <div class=\"distributions-header-title-count-container\">\n <h3 class=\"distributions-header-title-count\">{{ getDistributions ? getDistributions.length.toLocaleString('fi') : 0 }}</h3>\n </div>\n \n </div>\n <download-all-distributions\n v-if=\"downloadAllTop\"\n :primary=\"true\"\n :small=\"true\"\n :getDistributions=\"getDistributions\"\n :getDistributionDescription=\"getDistributionDescription\"\n :openModal=\"openModal\"\n :getDistributionTitle=\"getDistributionTitle\"\n :showDownloadUrls=\"showDownloadUrls\"\n :isUrlInvalid=\"isUrlInvalid\"\n />\n </div>\n <hr class=\"distributions-header-bottom-hr\">\n </div>\n</template>\n\n<script>\nimport {mapGetters} from \"vuex\";\nimport DownloadAllDistributions\n from \"../../datasetDetails/distributions/DownloadAllDistributions\";\n\nexport default {\n name: \"DistributionsHeader\",\n components: {DownloadAllDistributions},\n props: [\n 'getDistributionDescription',\n 'openModal',\n 'getDistributionTitle',\n 'showDownloadUrls',\n 'isUrlInvalid',\n ],\n data() {\n return {\n downloadAllTop: this.$env.content.datasetDetails.bulkDownload.buttonPosition === \"top\"\n };\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getDistributions',\n 'getLanguages'\n ])\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n .distributions-header-title {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n\n .distributions-header-title-title {\n margin-right: 8px;\n }\n\n .distributions-header-title-count {\n &::before {\n content: '('\n }\n &::after {\n content: ')'\n }\n }\n</style>\n"],"names":["_sfc_main","DownloadAllDistributions","mapGetters","_hoisted_1","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_openBlock","_createElementBlock","_createElementVNode","_hoisted_2","_ctx","_toDisplayString","_cache","_createTextVNode","$data","_createBlock","_component_download_all_distributions","$props","_createCommentVNode"],"mappings":";;;;;AAuCA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY,EAAC,0BAAAC,EAAwB;AAAA,EACrC,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,gBAAgB,KAAK,KAAK,QAAQ,eAAe,aAAa,mBAAmB;AAAA;EAEpF;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,kBAAkB;AAAA,MAC9B;AAAA,MACA;AAAA,KACD;AAAA,EACF;AACH,GA3DOC,IAAA,EAAA,OAAM,uCAAsC;EAE1C,OAAM;AAAA,EAAqF,OAAA,EAAwC,UAAA,YAAA,MAAA,QAAA;GACjIC,IAAA,EAAA,OAAM,6BAA4B,GAJ7CC,IAAA,CAAA,OAAA,GAaaC,IAAA,EAAA,OAAM,6CAA4C,GACjDC,IAAA,EAAA,OAAM,mCAAkC;;;AAbpD,SAAAC,EAAA,GAAAC,EA8BM,OA9BNN,GA8BM;AAAA,IA5BJO,EA0BM,OA1BNC,GA0BM;AAAA,MAzBJD,EAaM,OAbNN,GAaM;AAAA,QAZJM,EAMK,MAAA;AAAA,UANA,OAAOE,EAAE,GAAA,6CAAA;AAAA,UACV,eAAY;AAAA,UACZ,kBAAe;AAAA,UACf,WAAQ;AAAA,UACR,OAAM;AAAA,QACL,GAAAC,EAAAD,EAAA,GAVb,gCAAA,CAAA,GAAA,GAAAP,CAAA;AAAA,QAAAS,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA;AAAA,QAaQL,EAEM,OAFNJ,GAEM;AAAA,UADJI,EAA2H,MAA3HH,GAAgDM,EAAAD,EAAA,mBAAmBA,EAAgB,iBAAC,OAAO,eAAc,IAAA,IAAA,CAAA,GAAA,CAAA;AAAA;;MAdnHE,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA;AAAA,MAmBcC,EAAc,uBADtBC,EAUEC,GAAA;AAAA,QA5BR,KAAA;AAAA,QAoBS,SAAS;AAAA,QACT,OAAO;AAAA,QACP,kBAAkBN,EAAgB;AAAA,QAClC,4BAA4BO,EAA0B;AAAA,QACtD,WAAWA,EAAS;AAAA,QACpB,sBAAsBA,EAAoB;AAAA,QAC1C,kBAAkBA,EAAgB;AAAA,QAClC,cAAcA,EAAY;AAAA,kJA3BnCC,EAAA,IAAA,EAAA;AAAA;IAAAN,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA;AAAA,oBA8BIL,EAA2C,MAAA,EAAvC,OAAM,iCAAgC,GAAA,MAAA,EAAA;AAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadAllDistributions.vue.mjs","sources":["../../../lib/datasetDetails/distributions/DownloadAllDistributions.vue"],"sourcesContent":["<template>\n <div v-if=\"getDistributions.length > 1 && getCatalog.is_part_of !== 'erpd'\" class=\"dsd-download-all-distributions-button\">\n <pv-button v-if=\"isLoadingAllDistributionFiles\" :small=\"small\" :rounded=\"true\" :primary=\"primary\" :download=\"true\"\n class=\"download-all-btn\"\n data-toggle=\"modal\" data-target=\"#downloadAllModal\"\n >\n <div class=\"loading-spinner\"></div>\n </pv-button>\n <pv-button v-else class=\"download-all-btn\" :small=\"small\" :rounded=\"true\" :primary=\"primary\" :download=\"true\" :action=\"() => openModal(trackAndDownloadAllDistributions, true)\">\n {{ $t('message.datasetDetails.datasets.downloadAll') }}\n </pv-button>\n <div class=\"modal fade\" id=\"downloadAllModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"download progress\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ $t('message.datasetDetails.datasets.modal.downloadProgress') }}</h3>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"progress\">\n <div class=\"progress-bar\" role=\"progressbar\" :style=\"{width: `${downloadProgress}%`}\" :aria-valuenow=\"downloadProgress\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n </div>\n <div>\n {{ $t('message.datasetDetails.datasets.modal.downloadingFiles') }} {{ downloadedFilesCounter.toLocaleString('fi') }}/{{getDistributions.length.toLocaleString('fi')}}\n </div>\n <div class=\"d-flex justify-content-between align-items-center\">\n <div>{{ $t('message.datasetDetails.datasets.modal.notDownloaded') }} {{ failedDownloads.toLocaleString('fi') }}</div>\n <i class=\"material-icons help-icon\" data-toggle=\"tooltip\" data-placement=\"bottom\" :title=\"$t('message.datasetDetails.datasets.modal.notDownloadedTooltip')\">help</i>\n </div>\n <div class=\"d-flex justify-content-between align-items-center\">\n <div>{{ $t('message.datasetDetails.datasets.modal.zipNumberOfFiles', { number: numberOfFilesToZip.toLocaleString('fi') }) }}\n <span v-if=\"isLoadingAllDistributionFiles && numberOfFilesToZip > 0\">\n {{ $t('message.datasetDetails.datasets.modal.coupleOfMinutes') }}\n </span> <span v-else-if=\"isLoadingAllDistributionFiles\">\n {{ $t('message.datasetDetails.datasets.modal.waitingForDownload')}}\n </span>\n </div>\n <div v-if=\"isGeneratingZip\" class=\"spinner-grow text-primary\" role=\"status\">\n <span class=\"sr-only\">Loading...</span>\n </div>\n <i v-else-if=\"isGeneratingZipDone\" class=\"material-icons check-icon\">check_circle</i>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">{{ $t('message.datasetDetails.datasets.modal.close') }}</button>\n <button v-if=\"!downloadAllSuccess && !downloadAllError\" type=\"button\" class=\"btn btn-danger\" data-dismiss=\"modal\" @click=\"cancelDownloadAll(cancelDownloadAllAxiosRequestSource)\">\n {{ $t('message.datasetDetails.datasets.modal.cancel') }}\n </button>\n <button v-else-if=\"downloadAllError\" type=\"button\" class=\"btn btn-danger\" @click=\"trackAndDownloadAllDistributions()\">{{ $t('message.datasetDetails.datasets.modal.error') }}</button>\n <button v-else-if=\"downloadAllSuccess\" type=\"button\" class=\"btn btn-success\" data-dismiss=\"modal\">{{ $t('message.datasetDetails.datasets.modal.okay') }}</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { mapGetters } from \"vuex\";\nimport { onUnmounted } from 'vue';\nimport { useRouter } from 'vue-router';\n\nimport {has, isNil} from \"lodash\";\nimport axios from \"axios\";\nimport { saveAs } from 'file-saver';\nimport $ from \"jquery\";\nimport { getTranslationFor } from \"../../utils/helpers\";\n\n\nexport default {\n name: \"DownloadAllDistributions\",\n props: [\n 'getDistributionDescription',\n 'getDistributionTitle',\n 'openModal',\n 'isUrlInvalid',\n 'showDownloadUrls',\n 'primary',\n 'small'\n ],\n computed: {\n ...mapGetters('datasetDetails', [\n 'getDistributions',\n 'getTitle',\n 'getCatalog',\n 'getLanguages'\n ]),\n files() {\n const cutFormatEnding = string => (string.lastIndexOf('.') !== -1 ? string.substring(0, string.lastIndexOf('.')) : string);\n const getFormat = (distribution) => {\n if (has(distribution, 'format.id') && !isNil(distribution.format.id)) {\n const type = distribution.format.id;\n return type.lastIndexOf('.') === -1 ? type.toLowerCase() : type.substring(type.lastIndexOf('.') + 1, type.length).toLowerCase();\n }\n return '';\n };\n const getFileName = (distribution, i) =>\n `${cutFormatEnding(this.getDistributionTitle(distribution)).substring(0, this.bulkDownload.MAX_FILE_TITLE_LENGTH)\n .replace(/\\//g, ' ').trim()}-${i}`\n || `${cutFormatEnding(this.getDistributionDescription(distribution)).substring(0, this.bulkDownload.MAX_FILE_TITLE_LENGTH)\n .replace(/\\//g, ' ').trim()}-${i}`;\n const getUrls = distribution => (this.showDownloadUrls(distribution) ?\n { accessUrl: `${distribution.accessUrl[0]}`, downloadUrl: `${distribution.downloadUrls[0]}` }\n : { accessUrl: `${distribution.accessUrl[0]}` });\n const getFileNameForCSV = distribution => this.getDistributionTitle(distribution).replace(/,/g, '')\n || this.getDistributionDescription(distribution).replace(/,/g, '');\n const files = this.getDistributions\n .map((distribution, i) => ({\n title: getFileName(distribution, i + 1), ...getUrls(distribution), format: getFormat(distribution), csvReportTitle: getFileNameForCSV(distribution),\n }));\n return files\n }\n },\n data() {\n return {\n downloadedFilesCounter: 0,\n numberOfFilesToZip: 0,\n downloadProgress: 0,\n failedDownloads: 0,\n isGeneratingZip: false,\n isGeneratingZipDone: false,\n isLoadingAllDistributionFiles: false,\n cancelDownloadAllAxiosRequestSource: null,\n isDownloadAllDistributionsCanceled: false,\n downloadAllSuccess: false,\n downloadAllError: false,\n bulkDownload: {\n MAX_FILE_TITLE_LENGTH: this.$env.content.datasetDetails.bulkDownload.MAX_FILE_TITLE_LENGTH,\n TIMEOUT_MS: this.$env.content.datasetDetails.bulkDownload.TIMEOUT_MS,\n }\n }\n },\n methods: {\n getTranslationFor,\n async fetchDistributionFiles(zip, files, folder, getContentTypeFormat) {\n const csvReportArray = [];\n let csvReport = 'filename,status, issue_cause downloadURL, issue_cause accessURL\\n';\n let csvDownloadURLIssue;\n const problematicFormats = ['wms', 'wfs'];\n\n const CancelToken = axios.CancelToken;\n this.cancelDownloadAllAxiosRequestSource = CancelToken.source();\n const axiosInstance = this.$bulkDownloadAxiosInstance;\n const requestSettings = { responseType: 'blob', cancelToken: this.cancelDownloadAllAxiosRequestSource.token, timeout: this.bulkDownload.TIMEOUT_MS };\n\n const promises = files.map(async (file) => {\n const problematicFormat = problematicFormats.find(format => format === file.format);\n if (!problematicFormat) {\n let isRejected = true;\n let responseData;\n let fileFormat = file.format;\n\n // try to download from download url\n if (has(file, 'downloadUrl')) {\n responseData = await axiosInstance.get(file.downloadUrl, requestSettings).then((responseDownloadUrl) => {\n if (responseDownloadUrl.status === 200) {\n isRejected = false;\n if (!file.format.length > 0) fileFormat = getContentTypeFormat(responseDownloadUrl.headers['content-type']);\n csvReportArray.push([file.csvReportTitle, 'delivered']);\n return responseDownloadUrl.data;\n }\n return Promise.reject(new Error(responseDownloadUrl.statusText));\n }).catch((error) => {\n isRejected = true;\n csvDownloadURLIssue = error;\n });\n } else csvDownloadURLIssue = 'no download url available';\n if (this.isUrlInvalid(file.downloadUrl)) {\n csvReportArray.push([file.csvReportTitle, 'issue', 'url is invalid']);\n }\n // try to download from access url\n if (isRejected) {\n responseData = await axiosInstance.get(file.accessUrl, requestSettings).then((responseAccessUrl) => {\n if (responseAccessUrl.status === 200) {\n isRejected = false;\n if (file.format.length > 0) fileFormat = getContentTypeFormat(responseAccessUrl.headers['content-type']);\n csvReportArray.push([file.csvReportTitle, 'delivered', csvDownloadURLIssue]);\n return responseAccessUrl.data;\n }\n return Promise.reject(new Error(responseAccessUrl.statusText));\n }).catch((error) => {\n isRejected = true;\n csvReportArray.push([file.csvReportTitle, 'issue', csvDownloadURLIssue, error]);\n });\n }\n if (!isRejected) folder.file(`${file.title}.${fileFormat}`, responseData, { binary: true });\n if (!this.isDownloadAllDistributionsCanceled) {\n this.downloadedFilesCounter += 1;\n this.downloadProgress = Math.floor(100 * this.downloadedFilesCounter / this.getDistributions.length);\n if (isRejected) this.failedDownloads += 1;\n } else {\n this.downloadedFilesCounter = 0;\n this.downloadProgress = 0;\n this.failedDownloads = 0;\n }\n } else csvReportArray.push([file.csvReportTitle, 'issue', `We can't download ${problematicFormat} files using the download all button. Please try to download this file using the download button next to the file name.`]);\n });\n\n await Promise.all(promises);\n csvReportArray.forEach((row) => {\n csvReport += row.join(',');\n csvReport += '\\n';\n });\n zip.file('file_report.csv', csvReport, { binary: true });\n },\n hideDownloadAllModal() {\n $('#downloadAllModal').modal('hide');\n },\n generateAndSaveZip(zip, zipName) {\n if (!this.isDownloadAllDistributionsCanceled) {\n this.numberOfFilesToZip = Object.keys(zip.files).length;\n this.isGeneratingZip = true;\n }\n\n class UserInterruptException {\n constructor(message) {\n this.message = message;\n this.name = 'UserInterruptException';\n }\n }\n\n zip.generateAsync({ type: 'blob', compression: 'DEFLATE' }, () => {\n if (this.isDownloadAllDistributionsCanceled) throw new UserInterruptException('user canceled generate zip operation');\n })\n .then((blob) => {\n this.isGeneratingZip = false;\n this.isGeneratingZipDone = true;\n this.isLoadingAllDistributionFiles = false;\n this.downloadAllSuccess = true;\n saveAs(blob, zipName);\n })\n .catch((e) => {\n this.isGeneratingZip = false;\n this.isDownloadAllDistributionsCanceled = false;\n this.isLoadingAllDistributionFiles = false;\n this.downloadAllError = true;\n this.downloadedFilesCounter = 0;\n this.downloadProgress = 0;\n this.numberOfFilesToZip = 0;\n console.warn(e); // eslint-disable-line\n });\n\n // works with chrome => to make it compatible to more browsers look here https://jimmywarting.github.io/StreamSaver.js/examples/saving-multiple-files.html open developer tools and find saving-multiple-files.html\n // install stream saver and import it + script src=\"https://cdn.jsdelivr.net/npm/web-streams-polyfill@2.0.2/dist/ponyfill.min.js\"\n // if we don't want to use his service worker we can configure something (I think we have to change the mitm url) => read the api https://jimmywarting.github.io/StreamSaver.js\n // I think IE will never work with this solution\n /* const writeStream = streamSaver.createWriteStream(zipName).getWriter();\n zip.generateInternalStream({ type: 'uint8array', streamFiles: true })\n .on('data', data => writeStream.write(data))\n .on('error', err => console.error(err))\n .on('end', () => writeStream.close())\n .resume(); */\n },\n cancelDownloadAll(source) {\n // stops axios operations\n source.cancel('user canceled axios operation');\n // stops zip operation\n this.isDownloadAllDistributionsCanceled = true;\n },\n async trackAndDownloadAllDistributions() {\n if (this.$piwik && this.$piwik.trackDownload) {\n this.$piwik.trackDownload(\n window.location.href,\n {\n files: JSON.stringify(this.files),\n downloadAll: 'true',\n format: 'all',\n }\n );\n }\n return await this.downloadAllDistributions();\n },\n async downloadAllDistributions() {\n this.downloadedFilesCounter = 0;\n this.downloadProgress = 0;\n this.failedDownloads = 0;\n this.numberOfFilesToZip = 0;\n this.isGeneratingZip = false;\n this.isGeneratingZipDone = false;\n this.isLoadingAllDistributionFiles = true;\n this.isDownloadAllDistributionsCanceled = false;\n this.downloadAllSuccess = false;\n this.downloadAllError = false;\n const getContentTypeFormat = (contentType) => {\n const startIndex = contentType.lastIndexOf('/') + 1;\n const endIndex = contentType.indexOf(';') !== -1 ? contentType.indexOf(';') : contentType.length;\n return contentType.substring(startIndex, endIndex);\n };\n\n const {default: JSZip} = await import('jszip');\n const zip = new JSZip();\n const zipName = `${this.getTranslationFor(this.getTitle, this.$route.query.locale, this.getLanguages)}.zip`;\n const folder = zip.folder(this.getTranslationFor(this.getCatalog.title, this.$route.query.locale, this.getLanguages));\n await this.fetchDistributionFiles(zip, this.files, folder, getContentTypeFormat);\n await this.generateAndSaveZip(zip, zipName);\n },\n // handle navigation to extern website (cancel bulk download and hide modal)\n beforeWindowUnload(e) {\n if (this.isLoadingAllDistributionFiles && !this.isDownloadAllDistributionsCanceled) {\n e.preventDefault();\n // Chrome requires returnValue to be set\n e.returnValue = ''; // eslint-disable-line\n }\n }\n },\n created() {\n window.addEventListener('beforeunload', this.beforeWindowUnload);\n },\n beforeUnmount() {\n window.removeEventListener('beforeunload', this.beforeWindowUnload);\n },\n setup() {\n const router = useRouter();\n \n onUnmounted(() => {\n router.beforeEach((to, from, next) => {\n if (this.isLoadingAllDistributionFiles && !this.isDownloadAllDistributionsCanceled) {\n const answer = window.confirm(this.$t('message.datasetDetails.datasets.leavePageWindow.text')); // eslint-disable-line\n if (answer) {\n // if modal is open we have to hide it when user tries to navigate back\n this.hideDownloadAllModal();\n this.cancelDownloadAll(this.cancelDownloadAllAxiosRequestSource);\n next();\n } else {\n next(false);\n }\n } else {\n this.hideDownloadAllModal();\n next();\n }\n })();\n })\n },\n}\n</script>\n\n<style scoped>\n\n</style>\n"],"names":["_sfc_main","mapGetters","cutFormatEnding","string","getFormat","distribution","has","isNil","type","getFileName","i","getUrls","getFileNameForCSV","getTranslationFor","zip","files","folder","getContentTypeFormat","csvReportArray","csvReport","csvDownloadURLIssue","problematicFormats","CancelToken","axios","axiosInstance","requestSettings","promises","file","problematicFormat","format","isRejected","responseData","fileFormat","responseDownloadUrl","error","responseAccessUrl","row","$","zipName","UserInterruptException","message","blob","saveAs","e","source","contentType","startIndex","endIndex","JSZip","router","useRouter","onUnmounted","to","from","next","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_17","_ctx","_openBlock","_createElementBlock","_hoisted_1","$data","_createBlock","_component_pv_button","$props","_withCtx","_cache","_createElementVNode","$options","_createTextVNode","_toDisplayString","_hoisted_2","_hoisted_3","_normalizeStyle","_hoisted_13","_hoisted_14","_createCommentVNode","_hoisted_15","_hoisted_16","_hoisted_18","$event","_hoisted_19"],"mappings":";;;;;;;;;AAuEA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,kBAAkB;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,QAAQ;AACN,YAAMC,IAAkB,CAAAC,MAAWA,EAAO,YAAY,GAAG,MAAM,KAAKA,EAAO,UAAU,GAAGA,EAAO,YAAY,GAAG,CAAC,IAAIA,GAC7GC,IAAY,CAACC,MAAiB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AllDistributions.vue.mjs","sources":["../../../lib/datasetDetails/distributions/DownloadAllDistributions.vue"],"sourcesContent":["<template>\n <div v-if=\"getDistributions.length > 1 && getCatalog.is_part_of !== 'erpd'\" class=\"dsd-download-all-distributions-button\">\n <pv-button v-if=\"isLoadingAllDistributionFiles\" :small=\"small\" :rounded=\"true\" :primary=\"primary\" :download=\"true\"\n class=\"download-all-btn\"\n data-toggle=\"modal\" data-target=\"#downloadAllModal\"\n > \n <div class=\"loading-spinner\"></div>\n </pv-button>\n <pv-button v-else class=\"download-all-btn\" :small=\"small\" :rounded=\"true\" :primary=\"primary\" :download=\"true\" :action=\"() => openModal(trackAndDownloadAllDistributions, true)\">\n {{ $t('message.datasetDetails.datasets.downloadAll') }}\n </pv-button>\n <div class=\"modal fade\" id=\"downloadAllModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"download progress\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\">{{ $t('message.datasetDetails.datasets.modal.downloadProgress') }}</h3>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"progress\">\n <div class=\"progress-bar\" role=\"progressbar\" :style=\"{width: `${downloadProgress}%`}\" :aria-valuenow=\"downloadProgress\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n </div>\n <div>\n {{ $t('message.datasetDetails.datasets.modal.downloadingFiles') }} {{ downloadedFilesCounter.toLocaleString('fi') }}/{{getDistributions.length.toLocaleString('fi')}}\n </div>\n <div class=\"d-flex justify-content-between align-items-center\">\n <div>{{ $t('message.datasetDetails.datasets.modal.notDownloaded') }} {{ failedDownloads.toLocaleString('fi') }}</div>\n <i class=\"material-icons help-icon\" data-toggle=\"tooltip\" data-placement=\"bottom\" :title=\"$t('message.datasetDetails.datasets.modal.notDownloadedTooltip')\">help</i>\n </div>\n <div class=\"d-flex justify-content-between align-items-center\">\n <div>{{ $t('message.datasetDetails.datasets.modal.zipNumberOfFiles', { number: numberOfFilesToZip.toLocaleString('fi') }) }}\n <span v-if=\"isLoadingAllDistributionFiles && numberOfFilesToZip > 0\">\n {{ $t('message.datasetDetails.datasets.modal.coupleOfMinutes') }}\n </span> <span v-else-if=\"isLoadingAllDistributionFiles\">\n {{ $t('message.datasetDetails.datasets.modal.waitingForDownload')}}\n </span>\n </div>\n <div v-if=\"isGeneratingZip\" class=\"spinner-grow text-primary\" role=\"status\">\n <span class=\"sr-only\">Loading...</span>\n </div>\n <i v-else-if=\"isGeneratingZipDone\" class=\"material-icons check-icon\">check_circle</i>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">{{ $t('message.datasetDetails.datasets.modal.close') }}</button>\n <button v-if=\"!downloadAllSuccess && !downloadAllError\" type=\"button\" class=\"btn btn-danger\" data-dismiss=\"modal\" @click=\"cancelDownloadAll(cancelDownloadAllAxiosRequestSource)\">\n {{ $t('message.datasetDetails.datasets.modal.cancel') }}\n </button>\n <button v-else-if=\"downloadAllError\" type=\"button\" class=\"btn btn-danger\" @click=\"trackAndDownloadAllDistributions()\">{{ $t('message.datasetDetails.datasets.modal.error') }}</button>\n <button v-else-if=\"downloadAllSuccess\" type=\"button\" class=\"btn btn-success\" data-dismiss=\"modal\">{{ $t('message.datasetDetails.datasets.modal.okay') }}</button>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { mapGetters } from \"vuex\";\nimport { onUnmounted } from 'vue';\nimport { useRouter } from 'vue-router';\n\nimport {has, isNil} from \"lodash\";\nimport axios from \"axios\";\nimport { saveAs } from 'file-saver';\nimport $ from \"jquery\";\nimport { getTranslationFor } from \"../../utils/helpers\";\n\n\nexport default {\n name: \"DownloadAllDistributions\",\n props: [\n 'getDistributionDescription',\n 'getDistributionTitle',\n 'openModal',\n 'isUrlInvalid',\n 'showDownloadUrls',\n 'primary',\n 'small'\n ],\n computed: {\n ...mapGetters('datasetDetails', [\n 'getDistributions',\n 'getTitle',\n 'getCatalog',\n 'getLanguages'\n ]),\n files() {\n const cutFormatEnding = string => (string.lastIndexOf('.') !== -1 ? string.substring(0, string.lastIndexOf('.')) : string);\n const getFormat = (distribution) => {\n if (has(distribution, 'format.id') && !isNil(distribution.format.id)) {\n const type = distribution.format.id;\n return type.lastIndexOf('.') === -1 ? type.toLowerCase() : type.substring(type.lastIndexOf('.') + 1, type.length).toLowerCase();\n }\n return '';\n };\n const getFileName = (distribution, i) =>\n `${cutFormatEnding(this.getDistributionTitle(distribution)).substring(0, this.bulkDownload.MAX_FILE_TITLE_LENGTH)\n .replace(/\\//g, ' ').trim()}-${i}`\n || `${cutFormatEnding(this.getDistributionDescription(distribution)).substring(0, this.bulkDownload.MAX_FILE_TITLE_LENGTH)\n .replace(/\\//g, ' ').trim()}-${i}`;\n const getUrls = distribution => (this.showDownloadUrls(distribution) ?\n { accessUrl: `${distribution.accessUrl[0]}`, downloadUrl: `${distribution.downloadUrls[0]}` }\n : { accessUrl: `${distribution.accessUrl[0]}` });\n const getFileNameForCSV = distribution => this.getDistributionTitle(distribution).replace(/,/g, '')\n || this.getDistributionDescription(distribution).replace(/,/g, '');\n const files = this.getDistributions\n .map((distribution, i) => ({\n title: getFileName(distribution, i + 1), ...getUrls(distribution), format: getFormat(distribution), csvReportTitle: getFileNameForCSV(distribution),\n }));\n return files\n }\n },\n data() {\n return {\n downloadedFilesCounter: 0,\n numberOfFilesToZip: 0,\n downloadProgress: 0,\n failedDownloads: 0,\n isGeneratingZip: false,\n isGeneratingZipDone: false,\n isLoadingAllDistributionFiles: false,\n cancelDownloadAllAxiosRequestSource: null,\n isDownloadAllDistributionsCanceled: false,\n downloadAllSuccess: false,\n downloadAllError: false,\n bulkDownload: {\n MAX_FILE_TITLE_LENGTH: this.$env.content.datasetDetails.bulkDownload.MAX_FILE_TITLE_LENGTH,\n TIMEOUT_MS: this.$env.content.datasetDetails.bulkDownload.TIMEOUT_MS,\n }\n }\n },\n methods: {\n getTranslationFor,\n async fetchDistributionFiles(zip, files, folder, getContentTypeFormat) {\n const csvReportArray = [];\n let csvReport = 'filename,status, issue_cause downloadURL, issue_cause accessURL\\n';\n let csvDownloadURLIssue;\n const problematicFormats = ['wms', 'wfs'];\n\n const CancelToken = axios.CancelToken;\n this.cancelDownloadAllAxiosRequestSource = CancelToken.source();\n const axiosInstance = this.$bulkDownloadAxiosInstance;\n const requestSettings = { responseType: 'blob', cancelToken: this.cancelDownloadAllAxiosRequestSource.token, timeout: this.bulkDownload.TIMEOUT_MS };\n\n const promises = files.map(async (file) => {\n const problematicFormat = problematicFormats.find(format => format === file.format);\n if (!problematicFormat) {\n let isRejected = true;\n let responseData;\n let fileFormat = file.format;\n\n // try to download from download url\n if (has(file, 'downloadUrl')) {\n responseData = await axiosInstance.get(file.downloadUrl, requestSettings).then((responseDownloadUrl) => {\n if (responseDownloadUrl.status === 200) {\n isRejected = false;\n if (!file.format.length > 0) fileFormat = getContentTypeFormat(responseDownloadUrl.headers['content-type']);\n csvReportArray.push([file.csvReportTitle, 'delivered']);\n return responseDownloadUrl.data;\n }\n return Promise.reject(new Error(responseDownloadUrl.statusText));\n }).catch((error) => {\n isRejected = true;\n csvDownloadURLIssue = error;\n });\n } else csvDownloadURLIssue = 'no download url available';\n if (this.isUrlInvalid(file.downloadUrl)) {\n csvReportArray.push([file.csvReportTitle, 'issue', 'url is invalid']);\n }\n // try to download from access url\n if (isRejected) {\n responseData = await axiosInstance.get(file.accessUrl, requestSettings).then((responseAccessUrl) => {\n if (responseAccessUrl.status === 200) {\n isRejected = false;\n if (file.format.length > 0) fileFormat = getContentTypeFormat(responseAccessUrl.headers['content-type']);\n csvReportArray.push([file.csvReportTitle, 'delivered', csvDownloadURLIssue]);\n return responseAccessUrl.data;\n }\n return Promise.reject(new Error(responseAccessUrl.statusText));\n }).catch((error) => {\n isRejected = true;\n csvReportArray.push([file.csvReportTitle, 'issue', csvDownloadURLIssue, error]);\n });\n }\n if (!isRejected) folder.file(`${file.title}.${fileFormat}`, responseData, { binary: true });\n if (!this.isDownloadAllDistributionsCanceled) {\n this.downloadedFilesCounter += 1;\n this.downloadProgress = Math.floor(100 * this.downloadedFilesCounter / this.getDistributions.length);\n if (isRejected) this.failedDownloads += 1;\n } else {\n this.downloadedFilesCounter = 0;\n this.downloadProgress = 0;\n this.failedDownloads = 0;\n }\n } else csvReportArray.push([file.csvReportTitle, 'issue', `We can't download ${problematicFormat} files using the download all button. Please try to download this file using the download button next to the file name.`]);\n });\n\n await Promise.all(promises);\n csvReportArray.forEach((row) => {\n csvReport += row.join(',');\n csvReport += '\\n';\n });\n zip.file('file_report.csv', csvReport, { binary: true });\n },\n hideDownloadAllModal() {\n $('#downloadAllModal').modal('hide');\n },\n generateAndSaveZip(zip, zipName) {\n if (!this.isDownloadAllDistributionsCanceled) {\n this.numberOfFilesToZip = Object.keys(zip.files).length;\n this.isGeneratingZip = true;\n }\n\n class UserInterruptException {\n constructor(message) {\n this.message = message;\n this.name = 'UserInterruptException';\n }\n }\n\n zip.generateAsync({ type: 'blob', compression: 'DEFLATE' }, () => {\n if (this.isDownloadAllDistributionsCanceled) throw new UserInterruptException('user canceled generate zip operation');\n })\n .then((blob) => {\n this.isGeneratingZip = false;\n this.isGeneratingZipDone = true;\n this.isLoadingAllDistributionFiles = false;\n this.downloadAllSuccess = true;\n saveAs(blob, zipName);\n })\n .catch((e) => {\n this.isGeneratingZip = false;\n this.isDownloadAllDistributionsCanceled = false;\n this.isLoadingAllDistributionFiles = false;\n this.downloadAllError = true;\n this.downloadedFilesCounter = 0;\n this.downloadProgress = 0;\n this.numberOfFilesToZip = 0;\n console.warn(e); // eslint-disable-line\n });\n\n // works with chrome => to make it compatible to more browsers look here https://jimmywarting.github.io/StreamSaver.js/examples/saving-multiple-files.html open developer tools and find saving-multiple-files.html\n // install stream saver and import it + script src=\"https://cdn.jsdelivr.net/npm/web-streams-polyfill@2.0.2/dist/ponyfill.min.js\"\n // if we don't want to use his service worker we can configure something (I think we have to change the mitm url) => read the api https://jimmywarting.github.io/StreamSaver.js\n // I think IE will never work with this solution\n /* const writeStream = streamSaver.createWriteStream(zipName).getWriter();\n zip.generateInternalStream({ type: 'uint8array', streamFiles: true })\n .on('data', data => writeStream.write(data))\n .on('error', err => console.error(err))\n .on('end', () => writeStream.close())\n .resume(); */\n },\n cancelDownloadAll(source) {\n // stops axios operations\n source.cancel('user canceled axios operation');\n // stops zip operation\n this.isDownloadAllDistributionsCanceled = true;\n },\n async trackAndDownloadAllDistributions() {\n if (this.$piwik && this.$piwik.trackDownload) {\n this.$piwik.trackDownload(\n window.location.href,\n {\n files: JSON.stringify(this.files),\n downloadAll: 'true',\n format: 'all',\n }\n );\n }\n return await this.downloadAllDistributions();\n },\n async downloadAllDistributions() {\n this.downloadedFilesCounter = 0;\n this.downloadProgress = 0;\n this.failedDownloads = 0;\n this.numberOfFilesToZip = 0;\n this.isGeneratingZip = false;\n this.isGeneratingZipDone = false;\n this.isLoadingAllDistributionFiles = true;\n this.isDownloadAllDistributionsCanceled = false;\n this.downloadAllSuccess = false;\n this.downloadAllError = false;\n const getContentTypeFormat = (contentType) => {\n const startIndex = contentType.lastIndexOf('/') + 1;\n const endIndex = contentType.indexOf(';') !== -1 ? contentType.indexOf(';') : contentType.length;\n return contentType.substring(startIndex, endIndex);\n };\n\n const {default: JSZip} = await import('jszip');\n const zip = new JSZip();\n const zipName = `${this.getTranslationFor(this.getTitle, this.$route.query.locale, this.getLanguages)}.zip`;\n const folder = zip.folder(this.getTranslationFor(this.getCatalog.title, this.$route.query.locale, this.getLanguages));\n await this.fetchDistributionFiles(zip, this.files, folder, getContentTypeFormat);\n await this.generateAndSaveZip(zip, zipName);\n },\n // handle navigation to extern website (cancel bulk download and hide modal)\n beforeWindowUnload(e) {\n if (this.isLoadingAllDistributionFiles && !this.isDownloadAllDistributionsCanceled) {\n e.preventDefault();\n // Chrome requires returnValue to be set\n e.returnValue = ''; // eslint-disable-line\n }\n }\n },\n created() {\n window.addEventListener('beforeunload', this.beforeWindowUnload);\n },\n beforeUnmount() {\n window.removeEventListener('beforeunload', this.beforeWindowUnload);\n },\n setup() {\n const router = useRouter();\n \n onUnmounted(() => {\n router.beforeEach((to, from, next) => {\n if (this.isLoadingAllDistributionFiles && !this.isDownloadAllDistributionsCanceled) {\n const answer = window.confirm(this.$t('message.datasetDetails.datasets.leavePageWindow.text')); // eslint-disable-line\n if (answer) {\n // if modal is open we have to hide it when user tries to navigate back\n this.hideDownloadAllModal();\n this.cancelDownloadAll(this.cancelDownloadAllAxiosRequestSource);\n next();\n } else {\n next(false);\n }\n } else {\n this.hideDownloadAllModal();\n next();\n }\n })();\n })\n },\n}\n</script>\n\n<style scoped>\n\n</style>\n"],"names":["_sfc_main","mapGetters","cutFormatEnding","string","getFormat","distribution","has","isNil","type","getFileName","i","getUrls","getFileNameForCSV","getTranslationFor","zip","files","folder","getContentTypeFormat","csvReportArray","csvReport","csvDownloadURLIssue","problematicFormats","CancelToken","axios","axiosInstance","requestSettings","promises","file","problematicFormat","format","isRejected","responseData","fileFormat","responseDownloadUrl","error","responseAccessUrl","row","$","zipName","UserInterruptException","message","blob","saveAs","e","source","contentType","startIndex","endIndex","JSZip","router","useRouter","onUnmounted","to","from","next","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_17","_ctx","_openBlock","_createElementBlock","_hoisted_1","$data","_createBlock","_component_pv_button","$props","_withCtx","_cache","_createElementVNode","$options","_createTextVNode","_toDisplayString","_hoisted_2","_hoisted_3","_normalizeStyle","_hoisted_13","_hoisted_14","_createCommentVNode","_hoisted_15","_hoisted_16","_hoisted_18","$event","_hoisted_19"],"mappings":";;;;;;;;;AAuEA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL;AAAA,IACA;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