@piveau/piveau-hub-ui-modules 4.6.83 → 4.6.85

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.
Files changed (117) hide show
  1. package/dist/PvDataInfoBox/PvDataInfoBox.vue.mjs +1 -2
  2. package/dist/PvDataInfoBox/PvDataInfoBox.vue.mjs.map +1 -1
  3. package/dist/catalogues/CatalogPageDatasetCard.vue.mjs +6 -7
  4. package/dist/catalogues/CatalogPageDatasetCard.vue.mjs.map +1 -1
  5. package/dist/catalogues/Catalogues.vue.mjs +2 -2
  6. package/dist/citation/DatasetCitationTable.vue.mjs +2 -2
  7. package/dist/citation/DatasetCitationTable.vue.mjs.map +1 -1
  8. package/dist/composables/useRuntimeEnv.d.ts +1 -1
  9. package/dist/configurations/config-schema/configSchema.d.ts +1 -1
  10. package/dist/data-provider-interface/CatalogueMQA.vue.mjs +216 -226
  11. package/dist/data-provider-interface/CatalogueMQA.vue.mjs.map +1 -1
  12. package/dist/data-provider-interface/DPIMenu.vue.d.ts +3 -3
  13. package/dist/data-provider-interface/DataProviderInterface.vue.d.ts +7 -7
  14. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs +110 -106
  15. package/dist/data-provider-interface/components/AutocompleteInput.vue.mjs.map +1 -1
  16. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs +101 -82
  17. package/dist/data-provider-interface/components/ConditionalInput.vue.mjs.map +1 -1
  18. package/dist/data-provider-interface/components/DataFetchingComponent.vue.d.ts +1 -1
  19. package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs +2 -2
  20. package/dist/data-provider-interface/components/DataFetchingComponent.vue.mjs.map +1 -1
  21. package/dist/data-provider-interface/components/DistributionStepper.vue.mjs +3 -4
  22. package/dist/data-provider-interface/components/DistributionStepper.vue.mjs.map +1 -1
  23. package/dist/data-provider-interface/components/Dropup.vue.d.ts +1 -1
  24. package/dist/data-provider-interface/components/FileUpload.vue.d.ts +1 -1
  25. package/dist/data-provider-interface/components/FileUpload.vue.mjs +4 -4
  26. package/dist/data-provider-interface/components/FileUpload.vue.mjs.map +1 -1
  27. package/dist/data-provider-interface/components/Navigation.vue.d.ts +5 -5
  28. package/dist/data-provider-interface/components/SelectControlledGroup.vue.mjs +2 -3
  29. package/dist/data-provider-interface/components/SelectControlledGroup.vue.mjs.map +1 -1
  30. package/dist/data-provider-interface/views/DistributionOverview.vue.d.ts +2 -2
  31. package/dist/data-provider-interface/views/DistributionOverview.vue.mjs +4 -4
  32. package/dist/data-provider-interface/views/DraftsPage.vue.d.ts +2 -2
  33. package/dist/data-provider-interface/views/DraftsPage.vue.mjs +29 -34
  34. package/dist/data-provider-interface/views/DraftsPage.vue.mjs.map +1 -1
  35. package/dist/data-provider-interface/views/InputPage.vue.d.ts +7 -7
  36. package/dist/data-provider-interface/views/InputPage.vue.mjs +4 -6
  37. package/dist/data-provider-interface/views/InputPage.vue.mjs.map +1 -1
  38. package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.mjs +1 -1
  39. package/dist/data-provider-interface/views/OverviewPage/DatasetOverview.vue.mjs.map +1 -1
  40. package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.mjs +6 -6
  41. package/dist/data-provider-interface/views/OverviewPage/DistributionOverview.vue.mjs.map +1 -1
  42. package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.mjs +2 -2
  43. package/dist/data-provider-interface/views/OverviewPage/Properties/SpecialProp.vue.mjs.map +1 -1
  44. package/dist/data-provider-interface/views/OverviewPage.vue.d.ts +1 -1
  45. package/dist/data-provider-interface/views/OverviewPage.vue.mjs +2 -2
  46. package/dist/data-provider-interface/views/OverviewPage.vue.mjs.map +1 -1
  47. package/dist/data-provider-interface/views/PropertyChooser.vue.mjs +8 -8
  48. package/dist/data-provider-interface/views/PropertyChooser.vue.mjs.map +1 -1
  49. package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs +38 -38
  50. package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs.map +1 -1
  51. package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs +1 -2
  52. package/dist/datasetDetails/DatasetDetailsDataset.vue.mjs.map +1 -1
  53. package/dist/datasetDetails/DatasetDetailsQuality.vue.mjs +36 -36
  54. package/dist/datasetDetails/DatasetDetailsQuality.vue.mjs.map +1 -1
  55. package/dist/datasetDetails/distributions/DistributionAdded.vue.mjs +2 -2
  56. package/dist/datasetDetails/distributions/DistributionAdded.vue.mjs.map +1 -1
  57. package/dist/datasetDetails/distributions/DistributionDownloadAsModal.vue.mjs +9 -9
  58. package/dist/datasetDetails/distributions/DistributionDownloadAsModal.vue.mjs.map +1 -1
  59. package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +2 -2
  60. package/dist/datasetDetails/distributions/DistributionsHeader.vue.d.ts +4 -4
  61. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +8 -8
  62. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.mjs +3 -4
  63. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.mjs.map +1 -1
  64. package/dist/datasetDetails/distributions/FadingDistributionOverlay.vue.mjs +5 -7
  65. package/dist/datasetDetails/distributions/FadingDistributionOverlay.vue.mjs.map +1 -1
  66. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs +8 -9
  67. package/dist/datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs.map +1 -1
  68. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +2 -2
  69. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs +22 -25
  70. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.mjs.map +1 -1
  71. package/dist/datasetDetails/distributions/distributionActions/DistributionDropdownDownload.vue.d.ts +2 -2
  72. package/dist/datasetDetails/distributions/distributionActions/DistributionOptionsDropdown.vue.d.ts +4 -4
  73. package/dist/datasetDetails/distributions/distributionActions/DistributionOptionsDropdown.vue.mjs +5 -6
  74. package/dist/datasetDetails/distributions/distributionActions/DistributionOptionsDropdown.vue.mjs.map +1 -1
  75. package/dist/datasetDetails/distributions/distributionActions/DistributionPreview.vue.d.ts +4 -4
  76. package/dist/datasetDetails/distributions/distributionActions/DistributionVisualizeButton.vue.d.ts +4 -4
  77. package/dist/datasetDetails/distributions/distributionDetails/DistributionContent.vue.mjs +41 -42
  78. package/dist/datasetDetails/distributions/distributionDetails/DistributionContent.vue.mjs.map +1 -1
  79. package/dist/datasetDetails/distributions/distributionDetails/DistributionDescription.vue.d.ts +6 -6
  80. package/dist/datasetDetails/distributions/distributionDetails/DistributionDetails.vue.d.ts +16 -16
  81. package/dist/datasetDetails/distributions/distributionDetails/DistributionExpand.vue.d.ts +2 -2
  82. package/dist/datasetDetails/features/DatasetDetailsDataServices.vue.mjs +3 -3
  83. package/dist/datasetDetails/features/DatasetDetailsDataServices.vue.mjs.map +1 -1
  84. package/dist/datasetDetails/features/DatasetDetailsFeatures.vue.d.ts +1 -1
  85. package/dist/datasetDetails/features/DatasetDetailsPages.vue.mjs +2 -2
  86. package/dist/datasetDetails/features/DatasetDetailsVisualisations.vue.mjs +2 -2
  87. package/dist/datasetDetails/header/DatasetDetailsHeaderCatalogue.vue.d.ts +1 -1
  88. package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +2 -2
  89. package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +2 -2
  90. package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.mjs +2 -2
  91. package/dist/datasetDetails/navigation/DatasetDetailsNavigationPages.vue.d.ts +7 -1
  92. package/dist/datasetDetails/properties/DatasetDetailsProperties.vue.d.ts +200 -1
  93. package/dist/datasets/DatasetsFilters.vue.mjs +2 -2
  94. package/dist/datasets/DatasetsTopControls.vue.mjs +12 -14
  95. package/dist/datasets/DatasetsTopControls.vue.mjs.map +1 -1
  96. package/dist/datasets/datasetsFacets/DatasetsMapFacet.vue.mjs +4 -4
  97. package/dist/embed/DatasetEmbedModal.vue.mjs +2 -2
  98. package/dist/embed/DatasetEmbedModal.vue.mjs.map +1 -1
  99. package/dist/embed/EmbedDataset.vue.mjs +3 -3
  100. package/dist/embed/EmbedDataset.vue.mjs.map +1 -1
  101. package/dist/embed/EmbedDatasetSnippet.vue.mjs +3 -3
  102. package/dist/embed/EmbedDatasetSnippet.vue.mjs.map +1 -1
  103. package/dist/form/Repeatable.vue2.mjs +1 -2
  104. package/dist/form/Repeatable.vue2.mjs.map +1 -1
  105. package/dist/modal/AppConfirmationDialog.vue.mjs +1 -1
  106. package/dist/modal/AppConfirmationDialog.vue.mjs.map +1 -1
  107. package/dist/pages/user/UserImprint.vue.mjs +1 -1
  108. package/dist/pages/user/UserImprint.vue.mjs.map +1 -1
  109. package/dist/pages/user/UserPrivacyPolicy.vue.mjs +1 -1
  110. package/dist/pages/user/UserPrivacyPolicy.vue.mjs.map +1 -1
  111. package/dist/piveau-hub-ui-modules.css +1 -1
  112. package/dist/services/datasetService.d.ts +1 -1
  113. package/dist/widgets/AppLink.vue.mjs +2 -2
  114. package/dist/widgets/AppLink.vue.mjs.map +1 -1
  115. package/dist/widgets/Pagination.vue.d.ts +1 -1
  116. package/dist/widgets/ResourceAccessPopup.vue.mjs +2 -2
  117. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { getTranslationFor } from '../../utils/helpers';
