@pristy/pristy-libvue 2.10.0 → 2.10.1
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/{ActivityHistory-hEggqvVi.js → ActivityHistory-DQvZaDyj.js} +2 -2
- package/dist/{ActivityHistory-hEggqvVi.js.map → ActivityHistory-DQvZaDyj.js.map} +1 -1
- package/dist/{BookmarksComponent-uxfOgWPU.js → BookmarksComponent-4m0LZkN9.js} +2 -2
- package/dist/{BookmarksComponent-uxfOgWPU.js.map → BookmarksComponent-4m0LZkN9.js.map} +1 -1
- package/dist/{ChartWrapper-mNaipbXn.js → ChartWrapper-BmIm34tY.js} +2 -2
- package/dist/{ChartWrapper-mNaipbXn.js.map → ChartWrapper-BmIm34tY.js.map} +1 -1
- package/dist/{DisplayFileInDashboardComponent-BL-ooE6T.js → DisplayFileInDashboardComponent-CsXEaTRZ.js} +2 -2
- package/dist/{DisplayFileInDashboardComponent-BL-ooE6T.js.map → DisplayFileInDashboardComponent-CsXEaTRZ.js.map} +1 -1
- package/dist/{ExternalApps-C24Qf4mq.js → ExternalApps-BELfVDbB.js} +2 -2
- package/dist/{ExternalApps-C24Qf4mq.js.map → ExternalApps-BELfVDbB.js.map} +1 -1
- package/dist/{FavoriteList-CxDxCNii.js → FavoriteList-BRVaj1HM.js} +2 -2
- package/dist/{FavoriteList-CxDxCNii.js.map → FavoriteList-BRVaj1HM.js.map} +1 -1
- package/dist/{MarkdownComponent-jHr71rfh.js → MarkdownComponent-CeGPGjnT.js} +2 -2
- package/dist/{MarkdownComponent-jHr71rfh.js.map → MarkdownComponent-CeGPGjnT.js.map} +1 -1
- package/dist/{SearchInput-DojcDnQU.js → SearchInput--mu28rxD.js} +2 -2
- package/dist/{SearchInput-DojcDnQU.js.map → SearchInput--mu28rxD.js.map} +1 -1
- package/dist/{UnknownBlockType-Pc9ihwij.js → UnknownBlockType-ErfhzhB9.js} +2 -2
- package/dist/{UnknownBlockType-Pc9ihwij.js.map → UnknownBlockType-ErfhzhB9.js.map} +1 -1
- package/dist/{index-DxH0-3Sq.js → index-CI0X7RCX.js} +738 -739
- package/dist/index-CI0X7RCX.js.map +1 -0
- package/dist/pristy-libvue.css +1 -1
- package/dist/pristy-libvue.es.js +1 -1
- package/dist/pristy-libvue.umd.js +3 -3
- package/dist/pristy-libvue.umd.js.map +1 -1
- package/dist/src/components/dashboard/editor/grid/GridBlock.vue.d.ts.map +1 -1
- package/dist/src/composables/useGhostNodes.d.ts.map +1 -1
- package/dist/src/stores/upload.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-DxH0-3Sq.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as h, c as y, f as b, b as _ } from "./index-
|
|
1
|
+
import { _ as h, c as y, f as b, b as _ } from "./index-CI0X7RCX.js";
|
|
2
2
|
import { mapState as T } from "pinia";
|
|
3
3
|
import w from "primevue/dataview";
|
|
4
4
|
import H from "primevue/tooltip";
|
|
@@ -194,4 +194,4 @@ const W = /* @__PURE__ */ h(P, [["render", z], ["__scopeId", "data-v-87398df3"]]
|
|
|
194
194
|
export {
|
|
195
195
|
W as default
|
|
196
196
|
};
|
|
197
|
-
//# sourceMappingURL=ActivityHistory-
|
|
197
|
+
//# sourceMappingURL=ActivityHistory-DQvZaDyj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityHistory-hEggqvVi.js","sources":["../src/components/dashboard/widgets/ActivityHistory.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n<template>\n <div ref=\"container\" class=\"activity-container\">\n <PrimeDataView\n :value=\"groupedActivities\"\n paginator\n :rows=\"visibleRows\"\n layout=\"list\"\n >\n <template #empty>\n {{ $t(\"emptyActivityHistory\") }}\n </template>\n <template #list=\"slotProps\">\n <div>\n <div\n v-for=\"group in slotProps.items\"\n :key=\"group.entry.id\"\n class=\"activity-row\"\n >\n <i\n :class=\"getIcon(group.entry.activityType)\"\n class=\"activity-icon\"\n aria-hidden=\"true\"\n ></i>\n\n <div class=\"activity-content\">\n <p class=\"activity-text\">\n <strong\n v-tooltip.bottom=\"group.entry.postPersonId\"\n class=\"cursor-default\"\n >\n {{ getUserDisplayName(group.entry) }}\n </strong>\n <!-- eslint-disable-next-line vue/no-v-html -- Activity messages contain safe HTML with escaped user content -->\n <span v-html=\"' ' + getActivityMessageHtml(group.entry)\"></span>\n <span v-if=\"group.count > 1\" class=\"activity-count\">\n (+{{ group.count - 1 }})\n </span>\n </p>\n <p class=\"activity-date\">\n {{ formatDateTime(group.entry.postedAt) }}\n </p>\n </div>\n </div>\n </div>\n </template>\n </PrimeDataView>\n </div>\n</template>\n\n<script>\nimport { activitiesApi } from \"@/AlfrescoApi.js\";\nimport formatService from \"@/services/FormatService.js\";\nimport { useConfigStore } from \"@/stores/config\";\nimport { mapState } from \"pinia\";\nimport DataView from \"primevue/dataview\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"ActivityHistory\",\n components: {\n PrimeDataView: DataView,\n },\n directives: {\n tooltip: Tooltip,\n },\n data() {\n return {\n activities: null,\n visibleRows: 5,\n resizeObserver: null,\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n groupedActivities() {\n if (!this.activities) {\n return [];\n }\n const groups = [];\n for (const activity of this.activities) {\n const prev = groups[groups.length - 1];\n if (prev && this.isSameGroup(prev.entry, activity.entry)) {\n prev.count++;\n } else {\n groups.push({ entry: activity.entry, count: 1 });\n }\n }\n return groups;\n },\n },\n mounted() {\n this.getActivity();\n this.resizeObserver = new ResizeObserver(() => this.computeVisibleRows());\n this.resizeObserver.observe(this.$refs.container);\n },\n beforeUnmount() {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n },\n methods: {\n isSameGroup(a, b) {\n return (\n a.postPersonId === b.postPersonId &&\n a.activitySummary?.objectId === b.activitySummary?.objectId &&\n a.activitySummary?.objectId !== undefined\n );\n },\n computeVisibleRows() {\n const container = this.$refs.container;\n if (!container) {\n return;\n }\n const ROW_HEIGHT = 52;\n const PAGINATOR_HEIGHT = 50;\n const available = container.clientHeight - PAGINATOR_HEIGHT;\n const rows = Math.max(3, Math.floor(available / ROW_HEIGHT));\n this.visibleRows = rows;\n },\n reloadData() {\n this.getActivity();\n },\n formatDateTime(date) {\n return formatService.formatDateTime(date);\n },\n getIcon(type) {\n if (!type) {\n return \"ri-information-line\";\n }\n\n const exactIconMap = {\n \"org.alfresco.documentlibrary.file-downloaded\": \"ri-download-line\",\n \"org.alfresco.documentlibrary.file-added\": \"ri-add-circle-line\",\n \"org.alfresco.site.user-joined\": \"ri-user-add-line\",\n \"org.alfresco.site.user-left\": \"ri-user-unfollow-line\",\n \"org.alfresco.site.user-role-changed\": \"ri-user-settings-line\",\n \"org.alfresco.calendar.event-created\": \"ri-calendar-check-line\",\n \"org.alfresco.calendar.event-updated\": \"ri-calendar-line\",\n \"org.alfresco.calendar.event-deleted\": \"ri-calendar-close-line\",\n \"org.alfresco.blog.post-created\": \"ri-article-line\",\n \"org.alfresco.blog.post-updated\": \"ri-article-line\",\n \"org.alfresco.blog.post-deleted\": \"ri-delete-bin-line\",\n \"org.alfresco.links.link-created\": \"ri-link\",\n \"org.alfresco.links.link-updated\": \"ri-link\",\n \"org.alfresco.links.link-deleted\": \"ri-delete-bin-line\",\n };\n\n if (exactIconMap[type]) {\n return exactIconMap[type];\n }\n\n if (type.includes(\"deleted\")) {\n return \"ri-delete-bin-line\";\n }\n if (type.includes(\"added\") || type.includes(\"created\")) {\n return \"ri-add-circle-line\";\n }\n if (type.includes(\"updated\") || type.includes(\"edited\")) {\n return \"ri-edit-line\";\n }\n if (type.includes(\"downloaded\")) {\n return \"ri-download-line\";\n }\n if (type.includes(\"comment\")) {\n return \"ri-chat-3-line\";\n }\n if (type.includes(\"discussion\") || type.includes(\"reply\")) {\n return \"ri-discuss-line\";\n }\n if (type.includes(\"user-joined\")) {\n return \"ri-user-add-line\";\n }\n if (type.includes(\"user-left\")) {\n return \"ri-user-unfollow-line\";\n }\n if (type.includes(\"role-changed\")) {\n return \"ri-user-settings-line\";\n }\n\n return \"ri-information-line\";\n },\n getUserDisplayName(entry) {\n const summary = entry.activitySummary || {};\n if (\n entry.activityType.includes(\"user-role-changed\") ||\n entry.activityType.includes(\"user-joined\") ||\n entry.activityType.includes(\"user-left\")\n ) {\n const first = summary.memberFirstName || summary.firstName || \"\";\n const last = summary.memberLastName || summary.lastName || \"\";\n return (first + \" \" + last).trim() || entry.postPersonId;\n }\n const first = summary.firstName || \"\";\n const last = summary.lastName || \"\";\n return (first + \" \" + last).trim() || entry.postPersonId;\n },\n getObjectUrl(entry) {\n const summary = entry.activitySummary || {};\n if (!summary.objectId || !this.ESPACES_HOST) {\n return null;\n }\n // Folder activities\n if (entry.activityType.includes(\"folder\")) {\n return `${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${summary.objectId}`;\n }\n // File activities — open as PDF by default\n return `${this.ESPACES_HOST}/espaces/pdf/${summary.objectId}`;\n },\n escapeHtml(text) {\n const div = document.createElement(\"div\");\n div.textContent = text;\n return div.innerHTML;\n },\n getActivitiesMessages() {\n // Activity type keys contain dots (e.g. \"org.alfresco.documentlibrary.file-added\")\n // which $t() interprets as nested path separators.\n // Use $tm() to get the raw message object for the \"activities\" key.\n const raw = this.$tm(\"activities\");\n if (raw && typeof raw === \"object\") {\n // $tm() returns reactive message objects; convert values to plain strings\n const messages = {};\n for (const key of Object.keys(raw)) {\n const val = raw[key];\n messages[key] =\n typeof val === \"string\" ? val : val?.toString?.() || String(val);\n }\n return messages;\n }\n return {};\n },\n getActivityMessageHtml(entry) {\n const summary = entry.activitySummary || {};\n const title = summary.title || \"\";\n const activities = this.getActivitiesMessages();\n\n const params = {\n title: title,\n firstName: summary.firstName || \"\",\n siteName: summary.siteName || \"\",\n newTitle: summary.newTitle || \"\",\n role: this.$t(`role.${summary.role}`, summary.role || \"\"),\n type: entry.activityType,\n };\n\n let message = activities[entry.activityType] || activities[\"unknown\"];\n if (!message) {\n return this.escapeHtml(entry.activityType);\n }\n\n // Interpolate all params except title\n Object.keys(params).forEach((key) => {\n if (key === \"title\") {\n return;\n }\n message = message.replace(\n new RegExp(`\\\\{${key}\\\\}`, \"g\"),\n this.escapeHtml(params[key]),\n );\n });\n\n // Escape the rest of the message\n // Split around {title} placeholders, escape each part, then rejoin with the link\n if (title) {\n const url = this.getObjectUrl(entry);\n const escapedTitle = this.escapeHtml(title);\n const titleHtml = url\n ? `<a href=\"${this.escapeHtml(url)}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"activity-link\">${escapedTitle}</a>`\n : `<strong>${escapedTitle}</strong>`;\n const parts = message.split(\"{title}\");\n message = parts.map((p) => this.escapeHtml(p)).join(titleHtml);\n } else {\n message = this.escapeHtml(message);\n }\n\n return message;\n },\n getActivity() {\n let opts = {};\n return activitiesApi\n .listActivitiesForPerson(\"-me-\", opts)\n .then((data) => {\n this.activities = data.list.entries;\n });\n },\n },\n};\n</script>\n\n<style scoped>\n.activity-container {\n height: 100%;\n}\n\n.activity-row {\n display: flex;\n gap: 0.75rem;\n padding: 0.5rem 0;\n}\n\n.activity-icon {\n font-size: 1.25rem;\n color: var(--p-primary-color);\n margin-top: 0.25rem;\n}\n\n.activity-content {\n flex: 1;\n min-width: 0;\n}\n\n.activity-text {\n font-size: 0.875rem;\n margin: 0;\n}\n\n.activity-count {\n margin-left: 0.25rem;\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n}\n\n.activity-date {\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin: 0;\n margin-top: 0.25rem;\n}\n\n.cursor-default {\n cursor: default;\n}\n\n:deep(.activity-link) {\n color: var(--p-primary-color);\n text-decoration: none;\n font-weight: 600;\n}\n\n:deep(.activity-link:hover) {\n text-decoration: underline;\n}\n\n:deep(.activity-link:focus-visible) {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n border-radius: 2px;\n}\n</style>\n"],"names":["_sfc_main","DataView","Tooltip","mapState","useConfigStore","groups","activity","prev","a","b","container","ROW_HEIGHT","available","rows","date","formatService","type","exactIconMap","entry","summary","first","last","text","div","raw","messages","key","val","title","activities","params","message","url","escapedTitle","titleHtml","p","opts","activitiesApi","data","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_7","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_component_PrimeDataView","$options","$data","_ctx","_withCtx","slotProps","_createElementVNode","_Fragment","_renderList","group","_normalizeClass","_withDirectives","_hoisted_6","_toDisplayString"],"mappings":";;;;;AAyEA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,eAAeC;AAAA;EAEjB,YAAY;AAAA,IACV,SAASC;AAAA;EAEX,OAAO;AACL,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,gBAAgB;AAAA;EAEpB;AAAA,EACA,UAAU;AAAA,IACR,GAAGC,EAASC,GAAgB,CAAC,cAAc,CAAC;AAAA,IAC5C,oBAAoB;AAClB,UAAI,CAAC,KAAK;AACR,eAAO,CAAA;AAET,YAAMC,IAAS,CAAA;AACf,iBAAWC,KAAY,KAAK,YAAY;AACtC,cAAMC,IAAOF,EAAOA,EAAO,SAAS,CAAC;AACrC,QAAIE,KAAQ,KAAK,YAAYA,EAAK,OAAOD,EAAS,KAAK,IACrDC,EAAK,UAELF,EAAO,KAAK,EAAE,OAAOC,EAAS,OAAO,OAAO,GAAG;AAAA,MAEnD;AACA,aAAOD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,QAAV,GAA2C;AAAA;;gBAM7CH,EAAgE,QAAA;AAAA,kBAA1D,WAAkD,MAApCL,EAAA,uBAAuBQ,EAAM,KAAK;AAAA;gBAC1CA,EAAM,QAAK,UAAvBZ,EAEO,QAFPe,GAAoD,UAC7CH,EAAM,QAAK,CAAA,IAAO,MACzB,CAAA;;cAEFH,EAEI,KAFJX,GAEIkB,EADCZ,EAAA,eAAeQ,EAAM,MAAM,QAAQ,CAAA,GAAA,CAAA;AAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ActivityHistory-DQvZaDyj.js","sources":["../src/components/dashboard/widgets/ActivityHistory.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n<template>\n <div ref=\"container\" class=\"activity-container\">\n <PrimeDataView\n :value=\"groupedActivities\"\n paginator\n :rows=\"visibleRows\"\n layout=\"list\"\n >\n <template #empty>\n {{ $t(\"emptyActivityHistory\") }}\n </template>\n <template #list=\"slotProps\">\n <div>\n <div\n v-for=\"group in slotProps.items\"\n :key=\"group.entry.id\"\n class=\"activity-row\"\n >\n <i\n :class=\"getIcon(group.entry.activityType)\"\n class=\"activity-icon\"\n aria-hidden=\"true\"\n ></i>\n\n <div class=\"activity-content\">\n <p class=\"activity-text\">\n <strong\n v-tooltip.bottom=\"group.entry.postPersonId\"\n class=\"cursor-default\"\n >\n {{ getUserDisplayName(group.entry) }}\n </strong>\n <!-- eslint-disable-next-line vue/no-v-html -- Activity messages contain safe HTML with escaped user content -->\n <span v-html=\"' ' + getActivityMessageHtml(group.entry)\"></span>\n <span v-if=\"group.count > 1\" class=\"activity-count\">\n (+{{ group.count - 1 }})\n </span>\n </p>\n <p class=\"activity-date\">\n {{ formatDateTime(group.entry.postedAt) }}\n </p>\n </div>\n </div>\n </div>\n </template>\n </PrimeDataView>\n </div>\n</template>\n\n<script>\nimport { activitiesApi } from \"@/AlfrescoApi.js\";\nimport formatService from \"@/services/FormatService.js\";\nimport { useConfigStore } from \"@/stores/config\";\nimport { mapState } from \"pinia\";\nimport DataView from \"primevue/dataview\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"ActivityHistory\",\n components: {\n PrimeDataView: DataView,\n },\n directives: {\n tooltip: Tooltip,\n },\n data() {\n return {\n activities: null,\n visibleRows: 5,\n resizeObserver: null,\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n groupedActivities() {\n if (!this.activities) {\n return [];\n }\n const groups = [];\n for (const activity of this.activities) {\n const prev = groups[groups.length - 1];\n if (prev && this.isSameGroup(prev.entry, activity.entry)) {\n prev.count++;\n } else {\n groups.push({ entry: activity.entry, count: 1 });\n }\n }\n return groups;\n },\n },\n mounted() {\n this.getActivity();\n this.resizeObserver = new ResizeObserver(() => this.computeVisibleRows());\n this.resizeObserver.observe(this.$refs.container);\n },\n beforeUnmount() {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n },\n methods: {\n isSameGroup(a, b) {\n return (\n a.postPersonId === b.postPersonId &&\n a.activitySummary?.objectId === b.activitySummary?.objectId &&\n a.activitySummary?.objectId !== undefined\n );\n },\n computeVisibleRows() {\n const container = this.$refs.container;\n if (!container) {\n return;\n }\n const ROW_HEIGHT = 52;\n const PAGINATOR_HEIGHT = 50;\n const available = container.clientHeight - PAGINATOR_HEIGHT;\n const rows = Math.max(3, Math.floor(available / ROW_HEIGHT));\n this.visibleRows = rows;\n },\n reloadData() {\n this.getActivity();\n },\n formatDateTime(date) {\n return formatService.formatDateTime(date);\n },\n getIcon(type) {\n if (!type) {\n return \"ri-information-line\";\n }\n\n const exactIconMap = {\n \"org.alfresco.documentlibrary.file-downloaded\": \"ri-download-line\",\n \"org.alfresco.documentlibrary.file-added\": \"ri-add-circle-line\",\n \"org.alfresco.site.user-joined\": \"ri-user-add-line\",\n \"org.alfresco.site.user-left\": \"ri-user-unfollow-line\",\n \"org.alfresco.site.user-role-changed\": \"ri-user-settings-line\",\n \"org.alfresco.calendar.event-created\": \"ri-calendar-check-line\",\n \"org.alfresco.calendar.event-updated\": \"ri-calendar-line\",\n \"org.alfresco.calendar.event-deleted\": \"ri-calendar-close-line\",\n \"org.alfresco.blog.post-created\": \"ri-article-line\",\n \"org.alfresco.blog.post-updated\": \"ri-article-line\",\n \"org.alfresco.blog.post-deleted\": \"ri-delete-bin-line\",\n \"org.alfresco.links.link-created\": \"ri-link\",\n \"org.alfresco.links.link-updated\": \"ri-link\",\n \"org.alfresco.links.link-deleted\": \"ri-delete-bin-line\",\n };\n\n if (exactIconMap[type]) {\n return exactIconMap[type];\n }\n\n if (type.includes(\"deleted\")) {\n return \"ri-delete-bin-line\";\n }\n if (type.includes(\"added\") || type.includes(\"created\")) {\n return \"ri-add-circle-line\";\n }\n if (type.includes(\"updated\") || type.includes(\"edited\")) {\n return \"ri-edit-line\";\n }\n if (type.includes(\"downloaded\")) {\n return \"ri-download-line\";\n }\n if (type.includes(\"comment\")) {\n return \"ri-chat-3-line\";\n }\n if (type.includes(\"discussion\") || type.includes(\"reply\")) {\n return \"ri-discuss-line\";\n }\n if (type.includes(\"user-joined\")) {\n return \"ri-user-add-line\";\n }\n if (type.includes(\"user-left\")) {\n return \"ri-user-unfollow-line\";\n }\n if (type.includes(\"role-changed\")) {\n return \"ri-user-settings-line\";\n }\n\n return \"ri-information-line\";\n },\n getUserDisplayName(entry) {\n const summary = entry.activitySummary || {};\n if (\n entry.activityType.includes(\"user-role-changed\") ||\n entry.activityType.includes(\"user-joined\") ||\n entry.activityType.includes(\"user-left\")\n ) {\n const first = summary.memberFirstName || summary.firstName || \"\";\n const last = summary.memberLastName || summary.lastName || \"\";\n return (first + \" \" + last).trim() || entry.postPersonId;\n }\n const first = summary.firstName || \"\";\n const last = summary.lastName || \"\";\n return (first + \" \" + last).trim() || entry.postPersonId;\n },\n getObjectUrl(entry) {\n const summary = entry.activitySummary || {};\n if (!summary.objectId || !this.ESPACES_HOST) {\n return null;\n }\n // Folder activities\n if (entry.activityType.includes(\"folder\")) {\n return `${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${summary.objectId}`;\n }\n // File activities — open as PDF by default\n return `${this.ESPACES_HOST}/espaces/pdf/${summary.objectId}`;\n },\n escapeHtml(text) {\n const div = document.createElement(\"div\");\n div.textContent = text;\n return div.innerHTML;\n },\n getActivitiesMessages() {\n // Activity type keys contain dots (e.g. \"org.alfresco.documentlibrary.file-added\")\n // which $t() interprets as nested path separators.\n // Use $tm() to get the raw message object for the \"activities\" key.\n const raw = this.$tm(\"activities\");\n if (raw && typeof raw === \"object\") {\n // $tm() returns reactive message objects; convert values to plain strings\n const messages = {};\n for (const key of Object.keys(raw)) {\n const val = raw[key];\n messages[key] =\n typeof val === \"string\" ? val : val?.toString?.() || String(val);\n }\n return messages;\n }\n return {};\n },\n getActivityMessageHtml(entry) {\n const summary = entry.activitySummary || {};\n const title = summary.title || \"\";\n const activities = this.getActivitiesMessages();\n\n const params = {\n title: title,\n firstName: summary.firstName || \"\",\n siteName: summary.siteName || \"\",\n newTitle: summary.newTitle || \"\",\n role: this.$t(`role.${summary.role}`, summary.role || \"\"),\n type: entry.activityType,\n };\n\n let message = activities[entry.activityType] || activities[\"unknown\"];\n if (!message) {\n return this.escapeHtml(entry.activityType);\n }\n\n // Interpolate all params except title\n Object.keys(params).forEach((key) => {\n if (key === \"title\") {\n return;\n }\n message = message.replace(\n new RegExp(`\\\\{${key}\\\\}`, \"g\"),\n this.escapeHtml(params[key]),\n );\n });\n\n // Escape the rest of the message\n // Split around {title} placeholders, escape each part, then rejoin with the link\n if (title) {\n const url = this.getObjectUrl(entry);\n const escapedTitle = this.escapeHtml(title);\n const titleHtml = url\n ? `<a href=\"${this.escapeHtml(url)}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"activity-link\">${escapedTitle}</a>`\n : `<strong>${escapedTitle}</strong>`;\n const parts = message.split(\"{title}\");\n message = parts.map((p) => this.escapeHtml(p)).join(titleHtml);\n } else {\n message = this.escapeHtml(message);\n }\n\n return message;\n },\n getActivity() {\n let opts = {};\n return activitiesApi\n .listActivitiesForPerson(\"-me-\", opts)\n .then((data) => {\n this.activities = data.list.entries;\n });\n },\n },\n};\n</script>\n\n<style scoped>\n.activity-container {\n height: 100%;\n}\n\n.activity-row {\n display: flex;\n gap: 0.75rem;\n padding: 0.5rem 0;\n}\n\n.activity-icon {\n font-size: 1.25rem;\n color: var(--p-primary-color);\n margin-top: 0.25rem;\n}\n\n.activity-content {\n flex: 1;\n min-width: 0;\n}\n\n.activity-text {\n font-size: 0.875rem;\n margin: 0;\n}\n\n.activity-count {\n margin-left: 0.25rem;\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n}\n\n.activity-date {\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin: 0;\n margin-top: 0.25rem;\n}\n\n.cursor-default {\n cursor: default;\n}\n\n:deep(.activity-link) {\n color: var(--p-primary-color);\n text-decoration: none;\n font-weight: 600;\n}\n\n:deep(.activity-link:hover) {\n text-decoration: underline;\n}\n\n:deep(.activity-link:focus-visible) {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n border-radius: 2px;\n}\n</style>\n"],"names":["_sfc_main","DataView","Tooltip","mapState","useConfigStore","groups","activity","prev","a","b","container","ROW_HEIGHT","available","rows","date","formatService","type","exactIconMap","entry","summary","first","last","text","div","raw","messages","key","val","title","activities","params","message","url","escapedTitle","titleHtml","p","opts","activitiesApi","data","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_7","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_component_PrimeDataView","$options","$data","_ctx","_withCtx","slotProps","_createElementVNode","_Fragment","_renderList","group","_normalizeClass","_withDirectives","_hoisted_6","_toDisplayString"],"mappings":";;;;;AAyEA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,eAAeC;AAAA;EAEjB,YAAY;AAAA,IACV,SAASC;AAAA;EAEX,OAAO;AACL,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,gBAAgB;AAAA;EAEpB;AAAA,EACA,UAAU;AAAA,IACR,GAAGC,EAASC,GAAgB,CAAC,cAAc,CAAC;AAAA,IAC5C,oBAAoB;AAClB,UAAI,CAAC,KAAK;AACR,eAAO,CAAA;AAET,YAAMC,IAAS,CAAA;AACf,iBAAWC,KAAY,KAAK,YAAY;AACtC,cAAMC,IAAOF,EAAOA,EAAO,SAAS,CAAC;AACrC,QAAIE,KAAQ,KAAK,YAAYA,EAAK,OAAOD,EAAS,KAAK,IACrDC,EAAK,UAELF,EAAO,KAAK,EAAE,OAAOC,EAAS,OAAO,OAAO,GAAG;AAAA,MAEnD;AACA,aAAOD;AAAA,IACT;AAAA;EAEF,UAAU;AACR,SAAK,YAAW,GAChB,KAAK,iBAAiB,IAAI,eAAe,MAAM,KAAK,mBAAkB,CAAE,GACxE,KAAK,eAAe,QAAQ,KAAK,MAAM,SAAS;AAAA,EAClD;AAAA,EACA,gBAAgB;AACd,IAAI,KAAK,kBACP,KAAK,eAAe,WAAU;AAAA,EAElC;AAAA,EACA,SAAS;AAAA,IACP,YAAYG,GAAGC,GAAG;AAChB,aACED,EAAE,iBAAiBC,EAAE,gBACrBD,EAAE,iBAAiB,aAAaC,EAAE,iBAAiB,YACnDD,EAAE,iBAAiB,aAAa;AAAA,IAEpC;AAAA,IACA,qBAAqB;AACnB,YAAME,IAAY,KAAK,MAAM;AAC7B,UAAI,CAACA;AACH;AAEF,YAAMC,IAAa,IAEbC,IAAYF,EAAU,eADH,IAEnBG,IAAO,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AAAA,MACR,WAAA;AAAA,MACC,MAAMC,EAAA;AAAA,MACP,QAAO;AAAA;MAEI,SACT,MAAgC;AAAA,YAA7BC,EAAA,GAAE,sBAAA,CAAA,GAAA,CAAA;AAAA;MAEI,MAAIC,EACb,CADeC,MAAS;AAAA,QACxBC,EA+BM,OAAA,MAAA;AAAA,WA9BJV,EAAA,EAAA,GAAAC,EA6BMU,GAAA,MAAAC,EA5BYH,EAAU,QAAnBI,YADTZ,EA6BM,OAAA;AAAA,YA3BH,KAAKY,EAAM,MAAM;AAAA,YAClB,OAAM;AAAA;YAENH,EAIK,KAAA;AAAA,cAHF,OAAKI,EAAA,CAAET,UAAQQ,EAAM,MAAM,YAAY,GAClC,eAAe,CAAA;AAAA,cACrB,eAAY;AAAA;YAGdH,EAiBM,OAjBNd,GAiBM;AAAA,cAhBJc,EAYI,KAZJb,GAYI;AAAA,gBAXFkB,GAAAf,EAAA,GAAAC,EAKS,UALTH,GAKS;AAAA,sBADJO,EAAA,mBAAmBQ,EAAM,KAAK,CAAA,GAAA,CAAA;AAAA;;;oBAHfA,EAAM,MAAM;AAAA;oBAApB,EAAA,QAAV,GAA2C;AAAA;;gBAM7CH,EAAgE,QAAA;AAAA,kBAA1D,WAAkD,MAApCL,EAAA,uBAAuBQ,EAAM,KAAK;AAAA;gBAC1CA,EAAM,QAAK,UAAvBZ,EAEO,QAFPe,GAAoD,UAC7CH,EAAM,QAAK,CAAA,IAAO,MACzB,CAAA;;cAEFH,EAEI,KAFJX,GAEIkB,EADCZ,EAAA,eAAeQ,EAAM,MAAM,QAAQ,CAAA,GAAA,CAAA;AAAA;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as o, createElementBlock as t, createElementVNode as s, Fragment as i, renderList as c, normalizeClass as m, toDisplayString as k } from "vue";
|
|
2
|
-
import { _ } from "./index-
|
|
2
|
+
import { _ } from "./index-CI0X7RCX.js";
|
|
3
3
|
const d = {
|
|
4
4
|
name: "BookmarksComponent",
|
|
5
5
|
props: {
|
|
@@ -41,4 +41,4 @@ const R = /* @__PURE__ */ _(d, [["render", v], ["__scopeId", "data-v-48871645"]]
|
|
|
41
41
|
export {
|
|
42
42
|
R as default
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=BookmarksComponent-
|
|
44
|
+
//# sourceMappingURL=BookmarksComponent-4m0LZkN9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookmarksComponent-
|
|
1
|
+
{"version":3,"file":"BookmarksComponent-4m0LZkN9.js","sources":["../src/components/dashboard/widgets/BookmarksComponent.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"bookmarks-container\">\n <ul class=\"bookmarks-list\">\n <li\n v-for=\"(bookmark, index) in bookmarks\"\n :key=\"index\"\n @click=\"navigateTo(bookmark)\"\n class=\"bookmark-item\"\n >\n <i\n :class=\"\n bookmark.type === 'folder' ? 'ri-folder-line' : 'ri-file-line'\n \"\n class=\"bookmark-icon\"\n ></i>\n <span class=\"bookmark-name\">\n {{ bookmark.name }}\n </span>\n </li>\n </ul>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"BookmarksComponent\",\n props: {\n bookmarks: {\n type: Array,\n default: () => [],\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n methods: {\n navigateTo(bookmark) {\n if (this.urlResolver) {\n this.urlResolver(bookmark);\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.bookmarks-container {\n width: 100%;\n}\n\n.bookmarks-list {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n.bookmark-item {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n padding: 0.5rem 0.75rem;\n border-radius: 0.5rem;\n cursor: pointer;\n transition:\n background-color 0.2s,\n color 0.2s;\n}\n\n.bookmark-item:hover {\n background: var(--p-highlight-background);\n color: var(--p-primary-color);\n}\n\n.bookmark-icon {\n font-size: 1.125rem;\n flex-shrink: 0;\n color: var(--p-primary-color);\n}\n\n.bookmark-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n}\n</style>\n"],"names":["_sfc_main","bookmark","_hoisted_1","_hoisted_2","_hoisted_4","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","$props","index","$event","$options","_normalizeClass","_toDisplayString"],"mappings":";;AAyCA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM,CAAA;AAAA;IAEjB,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,SAAS;AAAA,IACP,WAAWC,GAAU;AACnB,MAAI,KAAK,eACP,KAAK,YAAYA,CAAQ;AAAA,IAE7B;AAAA;AAEJ,GA1COC,IAAA,EAAA,OAAM,sBAAqB,GAC1BC,IAAA,EAAA,OAAM,iBAAgB,oBAahBC,IAAA,EAAA,OAAM,gBAAe;;AAdjC,SAAAC,EAAA,GAAAC,EAmBM,OAnBNJ,GAmBM;AAAA,IAlBJK,EAiBK,MAjBLJ,GAiBK;AAAA,OAhBHE,EAAA,EAAA,GAAAC,EAeKE,GAAA,MAAAC,EAdyBC,EAAA,WAAS,CAA7BT,GAAUU,YADpBL,EAeK,MAAA;AAAA,QAbF,KAAKK;AAAA,QACL,SAAK,CAAAC,MAAEC,EAAA,WAAWZ,CAAQ;AAAA,QAC3B,OAAM;AAAA;QAENM,EAKK,KAAA;AAAA,UAJF,OAAKO,EAAA;AAAA,YAAeb,EAAS,SAAI,WAAA,mBAAA;AAAA,YAG5B;AAAA,UAAe,CAAA;AAAA;QAEvBM,EAEO,QAFPH,GAEOW,EADFd,EAAS,IAAI,GAAA,CAAA;AAAA;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "primevue/chart";
|
|
2
2
|
import { resolveComponent as n, openBlock as p, createElementBlock as a, createVNode as s } from "vue";
|
|
3
|
-
import { _ as i } from "./index-
|
|
3
|
+
import { _ as i } from "./index-CI0X7RCX.js";
|
|
4
4
|
const l = {
|
|
5
5
|
name: "ChartWrapper",
|
|
6
6
|
components: {
|
|
@@ -56,4 +56,4 @@ const y = /* @__PURE__ */ i(l, [["render", d], ["__scopeId", "data-v-e0f7b28a"]]
|
|
|
56
56
|
export {
|
|
57
57
|
y as default
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=ChartWrapper-
|
|
59
|
+
//# sourceMappingURL=ChartWrapper-BmIm34tY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartWrapper-
|
|
1
|
+
{"version":3,"file":"ChartWrapper-BmIm34tY.js","sources":["../src/components/dashboard/widgets/ChartWrapper.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n<template>\n <div class=\"chart-wrapper\">\n <PrimeChart\n class=\"chart-full-width\"\n :type=\"type\"\n :data=\"data\"\n :options=\"mergedOptions\"\n />\n </div>\n</template>\n\n<script>\nimport Chart from \"primevue/chart\";\n\nexport default {\n name: \"ChartWrapper\",\n components: {\n PrimeChart: Chart,\n },\n props: {\n type: {\n type: String,\n required: true,\n },\n data: {\n type: Object,\n required: true,\n },\n options: {\n type: Object,\n default: () => ({}),\n },\n },\n computed: {\n textColor() {\n return getComputedStyle(document.documentElement)\n .getPropertyValue(\"--p-text-color\")\n .trim();\n },\n mergedOptions() {\n return {\n ...this.options,\n plugins: {\n ...this.options?.plugins,\n legend: {\n ...this.options?.plugins?.legend,\n labels: {\n ...this.options?.plugins?.legend?.labels,\n color: this.textColor,\n },\n },\n },\n };\n },\n },\n};\n</script>\n\n<style scoped>\n.chart-wrapper {\n display: flex;\n justify-content: center;\n}\n\n.chart-full-width {\n width: 100%;\n}\n</style>\n"],"names":["_sfc_main","Chart","_hoisted_1","_openBlock","_createElementBlock","_createVNode","_component_PrimeChart","$props","$options"],"mappings":";;;AA8BA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,YAAYC;AAAA;EAEd,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA;IAEZ,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA;IAEZ,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA;;EAGpB,UAAU;AAAA,IACR,YAAY;AACV,aAAO,iBAAiB,SAAS,eAAe,EAC7C,iBAAiB,gBAAgB,EACjC,KAAI;AAAA,IACT;AAAA,IACA,gBAAgB;AACd,aAAO;AAAA,QACL,GAAG,KAAK;AAAA,QACR,SAAS;AAAA,UACP,GAAG,KAAK,SAAS;AAAA,UACjB,QAAQ;AAAA,YACN,GAAG,KAAK,SAAS,SAAS;AAAA,YAC1B,QAAQ;AAAA,cACN,GAAG,KAAK,SAAS,SAAS,QAAQ;AAAA,cAClC,OAAO,KAAK;AAAA;;;;IAKtB;AAAA;AAEJ,GAtDOC,IAAA,EAAA,OAAM,gBAAe;;;AAA1B,SAAAC,EAAA,GAAAC,EAOM,OAPNF,GAOM;AAAA,IANJG,EAKEC,GAAA;AAAA,MAJA,OAAM;AAAA,MACL,MAAMC,EAAA;AAAA,MACN,MAAMA,EAAA;AAAA,MACN,SAASC,EAAA;AAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as l, e as m } from "./index-
|
|
1
|
+
import { _ as l, e as m } from "./index-CI0X7RCX.js";
|
|
2
2
|
import g from "primevue/image";
|
|
3
3
|
import { resolveComponent as d, openBlock as t, createBlock as y, createCommentVNode as p, createElementBlock as s, createVNode as c, Fragment as h, renderList as D, createElementVNode as I, toDisplayString as F } from "vue";
|
|
4
4
|
import { VuePDF as P, usePDF as k } from "@tato30/vue-pdf";
|
|
@@ -101,4 +101,4 @@ const j = /* @__PURE__ */ l(V, [["render", B], ["__scopeId", "data-v-3430e09a"]]
|
|
|
101
101
|
export {
|
|
102
102
|
j as default
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=DisplayFileInDashboardComponent-
|
|
104
|
+
//# sourceMappingURL=DisplayFileInDashboardComponent-CsXEaTRZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayFileInDashboardComponent-
|
|
1
|
+
{"version":3,"file":"DisplayFileInDashboardComponent-CsXEaTRZ.js","sources":["../src/components/dashboard/widgets/OnlyImageDisplayed.vue","../src/components/dashboard/widgets/DisplayFileInDashboardComponent.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n<template>\n <PrimeImage v-if=\"id\" :src=\"contentUrl\" imageClass=\"image-displayed\" />\n</template>\n<script>\nimport Image from \"primevue/image\";\nimport alfrescoFileService from \"@/services/AlfrescoFileService.js\";\n\nexport default {\n name: \"OnlyImageDisplayed\",\n components: {\n PrimeImage: Image,\n },\n props: {\n id: {\n type: String,\n default: \"\",\n },\n },\n data() {\n return {\n contentUrl: null,\n };\n },\n mounted() {\n this.loadImage();\n },\n methods: {\n loadImage() {\n this.contentUrl = alfrescoFileService.getContentUrl(this.id);\n },\n },\n computed: {\n hasContentUrl() {\n return this.contentUrl !== \"\";\n },\n },\n};\n</script>\n<style scoped>\n:deep(.image-displayed) {\n max-width: 100%;\n max-height: 100%;\n width: auto;\n height: auto;\n display: block;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n<template>\n <div v-if=\"type === 'image'\">\n <OnlyImageDisplayed :id=\"id\" />\n </div>\n <div v-else-if=\"type === 'pdf'\">\n <div v-if=\"pdf\" class=\"pdf-pages-container\">\n <div v-for=\"page in pages\" :key=\"page\">\n <VuePDF :pdf=\"pdf\" :page=\"page\" :rotation=\"rotation\" :scale=\"scale\" />\n <span class=\"pdf-pagination\">\n {{ $t(\"pdf.currentPagination\", { page: page, pages: pages }) }}</span\n >\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport alfrescoFileService from \"@/services/AlfrescoFileService.js\";\nimport OnlyImageDisplayed from \"@/components/dashboard/widgets/OnlyImageDisplayed.vue\";\nimport { usePDF, VuePDF } from \"@tato30/vue-pdf\";\n\nexport default {\n name: \"DisplayFileInDashboardComponent\",\n components: { VuePDF, OnlyImageDisplayed },\n props: {\n type: {\n type: String,\n default: \"pdf\",\n },\n id: {\n type: String,\n default: \"\",\n },\n },\n data() {\n return {\n pdf: null,\n pages: 0,\n rotation: 0,\n scale: 1,\n };\n },\n mounted() {\n if (this.type === \"pdf\") {\n this.loadPDF();\n }\n },\n methods: {\n loadPDF() {\n let url = alfrescoFileService.getContentUrl(this.id);\n if (!url) {\n console.error(\"URL is not defined\");\n return;\n }\n const document = usePDF(url);\n this.pdf = document.pdf;\n this.pages = document.pages;\n },\n },\n};\n</script>\n\n<style scoped>\n.pdf-pages-container {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 1rem;\n}\n\n.pdf-pagination {\n display: flex;\n justify-content: center;\n padding: 1rem;\n}\n</style>\n"],"names":["_sfc_main","Image","alfrescoFileService","$props","_createBlock","_component_PrimeImage","$data","VuePDF","OnlyImageDisplayed","url","document","usePDF","_hoisted_4","_createElementBlock","_hoisted_1","_createVNode","_component_OnlyImageDisplayed","_hoisted_2","_openBlock","_hoisted_3","_Fragment","_renderList","page","_component_VuePDF","_createElementVNode","_toDisplayString","_ctx"],"mappings":";;;;AAuBA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,YAAYC;AAAA;EAEd,OAAO;AAAA,IACL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,YAAY;AAAA;EAEhB;AAAA,EACA,UAAU;AACR,SAAK,UAAS;AAAA,EAChB;AAAA,EACA,SAAS;AAAA,IACP,YAAY;AACV,WAAK,aAAaC,EAAoB,cAAc,KAAK,EAAE;AAAA,IAC7D;AAAA;EAEF,UAAU;AAAA,IACR,gBAAgB;AACd,aAAO,KAAK,eAAe;AAAA,IAC7B;AAAA;AAEJ;;;SAnCo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AAAA;QAC7DkB,EAEC,QAFDZ,GAECa,EADIC,KAAE,yBAAA,EAAA,MAAkCJ,UAAahB,EAAA,MAAK,CAAA,CAAA,GAAA,CAAA;AAAA;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as o, createElementBlock as a, Fragment as t, renderList as r, normalizeStyle as s, normalizeClass as p, createElementVNode as d, toDisplayString as u } from "vue";
|
|
2
|
-
import { _ as h } from "./index-
|
|
2
|
+
import { _ as h } from "./index-CI0X7RCX.js";
|
|
3
3
|
const b = {
|
|
4
4
|
name: "ExternalApps",
|
|
5
5
|
props: {
|
|
@@ -87,4 +87,4 @@ const F = /* @__PURE__ */ h(b, [["render", m], ["__scopeId", "data-v-a950f8e4"]]
|
|
|
87
87
|
export {
|
|
88
88
|
F as default
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=ExternalApps-
|
|
90
|
+
//# sourceMappingURL=ExternalApps-BELfVDbB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalApps-
|
|
1
|
+
{"version":3,"file":"ExternalApps-BELfVDbB.js","sources":["../src/components/dashboard/widgets/ExternalApps.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"external-apps-grid\">\n <div\n v-for=\"item in mappedItems\"\n :key=\"item.type\"\n class=\"external-app-card\"\n @click=\"handleClick(item)\"\n >\n <template v-if=\"useFavicon\">\n <img\n :src=\"getFaviconUrl(item.link)\"\n alt=\"favicon\"\n class=\"external-app-favicon\"\n width=\"32\"\n height=\"32\"\n />\n </template>\n <template v-else>\n <i\n :class=\"item.customIcon || item.icon\"\n class=\"external-app-icon\"\n :style=\"{\n color: item.color ? `#${item.color}` : 'var(--p-text-color)',\n }\"\n ></i>\n </template>\n <span class=\"external-app-label\">{{ item.label }}</span>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"ExternalApps\",\n props: {\n config: {\n type: Array,\n required: true,\n default: () => [],\n },\n useFavicon: {\n type: Boolean,\n default: false,\n },\n },\n computed: {\n mappedItems() {\n const typeMap = {\n calendar: { label: \"Calendar\", icon: \"ri-calendar-line\" },\n chat: { label: \"Chat\", icon: \"ri-chat-3-line\" },\n contacts: { label: \"Contacts\", icon: \"ri-contacts-line\" },\n docs: { label: \"Docs\", icon: \"ri-file-text-line\" },\n email: { label: \"Email\", icon: \"ri-mail-line\" },\n storage: { label: \"File storage\", icon: \"ri-folder-line\" },\n iam: { label: \"IAM\", icon: \"ri-home-5-line\" },\n notes: { label: \"Notes\", icon: \"ri-edit-line\" },\n projects: { label: \"Projects\", icon: \"ri-focus-2-line\" },\n tasks: { label: \"Tasks\", icon: \"ri-list-check-2\" },\n video: { label: \"Video calls\", icon: \"ri-video-chat-line\" },\n wiki: { label: \"Wiki\", icon: \"ri-lightbulb-line\" },\n other: { label: \"Other\", icon: \"ri-question-line\" },\n };\n\n return this.config.map((item) => {\n const mapping = typeMap[item.type] || {\n label: item.type,\n icon: \"ri-question-line\",\n };\n return {\n ...item,\n label: item.value || mapping.label,\n icon: mapping.icon,\n customIcon: item.icon, // User-selected icon\n color: item.color, // User-selected color\n };\n });\n },\n },\n methods: {\n handleClick(item) {\n window.open(item.link, \"_blank\");\n },\n getFaviconUrl(link) {\n const url = new URL(\n link.startsWith(\"http\") ? link : window.location.origin + link,\n );\n return `${url.origin}/favicon.ico`;\n },\n },\n};\n</script>\n\n<style scoped>\n.external-apps-grid {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 0.75rem;\n}\n\n.external-app-card {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border-radius: 0.5rem;\n padding: 0.5rem;\n background: var(--p-content-background);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n transition: transform 0.2s;\n width: 7rem;\n height: 7rem;\n}\n\n.external-app-card:hover {\n background: var(--p-highlight-background);\n}\n\n.external-app-favicon {\n margin-bottom: 0.5rem;\n object-fit: contain;\n}\n\n.external-app-icon {\n font-size: 1.75rem;\n margin-bottom: 0.5rem;\n}\n\n.external-app-label {\n font-size: 1rem;\n text-align: center;\n}\n</style>\n"],"names":["_sfc_main","typeMap","item","mapping","link","_hoisted_1","_hoisted_4","_openBlock","_createElementBlock","_Fragment","_renderList","$options","$event","$props","_normalizeClass","_normalizeStyle","_createElementVNode","_toDisplayString"],"mappings":";;AAiDA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,MACV,SAAS,MAAM,CAAA;AAAA;IAEjB,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,UAAU;AAAA,IACR,cAAc;AACZ,YAAMC,IAAU;AAAA,QACd,UAAU,EAAE,OAAO,YAAY,MAAM,mBAAiB;AAAA,QACtD,MAAM,EAAE,OAAO,QAAQ,MAAM;QAC7B,UAAU,EAAE,OAAO,YAAY,MAAM,mBAAiB;AAAA,QACtD,MAAM,EAAE,OAAO,QAAQ,MAAM;QAC7B,OAAO,EAAE,OAAO,SAAS,MAAM;QAC/B,SAAS,EAAE,OAAO,gBAAgB,MAAM,iBAAe;AAAA,QACvD,KAAK,EAAE,OAAO,OAAO,MAAM;QAC3B,OAAO,EAAE,OAAO,SAAS,MAAM;QAC/B,UAAU,EAAE,OAAO,YAAY,MAAM,kBAAgB;AAAA,QACrD,OAAO,EAAE,OAAO,SAAS,MAAM;QAC/B,OAAO,EAAE,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AAAA,QACxB,OAAKa,EAAA;AAAA,UAAuB,OAAAb,EAAK,QAAK,IAAOA,EAAK,KAAK,KAAA;AAAA;;MAK5Dc,EAAwD,QAAxDV,GAAwDW,EAApBf,EAAK,KAAK,GAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as f, u as C, a as S, b as g, w as T } from "./index-
|
|
1
|
+
import { _ as f, u as C, a as S, b as g, w as T } from "./index-CI0X7RCX.js";
|
|
2
2
|
import { mapState as F } from "pinia";
|
|
3
3
|
import y from "primevue/tooltip";
|
|
4
4
|
import { resolveDirective as b, openBlock as s, createElementBlock as o, Fragment as k, renderList as E, createElementVNode as a, normalizeClass as $, withDirectives as v, createTextVNode as w, toDisplayString as l, createCommentVNode as p, resolveComponent as h, createBlock as _ } from "vue";
|
|
@@ -358,4 +358,4 @@ const ce = /* @__PURE__ */ f(re, [["render", oe], ["__scopeId", "data-v-c02a615a
|
|
|
358
358
|
export {
|
|
359
359
|
ce as default
|
|
360
360
|
};
|
|
361
|
-
//# sourceMappingURL=FavoriteList-
|
|
361
|
+
//# sourceMappingURL=FavoriteList-BRVaj1HM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavoriteList-CxDxCNii.js","sources":["../src/components/dashboard/widgets/FavoriteFileList.vue","../src/components/dashboard/widgets/FavoriteFolderList.vue","../src/components/dashboard/widgets/FavoriteSiteList.vue","../src/components/dashboard/widgets/FavoriteList.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"file-grid-container\" v-if=\"favoriteFiles.length > 0\">\n <button\n v-for=\"file in favoriteFiles\"\n :key=\"file.id\"\n class=\"file-card\"\n @click=\"navigateTo(file)\"\n :aria-label=\"file.title || file.name\"\n >\n <div class=\"file-card-row\">\n <i\n :class=\"getIconClass(file.mimeType)\"\n class=\"file-icon\"\n aria-hidden=\"true\"\n ></i>\n <div class=\"file-info\">\n <div\n class=\"file-name\"\n v-tooltip.bottom=\"file.description || file.title || file.name\"\n >\n {{ file.title || file.name }}\n </div>\n <div v-if=\"file.title\" class=\"file-secondary-name\">\n {{ file.name }}\n </div>\n </div>\n </div>\n </button>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteFile\") }}</div>\n</template>\n\n<script>\nimport { useCollaboraStore } from \"@/stores/collabora\";\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteFileList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteFiles() {\n return this.favorites\n .map((fav) => fav.target.file)\n .filter((file) => file !== undefined && file !== null)\n .filter((file) => this.matchesSite(file))\n .sort((a, b) => a.name.localeCompare(b.name));\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.fileFavorites;\n })\n .catch((err) => {\n console.error(\"Error loading favorites:\", err);\n });\n },\n methods: {\n matchesSite(node) {\n if (!this.siteId) {\n return true;\n }\n const siteElement = node.path?.elements?.find(\n (el) => el.nodeType === \"st:site\",\n );\n return siteElement?.name === this.siteId;\n },\n getIconClass(mimeType) {\n if (!mimeType) {\n return \"ri-file-line\";\n }\n if (mimeType === \"application/pdf\") {\n return \"ri-file-pdf-line\";\n }\n if (\n mimeType.includes(\"word\") ||\n mimeType.includes(\"opendocument.text\") ||\n mimeType === \"application/rtf\"\n ) {\n return \"ri-file-word-line\";\n }\n if (mimeType.includes(\"excel\") || mimeType.includes(\"spreadsheet\")) {\n return \"ri-file-excel-line\";\n }\n if (\n mimeType.includes(\"powerpoint\") ||\n mimeType.includes(\"presentation\")\n ) {\n return \"ri-file-ppt-line\";\n }\n if (mimeType.startsWith(\"image/\")) {\n return \"ri-image-line\";\n }\n if (mimeType.startsWith(\"video/\")) {\n return \"ri-video-line\";\n }\n if (mimeType.startsWith(\"audio/\")) {\n return \"ri-music-line\";\n }\n if (\n mimeType.includes(\"zip\") ||\n mimeType.includes(\"tar\") ||\n mimeType.includes(\"compressed\")\n ) {\n return \"ri-file-zip-line\";\n }\n if (\n mimeType.startsWith(\"text/\") ||\n mimeType === \"application/json\" ||\n mimeType === \"application/xml\"\n ) {\n return \"ri-file-text-line\";\n }\n if (mimeType === \"message/rfc822\") {\n return \"ri-mail-line\";\n }\n return \"ri-file-line\";\n },\n navigateTo(file) {\n const collaboraStore = useCollaboraStore();\n let destinationName = \"\";\n if (\n file.mimeType === \"image/vnd.dxf\" ||\n file.mimeType === \"image/vnd.dwg\" ||\n file.mimeType === \"message/rfc822\"\n ) {\n destinationName = \"pdf\";\n } else if (file.mimeType.startsWith(\"image/\")) {\n destinationName = \"image\";\n } else if (file.mimeType.startsWith(\"video/\")) {\n destinationName = \"video\";\n } else if (\n file.mimeType.startsWith(\"text/x-markdown\") ||\n file.mimeType.startsWith(\"text/x-web-markdown\")\n ) {\n destinationName = \"md\";\n } else if (file.mimeType.startsWith(\"text/html\")) {\n destinationName = \"html\";\n } else if (file.mimeType.startsWith(\"text/plain\")) {\n destinationName = \"text\";\n } else if (file.mimeType === \"application/pdf\") {\n destinationName = \"pdf\";\n } else {\n if (collaboraStore.checkIfExists(file.mimeType, \"edit\")) {\n destinationName = \"edit\";\n }\n if (collaboraStore.checkIfExists(file.mimeType, \"view\")) {\n destinationName = \"view\";\n }\n if (collaboraStore.checkIfExists(file.mimeType, \"view_comment\")) {\n destinationName = \"view_comment\";\n }\n }\n if (this.urlResolver) {\n this.urlResolver(file);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/${destinationName}/${file.id}`,\n \"_blank\",\n );\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.file-grid-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n}\n\n.file-card {\n background-color: var(--p-content-background);\n padding: 1rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n transition:\n border-color 0.2s,\n box-shadow 0.2s;\n}\n\n.file-card:hover {\n border-color: var(--p-primary-color);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.file-card:focus-visible {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n}\n\n.file-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.file-icon {\n font-size: 1.5rem;\n color: var(--p-primary-color);\n flex-shrink: 0;\n}\n\n.file-info {\n min-width: 0;\n overflow: hidden;\n}\n\n.file-info > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.file-name {\n font-weight: 500;\n font-size: 0.875rem;\n}\n\n.file-secondary-name {\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin-top: 0.25rem;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"folder-grid-container\" v-if=\"favoriteFolders.length > 0\">\n <button\n v-for=\"folder in favoriteFolders\"\n :key=\"folder.id\"\n class=\"folder-card\"\n @click=\"navigateTo(folder)\"\n :aria-label=\"folder.name\"\n >\n <div class=\"folder-card-row\">\n <i class=\"ri-folder-line folder-icon\" aria-hidden=\"true\"></i>\n <div class=\"folder-info\">\n <div class=\"folder-name\" v-tooltip.bottom=\"folder.name\">\n {{ folder.name }}\n </div>\n </div>\n </div>\n </button>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteFolder\") }}</div>\n</template>\n\n<script>\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteFolderList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteFolders() {\n return this.favorites\n .map((fav) => fav.target.folder)\n .filter((folder) => folder !== undefined && folder !== null)\n .filter((folder) => this.matchesSite(folder))\n .sort((a, b) => a.name.localeCompare(b.name));\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.folderFavorites;\n })\n .catch((err) => {\n console.error(\"Error loading favorites:\", err);\n });\n },\n methods: {\n matchesSite(node) {\n if (!this.siteId) {\n return true;\n }\n const siteElement = node.path?.elements?.find(\n (el) => el.nodeType === \"st:site\",\n );\n return siteElement?.name === this.siteId;\n },\n navigateTo(folder) {\n if (this.urlResolver) {\n this.urlResolver(folder);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${folder.id}`,\n \"_blank\",\n );\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.folder-grid-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n}\n\n.folder-card {\n background-color: var(--p-content-background);\n padding: 1rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n transition:\n border-color 0.2s,\n box-shadow 0.2s;\n}\n\n.folder-card:hover {\n border-color: var(--p-primary-color);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.folder-card:focus-visible {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n}\n\n.folder-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.folder-icon {\n font-size: 1.5rem;\n color: var(--p-primary-color);\n flex-shrink: 0;\n}\n\n.folder-info {\n min-width: 0;\n overflow: hidden;\n}\n\n.folder-info > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.folder-name {\n font-weight: 500;\n font-size: 0.875rem;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"site-grid-container\" v-if=\"favoriteSites.length > 0\">\n <div v-for=\"site in favoriteSites\" :key=\"site.id\" class=\"site-card\">\n <div class=\"site-card-row\">\n <span\n class=\"visibility-dot\"\n :class=\"'visibility-dot--' + getVisibilitySeverity(site.visibility)\"\n :aria-label=\"getVisibilityLabel(site.visibility)\"\n v-tooltip.bottom=\"getVisibilityLabel(site.visibility)\"\n ></span>\n <div>\n <div\n class=\"site-title\"\n @click=\"goToSite(site)\"\n v-tooltip.bottom=\"site.title\"\n >\n {{ site.title }}\n </div>\n <div class=\"site-description\">\n {{ site.description || \"Aucune description\" }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteSite\") }}</div>\n</template>\n\n<script>\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteSiteList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n methods: {\n getSite(fav) {\n return fav.target.site;\n },\n goToSite(site) {\n if (this.urlResolver) {\n this.urlResolver(site);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/mes-espaces/${site.id}`,\n \"_blank\",\n );\n }\n },\n getVisibilityLabel(visibility) {\n switch (visibility) {\n case \"PUBLIC\":\n return \"Public\";\n case \"PRIVATE\":\n return \"Privé\";\n case \"MODERATED\":\n return \"Modéré\";\n default:\n return \"Inconnu\";\n }\n },\n getVisibilitySeverity(visibility) {\n switch (visibility) {\n case \"PUBLIC\":\n return \"success\"; // vert\n case \"PRIVATE\":\n return \"danger\"; // rouge\n case \"MODERATED\":\n return \"warning\"; // orange\n default:\n return \"info\";\n }\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.siteFavorites;\n })\n .catch((err) => {\n console.error(\"Erreur lors du chargement des favoris:\", err);\n });\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteSites() {\n // Parcours chaque favorite, récupère target.site si existant\n return this.favorites\n .map((fav) => this.getSite(fav))\n .filter((site) => site !== undefined && site !== null)\n .sort((a, b) => a.title.localeCompare(b.title));\n },\n },\n};\n</script>\n<style scoped>\n.site-grid-container {\n display: grid;\n gap: 0.5rem;\n grid-template-columns: 1fr;\n}\n\n.site-card {\n background-color: var(--p-content-background);\n padding: 0.5rem 0.75rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.site-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.site-title {\n display: flex;\n font-weight: 500;\n font-size: 0.875rem;\n cursor: pointer;\n}\n\n.site-description {\n display: flex;\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin-top: 0.25rem;\n}\n\n.visibility-dot {\n width: 0.75rem;\n height: 0.75rem;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.visibility-dot--success {\n background-color: var(--p-green-500);\n}\n\n.visibility-dot--danger {\n background-color: var(--p-red-500);\n}\n\n.visibility-dot--warning {\n background-color: var(--p-orange-500);\n}\n\n.visibility-dot--info {\n background-color: var(--p-blue-500);\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div>\n <p v-if=\"siteTitle\" class=\"site-title-label\">\n {{ siteTitle }}\n </p>\n <FavoriteFileList\n v-if=\"filter === 'file'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n />\n <FavoriteFolderList\n v-else-if=\"filter === 'folder'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n />\n <FavoriteSiteList\n v-else-if=\"filter === 'site'\"\n :url-resolver=\"urlResolver\"\n />\n </div>\n</template>\n\n<script>\nimport FavoriteFileList from \"@/components/dashboard/widgets/FavoriteFileList.vue\";\nimport FavoriteFolderList from \"@/components/dashboard/widgets/FavoriteFolderList.vue\";\nimport FavoriteSiteList from \"@/components/dashboard/widgets/FavoriteSiteList.vue\";\nimport workspaceService from \"@/services/WorkspaceService.js\";\n\nexport default {\n name: \"FavoriteList\",\n components: {\n FavoriteFileList,\n FavoriteFolderList,\n FavoriteSiteList,\n },\n props: {\n filter: {\n type: String,\n default: \"file\",\n validator: (value) => [\"file\", \"folder\", \"site\"].includes(value),\n },\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n siteTitle: \"\",\n };\n },\n watch: {\n siteId: {\n immediate: true,\n handler(newSiteId) {\n this.resolveSiteTitle(newSiteId);\n },\n },\n },\n methods: {\n resolveSiteTitle(siteId) {\n if (!siteId) {\n this.siteTitle = \"\";\n return;\n }\n workspaceService\n .getWorkspace(siteId)\n .then((site) => {\n this.siteTitle = site.title || site.id;\n })\n .catch(() => {\n this.siteTitle = siteId;\n });\n },\n },\n};\n</script>\n\n<style scoped>\n.site-title-label {\n margin-top: 0;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n color: var(--p-text-muted-color);\n}\n</style>\n"],"names":["_sfc_main","Tooltip","mapState","useConfigStore","fav","file","a","b","favoritesStore","useFavoritesStore","err","node","el","mimeType","collaboraStore","useCollaboraStore","destinationName","_hoisted_3","_hoisted_4","_hoisted_5","$options","_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","$event","_createElementVNode","_withDirectives","_createTextVNode","_toDisplayString","_hoisted_6","_ctx","folder","site","visibility","_hoisted_2","FavoriteFileList","FavoriteFolderList","FavoriteSiteList","value","newSiteId","siteId","workspaceService","$data","$props","_createBlock","_component_FavoriteFileList","_component_FavoriteFolderList","_component_FavoriteSiteList"],"mappings":";;;;AAwDA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,SAASC;AAAA;EAEX,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,WAAW,CAAA;AAAA;EAEf;AAAA,EACA,UAAU;AAAA,IACR,GAAGC,EAASC,GAAgB,CAAC,cAAc,CAAC;AAAA,IAC5C,gBAAgB;AACd,aAAO,KAAK,UACT,IAAI,CAACC,MAAQA,EAAI,OAAO,IAAI,EAC5B,OAAO,CAACC,MAA+BA,KAAS,IAAI,EACpD,OAAO,CAACA,MAAS,KAAK,YAAYA,CAAI,CAAC,EACvC,KAAK,CAACC,GAAGC,MAAMD,EAAE,KAAK,cAAcC,EAAE,IAAI,CAAC;AAAA,IAChD;AAAA;EAEF,UAAU;AACR,UAAMC,IAAiBC,EAAiB;AACxC,IAAAD,EACG,cAAa,EACb,KAAK,MAAM;AACV,WAAK,YAAYA,EAAe;AAAA,IAClC,CAAC,EACA,MAAM,CAACE,MAAQ;AACd,cAAQ,MAAM,4BAA4BA,CAAG;AAAA,IAC/C,CAAC;AAAA,EACL;AAAA,EACA,SAAS;AAAA,IACP,YAAYC,GAAM;AAChB,aAAK,KAAK,SAGUA,EAAK,MAAM,UAAU;AAAA,QACvC,CAACC,MAAOA,EAAG,aAAa;AAAA,SAEN,SAAS,KAAK,SALzB;AAAA,IAMX;AAAA,IACA,aAAaC,GAAU;AACrB,aAAKA,IAGDA,MAAa,oBACR,qBAGPA,EAAS,SAAS,MAAM,KACxBA,EAAS,SAAS,mBAA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FC,WAASH,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,gDAGJA,EAAA,WAAM,eADnBC,EAGEG,GAAA;AAAA;MADC,gBAAcJ,EAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"FavoriteList-BRVaj1HM.js","sources":["../src/components/dashboard/widgets/FavoriteFileList.vue","../src/components/dashboard/widgets/FavoriteFolderList.vue","../src/components/dashboard/widgets/FavoriteSiteList.vue","../src/components/dashboard/widgets/FavoriteList.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"file-grid-container\" v-if=\"favoriteFiles.length > 0\">\n <button\n v-for=\"file in favoriteFiles\"\n :key=\"file.id\"\n class=\"file-card\"\n @click=\"navigateTo(file)\"\n :aria-label=\"file.title || file.name\"\n >\n <div class=\"file-card-row\">\n <i\n :class=\"getIconClass(file.mimeType)\"\n class=\"file-icon\"\n aria-hidden=\"true\"\n ></i>\n <div class=\"file-info\">\n <div\n class=\"file-name\"\n v-tooltip.bottom=\"file.description || file.title || file.name\"\n >\n {{ file.title || file.name }}\n </div>\n <div v-if=\"file.title\" class=\"file-secondary-name\">\n {{ file.name }}\n </div>\n </div>\n </div>\n </button>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteFile\") }}</div>\n</template>\n\n<script>\nimport { useCollaboraStore } from \"@/stores/collabora\";\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteFileList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteFiles() {\n return this.favorites\n .map((fav) => fav.target.file)\n .filter((file) => file !== undefined && file !== null)\n .filter((file) => this.matchesSite(file))\n .sort((a, b) => a.name.localeCompare(b.name));\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.fileFavorites;\n })\n .catch((err) => {\n console.error(\"Error loading favorites:\", err);\n });\n },\n methods: {\n matchesSite(node) {\n if (!this.siteId) {\n return true;\n }\n const siteElement = node.path?.elements?.find(\n (el) => el.nodeType === \"st:site\",\n );\n return siteElement?.name === this.siteId;\n },\n getIconClass(mimeType) {\n if (!mimeType) {\n return \"ri-file-line\";\n }\n if (mimeType === \"application/pdf\") {\n return \"ri-file-pdf-line\";\n }\n if (\n mimeType.includes(\"word\") ||\n mimeType.includes(\"opendocument.text\") ||\n mimeType === \"application/rtf\"\n ) {\n return \"ri-file-word-line\";\n }\n if (mimeType.includes(\"excel\") || mimeType.includes(\"spreadsheet\")) {\n return \"ri-file-excel-line\";\n }\n if (\n mimeType.includes(\"powerpoint\") ||\n mimeType.includes(\"presentation\")\n ) {\n return \"ri-file-ppt-line\";\n }\n if (mimeType.startsWith(\"image/\")) {\n return \"ri-image-line\";\n }\n if (mimeType.startsWith(\"video/\")) {\n return \"ri-video-line\";\n }\n if (mimeType.startsWith(\"audio/\")) {\n return \"ri-music-line\";\n }\n if (\n mimeType.includes(\"zip\") ||\n mimeType.includes(\"tar\") ||\n mimeType.includes(\"compressed\")\n ) {\n return \"ri-file-zip-line\";\n }\n if (\n mimeType.startsWith(\"text/\") ||\n mimeType === \"application/json\" ||\n mimeType === \"application/xml\"\n ) {\n return \"ri-file-text-line\";\n }\n if (mimeType === \"message/rfc822\") {\n return \"ri-mail-line\";\n }\n return \"ri-file-line\";\n },\n navigateTo(file) {\n const collaboraStore = useCollaboraStore();\n let destinationName = \"\";\n if (\n file.mimeType === \"image/vnd.dxf\" ||\n file.mimeType === \"image/vnd.dwg\" ||\n file.mimeType === \"message/rfc822\"\n ) {\n destinationName = \"pdf\";\n } else if (file.mimeType.startsWith(\"image/\")) {\n destinationName = \"image\";\n } else if (file.mimeType.startsWith(\"video/\")) {\n destinationName = \"video\";\n } else if (\n file.mimeType.startsWith(\"text/x-markdown\") ||\n file.mimeType.startsWith(\"text/x-web-markdown\")\n ) {\n destinationName = \"md\";\n } else if (file.mimeType.startsWith(\"text/html\")) {\n destinationName = \"html\";\n } else if (file.mimeType.startsWith(\"text/plain\")) {\n destinationName = \"text\";\n } else if (file.mimeType === \"application/pdf\") {\n destinationName = \"pdf\";\n } else {\n if (collaboraStore.checkIfExists(file.mimeType, \"edit\")) {\n destinationName = \"edit\";\n }\n if (collaboraStore.checkIfExists(file.mimeType, \"view\")) {\n destinationName = \"view\";\n }\n if (collaboraStore.checkIfExists(file.mimeType, \"view_comment\")) {\n destinationName = \"view_comment\";\n }\n }\n if (this.urlResolver) {\n this.urlResolver(file);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/${destinationName}/${file.id}`,\n \"_blank\",\n );\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.file-grid-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n}\n\n.file-card {\n background-color: var(--p-content-background);\n padding: 1rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n transition:\n border-color 0.2s,\n box-shadow 0.2s;\n}\n\n.file-card:hover {\n border-color: var(--p-primary-color);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.file-card:focus-visible {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n}\n\n.file-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.file-icon {\n font-size: 1.5rem;\n color: var(--p-primary-color);\n flex-shrink: 0;\n}\n\n.file-info {\n min-width: 0;\n overflow: hidden;\n}\n\n.file-info > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.file-name {\n font-weight: 500;\n font-size: 0.875rem;\n}\n\n.file-secondary-name {\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin-top: 0.25rem;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"folder-grid-container\" v-if=\"favoriteFolders.length > 0\">\n <button\n v-for=\"folder in favoriteFolders\"\n :key=\"folder.id\"\n class=\"folder-card\"\n @click=\"navigateTo(folder)\"\n :aria-label=\"folder.name\"\n >\n <div class=\"folder-card-row\">\n <i class=\"ri-folder-line folder-icon\" aria-hidden=\"true\"></i>\n <div class=\"folder-info\">\n <div class=\"folder-name\" v-tooltip.bottom=\"folder.name\">\n {{ folder.name }}\n </div>\n </div>\n </div>\n </button>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteFolder\") }}</div>\n</template>\n\n<script>\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteFolderList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteFolders() {\n return this.favorites\n .map((fav) => fav.target.folder)\n .filter((folder) => folder !== undefined && folder !== null)\n .filter((folder) => this.matchesSite(folder))\n .sort((a, b) => a.name.localeCompare(b.name));\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.folderFavorites;\n })\n .catch((err) => {\n console.error(\"Error loading favorites:\", err);\n });\n },\n methods: {\n matchesSite(node) {\n if (!this.siteId) {\n return true;\n }\n const siteElement = node.path?.elements?.find(\n (el) => el.nodeType === \"st:site\",\n );\n return siteElement?.name === this.siteId;\n },\n navigateTo(folder) {\n if (this.urlResolver) {\n this.urlResolver(folder);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${folder.id}`,\n \"_blank\",\n );\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.folder-grid-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n}\n\n.folder-card {\n background-color: var(--p-content-background);\n padding: 1rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n transition:\n border-color 0.2s,\n box-shadow 0.2s;\n}\n\n.folder-card:hover {\n border-color: var(--p-primary-color);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.folder-card:focus-visible {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n}\n\n.folder-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.folder-icon {\n font-size: 1.5rem;\n color: var(--p-primary-color);\n flex-shrink: 0;\n}\n\n.folder-info {\n min-width: 0;\n overflow: hidden;\n}\n\n.folder-info > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.folder-name {\n font-weight: 500;\n font-size: 0.875rem;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"site-grid-container\" v-if=\"favoriteSites.length > 0\">\n <div v-for=\"site in favoriteSites\" :key=\"site.id\" class=\"site-card\">\n <div class=\"site-card-row\">\n <span\n class=\"visibility-dot\"\n :class=\"'visibility-dot--' + getVisibilitySeverity(site.visibility)\"\n :aria-label=\"getVisibilityLabel(site.visibility)\"\n v-tooltip.bottom=\"getVisibilityLabel(site.visibility)\"\n ></span>\n <div>\n <div\n class=\"site-title\"\n @click=\"goToSite(site)\"\n v-tooltip.bottom=\"site.title\"\n >\n {{ site.title }}\n </div>\n <div class=\"site-description\">\n {{ site.description || \"Aucune description\" }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteSite\") }}</div>\n</template>\n\n<script>\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteSiteList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n methods: {\n getSite(fav) {\n return fav.target.site;\n },\n goToSite(site) {\n if (this.urlResolver) {\n this.urlResolver(site);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/mes-espaces/${site.id}`,\n \"_blank\",\n );\n }\n },\n getVisibilityLabel(visibility) {\n switch (visibility) {\n case \"PUBLIC\":\n return \"Public\";\n case \"PRIVATE\":\n return \"Privé\";\n case \"MODERATED\":\n return \"Modéré\";\n default:\n return \"Inconnu\";\n }\n },\n getVisibilitySeverity(visibility) {\n switch (visibility) {\n case \"PUBLIC\":\n return \"success\"; // vert\n case \"PRIVATE\":\n return \"danger\"; // rouge\n case \"MODERATED\":\n return \"warning\"; // orange\n default:\n return \"info\";\n }\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.siteFavorites;\n })\n .catch((err) => {\n console.error(\"Erreur lors du chargement des favoris:\", err);\n });\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteSites() {\n // Parcours chaque favorite, récupère target.site si existant\n return this.favorites\n .map((fav) => this.getSite(fav))\n .filter((site) => site !== undefined && site !== null)\n .sort((a, b) => a.title.localeCompare(b.title));\n },\n },\n};\n</script>\n<style scoped>\n.site-grid-container {\n display: grid;\n gap: 0.5rem;\n grid-template-columns: 1fr;\n}\n\n.site-card {\n background-color: var(--p-content-background);\n padding: 0.5rem 0.75rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.site-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.site-title {\n display: flex;\n font-weight: 500;\n font-size: 0.875rem;\n cursor: pointer;\n}\n\n.site-description {\n display: flex;\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin-top: 0.25rem;\n}\n\n.visibility-dot {\n width: 0.75rem;\n height: 0.75rem;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.visibility-dot--success {\n background-color: var(--p-green-500);\n}\n\n.visibility-dot--danger {\n background-color: var(--p-red-500);\n}\n\n.visibility-dot--warning {\n background-color: var(--p-orange-500);\n}\n\n.visibility-dot--info {\n background-color: var(--p-blue-500);\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div>\n <p v-if=\"siteTitle\" class=\"site-title-label\">\n {{ siteTitle }}\n </p>\n <FavoriteFileList\n v-if=\"filter === 'file'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n />\n <FavoriteFolderList\n v-else-if=\"filter === 'folder'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n />\n <FavoriteSiteList\n v-else-if=\"filter === 'site'\"\n :url-resolver=\"urlResolver\"\n />\n </div>\n</template>\n\n<script>\nimport FavoriteFileList from \"@/components/dashboard/widgets/FavoriteFileList.vue\";\nimport FavoriteFolderList from \"@/components/dashboard/widgets/FavoriteFolderList.vue\";\nimport FavoriteSiteList from \"@/components/dashboard/widgets/FavoriteSiteList.vue\";\nimport workspaceService from \"@/services/WorkspaceService.js\";\n\nexport default {\n name: \"FavoriteList\",\n components: {\n FavoriteFileList,\n FavoriteFolderList,\n FavoriteSiteList,\n },\n props: {\n filter: {\n type: String,\n default: \"file\",\n validator: (value) => [\"file\", \"folder\", \"site\"].includes(value),\n },\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n siteTitle: \"\",\n };\n },\n watch: {\n siteId: {\n immediate: true,\n handler(newSiteId) {\n this.resolveSiteTitle(newSiteId);\n },\n },\n },\n methods: {\n resolveSiteTitle(siteId) {\n if (!siteId) {\n this.siteTitle = \"\";\n return;\n }\n workspaceService\n .getWorkspace(siteId)\n .then((site) => {\n this.siteTitle = site.title || site.id;\n })\n .catch(() => {\n this.siteTitle = siteId;\n });\n },\n },\n};\n</script>\n\n<style scoped>\n.site-title-label {\n margin-top: 0;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n color: var(--p-text-muted-color);\n}\n</style>\n"],"names":["_sfc_main","Tooltip","mapState","useConfigStore","fav","file","a","b","favoritesStore","useFavoritesStore","err","node","el","mimeType","collaboraStore","useCollaboraStore","destinationName","_hoisted_3","_hoisted_4","_hoisted_5","$options","_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","$event","_createElementVNode","_withDirectives","_createTextVNode","_toDisplayString","_hoisted_6","_ctx","folder","site","visibility","_hoisted_2","FavoriteFileList","FavoriteFolderList","FavoriteSiteList","value","newSiteId","siteId","workspaceService","$data","$props","_createBlock","_component_FavoriteFileList","_component_FavoriteFolderList","_component_FavoriteSiteList"],"mappings":";;;;AAwDA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,SAASC;AAAA;EAEX,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,WAAW,CAAA;AAAA;EAEf;AAAA,EACA,UAAU;AAAA,IACR,GAAGC,EAASC,GAAgB,CAAC,cAAc,CAAC;AAAA,IAC5C,gBAAgB;AACd,aAAO,KAAK,UACT,IAAI,CAACC,MAAQA,EAAI,OAAO,IAAI,EAC5B,OAAO,CAACC,MAA+BA,KAAS,IAAI,EACpD,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GAAW;AACjB,aAAK,iBAAiBA,CAAS;AAAA,MACjC;AAAA;;EAGJ,SAAS;AAAA,IACP,iBAAiBC,GAAQ;AACvB,UAAI,CAACA,GAAQ;AACX,aAAK,YAAY;AACjB;AAAA,MACF;AACA,MAAAC,EACG,aAAaD,CAAM,EACnB,KAAK,CAACR,MAAS;AACd,aAAK,YAAYA,EAAK,SAASA,EAAK;AAAA,MACtC,CAAC,EACA,MAAM,MAAM;AACX,aAAK,YAAYQ;AAAA,MACnB,CAAC;AAAA,IACL;AAAA;AAEJ;;EA7EwB,OAAM;;;;cAD5BpB,EAkBM,OAAA,MAAA;AAAA,IAjBKsB,EAAA,kBAATtB,EAEI,KAFJC,IAEIO,EADCc,EAAA,SAAS,GAAA,CAAA;IAGNC,EAAA,WAAM,eADdC,EAIEC,GAAA;AAAA;MAFC,WAASF,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,gDAGJA,EAAA,WAAM,iBADnBC,EAIEE,GAAA;AAAA;MAFC,WAASH,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,gDAGJA,EAAA,WAAM,eADnBC,EAGEG,GAAA;AAAA;MADC,gBAAcJ,EAAA;AAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as i, d } from "./index-
|
|
1
|
+
import { _ as i, d } from "./index-CI0X7RCX.js";
|
|
2
2
|
import { marked as o } from "marked";
|
|
3
3
|
import r from "dompurify";
|
|
4
4
|
import { openBlock as s, createElementBlock as m } from "vue";
|
|
@@ -53,4 +53,4 @@ const _ = /* @__PURE__ */ i(l, [["render", u]]);
|
|
|
53
53
|
export {
|
|
54
54
|
_ as default
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=MarkdownComponent-
|
|
56
|
+
//# sourceMappingURL=MarkdownComponent-CeGPGjnT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownComponent-
|
|
1
|
+
{"version":3,"file":"MarkdownComponent-CeGPGjnT.js","sources":["../src/components/dashboard/widgets/MarkdownComponent.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n<template>\n <div :id=\"`content-${uniqueId}`\"></div>\n</template>\n\n<script>\nimport alfrescoNodeService from \"@/services/AlfrescoNodeService.js\";\nimport { marked } from \"marked\";\nimport DOMPurify from \"dompurify\";\n\nexport default {\n name: \"MarkdownComponent\",\n props: {\n id: {\n type: String,\n default: null,\n },\n markdownContent: {\n type: String,\n default: null,\n },\n },\n data() {\n return {\n uniqueId: `markdown-${Math.random().toString(36).substr(2, 9)}`,\n };\n },\n mounted() {\n // Priority: id from Alfresco > inline markdown content > default sample\n if (this.id && this.id.trim()) {\n this.loadMarkdown();\n } else if (this.markdownContent && this.markdownContent.trim()) {\n this.loadInlineMarkdown();\n } else {\n this.loadSampleMarkDown();\n }\n },\n methods: {\n loadInlineMarkdown() {\n const element = document.getElementById(`content-${this.uniqueId}`);\n if (element && this.markdownContent) {\n element.innerHTML = DOMPurify.sanitize(\n marked.parse(this.markdownContent),\n );\n }\n },\n loadSampleMarkDown() {\n const sample = this.$t(\"dashboard.markdownSample\");\n const element = document.getElementById(`content-${this.uniqueId}`);\n if (element) {\n element.innerHTML = DOMPurify.sanitize(marked.parse(sample));\n }\n },\n async loadMarkdown() {\n try {\n const contentBlob = await alfrescoNodeService.getNodeContent(this.id);\n let rawMarkdown = await contentBlob.text();\n const element = document.getElementById(`content-${this.uniqueId}`);\n if (element) {\n element.innerHTML = DOMPurify.sanitize(marked.parse(rawMarkdown));\n }\n } catch (error) {\n console.error(\"Erreur lors du chargement du markdown:\", error);\n }\n },\n },\n};\n</script>\n<style scoped></style>\n"],"names":["_sfc_main","element","DOMPurify","marked","sample","rawMarkdown","alfrescoNodeService","error","_createElementBlock","$data"],"mappings":";;;;AAyBA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,IAAI;AAAA,MACF,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,UAAU,YAAY,KAAK,OAAM,EAAG,SAAS,EAAE,EAAE,OAAO,GAAG,CAAC,CAAC;AAAA;EAEjE;AAAA,EACA,UAAU;AAER,IAAI,KAAK,MAAM,KAAK,GAAG,KAAI,IACzB,KAAK,aAAY,IACR,KAAK,mBAAmB,KAAK,gBAAgB,SACtD,KAAK,mBAAkB,IAEvB,KAAK,mBAAkB;AAAA,EAE3B;AAAA,EACA,SAAS;AAAA,IACP,qBAAqB;AACnB,YAAMC,IAAU,SAAS,eAAe,WAAW,KAAK,QAAQ,EAAE;AAClE,MAAIA,KAAW,KAAK,oBAClBA,EAAQ,YAAYC,EAAU;AAAA,QAC5BC,EAAO,MAAM,KAAK,eAAe;AAAA;IAGvC;AAAA,IACA,qBAAqB;AACnB,YAAMC,IAAS,KAAK,GAAG,0BAA0B,GAC3CH,IAAU,SAAS,eAAe,WAAW,KAAK,QAAQ,EAAE;AAClE,MAAIA,MACFA,EAAQ,YAAYC,EAAU,SAASC,EAAO,MAAMC,CAAM,CAAC;AAAA,IAE/D;AAAA,IACA,MAAM,eAAe;AACnB,UAAI;AAEF,YAAIC,IAAc,OADE,MAAMC,EAAoB,eAAe,KAAK,EAAE,GAChC,KAAI;AACxC,cAAML,IAAU,SAAS,eAAe,WAAW,KAAK,QAAQ,EAAE;AAClE,QAAIA,MACFA,EAAQ,YAAYC,EAAU,SAASC,EAAO,MAAME,CAAW,CAAC;AAAA,MAEpE,SAASE,GAAO;AACd,gBAAQ,MAAM,0CAA0CA,CAAK;AAAA,MAC/D;AAAA,IACF;AAAA;AAEJ;;cAhEEC,EAAuC,OAAA;AAAA,IAAjC,eAAeC,EAAA,QAAQ;AAAA;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mapState as l } from "pinia";
|
|
2
|
-
import { _ as m, b as u } from "./index-
|
|
2
|
+
import { _ as m, b as u } from "./index-CI0X7RCX.js";
|
|
3
3
|
import h from "primevue/iconfield";
|
|
4
4
|
import I from "primevue/inputicon";
|
|
5
5
|
import d from "primevue/inputtext";
|
|
@@ -55,4 +55,4 @@ const K = /* @__PURE__ */ m(x, [["render", v], ["__scopeId", "data-v-5c1914e9"]]
|
|
|
55
55
|
export {
|
|
56
56
|
K as default
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=SearchInput
|
|
58
|
+
//# sourceMappingURL=SearchInput--mu28rxD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput
|
|
1
|
+
{"version":3,"file":"SearchInput--mu28rxD.js","sources":["../src/components/dashboard/widgets/SearchInput.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div>\n <PrimeIconField iconPosition=\"left\">\n <PrimeInputIcon class=\"ri-search-line\" />\n <PrimeInputText\n v-model=\"searchInput\"\n class=\"search-input\"\n ref=\"search\"\n type=\"text\"\n :placeholder=\"$t('search')\"\n @keyup.enter=\"search\"\n />\n </PrimeIconField>\n </div>\n</template>\n<script>\nimport { mapState } from \"pinia\";\nimport { useConfigStore } from \"@/stores/config\";\nimport IconField from \"primevue/iconfield\";\nimport InputIcon from \"primevue/inputicon\";\nimport InputText from \"primevue/inputtext\";\n\nexport default {\n name: \"SearchInput\",\n components: {\n PrimeIconField: IconField,\n PrimeInputIcon: InputIcon,\n PrimeInputText: InputText,\n },\n props: {\n searchResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n searchInput: \"\",\n };\n },\n methods: {\n search() {\n if (this.searchResolver) {\n this.searchResolver(this.searchInput);\n } else {\n window.location = `${this.ESPACES_HOST}/espaces/recherche?search=${this.searchInput}`;\n }\n },\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n },\n};\n</script>\n<style scoped>\n.search-input {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"names":["_sfc_main","IconField","InputIcon","InputText","mapState","useConfigStore","_createElementBlock","_createVNode","_component_PrimeIconField","_component_PrimeInputIcon","_component_PrimeInputText","$data","$event","_ctx","$options"],"mappings":";;;;;;AAuCA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,gBAAgBC;AAAA,IAChB,gBAAgBC;AAAA,IAChB,gBAAgBC;AAAA;EAElB,OAAO;AAAA,IACL,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,aAAa;AAAA;EAEjB;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AACP,MAAI,KAAK,iBACP,KAAK,eAAe,KAAK,WAAW,IAEpC,OAAO,WAAW,GAAG,KAAK,YAAY,6BAA6B,KAAK,WAAW;AAAA,IAEvF;AAAA;EAEF,UAAU;AAAA,IACR,GAAGC,EAASC,GAAgB,CAAC,cAAc,CAAC;AAAA;AAEhD;;;cAnDEC,EAYM,OAAA,MAAA;AAAA,IAXJC,EAUiBC,GAAA,EAVD,cAAa,OAAM,GAAA;AAAA,iBACjC,MAAyC;AAAA,QAAzCD,EAAyCE,GAAA,EAAzB,OAAM,iBAAgB,CAAA;AAAA,QACtCF,EAOEG,GAAA;AAAA,sBANSC,EAAA;AAAA,wDAAAA,EAAA,cAAWC;AAAA,UACpB,OAAM;AAAA,UACN,KAAI;AAAA,UACJ,MAAK;AAAA,UACJ,aAAaC,EAAA,GAAE,QAAA;AAAA,UACf,WAAaC,EAAA,QAAM,CAAA,OAAA,CAAA;AAAA;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as r, createElementBlock as p, createElementVNode as e, toDisplayString as s } from "vue";
|
|
2
|
-
import { _ as c } from "./index-
|
|
2
|
+
import { _ as c } from "./index-CI0X7RCX.js";
|
|
3
3
|
const l = {
|
|
4
4
|
name: "UnknownBlockType",
|
|
5
5
|
props: {
|
|
@@ -19,4 +19,4 @@ const m = /* @__PURE__ */ c(l, [["render", i], ["__scopeId", "data-v-067b7fb9"]]
|
|
|
19
19
|
export {
|
|
20
20
|
m as default
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=UnknownBlockType-
|
|
22
|
+
//# sourceMappingURL=UnknownBlockType-ErfhzhB9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnknownBlockType-
|
|
1
|
+
{"version":3,"file":"UnknownBlockType-ErfhzhB9.js","sources":["../src/components/dashboard/widgets/UnknownBlockType.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n<template>\n <div class=\"unknown-block\">\n <i class=\"ri-error-warning-line unknown-block-icon\"></i>\n <p>{{ $t(\"dashboard.unknownBlockType\", { type: type }) }}</p>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"UnknownBlockType\",\n props: {\n type: {\n type: String,\n required: true,\n },\n },\n};\n</script>\n\n<style scoped>\n.unknown-block {\n text-align: center;\n color: var(--p-text-muted-color);\n padding: 1rem;\n}\n\n.unknown-block-icon {\n font-size: 2.25rem;\n margin-bottom: 0.5rem;\n}\n</style>\n"],"names":["_sfc_main","_hoisted_1","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_ctx","$props"],"mappings":";;AAwBA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA;;AAGhB,GAfOC,IAAA,EAAA,OAAM,gBAAe;;AAA1B,SAAAC,EAAA,GAAAC,EAGM,OAHNF,GAGM;AAAA,oBAFJG,EAAwD,KAAA,EAArD,OAAM,2CAA0C,GAAA,MAAA,EAAA;AAAA,IACnDA,EAA6D,KAAA,MAAAC,EAAvDC,EAAA,GAAE,8BAAA,EAAA,MAAuCC,EAAA,KAAI,CAAA,CAAA,GAAA,CAAA;AAAA;;;"}
|