@piveau/piveau-hub-ui-modules 4.5.8 → 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/data-provider-interface/CatalogueMQA.vue.mjs +221 -157
- package/dist/data-provider-interface/CatalogueMQA.vue.mjs.map +1 -1
- 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/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
import { useStore as
|
|
1
|
+
import { getCurrentInstance as w, ref as A, computed as E, onMounted as L, openBlock as s, createElementBlock as r, Fragment as d, createElementVNode as e, toDisplayString as n, createTextVNode as l, renderList as p, unref as m, createVNode as f, withCtx as g, createCommentVNode as M } from "vue";
|
|
2
|
+
import { useStore as P } from "vuex";
|
|
3
3
|
import c from "../../widgets/AppLink.vue.mjs";
|
|
4
|
-
import
|
|
4
|
+
import U from "axios";
|
|
5
5
|
import { useRouter as V, useRoute as j } from "vue-router";
|
|
6
|
-
import { has as
|
|
6
|
+
import { has as b, isNil as k } from "lodash-es";
|
|
7
7
|
import "./UserCataloguesPage.vue2.mjs";
|
|
8
8
|
import Q from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
9
|
-
const
|
|
9
|
+
const S = { class: "catOverview" }, B = { class: "d-flex flex-column bg-transparent container-fluid justify-content-between content" }, O = { class: "small-headline" }, R = { class: "m-0" }, F = { class: "catWrap" }, T = ["onClick"], W = ["onClick"], z = ["onClick"], G = {
|
|
10
10
|
__name: "UserCataloguesPage",
|
|
11
11
|
setup(H) {
|
|
12
12
|
const $ = V(), D = j();
|
|
13
|
-
let q =
|
|
14
|
-
const I =
|
|
15
|
-
let i =
|
|
13
|
+
let q = w().appContext.app.config.globalProperties.$env;
|
|
14
|
+
const I = P();
|
|
15
|
+
let i = A([]), y = E(() => I.getters["auth/getUserCatalogIds"]), h = async () => {
|
|
16
16
|
let a;
|
|
17
|
-
await
|
|
17
|
+
await U.get(q.api.baseUrl + "search?filter=catalogue&limit=1000").then((t) => a = t).catch((t) => {
|
|
18
18
|
reject(t);
|
|
19
19
|
}), a.data.result.results.forEach((t) => {
|
|
20
|
-
|
|
20
|
+
b(t, "title") && !k(t.title) && b(t, "id") && !k(t.id) && i.value.push({ title: Object.values(t.title)[0], id: t.id });
|
|
21
21
|
}), i.value = i.value.filter((t) => y.value.includes(t.id)).map((t) => ({ id: t.id, name: t.title }));
|
|
22
22
|
};
|
|
23
23
|
const N = (a) => {
|
|
24
24
|
$.push({
|
|
25
|
-
name: "DataProviderInterface-
|
|
25
|
+
name: "DataProviderInterface-MQASettings",
|
|
26
26
|
params: { id: a.id },
|
|
27
27
|
query: { locale: D.query.locale }
|
|
28
28
|
}).catch(() => {
|
|
29
29
|
});
|
|
30
30
|
}, C = () => {
|
|
31
31
|
};
|
|
32
|
-
return
|
|
32
|
+
return L(async () => {
|
|
33
33
|
h();
|
|
34
|
-
}), (a, t) => (
|
|
35
|
-
e("div",
|
|
36
|
-
e("div",
|
|
37
|
-
e("h1",
|
|
34
|
+
}), (a, t) => (s(), r(d, null, [
|
|
35
|
+
e("div", S, [
|
|
36
|
+
e("div", B, [
|
|
37
|
+
e("h1", O, n(a.$t("message.dataupload.info.userCatalogues")), 1),
|
|
38
38
|
t[1] || (t[1] = l()),
|
|
39
|
-
e("p",
|
|
39
|
+
e("p", R, n(a.$t("message.dataupload.info.userCatDescription")), 1),
|
|
40
40
|
t[2] || (t[2] = l()),
|
|
41
41
|
e("div", F, [
|
|
42
|
-
(
|
|
42
|
+
(s(!0), r(d, null, p(m(i), (o, u) => (s(), r("div", {
|
|
43
43
|
key: u,
|
|
44
44
|
class: "annifItems"
|
|
45
45
|
}, [
|
|
46
46
|
f(c, {
|
|
47
|
-
to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id:
|
|
47
|
+
to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id: o.id } }
|
|
48
48
|
}, {
|
|
49
49
|
default: g(() => [
|
|
50
|
-
l(o
|
|
50
|
+
l(n(o.name), 1)
|
|
51
51
|
]),
|
|
52
52
|
_: 2
|
|
53
53
|
}, 1032, ["to"])
|
|
54
54
|
]))), 128)),
|
|
55
55
|
t[0] || (t[0] = l()),
|
|
56
|
-
m(i).length === 0 ? (
|
|
56
|
+
m(i).length === 0 ? (s(!0), r(d, { key: 0 }, p(m(y), (o, u) => (s(), r("div", {
|
|
57
57
|
key: u,
|
|
58
58
|
class: "annifItems"
|
|
59
59
|
}, [
|
|
60
60
|
f(c, {
|
|
61
|
-
to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id:
|
|
61
|
+
to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id: o } }
|
|
62
62
|
}, {
|
|
63
63
|
default: g(() => [
|
|
64
|
-
l(o
|
|
64
|
+
l(n(o), 1)
|
|
65
65
|
]),
|
|
66
66
|
_: 2
|
|
67
67
|
}, 1032, ["to"])
|
|
68
|
-
]))), 128)) :
|
|
68
|
+
]))), 128)) : M("", !0)
|
|
69
69
|
])
|
|
70
70
|
])
|
|
71
71
|
]),
|
|
@@ -73,47 +73,47 @@ const B = { class: "catOverview" }, O = { class: "d-flex flex-column bg-transpar
|
|
|
73
73
|
e("table", null, [
|
|
74
74
|
e("thead", null, [
|
|
75
75
|
e("tr", null, [
|
|
76
|
-
e("th", null,
|
|
76
|
+
e("th", null, n(a.$t("message.metadata.catalog")) + " - ID", 1),
|
|
77
77
|
t[3] || (t[3] = l()),
|
|
78
|
-
e("th", null,
|
|
78
|
+
e("th", null, n(a.$t("message.metadata.description")), 1),
|
|
79
79
|
t[4] || (t[4] = l()),
|
|
80
|
-
e("th", null,
|
|
80
|
+
e("th", null, n(a.$t("message.dataupload.menu.actions")), 1)
|
|
81
81
|
])
|
|
82
82
|
]),
|
|
83
83
|
t[9] || (t[9] = l()),
|
|
84
|
-
(
|
|
84
|
+
(s(!0), r(d, null, p(m(i), (o, u) => (s(), r("tr", { key: u }, [
|
|
85
85
|
e("td", null, [
|
|
86
86
|
f(c, {
|
|
87
|
-
to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id:
|
|
87
|
+
to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id: o.id } }
|
|
88
88
|
}, {
|
|
89
89
|
default: g(() => [
|
|
90
|
-
l(o
|
|
90
|
+
l(n(o.id), 1)
|
|
91
91
|
]),
|
|
92
92
|
_: 2
|
|
93
93
|
}, 1032, ["to"])
|
|
94
94
|
]),
|
|
95
95
|
t[7] || (t[7] = l()),
|
|
96
96
|
e("td", null, [
|
|
97
|
-
e("span", null, o
|
|
97
|
+
e("span", null, n(o.name), 1)
|
|
98
98
|
]),
|
|
99
99
|
t[8] || (t[8] = l()),
|
|
100
100
|
e("td", null, [
|
|
101
101
|
e("button", {
|
|
102
102
|
type: "button",
|
|
103
103
|
class: "btn btn-secondary",
|
|
104
|
-
onClick: (
|
|
105
|
-
},
|
|
104
|
+
onClick: (v) => C(a.id)
|
|
105
|
+
}, n(a.$t("message.metadata.linkedData")), 9, T),
|
|
106
106
|
t[5] || (t[5] = l()),
|
|
107
107
|
e("button", {
|
|
108
108
|
type: "button",
|
|
109
109
|
class: "btn btn-secondary",
|
|
110
|
-
onClick: (
|
|
111
|
-
},
|
|
110
|
+
onClick: (v) => C(a.id)
|
|
111
|
+
}, n(a.$t("message.dataupload.menu.edit")), 9, W),
|
|
112
112
|
t[6] || (t[6] = l()),
|
|
113
113
|
e("button", {
|
|
114
114
|
type: "button",
|
|
115
115
|
class: "btn btn-secondary",
|
|
116
|
-
onClick: (
|
|
116
|
+
onClick: (v) => N(o)
|
|
117
117
|
}, `configure MQA report
|
|
118
118
|
|
|
119
119
|
`, 8, z)
|
|
@@ -122,7 +122,7 @@ const B = { class: "catOverview" }, O = { class: "d-flex flex-column bg-transpar
|
|
|
122
122
|
])
|
|
123
123
|
], 64));
|
|
124
124
|
}
|
|
125
|
-
}, et = /* @__PURE__ */ Q(G, [["__scopeId", "data-v-
|
|
125
|
+
}, et = /* @__PURE__ */ Q(G, [["__scopeId", "data-v-1c6df5ca"]]);
|
|
126
126
|
export {
|
|
127
127
|
et as default
|
|
128
128
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserCataloguesPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/UserCataloguesPage.vue"],"sourcesContent":["<script setup>\nimport { useStore } from 'vuex';\nimport { ref, computed, onMounted, } from 'vue';\nimport AppLink from \"../../widgets/AppLink.vue\";\nimport axios from 'axios'\nimport { useRouter, useRoute } from 'vue-router';\nimport { getCurrentInstance } from \"vue\";\n\nimport {\n has,\n isNil,\n} from 'lodash-es';\n\nconst router = useRouter();\nconst route = useRoute();\n\nlet env = getCurrentInstance().appContext.app.config.globalProperties.$env;\nconst store = useStore();\nlet filteredCatalogs = ref([])\nlet userCatIDList = computed(() => store.getters['auth/getUserCatalogIds'])\n\nlet filterCatList = async () => {\n let cache;\n await axios\n .get(env.api.baseUrl + 'search?filter=catalogue&limit=1000')\n .then(response => (cache = response))\n .catch((err) => {\n reject(err);\n });\n\n cache.data.result.results.forEach((e) => {\n if (has(e, 'title') && !isNil(e.title) && has(e, 'id') && !isNil(e.id)) filteredCatalogs.value.push({ title: Object.values(e.title)[0], id: e.id })\n });\n\n filteredCatalogs.value = filteredCatalogs.value\n .filter(item => userCatIDList.value.includes(item.id))\n .map(item => ({ id: item.id, name: item.title }));\n}\nconst handleMQA = (cat) => {\n\n router.push({\n name: 'DataProviderInterface-
|
|
1
|
+
{"version":3,"file":"UserCataloguesPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/UserCataloguesPage.vue"],"sourcesContent":["<script setup>\nimport { useStore } from 'vuex';\nimport { ref, computed, onMounted, } from 'vue';\nimport AppLink from \"../../widgets/AppLink.vue\";\nimport axios from 'axios'\nimport { useRouter, useRoute } from 'vue-router';\nimport { getCurrentInstance } from \"vue\";\n\nimport {\n has,\n isNil,\n} from 'lodash-es';\n\nconst router = useRouter();\nconst route = useRoute();\n\nlet env = getCurrentInstance().appContext.app.config.globalProperties.$env;\nconst store = useStore();\nlet filteredCatalogs = ref([])\nlet userCatIDList = computed(() => store.getters['auth/getUserCatalogIds'])\n\nlet filterCatList = async () => {\n let cache;\n await axios\n .get(env.api.baseUrl + 'search?filter=catalogue&limit=1000')\n .then(response => (cache = response))\n .catch((err) => {\n reject(err);\n });\n\n cache.data.result.results.forEach((e) => {\n if (has(e, 'title') && !isNil(e.title) && has(e, 'id') && !isNil(e.id)) filteredCatalogs.value.push({ title: Object.values(e.title)[0], id: e.id })\n });\n\n filteredCatalogs.value = filteredCatalogs.value\n .filter(item => userCatIDList.value.includes(item.id))\n .map(item => ({ id: item.id, name: item.title }));\n}\nconst handleMQA = (cat) => {\n\n router.push({\n name: 'DataProviderInterface-MQASettings',\n params: { id: cat.id },\n query: { locale: route.query.locale }\n }).catch(() => { });\n}\nconst handleEdit = () => {\n\n}\nonMounted(async () => {\n filterCatList()\n});\n</script>\n<template>\n <div class=\"catOverview\">\n <div class=\"d-flex flex-column bg-transparent container-fluid justify-content-between content \">\n <h1 class=\"small-headline\">{{ $t('message.dataupload.info.userCatalogues') }}</h1>\n <p class=\"m-0 \">{{ $t('message.dataupload.info.userCatDescription') }}</p>\n <div class=\"catWrap\">\n <div v-for=\"(catalog, index) in filteredCatalogs\" :key=\"index\" class=\"annifItems \">\n <app-link\n :to=\"{ name: 'CatalogueDetails', query: { locale: $route.query.locale }, params: { ctlg_id: catalog.id } }\">{{\n catalog.name }}</app-link>\n </div>\n <div v-if=\"filteredCatalogs.length === 0\" v-for=\"(catalog, index) in userCatIDList\" :key=\"index\"\n class=\"annifItems \">\n <app-link\n :to=\"{ name: 'CatalogueDetails', query: { locale: $route.query.locale }, params: { ctlg_id: catalog } }\">{{\n catalog }}</app-link>\n </div>\n </div>\n </div>\n \n\n </div>\n\n <table>\n <thead>\n <tr>\n <th>{{ $t('message.metadata.catalog') }} - ID</th>\n <th>{{ $t('message.metadata.description') }}</th>\n <th>{{ $t('message.dataupload.menu.actions') }}</th>\n </tr>\n </thead>\n\n <tr v-for=\"(catalog, index) in filteredCatalogs\" :key=\"index\">\n <td>\n\n <app-link\n :to=\"{ name: 'CatalogueDetails', query: { locale: $route.query.locale }, params: { ctlg_id: catalog.id } }\">{{\n catalog.id }}</app-link>\n\n </td>\n <td>\n <span>{{ catalog.name }}</span>\n \n </td>\n <td>\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"handleEdit(id, catalog)\">{{\n $t('message.metadata.linkedData') }}</button>\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"handleEdit(id, catalog)\">{{\n $t('message.dataupload.menu.edit') }}</button>\n\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"handleMQA(catalog)\">configure MQA report\n\n </button>\n\n </td>\n </tr>\n\n\n </table>\n\n \n\n</template>\n<style scoped>\n\ntable {\n display: none;\n}\n.catOverview {\n min-height: 60vh;\n}\n\n.catWrap {\n display: flex;\n flex-wrap: wrap;\n margin-top: 10px;\n padding-top: 10px;\n border-top: 1px solid lightgray;\n justify-content: space-between;\n}\n\n.catWrap .annifItems {\n background: #ECECEC;\n flex-grow: 1;\n text-align: center;\n}\n\n.subline {\n font-size: 12px;\n color: lightgray;\n\n}\n\ntable {\n margin: auto\n}\n\nth,\ntd {\n padding: 1rem;\n\n}\n\ntr {\n padding: 1rem;\n border-bottom: 1px solid lightgray;\n}\n\nthead {\n border-bottom: 1px solid lightgray;\n}\n</style>"],"names":["router","useRouter","route","useRoute","env","getCurrentInstance","store","useStore","filteredCatalogs","ref","userCatIDList","computed","filterCatList","cache","axios","response","err","e","has","isNil","item","handleMQA","cat","handleEdit","onMounted"],"mappings":";;;;;;;;;;;AAaA,UAAMA,IAASC,EAAS,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