@pristy/pristy-libvue 2.21.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/{ActivityHistory-BGjkKWml.js → ActivityHistory-CSXt9uFw.js} +2 -2
  2. package/dist/{ActivityHistory-BGjkKWml.js.map → ActivityHistory-CSXt9uFw.js.map} +1 -1
  3. package/dist/{BookmarksComponent-DHIe0ttf.js → BookmarksComponent-DqfEIox4.js} +2 -2
  4. package/dist/{BookmarksComponent-DHIe0ttf.js.map → BookmarksComponent-DqfEIox4.js.map} +1 -1
  5. package/dist/{ChartWrapper-Zs8fU_KC.js → ChartWrapper-B7VmrsEX.js} +2 -2
  6. package/dist/{ChartWrapper-Zs8fU_KC.js.map → ChartWrapper-B7VmrsEX.js.map} +1 -1
  7. package/dist/{DisplayFileInDashboardComponent-VTGlXPxP.js → DisplayFileInDashboardComponent-BAdDKnJN.js} +3 -3
  8. package/dist/{DisplayFileInDashboardComponent-VTGlXPxP.js.map → DisplayFileInDashboardComponent-BAdDKnJN.js.map} +1 -1
  9. package/dist/{ExternalApps-B2alflcL.js → ExternalApps-CQZwIifu.js} +2 -2
  10. package/dist/{ExternalApps-B2alflcL.js.map → ExternalApps-CQZwIifu.js.map} +1 -1
  11. package/dist/{FavoriteList-CcY7AFMX.js → FavoriteList-CTY_2bWP.js} +2 -2
  12. package/dist/{FavoriteList-CcY7AFMX.js.map → FavoriteList-CTY_2bWP.js.map} +1 -1
  13. package/dist/{MarkdownComponent-LDoBl43h.js → MarkdownComponent-DWluCXX2.js} +2 -2
  14. package/dist/{MarkdownComponent-LDoBl43h.js.map → MarkdownComponent-DWluCXX2.js.map} +1 -1
  15. package/dist/{PDFComponent-BXyQNUhl.js → PDFComponent-DhmdtX95.js} +3 -3
  16. package/dist/{PDFComponent-BXyQNUhl.js.map → PDFComponent-DhmdtX95.js.map} +1 -1
  17. package/dist/{PdfConfigService-BKVsjC1W.js → PdfConfigService-huVsU23i.js} +2 -2
  18. package/dist/{PdfConfigService-BKVsjC1W.js.map → PdfConfigService-huVsU23i.js.map} +1 -1
  19. package/dist/{PdfToolsComponent-BC45mg3C.js → PdfToolsComponent-CXuz7xuL.js} +736 -731
  20. package/dist/PdfToolsComponent-CXuz7xuL.js.map +1 -0
  21. package/dist/PlanTreePdfService-Ck4hUN2b.js +76 -0
  22. package/dist/PlanTreePdfService-Ck4hUN2b.js.map +1 -0
  23. package/dist/{SearchInput-C3A2rG7G.js → SearchInput-57Z8q77p.js} +2 -2
  24. package/dist/{SearchInput-C3A2rG7G.js.map → SearchInput-57Z8q77p.js.map} +1 -1
  25. package/dist/{UnknownBlockType-CK5rOiTB.js → UnknownBlockType-BtnOApwP.js} +2 -2
  26. package/dist/{UnknownBlockType-CK5rOiTB.js.map → UnknownBlockType-BtnOApwP.js.map} +1 -1
  27. package/dist/{index-CPjFX5To.js → index-Coh4LtRJ.js} +14415 -11122
  28. package/dist/index-Coh4LtRJ.js.map +1 -0
  29. package/dist/pristy-libvue.css +1 -1
  30. package/dist/pristy-libvue.es.js +204 -185
  31. package/dist/pristy-libvue.umd.js +24 -23
  32. package/dist/pristy-libvue.umd.js.map +1 -1
  33. package/dist/src/AlfrescoApi.d.ts +2 -1
  34. package/dist/src/AlfrescoApi.d.ts.map +1 -1
  35. package/dist/src/components/FolderUpload.vue.d.ts +34 -1
  36. package/dist/src/components/FolderUpload.vue.d.ts.map +1 -1
  37. package/dist/src/components/IconPickerDialog.vue.d.ts +1 -1
  38. package/dist/src/components/IndexAwaitOverlay.vue.d.ts +12 -0
  39. package/dist/src/components/IndexAwaitOverlay.vue.d.ts.map +1 -0
  40. package/dist/src/components/TreeExplorer.vue.d.ts +6 -1
  41. package/dist/src/components/TreeExplorer.vue.d.ts.map +1 -1
  42. package/dist/src/components/UploadStatus.vue.d.ts +34 -1
  43. package/dist/src/components/UploadStatus.vue.d.ts.map +1 -1
  44. package/dist/src/components/classification/AdminClassificationPage.vue.d.ts +126 -1
  45. package/dist/src/components/classification/AdminClassificationPage.vue.d.ts.map +1 -1
  46. package/dist/src/components/classification/AiSuggestionsPanel.vue.d.ts +12 -0
  47. package/dist/src/components/classification/AiSuggestionsPanel.vue.d.ts.map +1 -0
  48. package/dist/src/components/classification/FieldForm.vue.d.ts +1 -0
  49. package/dist/src/components/classification/FieldForm.vue.d.ts.map +1 -1
  50. package/dist/src/components/classification/MetadataFormFields.vue.d.ts +42 -1
  51. package/dist/src/components/classification/MetadataFormFields.vue.d.ts.map +1 -1
  52. package/dist/src/components/classification/NatureForm.vue.d.ts +2 -0
  53. package/dist/src/components/classification/NatureForm.vue.d.ts.map +1 -1
  54. package/dist/src/components/classification/NatureSelector.vue.d.ts +11 -0
  55. package/dist/src/components/classification/NatureSelector.vue.d.ts.map +1 -1
  56. package/dist/src/components/classification/PlanInformationPanel.vue.d.ts +58 -0
  57. package/dist/src/components/classification/PlanInformationPanel.vue.d.ts.map +1 -0
  58. package/dist/src/components/classification/PlanSuggestInput.vue.d.ts +22 -0
  59. package/dist/src/components/classification/PlanSuggestInput.vue.d.ts.map +1 -0
  60. package/dist/src/components/classification/PlanTreePanel.vue.d.ts +47 -0
  61. package/dist/src/components/classification/PlanTreePanel.vue.d.ts.map +1 -0
  62. package/dist/src/components/classification/UploadPlanPopup.vue.d.ts +5 -1
  63. package/dist/src/components/classification/UploadPlanPopup.vue.d.ts.map +1 -1
  64. package/dist/src/components/dashboard/DashboardAdminPage.vue.d.ts +13 -8
  65. package/dist/src/components/dashboard/DashboardAdminPage.vue.d.ts.map +1 -1
  66. package/dist/src/components/dashboard/editor/BlockConfigEditor.vue.d.ts +7 -2
  67. package/dist/src/components/dashboard/editor/BlockConfigEditor.vue.d.ts.map +1 -1
  68. package/dist/src/components/dashboard/editor/DashboardEditor.vue.d.ts +13 -8
  69. package/dist/src/components/dashboard/editor/DashboardEditor.vue.d.ts.map +1 -1
  70. package/dist/src/components/dashboard/editor/block-configs/ExternalAppsConfig.vue.d.ts +1 -1
  71. package/dist/src/components/dashboard/editor/grid/BlockTypeSelector.vue.d.ts +1 -1
  72. package/dist/src/components/dashboard/editor/grid/GridBlock.vue.d.ts +2 -2
  73. package/dist/src/components/dashboard/editor/grid/GridEditor.vue.d.ts +5 -5
  74. package/dist/src/components/layouts/AppLayout.vue.d.ts +62 -1
  75. package/dist/src/components/layouts/AppLayout.vue.d.ts.map +1 -1
  76. package/dist/src/components/layouts/AppMobileLayout.vue.d.ts +61 -2
  77. package/dist/src/components/layouts/AppMobileLayout.vue.d.ts.map +1 -1
  78. package/dist/src/components/layouts/AppSidebar.vue.d.ts +1 -0
  79. package/dist/src/components/layouts/AppSubmenu.vue.d.ts +11 -0
  80. package/dist/src/components/layouts/AppSubmenu.vue.d.ts.map +1 -1
  81. package/dist/src/components/layouts/SidebarProfileSection.vue.d.ts.map +1 -1
  82. package/dist/src/components/navigation/ContentCompactTableView.vue.d.ts +20 -5
  83. package/dist/src/components/navigation/ContentGridView.vue.d.ts +13 -1
  84. package/dist/src/components/navigation/ContentGridView.vue.d.ts.map +1 -1
  85. package/dist/src/components/navigation/ContentListView.vue.d.ts.map +1 -1
  86. package/dist/src/components/navigation/ContentTableView.vue.d.ts +20 -5
  87. package/dist/src/components/navigation/DynamicContentView.vue.d.ts +82 -15
  88. package/dist/src/components/navigation/DynamicContentView.vue.d.ts.map +1 -1
  89. package/dist/src/components/navigation/PreviewPanel.vue.d.ts +2 -2
  90. package/dist/src/components/pdfTools/PdfToolsComponent.vue.d.ts +2 -0
  91. package/dist/src/components/pdfTools/PdfToolsComponent.vue.d.ts.map +1 -1
  92. package/dist/src/components/pdfTools/PdfToolsLoading.vue.d.ts +4 -0
  93. package/dist/src/components/pdfTools/PdfToolsLoading.vue.d.ts.map +1 -0
  94. package/dist/src/components/popup/CopyOrMovePopup.vue.d.ts +18 -3
  95. package/dist/src/components/popup/CopyOrMovePopup.vue.d.ts.map +1 -1
  96. package/dist/src/components/popup/ImportPopupWithWorker.vue.d.ts +69 -3
  97. package/dist/src/components/popup/ImportPopupWithWorker.vue.d.ts.map +1 -1
  98. package/dist/src/components/search/AdvancedSearchPanel.vue.d.ts +14 -5
  99. package/dist/src/components/search/AdvancedSearchPanel.vue.d.ts.map +1 -1
  100. package/dist/src/components/search/AdvancedViewPanel.vue.d.ts +14 -5
  101. package/dist/src/components/search/AdvancedViewPanel.vue.d.ts.map +1 -1
  102. package/dist/src/components/search/SaveViewPopup.vue.d.ts +4 -2
  103. package/dist/src/components/search/SaveViewPopup.vue.d.ts.map +1 -1
  104. package/dist/src/components/viewer/AudioPlayer.vue.d.ts +2 -2
  105. package/dist/src/components/viewer/lazyPdfComponents.d.ts +2 -0
  106. package/dist/src/components/viewer/lazyPdfComponents.d.ts.map +1 -1
  107. package/dist/src/components/views/PredefinedViewsPanel.vue.d.ts +1 -1
  108. package/dist/src/components/views/PredefinedViewsPanel.vue.d.ts.map +1 -1
  109. package/dist/src/components/workspace/WorkspaceCard.vue.d.ts +148 -1
  110. package/dist/src/components/workspace/WorkspaceCard.vue.d.ts.map +1 -1
  111. package/dist/src/components/workspace/WorkspaceList.vue.d.ts +94 -1
  112. package/dist/src/composables/useClassificationPlan.d.ts.map +1 -1
  113. package/dist/src/i18n/index.d.ts +252 -4
  114. package/dist/src/i18n/index.d.ts.map +1 -1
  115. package/dist/src/index.d.ts +8 -1
  116. package/dist/src/index.d.ts.map +1 -1
  117. package/dist/src/services/AiImportService.d.ts +125 -0
  118. package/dist/src/services/AiImportService.d.ts.map +1 -0
  119. package/dist/src/services/AiMetadataService.d.ts +81 -0
  120. package/dist/src/services/AiMetadataService.d.ts.map +1 -0
  121. package/dist/src/services/AlfrescoFileService.d.ts.map +1 -1
  122. package/dist/src/services/ClassificationFileService.d.ts +17 -2
  123. package/dist/src/services/ClassificationFileService.d.ts.map +1 -1
  124. package/dist/src/services/ClassificationService.d.ts +5 -0
  125. package/dist/src/services/ClassificationService.d.ts.map +1 -1
  126. package/dist/src/services/ErrorService.d.ts.map +1 -1
  127. package/dist/src/services/IconeService.d.ts.map +1 -1
  128. package/dist/src/services/IndexAwaitService.d.ts +61 -0
  129. package/dist/src/services/IndexAwaitService.d.ts.map +1 -0
  130. package/dist/src/services/NodeDragService.d.ts +93 -0
  131. package/dist/src/services/NodeDragService.d.ts.map +1 -0
  132. package/dist/src/services/PdfInsertService.d.ts +2 -0
  133. package/dist/src/services/PdfInsertService.d.ts.map +1 -0
  134. package/dist/src/services/PlanSuggestService.d.ts +29 -0
  135. package/dist/src/services/PlanSuggestService.d.ts.map +1 -0
  136. package/dist/src/services/PlanTreePdfService.d.ts +26 -0
  137. package/dist/src/services/PlanTreePdfService.d.ts.map +1 -0
  138. package/dist/src/services/WorkspaceService.d.ts +42 -0
  139. package/dist/src/services/WorkspaceService.d.ts.map +1 -1
  140. package/dist/src/stores/aiImport.d.ts +43 -0
  141. package/dist/src/stores/aiImport.d.ts.map +1 -0
  142. package/dist/src/stores/indexAwait.d.ts +83 -0
  143. package/dist/src/stores/indexAwait.d.ts.map +1 -0
  144. package/dist/src/stores/navigation.d.ts +12 -1
  145. package/dist/src/stores/navigation.d.ts.map +1 -1
  146. package/dist/src/stores/upload.d.ts +86 -4
  147. package/dist/src/stores/upload.d.ts.map +1 -1
  148. package/dist/src/stores/user.d.ts +23 -5
  149. package/dist/src/stores/user.d.ts.map +1 -1
  150. package/dist/src/utils/classificationPlanUtils.d.ts +44 -1
  151. package/dist/src/utils/classificationPlanUtils.d.ts.map +1 -1
  152. package/dist/src/utils/indexAwaitReducer.d.ts +56 -0
  153. package/dist/src/utils/indexAwaitReducer.d.ts.map +1 -0
  154. package/dist/src/utils/planTree.d.ts +35 -0
  155. package/dist/src/utils/planTree.d.ts.map +1 -0
  156. package/dist/src/utils/treeA11y.d.ts +17 -0
  157. package/dist/src/utils/treeA11y.d.ts.map +1 -0
  158. package/dist/src/utils/workspaceAppearance.d.ts +16 -0
  159. package/dist/src/utils/workspaceAppearance.d.ts.map +1 -0
  160. package/package.json +7 -7
  161. package/dist/PdfToolsComponent-BC45mg3C.js.map +0 -1
  162. package/dist/index-CPjFX5To.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { _ as y, g, h as b, f as w } from "./index-CPjFX5To.js";
