@edifice.io/react 2.2.2-develop-pedago.20250409103005 → 2.2.2-develop-b2school.20250410105023

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.
Files changed (125) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +0 -21
  2. package/dist/components/Avatar/Avatar.js +2 -15
  3. package/dist/components/Card/Card.d.ts +1 -3
  4. package/dist/components/Card/CardBody.d.ts +1 -3
  5. package/dist/components/Card/CardBody.js +2 -4
  6. package/dist/components/Combobox/Combobox.d.ts +55 -5
  7. package/dist/components/Combobox/Combobox.js +13 -7
  8. package/dist/components/Combobox/ComboboxTrigger.d.ts +30 -2
  9. package/dist/components/Combobox/ComboboxTrigger.js +27 -8
  10. package/dist/components/Dropdown/Dropdown.d.ts +10 -6
  11. package/dist/components/Dropdown/Dropdown.js +5 -5
  12. package/dist/components/Dropdown/DropdownItem.d.ts +3 -3
  13. package/dist/components/Dropdown/DropdownItem.js +6 -8
  14. package/dist/components/Dropdown/DropdownTrigger.d.ts +2 -31
  15. package/dist/components/Dropdown/DropdownTrigger.js +8 -24
  16. package/dist/components/List/List.d.ts +9 -1
  17. package/dist/components/List/List.js +9 -9
  18. package/dist/components/SearchBar/SearchBar.d.ts +1 -1
  19. package/dist/components/SearchBar/SearchBar.js +3 -1
  20. package/dist/components/index.d.ts +0 -4
  21. package/dist/editor.js +22 -22
  22. package/dist/hooks/index.d.ts +1 -0
  23. package/dist/hooks/useCheckable/useCheckable.js +10 -3
  24. package/dist/hooks/useConf/useConf.d.ts +1 -1
  25. package/dist/hooks/useConversation/useConversation.d.ts +1 -1
  26. package/dist/hooks/useConversation/useConversation.js +13 -17
  27. package/dist/hooks/useDropdown/useDropdown.d.ts +2 -1
  28. package/dist/hooks/useDropdown/useDropdown.js +5 -3
  29. package/dist/hooks/useSession/useSession.d.ts +1 -1
  30. package/dist/hooks/useWorkspaceFolders/index.d.ts +1 -0
  31. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +14 -0
  32. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +44 -0
  33. package/dist/icons.js +230 -212
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.js +172 -154
  36. package/dist/modals.js +16 -14
  37. package/dist/modules/comments/components/Comment.js +34 -49
  38. package/dist/modules/comments/components/CommentForm.d.ts +1 -2
  39. package/dist/modules/comments/components/CommentForm.js +8 -12
  40. package/dist/modules/comments/components/CommentList.js +3 -3
  41. package/dist/modules/comments/constants.d.ts +0 -4
  42. package/dist/modules/comments/constants.js +1 -2
  43. package/dist/modules/comments/context/Context.d.ts +4 -6
  44. package/dist/modules/comments/hooks/useComments.d.ts +7 -7
  45. package/dist/modules/comments/hooks/useComments.js +19 -24
  46. package/dist/modules/comments/hooks/useCommentsContext.d.ts +4 -6
  47. package/dist/modules/comments/provider/CommentProvider.js +13 -16
  48. package/dist/modules/comments/types.d.ts +1 -14
  49. package/dist/modules/editor/components/Editor/Editor.d.ts +3 -1
  50. package/dist/modules/editor/components/Editor/Editor.js +5 -8
  51. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +0 -12
  52. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.d.ts +2 -0
  53. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.js +10 -0
  54. package/dist/modules/editor/components/NodeView/index.d.ts +2 -2
  55. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.d.ts +8 -0
  56. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.js +28 -0
  57. package/dist/modules/editor/components/Renderer/index.d.ts +2 -2
  58. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +6 -2
  59. package/dist/modules/editor/hooks/useTipTapEditor.js +2 -4
  60. package/dist/modules/icons/components/IconFolderAdd.d.ts +7 -0
  61. package/dist/modules/icons/components/IconFolderAdd.js +13 -0
  62. package/dist/modules/icons/components/IconFolderDelete.d.ts +7 -0
  63. package/dist/modules/icons/components/IconFolderDelete.js +12 -0
  64. package/dist/modules/icons/components/IconGlobe2.d.ts +7 -0
  65. package/dist/modules/icons/components/IconGlobe2.js +16 -0
  66. package/dist/modules/icons/components/IconGroupAvatar.d.ts +7 -0
  67. package/dist/modules/icons/components/IconGroupAvatar.js +12 -0
  68. package/dist/modules/icons/components/IconMailRecall.d.ts +7 -0
  69. package/dist/modules/icons/components/IconMailRecall.js +13 -0
  70. package/dist/modules/icons/components/IconQuestionMark.d.ts +7 -0
  71. package/dist/modules/icons/components/IconQuestionMark.js +13 -0
  72. package/dist/modules/icons/components/IconReadMail.d.ts +7 -0
  73. package/dist/modules/icons/components/IconReadMail.js +16 -0
  74. package/dist/modules/icons/components/IconSignature.d.ts +7 -0
  75. package/dist/modules/icons/components/IconSignature.js +13 -0
  76. package/dist/modules/icons/components/IconUndoAll.d.ts +7 -0
  77. package/dist/modules/icons/components/IconUndoAll.js +14 -0
  78. package/dist/modules/icons/components/IconUnreadMail.d.ts +7 -0
  79. package/dist/modules/icons/components/IconUnreadMail.js +16 -0
  80. package/dist/modules/icons/components/index.d.ts +10 -1
  81. package/dist/modules/modals/ConfirmModal/ConfirmModal.d.ts +42 -0
  82. package/dist/modules/modals/ConfirmModal/ConfirmModal.js +36 -0
  83. package/dist/modules/modals/ConfirmModal/index.d.ts +1 -0
  84. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
  85. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
  86. package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -1
  87. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  88. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
  89. package/dist/modules/modals/index.d.ts +1 -0
  90. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +5 -9
  91. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.d.ts +8 -0
  92. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.js +28 -0
  93. package/dist/modules/multimedia/WorkspaceFolders/index.d.ts +1 -0
  94. package/dist/modules/multimedia/index.d.ts +1 -0
  95. package/dist/multimedia.js +3 -1
  96. package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
  97. package/dist/types/index.d.ts +0 -1
  98. package/package.json +6 -6
  99. package/dist/components/AvatarGroup/AvatarGroup.d.ts +0 -24
  100. package/dist/components/AvatarGroup/AvatarGroup.js +0 -24
  101. package/dist/components/AvatarGroup/index.d.ts +0 -2
  102. package/dist/components/PreventPropagation/PreventPropagation.d.ts +0 -10
  103. package/dist/components/PreventPropagation/PreventPropagation.js +0 -9
  104. package/dist/components/PreventPropagation/index.d.ts +0 -2
  105. package/dist/components/StackedGroup/StackedGroup.d.ts +0 -23
  106. package/dist/components/StackedGroup/StackedGroup.js +0 -21
  107. package/dist/components/StackedGroup/index.d.ts +0 -1
  108. package/dist/components/Switch/Switch.d.ts +0 -29
  109. package/dist/components/Switch/Switch.js +0 -27
  110. package/dist/components/Switch/index.d.ts +0 -2
  111. package/dist/modules/comments/components/CommentDeleted.d.ts +0 -1
  112. package/dist/modules/comments/components/CommentDeleted.js +0 -11
  113. package/dist/modules/comments/components/CommentReplies.d.ts +0 -4
  114. package/dist/modules/comments/components/CommentReplies.js +0 -33
  115. package/dist/modules/comments/hooks/useCommentReplies.d.ts +0 -12
  116. package/dist/modules/comments/hooks/useCommentReplies.js +0 -36
  117. package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.d.ts +0 -6
  118. package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.js +0 -136
  119. package/dist/modules/editor/components/BubbleMenuEditInformationPane/index.d.ts +0 -1
  120. package/dist/modules/editor/components/NodeView/InformationPaneNodeView.d.ts +0 -2
  121. package/dist/modules/editor/components/NodeView/InformationPaneNodeView.js +0 -10
  122. package/dist/modules/editor/components/Renderer/InformationPaneRenderer.d.ts +0 -3
  123. package/dist/modules/editor/components/Renderer/InformationPaneRenderer.js +0 -33
  124. package/dist/modules/icons/components/IconInfoRectangle.d.ts +0 -7
  125. package/dist/modules/icons/components/IconInfoRectangle.js +0 -13
