@edifice.io/react 2.5.6-develop.20260116103750 → 2.5.8-develop-b2school.20260122173252
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/DatePicker/DatePicker.d.ts +57 -0
- package/dist/components/DatePicker/DatePicker.js +6 -3
- package/dist/components/Dropdown/DropdownContext.js +1 -1
- package/dist/components/Form/FormContext.js +1 -1
- package/dist/components/Layout/Layout.js +1 -2
- package/dist/components/Modal/Modal.d.ts +4 -0
- package/dist/components/Modal/Modal.js +13 -12
- package/dist/components/Toolbar/Toolbar.js +1 -1
- package/dist/editor.js +40 -40
- package/dist/hooks/useConversation/useConversation.js +3 -1
- package/dist/hooks/useDropdown/useDropdown.js +1 -1
- package/dist/hooks/useDropzone/useDropzone.js +21 -16
- package/dist/index.js +224 -224
- package/dist/modals.js +18 -18
- package/dist/modules/comments/components/Comment.js +4 -4
- package/dist/modules/comments/components/CommentDate.js +7 -10
- package/dist/modules/comments/components/CommentDeleted.js +1 -1
- package/dist/modules/comments/components/CommentForm.d.ts +1 -1
- package/dist/modules/comments/components/CommentForm.js +6 -6
- package/dist/modules/comments/components/CommentTitle.js +1 -1
- package/dist/modules/comments/provider/CommentProvider.js +4 -4
- package/dist/modules/comments/types.d.ts +3 -1
- package/dist/modules/editor/hooks/useTipTapEditor.js +4 -4
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +5 -5
- package/dist/modules/modals/ResourceModal/ResourceModal.js +1 -2
- package/dist/modules/modals/ShareModal/ShareResources.js +8 -5
- package/dist/modules/multimedia/Linker/ExternalLinker/ExternalLinker.js +1 -2
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +1 -2
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -1
- package/dist/multimedia.js +10 -10
- package/dist/providers/AntThemeProvider/antThemeConfig.js +1 -2
- package/dist/utilities/mime-types/index.d.ts +1 -0
- package/dist/utilities/mime-types/mime-types-utils.d.ts +1 -0
- package/dist/utilities/mime-types/mime-types-utils.js +4 -0
- package/package.json +6 -6
- package/dist/modules/comments/components/CommentHeader.d.ts +0 -3
- package/dist/modules/comments/components/CommentHeader.js +0 -8
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DatePicker component props
|
|
3
|
+
*
|
|
4
|
+
* Minimal interface that only exposes what is necessary.
|
|
5
|
+
* Ant Design implementation is hidden and no Ant Design-specific props are exposed.
|
|
6
|
+
* Standard HTML div attributes are supported (passed through to the underlying DOM element).
|
|
7
|
+
*/
|
|
8
|
+
export interface DatePickerProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'value' | 'defaultValue'> {
|
|
9
|
+
/**
|
|
10
|
+
* Selected date values
|
|
11
|
+
* @default today's date is setted by ant design if no value is provided
|
|
12
|
+
*/
|
|
13
|
+
value?: Date;
|
|
14
|
+
/**
|
|
15
|
+
* Callback called when date changes
|
|
16
|
+
*/
|
|
17
|
+
onChange?: (date?: Date) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Date format to display in the picker
|
|
20
|
+
* @default 'DD / MM / YYYY'
|
|
21
|
+
*/
|
|
22
|
+
dateFormat?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Minimum selectable date
|
|
25
|
+
*/
|
|
26
|
+
minDate?: Date;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum selectable date
|
|
29
|
+
*/
|
|
30
|
+
maxDate?: Date;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Type for DatePicker ref
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* DatePicker component
|
|
37
|
+
*
|
|
38
|
+
* Date picker component for selecting a date.
|
|
39
|
+
*
|
|
40
|
+
* **Note:** This component uses Ant Design's DatePicker component internally.
|
|
41
|
+
* Only the props defined in DatePickerProps are allowed to prevent
|
|
42
|
+
* dependency on Ant Design-specific features. To replace the implementation,
|
|
43
|
+
* modify the component body below.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <DatePicker
|
|
48
|
+
* value={date}
|
|
49
|
+
* onChange={(date) => setDate(date)}
|
|
50
|
+
* dateFormat="YYYY-MM-DD"
|
|
51
|
+
* minDate={new Date(today.setDate(today.getDate() - 2))}
|
|
52
|
+
* maxDate={new Date(today.setDate(today.getDate() + 3))}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare const DatePicker: import('react').ForwardRefExoticComponent<DatePickerProps & import('react').RefAttributes<HTMLElement>>;
|
|
57
|
+
export default DatePicker;
|
|
@@ -16,7 +16,8 @@ const DatePicker = /* @__PURE__ */ forwardRef(({
|
|
|
16
16
|
onChange,
|
|
17
17
|
dateFormat = "DD / MM / YYYY",
|
|
18
18
|
minDate,
|
|
19
|
-
maxDate
|
|
19
|
+
maxDate,
|
|
20
|
+
...htmlProps
|
|
20
21
|
}, ref) => {
|
|
21
22
|
const handleChange = (date) => {
|
|
22
23
|
onChange == null || onChange(date ? date.toDate() : void 0);
|
|
@@ -26,9 +27,11 @@ const DatePicker = /* @__PURE__ */ forwardRef(({
|
|
|
26
27
|
format: dateFormat,
|
|
27
28
|
minDate: minDate ? dayjs(minDate) : void 0,
|
|
28
29
|
maxDate: maxDate ? dayjs(maxDate) : void 0,
|
|
29
|
-
ref
|
|
30
|
+
ref,
|
|
31
|
+
// Cast necessary because AntDatePicker expects a specific type, but our API exposes only HTMLElement to avoid dependency on Ant Design-specific features.
|
|
32
|
+
...htmlProps
|
|
30
33
|
};
|
|
31
|
-
return /* @__PURE__ */ jsx(DatePicker$1, { ...antProps });
|
|
34
|
+
return /* @__PURE__ */ jsx(DatePicker$1, { ...antProps, getPopupContainer: (triggerNode) => triggerNode.parentElement || document.body });
|
|
32
35
|
});
|
|
33
36
|
export {
|
|
34
37
|
DatePicker as default
|
|
@@ -10,17 +10,18 @@ import ModalSubtitle from "./ModalSubtitle.js";
|
|
|
10
10
|
import useClickOutside from "../../hooks/useClickOutside/useClickOutside.js";
|
|
11
11
|
import useTrapFocus from "../../hooks/useTrapFocus/useTrapFocus.js";
|
|
12
12
|
import useKeyPress from "../../hooks/useKeyPress/useKeyPress.js";
|
|
13
|
-
const Root = /* @__PURE__ */ forwardRef((
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
const Root = /* @__PURE__ */ forwardRef(({
|
|
14
|
+
id,
|
|
15
|
+
isOpen,
|
|
16
|
+
onModalClose,
|
|
17
|
+
size = "md",
|
|
18
|
+
viewport = !1,
|
|
19
|
+
scrollable = !1,
|
|
20
|
+
focusId,
|
|
21
|
+
children,
|
|
22
|
+
...otherDivProps
|
|
23
|
+
}, ref) => {
|
|
24
|
+
const ariaLabelId = `aria_label_${id}`, ariaDescriptionId = `aria_desc_${id}`, modalRef = useClickOutside(onModalClose), trapRef = useTrapFocus(isOpen);
|
|
24
25
|
useKeyPress(onModalClose, ["Escape"]), useEffect(() => {
|
|
25
26
|
if (isOpen && (document.body.style.overflow = "hidden", focusId)) {
|
|
26
27
|
const elem = document.getElementById(focusId);
|
|
@@ -54,7 +55,7 @@ const Root = /* @__PURE__ */ forwardRef((props, ref) => {
|
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
57
|
return /* @__PURE__ */ jsx(ModalContext.Provider, { value: modalContextValue, children: transition((style, isOpen2) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57
|
-
isOpen2 && /* @__PURE__ */ jsx(animated.div, { id, ref, role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelId, "aria-describedby": ariaDescriptionId, className: modalClasses, style, tabIndex: -1, children: /* @__PURE__ */ jsx("div", { id: `${id}_ref`, ref: (node) => {
|
|
58
|
+
isOpen2 && /* @__PURE__ */ jsx(animated.div, { id, ref, role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelId, "aria-describedby": ariaDescriptionId, className: modalClasses, style, tabIndex: -1, ...otherDivProps, children: /* @__PURE__ */ jsx("div", { id: `${id}_ref`, ref: (node) => {
|
|
58
59
|
modalRef.current = node, isOpen2 && (trapRef.current = node);
|
|
59
60
|
}, className: dialogClasses, children: /* @__PURE__ */ jsx("div", { className: "modal-content", children }) }) }),
|
|
60
61
|
isOpen2 && /* @__PURE__ */ jsx(animated.div, { className: "modal-backdrop fade show", style: {
|
|
@@ -2,11 +2,11 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef, useState, useRef, useEffect, createElement } from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import useBreakpoint from "../../hooks/useBreakpoint/useBreakpoint.js";
|
|
5
|
-
import { mergeRefs } from "../../utilities/refs/ref.js";
|
|
6
5
|
import Tooltip from "../Tooltip/Tooltip.js";
|
|
7
6
|
import Button from "../Button/Button.js";
|
|
8
7
|
import Dropdown from "../Dropdown/Dropdown.js";
|
|
9
8
|
import IconButton from "../Button/IconButton.js";
|
|
9
|
+
import { mergeRefs } from "../../utilities/refs/ref.js";
|
|
10
10
|
const Toolbar = /* @__PURE__ */ forwardRef(({
|
|
11
11
|
items,
|
|
12
12
|
variant = "default",
|
package/dist/editor.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { EditorContent, Editor, useEditor } from "@tiptap/react";
|
|
2
2
|
import { default as default2 } from "@tiptap/starter-kit";
|
|
3
|
-
import { default as default3 } from "./modules/editor/components/
|
|
4
|
-
import { default as default4 } from "./modules/editor/components/
|
|
5
|
-
import { default as default5 } from "./modules/editor/components/
|
|
6
|
-
import { default as default6 } from "./modules/editor/components/
|
|
3
|
+
import { default as default3 } from "./modules/editor/components/NodeView/AttachmentNodeView.js";
|
|
4
|
+
import { default as default4 } from "./modules/editor/components/Renderer/AttachmentRenderer.js";
|
|
5
|
+
import { default as default5 } from "./modules/editor/components/NodeView/AudioNodeView.js";
|
|
6
|
+
import { default as default6 } from "./modules/editor/components/Renderer/AudioRenderer.js";
|
|
7
7
|
import { default as default7 } from "./modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js";
|
|
8
|
-
import { default as default8 } from "./modules/editor/components/NodeView/
|
|
9
|
-
import { default as default9 } from "./modules/editor/components/
|
|
10
|
-
import { default as default10 } from "./modules/editor/components/
|
|
11
|
-
import { default as default11 } from "./modules/editor/components/
|
|
12
|
-
import { default as default12 } from "./modules/editor/components/
|
|
13
|
-
import { default as default13 } from "./modules/editor/components/
|
|
14
|
-
import { default as default14 } from "./modules/editor/components/NodeView/
|
|
15
|
-
import { default as default15 } from "./modules/editor/components/NodeView/
|
|
16
|
-
import { default as default16 } from "./modules/editor/components/
|
|
17
|
-
import { default as default17 } from "./modules/editor/components/Renderer/
|
|
18
|
-
import { default as default18 } from "./modules/editor/components/
|
|
19
|
-
import { default as default19 } from "./modules/editor/components/
|
|
20
|
-
import { default as default20 } from "./modules/editor/components/Renderer/
|
|
21
|
-
import { default as default21 } from "./modules/editor/components/Renderer/
|
|
8
|
+
import { default as default8 } from "./modules/editor/components/NodeView/ConversationHistoryNodeView.js";
|
|
9
|
+
import { default as default9 } from "./modules/editor/components/Renderer/ConversationHistoryRenderer.js";
|
|
10
|
+
import { default as default10 } from "./modules/editor/components/Editor/Editor.js";
|
|
11
|
+
import { default as default11 } from "./modules/editor/components/Editor/EditorPreview.js";
|
|
12
|
+
import { default as default12 } from "./modules/editor/components/Editor/EditorPreviewSkeleton.js";
|
|
13
|
+
import { default as default13 } from "./modules/editor/components/Editor/EditorSkeleton.js";
|
|
14
|
+
import { default as default14 } from "./modules/editor/components/NodeView/IframeNodeView.js";
|
|
15
|
+
import { default as default15 } from "./modules/editor/components/NodeView/ImageNodeView.js";
|
|
16
|
+
import { default as default16 } from "./modules/editor/components/NodeView/InformationPaneNodeView.js";
|
|
17
|
+
import { default as default17 } from "./modules/editor/components/Renderer/InformationPaneRenderer.js";
|
|
18
|
+
import { default as default18 } from "./modules/editor/components/Toolbar/LinkToolbar.js";
|
|
19
|
+
import { default as default19 } from "./modules/editor/components/NodeView/LinkerNodeView.js";
|
|
20
|
+
import { default as default20 } from "./modules/editor/components/Renderer/LinkerRenderer.js";
|
|
21
|
+
import { default as default21 } from "./modules/editor/components/Renderer/MediaRenderer.js";
|
|
22
22
|
import { default as default22 } from "./modules/editor/components/Toolbar/TableToolbar.js";
|
|
23
|
-
import { default as default23 } from "./modules/editor/components/
|
|
23
|
+
import { default as default23 } from "./modules/editor/components/NodeView/VideoNodeView.js";
|
|
24
|
+
import { EditorContext, useEditorContext } from "./modules/editor/hooks/useEditorContext.js";
|
|
24
25
|
import { EditorToolbar } from "./modules/editor/components/EditorToolbar/EditorToolbar.js";
|
|
25
26
|
import { useActionOptions } from "./modules/editor/hooks/useActionOptions.js";
|
|
27
|
+
import { useCantooEditor } from "./modules/editor/hooks/useCantooEditor.js";
|
|
26
28
|
import { useCommentEditor } from "./modules/editor/hooks/useCommentEditor.js";
|
|
27
|
-
import { EditorContext, useEditorContext } from "./modules/editor/hooks/useEditorContext.js";
|
|
28
29
|
import { useImageModal } from "./modules/editor/hooks/useImageModal.js";
|
|
29
30
|
import { useImageSelection } from "./modules/editor/hooks/useImageSelection.js";
|
|
30
31
|
import { useLinkToolbar } from "./modules/editor/hooks/useLinkToolbar.js";
|
|
@@ -34,34 +35,33 @@ import { useResizeMedia } from "./modules/editor/hooks/useResizeMedia.js";
|
|
|
34
35
|
import { useSpeechRecognition } from "./modules/editor/hooks/useSpeechRecognition.js";
|
|
35
36
|
import { useSpeechSynthetisis } from "./modules/editor/hooks/useSpeechSynthetisis.js";
|
|
36
37
|
import { useTipTapEditor } from "./modules/editor/hooks/useTipTapEditor.js";
|
|
37
|
-
import { useCantooEditor } from "./modules/editor/hooks/useCantooEditor.js";
|
|
38
38
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
default3 as AttachmentNodeView,
|
|
40
|
+
default4 as AttachmentRenderer,
|
|
41
|
+
default5 as AudioNodeView,
|
|
42
|
+
default6 as AudioRenderer,
|
|
43
43
|
default7 as BubbleMenuEditImage,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
default8 as ConversationHistoryNodeView,
|
|
45
|
+
default9 as ConversationHistoryRenderer,
|
|
46
|
+
default10 as Editor,
|
|
47
47
|
EditorContent,
|
|
48
48
|
EditorContext,
|
|
49
49
|
Editor as EditorInstance,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
default11 as EditorPreview,
|
|
51
|
+
default12 as EditorPreviewSkeleton,
|
|
52
|
+
default13 as EditorSkeleton,
|
|
53
53
|
EditorToolbar,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
default14 as IframeNodeView,
|
|
55
|
+
default15 as ImageNodeView,
|
|
56
|
+
default16 as InformationPaneNodeView,
|
|
57
|
+
default17 as InformationPaneRenderer,
|
|
58
|
+
default18 as LinkToolbar,
|
|
59
|
+
default19 as LinkerNodeView,
|
|
60
|
+
default20 as LinkerRenderer,
|
|
61
|
+
default21 as MediaRenderer,
|
|
62
62
|
default2 as StarterKit,
|
|
63
63
|
default22 as TableToolbar,
|
|
64
|
-
|
|
64
|
+
default23 as VideoNodeView,
|
|
65
65
|
useActionOptions,
|
|
66
66
|
useCantooEditor,
|
|
67
67
|
useCommentEditor,
|
|
@@ -6,7 +6,9 @@ const useConversation = () => {
|
|
|
6
6
|
const zimbraWorkflow = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"), zimbraPreauth = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"), [msgLink, setMsgLink] = useState(""), queryParams = {
|
|
7
7
|
unread: !0,
|
|
8
8
|
_: (/* @__PURE__ */ new Date()).getTime()
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
zimbraWorkflow || (queryParams.queryparam_token = (/* @__PURE__ */ new Date()).getTime());
|
|
11
|
+
const {
|
|
10
12
|
data: messages
|
|
11
13
|
} = useQuery({
|
|
12
14
|
queryKey: ["folder", "count", "inbox"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useId, useState, useRef, useEffect, useCallback } from "react";
|
|
2
|
-
import { useFloating, offset, size, flip,
|
|
2
|
+
import { useFloating, autoUpdate, offset, size, flip, useHover, safePolygon } from "@floating-ui/react";
|
|
3
3
|
import { mergeRefs } from "../../utilities/refs/ref.js";
|
|
4
4
|
const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !1, focusOnVisible = !0, openOnSpace = !0, focusOnMouseEnter = !0) => {
|
|
5
5
|
const id = useId(), [visible, setVisible] = useState(!1), [activeIndex, setActiveIndex] = useState(-1), [isFocused, setIsFocused] = useState(null), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useRef } from "react";
|
|
2
|
-
import
|
|
2
|
+
import { HEIC_MIME_TYPES } from "../../utilities/mime-types/mime-types-utils.js";
|
|
3
3
|
const useDropzone = (props) => {
|
|
4
4
|
const [dragging, setDragging] = useState(!1), [files, setFiles] = useState([]), inputRef = useRef(null), addFile = (file) => {
|
|
5
5
|
addFiles([file]);
|
|
@@ -32,21 +32,26 @@ const useDropzone = (props) => {
|
|
|
32
32
|
})
|
|
33
33
|
));
|
|
34
34
|
filesToAdd.reverse(), props != null && props.forceFilters ? (filesToAdd = applyInputFiltersOn(filesToAdd), filesToAdd && filesToAdd.length && setFiles((prevFiles) => [...prevFiles, ...filesToAdd])) : setFiles((prevFiles) => [...prevFiles, ...files2]);
|
|
35
|
-
}, convertHEICImages = async (files2) =>
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
35
|
+
}, convertHEICImages = async (files2) => {
|
|
36
|
+
if (files2 === null || files2.length === 0)
|
|
37
|
+
return [];
|
|
38
|
+
let heic2any;
|
|
39
|
+
return files2.some((file) => HEIC_MIME_TYPES.includes(file.type)) && (heic2any = (await import("heic2any")).default), Promise.all(files2.map(async (file) => {
|
|
40
|
+
if (HEIC_MIME_TYPES.includes(file.type) && heic2any)
|
|
41
|
+
try {
|
|
42
|
+
const converted = await heic2any({
|
|
43
|
+
blob: file,
|
|
44
|
+
toType: "image/jpeg"
|
|
45
|
+
});
|
|
46
|
+
return new File([converted], file.name.replace(/\.(heic|heif)$/i, ".jpeg"), {
|
|
47
|
+
type: "image/jpeg"
|
|
48
|
+
});
|
|
49
|
+
} catch (error) {
|
|
50
|
+
return console.error(`Failed to convert HEIC image: ${file.name}`, error), file;
|
|
51
|
+
}
|
|
52
|
+
return file;
|
|
53
|
+
}));
|
|
54
|
+
}, cleanFiles = () => {
|
|
50
55
|
setFiles([]);
|
|
51
56
|
}, handleOnChange = (event) => {
|
|
52
57
|
const files2 = event.target.files;
|