@pristy/pristy-libvue 2.8.4 → 2.10.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.
- package/dist/ActivityHistory-hEggqvVi.js +197 -0
- package/dist/ActivityHistory-hEggqvVi.js.map +1 -0
- package/dist/BookmarksComponent-uxfOgWPU.js +44 -0
- package/dist/BookmarksComponent-uxfOgWPU.js.map +1 -0
- package/dist/ChartWrapper-mNaipbXn.js +59 -0
- package/dist/ChartWrapper-mNaipbXn.js.map +1 -0
- package/dist/DisplayFileInDashboardComponent-BL-ooE6T.js +104 -0
- package/dist/DisplayFileInDashboardComponent-BL-ooE6T.js.map +1 -0
- package/dist/ExternalApps-C24Qf4mq.js +90 -0
- package/dist/ExternalApps-C24Qf4mq.js.map +1 -0
- package/dist/FavoriteList-CxDxCNii.js +361 -0
- package/dist/FavoriteList-CxDxCNii.js.map +1 -0
- package/dist/MarkdownComponent-jHr71rfh.js +56 -0
- package/dist/MarkdownComponent-jHr71rfh.js.map +1 -0
- package/dist/SearchInput-DojcDnQU.js +58 -0
- package/dist/SearchInput-DojcDnQU.js.map +1 -0
- package/dist/UnknownBlockType-Pc9ihwij.js +22 -0
- package/dist/UnknownBlockType-Pc9ihwij.js.map +1 -0
- package/dist/index-DxH0-3Sq.js +38076 -0
- package/dist/index-DxH0-3Sq.js.map +1 -0
- package/dist/pristy-libvue.css +1 -1
- package/dist/pristy-libvue.es.js +197 -32609
- package/dist/pristy-libvue.es.js.map +1 -1
- package/dist/pristy-libvue.umd.js +112 -15
- package/dist/pristy-libvue.umd.js.map +1 -1
- package/dist/src/components/CodeMirrorBase.vue.d.ts +34 -0
- package/dist/src/components/CodeMirrorBase.vue.d.ts.map +1 -0
- package/dist/src/components/CodeMirrorEditor.vue.d.ts.map +1 -1
- package/dist/src/components/FolderUpload.vue.d.ts +6 -0
- package/dist/src/components/IconPickerDialog.vue.d.ts +63 -0
- package/dist/src/components/IconPickerDialog.vue.d.ts.map +1 -0
- package/dist/src/components/UploadStatus.vue.d.ts +6 -0
- package/dist/src/components/breadcrumb/ComplexBreadcrumb.vue.d.ts.map +1 -1
- package/dist/src/components/classification/AdminClassificationPage.vue.d.ts +32 -3
- package/dist/src/components/classification/AdminClassificationPage.vue.d.ts.map +1 -1
- package/dist/src/components/classification/EmplacementForm.vue.d.ts +7 -0
- package/dist/src/components/classification/EmplacementForm.vue.d.ts.map +1 -1
- package/dist/src/components/classification/MetadataFormFields.vue.d.ts +6 -2541
- package/dist/src/components/classification/NatureForm.vue.d.ts +7 -0
- package/dist/src/components/classification/NatureForm.vue.d.ts.map +1 -1
- package/dist/src/components/classification/NatureSelector.vue.d.ts +15 -2541
- package/dist/src/components/classification/UploadPlanPopup.vue.d.ts +2 -0
- package/dist/src/components/classification/UploadPlanPopup.vue.d.ts.map +1 -1
- package/dist/src/components/dashboard/DashboardAdminPage.vue.d.ts +2007 -0
- package/dist/src/components/dashboard/DashboardAdminPage.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/DashboardComponent.vue.d.ts +702 -0
- package/dist/src/components/dashboard/DashboardComponent.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/BlockConfigEditor.vue.d.ts +877 -0
- package/dist/src/components/dashboard/editor/BlockConfigEditor.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/DashboardEditor.vue.d.ts +1893 -0
- package/dist/src/components/dashboard/editor/DashboardEditor.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/FieldLabel.vue.d.ts +42 -0
- package/dist/src/components/dashboard/editor/FieldLabel.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/JsonEditorDialog.vue.d.ts +80 -0
- package/dist/src/components/dashboard/editor/JsonEditorDialog.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/MarkdownEditorDialog.vue.d.ts +77 -0
- package/dist/src/components/dashboard/editor/MarkdownEditorDialog.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/VersionHistoryDialog.vue.d.ts +53 -0
- package/dist/src/components/dashboard/editor/VersionHistoryDialog.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/block-configs/BookmarksConfig.vue.d.ts +61 -0
- package/dist/src/components/dashboard/editor/block-configs/BookmarksConfig.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/block-configs/ChartConfig.vue.d.ts +76 -0
- package/dist/src/components/dashboard/editor/block-configs/ChartConfig.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/block-configs/ExternalAppsConfig.vue.d.ts +221 -0
- package/dist/src/components/dashboard/editor/block-configs/ExternalAppsConfig.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/block-configs/FavoritesConfig.vue.d.ts +76 -0
- package/dist/src/components/dashboard/editor/block-configs/FavoritesConfig.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/block-configs/MarkdownConfig.vue.d.ts +72 -0
- package/dist/src/components/dashboard/editor/block-configs/MarkdownConfig.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/block-configs/NoConfig.vue.d.ts +4 -0
- package/dist/src/components/dashboard/editor/block-configs/NoConfig.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/block-configs/PdfImageConfig.vue.d.ts +60 -0
- package/dist/src/components/dashboard/editor/block-configs/PdfImageConfig.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/grid/BasketPanel.vue.d.ts +38 -0
- package/dist/src/components/dashboard/editor/grid/BasketPanel.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/grid/BlockTypeSelector.vue.d.ts +36 -0
- package/dist/src/components/dashboard/editor/grid/BlockTypeSelector.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/grid/GridBlock.vue.d.ts +73 -0
- package/dist/src/components/dashboard/editor/grid/GridBlock.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/grid/GridEditor.vue.d.ts +141 -0
- package/dist/src/components/dashboard/editor/grid/GridEditor.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/grid/MinimapPanel.vue.d.ts +44 -0
- package/dist/src/components/dashboard/editor/grid/MinimapPanel.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/editor/validators.d.ts +24 -0
- package/dist/src/components/dashboard/editor/validators.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/ActivityHistory.vue.d.ts +32 -0
- package/dist/src/components/dashboard/widgets/ActivityHistory.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/BookmarksComponent.vue.d.ts +27 -0
- package/dist/src/components/dashboard/widgets/BookmarksComponent.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/ChartWrapper.vue.d.ts +41 -0
- package/dist/src/components/dashboard/widgets/ChartWrapper.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/DisplayFileInDashboardComponent.vue.d.ts +337 -0
- package/dist/src/components/dashboard/widgets/DisplayFileInDashboardComponent.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/ExternalApps.vue.d.ts +32 -0
- package/dist/src/components/dashboard/widgets/ExternalApps.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/FavoriteFileList.vue.d.ts +36 -0
- package/dist/src/components/dashboard/widgets/FavoriteFileList.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/FavoriteFolderList.vue.d.ts +35 -0
- package/dist/src/components/dashboard/widgets/FavoriteFolderList.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/FavoriteList.vue.d.ts +131 -0
- package/dist/src/components/dashboard/widgets/FavoriteList.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/FavoriteSiteList.vue.d.ts +28 -0
- package/dist/src/components/dashboard/widgets/FavoriteSiteList.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/MarkdownComponent.vue.d.ts +31 -0
- package/dist/src/components/dashboard/widgets/MarkdownComponent.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/OnlyImageDisplayed.vue.d.ts +26 -0
- package/dist/src/components/dashboard/widgets/OnlyImageDisplayed.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/SearchInput.vue.d.ts +30 -0
- package/dist/src/components/dashboard/widgets/SearchInput.vue.d.ts.map +1 -0
- package/dist/src/components/dashboard/widgets/UnknownBlockType.vue.d.ts +14 -0
- package/dist/src/components/dashboard/widgets/UnknownBlockType.vue.d.ts.map +1 -0
- package/dist/src/components/layouts/AppLayout.vue.d.ts +2 -2
- package/dist/src/components/layouts/AppLayout.vue.d.ts.map +1 -1
- package/dist/src/components/layouts/AppTopbar.vue.d.ts +1 -1
- package/dist/src/components/navigation/ContentCompactTableView.vue.d.ts.map +1 -1
- package/dist/src/components/navigation/ContentTableView.vue.d.ts.map +1 -1
- package/dist/src/components/navigation/DynamicContentView.vue.d.ts +41 -0
- package/dist/src/components/navigation/DynamicContentView.vue.d.ts.map +1 -1
- package/dist/src/components/navigation/GhostNodeRow.vue.d.ts +34 -0
- package/dist/src/components/navigation/GhostNodeRow.vue.d.ts.map +1 -0
- package/dist/src/components/popup/ImportPopupWithWorker.vue.d.ts +12 -0
- package/dist/src/components/toast/CustomToastContent.vue.d.ts +1 -1
- package/dist/src/components/views/PredefinedViewsPanel.vue.d.ts.map +1 -1
- package/dist/src/components/workspace/WorkspaceList.vue.d.ts +1 -1
- package/dist/src/composables/useDragDrop.d.ts +17 -0
- package/dist/src/composables/useDragDrop.d.ts.map +1 -0
- package/dist/src/composables/useGhostNodes.d.ts +20 -0
- package/dist/src/composables/useGhostNodes.d.ts.map +1 -0
- package/dist/src/composables/useGridValidation.d.ts +12 -0
- package/dist/src/composables/useGridValidation.d.ts.map +1 -0
- package/dist/src/composables/useResize.d.ts +13 -0
- package/dist/src/composables/useResize.d.ts.map +1 -0
- package/dist/src/i18n/index.d.ts +564 -0
- package/dist/src/i18n/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +13 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/services/DashboardService.d.ts +77 -0
- package/dist/src/services/DashboardService.d.ts.map +1 -0
- package/dist/src/services/GhostMatcher.d.ts +40 -0
- package/dist/src/services/GhostMatcher.d.ts.map +1 -0
- package/dist/src/stores/config.d.ts +12 -3
- package/dist/src/stores/config.d.ts.map +1 -1
- package/dist/src/stores/upload.d.ts +19 -0
- package/dist/src/stores/upload.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { _ as f, u as C, a as S, b as g, w as T } from "./index-DxH0-3Sq.js";
|
|
2
|
+
import { mapState as F } from "pinia";
|
|
3
|
+
import y from "primevue/tooltip";
|
|
4
|
+
import { resolveDirective as b, openBlock as s, createElementBlock as o, Fragment as k, renderList as E, createElementVNode as a, normalizeClass as $, withDirectives as v, createTextVNode as w, toDisplayString as l, createCommentVNode as p, resolveComponent as h, createBlock as _ } from "vue";
|
|
5
|
+
const I = {
|
|
6
|
+
name: "FavoriteFileList",
|
|
7
|
+
directives: {
|
|
8
|
+
tooltip: y
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
siteId: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ""
|
|
14
|
+
},
|
|
15
|
+
urlResolver: {
|
|
16
|
+
type: Function,
|
|
17
|
+
default: null
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
favorites: []
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
...F(g, ["ESPACES_HOST"]),
|
|
27
|
+
favoriteFiles() {
|
|
28
|
+
return this.favorites.map((e) => e.target.file).filter((e) => e != null).filter((e) => this.matchesSite(e)).sort((e, r) => e.name.localeCompare(r.name));
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
mounted() {
|
|
32
|
+
const e = S();
|
|
33
|
+
e.loadFavorites().then(() => {
|
|
34
|
+
this.favorites = e.fileFavorites;
|
|
35
|
+
}).catch((r) => {
|
|
36
|
+
console.error("Error loading favorites:", r);
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
matchesSite(e) {
|
|
41
|
+
return this.siteId ? e.path?.elements?.find(
|
|
42
|
+
(i) => i.nodeType === "st:site"
|
|
43
|
+
)?.name === this.siteId : !0;
|
|
44
|
+
},
|
|
45
|
+
getIconClass(e) {
|
|
46
|
+
return e ? e === "application/pdf" ? "ri-file-pdf-line" : e.includes("word") || e.includes("opendocument.text") || e === "application/rtf" ? "ri-file-word-line" : e.includes("excel") || e.includes("spreadsheet") ? "ri-file-excel-line" : e.includes("powerpoint") || e.includes("presentation") ? "ri-file-ppt-line" : e.startsWith("image/") ? "ri-image-line" : e.startsWith("video/") ? "ri-video-line" : e.startsWith("audio/") ? "ri-music-line" : e.includes("zip") || e.includes("tar") || e.includes("compressed") ? "ri-file-zip-line" : e.startsWith("text/") || e === "application/json" || e === "application/xml" ? "ri-file-text-line" : e === "message/rfc822" ? "ri-mail-line" : "ri-file-line" : "ri-file-line";
|
|
47
|
+
},
|
|
48
|
+
navigateTo(e) {
|
|
49
|
+
const r = C();
|
|
50
|
+
let i = "";
|
|
51
|
+
e.mimeType === "image/vnd.dxf" || e.mimeType === "image/vnd.dwg" || e.mimeType === "message/rfc822" ? i = "pdf" : e.mimeType.startsWith("image/") ? i = "image" : e.mimeType.startsWith("video/") ? i = "video" : e.mimeType.startsWith("text/x-markdown") || e.mimeType.startsWith("text/x-web-markdown") ? i = "md" : e.mimeType.startsWith("text/html") ? i = "html" : e.mimeType.startsWith("text/plain") ? i = "text" : e.mimeType === "application/pdf" ? i = "pdf" : (r.checkIfExists(e.mimeType, "edit") && (i = "edit"), r.checkIfExists(e.mimeType, "view") && (i = "view"), r.checkIfExists(e.mimeType, "view_comment") && (i = "view_comment")), this.urlResolver ? this.urlResolver(e) : window.open(
|
|
52
|
+
`${this.ESPACES_HOST}/espaces/${i}/${e.id}`,
|
|
53
|
+
"_blank"
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, x = {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: "file-grid-container"
|
|
60
|
+
}, L = ["onClick", "aria-label"], R = { class: "file-card-row" }, P = { class: "file-info" }, A = { class: "file-name" }, W = {
|
|
61
|
+
key: 0,
|
|
62
|
+
class: "file-secondary-name"
|
|
63
|
+
}, V = { key: 1 };
|
|
64
|
+
function O(e, r, i, m, c, n) {
|
|
65
|
+
const d = b("tooltip");
|
|
66
|
+
return n.favoriteFiles.length > 0 ? (s(), o("div", x, [
|
|
67
|
+
(s(!0), o(k, null, E(n.favoriteFiles, (t) => (s(), o("button", {
|
|
68
|
+
key: t.id,
|
|
69
|
+
class: "file-card",
|
|
70
|
+
onClick: (u) => n.navigateTo(t),
|
|
71
|
+
"aria-label": t.title || t.name
|
|
72
|
+
}, [
|
|
73
|
+
a("div", R, [
|
|
74
|
+
a("i", {
|
|
75
|
+
class: $([n.getIconClass(t.mimeType), "file-icon"]),
|
|
76
|
+
"aria-hidden": "true"
|
|
77
|
+
}, null, 2),
|
|
78
|
+
a("div", P, [
|
|
79
|
+
v((s(), o("div", A, [
|
|
80
|
+
w(l(t.title || t.name), 1)
|
|
81
|
+
])), [
|
|
82
|
+
[
|
|
83
|
+
d,
|
|
84
|
+
t.description || t.title || t.name,
|
|
85
|
+
void 0,
|
|
86
|
+
{ bottom: !0 }
|
|
87
|
+
]
|
|
88
|
+
]),
|
|
89
|
+
t.title ? (s(), o("div", W, l(t.name), 1)) : p("", !0)
|
|
90
|
+
])
|
|
91
|
+
])
|
|
92
|
+
], 8, L))), 128))
|
|
93
|
+
])) : (s(), o("div", V, l(e.$t("emptyFavoriteFile")), 1));
|
|
94
|
+
}
|
|
95
|
+
const D = /* @__PURE__ */ f(I, [["render", O], ["__scopeId", "data-v-3d75be70"]]), H = {
|
|
96
|
+
name: "FavoriteFolderList",
|
|
97
|
+
directives: {
|
|
98
|
+
tooltip: y
|
|
99
|
+
},
|
|
100
|
+
props: {
|
|
101
|
+
siteId: {
|
|
102
|
+
type: String,
|
|
103
|
+
default: ""
|
|
104
|
+
},
|
|
105
|
+
urlResolver: {
|
|
106
|
+
type: Function,
|
|
107
|
+
default: null
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
data() {
|
|
111
|
+
return {
|
|
112
|
+
favorites: []
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
computed: {
|
|
116
|
+
...F(g, ["ESPACES_HOST"]),
|
|
117
|
+
favoriteFolders() {
|
|
118
|
+
return this.favorites.map((e) => e.target.folder).filter((e) => e != null).filter((e) => this.matchesSite(e)).sort((e, r) => e.name.localeCompare(r.name));
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
mounted() {
|
|
122
|
+
const e = S();
|
|
123
|
+
e.loadFavorites().then(() => {
|
|
124
|
+
this.favorites = e.folderFavorites;
|
|
125
|
+
}).catch((r) => {
|
|
126
|
+
console.error("Error loading favorites:", r);
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
methods: {
|
|
130
|
+
matchesSite(e) {
|
|
131
|
+
return this.siteId ? e.path?.elements?.find(
|
|
132
|
+
(i) => i.nodeType === "st:site"
|
|
133
|
+
)?.name === this.siteId : !0;
|
|
134
|
+
},
|
|
135
|
+
navigateTo(e) {
|
|
136
|
+
this.urlResolver ? this.urlResolver(e) : window.open(
|
|
137
|
+
`${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${e.id}`,
|
|
138
|
+
"_blank"
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}, B = {
|
|
143
|
+
key: 0,
|
|
144
|
+
class: "folder-grid-container"
|
|
145
|
+
}, N = ["onClick", "aria-label"], z = { class: "folder-card-row" }, M = { class: "folder-info" }, U = { class: "folder-name" }, j = { key: 1 };
|
|
146
|
+
function q(e, r, i, m, c, n) {
|
|
147
|
+
const d = b("tooltip");
|
|
148
|
+
return n.favoriteFolders.length > 0 ? (s(), o("div", B, [
|
|
149
|
+
(s(!0), o(k, null, E(n.favoriteFolders, (t) => (s(), o("button", {
|
|
150
|
+
key: t.id,
|
|
151
|
+
class: "folder-card",
|
|
152
|
+
onClick: (u) => n.navigateTo(t),
|
|
153
|
+
"aria-label": t.name
|
|
154
|
+
}, [
|
|
155
|
+
a("div", z, [
|
|
156
|
+
r[0] || (r[0] = a("i", {
|
|
157
|
+
class: "ri-folder-line folder-icon",
|
|
158
|
+
"aria-hidden": "true"
|
|
159
|
+
}, null, -1)),
|
|
160
|
+
a("div", M, [
|
|
161
|
+
v((s(), o("div", U, [
|
|
162
|
+
w(l(t.name), 1)
|
|
163
|
+
])), [
|
|
164
|
+
[
|
|
165
|
+
d,
|
|
166
|
+
t.name,
|
|
167
|
+
void 0,
|
|
168
|
+
{ bottom: !0 }
|
|
169
|
+
]
|
|
170
|
+
])
|
|
171
|
+
])
|
|
172
|
+
])
|
|
173
|
+
], 8, N))), 128))
|
|
174
|
+
])) : (s(), o("div", j, l(e.$t("emptyFavoriteFolder")), 1));
|
|
175
|
+
}
|
|
176
|
+
const G = /* @__PURE__ */ f(H, [["render", q], ["__scopeId", "data-v-c3b23970"]]), J = {
|
|
177
|
+
name: "FavoriteSiteList",
|
|
178
|
+
directives: {
|
|
179
|
+
tooltip: y
|
|
180
|
+
},
|
|
181
|
+
props: {
|
|
182
|
+
urlResolver: {
|
|
183
|
+
type: Function,
|
|
184
|
+
default: null
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
data() {
|
|
188
|
+
return {
|
|
189
|
+
favorites: []
|
|
190
|
+
};
|
|
191
|
+
},
|
|
192
|
+
methods: {
|
|
193
|
+
getSite(e) {
|
|
194
|
+
return e.target.site;
|
|
195
|
+
},
|
|
196
|
+
goToSite(e) {
|
|
197
|
+
this.urlResolver ? this.urlResolver(e) : window.open(
|
|
198
|
+
`${this.ESPACES_HOST}/espaces/mes-espaces/${e.id}`,
|
|
199
|
+
"_blank"
|
|
200
|
+
);
|
|
201
|
+
},
|
|
202
|
+
getVisibilityLabel(e) {
|
|
203
|
+
switch (e) {
|
|
204
|
+
case "PUBLIC":
|
|
205
|
+
return "Public";
|
|
206
|
+
case "PRIVATE":
|
|
207
|
+
return "Privé";
|
|
208
|
+
case "MODERATED":
|
|
209
|
+
return "Modéré";
|
|
210
|
+
default:
|
|
211
|
+
return "Inconnu";
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
getVisibilitySeverity(e) {
|
|
215
|
+
switch (e) {
|
|
216
|
+
case "PUBLIC":
|
|
217
|
+
return "success";
|
|
218
|
+
// vert
|
|
219
|
+
case "PRIVATE":
|
|
220
|
+
return "danger";
|
|
221
|
+
// rouge
|
|
222
|
+
case "MODERATED":
|
|
223
|
+
return "warning";
|
|
224
|
+
// orange
|
|
225
|
+
default:
|
|
226
|
+
return "info";
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
mounted() {
|
|
231
|
+
const e = S();
|
|
232
|
+
e.loadFavorites().then(() => {
|
|
233
|
+
this.favorites = e.siteFavorites;
|
|
234
|
+
}).catch((r) => {
|
|
235
|
+
console.error("Erreur lors du chargement des favoris:", r);
|
|
236
|
+
});
|
|
237
|
+
},
|
|
238
|
+
computed: {
|
|
239
|
+
...F(g, ["ESPACES_HOST"]),
|
|
240
|
+
favoriteSites() {
|
|
241
|
+
return this.favorites.map((e) => this.getSite(e)).filter((e) => e != null).sort((e, r) => e.title.localeCompare(r.title));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}, K = {
|
|
245
|
+
key: 0,
|
|
246
|
+
class: "site-grid-container"
|
|
247
|
+
}, Q = { class: "site-card-row" }, X = ["aria-label"], Y = ["onClick"], Z = { class: "site-description" }, ee = { key: 1 };
|
|
248
|
+
function te(e, r, i, m, c, n) {
|
|
249
|
+
const d = b("tooltip");
|
|
250
|
+
return n.favoriteSites.length > 0 ? (s(), o("div", K, [
|
|
251
|
+
(s(!0), o(k, null, E(n.favoriteSites, (t) => (s(), o("div", {
|
|
252
|
+
key: t.id,
|
|
253
|
+
class: "site-card"
|
|
254
|
+
}, [
|
|
255
|
+
a("div", Q, [
|
|
256
|
+
v(a("span", {
|
|
257
|
+
class: $(["visibility-dot", "visibility-dot--" + n.getVisibilitySeverity(t.visibility)]),
|
|
258
|
+
"aria-label": n.getVisibilityLabel(t.visibility)
|
|
259
|
+
}, null, 10, X), [
|
|
260
|
+
[
|
|
261
|
+
d,
|
|
262
|
+
n.getVisibilityLabel(t.visibility),
|
|
263
|
+
void 0,
|
|
264
|
+
{ bottom: !0 }
|
|
265
|
+
]
|
|
266
|
+
]),
|
|
267
|
+
a("div", null, [
|
|
268
|
+
v((s(), o("div", {
|
|
269
|
+
class: "site-title",
|
|
270
|
+
onClick: (u) => n.goToSite(t)
|
|
271
|
+
}, [
|
|
272
|
+
w(l(t.title), 1)
|
|
273
|
+
], 8, Y)), [
|
|
274
|
+
[
|
|
275
|
+
d,
|
|
276
|
+
t.title,
|
|
277
|
+
void 0,
|
|
278
|
+
{ bottom: !0 }
|
|
279
|
+
]
|
|
280
|
+
]),
|
|
281
|
+
a("div", Z, l(t.description || "Aucune description"), 1)
|
|
282
|
+
])
|
|
283
|
+
])
|
|
284
|
+
]))), 128))
|
|
285
|
+
])) : (s(), o("div", ee, l(e.$t("emptyFavoriteSite")), 1));
|
|
286
|
+
}
|
|
287
|
+
const ie = /* @__PURE__ */ f(J, [["render", te], ["__scopeId", "data-v-64a7ee8d"]]), re = {
|
|
288
|
+
name: "FavoriteList",
|
|
289
|
+
components: {
|
|
290
|
+
FavoriteFileList: D,
|
|
291
|
+
FavoriteFolderList: G,
|
|
292
|
+
FavoriteSiteList: ie
|
|
293
|
+
},
|
|
294
|
+
props: {
|
|
295
|
+
filter: {
|
|
296
|
+
type: String,
|
|
297
|
+
default: "file",
|
|
298
|
+
validator: (e) => ["file", "folder", "site"].includes(e)
|
|
299
|
+
},
|
|
300
|
+
siteId: {
|
|
301
|
+
type: String,
|
|
302
|
+
default: ""
|
|
303
|
+
},
|
|
304
|
+
urlResolver: {
|
|
305
|
+
type: Function,
|
|
306
|
+
default: null
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
data() {
|
|
310
|
+
return {
|
|
311
|
+
siteTitle: ""
|
|
312
|
+
};
|
|
313
|
+
},
|
|
314
|
+
watch: {
|
|
315
|
+
siteId: {
|
|
316
|
+
immediate: !0,
|
|
317
|
+
handler(e) {
|
|
318
|
+
this.resolveSiteTitle(e);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
methods: {
|
|
323
|
+
resolveSiteTitle(e) {
|
|
324
|
+
if (!e) {
|
|
325
|
+
this.siteTitle = "";
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
T.getWorkspace(e).then((r) => {
|
|
329
|
+
this.siteTitle = r.title || r.id;
|
|
330
|
+
}).catch(() => {
|
|
331
|
+
this.siteTitle = e;
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}, se = {
|
|
336
|
+
key: 0,
|
|
337
|
+
class: "site-title-label"
|
|
338
|
+
};
|
|
339
|
+
function oe(e, r, i, m, c, n) {
|
|
340
|
+
const d = h("FavoriteFileList"), t = h("FavoriteFolderList"), u = h("FavoriteSiteList");
|
|
341
|
+
return s(), o("div", null, [
|
|
342
|
+
c.siteTitle ? (s(), o("p", se, l(c.siteTitle), 1)) : p("", !0),
|
|
343
|
+
i.filter === "file" ? (s(), _(d, {
|
|
344
|
+
key: 1,
|
|
345
|
+
"site-id": i.siteId,
|
|
346
|
+
"url-resolver": i.urlResolver
|
|
347
|
+
}, null, 8, ["site-id", "url-resolver"])) : i.filter === "folder" ? (s(), _(t, {
|
|
348
|
+
key: 2,
|
|
349
|
+
"site-id": i.siteId,
|
|
350
|
+
"url-resolver": i.urlResolver
|
|
351
|
+
}, null, 8, ["site-id", "url-resolver"])) : i.filter === "site" ? (s(), _(u, {
|
|
352
|
+
key: 3,
|
|
353
|
+
"url-resolver": i.urlResolver
|
|
354
|
+
}, null, 8, ["url-resolver"])) : p("", !0)
|
|
355
|
+
]);
|
|
356
|
+
}
|
|
357
|
+
const ce = /* @__PURE__ */ f(re, [["render", oe], ["__scopeId", "data-v-c02a615a"]]);
|
|
358
|
+
export {
|
|
359
|
+
ce as default
|
|
360
|
+
};
|
|
361
|
+
//# sourceMappingURL=FavoriteList-CxDxCNii.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FavoriteList-CxDxCNii.js","sources":["../src/components/dashboard/widgets/FavoriteFileList.vue","../src/components/dashboard/widgets/FavoriteFolderList.vue","../src/components/dashboard/widgets/FavoriteSiteList.vue","../src/components/dashboard/widgets/FavoriteList.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"file-grid-container\" v-if=\"favoriteFiles.length > 0\">\n <button\n v-for=\"file in favoriteFiles\"\n :key=\"file.id\"\n class=\"file-card\"\n @click=\"navigateTo(file)\"\n :aria-label=\"file.title || file.name\"\n >\n <div class=\"file-card-row\">\n <i\n :class=\"getIconClass(file.mimeType)\"\n class=\"file-icon\"\n aria-hidden=\"true\"\n ></i>\n <div class=\"file-info\">\n <div\n class=\"file-name\"\n v-tooltip.bottom=\"file.description || file.title || file.name\"\n >\n {{ file.title || file.name }}\n </div>\n <div v-if=\"file.title\" class=\"file-secondary-name\">\n {{ file.name }}\n </div>\n </div>\n </div>\n </button>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteFile\") }}</div>\n</template>\n\n<script>\nimport { useCollaboraStore } from \"@/stores/collabora\";\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteFileList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteFiles() {\n return this.favorites\n .map((fav) => fav.target.file)\n .filter((file) => file !== undefined && file !== null)\n .filter((file) => this.matchesSite(file))\n .sort((a, b) => a.name.localeCompare(b.name));\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.fileFavorites;\n })\n .catch((err) => {\n console.error(\"Error loading favorites:\", err);\n });\n },\n methods: {\n matchesSite(node) {\n if (!this.siteId) {\n return true;\n }\n const siteElement = node.path?.elements?.find(\n (el) => el.nodeType === \"st:site\",\n );\n return siteElement?.name === this.siteId;\n },\n getIconClass(mimeType) {\n if (!mimeType) {\n return \"ri-file-line\";\n }\n if (mimeType === \"application/pdf\") {\n return \"ri-file-pdf-line\";\n }\n if (\n mimeType.includes(\"word\") ||\n mimeType.includes(\"opendocument.text\") ||\n mimeType === \"application/rtf\"\n ) {\n return \"ri-file-word-line\";\n }\n if (mimeType.includes(\"excel\") || mimeType.includes(\"spreadsheet\")) {\n return \"ri-file-excel-line\";\n }\n if (\n mimeType.includes(\"powerpoint\") ||\n mimeType.includes(\"presentation\")\n ) {\n return \"ri-file-ppt-line\";\n }\n if (mimeType.startsWith(\"image/\")) {\n return \"ri-image-line\";\n }\n if (mimeType.startsWith(\"video/\")) {\n return \"ri-video-line\";\n }\n if (mimeType.startsWith(\"audio/\")) {\n return \"ri-music-line\";\n }\n if (\n mimeType.includes(\"zip\") ||\n mimeType.includes(\"tar\") ||\n mimeType.includes(\"compressed\")\n ) {\n return \"ri-file-zip-line\";\n }\n if (\n mimeType.startsWith(\"text/\") ||\n mimeType === \"application/json\" ||\n mimeType === \"application/xml\"\n ) {\n return \"ri-file-text-line\";\n }\n if (mimeType === \"message/rfc822\") {\n return \"ri-mail-line\";\n }\n return \"ri-file-line\";\n },\n navigateTo(file) {\n const collaboraStore = useCollaboraStore();\n let destinationName = \"\";\n if (\n file.mimeType === \"image/vnd.dxf\" ||\n file.mimeType === \"image/vnd.dwg\" ||\n file.mimeType === \"message/rfc822\"\n ) {\n destinationName = \"pdf\";\n } else if (file.mimeType.startsWith(\"image/\")) {\n destinationName = \"image\";\n } else if (file.mimeType.startsWith(\"video/\")) {\n destinationName = \"video\";\n } else if (\n file.mimeType.startsWith(\"text/x-markdown\") ||\n file.mimeType.startsWith(\"text/x-web-markdown\")\n ) {\n destinationName = \"md\";\n } else if (file.mimeType.startsWith(\"text/html\")) {\n destinationName = \"html\";\n } else if (file.mimeType.startsWith(\"text/plain\")) {\n destinationName = \"text\";\n } else if (file.mimeType === \"application/pdf\") {\n destinationName = \"pdf\";\n } else {\n if (collaboraStore.checkIfExists(file.mimeType, \"edit\")) {\n destinationName = \"edit\";\n }\n if (collaboraStore.checkIfExists(file.mimeType, \"view\")) {\n destinationName = \"view\";\n }\n if (collaboraStore.checkIfExists(file.mimeType, \"view_comment\")) {\n destinationName = \"view_comment\";\n }\n }\n if (this.urlResolver) {\n this.urlResolver(file);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/${destinationName}/${file.id}`,\n \"_blank\",\n );\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.file-grid-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n}\n\n.file-card {\n background-color: var(--p-content-background);\n padding: 1rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n transition:\n border-color 0.2s,\n box-shadow 0.2s;\n}\n\n.file-card:hover {\n border-color: var(--p-primary-color);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.file-card:focus-visible {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n}\n\n.file-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.file-icon {\n font-size: 1.5rem;\n color: var(--p-primary-color);\n flex-shrink: 0;\n}\n\n.file-info {\n min-width: 0;\n overflow: hidden;\n}\n\n.file-info > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.file-name {\n font-weight: 500;\n font-size: 0.875rem;\n}\n\n.file-secondary-name {\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin-top: 0.25rem;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"folder-grid-container\" v-if=\"favoriteFolders.length > 0\">\n <button\n v-for=\"folder in favoriteFolders\"\n :key=\"folder.id\"\n class=\"folder-card\"\n @click=\"navigateTo(folder)\"\n :aria-label=\"folder.name\"\n >\n <div class=\"folder-card-row\">\n <i class=\"ri-folder-line folder-icon\" aria-hidden=\"true\"></i>\n <div class=\"folder-info\">\n <div class=\"folder-name\" v-tooltip.bottom=\"folder.name\">\n {{ folder.name }}\n </div>\n </div>\n </div>\n </button>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteFolder\") }}</div>\n</template>\n\n<script>\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteFolderList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteFolders() {\n return this.favorites\n .map((fav) => fav.target.folder)\n .filter((folder) => folder !== undefined && folder !== null)\n .filter((folder) => this.matchesSite(folder))\n .sort((a, b) => a.name.localeCompare(b.name));\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.folderFavorites;\n })\n .catch((err) => {\n console.error(\"Error loading favorites:\", err);\n });\n },\n methods: {\n matchesSite(node) {\n if (!this.siteId) {\n return true;\n }\n const siteElement = node.path?.elements?.find(\n (el) => el.nodeType === \"st:site\",\n );\n return siteElement?.name === this.siteId;\n },\n navigateTo(folder) {\n if (this.urlResolver) {\n this.urlResolver(folder);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${folder.id}`,\n \"_blank\",\n );\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.folder-grid-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n}\n\n.folder-card {\n background-color: var(--p-content-background);\n padding: 1rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n transition:\n border-color 0.2s,\n box-shadow 0.2s;\n}\n\n.folder-card:hover {\n border-color: var(--p-primary-color);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.folder-card:focus-visible {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n}\n\n.folder-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.folder-icon {\n font-size: 1.5rem;\n color: var(--p-primary-color);\n flex-shrink: 0;\n}\n\n.folder-info {\n min-width: 0;\n overflow: hidden;\n}\n\n.folder-info > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.folder-name {\n font-weight: 500;\n font-size: 0.875rem;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"site-grid-container\" v-if=\"favoriteSites.length > 0\">\n <div v-for=\"site in favoriteSites\" :key=\"site.id\" class=\"site-card\">\n <div class=\"site-card-row\">\n <span\n class=\"visibility-dot\"\n :class=\"'visibility-dot--' + getVisibilitySeverity(site.visibility)\"\n :aria-label=\"getVisibilityLabel(site.visibility)\"\n v-tooltip.bottom=\"getVisibilityLabel(site.visibility)\"\n ></span>\n <div>\n <div\n class=\"site-title\"\n @click=\"goToSite(site)\"\n v-tooltip.bottom=\"site.title\"\n >\n {{ site.title }}\n </div>\n <div class=\"site-description\">\n {{ site.description || \"Aucune description\" }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteSite\") }}</div>\n</template>\n\n<script>\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteSiteList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n methods: {\n getSite(fav) {\n return fav.target.site;\n },\n goToSite(site) {\n if (this.urlResolver) {\n this.urlResolver(site);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/mes-espaces/${site.id}`,\n \"_blank\",\n );\n }\n },\n getVisibilityLabel(visibility) {\n switch (visibility) {\n case \"PUBLIC\":\n return \"Public\";\n case \"PRIVATE\":\n return \"Privé\";\n case \"MODERATED\":\n return \"Modéré\";\n default:\n return \"Inconnu\";\n }\n },\n getVisibilitySeverity(visibility) {\n switch (visibility) {\n case \"PUBLIC\":\n return \"success\"; // vert\n case \"PRIVATE\":\n return \"danger\"; // rouge\n case \"MODERATED\":\n return \"warning\"; // orange\n default:\n return \"info\";\n }\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.siteFavorites;\n })\n .catch((err) => {\n console.error(\"Erreur lors du chargement des favoris:\", err);\n });\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteSites() {\n // Parcours chaque favorite, récupère target.site si existant\n return this.favorites\n .map((fav) => this.getSite(fav))\n .filter((site) => site !== undefined && site !== null)\n .sort((a, b) => a.title.localeCompare(b.title));\n },\n },\n};\n</script>\n<style scoped>\n.site-grid-container {\n display: grid;\n gap: 0.5rem;\n grid-template-columns: 1fr;\n}\n\n.site-card {\n background-color: var(--p-content-background);\n padding: 0.5rem 0.75rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.site-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.site-title {\n display: flex;\n font-weight: 500;\n font-size: 0.875rem;\n cursor: pointer;\n}\n\n.site-description {\n display: flex;\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin-top: 0.25rem;\n}\n\n.visibility-dot {\n width: 0.75rem;\n height: 0.75rem;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.visibility-dot--success {\n background-color: var(--p-green-500);\n}\n\n.visibility-dot--danger {\n background-color: var(--p-red-500);\n}\n\n.visibility-dot--warning {\n background-color: var(--p-orange-500);\n}\n\n.visibility-dot--info {\n background-color: var(--p-blue-500);\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div>\n <p v-if=\"siteTitle\" class=\"site-title-label\">\n {{ siteTitle }}\n </p>\n <FavoriteFileList\n v-if=\"filter === 'file'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n />\n <FavoriteFolderList\n v-else-if=\"filter === 'folder'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n />\n <FavoriteSiteList\n v-else-if=\"filter === 'site'\"\n :url-resolver=\"urlResolver\"\n />\n </div>\n</template>\n\n<script>\nimport FavoriteFileList from \"@/components/dashboard/widgets/FavoriteFileList.vue\";\nimport FavoriteFolderList from \"@/components/dashboard/widgets/FavoriteFolderList.vue\";\nimport FavoriteSiteList from \"@/components/dashboard/widgets/FavoriteSiteList.vue\";\nimport workspaceService from \"@/services/WorkspaceService.js\";\n\nexport default {\n name: \"FavoriteList\",\n components: {\n FavoriteFileList,\n FavoriteFolderList,\n FavoriteSiteList,\n },\n props: {\n filter: {\n type: String,\n default: \"file\",\n validator: (value) => [\"file\", \"folder\", \"site\"].includes(value),\n },\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n siteTitle: \"\",\n };\n },\n watch: {\n siteId: {\n immediate: true,\n handler(newSiteId) {\n this.resolveSiteTitle(newSiteId);\n },\n },\n },\n methods: {\n resolveSiteTitle(siteId) {\n if (!siteId) {\n this.siteTitle = \"\";\n return;\n }\n workspaceService\n .getWorkspace(siteId)\n .then((site) => {\n this.siteTitle = site.title || site.id;\n })\n .catch(() => {\n this.siteTitle = siteId;\n });\n },\n },\n};\n</script>\n\n<style scoped>\n.site-title-label {\n margin-top: 0;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n color: var(--p-text-muted-color);\n}\n</style>\n"],"names":["_sfc_main","Tooltip","mapState","useConfigStore","fav","file","a","b","favoritesStore","useFavoritesStore","err","node","el","mimeType","collaboraStore","useCollaboraStore","destinationName","_hoisted_3","_hoisted_4","_hoisted_5","$options","_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","$event","_createElementVNode","_withDirectives","_createTextVNode","_toDisplayString","_hoisted_6","_ctx","folder","site","visibility","_hoisted_2","FavoriteFileList","FavoriteFolderList","FavoriteSiteList","value","newSiteId","siteId","workspaceService","$data","$props","_createBlock","_component_FavoriteFileList","_component_FavoriteFolderList","_component_FavoriteSiteList"],"mappings":";;;;AAwDA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,SAASC;AAAA;EAEX,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,WAAW,CAAA;AAAA;EAEf;AAAA,EACA,UA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AAA;IAEX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,WAAW;AAAA;EAEf;AAAA,EACA,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,QAAQC,GAAW;AACjB,aAAK,iBAAiBA,CAAS;AAAA,MACjC;AAAA;;EAGJ,SAAS;AAAA,IACP,iBAAiBC,GAAQ;AACvB,UAAI,CAACA,GAAQ;AACX,aAAK,YAAY;AACjB;AAAA,MACF;AACA,MAAAC,EACG,aAAaD,CAAM,EACnB,KAAK,CAACR,MAAS;AACd,aAAK,YAAYA,EAAK,SAASA,EAAK;AAAA,MACtC,CAAC,EACA,MAAM,MAAM;AACX,aAAK,YAAYQ;AAAA,MACnB,CAAC;AAAA,IACL;AAAA;AAEJ;;EA7EwB,OAAM;;;;cAD5BpB,EAkBM,OAAA,MAAA;AAAA,IAjBKsB,EAAA,kBAATtB,EAEI,KAFJC,IAEIO,EADCc,EAAA,SAAS,GAAA,CAAA;IAGNC,EAAA,WAAM,eADdC,EAIEC,GAAA;AAAA;MAFC,WAASF,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,gDAGJA,EAAA,WAAM,iBADnBC,EAIEE,GAAA;AAAA;MAFC,WAASH,EAAA;AAAA,MACT,gBAAcA,EAAA;AAAA,gDAGJA,EAAA,WAAM,eADnBC,EAGEG,GAAA;AAAA;MADC,gBAAcJ,EAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { _ as i, d } from "./index-DxH0-3Sq.js";
|
|
2
|
+
import { marked as o } from "marked";
|
|
3
|
+
import r from "dompurify";
|
|
4
|
+
import { openBlock as s, createElementBlock as m } from "vue";
|
|
5
|
+
const l = {
|
|
6
|
+
name: "MarkdownComponent",
|
|
7
|
+
props: {
|
|
8
|
+
id: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: null
|
|
11
|
+
},
|
|
12
|
+
markdownContent: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: null
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
uniqueId: `markdown-${Math.random().toString(36).substr(2, 9)}`
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
mounted() {
|
|
23
|
+
this.id && this.id.trim() ? this.loadMarkdown() : this.markdownContent && this.markdownContent.trim() ? this.loadInlineMarkdown() : this.loadSampleMarkDown();
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
loadInlineMarkdown() {
|
|
27
|
+
const t = document.getElementById(`content-${this.uniqueId}`);
|
|
28
|
+
t && this.markdownContent && (t.innerHTML = r.sanitize(
|
|
29
|
+
o.parse(this.markdownContent)
|
|
30
|
+
));
|
|
31
|
+
},
|
|
32
|
+
loadSampleMarkDown() {
|
|
33
|
+
const t = this.$t("dashboard.markdownSample"), n = document.getElementById(`content-${this.uniqueId}`);
|
|
34
|
+
n && (n.innerHTML = r.sanitize(o.parse(t)));
|
|
35
|
+
},
|
|
36
|
+
async loadMarkdown() {
|
|
37
|
+
try {
|
|
38
|
+
let n = await (await d.getNodeContent(this.id)).text();
|
|
39
|
+
const e = document.getElementById(`content-${this.uniqueId}`);
|
|
40
|
+
e && (e.innerHTML = r.sanitize(o.parse(n)));
|
|
41
|
+
} catch (t) {
|
|
42
|
+
console.error("Erreur lors du chargement du markdown:", t);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}, c = ["id"];
|
|
47
|
+
function u(t, n, e, p, a, h) {
|
|
48
|
+
return s(), m("div", {
|
|
49
|
+
id: `content-${a.uniqueId}`
|
|
50
|
+
}, null, 8, c);
|
|
51
|
+
}
|
|
52
|
+
const _ = /* @__PURE__ */ i(l, [["render", u]]);
|
|
53
|
+
export {
|
|
54
|
+
_ as default
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=MarkdownComponent-jHr71rfh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownComponent-jHr71rfh.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;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { mapState as l } from "pinia";
|
|
2
|
+
import { _ as m, b as u } from "./index-DxH0-3Sq.js";
|
|
3
|
+
import h from "primevue/iconfield";
|
|
4
|
+
import I from "primevue/inputicon";
|
|
5
|
+
import d from "primevue/inputtext";
|
|
6
|
+
import { resolveComponent as e, openBlock as f, createElementBlock as _, createVNode as t, withCtx as P, withKeys as S } from "vue";
|
|
7
|
+
const x = {
|
|
8
|
+
name: "SearchInput",
|
|
9
|
+
components: {
|
|
10
|
+
PrimeIconField: h,
|
|
11
|
+
PrimeInputIcon: I,
|
|
12
|
+
PrimeInputText: d
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
searchResolver: {
|
|
16
|
+
type: Function,
|
|
17
|
+
default: null
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
searchInput: ""
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
search() {
|
|
27
|
+
this.searchResolver ? this.searchResolver(this.searchInput) : window.location = `${this.ESPACES_HOST}/espaces/recherche?search=${this.searchInput}`;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
computed: {
|
|
31
|
+
...l(u, ["ESPACES_HOST"])
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function v(r, o, T, y, n, c) {
|
|
35
|
+
const s = e("PrimeInputIcon"), p = e("PrimeInputText"), a = e("PrimeIconField");
|
|
36
|
+
return f(), _("div", null, [
|
|
37
|
+
t(a, { iconPosition: "left" }, {
|
|
38
|
+
default: P(() => [
|
|
39
|
+
t(s, { class: "ri-search-line" }),
|
|
40
|
+
t(p, {
|
|
41
|
+
modelValue: n.searchInput,
|
|
42
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => n.searchInput = i),
|
|
43
|
+
class: "search-input",
|
|
44
|
+
ref: "search",
|
|
45
|
+
type: "text",
|
|
46
|
+
placeholder: r.$t("search"),
|
|
47
|
+
onKeyup: S(c.search, ["enter"])
|
|
48
|
+
}, null, 8, ["modelValue", "placeholder", "onKeyup"])
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
})
|
|
52
|
+
]);
|
|
53
|
+
}
|
|
54
|
+
const K = /* @__PURE__ */ m(x, [["render", v], ["__scopeId", "data-v-5c1914e9"]]);
|
|
55
|
+
export {
|
|
56
|
+
K as default
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=SearchInput-DojcDnQU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput-DojcDnQU.js","sources":["../src/components/dashboard/widgets/SearchInput.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div>\n <PrimeIconField iconPosition=\"left\">\n <PrimeInputIcon class=\"ri-search-line\" />\n <PrimeInputText\n v-model=\"searchInput\"\n class=\"search-input\"\n ref=\"search\"\n type=\"text\"\n :placeholder=\"$t('search')\"\n @keyup.enter=\"search\"\n />\n </PrimeIconField>\n </div>\n</template>\n<script>\nimport { mapState } from \"pinia\";\nimport { useConfigStore } from \"@/stores/config\";\nimport IconField from \"primevue/iconfield\";\nimport InputIcon from \"primevue/inputicon\";\nimport InputText from \"primevue/inputtext\";\n\nexport default {\n name: \"SearchInput\",\n components: {\n PrimeIconField: IconField,\n PrimeInputIcon: InputIcon,\n PrimeInputText: InputText,\n },\n props: {\n searchResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n searchInput: \"\",\n };\n },\n methods: {\n search() {\n if (this.searchResolver) {\n this.searchResolver(this.searchInput);\n } else {\n window.location = `${this.ESPACES_HOST}/espaces/recherche?search=${this.searchInput}`;\n }\n },\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n },\n};\n</script>\n<style scoped>\n.search-input {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"names":["_sfc_main","IconField","InputIcon","InputText","mapState","useConfigStore","_createElementBlock","_createVNode","_component_PrimeIconField","_component_PrimeInputIcon","_component_PrimeInputText","$data","$event","_ctx","$options"],"mappings":";;;;;;AAuCA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,gBAAgBC;AAAA,IAChB,gBAAgBC;AAAA,IAChB,gBAAgBC;AAAA;EAElB,OAAO;AAAA,IACL,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,aAAa;AAAA;EAEjB;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AACP,MAAI,KAAK,iBACP,KAAK,eAAe,KAAK,WAAW,IAEpC,OAAO,WAAW,GAAG,KAAK,YAAY,6BAA6B,KAAK,WAAW;AAAA,IAEvF;AAAA;EAEF,UAAU;AAAA,IACR,GAAGC,EAASC,GAAgB,CAAC,cAAc,CAAC;AAAA;AAEhD;;;cAnDEC,EAYM,OAAA,MAAA;AAAA,IAXJC,EAUiBC,GAAA,EAVD,cAAa,OAAM,GAAA;AAAA,iBACjC,MAAyC;AAAA,QAAzCD,EAAyCE,GAAA,EAAzB,OAAM,iBAAgB,CAAA;AAAA,QACtCF,EAOEG,GAAA;AAAA,sBANSC,EAAA;AAAA,wDAAAA,EAAA,cAAWC;AAAA,UACpB,OAAM;AAAA,UACN,KAAI;AAAA,UACJ,MAAK;AAAA,UACJ,aAAaC,EAAA,GAAE,QAAA;AAAA,UACf,WAAaC,EAAA,QAAM,CAAA,OAAA,CAAA;AAAA;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { openBlock as r, createElementBlock as p, createElementVNode as e, toDisplayString as s } from "vue";
|
|
2
|
+
import { _ as c } from "./index-DxH0-3Sq.js";
|
|
3
|
+
const l = {
|
|
4
|
+
name: "UnknownBlockType",
|
|
5
|
+
props: {
|
|
6
|
+
type: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: !0
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}, a = { class: "unknown-block" };
|
|
12
|
+
function i(o, n, t, d, k, u) {
|
|
13
|
+
return r(), p("div", a, [
|
|
14
|
+
n[0] || (n[0] = e("i", { class: "ri-error-warning-line unknown-block-icon" }, null, -1)),
|
|
15
|
+
e("p", null, s(o.$t("dashboard.unknownBlockType", { type: t.type })), 1)
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
const m = /* @__PURE__ */ c(l, [["render", i], ["__scopeId", "data-v-067b7fb9"]]);
|
|
19
|
+
export {
|
|
20
|
+
m as default
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=UnknownBlockType-Pc9ihwij.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnknownBlockType-Pc9ihwij.js","sources":["../src/components/dashboard/widgets/UnknownBlockType.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n<template>\n <div class=\"unknown-block\">\n <i class=\"ri-error-warning-line unknown-block-icon\"></i>\n <p>{{ $t(\"dashboard.unknownBlockType\", { type: type }) }}</p>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"UnknownBlockType\",\n props: {\n type: {\n type: String,\n required: true,\n },\n },\n};\n</script>\n\n<style scoped>\n.unknown-block {\n text-align: center;\n color: var(--p-text-muted-color);\n padding: 1rem;\n}\n\n.unknown-block-icon {\n font-size: 2.25rem;\n margin-bottom: 0.5rem;\n}\n</style>\n"],"names":["_sfc_main","_hoisted_1","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_ctx","$props"],"mappings":";;AAwBA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA;;AAGhB,GAfOC,IAAA,EAAA,OAAM,gBAAe;;AAA1B,SAAAC,EAAA,GAAAC,EAGM,OAHNF,GAGM;AAAA,oBAFJG,EAAwD,KAAA,EAArD,OAAM,2CAA0C,GAAA,MAAA,EAAA;AAAA,IACnDA,EAA6D,KAAA,MAAAC,EAAvDC,EAAA,GAAE,8BAAA,EAAA,MAAuCC,EAAA,KAAI,CAAA,CAAA,GAAA,CAAA;AAAA;;;"}
|