@edifice.io/react 2.1.0-develop-enabling.0 → 2.1.0-develop-wl.20250204154502

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 (79) hide show
  1. package/README.md +3 -3
  2. package/dist/components/AppIcon/AppIcon.js +2 -2
  3. package/dist/components/Attachment/Attachment.js +1 -1
  4. package/dist/components/Button/Button.js +1 -1
  5. package/dist/components/Form/FormContext.js +1 -1
  6. package/dist/components/Form/FormControl.js +1 -1
  7. package/dist/components/Layout/components/Header.js +5 -4
  8. package/dist/components/Layout/components/WidgetApps.js +1 -1
  9. package/dist/{hooks/useHeader → components/Layout/hooks}/useHeader.js +6 -6
  10. package/dist/components/Modal/Modal.js +1 -1
  11. package/dist/components/Tree/components/SortableTree.js +3 -2
  12. package/dist/components/Tree/types/index.d.ts +1 -0
  13. package/dist/components/Tree/utilities/tree.d.ts +2 -1
  14. package/dist/hooks/index.d.ts +1 -5
  15. package/dist/hooks/useConf/useConf.d.ts +2 -2
  16. package/dist/hooks/useDropdown/useDropdown.js +1 -1
  17. package/dist/hooks/useDropzone/useDropzone.js +1 -1
  18. package/dist/hooks/useHasWorkflow/useHasWorkflow.js +3 -11
  19. package/dist/hooks/useHttpErrorToast/index.d.ts +1 -0
  20. package/dist/hooks/useHttpErrorToast/useHttpErrorToast.d.ts +3 -0
  21. package/dist/hooks/useHttpErrorToast/useHttpErrorToast.js +21 -0
  22. package/dist/hooks/useSession/useSession.d.ts +2 -1
  23. package/dist/hooks/useTrapFocus/useTrapFocus.d.ts +1 -1
  24. package/dist/hooks/useTrapFocus/useTrapFocus.js +3 -2
  25. package/dist/hooks/useUploadFiles/useUploadFiles.js +1 -1
  26. package/dist/hooks/useWorkspaceSearch/useWorkspaceSearch.js +3 -11
  27. package/dist/icons-apps.js +220 -218
  28. package/dist/index.js +138 -144
  29. package/dist/modules/audience/ReactionChoice.d.ts +13 -0
  30. package/dist/modules/audience/ReactionModal.Card.js +4 -4
  31. package/dist/modules/audience/ReactionModal.d.ts +24 -6
  32. package/dist/modules/audience/ReactionModal.js +12 -9
  33. package/dist/modules/audience/ReactionSummary.d.ts +9 -0
  34. package/dist/modules/audience/ViewsCounter.d.ts +10 -0
  35. package/dist/modules/audience/ViewsModal.d.ts +13 -1
  36. package/dist/modules/audience/ViewsModal.js +22 -19
  37. package/dist/modules/comments/components/Comment.js +10 -7
  38. package/dist/modules/comments/components/CommentAvatar.js +1 -1
  39. package/dist/modules/comments/components/DeleteModal.d.ts +7 -0
  40. package/dist/modules/comments/components/DeleteModal.js +19 -0
  41. package/dist/modules/comments/context/Context.d.ts +2 -0
  42. package/dist/modules/comments/hooks/useComments.d.ts +5 -2
  43. package/dist/modules/comments/hooks/useComments.js +1 -1
  44. package/dist/modules/comments/hooks/useCommentsContext.d.ts +1 -0
  45. package/dist/modules/comments/hooks/useProfileQueries.d.ts +4 -1
  46. package/dist/modules/comments/provider/CommentProvider.js +3 -2
  47. package/dist/modules/comments/types.d.ts +5 -1
  48. package/dist/modules/editor/components/Editor/Editor.js +2 -2
  49. package/dist/modules/editor/components/{Editor → MathsModal}/MathsModal.d.ts +1 -1
  50. package/dist/modules/editor/components/{Editor → MathsModal}/MathsModal.js +2 -3
  51. package/dist/modules/editor/components/MathsModal/index.d.ts +1 -0
  52. package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +12 -7
  53. package/dist/modules/editor/components/Renderer/AudioRenderer.js +4 -1
  54. package/dist/modules/editor/components/Renderer/LinkerRenderer.js +1 -1
  55. package/dist/modules/editor/components/Renderer/MediaRenderer.js +10 -2
  56. package/dist/modules/editor/hooks/useCommentEditor.d.ts +1 -1
  57. package/dist/modules/editor/hooks/useSpeechRecognition.js +2 -0
  58. package/dist/modules/editor/hooks/useSpeechSynthetisis.js +2 -0
  59. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +1 -1
  60. package/dist/modules/editor/hooks/useTipTapEditor.js +4 -4
  61. package/dist/modules/icons/components/apps/IconAppointments.d.ts +7 -0
  62. package/dist/modules/icons/components/apps/IconAppointments.js +12 -0
  63. package/dist/modules/icons/components/apps/index.d.ts +1 -0
  64. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +5 -1
  65. package/dist/modules/multimedia/UploadCard/UploadCard.js +2 -2
  66. package/dist/modules/multimedia/index.d.ts +2 -0
  67. package/dist/multimedia.js +10 -6
  68. package/dist/providers/MockedProvider/MockedProvider.d.ts +4 -0
  69. package/dist/providers/MockedProvider/MockedProvider.js +20 -0
  70. package/dist/providers/index.d.ts +1 -0
  71. package/package.json +57 -54
  72. package/dist/hooks/useAvatar/index.d.ts +0 -1
  73. package/dist/hooks/useAvatar/useAvatar.d.ts +0 -6
  74. package/dist/hooks/useAvatar/useAvatar.js +0 -30
  75. package/dist/hooks/useHeader/index.d.ts +0 -1
  76. package/dist/hooks/useHeader/useHeader.d.ts +0 -5
  77. package/dist/providers/MockedDataProvider/MockedDataProvider.d.ts +0 -28
  78. package/dist/providers/MockedDataProvider/MockedDataProvider.js +0 -9
  79. package/dist/providers/MockedDataProvider/index.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.1.0-develop-enabling.0",