2
2
  declare const _default: import('vue').DefineComponent<{
3
3
  small?: any;
4
- primary?: any;
5
- getDistributionDescription?: any;
6
4
  openModal?: any;
7
- getDistributionTitle?: any;
8
5
  showDownloadUrls?: any;
6
+ getDistributionTitle?: any;
9
7
  isUrlInvalid?: any;
8
+ getDistributionDescription?: any;
9
+ primary?: any;
10
10
  }, void, {
11
11
  downloadedFilesCounter: number;
12
12
  numberOfFilesToZip: number;
@@ -25,9 +25,9 @@ declare const _default: import('vue').DefineComponent<{
25
25
  };
26
26
  }, {
27
27
  files(): any;
28
- getDistributions: import('vuex').Computed;
29
- getTitle: import('vuex').Computed;
30
28
  getCatalog: import('vuex').Computed;
29
+ getTitle: import('vuex').Computed;
30
+ getDistributions: import('vuex').Computed;
31
31
  getLanguages: import('vuex').Computed;
32
32
  }, {
33
33
  getTranslationFor: typeof getTranslationFor;
@@ -42,11 +42,11 @@ declare const _default: import('vue').DefineComponent<{
42
42
  onClose(e: any): void;
43
43
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
44
44
  small?: any;
45
- primary?: any;
46
- getDistributionDescription?: any;
47
45
  openModal?: any;
48
- getDistributionTitle?: any;
49
46
  showDownloadUrls?: any;
47
+ getDistributionTitle?: any;
50
48
  isUrlInvalid?: any;
49
+ getDistributionDescription?: any;
50
+ primary?: any;
51
51
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
52
52
  export default _default;
@@ -203,8 +203,7 @@ function oe(s, e, r, i, o, d) {
203
203
  e[2] || (e[2] = l("div", { class: "loading-spinner" }, null, -1)),
204
204
  w(" " + u(s.$t("message.datasetDetails.datasets.downloadAll")), 1)
205
205
  ]),
206
- _: 1,
207
- __: [2]
206
+ _: 1
208
207
  }, 8, ["small", "primary"])) : (m(), y(t, {
209
208
  key: 1,
210
209
  class: "download-all-btn",
@@ -258,9 +257,9 @@ function oe(s, e, r, i, o, d) {
258
257
  o.isLoadingAllDistributionFiles && o.numberOfFilesToZip > 0 ? (m(), h("span", K, u(s.$t("message.datasetDetails.datasets.modal.coupleOfMinutes")), 1)) : o.isLoadingAllDistributionFiles ? (m(), h("span", Q, u(s.$t("message.datasetDetails.datasets.modal.waitingForDownload")), 1)) : f("", !0)
259
258
  ]),
260
259
  e[5] || (e[5] = w()),
261
- o.isGeneratingZip ? (m(), h("div", Y, e[4] || (e[4] = [
260
+ o.isGeneratingZip ? (m(), h("div", Y, [...e[4] || (e[4] = [
262
261
  l("span", { class: "sr-only" }, "Loading...", -1)
263
- ]))) : o.isGeneratingZipDone ? (m(), h("i", ee, "check_circle")) : f("", !0)
262
+ ])])) : o.isGeneratingZipDone ? (m(), h("i", ee, "check_circle")) : f("", !0)
264
263
  ])
265
264
  ]),
266
265
  e[11] || (e[11] = w()),
@@ -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 >\n <div class=\"loading-spinner\"></div>\n {{ $t('message.datasetDetails.datasets.downloadAll') }}\n </pv-button>\n <pv-button v-else class=\"download-all-btn\" :small=\"small\" :rounded=\"true\" :primary=\"primary\" :download=\"true\" :action=\"openRessourceAccessPopup\">\n {{ $t('message.datasetDetails.datasets.downloadAll') }}\n </pv-button>\n <div class=\"modal fade\" data-backdrop=\"static\" data-keyboard=\"false\" id=\"downloadAllModal\" ref=\"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-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 $('#downloadAllModal').modal('show');\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 openRessourceAccessPopup() {\n // const modal = this.$refs.downloadAllModal;\n // const modal = document.getElementById('externalAccess');\n // console.log(\"openRessourceAccessPopup\", modal)\n // modal.addEventListener('shown.bs.modal', function() {\n // console.log(\"CLOSING\");\n // });\n this.openModal(this.trackAndDownloadAllDistributions, true);\n },\n onClose(e) {\n console.log(\"CLOSING\");\n }\n },\n created() {\n window.addEventListener('beforeunload', this.beforeWindowUnload);\n },\n // mounted() {\n // setTimeout(() => {\n // const modal = document.getElementById('externalAccess');\n // modal.addEventListener('click', function() {\n // console.log(\"CLOSING\");\n // });\n // })\n // },\n beforeUnmount() {\n window.removeEventListener('beforeunload', this.beforeWindowUnload);\n // const modal = this.$refs.downloadAllModal.$el;\n // modal.removeEventListener('hide.bs.modal', this.onClose);\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_10","_hoisted_12","_hoisted_17","_ctx","_openBlock","_createElementBlock","_hoisted_1","$data","_createBlock","_component_pv_button","$props","_createElementVNode","_createTextVNode","$options","_hoisted_2","_hoisted_3","_toDisplayString","_hoisted_11","_hoisted_15","_cache","_hoisted_16","$event","_hoisted_18"],"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;AAClC,YAAIC,EAAID,GAAc,WAAW,KAAK,CAACE,EAAMF,EAAa,OAAO,EAAE,GAAG;AACpE,gBAAMG,IAAOH,EAAa,OAAO;AACjC,iBAAOG,EAAK,YAAY,GAAG,MAAM,KAAKA,EAAK,YAAW,IAAKA,EAAK,UAAUA,EAAK,YAAY,GAAG,IAAI,GAAGA,EAAK,MAAM,EAAE;QACpH;AACA,eAAO;AAAA,SAEHC,IAAc,CAACJ,GAAcK,MACjC,GAAGR,EAAgB,KAAK,qBAAqBG,CAAY,CAAC,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kB,qBAAA,KAA/DH,KAAAC,EAEO,aADFF,EAAE,GAAA,uDAAA,CAAA,GAAA,CAAA,KACkBI,EAA6B,iCAA9CH,KAAAC,EAED,aADFF,EAAE,GAAA,0DAAA,CAAA,GAAA,CAAA;;;cAGEI,EAAe,mBAA1BH,EAAA,GAAAC,EAEM,OAFNa,GAEMC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA;AAAA,gBADJR,EAAuC,QAAjC,EAAA,OAAM,UAAS,GAAC,cAAU,EAAA;AAAA,qBAEpBJ,EAAmB,4BAAjCF,EAAqF,KAArFe,IAAqE,cAAY;;;;UAGrFT,EAOM,OAPNT,IAOM;AAAA,YALW,CAAAK,EAAA,uBAAuBA,EAAgB,yBAAtDF,EAES,UAAA;AAAA;cAF+C,MAAK;AAAA,cAAS,OAAM;AAAA,cAAiB,gBAAa;AAAA,cAAS,SAAKc,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAE,MAAER,EAAiB,kBAACN,EAAmC,mCAAA;AAAA,iBAC1KJ,EAAE,GAAA,8CAAA,CAAA,GAAA,CAAA;;YAEOI,EAAgB,yBAA9BF,EAAiL,UAAA;AAAA;cAAjJ,MAAK;AAAA,cAAS,OAAM;AAAA,cAAkB,gCAAOQ,EAAgC,iCAAA;AAAA,iBAAOV,EAAE,GAAA,6CAAA,CAAA,GAAA,CAAA,KACnGI,EAAkB,2BAArCF,EAAiK,UAAjKiB,IAAiKN,EAA5Db,EAAE,GAAA,4CAAA,CAAA,GAAA,CAAA;;;;;;;;"}
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 >\n <div class=\"loading-spinner\"></div>\n {{ $t('message.datasetDetails.datasets.downloadAll') }}\n </pv-button>\n <pv-button v-else class=\"download-all-btn\" :small=\"small\" :rounded=\"true\" :primary=\"primary\" :download=\"true\" :action=\"openRessourceAccessPopup\">\n {{ $t('message.datasetDetails.datasets.downloadAll') }}\n </pv-button>\n <div class=\"modal fade\" data-backdrop=\"static\" data-keyboard=\"false\" id=\"downloadAllModal\" ref=\"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-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 $('#downloadAllModal').modal('show');\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 openRessourceAccessPopup() {\n // const modal = this.$refs.downloadAllModal;\n // const modal = document.getElementById('externalAccess');\n // console.log(\"openRessourceAccessPopup\", modal)\n // modal.addEventListener('shown.bs.modal', function() {\n // console.log(\"CLOSING\");\n // });\n this.openModal(this.trackAndDownloadAllDistributions, true);\n },\n onClose(e) {\n console.log(\"CLOSING\");\n }\n },\n created() {\n window.addEventListener('beforeunload', this.beforeWindowUnload);\n },\n // mounted() {\n // setTimeout(() => {\n // const modal = document.getElementById('externalAccess');\n // modal.addEventListener('click', function() {\n // console.log(\"CLOSING\");\n // });\n // })\n // },\n beforeUnmount() {\n window.removeEventListener('beforeunload', this.beforeWindowUnload);\n // const modal = this.$refs.downloadAllModal.$el;\n // modal.removeEventListener('hide.bs.modal', this.onClose);\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_10","_hoisted_12","_hoisted_17","_ctx","_openBlock","_createElementBlock","_hoisted_1","$data","_createBlock","_component_pv_button","$props","_createElementVNode","_createTextVNode","$options","_hoisted_2","_hoisted_3","_toDisplayString","_hois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CAAAK,EAAA,uBAAuBA,EAAgB,yBAAtDF,EAES,UAAA;AAAA;cAF+C,MAAK;AAAA,cAAS,OAAM;AAAA,cAAiB,gBAAa;AAAA,cAAS,SAAKc,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAE,MAAER,EAAiB,kBAACN,EAAmC,mCAAA;AAAA,iBAC1KJ,EAAE,GAAA,8CAAA,CAAA,GAAA,CAAA;;YAEOI,EAAgB,yBAA9BF,EAAiL,UAAA;AAAA;cAAjJ,MAAK;AAAA,cAAS,OAAM;AAAA,cAAkB,gCAAOQ,EAAgC,iCAAA;AAAA,iBAAOV,EAAE,GAAA,6CAAA,CAAA,GAAA,CAAA,KACnGI,EAAkB,2BAArCF,EAAiK,UAAjKiB,IAAiKN,EAA5Db,EAAE,GAAA,4CAAA,CAAA,GAAA,CAAA;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { mapGetters as m } from "vuex";
2
2
  import { resolveComponent as c, openBlock as o, createElementBlock as l, createElementVNode as n, Fragment as b, renderList as p, createBlock as f, withCtx as d, createTextVNode as r, toDisplayString as a, createVNode as D } from "vue";