1
+ import { _ as y, g, h as b, f as w } from "./index-Coh4LtRJ.js";
2
2
  import { mapState as _ } from "pinia";
3
3
  import H from "primevue/dataview";
4
4
  import T from "primevue/tooltip";
@@ -232,4 +232,4 @@ const W = /* @__PURE__ */ y(P, [["render", x], ["__scopeId", "data-v-e1e68fbb"]]
232
232
  export {
233
233
  W as default
234
234
  };
235
- //# sourceMappingURL=ActivityHistory-BGjkKWml.js.map
235
+ //# sourceMappingURL=ActivityHistory-CSXt9uFw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityHistory-BGjkKWml.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\" @click=\"onActivityClick\">\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 props: {\n urlResolver: {\n type: Function,\n default: null,\n },\n who: {\n type: String,\n default: null,\n validator: (value) => [\"me\", \"others\"].includes(value),\n },\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 watch: {\n who() {\n this.getActivity();\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 if (entry.activityType.includes(\"folder\")) {\n return `${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${summary.objectId}`;\n }\n return `${this.ESPACES_HOST}/espaces/${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 summary = entry.activitySummary || {};\n const objectId = summary.objectId;\n const escapedTitle = this.escapeHtml(title);\n let titleHtml;\n if (this.urlResolver && objectId) {\n const siteId = entry.siteId || \"\";\n titleHtml = `<a href=\"javascript:void(0)\" data-object-id=\"${this.escapeHtml(objectId)}\" data-site-id=\"${this.escapeHtml(siteId)}\" data-is-folder=\"${entry.activityType.includes(\"folder\")}\" class=\"activity-link\">${escapedTitle}</a>`;\n } else {\n const url = this.getObjectUrl(entry);\n titleHtml = url\n ? `<a href=\"${this.escapeHtml(url)}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"activity-link\">${escapedTitle}</a>`\n : `<strong>${escapedTitle}</strong>`;\n }\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 onActivityClick(event) {\n const link = event.target.closest(\".activity-link[data-object-id]\");\n if (!link || !this.urlResolver) {\n return;\n }\n event.preventDefault();\n const objectId = link.dataset.objectId;\n const siteId = link.dataset.siteId || \"\";\n const isFolder = link.dataset.isFolder === \"true\";\n this.urlResolver({\n id: objectId,\n siteId,\n isFolder,\n forceOverview: isFolder,\n });\n },\n getActivity() {\n const opts = this.who ? { who: this.who } : {};\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","value","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","objectId","escapedTitle","titleHtml","siteId","url","p","event","link","isFolder","opts","activitiesApi","data","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_6","_createElementBlock","$options","args","_createVNode","_component_PrimeDataView","$data","_ctx","_withCtx","slotProps","_createElementVNode","_openBlock","_Fragment","_renderList","group","_normalizeClass","_withDirectives","_hoisted_5","_toDisplayString"],"mappings":";;;;;AAyEA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,eAAeC;AAAA;EAEjB,YAAY;AAAA,IACV,SAASC;AAAA;EAEX,OAAO;AAAA,IACL,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,KAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAACC,MAAU,CAAC,MAAM,QAAQ,EAAE,SAASA,CAAK;AAAA;;EAGzD,OAAO;AACL,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,aAAa;AAA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A,QAAV,GAA2C;AAAA;;gBAM7CJ,EAAgE,QAAA;AAAA,kBAA1D,WAAkD,MAApCR,EAAA,uBAAuBY,EAAM,KAAK;AAAA;gBAC1CA,EAAM,QAAK,UAAvBb,EAEO,QAFPgB,GAAoD,UAC7CH,EAAM,QAAK,CAAA,IAAO,MACzB,CAAA;;cAEFJ,EAEI,KAFJV,GAEIkB,EADChB,EAAA,eAAeY,EAAM,MAAM,QAAQ,CAAA,GAAA,CAAA;AAAA;;;;;;;;;"}
1
+ {"version":3,"file":"ActivityHistory-CSXt9uFw.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\" @click=\"onActivityClick\">\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 props: {\n urlResolver: {\n type: Function,\n default: null,\n },\n who: {\n type: String,\n default: null,\n validator: (value) => [\"me\", \"others\"].includes(value),\n },\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 watch: {\n who() {\n this.getActivity();\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 if (entry.activityType.includes(\"folder\")) {\n return `${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${summary.objectId}`;\n }\n return `${this.ESPACES_HOST}/espaces/${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 summary = entry.activitySummary || {};\n const objectId = summary.objectId;\n const escapedTitle = this.escapeHtml(title);\n let titleHtml;\n if (this.urlResolver && objectId) {\n const siteId = entry.siteId || \"\";\n titleHtml = `<a href=\"javascript:void(0)\" data-object-id=\"${this.escapeHtml(objectId)}\" data-site-id=\"${this.escapeHtml(siteId)}\" data-is-folder=\"${entry.activityType.includes(\"folder\")}\" class=\"activity-link\">${escapedTitle}</a>`;\n } else {\n const url = this.getObjectUrl(entry);\n titleHtml = url\n ? `<a href=\"${this.escapeHtml(url)}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"activity-link\">${escapedTitle}</a>`\n : `<strong>${escapedTitle}</strong>`;\n }\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 onActivityClick(event) {\n const link = event.target.closest(\".activity-link[data-object-id]\");\n if (!link || !this.urlResolver) {\n return;\n }\n event.preventDefault();\n const objectId = link.dataset.objectId;\n const siteId = link.dataset.siteId || \"\";\n const isFolder = link.dataset.isFolder === \"true\";\n this.urlResolver({\n id: objectId,\n siteId,\n isFolder,\n forceOverview: isFolder,\n });\n },\n getActivity() {\n const opts = this.who ? { who: this.who } : {};\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","value","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","objectId","escapedTitle","titleHtml","siteId","url","p","event","link","isFolder","opts","activitiesApi","data","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_6","_createElementBlock","$options","args","_createVNode","_component_PrimeDataView","$data","_ctx","_withCtx","slotProps","_createElementVNode","_openBlock","_Fragment","_renderList","group","_normalizeClass","_withDirectives","_hoisted_5","_toDisplayString"],"mappings":";;;;;AAyEA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,eAAeC;AAAA;EAEjB,YAAY;AAAA,IACV,SAASC;AAAA;EAEX,OAAO;AAAA,IACL,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,KAAK;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAACC,MAAU,CAAC,MAAM,QAAQ,EAAE,SAASA,CAAK;AAAA;;EAGzD,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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,QAFPgB,GAAoD,UAC7CH,EAAM,QAAK,CAAA,IAAO,MACzB,CAAA;;cAEFJ,EAEI,KAFJV,GAEIkB,EADChB,EAAA,eAAeY,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-CPjFX5To.js";
2
+ import { _ } from "./index-Coh4LtRJ.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-DHIe0ttf.js.map
44
+ //# sourceMappingURL=BookmarksComponent-DqfEIox4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookmarksComponent-DHIe0ttf.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
+ {"version":3,"file":"BookmarksComponent-DqfEIox4.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-CPjFX5To.js";
3
+ import { _ as i } from "./index-Coh4LtRJ.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-Zs8fU_KC.js.map
59
+ //# sourceMappingURL=ChartWrapper-B7VmrsEX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChartWrapper-Zs8fU_KC.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
+ {"version":3,"file":"ChartWrapper-B7VmrsEX.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,8 +1,8 @@
1
- import { _ as l, b as m } from "./index-CPjFX5To.js";
1
+ import { _ as l, b as m } from "./index-Coh4LtRJ.js";
2
2
  import g from "primevue/image";
3
3
  import { resolveComponent as d, openBlock as t, createBlock as y, createCommentVNode as c, createElementBlock as s, createVNode as p, Fragment as h, renderList as D, createElementVNode as I, toDisplayString as P } from "vue";
4
4
  import { VuePDF as F, usePDF as k } from "@tato30/vue-pdf";
5
- import { b as v } from "./PdfConfigService-BKVsjC1W.js";
5
+ import { b as v } from "./PdfConfigService-huVsU23i.js";
6
6
  const C = {
7
7
  name: "OnlyImageDisplayed",
8
8
  components: {
@@ -102,4 +102,4 @@ const w = /* @__PURE__ */ l(S, [["render", N], ["__scopeId", "data-v-f3488bc8"]]
102
102
  export {
103
103
  w as default
104
104
  };
105
- //# sourceMappingURL=DisplayFileInDashboardComponent-VTGlXPxP.js.map
105
+ //# sourceMappingURL=DisplayFileInDashboardComponent-BAdDKnJN.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisplayFileInDashboardComponent-VTGlXPxP.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\";\nimport { buildPdfSource } from \"@/services/PdfConfigService.js\";\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(buildPdfSource(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","buildPdfSource","_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;;;SAnCoBC,EAAA,WAAlBC,EAAuEC,GAAA;AAAA;IAAhD,KAAKC,EAAA;AAAA,IAAY,YAAW;AAAA;;mFCqBhDN,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY,EAAE,QAAAO,GAAQ,oBAAAC;EACtB,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,IAAI;AAAA,MACF,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,KAAK;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OAAO;AAAA;EAEX;AAAA,EACA,UAAU;AACR,IAAI,KAAK,SAAS,SAChB,KAAK,QAAO;AAAA,EAEhB;AAAA,EACA,SAAS;AAAA,IACP,UAAU;AACR,UAAIC,IAAMP,EAAoB,cAAc,KAAK,EAAE;AACnD,UAAI,CAACO,GAAK;AACR,gBAAQ,MAAM,oBAAoB;AAClC;AAAA,MACF;AACA,YAAMC,IAAWC,EAAOC,EAAeH,CAAG,CAAC;AAC3C,WAAK,MAAMC,EAAS,KACpB,KAAK,QAAQA,EAAS;AAAA,IACxB;AAAA;AAEJ;;EAvDoB,OAAM;GAGZG,IAAA,EAAA,OAAM,iBAAgB;;;SAPvBV,EAAA,SAAI,gBAAfW,EAEM,OAAAC,GAAA;AAAA,IADJC,EAA+BC,GAAA,EAAV,IAAId,EAAA,GAAE,GAAA,MAAA,GAAA,CAAA,IAAA,CAAA;AAAA,QAEbA,EAAA,SAAI,cAApBW,EASM,OAAAI,GAAA;AAAA,IAROZ,EAAA,OAAXa,KAAAL,EAOM,OAPNM,GAOM;AAAA,cANJN,EAKMO,GAAA,MAAAC,EALchB,EAAA,OAAK,CAAbiB,YAAZT,EAKM,OAAA,EALsB,KAAKS,KAAI;AAAA,QACnCP,EAAsEQ,GAAA;AAAA,UAA7D,KAAKlB,EAAA;AAAA,UAAM,MAAMiB;AAAA,UAAO,UAAUjB,EAAA;AAAA,UAAW,OAAOA,EAAA;AAAA;QAC7DmB,EAEC,QAFDZ,GAECa,EADIC,KAAE,yBAAA,EAAA,MAAkCJ,UAAajB,EAAA,MAAK,CAAA,CAAA,GAAA,CAAA;AAAA;;;;;"}
1
+ {"version":3,"file":"DisplayFileInDashboardComponent-BAdDKnJN.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\";\nimport { buildPdfSource } from \"@/services/PdfConfigService.js\";\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(buildPdfSource(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","buildPdfSource","_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;A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OM,OAPNM,GAOM;AAAA,cANJN,EAKMO,GAAA,MAAAC,EALchB,EAAA,OAAK,CAAbiB,YAAZT,EAKM,OAAA,EALsB,KAAKS,KAAI;AAAA,QACnCP,EAAsEQ,GAAA;AAAA,UAA7D,KAAKlB,EAAA;AAAA,UAAM,MAAMiB;AAAA,UAAO,UAAUjB,EAAA;AAAA,UAAW,OAAOA,EAAA;AAAA;QAC7DmB,EAEC,QAFDZ,GAECa,EADIC,KAAE,yBAAA,EAAA,MAAkCJ,UAAajB,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-CPjFX5To.js";
2
+ import { _ as h } from "./index-Coh4LtRJ.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-B2alflcL.js.map
90
+ //# sourceMappingURL=ExternalApps-CQZwIifu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExternalApps-B2alflcL.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,E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AA,QACN,OAAM;AAAA,QACN,QAAO;AAAA,8BAITM,EAMK,KAAA;AAAA;QALF,OAAKM,EAAA,CAAEZ,EAAK,cAAcA,EAAK,MAC1B,mBAAmB,CAAA;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
+ {"version":3,"file":"ExternalApps-CQZwIifu.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,OAAO,eAAe,MAAM,qBAAmB;AAAA,QACxD,MAAM,EAAE,OAAO,QAAQ,MAAM;QAC7B,OAAO,EAAE,OAAO,SAAS,MAAM;;AAGjC,aAAO,KAAK,OAAO,IAAI,CAACC,MAAS;AAC/B,cAAMC,IAAUF,EAAQC,EAAK,IAAI,KAAK;AAAA,UACpC,OAAOA,EAAK;AAAA,UACZ,MAAM;AAAA;AAER,eAAO;AAAA,UACL,GAAGA;AAAA,UACH,OAAOA,EAAK,SAASC,EAAQ;AAAA,UAC7B,MAAMA,EAAQ;AAAA,UACd,YAAYD,EAAK;AAAA;AAAA,UACjB,OAAOA,EAAK;AAAA;AAAA;MAEhB,CAAC;AAAA,IACH;AAAA;EAEF,SAAS;AAAA,IACP,YAAYA,GAAM;AAChB,aAAO,KAAKA,EAAK,MAAM,QAAQ;AAAA,IACjC;AAAA,IACA,cAAcE,GAAM;AAIlB,aAAO,GAHK,IAAI;AAAA,QACdA,EAAK,WAAW,MAAM,IAAIA,IAAO,OAAO,SAAS,SAASA;AAAA,QAE9C,MAAM;AAAA,IACtB;AAAA;AAEJ,GAxFOC,IAAA,EAAA,OAAM,qBAAoB,iCAyBrBC,IAAA,EAAA,OAAM,qBAAoB;;AAzBpC,SAAAC,EAAA,GAAAC,EA2BM,OA3BNH,GA2BM;AAAA,YA1BJG,EAyBMC,GAAA,MAAAC,EAxBWC,EAAA,aAAW,CAAnBT,YADTM,EAyBM,OAAA;AAAA,MAvBH,KAAKN,EAAK;AAAA,MACX,OAAM;AAAA,MACL,SAAK,CAAAU,MAAED,EAAA,YAAYT,CAAI;AAAA;MAERW,EAAA,mBACdL,EAME,OAAA;AAAA;QALC,KAAKG,EAAA,cAAcT,EAAK,IAAI;AAAA,QAC7B,KAAI;AAAA,QACJ,OAAM;AAAA,QACN,OAAM;AAAA,QACN,QAAO;AAAA,8BAITM,EAMK,KAAA;AAAA;QALF,OAAKM,EAAA,CAAEZ,EAAK,cAAcA,EAAK,MAC1B,mBAAmB,CAAA;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, e as T, d as F, f as S, w as I } from "./index-CPjFX5To.js";
1
+ import { _ as f, e as T, d as F, f as S, w as I } from "./index-Coh4LtRJ.js";
2
2
  import { mapState as g } 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 C, withDirectives as v, createTextVNode as w, toDisplayString as n, createCommentVNode as p, resolveComponent as m, createBlock as _ } from "vue";
@@ -377,4 +377,4 @@ const ce = /* @__PURE__ */ f(re, [["render", oe], ["__scopeId", "data-v-c563ef74
377
377
  export {
378
378
  ce as default
379
379
  };
380
- //# sourceMappingURL=FavoriteList-CcY7AFMX.js.map
380
+ //# sourceMappingURL=FavoriteList-CTY_2bWP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FavoriteList-CcY7AFMX.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 favoriteFilter: {\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 .filter((fav) => !this.favoriteFilter || this.favoriteFilter(fav))\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 favoriteFilter: {\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 .filter((fav) => !this.favoriteFilter || this.favoriteFilter(fav))\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 favoriteFilter: {\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 .filter((fav) => !this.favoriteFilter || this.favoriteFilter(fav))\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 :favorite-filter=\"favoriteFilter\"\n />\n <FavoriteFolderList\n v-else-if=\"filter === 'folder'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n :favorite-filter=\"favoriteFilter\"\n />\n <FavoriteSiteList\n v-else-if=\"filter === 'site'\"\n :url-resolver=\"urlResolver\"\n :favorite-filter=\"favoriteFilter\"\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 favoriteFilter: {\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;IAEX,gBAAgB;AAAA,MACd,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,OAAO,CAACC,MAAQ,CAAC,KAAK,kBAAkB,KAAK,eAAeA,CAAG,CAAC,EAChE,IAAI,CAACA,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,K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AK,YAAYQ;AAAA,MACnB,CAAC;AAAA,IACL;AAAA;AAEJ;;EApFwB,OAAM;;;;cAD5BpB,EAqBM,OAAA,MAAA;AAAA,IApBKsB,EAAA,kBAATtB,EAEI,KAFJC,IAEIO,EADCc,EAAA,SAAS,GAAA,CAAA;IAGNC,EAAA,WAAM,eADdC,EAKEC,GAAA;AAAA;MAHC,WAASF,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,MACd,mBAAiBA,EAAA;AAAA,mEAGPA,EAAA,WAAM,iBADnBC,EAKEE,GAAA;AAAA;MAHC,WAASH,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,MACd,mBAAiBA,EAAA;AAAA,mEAGPA,EAAA,WAAM,eADnBC,EAIEG,GAAA;AAAA;MAFC,gBAAcJ,EAAA;AAAA,MACd,mBAAiBA,EAAA;AAAA;;;;"}
1
+ {"version":3,"file":"FavoriteList-CTY_2bWP.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 favoriteFilter: {\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 .filter((fav) => !this.favoriteFilter || this.favoriteFilter(fav))\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 favoriteFilter: {\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 .filter((fav) => !this.favoriteFilter || this.favoriteFilter(fav))\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 favoriteFilter: {\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 .filter((fav) => !this.favoriteFilter || this.favoriteFilter(fav))\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 :favorite-filter=\"favoriteFilter\"\n />\n <FavoriteFolderList\n v-else-if=\"filter === 'folder'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n :favorite-filter=\"favoriteFilter\"\n />\n <FavoriteSiteList\n v-else-if=\"filter === 'site'\"\n :url-resolver=\"urlResolver\"\n :favorite-filter=\"favoriteFilter\"\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 favoriteFilter: {\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;IAEX,gBAAgB;AAAA,MACd,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,OAAO,CAACC,MAAQ,CAAC,KAAK,kBAAkB,KAAK,eAAeA,CAAG,CAAC,EAChE,IAAI,CAACA,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,GAA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,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;;EApFwB,OAAM;;;;cAD5BpB,EAqBM,OAAA,MAAA;AAAA,IApBKsB,EAAA,kBAATtB,EAEI,KAFJC,IAEIO,EADCc,EAAA,SAAS,GAAA,CAAA;IAGNC,EAAA,WAAM,eADdC,EAKEC,GAAA;AAAA;MAHC,WAASF,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,MACd,mBAAiBA,EAAA;AAAA,mEAGPA,EAAA,WAAM,iBADnBC,EAKEE,GAAA;AAAA;MAHC,WAASH,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,MACd,mBAAiBA,EAAA;AAAA,mEAGPA,EAAA,WAAM,eADnBC,EAIEG,GAAA;AAAA;MAFC,gBAAcJ,EAAA;AAAA,MACd,mBAAiBA,EAAA;AAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import { _ as i, a as d } from "./index-CPjFX5To.js";
1
+ import { _ as i, a as d } from "./index-Coh4LtRJ.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-LDoBl43h.js.map
56
+ //# sourceMappingURL=MarkdownComponent-DWluCXX2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownComponent-LDoBl43h.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
+ {"version":3,"file":"MarkdownComponent-DWluCXX2.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,13 +1,13 @@
1
1
  import { VuePDF as J, usePDF as ee } from "@tato30/vue-pdf";
2
2
  /* empty css */
3
- import { b as te } from "./PdfConfigService-BKVsjC1W.js";
3
+ import { b as te } from "./PdfConfigService-huVsU23i.js";
4
4
  import { PDFDocument as R, PDFName as F, PDFDict as _, PDFArray as M, PDFHexString as B, PDFString as O } from "pdf-lib";
5
5
  import { fromBER as z } from "asn1js";
6
6
  import { ContentInfo as $, SignedData as W, TSTInfo as ie } from "pkijs";
7
7
  import { openBlock as l, createElementBlock as u, Fragment as b, createElementVNode as s, renderList as Z, toDisplayString as p, createVNode as c, unref as y, createTextVNode as E, createCommentVNode as m, resolveComponent as D, resolveDirective as oe, normalizeClass as U, createBlock as k, withDirectives as g, withCtx as N } from "vue";
8
8
  import { useI18n as ne } from "vue-i18n";
9
9
  import j from "primevue/tag";
10
- import { _ as G, u as ae } from "./index-CPjFX5To.js";
10
+ import { _ as G, u as ae } from "./index-Coh4LtRJ.js";
11
11
  import se from "primevue/tooltip";
12
12
  import re from "primevue/button";
13
13
  import le from "primevue/progressspinner";
@@ -984,4 +984,4 @@ const It = /* @__PURE__ */ G($e, [["render", dt], ["__scopeId", "data-v-a4d88fc2
984
984
  export {
985
985
  It as default
986
986
  };
987
- //# sourceMappingURL=PDFComponent-BXyQNUhl.js.map
987
+ //# sourceMappingURL=PDFComponent-DhmdtX95.js.map