galadrim-feedback 0.0.62 → 0.0.64
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 +64 -13
- package/dist/index.cjs +142 -14
- package/dist/index.es +142 -14
- package/dist/styles.css +74 -89
- package/dist/types/libs/backend-client/api.d.ts +93 -0
- package/dist/types/src/services/api.d.ts +2 -1
- package/libs/backend-client/api.ts +181 -0
- package/package.json +3 -3
- package/src/components/atoms/icons/CommentIcon.tsx +1 -1
- package/src/components/atoms/modals/Modal.tsx +1 -1
- package/src/components/molecules/feedbacks/group/FeedbackList.tsx +1 -1
- package/src/components/molecules/feedbacks/item/FeedbackInput.tsx +1 -1
- package/src/components/molecules/feedbacks/item/FeedbackItemSelected.tsx +1 -1
- package/src/components/molecules/feedbacks/item/FeedbackPin.tsx +1 -1
- package/src/components/molecules/feedbacks/shared/FeedbackTextArea.tsx +17 -10
- package/src/components/organisms/SideBar.tsx +1 -1
- package/src/contexts/FeedbackContext.tsx +4 -4
- package/src/index.css +19 -85
- package/src/services/api.ts +2 -0
package/README.md
CHANGED
|
@@ -1,22 +1,73 @@
|
|
|
1
|
-
Installation
|
|
1
|
+
# Installation Guide for Galadrim Feedback
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
axios
|
|
3
|
+
## Prérequis
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
Avant d'installer **Galadrim Feedback**, assurez-vous d'avoir **axios** installé dans votre projet.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
```bash
|
|
8
|
+
yarn add axios
|
|
9
|
+
```
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
Ensuite, installez **Galadrim Feedback** :
|
|
11
12
|
|
|
13
|
+
```bash
|
|
14
|
+
yarn add galadrim-feedback
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Configuration Babel
|
|
18
|
+
|
|
19
|
+
Ajoutez le plugin **babel-plugin-react-generate-paths** dans votre configuration Babel.
|
|
20
|
+
|
|
21
|
+
### Option 1: Dans `vite.config.ts`
|
|
22
|
+
|
|
23
|
+
Si vous utilisez Vite, ajoutez le plugin dans le fichier `vite.config.ts` comme suit :
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { defineConfig } from "vite";
|
|
27
|
+
import react from "@vitejs/plugin-react";
|
|
28
|
+
|
|
29
|
+
// https://vitejs.dev/config/
|
|
30
|
+
export default defineConfig({
|
|
31
|
+
plugins: [
|
|
32
|
+
react({
|
|
33
|
+
babel: {
|
|
34
|
+
plugins: [["babel-plugin-react-generate-paths"]],
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Option 2: Dans `.babelrc`
|
|
42
|
+
|
|
43
|
+
Si vous utilisez un fichier `.babelrc`, ajoutez le plugin dans la section `plugins` :
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"plugins": ["babel-plugin-react-generate-paths"]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Intégration de FeedbackRoot
|
|
52
|
+
|
|
53
|
+
Ajoutez le composant **FeedbackRoot** à la racine de votre application. Il doit être placé à l'intérieur du **router**.
|
|
54
|
+
|
|
55
|
+
```javascript
|
|
12
56
|
import FeedbackRoot from "galadrim-feedback";
|
|
13
|
-
import "galadrim-feedback/dist/styles.css";
|
|
57
|
+
import "galadrim-feedback/dist/styles.css"; // N'oubliez pas d'importer les styles CSS
|
|
14
58
|
|
|
15
|
-
|
|
59
|
+
// Ajoutez FeedbackRoot à votre application
|
|
16
60
|
<FeedbackRoot
|
|
17
|
-
rootDir="/path/to/your/project"
|
|
18
|
-
projectId="your-project-id"
|
|
19
|
-
navigate={(path) => navigate(path)}
|
|
20
|
-
|
|
61
|
+
rootDir="/path/to/your/project"
|
|
62
|
+
projectId="your-project-id" // L'id de votre projet dans Galadmin
|
|
63
|
+
navigate={(path) => navigate(path)} // Fonction de navigation pour utiliser votre router
|
|
64
|
+
/>;
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Explication des Props :
|
|
68
|
+
|
|
69
|
+
- **rootDir** : Le chemin vers la racine de votre projet.
|
|
70
|
+
- **projectId** : L'identifiant de votre projet dans **Galadmin**.
|
|
71
|
+
- **navigate** : Une fonction qui prend un chemin et vous permet de naviguer en utilisant votre **router**.
|
|
21
72
|
|
|
22
|
-
|
|
73
|
+
Cela conclut l'installation de **Galadrim Feedback** dans votre projet !
|