@pristy/pristy-libvue 1.14.4 → 1.15.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/README.md CHANGED
@@ -1,35 +1,100 @@
1
1
  # Pristy Libvue
2
2
 
3
- Code factoring for Pristy
3
+ Shared Vue 3 component library for the [Pristy](https://pristy.fr/) ECM suite. Provides reusable components, services, stores, composables, and plugins used across all Pristy frontend applications.
4
4
 
5
- ## Developing with Pristy-libvue
5
+ ## Installation
6
6
 
7
- Add `@pristy/pristy-libvue` package.
7
+ ```bash
8
+ npm install @pristy/pristy-libvue
9
+ ```
10
+
11
+ ## Usage
8
12
 
9
- Then call the available classes where necessary. Be careful, there is no default class, you must use {} in the import.
13
+ All exports use named imports:
10
14
 
11
- ```vue
12
- import { AlfrescoFileService } from "@pristy/pristy-libvue"
15
+ ```js
16
+ import { alfrescoFileService, useUserStore, TreeExplorer } from "@pristy/pristy-libvue"
13
17
  ```
14
18
 
15
- ## Dev locally
19
+ ### What's included
20
+
21
+ | Category | Examples | Count |
22
+ |---|---|---|
23
+ | **Components** | `TreeExplorer`, `PDFComponent`, `DynamicContentView`, `CopyOrMovePopup`, `AdvancedSearchPanel`, `ChatPanel` | ~45 |
24
+ | **Services** | `alfrescoFileService`, `alfrescoNodeService`, `configService`, `workspaceService`, `errorService` | ~20 |
25
+ | **Stores** (Pinia) | `useUserStore`, `useConfigStore`, `useNavigationStore`, `useFavoritesStore`, `useSearchStore` | ~15 |
26
+ | **Composables** | `useCodeMirror`, `useMarkdownPreview`, `useCollabEditor`, `useCollabWebSocket` | 5 |
27
+ | **Pages** | `LoginPage`, `NotFoundPages`, `ErrorPage` | 3 |
28
+ | **Plugins** | `vueKeyCloak` | 1 |
29
+
30
+ See [`src/index.js`](src/index.js) for the full list of exports.
31
+
32
+ ## Peer Dependencies
33
+
34
+ These must be installed by the consuming application:
16
35
 
17
- 1. In prity-libvue
36
+ | Package | Version |
37
+ |---|---|
38
+ | `vue` | ^3.5 |
39
+ | `vue-i18n` | ^11.3 |
40
+ | `vue-router` | ^4.6 |
41
+ | `@codemirror/*` | ^6.x (14 packages) |
42
+ | `codemirror` | 6.0.2 |
18
43
 
44
+ ## Local Development
45
+
46
+ ### Build the library
47
+
48
+ ```bash
49
+ npm install
50
+ npm run build:library
19
51
  ```
52
+
53
+ ### Link locally to another Pristy app
54
+
55
+ ```bash
56
+ # In pristy-libvue
20
57
  npm link
58
+
59
+ # In the consuming app (e.g. pristy-espaces)
60
+ npm link ../pristy-libvue
61
+ npm run dev.link # Uses vite.config.link.js
21
62
  ```
22
63
 
23
- 2. In another pristy application
64
+ After any change to pristy-libvue, rebuild with `npm run build:library` (or use `npm run build:dev` for watch mode with source maps).
24
65
 
25
- ```
26
- npm link <local directory off pristy-libvue>
27
- ```
66
+ ### Available scripts
28
67
 
29
- The library needs to be built by vite to be usable locally.
68
+ | Script | Description |
69
+ |---|---|
70
+ | `npm run build:library` | Production build (ESM + UMD + CSS + .d.ts) |
71
+ | `npm run build:dev` | Watch mode build with source maps |
72
+ | `npm run analyze` | Bundle size analysis (opens stats.html) |
73
+ | `npm run lint` | Lint and auto-fix with ESLint |
74
+ | `npm run check` | Lint without fixing (CI mode) |
75
+ | `npm run format` | Format with Prettier |
76
+ | `npm run test` | Run tests with Vitest |
77
+ | `npm run coverage` | Generate test coverage report |
30
78
 
31
- ```
32
- npm run build:library
33
- ```
79
+ ## Architecture
80
+
81
+ The library follows a **Services → Stores → Components** pattern:
82
+
83
+ - **Services** (`src/services/`): Stateless modules handling API calls and business logic
84
+ - **Stores** (`src/stores/`): Pinia stores managing session state
85
+ - **Components** (`src/components/`): UI presentation consuming stores
86
+ - **Composables** (`src/composables/`): Reusable composition functions (CodeMirror, Markdown, WebSocket)
87
+
88
+ ## Conventions
89
+
90
+ - **Icons**: Remixicon only (`ri-*` classes). No PrimeIcons.
91
+ - **i18n**: All user-facing strings must use `$t('key')`. No hardcoded text.
92
+ - **Imports**: Use `@/` alias for all internal imports. Never import from `@/index.js` internally.
93
+ - **License**: Every `.vue` and `.js` file must include the AGPL-3.0 header.
94
+ - **Comments**: English only.
95
+
96
+ See the root [`CLAUDE.md`](../CLAUDE.md) for the full convention reference.
97
+
98
+ ## License
34
99
 
35
- The pristy-libvue package of the package.json will be overloaded by the local library.
100
+ [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html) - Copyright (C) 2022 [Jeci SARL](https://jeci.fr)
@@ -167,8 +167,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
167
167
  }>> & Readonly<{
168
168
  onReload?: (...args: any[]) => any;
169
169
  }>, {
170
- canUpload: boolean;
171
170
  versionId: string;
171
+ canUpload: boolean;
172
172
  showTitle: boolean;
173
173
  showButtons: boolean;
174
174
  }, {}, {
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, ComponentProvideOptions } from 'vue';
2
+ import { SavedView, ViewLocation, ViewCriterion } from '../../stores/userView.js';
2
3
  import { ResultSetPaging } from '@alfresco/js-api';
3
4
  import { default as __DTS_DEFAULT_0__ } from 'primevue/togglebutton';
4
5
  import { default as __DTS_DEFAULT_1__ } from 'primevue/dropdown';
@@ -1 +1 @@
1
- {"version":3,"file":"AdvancedSearchPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search/AdvancedSearchPanel.vue"],"names":[],"mappings":";;;;;;;;;;;;AAiNA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAodA,KAlX+C,CAkX/C,aAjXC;;;;;;;;;;;6BAiXD,M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;;;;;;;;;;8BAkMrD,KApX+C,CAoX/C,aAnXC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA0XqB,oBAAoB;yBACjB,uBAAuB;yBAEvB,uBAAuB;sBAC1B,oBAAoB;mBACvB,iBAAiB;mBAGjB,iBAAiB"}
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ExtractPropTypes } from 'vue';
2
+ import { SavedView, ViewLocation, ViewCriterion } from '../../stores/userView.js';
2
3
  import { default as __DTS_DEFAULT_0__ } from 'primevue/dropdown';
3
4
  import { default as __DTS_DEFAULT_1__ } from 'primevue/calendar';
4
5
  import { default as __DTS_DEFAULT_2__ } from 'primevue/inputnumber';
@@ -1 +1 @@
1
- {"version":3,"file":"AdvancedViewPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search/AdvancedViewPanel.vue"],"names":[],"mappings":";;;;;;;;;;AA6SA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAylBA,KAjfqC,CAifrC,aAhfY;;;;;;;;;;;6BAgfZ,MAlXU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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iBAAiB"}
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { SavedView, ViewLocation, ViewCriterion } from '../../stores/userView.js';
2
3
  declare const _default: DefineComponent<{}, {}, {}, {
3
4
  [x: string]: () => never;
4
5
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"FavoriteViewMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search/FavoriteViewMenu.vue"],"names":[],"mappings":";AA6CA;;;;IA4GI;;;OAGG"}
1
+ {"version":3,"file":"FavoriteViewMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search/FavoriteViewMenu.vue"],"names":[],"mappings":";;AA6CA;;;;IA4GI;;;OAGG"}
@@ -1 +1 @@
1
- {"version":3,"file":"SaveViewPopup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search/SaveViewPopup.vue"],"names":[],"mappings":";AA2FA;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAmMA,KAtEiB,CAsEjB,aArEI;;;;;;;;;;;6BA6KyB,MACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAvGe,iBAAiB;sBACd,oBAAoB;qBACrB,mBAAmB;yBACf,uBAAuB;mBAC7B,iBAAiB"}
1
+ {"version":3,"file":"SaveViewPopup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search/SaveViewPopup.vue"],"names":[],"mappings":";AA2FA;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAmMA,KAtEc,CAsEd,aArEC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAuEkB,iBAAiB;sBACd,oBAAoB;qBACrB,mBAAmB;yBACf,uBAAuB;mBAC7B,iBAAiB"}
@@ -1,4 +1,5 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { SavedView, ViewLocation, ViewCriterion } from '../../stores/userView.js';
2
3
  import { default as Dropdown } from 'primevue/dropdown';
3
4
  declare const _default: DefineComponent<{}, {}, {
4
5
  selectedPersonalSearch: any;
@@ -1 +1 @@
1
- {"version":3,"file":"UserViewsFavoritesPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search/UserViewsFavoritesPanel.vue"],"names":[],"mappings":";AAuGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqKqB,mBAAmB"}
1
+ {"version":3,"file":"UserViewsFavoritesPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/search/UserViewsFavoritesPanel.vue"],"names":[],"mappings":";;AAuGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqKqB,mBAAmB"}
@@ -68,8 +68,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
68
68
  }>> & Readonly<{
69
69
  onReload?: (...args: any[]) => any;
70
70
  }>, {
71
- canUpload: boolean;
72
71
  versionId: string;
72
+ canUpload: boolean;
73
73
  showTitle: boolean;
74
74
  showButtons: boolean;
75
75
  }, {}, {
@@ -7,5 +7,11 @@
7
7
  export function useCollabEditor(): any;
8
8
  export const ROLE_EDITOR: "editor";
9
9
  export const ROLE_OBSERVER: "observer";
10
+ /**
11
+ * Protocol version supported by this client.
12
+ * Must match or exceed the server's MIN_CLIENT_PROTOCOL_VERSION.
13
+ * Increment when adding breaking protocol changes (new required message types, etc.).
14
+ */
15
+ export const PROTOCOL_VERSION: 2;
10
16
  export default useCollabEditor;
11
17
  //# sourceMappingURL=useCollabEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCollabEditor.d.ts","sourceRoot":"","sources":["../../src/composables/useCollabEditor.js"],"names":[],"mappings":"AA0JA;;;;;GAKG;AACH,uCAk3BC;AAz+BD,0BAA2B,QAAQ,CAAC;AACpC,4BAA6B,UAAU,CAAC"}
1
+ {"version":3,"file":"useCollabEditor.d.ts","sourceRoot":"","sources":["../../src/composables/useCollabEditor.js"],"names":[],"mappings":"AAiKA;;;;;GAKG;AACH,uCAw5BC;AAthCD,0BAA2B,QAAQ,CAAC;AACpC,4BAA6B,UAAU,CAAC;AAExC;;;;GAIG;AACH,+BAAgC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCollabWebSocket.d.ts","sourceRoot":"","sources":["../../src/composables/useCollabWebSocket.js"],"names":[],"mappings":"AA0CA;;;;;;GAMG;AACH,sDAuSC"}
1
+ {"version":3,"file":"useCollabWebSocket.d.ts","sourceRoot":"","sources":["../../src/composables/useCollabWebSocket.js"],"names":[],"mappings":"AA0CA;;;;;;GAMG;AACH,sDAySC"}