@pristy/pristy-libvue 2.19.0 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/{ActivityHistory-_0tW0rvq.js → ActivityHistory-BKXIlIOQ.js} +2 -2
  2. package/dist/{ActivityHistory-_0tW0rvq.js.map → ActivityHistory-BKXIlIOQ.js.map} +1 -1
  3. package/dist/{BookmarksComponent-Cho18tdw.js → BookmarksComponent-CdsRbOva.js} +2 -2
  4. package/dist/{BookmarksComponent-Cho18tdw.js.map → BookmarksComponent-CdsRbOva.js.map} +1 -1
  5. package/dist/{ChartWrapper-SxW9ySdd.js → ChartWrapper-zI_ibAa7.js} +2 -2
  6. package/dist/{ChartWrapper-SxW9ySdd.js.map → ChartWrapper-zI_ibAa7.js.map} +1 -1
  7. package/dist/{DisplayFileInDashboardComponent-DybH5peP.js → DisplayFileInDashboardComponent-wpVndKS1.js} +2 -2
  8. package/dist/{DisplayFileInDashboardComponent-DybH5peP.js.map → DisplayFileInDashboardComponent-wpVndKS1.js.map} +1 -1
  9. package/dist/{ExternalApps-CAgQ4Fj6.js → ExternalApps-Dei3Hn5c.js} +2 -2
  10. package/dist/{ExternalApps-CAgQ4Fj6.js.map → ExternalApps-Dei3Hn5c.js.map} +1 -1
  11. package/dist/{FavoriteList-CIvIXlWH.js → FavoriteList-D3Ngq7DO.js} +88 -69
  12. package/dist/FavoriteList-D3Ngq7DO.js.map +1 -0
  13. package/dist/{MarkdownComponent-ClspMFPD.js → MarkdownComponent-BasmAVLi.js} +2 -2
  14. package/dist/{MarkdownComponent-ClspMFPD.js.map → MarkdownComponent-BasmAVLi.js.map} +1 -1
  15. package/dist/{SearchInput-DqVul-dd.js → SearchInput-QaOq9dC2.js} +2 -2
  16. package/dist/{SearchInput-DqVul-dd.js.map → SearchInput-QaOq9dC2.js.map} +1 -1
  17. package/dist/{UnknownBlockType-GuPCc_3z.js → UnknownBlockType-8WbbZPjA.js} +2 -2
  18. package/dist/{UnknownBlockType-GuPCc_3z.js.map → UnknownBlockType-8WbbZPjA.js.map} +1 -1
  19. package/dist/{index-Bat41R_Q.js → index-DCSuxZbe.js} +12853 -11625
  20. package/dist/index-DCSuxZbe.js.map +1 -0
  21. package/dist/pristy-libvue.css +1 -1
  22. package/dist/pristy-libvue.es.js +200 -194
  23. package/dist/pristy-libvue.umd.js +22 -22
  24. package/dist/pristy-libvue.umd.js.map +1 -1
  25. package/dist/src/components/IconPickerDialog.vue.d.ts +1 -1
  26. package/dist/src/components/classification/AdminClassificationPage.vue.d.ts +9 -2
  27. package/dist/src/components/classification/AdminClassificationPage.vue.d.ts.map +1 -1
  28. package/dist/src/components/classification/ClassificationPlanList.vue.d.ts +7 -1
  29. package/dist/src/components/classification/ClassificationPlanList.vue.d.ts.map +1 -1
  30. package/dist/src/components/classification/FieldForm.vue.d.ts +6 -0
  31. package/dist/src/components/classification/FieldForm.vue.d.ts.map +1 -1
  32. package/dist/src/components/classification/UploadPlanPopup.vue.d.ts.map +1 -1
  33. package/dist/src/components/classification/ViewSelectorPopup.vue.d.ts +2 -0
  34. package/dist/src/components/classification/ViewSelectorPopup.vue.d.ts.map +1 -1
  35. package/dist/src/components/config/ConfigRawEditor.vue.d.ts +80 -0
  36. package/dist/src/components/config/ConfigRawEditor.vue.d.ts.map +1 -0
  37. package/dist/src/components/config/ListVersionConfig.vue.d.ts +20 -13
  38. package/dist/src/components/config/ListVersionConfig.vue.d.ts.map +1 -1
  39. package/dist/src/components/dashboard/DashboardAdminPage.vue.d.ts +59 -4
  40. package/dist/src/components/dashboard/DashboardComponent.vue.d.ts +45 -0
  41. package/dist/src/components/dashboard/editor/BlockConfigEditor.vue.d.ts +6 -3
  42. package/dist/src/components/dashboard/editor/DashboardEditor.vue.d.ts +59 -4
  43. package/dist/src/components/dashboard/editor/DashboardEditor.vue.d.ts.map +1 -1
  44. package/dist/src/components/dashboard/editor/block-configs/ExternalAppsConfig.vue.d.ts +1 -1
  45. package/dist/src/components/dashboard/editor/block-configs/FavoritesConfig.vue.d.ts +3 -1
  46. package/dist/src/components/dashboard/editor/block-configs/FavoritesConfig.vue.d.ts.map +1 -1
  47. package/dist/src/components/dashboard/editor/blockDraft.d.ts +22 -0
  48. package/dist/src/components/dashboard/editor/blockDraft.d.ts.map +1 -0
  49. package/dist/src/components/dashboard/editor/grid/BlockTypeSelector.vue.d.ts +1 -1
  50. package/dist/src/components/dashboard/widgets/FavoriteFileList.vue.d.ts +9 -0
  51. package/dist/src/components/dashboard/widgets/FavoriteFolderList.vue.d.ts +9 -0
  52. package/dist/src/components/dashboard/widgets/FavoriteList.vue.d.ts +36 -0
  53. package/dist/src/components/dashboard/widgets/FavoriteList.vue.d.ts.map +1 -1
  54. package/dist/src/components/dashboard/widgets/FavoriteSiteList.vue.d.ts +9 -0
  55. package/dist/src/components/navigation/ContentCompactTableView.vue.d.ts +18 -0
  56. package/dist/src/components/navigation/ContentCompactTableView.vue.d.ts.map +1 -1
  57. package/dist/src/components/navigation/ContentTableView.vue.d.ts +9 -0
  58. package/dist/src/components/navigation/ContentTableView.vue.d.ts.map +1 -1
  59. package/dist/src/components/navigation/DynamicContentView.vue.d.ts +37 -1
  60. package/dist/src/components/navigation/DynamicContentView.vue.d.ts.map +1 -1
  61. package/dist/src/components/navigation/PreviewPanel.vue.d.ts +2 -0
  62. package/dist/src/components/toast/CustomToastContent.vue.d.ts +1 -1
  63. package/dist/src/components/viewer/ArchiveViewer.vue.d.ts +14 -0
  64. package/dist/src/components/viewer/ArchiveViewer.vue.d.ts.map +1 -0
  65. package/dist/src/components/viewer/PDFComponent.vue.d.ts +2 -0
  66. package/dist/src/components/viewer/PDFComponent.vue.d.ts.map +1 -1
  67. package/dist/src/components/views/PredefinedViewsPanel.vue.d.ts +25 -2
  68. package/dist/src/components/views/PredefinedViewsPanel.vue.d.ts.map +1 -1
  69. package/dist/src/composables/useClassificationPlan.d.ts.map +1 -1
  70. package/dist/src/i18n/index.d.ts +124 -10
  71. package/dist/src/i18n/index.d.ts.map +1 -1
  72. package/dist/src/index.d.ts +5 -1
  73. package/dist/src/index.d.ts.map +1 -1
  74. package/dist/src/services/ArchiveService.d.ts +49 -0
  75. package/dist/src/services/ArchiveService.d.ts.map +1 -0
  76. package/dist/src/services/CapabilitiesService.d.ts +45 -0
  77. package/dist/src/services/CapabilitiesService.d.ts.map +1 -0
  78. package/dist/src/services/IconeService.d.ts.map +1 -1
  79. package/dist/src/services/PdfLinkService.d.ts +51 -0
  80. package/dist/src/services/PdfLinkService.d.ts.map +1 -0
  81. package/dist/src/stores/config.d.ts +9 -0
  82. package/dist/src/stores/config.d.ts.map +1 -1
  83. package/dist/src/stores/favorites.d.ts.map +1 -1
  84. package/dist/src/utils/classificationPlanUtils.d.ts +53 -0
  85. package/dist/src/utils/classificationPlanUtils.d.ts.map +1 -1
  86. package/dist/src/utils/overflowUtils.d.ts +26 -0
  87. package/dist/src/utils/overflowUtils.d.ts.map +1 -0
  88. package/package.json +13 -13
  89. package/dist/FavoriteList-CIvIXlWH.js.map +0 -1
  90. package/dist/index-Bat41R_Q.js.map +0 -1
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Decide how a hyperlink found in a PDF is followed.
3
+ *
4
+ * A link pointing at a page of the running application (same origin, under
5
+ * the router base, matching a route) is followed inside the application;
6
+ * anything else is external.
7
+ *
8
+ * @param {string} url - Hyperlink carried by the PDF annotation
9
+ * @param {Object} context
10
+ * @param {string} context.origin - Origin of the running application
11
+ * @param {string} [context.base] - Router history base, e.g. "/marches"
12
+ * @param {Function} [context.resolve] - Router resolve function
13
+ * @returns {{type: string, url?: string, location?: Object}}
14
+ */
15
+ export function resolvePdfLink(url: string, { origin, base, resolve }?: {
16
+ origin: string;
17
+ base?: string;
18
+ resolve?: Function;
19
+ }): {
20
+ type: string;
21
+ url?: string;
22
+ location?: any;
23
+ };
24
+ /**
25
+ * Page number requested by a route query, clamped to the document.
26
+ *
27
+ * @param {*} value - Raw `page` query value
28
+ * @param {number} pageCount - Number of pages of the document
29
+ * @returns {number|null} null when the value is not a number
30
+ */
31
+ export function clampPage(value: any, pageCount: number): number | null;
32
+ /**
33
+ * Copyright (C) 2022 - Jeci SARL - https://jeci.fr
34
+ *
35
+ * This program is free software: you can redistribute it and/or modify
36
+ * it under the terms of the GNU Affero General Public License as
37
+ * published by the Free Software Foundation, either version 3 of the
38
+ * License, or (at your option) any later version.
39
+ *
40
+ * This program is distributed in the hope that it will be useful,
41
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
42
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43
+ * GNU Affero General Public License for more details.
44
+ *
45
+ * You should have received a copy of the GNU Affero General Public License
46
+ * along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.
47
+ */
48
+ export const LINK_MAILTO: "mailto";
49
+ export const LINK_ROUTE: "route";
50
+ export const LINK_EXTERNAL: "external";
51
+ //# sourceMappingURL=PdfLinkService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PdfLinkService.d.ts","sourceRoot":"","sources":["../../../src/services/PdfLinkService.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;GAaG;AACH,oCAPW,MAAM,8BAEd;IAAwB,MAAM,EAAtB,MAAM;IACW,IAAI,GAArB,MAAM;IACa,OAAO;CAClC,GAAU;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAQ;CAAC,CA+B3D;AAED;;;;;;GAMG;AACH,iCAJW,GAAC,aACD,MAAM,GACJ,MAAM,GAAC,IAAI,CAQvB;AA/ED;;;;;;;;;;;;;;;GAeG;AAEH,0BAA2B,QAAQ,CAAC;AACpC,yBAA0B,OAAO,CAAC;AAClC,4BAA6B,UAAU,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { StoreDefinition, PiniaCustomStateProperties } from 'pinia';
2
+ /** Configuration scope holding the keys shared by every application of an instance. */
3
+ export const COMMON_CONFIG_SCOPE: "common";
2
4
  export const useConfigStore: StoreDefinition<"ConfigStore", {
3
5
  INSTANCE_NAME: string;
4
6
  BASE_URL: string;
@@ -328,5 +330,12 @@ export const useConfigStore: StoreDefinition<"ConfigStore", {
328
330
  * @return {Promise<void>}
329
331
  */
330
332
  initWithApp(app: any, BASE_URL: any): Promise<void>;
333
+ /**
334
+ * Patch the store with a configuration file held by the repository.
335
+ *
336
+ * @param {string} scope configuration folder name, an application name or COMMON_CONFIG_SCOPE
337
+ * @return {Promise<void>} resolved even when the scope declares no configuration
338
+ */
339
+ loadRepositoryConfig(scope: string): Promise<void>;
331
340
  }>;
332
341
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/stores/config.js"],"names":[],"mappings":";AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkMI;;;;;;;;;;OAUG;gCADU,OAAO;;;IASpB;;OAEG;;IAkBH;;;;;OAKG;0CADS,OAAO,CAAC,IAAI,CAAC;GAiC1B"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/stores/config.js"],"names":[],"mappings":";AAuBA,uFAAuF;AACvF,kCAAmC,QAAQ,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkMI;;;;;;;;;;OAUG;gCADU,OAAO;;;IASpB;;OAEG;;IAkBH;;;;;OAKG;0CADS,OAAO,CAAC,IAAI,CAAC;IAoBzB;;;;;OAKG;gCAFQ,MAAM,GACL,OAAO,CAAC,IAAI,CAAC;GAkB1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"favorites.d.ts","sourceRoot":"","sources":["../../../src/stores/favorites.js"],"names":[],"mappings":";AAmGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;;;;;OAKG;0BAFQ,OAAO,GACL,OAAO,OAAO;IA8E3B;;;;;;;;;OASG;6BADU,OAAO,CAAC,MAAM,CAAC;IAyC5B;;;OAGG;;IAKH;;;OAGG;wCADQ,MAAM;IAQjB;;OAEG;;GAUJ"}
1
+ {"version":3,"file":"favorites.d.ts","sourceRoot":"","sources":["../../../src/stores/favorites.js"],"names":[],"mappings":";AAqGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;;;;;OAKG;0BAFQ,OAAO,GACL,OAAO,OAAO;IAyE3B;;;;;;;;;OASG;6BADU,OAAO,CAAC,MAAM,CAAC;IAyC5B;;;OAGG;;IAKH;;;OAGG;wCADQ,MAAM;IAQjB;;OAEG;;GAUJ"}
@@ -1,3 +1,36 @@
1
+ /**
2
+ * Parse a number format code, modelled on LibreOffice Calc format codes.
3
+ * `0` is a mandatory digit (padding), `#` an optional one, a space, dot or
4
+ * apostrophe between placeholders groups thousands, and the decimal separator
5
+ * is a comma, or a dot when the code holds no comma. Text around the number,
6
+ * optionally quoted, is rendered before or after it.
7
+ * @param {string} code - e.g. "000" or "# ##0,00 €"
8
+ * @returns {{minIntegerDigits: number, thousandsSeparator: string|null, decimals: number, decimalSeparator: string|null, before: string, after: string}|null}
9
+ * null when the code is blank or invalid
10
+ */
11
+ export function parseNumberFormat(code: string): {
12
+ minIntegerDigits: number;
13
+ thousandsSeparator: string | null;
14
+ decimals: number;
15
+ decimalSeparator: string | null;
16
+ before: string;
17
+ after: string;
18
+ } | null;
19
+ /**
20
+ * Render a number with a format returned by parseNumberFormat.
21
+ * Rounding is half away from zero.
22
+ * @param {number|string} value - a number or a numeric string
23
+ * @param {Object} format - a parsed number format
24
+ * @returns {string|null} null when the value is not a finite number
25
+ */
26
+ export function formatNumber(value: number | string, format: any): string | null;
27
+ /**
28
+ * Read back a number rendered by formatNumber with the same format.
29
+ * @param {string} text - e.g. "1 234,50 €"
30
+ * @param {Object} format - a parsed number format
31
+ * @returns {number|null} null when the text does not follow the format
32
+ */
33
+ export function parseFormattedNumber(text: string, format: any): number | null;
1
34
  /**
2
35
  * Parse a field value into a Date expressed in the browser's own time zone.
3
36
  * @param {*} value - a Date, or a string to be validated by re-parsing
@@ -94,4 +127,24 @@ export function detectNatureFromFilename(filename: string, natures: any[], field
94
127
  nature: any;
95
128
  extractedMetadata: any;
96
129
  } | null;
130
+ /**
131
+ * Views of a plan category, in the order the category lists them.
132
+ *
133
+ * @param {Array<{filename: string}>} views loaded view definitions
134
+ * @param {string[]} [filenames] view files of the category, in display order
135
+ * @returns {Array} the matching views, each listed once
136
+ */
137
+ export function selectCategoryViews(views: Array<{
138
+ filename: string;
139
+ }>, filenames?: string[]): any[];
140
+ /**
141
+ * Checks the id typed for a new plan category.
142
+ *
143
+ * @param {string} id the id to create
144
+ * @param {Array<{id: string}>} [categories] existing categories of the plan
145
+ * @returns {"required"|"duplicate"|null} the reason for refusing it, or null
146
+ */
147
+ export function validateNewCategoryId(id: string, categories?: Array<{
148
+ id: string;
149
+ }>): "required" | "duplicate" | null;
97
150
  //# sourceMappingURL=classificationPlanUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classificationPlanUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/classificationPlanUtils.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,sCAHW,GAAC,GACC,IAAI,GAAC,IAAI,CA8BrB;AAED;;;;;;;;GAQG;AACH,wCAJW,GAAC,mBAEC,MAAM,CAgBlB;AAED;;;;;GAKG;AACH,2CAHW,MAAM,GACJ,MAAM,EAAE,CASpB;AAED;;;;;;;;;GASG;AACH,0CALW,MAAM,gCAGJ,MAAM,CAkClB;AAED;;;;;;;GAOG;AACH,wCAHW,MAAM,GACJ;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAYtE;AAED;;;;;;;;GAQG;AACH,+CALW,MAAM,aACN,MAAM,aACN,MAAM,GACJ,MAAM,CAOlB;AAED;;;;;GAKG;AACH,+CAJW,MAAM,EAAE,iBACR,MAAM,EAAE,GACN,MAAM,EAAE,CA4CpB;AAED;;;;;;GAMG;AACH,6CAJW,MAAM,YACN,GAAG,CAAC,MAAM,MAAS,GACjB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,KAAK,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;CAAE,GAAG,IAAI,CA0D/F;AAED;;;;;GAKG;AACH,qDAHW,MAAM,GACJ,MAAM,CAKlB;AAED;;;;;;GAMG;AACH,mDALW,MAAM,kCAGJ;IAAE,MAAM,MAAS;IAAC,iBAAiB,MAAQ;CAAE,GAAG,IAAI,CAoDhE"}
