@piveau/piveau-hub-ui-modules 4.5.7 → 4.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/useDataInfoBox.mjs +21 -20
- package/dist/composables/useDataInfoBox.mjs.map +1 -1
- package/dist/configurations/configureModules.d.ts +4 -0
- package/dist/configurations/configureModules.mjs +6 -4
- package/dist/configurations/configureModules.mjs.map +1 -1
- package/dist/data-provider-interface/DPIMenu.vue.d.ts +2 -2
- package/dist/datasetDetails/DatasetDetailsDescription.vue.d.ts +1 -1
- package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +2 -2
- package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +2 -2
- package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +2 -2
- package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +1 -1
- package/dist/datasetDetails/navigation/DatasetDetailsNavigation.vue.d.ts +1 -1
- package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +1 -1
- package/dist/datasets/Datasets.vue.mjs +80 -80
- package/dist/datasets/Datasets.vue.mjs.map +1 -1
- package/dist/facets_2.0/Facets.vue.d.ts +19 -0
- package/dist/facets_2.0/Facets.vue.mjs +31 -0
- package/dist/facets_2.0/Facets.vue.mjs.map +1 -0
- package/dist/facets_2.0/Facets.vue2.mjs +5 -0
- package/dist/facets_2.0/Facets.vue2.mjs.map +1 -0
- package/dist/facets_2.0/facets/DataServicesFacet.vue.d.ts +75 -0
- package/dist/facets_2.0/facets/DataServicesFacet.vue.mjs +49 -0
- package/dist/facets_2.0/facets/DataServicesFacet.vue.mjs.map +1 -0
- package/dist/facets_2.0/facets/ExpandableSelectFacet.vue.d.ts +93 -0
- package/dist/facets_2.0/facets/ExpandableSelectFacet.vue.mjs +143 -0
- package/dist/facets_2.0/facets/ExpandableSelectFacet.vue.mjs.map +1 -0
- package/dist/facets_2.0/facets/ExpandableSelectFacet.vue2.mjs +5 -0
- package/dist/facets_2.0/facets/ExpandableSelectFacet.vue2.mjs.map +1 -0
- package/dist/facets_2.0/facets/FacetTitle.vue.d.ts +18 -0
- package/dist/facets_2.0/facets/FacetTitle.vue.mjs +38 -0
- package/dist/facets_2.0/facets/FacetTitle.vue.mjs.map +1 -0
- package/dist/facets_2.0/facets/FacetTitle.vue2.mjs +5 -0
- package/dist/facets_2.0/facets/FacetTitle.vue2.mjs.map +1 -0
- package/dist/facets_2.0/facets/RadioFacet.vue.d.ts +58 -0
- package/dist/facets_2.0/facets/RadioFacet.vue.mjs +92 -0
- package/dist/facets_2.0/facets/RadioFacet.vue.mjs.map +1 -0
- package/dist/facets_2.0/facets/SelectFacetsItem.vue.d.ts +34 -0
- package/dist/facets_2.0/facets/SelectFacetsItem.vue.mjs +45 -0
- package/dist/facets_2.0/facets/SelectFacetsItem.vue.mjs.map +1 -0
- package/dist/facets_2.0/getFacet.d.ts +3 -0
- package/dist/facets_2.0/getFacet.mjs +20 -0
- package/dist/facets_2.0/getFacet.mjs.map +1 -0
- package/dist/facets_2.0/toggleQueryParam.d.ts +9 -0
- package/dist/facets_2.0/toggleQueryParam.mjs +11 -0
- package/dist/facets_2.0/toggleQueryParam.mjs.map +1 -0
- package/dist/facets_2.0/types.d.ts +9 -0
- package/dist/facets_2.0/useFacets.d.ts +5 -0
- package/dist/facets_2.0/useFacets.mjs +14 -0
- package/dist/facets_2.0/useFacets.mjs.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +276 -273
- package/dist/index.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/dist/search/Search.vue.d.ts +2 -0
- package/dist/search/Search.vue.mjs +20 -0
- package/dist/search/Search.vue.mjs.map +1 -0
- package/dist/services/datasetService.d.ts +5 -0
- package/dist/services/datasetService.mjs +2 -1
- package/dist/services/datasetService.mjs.map +1 -1
- package/dist/store/modules/cataloguesStore.d.ts +6 -0
- package/dist/store/modules/cataloguesStore.mjs +10 -4
- package/dist/store/modules/cataloguesStore.mjs.map +1 -1
- package/dist/store/modules/datasetsStore.d.ts +12 -0
- package/dist/store/modules/datasetsStore.mjs +26 -14
- package/dist/store/modules/datasetsStore.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getImg as
|
|
3
|
-
import { has as g, toPairs as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { computed as C, unref as c } from "vue";
|
|
2
|
+
import { getImg as D, getTranslationFor as i, truncate as I } from "../utils/helpers.mjs";
|
|
3
|
+
import { has as g, toPairs as b, groupBy as h, uniqBy as s } from "lodash-es";
|
|
4
|
+
import { useRuntimeEnv as B } from "./useRuntimeEnv.mjs";
|
|
5
|
+
function P({ datasets: l, locale: m }) {
|
|
6
|
+
const o = B();
|
|
7
|
+
function d(e) {
|
|
8
|
+
return o.content.catalogs.useCatalogCountries ? `${o.content.catalogs.defaultCatalogImagePath}/${g(e, "country.id") ? e.country.id : o.content.catalogs.defaultCatalogCountryID}` : `${o.content.catalogs.defaultCatalogImagePath}/${g(e, "id") ? e.id : o.content.catalogs.defaultCatalogID}`;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
return
|
|
10
|
+
function u(e) {
|
|
11
|
+
return I(e, 8, !0);
|
|
11
12
|
}
|
|
12
13
|
function f(e) {
|
|
13
|
-
const
|
|
14
|
+
const r = e.map((a) => ({
|
|
14
15
|
...a,
|
|
15
|
-
id:
|
|
16
|
-
label:
|
|
17
|
-
})),
|
|
16
|
+
id: u(a.id),
|
|
17
|
+
label: u(a.label)
|
|
18
|
+
})), n = b(h(r, "id")).sort((a, y) => y[1].length - a[1].length).map((a) => a[1][0]), p = s(n, "id");
|
|
18
19
|
return s(p, "label");
|
|
19
20
|
}
|
|
20
21
|
return C(() => {
|
|
21
|
-
const e =
|
|
22
|
+
const e = c(l), r = c(m);
|
|
22
23
|
return !l || !e ? null : e.map((t) => ({
|
|
23
24
|
id: t.id,
|
|
24
|
-
src:
|
|
25
|
+
src: D(d(t.catalog)),
|
|
25
26
|
dataset: {
|
|
26
|
-
title: i(t.title,
|
|
27
|
-
description: i(t.description,
|
|
28
|
-
catalog: i(t.catalog.title,
|
|
27
|
+
title: i(t.title, r, t.languages) || t.id,
|
|
28
|
+
description: i(t.description, r, t.languages),
|
|
29
|
+
catalog: i(t.catalog.title, r, []),
|
|
29
30
|
createdDate: t.releaseDate,
|
|
30
31
|
updatedDate: t.modificationDate,
|
|
31
|
-
formats: f(t.distributionFormats).filter((
|
|
32
|
+
formats: f(t.distributionFormats).filter((n) => n.id || n.label)
|
|
32
33
|
}
|
|
33
34
|
}));
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
P as useDataInfoBox
|
|
38
39
|
};
|
|
39
40
|
//# sourceMappingURL=useDataInfoBox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDataInfoBox.mjs","sources":["../../lib/composables/useDataInfoBox.js"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useDataInfoBox.mjs","sources":["../../lib/composables/useDataInfoBox.js"],"sourcesContent":["import {computed, unref} from \"vue\";\nimport {getImg, getTranslationFor, truncate} from \"../utils/helpers\";\nimport {groupBy, has, toPairs, uniqBy} from \"lodash-es\";\nimport {useRuntimeEnv} from \"./useRuntimeEnv.ts\";\n\nexport function useDataInfoBox({ datasets, locale }) {\n\n // const vm = getCurrentInstance();\n // const $env = vm.proxy.$env;\n const $env = useRuntimeEnv();\n\n function getCatalogImage(catalog) {\n return $env.content.catalogs.useCatalogCountries\n ? `${$env.content.catalogs.defaultCatalogImagePath}/${has(catalog, 'country.id') ? catalog.country.id : $env.content.catalogs.defaultCatalogCountryID}`\n : `${$env.content.catalogs.defaultCatalogImagePath}/${has(catalog, 'id') ? catalog.id : $env.content.catalogs.defaultCatalogID}`;\n }\n\n\n /**\n * @description Cuts badge format string (max 8 chars)\n * @param label {String} - badge label or id (e.g. csv)\n */\n function getBadgeFormat(label) {\n return truncate(label, 8, true);\n }\n\n /**\n * @description Removes the duplicates of the given array\n * @param array {Array} - The array to remove duplicates from\n * @returns {Array}\n */\n function removeDuplicatesOf(array) {\n const correctedFormatArray = array.map(format => (\n {\n ...format,\n id: getBadgeFormat(format.id),\n label: getBadgeFormat(format.label),\n }\n ));\n // sorts after # of occurences (highest occurence first)\n // possibility #1\n const sortedArray = toPairs(groupBy(correctedFormatArray, \"id\")).sort((a, b) => b[1].length - a[1].length);\n const onlyFormatObjectsArray = sortedArray.map(arr => arr[1][0]);\n // lodash uniqBy funtion removes duplicate id´s from array of objects\n const uniqById = uniqBy(onlyFormatObjectsArray, \"id\");\n return uniqBy(uniqById, \"label\");\n }\n\n return computed(() => {\n const dsList = unref(datasets);\n const l = unref(locale);\n\n if (!datasets || !dsList) {\n return null;\n }\n\n return dsList.map((ds) => {\n return {\n id: ds.id,\n src: getImg(getCatalogImage(ds.catalog)),\n dataset: {\n title: getTranslationFor(ds.title, l, ds.languages) || ds.id,\n description: getTranslationFor(ds.description, l, ds.languages),\n catalog: getTranslationFor(ds.catalog.title, l, []),\n createdDate: ds.releaseDate,\n updatedDate: ds.modificationDate,\n formats: removeDuplicatesOf(ds.distributionFormats).filter((format) => format.id || format.label),\n }\n }\n })\n })\n}\n"],"names":["useDataInfoBox","datasets","locale","$env","useRuntimeEnv","getCatalogImage","catalog","has","getBadgeFormat","label","truncate","removeDuplicatesOf","array","correctedFormatArray","format","onlyFormatObjectsArray","toPairs","groupBy","b","arr","uniqById","uniqBy","computed","dsList","unref","l","ds","getImg","getTranslationFor"],"mappings":";;;;AAKO,SAASA,EAAe,EAAE,UAAAC,GAAU,QAAAC,KAAU;AAInD,QAAMC,IAAOC;AAEb,WAASC,EAAgBC,GAAS;AAChC,WAAOH,EAAK,QAAQ,SAAS,sBACzB,GAAGA,EAAK,QAAQ,SAAS,uBAAuB,IAAII,EAAID,GAAS,YAAY,IAAIA,EAAQ,QAAQ,KAAKH,EAAK,QAAQ,SAAS,uBAAuB,KACnJ,GAAGA,EAAK,QAAQ,SAAS,uBAAuB,IAAII,EAAID,GAAS,IAAI,IAAIA,EAAQ,KAAKH,EAAK,QAAQ,SAAS,gBAAgB;AAAA,EACjI;AAOD,WAASK,EAAeC,GAAO;AAC7B,WAAOC,EAASD,GAAO,GAAG,EAAI;AAAA,EAC/B;AAOD,WAASE,EAAmBC,GAAO;AACjC,UAAMC,IAAuBD,EAAM,IAAI,CAAAE,OACrC;AAAA,MACE,GAAGA;AAAA,MACH,IAAIN,EAAeM,EAAO,EAAE;AAAA,MAC5B,OAAON,EAAeM,EAAO,KAAK;AAAA,IACnC,EACF,GAIKC,IADcC,EAAQC,EAAQJ,GAAsB,IAAI,CAAC,EAAE,KAAK,CAAC,GAAGK,MAAMA,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAC9D,IAAI,CAAAC,MAAOA,EAAI,CAAC,EAAE,CAAC,CAAC,GAEzDC,IAAWC,EAAON,GAAwB,IAAI;AACpD,WAAOM,EAAOD,GAAU,OAAO;AAAA,EAChC;AAED,SAAOE,EAAS,MAAM;AACpB,UAAMC,IAASC,EAAMvB,CAAQ,GACvBwB,IAAID,EAAMtB,CAAM;AAEtB,WAAI,CAACD,KAAY,CAACsB,IACT,OAGFA,EAAO,IAAI,CAACG,OACV;AAAA,MACL,IAAIA,EAAG;AAAA,MACP,KAAKC,EAAOtB,EAAgBqB,EAAG,OAAO,CAAC;AAAA,MACvC,SAAS;AAAA,QACP,OAAOE,EAAkBF,EAAG,OAAOD,GAAGC,EAAG,SAAS,KAAKA,EAAG;AAAA,QAC1D,aAAaE,EAAkBF,EAAG,aAAaD,GAAGC,EAAG,SAAS;AAAA,QAC9D,SAASE,EAAkBF,EAAG,QAAQ,OAAOD,GAAG,EAAE;AAAA,QAClD,aAAaC,EAAG;AAAA,QAChB,aAAaA,EAAG;AAAA,QAChB,SAASf,EAAmBe,EAAG,mBAAmB,EAAE,OAAO,CAACZ,MAAWA,EAAO,MAAMA,EAAO,KAAK;AAAA,MACjG;AAAA,IACF,EACF;AAAA,EACL,CAAG;AACH;"}
|
|
@@ -5,6 +5,10 @@ type ModulesConfig = {
|
|
|
5
5
|
serviceParams: {
|
|
6
6
|
[key: string]: unknown;
|
|
7
7
|
};
|
|
8
|
+
customFacets: any;
|
|
9
|
+
};
|
|
10
|
+
export declare const extras: {
|
|
11
|
+
[key: string]: any;
|
|
8
12
|
};
|
|
9
13
|
export declare function configureModules(app: any, store: any, config?: ModulesConfig): void;
|
|
10
14
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { configureServices as
|
|
1
|
+
import { configureServices as t } from "./configureServices.mjs";
|
|
2
2
|
import { configureComponents as m } from "./configureComponents.mjs";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const u = {};
|
|
4
|
+
function v(r, s, e) {
|
|
5
|
+
s.$app = r, e && (t(s, e == null ? void 0 : e.serviceParams), m(r, e == null ? void 0 : e.components)), u.customFacets = e == null ? void 0 : e.customFacets;
|
|
5
6
|
}
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
v as configureModules,
|
|
9
|
+
u as extras
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=configureModules.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureModules.mjs","sources":["../../lib/configurations/configureModules.ts"],"sourcesContent":["import { configureServices } from \"./configureServices\";\nimport { ComponentMap, configureComponents } from \"./configureComponents\";\n\ntype ModulesConfig = {\n components: ComponentMap,\n serviceParams: {[key: string]: unknown},\n};\n\nexport function configureModules(app: any, store: any, config?: ModulesConfig) {\n store.$app = app;\n if (config) {\n configureServices(store, config
|
|
1
|
+
{"version":3,"file":"configureModules.mjs","sources":["../../lib/configurations/configureModules.ts"],"sourcesContent":["import { configureServices } from \"./configureServices\";\nimport { ComponentMap, configureComponents } from \"./configureComponents\";\n\ntype ModulesConfig = {\n components: ComponentMap,\n serviceParams: {[key: string]: unknown},\n customFacets: any\n};\n\nexport const extras: {[key:string]: any} = {};\n\nexport function configureModules(app: any, store: any, config?: ModulesConfig) {\n store.$app = app;\n if (config) {\n configureServices(store, config?.serviceParams);\n configureComponents(app, config?.components);\n }\n extras.customFacets = config?.customFacets\n}\n"],"names":["extras","configureModules","app","store","config","configureServices","configureComponents"],"mappings":";;AASO,MAAMA,IAA8B,CAAC;AAE5B,SAAAC,EAAiBC,GAAUC,GAAYC,GAAwB;AAC7E,EAAAD,EAAM,OAAOD,GACTE,MACgBC,EAAAF,GAAOC,KAAA,gBAAAA,EAAQ,aAAa,GAC1BE,EAAAJ,GAAKE,KAAA,gBAAAA,EAAQ,UAAU,IAE7CJ,EAAO,eAAeI,KAAA,gBAAAA,EAAQ;AAChC;"}
|
|
@@ -124,11 +124,11 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
124
124
|
isLocatedOnAuthorizedDatasetPage(): any;
|
|
125
125
|
isLocatedOnAuthorizedCatalogPage(): boolean;
|
|
126
126
|
getUserData: import('vuex').Computed;
|
|
127
|
-
getTitle: import('vuex').Computed;
|
|
128
|
-
getDescription: import('vuex').Computed;
|
|
129
127
|
getCatalog: import('vuex').Computed;
|
|
130
128
|
getLoading: import('vuex').Computed;
|
|
129
|
+
getDescription: import('vuex').Computed;
|
|
131
130
|
getID: import('vuex').Computed;
|
|
131
|
+
getTitle: import('vuex').Computed;
|
|
132
132
|
}, {
|
|
133
133
|
setupKeycloakWatcher(): void;
|
|
134
134
|
handleConfirm(action: any, argsObj: any, { successMessage, errorMessage }: {
|
|
@@ -11,8 +11,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
11
11
|
}, {
|
|
12
12
|
getDatasetDescription(): any;
|
|
13
13
|
getDatasetDescriptionLength(): any;
|
|
14
|
-
getDescription: import('vuex').Computed;
|
|
15
14
|
getLanguages: import('vuex').Computed;
|
|
15
|
+
getDescription: import('vuex').Computed;
|
|
16
16
|
}, {
|
|
17
17
|
truncate: typeof truncate;
|
|
18
18
|
toggleDatasetDescription(): void;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { truncate } from '../../utils/helpers';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<{
|
|
3
3
|
embed?: any;
|
|
4
|
-
getDistributionFormat?: any;
|
|
5
4
|
distribution?: any;
|
|
5
|
+
getDistributionFormat?: any;
|
|
6
6
|
distributionFormatTruncated?: any;
|
|
7
7
|
}, {}, {}, {}, {
|
|
8
8
|
truncate: typeof truncate;
|
|
9
9
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
10
10
|
embed?: any;
|
|
11
|
-
getDistributionFormat?: any;
|
|
12
11
|
distribution?: any;
|
|
12
|
+
getDistributionFormat?: any;
|
|
13
13
|
distributionFormatTruncated?: any;
|
|
14
14
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
15
|
export default _default;
|
|
@@ -25,10 +25,10 @@ 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
|
+
getDistributions: import('vuex').Computed;
|
|
31
30
|
getLanguages: import('vuex').Computed;
|
|
31
|
+
getTitle: import('vuex').Computed;
|
|
32
32
|
}, {
|
|
33
33
|
getTranslationFor: typeof getTranslationFor;
|
|
34
34
|
fetchDistributionFiles(zip: any, files: any, folder: any, getContentTypeFormat: any): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: import('vue').DefineComponent<{
|
|
2
|
-
getDistributionFormat?: any;
|
|
3
2
|
distribution?: any;
|
|
3
|
+
getDistributionFormat?: any;
|
|
4
4
|
isOnlyOneUrl?: any;
|
|
5
5
|
getDownloadUrl?: any;
|
|
6
6
|
trackGoto?: any;
|
|
@@ -12,8 +12,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
12
12
|
setClipboard(value: any): void;
|
|
13
13
|
popupCopyUrlAlert(): void;
|
|
14
14
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
15
|
-
getDistributionFormat?: any;
|
|
16
15
|
distribution?: any;
|
|
16
|
+
getDistributionFormat?: any;
|
|
17
17
|
isOnlyOneUrl?: any;
|
|
18
18
|
getDownloadUrl?: any;
|
|
19
19
|
trackGoto?: any;
|
|
@@ -6,10 +6,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
6
6
|
default: () => boolean;
|
|
7
7
|
};
|
|
8
8
|
}>, {}, {}, {
|
|
9
|
-
getTitle: import('vuex').Computed;
|
|
10
9
|
getCatalog: import('vuex').Computed;
|
|
11
10
|
getLanguages: import('vuex').Computed;
|
|
12
11
|
getID: import('vuex').Computed;
|
|
12
|
+
getTitle: import('vuex').Computed;
|
|
13
13
|
}, {
|
|
14
14
|
getTranslationFor: typeof getTranslationFor;
|
|
15
15
|
isErpdActive(): boolean;
|
|
@@ -5,8 +5,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
5
5
|
required: true;
|
|
6
6
|
};
|
|
7
7
|
}>, {}, {}, {
|
|
8
|
-
getTitle: import('vuex').Computed;
|
|
9
8
|
getLanguages: import('vuex').Computed;
|
|
9
|
+
getTitle: import('vuex').Computed;
|
|
10
10
|
}, {
|
|
11
11
|
getTranslationFor: typeof getTranslationFor;
|
|
12
12
|
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -18,10 +18,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
18
18
|
}, {
|
|
19
19
|
url(): string;
|
|
20
20
|
showDQV(): any;
|
|
21
|
-
getTitle: import('vuex').Computed;
|
|
22
21
|
getLoading: import('vuex').Computed;
|
|
23
22
|
getLanguages: import('vuex').Computed;
|
|
24
23
|
getID: import('vuex').Computed;
|
|
24
|
+
getTitle: import('vuex').Computed;
|
|
25
25
|
getIsDQVDataRDFAvailable: import('vuex').Computed;
|
|
26
26
|
getIsDQVDataTTLAvailable: import('vuex').Computed;
|
|
27
27
|
getIsDQVDataN3Available: import('vuex').Computed;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { mapGetters as
|
|
2
|
-
import { debounce as L, isNil as F, isArray as
|
|
3
|
-
import
|
|
1
|
+
import { mapGetters as f, mapActions as P } from "vuex";
|
|
2
|
+
import { debounce as L, isNil as F, isArray as h, has as q } from "lodash-es";
|
|
3
|
+
import y from "jquery";
|
|
4
4
|
import A from "../utils/fileTypes.mjs";
|
|
5
5
|
import k from "./datasetsFacets/DatasetsFacets.vue.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import I from "../widgets/Pagination.vue.mjs";
|
|
7
|
+
import T from "../facets/SelectedFacetsOverview.vue.mjs";
|
|
8
8
|
import B from "../widgets/AppLink.vue.mjs";
|
|
9
|
-
import { truncate as M, getTranslationFor as N, getImg as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
9
|
+
import { truncate as M, getTranslationFor as N, getImg as _ } from "../utils/helpers.mjs";
|
|
10
|
+
import E from "./DatasetsTopControls.vue.mjs";
|
|
11
|
+
import G from "./DatasetsFilters.vue.mjs";
|
|
12
|
+
import R from "./DatasetList.vue.mjs";
|
|
13
13
|
import "@unhead/vue";
|
|
14
14
|
import "merge-anything";
|
|
15
15
|
import "../configurations/config-schema/apiSchema.mjs";
|
|
@@ -21,22 +21,24 @@ import "../configurations/config-schema/languagesSchema.mjs";
|
|
|
21
21
|
import "../configurations/config-schema/themesSchema.mjs";
|
|
22
22
|
import "../configurations/config-schema/trackerSchema.mjs";
|
|
23
23
|
import "../configurations/config-schema/configSchema.mjs";
|
|
24
|
-
import { resolveComponent as n, openBlock as
|
|
24
|
+
import { resolveComponent as n, openBlock as r, createElementBlock as l, createVNode as g, createTextVNode as i, createElementVNode as o, renderSlot as p, toDisplayString as d, normalizeClass as j, createCommentVNode as u, withCtx as U, createBlock as D } from "vue";
|
|
25
25
|
import "vue-router";
|
|
26
26
|
import { useDatasetsHead as Q } from "../composables/head/useDatasetsHead.mjs";
|
|
27
27
|
import "vue-i18n";
|
|
28
|
+
import V from "../facets_2.0/Facets.vue.mjs";
|
|
28
29
|
import "./Datasets.vue2.mjs";
|
|
29
|
-
import
|
|
30
|
-
const
|
|
30
|
+
import H from "../_virtual/_plugin-vue_export-helper.mjs";
|
|
31
|
+
const W = {
|
|
31
32
|
name: "Datasets",
|
|
32
33
|
components: {
|
|
33
|
-
DatasetsFilters:
|
|
34
|
-
DatasetsTopControls:
|
|
34
|
+
DatasetsFilters: G,
|
|
35
|
+
DatasetsTopControls: E,
|
|
35
36
|
appLink: B,
|
|
36
|
-
selectedFacetsOverview:
|
|
37
|
+
selectedFacetsOverview: T,
|
|
37
38
|
datasetsFacets: k,
|
|
38
|
-
pagination:
|
|
39
|
-
DatasetList:
|
|
39
|
+
pagination: I,
|
|
40
|
+
DatasetList: R,
|
|
41
|
+
Facets: V
|
|
40
42
|
},
|
|
41
43
|
props: {
|
|
42
44
|
infiniteScrolling: {
|
|
@@ -64,10 +66,10 @@ const H = {
|
|
|
64
66
|
};
|
|
65
67
|
},
|
|
66
68
|
computed: {
|
|
67
|
-
...
|
|
69
|
+
...f("catalogDetails", [
|
|
68
70
|
"getCatalog"
|
|
69
71
|
]),
|
|
70
|
-
...
|
|
72
|
+
...f("datasets", [
|
|
71
73
|
"getDatasets",
|
|
72
74
|
"getDatasetsCount",
|
|
73
75
|
"getLimit",
|
|
@@ -77,7 +79,7 @@ const H = {
|
|
|
77
79
|
"getPageCount",
|
|
78
80
|
"getMinScoring"
|
|
79
81
|
]),
|
|
80
|
-
...
|
|
82
|
+
...f("datasets", {
|
|
81
83
|
// Rename getters to something different because we'll perform some modifications on them.
|
|
82
84
|
// These modifications involve removing catalog related information from facets for fixed catalog filter mode
|
|
83
85
|
getAllAvailableFacetsOriginal: "getAllAvailableFacets",
|
|
@@ -100,11 +102,11 @@ const H = {
|
|
|
100
102
|
* @returns {Object}
|
|
101
103
|
*/
|
|
102
104
|
facets() {
|
|
103
|
-
const t = this.$env.content.datasets.facets.defaultFacetOrder, e = this.showCatalogDetails,
|
|
105
|
+
const t = this.$env.content.datasets.facets.defaultFacetOrder, e = this.showCatalogDetails, c = t.reduce((s, a) => (s[a] = e && a === "catalog" && !this.fixedCatalogFilter ? [this.$route.params.ctlg_id || void 0] : this.getUrlFacetsOrDefault(a), s), {});
|
|
104
106
|
return this.fixedCatalogFilter ? {
|
|
105
|
-
...
|
|
107
|
+
...c,
|
|
106
108
|
superCatalog: [this.fixedCatalogFilter]
|
|
107
|
-
} :
|
|
109
|
+
} : c;
|
|
108
110
|
},
|
|
109
111
|
getAllAvailableFacets() {
|
|
110
112
|
return this.showCatalogDetails ? this.getAllAvailableFacetsOriginal.filter((t) => t.id !== "catalog") : this.getAllAvailableFacetsOriginal;
|
|
@@ -122,7 +124,7 @@ const H = {
|
|
|
122
124
|
return this.getMinScoring > 0;
|
|
123
125
|
},
|
|
124
126
|
dataScope() {
|
|
125
|
-
return this.$route.query.dataScope ?
|
|
127
|
+
return this.$route.query.dataScope ? h(this.$route.query.dataScope) && this.$route.query.dataScope.length > 0 ? this.$route.query.dataScope[0] : h(this.$route.query.dataScope) && this.$route.query.dataScope.length === 0 ? null : this.$route.query.dataScope : null;
|
|
126
128
|
}
|
|
127
129
|
},
|
|
128
130
|
methods: {
|
|
@@ -144,10 +146,10 @@ const H = {
|
|
|
144
146
|
]),
|
|
145
147
|
// The imported Lodash has function. Must be defined in Methods so we can use it in template
|
|
146
148
|
has: q,
|
|
147
|
-
isArray:
|
|
149
|
+
isArray: h,
|
|
148
150
|
truncate: M,
|
|
149
151
|
getTranslationFor: N,
|
|
150
|
-
getImg:
|
|
152
|
+
getImg: _,
|
|
151
153
|
/**
|
|
152
154
|
* @description Handler-function for the scroll event.
|
|
153
155
|
*/
|
|
@@ -190,8 +192,8 @@ const H = {
|
|
|
190
192
|
initFacets() {
|
|
191
193
|
const t = this.$env.content.datasets.facets.defaultFacetOrder, e = this.facets;
|
|
192
194
|
this.facetFields.push(...t);
|
|
193
|
-
const
|
|
194
|
-
Object.keys(
|
|
195
|
+
const m = t.filter((s) => !(e[s] && e[s].length > 0) && !this.$route.query[s]).reduce((s, a) => (s[a] = [], s), {});
|
|
196
|
+
Object.keys(m) > 0 && this.$router.push({ query: { ...this.$route.query, ...m } }), this.setFacets(e);
|
|
195
197
|
},
|
|
196
198
|
getUrlFacetsOrDefault(t) {
|
|
197
199
|
const e = this.$route.query[t];
|
|
@@ -224,7 +226,7 @@ const H = {
|
|
|
224
226
|
this.$nextTick(() => {
|
|
225
227
|
this.$nextTick(() => {
|
|
226
228
|
this.$Progress.start(), this.loadDatasets({ locale: this.$route.query.locale }).then(() => {
|
|
227
|
-
this.setPageCount(Math.ceil(this.getDatasetsCount / this.getLimit)), this.$Progress.finish(),
|
|
229
|
+
this.setPageCount(Math.ceil(this.getDatasetsCount / this.getLimit)), this.$Progress.finish(), y('[data-toggle="tooltip"]').tooltip({
|
|
228
230
|
container: "body"
|
|
229
231
|
});
|
|
230
232
|
}).catch((t) => {
|
|
@@ -268,49 +270,49 @@ const H = {
|
|
|
268
270
|
});
|
|
269
271
|
},
|
|
270
272
|
beforeUnmount() {
|
|
271
|
-
|
|
273
|
+
y(".tooltip").remove(), this.infiniteScrolling && window.removeEventListener("scroll", this.onScroll);
|
|
272
274
|
},
|
|
273
275
|
setup() {
|
|
274
276
|
Q();
|
|
275
277
|
}
|
|
276
|
-
},
|
|
278
|
+
}, z = { class: "datasets-container d-flex flex-column p-0 bg-transparent" }, J = { class: "container-fluid datasets content" }, K = {
|
|
277
279
|
key: 0,
|
|
278
280
|
class: "row col-12 page-title catalog-title text-primary"
|
|
279
|
-
},
|
|
281
|
+
}, X = {
|
|
280
282
|
key: 1,
|
|
281
283
|
class: "row col-12 page-title text-primary"
|
|
282
|
-
},
|
|
284
|
+
}, Y = { class: "row" }, Z = { class: "col d-flex d-md-none justify-content-end flex-wrap" }, x = {
|
|
283
285
|
key: 0,
|
|
284
286
|
class: "material-icons small-icon align-bottom"
|
|
285
|
-
},
|
|
287
|
+
}, tt = {
|
|
286
288
|
key: 1,
|
|
287
289
|
class: "material-icons small-icon align-bottom"
|
|
288
|
-
},
|
|
290
|
+
}, et = { class: "col-md-9 col-12" }, at = {
|
|
289
291
|
key: 0,
|
|
290
292
|
class: "loading-spinner ml-3"
|
|
291
|
-
},
|
|
293
|
+
}, st = {
|
|
292
294
|
key: 0,
|
|
293
295
|
class: "alert alert-warning mt-3 d-flex flex-row"
|
|
294
|
-
},
|
|
296
|
+
}, it = {
|
|
295
297
|
key: 3,
|
|
296
298
|
class: "loading-spinner mx-auto mt-3 mb-3"
|
|
297
|
-
},
|
|
298
|
-
function
|
|
299
|
-
const
|
|
300
|
-
return
|
|
301
|
-
|
|
299
|
+
}, ot = { class: "row" }, rt = { class: "column col-12 col-md-9 offset-md-3" };
|
|
300
|
+
function lt(t, e, c, m, s, a) {
|
|
301
|
+
const $ = n("datasets-top-controls"), v = n("facets"), C = n("datasets-filters"), S = n("app-link"), b = n("selectedFacetsOverview"), O = n("dataset-list"), w = n("pagination");
|
|
302
|
+
return r(), l("div", z, [
|
|
303
|
+
g($, {
|
|
302
304
|
facets: a.facets,
|
|
303
305
|
getPage: t.getPage,
|
|
304
306
|
getLimit: t.getLimit,
|
|
305
307
|
class: "datasets-top-controls"
|
|
306
308
|
}, null, 8, ["facets", "getPage", "getLimit"]),
|
|
307
309
|
e[11] || (e[11] = i()),
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
a.showCatalogDetails ? (
|
|
310
|
+
o("div", J, [
|
|
311
|
+
p(t.$slots, "title", {}, () => [
|
|
312
|
+
a.showCatalogDetails ? (r(), l("h1", K, d(a.getTranslationFor(t.getCatalog.title, t.$route.query.locale, t.getCatalog.languages)), 1)) : (r(), l("h1", X, d(t.$t("message.header.navigation.data.datasets")), 1))
|
|
311
313
|
], !0),
|
|
312
314
|
e[9] || (e[9] = i()),
|
|
313
|
-
|
|
315
|
+
p(t.$slots, "content", {
|
|
314
316
|
datasetsCount: t.getDatasetsCount,
|
|
315
317
|
datasets: t.getDatasets,
|
|
316
318
|
locale: t.$route.query.locale,
|
|
@@ -319,34 +321,32 @@ function rt(t, e, d, u, s, a) {
|
|
|
319
321
|
facets: a.getFacets,
|
|
320
322
|
availableFacets: a.getAllAvailableFacets
|
|
321
323
|
}, () => [
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
324
|
+
o("div", Y, [
|
|
325
|
+
o("div", Z, [
|
|
326
|
+
o("button", {
|
|
325
327
|
class: "btn btn-primary mb-3 text-right text-white",
|
|
326
328
|
"data-toggle": "collapse",
|
|
327
329
|
"data-target": "#datasetFacets",
|
|
328
330
|
"data-cy": "btn-filter-toggle",
|
|
329
|
-
onClick: e[0] || (e[0] = (
|
|
331
|
+
onClick: e[0] || (e[0] = (nt) => s.filterCollapsed = !s.filterCollapsed)
|
|
330
332
|
}, [
|
|
331
|
-
|
|
332
|
-
s.filterCollapsed ? (o(), l("i", Z, "arrow_drop_up")) : (o(), l("i", x, "arrow_drop_down"))
|
|
333
|
+
s.filterCollapsed ? (r(), l("i", x, "arrow_drop_up")) : (r(), l("i", tt, "arrow_drop_down"))
|
|
333
334
|
])
|
|
334
335
|
]),
|
|
335
336
|
e[7] || (e[7] = i()),
|
|
336
|
-
|
|
337
|
-
|
|
337
|
+
g(v, {
|
|
338
|
+
facetsConfig: a.getAllAvailableFacets,
|
|
339
|
+
facetsIds: t.$env.content.datasets.facets.defaultFacetOrder,
|
|
338
340
|
class: "col-md-3 col-12 mb-3 mb-md-0 px-0 collapse",
|
|
339
|
-
id: "datasetFacets"
|
|
340
|
-
|
|
341
|
-
"available-facets": a.getAllAvailableFacets
|
|
342
|
-
}, null, 8, ["dataScope", "available-facets"])) : g("", !0),
|
|
341
|
+
id: "datasetFacets"
|
|
342
|
+
}, null, 8, ["facetsConfig", "facetsIds"]),
|
|
343
343
|
e[8] || (e[8] = i()),
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
344
|
+
o("section", et, [
|
|
345
|
+
p(t.$slots, "datasets-filters", {}, () => [
|
|
346
|
+
g(C)
|
|
347
347
|
], !0),
|
|
348
348
|
e[2] || (e[2] = i()),
|
|
349
|
-
|
|
349
|
+
p(t.$slots, "datasets-found", {
|
|
350
350
|
data: {
|
|
351
351
|
loading: t.getLoading,
|
|
352
352
|
datasetsCount: t.getDatasetsCount,
|
|
@@ -355,53 +355,53 @@ function rt(t, e, d, u, s, a) {
|
|
|
355
355
|
countMessage: t.$t("message.datasets.countMessage")
|
|
356
356
|
}
|
|
357
357
|
}, () => [
|
|
358
|
-
|
|
358
|
+
o("div", {
|
|
359
359
|
class: j(["datasets-found alert alert-primary mt-3 d-flex flex-row", { "alert-danger": t.getDatasetsCount <= 0 && !t.getLoading }]),
|
|
360
360
|
role: "status"
|
|
361
361
|
}, [
|
|
362
|
-
|
|
362
|
+
o("div", null, d(t.getLoading ? t.$t("message.datasets.loadingMessage") : `${t.getDatasetsCount.toLocaleString("fi")}
|
|
363
363
|
${t.$t("message.datasets.countMessage")}`), 1),
|
|
364
364
|
e[1] || (e[1] = i()),
|
|
365
|
-
t.getLoading ? (
|
|
365
|
+
t.getLoading ? (r(), l("div", at)) : u("", !0)
|
|
366
366
|
], 2)
|
|
367
367
|
], !0),
|
|
368
368
|
e[3] || (e[3] = i()),
|
|
369
|
-
a.showScoreDisclaimer ? (
|
|
370
|
-
|
|
371
|
-
i(
|
|
372
|
-
|
|
369
|
+
a.showScoreDisclaimer ? (r(), l("div", st, [
|
|
370
|
+
o("span", null, [
|
|
371
|
+
i(d(t.$t("message.datasets.scoreDisclaimer")) + " ", 1),
|
|
372
|
+
g(S, {
|
|
373
373
|
path: "/mqa",
|
|
374
374
|
query: { locale: t.$route.query.locale },
|
|
375
375
|
target: "_blank"
|
|
376
376
|
}, {
|
|
377
377
|
default: U(() => [
|
|
378
|
-
|
|
378
|
+
o("span", null, d(t.$t("message.metadata.methodologyPage")), 1)
|
|
379
379
|
]),
|
|
380
380
|
_: 1
|
|
381
381
|
}, 8, ["query"])
|
|
382
382
|
])
|
|
383
|
-
])) :
|
|
383
|
+
])) : u("", !0),
|
|
384
384
|
e[4] || (e[4] = i()),
|
|
385
|
-
a.getFacets ? (
|
|
385
|
+
a.getFacets ? (r(), D(b, {
|
|
386
386
|
key: 1,
|
|
387
387
|
"selected-facets": a.getFacets,
|
|
388
388
|
"available-facets": a.getAllAvailableFacets
|
|
389
|
-
}, null, 8, ["selected-facets", "available-facets"])) :
|
|
389
|
+
}, null, 8, ["selected-facets", "available-facets"])) : u("", !0),
|
|
390
390
|
e[5] || (e[5] = i()),
|
|
391
|
-
t.getLoading ?
|
|
391
|
+
t.getLoading ? u("", !0) : (r(), D(O, {
|
|
392
392
|
key: 2,
|
|
393
393
|
datasets: t.getDatasets,
|
|
394
394
|
locale: t.$route.query.locale || "en"
|
|
395
395
|
}, null, 8, ["datasets", "locale"])),
|
|
396
396
|
e[6] || (e[6] = i()),
|
|
397
|
-
t.getLoading ? (
|
|
397
|
+
t.getLoading ? (r(), l("div", it)) : u("", !0)
|
|
398
398
|
])
|
|
399
399
|
])
|
|
400
400
|
], !0),
|
|
401
401
|
e[10] || (e[10] = i()),
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
402
|
+
o("div", ot, [
|
|
403
|
+
o("div", rt, [
|
|
404
|
+
g(w, {
|
|
405
405
|
class: "mt-3",
|
|
406
406
|
"items-count": t.getDatasetsCount,
|
|
407
407
|
"items-per-page": t.getLimit,
|
|
@@ -414,8 +414,8 @@ function rt(t, e, d, u, s, a) {
|
|
|
414
414
|
])
|
|
415
415
|
]);
|
|
416
416
|
}
|
|
417
|
-
const
|
|
417
|
+
const Gt = /* @__PURE__ */ H(W, [["render", lt], ["__scopeId", "data-v-d65adfa9"]]);
|
|
418
418
|
export {
|
|
419
|
-
|
|
419
|
+
Gt as default
|
|
420
420
|
};
|
|
421
421
|
//# sourceMappingURL=Datasets.vue.mjs.map
|