@piveau/piveau-hub-ui-modules 4.5.9 → 4.5.11

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 (48) hide show
  1. package/dist/configurations/configureModules.mjs +5 -7
  2. package/dist/configurations/configureModules.mjs.map +1 -1
  3. package/dist/data-provider-interface/CatalogueMQA.vue.mjs +235 -206
  4. package/dist/data-provider-interface/CatalogueMQA.vue.mjs.map +1 -1
  5. package/dist/data-provider-interface/DPIMenu.vue.d.ts +2 -2
  6. package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs +62 -107
  7. package/dist/data-provider-interface/views/UserCataloguesPage.vue.mjs.map +1 -1
  8. package/dist/datasetDetails/DatasetDetailsDescription.vue.d.ts +1 -1
  9. package/dist/datasetDetails/distributions/DistributionFormat.vue.d.ts +2 -2
  10. package/dist/datasetDetails/distributions/DownloadAllDistributions.vue.d.ts +2 -2
  11. package/dist/datasetDetails/distributions/distributionActions/DistributionDownload.vue.d.ts +2 -2
  12. package/dist/datasetDetails/header/DatasetDetailsHeaderTitle.vue.d.ts +1 -1
  13. package/dist/datasetDetails/navigation/DatasetDetailsNavigation.vue.d.ts +1 -1
  14. package/dist/datasetDetails/navigation/DatasetDetailsNavigationLinks.vue.d.ts +1 -1
  15. package/dist/datasets/Datasets.vue.mjs +87 -87
  16. package/dist/datasets/Datasets.vue.mjs.map +1 -1
  17. package/dist/piveau-hub-ui-modules.css +1 -1
  18. package/package.json +1 -1
  19. package/dist/facets_2.0/Facets.vue.d.ts +0 -19
  20. package/dist/facets_2.0/Facets.vue.mjs +0 -31
  21. package/dist/facets_2.0/Facets.vue.mjs.map +0 -1
  22. package/dist/facets_2.0/Facets.vue2.mjs +0 -5
  23. package/dist/facets_2.0/Facets.vue2.mjs.map +0 -1
  24. package/dist/facets_2.0/facets/DataServicesFacet.vue.d.ts +0 -75
  25. package/dist/facets_2.0/facets/DataServicesFacet.vue.mjs +0 -49
  26. package/dist/facets_2.0/facets/DataServicesFacet.vue.mjs.map +0 -1
  27. package/dist/facets_2.0/facets/ExpandableSelectFacet.vue.d.ts +0 -93
  28. package/dist/facets_2.0/facets/ExpandableSelectFacet.vue.mjs +0 -143
  29. package/dist/facets_2.0/facets/ExpandableSelectFacet.vue.mjs.map +0 -1
  30. package/dist/facets_2.0/facets/ExpandableSelectFacet.vue2.mjs +0 -5
  31. package/dist/facets_2.0/facets/ExpandableSelectFacet.vue2.mjs.map +0 -1
  32. package/dist/facets_2.0/facets/FacetTitle.vue.d.ts +0 -18
  33. package/dist/facets_2.0/facets/FacetTitle.vue.mjs +0 -38
  34. package/dist/facets_2.0/facets/FacetTitle.vue.mjs.map +0 -1
  35. package/dist/facets_2.0/facets/FacetTitle.vue2.mjs +0 -5
  36. package/dist/facets_2.0/facets/FacetTitle.vue2.mjs.map +0 -1
  37. package/dist/facets_2.0/facets/RadioFacet.vue.d.ts +0 -58
  38. package/dist/facets_2.0/facets/RadioFacet.vue.mjs +0 -92
  39. package/dist/facets_2.0/facets/RadioFacet.vue.mjs.map +0 -1
  40. package/dist/facets_2.0/facets/SelectFacetsItem.vue.d.ts +0 -34
  41. package/dist/facets_2.0/facets/SelectFacetsItem.vue.mjs +0 -45
  42. package/dist/facets_2.0/facets/SelectFacetsItem.vue.mjs.map +0 -1
  43. package/dist/facets_2.0/getFacet.mjs +0 -20
  44. package/dist/facets_2.0/getFacet.mjs.map +0 -1
  45. package/dist/facets_2.0/toggleQueryParam.mjs +0 -11
  46. package/dist/facets_2.0/toggleQueryParam.mjs.map +0 -1
  47. package/dist/facets_2.0/useFacets.mjs +0 -14
  48. package/dist/facets_2.0/useFacets.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogueMQA.vue.mjs","sources":["../../lib/data-provider-interface/CatalogueMQA.vue"],"sourcesContent":["<template>\n <div class=\"container mb-3\">\n <div>\n <div>\n <div class=\"debug\">\n <strong> API object:</strong> <br><br>\n <!-- Disabled for PPE release (no backend on PPE yet)-->\n <!-- {{ notficationInfo }} -->\n </div>\n <h1>MQA Report Settings</h1>\n <p>Configuration for\n <!-- Disabled for PPE release (no backend on PPE yet)-->\n <!-- {{ notficationInfo }} -->\n <strong>{{ catalogId }}</strong> \n <!-- <strong>Test Catalogue</strong> -->\n </p>\n <p>For this Catalogue the <b>MQA Rating Checks </b>are currently <b>\n <span v-if=\"!active\">deactivated</span>\n <span v-if=\"active\">activated</span></b>.</p>\n </div>\n\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"handleActivate()\">\n {{ activatedString }}\n </button>\n </div>\n <div v-if=\"active\">\n <div class=\"mqaWrapper\">\n <h3>Recipients Mail</h3>\n <span>Add and edit mail addresses for recieving the MQA report</span>\n <table ref=\"mailButtonWrap\" v-if=\"mailList.length != 0\">\n <tr>\n <th>Mail</th>\n </tr>\n <tr v-for=\"item in mailList\" class=\"mailItems\">\n \n <td>\n <input type=\"text\" :value=\"item.mail\" :readonly=\"item.readonly\"\n :class=\"{ 'editable': !item.readonly, 'invalid': !item.valid }\"\n @input=\"handleMailinput($event, item.mail)\">\n <div>\n <button type=\"button\" class=\"btn btn-secondary\"\n @click=\"handleReadonly(item)\">Edit</button>\n <button type=\"button\" class=\"btn btn-secondary\"\n @click=\"handleDelete(item.mail)\">Delete</button>\n </div>\n </td>\n <span class=\"errormsg\" v-if=\"!item.valid\">*Invalid email format</span>\n </tr>\n </table>\n <div class=\"my-3 d-flex\">\n <input type=\"text\" v-model=\"newMail.mail\" @input=\"handleMailinput($event)\"\n :class=\"{ 'invalidNewMail': !newMail.valid }\" style=\"padding:0.25rem\">\n <button type=\"button\" class=\"btn btn-secondary mx-3\" :disabled=\"!newMail.valid\"\n @click=\"addNewMail()\">+\n add Mail</button>\n </div>\n\n <span class=\"errormsg\" v-if=\"!newMail.valid\">*Invalid email format</span>\n </div>\n <div class=\"mqaWrapper\">\n <h3>Frequency of Rating Checks</h3>\n <span>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut\n labore et dolore magna aliquyam erat, sed diam voluptua</span>\n <div class=\"d-flex\">\n <div class=\"mr-3 my-3\">\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"weekly = !weekly; monthly = false\"\n :class=\"{ 'activeChoiceButton': weekly === true }\">Weekly</button>\n <div class=\"weekdays\" :class=\"{ 'blur': !weekly }\">\n <span v-for=\"day in week\" @click=\"currentday(day, $event)\">\n <button :disabled=\"!weekly\" class=\"dayButtons\">{{ day }}</button>\n </span>\n </div>\n </div>\n <div class=\"my-3\">\n <button type=\"button\" :class=\"{ 'activeChoiceButton': monthly === true }\"\n class=\"btn btn-secondary\"\n @click=\"monthly = !monthly; weekly = false; resetWeekdays()\">Monthly</button>\n <div class=\"d-flex daypicker my-3\" :class=\"{ 'blur': !monthly }\">\n <input v-model=\"daysInMonth\" @input=\"adjustWidth()\" :class=\"{ dynamicWidth: inputWidth }\"\n :disabled=\"!monthly\">.\n <div class=\"caretWrap\">\n <button @click=\"editDate('up')\" class=\"caretButtons ml-1\"><svg\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" fill=\"currentColor\"\n class=\"bi bi-caret-up-fill\" viewBox=\"0 0 16 16\">\n <path\n d=\"m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z\" />\n </svg></button>\n <button @click=\"editDate()\" class=\"caretButtons mr-1\"><svg\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" fill=\"currentColor\"\n class=\"bi bi-caret-down-fill\" viewBox=\"0 0 16 16\">\n <path\n d=\"M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z\" />\n </svg></button>\n </div>\n <span>day of the month</span>\n </div>\n </div>\n </div>\n </div>\n <div class=\"mqaWrapper\">\n <h3>Notification Treshold</h3>\n <span>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut\n labore et dolore magna aliquyam erat, sed diam voluptua</span>\n <div class=\"w-50\">\n <div class=\"d-flex justify-content-between\">\n <span><b>0</b></span>\n <span><b>400</b></span>\n </div>\n <input type=\"range\" v-model=\"value\" min=\"0\" max=\"400\" />\n <p>Lower than <b>{{ value }}</b> Points</p>\n </div>\n </div>\n <div class=\"actionWrapper\">\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"postNotificationSettings\">Save</button>\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"back()\">Cancel</button>\n </div>\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref } from 'vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { useRoute } from 'vue-router'\nimport { getCurrentInstance } from \"vue\";\nimport axios from 'axios'\n\nconst route = useRoute()\n\nlet monthly = ref(false)\nlet weekly = ref(false)\nlet newMail = ref({ 'mail': '', 'valid': true })\nlet mailButtonWrap = ref(null)\nlet isReadonly = ref(true)\nlet activatedString = ref('Activate')\nlet inputWidth = ref(false)\nlet active = ref(false)\nlet mailList = ref()\nlet week = ['Mo', 'Tue', 'We', 'Th', 'Fr', 'Sa', 'Su']\nlet daysInMonth = ref(1)\nconst catalogId = route.params.id\nconst app = getCurrentInstance()\nconst notificationBaseUrl = app.appContext.app.config.globalProperties.$env.api.notificationBaseUrl\nconst apiKey = app.appContext.app.config.globalProperties.$env.api.apiKey\n\nconst notficationInfo = ref({})\n\n\nconst value = ref(0);\nconst regex = /^(2[0-8]|[1-9])$/;\n\n// enabeld for PPE release (dummy data)\n mailList.value = [{ 'mail': \"mail@mail2.com\", readonly: true, valid: true }, { 'mail': \"mail@mail1.com\", readonly: true, valid: true }]\n\n\nconst fetchNotificationInfo = async () => {\n const config = {\n method: 'get',\n url: `${notificationBaseUrl}/catalogue/${catalogId}/setting`,\n headers: {\n 'Authorization': apiKey,\n 'Accept': 'application/json',\n },\n withCredentials: true\n }\n\n try {\n const response = await axios.request(config)\n notficationInfo.value = response.data\n\n if (notficationInfo.value.activeStatus === true) {\n active.value = true\n activatedString.value = 'Deactivate'\n } if (notficationInfo.value.activeStatus === false) {\n active.value = false\n activatedString.value = 'Activate'\n }\n\n // mailList.value = notficationInfo.value.receiverEmailList\n\n console.log('Response:', response)\n } catch (error) {\n console.log('Full error:', error)\n }\n}\n\nconst postNotificationSettings = async () => {\n const config = {\n method: 'post',\n url: `https://piveau-metrics-notifications-piveau.apps.osc.fokus.fraunhofer.de/catalogue/${catalogId}/setting`,\n headers: {\n 'Authorization': apiKey,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',\n 'Access-Control-Allow-Headers': 'Authorization'\n },\n withCredentials: true,\n data: JSON.stringify({\n receiverEmailList: mailList.value,\n frequency: {\n unit: \"week\",\n value: 9\n },\n activeStatus: true\n })\n }\n\n try {\n const response = await axios.request(config)\n console.log('Settings updated:', response.data)\n return response.data\n } catch (error) {\n console.log('Error updating settings:', error)\n throw error\n }\n}\n\nfetchNotificationInfo()\n\nonClickOutside(mailButtonWrap, event => {\n mailList.value.forEach(element => {\n element.readonly = true\n })\n});\nconst resetWeekdays = () => {\n const arr = document.getElementsByClassName('dayButtons')\n for (let index = 0; index < arr.length; index++) {\n arr[index].classList.remove('activeItem')\n }\n\n\n}\nconst editDate = (count) => {\n if (count === \"up\" && daysInMonth.value < 28) {\n if (daysInMonth.value > 8) {\n inputWidth.value = true\n }\n daysInMonth.value++\n }\n else if (daysInMonth.value > 1) {\n if (daysInMonth.value < 11) {\n inputWidth.value = false\n }\n daysInMonth.value--\n }\n}\nconst currentday = (day, event) => {\n event.target.classList.toggle('activeItem')\n}\nconst adjustWidth = () => {\n\n if (!regex.test(daysInMonth.value)) {\n daysInMonth.value = '28';\n }\n if (daysInMonth.value > 8) {\n inputWidth.value = true\n }\n else inputWidth.value = false\n}\nconst addNewMail = () => {\n if (newMail.value.mail != '') {\n mailList.value.push({ 'mail': newMail.value.mail, readonly: true, valid: true })\n newMail.value = { 'mail': '', 'valid': true }\n }\n}\nconst handleActivate = () => {\n if (!active.value) {\n active.value = true\n activatedString.value = 'Deactivate'\n } else {\n active.value = false\n activatedString.value = 'Activate'\n }\n}\nconst handleReadonly = (item) => {\n mailList.value.forEach(element => {\n element.readonly = true\n });\n item.readonly = !item.readonly\n}\nconst handleMailinput = (e, mail) => {\n const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n const newEmail = e.target.value;\n if (emailRegex.test(newEmail) || newEmail === '') {\n mailList.value.forEach(element => {\n if (element.mail === mail) {\n element.mail = newEmail\n element.valid = true\n }\n });\n if (mail === undefined) {\n newMail.value.valid = true\n\n\n }\n } else {\n mailList.value.forEach(element => {\n if (element.mail === mail) {\n element.valid = false\n }\n });\n if (mail === undefined) {\n newMail.value.valid = false\n\n\n }\n }\n\n}\nconst handleDelete = (mail) => {\n let indexToDelete = -1; // Variable zum Speichern des Index\n\n mailList.value.forEach((element, index) => {\n if (element.mail === mail) {\n indexToDelete = index; // Speichere den Index, wenn die Bedingung erfüllt ist\n }\n });\n\n // Wenn ein gültiger Index gefunden wurde, lösche das Element\n if (indexToDelete !== -1) {\n mailList.value.splice(indexToDelete, 1);\n }\n}\n</script>\n<style scoped>\n.debug {\n position: fixed;\n right: 20px;\n top: 320px;\n border-radius: 20px;\n width: 400px;\n z-index: 999999;\n padding: 20px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 16px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(5px);\n -webkit-backdrop-filter: blur(5px);\n border: 1px solid rgba(255, 255, 255, 0.3);\n display: none; \n}\n\n.errormsg {\n color: red;\n font-size: 10px;\n}\n\n.activeChoiceButton {\n background-color: var(--primary);\n color: white;\n\n &:active {\n background-color: #3E6CD5 !important;\n }\n\n &:focus {\n outline: none;\n background-color: #3E6CD5;\n }\n\n &:focus-visible {\n outline: none;\n background-color: #3E6CD5;\n }\n}\n\n.blur {\n opacity: 0.3;\n}\n\n.mailItems {\n input {\n outline: none;\n background: none;\n border: none;\n width: 20rem;\n }\n}\n\n.invalidNewMail {\n\n border-radius: 2px;\n border: 2px solid rgba(255, 0, 0, 0.336);\n\n &:focus {\n border-radius: 2px;\n box-shadow: 0 0 0 0.1rem rgba(255, 0, 0, 0.774);\n border: 1px solid rgba(255, 0, 0, 0.336);\n }\n\n &:focus-visible {\n outline: 0;\n border-radius: 2px;\n box-shadow: 0 0 0 0.1rem rgba(255, 0, 0, 0.774);\n border: 1px solid rgba(255, 0, 0, 0.336);\n }\n}\n\n.editable {\n transition: all 200ms ease-in-out;\n padding-left: 0.5rem;\n border-bottom: 2px solid var(--primary) !important;\n}\n\n.invalid {\n border-bottom: 1px solid red !important;\n}\n\n.caretButtons {\n all: unset;\n cursor: pointer;\n}\n\n.caretWrap {\n display: contents;\n\n}\n\n.actionWrapper {\n display: flex;\n flex-direction: row-reverse;\n\n button {\n margin-left: 1rem;\n }\n}\n\ninput[type=\"range\"] {\n width: 100%;\n}\n\n.mqaWrapper {\n margin: 3rem 0;\n}\n\ntable {\n margin-top: 1rem;\n min-width: 50%;\n}\n\nth {\n border-bottom: 1px solid lightgray;\n}\n\ntd {\n display: flex;\n justify-content: space-between;\n padding: 1rem 0;\n}\n\n.daypicker {\n padding: 1rem;\n border: 1px solid lightgray;\n border-radius: 15px;\n\n input {\n width: 13px;\n border: none;\n background-color: unset;\n }\n\n}\n\n.dynamicWidth {\n width: 22px !important;\n}\n\n.activeItem {\n background-color: var(--primary);\n color: white;\n}\n\n.weekdays {\n border: 1px solid lightgray;\n border-radius: 15px;\n margin: 1rem 0;\n overflow: hidden;\n\n .dayButtons {\n border: none;\n display: inline-block;\n text-align: center;\n flex-direction: row;\n min-width: 60px;\n padding: 1rem;\n border-right: 1px solid lightgray;\n cursor: pointer;\n\n &:focus-visible {\n outline: unset;\n background-color: #3E6CD5;\n color: white;\n }\n\n &:hover {\n background-color: #3E6CD5;\n color: white;\n }\n }\n\n span:last-child button {\n border: none;\n }\n}\n\n.mqaWrapper {\n padding: 1rem;\n background-color: #f5f5f5;\n border-radius: 3px;\n}\n\nbutton {\n background-color: unset;\n border: 1px solid var(--primary);\n color: black;\n\n &:hover {\n background-color: #3E6CD5;\n color: white;\n }\n}\n\nbutton,\nspan {\n transition: all 100ms ease-in-out;\n}\n</style>"],"names":["route","useRoute","monthly","ref","weekly","newMail","mailButtonWrap","activatedString","inputWidth","active","mailList","week","daysInMonth","catalogId","app","getCurrentInstance","notificationBaseUrl","apiKey","notficationInfo","value","regex","fetchNotificationInfo","config","response","axios","error","postNotificationSettings","onClickOutside","event","element","resetWeekdays","arr","index","editDate","count","currentday","day","adjustWidth","addNewMail","handleActivate","handleReadonly","item","handleMailinput","e","mail","emailRegex","newEmail","handleDelete","indexToDelete"],"mappings":";;;;;;;;;;;;;;;AA+HA,UAAMA,IAAQC,EAAS;AAEvB,QAAIC,IAAUC,EAAI,EAAK,GACnBC,IAASD,EAAI,EAAK,GAClBE,IAAUF,EAAI,EAAE,MAAQ,IAAI,OAAS,IAAM,GAC3CG,IAAiBH,EAAI,IAAI;AACZ,IAAAA,EAAI,EAAI;AACzB,QAAII,IAAkBJ,EAAI,UAAU,GAChCK,IAAaL,EAAI,EAAK,GACtBM,IAASN,EAAI,EAAK,GAClBO,IAAWP,EAAI,GACfQ,IAAO,CAAC,MAAM,OAAO,MAAM,MAAM,MAAM,MAAM,IAAI,GACjDC,IAAcT,EAAI,CAAC;AACvB,UAAMU,IAAYb,EAAM,OAAO,IACzBc,IAAMC,EAAmB,GACzBC,IAAsBF,EAAI,WAAW,IAAI,OAAO,iBAAiB,KAAK,IAAI,qBAC1EG,IAASH,EAAI,WAAW,IAAI,OAAO,iBAAiB,KAAK,IAAI,QAE7DI,IAAkBf,EAAI,EAAE,GAGxBgB,IAAQhB,EAAI,CAAC,GACb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data-provider-interface/CatalogueMQA.vue"],"sourcesContent":["<template>\n <div class=\"container mb-3\">\n <div>\n <div>\n <div class=\"debug\">\n <strong> API object:</strong> <br><br>\n <!-- Disabled for PPE release (no backend on PPE yet)-->\n {{ notficationInfo }}\n\n <br> --- <br>\n\n {{ mailList }}\n\n <br>---<br>\n <strong>Fequency:</strong> <br>\n weekly: {{ weekly }}<br>\n monthly: {{ monthly }} <br>\n <p></p>\n unit: {{ frequencyUnit }} <br>\n value: {{ frequencyValue }}\n\n <br>---<br>\n treshold: {{ treshold }}\n\n </div>\n <h1>MQA Report Settings</h1>\n <p>Configuration for\n\n <strong>{{ catalogId }}</strong>\n <!-- <strong>Test Catalogue</strong> -->\n </p>\n <p>For this Catalogue the <b>MQA Rating Checks </b>are currently <b>\n <span v-if=\"!active\">deactivated</span>\n <span v-if=\"active\">activated</span></b>.</p>\n </div>\n\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"handleActivate()\">\n {{ activatedString }}\n </button>\n </div>\n <div v-if=\"active\">\n <div class=\"mqaWrapper\">\n <h3>Recipients Mail</h3>\n <span>Add and edit mail addresses for recieving the MQA report</span>\n <table class=\"mt-4\" ref=\"mailButtonWrap\" v-if=\"mailList.length != 0\">\n <tr>\n <th>Mail</th>\n </tr>\n <tr v-for=\"(item, index) in mailList\" class=\"mailItems\" :key=\"index\">\n <td>\n <span v-if=\"!editMode\">{{ item }}</span>\n <input type=\"text\" v-model=\"mailList[index]\" class=\"mail-input\" v-if=\"editMode\"\n @input=\"editErrors[index] = ''\"\n :class=\"{ 'invalidNewMail': editErrors[index] }\" >\n \n <div>\n <button type=\"button\" class=\"btn btn-simple\"\n @click=\"editMode ? saveMail(index) : editMail(index)\">\n {{ editMode ? 'Save' : 'Edit' }}\n </button>\n <button type=\"button\" class=\"btn btn-simple\"\n @click=\"deleteMail(index)\">Delete</button>\n </div>\n </td>\n <span class=\"errormsg\" v-if=\"editErrors[index]\">{{ editErrors[index] }}</span>\n </tr>\n </table>\n <div class=\"d-flex mt-3\">\n <input type=\"text\" v-model=\"newMail.mail\" @input=\"newMail.isValid = true\"\n :class=\"{ 'invalidNewMail': !newMail.isValid }\" placeholder=\"Enter email address\"\n style=\"padding:0.25rem\">\n <button type=\"button\" class=\"btn btn-simple mx-3\" @click=\"addNewMail()\">+ Add Mail</button>\n </div>\n <span class=\"errormsg\" v-if=\"!newMail.isValid\">*Invalid email format</span>\n </div>\n <div class=\"mqaWrapper\">\n <h3>Frequency of Rating Checks</h3>\n <span>Configure the frequency of the MQA rating checks.</span>\n\n <div class=\"d-flex mt-3\">\n <div class=\"mr-3 my-3\">\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"setWeekly()\"\n :class=\"{ 'activeChoiceButton': weekly }\">Weekly</button>\n <div class=\"weekdays\" :class=\"{ 'blur': !weekly }\">\n <span v-for=\"(day, index) in week\" :key=\"index\">\n <button :disabled=\"!weekly\" class=\"dayButtons\"\n :class=\"{ 'activeItem': selectedDay === index }\" @click=\"selectDay(index)\">\n {{ day }}\n </button>\n </span>\n </div>\n </div>\n <div class=\"my-3\">\n <button type=\"button\" :class=\"{ 'activeChoiceButton': monthly }\" class=\"btn btn-secondary\"\n @click=\"setMonthly()\">Monthly</button>\n <div class=\"d-flex daypicker my-3\" :class=\"{ 'blur': !monthly }\">\n <input v-model=\"daysInMonth\" @input=\"selectDay(index)\" :class=\"{ dynamicWidth: inputWidth }\"\n :disabled=\"!monthly\">\n <div class=\"caretWrap\">\n <button @click=\"editDate('up')\" class=\"caretButtons ml-1\"><svg\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" fill=\"currentColor\"\n class=\"bi bi-caret-up-fill\" viewBox=\"0 0 16 16\">\n <path\n d=\"m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z\" />\n </svg></button>\n <button @click=\"editDate()\" class=\"caretButtons mr-1\"><svg\n xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" fill=\"currentColor\"\n class=\"bi bi-caret-down-fill\" viewBox=\"0 0 16 16\">\n <path\n d=\"M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z\" />\n </svg></button>\n </div>\n <span>day of the month</span> \n </div>\n </div>\n </div>\n </div>\n <div class=\"mqaWrapper\">\n <h3>Notification Treshold</h3>\n <span>Set the threshold after which the report should be sent.</span>\n <div class=\"w-50 mt-3\">\n <div class=\"d-flex justify-content-between\">\n <span><b>0</b></span>\n <span><b>400</b></span>\n </div>\n <input type=\"range\" v-model=\"treshold\" min=\"0\" max=\"400\" />\n <p>Lower than <b>{{ treshold }}</b> Points</p>\n </div>\n </div>\n <div class=\"actionWrapper\">\n <button type=\"button\" class=\"btn btn-primary\" @click=\"postNotificationSettings\">Save</button>\n <button type=\"button\" class=\"btn btn-cancel\" @click=\"back()\">Cancel</button>\n </div>\n </div>\n </div>\n\n</template>\n<script setup>\n\nimport { ref } from 'vue';\nimport { useRoute } from 'vue-router'\nimport { getCurrentInstance } from \"vue\";\nimport { useStore } from 'vuex';\nimport { useRouter } from 'vue-router';\n\n\nimport axios from 'axios'\n\nconst store = useStore();\nconst router = useRouter();\n\nconst showSnackbar = (payload) => {\n store.dispatch('snackbar/showSnackbar', payload);\n};\n\n\nconst triggerSnackbar = () => {\n showSnackbar({\n message: 'Saved Successfully',\n variant: 'success',\n });\n };\n\n// Map the showSnackbar action from the snackbar module\n\nconst route = useRoute()\n\nlet monthly = ref(false)\nlet weekly = ref(false)\nlet mailButtonWrap = ref(null)\nlet activatedString = ref('Activate')\nlet inputWidth = ref(false)\nlet active = ref(false)\nlet mailList = ref()\nlet week = ['Mo', 'Tue', 'We', 'Th', 'Fr', 'Sa', 'Su']\nlet daysInMonth = ref(1)\nlet editMode = ref(false);\nlet treshold = ref(0);\nlet frequencyUnit = ref('');\nlet frequencyValue = ref('');\nlet selectedDay = ref(null);\nconst catalogId = route.params.id\nconst app = getCurrentInstance()\nconst notificationBaseUrl = app.appContext.app.config.globalProperties.$env.api.notificationBaseUrl\nconst apiKey = app.appContext.app.config.globalProperties.$env.api.apiKey\n\nconst selectDay = (index) => {\n if (weekly.value) {\n selectedDay.value = index;\n frequencyValue.value = selectedDay; // Update frequencyValue when a day is selected\n } \n};\n\nconst setWeekly = () => {\n weekly.value = true;\n monthly.value = false;\n selectedDay.value = frequencyValue.value; // Set the selected day based on frequencyValue\n};\n\nconst setMonthly = () => {\n weekly.value = false;\n monthly.value = true;\n selectedDay.value = frequencyValue.value; // Set the day of the month based on frequencyValue\n};\n\nconst notficationInfo = ref({})\n\nconst isValidEmail = (email) => {\n const regex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n return regex.test(email);\n};\n\nlet newMail = ref({ mail: '', isValid: true });\nlet editErrors = ref({});\n\n// enabeld for PPE release (dummy data)\n// mailList.value = [{ 'mail': \"mail@mail2.com\" }, { 'mail': \"mail@mail1.com\" }]\n\nconst fetchNotificationInfo = async () => {\n const config = {\n method: 'get',\n url: `${notificationBaseUrl}/catalogue/${catalogId}/setting`,\n headers: {\n 'Authorization': apiKey,\n 'Accept': 'application/json',\n },\n withCredentials: true\n }\n\n try {\n const response = await axios.request(config)\n notficationInfo.value = response.data\n\n if (notficationInfo.value.activeStatus === true) {\n active.value = true\n activatedString.value = 'Deactivate'\n } if (notficationInfo.value.activeStatus === false) {\n active.value = false\n activatedString.value = 'Activate'\n }\n\n mailList.value = notficationInfo.value.receiverEmailList\n frequencyUnit.value = notficationInfo.value.frequency.unit\n frequencyValue.value = notficationInfo.value.frequency.value\n treshold.value = notficationInfo.value.threshold\n\n if (frequencyUnit.value === 'week') {\n weekly.value = true\n monthly.value = false\n selectedDay.value = frequencyValue.value; // Set the selected day based on frequencyValue\n } else if (frequencyUnit.value === 'month') {\n weekly.value = false\n monthly.value = true\n daysInMonth.value = frequencyValue.value\n }\n\n console.log('Response:', response)\n } catch (error) {\n console.log('Full error:', error)\n }\n}\n\nconst postNotificationSettings = async () => {\n\n if (weekly.value === true) {\n frequencyUnit.value = \"week\"\n frequencyValue.value = selectedDay.value\n } else if (monthly.value === true) {\n frequencyUnit.value = \"month\"\n frequencyValue.value = daysInMonth.value\n }\n\n const config = {\n method: 'post',\n url: `https://piveau-metrics-notifications-piveau.apps.osc.fokus.fraunhofer.de/catalogue/${catalogId}/setting`,\n headers: {\n 'Authorization': apiKey,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json',\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',\n 'Access-Control-Allow-Headers': 'Authorization'\n },\n withCredentials: true,\n data: JSON.stringify({\n receiverEmailList: mailList.value,\n threshold: Number(treshold.value),\n frequency: {\n unit: frequencyUnit.value,\n value: frequencyValue.value\n },\n activeStatus: true\n })\n }\n\n try {\n const response = await axios.request(config)\n console.log('Settings updated:', response.data)\n triggerSnackbar();\n router.push({ name: 'DataProviderInterface-UserCatalogues' });\n return response.data\n \n\n } catch (error) {\n triggerSnackbar({\n message: 'Error updating settings.',\n variant: 'error',\n });\n\n console.log('Error updating settings:', error)\n \n throw error\n \n }\n \n\n}\n\nfetchNotificationInfo()\n\nconst editMail = () => {\n editMode.value = true\n showSnackbar({\n message: 'Email added successfully.',\n variant: 'success',\n });\n}\n\nconst saveMail = (index) => {\n const email = mailList.value[index].trim();\n if (isValidEmail(email)) {\n editMode.value = false;\n delete editErrors.value[index];\n } else {\n editErrors.value[index] = '*Invalid email format';\n }\n};\n\nconst deleteMail = (index) => {\n mailList.value.splice(index, 1);\n}\n\nconst editDate = (count) => {\n if (count === \"up\" && daysInMonth.value < 28) {\n if (daysInMonth.value > 8) {\n inputWidth.value = true\n }\n daysInMonth.value++\n }\n else if (daysInMonth.value > 1) {\n if (daysInMonth.value < 11) {\n inputWidth.value = false\n }\n daysInMonth.value--\n }\n}\n\nconst currentday = (day, event) => {\n event.target.classList.toggle('activeItem')\n}\nconst adjustWidth = () => {\n if (!regex.test(daysInMonth.value)) {\n daysInMonth.value = '28';\n }\n if (daysInMonth.value > 8) {\n inputWidth.value = true\n }\n else inputWidth.value = false\n}\nconst addNewMail = () => {\n if (newMail.value.mail.trim() === '') {\n newMail.value.isValid = false;\n return;\n }\n if (isValidEmail(newMail.value.mail)) {\n mailList.value.push(newMail.value.mail);\n newMail.value.mail = ''; // Clear input after successful addition\n newMail.value.isValid = true;\n } else {\n newMail.value.isValid = false;\n }\n}\nconst handleActivate = () => {\n if (!active.value) {\n active.value = true\n activatedString.value = 'Deactivate'\n } else {\n active.value = false\n activatedString.value = 'Activate'\n }\n}\n\nconst back = () => {\n router.push({ name: 'DataProviderInterface-UserCatalogues' });\n}\n\n</script>\n<style scoped>\n.debug {\n position: fixed;\n right: 20px;\n top: 20px;\n border-radius: 20px;\n width: 400px;\n z-index: 999999;\n padding: 20px;\n background: rgba(255, 255, 255, 0.2);\n border-radius: 16px;\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n backdrop-filter: blur(5px);\n -webkit-backdrop-filter: blur(5px);\n border: 1px solid rgba(255, 255, 255, 0.3);\n display: none; \n}\n\n.btn-simple {\n border-color: rgb(115, 115, 115);\n}\n\n.btn-cancel {\n border-color: transparent;\n}\n\n\n.errormsg {\n color: red;\n font-size: 10px;\n}\n\n.activeChoiceButton {\n background-color: var(--primary);\n color: white;\n\n &:active {\n background-color: #3E6CD5 !important;\n }\n\n &:focus {\n outline: none;\n background-color: #3E6CD5;\n }\n\n &:focus-visible {\n outline: none;\n background-color: #3E6CD5;\n }\n}\n\n\n.invalid {\n border-bottom: 1px solid red !important;\n}\n\n.blur {\n opacity: 0.3;\n}\n\n.invalidNewMail {\n\n border-radius: 2px;\n border: 2px solid rgba(255, 0, 0, 0.336);\n\n &:focus {\n border-radius: 2px;\n box-shadow: 0 0 0 0.1rem rgba(255, 0, 0, 0.774);\n border: 1px solid rgba(255, 0, 0, 0.336);\n }\n\n &:focus-visible {\n outline: 0;\n border-radius: 2px;\n box-shadow: 0 0 0 0.1rem rgba(255, 0, 0, 0.774);\n border: 1px solid rgba(255, 0, 0, 0.336);\n }\n}\n\n.editable {\n transition: all 200ms ease-in-out;\n padding-left: 0.5rem;\n border-bottom: 2px solid var(--primary) !important;\n}\n\n.invalid {\n border-bottom: 1px solid red !important;\n}\n\n.caretButtons {\n all: unset;\n cursor: pointer;\n}\n\n.caretWrap {\n display: contents;\n\n}\n\n.actionWrapper {\n display: flex;\n flex-direction: row-reverse;\n margin-bottom: 100px;\n\n button {\n margin-left: 1rem;\n }\n}\n\ninput[type=\"range\"] {\n width: 100%;\n}\n\n.mqaWrapper {\n margin: 3rem 0;\n}\n\ntable {\n margin-top: 1rem;\n min-width: 50%;\n}\n\nth {\n border-bottom: 1px solid lightgray;\n}\n\ntd {\n display: flex;\n justify-content: space-between;\n padding: 15px 0 0 0cap;\n}\n\n.daypicker {\n padding: 1rem;\n border: 1px solid lightgray;\n border-radius: 15px;\n\n input {\n width: 25px;\n border: none;\n background-color: unset;\n font-weight: 700;\n }\n\n}\n\n.dynamicWidth {\n width: 22px !important;\n}\n\n.activeItem {\n background-color: var(--primary);\n color: white;\n}\n\n.weekdays {\n border: 1px solid lightgray;\n border-radius: 15px;\n margin: 1rem 0;\n overflow: hidden;\n\n .dayButtons {\n border: none;\n display: inline-block;\n text-align: center;\n flex-direction: row;\n min-width: 60px;\n padding: 1rem;\n border-right: 1px solid lightgray;\n cursor: pointer;\n\n &:focus-visible {\n outline: unset;\n background-color: #3E6CD5;\n color: white;\n }\n\n &:hover {\n background-color: #3E6CD5;\n color: white;\n }\n }\n\n span:last-child button {\n border: none;\n }\n}\n\n.mqaWrapper {\n padding: 1rem;\n background-color: #f5f5f5;\n border-radius: 3px;\n}\n\nbutton {\n background-color: unset;\n border: 1px solid var(--primary);\n color: black;\n\n &:hover {\n background-color: #3E6CD5;\n color: white;\n border: 1px solid #3E6CD5;\n }\n}\n\n.btn-primary {\n background-color: var(--primary);\n color: white;\n\n}\n\nbutton,\nspan {\n transition: all 100ms ease-in-out;\n}\n</style>"],"names":["store","useStore","router","useRouter","showSnackbar","payload","triggerSnackbar","route","useRoute","monthly","ref","weekly","mailButtonWrap","activatedString","inputWidth","active","mailList","week","daysInMonth","editMode","treshold","frequencyUnit","frequencyValue","selectedDay","catalogId","app","getCurrentInstance","notificationBaseUrl","apiKey","selectDay","index","setWeekly","setMonthly","notficationInfo","isValidEmail","email","newMail","editErrors","fetchNotificationInfo","config","response","axios","error","postNotificationSettings","editMail","saveMail","deleteMail","editDate","count","addNewMail","handleActivate","back"],"mappings":";;;;;;;;;;;;;;;AAoJA,UAAMA,IAAQC,GAAQ,GAChBC,IAASC,GAAS,GAElBC,IAAe,CAACC,MAAY;AAChC,MAAAL,EAAM,SAAS,yBAAyBK,CAAO;AAAA,IACjD,GAGMC,IAAkB,MAAM;AAClB,MAAAF,EAAa;AAAA,QACT,SAAS;AAAA,QACT,SAAS;AAAA,MACzB,CAAa;AAAA,IACb,GAIMG,IAAQC,GAAS;AAEvB,QAAIC,IAAUC,EAAI,EAAK,GACnBC,IAASD,EAAI,EAAK,GAClBE,IAAiBF,EAAI,IAAI,GACzBG,IAAkBH,EAAI,UAAU,GAChCI,IAAaJ,EAAI,EAAK,GACtBK,IAASL,EAAI,EAAK,GAClBM,IAAWN,EAAI,GACfO,IAAO,CAAC,MAAM,OAAO,MAAM,MAAM,MAAM,MAAM,IAAI,GACjDC,IAAcR,EAAI,CAAC,GACnBS,IAAWT,EAAI,EAAK,GACpBU,IAAWV,EAAI,CAAC,GAChBW,IAAgBX,EAAI,EAAE,GACtBY,IAAiBZ,EAAI,EAAE,GACvBa,IAAcb,EAAI,IAAI;AAC1B,UAAMc,IAAYjB,EAAM,OAAO,IACzBkB,IAAMC,GAAmB,GACzBC,IAAsBF,EAAI,WAAW,IAAI,OAAO,iBAAiB,KAAK,IAAI,qBAC1EG,IAASH,EAAI,WAAW,IAAI,OAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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;