1
+ {"version":3,"file":"classificationPlanUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/classificationPlanUtils.js"],"names":[],"mappings":"AAiEA;;;;;;;;;GASG;AACH,wCAJW,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CAKlB;AAED;;;;;;GAMG;AACH,mDALW,MAAM,kCAGJ;IAAE,MAAM,MAAS;IAAC,iBAAiB,MAAQ;CAAE,GAAG,IAAI,CAuDhE;AAED;;;;;;GAMG;AACH,2CAJW,KAAK,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC,cACzB,MAAM,EAAE,SASlB;AAED;;;;;;GAMG;AACH,0CAJW,MAAM,eACN,KAAK,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,CAAC,GACjB,UAAU,GAAC,WAAW,GAAC,IAAI,CAWvC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Number of items that fit on one line.
3
+ *
4
+ * @param {number[]} widths rendered width of each item, in order
5
+ * @param {number} available width of the container
6
+ * @param {number} gap space between two items
7
+ * @param {number} moreWidth width of the overflow button
8
+ * @param {number} [reserved=0] width already taken by fixed items
9
+ * @returns {number} items.length when everything fits, otherwise the count
10
+ * that fits beside the overflow button
11
+ */
12
+ export function countFittingItems(widths: number[], available: number, gap: number, moreWidth: number, reserved?: number): number;
13
+ /**
14
+ * Splits items into visible and hidden ones, keeping the selected item visible.
15
+ *
16
+ * @param {Array} items all items, in display order
17
+ * @param {number} visibleCount number of visible slots
18
+ * @param {*} selectedKey key of the selected item, or null
19
+ * @param {Function} [keyOf] returns the key of an item
20
+ * @returns {{visible: Array, hidden: Array}}
21
+ */
22
+ export function orderWithSelected(items: any[], visibleCount: number, selectedKey: any, keyOf?: Function): {
23
+ visible: any[];
24
+ hidden: any[];
25
+ };
26
+ //# sourceMappingURL=overflowUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overflowUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/overflowUtils.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;GAUG;AACH,0CARW,MAAM,EAAE,aACR,MAAM,OACN,MAAM,aACN,MAAM,aACN,MAAM,GACJ,MAAM,CA6BlB;AAED;;;;;;;;GAQG;AACH,8DALW,MAAM,eACN,GAAC,qBAEC;IAAC,OAAO,QAAQ;IAAC,MAAM,QAAO;CAAC,CAsB3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pristy/pristy-libvue",
3
- "version": "2.19.0",
3
+ "version": "2.21.0",
4
4
  "description": "Core library used by all Pristy applications",