3
+ "version": "2.1.0-develop-wl.20250204154502",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -80,35 +80,34 @@
80
80
  "@pixi/mixin-get-child-by-name": "7.4.2",
81
81
  "@pixi/react": "7.1.2",
82
82
  "@popperjs/core": "2.11.8",
83
- "@tiptap/core": "2.3.0",
84
- "@tiptap/extension-character-count": "2.3.0",
85
- "@tiptap/extension-color": "2.3.0",
86
- "@tiptap/extension-focus": "2.3.0",
87
- "@tiptap/extension-font-family": "2.3.0",
88
- "@tiptap/extension-heading": "2.3.0",
89
- "@tiptap/extension-highlight": "2.3.0",
90
- "@tiptap/extension-image": "2.3.0",
91
- "@tiptap/extension-link": "2.3.0",
92
- "@tiptap/extension-list-item": "2.3.0",
93
- "@tiptap/extension-placeholder": "2.3.0",
94
- "@tiptap/extension-subscript": "2.3.0",
95
- "@tiptap/extension-superscript": "2.3.0",
96
- "@tiptap/extension-table": "2.3.0",
97
- "@tiptap/extension-table-cell": "2.3.0",
98
- "@tiptap/extension-table-header": "2.3.0",
99
- "@tiptap/extension-table-row": "2.3.0",
100
- "@tiptap/extension-text-align": "2.3.0",
101
- "@tiptap/extension-text-style": "2.3.0",
102
- "@tiptap/extension-typography": "2.3.0",
103
- "@tiptap/extension-underline": "2.3.0",
104
- "@tiptap/pm": "2.3.0",
105
- "@tiptap/react": "2.3.0",
106
- "@tiptap/starter-kit": "2.3.0",
83
+ "@tiptap/core": "2.11.0",
84
+ "@tiptap/extension-character-count": "2.11.0",
85
+ "@tiptap/extension-color": "2.11.0",
86
+ "@tiptap/extension-focus": "2.11.0",
87
+ "@tiptap/extension-font-family": "2.11.0",
88
+ "@tiptap/extension-heading": "2.11.0",
89
+ "@tiptap/extension-highlight": "2.11.0",
90
+ "@tiptap/extension-image": "2.11.0",
91
+ "@tiptap/extension-link": "2.11.0",
92
+ "@tiptap/extension-list-item": "2.11.0",
93
+ "@tiptap/extension-placeholder": "2.11.0",
94
+ "@tiptap/extension-subscript": "2.11.0",
95
+ "@tiptap/extension-superscript": "2.11.0",
96
+ "@tiptap/extension-table": "2.11.0",
97
+ "@tiptap/extension-table-cell": "2.11.0",
98
+ "@tiptap/extension-table-header": "2.11.0",
99
+ "@tiptap/extension-table-row": "2.11.0",
100
+ "@tiptap/extension-text-align": "2.11.0",
101
+ "@tiptap/extension-text-style": "2.11.0",
102
+ "@tiptap/extension-typography": "2.11.0",
103
+ "@tiptap/extension-underline": "2.11.0",
104
+ "@tiptap/pm": "2.11.0",
105
+ "@tiptap/react": "2.11.0",
106
+ "@tiptap/starter-kit": "2.11.0",
107
107
  "@uidotdev/usehooks": "^2.4.1",
