@edifice.io/react 2.4.2-develop-b2school-actualites.20251126112549 → 2.4.2-develop-pedago.20251126113601
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/dist/components/AppIcon/index.d.ts +0 -1
- package/dist/components/Flex/Flex.js +1 -1
- package/dist/components/Menu/components/MenuButton.d.ts +0 -2
- package/dist/components/Menu/components/MenuButton.js +4 -13
- package/dist/components/Select/Select.d.ts +2 -6
- package/dist/components/Select/Select.js +4 -10
- package/dist/components/index.d.ts +0 -2
- package/dist/editor.js +36 -40
- package/dist/hooks/index.d.ts +0 -1
- package/dist/icons.js +292 -294
- package/dist/index.js +74 -84
- package/dist/modals.js +6 -8
- package/dist/modules/comments/components/Comment.js +3 -5
- package/dist/modules/comments/components/CommentList.js +1 -1
- package/dist/modules/comments/constants.d.ts +0 -4
- package/dist/modules/comments/constants.js +1 -2
- package/dist/modules/comments/hooks/useProfileQueries.js +2 -1
- package/dist/modules/comments/provider/CommentProvider.js +1 -2
- package/dist/modules/comments/types.d.ts +0 -4
- package/dist/modules/editor/components/Editor/index.d.ts +0 -2
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +2 -2
- package/dist/modules/icons/components/index.d.ts +0 -1
- package/dist/modules/modals/ShareModal/ShareBookmark.d.ts +1 -1
- package/dist/modules/modals/ShareModal/ShareBookmark.js +2 -5
- package/dist/modules/modals/ShareModal/ShareModal.d.ts +11 -1
- package/dist/modules/modals/ShareModal/ShareModal.js +105 -13
- package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +1 -2
- package/dist/modules/modals/ShareModal/hooks/useSearch.js +2 -3
- package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +5 -12
- package/dist/modules/modals/ShareModal/hooks/useShare.js +13 -20
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +1 -1
- package/dist/modules/modals/ShareModal/index.d.ts +1 -3
- package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
- package/dist/modules/multimedia/FileCard/FileIcon.js +1 -1
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +4 -1
- package/dist/utilities/index.d.ts +0 -1
- package/package.json +6 -6
- package/dist/components/Divider/Divider.d.ts +0 -5
- package/dist/components/Divider/Divider.js +0 -21
- package/dist/components/Divider/index.d.ts +0 -1
- package/dist/components/SeparatedInfo/SeparatedInfo.d.ts +0 -6
- package/dist/components/SeparatedInfo/SeparatedInfo.js +0 -13
- package/dist/components/SeparatedInfo/index.d.ts +0 -1
- package/dist/hooks/useInfiniteScroll/index.d.ts +0 -1
- package/dist/hooks/useInfiniteScroll/useInfiniteScroll.d.ts +0 -33
- package/dist/hooks/useInfiniteScroll/useInfiniteScroll.js +0 -20
- package/dist/modules/editor/components/Editor/EditorPreview.d.ts +0 -14
- package/dist/modules/editor/components/Editor/EditorPreview.js +0 -56
- package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.d.ts +0 -8
- package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.js +0 -24
- package/dist/modules/icons/components/IconClockAlert.d.ts +0 -7
- package/dist/modules/icons/components/IconClockAlert.js +0 -17
- package/dist/modules/modals/ShareModal/ShareResources.d.ts +0 -164
- package/dist/modules/modals/ShareModal/ShareResources.js +0 -133
- package/dist/utilities/react-query/index.d.ts +0 -1
- package/dist/utilities/react-query/react-query-utils.d.ts +0 -21
- package/dist/utilities/react-query/react-query-utils.js +0 -13
package/dist/index.js
CHANGED
|
@@ -63,56 +63,52 @@ import { default as default62 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
|
|
|
63
63
|
import { default as default63 } from "./hooks/useHover/useHover.js";
|
|
64
64
|
import { useHttpErrorToast } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
|
|
65
65
|
import { default as default64 } from "./hooks/useImage/useImage.js";
|
|
66
|
-
import { default as default65 } from "./hooks/
|
|
67
|
-
import { default as default66 } from "./hooks/
|
|
68
|
-
import { default as default67 } from "./hooks/
|
|
69
|
-
import { default as default68 } from "./hooks/
|
|
70
|
-
import { default as default69 } from "./hooks/
|
|
71
|
-
import { default as default70 } from "./hooks/
|
|
72
|
-
import { default as default71 } from "./hooks/
|
|
73
|
-
import { default as default72 } from "./hooks/
|
|
74
|
-
import { default as default73 } from "./hooks/
|
|
75
|
-
import { default as default74 } from "./hooks/
|
|
76
|
-
import { default as default75 } from "./hooks/
|
|
77
|
-
import { default as default76 } from "./hooks/
|
|
78
|
-
import { default as default77 } from "./hooks/
|
|
79
|
-
import { default as default78 } from "./hooks/
|
|
80
|
-
import { default as default79 } from "./hooks/
|
|
81
|
-
import { default as default80 } from "./hooks/
|
|
82
|
-
import { default as default81 } from "./hooks/
|
|
83
|
-
import { default as default82 } from "./hooks/useWorkspaceFolders/
|
|
84
|
-
import {
|
|
85
|
-
import { default as default84 } from "./hooks/
|
|
86
|
-
import { default as default85 } from "./hooks/
|
|
87
|
-
import { default as default86 } from "./
|
|
88
|
-
import { default as default87 } from "./modules/modals/
|
|
89
|
-
import { default as default88 } from "./modules/modals/
|
|
90
|
-
import { default as default89 } from "./modules/modals/
|
|
91
|
-
import { default as default90 } from "./modules/modals/ResourceModal/
|
|
92
|
-
import { default as default91 } from "./modules/modals/
|
|
66
|
+
import { default as default65 } from "./hooks/useIsAdml/useIsAdml.js";
|
|
67
|
+
import { default as default66 } from "./hooks/useIsAdmc/useIsAdmc.js";
|
|
68
|
+
import { default as default67 } from "./hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js";
|
|
69
|
+
import { default as default68 } from "./hooks/useKeyPress/useKeyPress.js";
|
|
70
|
+
import { default as default69 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
|
|
71
|
+
import { default as default70 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
|
|
72
|
+
import { default as default71 } from "./hooks/useScrollToTop/useScrollToTop.js";
|
|
73
|
+
import { default as default72 } from "./hooks/useTitle/useTitle.js";
|
|
74
|
+
import { default as default73 } from "./hooks/useToast/useToast.js";
|
|
75
|
+
import { default as default74 } from "./hooks/useToggle/useToggle.js";
|
|
76
|
+
import { default as default75 } from "./hooks/useTrapFocus/useTrapFocus.js";
|
|
77
|
+
import { default as default76 } from "./hooks/useTrashedResource/useTrashedResource.js";
|
|
78
|
+
import { default as default77 } from "./hooks/useUpload/useUpload.js";
|
|
79
|
+
import { default as default78 } from "./hooks/useUploadFiles/useUploadFiles.js";
|
|
80
|
+
import { default as default79 } from "./hooks/useUser/useUser.js";
|
|
81
|
+
import { default as default80 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
|
|
82
|
+
import { default as default81 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
|
|
83
|
+
import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default82 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
|
|
84
|
+
import { default as default83 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
|
|
85
|
+
import { default as default84 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
|
|
86
|
+
import { default as default85 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
|
|
87
|
+
import { default as default86 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
|
|
88
|
+
import { default as default87 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
|
|
89
|
+
import { default as default88 } from "./modules/modals/PublishModal/PublishModal.js";
|
|
90
|
+
import { default as default89 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
|
|
91
|
+
import { default as default90 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
|
|
92
|
+
import { default as default91 } from "./modules/modals/ShareModal/ShareModal.js";
|
|
93
93
|
import { default as default92 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
|
|
94
94
|
import { default as default93 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
|
|
95
|
-
import { default as default94 } from "./modules/
|
|
96
|
-
import { default as default95 } from "./modules/
|
|
97
|
-
import { default as default96 } from "./modules/multimedia/
|
|
98
|
-
import { default as default97 } from "./modules/multimedia/
|
|
99
|
-
import { default as default98 } from "./modules/multimedia/
|
|
100
|
-
import { default as default99 } from "./modules/multimedia/
|
|
101
|
-
import { default as default100 } from "./modules/multimedia/
|
|
102
|
-
import { default as default101 } from "./modules/multimedia/
|
|
103
|
-
import { default as default102 } from "./modules/multimedia/
|
|
104
|
-
import { default as default103 } from "./modules/multimedia/
|
|
105
|
-
import { default as default104 } from "./modules/multimedia/Workspace/Workspace.js";
|
|
106
|
-
import { default as default105 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
|
|
95
|
+
import { default as default94 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
|
|
96
|
+
import { default as default95 } from "./modules/multimedia/Embed/Embed.js";
|
|
97
|
+
import { default as default96 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
|
|
98
|
+
import { default as default97 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
|
|
99
|
+
import { default as default98 } from "./modules/multimedia/FileCard/FileCard.js";
|
|
100
|
+
import { default as default99 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
|
|
101
|
+
import { default as default100 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
|
|
102
|
+
import { default as default101 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
|
|
103
|
+
import { default as default102 } from "./modules/multimedia/Workspace/Workspace.js";
|
|
104
|
+
import { default as default103 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
|
|
107
105
|
import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
|
|
108
|
-
import { Divider } from "./components/Divider/Divider.js";
|
|
109
106
|
import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
|
|
110
107
|
import { Column, Grid } from "./components/Grid/Grid.js";
|
|
111
108
|
import { Layout } from "./components/Layout/Layout.js";
|
|
112
109
|
import { List } from "./components/List/List.js";
|
|
113
110
|
import { Menu } from "./components/Menu/components/Menu.js";
|
|
114
111
|
import { Popover, PopoverBody, PopoverFooter, PopoverHeader } from "./components/Popover/Popover.js";
|
|
115
|
-
import { SeparatedInfo } from "./components/SeparatedInfo/SeparatedInfo.js";
|
|
116
112
|
import { Tabs } from "./components/Tabs/components/Tabs.js";
|
|
117
113
|
import { Toolbar } from "./components/Toolbar/Toolbar.js";
|
|
118
114
|
import { useTreeSortable } from "./components/Tree/hooks/useTreeSortable.js";
|
|
@@ -133,7 +129,6 @@ import { useEdificeTheme } from "./providers/EdificeThemeProvider/EdificeThemePr
|
|
|
133
129
|
import { MockedProvider } from "./providers/MockedProvider/MockedProvider.js";
|
|
134
130
|
import { checkUserRight } from "./utilities/check-user-rights/check-user-rights.js";
|
|
135
131
|
import { emptyScreenMapping } from "./utilities/emptyscreen-mapping/emptyscreen-mapping.js";
|
|
136
|
-
import { invalidateQueriesWithFirstPage } from "./utilities/react-query/react-query-utils.js";
|
|
137
132
|
import { mergeRefs, setRef } from "./utilities/refs/ref.js";
|
|
138
133
|
export {
|
|
139
134
|
AccessiblePalette,
|
|
@@ -142,11 +137,11 @@ export {
|
|
|
142
137
|
default4 as AppHeader,
|
|
143
138
|
default5 as AppIcon,
|
|
144
139
|
default6 as Attachment,
|
|
145
|
-
|
|
140
|
+
default94 as AudioRecorder,
|
|
146
141
|
default7 as Avatar,
|
|
147
142
|
default8 as AvatarGroup,
|
|
148
143
|
default9 as Badge,
|
|
149
|
-
|
|
144
|
+
default89 as BlogPublic,
|
|
150
145
|
default10 as Breadcrumb,
|
|
151
146
|
default11 as Button,
|
|
152
147
|
default38 as ButtonSkeleton,
|
|
@@ -156,9 +151,8 @@ export {
|
|
|
156
151
|
default17 as ColorPickerItem,
|
|
157
152
|
Column,
|
|
158
153
|
default18 as Combobox,
|
|
159
|
-
|
|
154
|
+
default86 as ConfirmModal,
|
|
160
155
|
DefaultPalette,
|
|
161
|
-
Divider,
|
|
162
156
|
DndTree,
|
|
163
157
|
default19 as Dropdown,
|
|
164
158
|
default20 as Dropzone,
|
|
@@ -167,10 +161,10 @@ export {
|
|
|
167
161
|
EdificeClientProvider,
|
|
168
162
|
EdificeThemeContext,
|
|
169
163
|
EdificeThemeProvider,
|
|
170
|
-
|
|
164
|
+
default95 as Embed,
|
|
171
165
|
default21 as EmptyScreen,
|
|
172
166
|
ExternalLinker,
|
|
173
|
-
|
|
167
|
+
default98 as FileCard,
|
|
174
168
|
default22 as Flex,
|
|
175
169
|
default24 as FormControl,
|
|
176
170
|
default23 as FormText,
|
|
@@ -178,8 +172,8 @@ export {
|
|
|
178
172
|
default25 as Heading,
|
|
179
173
|
default12 as IconButton,
|
|
180
174
|
default26 as Image,
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
default96 as ImageEditor,
|
|
176
|
+
default97 as ImagePicker,
|
|
183
177
|
default27 as Input,
|
|
184
178
|
InternalLinker,
|
|
185
179
|
default28 as Label,
|
|
@@ -188,27 +182,25 @@ export {
|
|
|
188
182
|
default29 as Loading,
|
|
189
183
|
default30 as LoadingScreen,
|
|
190
184
|
default31 as Logo,
|
|
191
|
-
|
|
185
|
+
default99 as MediaLibrary,
|
|
192
186
|
Menu,
|
|
193
187
|
MockedProvider,
|
|
194
188
|
default32 as Modal,
|
|
195
|
-
|
|
189
|
+
default87 as OnboardingModal,
|
|
196
190
|
Popover,
|
|
197
191
|
PopoverBody,
|
|
198
192
|
PopoverFooter,
|
|
199
193
|
PopoverHeader,
|
|
200
194
|
default33 as PreventPropagation,
|
|
201
|
-
|
|
195
|
+
default88 as PublishModal,
|
|
202
196
|
default34 as Radio,
|
|
203
197
|
default35 as RadioCard,
|
|
204
198
|
ResourceModal,
|
|
205
199
|
default36 as SearchBar,
|
|
206
200
|
default13 as SearchButton,
|
|
207
201
|
default37 as Select,
|
|
208
|
-
SeparatedInfo,
|
|
209
202
|
default92 as ShareBlog,
|
|
210
|
-
|
|
211
|
-
default95 as ShareResources,
|
|
203
|
+
default91 as ShareModal,
|
|
212
204
|
default46 as SortableTree,
|
|
213
205
|
default40 as StackedGroup,
|
|
214
206
|
default41 as Stepper,
|
|
@@ -223,13 +215,13 @@ export {
|
|
|
223
215
|
TreeNode,
|
|
224
216
|
TreeNodeFolderWrapper,
|
|
225
217
|
default48 as TreeView,
|
|
226
|
-
|
|
227
|
-
|
|
218
|
+
default100 as VideoEmbed,
|
|
219
|
+
default101 as VideoRecorder,
|
|
228
220
|
default49 as VisuallyHidden,
|
|
229
221
|
WORKSPACE_SHARED_FOLDER_ID,
|
|
230
222
|
WORKSPACE_USER_FOLDER_ID,
|
|
231
|
-
|
|
232
|
-
|
|
223
|
+
default102 as Workspace,
|
|
224
|
+
default103 as WorkspaceFolders,
|
|
233
225
|
addNode,
|
|
234
226
|
arrayUnique,
|
|
235
227
|
buildTree,
|
|
@@ -251,7 +243,6 @@ export {
|
|
|
251
243
|
getIndicesToUpdate,
|
|
252
244
|
getProjection,
|
|
253
245
|
hasChildren,
|
|
254
|
-
invalidateQueriesWithFirstPage,
|
|
255
246
|
mergeRefs,
|
|
256
247
|
modifyNode,
|
|
257
248
|
moveNode,
|
|
@@ -278,31 +269,30 @@ export {
|
|
|
278
269
|
default63 as useHover,
|
|
279
270
|
useHttpErrorToast,
|
|
280
271
|
default64 as useImage,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
default68 as
|
|
285
|
-
default69 as
|
|
286
|
-
default70 as
|
|
287
|
-
default71 as
|
|
288
|
-
default72 as useScrollToTop,
|
|
272
|
+
default66 as useIsAdmc,
|
|
273
|
+
default65 as useIsAdml,
|
|
274
|
+
default67 as useIsAdmlcOrAdmc,
|
|
275
|
+
default68 as useKeyPress,
|
|
276
|
+
default69 as useLibraryUrl,
|
|
277
|
+
default70 as useMediaLibrary,
|
|
278
|
+
default71 as useScrollToTop,
|
|
289
279
|
default93 as useShareMutation,
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
280
|
+
default72 as useTitle,
|
|
281
|
+
default73 as useToast,
|
|
282
|
+
default74 as useToggle,
|
|
283
|
+
default75 as useTrapFocus,
|
|
284
|
+
default76 as useTrashedResource,
|
|
295
285
|
useTreeSortable,
|
|
296
286
|
useTreeView,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
287
|
+
default90 as useUpdateMutation,
|
|
288
|
+
default77 as useUpload,
|
|
289
|
+
default78 as useUploadFiles,
|
|
290
|
+
default79 as useUser,
|
|
291
|
+
default80 as useWorkspaceFile,
|
|
292
|
+
default81 as useWorkspaceFolders,
|
|
293
|
+
default82 as useWorkspaceFoldersTree,
|
|
294
|
+
default83 as useWorkspaceSearch,
|
|
295
|
+
default84 as useXitiTrackPageLoad,
|
|
296
|
+
default85 as useZendeskGuide,
|
|
307
297
|
wrapTreeNode
|
|
308
298
|
};
|
package/dist/modals.js
CHANGED
|
@@ -3,10 +3,9 @@ import { default as default3 } from "./modules/modals/OnboardingModal/Onboarding
|
|
|
3
3
|
import { default as default4 } from "./modules/modals/PublishModal/PublishModal.js";
|
|
4
4
|
import { default as default5 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
|
|
5
5
|
import { default as default6 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
|
|
6
|
-
import { default as default7 } from "./modules/modals/ShareModal/
|
|
7
|
-
import { default as default8 } from "./modules/modals/ShareModal/
|
|
8
|
-
import { default as default9 } from "./modules/modals/ShareModal/
|
|
9
|
-
import { default as default10 } from "./modules/modals/ShareModal/ShareResources.js";
|
|
6
|
+
import { default as default7 } from "./modules/modals/ShareModal/ShareModal.js";
|
|
7
|
+
import { default as default8 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
|
|
8
|
+
import { default as default9 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
|
|
10
9
|
import { ResourceModal } from "./modules/modals/ResourceModal/ResourceModal.js";
|
|
11
10
|
export {
|
|
12
11
|
default5 as BlogPublic,
|
|
@@ -14,9 +13,8 @@ export {
|
|
|
14
13
|
default3 as OnboardingModal,
|
|
15
14
|
default4 as PublishModal,
|
|
16
15
|
ResourceModal,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
default8 as useShareMutation,
|
|
16
|
+
default8 as ShareBlog,
|
|
17
|
+
default7 as ShareModal,
|
|
18
|
+
default9 as useShareMutation,
|
|
21
19
|
default6 as useUpdateMutation
|
|
22
20
|
};
|
|
@@ -8,9 +8,9 @@ import { BadgeProfile } from "./BadgeProfile.js";
|
|
|
8
8
|
import { CommentAvatar } from "./CommentAvatar.js";
|
|
9
9
|
import { CommentDate } from "./CommentDate.js";
|
|
10
10
|
import { CommentTitle } from "./CommentTitle.js";
|
|
11
|
+
import { TextCounter } from "./TextCounter.js";
|
|
11
12
|
import { CommentDeleted } from "./CommentDeleted.js";
|
|
12
13
|
import { CommentReplies } from "./CommentReplies.js";
|
|
13
|
-
import { TextCounter } from "./TextCounter.js";
|
|
14
14
|
import Button from "../../../components/Button/Button.js";
|
|
15
15
|
import LoadingScreen from "../../../components/LoadingScreen/LoadingScreen.js";
|
|
16
16
|
const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comment = ({
|
|
@@ -41,8 +41,6 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
|
|
|
41
41
|
handleReplyToComment
|
|
42
42
|
} = useCommentsContext(), replies = (defaultComments == null ? void 0 : defaultComments.filter((comm) => comm.replyTo === comment.id)) ?? [], hasReplies = replies.length > 0, hasAllDeletedReplies = replies.every((reply) => reply.deleted), isEditing = editCommentId === comment.id, handleChangeContent = (event) => {
|
|
43
43
|
resizeTextarea(), setValue(event.target.value);
|
|
44
|
-
}, handleDeleteComment = (id2) => {
|
|
45
|
-
onDeleteComment(id2), setIsDeleteModalOpen(!1);
|
|
46
44
|
};
|
|
47
45
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48
46
|
comment.deleted && hasReplies && !hasAllDeletedReplies && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -75,7 +73,7 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
|
|
|
75
73
|
whiteSpace: "pre-line"
|
|
76
74
|
}, children: content }),
|
|
77
75
|
type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
|
|
78
|
-
!
|
|
76
|
+
!replyTo && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
|
|
79
77
|
userId === authorId && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
|
|
80
78
|
handleModifyComment(comment.id), setValue(content);
|
|
81
79
|
}, children: t("comment.edit") }),
|
|
@@ -85,7 +83,7 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
|
|
|
85
83
|
] })
|
|
86
84
|
] }, id),
|
|
87
85
|
/* @__PURE__ */ jsx(CommentReplies, { parentComment: comment }),
|
|
88
|
-
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, { position: !1 }), children: isDeleteModalOpen && /* @__PURE__ */ jsx(DeleteModal, { isOpen: isDeleteModalOpen, onCancel: () => setIsDeleteModalOpen(!1), onSuccess: () =>
|
|
86
|
+
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, { position: !1 }), children: isDeleteModalOpen && /* @__PURE__ */ jsx(DeleteModal, { isOpen: isDeleteModalOpen, onCancel: () => setIsDeleteModalOpen(!1), onSuccess: () => onDeleteComment(id) }) })
|
|
89
87
|
] })
|
|
90
88
|
] });
|
|
91
89
|
};
|
|
@@ -14,7 +14,7 @@ function CommentList() {
|
|
|
14
14
|
const {
|
|
15
15
|
authorId
|
|
16
16
|
} = comment, profile = ((_a = profiles == null ? void 0 : profiles.find((user2) => (user2 == null ? void 0 : user2.userId) === authorId)) == null ? void 0 : _a.profile) ?? "Guest";
|
|
17
|
-
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Comment, { comment, profile, userId: user == null ? void 0 : user.userId }) }, comment.id);
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
@@ -22,7 +22,3 @@ export declare const DEFAULT_MAX_REPLIES = 5;
|
|
|
22
22
|
* Number of comments to add when adding more comment in the limited list
|
|
23
23
|
*/
|
|
24
24
|
export declare const DEFAULT_ADD_REPLIES = 5;
|
|
25
|
-
/**
|
|
26
|
-
* Forbid replying to a comment. Defaults to false.
|
|
27
|
-
*/
|
|
28
|
-
export declare const DEFAULT_DISABLE_REPLY = false;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
const DEFAULT_MAX_COMMENT_LENGTH = 200, DEFAULT_MAX_REPLY_LENGTH = 200, DEFAULT_MAX_COMMENTS = 4, DEFAULT_ADD_COMMENTS = 5, DEFAULT_MAX_REPLIES = 5, DEFAULT_ADD_REPLIES = 5
|
|
1
|
+
const DEFAULT_MAX_COMMENT_LENGTH = 200, DEFAULT_MAX_REPLY_LENGTH = 200, DEFAULT_MAX_COMMENTS = 4, DEFAULT_ADD_COMMENTS = 5, DEFAULT_MAX_REPLIES = 5, DEFAULT_ADD_REPLIES = 5;
|
|
2
2
|
export {
|
|
3
3
|
DEFAULT_ADD_COMMENTS,
|
|
4
4
|
DEFAULT_ADD_REPLIES,
|
|
5
|
-
DEFAULT_DISABLE_REPLY,
|
|
6
5
|
DEFAULT_MAX_COMMENTS,
|
|
7
6
|
DEFAULT_MAX_COMMENT_LENGTH,
|
|
8
7
|
DEFAULT_MAX_REPLIES,
|
|
@@ -3,7 +3,7 @@ import { useMemo } from "react";
|
|
|
3
3
|
import { CommentForm } from "../components/CommentForm.js";
|
|
4
4
|
import { CommentHeader } from "../components/CommentHeader.js";
|
|
5
5
|
import { CommentList } from "../components/CommentList.js";
|
|
6
|
-
import {
|
|
6
|
+
import { DEFAULT_ADD_REPLIES, DEFAULT_MAX_REPLIES, DEFAULT_ADD_COMMENTS, DEFAULT_MAX_COMMENTS, DEFAULT_MAX_REPLY_LENGTH, DEFAULT_MAX_COMMENT_LENGTH } from "../constants.js";
|
|
7
7
|
import { CommentContext } from "../context/Context.js";
|
|
8
8
|
import { useComments } from "../hooks/useComments.js";
|
|
9
9
|
import Button from "../../../components/Button/Button.js";
|
|
@@ -20,7 +20,6 @@ const CommentProvider = ({
|
|
|
20
20
|
additionalComments: DEFAULT_ADD_COMMENTS,
|
|
21
21
|
maxReplies: DEFAULT_MAX_REPLIES,
|
|
22
22
|
additionalReplies: DEFAULT_ADD_REPLIES,
|
|
23
|
-
disableReply: DEFAULT_DISABLE_REPLY,
|
|
24
23
|
...commentOptions
|
|
25
24
|
}, {
|
|
26
25
|
type
|
|
@@ -104,10 +104,6 @@ export type CommentOptions = {
|
|
|
104
104
|
* Number of replies to load additionally in the limited list
|
|
105
105
|
*/
|
|
106
106
|
additionalReplies: number;
|
|
107
|
-
/**
|
|
108
|
-
* Forbid replying to a comment. Defaults to false.
|
|
109
|
-
*/
|
|
110
|
-
disableReply: boolean;
|
|
111
107
|
};
|
|
112
108
|
export interface UserProfileResult {
|
|
113
109
|
/**
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export * from './Editor';
|
|
2
2
|
export { default as Editor } from './Editor';
|
|
3
|
-
export { default as EditorPreview } from './EditorPreview';
|
|
4
|
-
export { default as EditorPreviewSkeleton } from './EditorPreviewSkeleton';
|
|
5
3
|
export { default as EditorSkeleton } from './EditorSkeleton';
|
|
@@ -18,7 +18,7 @@ const MediaRenderer = (props) => {
|
|
|
18
18
|
startVerticalResize,
|
|
19
19
|
stopVerticalResize,
|
|
20
20
|
isVerticalResizeActive
|
|
21
|
-
} = useResizeMedia(props, resizableMedia),
|
|
21
|
+
} = useResizeMedia(props, resizableMedia), alignContent = (textalign) => {
|
|
22
22
|
switch (textalign) {
|
|
23
23
|
case "center":
|
|
24
24
|
case "justify":
|
|
@@ -66,7 +66,7 @@ const MediaRenderer = (props) => {
|
|
|
66
66
|
case "iframe":
|
|
67
67
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
68
|
/* @__PURE__ */ jsx("div", { className: "iframe-node-view" }),
|
|
69
|
-
/* @__PURE__ */ jsx("iframe", { ref: resizableMedia, src: node.attrs.src, width, height, allowFullScreen: node.attrs.allowfullscreen ?? !0 })
|
|
69
|
+
/* @__PURE__ */ jsx("iframe", { ref: resizableMedia, src: node.attrs.src, width: node.attrs.width, height: node.attrs.height, allowFullScreen: node.attrs.allowfullscreen ?? !0 })
|
|
70
70
|
] });
|
|
71
71
|
default:
|
|
72
72
|
return null;
|
|
@@ -24,7 +24,6 @@ export { default as IconCantoo } from './IconCantoo';
|
|
|
24
24
|
export { default as IconCenter } from './IconCenter';
|
|
25
25
|
export { default as IconCheck } from './IconCheck';
|
|
26
26
|
export { default as IconChecklist } from './IconChecklist';
|
|
27
|
-
export { default as IconClockAlert } from './IconClockAlert';
|
|
28
27
|
export { default as IconClock } from './IconClock';
|
|
29
28
|
export { default as IconCloseFullScreen } from './IconCloseFullScreen';
|
|
30
29
|
export { default as IconClose } from './IconClose';
|
|
@@ -4,5 +4,5 @@ export declare const ShareBookmark: ({ bookmark, refBookmark, onBookmarkChange,
|
|
|
4
4
|
bookmark: BookmarkProps;
|
|
5
5
|
refBookmark: Ref<HTMLInputElement>;
|
|
6
6
|
onBookmarkChange: () => void;
|
|
7
|
-
onSave: () =>
|
|
7
|
+
onSave: () => void;
|
|
8
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
2
|
import { useTranslation } from "react-i18next";
|
|
4
3
|
import SvgIconSave from "../../icons/components/IconSave.js";
|
|
5
4
|
import FormControl from "../../../components/Form/FormControl.js";
|
|
@@ -12,12 +11,10 @@ const ShareBookmark = ({
|
|
|
12
11
|
}) => {
|
|
13
12
|
const {
|
|
14
13
|
t
|
|
15
|
-
} = useTranslation()
|
|
16
|
-
setIsSaving(!0), await onSave(), setIsSaving(!1);
|
|
17
|
-
};
|
|
14
|
+
} = useTranslation();
|
|
18
15
|
return /* @__PURE__ */ jsx("div", { className: "mt-16", children: /* @__PURE__ */ jsxs(FormControl, { id: "bookmarkName", className: "d-flex flex-wrap align-items-center gap-16", children: [
|
|
19
16
|
/* @__PURE__ */ jsx("div", { className: "flex-fill", children: /* @__PURE__ */ jsx(FormControl.Input, { ref: refBookmark, onChange: onBookmarkChange, placeholder: t("explorer.modal.share.sharebookmark.placeholder"), size: "sm", type: "text" }, bookmark.id) }),
|
|
20
|
-
/* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "ghost", disabled: bookmark.name.length === 0
|
|
17
|
+
/* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "ghost", disabled: bookmark.name.length === 0, leftIcon: /* @__PURE__ */ jsx(SvgIconSave, {}), onClick: onSave, className: "text-nowrap", children: t("explorer.modal.share.sharebookmark.save") })
|
|
21
18
|
] }) });
|
|
22
19
|
};
|
|
23
20
|
export {
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ID, PutShareResponse, RightStringified, ShareRight } from '@edifice.io/client';
|
|
3
|
+
import { UseMutationResult } from '../../../node_modules/@tanstack/react-query';
|
|
4
|
+
export type ShareOptions = {
|
|
5
|
+
resourceId: ID;
|
|
6
|
+
resourceRights: RightStringified[];
|
|
7
|
+
resourceCreatorId: string;
|
|
8
|
+
};
|
|
9
|
+
export type ShareResourceMutation = UseMutationResult<PutShareResponse, unknown, {
|
|
10
|
+
resourceId: string;
|
|
11
|
+
rights: ShareRight[];
|
|
12
|
+
}, unknown>;
|
|
3
13
|
interface ShareResourceModalProps {
|
|
4
14
|
/** Handle open/close state */
|
|
5
15
|
isOpen: boolean;
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
|
-
import
|
|
5
|
+
import SvgIconBookmark from "../../icons/components/IconBookmark.js";
|
|
6
|
+
import SvgIconInfoCircle from "../../icons/components/IconInfoCircle.js";
|
|
7
|
+
import SvgIconRafterDown from "../../icons/components/IconRafterDown.js";
|
|
8
|
+
import { ShareBookmark } from "./ShareBookmark.js";
|
|
9
|
+
import { ShareBookmarkLine } from "./ShareBookmarkLine.js";
|
|
10
|
+
import { useSearch } from "./hooks/useSearch.js";
|
|
11
|
+
import useShare from "./hooks/useShare.js";
|
|
12
|
+
import { useShareBookmark } from "./hooks/useShareBookmark.js";
|
|
6
13
|
import Modal from "../../../components/Modal/Modal.js";
|
|
7
14
|
import Alert from "../../../components/Alert/Alert.js";
|
|
15
|
+
import Heading from "../../../components/Heading/Heading.js";
|
|
16
|
+
import LoadingScreen from "../../../components/LoadingScreen/LoadingScreen.js";
|
|
17
|
+
import VisuallyHidden from "../../../components/VisuallyHidden/VisuallyHidden.js";
|
|
18
|
+
import Avatar from "../../../components/Avatar/Avatar.js";
|
|
19
|
+
import Checkbox from "../../../components/Checkbox/Checkbox.js";
|
|
8
20
|
import Button from "../../../components/Button/Button.js";
|
|
21
|
+
import Tooltip from "../../../components/Tooltip/Tooltip.js";
|
|
22
|
+
import Combobox from "../../../components/Combobox/Combobox.js";
|
|
9
23
|
function ShareResourceModal({
|
|
10
24
|
isOpen,
|
|
11
25
|
shareOptions,
|
|
@@ -14,26 +28,104 @@ function ShareResourceModal({
|
|
|
14
28
|
onSuccess,
|
|
15
29
|
onCancel
|
|
16
30
|
}) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
const {
|
|
32
|
+
resourceId,
|
|
33
|
+
resourceCreatorId,
|
|
34
|
+
resourceRights
|
|
35
|
+
} = shareOptions, [isLoading, setIsLoading] = useState(!0), {
|
|
36
|
+
state: {
|
|
37
|
+
isSharing,
|
|
38
|
+
shareRights,
|
|
39
|
+
shareRightActions
|
|
40
|
+
},
|
|
41
|
+
dispatch: shareDispatch,
|
|
42
|
+
myAvatar,
|
|
43
|
+
currentIsAuthor,
|
|
44
|
+
handleShare,
|
|
45
|
+
toggleRight,
|
|
46
|
+
handleDeleteRow
|
|
47
|
+
} = useShare({
|
|
48
|
+
resourceId,
|
|
49
|
+
resourceCreatorId,
|
|
50
|
+
resourceRights,
|
|
51
|
+
shareResource,
|
|
52
|
+
setIsLoading,
|
|
53
|
+
onSuccess
|
|
54
|
+
}), {
|
|
55
|
+
state: {
|
|
56
|
+
searchResults,
|
|
57
|
+
searchInputValue
|
|
58
|
+
},
|
|
59
|
+
showSearchAdmlHint,
|
|
60
|
+
showSearchLoading,
|
|
61
|
+
showSearchNoResults,
|
|
62
|
+
getSearchMinLength,
|
|
63
|
+
handleSearchInputChange,
|
|
64
|
+
handleSearchResultsChange
|
|
65
|
+
} = useSearch({
|
|
66
|
+
resourceId,
|
|
67
|
+
resourceCreatorId,
|
|
68
|
+
shareRights,
|
|
69
|
+
shareDispatch
|
|
70
|
+
}), {
|
|
71
|
+
refBookmark,
|
|
72
|
+
showBookmark,
|
|
73
|
+
handleBookmarkChange,
|
|
74
|
+
toggleBookmark,
|
|
75
|
+
bookmark,
|
|
76
|
+
handleOnSave,
|
|
77
|
+
showBookmarkInput,
|
|
78
|
+
toggleBookmarkInput
|
|
79
|
+
} = useShareBookmark({
|
|
80
|
+
shareRights,
|
|
81
|
+
shareDispatch
|
|
82
|
+
}), {
|
|
21
83
|
t
|
|
22
|
-
} = useTranslation(),
|
|
23
|
-
setIsSaving(isSaving2);
|
|
24
|
-
};
|
|
84
|
+
} = useTranslation(), searchPlaceholder = showSearchAdmlHint() ? t("explorer.search.adml.hint") : t("explorer.modal.share.search.placeholder");
|
|
25
85
|
return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "share_modal", size: "lg", isOpen, onModalClose: onCancel, children: [
|
|
26
86
|
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t("share.title") }),
|
|
27
87
|
/* @__PURE__ */ jsxs(Modal.Body, { children: [
|
|
28
88
|
/* @__PURE__ */ jsx(Alert, { type: "info", className: "mb-16", children: t("explorer.modal.share.alert.community") }),
|
|
29
|
-
/* @__PURE__ */ jsx(
|
|
89
|
+
/* @__PURE__ */ jsx(Heading, { headingStyle: "h4", level: "h3", className: "mb-16", children: t("explorer.modal.share.usersWithAccess") }),
|
|
90
|
+
/* @__PURE__ */ jsx("div", { className: "table-responsive", children: isLoading ? /* @__PURE__ */ jsx(LoadingScreen, {}) : /* @__PURE__ */ jsxs("table", { className: "table border align-middle mb-0", children: [
|
|
91
|
+
/* @__PURE__ */ jsx("thead", { className: "bg-secondary", children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
92
|
+
/* @__PURE__ */ jsx("th", { scope: "col", className: "w-32", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("explorer.modal.share.avatar.shared.alt") }) }),
|
|
93
|
+
/* @__PURE__ */ jsx("th", { scope: "col", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("explorer.modal.share.search.placeholder") }) }),
|
|
94
|
+
shareRightActions.map((shareRightAction) => /* @__PURE__ */ jsx("th", { scope: "col", className: "text-center text-white", children: t(shareRightAction.displayName) }, shareRightAction.displayName)),
|
|
95
|
+
/* @__PURE__ */ jsx("th", { scope: "col", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("close") }) })
|
|
96
|
+
] }) }),
|
|
97
|
+
/* @__PURE__ */ jsxs("tbody", { children: [
|
|
98
|
+
currentIsAuthor() && /* @__PURE__ */ jsxs("tr", { children: [
|
|
99
|
+
/* @__PURE__ */ jsx("th", { scope: "row", children: /* @__PURE__ */ jsx(Avatar, { alt: t("explorer.modal.share.avatar.me.alt"), size: "xs", src: myAvatar, variant: "circle" }) }),
|
|
100
|
+
/* @__PURE__ */ jsx("td", { children: t("share.me") }),
|
|
101
|
+
shareRightActions.map((shareRightAction) => /* @__PURE__ */ jsx("td", { style: {
|
|
102
|
+
width: "80px"
|
|
103
|
+
}, className: "text-center text-white", children: /* @__PURE__ */ jsx(Checkbox, { checked: !0, disabled: !0 }) }, shareRightAction.displayName)),
|
|
104
|
+
/* @__PURE__ */ jsx("td", {})
|
|
105
|
+
] }),
|
|
106
|
+
/* @__PURE__ */ jsx(ShareBookmarkLine, { showBookmark, shareRightActions, shareRights, onDeleteRow: handleDeleteRow, toggleRight, toggleBookmark })
|
|
107
|
+
] })
|
|
108
|
+
] }) }),
|
|
109
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-16", children: [
|
|
110
|
+
/* @__PURE__ */ jsx(Button, { color: "tertiary", leftIcon: /* @__PURE__ */ jsx(SvgIconBookmark, {}), rightIcon: /* @__PURE__ */ jsx(SvgIconRafterDown, { title: t("show"), className: "w-16 min-w-0", style: {
|
|
111
|
+
transition: "rotate 0.2s ease-out",
|
|
112
|
+
rotate: showBookmarkInput ? "-180deg" : "0deg"
|
|
113
|
+
} }), type: "button", variant: "ghost", className: "fw-normal", onClick: () => toggleBookmarkInput(!showBookmarkInput), children: t("share.save.sharebookmark") }),
|
|
114
|
+
showBookmarkInput && /* @__PURE__ */ jsx(ShareBookmark, { refBookmark, bookmark, onBookmarkChange: handleBookmarkChange, onSave: handleOnSave })
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ jsx("hr", {}),
|
|
117
|
+
/* @__PURE__ */ jsxs(Heading, { headingStyle: "h4", level: "h3", className: "mb-16 d-flex align-items-center", children: [
|
|
118
|
+
/* @__PURE__ */ jsx("div", { className: "me-8", children: t("explorer.modal.share.search") }),
|
|
119
|
+
/* @__PURE__ */ jsx(Tooltip, { message: "Vos favoris de partage s’affichent en priorité dans votre liste lorsque vous recherchez un groupe ou une personne, vous pouvez les retrouver dans l’annuaire.", placement: "top", children: /* @__PURE__ */ jsx(SvgIconInfoCircle, { className: "c-pointer", height: "18" }) })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ jsx("div", { className: "row", children: /* @__PURE__ */ jsx("div", { className: "col-10", children: /* @__PURE__ */ jsx(Combobox, { value: searchInputValue, placeholder: searchPlaceholder, isLoading: showSearchLoading(), noResult: showSearchNoResults(), options: searchResults, searchMinLength: getSearchMinLength(), onSearchInputChange: handleSearchInputChange, onSearchResultsChange: handleSearchResultsChange }) }) }),
|
|
30
122
|
children
|
|
31
123
|
] }),
|
|
32
124
|
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
|
33
|
-
/* @__PURE__ */ jsx(Button, { type: "button", color: "tertiary", variant: "ghost", onClick: onCancel,
|
|
34
|
-
/* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "filled", isLoading:
|
|
125
|
+
/* @__PURE__ */ jsx(Button, { type: "button", color: "tertiary", variant: "ghost", onClick: onCancel, children: t("explorer.cancel") }),
|
|
126
|
+
/* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "filled", isLoading: isSharing, onClick: handleShare, disabled: isSharing, children: t("share") })
|
|
35
127
|
] })
|
|
36
|
-
] }), document.getElementById("portal")
|
|
128
|
+
] }), document.getElementById("portal"));
|
|
37
129
|
}
|
|
38
130
|
export {
|
|
39
131
|
ShareResourceModal as default
|