5
5
  "homepage": "https://pristy.fr/en/",
6
6
  "author": "JECI SARL",
@@ -41,7 +41,7 @@
41
41
  "peerDependencies": {
42
42
  "@codemirror/autocomplete": "^6.20.3",
43
43
  "@codemirror/collab": "^6.1.1",
44
- "@codemirror/commands": "^6.11.0",
44
+ "@codemirror/commands": "^6.11.1",
45
45
  "@codemirror/lang-html": "^6.4.12",
46
46
  "@codemirror/lang-json": "^6.0.2",
47
47
  "@codemirror/lang-markdown": "^6.5.2",
@@ -52,13 +52,13 @@
52
52
  "@codemirror/lint": "^6.9.7",
53
53
  "@codemirror/merge": "^6.12.2",
54
54
  "@codemirror/search": "^6.7.2",
55
- "@codemirror/state": "^6.7.4",
55
+ "@codemirror/state": "^6.7.6",
56
56
  "@codemirror/theme-one-dark": "^6.1.3",
57
- "@codemirror/view": "^6.43.11",
57
+ "@codemirror/view": "^6.43.13",
58
58
  "codemirror": "6.0.2",
59
59
  "remixicon": "^4.9.1",
60
- "vue": "^3.5.42",
61
- "vue-i18n": "^11.4.10",
60
+ "vue": "^3.5.43",
61
+ "vue-i18n": "^11.4.12",
62
62
  "vue-router": "^4.6.4"
63
63
  },