3
3
  import "./FadingDistributionOverlay.vue2.mjs";
4
- import _ from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const g = {
4
+ import g from "../../_virtual/_plugin-vue_export-helper.mjs";
5
+ const _ = {
6
6
  name: "FadingDistributionOverlay",
7
7
  props: {
8
8
  distributions: Object,
@@ -30,8 +30,7 @@ function w(i, t, s, F, h, N) {
30
30
  t[0] || (t[0] = n("i", { class: "fas fa-chevron-down" }, null, -1)),
31
31
  r(" " + a(i.$t("message.metadata.showXMore", { increment: e })), 1)
32
32
  ]),
33
- _: 2,
34
- __: [0]
33
+ _: 2
35
34
  }, 1032, ["action"]))), 128)),
36
35
  t[2] || (t[2] = r()),
37
36
  D(u, {
@@ -44,13 +43,12 @@ function w(i, t, s, F, h, N) {
44
43
  t[1] || (t[1] = n("i", { class: "fas fa-eye" }, null, -1)),
45
44
  r(" " + a(i.$t("message.metadata.showAll")) + " " + a(`(${i.getDistributions.length.toLocaleString("fi")})`), 1)
46
45
  ]),
47
- _: 1,
48
- __: [1]
46
+ _: 1
49
47
  }, 8, ["action"])
50
48
  ])
51
49
  ]);
52
50
  }
53
- const I = /* @__PURE__ */ _(g, [["render", w], ["__scopeId", "data-v-90409b43"]]);
51
+ const I = /* @__PURE__ */ g(_, [["render", w], ["__scopeId", "data-v-90409b43"]]);
54
52
  export {
55
53
  I as default
56
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FadingDistributionOverlay.vue.mjs","sources":["../../../lib/datasetDetails/distributions/FadingDistributionOverlay.vue"],"sourcesContent":["<template>\n <div\n class=\"distributions__item--preview\"\n >\n <!-- Fade out the last item so it has a preview feel -->\n <!-- Render actions on top of it -->\n <div class=\"distributions__actions pb-md-3\">\n <pv-button\n class=\"mr-3 distributions-show-more-button\"\n v-for=\"increment in distributions.incrementSteps.filter(nonOverflowingIncrementsForDistributions)\"\n :key=\"increment\"\n :small=\"true\"\n :action=\"() => increaseNumDisplayedDistributions(increment)\"\n >\n <i class=\"fas fa-chevron-down\"/> {{ $t('message.metadata.showXMore', { increment }) }}\n </pv-button>\n <pv-button\n class=\"mr-3 distributions-show-more-button\"\n :primary=\"true\"\n :small=\"true\"\n :action=\"() => setDistributionsDisplayCount(getDistributions.length)\"\n >\n <i class=\"fas fa-eye\"/> {{ $t('message.metadata.showAll') }} {{ `(${(getDistributions.length.toLocaleString('fi'))})` }}\n </pv-button>\n </div>\n </div>\n</template>\n\n<script>\nimport {mapGetters} from \"vuex\";\n\nexport default {\n name: \"FadingDistributionOverlay\",\n props: {\n distributions: Object,\n setDistributionsDisplayCount: Function,\n increaseNumDisplayedDistributions: Function,\n nonOverflowingIncrementsForDistributions: Function\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getDistributions'\n ])\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.distributions {\n\n &__item--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 &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n}\n</style>\n"],"names":["_sfc_main","mapGetters","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","$props","increment","_createBlock","_component_pv_button","_toDisplayString","_ctx","_createVNode"],"mappings":";;;;AA+BA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,eAAe;AAAA,IACf,8BAA8B;AAAA,IAC9B,mCAAmC;AAAA,IACnC,0CAA0C;AAAA,EAC3C;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,kBAAkB;AAAA,MAC9B;AAAA,KACD;AAAA,EACH;AACF,GA1CIC,IAAA,EAAA,OAAM,+BAA8B,GAI/BC,IAAA,EAAA,OAAM,iCAAgC;;;AAL7C,SAAAC,EAAA,GAAAC,EAwBM,OAxBNH,GAwBM;AAAA,IAnBJI,EAkBM,OAlBNH,GAkBM;AAAA,cAjBJE,EAQYE,GAAA,MAAAC,EANUC,gBAAc,eAAe,OAAOA,EAAwC,wCAAA,GAAA,CAAzFC,YAFTC,EAQYC,GAAA;AAAA,QAPV,OAAM;AAAA,QAEL,KAAKF;AAAA,QACL,OAAO;AAAA,QACP,QAAM,MAAQD,EAAiC,kCAACC,CAAS;AAAA;mBAE1D,MAAgC;AAAA,0BAAhCJ,EAAgC,KAAA,EAA7B,OAAM,sBAAqB,GAAA,MAAA,EAAA;AAAA,YAAE,MAACO,EAAGC,EAAE,GAAA,8BAAA,EAAiC,WAAAJ,EAAS,CAAA,CAAA,GAAA,CAAA;AAAA;;;;;MAElFK,EAOYH,GAAA;AAAA,QANV,OAAM;AAAA,QACL,SAAS;AAAA,QACT,OAAO;AAAA,QACP,QAAc,MAAAH,EAAA,6BAA6BK,EAAA,iBAAiB,MAAM;AAAA;mBAEnE,MAAuB;AAAA,0BAAvBR,EAAuB,KAAA,EAApB,OAAM,aAAY,GAAA,MAAA,EAAA;AAAA,YAAE,MAACO,EAAGC,KAAiC,0BAAA,CAAA,IAAA,YAASA,EAAgB,iBAAC,OAAO,eAAc,IAAA,CAAA,GAAA,GAAA,CAAA;AAAA;;;;;;;;"}
1
+ {"version":3,"file":"FadingDistributionOverlay.vue.mjs","sources":["../../../lib/datasetDetails/distributions/FadingDistributionOverlay.vue"],"sourcesContent":["<template>\n <div\n class=\"distributions__item--preview\"\n >\n <!-- Fade out the last item so it has a preview feel -->\n <!-- Render actions on top of it -->\n <div class=\"distributions__actions pb-md-3\">\n <pv-button\n class=\"mr-3 distributions-show-more-button\"\n v-for=\"increment in distributions.incrementSteps.filter(nonOverflowingIncrementsForDistributions)\"\n :key=\"increment\"\n :small=\"true\"\n :action=\"() => increaseNumDisplayedDistributions(increment)\"\n >\n <i class=\"fas fa-chevron-down\"/> {{ $t('message.metadata.showXMore', { increment }) }}\n </pv-button>\n <pv-button\n class=\"mr-3 distributions-show-more-button\"\n :primary=\"true\"\n :small=\"true\"\n :action=\"() => setDistributionsDisplayCount(getDistributions.length)\"\n >\n <i class=\"fas fa-eye\"/> {{ $t('message.metadata.showAll') }} {{ `(${(getDistributions.length.toLocaleString('fi'))})` }}\n </pv-button>\n </div>\n </div>\n</template>\n\n<script>\nimport {mapGetters} from \"vuex\";\n\nexport default {\n name: \"FadingDistributionOverlay\",\n props: {\n distributions: Object,\n setDistributionsDisplayCount: Function,\n increaseNumDisplayedDistributions: Function,\n nonOverflowingIncrementsForDistributions: Function\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getDistributions'\n ])\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.distributions {\n\n &__item--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 &__actions {\n display: flex;\n justify-content: center;\n align-items: flex-end;\n height: 100%;\n z-index: 11;\n }\n}\n</style>\n"],"names":["_sfc_main","mapGetters","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","$props","increment","_createBlock","_component_pv_button","_toDisplayString","_ctx","_createVNode"],"mappings":";;;;AA+BA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,eAAe;AAAA,IACf,8BAA8B;AAAA,IAC9B,mCAAmC;AAAA,IACnC,0CAA0C;AAAA,EAC3C;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,kBAAkB;AAAA,MAC9B;AAAA,KACD;AAAA,EACH;AACF,GA1CIC,IAAA,EAAA,OAAM,+BAA8B,GAI/BC,IAAA,EAAA,OAAM,iCAAgC;;;AAL7C,SAAAC,EAAA,GAAAC,EAwBM,OAxBNH,GAwBM;AAAA,IAnBJI,EAkBM,OAlBNH,GAkBM;AAAA,cAjBJE,EAQYE,GAAA,MAAAC,EANUC,gBAAc,eAAe,OAAOA,EAAwC,wCAAA,GAAA,CAAzFC,YAFTC,EAQYC,GAAA;AAAA,QAPV,OAAM;AAAA,QAEL,KAAKF;AAAA,QACL,OAAO;AAAA,QACP,QAAM,MAAQD,EAAiC,kCAACC,CAAS;AAAA;mBAE1D,MAAgC;AAAA,0BAAhCJ,EAAgC,KAAA,EAA7B,OAAM,sBAAqB,GAAA,MAAA,EAAA;AAAA,YAAE,MAACO,EAAGC,EAAE,GAAA,8BAAA,EAAiC,WAAAJ,EAAS,CAAA,CAAA,GAAA,CAAA;AAAA;;;;MAElFK,EAOYH,GAAA;AAAA,QANV,OAAM;AAAA,QACL,SAAS;AAAA,QACT,OAAO;AAAA,QACP,QAAc,MAAAH,EAAA,6BAA6BK,EAAA,iBAAiB,MAAM;AAAA;mBAEnE,MAAuB;AAAA,0BAAvBR,EAAuB,KAAA,EAApB,OAAM,aAAY,GAAA,MAAA,EAAA;AAAA,YAAE,MAACO,EAAGC,KAAiC,0BAAA,CAAA,IAAA,YAASA,EAAgB,iBAAC,OAAO,eAAc,IAAA,CAAA,GAAA,GAAA,CAAA;AAAA;;;;;;;"}
@@ -3,8 +3,8 @@ import D from "./DistributionVisualizeButton.vue.mjs";
3
3
  import U from "./DistributionPreview.vue.mjs";
