@pristy/pristy-libvue 3.3.0 → 3.3.2
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-CI1xP7Db.js → ActivityHistory-mPCJixsu.js} +48 -45
- package/dist/ActivityHistory-mPCJixsu.js.map +1 -0
- package/dist/{BookmarksComponent-DgA2ADMR.js → BookmarksComponent-xDUbiTVV.js} +2 -2
- package/dist/{BookmarksComponent-DgA2ADMR.js.map → BookmarksComponent-xDUbiTVV.js.map} +1 -1
- package/dist/{ChartWrapper-BCxPIcHH.js → ChartWrapper-BSZ2RaKH.js} +2 -2
- package/dist/{ChartWrapper-BCxPIcHH.js.map → ChartWrapper-BSZ2RaKH.js.map} +1 -1
- package/dist/{DisplayFileInDashboardComponent-CBF18W-f.js → DisplayFileInDashboardComponent-CqHoGf2Q.js} +3 -3
- package/dist/{DisplayFileInDashboardComponent-CBF18W-f.js.map → DisplayFileInDashboardComponent-CqHoGf2Q.js.map} +1 -1
- package/dist/{ExternalApps-CFnt6neF.js → ExternalApps-BK_066QL.js} +2 -2
- package/dist/{ExternalApps-CFnt6neF.js.map → ExternalApps-BK_066QL.js.map} +1 -1
- package/dist/{FavoriteList-FELB7XHj.js → FavoriteList-JUAJUJr4.js} +97 -96
- package/dist/FavoriteList-JUAJUJr4.js.map +1 -0
- package/dist/{MarkdownComponent-C0omNjsC.js → MarkdownComponent-D_fqYWV_.js} +2 -2
- package/dist/{MarkdownComponent-C0omNjsC.js.map → MarkdownComponent-D_fqYWV_.js.map} +1 -1
- package/dist/{PDFComponent-BXU0MgTn.js → PDFComponent-B4yA2RzZ.js} +3 -3
- package/dist/{PDFComponent-BXU0MgTn.js.map → PDFComponent-B4yA2RzZ.js.map} +1 -1
- package/dist/{PdfConfigService-BK231Vb3.js → PdfConfigService-Dv6LG1qD.js} +4 -4
- package/dist/{PdfConfigService-BK231Vb3.js.map → PdfConfigService-Dv6LG1qD.js.map} +1 -1
- package/dist/{PdfToolsComponent-BFp2uZfO.js → PdfToolsComponent-CDWy61FX.js} +3 -3
- package/dist/{PdfToolsComponent-BFp2uZfO.js.map → PdfToolsComponent-CDWy61FX.js.map} +1 -1
- package/dist/{PlanTreePdfService-CPJ8jZR3.js → PlanTreePdfService-DA5BC0I2.js} +2 -2
- package/dist/{PlanTreePdfService-CPJ8jZR3.js.map → PlanTreePdfService-DA5BC0I2.js.map} +1 -1
- package/dist/{SearchInput-C5qkYHw2.js → SearchInput-D-ECPIYd.js} +11 -11
- package/dist/{SearchInput-C5qkYHw2.js.map → SearchInput-D-ECPIYd.js.map} +1 -1
- package/dist/{UnknownBlockType-DjMBzCM_.js → UnknownBlockType-C5JDcmf_.js} +2 -2
- package/dist/{UnknownBlockType-DjMBzCM_.js.map → UnknownBlockType-C5JDcmf_.js.map} +1 -1
- package/dist/components/FolderUpload.vue.d.ts.map +1 -1
- package/dist/components/config/ConfigSplitView.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardAdminPage.vue.d.ts +1 -0
- package/dist/components/dashboard/DashboardAdminPage.vue.d.ts.map +1 -1
- package/dist/components/dashboard/DashboardComponent.vue.d.ts +2 -0
- package/dist/components/dashboard/DashboardComponent.vue.d.ts.map +1 -1
- package/dist/components/dashboard/editor/DashboardEditor.vue.d.ts +1 -0
- package/dist/components/dashboard/editor/DashboardEditor.vue.d.ts.map +1 -1
- package/dist/components/dashboard/widgets/ActivityHistory.vue.d.ts.map +1 -1
- package/dist/components/dashboard/widgets/FavoriteFileList.vue.d.ts.map +1 -1
- package/dist/components/dashboard/widgets/FavoriteFolderList.vue.d.ts +1 -0
- package/dist/components/dashboard/widgets/FavoriteFolderList.vue.d.ts.map +1 -1
- package/dist/components/dashboard/widgets/FavoriteList.vue.d.ts +1 -0
- package/dist/components/dashboard/widgets/FavoriteList.vue.d.ts.map +1 -1
- package/dist/components/layouts/AppSwitcher.vue.d.ts +4 -4
- package/dist/components/layouts/AppSwitcher.vue.d.ts.map +1 -1
- package/dist/components/popup/ImportPopupWithWorker.vue.d.ts +23 -85
- package/dist/components/popup/ImportPopupWithWorker.vue.d.ts.map +1 -1
- package/dist/components/users/MemberList.vue.d.ts.map +1 -1
- package/dist/composables/collabProtocol.d.ts +25 -0
- package/dist/composables/collabProtocol.d.ts.map +1 -1
- package/dist/composables/useCollabEditor.d.ts.map +1 -1
- package/dist/{dracula-CXpQbpE5.js → dracula-BbtD8yvj.js} +2 -2
- package/dist/{dracula-CXpQbpE5.js.map → dracula-BbtD8yvj.js.map} +1 -1
- package/dist/{github-Bo7UDmtt.js → github-eAHreirM.js} +2 -2
- package/dist/{github-Bo7UDmtt.js.map → github-eAHreirM.js.map} +1 -1
- package/dist/i18n/index.d.ts +14 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/{index-Cd66MFFZ.js → index-Cx1jO8jm.js} +9221 -9105
- package/dist/index-Cx1jO8jm.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/{nord-p8TZuhxf.js → nord-DSvqR8Ul.js} +2 -2
- package/dist/{nord-p8TZuhxf.js.map → nord-DSvqR8Ul.js.map} +1 -1
- package/dist/{one-LP50NAeS.js → one-BnndR5mM.js} +2 -2
- package/dist/{one-LP50NAeS.js.map → one-BnndR5mM.js.map} +1 -1
- package/dist/pristy-libvue.css +1 -1
- package/dist/pristy-libvue.es.js +272 -270
- package/dist/pristy-libvue.umd.js +34 -34
- package/dist/pristy-libvue.umd.js.map +1 -1
- package/dist/services/AppSwitcherService.d.ts +13 -0
- package/dist/services/AppSwitcherService.d.ts.map +1 -1
- package/dist/services/UploadSelectionService.d.ts +46 -0
- package/dist/services/UploadSelectionService.d.ts.map +1 -0
- package/dist/{solarized-D1qFMWfM.js → solarized-BdT-Wbvz.js} +2 -2
- package/dist/{solarized-D1qFMWfM.js.map → solarized-BdT-Wbvz.js.map} +1 -1
- package/dist/stores/config.d.ts +12 -0
- package/dist/stores/config.d.ts.map +1 -1
- package/dist/stores/navigation.d.ts +2 -0
- package/dist/stores/navigation.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/ActivityHistory-CI1xP7Db.js.map +0 -1
- package/dist/FavoriteList-FELB7XHj.js.map +0 -1
- package/dist/index-Cd66MFFZ.js.map +0 -1
|
@@ -13,6 +13,15 @@ export function listApplications(config: any, currentApp?: string): Array<{
|
|
|
13
13
|
url: string;
|
|
14
14
|
current: boolean;
|
|
15
15
|
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Build the sidebar entries linking to the other applications of the common configuration scope.
|
|
18
|
+
*
|
|
19
|
+
* @param {Object} config ConfigStore state, read for its commonApplications
|
|
20
|
+
* @param {string} currentApp key of the application being displayed, left out of the entries
|
|
21
|
+
* @param {Function} t translation function resolving the appSwitcher.* keys
|
|
22
|
+
* @returns {Array<Object>} one link entry per application followed by a separator, or an empty array when no other application is declared
|
|
23
|
+
*/
|
|
24
|
+
export function applicationMenuItems(config: any, currentApp: string, t: Function): Array<any>;
|
|
16
25
|
export const KNOWN_APPLICATIONS: ({
|
|
17
26
|
key: string;
|
|
18
27
|
labelKey: string;
|
|
@@ -28,9 +37,13 @@ export const KNOWN_APPLICATIONS: ({
|
|
|
28
37
|
path: string;
|
|
29
38
|
flag: string;
|
|
30
39
|
})[];
|
|
40
|
+
/** Key of the separator closing the application links of a sidebar menu. */
|
|
41
|
+
export const APPLICATIONS_SEPARATOR_KEY: "separatorApps";
|
|
31
42
|
declare namespace _default {
|
|
32
43
|
export { listApplications };
|
|
44
|
+
export { applicationMenuItems };
|
|
33
45
|
export { KNOWN_APPLICATIONS };
|
|
46
|
+
export { APPLICATIONS_SEPARATOR_KEY };
|
|
34
47
|
}
|
|
35
48
|
export default _default;
|
|
36
49
|
//# sourceMappingURL=AppSwitcherService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSwitcherService.d.ts","sourceRoot":"","sources":["../../src/services/AppSwitcherService.js"],"names":[],"mappings":"AA6GA;;;;;;GAMG;AACH,2DAHW,MAAM,GACJ,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAG,MAAM,OAAA,CAAC;IAAC,QAAQ,EAAG,MAAM,OAAA,CAAC;IAAC,IAAI,EAAG,MAAM,OAAA,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAAC,CAgBjH;
|
|
1
|
+
{"version":3,"file":"AppSwitcherService.d.ts","sourceRoot":"","sources":["../../src/services/AppSwitcherService.js"],"names":[],"mappings":"AA6GA;;;;;;GAMG;AACH,2DAHW,MAAM,GACJ,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAG,MAAM,OAAA,CAAC;IAAC,QAAQ,EAAG,MAAM,OAAA,CAAC;IAAC,IAAI,EAAG,MAAM,OAAA,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAAC,CAgBjH;AASD;;;;;;;GAOG;AACH,8DAJW,MAAM,gBAEJ,KAAK,KAAQ,CAqBzB;AArJD;;;;;;;;;;;;;;KAgDE;AAmEF,4EAA4E;AAC5E,yCAA0C,eAAe,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the entries of a drop. Must be called synchronously in the `drop` handler:
|
|
3
|
+
* the browser empties the items once the handler yields.
|
|
4
|
+
*
|
|
5
|
+
* @param {DataTransfer} dataTransfer
|
|
6
|
+
* @returns {Array<FileSystemEntry>}
|
|
7
|
+
*/
|
|
8
|
+
export function droppedEntries(dataTransfer: DataTransfer): Array<FileSystemEntry>;
|
|
9
|
+
/**
|
|
10
|
+
* Every file of the dropped entries, files and folders mixed, folders walked
|
|
11
|
+
* recursively. Hidden files and folders (name starting with a dot) are left out.
|
|
12
|
+
*
|
|
13
|
+
* @param {Array<FileSystemEntry>} entries see {@link droppedEntries}
|
|
14
|
+
* @returns {Promise<UploadItem[]>}
|
|
15
|
+
*/
|
|
16
|
+
export function uploadItemsOfEntries(entries: Array<FileSystemEntry>): Promise<UploadItem[]>;
|
|
17
|
+
/**
|
|
18
|
+
* The files chosen in a file input, either several files or a whole folder
|
|
19
|
+
* (`webkitdirectory`). Hidden files and folders are left out.
|
|
20
|
+
*
|
|
21
|
+
* @param {FileList|File[]} files
|
|
22
|
+
* @returns {UploadItem[]}
|
|
23
|
+
*/
|
|
24
|
+
export function uploadItemsOfFiles(files: FileList | File[]): UploadItem[];
|
|
25
|
+
/**
|
|
26
|
+
* @param {File} file
|
|
27
|
+
* @param {?string} accept the `accept` attribute of a file input
|
|
28
|
+
* (`image/*,.pdf,application/zip`)
|
|
29
|
+
* @returns {boolean} whether the file matches, always true without `accept`
|
|
30
|
+
*/
|
|
31
|
+
export function matchesAccept(file: File, accept: string | null): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @param {UploadItem[]} items
|
|
34
|
+
* @returns {boolean} whether the items rebuild folders below the target
|
|
35
|
+
*/
|
|
36
|
+
export function createsFolders(items: UploadItem[]): boolean;
|
|
37
|
+
export type UploadItem = {
|
|
38
|
+
file: File;
|
|
39
|
+
/**
|
|
40
|
+
* path of the file below the drop or the chosen
|
|
41
|
+
* folder, folders separated by `/`; the file name alone, or empty, for a file
|
|
42
|
+
* imported directly into the target folder
|
|
43
|
+
*/
|
|
44
|
+
relativePath: string;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=UploadSelectionService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadSelectionService.d.ts","sourceRoot":"","sources":["../../src/services/UploadSelectionService.js"],"names":[],"mappings":"AAiCA;;;;;;GAMG;AACH,6CAHW,YAAY,GACV,KAAK,CAAC,eAAe,CAAC,CAOlC;AAoBD;;;;;;GAMG;AACH,8CAHW,KAAK,CAAC,eAAe,CAAC,GACpB,OAAO,CAAC,UAAU,EAAE,CAAC,CAkBjC;AAED;;;;;;GAMG;AACH,0CAHW,QAAQ,GAAC,IAAI,EAAE,GACb,UAAU,EAAE,CAQxB;AAED;;;;;GAKG;AACH,oCALW,IAAI,UACH,MAAM,OAAA,GAEL,OAAO,CAqBnB;AAED;;;GAGG;AACH,sCAHW,UAAU,EAAE,GACV,OAAO,CAInB;;UAvHa,IAAI;;;;;;kBACJ,MAAM"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as e } from "./index-Cx1jO8jm.js";
|
|
2
2
|
const r = {
|
|
3
3
|
comment: "#93a1a1",
|
|
4
4
|
keyword: "#859900",
|
|
@@ -44,4 +44,4 @@ const r = {
|
|
|
44
44
|
export {
|
|
45
45
|
t as default
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=solarized-
|
|
47
|
+
//# sourceMappingURL=solarized-BdT-Wbvz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solarized-
|
|
1
|
+
{"version":3,"file":"solarized-BdT-Wbvz.js","sources":["../src/composables/editorThemes/solarized.js"],"sourcesContent":["/*\n Copyright (C) 2026 - 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\nimport { buildEditorTheme } from \"@/composables/editorThemes/buildEditorTheme.js\";\n\nconst accents = {\n comment: \"#93a1a1\",\n keyword: \"#859900\",\n string: \"#2aa198\",\n number: \"#d33682\",\n function: \"#268bd2\",\n type: \"#b58900\",\n property: \"#268bd2\",\n tag: \"#268bd2\",\n attribute: \"#b58900\",\n heading: \"#cb4b16\",\n link: \"#6c71c4\",\n code: \"#2aa198\",\n list: \"#cb4b16\",\n invalid: \"#dc322f\",\n};\n\nexport default {\n light: buildEditorTheme({\n ...accents,\n dark: false,\n background: \"#fdf6e3\",\n foreground: \"#657b83\",\n gutterBackground: \"#eee8d5\",\n gutterForeground: \"#93a1a1\",\n activeLine: \"#eee8d5\",\n selection: \"#e3dcc6\",\n cursor: \"#586e75\",\n variable: \"#657b83\",\n }),\n dark: buildEditorTheme({\n ...accents,\n dark: true,\n comment: \"#586e75\",\n background: \"#002b36\",\n foreground: \"#839496\",\n gutterBackground: \"#073642\",\n gutterForeground: \"#586e75\",\n activeLine: \"#073642\",\n selection: \"#0a4a5c\",\n cursor: \"#93a1a1\",\n variable: \"#839496\",\n }),\n};\n"],"names":["accents","solarized","buildEditorTheme"],"mappings":";AAmBA,MAAMA,IAAU;AAAA,EACd,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,KAAK;AAAA,EACL,WAAW;AAAA,EACX,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AACX,GAEAC,IAAe;AAAA,EACb,OAAOC,EAAiB;AAAA,IACtB,GAAGF;AAAA,IACH,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACd,CAAG;AAAA,EACD,MAAME,EAAiB;AAAA,IACrB,GAAGF;AAAA,IACH,MAAM;AAAA,IACN,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACd,CAAG;AACH;"}
|
package/dist/stores/config.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export const useConfigStore: StoreDefinition<"ConfigStore", {
|
|
|
21
21
|
EDIT_WITH_MSOFFICE: boolean;
|
|
22
22
|
NEW_PASSWORD_RULES: string;
|
|
23
23
|
APPLICATIONS: any[];
|
|
24
|
+
commonApplications: any[];
|
|
24
25
|
MENU_ESPACES: boolean;
|
|
25
26
|
MENU_ACTES: boolean;
|
|
26
27
|
MENU_MARCHES: boolean;
|
|
@@ -100,6 +101,7 @@ export const useConfigStore: StoreDefinition<"ConfigStore", {
|
|
|
100
101
|
LIST_COLLECTIVITES: any[];
|
|
101
102
|
LIST_TYPE_CONTRATS: any[];
|
|
102
103
|
LIST_PROCEDURES: any[];
|
|
104
|
+
SHOW_MONTANT_MARCHE: boolean;
|
|
103
105
|
}, {
|
|
104
106
|
oidc: (state: {
|
|
105
107
|
INSTANCE_NAME: string;
|
|
@@ -121,6 +123,7 @@ export const useConfigStore: StoreDefinition<"ConfigStore", {
|
|
|
121
123
|
EDIT_WITH_MSOFFICE: boolean;
|
|
122
124
|
NEW_PASSWORD_RULES: string;
|
|
123
125
|
APPLICATIONS: any[];
|
|
126
|
+
commonApplications: any[];
|
|
124
127
|
MENU_ESPACES: boolean;
|
|
125
128
|
MENU_ACTES: boolean;
|
|
126
129
|
MENU_MARCHES: boolean;
|
|
@@ -200,6 +203,7 @@ export const useConfigStore: StoreDefinition<"ConfigStore", {
|
|
|
200
203
|
LIST_COLLECTIVITES: any[];
|
|
201
204
|
LIST_TYPE_CONTRATS: any[];
|
|
202
205
|
LIST_PROCEDURES: any[];
|
|
206
|
+
SHOW_MONTANT_MARCHE: boolean;
|
|
203
207
|
} & PiniaCustomStateProperties<{
|
|
204
208
|
INSTANCE_NAME: string;
|
|
205
209
|
BASE_URL: string;
|
|
@@ -220,6 +224,7 @@ export const useConfigStore: StoreDefinition<"ConfigStore", {
|
|
|
220
224
|
EDIT_WITH_MSOFFICE: boolean;
|
|
221
225
|
NEW_PASSWORD_RULES: string;
|
|
222
226
|
APPLICATIONS: any[];
|
|
227
|
+
commonApplications: any[];
|
|
223
228
|
MENU_ESPACES: boolean;
|
|
224
229
|
MENU_ACTES: boolean;
|
|
225
230
|
MENU_MARCHES: boolean;
|
|
@@ -299,6 +304,7 @@ export const useConfigStore: StoreDefinition<"ConfigStore", {
|
|
|
299
304
|
LIST_COLLECTIVITES: any[];
|
|
300
305
|
LIST_TYPE_CONTRATS: any[];
|
|
301
306
|
LIST_PROCEDURES: any[];
|
|
307
|
+
SHOW_MONTANT_MARCHE: boolean;
|
|
302
308
|
}>) => {
|
|
303
309
|
init: {
|
|
304
310
|
onLoad: string;
|
|
@@ -340,5 +346,11 @@ export const useConfigStore: StoreDefinition<"ConfigStore", {
|
|
|
340
346
|
* @return {Promise<void>} resolved even when the scope declares no configuration
|
|
341
347
|
*/
|
|
342
348
|
loadRepositoryConfig(scope: string): Promise<void>;
|
|
349
|
+
/**
|
|
350
|
+
* Replace the application list of the common scope, e.g. after the common file was saved.
|
|
351
|
+
*
|
|
352
|
+
* @param {Array<Object>} applications APPLICATIONS entries of the common file; anything else empties the list
|
|
353
|
+
*/
|
|
354
|
+
setCommonApplications(applications: Array<any>): void;
|
|
343
355
|
}>;
|
|
344
356
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/stores/config.js"],"names":[],"mappings":";AAuBA,uFAAuF;AACvF,kCAAmC,QAAQ,CAAC;AAE5C
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/stores/config.js"],"names":[],"mappings":";AAuBA,uFAAuF;AACvF,kCAAmC,QAAQ,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqMI;;;;;;;;;;OAUG;gCADU,OAAO;;;IASpB;;OAEG;;IAkBH;;;;;OAKG;0CADS,OAAO,CAAC,IAAI,CAAC;IAoBzB;;;;;OAKG;gCAFQ,MAAM,GACL,OAAO,CAAC,IAAI,CAAC;IAsBzB;;;;OAIG;wCADQ,KAAK,KAAQ;GAMzB"}
|
|
@@ -16,6 +16,7 @@ import { StoreDefinition } from 'pinia';
|
|
|
16
16
|
* - `loading`: A boolean indicating if the application is in a loading state.
|
|
17
17
|
* - `emptyFolder`: A boolean indicating if the current folder is empty.
|
|
18
18
|
* - `role`: The user's role within the current workspace.
|
|
19
|
+
* - `visibility`: The visibility of the current workspace.
|
|
19
20
|
* - `canUpload`: A boolean indicating if the user has permission to upload.
|
|
20
21
|
* - `pagination`: Pagination details for managing viewable content.
|
|
21
22
|
* - `isInConsultation`: A boolean indicating if the user is in consultation mode.
|
|
@@ -41,6 +42,7 @@ export const useNavigationStore: StoreDefinition<"NavigationStore", {
|
|
|
41
42
|
loading: boolean;
|
|
42
43
|
emptyFolder: boolean;
|
|
43
44
|
role: any;
|
|
45
|
+
visibility: any;
|
|
44
46
|
canUpload: boolean;
|
|
45
47
|
pagination: any;
|
|
46
48
|
isInConsultation: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/stores/navigation.js"],"names":[],"mappings":";AAuBA
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/stores/navigation.js"],"names":[],"mappings":";AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH;;;;;;;;;;;;;;;;;;;;;IA4BI;;;;;;OAMG;;IAiEH;;;;;;;;;;OAUG;0EADS,OAAO,CAAC,MAAO,SAAS,CAAC;IA2FrC;;;;;;OAMG;;IA4BH;;;;;;OAMG;;GA4GJ"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityHistory-CI1xP7Db.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,eAAO,CAAA;AAET,YAAMC,IAAS,CAAA;AACf,iBAAWC,KAAY,KAAK,YAAY;AACtC,cAAMC,IAAOF,EAAOA,EAAO,SAAS,CA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,EAAM,MAAM,QAAQ,CAAA,GAAA,CAAA;AAAA;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FavoriteList-FELB7XHj.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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