64
64
  "overrides": {
@@ -74,7 +74,7 @@
74
74
  "asn1js": "^3.0.10",
75
75
  "async-retry": "^1.3.3",
76
76
  "axios": "^1.20.0",
77
- "dompurify": "^3.4.15",
77
+ "dompurify": "^3.4.16",
78
78
  "email-validator": "^2.0.4",
79
79
  "highlight.js": "^11.12.0",
80
80
  "jszip": "^3.10.2",
@@ -85,7 +85,7 @@
85
85
  "p-limit": "^6.2.0",
86
86
  "pdf-lib": "^1.17.1",
87
87
  "pinia": "^2.3.1",
88
- "pkijs": "^3.4.0",
88
+ "pkijs": "^3.4.1",
89
89
  "primevue": "^4.5.5",
90
90
  "quick-lru": "^7.3.0",
91
91
  "sanitize-html": "^2.17.7",
@@ -96,17 +96,17 @@
96
96
  "@codemirror/collab": "^6.1.1",
97
97
  "@eslint/js": "^10.0.1",
98
98
  "@vitejs/plugin-legacy": "^7.2.1",
99
- "@vitejs/plugin-vue": "^6.0.8",
99
+ "@vitejs/plugin-vue": "^6.0.9",
100
100
  "@vitest/coverage-v8": "^5.0.0",
101
- "@vue/test-utils": "^2.5.0",
102
- "eslint": "^10.10.0",
101
+ "@vue/test-utils": "^2.5.1",
102
+ "eslint": "^10.11.0",
103
103
  "eslint-plugin-prettier": "^5.5.6",
104
104
  "eslint-plugin-vue": "^10.11.0",
105
105
  "globals": "^17.12.0",
106
106
  "jsdom": "^27.4.0",
107
- "prettier": "^3.9.6",
107
+ "prettier": "^3.9.9",
108
108
  "rollup-plugin-visualizer": "^6.0.11",
109
- "sass": "^1.104.0",
109
+ "sass": "^1.105.0",
110
110
  "svgo": "^4.1.0",
111
111
  "typescript": "^6.0.3",
112
112
  "vite": "^7.3.6",
@@ -1 +0,0 @@
1
- {"version":3,"file":"FavoriteList-CIvIXlWH.js","sources":["../src/components/dashboard/widgets/FavoriteFileList.vue","../src/components/dashboard/widgets/FavoriteFolderList.vue","../src/components/dashboard/widgets/FavoriteSiteList.vue","../src/components/dashboard/widgets/FavoriteList.vue"],"sourcesContent":["<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"file-grid-container\" v-if=\"favoriteFiles.length > 0\">\n <button\n v-for=\"file in favoriteFiles\"\n :key=\"file.id\"\n class=\"file-card\"\n @click=\"navigateTo(file)\"\n :aria-label=\"file.title || file.name\"\n >\n <div class=\"file-card-row\">\n <i\n :class=\"getIconClass(file.mimeType)\"\n class=\"file-icon\"\n aria-hidden=\"true\"\n ></i>\n <div class=\"file-info\">\n <div\n class=\"file-name\"\n v-tooltip.bottom=\"file.description || file.title || file.name\"\n >\n {{ file.title || file.name }}\n </div>\n <div v-if=\"file.title\" class=\"file-secondary-name\">\n {{ file.name }}\n </div>\n </div>\n </div>\n </button>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteFile\") }}</div>\n</template>\n\n<script>\nimport { useCollaboraStore } from \"@/stores/collabora\";\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteFileList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteFiles() {\n return this.favorites\n .map((fav) => fav.target.file)\n .filter((file) => file !== undefined && file !== null)\n .filter((file) => this.matchesSite(file))\n .sort((a, b) => a.name.localeCompare(b.name));\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.fileFavorites;\n })\n .catch((err) => {\n console.error(\"Error loading favorites:\", err);\n });\n },\n methods: {\n matchesSite(node) {\n if (!this.siteId) {\n return true;\n }\n const siteElement = node.path?.elements?.find(\n (el) => el.nodeType === \"st:site\",\n );\n return siteElement?.name === this.siteId;\n },\n getIconClass(mimeType) {\n if (!mimeType) {\n return \"ri-file-line\";\n }\n if (mimeType === \"application/pdf\") {\n return \"ri-file-pdf-line\";\n }\n if (\n mimeType.includes(\"word\") ||\n mimeType.includes(\"opendocument.text\") ||\n mimeType === \"application/rtf\"\n ) {\n return \"ri-file-word-line\";\n }\n if (mimeType.includes(\"excel\") || mimeType.includes(\"spreadsheet\")) {\n return \"ri-file-excel-line\";\n }\n if (\n mimeType.includes(\"powerpoint\") ||\n mimeType.includes(\"presentation\")\n ) {\n return \"ri-file-ppt-line\";\n }\n if (mimeType.startsWith(\"image/\")) {\n return \"ri-image-line\";\n }\n if (mimeType.startsWith(\"video/\")) {\n return \"ri-video-line\";\n }\n if (mimeType.startsWith(\"audio/\")) {\n return \"ri-music-line\";\n }\n if (\n mimeType.includes(\"zip\") ||\n mimeType.includes(\"tar\") ||\n mimeType.includes(\"compressed\")\n ) {\n return \"ri-file-zip-line\";\n }\n if (\n mimeType.startsWith(\"text/\") ||\n mimeType === \"application/json\" ||\n mimeType === \"application/xml\"\n ) {\n return \"ri-file-text-line\";\n }\n if (mimeType === \"message/rfc822\") {\n return \"ri-mail-line\";\n }\n return \"ri-file-line\";\n },\n navigateTo(file) {\n const collaboraStore = useCollaboraStore();\n let destinationName = \"\";\n if (\n file.mimeType === \"image/vnd.dxf\" ||\n file.mimeType === \"image/vnd.dwg\" ||\n file.mimeType === \"message/rfc822\"\n ) {\n destinationName = \"pdf\";\n } else if (file.mimeType.startsWith(\"image/\")) {\n destinationName = \"image\";\n } else if (file.mimeType.startsWith(\"video/\")) {\n destinationName = \"video\";\n } else if (\n file.mimeType.startsWith(\"text/x-markdown\") ||\n file.mimeType.startsWith(\"text/x-web-markdown\")\n ) {\n destinationName = \"md\";\n } else if (file.mimeType.startsWith(\"text/html\")) {\n destinationName = \"html\";\n } else if (file.mimeType.startsWith(\"text/plain\")) {\n destinationName = \"text\";\n } else if (file.mimeType === \"application/pdf\") {\n destinationName = \"pdf\";\n } else {\n if (collaboraStore.checkIfExists(file.mimeType, \"edit\")) {\n destinationName = \"edit\";\n }\n if (collaboraStore.checkIfExists(file.mimeType, \"view\")) {\n destinationName = \"view\";\n }\n if (collaboraStore.checkIfExists(file.mimeType, \"view_comment\")) {\n destinationName = \"view_comment\";\n }\n }\n if (this.urlResolver) {\n this.urlResolver(file);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/${destinationName}/${file.id}`,\n \"_blank\",\n );\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.file-grid-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n}\n\n.file-card {\n background-color: var(--p-content-background);\n padding: 1rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n transition:\n border-color 0.2s,\n box-shadow 0.2s;\n}\n\n.file-card:hover {\n border-color: var(--p-primary-color);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.file-card:focus-visible {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n}\n\n.file-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.file-icon {\n font-size: 1.5rem;\n color: var(--p-primary-color);\n flex-shrink: 0;\n}\n\n.file-info {\n min-width: 0;\n overflow: hidden;\n}\n\n.file-info > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.file-name {\n font-weight: 500;\n font-size: 0.875rem;\n}\n\n.file-secondary-name {\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin-top: 0.25rem;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"folder-grid-container\" v-if=\"favoriteFolders.length > 0\">\n <button\n v-for=\"folder in favoriteFolders\"\n :key=\"folder.id\"\n class=\"folder-card\"\n @click=\"navigateTo(folder)\"\n :aria-label=\"folder.name\"\n >\n <div class=\"folder-card-row\">\n <i class=\"ri-folder-line folder-icon\" aria-hidden=\"true\"></i>\n <div class=\"folder-info\">\n <div class=\"folder-name\" v-tooltip.bottom=\"folder.name\">\n {{ folder.name }}\n </div>\n </div>\n </div>\n </button>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteFolder\") }}</div>\n</template>\n\n<script>\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteFolderList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteFolders() {\n return this.favorites\n .map((fav) => fav.target.folder)\n .filter((folder) => folder !== undefined && folder !== null)\n .filter((folder) => this.matchesSite(folder))\n .sort((a, b) => a.name.localeCompare(b.name));\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.folderFavorites;\n })\n .catch((err) => {\n console.error(\"Error loading favorites:\", err);\n });\n },\n methods: {\n matchesSite(node) {\n if (!this.siteId) {\n return true;\n }\n const siteElement = node.path?.elements?.find(\n (el) => el.nodeType === \"st:site\",\n );\n return siteElement?.name === this.siteId;\n },\n navigateTo(folder) {\n if (this.urlResolver) {\n this.urlResolver(folder);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/mes-espaces/dossier/${folder.id}`,\n \"_blank\",\n );\n }\n },\n },\n};\n</script>\n\n<style scoped>\n.folder-grid-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n}\n\n.folder-card {\n background-color: var(--p-content-background);\n padding: 1rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n border: 1px solid var(--p-content-border-color);\n cursor: pointer;\n text-align: left;\n font-family: inherit;\n font-size: inherit;\n color: inherit;\n transition:\n border-color 0.2s,\n box-shadow 0.2s;\n}\n\n.folder-card:hover {\n border-color: var(--p-primary-color);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.folder-card:focus-visible {\n outline: 2px solid var(--p-primary-color);\n outline-offset: 2px;\n}\n\n.folder-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.folder-icon {\n font-size: 1.5rem;\n color: var(--p-primary-color);\n flex-shrink: 0;\n}\n\n.folder-info {\n min-width: 0;\n overflow: hidden;\n}\n\n.folder-info > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.folder-name {\n font-weight: 500;\n font-size: 0.875rem;\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div class=\"site-grid-container\" v-if=\"favoriteSites.length > 0\">\n <div v-for=\"site in favoriteSites\" :key=\"site.id\" class=\"site-card\">\n <div class=\"site-card-row\">\n <span\n class=\"visibility-dot\"\n :class=\"'visibility-dot--' + getVisibilitySeverity(site.visibility)\"\n :aria-label=\"getVisibilityLabel(site.visibility)\"\n v-tooltip.bottom=\"getVisibilityLabel(site.visibility)\"\n ></span>\n <div>\n <div\n class=\"site-title\"\n @click=\"goToSite(site)\"\n v-tooltip.bottom=\"site.title\"\n >\n {{ site.title }}\n </div>\n <div class=\"site-description\">\n {{ site.description || \"Aucune description\" }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div v-else>{{ $t(\"emptyFavoriteSite\") }}</div>\n</template>\n\n<script>\nimport { useConfigStore } from \"@/stores/config\";\nimport { useFavoritesStore } from \"@/stores/favorites\";\nimport { mapState } from \"pinia\";\nimport Tooltip from \"primevue/tooltip\";\n\nexport default {\n name: \"FavoriteSiteList\",\n directives: {\n tooltip: Tooltip,\n },\n props: {\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n favorites: [],\n };\n },\n methods: {\n getSite(fav) {\n return fav.target.site;\n },\n goToSite(site) {\n if (this.urlResolver) {\n this.urlResolver(site);\n } else {\n window.open(\n `${this.ESPACES_HOST}/espaces/mes-espaces/${site.id}`,\n \"_blank\",\n );\n }\n },\n getVisibilityLabel(visibility) {\n switch (visibility) {\n case \"PUBLIC\":\n return \"Public\";\n case \"PRIVATE\":\n return \"Privé\";\n case \"MODERATED\":\n return \"Modéré\";\n default:\n return \"Inconnu\";\n }\n },\n getVisibilitySeverity(visibility) {\n switch (visibility) {\n case \"PUBLIC\":\n return \"success\"; // vert\n case \"PRIVATE\":\n return \"danger\"; // rouge\n case \"MODERATED\":\n return \"warning\"; // orange\n default:\n return \"info\";\n }\n },\n },\n mounted() {\n const favoritesStore = useFavoritesStore();\n favoritesStore\n .loadFavorites()\n .then(() => {\n this.favorites = favoritesStore.siteFavorites;\n })\n .catch((err) => {\n console.error(\"Erreur lors du chargement des favoris:\", err);\n });\n },\n computed: {\n ...mapState(useConfigStore, [\"ESPACES_HOST\"]),\n favoriteSites() {\n // Parcours chaque favorite, récupère target.site si existant\n return this.favorites\n .map((fav) => this.getSite(fav))\n .filter((site) => site !== undefined && site !== null)\n .sort((a, b) => a.title.localeCompare(b.title));\n },\n },\n};\n</script>\n<style scoped>\n.site-grid-container {\n display: grid;\n gap: 0.5rem;\n grid-template-columns: 1fr;\n}\n\n.site-card {\n background-color: var(--p-content-background);\n padding: 0.5rem 0.75rem;\n border-radius: 0.75rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.site-card-row {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.site-title {\n display: flex;\n font-weight: 500;\n font-size: 0.875rem;\n cursor: pointer;\n}\n\n.site-description {\n display: flex;\n font-size: 0.75rem;\n color: var(--p-text-muted-color);\n margin-top: 0.25rem;\n}\n\n.visibility-dot {\n width: 0.75rem;\n height: 0.75rem;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.visibility-dot--success {\n background-color: var(--p-green-500);\n}\n\n.visibility-dot--danger {\n background-color: var(--p-red-500);\n}\n\n.visibility-dot--warning {\n background-color: var(--p-orange-500);\n}\n\n.visibility-dot--info {\n background-color: var(--p-blue-500);\n}\n</style>\n","<!--\n Copyright (C) 2022 - Jeci SARL - https://jeci.fr\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as\n published by the Free Software Foundation, either version 3 of the\n License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see https://www.gnu.org/licenses/agpl-3.0.html.\n-->\n\n<template>\n <div>\n <p v-if=\"siteTitle\" class=\"site-title-label\">\n {{ siteTitle }}\n </p>\n <FavoriteFileList\n v-if=\"filter === 'file'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n />\n <FavoriteFolderList\n v-else-if=\"filter === 'folder'\"\n :site-id=\"siteId\"\n :url-resolver=\"urlResolver\"\n />\n <FavoriteSiteList\n v-else-if=\"filter === 'site'\"\n :url-resolver=\"urlResolver\"\n />\n </div>\n</template>\n\n<script>\nimport FavoriteFileList from \"@/components/dashboard/widgets/FavoriteFileList.vue\";\nimport FavoriteFolderList from \"@/components/dashboard/widgets/FavoriteFolderList.vue\";\nimport FavoriteSiteList from \"@/components/dashboard/widgets/FavoriteSiteList.vue\";\nimport workspaceService from \"@/services/WorkspaceService.js\";\n\nexport default {\n name: \"FavoriteList\",\n components: {\n FavoriteFileList,\n FavoriteFolderList,\n FavoriteSiteList,\n },\n props: {\n filter: {\n type: String,\n default: \"file\",\n validator: (value) => [\"file\", \"folder\", \"site\"].includes(value),\n },\n siteId: {\n type: String,\n default: \"\",\n },\n urlResolver: {\n type: Function,\n default: null,\n },\n },\n data() {\n return {\n siteTitle: \"\",\n };\n },\n watch: {\n siteId: {\n immediate: true,\n handler(newSiteId) {\n this.resolveSiteTitle(newSiteId);\n },\n },\n },\n methods: {\n resolveSiteTitle(siteId) {\n if (!siteId) {\n this.siteTitle = \"\";\n return;\n }\n workspaceService\n .getWorkspace(siteId)\n .then((site) => {\n this.siteTitle = site.title || site.id;\n })\n .catch(() => {\n this.siteTitle = siteId;\n });\n },\n },\n};\n</script>\n\n<style scoped>\n.site-title-label {\n margin-top: 0;\n margin-bottom: 0.5rem;\n font-size: 0.875rem;\n color: var(--p-text-muted-color);\n}\n</style>\n"],"names":["_sfc_main","Tooltip","mapState","useConfigStore","fav","file","a","b","favoritesStore","useFavoritesStore","err","node","el","mimeType","collaboraStore","useCollaboraStore","destinationName","_hoisted_3","_hoisted_4","_hoisted_5","$options","_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","$event","_createElementVNode","_withDirectives","_createTextVNode","_toDisplayString","_hoisted_6","_ctx","folder","site","visibility","_hoisted_2","FavoriteFileList","FavoriteFolderList","FavoriteSiteList","value","newSiteId","siteId","workspaceService","$data","$props","_createBlock","_component_FavoriteFileList","_component_FavoriteFolderList","_component_FavoriteSiteList"],"mappings":";;;;AAwDA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,SAASC;AAAA;EAEX,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;EAGb,OAAO;AACL,WAAO;AAAA,MACL,WAAW,CAAA;AAAA;EAEf;AAAA,EACA,UAAU;AAAA,IACR,GAAGC,EAASC,GAAgB,CAAC,cAAc,CAAC;AAAA,IAC5C,gBAAgB;AACd,aAAO,KAAK,UACT,IAAI,CAACC,MAAQA,EAAI,OAAO,IAAI,EAC5B,OAAO,CAACC,MAA+BA,KAAS,IAAI,EACpD,OAAO,CAACA,MAAS,KAAK,YAAYA,CAAI,CAAC,EACvC,KAAK,CAACC,GAAGC,MAAMD,EAAE,KAAK,cAAcC,EAAE,IAAI,CAAC;AAAA,IAChD;AAAA;EAEF,UAAU;AACR,UAAMC,IAAiBC,EAAiB;AACxC,IAAAD,EACG,cAAa,EACb,KAAK,MAAM;AACV,WAAK,YAAYA,EAAe;AAAA,IAClC,CAAC,EACA,MAAM,CAACE,MAAQ;AACd,cAAQ,MAAM,4BAA4BA,CAAG;AAAA,IAC/C,CAAC;AAAA,EACL;AAAA,EACA,SAAS;AAAA,IACP,YAAYC,GAAM;AAChB,aAAK,KAAK,SAGUA,EAAK,MAAM,UAAU;AAAA,QACvC,CAACC,MAAOA,EAAG,aAAa;AAAA,SAEN,SAAS,KAAK,SALzB;AAAA,IAMX;AAAA,IACA,aAAaC,GAAU;AACrB,aAAKA,IAGDA,MAAa,oBACR,qBAGPA,EAAS,SAAS,MAAM,KACxBA,EAAS,SAAS,mBAAmB,KACrCA,MAAa,oBAEN,sBAELA,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