4
4
  import g from "./DistributionDownload.vue.mjs";
5
5
  import p from "./LinkedDataButtonsDropdown.vue.mjs";
6
- import { mapGetters as _ } from "vuex";
7
- import { has as F, isNil as d } from "lodash-es";
6
+ import { mapGetters as F } from "vuex";
7
+ import { has as _, isNil as d } from "lodash-es";
8
8
  import { resolveComponent as a, openBlock as l, createElementBlock as L, createBlock as r, withCtx as m, createTextVNode as e, toDisplayString as h, createCommentVNode as u, createVNode as y, createElementVNode as B } from "vue";
9
9
  import "./DistributionActions.vue2.mjs";
10
10
  import I from "../../../_virtual/_plugin-vue_export-helper.mjs";
@@ -40,7 +40,7 @@ const x = {
40
40
  };
41
41
  },
42
42
  computed: {
43
- ..._("datasetDetails", [
43
+ ...F("datasetDetails", [
44
44
  "getCatalog"
45
45
  ]),
46
46
  showValidateButton() {
@@ -55,7 +55,7 @@ const x = {
55
55
  methods: {
56
56
  showVisualisationLink(i) {
57
57
  var t, o, s;
58
- if (!F(i, "format.label") || d((t = i == null ? void 0 : i.format) == null ? void 0 : t.label) || d(i == null ? void 0 : i.downloadUrls[0]) && d(i == null ? void 0 : i.accessUrl[0]))
58
+ if (!_(i, "format.label") || d((t = i == null ? void 0 : i.format) == null ? void 0 : t.label) || d(i == null ? void 0 : i.downloadUrls[0]) && d(i == null ? void 0 : i.accessUrl[0]))
59
59
  return !1;
60
60
  const n = (s = (o = i == null ? void 0 : i.format) == null ? void 0 : o.id) == null ? void 0 : s.toLowerCase();
61
61
  return n && this.visualisationLinkFormats.includes(n);
@@ -114,13 +114,12 @@ function O(i, n, t, o, s, c) {
114
114
  class: "btn btn-sm validate-btn pt-0",
115
115
  to: { name: "DatasetDetailsQuality", query: { locale: i.$route.query.locale, validate: t.distribution.id } }
116
116
  }, {
117
- default: m(() => n[1] || (n[1] = [
117
+ default: m(() => [...n[1] || (n[1] = [
118
118
  e(`
119
119
  Validate
120
- `)
121
- ])),
122
- _: 1,
123
- __: [1]
120
+ `, -1)
121
+ ])]),
122
+ _: 1
124
123
  }, 8, ["to"])) : u("", !0)
125
124
  ])
126
125
  ]);
@@ -1 +1 @@
1
- {"version":3,"file":"DistributionActions.vue.mjs","sources":["../../../../lib/datasetDetails/distributions/distributionActions/DistributionActions.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-sm-row flex-md-column flex-lg-row justify-content-start\n justify-content-lg-end mt-2 text-md-right col text-left distribution-actions\">\n <!-- button of new visualization tool -->\n <distribution-visualize-button v-if=\"showVisualisationButton\" class=\"distribution-action\" @displayVisualisation=\"$emit('displayVisualisation', getDownloadUrl)\" :isUrlInvalid=\"isUrlInvalid\"\n :getVisualisationLink=\"getVisualisationLink\" :distribution=\"distribution\" :openIfValidUrl=\"openIfValidUrl\">{{ $t('message.datasetDetails.preview') }}</distribution-visualize-button>\n <!-- TODO: remove distribution-preview button once the new visualisation service is online -->\n <distribution-preview v-if=\"!hidePreviewButton && getCatalog.is_part_of !== 'erpd' && !showVisualisationButton\" :isUrlInvalid=\"isUrlInvalid\"\n :getVisualisationLink=\"getVisualisationLink\" :distribution=\"distribution\" :openIfValidUrl=\"openIfValidUrl\"\n :previewLinkCallback=\"previewLinkCallback\" class=\"distribution-action\" />\n <distribution-download v-if=\"showDownloadDropdown(distribution)\" :getDownloadUrl=\"getDownloadUrl\"\n :showAccessUrls=\"showAccessUrls\" :isOnlyOneUrl=\"isOnlyOneUrl\" :trackGoto=\"trackGoto\"\n :getDistributionFormat=\"getDistributionFormat\" :replaceHttp=\"replaceHttp\" :distribution=\"distribution\"\n class=\"distribution-action distribution-download\" />\n <linked-data-buttons-dropdown :distributions=\"distributions\" :distribution=\"distribution\"\n class=\"distribution-action\" />\n <div>\n <app-link v-if=\"showValidateButton\" class=\"btn btn-sm validate-btn pt-0\"\n :to=\"{ name: 'DatasetDetailsQuality', query: { locale: $route.query.locale, validate: distribution.id } }\">\n Validate\n </app-link>\n </div>\n </div>\n</template>\n\n<script>\nimport AppLink from \"../../../widgets/AppLink\";\nimport DistributionVisualizeButton from \"../../../datasetDetails/distributions/distributionActions/DistributionVisualizeButton\";\nimport DistributionPreview from \"../../../datasetDetails/distributions/distributionActions/DistributionPreview\";\nimport DistributionDownload from \"../../../datasetDetails/distributions/distributionActions/DistributionDownload\";\nimport LinkedDataButtonsDropdown\n from \"../../../datasetDetails/distributions/distributionActions/LinkedDataButtonsDropdown\";\nimport {mapGetters} from \"vuex\";\nimport {has, isNil} from \"lodash\";\n\nexport default {\n name: \"DistributionActions\",\n components: { AppLink, LinkedDataButtonsDropdown, DistributionDownload, DistributionPreview, DistributionVisualizeButton },\n props: {\n distribution: Object,\n distributions: Object,\n isUrlInvalid: Function,\n getVisualisationLink: Function,\n showTooltipVisualiseButton: Function,\n previewLinkCallback: Function,\n openIfValidUrl: Function,\n showDownloadDropdown: Function,\n getDownloadUrl: Function,\n showAccessUrls: Function,\n isOnlyOneUrl: Function,\n trackGoto: Function,\n getDistributionFormat: Function,\n replaceHttp: Function,\n },\n data() {\n return {\n showVisualisationButton: this.$env.content.datasetDetails.distributions.showVisualisation,\n visualisationLinkFormats: [\n 'csv',\n 'tsv',\n 'ods',\n 'xlsx',\n 'xls',\n ],\n }\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getCatalog',\n ]),\n showValidateButton() {\n return this.$env?.content?.datasetDetails?.distributions?.showValidationButton;\n },\n hidePreviewButton() {\n // only returns true if the config variable hidePreviewButton exists and is set to true\n return this.$env?.content?.datasetDetails?.distributions?.hidePreviewButton;\n }\n },\n methods: {\n showVisualisationLink(distribution) {\n if (!has(distribution, 'format.label') || isNil(distribution?.format?.label)\n || (isNil(distribution?.downloadUrls[0]) && isNil(distribution?.accessUrl[0]))) return false;\n const f = distribution?.format?.id?.toLowerCase();\n return f && this.visualisationLinkFormats.includes(f);\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.validate-btn {\n color: #0e47cb;\n vertical-align: text-bottom;\n text-decoration: none;\n}\n</style>\n"],"names":["_sfc_main","AppLink","LinkedDataButtonsDropdown","DistributionDownload","DistributionPreview","DistributionVisualizeButton","mapGetters","_d","_c","_b","_a","distribution","has","isNil","f","_hoisted_1","_openBlock","_createElementBlock","$data","_createBlock","_component_distribution_visualize_button","_cache","$event","_ctx","$props","$options","_component_distribution_preview","_component_distribution_download","_createVNode","_component_linked_data_buttons_dropdown","_createElementVNode","_component_app_link"],"mappings":";;;;;;;;;;AAmCA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY,EAAE,SAAAC,GAAS,2BAAAC,GAA2B,sBAAAC,GAAsB,qBAAAC,GAAqB,6BAAAC,EAA6B;AAAA,EAC1H,OAAO;AAAA,IACL,cAAc;AAAA,IACd,eAAe;AAAA,IACf,cAAc;AAAA,IACd,sBAAsB;AAAA,IACtB,4BAA4B;AAAA,IAC5B,qBAAqB;AAAA,IACrB,gBAAgB;AAAA,IAChB,sBAAsB;AAAA,IACtB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,cAAc;AAAA,IACd,WAAW;AAAA,IACX,uBAAuB;AAAA,IACvB,aAAa;AAAA,EACd;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,yBAAyB,KAAK,KAAK,QAAQ,eAAe,cAAc;AAAA,MACxE,0BAA0B;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACH;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,kBAAkB;AAAA,MAC9B;AAAA,IACF,CAAC;AAAA,IACD,qBAAqB;;AACnB,cAAOC,KAAAC,KAAAC,KAAAC,IAAA,KAAK,SAAL,gBAAAA,EAAW,YAAX,gBAAAD,EAAoB,mBAApB,gBAA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A,EAAoB;AAAA,MAAG,cAAcA,EAAY;AAAA,MAAG,gBAAgBA,EAAc;AAAA,MACxG,qBAAqBA,EAAmB;AAAA,MAAE,OAAM;AAAA;;IACtBA,EAAA,qBAAqBA,EAAY,YAAA,UAA9DL,EAGsDQ,GAAA;AAAA;MAHY,gBAAgBH,EAAc;AAAA,MAC7F,gBAAgBA,EAAc;AAAA,MAAG,cAAcA,EAAY;AAAA,MAAG,WAAWA,EAAS;AAAA,MAClF,uBAAuBA,EAAqB;AAAA,MAAG,aAAaA,EAAW;AAAA,MAAG,cAAcA,EAAY;AAAA,MACrG,OAAM;AAAA;;IACRI,EACgCC,GAAA;AAAA,MADD,eAAeL,EAAa;AAAA,MAAG,cAAcA,EAAY;AAAA,MACtF,OAAM;AAAA;;IACRM,EAKM,OAAA,MAAA;AAAA,MAJYL,EAAkB,2BAAlCN,EAGWY,GAAA;AAAA;QAHyB,OAAM;AAAA,QACvC,IAAE,EAAA,MAAA,yBAAA,OAAA,EAAA,QAAoDR,SAAO,MAAM,QAAM,UAAYC,EAAY,aAAC,GAAE,EAAA;AAAA;mBAAM,MAE7GH,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA;AAAA,YAF6G;AAAA;AAAA,OAE7G;AAAA;;;;;;;;"}
1
+ {"version":3,"file":"DistributionActions.vue.mjs","sources":["../../../../lib/datasetDetails/distributions/distributionActions/DistributionActions.vue"],"sourcesContent":["<template>\n <div class=\"d-flex flex-sm-row flex-md-column flex-lg-row justify-content-start\n justify-content-lg-end mt-2 text-md-right col text-left distribution-actions\">\n <!-- button of new visualization tool -->\n <distribution-visualize-button v-if=\"showVisualisationButton\" class=\"distribution-action\" @displayVisualisation=\"$emit('displayVisualisation', getDownloadUrl)\" :isUrlInvalid=\"isUrlInvalid\"\n :getVisualisationLink=\"getVisualisationLink\" :distribution=\"distribution\" :openIfValidUrl=\"openIfValidUrl\">{{ $t('message.datasetDetails.preview') }}</distribution-visualize-button>\n <!-- TODO: remove distribution-preview button once the new visualisation service is online -->\n <distribution-preview v-if=\"!hidePreviewButton && getCatalog.is_part_of !== 'erpd' && !showVisualisationButton\" :isUrlInvalid=\"isUrlInvalid\"\n :getVisualisationLink=\"getVisualisationLink\" :distribution=\"distribution\" :openIfValidUrl=\"openIfValidUrl\"\n :previewLinkCallback=\"previewLinkCallback\" class=\"distribution-action\" />\n <distribution-download v-if=\"showDownloadDropdown(distribution)\" :getDownloadUrl=\"getDownloadUrl\"\n :showAccessUrls=\"showAccessUrls\" :isOnlyOneUrl=\"isOnlyOneUrl\" :trackGoto=\"trackGoto\"\n :getDistributionFormat=\"getDistributionFormat\" :replaceHttp=\"replaceHttp\" :distribution=\"distribution\"\n class=\"distribution-action distribution-download\" />\n <linked-data-buttons-dropdown :distributions=\"distributions\" :distribution=\"distribution\"\n class=\"distribution-action\" />\n <div>\n <app-link v-if=\"showValidateButton\" class=\"btn btn-sm validate-btn pt-0\"\n :to=\"{ name: 'DatasetDetailsQuality', query: { locale: $route.query.locale, validate: distribution.id } }\">\n Validate\n </app-link>\n </div>\n </div>\n</template>\n\n<script>\nimport AppLink from \"../../../widgets/AppLink\";\nimport DistributionVisualizeButton from \"../../../datasetDetails/distributions/distributionActions/DistributionVisualizeButton\";\nimport DistributionPreview from \"../../../datasetDetails/distributions/distributionActions/DistributionPreview\";\nimport DistributionDownload from \"../../../datasetDetails/distributions/distributionActions/DistributionDownload\";\nimport LinkedDataButtonsDropdown\n from \"../../../datasetDetails/distributions/distributionActions/LinkedDataButtonsDropdown\";\nimport {mapGetters} from \"vuex\";\nimport {has, isNil} from \"lodash\";\n\nexport default {\n name: \"DistributionActions\",\n components: { AppLink, LinkedDataButtonsDropdown, DistributionDownload, DistributionPreview, DistributionVisualizeButton },\n props: {\n distribution: Object,\n distributions: Object,\n isUrlInvalid: Function,\n getVisualisationLink: Function,\n showTooltipVisualiseButton: Function,\n previewLinkCallback: Function,\n openIfValidUrl: Function,\n showDownloadDropdown: Function,\n getDownloadUrl: Function,\n showAccessUrls: Function,\n isOnlyOneUrl: Function,\n trackGoto: Function,\n getDistributionFormat: Function,\n replaceHttp: Function,\n },\n data() {\n return {\n showVisualisationButton: this.$env.content.datasetDetails.distributions.showVisualisation,\n visualisationLinkFormats: [\n 'csv',\n 'tsv',\n 'ods',\n 'xlsx',\n 'xls',\n ],\n }\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getCatalog',\n ]),\n showValidateButton() {\n return this.$env?.content?.datasetDetails?.distributions?.showValidationButton;\n },\n hidePreviewButton() {\n // only returns true if the config variable hidePreviewButton exists and is set to true\n return this.$env?.content?.datasetDetails?.distributions?.hidePreviewButton;\n }\n },\n methods: {\n showVisualisationLink(distribution) {\n if (!has(distribution, 'format.label') || isNil(distribution?.format?.label)\n || (isNil(distribution?.downloadUrls[0]) && isNil(distribution?.accessUrl[0]))) return false;\n const f = distribution?.format?.id?.toLowerCase();\n return f && this.visualisationLinkFormats.includes(f);\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.validate-btn {\n color: #0e47cb;\n vertical-align: text-bottom;\n text-decoration: none;\n}\n</style>\n"],"names":["_sfc_main","AppLink","LinkedDataButtonsDropdown","DistributionDownload","DistributionPreview","DistributionVisualizeButton","mapGetters","_d","_c","_b","_a","distribution","has","isNil","f","_hoisted_1","_openBlock","_createElementBlock","$data","_createBlock","_component_distribution_visualize_button","_cache","$event","_ctx","$props","$options","_component_distribution_preview","_component_distribution_download","_createVNode","_component_linked_data_buttons_dropdown","_createElementVNode","_component_app_link"],"mappings":";;;;;;;;;;AAmCA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY,EAAE,SAAAC,GAAS,2BAAAC,GAA2B,sBAAAC,GAAsB,qBAAAC,GAAqB,6BAAAC,EAA6B;AAAA,EAC1H,OAAO;AAAA,IACL,cAAc;AAAA,IACd,eAAe;AAAA,IACf,cAAc;AAAA,IACd,sBAAsB;AAAA,IACtB,4BAA4B;AAAA,IAC5B,qBAAqB;AAAA,IACrB,gBA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CAAA,GAAAH,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA;AAAA,YAF6G;AAAA;AAAA,SAE7G,EAAA;AAAA;;;;;;;"}
@@ -1,11 +1,11 @@
1
1
  declare const _default: import('vue').DefineComponent<{
2
2
  getDistributionFormat?: any;
3
- distribution?: any;
4
3
  isOnlyOneUrl?: any;
5
4
  getDownloadUrl?: any;
6
5
  trackGoto?: any;
7
6
  showAccessUrls?: any;
8
7
  replaceHttp?: any;
8
+ distribution?: any;
9
9
  }, {}, {
10
10
  showUrlCopiedPopup: boolean;
11
11
  }, {}, {
@@ -13,12 +13,12 @@ declare const _default: import('vue').DefineComponent<{
13
13
  popupCopyUrlAlert(): void;
14
14
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
15
15
  getDistributionFormat?: any;
16
- distribution?: any;
17
16
  isOnlyOneUrl?: any;
18
17
  getDownloadUrl?: any;
19
18
  trackGoto?: any;
20
19
  showAccessUrls?: any;
21
20
  replaceHttp?: any;
21
+ distribution?: any;
22
22
  }> & Readonly<{}>, {}, {}, {
23
23
  DistributionDropdownDownload: any;
24
24
  DistributionDownloadAs: any;
@@ -1,7 +1,7 @@
1
1
  import T from "./DistributionDropdownDownload.vue.mjs";
2
2
  import H from "./DistributionDownloadAs.vue.mjs";
3
3
  import N from "../../../widgets/AppLink.vue.mjs";
4
- import { resolveComponent as m, openBlock as a, createBlock as D, withCtx as s, createElementBlock as u, createVNode as d, createElementVNode as e, createTextVNode as i, toDisplayString as _, createCommentVNode as x, normalizeClass as P, Fragment as j, renderList as V } from "vue";
4
+ import { resolveComponent as m, openBlock as a, createBlock as D, withCtx as s, createElementBlock as u, createVNode as d, createElementVNode as e, createTextVNode as i, toDisplayString as x, createCommentVNode as v, normalizeClass as P, Fragment as j, renderList as V } from "vue";
5
5
  import "./DistributionDownload.vue2.mjs";
6
6
  import B from "../../../_virtual/_plugin-vue_export-helper.mjs";
7
7
  const E = {
@@ -43,8 +43,8 @@ const E = {
43
43
  class: "px-2",
44
44
  property: "dcat:mediaType"
45
45
  };
46
- function S(n, t, o, q, v, p) {
47
- const r = m("app-link"), A = m("distribution-download-as"), G = m("distribution-dropdown-download");
46
+ function S(n, t, o, q, A, p) {
47
+ const r = m("app-link"), _ = m("distribution-download-as"), G = m("distribution-dropdown-download");
48
48
  return a(), D(G, {
49
49
  distribution: o.distribution,
50
50
  title: n.$t("message.tooltip.datasetDetails.distributions.download"),
@@ -67,13 +67,12 @@ function S(n, t, o, q, v, p) {
67
67
  "matomo-track-download": { format: (b = (c = o.distribution) == null ? void 0 : c.format) == null ? void 0 : b.id },
68
68
  onAfterClick: t[0] || (t[0] = (l) => n.$emit("trackGoto"))
69
69
  }, {
70
- default: s(() => t[5] || (t[5] = [
70
+ default: s(() => [...t[5] || (t[5] = [
71
71
  e("span", null, [
72
72
  e("i", { class: "material-icons align-bottom" }, "open_in_new")
73
73
  ], -1)
74
- ])),
75
- _: 1,
76
- __: [5]
74
+ ])]),
75
+ _: 1
77
76
  }, 8, ["to", "matomo-track-download"]),
78
77
  t[6] || (t[6] = i()),
79
78
  e("span", null, [
@@ -98,20 +97,20 @@ function S(n, t, o, q, v, p) {
98
97
  class: "px-2",
99
98
  property: "dcat:mediaType",
100
99
  content: o.getDistributionFormat
101
- }, _(n.$t("message.metadata.accessUrl")), 9, I)
100
+ }, x(n.$t("message.metadata.accessUrl")), 9, I)
102
101
  ])
103
102
  ]),
104
103
  _: 1
105
104
  }, 8, ["to", "matomo-track-download"])
106
- ])) : x("", !0),
105
+ ])) : v("", !0),
107
106
  t[12] || (t[12] = i()),
108
107
  e("span", {
109
- class: P([v.showUrlCopiedPopup ? "display" : "hide", "copy-url-popup"])
110
- }, t[8] || (t[8] = [
108
+ class: P([A.showUrlCopiedPopup ? "display" : "hide", "copy-url-popup"])
109
+ }, [...t[8] || (t[8] = [
111
110
  e("i", { class: "material-icons align-bottom" }, "done_all", -1),
112
111
  i(` URL copied
113
- `)
114
- ]), 2),
112
+ `, -1)
113
+ ])], 2),
115
114
  t[13] || (t[13] = i()),
116
115
  (a(!0), u(j, null, V(o.distribution.downloadUrls, (l, O) => {
117
116
  var k, g, y, C;
@@ -127,14 +126,13 @@ function S(n, t, o, q, v, p) {
127
126
  "matomo-track-download": { format: (g = (k = o.distribution) == null ? void 0 : k.format) == null ? void 0 : g.id },
128
127
  onAfterClick: t[3] || (t[3] = (U) => n.$emit("trackGoto"))
129
128
  }, {
130
- default: s(() => t[9] || (t[9] = [
129
+ default: s(() => [...t[9] || (t[9] = [
131
130
  e("span", null, [
132
131
  e("i", { class: "open_in_new material-icons align-bottom" }, "open_in_new")
133
132
  ], -1)
134
- ])),
135
- _: 2,
136
- __: [9]
137
- }, 1032, ["to", "matomo-track-download"]),
133
+ ])]),
134
+ _: 1
135
+ }, 8, ["to", "matomo-track-download"]),
138
136
  t[10] || (t[10] = i()),
139
137
  e("span", null, [
140
138
  e("i", {
@@ -153,22 +151,21 @@ function S(n, t, o, q, v, p) {
153
151
  }, {
154
152
  default: s(() => [
155
153
  e("span", null, [
156
- e("small", z, _(n.$t("message.metadata.downloadUrl")), 1)
154
+ e("small", z, x(n.$t("message.metadata.downloadUrl")), 1)
157
155
  ])
158
156
  ]),
159
- _: 2
160
- }, 1032, ["to", "matomo-track-download"])
157
+ _: 1
158
+ }, 8, ["to", "matomo-track-download"])
161
159
  ]);
162
160
  }), 128)),
163
161
  t[14] || (t[14] = i()),
164
- this.$env.content.datasetDetails.downloadAs.enable ? (a(), D(A, {
162
+ this.$env.content.datasetDetails.downloadAs.enable ? (a(), D(_, {
165
163
  key: 1,
166
164
  distribution: o.distribution
167
- }, null, 8, ["distribution"])) : x("", !0)
165
+ }, null, 8, ["distribution"])) : v("", !0)
168
166
  ];
169
167
  }),