127
129
  getCatalog: import('vuex').Computed;
128
130
  getLoading: import('vuex').Computed;
129
- getDescription: import('vuex').Computed;
130
131
  getID: import('vuex').Computed;
131
- getTitle: import('vuex').Computed;
132
132
  }, {
133
133
  setupKeycloakWatcher(): void;
134
134
  handleConfirm(action: any, argsObj: any, { successMessage, errorMessage }: {
@@ -1,129 +1,84 @@
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
- import c from "../../widgets/AppLink.vue.mjs";
4
- import U from "axios";
5
- import { useRouter as V, useRoute as j } from "vue-router";
6
- import { has as b, isNil as k } from "lodash-es";
1
+ import { getCurrentInstance as b, ref as h, computed as $, onMounted as k, openBlock as r, createElementBlock as i, createElementVNode as e, toDisplayString as s, createTextVNode as l, Fragment as D, renderList as I, unref as q, createVNode as w, withCtx as A } from "vue";
2
+ import { useStore as L } from "vuex";
3
+ import M from "../../widgets/AppLink.vue.mjs";
4
+ import N from "axios";
5
+ import { useRouter as P, useRoute as U } from "vue-router";
6
+ import { has as u, isNil as d } from "lodash-es";
7
7
  import "./UserCataloguesPage.vue2.mjs";
8
- import Q from "../../_virtual/_plugin-vue_export-helper.mjs";
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 = {
8
+ import _ from "../../_virtual/_plugin-vue_export-helper.mjs";
9
+ const j = { class: "catOverview" }, x = { class: "d-flex flex-column bg-transparent container-fluid justify-content-between content" }, E = { class: "small-headline" }, Q = { class: "m-0" }, S = ["onClick"], V = {
10
10
  __name: "UserCataloguesPage",
11
- setup(H) {
12
- const $ = V(), D = j();
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 () => {
11
+ setup(B) {
12
+ const p = P(), m = U();
13
+ let c = b().appContext.app.config.globalProperties.$env;
14
+ const f = L();
15
+ let o = h([]), g = $(() => f.getters["auth/getUserCatalogIds"]), C = async () => {
16
16
  let a;
17
- await U.get(q.api.baseUrl + "search?filter=catalogue&limit=1000").then((t) => a = t).catch((t) => {
17
+ await N.get(c.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
- 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
- }), i.value = i.value.filter((t) => y.value.includes(t.id)).map((t) => ({ id: t.id, name: t.title }));
20
+ u(t, "title") && !d(t.title) && u(t, "id") && !d(t.id) && o.value.push({ title: Object.values(t.title)[0], id: t.id });
21
+ }), o.value = o.value.filter((t) => g.value.includes(t.id)).map((t) => ({ id: t.id, name: t.title }));
22
22
  };
23
- const N = (a) => {
24
- $.push({
23
+ const v = (a) => {
24
+ p.push({
25
25
  name: "DataProviderInterface-MQASettings",
26
26
  params: { id: a.id },
27
- query: { locale: D.query.locale }
27
+ query: { locale: m.query.locale }
28
28
  }).catch(() => {
29
29
  });
30
- }, C = () => {
31
30
  };
32
- return L(async () => {
33
- h();
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
- t[1] || (t[1] = l()),
39
- e("p", R, n(a.$t("message.dataupload.info.userCatDescription")), 1),
40
- t[2] || (t[2] = l()),
41
- e("div", F, [
42
- (s(!0), r(d, null, p(m(i), (o, u) => (s(), r("div", {
43
- key: u,
44
- class: "annifItems"
45
- }, [
46
- f(c, {
47
- to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id: o.id } }
48
- }, {
49
- default: g(() => [
50
- l(n(o.name), 1)
51
- ]),
52
- _: 2
53
- }, 1032, ["to"])
54
- ]))), 128)),
55
- t[0] || (t[0] = l()),
56
- m(i).length === 0 ? (s(!0), r(d, { key: 0 }, p(m(y), (o, u) => (s(), r("div", {
57
- key: u,
58
- class: "annifItems"
59
- }, [
60
- f(c, {
61
- to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id: o } }
31
+ return k(async () => {
32
+ C();
33
+ }), (a, t) => (r(), i("div", j, [
34
+ e("div", x, [
35
+ e("h1", E, s(a.$t("message.dataupload.info.userCatalogues")), 1),
36
+ t[5] || (t[5] = l()),
37
+ e("p", Q, s(a.$t("message.dataupload.info.userCatDescription")), 1),
38
+ t[6] || (t[6] = l()),
39
+ e("table", null, [
40
+ e("thead", null, [
41
+ e("tr", null, [
42
+ e("th", null, s(a.$t("message.metadata.catalog")) + " - ID", 1),
43
+ t[0] || (t[0] = l()),
44
+ e("th", null, s(a.$t("message.metadata.description")), 1),
45
+ t[1] || (t[1] = l()),
46
+ e("th", null, s(a.$t("message.dataupload.menu.actions")), 1)
47
+ ])
48
+ ]),
49
+ t[4] || (t[4] = l()),
50
+ (r(!0), i(D, null, I(q(o), (n, y) => (r(), i("tr", { key: y }, [
51
+ e("td", null, [
52
+ w(M, {
53
+ to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id: n.id } }
62
54
  }, {
63
- default: g(() => [
64
- l(n(o), 1)
55
+ default: A(() => [
56
+ l(s(n.id), 1)
65
57
  ]),
66
58
  _: 2
67
59
  }, 1032, ["to"])
68
- ]))), 128)) : M("", !0)
69
- ])
70
- ])
71
- ]),
72
- t[10] || (t[10] = l()),
73
- e("table", null, [
74
- e("thead", null, [
75
- e("tr", null, [
76
- e("th", null, n(a.$t("message.metadata.catalog")) + " - ID", 1),
60
+ ]),
61
+ t[2] || (t[2] = l()),
62
+ e("td", null, [
63
+ e("span", null, s(n.name), 1)
64
+ ]),
77
65
  t[3] || (t[3] = l()),
78
- e("th", null, n(a.$t("message.metadata.description")), 1),
79
- t[4] || (t[4] = l()),
80
- e("th", null, n(a.$t("message.dataupload.menu.actions")), 1)
81
- ])
82
- ]),
83
- t[9] || (t[9] = l()),
84
- (s(!0), r(d, null, p(m(i), (o, u) => (s(), r("tr", { key: u }, [
85
- e("td", null, [
86
- f(c, {
87
- to: { name: "CatalogueDetails", query: { locale: a.$route.query.locale }, params: { ctlg_id: o.id } }
88
- }, {
89
- default: g(() => [
90
- l(n(o.id), 1)
91
- ]),
92
- _: 2
93
- }, 1032, ["to"])
94
- ]),
95
- t[7] || (t[7] = l()),
96
- e("td", null, [
97
- e("span", null, n(o.name), 1)
98
- ]),
99
- t[8] || (t[8] = l()),
100
- e("td", null, [
101
- e("button", {
102
- type: "button",
103
- class: "btn btn-secondary",
104
- onClick: (v) => C(a.id)
105
- }, n(a.$t("message.metadata.linkedData")), 9, T),
106
- t[5] || (t[5] = l()),
107
- e("button", {
108
- type: "button",
109
- class: "btn btn-secondary",
110
- onClick: (v) => C(a.id)
111
- }, n(a.$t("message.dataupload.menu.edit")), 9, W),
112
- t[6] || (t[6] = l()),
113
- e("button", {
114
- type: "button",
115
- class: "btn btn-secondary",
116
- onClick: (v) => N(o)
117
- }, `configure MQA report
66
+ e("td", null, [
67
+ e("button", {
68
+ type: "button",
69
+ class: "btn btn-secondary",
70
+ onClick: (O) => v(n)
71
+ }, `Configure MQA report
118
72
 
119
- `, 8, z)
120
- ])
121
- ]))), 128))
73
+ `, 8, S)
74
+ ])
75
+ ]))), 128))
76
+ ])
122
77
  ])
123
- ], 64));
78
+ ]));
124
79
  }
125
- }, et = /* @__PURE__ */ Q(G, [["__scopeId", "data-v-1c6df5ca"]]);
80
+ }, W = /* @__PURE__ */ _(V, [["__scopeId", "data-v-fdadccc6"]]);
126
81
  export {
127
- et as default
82
+ W as default
128
83
  };
129
84
  //# sourceMappingURL=UserCataloguesPage.vue.mjs.map
@@ -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-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,GAClBC,IAAQC,EAAQ;AAEtB,QAAIC,IAAMC,EAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AACtE,UAAMC,IAAQC,EAAQ;AACtB,QAAIC,IAAmBC,EAAI,EAAE,GACzBC,IAAgBC,EAAS,MAAML,EAAM,QAAQ,wBAAwB,CAAC,GAEtEM,IAAgB,YAAY;AAC9B,UAAIC;AACJ,YAAMC,EACH,IAAIV,EAAI,IAAI,UAAU,oCAAoC,EAC1D,KAAK,CAAAW,MAAaF,IAAQE,CAAS,EACnC,MAAM,CAACC,MAAQ;AACd,eAAOA,CAAG;AAAA,MAChB,CAAK,GAEHH,EAAM,KAAK,OAAO,QAAQ,QAAQ,CAACI,MAAM;AACvC,QAAIC,EAAID,GAAG,OAAO,KAAK,CAACE,EAAMF,EAAE,KAAK,KAAKC,EAAID,GAAG,IAAI,KAAK,CAACE,EAAMF,EAAE,EAAE,KAAGT,EAAiB,MAAM,KAAK,EAAE,OAAO,OAAO,OAAOS,EAAE,KAAK,EAAE,CAAC,GAAG,IAAIA,EAAE,GAAE,CAAE;AAAA,MACtJ,CAAG,GAEDT,EAAiB,QAAQA,EAAiB,MACvC,OAAO,CAAAY,MAAQV,EAAc,MAAM,SAASU,EAAK,EAAE,CAAC,EACpD,IAAI,CAAAA,OAAS,EAAE,IAAIA,EAAK,IAAI,MAAMA,EAAK,MAAO,EAAC;AAAA,IACpD;AACA,UAAMC,IAAY,CAACC,MAAQ;AAEzB,MAAAtB,EAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,QAAQ,EAAE,IAAIsB,EAAI,GAAI;AAAA,QACtB,OAAO,EAAE,QAAQpB,EAAM,MAAM,OAAO;AAAA,MACxC,CAAG,EAAE,MAAM,MAAM;AAAA,MAAA,CAAG;AAAA,IACpB,GACMqB,IAAa,MAAM;AAAA,IAEzB;AACA,WAAAC,EAAU,YAAY;AACpB,MAAAZ,EAAc;AAAA,IAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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\n\n \n\n\n \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 \n </table>\n\n</div>\n </div>\n\n</template>\n<style scoped>\n\ntable {\nmargin-top: 50px !important;\nmargin-left: 0px !important;\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\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","onMounted"],"mappings":";;;;;;;;;;;AAaA,UAAMA,IAASC,EAAS,GAClBC,IAAQC,EAAQ;AAEtB,QAAIC,IAAMC,EAAkB,EAAG,WAAW,IAAI,OAAO,iBAAiB;AACtE,UAAMC,IAAQC,EAAQ;AACtB,QAAIC,IAAmBC,EAAI,EAAE,GACzBC,IAAgBC,EAAS,MAAML,EAAM,QAAQ,wBAAwB,CAAC,GAEtEM,IAAgB,YAAY;AAC9B,UAAIC;AACJ,YAAMC,EACH,IAAIV,EAAI,IAAI,UAAU,oCAAoC,EAC1D,KAAK,CAAAW,MAAaF,IAAQE,CAAS,EACnC,MAAM,CAACC,MAAQ;AACd,eAAOA,CAAG;AAAA,MAChB,CAAK,GAEHH,EAAM,KAAK,OAAO,QAAQ,QAAQ,CAACI,MAAM;AACvC,QAAIC,EAAID,GAAG,OAAO,KAAK,CAACE,EAAMF,EAAE,KAAK,KAAKC,EAAID,GAAG,IAAI,KAAK,CAACE,EAAMF,EAAE,EAAE,KAAGT,EAAiB,MAAM,KAAK,EAAE,OAAO,OAAO,OAAOS,EAAE,KAAK,EAAE,CAAC,GAAG,IAAIA,EAAE,GAAE,CAAE;AAAA,MACtJ,CAAG,GAEDT,EAAiB,QAAQA,EAAiB,MACvC,OAAO,CAAAY,MAAQV,EAAc,MAAM,SAASU,EAAK,EAAE,CAAC,EACpD,IAAI,CAAAA,OAAS,EAAE,IAAIA,EAAK,IAAI,MAAMA,EAAK,MAAO,EAAC;AAAA,IACpD;AACA,UAAMC,IAAY,CAACC,MAAQ;AAEzB,MAAAtB,EAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,QAAQ,EAAE,IAAIsB,EAAI,GAAI;AAAA,QACtB,OAAO,EAAE,QAAQpB,EAAM,MAAM,OAAO;AAAA,MACxC,CAAG,EAAE,MAAM,MAAM;AAAA,MAAA,CAAG;AAAA,IACpB;AAIA,WAAAqB,EAAU,YAAY;AACpB,MAAAX,EAAc;AAAA,IAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -11,8 +11,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
11
11
  }, {
12
12
  getDatasetDescription(): any;
13
13
  getDatasetDescriptionLength(): any;
14
- getLanguages: import('vuex').Computed;
15
14
  getDescription: import('vuex').Computed;
15
+ getLanguages: 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
- distribution?: any;
5
4
  getDistributionFormat?: any;
5
+ distribution?: 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
- distribution?: any;
12
11
  getDistributionFormat?: any;
12
+ distribution?: 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
- getCatalog: import('vuex').Computed;
29
28
  getDistributions: import('vuex').Computed;
30
- getLanguages: import('vuex').Computed;
31
29
  getTitle: import('vuex').Computed;
30
+ getCatalog: import('vuex').Computed;
31
+ getLanguages: 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
- distribution?: any;
3
2
  getDistributionFormat?: any;
3
+ distribution?: 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
- distribution?: any;
16
15
  getDistributionFormat?: any;
16
+ distribution?: 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;
9
10
  getCatalog: import('vuex').Computed;
10
11
  getLanguages: import('vuex').Computed;
11
12
  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
- getLanguages: import('vuex').Computed;
9
8
  getTitle: import('vuex').Computed;
9
+ getLanguages: 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;
21
22
  getLoading: import('vuex').Computed;
22
23
  getLanguages: import('vuex').Computed;
23
24
  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;