@edifice.io/react 2.0.0-develop-rc.22 → 2.0.0-develop-rc.24
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/Alert/Alert.d.ts +3 -3
- package/dist/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/components/AppIcon/AppIcon.d.ts +6 -6
- package/dist/components/AppIcon/AppIcon.js +14 -14
- package/dist/components/Attachment/Attachment.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts +3 -3
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Badge/Badge.d.ts +8 -8
- package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +5 -5
- package/dist/components/Button/IconButton.d.ts +1 -1
- package/dist/components/Button/SearchButton.d.ts +1 -1
- package/dist/components/Card/CardContext.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPalette.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/components/Combobox/ComboboxTrigger.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/DropdownContext.d.ts +1 -1
- package/dist/components/Dropdown/DropdownItem.d.ts +1 -1
- package/dist/components/Dropdown/DropdownMenu.d.ts +2 -2
- package/dist/components/Dropdown/DropdownTrigger.d.ts +3 -3
- package/dist/components/Form/FormContext.d.ts +1 -1
- package/dist/components/Form/FormControl.d.ts +2 -2
- package/dist/components/Grid/Grid.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts +1 -1
- package/dist/components/Image/Image.d.ts +3 -3
- package/dist/components/Image/Image.js +2 -2
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Label/Label.d.ts +2 -2
- package/dist/components/Layout/components/Main.d.ts +1 -1
- package/dist/components/Layout/components/NavItem.d.ts +1 -1
- package/dist/components/Layout/components/NavbarNav.d.ts +1 -1
- package/dist/components/Loading/Loading.d.ts +1 -1
- package/dist/components/LoadingScreen/LoadingScreen.js +3 -3
- package/dist/components/Menu/components/MenuButton.d.ts +1 -1
- package/dist/components/Menu/hooks/useMenu.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/TextArea/TextArea.d.ts +2 -2
- package/dist/components/Toolbar/Toolbar.d.ts +9 -9
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tree/index.d.ts +1 -0
- package/dist/components/Tree/types/index.d.ts +1 -1
- package/dist/components/Tree/utilities/tree-sortable.js +14 -0
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useDate/useDate.js +4 -4
- package/dist/hooks/useUpload/useUpload.js +4 -4
- package/dist/index.js +77 -66
- package/dist/modules/audience/ReactionModal.Card.d.ts +1 -1
- package/dist/modules/comments/hooks/useComments.js +4 -4
- package/dist/modules/comments/types.d.ts +3 -3
- package/dist/modules/editor/components/Editor/Editor.d.ts +4 -4
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.d.ts +1 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.d.ts +1 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.d.ts +1 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.d.ts +1 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.d.ts +1 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.d.ts +1 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +1 -1
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +1 -4
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +1 -1
- package/dist/modules/editor/hooks/useActionOptions.d.ts +1 -1
- package/dist/modules/icons/components/apps/IconAccount.js +1 -1
- package/dist/modules/icons/components/apps/IconActualites.js +1 -1
- package/dist/modules/icons/components/apps/IconAdmin.js +1 -1
- package/dist/modules/icons/components/apps/IconAdminPortal.js +1 -1
- package/dist/modules/icons/components/apps/IconAdmissionPostBac.js +1 -1
- package/dist/modules/icons/components/apps/IconAgenda.js +1 -1
- package/dist/modules/icons/components/apps/IconArchive.js +1 -1
- package/dist/modules/icons/components/apps/IconAssistance.js +1 -1
- package/dist/modules/icons/components/apps/IconAssr.js +1 -1
- package/dist/modules/icons/components/apps/IconAward.js +1 -1
- package/dist/modules/icons/components/apps/IconBanquesavoir.js +1 -1
- package/dist/modules/icons/components/apps/IconBcdi.js +1 -1
- package/dist/modules/icons/components/apps/IconBiblionisep.js +1 -1
- package/dist/modules/icons/components/apps/IconBlog.js +1 -1
- package/dist/modules/icons/components/apps/IconBookmarkEmpty.js +1 -1
- package/dist/modules/icons/components/apps/IconCahierDeTexte.js +1 -1
- package/dist/modules/icons/components/apps/IconCahierTextes.js +1 -1
- package/dist/modules/icons/components/apps/IconCalendar.js +1 -1
- package/dist/modules/icons/components/apps/IconCanalNumerique.js +1 -1
- package/dist/modules/icons/components/apps/IconCcn.js +1 -1
- package/dist/modules/icons/components/apps/IconCerise.js +1 -1
- package/dist/modules/icons/components/apps/IconCervoprint.js +1 -1
- package/dist/modules/icons/components/apps/IconCharlemagne.js +1 -1
- package/dist/modules/icons/components/apps/IconCharte.js +1 -1
- package/dist/modules/icons/components/apps/IconChat.js +1 -1
- package/dist/modules/icons/components/apps/IconCidj.js +1 -1
- package/dist/modules/icons/components/apps/IconCns.js +1 -1
- package/dist/modules/icons/components/apps/IconCollaborativeWall.js +1 -1
- package/dist/modules/icons/components/apps/IconCompetences.js +1 -1
- package/dist/modules/icons/components/apps/IconConnecteurGenerique1.js +1 -1
- package/dist/modules/icons/components/apps/IconConnecteurGenerique2.js +1 -1
- package/dist/modules/icons/components/apps/IconConversation.js +1 -1
- package/dist/modules/icons/components/apps/IconDirectory.js +1 -1
- package/dist/modules/icons/components/apps/IconEducagri.js +1 -1
- package/dist/modules/icons/components/apps/IconEdumedia.js +1 -1
- package/dist/modules/icons/components/apps/IconEdumoov.js +1 -1
- package/dist/modules/icons/components/apps/IconEdutheque.js +1 -1
- package/dist/modules/icons/components/apps/IconElectron.js +1 -1
- package/dist/modules/icons/components/apps/IconElyceepicardie.js +1 -1
- package/dist/modules/icons/components/apps/IconEsidoc.js +1 -1
- package/dist/modules/icons/components/apps/IconEuropress.js +1 -1
- package/dist/modules/icons/components/apps/IconExercizer.js +1 -1
- package/dist/modules/icons/components/apps/IconForum.js +1 -1
- package/dist/modules/icons/components/apps/IconGepi.js +1 -1
- package/dist/modules/icons/components/apps/IconGlpi.js +1 -1
- package/dist/modules/icons/components/apps/IconHiboutheque.js +1 -1
- package/dist/modules/icons/components/apps/IconItopstore.js +1 -1
- package/dist/modules/icons/components/apps/IconKne.js +1 -1
- package/dist/modules/icons/components/apps/IconLeSiteTv.js +1 -1
- package/dist/modules/icons/components/apps/IconLemonde.js +1 -1
- package/dist/modules/icons/components/apps/IconLesechos.js +1 -1
- package/dist/modules/icons/components/apps/IconLibrary.js +1 -1
- package/dist/modules/icons/components/apps/IconLsu.js +1 -1
- package/dist/modules/icons/components/apps/IconMadmagz.js +1 -1
- package/dist/modules/icons/components/apps/IconMatholycee.js +1 -1
- package/dist/modules/icons/components/apps/IconMaxicours.js +1 -1
- package/dist/modules/icons/components/apps/IconMediacentre.js +1 -1
- package/dist/modules/icons/components/apps/IconMindmap.js +1 -1
- package/dist/modules/icons/components/apps/IconMonorientationenligne.js +1 -1
- package/dist/modules/icons/components/apps/IconMonstageenligne.js +1 -1
- package/dist/modules/icons/components/apps/IconMoodle.js +1 -1
- package/dist/modules/icons/components/apps/IconMuseefrancaisphoto.js +1 -1
- package/dist/modules/icons/components/apps/IconMyNetwork.js +1 -1
- package/dist/modules/icons/components/apps/IconNetvibes.js +1 -1
- package/dist/modules/icons/components/apps/IconNote.js +1 -1
- package/dist/modules/icons/components/apps/IconNotebook.js +1 -1
- package/dist/modules/icons/components/apps/IconNotes.js +1 -1
- package/dist/modules/icons/components/apps/IconOnisep.js +1 -1
- package/dist/modules/icons/components/apps/IconOnisep2.js +1 -1
- package/dist/modules/icons/components/apps/IconPad.js +1 -1
- package/dist/modules/icons/components/apps/IconPages.js +1 -1
- package/dist/modules/icons/components/apps/IconParametrage.js +1 -1
- package/dist/modules/icons/components/apps/IconParametrages.js +1 -1
- package/dist/modules/icons/components/apps/IconParaschool.js +1 -1
- package/dist/modules/icons/components/apps/IconParcours.js +1 -1
- package/dist/modules/icons/components/apps/IconPearltrees.js +1 -1
- package/dist/modules/icons/components/apps/IconPicardieCursus.js +1 -1
- package/dist/modules/icons/components/apps/IconPoll.js +1 -1
- package/dist/modules/icons/components/apps/IconProeps.js +1 -1
- package/dist/modules/icons/components/apps/IconPronote.js +1 -1
- package/dist/modules/icons/components/apps/IconPublic.js +1 -1
- package/dist/modules/icons/components/apps/IconQwant.js +1 -1
- package/dist/modules/icons/components/apps/IconQwantJunior.js +1 -1
- package/dist/modules/icons/components/apps/IconRack.js +1 -1
- package/dist/modules/icons/components/apps/IconRbs.js +1 -1
- package/dist/modules/icons/components/apps/IconResidenceArtiste.js +1 -1
- package/dist/modules/icons/components/apps/IconRessourcesdepartementale91.js +1 -1
- package/dist/modules/icons/components/apps/IconSacoche.js +1 -1
- package/dist/modules/icons/components/apps/IconSchoolbook.js +1 -1
- package/dist/modules/icons/components/apps/IconScolinfo.js +1 -1
- package/dist/modules/icons/components/apps/IconScrapbook.js +1 -1
- package/dist/modules/icons/components/apps/IconSearchengine.js +1 -1
- package/dist/modules/icons/components/apps/IconSettingsClass.js +1 -1
- package/dist/modules/icons/components/apps/IconSharebigfiles.js +1 -1
- package/dist/modules/icons/components/apps/IconStatistics.js +1 -1
- package/dist/modules/icons/components/apps/IconStats.js +1 -1
- package/dist/modules/icons/components/apps/IconSuitcase.js +1 -1
- package/dist/modules/icons/components/apps/IconSupport.js +1 -1
- package/dist/modules/icons/components/apps/IconTimeline.js +1 -1
- package/dist/modules/icons/components/apps/IconTimelinegenerator.js +1 -1
- package/dist/modules/icons/components/apps/IconTurboself.js +1 -1
- package/dist/modules/icons/components/apps/IconUniversalis.js +1 -1
- package/dist/modules/icons/components/apps/IconUnstagepourtous.js +1 -1
- package/dist/modules/icons/components/apps/IconUserbook.js +1 -1
- package/dist/modules/icons/components/apps/IconVideo.js +1 -1
- package/dist/modules/icons/components/apps/IconVieScolaire.js +1 -1
- package/dist/modules/icons/components/apps/IconVisioconf.js +1 -1
- package/dist/modules/icons/components/apps/IconWebclasseur.js +1 -1
- package/dist/modules/icons/components/apps/IconWebsite.js +1 -1
- package/dist/modules/icons/components/apps/IconWiki.js +2 -2
- package/dist/modules/icons/components/apps/IconWorkspace.js +1 -1
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +2 -3
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +3 -3
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +2 -2
- package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +8 -8
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +2 -2
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.d.ts +1 -1
- package/dist/modules/multimedia/ImageEditor/effects/blur.d.ts +1 -1
- package/dist/modules/multimedia/ImageEditor/effects/crop.d.ts +2 -2
- package/dist/modules/multimedia/ImageEditor/effects/misc.d.ts +1 -1
- package/dist/modules/multimedia/ImageEditor/effects/resize.d.ts +1 -1
- package/dist/modules/multimedia/ImageEditor/effects/rotate.d.ts +1 -1
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.d.ts +1 -1
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.d.ts +1 -1
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.d.ts +1 -1
- package/dist/modules/multimedia/ImagePicker/ImagePicker.d.ts +1 -1
- package/dist/modules/multimedia/Linker/ExternalLinker/ExternalLinker.d.ts +2 -2
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +4 -4
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +7 -7
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.d.ts +2 -2
- package/dist/modules/multimedia/UploadCard/UploadCard.js +5 -5
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.d.ts +1 -1
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +3 -3
- package/dist/modules/multimedia/Workspace/Workspace.js +3 -3
- package/dist/providers/EdificeThemeProvider/EdificeThemeProvider.context.d.ts +1 -1
- package/dist/types/size.d.ts +1 -1
- package/dist/types/status.d.ts +1 -1
- package/dist/utilities/emptyscreen-mapping/emptyscreen-mapping.d.ts +6 -0
- package/dist/utilities/emptyscreen-mapping/emptyscreen-mapping.js +49 -0
- package/dist/utilities/emptyscreen-mapping/index.d.ts +1 -0
- package/dist/utilities/index.d.ts +1 -0
- package/package.json +15 -8
- package/dist/hooks/usePaths/index.d.ts +0 -1
- package/dist/hooks/usePaths/usePaths.d.ts +0 -1
- package/dist/hooks/usePaths/usePaths.js +0 -7
|
@@ -8,7 +8,7 @@ export interface ToolbarCommonItem {
|
|
|
8
8
|
/** Items should be named, except for dividers */
|
|
9
9
|
name?: string;
|
|
10
10
|
/** Set to "hide" to hide this item. Defaults to "show" when undefined. */
|
|
11
|
-
visibility?:
|
|
11
|
+
visibility?: 'show' | 'hide';
|
|
12
12
|
}
|
|
13
13
|
export interface ToolbarTooltipProps {
|
|
14
14
|
tooltip?: string | {
|
|
@@ -17,32 +17,32 @@ export interface ToolbarTooltipProps {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
export interface ToolbarButtonItem extends ToolbarCommonItem, ToolbarTooltipProps {
|
|
20
|
-
type:
|
|
20
|
+
type: 'button';
|
|
21
21
|
name: string;
|
|
22
22
|
props: ButtonProps;
|
|
23
23
|
}
|
|
24
24
|
export interface ToolbarIconButtonItem extends ToolbarCommonItem, ToolbarTooltipProps {
|
|
25
|
-
type:
|
|
25
|
+
type: 'icon';
|
|
26
26
|
name: string;
|
|
27
27
|
props: IconButtonProps;
|
|
28
28
|
}
|
|
29
29
|
export interface ToolbarDropdownItem extends ToolbarCommonItem {
|
|
30
|
-
type:
|
|
30
|
+
type: 'dropdown';
|
|
31
31
|
props: DropdownProps;
|
|
32
32
|
overflow?: boolean;
|
|
33
33
|
}
|
|
34
34
|
export interface ToolbarPrimaryItem extends ToolbarCommonItem, ToolbarTooltipProps {
|
|
35
|
-
type:
|
|
35
|
+
type: 'primary';
|
|
36
36
|
props: ButtonProps;
|
|
37
37
|
}
|
|
38
38
|
export interface ToolbarDividerItem extends ToolbarCommonItem {
|
|
39
|
-
type:
|
|
39
|
+
type: 'divider';
|
|
40
40
|
}
|
|
41
41
|
export type ToolbarRef = HTMLDivElement;
|
|
42
|
-
export type ToolbarVariant =
|
|
43
|
-
export type ToolbarAlign =
|
|
42
|
+
export type ToolbarVariant = 'default' | 'no-shadow';
|
|
43
|
+
export type ToolbarAlign = 'left' | 'center' | 'space' | 'right';
|
|
44
44
|
export type ToolbarItem = ToolbarButtonItem | ToolbarIconButtonItem | ToolbarDropdownItem | ToolbarPrimaryItem | ToolbarDividerItem;
|
|
45
|
-
export interface ToolbarProps extends React.ComponentPropsWithRef<
|
|
45
|
+
export interface ToolbarProps extends React.ComponentPropsWithRef<'div'> {
|
|
46
46
|
/**
|
|
47
47
|
* Toolbar data items
|
|
48
48
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
export type Placement =
|
|
3
|
-
export interface TooltipProps extends ComponentPropsWithRef<
|
|
2
|
+
export type Placement = 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
3
|
+
export interface TooltipProps extends ComponentPropsWithRef<'div'> {
|
|
4
4
|
/**
|
|
5
5
|
* Text to display inside tooltip
|
|
6
6
|
*/
|
|
@@ -93,7 +93,7 @@ export interface SharedTreeProps {
|
|
|
93
93
|
*/
|
|
94
94
|
onTreeItemClick: (nodeId: string) => void;
|
|
95
95
|
}
|
|
96
|
-
export interface TreeNodeProps extends ComponentPropsWithRef<
|
|
96
|
+
export interface TreeNodeProps extends ComponentPropsWithRef<'li'>, SharedTreeProps {
|
|
97
97
|
/**
|
|
98
98
|
* Node data
|
|
99
99
|
*/
|
|
@@ -51,6 +51,19 @@ function updateParentIds(flattenedTree, indices, newParentId) {
|
|
|
51
51
|
};
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
+
function findItemIndexInTree(tree, itemId) {
|
|
55
|
+
for (let i = 0; i < tree.length; i++) {
|
|
56
|
+
const node = tree[i];
|
|
57
|
+
if (node.id === itemId)
|
|
58
|
+
return i;
|
|
59
|
+
if (node.children && node.children.length > 0) {
|
|
60
|
+
const result = findItemIndexInTree(node.children, itemId);
|
|
61
|
+
if (result)
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return 0;
|
|
66
|
+
}
|
|
54
67
|
function generateUpdateData(updatedFlattenedTree, tree) {
|
|
55
68
|
const updateArray = [];
|
|
56
69
|
let positionCounter = 0;
|
|
@@ -120,6 +133,7 @@ function getProjection(items, activeId, overId, dragOffset, indentationWidth) {
|
|
|
120
133
|
export {
|
|
121
134
|
buildTree,
|
|
122
135
|
determineNewParentId,
|
|
136
|
+
findItemIndexInTree,
|
|
123
137
|
flattenTree,
|
|
124
138
|
generateUpdateData,
|
|
125
139
|
getActiveAndOverNodes,
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export * from './useIsAdml';
|
|
|
22
22
|
export * from './useKeyPress';
|
|
23
23
|
export * from './useLibraryUrl';
|
|
24
24
|
export * from './useMediaLibrary';
|
|
25
|
-
export * from './usePaths';
|
|
26
25
|
export * from './useResourceSearch';
|
|
27
26
|
export * from './useScrollToTop';
|
|
28
27
|
export * from './useSession';
|
|
@@ -27,8 +27,8 @@ function useDate() {
|
|
|
27
27
|
let computedDate = dayjs();
|
|
28
28
|
try {
|
|
29
29
|
return typeof date > "u" ? "" : (typeof date == "string" ? computedDate = parseDate(date) : typeof date == "number" ? computedDate = dayjs(date).locale(currentLanguage) : typeof date.$date == "number" ? computedDate = dayjs(new Date(date.$date)).locale(currentLanguage) : typeof date.$date == "string" && (computedDate = parseDate(date.$date)), computedDate.isValid() ? computedDate.fromNow() : "");
|
|
30
|
-
} catch {
|
|
31
|
-
return "";
|
|
30
|
+
} catch (error) {
|
|
31
|
+
return console.error(error), "";
|
|
32
32
|
}
|
|
33
33
|
}, [currentLanguage, parseDate]), formatDate = useCallback((date, format = "short") => {
|
|
34
34
|
let computedDate = dayjs();
|
|
@@ -51,8 +51,8 @@ function useDate() {
|
|
|
51
51
|
dayjsFormat = format;
|
|
52
52
|
}
|
|
53
53
|
return computedDate.isValid() ? computedDate.locale(currentLanguage).format(dayjsFormat) : "";
|
|
54
|
-
} catch {
|
|
55
|
-
return "";
|
|
54
|
+
} catch (error) {
|
|
55
|
+
return console.error(error), "";
|
|
56
56
|
}
|
|
57
57
|
}, [currentLanguage, parseDate]);
|
|
58
58
|
return {
|
|
@@ -37,8 +37,8 @@ const useUpload = (visibility, application = "media-library") => {
|
|
|
37
37
|
application,
|
|
38
38
|
visibility
|
|
39
39
|
}), setUploadStatus(file, "success"), resource;
|
|
40
|
-
} catch {
|
|
41
|
-
return setUploadStatus(file, "error"), null;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
return console.error(error), setUploadStatus(file, "error"), null;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
async function uploadBlob(blob, metadata) {
|
|
@@ -50,8 +50,8 @@ const useUpload = (visibility, application = "media-library") => {
|
|
|
50
50
|
else
|
|
51
51
|
throw new Error(ERROR_CODE.NOT_SUPPORTED);
|
|
52
52
|
return setUploadStatus(blob, "success"), resource;
|
|
53
|
-
} catch {
|
|
54
|
-
return setUploadStatus(blob, "error"), null;
|
|
53
|
+
} catch (error) {
|
|
54
|
+
return console.error(error), setUploadStatus(blob, "error"), null;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
const uploadVideo = async (blob, metadata) => {
|
package/dist/index.js
CHANGED
|
@@ -43,54 +43,54 @@ import { default as default42 } from "./hooks/useImage/useImage.js";
|
|
|
43
43
|
import { default as default43 } from "./hooks/useIsAdml/useIsAdml.js";
|
|
44
44
|
import { default as default44 } from "./hooks/useKeyPress/useKeyPress.js";
|
|
45
45
|
import { default as default45 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
|
|
46
|
-
import { default as default46 } from "./hooks/
|
|
47
|
-
import { default as default47 } from "./hooks/
|
|
48
|
-
import { default as default48 } from "./hooks/
|
|
49
|
-
import { default as default49 } from "./hooks/
|
|
50
|
-
import { default as default50 } from "./hooks/
|
|
51
|
-
import { default as default51 } from "./hooks/
|
|
52
|
-
import { default as default52 } from "./hooks/
|
|
53
|
-
import { default as default53 } from "./hooks/
|
|
54
|
-
import { default as default54 } from "./hooks/
|
|
55
|
-
import { default as default55 } from "./hooks/
|
|
56
|
-
import { default as default56 } from "./hooks/
|
|
57
|
-
import { default as default57 } from "./hooks/
|
|
58
|
-
import { default as default58 } from "./
|
|
59
|
-
import { default as default59 } from "./components/
|
|
60
|
-
import { default as default60 } from "./components/
|
|
61
|
-
import { default as default61 } from "./components/
|
|
62
|
-
import { default as default62 } from "./components/Checkbox/Checkbox.js";
|
|
46
|
+
import { default as default46 } from "./hooks/useScrollToTop/useScrollToTop.js";
|
|
47
|
+
import { default as default47 } from "./hooks/useSession/useSession.js";
|
|
48
|
+
import { default as default48 } from "./hooks/useTitle/useTitle.js";
|
|
49
|
+
import { default as default49 } from "./hooks/useToggle/useToggle.js";
|
|
50
|
+
import { default as default50 } from "./hooks/useTrapFocus/useTrapFocus.js";
|
|
51
|
+
import { default as default51 } from "./hooks/useTrashedResource/useTrashedResource.js";
|
|
52
|
+
import { default as default52 } from "./hooks/useUpload/useUpload.js";
|
|
53
|
+
import { default as default53 } from "./hooks/useUploadFiles/useUploadFiles.js";
|
|
54
|
+
import { default as default54 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
|
|
55
|
+
import { default as default55 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
|
|
56
|
+
import { default as default56 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
|
|
57
|
+
import { default as default57 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
|
|
58
|
+
import { default as default58 } from "./components/Alert/Alert.js";
|
|
59
|
+
import { default as default59 } from "./components/Avatar/Avatar.js";
|
|
60
|
+
import { default as default60 } from "./components/Button/Button.js";
|
|
61
|
+
import { default as default61 } from "./components/Checkbox/Checkbox.js";
|
|
63
62
|
import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
|
|
64
|
-
import { default as
|
|
63
|
+
import { default as default62 } from "./components/Combobox/Combobox.js";
|
|
65
64
|
import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
|
|
66
|
-
import { default as
|
|
65
|
+
import { default as default63 } from "./components/Form/FormControl.js";
|
|
67
66
|
import { Column, Grid } from "./components/Grid/Grid.js";
|
|
68
|
-
import { default as
|
|
69
|
-
import { default as
|
|
70
|
-
import { default as
|
|
67
|
+
import { default as default64 } from "./components/Heading/Heading.js";
|
|
68
|
+
import { default as default65 } from "./components/Input/Input.js";
|
|
69
|
+
import { default as default66 } from "./components/Label/Label.js";
|
|
71
70
|
import { Layout } from "./components/Layout/Layout.js";
|
|
72
71
|
import { List } from "./components/List/List.js";
|
|
73
|
-
import { default as
|
|
72
|
+
import { default as default67 } from "./components/LoadingScreen/LoadingScreen.js";
|
|
74
73
|
import { Menu } from "./components/Menu/components/Menu.js";
|
|
75
|
-
import { default as
|
|
74
|
+
import { default as default68 } from "./components/Modal/Modal.js";
|
|
76
75
|
import { Popover, PopoverBody, PopoverFooter, PopoverHeader } from "./components/Popover/Popover.js";
|
|
77
|
-
import { default as
|
|
76
|
+
import { default as default69 } from "./components/Radio/Radio.js";
|
|
78
77
|
import { Tabs } from "./components/Tabs/components/Tabs.js";
|
|
79
|
-
import { default as
|
|
78
|
+
import { default as default70 } from "./components/TextArea/TextArea.js";
|
|
80
79
|
import { Toolbar } from "./components/Toolbar/Toolbar.js";
|
|
81
|
-
import { default as
|
|
80
|
+
import { default as default71 } from "./components/Tooltip/Tooltip.js";
|
|
82
81
|
import { useTreeSortable } from "./components/Tree/hooks/useTreeSortable.js";
|
|
82
|
+
import { buildTree, determineNewParentId, findItemIndexInTree, flattenTree, generateUpdateData, getActiveAndOverNodes, getDragDepth, getIndicesToUpdate, getProjection, updateParentIds } from "./components/Tree/utilities/tree-sortable.js";
|
|
83
83
|
import { useTreeView } from "./components/TreeView/hooks/useTreeView.js";
|
|
84
84
|
import { TreeNode } from "./components/TreeView/TreeNode.js";
|
|
85
85
|
import { TreeNodeFolderWrapper, addNode, arrayUnique, deleteNode, findNodeById, findParentNode, findPathById, findTreeNode, getAncestors, hasChildren, modifyNode, moveNode, updateNode, wrapTreeNode } from "./components/TreeView/utilities/treeview.js";
|
|
86
|
-
import { default as
|
|
86
|
+
import { default as default72 } from "./components/VisuallyHidden/VisuallyHidden.js";
|
|
87
87
|
import { useCheckable } from "./hooks/useCheckable/useCheckable.js";
|
|
88
|
-
import { default as
|
|
89
|
-
import { default as
|
|
90
|
-
import { default as
|
|
88
|
+
import { default as default73 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
|
|
89
|
+
import { default as default74 } from "./hooks/useHover/useHover.js";
|
|
90
|
+
import { default as default75 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
|
|
91
91
|
import { useResourceSearch } from "./hooks/useResourceSearch/useResourceSearch.js";
|
|
92
|
-
import { default as
|
|
93
|
-
import { default as
|
|
92
|
+
import { default as default76 } from "./hooks/useToast/useToast.js";
|
|
93
|
+
import { default as default77 } from "./hooks/useUser/useUser.js";
|
|
94
94
|
import { EdificeClientProvider } from "./providers/EdificeClientProvider/EdificeClientProvider.js";
|
|
95
95
|
import { EdificeClientContext } from "./providers/EdificeClientProvider/EdificeClientProvider.context.js";
|
|
96
96
|
import { useEdificeClient } from "./providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
@@ -98,24 +98,25 @@ import { EdificeThemeProvider } from "./providers/EdificeThemeProvider/EdificeTh
|
|
|
98
98
|
import { EdificeThemeContext } from "./providers/EdificeThemeProvider/EdificeThemeProvider.context.js";
|
|
99
99
|
import { useEdificeTheme } from "./providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
|
|
100
100
|
import { checkUserRight } from "./utilities/check-user-rights/check-user-rights.js";
|
|
101
|
+
import { emptyScreenMapping } from "./utilities/emptyscreen-mapping/emptyscreen-mapping.js";
|
|
101
102
|
import { mergeRefs, setRef } from "./utilities/refs/ref.js";
|
|
102
103
|
export {
|
|
103
104
|
AccessiblePalette,
|
|
104
105
|
default2 as ActionBar,
|
|
105
|
-
|
|
106
|
+
default58 as Alert,
|
|
106
107
|
default3 as AppHeader,
|
|
107
108
|
default4 as AppIcon,
|
|
108
109
|
default5 as Attachment,
|
|
109
|
-
|
|
110
|
+
default59 as Avatar,
|
|
110
111
|
default6 as Badge,
|
|
111
112
|
default7 as Breadcrumb,
|
|
112
|
-
|
|
113
|
+
default60 as Button,
|
|
113
114
|
default10 as Card,
|
|
114
|
-
|
|
115
|
+
default61 as Checkbox,
|
|
115
116
|
default11 as ColorPicker,
|
|
116
117
|
default12 as ColorPickerItem,
|
|
117
118
|
Column,
|
|
118
|
-
|
|
119
|
+
default62 as Combobox,
|
|
119
120
|
DefaultPalette,
|
|
120
121
|
DndTree,
|
|
121
122
|
default13 as Dropdown,
|
|
@@ -126,55 +127,66 @@ export {
|
|
|
126
127
|
EdificeThemeContext,
|
|
127
128
|
EdificeThemeProvider,
|
|
128
129
|
default15 as EmptyScreen,
|
|
129
|
-
|
|
130
|
+
default63 as FormControl,
|
|
130
131
|
default16 as FormText,
|
|
131
132
|
Grid,
|
|
132
|
-
|
|
133
|
+
default64 as Heading,
|
|
133
134
|
default8 as IconButton,
|
|
134
135
|
default17 as Image,
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
default65 as Input,
|
|
137
|
+
default66 as Label,
|
|
137
138
|
Layout,
|
|
138
139
|
List,
|
|
139
140
|
default18 as Loading,
|
|
140
|
-
|
|
141
|
+
default67 as LoadingScreen,
|
|
141
142
|
default19 as Logo,
|
|
142
143
|
Menu,
|
|
143
|
-
|
|
144
|
+
default68 as Modal,
|
|
144
145
|
Popover,
|
|
145
146
|
PopoverBody,
|
|
146
147
|
PopoverFooter,
|
|
147
148
|
PopoverHeader,
|
|
148
|
-
|
|
149
|
+
default69 as Radio,
|
|
149
150
|
default20 as SearchBar,
|
|
150
151
|
default9 as SearchButton,
|
|
151
152
|
default21 as Select,
|
|
152
153
|
default23 as SortableTree,
|
|
153
154
|
default22 as Table,
|
|
154
155
|
Tabs,
|
|
155
|
-
|
|
156
|
+
default70 as TextArea,
|
|
156
157
|
Toolbar,
|
|
157
|
-
|
|
158
|
+
default71 as Tooltip,
|
|
158
159
|
default24 as Tree,
|
|
159
160
|
TreeNode,
|
|
160
161
|
TreeNodeFolderWrapper,
|
|
161
162
|
default25 as TreeView,
|
|
162
|
-
|
|
163
|
+
default72 as VisuallyHidden,
|
|
163
164
|
addNode,
|
|
164
165
|
arrayUnique,
|
|
166
|
+
buildTree,
|
|
165
167
|
checkUserRight,
|
|
166
168
|
deleteNode,
|
|
169
|
+
determineNewParentId,
|
|
170
|
+
emptyScreenMapping,
|
|
171
|
+
findItemIndexInTree,
|
|
167
172
|
findNodeById,
|
|
168
173
|
findParentNode,
|
|
169
174
|
findPathById,
|
|
170
175
|
findTreeNode,
|
|
176
|
+
flattenTree,
|
|
177
|
+
generateUpdateData,
|
|
178
|
+
getActiveAndOverNodes,
|
|
171
179
|
getAncestors,
|
|
180
|
+
getDragDepth,
|
|
181
|
+
getIndicesToUpdate,
|
|
182
|
+
getProjection,
|
|
172
183
|
hasChildren,
|
|
173
184
|
mergeRefs,
|
|
174
185
|
modifyNode,
|
|
175
186
|
moveNode,
|
|
176
187
|
setRef,
|
|
177
188
|
updateNode,
|
|
189
|
+
updateParentIds,
|
|
178
190
|
default26 as useAvatar,
|
|
179
191
|
default27 as useBookmark,
|
|
180
192
|
default28 as useBreakpoint,
|
|
@@ -193,32 +205,31 @@ export {
|
|
|
193
205
|
useEdificeClient,
|
|
194
206
|
default39 as useEdificeIcons,
|
|
195
207
|
useEdificeTheme,
|
|
196
|
-
|
|
208
|
+
default73 as useHasWorkflow,
|
|
197
209
|
default40 as useHeader,
|
|
198
|
-
|
|
210
|
+
default74 as useHover,
|
|
199
211
|
default41 as useHttpErrorToast,
|
|
200
212
|
default42 as useImage,
|
|
201
213
|
default43 as useIsAdml,
|
|
202
214
|
default44 as useKeyPress,
|
|
203
215
|
default45 as useLibraryUrl,
|
|
204
|
-
|
|
205
|
-
default46 as usePaths,
|
|
216
|
+
default75 as useMediaLibrary,
|
|
206
217
|
useResourceSearch,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
218
|
+
default46 as useScrollToTop,
|
|
219
|
+
default47 as useSession,
|
|
220
|
+
default48 as useTitle,
|
|
221
|
+
default76 as useToast,
|
|
222
|
+
default49 as useToggle,
|
|
223
|
+
default50 as useTrapFocus,
|
|
224
|
+
default51 as useTrashedResource,
|
|
214
225
|
useTreeSortable,
|
|
215
226
|
useTreeView,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
227
|
+
default52 as useUpload,
|
|
228
|
+
default53 as useUploadFiles,
|
|
229
|
+
default77 as useUser,
|
|
230
|
+
default54 as useWorkspaceFile,
|
|
231
|
+
default55 as useWorkspaceSearch,
|
|
232
|
+
default56 as useXitiTrackPageLoad,
|
|
233
|
+
default57 as useZendeskGuide,
|
|
223
234
|
wrapTreeNode
|
|
224
235
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ReactionDetailsData } from '@edifice.io/ts-client';
|
|
2
2
|
export declare function ReactionModalCard({ reaction, }: {
|
|
3
|
-
reaction: ReactionDetailsData[
|
|
3
|
+
reaction: ReactionDetailsData['userReactions'][number];
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,18 +2,18 @@ import { useState, useMemo } from "react";
|
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
4
4
|
import { useProfileQueries } from "./useProfileQueries.js";
|
|
5
|
-
import
|
|
5
|
+
import illuPad from "@edifice.io/bootstrap/dist/images/emptyscreen/illu-pad.svg";
|
|
6
6
|
const useComments = ({
|
|
7
7
|
defaultComments,
|
|
8
8
|
options,
|
|
9
9
|
type,
|
|
10
10
|
callbacks
|
|
11
11
|
}) => {
|
|
12
|
-
const [content, setContent] = useState(""), [editCommentId, setEditCommentId] = useState(null), [commentLimit, setCommentLimit] = useState(options.maxComments),
|
|
12
|
+
const [content, setContent] = useState(""), [editCommentId, setEditCommentId] = useState(null), [commentLimit, setCommentLimit] = useState(options.maxComments), {
|
|
13
13
|
t
|
|
14
14
|
} = useTranslation(), {
|
|
15
15
|
user
|
|
16
|
-
} = useEdificeClient(),
|
|
16
|
+
} = useEdificeClient(), usersIds = Array.from(new Set(defaultComments == null ? void 0 : defaultComments.map((comment) => comment.authorId))), profilesQueries = useProfileQueries(usersIds), comments = useMemo(
|
|
17
17
|
() => type === "edit" ? (defaultComments == null ? void 0 : defaultComments.sort((a, b) => b.createdAt - a.createdAt).slice(0, commentLimit)) ?? [] : (defaultComments == null ? void 0 : defaultComments.sort((a, b) => b.createdAt - a.createdAt)) ?? [],
|
|
18
18
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
19
|
[commentLimit, defaultComments]
|
|
@@ -27,7 +27,7 @@ const useComments = ({
|
|
|
27
27
|
content,
|
|
28
28
|
title,
|
|
29
29
|
user,
|
|
30
|
-
emptyscreenPath,
|
|
30
|
+
emptyscreenPath: illuPad,
|
|
31
31
|
defaultCommentsCount,
|
|
32
32
|
comments,
|
|
33
33
|
editCommentId,
|
|
@@ -56,14 +56,14 @@ interface BaseProps {
|
|
|
56
56
|
options?: Partial<CommentOptions>;
|
|
57
57
|
}
|
|
58
58
|
interface EditRootProps extends BaseProps {
|
|
59
|
-
type:
|
|
59
|
+
type: 'edit';
|
|
60
60
|
/**
|
|
61
61
|
* Callbacks to perform CRUD on comment
|
|
62
62
|
*/
|
|
63
63
|
callbacks: CommentCallbacks;
|
|
64
64
|
}
|
|
65
65
|
interface ReadRootProps extends BaseProps {
|
|
66
|
-
type:
|
|
66
|
+
type: 'read';
|
|
67
67
|
}
|
|
68
68
|
export type RootProps = EditRootProps | ReadRootProps;
|
|
69
69
|
export type CommentOptions = {
|
|
@@ -98,5 +98,5 @@ export interface UserProfileResult {
|
|
|
98
98
|
*/
|
|
99
99
|
profile: UserProfile[number];
|
|
100
100
|
}
|
|
101
|
-
export type CommentType =
|
|
101
|
+
export type CommentType = 'read' | 'edit';
|
|
102
102
|
export {};
|
|
@@ -2,7 +2,7 @@ import { WorkspaceVisibility } from '@edifice.io/ts-client';
|
|
|
2
2
|
import { Content, FocusPosition, JSONContent } from '@tiptap/react';
|
|
3
3
|
export interface EditorRef {
|
|
4
4
|
/** Get the current content. */
|
|
5
|
-
getContent: (as:
|
|
5
|
+
getContent: (as: 'html' | 'json' | 'plain') => undefined | string | JSONContent;
|
|
6
6
|
/** Get speech synthetisis current state */
|
|
7
7
|
isSpeeching: () => boolean;
|
|
8
8
|
/** [De]activate speech synthetisis */
|
|
@@ -24,11 +24,11 @@ export interface EditorProps {
|
|
|
24
24
|
* Switching to `edit` mode will also render the toolbar
|
|
25
25
|
* (unless `toolbar` property is `none`).
|
|
26
26
|
*/
|
|
27
|
-
mode?:
|
|
27
|
+
mode?: 'edit' | 'read';
|
|
28
28
|
/** Toolbar to display in `edit` mode. */
|
|
29
|
-
toolbar?:
|
|
29
|
+
toolbar?: 'full' | 'none';
|
|
30
30
|
/** Display with or without a border */
|
|
31
|
-
variant?:
|
|
31
|
+
variant?: 'outline' | 'ghost';
|
|
32
32
|
/** Set focus position to the editor */
|
|
33
33
|
focus?: FocusPosition;
|
|
34
34
|
/** Editor placeholder content */
|
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
/**
|
|
5
5
|
* Props for the trigger
|
|
6
6
|
*/
|
|
7
|
-
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps,
|
|
7
|
+
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
|
|
8
8
|
/**
|
|
9
9
|
* Menu icon
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
/**
|
|
5
5
|
* Props for the trigger
|
|
6
6
|
*/
|
|
7
|
-
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps,
|
|
7
|
+
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
|
|
8
8
|
/**
|
|
9
9
|
* Tracks refs on ColorPickers.
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
/**
|
|
5
5
|
* Props for the trigger
|
|
6
6
|
*/
|
|
7
|
-
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps,
|
|
7
|
+
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
|
|
8
8
|
/**
|
|
9
9
|
* Tracks refs on ColorPickers.
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
/**
|
|
5
5
|
* Props for the trigger
|
|
6
6
|
*/
|
|
7
|
-
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps,
|
|
7
|
+
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
|
|
8
8
|
/**
|
|
9
9
|
* Tracks refs on ColorPickers.
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
/**
|
|
5
5
|
* Props for the trigger
|
|
6
6
|
*/
|
|
7
|
-
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps,
|
|
7
|
+
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
|
|
8
8
|
}
|
|
9
9
|
export declare const EditorToolbarTextSize: ({ triggerProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
/**
|
|
5
5
|
* Props for the trigger
|
|
6
6
|
*/
|
|
7
|
-
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps,
|
|
7
|
+
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
|
|
8
8
|
}
|
|
9
9
|
export declare const EditorToolbarTypography: ({ triggerProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
/** Ref to a MediaLibrary instance */
|
|
5
5
|
mediaLibraryRef: RefObject<MediaLibraryRef>;
|
|
6
6
|
/** API to open/close a Math modal. */
|
|
7
|
-
toggleMathsModal:
|
|
7
|
+
toggleMathsModal: () => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const EditorToolbar: ({ mediaLibraryRef, toggleMathsModal }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -57,10 +57,7 @@ const MediaRenderer = (props) => {
|
|
|
57
57
|
/* @__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 }),
|
|
58
58
|
node.attrs.title && // Display legend (set in title attribute) if it exists
|
|
59
59
|
/* @__PURE__ */ jsx("em", { className: "custom-image-legend caption text-align-left", children: node.attrs.title })
|
|
60
|
-
] }) : (
|
|
61
|
-
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
62
|
-
/* @__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 }) })
|
|
63
|
-
) }),
|
|
60
|
+
] }) : /* @__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 }) }) }),
|
|
64
61
|
/* @__PURE__ */ jsx("div", { className: `vertical-resize-handle ${isVerticalResizeActive ? "vertical-resize-active" : ""}`, title: t("tiptap.media.resize"), onMouseDown: (e) => {
|
|
65
62
|
e.stopPropagation(), startVerticalResize(e);
|
|
66
63
|
}, onMouseUp: (e) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FloatingMenuProps } from '@tiptap/react';
|
|
2
|
-
export declare const tippyOptions: FloatingMenuProps[
|
|
2
|
+
export declare const tippyOptions: FloatingMenuProps['tippyOptions'];
|
|
@@ -2,4 +2,4 @@ import { RefObject } from 'react';
|
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
import { DropdownMenuOptions } from '../../../components';
|
|
4
4
|
import { MediaLibraryRef } from '../../multimedia';
|
|
5
|
-
export declare const useActionOptions: (editor: Editor | null, toggleMathsModal:
|
|
5
|
+
export declare const useActionOptions: (editor: Editor | null, toggleMathsModal: () => void, mediaLibraryRef: RefObject<MediaLibraryRef>) => DropdownMenuOptions[][];
|
|
@@ -5,7 +5,7 @@ const SvgIconAccount = ({
|
|
|
5
5
|
...props
|
|
6
6
|
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", { d: "M12.01 14.42c2.68 0 8.03 1.31 8.03 3.99v2.02H3.99V18.4c0-2.68 5.35-3.99 8.02-3.99zm0-2.02a4.02 4.02 0 0 1 0-8.02C14.21 4.38 16 6.2 16 8.4s-1.78 4-3.99 4" })
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M12.01 14.42c2.68 0 8.03 1.31 8.03 3.99v2.02H3.99V18.4c0-2.68 5.35-3.99 8.02-3.99zm0-2.02a4.02 4.02 0 0 1 0-8.02C14.21 4.38 16 6.2 16 8.4s-1.78 4-3.99 4" })
|
|
9
9
|
] });
|
|
10
10
|
export {
|
|
11
11
|
SvgIconAccount as default
|
|
@@ -5,7 +5,7 @@ const SvgIconActualites = ({
|
|
|
5
5
|
...props
|
|
6
6
|
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 28 24", width: "24", height: "24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", { d: "M13.73 7.4H8.6v5.15h5.14V7.42zm1.73 8.6v1.7H6.88V16zm0-10.32v8.58H6.88V5.68zm8.59 10.31v1.71h-6.88V16h6.88zm0-3.43v1.7h-6.88v-1.7zm0-3.44v1.73h-6.88V9.12zm0-3.44V7.4h-6.88V5.68zM3.44 18.57V5.67H1.7v12.9q0 .33.26.6t.6.26.6-.26.27-.6zm22.31 0V3.97H5.15v14.6q0 .43-.15.86h19.91q.34 0 .6-.26t.25-.6zM27.5 2.24v16.33q0 1.08-.75 1.83t-1.83.74H2.57q-1.05 0-1.82-.74T0 18.57V3.97h3.44V2.24h24.05z" })
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M13.73 7.4H8.6v5.15h5.14V7.42zm1.73 8.6v1.7H6.88V16zm0-10.32v8.58H6.88V5.68zm8.59 10.31v1.71h-6.88V16h6.88zm0-3.43v1.7h-6.88v-1.7zm0-3.44v1.73h-6.88V9.12zm0-3.44V7.4h-6.88V5.68zM3.44 18.57V5.67H1.7v12.9q0 .33.26.6t.6.26.6-.26.27-.6zm22.31 0V3.97H5.15v14.6q0 .43-.15.86h19.91q.34 0 .6-.26t.25-.6zM27.5 2.24v16.33q0 1.08-.75 1.83t-1.83.74H2.57q-1.05 0-1.82-.74T0 18.57V3.97h3.44V2.24h24.05z" })
|
|
9
9
|
] });
|
|
10
10
|
export {
|
|
11
11
|
SvgIconActualites as default
|