@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.
- package/README.md +3 -3
- package/dist/components/AppIcon/AppIcon.js +2 -2
- package/dist/components/Attachment/Attachment.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Form/FormContext.js +1 -1
- package/dist/components/Form/FormControl.js +1 -1
- package/dist/components/Layout/components/Header.js +5 -4
- package/dist/components/Layout/components/WidgetApps.js +1 -1
- package/dist/{hooks/useHeader → components/Layout/hooks}/useHeader.js +6 -6
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Tree/components/SortableTree.js +3 -2
- package/dist/components/Tree/types/index.d.ts +1 -0
- package/dist/components/Tree/utilities/tree.d.ts +2 -1
- package/dist/hooks/index.d.ts +1 -5
- package/dist/hooks/useConf/useConf.d.ts +2 -2
- package/dist/hooks/useDropdown/useDropdown.js +1 -1
- package/dist/hooks/useDropzone/useDropzone.js +1 -1
- package/dist/hooks/useHasWorkflow/useHasWorkflow.js +3 -11
- package/dist/hooks/useHttpErrorToast/index.d.ts +1 -0
- package/dist/hooks/useHttpErrorToast/useHttpErrorToast.d.ts +3 -0
- package/dist/hooks/useHttpErrorToast/useHttpErrorToast.js +21 -0
- package/dist/hooks/useSession/useSession.d.ts +2 -1
- package/dist/hooks/useTrapFocus/useTrapFocus.d.ts +1 -1
- package/dist/hooks/useTrapFocus/useTrapFocus.js +3 -2
- package/dist/hooks/useUploadFiles/useUploadFiles.js +1 -1
- package/dist/hooks/useWorkspaceSearch/useWorkspaceSearch.js +3 -11
- package/dist/icons-apps.js +220 -218
- package/dist/index.js +138 -144
- package/dist/modules/audience/ReactionChoice.d.ts +13 -0
- package/dist/modules/audience/ReactionModal.Card.js +4 -4
- package/dist/modules/audience/ReactionModal.d.ts +24 -6
- package/dist/modules/audience/ReactionModal.js +12 -9
- package/dist/modules/audience/ReactionSummary.d.ts +9 -0
- package/dist/modules/audience/ViewsCounter.d.ts +10 -0
- package/dist/modules/audience/ViewsModal.d.ts +13 -1
- package/dist/modules/audience/ViewsModal.js +22 -19
- package/dist/modules/comments/components/Comment.js +10 -7
- package/dist/modules/comments/components/CommentAvatar.js +1 -1
- package/dist/modules/comments/components/DeleteModal.d.ts +7 -0
- package/dist/modules/comments/components/DeleteModal.js +19 -0
- package/dist/modules/comments/context/Context.d.ts +2 -0
- package/dist/modules/comments/hooks/useComments.d.ts +5 -2
- package/dist/modules/comments/hooks/useComments.js +1 -1
- package/dist/modules/comments/hooks/useCommentsContext.d.ts +1 -0
- package/dist/modules/comments/hooks/useProfileQueries.d.ts +4 -1
- package/dist/modules/comments/provider/CommentProvider.js +3 -2
- package/dist/modules/comments/types.d.ts +5 -1
- package/dist/modules/editor/components/Editor/Editor.js +2 -2
- package/dist/modules/editor/components/{Editor → MathsModal}/MathsModal.d.ts +1 -1
- package/dist/modules/editor/components/{Editor → MathsModal}/MathsModal.js +2 -3
- package/dist/modules/editor/components/MathsModal/index.d.ts +1 -0
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +12 -7
- package/dist/modules/editor/components/Renderer/AudioRenderer.js +4 -1
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js +1 -1
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +10 -2
- package/dist/modules/editor/hooks/useCommentEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useSpeechRecognition.js +2 -0
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js +2 -0
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useTipTapEditor.js +4 -4
- package/dist/modules/icons/components/apps/IconAppointments.d.ts +7 -0
- package/dist/modules/icons/components/apps/IconAppointments.js +12 -0
- package/dist/modules/icons/components/apps/index.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +5 -1
- package/dist/modules/multimedia/UploadCard/UploadCard.js +2 -2
- package/dist/modules/multimedia/index.d.ts +2 -0
- package/dist/multimedia.js +10 -6
- package/dist/providers/MockedProvider/MockedProvider.d.ts +4 -0
- package/dist/providers/MockedProvider/MockedProvider.js +20 -0
- package/dist/providers/index.d.ts +1 -0
- package/package.json +57 -54
- package/dist/hooks/useAvatar/index.d.ts +0 -1
- package/dist/hooks/useAvatar/useAvatar.d.ts +0 -6
- package/dist/hooks/useAvatar/useAvatar.js +0 -30
- package/dist/hooks/useHeader/index.d.ts +0 -1
- package/dist/hooks/useHeader/useHeader.d.ts +0 -5
- package/dist/providers/MockedDataProvider/MockedDataProvider.d.ts +0 -28
- package/dist/providers/MockedDataProvider/MockedDataProvider.js +0 -9
- 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-
|
|
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.
|
|
84
|
-
"@tiptap/extension-character-count": "2.
|
|
85
|
-
"@tiptap/extension-color": "2.
|
|
86
|
-
"@tiptap/extension-focus": "2.
|
|
87
|
-
"@tiptap/extension-font-family": "2.
|
|
88
|
-
"@tiptap/extension-heading": "2.
|
|
89
|
-
"@tiptap/extension-highlight": "2.
|
|
90
|
-
"@tiptap/extension-image": "2.
|
|
91
|
-
"@tiptap/extension-link": "2.
|
|
92
|
-
"@tiptap/extension-list-item": "2.
|
|
93
|
-
"@tiptap/extension-placeholder": "2.
|
|
94
|
-
"@tiptap/extension-subscript": "2.
|
|
95
|
-
"@tiptap/extension-superscript": "2.
|
|
96
|
-
"@tiptap/extension-table": "2.
|
|
97
|
-
"@tiptap/extension-table-cell": "2.
|
|
98
|
-
"@tiptap/extension-table-header": "2.
|
|
99
|
-
"@tiptap/extension-table-row": "2.
|
|
100
|
-
"@tiptap/extension-text-align": "2.
|
|
101
|
-
"@tiptap/extension-text-style": "2.
|
|
102
|
-
"@tiptap/extension-typography": "2.
|
|
103
|
-
"@tiptap/extension-underline": "2.
|
|
104
|
-
"@tiptap/pm": "2.
|
|
105
|
-
"@tiptap/react": "2.
|
|
106
|
-
"@tiptap/starter-kit": "2.
|
|
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": "
|
|
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/
|
|
123
|
-
"@edifice.io/
|
|
124
|
-
"@edifice.io/
|
|
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/
|
|
132
|
-
"@
|
|
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": "
|
|
135
|
-
"@types/react-dom": "
|
|
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": "
|
|
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": "
|
|
142
|
-
"react-dom": "
|
|
143
|
-
"react-hook-form": "
|
|
144
|
-
"react-i18next": "
|
|
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": "
|
|
146
|
+
"rollup-plugin-visualizer": "5.12.0",
|
|
147
147
|
"typescript-eslint": "^8.8.1",
|
|
148
|
-
"vite": "
|
|
149
|
-
"vite-plugin-dts": "
|
|
150
|
-
"
|
|
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": "
|
|
154
|
-
"@tanstack/react-query": "
|
|
155
|
-
"react": "
|
|
156
|
-
"react-dom": "
|
|
157
|
-
"react-hook-form": "
|
|
158
|
-
"react-i18next": "
|
|
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
|
|
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,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,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 +0,0 @@
|
|
|
1
|
-
export * from './MockedDataProvider';
|