@edifice.io/react 2.3.2 → 2.4.0-develop-pedago.20251006185417
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/Avatar/Avatar.d.ts +5 -0
- package/dist/components/Avatar/Avatar.js +8 -2
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +10 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +5 -5
- package/dist/components/Dropdown/Dropdown.d.ts +10 -4
- package/dist/components/Dropdown/Dropdown.js +24 -8
- package/dist/components/Flex/Flex.d.ts +2 -1
- package/dist/components/Flex/Flex.js +8 -6
- package/dist/components/Layout/Layout.d.ts +5 -1
- package/dist/components/Layout/Layout.js +5 -2
- package/dist/components/Layout/components/Header.js +3 -4
- package/dist/components/Layout/components/WidgetApps.js +1 -1
- package/dist/components/Layout/hooks/useHeader.js +4 -11
- package/dist/components/RadioCard/RadioCard.d.ts +37 -0
- package/dist/components/RadioCard/index.d.ts +2 -0
- package/dist/components/StackedGroup/StackedGroup.d.ts +5 -0
- package/dist/components/StackedGroup/StackedGroup.js +10 -8
- package/dist/components/Stepper/Stepper.d.ts +18 -0
- package/dist/components/Stepper/Stepper.js +15 -0
- package/dist/components/Stepper/index.d.ts +1 -0
- package/dist/components/Tabs/components/Tabs.d.ts +27 -3
- package/dist/components/Tabs/components/Tabs.js +9 -3
- package/dist/components/Tabs/components/TabsList.d.ts +15 -1
- package/dist/components/Tabs/components/TabsList.js +15 -5
- package/dist/components/Tabs/components/TabsPanel.d.ts +9 -1
- package/dist/components/Tabs/components/TabsPanel.js +8 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/editor.js +18 -16
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useDropdown/useDropdown.d.ts +2 -0
- package/dist/hooks/useDropdown/useDropdown.js +2 -0
- package/dist/hooks/useIsAdmc/index.d.ts +1 -0
- package/dist/hooks/useIsAdmc/useIsAdmc.d.ts +3 -0
- package/dist/hooks/useIsAdmc/useIsAdmc.js +22 -0
- package/dist/hooks/useIsAdmlcOrAdmc/index.d.ts +1 -0
- package/dist/hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.d.ts +3 -0
- package/dist/hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js +16 -0
- package/dist/icons-nav.js +28 -26
- package/dist/icons.js +190 -184
- package/dist/index.js +128 -120
- package/dist/modules/editor/components/MathsModal/MathsModal.js +1 -1
- package/dist/modules/editor/components/NodeView/IframeNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/IframeNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/index.d.ts +1 -0
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +20 -6
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +1 -1
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +1 -1
- package/dist/modules/editor/hooks/useResizeMedia.d.ts +4 -1
- package/dist/modules/editor/hooks/useResizeMedia.js +33 -21
- package/dist/modules/editor/hooks/useTipTapEditor.js +4 -4
- package/dist/modules/icons/components/IconMegaphone.d.ts +7 -0
- package/dist/modules/icons/components/IconMegaphone.js +12 -0
- package/dist/modules/icons/components/IconNotes.d.ts +7 -0
- package/dist/modules/icons/components/IconNotes.js +13 -0
- package/dist/modules/icons/components/IconUnion.d.ts +7 -0
- package/dist/modules/icons/components/IconUnion.js +15 -0
- package/dist/modules/icons/components/apps/IconCommunities.js +2 -2
- package/dist/modules/icons/components/index.d.ts +3 -0
- package/dist/modules/icons/components/nav/IconCommunities.d.ts +7 -0
- package/dist/modules/icons/components/nav/IconCommunities.js +12 -0
- package/dist/modules/icons/components/nav/index.d.ts +1 -0
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +1 -1
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +57 -2
- package/dist/modules/modals/ResourceModal/ResourceModal.js +20 -16
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.d.ts +1 -1
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.js +12 -6
- package/dist/modules/modals/ShareModal/ShareModal.js +2 -0
- package/dist/modules/modals/ShareModal/hooks/useShareRightDisabled.d.ts +8 -0
- package/dist/modules/modals/ShareModal/hooks/useShareRightDisabled.js +11 -0
- package/dist/modules/modals/ShareModal/hooks/useShareRightVisible.d.ts +11 -0
- package/dist/modules/modals/ShareModal/hooks/useShareRightVisible.js +11 -0
- package/dist/modules/multimedia/FileCard/FileCard.d.ts +13 -2
- package/dist/modules/multimedia/FileCard/FileCard.js +15 -5
- package/dist/modules/multimedia/FileCard/FileIcon.d.ts +5 -1
- package/dist/modules/multimedia/FileCard/FileIcon.js +2 -2
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +3 -1
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +7 -6
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +3 -1
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +7 -2
- package/dist/modules/multimedia/index.d.ts +1 -0
- package/dist/multimedia.js +12 -10
- package/package.json +7 -9
package/dist/index.js
CHANGED
|
@@ -36,67 +36,71 @@ import { default as default36 } from "./components/Select/Select.js";
|
|
|
36
36
|
import { default as default37 } from "./components/Skeleton/ButtonSkeleton.js";
|
|
37
37
|
import { default as default38 } from "./components/Skeleton/TextSkeleton.js";
|
|
38
38
|
import { default as default39 } from "./components/StackedGroup/StackedGroup.js";
|
|
39
|
-
import { default as default40 } from "./components/
|
|
40
|
-
import { default as default41 } from "./components/
|
|
41
|
-
import { default as default42 } from "./components/
|
|
42
|
-
import { default as default43 } from "./components/
|
|
39
|
+
import { default as default40 } from "./components/Stepper/Stepper.js";
|
|
40
|
+
import { default as default41 } from "./components/Switch/Switch.js";
|
|
41
|
+
import { default as default42 } from "./components/Table/components/Table.js";
|
|
42
|
+
import { default as default43 } from "./components/TextArea/TextArea.js";
|
|
43
|
+
import { default as default44 } from "./components/Tooltip/Tooltip.js";
|
|
43
44
|
import { DndTree } from "./components/Tree/components/DndTree.js";
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import { default as
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import {
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
83
|
-
import { default as
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
91
|
-
import { default as
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
95
|
-
import { default as
|
|
96
|
-
import { default as
|
|
97
|
-
import { default as
|
|
98
|
-
import { default as
|
|
99
|
-
import { default as
|
|
45
|
+
import { default as default45 } from "./components/Tree/components/SortableTree.js";
|
|
46
|
+
import { default as default46 } from "./components/Tree/components/Tree.js";
|
|
47
|
+
import { default as default47 } from "./components/TreeView/TreeView.js";
|
|
48
|
+
import { default as default48 } from "./components/VisuallyHidden/VisuallyHidden.js";
|
|
49
|
+
import { default as default49 } from "./hooks/useBookmark/useBookmark.js";
|
|
50
|
+
import { default as default50 } from "./hooks/useBreakpoint/useBreakpoint.js";
|
|
51
|
+
import { default as default51 } from "./hooks/useBrowserInfo/useBrowserInfo.js";
|
|
52
|
+
import { default as default52 } from "./hooks/useCantoo/useCantoo.js";
|
|
53
|
+
import { default as default53 } from "./hooks/useClickOutside/useClickOutside.js";
|
|
54
|
+
import { default as default54 } from "./hooks/useConversation/useConversation.js";
|
|
55
|
+
import { default as default55 } from "./hooks/useDate/useDate.js";
|
|
56
|
+
import { default as default56 } from "./hooks/useDebounce/useDebounce.js";
|
|
57
|
+
import { default as default57 } from "./hooks/useDirectory/useDirectory.js";
|
|
58
|
+
import { default as default58 } from "./hooks/useDropdown/useDropdown.js";
|
|
59
|
+
import { default as default59 } from "./hooks/useDropzone/useDropzone.js";
|
|
60
|
+
import { default as default60 } from "./hooks/useEdificeIcons/useEdificeIcons.js";
|
|
61
|
+
import { default as default61 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
|
|
62
|
+
import { default as default62 } from "./hooks/useHover/useHover.js";
|
|
63
|
+
import { default as default63 } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
|
|
64
|
+
import { default as default64 } from "./hooks/useImage/useImage.js";
|
|
65
|
+
import { default as default65 } from "./hooks/useIsAdml/useIsAdml.js";
|
|
66
|
+
import { default as default66 } from "./hooks/useIsAdmc/useIsAdmc.js";
|
|
67
|
+
import { default as default67 } from "./hooks/useIsAdmlcOrAdmc/useIsAdmlcOrAdmc.js";
|
|
68
|
+
import { default as default68 } from "./hooks/useKeyPress/useKeyPress.js";
|
|
69
|
+
import { default as default69 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
|
|
70
|
+
import { default as default70 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
|
|
71
|
+
import { default as default71 } from "./hooks/useScrollToTop/useScrollToTop.js";
|
|
72
|
+
import { default as default72 } from "./hooks/useTitle/useTitle.js";
|
|
73
|
+
import { default as default73 } from "./hooks/useToast/useToast.js";
|
|
74
|
+
import { default as default74 } from "./hooks/useToggle/useToggle.js";
|
|
75
|
+
import { default as default75 } from "./hooks/useTrapFocus/useTrapFocus.js";
|
|
76
|
+
import { default as default76 } from "./hooks/useTrashedResource/useTrashedResource.js";
|
|
77
|
+
import { default as default77 } from "./hooks/useUpload/useUpload.js";
|
|
78
|
+
import { default as default78 } from "./hooks/useUploadFiles/useUploadFiles.js";
|
|
79
|
+
import { default as default79 } from "./hooks/useUser/useUser.js";
|
|
80
|
+
import { default as default80 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
|
|
81
|
+
import { default as default81 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
|
|
82
|
+
import { WORKSPACE_SHARED_FOLDER_ID, WORKSPACE_USER_FOLDER_ID, default as default82 } from "./hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
|
|
83
|
+
import { default as default83 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
|
|
84
|
+
import { default as default84 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
|
|
85
|
+
import { default as default85 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
|
|
86
|
+
import { default as default86 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
|
|
87
|
+
import { default as default87 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
|
|
88
|
+
import { default as default88 } from "./modules/modals/PublishModal/PublishModal.js";
|
|
89
|
+
import { default as default89 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
|
|
90
|
+
import { default as default90 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
|
|
91
|
+
import { default as default91 } from "./modules/modals/ShareModal/ShareModal.js";
|
|
92
|
+
import { default as default92 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
|
|
93
|
+
import { default as default93 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
|
|
94
|
+
import { default as default94 } from "./modules/multimedia/AudioRecorder/AudioRecorder.js";
|
|
95
|
+
import { default as default95 } from "./modules/multimedia/Embed/Embed.js";
|
|
96
|
+
import { default as default96 } from "./modules/multimedia/ImageEditor/components/ImageEditor.js";
|
|
97
|
+
import { default as default97 } from "./modules/multimedia/ImagePicker/ImagePicker.js";
|
|
98
|
+
import { default as default98 } from "./modules/multimedia/FileCard/FileCard.js";
|
|
99
|
+
import { default as default99 } from "./modules/multimedia/MediaLibrary/MediaLibrary.js";
|
|
100
|
+
import { default as default100 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
|
|
101
|
+
import { default as default101 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
|
|
102
|
+
import { default as default102 } from "./modules/multimedia/Workspace/Workspace.js";
|
|
103
|
+
import { default as default103 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
|
|
100
104
|
import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
|
|
101
105
|
import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
|
|
102
106
|
import { Column, Grid } from "./components/Grid/Grid.js";
|
|
@@ -132,11 +136,11 @@ export {
|
|
|
132
136
|
default4 as AppHeader,
|
|
133
137
|
default5 as AppIcon,
|
|
134
138
|
default6 as Attachment,
|
|
135
|
-
|
|
139
|
+
default94 as AudioRecorder,
|
|
136
140
|
default7 as Avatar,
|
|
137
141
|
default8 as AvatarGroup,
|
|
138
142
|
default9 as Badge,
|
|
139
|
-
|
|
143
|
+
default89 as BlogPublic,
|
|
140
144
|
default10 as Breadcrumb,
|
|
141
145
|
default11 as Button,
|
|
142
146
|
default37 as ButtonSkeleton,
|
|
@@ -146,7 +150,7 @@ export {
|
|
|
146
150
|
default17 as ColorPickerItem,
|
|
147
151
|
Column,
|
|
148
152
|
default18 as Combobox,
|
|
149
|
-
|
|
153
|
+
default86 as ConfirmModal,
|
|
150
154
|
DefaultPalette,
|
|
151
155
|
DndTree,
|
|
152
156
|
default19 as Dropdown,
|
|
@@ -156,9 +160,10 @@ export {
|
|
|
156
160
|
EdificeClientProvider,
|
|
157
161
|
EdificeThemeContext,
|
|
158
162
|
EdificeThemeProvider,
|
|
159
|
-
|
|
163
|
+
default95 as Embed,
|
|
160
164
|
default21 as EmptyScreen,
|
|
161
165
|
ExternalLinker,
|
|
166
|
+
default98 as FileCard,
|
|
162
167
|
default22 as Flex,
|
|
163
168
|
default24 as FormControl,
|
|
164
169
|
default23 as FormText,
|
|
@@ -166,8 +171,8 @@ export {
|
|
|
166
171
|
default25 as Heading,
|
|
167
172
|
default12 as IconButton,
|
|
168
173
|
default26 as Image,
|
|
169
|
-
|
|
170
|
-
|
|
174
|
+
default96 as ImageEditor,
|
|
175
|
+
default97 as ImagePicker,
|
|
171
176
|
default27 as Input,
|
|
172
177
|
InternalLinker,
|
|
173
178
|
default28 as Label,
|
|
@@ -176,44 +181,45 @@ export {
|
|
|
176
181
|
default29 as Loading,
|
|
177
182
|
default30 as LoadingScreen,
|
|
178
183
|
default31 as Logo,
|
|
179
|
-
|
|
184
|
+
default99 as MediaLibrary,
|
|
180
185
|
Menu,
|
|
181
186
|
MockedProvider,
|
|
182
187
|
default32 as Modal,
|
|
183
|
-
|
|
188
|
+
default87 as OnboardingModal,
|
|
184
189
|
Popover,
|
|
185
190
|
PopoverBody,
|
|
186
191
|
PopoverFooter,
|
|
187
192
|
PopoverHeader,
|
|
188
193
|
default33 as PreventPropagation,
|
|
189
|
-
|
|
194
|
+
default88 as PublishModal,
|
|
190
195
|
default34 as Radio,
|
|
191
196
|
ResourceModal,
|
|
192
197
|
default35 as SearchBar,
|
|
193
198
|
default13 as SearchButton,
|
|
194
199
|
default36 as Select,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
200
|
+
default92 as ShareBlog,
|
|
201
|
+
default91 as ShareModal,
|
|
202
|
+
default45 as SortableTree,
|
|
198
203
|
default39 as StackedGroup,
|
|
199
|
-
default40 as
|
|
200
|
-
default41 as
|
|
204
|
+
default40 as Stepper,
|
|
205
|
+
default41 as Switch,
|
|
206
|
+
default42 as Table,
|
|
201
207
|
Tabs,
|
|
202
|
-
|
|
208
|
+
default43 as TextArea,
|
|
203
209
|
default38 as TextSkeleton,
|
|
204
210
|
Toolbar,
|
|
205
|
-
|
|
206
|
-
|
|
211
|
+
default44 as Tooltip,
|
|
212
|
+
default46 as Tree,
|
|
207
213
|
TreeNode,
|
|
208
214
|
TreeNodeFolderWrapper,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
215
|
+
default47 as TreeView,
|
|
216
|
+
default100 as VideoEmbed,
|
|
217
|
+
default101 as VideoRecorder,
|
|
218
|
+
default48 as VisuallyHidden,
|
|
213
219
|
WORKSPACE_SHARED_FOLDER_ID,
|
|
214
220
|
WORKSPACE_USER_FOLDER_ID,
|
|
215
|
-
|
|
216
|
-
|
|
221
|
+
default102 as Workspace,
|
|
222
|
+
default103 as WorkspaceFolders,
|
|
217
223
|
addNode,
|
|
218
224
|
arrayUnique,
|
|
219
225
|
buildTree,
|
|
@@ -241,48 +247,50 @@ export {
|
|
|
241
247
|
setRef,
|
|
242
248
|
updateNode,
|
|
243
249
|
updateParentIds,
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
250
|
+
default49 as useBookmark,
|
|
251
|
+
default50 as useBreakpoint,
|
|
252
|
+
default51 as useBrowserInfo,
|
|
253
|
+
default52 as useCantoo,
|
|
248
254
|
useCheckable,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
255
|
+
default53 as useClickOutside,
|
|
256
|
+
default54 as useConversation,
|
|
257
|
+
default55 as useDate,
|
|
258
|
+
default56 as useDebounce,
|
|
259
|
+
default57 as useDirectory,
|
|
260
|
+
default58 as useDropdown,
|
|
261
|
+
default59 as useDropzone,
|
|
256
262
|
useDropzoneContext,
|
|
257
263
|
useEdificeClient,
|
|
258
|
-
|
|
264
|
+
default60 as useEdificeIcons,
|
|
259
265
|
useEdificeTheme,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
default65 as
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
266
|
+
default61 as useHasWorkflow,
|
|
267
|
+
default62 as useHover,
|
|
268
|
+
default63 as useHttpErrorToast,
|
|
269
|
+
default64 as useImage,
|
|
270
|
+
default66 as useIsAdmc,
|
|
271
|
+
default65 as useIsAdml,
|
|
272
|
+
default67 as useIsAdmlcOrAdmc,
|
|
273
|
+
default68 as useKeyPress,
|
|
274
|
+
default69 as useLibraryUrl,
|
|
275
|
+
default70 as useMediaLibrary,
|
|
276
|
+
default71 as useScrollToTop,
|
|
277
|
+
default93 as useShareMutation,
|
|
278
|
+
default72 as useTitle,
|
|
279
|
+
default73 as useToast,
|
|
280
|
+
default74 as useToggle,
|
|
281
|
+
default75 as useTrapFocus,
|
|
282
|
+
default76 as useTrashedResource,
|
|
275
283
|
useTreeSortable,
|
|
276
284
|
useTreeView,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
default90 as useUpdateMutation,
|
|
286
|
+
default77 as useUpload,
|
|
287
|
+
default78 as useUploadFiles,
|
|
288
|
+
default79 as useUser,
|
|
289
|
+
default80 as useWorkspaceFile,
|
|
290
|
+
default81 as useWorkspaceFolders,
|
|
291
|
+
default82 as useWorkspaceFoldersTree,
|
|
292
|
+
default83 as useWorkspaceSearch,
|
|
293
|
+
default84 as useXitiTrackPageLoad,
|
|
294
|
+
default85 as useZendeskGuide,
|
|
287
295
|
wrapTreeNode
|
|
288
296
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import Mathematics from "@tiptap
|
|
3
|
+
import Mathematics from "@tiptap/extension-mathematics";
|
|
4
4
|
import { useEditor, EditorContent } from "@tiptap/react";
|
|
5
5
|
import StarterKit from "@tiptap/starter-kit";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Iframe } from "@edifice.io/tiptap-extensions/iframe";
|
|
2
|
+
import { ReactNodeViewRenderer } from "@tiptap/react";
|
|
3
|
+
const IframeNodeView = (Component) => Iframe.extend({
|
|
4
|
+
addNodeView() {
|
|
5
|
+
return ReactNodeViewRenderer(Component);
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
IframeNodeView as default
|
|
10
|
+
};
|
|
@@ -5,3 +5,4 @@ export { default as ImageNodeView } from './ImageNodeView';
|
|
|
5
5
|
export { default as LinkerNodeView } from './LinkerNodeView';
|
|
6
6
|
export { default as VideoNodeView } from './VideoNodeView';
|
|
7
7
|
export { default as InformationPaneNodeView } from './InformationPaneNodeView';
|
|
8
|
+
export { default as IframeNodeView } from './IframeNodeView';
|
|
@@ -18,7 +18,7 @@ const MediaRenderer = (props) => {
|
|
|
18
18
|
startVerticalResize,
|
|
19
19
|
stopVerticalResize,
|
|
20
20
|
isVerticalResizeActive
|
|
21
|
-
} = useResizeMedia(props, resizableMedia), alignContent = (textalign) => {
|
|
21
|
+
} = useResizeMedia(props, resizableMedia), width = node.attrs.width || 560, height = node.attrs.height || Math.round(width * 9 / 16), alignContent = (textalign) => {
|
|
22
22
|
switch (textalign) {
|
|
23
23
|
case "center":
|
|
24
24
|
case "justify":
|
|
@@ -53,11 +53,25 @@ const MediaRenderer = (props) => {
|
|
|
53
53
|
element.removeEventListener("play", onVideoPlay);
|
|
54
54
|
};
|
|
55
55
|
}, []), /* @__PURE__ */ jsx(NodeViewWrapper, { style: alignContent(node.attrs.textAlign), children: /* @__PURE__ */ jsxs("div", { className: "media-node-view", children: [
|
|
56
|
-
/* @__PURE__ */ jsx("div", { "data-drag-handle": !0, children:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
/* @__PURE__ */ jsx("div", { "data-drag-handle": !0, children: (() => {
|
|
57
|
+
switch (node.type.name) {
|
|
58
|
+
case "custom-image":
|
|
59
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
+
/* @__PURE__ */ jsx(Image, { src: node.attrs.src, alt: node.attrs.alt, title: node.attrs.title, width: node.attrs.width, style: node.attrs.style, height: node.attrs.height, className: "custom-image", ref: resizableMedia }),
|
|
61
|
+
node.attrs.title && // Display legend (set in title attribute) if it exists
|
|
62
|
+
/* @__PURE__ */ jsx("em", { className: "custom-image-legend caption text-align-left", children: node.attrs.title })
|
|
63
|
+
] });
|
|
64
|
+
case "video":
|
|
65
|
+
return /* @__PURE__ */ jsx("video", { ref: resizableMedia, controls: node.attrs.controls === "true", src: node.attrs.src, width: node.attrs.width, height: node.attrs.height, "data-video-resolution": `${node.attrs.width}x${node.attrs.height}`, "data-document-id": node.attrs.documentId, "data-document-is-captation": node.attrs.isCaptation, children: /* @__PURE__ */ jsx("source", { src: node.attrs.src }) });
|
|
66
|
+
case "iframe":
|
|
67
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
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, style: node.attrs.style })
|
|
70
|
+
] });
|
|
71
|
+
default:
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
})() }),
|
|
61
75
|
/* @__PURE__ */ jsx("div", { className: `vertical-resize-handle ${isVerticalResizeActive ? "vertical-resize-active" : ""}`, title: t("tiptap.media.resize"), onMouseDown: (e) => {
|
|
62
76
|
e.stopPropagation(), startVerticalResize(e);
|
|
63
77
|
}, onMouseUp: (e) => {
|
|
@@ -46,7 +46,7 @@ const TableToolbarAddMenu = ({
|
|
|
46
46
|
}];
|
|
47
47
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48
48
|
/* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.table.toolbar.tooltip.add"), placement: "top", children: /* @__PURE__ */ jsx(Dropdown.Trigger, { variant: "ghost", label: t("tiptap.table.toolbar.add") }) }),
|
|
49
|
-
/* @__PURE__ */ jsx(Dropdown.Menu, { children: addOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }, option.key)
|
|
49
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: addOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }) }, option.key)) })
|
|
50
50
|
] });
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
@@ -40,7 +40,7 @@ const TableToolbarDelMenu = ({
|
|
|
40
40
|
}];
|
|
41
41
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
42
|
/* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.table.toolbar.tooltip.del"), placement: "top", children: /* @__PURE__ */ jsx(Dropdown.Trigger, { variant: "ghost", label: t("tiptap.table.toolbar.del") }) }),
|
|
43
|
-
/* @__PURE__ */ jsx(Dropdown.Menu, { children: delOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }, option.key)
|
|
43
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: delOptions.map((option) => /* @__PURE__ */ jsx("div", { onMouseDown: (e) => e.preventDefault(), children: /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: option.onClick, children: option.label }) }, option.key)) })
|
|
44
44
|
] });
|
|
45
45
|
};
|
|
46
46
|
export {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
export interface MediaResizeProps {
|
|
3
3
|
editor: Editor;
|
|
4
|
+
updateAttributes: (attrs: Record<string, any>) => void;
|
|
4
5
|
[x: string]: any;
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
+
type ResizableElt = HTMLImageElement | HTMLVideoElement | HTMLIFrameElement;
|
|
8
|
+
export declare const useResizeMedia: (props: MediaResizeProps, refResizable: React.RefObject<ResizableElt>, forcedAspectRatio?: number) => {
|
|
7
9
|
startVerticalResize: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
8
10
|
stopVerticalResize: () => void;
|
|
9
11
|
isVerticalResizeActive: import('react').MutableRefObject<boolean>;
|
|
10
12
|
};
|
|
13
|
+
export {};
|
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
import { useRef, useEffect } from "react";
|
|
2
|
-
const MIN_WIDTH = 80, useResizeMedia = (props, refResizable) => {
|
|
3
|
-
const aspectRatio = useRef(0), lastCursorX = useRef(-1), isVerticalResizeActive = useRef(!1), proseMirrorContainerWidth = useRef(0),
|
|
2
|
+
const MIN_WIDTH = 80, useResizeMedia = (props, refResizable, forcedAspectRatio) => {
|
|
3
|
+
const aspectRatio = useRef(0), lastCursorX = useRef(-1), isVerticalResizeActive = useRef(!1), proseMirrorContainerWidth = useRef(0), limitWidth = (width) => width < MIN_WIDTH, readCurrentPixelWidth = () => {
|
|
4
|
+
const el = refResizable.current;
|
|
5
|
+
if (!el) return 0;
|
|
6
|
+
const rect = el.getBoundingClientRect();
|
|
7
|
+
return Math.round(rect.width || el.width || 0);
|
|
8
|
+
}, readCurrentPixelHeight = () => {
|
|
9
|
+
const el = refResizable.current;
|
|
10
|
+
if (!el) return 0;
|
|
11
|
+
const rect = el.getBoundingClientRect();
|
|
12
|
+
return Math.round(rect.height || el.height || 0);
|
|
13
|
+
};
|
|
4
14
|
useEffect(() => {
|
|
5
15
|
const proseMirrorContainerDiv = document.querySelector(".ProseMirror");
|
|
6
|
-
proseMirrorContainerDiv && (proseMirrorContainerWidth.current = proseMirrorContainerDiv
|
|
16
|
+
if (proseMirrorContainerDiv && (proseMirrorContainerWidth.current = proseMirrorContainerDiv.clientWidth), forcedAspectRatio && forcedAspectRatio > 0)
|
|
17
|
+
aspectRatio.current = forcedAspectRatio;
|
|
18
|
+
else {
|
|
19
|
+
const w = readCurrentPixelWidth(), h = readCurrentPixelHeight();
|
|
20
|
+
w > 0 && h > 0 ? aspectRatio.current = w / h : aspectRatio.current = 16 / 9;
|
|
21
|
+
}
|
|
7
22
|
}, []);
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
const clampWidth = (w) => {
|
|
24
|
+
let width = w;
|
|
25
|
+
return proseMirrorContainerWidth.current > 0 && width > proseMirrorContainerWidth.current && (width = proseMirrorContainerWidth.current), limitWidth(width) && (width = MIN_WIDTH), Math.round(width);
|
|
26
|
+
}, onVerticalResize = (direction, diff) => {
|
|
27
|
+
const currWidth = readCurrentPixelWidth();
|
|
28
|
+
if (!currWidth) return;
|
|
29
|
+
let newWidth = direction === "left" ? currWidth - Math.abs(diff) : currWidth + Math.abs(diff);
|
|
30
|
+
newWidth = clampWidth(newWidth);
|
|
31
|
+
const ratio = aspectRatio.current || 16 / 9, newHeight = Math.round(newWidth / ratio);
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
props.updateAttributes({
|
|
34
|
+
width: newWidth,
|
|
35
|
+
height: newHeight
|
|
13
36
|
});
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const currentMediaDimensions = {
|
|
17
|
-
width: (_a = refResizable.current) == null ? void 0 : _a.width,
|
|
18
|
-
height: (_b = refResizable.current) == null ? void 0 : _b.height
|
|
19
|
-
}, newMediaDimensions = {
|
|
20
|
-
width: -1,
|
|
21
|
-
height: -1
|
|
22
|
-
};
|
|
23
|
-
currentMediaDimensions.width && (directionOfMouseMove === "left" ? newMediaDimensions.width = currentMediaDimensions.width - Math.abs(diff) : newMediaDimensions.width = currentMediaDimensions.width + Math.abs(diff)), newMediaDimensions.width > proseMirrorContainerWidth.current && (newMediaDimensions.width = proseMirrorContainerWidth.current), diff !== 0 && limitWidthOrHeight(newMediaDimensions.width) && (newMediaDimensions.width = MIN_WIDTH), newMediaDimensions.height = newMediaDimensions.width / aspectRatio.current, setTimeout(() => {
|
|
24
|
-
props.updateAttributes(newMediaDimensions);
|
|
25
37
|
});
|
|
26
38
|
}, onVerticalMouseMove = (event) => {
|
|
27
39
|
if (!isVerticalResizeActive.current) return;
|
|
@@ -29,8 +41,8 @@ const MIN_WIDTH = 80, useResizeMedia = (props, refResizable) => {
|
|
|
29
41
|
clientX
|
|
30
42
|
} = event, diff = lastCursorX.current - clientX;
|
|
31
43
|
if (lastCursorX.current = clientX, diff === 0) return;
|
|
32
|
-
const
|
|
33
|
-
onVerticalResize(
|
|
44
|
+
const direction = diff > 0 ? "left" : "right";
|
|
45
|
+
onVerticalResize(direction, Math.abs(diff));
|
|
34
46
|
}, startVerticalResize = (event) => {
|
|
35
47
|
isVerticalResizeActive.current = !0, lastCursorX.current = event.clientX, document.addEventListener("mousemove", onVerticalMouseMove), document.addEventListener("mouseup", stopVerticalResize);
|
|
36
48
|
}, stopVerticalResize = () => {
|
|
@@ -4,11 +4,10 @@ import { FontSize } from "@edifice.io/tiptap-extensions/font-size";
|
|
|
4
4
|
import { CustomHeading } from "@edifice.io/tiptap-extensions/heading";
|
|
5
5
|
import { CustomHighlight } from "@edifice.io/tiptap-extensions/highlight";
|
|
6
6
|
import { Hyperlink } from "@edifice.io/tiptap-extensions/hyperlink";
|
|
7
|
-
import { Iframe } from "@edifice.io/tiptap-extensions/iframe";
|
|
8
7
|
import { SpeechRecognition } from "@edifice.io/tiptap-extensions/speech-recognition";
|
|
9
8
|
import { SpeechSynthesis } from "@edifice.io/tiptap-extensions/speech-synthesis";
|
|
10
9
|
import { TableCell } from "@edifice.io/tiptap-extensions/table-cell";
|
|
11
|
-
import { Mathematics } from "@tiptap
|
|
10
|
+
import { Mathematics } from "@tiptap/extension-mathematics";
|
|
12
11
|
import Color from "@tiptap/extension-color";
|
|
13
12
|
import Focus from "@tiptap/extension-focus";
|
|
14
13
|
import FontFamily from "@tiptap/extension-font-family";
|
|
@@ -27,6 +26,7 @@ import StarterKit from "@tiptap/starter-kit";
|
|
|
27
26
|
import { useTranslation } from "react-i18next";
|
|
28
27
|
import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
29
28
|
import useUpload from "../../../hooks/useUpload/useUpload.js";
|
|
29
|
+
import IframeNodeView from "../components/NodeView/IframeNodeView.js";
|
|
30
30
|
import VideoNodeView from "../components/NodeView/VideoNodeView.js";
|
|
31
31
|
import AudioNodeView from "../components/NodeView/AudioNodeView.js";
|
|
32
32
|
import LinkerNodeView from "../components/NodeView/LinkerNodeView.js";
|
|
@@ -60,12 +60,12 @@ const useTipTapEditor = (editable, content, focus, placeholder, onContentChange,
|
|
|
60
60
|
}), Underline, TextStyle, Color, Subscript, Superscript, Table.configure({
|
|
61
61
|
resizable: !0
|
|
62
62
|
}), TableRow, TableHeader, TableCell, TextAlign.configure({
|
|
63
|
-
types: ["heading", "paragraph", "video", "audio"]
|
|
63
|
+
types: ["heading", "paragraph", "video", "audio", "iframe"]
|
|
64
64
|
}), CustomHeading.configure({
|
|
65
65
|
levels: [1, 2]
|
|
66
66
|
}), Typography, FontSize, SpeechRecognition, SpeechSynthesis.configure({
|
|
67
67
|
lang: (currentLanguage == null ? void 0 : currentLanguage.length) === 2 ? `${currentLanguage}-${currentLanguage.toUpperCase()}` : "fr-FR"
|
|
68
|
-
}),
|
|
68
|
+
}), Hyperlink, FontFamily, Mathematics, Alert, IframeNodeView(MediaRenderer), VideoNodeView(MediaRenderer), AudioNodeView(AudioRenderer), LinkerNodeView(LinkerRenderer), ImageNodeView(MediaRenderer, uploadFile), AttachmentNodeView(AttachmentRenderer), InformationPaneNodeView(InformationPaneRenderer), ...extensions || []],
|
|
69
69
|
content,
|
|
70
70
|
// If the onContentChange callback is provided, we call it on every content change.
|
|
71
71
|
...onContentChange ? {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconMegaphone: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconMegaphone;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconMegaphone = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M13.962 3.067c1.333-.809 3.038.15 3.038 1.71v13.446c0 1.56-1.705 2.519-3.038 1.71l-3.794-2.304a3.67 3.67 0 0 1-7.26-1.084A3 3 0 0 1 1 13.75v-4.5a3 3 0 0 1 3-3h4.44a1 1 0 0 0 .52-.145zM4.9 16.75h3.29a1.67 1.67 0 1 1-3.29 0M15 4.777 9.997 7.814a3 3 0 0 1-1.557.436H4a1 1 0 0 0-1 1v4.5a1 1 0 0 0 1 1h4.44a3 3 0 0 1 1.557.436L15 18.223zm6.055 3.055a1 1 0 0 0-1.11-1.664l-1.5 1a1 1 0 0 0 1.11 1.664zm-2.887 7.613a1 1 0 0 1 1.387-.277l1.5 1a1 1 0 1 1-1.11 1.664l-1.5-1a1 1 0 0 1-.277-1.387M19.5 11a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2z", clipRule: "evenodd" })
|
|
9
|
+
] });
|
|
10
|
+
export {
|
|
11
|
+
SvgIconMegaphone as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconNotes: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconNotes;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconNotes = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
5
|
+
...props
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M1 4a3 3 0 0 1 3-3h16a3 3 0 0 1 3 3v13a1 1 0 1 1-2 0V4a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h13a1 1 0 1 1 0 2H4a3 3 0 0 1-3-3z", clipRule: "evenodd" }),
|
|
9
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M18 18v1.586L19.586 18zm-2-1a1 1 0 0 1 1-1h5a1 1 0 0 1 .707 1.707l-5 5A1 1 0 0 1 16 22zM6 9a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1M6 14a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1", clipRule: "evenodd" })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
SvgIconNotes as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconUnion: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconUnion;
|