@piveau/piveau-hub-ui-modules 4.5.7 → 4.5.9
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/CatalogueMQA.vue.mjs +221 -157
- package/dist/data-provider-interface/CatalogueMQA.vue.mjs.map +1 -1
- package/dist/data-provider-interface/DPIMenu.vue.d.ts +2 -2
- package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs +37 -37
- package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs.map +1 -1
- 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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { mapGetters as r, mapActions as c } from "vuex";
|
|
2
|
+
import n from "./RadioFacet.vue.mjs";
|
|
3
|
+
import { resolveComponent as p, openBlock as l, createBlock as m } from "vue";
|
|
4
|
+
import g from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
5
|
+
const d = {
|
|
6
|
+
name: "DataServicesFacet",
|
|
7
|
+
props: {
|
|
8
|
+
config: Object
|
|
9
|
+
},
|
|
10
|
+
components: {
|
|
11
|
+
RadioFacet: n
|
|
12
|
+
},
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
yes: this.i18n.global.t("message.metadata.yes"),
|
|
16
|
+
no: this.i18n.global.t("message.metadata.no"),
|
|
17
|
+
property: this.i18n.global.t("message.datasetFacets.facets.dataServices.dataServicesOnly"),
|
|
18
|
+
title: this.i18n.global.t("message.metadata.dataServices"),
|
|
19
|
+
toolTipTitle: this.i18n.global.t("message.helpIcon.dataServices")
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
computed: {
|
|
23
|
+
...r("datasets", ["getDataServices"])
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
...c("datasets", ["setDataServices"]),
|
|
27
|
+
changeDataServices(e) {
|
|
28
|
+
this.setDataServices(e);
|
|
29
|
+
const t = Object.assign({}, this.$route.query, { dataServices: e, page: 1 });
|
|
30
|
+
e === "false" && delete t.dataServices, this.$router.replace({ query: t });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function f(e, t, s, h, a, o) {
|
|
35
|
+
const i = p("RadioFacet");
|
|
36
|
+
return l(), m(i, {
|
|
37
|
+
config: s.config,
|
|
38
|
+
property: a.property,
|
|
39
|
+
optionIds: ["true", "false"],
|
|
40
|
+
optionLabels: [a.yes, a.no],
|
|
41
|
+
change: o.changeDataServices,
|
|
42
|
+
initialOption: e.getDataServices
|
|
43
|
+
}, null, 8, ["config", "property", "optionLabels", "change", "initialOption"]);
|
|
44
|
+
}
|
|
45
|
+
const b = /* @__PURE__ */ g(d, [["render", f]]);
|
|
46
|
+
export {
|
|
47
|
+
b as default
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=DataServicesFacet.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataServicesFacet.vue.mjs","sources":["../../../lib/facets_2.0/facets/DataServicesFacet.vue"],"sourcesContent":["<template>\n <RadioFacet\n :config=\"config\"\n :property=\"property\"\n :optionIds=\"['true', 'false']\"\n :optionLabels=\"[yes, no]\"\n :change=\"changeDataServices\"\n :initialOption=\"getDataServices\"\n />\n</template>\n\n<script>\nimport {mapActions, mapGetters} from \"vuex\";\nimport RadioFacet from \"./RadioFacet.vue\";\n\nexport default {\n name: \"DataServicesFacet\",\n props: {\n config: Object\n },\n components: {\n RadioFacet\n },\n data() {\n return {\n yes: this.i18n.global.t('message.metadata.yes'),\n no: this.i18n.global.t('message.metadata.no'),\n property: this.i18n.global.t('message.datasetFacets.facets.dataServices.dataServicesOnly'),\n title: this.i18n.global.t('message.metadata.dataServices'),\n toolTipTitle: this.i18n.global.t('message.helpIcon.dataServices')\n };\n },\n computed: {\n ...mapGetters('datasets', ['getDataServices'])\n },\n methods: {\n ...mapActions('datasets', ['setDataServices']),\n changeDataServices(dataServices) {\n this.setDataServices(dataServices);\n const query = Object.assign({}, this.$route.query, { dataServices, page: 1 });\n if (dataServices === 'false') {\n delete query.dataServices;\n }\n this.$router.replace({ query });\n }\n }\n}\n</script>\n\n<style scoped>\n\n</style>\n"],"names":["_sfc_main","RadioFacet","mapGetters","mapActions","dataServices","query","_createBlock","_component_RadioFacet","$props","$data","$options","_ctx"],"mappings":";;;;AAeA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,QAAQ;AAAA,EACT;AAAA,EACD,YAAY;AAAA,IACV,YAAAC;AAAA,EACD;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,KAAK,KAAK,KAAK,OAAO,EAAE,sBAAsB;AAAA,MAC9C,IAAI,KAAK,KAAK,OAAO,EAAE,qBAAqB;AAAA,MAC5C,UAAU,KAAK,KAAK,OAAO,EAAE,4DAA4D;AAAA,MACzF,OAAO,KAAK,KAAK,OAAO,EAAE,+BAA+B;AAAA,MACzD,cAAc,KAAK,KAAK,OAAO,EAAE,+BAA+B;AAAA;EAEnE;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,YAAY,CAAC,iBAAiB,CAAC;AAAA,EAC9C;AAAA,EACD,SAAS;AAAA,IACP,GAAGC,EAAW,YAAY,CAAC,iBAAiB,CAAC;AAAA,IAC7C,mBAAmBC,GAAc;AAC/B,WAAK,gBAAgBA,CAAY;AACjC,YAAMC,IAAQ,OAAO,OAAO,CAAE,GAAE,KAAK,OAAO,OAAO,EAAE,cAAAD,GAAc,MAAM,EAAG,CAAA;AAC5E,MAAIA,MAAiB,WACnB,OAAOC,EAAM,cAEf,KAAK,QAAQ,QAAQ,EAAE,OAAAA,EAAO,CAAA;AAAA,IAChC;AAAA,EACF;AACF;;;cA7CEC,EAOEC,GAAA;AAAA,IANG,QAAQC,EAAM;AAAA,IACd,UAAUC,EAAQ;AAAA,IAClB,WAAW,CAAiB,QAAA,OAAA;AAAA,IAC5B,cAAY,CAAGA,EAAG,KAAEA,EAAE,EAAA;AAAA,IACtB,QAAQC,EAAkB;AAAA,IAC1B,eAAeC,EAAe;AAAA;;;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { getFacetTranslation } from '../../utils/helpers';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
config: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
};
|
|
6
|
+
multiSelect: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {
|
|
11
|
+
isExpanded: boolean;
|
|
12
|
+
isGrown: boolean;
|
|
13
|
+
numItemsAllowed: number;
|
|
14
|
+
minItems: number;
|
|
15
|
+
maxItems: number;
|
|
16
|
+
header: any;
|
|
17
|
+
fieldId: any;
|
|
18
|
+
toolTipTitle: any;
|
|
19
|
+
}, {
|
|
20
|
+
items(): any;
|
|
21
|
+
myId(): string;
|
|
22
|
+
myListId(): string;
|
|
23
|
+
myTitleId(): string;
|
|
24
|
+
}, {
|
|
25
|
+
getFacetTranslation: typeof getFacetTranslation;
|
|
26
|
+
handleGrowToggle(): void;
|
|
27
|
+
getFacetCount(facet: any): any;
|
|
28
|
+
facetIsSelected(fieldId: any, item: any): boolean | "" | null;
|
|
29
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "facet-clicked"[], "facet-clicked", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
30
|
+
config: {
|
|
31
|
+
type: ObjectConstructor;
|
|
32
|
+
};
|
|
33
|
+
multiSelect: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{
|
|
38
|
+
"onFacet-clicked"?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
multiSelect: boolean;
|
|
41
|
+
}, {}, {
|
|
42
|
+
FacetTitle: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
43
|
+
title: StringConstructor;
|
|
44
|
+
tooltip: StringConstructor;
|
|
45
|
+
titleId: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: null;
|
|
48
|
+
};
|
|
49
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
50
|
+
title: StringConstructor;
|
|
51
|
+
tooltip: StringConstructor;
|
|
52
|
+
titleId: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: null;
|
|
55
|
+
};
|
|
56
|
+
}>> & Readonly<{}>, {
|
|
57
|
+
titleId: string;
|
|
58
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
59
|
+
SelectFacetsItem: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
60
|
+
title: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
count: {
|
|
65
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
66
|
+
default: number;
|
|
67
|
+
};
|
|
68
|
+
hideCount: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
}>, {}, {
|
|
73
|
+
tooltip: string;
|
|
74
|
+
}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
75
|
+
title: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
count: {
|
|
80
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
81
|
+
default: number;
|
|
82
|
+
};
|
|
83
|
+
hideCount: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
}>> & Readonly<{}>, {
|
|
88
|
+
title: string;
|
|
89
|
+
count: string | number;
|
|
90
|
+
hideCount: boolean;
|
|
91
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
92
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
93
|
+
export default _default;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { defineComponent as g, resolveComponent as m, openBlock as s, createElementBlock as n, Fragment as d, createVNode as c, createTextVNode as a, createElementVNode as l, toDisplayString as u, createCommentVNode as r, renderList as h, normalizeClass as y } from "vue";
|
|
2
|
+
import b from "./SelectFacetsItem.vue.mjs";
|
|
3
|
+
import T from "./FacetTitle.vue.mjs";
|
|
4
|
+
import { getFacetTranslation as $ } from "../../utils/helpers.mjs";
|
|
5
|
+
import "./ExpandableSelectFacet.vue2.mjs";
|
|
6
|
+
import w from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
7
|
+
const k = g({
|
|
8
|
+
name: "ExpandableSelectFacet",
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
components: { FacetTitle: T, SelectFacetsItem: b },
|
|
11
|
+
props: {
|
|
12
|
+
config: {
|
|
13
|
+
type: Object
|
|
14
|
+
// type: {title: String, id: String, items: [], query: Object}
|
|
15
|
+
},
|
|
16
|
+
multiSelect: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !0
|
|
19
|
+
}
|
|
20
|
+
// facetIsSelected: {
|
|
21
|
+
// type: Function,
|
|
22
|
+
// default: (fieldId, item) => {
|
|
23
|
+
// // console.log("facetIsSelected", fieldId, item);
|
|
24
|
+
// const queryParams = this.$route.query[fieldId];
|
|
25
|
+
// return queryParams === item || queryParams.includes(item)
|
|
26
|
+
// }
|
|
27
|
+
// },
|
|
28
|
+
// facetClicked: {
|
|
29
|
+
// type: Function,
|
|
30
|
+
// default: (fieldId, item) => {
|
|
31
|
+
// console.log("facetClicked", fieldId, item);
|
|
32
|
+
// }
|
|
33
|
+
// }
|
|
34
|
+
},
|
|
35
|
+
emits: ["facet-clicked"],
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
isExpanded: !1,
|
|
39
|
+
isGrown: !1,
|
|
40
|
+
numItemsAllowed: this.$env.content.datasets.facets.MIN_FACET_LIMIT || 5,
|
|
41
|
+
minItems: this.$env.content.datasets.facets.MIN_FACET_LIMIT || 5,
|
|
42
|
+
maxItems: this.$env.content.datasets.facets.MAX_FACET_LIMIT || 50,
|
|
43
|
+
header: this.i18n.global.t(`message.datasetFacets.facets.${this.config.id.toLowerCase()}`),
|
|
44
|
+
fieldId: this.config.id,
|
|
45
|
+
toolTipTitle: this.i18n.global.t(`message.helpIcon.${this.config.id.toLowerCase()}`)
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
computed: {
|
|
49
|
+
items() {
|
|
50
|
+
return this.config.items.slice().sort((e, t) => t.count - e.count !== 0 ? t.count - e.count : e.name < t.name ? -1 : 1);
|
|
51
|
+
},
|
|
52
|
+
myId() {
|
|
53
|
+
return `facet-${this.fieldId}`;
|
|
54
|
+
},
|
|
55
|
+
myListId() {
|
|
56
|
+
return `facet-list-${this.fieldId}`;
|
|
57
|
+
},
|
|
58
|
+
myTitleId() {
|
|
59
|
+
return `facet-title-${this.fieldId}`;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
methods: {
|
|
63
|
+
getFacetTranslation: $,
|
|
64
|
+
handleGrowToggle() {
|
|
65
|
+
this.isGrown = !this.isGrown, this.numItemsAllowed = this.isGrown ? this.maxItems : this.minItems;
|
|
66
|
+
},
|
|
67
|
+
getFacetCount(e) {
|
|
68
|
+
return this.fieldId === "scoring" ? "" : e.count;
|
|
69
|
+
},
|
|
70
|
+
facetIsSelected(e, t) {
|
|
71
|
+
const o = this.$route.query[e];
|
|
72
|
+
return o && (o === t.id || o.includes(t.id));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}), C = ["aria-labelledby"], F = ["data-target"], v = { class: "h5 mb-0" }, E = { class: "btn" }, L = {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "material-icons small-icon expand-more animated"
|
|
78
|
+
}, A = {
|
|
79
|
+
key: 1,
|
|
80
|
+
class: "material-icons small-icon expand-less animated"
|
|
81
|
+
}, G = ["id"], S = { class: "material-icons align-bottom expand-more animated" };
|
|
82
|
+
function M(e, t, o, N, V, j) {
|
|
83
|
+
const f = m("facet-title"), p = m("select-facets-item");
|
|
84
|
+
return s(), n("div", {
|
|
85
|
+
class: "list-group col pr-0",
|
|
86
|
+
role: "group",
|
|
87
|
+
"aria-labelledby": e.myTitleId
|
|
88
|
+
}, [
|
|
89
|
+
e.header ? (s(), n(d, { key: 0 }, [
|
|
90
|
+
c(f, {
|
|
91
|
+
title: e.header,
|
|
92
|
+
tooltip: e.toolTipTitle,
|
|
93
|
+
"title-id": e.myTitleId
|
|
94
|
+
}, null, 8, ["title", "tooltip", "title-id"]),
|
|
95
|
+
t[3] || (t[3] = a()),
|
|
96
|
+
l("a", {
|
|
97
|
+
class: "facet-title-mobile d-flex d-md-none list-group-item justify-content-between align-items-baseline",
|
|
98
|
+
"data-toggle": "collapse",
|
|
99
|
+
"data-target": `#${e.myListId}`,
|
|
100
|
+
onClick: t[0] || (t[0] = (i) => e.isExpanded = !e.isExpanded)
|
|
101
|
+
}, [
|
|
102
|
+
l("h2", v, u(e.header), 1),
|
|
103
|
+
t[2] || (t[2] = a()),
|
|
104
|
+
l("button", E, [
|
|
105
|
+
e.isExpanded ? (s(), n("i", A, "expand_less")) : (s(), n("i", L, "expand_more"))
|
|
106
|
+
])
|
|
107
|
+
], 8, F)
|
|
108
|
+
], 64)) : r("", !0),
|
|
109
|
+
t[5] || (t[5] = a()),
|
|
110
|
+
l("div", {
|
|
111
|
+
id: e.myListId,
|
|
112
|
+
class: "collapse dont-collapse-sm"
|
|
113
|
+
}, [
|
|
114
|
+
e.items && e.items.length > 0 ? (s(), n(d, { key: 0 }, [
|
|
115
|
+
(s(!0), n(d, null, h(e.items.slice(0, e.numItemsAllowed), (i, I) => (s(), n("div", {
|
|
116
|
+
class: "list-item-container",
|
|
117
|
+
key: `field@${I}`
|
|
118
|
+
}, [
|
|
119
|
+
c(p, {
|
|
120
|
+
class: y(["d-flex facet list-group-item list-group-item-action justify-content-between align-items-center", { active: e.facetIsSelected(e.fieldId, i) }]),
|
|
121
|
+
title: e.getFacetTranslation(e.fieldId, i.id, e.$route.query.locale, i.title),
|
|
122
|
+
count: e.getFacetCount(i),
|
|
123
|
+
"hide-count": e.fieldId === "dataScope",
|
|
124
|
+
onClick: (q) => e.$emit("facet-clicked", e.fieldId, i)
|
|
125
|
+
}, null, 8, ["title", "count", "hide-count", "class", "onClick"])
|
|
126
|
+
]))), 128)),
|
|
127
|
+
t[4] || (t[4] = a()),
|
|
128
|
+
e.items.length > e.minItems ? (s(), n("button", {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: "d-block btn btn-primary btn-color w-100 facet-expand-button",
|
|
131
|
+
onClick: t[1] || (t[1] = (...i) => e.handleGrowToggle && e.handleGrowToggle(...i))
|
|
132
|
+
}, [
|
|
133
|
+
l("i", S, u(e.isGrown ? "expand_less" : "expand_more"), 1)
|
|
134
|
+
])) : r("", !0)
|
|
135
|
+
], 64)) : r("", !0)
|
|
136
|
+
], 8, G)
|
|
137
|
+
], 8, C);
|
|
138
|
+
}
|
|
139
|
+
const X = /* @__PURE__ */ w(k, [["render", M], ["__scopeId", "data-v-772b9bf1"]]);
|
|
140
|
+
export {
|
|
141
|
+
X as default
|
|
142
|
+
};
|
|
143
|
+
//# sourceMappingURL=ExpandableSelectFacet.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandableSelectFacet.vue.mjs","sources":["../../../lib/facets_2.0/facets/ExpandableSelectFacet.vue"],"sourcesContent":["<template>\n <!-- Component for a collapsible facet -->\n <div class=\"list-group col pr-0\" role=\"group\" :aria-labelledby=\"myTitleId\" >\n <template v-if=\"header\">\n <facet-title\n :title=\"header\"\n :tooltip=\"toolTipTitle\"\n :title-id=\"myTitleId\"\n />\n <a\n class=\"facet-title-mobile d-flex d-md-none list-group-item justify-content-between align-items-baseline\"\n data-toggle=\"collapse\"\n :data-target=\"`#${myListId}`\"\n @click=\"isExpanded = !isExpanded\"\n >\n <h2 class=\"h5 mb-0\">{{ header }}</h2>\n <button class=\"btn\">\n <i class=\"material-icons small-icon expand-more animated\" v-if=\"!isExpanded\">expand_more</i>\n <i class=\"material-icons small-icon expand-less animated\" v-else>expand_less</i>\n </button>\n </a>\n </template>\n\n <div\n :id=\"myListId\"\n class=\"collapse dont-collapse-sm\">\n <template v-if=\"items && items.length > 0\">\n <div\n class=\"list-item-container\"\n v-for=\"(item, index) in items.slice(0, numItemsAllowed)\"\n :key=\"`field@${index}`\"\n >\n <select-facets-item\n class=\"d-flex facet list-group-item list-group-item-action justify-content-between align-items-center\"\n :title=\"getFacetTranslation(fieldId, item.id, $route.query.locale, item.title)\"\n :count=\"getFacetCount(item)\"\n :hide-count=\"fieldId === 'dataScope'\"\n :class=\"{active: facetIsSelected(fieldId, item)}\"\n @click.native=\"$emit('facet-clicked', fieldId, item)\"\n />\n </div>\n <button\n v-if=\"items.length > minItems\"\n class=\"d-block btn btn-primary btn-color w-100 facet-expand-button\"\n @click=\"handleGrowToggle\"\n >\n <i class=\"material-icons align-bottom expand-more animated\">{{ isGrown ? 'expand_less' : 'expand_more' }}</i>\n </button>\n </template>\n </div>\n </div>\n</template>\n\n<script>\nimport { defineComponent } from 'vue';\nimport SelectFacetsItem from \"./SelectFacetsItem.vue\";\nimport FacetTitle from \"./FacetTitle.vue\";\nimport { getFacetTranslation } from '../../utils/helpers';\n\nexport default defineComponent({\n name: 'ExpandableSelectFacet',\n inheritAttrs: false,\n components: {FacetTitle, SelectFacetsItem},\n props: {\n config: {\n type: Object\n // type: {title: String, id: String, items: [], query: Object}\n },\n multiSelect: {\n type: Boolean,\n default: true\n },\n // facetIsSelected: {\n // type: Function,\n // default: (fieldId, item) => {\n // // console.log(\"facetIsSelected\", fieldId, item);\n // const queryParams = this.$route.query[fieldId];\n // return queryParams === item || queryParams.includes(item)\n // }\n // },\n // facetClicked: {\n // type: Function,\n // default: (fieldId, item) => {\n // console.log(\"facetClicked\", fieldId, item);\n // }\n // }\n },\n emits: ['facet-clicked'],\n data() {\n return {\n isExpanded: false,\n isGrown: false,\n numItemsAllowed: this.$env.content.datasets.facets.MIN_FACET_LIMIT || 5,\n minItems: this.$env.content.datasets.facets.MIN_FACET_LIMIT || 5,\n maxItems: this.$env.content.datasets.facets.MAX_FACET_LIMIT || 50,\n header: this.i18n.global.t(`message.datasetFacets.facets.${this.config.id.toLowerCase()}`),\n fieldId: this.config.id,\n toolTipTitle: this.i18n.global.t(`message.helpIcon.${this.config.id.toLowerCase()}`),\n };\n },\n computed: {\n items() { // sorting by count\n return this.config.items.slice().sort((a, b) => {\n const n = b.count - a.count;\n if (n !== 0) return b.count - a.count;\n if (a.name < b.name) return -1;\n return 1;\n });\n },\n myId() {\n // Use Vue generated uid to set give each facet a unique id\n return `facet-${this.fieldId}`;\n },\n myListId() {\n // Use Vue generated uid to set give each facet a unique id\n return `facet-list-${this.fieldId}`;\n },\n myTitleId() {\n // Use Vue generated uid to set give each facet a unique id\n return `facet-title-${this.fieldId}`;\n },\n },\n methods: {\n getFacetTranslation,\n handleGrowToggle() {\n this.isGrown = !this.isGrown;\n this.numItemsAllowed = this.isGrown\n ? this.maxItems\n : this.minItems;\n },\n getFacetCount(facet) {\n if (this.fieldId === 'scoring') return '';\n return facet.count;\n },\n facetIsSelected(fieldId, item) {\n const queryParams = this.$route.query[fieldId];\n return queryParams && (queryParams === item.id || queryParams.includes(item.id));\n }\n }\n});\n\n</script>\n\n<style lang=\"scss\" scoped>\n.facet-header {\n // background-color: #fffade;\n // background-color: rgba(255, 204, 0, 0.1);\n background-color: rgba(0, 29, 133,0.05);\n // background-color: #cddbe8;\n\n // background-color: #001d85;\n // color: white !important;\n}\n.tooltip-icon {\n font-size: 15px;\n}\n\n@media (min-width: 768px) {\n .collapse.dont-collapse-sm {\n display: block;\n height: auto !important;\n visibility: visible;\n }\n}\n\n.list-item-container {\n margin-bottom: -1px;\n}\n\n.btn-color {\n background-color: var(--primary);\n border-color: var(--primary);\n\n &:hover {\n background-color: #196fd2;\n border-color: #196fd2;\n }\n}\n.active {\n background-color: var(--primary);\n border-color: var(--primary);\n}\n</style>\n"],"names":["_sfc_main","defineComponent","FacetTitle","SelectFacetsItem","a","b","getFacetTranslation","facet","fieldId","item","queryParams","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_7","_hoisted_8","_createElementBlock","_ctx","_openBlock","_Fragment","_createVNode","_component_facet_title","_cache","_createTextVNode","_createElementVNode","$event","_toDisplayString","_hoisted_6","_hoisted_5","_createCommentVNode","_renderList","index","_component_select_facets_item","_normalizeClass","args"],"mappings":";;;;;;AA2DA,MAAKA,IAAaC,EAAa;AAAA,EAC7B,MAAM;AAAA,EACN,cAAc;AAAA,EACd,YAAY,EAAC,YAAAC,GAAY,kBAAAC,EAAgB;AAAA,EACzC,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA;AAAA,IAEP;AAAA,IACD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeF;AAAA,EACD,OAAO,CAAC,eAAe;AAAA,EACvB,OAAO;AACL,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,iBAAiB,KAAK,KAAK,QAAQ,SAAS,OAAO,mBAAmB;AAAA,MACtE,UAAU,KAAK,KAAK,QAAQ,SAAS,OAAO,mBAAmB;AAAA,MAC/D,UAAU,KAAK,KAAK,QAAQ,SAAS,OAAO,mBAAmB;AAAA,MAC/D,QAAQ,KAAK,KAAK,OAAO,EAAE,gCAAgC,KAAK,OAAO,GAAG,YAAW,CAAE,EAAE;AAAA,MACzF,SAAS,KAAK,OA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QAIrFhB,kBAAgBA,EAAA,SAAST,CAAI,EAAA,CAAA,CAAA;AAAA,YAH7C,OAAOS,EAAmB,oBAACA,EAAO,SAAET,EAAK,IAAIS,EAAA,OAAO,MAAM,QAAQT,EAAK,KAAK;AAAA,YAC5E,OAAOS,EAAa,cAACT,CAAI;AAAA,YACzB,cAAYS,EAAO,YAAA;AAAA,YAEnB,SAAc,CAAAQ,MAAAR,EAAA,MAAuB,iBAAAA,EAAA,SAAST,CAAI;AAAA;;QAtC/Dc,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA;AAAA,QA0CgBN,EAAK,MAAC,SAASA,EAAQ,iBAD/BD,EAMS,UAAA;AAAA,UA/CjB,KAAA;AAAA,UA2CU,OAAM;AAAA,UACL,mCAAOC,EAAgB,oBAAAA,EAAA,iBAAA,GAAAiB,CAAA;AAAA;UAExBV,EAA6G,KAA7GT,GAA6GW,EAA9CT,EAAO,UAAA,gBAAA,aAAA,GAAA,CAAA;AAAA,cA9ChFY,EAAA,IAAA,EAAA;AAAA,gBAAAA,EAAA,IAAA,EAAA;AAAA,IAAA,GAAA,GAAAf,CAAA;AAAA,EAAA,GAAA,GAAAJ,CAAA;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandableSelectFacet.vue2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
title: StringConstructor;
|
|
3
|
+
tooltip: StringConstructor;
|
|
4
|
+
titleId: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: null;
|
|
7
|
+
};
|
|
8
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
|
+
title: StringConstructor;
|
|
10
|
+
tooltip: StringConstructor;
|
|
11
|
+
titleId: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: null;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {
|
|
16
|
+
titleId: string;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { openBlock as o, createElementBlock as i, createElementVNode as l, toDisplayString as n, createTextVNode as a, createCommentVNode as c } from "vue";
|
|
2
|
+
import "./FacetTitle.vue2.mjs";
|
|
3
|
+
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const d = {
|
|
5
|
+
name: "FacetTitle",
|
|
6
|
+
props: {
|
|
7
|
+
title: String,
|
|
8
|
+
tooltip: String,
|
|
9
|
+
titleId: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: null
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}, s = { class: "d-none d-md-block list-group-item facet-title" }, m = ["id"], p = ["title"];
|
|
15
|
+
function _(f, e, t, g, u, h) {
|
|
16
|
+
return o(), i("div", s, [
|
|
17
|
+
l("h2", {
|
|
18
|
+
class: "h5 mb-0 float-left",
|
|
19
|
+
id: t.titleId
|
|
20
|
+
}, n(t.title), 9, m),
|
|
21
|
+
e[0] || (e[0] = a()),
|
|
22
|
+
t.tooltip ? (o(), i("i", {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "tooltip-icon material-icons small-icon align-right text-dark pl-1",
|
|
25
|
+
ref: "tooltip-icon",
|
|
26
|
+
"data-toggle": "tooltip",
|
|
27
|
+
"data-placement": "right",
|
|
28
|
+
title: t.tooltip
|
|
29
|
+
}, `
|
|
30
|
+
help_outline
|
|
31
|
+
`, 8, p)) : c("", !0)
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
const y = /* @__PURE__ */ r(d, [["render", _], ["__scopeId", "data-v-03a41f42"]]);
|
|
35
|
+
export {
|
|
36
|
+
y as default
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=FacetTitle.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FacetTitle.vue.mjs","sources":["../../../lib/facets_2.0/facets/FacetTitle.vue"],"sourcesContent":["<template>\n <div class=\"d-none d-md-block list-group-item facet-title\">\n <h2 class=\"h5 mb-0 float-left\" :id=\"titleId\">{{ title }}</h2>\n <i v-if=\"tooltip\"\n class=\"tooltip-icon material-icons small-icon align-right text-dark pl-1\"\n ref=\"tooltip-icon\"\n data-toggle=\"tooltip\"\n data-placement=\"right\"\n :title=\"tooltip\">\n help_outline\n </i>\n </div>\n</template>\n\n<script>\n\n\nexport default {\n name: \"FacetTitle\",\n props: {\n title: String,\n tooltip: String,\n titleId: {\n type: String,\n default: null,\n },\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n.facet-title {\n background-color: rgba(0, 29, 133,0.05);\n}\n\n.tooltip-icon {\n font-size: 15px;\n}\n</style>\n"],"names":["_sfc_main","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_createElementVNode","$props","_toDisplayString","_cache","_createTextVNode","_createCommentVNode"],"mappings":";;;AAiBA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACH;AACF,GA1BOC,IAAA,EAAA,OAAM,gDAA+C,GAD5DC,IAAA,CAAA,IAAA,GAAAC,IAAA,CAAA,OAAA;;AACE,SAAAC,EAAA,GAAAC,EAUM,OAVNJ,GAUM;AAAA,IATJK,EAA6D,MAAA;AAAA,MAAzD,OAAM;AAAA,MAAsB,IAAIC,EAAO;AAAA,IAAK,GAAAC,EAAAD,EAAA,KAAK,GAFzD,GAAAL,CAAA;AAAA,IAAAO,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA;AAAA,IAGaH,EAAO,gBAAhBF,EAOI,KAAA;AAAA,MAVR,KAAA;AAAA,MAIO,OAAM;AAAA,MACN,KAAI;AAAA,MACJ,eAAY;AAAA,MACZ,kBAAe;AAAA,MACd,OAAOE,EAAO;AAAA,IAAE,GAAA;AAAA;AAAA,OARxB,GAAAJ,CAAA,KAAAQ,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FacetTitle.vue2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
config: ObjectConstructor;
|
|
3
|
+
property: StringConstructor;
|
|
4
|
+
optionIds: {
|
|
5
|
+
type: ArrayConstructor;
|
|
6
|
+
default: string[];
|
|
7
|
+
};
|
|
8
|
+
optionLabels: {
|
|
9
|
+
type: ArrayConstructor;
|
|
10
|
+
};
|
|
11
|
+
initialOption: StringConstructor;
|
|
12
|
+
change: FunctionConstructor;
|
|
13
|
+
}>, {}, {
|
|
14
|
+
id: string;
|
|
15
|
+
option: string | undefined;
|
|
16
|
+
header: any;
|
|
17
|
+
toolTipTitle: any;
|
|
18
|
+
yes: any;
|
|
19
|
+
no: any;
|
|
20
|
+
}, {
|
|
21
|
+
myId(): string;
|
|
22
|
+
myTitleId(): string;
|
|
23
|
+
}, {
|
|
24
|
+
onChange(id: any): void;
|
|
25
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
26
|
+
config: ObjectConstructor;
|
|
27
|
+
property: StringConstructor;
|
|
28
|
+
optionIds: {
|
|
29
|
+
type: ArrayConstructor;
|
|
30
|
+
default: string[];
|
|
31
|
+
};
|
|
32
|
+
optionLabels: {
|
|
33
|
+
type: ArrayConstructor;
|
|
34
|
+
};
|
|
35
|
+
initialOption: StringConstructor;
|
|
36
|
+
change: FunctionConstructor;
|
|
37
|
+
}>> & Readonly<{}>, {
|
|
38
|
+
optionIds: unknown[];
|
|
39
|
+
}, {}, {
|
|
40
|
+
FacetTitle: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
41
|
+
title: StringConstructor;
|
|
42
|
+
tooltip: StringConstructor;
|
|
43
|
+
titleId: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: null;
|
|
46
|
+
};
|
|
47
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
48
|
+
title: StringConstructor;
|
|
49
|
+
tooltip: StringConstructor;
|
|
50
|
+
titleId: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: null;
|
|
53
|
+
};
|
|
54
|
+
}>> & Readonly<{}>, {
|
|
55
|
+
titleId: string;
|
|
56
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
57
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
58
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import h from "./FacetTitle.vue.mjs";
|
|
2
|
+
import { resolveComponent as u, openBlock as a, createElementBlock as r, createVNode as g, createTextVNode as c, createElementVNode as n, toDisplayString as d, Fragment as f, renderList as _ } from "vue";
|
|
3
|
+
import y from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const b = {
|
|
5
|
+
name: "RadioFacet",
|
|
6
|
+
components: { FacetTitle: h },
|
|
7
|
+
props: {
|
|
8
|
+
config: Object,
|
|
9
|
+
property: String,
|
|
10
|
+
optionIds: {
|
|
11
|
+
type: Array,
|
|
12
|
+
default: ["true", "false"]
|
|
13
|
+
},
|
|
14
|
+
optionLabels: {
|
|
15
|
+
type: Array
|
|
16
|
+
},
|
|
17
|
+
initialOption: String,
|
|
18
|
+
change: Function
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
id: "",
|
|
23
|
+
option: this.initialOption,
|
|
24
|
+
header: this.i18n.global.t(`message.datasetFacets.facets.${this.config.id.toLowerCase()}`),
|
|
25
|
+
toolTipTitle: this.i18n.global.t(`message.helpIcon.${this.config.id.toLowerCase()}`),
|
|
26
|
+
yes: this.i18n.global.t("message.metadata.yes"),
|
|
27
|
+
no: this.i18n.global.t("message.metadata.no")
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
computed: {
|
|
31
|
+
myId() {
|
|
32
|
+
return `facet-${this.id}`;
|
|
33
|
+
},
|
|
34
|
+
myTitleId() {
|
|
35
|
+
return `facet-title-${this.id}`;
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
onChange(t) {
|
|
40
|
+
this.option = t, console.log("onChange", t), this.change(t);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
initialOption(t) {
|
|
45
|
+
this.option = t;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
mounted() {
|
|
49
|
+
this.id = this._uid;
|
|
50
|
+
}
|
|
51
|
+
}, T = ["aria-labelledby"], C = { class: "list-group-item list-group-item-action d-flex justify-content-between align-items-center" }, v = { class: "ml-2 d-flex flex-wrap" }, x = { class: "custom-control custom-radio" }, I = ["id", "value", "name", "onClick", "checked"], k = ["for"];
|
|
52
|
+
function w(t, i, l, F, e, s) {
|
|
53
|
+
const p = u("facet-title");
|
|
54
|
+
return a(), r("div", {
|
|
55
|
+
class: "list-group w-100 radio-facet",
|
|
56
|
+
role: "group",
|
|
57
|
+
"aria-labelledby": s.myTitleId
|
|
58
|
+
}, [
|
|
59
|
+
g(p, {
|
|
60
|
+
title: e.header,
|
|
61
|
+
tooltip: e.toolTipTitle,
|
|
62
|
+
"title-id": s.myTitleId
|
|
63
|
+
}, null, 8, ["title", "tooltip", "title-id"]),
|
|
64
|
+
i[1] || (i[1] = c()),
|
|
65
|
+
n("div", C, [
|
|
66
|
+
c(d(l.property) + " ", 1),
|
|
67
|
+
n("span", v, [
|
|
68
|
+
(a(!0), r(f, null, _(l.optionIds, (o, m) => (a(), r("div", x, [
|
|
69
|
+
n("input", {
|
|
70
|
+
type: "radio",
|
|
71
|
+
id: `${e.header}_${o}`,
|
|
72
|
+
value: o,
|
|
73
|
+
name: e.header,
|
|
74
|
+
class: "custom-control-input",
|
|
75
|
+
onClick: (L) => s.onChange(o),
|
|
76
|
+
checked: e.option === o
|
|
77
|
+
}, null, 8, I),
|
|
78
|
+
i[0] || (i[0] = c()),
|
|
79
|
+
n("label", {
|
|
80
|
+
class: "custom-control-label",
|
|
81
|
+
for: `${e.header}_${o}`
|
|
82
|
+
}, d(l.optionLabels[m]), 9, k)
|
|
83
|
+
]))), 256))
|
|
84
|
+
])
|
|
85
|
+
])
|
|
86
|
+
], 8, T);
|
|
87
|
+
}
|
|
88
|
+
const V = /* @__PURE__ */ y(b, [["render", w]]);
|
|
89
|
+
export {
|
|
90
|
+
V as default
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=RadioFacet.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioFacet.vue.mjs","sources":["../../../lib/facets_2.0/facets/RadioFacet.vue"],"sourcesContent":["<template>\n <div class=\"list-group w-100 radio-facet\" role=\"group\" :aria-labelledby=\"myTitleId\">\n <facet-title\n :title=\"header\"\n :tooltip=\"toolTipTitle\"\n :title-id=\"myTitleId\"\n />\n <div class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\">\n {{ property }}\n <span class=\"ml-2 d-flex flex-wrap\">\n <div class=\"custom-control custom-radio\" v-for=\"(id, index) in optionIds\">\n <input type=\"radio\" :id=\"`${header}_${id}`\" :value=\"id\" :name=\"header\" class=\"custom-control-input\" @click=\"onChange(id)\" :checked=\"option === id\">\n <label class=\"custom-control-label\" :for=\"`${header}_${id}`\">{{ optionLabels[index] }}</label>\n </div>\n </span>\n </div>\n </div>\n</template>\n\n<script>\nimport FacetTitle from \"../facets/FacetTitle.vue\";\nexport default {\n name: \"RadioFacet\",\n components: {FacetTitle},\n props: {\n config: Object,\n property: String,\n optionIds: {\n type: Array,\n default: ['true', 'false']\n },\n optionLabels: {\n type: Array\n },\n initialOption: String,\n change: Function\n },\n data() {\n return {\n id: '',\n option: this.initialOption,\n header: this.i18n.global.t(`message.datasetFacets.facets.${this.config.id.toLowerCase()}`),\n toolTipTitle: this.i18n.global.t(`message.helpIcon.${this.config.id.toLowerCase()}`),\n yes: this.i18n.global.t('message.metadata.yes'),\n no: this.i18n.global.t('message.metadata.no')\n };\n },\n computed: {\n myId() {\n // Use Vue generated uid to give each facet a unique id\n return `facet-${this.id}`;\n },\n myTitleId() {\n // Use Vue generated uid to give each facet a unique id\n return `facet-title-${this.id}`;\n }\n },\n methods: {\n onChange(id) {\n this.option = id;\n console.log(\"onChange\", id)\n this.change(id);\n }\n },\n watch: {\n initialOption(value) {\n this.option = value;\n }\n },\n mounted() {\n this.id = this._uid; // eslint-disable-line\n },\n}\n</script>\n\n"],"names":["_sfc_main","FacetTitle","id","value","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_createElementBlock","$options","_createVNode","_component_facet_title","$data","_cache","_createTextVNode","_createElementVNode","_toDisplayString","$props","_openBlock","_Fragment","_renderList","index","$event"],"mappings":";;;AAqBA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY,EAAC,YAAAC,EAAU;AAAA,EACvB,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,CAAC,QAAQ,OAAO;AAAA,IAC1B;AAAA,IACD,cAAc;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,IACD,eAAe;AAAA,IACf,QAAQ;AAAA,EACT;AAAA,EACD,OAAO;AACL,WAAO;AAAA,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AAA,MAfVW,EAQSE,EAAAC,EAAA,QAAQ,IAAG,KACd,CAAA;AAAA,MAAAF,EAKO,QALPX,GAKO;AAAA,SAJLc,EAAA,EAAA,GAAAV,EAGMW,SAbdC,EAUuEH,EAAA,WAVvE,CAUyDjB,GAAIqB,OAArDH,EAAA,GAAAV,EAGM,OAHNH,GAGM;AAAA,UAFJU,EAAmJ,SAAA;AAAA,YAA5I,MAAK;AAAA,YAAS,IAAE,GAAKH,EAAM,MAAA,IAAIZ,CAAE;AAAA,YAAK,OAAOA;AAAA,YAAK,MAAMY,EAAM;AAAA,YAAE,OAAM;AAAA,YAAwB,SAAK,CAAAU,MAAEb,EAAQ,SAACT,CAAE;AAAA,YAAI,SAASY,EAAM,WAAKZ;AAAA,UAXzJ,GAAA,MAAA,GAAAM,CAAA;AAAA,UAAAO,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA;AAAA,UAYUC,EAA8F,SAAA;AAAA,YAAvF,OAAM;AAAA,YAAwB,KAAG,GAAKH,EAAM,MAAA,IAAIZ,CAAE;AAAA,eAAOiB,EAAY,aAACI,CAAK,CAZ5F,GAAA,GAAAd,CAAA;AAAA;;;EAAA,GAAA,GAAAL,CAAA;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
title: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
count: {
|
|
7
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
hideCount: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
}>, {}, {
|
|
15
|
+
tooltip: string;
|
|
16
|
+
}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
title: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
count: {
|
|
22
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
hideCount: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {
|
|
30
|
+
title: string;
|
|
31
|
+
count: string | number;
|
|
32
|
+
hideCount: boolean;
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { openBlock as o, createElementBlock as n, createElementVNode as i, toDisplayString as s, createTextVNode as c, createCommentVNode as r } from "vue";
|
|
2
|
+
import l from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
3
|
+
const f = {
|
|
4
|
+
name: "DatasetsFacetsItem",
|
|
5
|
+
data() {
|
|
6
|
+
return {
|
|
7
|
+
tooltip: ""
|
|
8
|
+
};
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
title: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
count: {
|
|
16
|
+
type: [Number, String],
|
|
17
|
+
default: 0
|
|
18
|
+
},
|
|
19
|
+
hideCount: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
mounted() {
|
|
25
|
+
this.tooltip = this.$refs.facetBtn.offsetWidth < this.$refs.facetBtn.scrollWidth ? this.title : "";
|
|
26
|
+
}
|
|
27
|
+
}, d = ["title"], u = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "facet-count badge"
|
|
30
|
+
};
|
|
31
|
+
function m(p, e, t, _, a, h) {
|
|
32
|
+
return o(), n("button", { title: a.tooltip }, [
|
|
33
|
+
i("span", {
|
|
34
|
+
ref: "facetBtn",
|
|
35
|
+
class: "text-truncate"
|
|
36
|
+
}, s(t.title), 513),
|
|
37
|
+
e[0] || (e[0] = c()),
|
|
38
|
+
t.hideCount ? r("", !0) : (o(), n("span", u, s(t.count.toLocaleString("fi")), 1))
|
|
39
|
+
], 8, d);
|
|
40
|
+
}
|
|
41
|
+
const x = /* @__PURE__ */ l(f, [["render", m]]);
|
|
42
|
+
export {
|
|
43
|
+
x as default
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=SelectFacetsItem.vue.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectFacetsItem.vue.mjs","sources":["../../../lib/facets_2.0/facets/SelectFacetsItem.vue"],"sourcesContent":["<template>\n <button\n :title=\"tooltip\"\n >\n <span ref=\"facetBtn\" class=\"text-truncate\">{{ title }}</span>\n <span v-if=\"!hideCount\" class=\"facet-count badge\">{{ count.toLocaleString('fi') }}</span>\n </button>\n</template>\n\n<script>\n\nexport default {\n name: 'DatasetsFacetsItem',\n data() {\n return {\n tooltip: '',\n };\n },\n props: {\n title: {\n type: String,\n default: '',\n },\n count: {\n type: [Number, String],\n default: 0,\n },\n hideCount: {\n type: Boolean,\n default: false,\n },\n },\n mounted() {\n // Sets tooltip text to title when title itself is rendered truncated\n this.tooltip = this.$refs.facetBtn.offsetWidth < this.$refs.facetBtn.scrollWidth\n ? this.title\n : '';\n },\n};\n</script>\n"],"names":["_sfc_main","_hoisted_1","_createElementBlock","$data","_createElementVNode","$props","_cache","_createTextVNode","_createCommentVNode","_openBlock","_hoisted_2","_toDisplayString"],"mappings":";;AAWA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AACL,WAAO;AAAA,MACL,SAAS;AAAA;EAEZ;AAAA,EACD,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACD,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA,IACD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EACD,UAAU;AAER,SAAK,UAAU,KAAK,MAAM,SAAS,cAAc,KAAK,MAAM,SAAS,cACjE,KAAK,QACL;AAAA,EACL;AACH,GAtCAC,IAAA,CAAA,OAAA;EAAA,KAAA;AAAA,EAK8B,OAAM;;;cAJlCC,EAKS,UAAA,EAJN,OAAOC,EAAO,WAAA;AAAA,IAEbC,EAA6D,QAAA;AAAA,MAAvD,KAAI;AAAA,MAAW,OAAM;AAAA,SAAmBC,EAAK,KAAA,GAAA,GAAA;AAAA,IAJzDC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA;AAAA,IAKmBF,EAAS,YAL5BG,EAAA,IAAA,EAAA,KAKMC,KAAAP,EAAyF,QAAzFQ,GAAqDC,EAAAN,EAAA,MAAM,eAAc,IAAA,CAAA,GAAA,CAAA;AAAA,EAL/E,GAAA,GAAAJ,CAAA;;;"}
|