@@ -1,29 +0,0 @@
1
- import { InputHTMLAttributes } from 'react';
2
- export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
- /**
4
- * The label of the switch
5
- */
6
- label?: string;
7
- /**
8
- * The value of the switch
9
- */
10
- value?: string;
11
- /**
12
- * Define if switch is disabled
13
- */
14
- disabled?: boolean;
15
- /**
16
- * Define switch size
17
- */
18
- size?: 'sm' | 'md';
19
- /**
20
- * Additional class name for the label
21
- */
22
- labelClassName?: string;
23
- /**
24
- * Switch color variant
25
- */
26
- variant?: 'default' | 'ghost' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
27
- }
28
- declare const Switch: import('react').ForwardRefExoticComponent<SwitchProps & import('react').RefAttributes<HTMLInputElement>>;
29
- export default Switch;
@@ -1,27 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
- import clsx from "clsx";
4
- const Switch = /* @__PURE__ */ forwardRef(({
5
- className,
6
- label,
7
- value,
8
- disabled,
9
- size = "md",
10
- variant = "default",
11
- labelClassName,
12
- ...restProps
13
- }, ref) => {
14
- const switchClass = clsx("switch", {
15
- [`switch-${size}`]: size,
16
- [`switch-${variant}`]: variant,
17
- "switch-disabled": disabled
18
- }, className), labelClass = clsx("switch-label", labelClassName);
19
- return /* @__PURE__ */ jsxs("label", { className: switchClass, children: [
20
- /* @__PURE__ */ jsx("input", { type: "checkbox", ref, value, disabled, ...restProps }),
21
- /* @__PURE__ */ jsx("span", { className: "slider" }),
22
- label && /* @__PURE__ */ jsx("span", { className: labelClass, children: label })
23
- ] });
24
- });
25
- export {
26
- Switch as default
27
- };
@@ -1,2 +0,0 @@
1
- export { default as Switch } from './Switch';
2
- export * from './Switch';
@@ -1 +0,0 @@
1
- export declare const CommentDeleted: () => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useTranslation } from "react-i18next";
3
- const CommentDeleted = () => {
4
- const {
5
- t
6
- } = useTranslation();
7
- return /* @__PURE__ */ jsx("div", { className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16", children: t("comment.deleted") });
8
- };
9
- export {
10
- CommentDeleted
11
- };
@@ -1,4 +0,0 @@
1
- import { CommentProps } from '../types';
2
- export declare const CommentReplies: ({ parentComment, }: {
3
- parentComment: CommentProps;
4
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,33 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { Comment } from "./Comment.js";
3
- import { CommentForm } from "./CommentForm.js";
4
- import { useCommentReplies } from "../hooks/useCommentReplies.js";
5
- import Button from "../../../components/Button/Button.js";
6
- const CommentReplies = ({
7
- parentComment
8
- }) => {
9
- const {
10
- t,
11
- profiles,
12
- user,
13
- displayedReplies,
14
- showCommentForm,
15
- showMoreReplies,
16
- handleMoreReplies
17
- } = useCommentReplies({
18
- parentComment
19
- });
20
- return /* @__PURE__ */ jsxs("div", { className: "comments-replies-container", children: [
21
- showCommentForm && /* @__PURE__ */ jsx("div", { className: "comments-replies-form", children: /* @__PURE__ */ jsx(CommentForm, { userId: user == null ? void 0 : user.userId, replyTo: parentComment.id }) }),
22
- /* @__PURE__ */ jsx("div", { className: "comments-replies-list", children: displayedReplies.map((reply) => {
23
- var _a;
24
- const profile = ((_a = profiles == null ? void 0 : profiles.find((user2) => (user2 == null ? void 0 : user2.userId) === reply.authorId)) == null ? void 0 : _a.profile) ?? "Guest";
25
- if (!reply.deleted)
26
- return /* @__PURE__ */ jsx("div", { className: "comments-replies-reply", children: /* @__PURE__ */ jsx(Comment, { comment: reply, profile, userId: user == null ? void 0 : user.userId }) }, reply.id);
27
- }) }),
28
- showMoreReplies && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", onClick: handleMoreReplies, className: "ms-24", children: t("comment.more.replies") })
29
- ] });
30
- };
31
- export {
32
- CommentReplies
33
- };
@@ -1,12 +0,0 @@
1
- import { CommentProps } from '../types';
2
- export declare const useCommentReplies: ({ parentComment, }: {
3
- parentComment: CommentProps;
4
- }) => {
5
- t: import('i18next').TFunction<"translation", undefined>;
6
- profiles: (import('../types').UserProfileResult | undefined)[];
7
- user: import('@edifice.io/client').IUserInfo | undefined;
8
- showCommentForm: boolean;
9
- displayedReplies: CommentProps[];
10
- showMoreReplies: boolean;
11
- handleMoreReplies: () => void;
12
- };
@@ -1,36 +0,0 @@
1
- import { useState } from "react";
2
- import { useTranslation } from "react-i18next";
3
- import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
4
- import { useCommentsContext } from "./useCommentsContext.js";
5
- const useCommentReplies = ({
6
- parentComment
7
- }) => {
8
- const {
9
- profiles,
10
- options,
11
- replyToCommentId,
12
- defaultComments
13
- } = useCommentsContext(), {
14
- maxReplies,
15
- additionalReplies
16
- } = options, [repliesLimit, setRepliesLimit] = useState(maxReplies), {
17
- user
18
- } = useEdificeClient(), {
19
- t
20
- } = useTranslation(), showCommentForm = replyToCommentId === parentComment.id && !parentComment.deleted, defaultReplies = (defaultComments == null ? void 0 : defaultComments.filter((comment) => comment.replyTo === parentComment.id && !comment.deleted)) ?? [], displayedReplies = (defaultReplies == null ? void 0 : defaultReplies.sort((a, b) => a.createdAt - b.createdAt).slice(0, repliesLimit)) ?? [], showMoreReplies = displayedReplies.length < defaultReplies.length;
21
- return {
22
- t,
23
- profiles,
24
- user,
25
- showCommentForm,
26
- displayedReplies,
27
- showMoreReplies,
28
- handleMoreReplies: () => {
29
- const newLimit = displayedReplies.length + (additionalReplies ?? 2);
30
- newLimit !== displayedReplies.length && setRepliesLimit(newLimit);
31
- }
32
- };
33
- };
34
- export {
35
- useCommentReplies
36
- };
@@ -1,6 +0,0 @@
1
- import { Editor } from '@tiptap/react';
2
- declare const BubbleMenuEditInformationPane: ({ editor, editable, }: {
3
- editor: Editor;
4
- editable: boolean;
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- export default BubbleMenuEditInformationPane;
@@ -1,136 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useMemo } from "react";
3
- import { BubbleMenu } from "@tiptap/react";
4
- import { useTranslation } from "react-i18next";
5
- import { Toolbar } from "../../../../components/Toolbar/Toolbar.js";
6
- import SvgIconAlertTriangle from "../../../icons/components/IconAlertTriangle.js";
7
- import SvgIconDelete from "../../../icons/components/IconDelete.js";
8
- import SvgIconInfoCircle from "../../../icons/components/IconInfoCircle.js";
9
- import SvgIconQuestion from "../../../icons/components/IconQuestion.js";
10
- import SvgIconSuccessOutline from "../../../icons/components/IconSuccessOutline.js";
11
- const BubbleMenuEditInformationPane = ({
12
- editor,
13
- editable
14
- }) => {
15
- const {
16
- t
17
- } = useTranslation(), {
18
- selection
19
- } = editor.view.state, selectedNode = selection.$from.node(1), InformationPaneTypeItems = useMemo(() => {
20
- var _a, _b, _c, _d;
21
- return [{
22
- type: "icon",
23
- name: "info",
24
- props: {
25
- size: "lg",
26
- leftIcon: /* @__PURE__ */ jsx(SvgIconInfoCircle, {}),
27
- "aria-label": t("tiptap.tooltip.bubblemenu.information.pane.info"),
28
- className: ((_a = selectedNode == null ? void 0 : selectedNode.attrs) == null ? void 0 : _a.type) === "info" ? "is-selected" : "",
29
- onClick: () => editor.chain().focus().updateAttributes("information-pane", {
30
- type: "info"
31
- }).run()
32
- },
33
- tooltip: {
34
- message: t("tiptap.tooltip.bubblemenu.information.pane.info"),
35
- position: "top"
36
- }
37
- }, {
38
- type: "icon",
39
- name: "success",
40
- props: {
41
- size: "lg",
42
- leftIcon: /* @__PURE__ */ jsx(SvgIconSuccessOutline, {}),
43
- "aria-label": t("tiptap.tooltip.bubblemenu.information.pane.success"),
44
- className: ((_b = selectedNode == null ? void 0 : selectedNode.attrs) == null ? void 0 : _b.type) === "success" ? "is-selected" : "",
45
- onClick: () => editor.chain().focus().updateAttributes("information-pane", {
46
- type: "success"
47
- }).run()
48
- },
49
- tooltip: {
50
- message: t("tiptap.tooltip.bubblemenu.information.pane.success"),
51
- position: "top"
52
- }
53
- }, {
54
- type: "icon",
55
- name: "warning",
56
- props: {
57
- size: "lg",
58
- leftIcon: /* @__PURE__ */ jsx(SvgIconAlertTriangle, {}),
59
- "aria-label": t("tiptap.tooltip.bubblemenu.information.pane.warning"),
60
- className: ((_c = selectedNode == null ? void 0 : selectedNode.attrs) == null ? void 0 : _c.type) === "warning" ? "is-selected" : "",
61
- onClick: () => editor.chain().focus().updateAttributes("information-pane", {
62
- type: "warning"
63
- }).run()
64
- },
65
- tooltip: {
66
- message: t("tiptap.tooltip.bubblemenu.information.pane.warning"),
67
- position: "top"
68
- }
69
- }, {
70
- type: "icon",
71
- name: "question",
72
- props: {
73
- size: "lg",
74
- leftIcon: /* @__PURE__ */ jsx(SvgIconQuestion, {}),
75
- "aria-label": t("tiptap.tooltip.bubblemenu.information.pane.question"),
76
- className: ((_d = selectedNode == null ? void 0 : selectedNode.attrs) == null ? void 0 : _d.type) === "question" ? "is-selected" : "",
77
- onClick: () => editor.chain().focus().updateAttributes("information-pane", {
78
- type: "question"
79
- }).run()
80
- },
81
- tooltip: {
82
- message: t("tiptap.tooltip.bubblemenu.information.pane.question"),
83
- position: "top"
84
- }
85
- }, {
86
- type: "divider",
87
- name: "div-4"
88
- }, {
89
- type: "button",
90
- name: "delete",
91
- props: {
92
- size: "lg",
93
- leftIcon: /* @__PURE__ */ jsx(SvgIconDelete, {}),
94
- "aria-label": t("tiptap.tooltip.bubblemenu.information.pane.delete"),
95
- children: t("tiptap.bubblemenu.delete"),
96
- onClick: () => editor.chain().focus().deleteNode("information-pane").run()
97
- },
98
- tooltip: {
99
- message: t("tiptap.tooltip.bubblemenu.information.pane.delete"),
100
- position: "top"
101
- }
102
- }];
103
- }, [t, selectedNode]), tippyOptions = useMemo(() => ({
104
- placement: "bottom",
105
- offset: [0, 0],
106
- zIndex: 999,
107
- duration: 100,
108
- getReferenceClientRect: () => {
109
- const {
110
- state
111
- } = editor, {
112
- $anchor
113
- } = state.selection;
114
- let informationPanePos = null;
115
- for (let depth = $anchor.depth; depth >= 0; depth--)
116
- if ($anchor.node(depth).type.name === "information-pane") {
117
- informationPanePos = $anchor.before(depth);
118
- break;
119
- }
120
- if (informationPanePos !== null) {
121
- let domNode = editor.view.nodeDOM(informationPanePos);
122
- for (; domNode && domNode instanceof HTMLElement && !domNode.classList.contains("information-pane"); )
123
- domNode = domNode.children[0];
124
- if (domNode instanceof HTMLElement)
125
- return domNode.getBoundingClientRect();
126
- }
127
- return new DOMRect(0, 0, 0, 0);
128
- }
129
- }), [editor]);
130
- return /* @__PURE__ */ jsx(BubbleMenu, { shouldShow: ({
131
- editor: editor2
132
- }) => editor2.isActive("information-pane"), editor, tippyOptions, children: editable && /* @__PURE__ */ jsx(Toolbar, { className: "p-8", items: InformationPaneTypeItems }) });
133
- };
134
- export {
135
- BubbleMenuEditInformationPane as default
136
- };
@@ -1 +0,0 @@
1
- export { default as BubbleMenuEditInformationPane } from './BubbleMenuEditInformationPane';
@@ -1,2 +0,0 @@
1
- declare const InformationPaneNodeView: (Component: any) => import('@tiptap/core').Node<any, any>;
2
- export default InformationPaneNodeView;
@@ -1,10 +0,0 @@
1
- import { InformationPane } from "@edifice.io/tiptap-extensions/information-pane";
2
- import { ReactNodeViewRenderer } from "@tiptap/react";
3
- const InformationPaneNodeView = (Component) => InformationPane.extend({
4
- addNodeView() {
5
- return ReactNodeViewRenderer(Component);
6
- }
7
- });
8
- export {
9
- InformationPaneNodeView as default
10
- };
@@ -1,3 +0,0 @@
1
- import { MediaResizeProps } from '../../hooks';
2
- declare const InformationPaneRenderer: (props: MediaResizeProps) => import("react/jsx-runtime").JSX.Element;
3
- export default InformationPaneRenderer;
@@ -1,33 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import SvgIconAlertTriangle from "../../../icons/components/IconAlertTriangle.js";
3
- import SvgIconInfoCircle from "../../../icons/components/IconInfoCircle.js";
4
- import SvgIconQuestion from "../../../icons/components/IconQuestion.js";
5
- import SvgIconSuccessOutline from "../../../icons/components/IconSuccessOutline.js";
6
- import { NodeViewWrapper, NodeViewContent } from "@tiptap/react";
7
- const InformationPaneRenderer = (props) => {
8
- const {
9
- node
10
- } = props, getIconByType = (type) => {
11
- switch (type) {
12
- case "warning":
13
- return /* @__PURE__ */ jsx(SvgIconAlertTriangle, { color: "#F59700" });
14
- case "success":
15
- return /* @__PURE__ */ jsx(SvgIconSuccessOutline, { color: "#7DBF85" });
16
- case "info":
17
- return /* @__PURE__ */ jsx(SvgIconInfoCircle, { color: "#2A9CC8" });
18
- case "question":
19
- return /* @__PURE__ */ jsx(SvgIconQuestion, { color: "#823AA1" });
20
- default:
21
- return /* @__PURE__ */ jsx(SvgIconInfoCircle, { color: "#2A9CC8" });
22
- }
23
- };
24
- return /* @__PURE__ */ jsx(NodeViewWrapper, { node, className: "react-component", children: /* @__PURE__ */ jsxs("div", { className: `information-pane information-pane-${node.attrs.type}`, "data-information-pane": !0, "data-type": node.attrs.type, children: [
25
- /* @__PURE__ */ jsx("span", { className: "information-pane-icon", children: getIconByType(node.attrs.type) }),
26
- /* @__PURE__ */ jsx(NodeViewContent, { style: {
27
- width: "100%"
28
- } })
29
- ] }) });
30
- };
31
- export {
32
- InformationPaneRenderer as default
33
- };
@@ -1,7 +0,0 @@
1
- import { SVGProps } from 'react';
2
- interface SVGRProps {
3
- title?: string;
4
- titleId?: string;
5
- }
6
- declare const SvgIconInfoRectangle: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
- export default SvgIconInfoRectangle;
@@ -1,13 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- const SvgIconInfoRectangle = ({
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 20 16", "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: "M2.87 2.167c-.718 0-1.203.531-1.203 1.071v9.524c0 .54.485 1.071 1.203 1.071h14.26c.718 0 1.203-.531 1.203-1.071V3.238c0-.54-.485-1.071-1.203-1.071zM0 3.238C0 1.674 1.339.5 2.87.5h14.26C18.66.5 20 1.674 20 3.238v9.524c0 1.564-1.339 2.738-2.87 2.738H2.87C1.34 15.5 0 14.326 0 12.762z", clipRule: "evenodd" }),
9
- /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M10.008 12.167a.833.833 0 0 1-.833-.834V7.167a.833.833 0 1 1 1.667 0v4.166c0 .46-.373.834-.834.834M10.842 4.25c0 .46-.373.833-.834.833H10a.833.833 0 1 1 0-1.666h.008c.46 0 .834.373.834.833", clipRule: "evenodd" })
10
- ] });
11
- export {
12
- SvgIconInfoRectangle as default
13
- };