108
- "clsx": "catalog:",
108
+ "clsx": "^2.1.1",
109
109
  "dayjs": "1.11.10",
110
110
  "emoji-picker-react": "4.5.2",
111
- "globals": "^15.11.0",
112
111
  "html-react-parser": "4.2.1",
113
112
  "ohash": "1.1.3",
114
113
  "pako": "2.1.0",
@@ -119,43 +118,46 @@
119
118
  "react-slugify": "^3.0.3",
120
119
  "swiper": "^10.1.0",
121
120
  "ua-parser-js": "^1.0.36",
122
- "@edifice.io/utilities": "2.1.0-develop-enabling.0",
123
- "@edifice.io/bootstrap": "2.1.0-develop-enabling.0",
124
- "@edifice.io/tiptap-extensions": "2.1.0-develop-enabling.0"
121
+ "@edifice.io/bootstrap": "2.1.0-develop-wl.20250204154502",
122
+ "@edifice.io/tiptap-extensions": "2.1.0-develop-wl.20250204154502",
123
+ "@edifice.io/utilities": "2.1.0-develop-wl.20250204154502"
125
124
  },
126
125
  "devDependencies": {
127
126
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
128
127
  "@eslint/js": "^9.12.0",
129
128
  "@react-spring/web": "^9.7.5",
130
129
  "@svgr/cli": "^8.1.0",
131
- "@tanstack/react-query": "catalog:",
132
- "@types/node": "catalog:",
130
+ "@tanstack/query-core": "5.62.7",
131
+ "@tanstack/react-query": "5.62.7",
132
+ "@types/node": "^22.9.1",
133
133
  "@types/pako": "^2.0.3",
134
- "@types/react": "catalog:",
135
- "@types/react-dom": "catalog:",
134
+ "@types/react": "^18.2.33",
135
+ "@types/react-dom": "^18.2.14",
136
136
  "@types/ua-parser-js": "^0.7.37",
137
- "@vitejs/plugin-react": "catalog:",
137
+ "@vitejs/plugin-react": "^4.3.2",
138
138
  "eslint": "^9.12.0",
139
139
  "eslint-plugin-react-hooks": "5.1.0-rc.0",
140
140
  "eslint-plugin-react-refresh": "^0.4.12",
141
- "react": "catalog:",
142
- "react-dom": "catalog:",
143
- "react-hook-form": "catalog:",
144
- "react-i18next": "catalog:",
141
+ "react": "^18.3.1",
142
+ "react-dom": "^18.3.1",
143
+ "react-hook-form": "^7.53.0",
144
+ "react-i18next": "^14.1.0",
145
145
  "rollup-plugin-pure": "^0.2.1",
146
- "rollup-plugin-visualizer": "catalog:",
146
+ "rollup-plugin-visualizer": "5.12.0",
147
147
  "typescript-eslint": "^8.8.1",
148
- "vite": "catalog:",
149
- "vite-plugin-dts": "catalog:",
150
- "@edifice.io/client": "2.1.0-develop-enabling.0"
148
+ "vite": "^5.4.11",
149
+ "vite-plugin-dts": "^4.1.0",
150
+ "vite-tsconfig-paths": "^5.0.1",
151
+ "@edifice.io/config": "2.1.0-develop-wl.20250204154502",
152
+ "@edifice.io/client": "2.1.0-develop-wl.20250204154502"
151
153
  },
152
154
  "peerDependencies": {
153
- "@react-spring/web": "catalog:",
154
- "@tanstack/react-query": "catalog:",
155
- "react": "catalog:",
156
- "react-dom": "catalog:",
157
- "react-hook-form": "catalog:",
158
- "react-i18next": "catalog:"
155
+ "@react-spring/web": "^9.7.5",
156
+ "@tanstack/react-query": "5.62.7",
157
+ "react": "^18.3.1",
158
+ "react-dom": "^18.3.1",
159
+ "react-hook-form": "^7.53.0",
160
+ "react-i18next": "^14.1.0"
159
161
  },
