@edifice.io/react 2.2.6 → 2.2.7-develop-b2school.20250521111614
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/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/IconButton.js +1 -1
- package/dist/components/Combobox/Combobox.d.ts +60 -5
- package/dist/components/Combobox/Combobox.js +18 -7
- package/dist/components/Combobox/ComboboxTrigger.d.ts +34 -3
- package/dist/components/Combobox/ComboboxTrigger.js +33 -8
- package/dist/components/Dropdown/Dropdown.d.ts +10 -2
- package/dist/components/Dropdown/Dropdown.js +5 -3
- package/dist/components/Dropdown/DropdownItem.d.ts +5 -1
- package/dist/components/Dropdown/DropdownItem.js +4 -1
- package/dist/components/Dropdown/DropdownTrigger.js +5 -1
- package/dist/components/List/List.d.ts +15 -1
- package/dist/components/List/List.js +15 -12
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +3 -1
- package/dist/components/Toolbar/Toolbar.d.ts +4 -0
- package/dist/components/Toolbar/Toolbar.js +8 -3
- package/dist/components/Tree/components/Tree.js +1 -2
- package/dist/components/Tree/hooks/useTree.d.ts +0 -1
- package/dist/components/Tree/hooks/useTree.js +2 -25
- package/dist/components/Tree/types/index.d.ts +0 -4
- package/dist/editor.js +28 -26
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useCheckable/useCheckable.js +10 -3
- package/dist/hooks/useConversation/useConversation.d.ts +1 -1
- package/dist/hooks/useConversation/useConversation.js +13 -17
- package/dist/hooks/useDate/useDate.d.ts +1 -0
- package/dist/hooks/useDate/useDate.js +33 -27
- package/dist/hooks/useDropdown/useDropdown.d.ts +2 -1
- package/dist/hooks/useDropdown/useDropdown.js +5 -3
- package/dist/hooks/useHttpErrorToast/useHttpErrorToast.js +12 -3
- package/dist/hooks/useWorkspaceFolders/index.d.ts +3 -0
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +54 -0
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFoldersTree.d.ts +13 -0
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js +51 -0
- package/dist/icons.js +280 -266
- package/dist/index.d.ts +1 -0
- package/dist/index.js +50 -20
- package/dist/modals.js +16 -14
- package/dist/modules/editor/components/Editor/Editor.d.ts +8 -2
- package/dist/modules/editor/components/Editor/Editor.js +11 -19
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +1 -4
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +3 -15
- package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/index.d.ts +2 -1
- package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.d.ts +8 -0
- package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.js +28 -0
- package/dist/modules/editor/components/Renderer/index.d.ts +2 -1
- package/dist/modules/editor/hooks/index.d.ts +0 -1
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +6 -2
- package/dist/modules/editor/hooks/useTipTapEditor.js +2 -2
- package/dist/modules/icons/components/IconFolderAdd.d.ts +7 -0
- package/dist/modules/icons/components/IconFolderAdd.js +13 -0
- package/dist/modules/icons/components/IconFolderDelete.d.ts +7 -0
- package/dist/modules/icons/components/IconFolderDelete.js +12 -0
- package/dist/modules/icons/components/{IconCantoo.d.ts → IconGlobe2.d.ts} +2 -2
- package/dist/modules/icons/components/IconGlobe2.js +16 -0
- package/dist/modules/icons/components/IconGroupAvatar.d.ts +7 -0
- package/dist/modules/icons/components/IconGroupAvatar.js +12 -0
- package/dist/modules/icons/components/IconMailRecall.d.ts +7 -0
- package/dist/modules/icons/components/IconMailRecall.js +13 -0
- package/dist/modules/icons/components/IconQuestionMark.d.ts +7 -0
- package/dist/modules/icons/components/IconQuestionMark.js +13 -0
- package/dist/modules/icons/components/IconReadMail.d.ts +7 -0
- package/dist/modules/icons/components/IconReadMail.js +16 -0
- package/dist/modules/icons/components/IconSignature.d.ts +7 -0
- package/dist/modules/icons/components/IconSignature.js +13 -0
- package/dist/modules/icons/components/IconUndoAll.d.ts +7 -0
- package/dist/modules/icons/components/IconUndoAll.js +14 -0
- package/dist/modules/icons/components/IconUnreadMail.d.ts +7 -0
- package/dist/modules/icons/components/IconUnreadMail.js +16 -0
- package/dist/modules/icons/components/index.d.ts +10 -3
- package/dist/modules/modals/ConfirmModal/ConfirmModal.d.ts +47 -0
- package/dist/modules/modals/ConfirmModal/ConfirmModal.js +37 -0
- package/dist/modules/modals/ConfirmModal/index.d.ts +1 -0
- package/dist/modules/modals/index.d.ts +1 -0
- package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.d.ts +8 -0
- package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.js +55 -0
- package/dist/modules/multimedia/WorkspaceFolders/components/NewFolderForm.d.ts +16 -0
- package/dist/modules/multimedia/WorkspaceFolders/components/NewFolderForm.js +39 -0
- package/dist/modules/multimedia/WorkspaceFolders/index.d.ts +1 -0
- package/dist/modules/multimedia/index.d.ts +1 -0
- package/dist/multimedia.js +3 -1
- package/package.json +6 -6
- package/dist/modules/editor/components/Editor/CantooAdaptTextBoxView.d.ts +0 -7
- package/dist/modules/editor/components/Editor/CantooAdaptTextBoxView.js +0 -33
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Cantoo.d.ts +0 -9
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Cantoo.js +0 -79
- package/dist/modules/editor/hooks/useCantooEditor.d.ts +0 -17
- package/dist/modules/editor/hooks/useCantooEditor.js +0 -89
- package/dist/modules/icons/components/IconCantoo.js +0 -23
- package/dist/modules/icons/components/IconMicOff.d.ts +0 -7
- package/dist/modules/icons/components/IconMicOff.js +0 -12
- package/dist/modules/icons/components/IconTextToSpeechOff.d.ts +0 -7
- package/dist/modules/icons/components/IconTextToSpeechOff.js +0 -12
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconQuestionMark = ({
|
|
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: "M9.579 5.429C9.172 5.964 9 6.706 9 7.44a1 1 0 0 1-2 0c0-.99.223-2.217.987-3.222.8-1.051 2.086-1.718 3.905-1.718 2.032 0 3.284 1.043 3.892 2.323.563 1.184.578 2.568.265 3.445-.409 1.148-1.191 2.056-1.81 2.773l-.27.317c-.7.83-1.077 1.427-1.077 2.157v1.806a1 1 0 1 1-2 0v-1.806c0-1.513.835-2.6 1.546-3.445q.16-.189.312-.366c.629-.737 1.141-1.337 1.415-2.107.128-.359.157-1.192-.187-1.915-.298-.627-.874-1.182-2.086-1.182-1.283 0-1.943.442-2.313.929", clipRule: "evenodd" }),
|
|
9
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M13.762 19.888a1.612 1.612 0 1 1-3.223 0 1.612 1.612 0 0 1 3.223 0" })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
SvgIconQuestionMark 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 SvgIconReadMail: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconReadMail;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconReadMail = ({
|
|
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__ */ jsxs("g", { fill: "currentColor", fillRule: "evenodd", clipPath: "url(#icon-read-mail_svg__a)", clipRule: "evenodd", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { d: "M1.143 8.986a1 1 0 0 1 1.372-.343l8.97 5.382a1 1 0 0 0 1.03 0l8.97-5.382a1 1 0 1 1 1.03 1.714l-8.971 5.383a3 3 0 0 1-3.088 0l-8.97-5.382a1 1 0 0 1-.343-1.373" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { d: "M12.466 2.4a.95.95 0 0 0-.932 0c-1.333.74-3.83 2.146-5.99 3.465-1.083.662-2.063 1.29-2.764 1.797a8 8 0 0 0-.78.62v11.003H0V8c0-.38.191-.664.272-.776.107-.148.238-.285.364-.404.254-.24.594-.506.973-.78.765-.552 1.797-1.212 2.892-1.881C6.697 2.817 9.224 1.395 10.563.65a2.95 2.95 0 0 1 2.874 0c1.34.744 3.866 2.166 6.062 3.508 1.095.669 2.127 1.33 2.892 1.882.38.273.719.54.973.78.126.118.257.255.364.403.08.112.272.395.272.776v11.285h-2V8.284l-.009-.008a8 8 0 0 0-.77-.613c-.702-.506-1.682-1.135-2.765-1.797-2.16-1.32-4.657-2.725-5.99-3.466M2.321 19.802c.253.192.647.34 1.123.34h17.112c.476 0 .87-.148 1.123-.34.252-.192.321-.384.321-.517h2c0 .892-.479 1.629-1.111 2.11-.632.479-1.46.747-2.333.747H3.444c-.873 0-1.701-.268-2.333-.748S0 20.178 0 19.285h2c0 .133.069.326.32.518" })
|
|
11
|
+
] }),
|
|
12
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-read-mail_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
13
|
+
] });
|
|
14
|
+
export {
|
|
15
|
+
SvgIconReadMail as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconSignature: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconSignature;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconSignature = ({
|
|
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("g", { fill: "currentColor", fillRule: "evenodd", clipPath: "url(#icon-signature_svg__a)", clipRule: "evenodd", children: /* @__PURE__ */ jsx("path", { d: "M6.82 11.679c-.047-.013-.298-.045-.906.231-.551.25-1.204.894-1.838 1.899-.616.978-1.143 2.185-1.496 3.391-.356 1.215-.514 2.358-.45 3.215.07.92.35 1.154.476 1.204.093.037.44.071 1.142-.166.648-.219 1.427-.61 2.243-1.132q.383-.245.761-.517v-.019c-.055-1.175.068-2.549.18-3.802q.038-.416.072-.81c.062-.746.105-1.427.098-2.014-.008-.602-.069-1.02-.165-1.28a.6.6 0 0 0-.1-.19c-.008-.008-.008-.008-.015-.01zm1.951 6.422c.035-.602.091-1.234.149-1.88l.077-.882c.063-.757.113-1.516.105-2.204-.009-.673-.073-1.365-.289-1.95-.227-.613-.669-1.216-1.461-1.434-.719-.198-1.5-.01-2.266.339-1.078.49-1.99 1.524-2.701 2.652-.729 1.155-1.327 2.537-1.725 3.896-.395 1.35-.613 2.748-.524 3.927.084 1.117.486 2.415 1.727 2.911.79.316 1.73.14 2.525-.128.848-.286 1.775-.763 2.68-1.342l.1-.065c.267.629.712 1.205 1.428 1.521 1.046.463 1.95.47 2.757.243.562-.158 1.104-.449 1.511-.667q.166-.09.297-.157c.476-.24.803-.342 1.154-.306.356.037.91.236 1.756.987a1 1 0 0 0 1.327-1.496c-1.02-.906-1.953-1.385-2.879-1.48-.931-.096-1.682.219-2.259.51-.182.091-.34.176-.485.253-.36.193-.63.337-.962.43-.37.104-.796.125-1.409-.146-.135-.06-.278-.185-.406-.502a3 3 0 0 1-.13-.432c1.164-.95 2.234-2.049 2.964-3.144a1 1 0 1 0-1.664-1.11 11 11 0 0 1-1.397 1.656M10.201 2.114c.306.049.58.217.762.468l10.453 14.397.198 2.262-2.089-.89L9.073 3.955a1.168 1.168 0 0 1 1.128-1.84m2.38-.707a3.168 3.168 0 0 0-5.127 3.722L18.07 19.751a1 1 0 0 0 .417.333l3.878 1.65a1 1 0 0 0 1.388-1.008l-.369-4.198a1 1 0 0 0-.187-.5z" }) }),
|
|
9
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-signature_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
SvgIconSignature 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 SvgIconUndoAll: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconUndoAll;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconUndoAll = ({
|
|
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: "M11.648 12.564a.917.917 0 0 0 0-1.297L7.713 7.332l3.935-3.935A.917.917 0 1 0 10.352 2.1L5.768 6.684a.917.917 0 0 0 0 1.296l4.584 4.583a.917.917 0 0 0 1.296 0", clipRule: "evenodd" }),
|
|
9
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M7.523 12.564a.917.917 0 0 0 0-1.297L3.588 7.332l3.935-3.935A.917.917 0 1 0 6.227 2.1L1.643 6.684a.917.917 0 0 0 0 1.296l4.584 4.583a.917.917 0 0 0 1.296 0", clipRule: "evenodd" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M19.25 18.332c.506 0 .917-.41.917-.917V11a4.583 4.583 0 0 0-4.584-4.584H6.417a.917.917 0 0 0 0 1.834h9.166a2.75 2.75 0 0 1 2.75 2.75v6.416c0 .507.41.917.917.917", clipRule: "evenodd" })
|
|
11
|
+
] });
|
|
12
|
+
export {
|
|
13
|
+
SvgIconUndoAll as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconUnreadMail: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconUnreadMail;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconUnreadMail = ({
|
|
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__ */ jsxs("g", { fill: "currentColor", fillRule: "evenodd", clipPath: "url(#icon-unread-mail_svg__a)", clipRule: "evenodd", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { d: "M7.975 4.5a5.1 5.1 0 0 0-.204-2h12.785A3.437 3.437 0 0 1 24 5.948V18.07c0 1.9-1.548 3.429-3.444 3.429H3.444A3.437 3.437 0 0 1 0 18.071V8.001c.581.436 1.261.749 2 .899v9.171c0 .783.64 1.429 1.444 1.429h17.112c.803 0 1.444-.646 1.444-1.429V7.79l-9.448 6.257a1 1 0 0 1-1.104 0L3.744 8.945a5 5 0 0 0 2.228-.924L12 12.014l9.916-6.567c-.2-.55-.73-.947-1.36-.947z" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { d: "M3 7a3 3 0 1 0 0-6 3 3 0 0 0 0 6" })
|
|
11
|
+
] }),
|
|
12
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-unread-mail_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
13
|
+
] });
|
|
14
|
+
export {
|
|
15
|
+
SvgIconUnreadMail as default
|
|
16
|
+
};
|
|
@@ -20,7 +20,6 @@ export { default as IconBurgerMenu } from './IconBurgerMenu';
|
|
|
20
20
|
export { default as IconCalendarLight } from './IconCalendarLight';
|
|
21
21
|
export { default as IconCalendar } from './IconCalendar';
|
|
22
22
|
export { default as IconCamera } from './IconCamera';
|
|
23
|
-
export { default as IconCantoo } from './IconCantoo';
|
|
24
23
|
export { default as IconCenter } from './IconCenter';
|
|
25
24
|
export { default as IconCheck } from './IconCheck';
|
|
26
25
|
export { default as IconChecklist } from './IconChecklist';
|
|
@@ -45,11 +44,15 @@ export { default as IconExternalLink } from './IconExternalLink';
|
|
|
45
44
|
export { default as IconFiles } from './IconFiles';
|
|
46
45
|
export { default as IconFilter } from './IconFilter';
|
|
47
46
|
export { default as IconFlag } from './IconFlag';
|
|
47
|
+
export { default as IconFolderAdd } from './IconFolderAdd';
|
|
48
|
+
export { default as IconFolderDelete } from './IconFolderDelete';
|
|
48
49
|
export { default as IconFolderMove } from './IconFolderMove';
|
|
49
50
|
export { default as IconFolder } from './IconFolder';
|
|
50
51
|
export { default as IconForgoing } from './IconForgoing';
|
|
51
52
|
export { default as IconFullScreen } from './IconFullScreen';
|
|
53
|
+
export { default as IconGlobe2 } from './IconGlobe2';
|
|
52
54
|
export { default as IconGlobe } from './IconGlobe';
|
|
55
|
+
export { default as IconGroupAvatar } from './IconGroupAvatar';
|
|
53
56
|
export { default as IconHandMove } from './IconHandMove';
|
|
54
57
|
export { default as IconHeadphone } from './IconHeadphone';
|
|
55
58
|
export { default as IconHide } from './IconHide';
|
|
@@ -68,10 +71,10 @@ export { default as IconLink } from './IconLink';
|
|
|
68
71
|
export { default as IconListOrder } from './IconListOrder';
|
|
69
72
|
export { default as IconLoader } from './IconLoader';
|
|
70
73
|
export { default as IconLock } from './IconLock';
|
|
74
|
+
export { default as IconMailRecall } from './IconMailRecall';
|
|
71
75
|
export { default as IconMail } from './IconMail';
|
|
72
76
|
export { default as IconMergeCells } from './IconMergeCells';
|
|
73
77
|
export { default as IconMessageInfo } from './IconMessageInfo';
|
|
74
|
-
export { default as IconMicOff } from './IconMicOff';
|
|
75
78
|
export { default as IconMic } from './IconMic';
|
|
76
79
|
export { default as IconMinus } from './IconMinus';
|
|
77
80
|
export { default as IconMove } from './IconMove';
|
|
@@ -89,12 +92,14 @@ export { default as IconPlus } from './IconPlus';
|
|
|
89
92
|
export { default as IconPointerDefault } from './IconPointerDefault';
|
|
90
93
|
export { default as IconPointerHand } from './IconPointerHand';
|
|
91
94
|
export { default as IconPrint } from './IconPrint';
|
|
95
|
+
export { default as IconQuestionMark } from './IconQuestionMark';
|
|
92
96
|
export { default as IconQuestion } from './IconQuestion';
|
|
93
97
|
export { default as IconRafterDown } from './IconRafterDown';
|
|
94
98
|
export { default as IconRafterLeft } from './IconRafterLeft';
|
|
95
99
|
export { default as IconRafterRight } from './IconRafterRight';
|
|
96
100
|
export { default as IconRafterUp } from './IconRafterUp';
|
|
97
101
|
export { default as IconReaction } from './IconReaction';
|
|
102
|
+
export { default as IconReadMail } from './IconReadMail';
|
|
98
103
|
export { default as IconRecordPause } from './IconRecordPause';
|
|
99
104
|
export { default as IconRecordStop } from './IconRecordStop';
|
|
100
105
|
export { default as IconRecordVideo } from './IconRecordVideo';
|
|
@@ -111,6 +116,7 @@ export { default as IconSend } from './IconSend';
|
|
|
111
116
|
export { default as IconSetBackground } from './IconSetBackground';
|
|
112
117
|
export { default as IconSettings } from './IconSettings';
|
|
113
118
|
export { default as IconShare } from './IconShare';
|
|
119
|
+
export { default as IconSignature } from './IconSignature';
|
|
114
120
|
export { default as IconSmartphone } from './IconSmartphone';
|
|
115
121
|
export { default as IconSmiley } from './IconSmiley';
|
|
116
122
|
export { default as IconSortAscendingLetters } from './IconSortAscendingLetters';
|
|
@@ -131,7 +137,6 @@ export { default as IconTextHighlight } from './IconTextHighlight';
|
|
|
131
137
|
export { default as IconTextItalic } from './IconTextItalic';
|
|
132
138
|
export { default as IconTextPage } from './IconTextPage';
|
|
133
139
|
export { default as IconTextSize } from './IconTextSize';
|
|
134
|
-
export { default as IconTextToSpeechOff } from './IconTextToSpeechOff';
|
|
135
140
|
export { default as IconTextToSpeech } from './IconTextToSpeech';
|
|
136
141
|
export { default as IconTextTypo } from './IconTextTypo';
|
|
137
142
|
export { default as IconTextUnderline } from './IconTextUnderline';
|
|
@@ -139,9 +144,11 @@ export { default as IconTextVanilla } from './IconTextVanilla';
|
|
|
139
144
|
export { default as IconToolCenter } from './IconToolCenter';
|
|
140
145
|
export { default as IconTool } from './IconTool';
|
|
141
146
|
export { default as IconTrendingUp } from './IconTrendingUp';
|
|
147
|
+
export { default as IconUndoAll } from './IconUndoAll';
|
|
142
148
|
export { default as IconUndo } from './IconUndo';
|
|
143
149
|
export { default as IconUnlink } from './IconUnlink';
|
|
144
150
|
export { default as IconUnlock } from './IconUnlock';
|
|
151
|
+
export { default as IconUnreadMail } from './IconUnreadMail';
|
|
145
152
|
export { default as IconUpload } from './IconUpload';
|
|
146
153
|
export { default as IconUserSearch } from './IconUserSearch';
|
|
147
154
|
export { default as IconUser } from './IconUser';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ModalSize } from '../../../components';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type ConfirmModalVariant = 'yes/no' | 'ok/cancel';
|
|
4
|
+
interface ConfirmModalProps {
|
|
5
|
+
/**
|
|
6
|
+
* Variant of text buttons content
|
|
7
|
+
*/
|
|
8
|
+
variant?: ConfirmModalVariant;
|
|
9
|
+
/**
|
|
10
|
+
* Modal id (useful when multiple modal on the same page)
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
/**
|
|
14
|
+
* Is Modal Open
|
|
15
|
+
*/
|
|
16
|
+
isOpen: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Content of header modal's
|
|
19
|
+
*/
|
|
20
|
+
header?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Content of body modal's
|
|
23
|
+
*/
|
|
24
|
+
body?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Key text translation of confirm button (useTranslation('common'))
|
|
27
|
+
*/
|
|
28
|
+
okText?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Key text translation of cancel button (useTranslation('common'))
|
|
31
|
+
*/
|
|
32
|
+
koText?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Size of the modal (width)
|
|
35
|
+
*/
|
|
36
|
+
size?: ModalSize;
|
|
37
|
+
/**
|
|
38
|
+
* Function to call when success button proceed
|
|
39
|
+
*/
|
|
40
|
+
onSuccess?: () => void;
|
|
41
|
+
/**
|
|
42
|
+
* Function to call when closing modal
|
|
43
|
+
*/
|
|
44
|
+
onCancel?: () => void;
|
|
45
|
+
}
|
|
46
|
+
export default function ConfirmModal({ variant, id, isOpen, header, body, okText, koText, size, onSuccess, onCancel, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import Modal from "../../../components/Modal/Modal.js";
|
|
4
|
+
import Button from "../../../components/Button/Button.js";
|
|
5
|
+
function ConfirmModal({
|
|
6
|
+
variant = "yes/no",
|
|
7
|
+
id,
|
|
8
|
+
isOpen,
|
|
9
|
+
header,
|
|
10
|
+
body,
|
|
11
|
+
okText,
|
|
12
|
+
koText,
|
|
13
|
+
size = "md",
|
|
14
|
+
onSuccess = () => ({}),
|
|
15
|
+
onCancel = () => ({})
|
|
16
|
+
}) {
|
|
17
|
+
const {
|
|
18
|
+
t
|
|
19
|
+
} = useTranslation(), ok = {
|
|
20
|
+
"yes/no": t("yes"),
|
|
21
|
+
"ok/cancel": t("ok")
|
|
22
|
+
}, ko = {
|
|
23
|
+
"yes/no": t("no"),
|
|
24
|
+
"ok/cancel": t("cancel")
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ jsxs(Modal, { isOpen, onModalClose: onCancel, id, size, children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: header }),
|
|
28
|
+
/* @__PURE__ */ jsx(Modal.Body, { children: body }),
|
|
29
|
+
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Button, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: koText ? t(koText) : ko[variant] }),
|
|
31
|
+
/* @__PURE__ */ jsx(Button, { color: "danger", onClick: onSuccess, type: "button", variant: "filled", children: okText ? t(okText) : ok[variant] })
|
|
32
|
+
] })
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
ConfirmModal as default
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ConfirmModal } from './ConfirmModal';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface WorkspaceFoldersProps {
|
|
2
|
+
/**
|
|
3
|
+
* Function called when a folder is selected
|
|
4
|
+
*/
|
|
5
|
+
onFolderSelected: (folderId: string, canCopyFileInto: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export default function WorkspaceFolders({ onFolderSelected, }: WorkspaceFoldersProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import SvgIconFolderAdd from "../../icons/components/IconFolderAdd.js";
|
|
5
|
+
import NewFolderForm from "./components/NewFolderForm.js";
|
|
6
|
+
import useWorkspaceFolders from "../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";
|
|
7
|
+
import useWorkspaceFoldersTree, { WORKSPACE_USER_FOLDER_ID, WORKSPACE_SHARED_FOLDER_ID } from "../../../hooks/useWorkspaceFolders/useWorkspaceFoldersTree.js";
|
|
8
|
+
import SearchBar from "../../../components/SearchBar/SearchBar.js";
|
|
9
|
+
import Loading from "../../../components/Loading/Loading.js";
|
|
10
|
+
import Tree from "../../../components/Tree/components/Tree.js";
|
|
11
|
+
import Button from "../../../components/Button/Button.js";
|
|
12
|
+
function WorkspaceFolders({
|
|
13
|
+
onFolderSelected
|
|
14
|
+
}) {
|
|
15
|
+
const {
|
|
16
|
+
t
|
|
17
|
+
} = useTranslation(), {
|
|
18
|
+
folders,
|
|
19
|
+
isLoading,
|
|
20
|
+
canCopyFileIntoFolder
|
|
21
|
+
} = useWorkspaceFolders(), {
|
|
22
|
+
foldersTree,
|
|
23
|
+
filterTree
|
|
24
|
+
} = useWorkspaceFoldersTree(folders), [searchValue, setSearchValue] = useState(""), [selectedFolderId, setSelectedFolderId] = useState(void 0), [showNewFolderForm, setShowNewFolderForm] = useState(!1), [canCreateFolderIntoSelectedFolder, setCanCreateFolderIntoSelectedFolder] = useState(!1), selectedFolderIdForAPI = selectedFolderId === WORKSPACE_USER_FOLDER_ID || !selectedFolderId ? "" : selectedFolderId;
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (selectedFolderId) {
|
|
27
|
+
const canCopyFileInto = selectedFolderId === WORKSPACE_USER_FOLDER_ID || canCopyFileIntoFolder(selectedFolderId) && selectedFolderId !== WORKSPACE_SHARED_FOLDER_ID;
|
|
28
|
+
setCanCreateFolderIntoSelectedFolder(canCopyFileInto), onFolderSelected(selectedFolderIdForAPI, canCopyFileInto);
|
|
29
|
+
}
|
|
30
|
+
}, [selectedFolderId]);
|
|
31
|
+
const handleSearchChange = (e) => {
|
|
32
|
+
setSearchValue(e.target.value);
|
|
33
|
+
}, handleSearchSubmit = () => {
|
|
34
|
+
filterTree(searchValue);
|
|
35
|
+
}, handleFolderSelected = (folderId) => {
|
|
36
|
+
setShowNewFolderForm(!1), setSelectedFolderId(folderId);
|
|
37
|
+
}, handleNewFolderClick = () => {
|
|
38
|
+
setShowNewFolderForm(!0);
|
|
39
|
+
}, handleNewFolderCreated = (folderId) => {
|
|
40
|
+
handleFolderSelected(folderId);
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column gap-12", children: [
|
|
43
|
+
/* @__PURE__ */ jsx(SearchBar, { onChange: handleSearchChange, isVariant: !1, placeholder: t("search"), onClick: handleSearchSubmit }),
|
|
44
|
+
/* @__PURE__ */ jsxs("div", { className: "border border-gray-400 rounded", children: [
|
|
45
|
+
/* @__PURE__ */ jsx("div", { className: "p-12", children: isLoading ? /* @__PURE__ */ jsx(Loading, { isLoading: !0, className: "justify-content-center" }) : /* @__PURE__ */ jsx(Tree, { nodes: foldersTree, onTreeItemClick: handleFolderSelected, selectedNodeId: selectedFolderId }) }),
|
|
46
|
+
/* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end border-top border-gray-400 px-8 py-4 ", children: [
|
|
47
|
+
!showNewFolderForm && /* @__PURE__ */ jsx(Button, { color: "primary", variant: "ghost", leftIcon: /* @__PURE__ */ jsx(SvgIconFolderAdd, {}), onClick: handleNewFolderClick, disabled: !canCreateFolderIntoSelectedFolder, children: t("workspace.folder.create") }),
|
|
48
|
+
showNewFolderForm && selectedFolderId !== void 0 && /* @__PURE__ */ jsx(NewFolderForm, { onClose: () => setShowNewFolderForm(!1), folderParentId: selectedFolderIdForAPI, onFolderCreated: handleNewFolderCreated })
|
|
49
|
+
] })
|
|
50
|
+
] })
|
|
51
|
+
] }) });
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
WorkspaceFolders as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
/**
|
|
3
|
+
* Function called when the modal is closed
|
|
4
|
+
*/
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Parent folder ID where the new folder will be created
|
|
8
|
+
*/
|
|
9
|
+
folderParentId: string;
|
|
10
|
+
/**
|
|
11
|
+
* Function called when the new folder is created
|
|
12
|
+
*/
|
|
13
|
+
onFolderCreated: (folderId: string) => void;
|
|
14
|
+
};
|
|
15
|
+
export default function NewFolderForm({ onClose, folderParentId, onFolderCreated, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useEffect } from "react";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import SvgIconSave from "../../../icons/components/IconSave.js";
|
|
5
|
+
import useWorkspaceFolders from "../../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";
|
|
6
|
+
import FormControl from "../../../../components/Form/FormControl.js";
|
|
7
|
+
import IconButton from "../../../../components/Button/IconButton.js";
|
|
8
|
+
function NewFolderForm({
|
|
9
|
+
onClose,
|
|
10
|
+
folderParentId,
|
|
11
|
+
onFolderCreated
|
|
12
|
+
}) {
|
|
13
|
+
const {
|
|
14
|
+
t
|
|
15
|
+
} = useTranslation(), refInputName = useRef(null), {
|
|
16
|
+
createFolderMutation
|
|
17
|
+
} = useWorkspaceFolders();
|
|
18
|
+
return useEffect(() => {
|
|
19
|
+
refInputName.current && refInputName.current.focus();
|
|
20
|
+
}, []), /* @__PURE__ */ jsx("form", { id: "modalWorkspaceNewFolderForm", onSubmit: async (event) => {
|
|
21
|
+
var _a;
|
|
22
|
+
event.preventDefault();
|
|
23
|
+
const folderName = (_a = refInputName.current) == null ? void 0 : _a.value;
|
|
24
|
+
folderName && createFolderMutation.mutate({
|
|
25
|
+
folderName,
|
|
26
|
+
folderParentId
|
|
27
|
+
}, {
|
|
28
|
+
onSuccess: (newFolder) => {
|
|
29
|
+
newFolder._id && onFolderCreated(newFolder._id), onClose();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}, children: /* @__PURE__ */ jsxs("div", { className: "d-flex gap-4 flex-row", children: [
|
|
33
|
+
/* @__PURE__ */ jsx(FormControl, { id: "modalWorkspaceNewFolderForm", isRequired: !0, children: /* @__PURE__ */ jsx(FormControl.Input, { ref: refInputName, size: "md", type: "text", placeholder: t("workspace.folder.new.placeholder") }) }),
|
|
34
|
+
/* @__PURE__ */ jsx(IconButton, { type: "submit", color: "primary", variant: "ghost", title: t("workspace.folder.new.create"), disabled: createFolderMutation.isPending, isLoading: createFolderMutation.isPending, icon: /* @__PURE__ */ jsx(SvgIconSave, {}) })
|
|
35
|
+
] }) });
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
NewFolderForm as default
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as WorkspaceFolders } from './WorkspaceFolders';
|
package/dist/multimedia.js
CHANGED
|
@@ -6,6 +6,7 @@ import { default as default6 } from "./modules/multimedia/MediaLibrary/MediaLibr
|
|
|
6
6
|
import { default as default7 } from "./modules/multimedia/VideoEmbed/VideoEmbed.js";
|
|
7
7
|
import { default as default8 } from "./modules/multimedia/VideoRecorder/VideoRecorder.js";
|
|
8
8
|
import { default as default9 } from "./modules/multimedia/Workspace/Workspace.js";
|
|
9
|
+
import { default as default10 } from "./modules/multimedia/WorkspaceFolders/WorkspaceFolders.js";
|
|
9
10
|
import { ExternalLinker } from "./modules/multimedia/Linker/ExternalLinker/ExternalLinker.js";
|
|
10
11
|
import { InternalLinker } from "./modules/multimedia/Linker/InternalLinker/InternalLinker.js";
|
|
11
12
|
export {
|
|
@@ -18,5 +19,6 @@ export {
|
|
|
18
19
|
default6 as MediaLibrary,
|
|
19
20
|
default7 as VideoEmbed,
|
|
20
21
|
default8 as VideoRecorder,
|
|
21
|
-
default9 as Workspace
|
|
22
|
+
default9 as Workspace,
|
|
23
|
+
default10 as WorkspaceFolders
|
|
22
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7-develop-b2school.20250521111614",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"react-slugify": "^3.0.3",
|
|
119
119
|
"swiper": "^10.1.0",
|
|
120
120
|
"ua-parser-js": "^1.0.36",
|
|
121
|
-
"@edifice.io/bootstrap": "2.2.
|
|
122
|
-
"@edifice.io/tiptap-extensions": "2.2.
|
|
123
|
-
"@edifice.io/utilities": "2.2.
|
|
121
|
+
"@edifice.io/bootstrap": "2.2.7-develop-b2school.20250521111614",
|
|
122
|
+
"@edifice.io/tiptap-extensions": "2.2.7-develop-b2school.20250521111614",
|
|
123
|
+
"@edifice.io/utilities": "2.2.7-develop-b2school.20250521111614"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
"vite": "^5.4.11",
|
|
152
152
|
"vite-plugin-dts": "^4.1.0",
|
|
153
153
|
"vite-tsconfig-paths": "^5.0.1",
|
|
154
|
-
"@edifice.io/client": "2.2.
|
|
155
|
-
"@edifice.io/config": "2.2.
|
|
154
|
+
"@edifice.io/client": "2.2.7-develop-b2school.20250521111614",
|
|
155
|
+
"@edifice.io/config": "2.2.7-develop-b2school.20250521111614"
|
|
156
156
|
},
|
|
157
157
|
"peerDependencies": {
|
|
158
158
|
"@react-spring/web": "^9.7.5",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useEffect } from "react";
|
|
3
|
-
import { useEditorContext } from "../../hooks/useEditorContext.js";
|
|
4
|
-
const CantooAdaptTextBoxView = ({
|
|
5
|
-
openPosition
|
|
6
|
-
}) => {
|
|
7
|
-
const {
|
|
8
|
-
editor
|
|
9
|
-
} = useEditorContext(), containerRef = useRef(null), Cantoo = window.Cantoo, editorHTML = editor == null ? void 0 : editor.getHTML(), cantooHTML = (Cantoo == null ? void 0 : Cantoo.formatText(editorHTML)) || editorHTML;
|
|
10
|
-
return useEffect(() => {
|
|
11
|
-
var _a;
|
|
12
|
-
openPosition != null && openPosition.bottom && ((_a = containerRef.current) == null || _a.scrollIntoView({
|
|
13
|
-
behavior: "smooth",
|
|
14
|
-
block: "nearest",
|
|
15
|
-
inline: "nearest"
|
|
16
|
-
}));
|
|
17
|
-
}, []), /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
|
-
(openPosition == null ? void 0 : openPosition.right) && /* @__PURE__ */ jsx("div", { style: {
|
|
19
|
-
width: "1px",
|
|
20
|
-
backgroundColor: "#e0e0e0",
|
|
21
|
-
margin: "0 3px"
|
|
22
|
-
} }),
|
|
23
|
-
/* @__PURE__ */ jsx("div", { style: {
|
|
24
|
-
flex: 1,
|
|
25
|
-
marginTop: openPosition != null && openPosition.bottom ? "16px" : "0px"
|
|
26
|
-
}, children: /* @__PURE__ */ jsx("div", { ref: containerRef, className: `${openPosition != null && openPosition.bottom ? "card" : ""} py-12 px-16`, children: /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: {
|
|
27
|
-
__html: cantooHTML
|
|
28
|
-
} }) }) })
|
|
29
|
-
] });
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
CantooAdaptTextBoxView as default
|
|
33
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { RefAttributes } from 'react';
|
|
2
|
-
import { IconButtonProps } from '../../../../components';
|
|
3
|
-
import { CantooEditor } from '../../hooks';
|
|
4
|
-
interface Props {
|
|
5
|
-
triggerProps: JSX.IntrinsicAttributes & Omit<IconButtonProps, 'ref'> & RefAttributes<HTMLButtonElement>;
|
|
6
|
-
cantooEditor: CantooEditor;
|
|
7
|
-
}
|
|
8
|
-
export declare const EditorToolbarCantoo: ({ triggerProps, cantooEditor }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment as Fragment$1 } from "react";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import SvgIconCantoo from "../../../icons/components/IconCantoo.js";
|
|
5
|
-
import SvgIconDeleteColumnHighlight from "../../../icons/components/IconDeleteColumnHighlight.js";
|
|
6
|
-
import SvgIconDeleteRowHighlight from "../../../icons/components/IconDeleteRowHighlight.js";
|
|
7
|
-
import SvgIconMicOff from "../../../icons/components/IconMicOff.js";
|
|
8
|
-
import SvgIconMic from "../../../icons/components/IconMic.js";
|
|
9
|
-
import SvgIconSettings from "../../../icons/components/IconSettings.js";
|
|
10
|
-
import SvgIconTextToSpeechOff from "../../../icons/components/IconTextToSpeechOff.js";
|
|
11
|
-
import SvgIconTextToSpeech from "../../../icons/components/IconTextToSpeech.js";
|
|
12
|
-
import SvgIconWand from "../../../icons/components/IconWand.js";
|
|
13
|
-
import Tooltip from "../../../../components/Tooltip/Tooltip.js";
|
|
14
|
-
import IconButton from "../../../../components/Button/IconButton.js";
|
|
15
|
-
import Dropdown from "../../../../components/Dropdown/Dropdown.js";
|
|
16
|
-
const EditorToolbarCantoo = ({
|
|
17
|
-
triggerProps,
|
|
18
|
-
cantooEditor
|
|
19
|
-
}) => {
|
|
20
|
-
const {
|
|
21
|
-
t
|
|
22
|
-
} = useTranslation(), {
|
|
23
|
-
speech2textIsAvailable,
|
|
24
|
-
speech2textIsActive,
|
|
25
|
-
text2speechIsActive,
|
|
26
|
-
toggleSpeech2Text,
|
|
27
|
-
toggleText2Speech,
|
|
28
|
-
toogleSettings,
|
|
29
|
-
cantooParam
|
|
30
|
-
} = cantooEditor, cantooOptionsAdaptText = [{
|
|
31
|
-
id: "right",
|
|
32
|
-
label: t("tiptap.toolbar.cantoo.formatText.show.on.right"),
|
|
33
|
-
icon: /* @__PURE__ */ jsx(SvgIconDeleteColumnHighlight, {}),
|
|
34
|
-
className: cantooEditor.openPositionAdaptText.right ? "fw-bold" : "",
|
|
35
|
-
action: () => cantooEditor.handleCantooAdaptTextPosition("right")
|
|
36
|
-
}, {
|
|
37
|
-
id: "bottom",
|
|
38
|
-
label: t("tiptap.toolbar.cantoo.formatText.show.on.bottom"),
|
|
39
|
-
icon: /* @__PURE__ */ jsx(SvgIconDeleteRowHighlight, {}),
|
|
40
|
-
className: cantooEditor.openPositionAdaptText.bottom ? "fw-bold" : "",
|
|
41
|
-
action: () => cantooEditor.handleCantooAdaptTextPosition("bottom")
|
|
42
|
-
}], cantooOptions = [...cantooParam === "simplify" ? [{
|
|
43
|
-
id: "formatText",
|
|
44
|
-
label: t("tiptap.toolbar.cantoo.formatText"),
|
|
45
|
-
className: cantooEditor.openPositionAdaptText.bottom ? "fw-bold" : "",
|
|
46
|
-
icon: /* @__PURE__ */ jsx(SvgIconWand, {}),
|
|
47
|
-
action: () => cantooEditor.handleCantooAdaptTextPosition("bottom")
|
|
48
|
-
}] : [], ...speech2textIsAvailable ? [{
|
|
49
|
-
id: "speech2text",
|
|
50
|
-
label: t("tiptap.toolbar.cantoo.speech2text"),
|
|
51
|
-
className: speech2textIsActive ? "fw-bold" : "",
|
|
52
|
-
icon: speech2textIsActive ? /* @__PURE__ */ jsx(SvgIconMicOff, {}) : /* @__PURE__ */ jsx(SvgIconMic, {}),
|
|
53
|
-
action: () => toggleSpeech2Text()
|
|
54
|
-
}] : [], {
|
|
55
|
-
id: "text2speech",
|
|
56
|
-
label: t("tiptap.toolbar.cantoo.text2speech"),
|
|
57
|
-
className: text2speechIsActive ? "fw-bold" : "",
|
|
58
|
-
icon: text2speechIsActive ? /* @__PURE__ */ jsx(SvgIconTextToSpeechOff, {}) : /* @__PURE__ */ jsx(SvgIconTextToSpeech, {}),
|
|
59
|
-
action: () => toggleText2Speech()
|
|
60
|
-
}, ...cantooParam === "simplify" ? [] : [{
|
|
61
|
-
id: "settings",
|
|
62
|
-
label: t("tiptap.toolbar.cantoo.settings"),
|
|
63
|
-
icon: /* @__PURE__ */ jsx(SvgIconSettings, {}),
|
|
64
|
-
action: () => toogleSettings()
|
|
65
|
-
}]];
|
|
66
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
67
|
-
/* @__PURE__ */ jsx(Tooltip, { message: t("tiptap.toolbar.cantoo.choice"), placement: "top", children: /* @__PURE__ */ jsx(IconButton, { ...triggerProps, type: "button", variant: "ghost", color: "tertiary", icon: /* @__PURE__ */ jsx(SvgIconCantoo, {}), className: speech2textIsActive || text2speechIsActive || cantooEditor.openPositionAdaptText.right || cantooEditor.openPositionAdaptText.bottom ? "is-selected" : "", "aria-label": t("tiptap.toolbar.cantoo.choice"), isLoading: !window.Cantoo }) }),
|
|
68
|
-
/* @__PURE__ */ jsxs(Dropdown.Menu, { children: [
|
|
69
|
-
cantooParam != "simplify" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70
|
-
/* @__PURE__ */ jsx(Dropdown.MenuGroup, { label: t("tiptap.toolbar.cantoo.formatText"), children: cantooOptionsAdaptText.map((option) => /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Dropdown.Item, { onClick: option.action, icon: option.icon, className: option.className, children: /* @__PURE__ */ jsx("span", { children: option.label }) }) }, option.id)) }),
|
|
71
|
-
/* @__PURE__ */ jsx(Dropdown.Separator, {})
|
|
72
|
-
] }),
|
|
73
|
-
cantooOptions.map((option) => /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Dropdown.Item, { onClick: option.action, icon: option.icon, children: /* @__PURE__ */ jsx("span", { className: option.className, children: option.label }) }) }, option.id))
|
|
74
|
-
] })
|
|
75
|
-
] });
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
EditorToolbarCantoo
|
|
79
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
|
-
export interface CantooEditor {
|
|
3
|
-
cantooParam: string;
|
|
4
|
-
isAvailable: boolean;
|
|
5
|
-
speech2textIsAvailable: boolean;
|
|
6
|
-
speech2textIsActive: boolean;
|
|
7
|
-
text2speechIsActive: boolean;
|
|
8
|
-
toggleSpeech2Text: () => void;
|
|
9
|
-
toggleText2Speech: () => void;
|
|
10
|
-
toogleSettings: () => void;
|
|
11
|
-
openPositionAdaptText: {
|
|
12
|
-
right: boolean;
|
|
13
|
-
bottom: boolean;
|
|
14
|
-
};
|
|
15
|
-
handleCantooAdaptTextPosition: (position: string) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare const useCantooEditor: (editor: Editor | null, cantooParam: string) => CantooEditor;
|