170
- _: 1,
171
- __: [12, 13, 14]
168
+ _: 1
172
169
  }, 8, ["distribution", "title", "message", "isOnlyOneUrl", "getDownloadUrl", "onTrackGoto"]);
173
170
  }
174
171
  const Y = /* @__PURE__ */ B(E, [["render", S], ["__scopeId", "data-v-95a28986"]]);
@@ -1 +1 @@
1
- {"version":3,"file":"DistributionDownload.vue.mjs","sources":["../../../../lib/datasetDetails/distributions/distributionActions/DistributionDownload.vue"],"sourcesContent":["<template>\n <distribution-dropdown-download :distribution=\"distribution\"\n :title=\"$t('message.tooltip.datasetDetails.distributions.download')\"\n :message=\"$t('message.datasetDetails.download')\"\n :isOnlyOneUrl=\"isOnlyOneUrl(distribution)\" :getDownloadUrl=\"getDownloadUrl\"\n @trackGoto=\"trackGoto\" bgLight=\"true\">\n\n <span class=\"dropdown-item px-3 d-flex align-items-center d-block\" v-if=\"showAccessUrls(distribution)\">\n <app-link class=\"text-decoration-none d-flex justify-content-between access-uri-link\"\n :to=\"replaceHttp(distribution.accessUrl[0])\" target=\"_blank\" rel=\"dcat:distribution noopener\" is-tooltip=\"true\"\n :matomo-track-download=\"{ format: distribution?.format?.id }\" @after-click=\"$emit('trackGoto')\">\n <span>\n <i class=\"material-icons align-bottom\">open_in_new</i>\n <!-- <i class=\" copy-text material-icons align-bottom\" @click=\"setClipboard(distribution.accessUrl[0])\">file_copy</i> copy -->\n </span>\n <!-- <span>\n <small class=\"px-2\" property=\"dcat:mediaType\" :content=\"getDistributionFormat\">Access URL</small>\n </span> -->\n </app-link>\n <span>\n <!-- <i class=\"material-icons align-bottom\">open_in_new</i> down -->\n <i class=\"copy-text material-icons align-bottom\" @click=\"setClipboard(distribution.accessUrl[0])\">file_copy</i>\n </span>\n\n <app-link class=\"text-decoration-none d-flex justify-content-between access-uri-link\"\n :to=\"replaceHttp(distribution.accessUrl[0])\" target=\"_blank\" rel=\"dcat:distribution noopener\" is-tooltip=\"true\"\n :matomo-track-download=\"{ format: distribution?.format?.id }\" @after-click=\"$emit('trackGoto')\">\n <span>\n <small class=\"px-2\" property=\"dcat:mediaType\" :content=\"getDistributionFormat\">{{\n $t('message.metadata.accessUrl')\n }}</small>\n </span>\n </app-link>\n <!-- <i class=\"material-icons help-icon ml-3\" data-toggle=\"tooltip\" data-placement=\"bottom\" :title=\"$t('message.datasetDetails.accessURLTooltip')\">help_outline</i> -->\n </span>\n\n <span :class=\"(showUrlCopiedPopup) ? 'display' : 'hide'\" class=\"copy-url-popup\">\n <i class=\"material-icons align-bottom\">done_all</i> URL copied\n </span>\n\n <span class=\"dropdown-item d-block px-3 d-flex align-items-center\"\n v-for=\"(downloadURL, i) in distribution.downloadUrls\" :key=\"i\">\n <app-link class=\"text-decoration-none d-flex justify-content-between\" :to=\"replaceHttp(downloadURL)\"\n target=\"_blank\" is-tooltip=\"true\"\n :matomo-track-download=\"{ format: distribution?.format?.id }\" @after-click=\"$emit('trackGoto')\">\n <span>\n <i class=\"open_in_new material-icons align-bottom\" >open_in_new</i>\n <!-- <i class=\" copy-text material-icons align-bottom\" @click=\"setClipboard(downloadURL)\">file_copy</i> -->\n </span>\n <!-- <span>\n <small class=\"px-2\" property=\"dcat:mediaType\">Download URL</small>\n </span> -->\n </app-link>\n <span>\n <!-- <i class=\"material-icons align-bottom\">open_in_new</i> -->\n <i class=\"copy-text material-icons align-bottom\" @click=\"setClipboard(downloadURL)\">file_copy</i>\n </span>\n <app-link class=\"text-decoration-none d-flex justify-content-between\" :to=\"replaceHttp(downloadURL)\"\n target=\"_blank\" is-tooltip=\"true\"\n :matomo-track-download=\"{ format: distribution?.format?.id }\" @after-click=\"$emit('trackGoto')\">\n <span>\n <small class=\"px-2\" property=\"dcat:mediaType\">{{ $t('message.metadata.downloadUrl') }}</small>\n </span>\n </app-link>\n <!-- <i class=\"material-icons help-icon ml-3\" data-toggle=\"tooltip\" data-placement=\"bottom\" :title=\"$t('message.datasetDetails.downloadURLTooltip')\">help_outline</i> -->\n </span>\n\n <distribution-download-as v-if=\"this.$env.content.datasetDetails.downloadAs.enable\" :distribution=\"distribution\"/>\n </distribution-dropdown-download>\n</template>\n\n<script>\nimport DistributionDropdownDownload\n from \"../../../datasetDetails/distributions/distributionActions/DistributionDropdownDownload\";\nimport DistributionDownloadAs from \"../../../datasetDetails/distributions/distributionActions/DistributionDownloadAs\";\nimport AppLink from \"../../../widgets/AppLink\";\n\nexport default {\n name: \"DistributionDownload\",\n data() {\n return {\n showUrlCopiedPopup: false\n }\n },\n props: [\n \"getDownloadUrl\",\n \"showAccessUrls\",\n \"isOnlyOneUrl\",\n \"trackGoto\",\n \"replaceHttp\",\n \"getDistributionFormat\",\n \"distribution\"\n ],\n components: {\n DistributionDropdownDownload,\n DistributionDownloadAs,\n AppLink\n },\n methods: {\n setClipboard(value) {\n const input = document.createElement('INPUT');\n // input.style = \"position: absolute; left: -1000px; top: -1000px\";\n input.value = value;\n document.body.appendChild(input);\n input.select();\n document.execCommand('copy');\n document.body.removeChild(input);\n\n this.popupCopyUrlAlert()\n },\n popupCopyUrlAlert() {\n this.showUrlCopiedPopup = true\n setTimeout(function () {\n this.showUrlCopiedPopup = false\n }.bind(this), 3500)\n }\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n/*** MATERIAL ICONS ***/\n%modal-icon {\n font-size: 18px;\n cursor: default;\n}\n\n.dropdown-item {\n .access-uri-link,\n .open_in_new {\n color: #0e47cb;\n }\n .copy-text {\n color: #0e47cb;\n }\n}\n\n.help-icon {\n @extend %modal-icon;\n}\n\n.copy-text {\n cursor: pointer;\n}\n\n.copy-url-popup {\n position: fixed !important;\n bottom: 10vh;\n left: 50vw;\n background-color: #F3F6FC;\n padding: .5rem 1.5rem;\n border-radius: .25rem;\n}\n\n.copy-url-popup.display {\n display: block;\n}\n\n.copy-url-popup.hide {\n display: none;\n}\n\n\n</style>\n"],"names":["_sfc_main","DistributionDropdownDownload","DistributionDownloadAs","AppLink","value","input","_createBlock","_component_distribution_dropdown_download","$props","_ctx","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_component_app_link","_b","_a","_cache","_createElementVNode","$event","$options","_d","_c","_hoisted_2","_normalizeClass","$data","_Fragment","downloadURL","i","_hoisted_3","_hoisted_4","_toDisplayString","_component_distribution_download_as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A5EH,EAAkH0B,GAAA;AAAA;UAA7B,cAAcxB,EAAY;AAAA;;;;;;;;"}
1
+ {"version":3,"file":"DistributionDownload.vue.mjs","sources":["../../../../lib/datasetDetails/distributions/distributionActions/DistributionDownload.vue"],"sourcesContent":["<template>\n <distribution-dropdown-download :distribution=\"distribution\"\n :title=\"$t('message.tooltip.datasetDetails.distributions.download')\"\n :message=\"$t('message.datasetDetails.download')\"\n :isOnlyOneUrl=\"isOnlyOneUrl(distribution)\" :getDownloadUrl=\"getDownloadUrl\"\n @trackGoto=\"trackGoto\" bgLight=\"true\">\n\n <span class=\"dropdown-item px-3 d-flex align-items-center d-block\" v-if=\"showAccessUrls(distribution)\">\n <app-link class=\"text-decoration-none d-flex justify-content-between access-uri-link\"\n :to=\"replaceHttp(distribution.accessUrl[0])\" target=\"_blank\" rel=\"dcat:distribution noopener\" is-tooltip=\"true\"\n :matomo-track-download=\"{ format: distribution?.format?.id }\" @after-click=\"$emit('trackGoto')\">\n <span>\n <i class=\"material-icons align-bottom\">open_in_new</i>\n <!-- <i class=\" copy-text material-icons align-bottom\" @click=\"setClipboard(distribution.accessUrl[0])\">file_copy</i> copy -->\n </span>\n <!-- <span>\n <small class=\"px-2\" property=\"dcat:mediaType\" :content=\"getDistributionFormat\">Access URL</small>\n </span> -->\n </app-link>\n <span>\n <!-- <i class=\"material-icons align-bottom\">open_in_new</i> down -->\n <i class=\"copy-text material-icons align-bottom\" @click=\"setClipboard(distribution.accessUrl[0])\">file_copy</i>\n </span>\n\n <app-link class=\"text-decoration-none d-flex justify-content-between access-uri-link\"\n :to=\"replaceHttp(distribution.accessUrl[0])\" target=\"_blank\" rel=\"dcat:distribution noopener\" is-tooltip=\"true\"\n :matomo-track-download=\"{ format: distribution?.format?.id }\" @after-click=\"$emit('trackGoto')\">\n <span>\n <small class=\"px-2\" property=\"dcat:mediaType\" :content=\"getDistributionFormat\">{{\n $t('message.metadata.accessUrl')\n }}</small>\n </span>\n </app-link>\n <!-- <i class=\"material-icons help-icon ml-3\" data-toggle=\"tooltip\" data-placement=\"bottom\" :title=\"$t('message.datasetDetails.accessURLTooltip')\">help_outline</i> -->\n </span>\n\n <span :class=\"(showUrlCopiedPopup) ? 'display' : 'hide'\" class=\"copy-url-popup\">\n <i class=\"material-icons align-bottom\">done_all</i> URL copied\n </span>\n\n <span class=\"dropdown-item d-block px-3 d-flex align-items-center\"\n v-for=\"(downloadURL, i) in distribution.downloadUrls\" :key=\"i\">\n <app-link class=\"text-decoration-none d-flex justify-content-between\" :to=\"replaceHttp(downloadURL)\"\n target=\"_blank\" is-tooltip=\"true\"\n :matomo-track-download=\"{ format: distribution?.format?.id }\" @after-click=\"$emit('trackGoto')\">\n <span>\n <i class=\"open_in_new material-icons align-bottom\" >open_in_new</i>\n <!-- <i class=\" copy-text material-icons align-bottom\" @click=\"setClipboard(downloadURL)\">file_copy</i> -->\n </span>\n <!-- <span>\n <small class=\"px-2\" property=\"dcat:mediaType\">Download URL</small>\n </span> -->\n </app-link>\n <span>\n <!-- <i class=\"material-icons align-bottom\">open_in_new</i> -->\n <i class=\"copy-text material-icons align-bottom\" @click=\"setClipboard(downloadURL)\">file_copy</i>\n </span>\n <app-link class=\"text-decoration-none d-flex justify-content-between\" :to=\"replaceHttp(downloadURL)\"\n target=\"_blank\" is-tooltip=\"true\"\n :matomo-track-download=\"{ format: distribution?.format?.id }\" @after-click=\"$emit('trackGoto')\">\n <span>\n <small class=\"px-2\" property=\"dcat:mediaType\">{{ $t('message.metadata.downloadUrl') }}</small>\n </span>\n </app-link>\n <!-- <i class=\"material-icons help-icon ml-3\" data-toggle=\"tooltip\" data-placement=\"bottom\" :title=\"$t('message.datasetDetails.downloadURLTooltip')\">help_outline</i> -->\n </span>\n\n <distribution-download-as v-if=\"this.$env.content.datasetDetails.downloadAs.enable\" :distribution=\"distribution\"/>\n </distribution-dropdown-download>\n</template>\n\n<script>\nimport DistributionDropdownDownload\n from \"../../../datasetDetails/distributions/distributionActions/DistributionDropdownDownload\";\nimport DistributionDownloadAs from \"../../../datasetDetails/distributions/distributionActions/DistributionDownloadAs\";\nimport AppLink from \"../../../widgets/AppLink\";\n\nexport default {\n name: \"DistributionDownload\",\n data() {\n return {\n showUrlCopiedPopup: false\n }\n },\n props: [\n \"getDownloadUrl\",\n \"showAccessUrls\",\n \"isOnlyOneUrl\",\n \"trackGoto\",\n \"replaceHttp\",\n \"getDistributionFormat\",\n \"distribution\"\n ],\n components: {\n DistributionDropdownDownload,\n DistributionDownloadAs,\n AppLink\n },\n methods: {\n setClipboard(value) {\n const input = document.createElement('INPUT');\n // input.style = \"position: absolute; left: -1000px; top: -1000px\";\n input.value = value;\n document.body.appendChild(input);\n input.select();\n document.execCommand('copy');\n document.body.removeChild(input);\n\n this.popupCopyUrlAlert()\n },\n popupCopyUrlAlert() {\n this.showUrlCopiedPopup = true\n setTimeout(function () {\n this.showUrlCopiedPopup = false\n }.bind(this), 3500)\n }\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n/*** MATERIAL ICONS ***/\n%modal-icon {\n font-size: 18px;\n cursor: default;\n}\n\n.dropdown-item {\n .access-uri-link,\n .open_in_new {\n color: #0e47cb;\n }\n .copy-text {\n color: #0e47cb;\n }\n}\n\n.help-icon {\n @extend %modal-icon;\n}\n\n.copy-text {\n cursor: pointer;\n}\n\n.copy-url-popup {\n position: fixed !important;\n bottom: 10vh;\n left: 50vw;\n background-color: #F3F6FC;\n padding: .5rem 1.5rem;\n border-radius: .25rem;\n}\n\n.copy-url-popup.display {\n display: block;\n}\n\n.copy-url-popup.hide {\n display: none;\n}\n\n\n</style>\n"],"names":["_sfc_main","DistributionDropdownDownload","DistributionDownloadAs","AppLink","value","input","_createBlock","_component_distribution_dropdown_download","$props","_ctx","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_component_app_link","_b","_a","_cache","_createElementVNode","$event","$options","_d","_c","_hoisted_2","_normalizeClass","$data","_Fragment","downloadURL","i","_hoisted_3","_hoisted_4","_toDisplayString","_component_distribution_download_as"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AAK,QAAQ,eAAe,WAAW,eAA5EH,EAAkH0B,GAAA;AAAA;UAA7B,cAAcxB,EAAY;AAAA;;;;;;;"}
@@ -2,9 +2,9 @@ import { replaceHttp } from '../../../utils/helpers';
2
2
  declare const _default: import('vue').DefineComponent<{
3
3
  title?: any;
4
4
  message?: any;
5
- distribution?: any;
6
5
  isOnlyOneUrl?: any;
7
6
  getDownloadUrl?: any;
7
+ distribution?: any;
8
8
  bgLight?: any;
9
9
  }, {}, {
10
10
  open: boolean;
@@ -16,9 +16,9 @@ declare const _default: import('vue').DefineComponent<{
16
16
  }, any, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
17
17
  title?: any;
18
18
  message?: any;
19
- distribution?: any;
20
19
  isOnlyOneUrl?: any;
21
20
  getDownloadUrl?: any;
21
+ distribution?: any;
22
22
  bgLight?: any;
23
23
  }> & Readonly<{}>, {}, {}, {
24
24
  AppLink: any;
@@ -1,10 +1,10 @@
1
1
  declare const _default: import('vue').DefineComponent<{
2
- isUrlInvalid?: any;
3
- distribution?: any;
4
2
  getVisualisationLink?: any;
5
3
  previewLinkCallback?: any;
4
+ isUrlInvalid?: any;
6
5
  openIfValidUrl?: any;
7
6
  showTooltipVisualiseButton?: any;
7
+ distribution?: any;
8
8
  }, {}, {
9
9
  visualisationLinkFormats: string[];
10
10
  geoLinkFormats: {
@@ -23,12 +23,12 @@ declare const _default: import('vue').DefineComponent<{
23
23
  showGeoLink(distribution: any): boolean;
24
24
  showVisualisationLink(distribution: any): any;
25
25
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
26
- isUrlInvalid?: any;
27
- distribution?: any;
28
26
  getVisualisationLink?: any;
29
27
  previewLinkCallback?: any;
28
+ isUrlInvalid?: any;
30
29
  openIfValidUrl?: any;
31
30
  showTooltipVisualiseButton?: any;
31
+ distribution?: any;
32
32
  }> & Readonly<{}>, {}, {}, {
33
33
  Dropdown: any;
34
34
  AppLink: any;