160
162
  "optionalDependencies": {
161
163
  "@tiptap-pro/extension-mathematics": "2.2.1"
@@ -167,11 +169,12 @@
167
169
  "scripts": {
168
170
  "build": "pnpm build:icons && vite build",
169
171
  "build:icons": "svgr src/modules/icons/assets --config-file ./svgr.config.cjs",
170
- "fix": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
172
+ "fix": "eslint --fix --report-unused-disable-directives --max-warnings 0",
171
173
  "format": "pnpm run format:write && pnpm run format:check",
172
- "format:check": "npx prettier --check .",
173
- "format:write": "npx prettier --write .",
174
- "lint": "eslint .",
175
- "test": "vitest"
174
+ "format:check": "npx prettier --check \"src/**/*.{ts,tsx}\"",
175
+ "format:write": "npx prettier --write \"src/**/*.{ts,tsx}\"",
176
+ "lint": "eslint",
177
+ "test": "vitest",
178
+ "test:watch": "vitest --watch"
176
179
  }
177
180
  }
@@ -1 +0,0 @@
1
- export { default as useAvatar } from './useAvatar';
@@ -1,6 +0,0 @@
1
- import { ID, UserProfile } from '@edifice.io/client';
2
- export default function useAvatar(userId: ID, userProfile?: UserProfile[number]): {
3
- badge: JSX.Element | null;
4
- avatarURL: string;
5
- userbookURL: string;
6
- };
@@ -1,30 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { odeServices } from "@edifice.io/client";
3
- import { useMemo } from "react";
4
- import { useTranslation } from "react-i18next";
5
- import Badge from "../../components/Badge/Badge.js";
6
- function useAvatar(userId, userProfile) {
7
- const {
8
- t
9
- } = useTranslation(), badge = useMemo(() => {
10
- const profile = (userProfile == null ? void 0 : userProfile.toLowerCase()) ?? "guest";
11
- return ["teacher", "student", "relative", "personnel"].includes(profile) ? /* @__PURE__ */ jsx(Badge, { variant: {
12
- type: "user",
13
- profile
14
- }, children: t(profile) }) : null;
15
- }, [userProfile, t]);
16
- function getAvatarURL(userId2) {
17
- return odeServices.directory().getAvatarUrl(userId2, "user");
18
- }
19
- function getUserbookURL(userId2) {
20
- return odeServices.directory().getDirectoryUrl(userId2, "user");
21
- }
22
- return {
23
- badge,
24
- avatarURL: getAvatarURL(userId),
25
- userbookURL: getUserbookURL(userId)
26
- };
27
- }
28
- export {
29
- useAvatar as default
30
- };
@@ -1 +0,0 @@
1
- export { default as useHeader } from './useHeader';
@@ -1,5 +0,0 @@
1
- import { IUserInfo } from '@edifice.io/client';
2
- export default function useHeader({ user, avatar, }: {
3
- user: IUserInfo | undefined;
4
- avatar: string;
5
- }): any;
@@ -1,28 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { App, GetContextParameters, IResource, ResourceType, WorkspaceElement } from '@edifice.io/client';
3
- export interface MockedDataProps {
4
- children: ReactNode;
5
- mocks: {
6
- /** Current app code */
7
- app?: App;
8
- /** User's granted workflow rights */
9
- workflows?: string[];
10
- /** List of pseudo-documents from workspace. */
11
- workspaceDocuments?: WorkspaceElement[];
12
- /** List of available apps. */
13
- availableApps?: App[];
14
- /** List of pseudo-IResource by type. */
15
- appResources?: {
16
- [resourceType: ResourceType]: IResource[];
17
- };
18
- };
19
- }
20
- export interface MockedContextProps {
21
- app?: App;
22
- availableApps?: Promise<App[]>;
23
- hasWorkflow?: (workflow: string) => Promise<boolean>;
24
- listWorkspaceDocuments?: () => Promise<WorkspaceElement[]>;
25
- loadResources?: (filters: GetContextParameters) => Promise<IResource[]>;
26
- }
27
- export declare function MockedDataProvider({ children, mocks }: MockedDataProps): import("react/jsx-runtime").JSX.Element;
28
- export declare function useMockedData(): MockedContextProps | null;
@@ -1,9 +0,0 @@
1
- import "react/jsx-runtime";
2
- import { useContext, createContext } from "react";
3
- const MockedDataContext = /* @__PURE__ */ createContext(null);
4
- function useMockedData() {
5
- return useContext(MockedDataContext);
6
- }
7
- export {
8
- useMockedData
9
- };
@@ -1 +0,0 @@
1
- export * from './MockedDataProvider';