@edifice.io/react 2.2.2 → 2.2.3-develop-b2school.20250415115428

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 (124) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +21 -0
  2. package/dist/components/Avatar/Avatar.js +15 -2
  3. package/dist/components/AvatarGroup/AvatarGroup.d.ts +24 -0
  4. package/dist/components/AvatarGroup/AvatarGroup.js +24 -0
  5. package/dist/components/AvatarGroup/index.d.ts +2 -0
  6. package/dist/components/Card/Card.d.ts +3 -1
  7. package/dist/components/Card/CardBody.d.ts +3 -1
  8. package/dist/components/Card/CardBody.js +4 -2
  9. package/dist/components/Combobox/Combobox.d.ts +55 -5
  10. package/dist/components/Combobox/Combobox.js +13 -7
  11. package/dist/components/Combobox/ComboboxTrigger.d.ts +30 -2
  12. package/dist/components/Combobox/ComboboxTrigger.js +27 -8
  13. package/dist/components/Dropdown/Dropdown.d.ts +14 -2
  14. package/dist/components/Dropdown/Dropdown.js +7 -3
  15. package/dist/components/Dropdown/DropdownItem.d.ts +9 -1
  16. package/dist/components/Dropdown/DropdownItem.js +11 -3
  17. package/dist/components/Dropdown/DropdownTrigger.d.ts +31 -2
  18. package/dist/components/Dropdown/DropdownTrigger.js +28 -4
  19. package/dist/components/List/List.d.ts +9 -1
  20. package/dist/components/List/List.js +9 -9
  21. package/dist/components/PreventPropagation/PreventPropagation.d.ts +10 -0
  22. package/dist/components/PreventPropagation/PreventPropagation.js +9 -0
  23. package/dist/components/PreventPropagation/index.d.ts +2 -0
  24. package/dist/components/SearchBar/SearchBar.d.ts +1 -1
  25. package/dist/components/SearchBar/SearchBar.js +3 -1
  26. package/dist/components/StackedGroup/StackedGroup.d.ts +23 -0
  27. package/dist/components/StackedGroup/StackedGroup.js +21 -0
  28. package/dist/components/StackedGroup/index.d.ts +1 -0
  29. package/dist/components/Switch/Switch.d.ts +29 -0
  30. package/dist/components/Switch/Switch.js +27 -0
  31. package/dist/components/Switch/index.d.ts +2 -0
  32. package/dist/components/index.d.ts +4 -0
  33. package/dist/editor.js +30 -22
  34. package/dist/hooks/index.d.ts +1 -0
  35. package/dist/hooks/useCheckable/useCheckable.js +10 -3
  36. package/dist/hooks/useConf/useConf.d.ts +1 -1
  37. package/dist/hooks/useConversation/useConversation.d.ts +1 -1
  38. package/dist/hooks/useConversation/useConversation.js +13 -17
  39. package/dist/hooks/useDropdown/useDropdown.d.ts +2 -1
  40. package/dist/hooks/useDropdown/useDropdown.js +5 -3
  41. package/dist/hooks/useSession/useSession.d.ts +1 -1
  42. package/dist/hooks/useWorkspaceFolders/index.d.ts +2 -0
  43. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +28 -0
  44. package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +74 -0
  45. package/dist/icons.js +232 -210
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.js +182 -146
  48. package/dist/modals.js +16 -14
  49. package/dist/modules/comments/components/Comment.js +49 -34
  50. package/dist/modules/comments/components/CommentDeleted.d.ts +1 -0
  51. package/dist/modules/comments/components/CommentDeleted.js +11 -0
  52. package/dist/modules/comments/components/CommentForm.d.ts +2 -1
  53. package/dist/modules/comments/components/CommentForm.js +12 -8
  54. package/dist/modules/comments/components/CommentList.js +3 -3
  55. package/dist/modules/comments/components/CommentReplies.d.ts +4 -0
  56. package/dist/modules/comments/components/CommentReplies.js +33 -0
  57. package/dist/modules/comments/constants.d.ts +4 -0
  58. package/dist/modules/comments/constants.js +2 -1
  59. package/dist/modules/comments/context/Context.d.ts +6 -4
  60. package/dist/modules/comments/hooks/useCommentReplies.d.ts +12 -0
  61. package/dist/modules/comments/hooks/useCommentReplies.js +36 -0
  62. package/dist/modules/comments/hooks/useComments.d.ts +7 -7
  63. package/dist/modules/comments/hooks/useComments.js +24 -19
  64. package/dist/modules/comments/hooks/useCommentsContext.d.ts +6 -4
  65. package/dist/modules/comments/provider/CommentProvider.js +16 -13
  66. package/dist/modules/comments/types.d.ts +14 -1
  67. package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.d.ts +6 -0
  68. package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.js +136 -0
  69. package/dist/modules/editor/components/BubbleMenuEditInformationPane/index.d.ts +1 -0
  70. package/dist/modules/editor/components/Editor/Editor.d.ts +3 -1
  71. package/dist/modules/editor/components/Editor/Editor.js +9 -4
  72. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +12 -0
  73. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.d.ts +2 -0
  74. package/dist/modules/editor/components/NodeView/ConversationHistoryNodeView.js +10 -0
  75. package/dist/modules/editor/components/NodeView/InformationPaneNodeView.d.ts +2 -0
  76. package/dist/modules/editor/components/NodeView/InformationPaneNodeView.js +10 -0
  77. package/dist/modules/editor/components/NodeView/index.d.ts +3 -1
  78. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.d.ts +8 -0
  79. package/dist/modules/editor/components/Renderer/ConversationHistoryRenderer.js +28 -0
  80. package/dist/modules/editor/components/Renderer/InformationPaneRenderer.d.ts +3 -0
  81. package/dist/modules/editor/components/Renderer/InformationPaneRenderer.js +33 -0
  82. package/dist/modules/editor/components/Renderer/index.d.ts +3 -1
  83. package/dist/modules/editor/hooks/useTipTapEditor.d.ts +6 -2
  84. package/dist/modules/editor/hooks/useTipTapEditor.js +4 -2
  85. package/dist/modules/icons/components/IconFolderAdd.d.ts +7 -0
  86. package/dist/modules/icons/components/IconFolderAdd.js +13 -0
  87. package/dist/modules/icons/components/IconFolderDelete.d.ts +7 -0
  88. package/dist/modules/icons/components/IconFolderDelete.js +12 -0
  89. package/dist/modules/icons/components/IconGlobe2.d.ts +7 -0
  90. package/dist/modules/icons/components/IconGlobe2.js +16 -0
  91. package/dist/modules/icons/components/IconGroupAvatar.d.ts +7 -0
  92. package/dist/modules/icons/components/IconGroupAvatar.js +12 -0
  93. package/dist/modules/icons/components/IconInfoRectangle.d.ts +7 -0
  94. package/dist/modules/icons/components/IconInfoRectangle.js +13 -0
  95. package/dist/modules/icons/components/IconMailRecall.d.ts +7 -0
  96. package/dist/modules/icons/components/IconMailRecall.js +13 -0
  97. package/dist/modules/icons/components/IconQuestionMark.d.ts +7 -0
  98. package/dist/modules/icons/components/IconQuestionMark.js +13 -0
  99. package/dist/modules/icons/components/IconReadMail.d.ts +7 -0
  100. package/dist/modules/icons/components/IconReadMail.js +16 -0
  101. package/dist/modules/icons/components/IconSignature.d.ts +7 -0
  102. package/dist/modules/icons/components/IconSignature.js +13 -0
  103. package/dist/modules/icons/components/IconUndoAll.d.ts +7 -0
  104. package/dist/modules/icons/components/IconUndoAll.js +14 -0
  105. package/dist/modules/icons/components/IconUnreadMail.d.ts +7 -0
  106. package/dist/modules/icons/components/IconUnreadMail.js +16 -0
  107. package/dist/modules/icons/components/index.d.ts +11 -0
  108. package/dist/modules/modals/ConfirmModal/ConfirmModal.d.ts +42 -0
  109. package/dist/modules/modals/ConfirmModal/ConfirmModal.js +36 -0
  110. package/dist/modules/modals/ConfirmModal/index.d.ts +1 -0
  111. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
  112. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
  113. package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -1
  114. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  115. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
  116. package/dist/modules/modals/index.d.ts +1 -0
  117. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.d.ts +8 -0
  118. package/dist/modules/multimedia/WorkspaceFolders/WorkspaceFolders.js +31 -0
  119. package/dist/modules/multimedia/WorkspaceFolders/index.d.ts +1 -0
  120. package/dist/modules/multimedia/index.d.ts +1 -0
  121. package/dist/multimedia.js +3 -1
  122. package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
  123. package/dist/types/index.d.ts +1 -0
  124. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { CreateParameters, CreateResult, ID, IFolder, UpdateParameters, UpdateResult } from '@edifice.io/client';
3
- import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
+ import { UseMutationResult } from '../../../node_modules/@tanstack/react-query';
4
4
  export interface FormInputs {
5
5
  title: string;
6
6
  description: string;
@@ -1,5 +1,5 @@
1
1
  import { UpdateParameters, UpdateResult } from '@edifice.io/client';
2
- import { UseMutationOptions, UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationOptions, UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
3
  declare const useUpdateMutation: ({ application, options, }: {
4
4
  application: string;
5
5
  options?: UseMutationOptions<UpdateResult, Error, UpdateParameters>;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ID, PutShareResponse, RightStringified, ShareRight } from '@edifice.io/client';
3
- import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
+ import { UseMutationResult } from '../../../node_modules/@tanstack/react-query';
4
4
  export type ShareOptions = {
5
5
  resourceId: ID;
6
6
  resourceRights: RightStringified[];
@@ -1,5 +1,5 @@
1
1
  import { ID, UpdateParameters, UpdateResult } from '@edifice.io/client';
2
- import { UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
3
  export type PublicationType = 'RESTRAINT' | 'IMMEDIATE' | undefined;
4
4
  export interface ShareBlogProps {
5
5
  resourceId: ID;
@@ -1,5 +1,5 @@
1
1
  import { PutShareResponse, ShareRight } from '@edifice.io/client';
2
- import { UseMutationOptions, UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationOptions, UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
3
  declare const useShareMutation: ({ application, options, }: {
4
4
  application: string;
5
5
  options?: UseMutationOptions<PutShareResponse, Error, {
@@ -1,3 +1,4 @@
1
+ export * from './ConfirmModal';
1
2
  export * from './OnboardingModal';
2
3
  export * from './PublishModal';
3
4
  export * from './ResourceModal';
@@ -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,31 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { useTranslation } from "react-i18next";
4
+ import useWorkspaceFolders, { WORKSPACE_OWNER_FOLDER_ID, WORKSPACE_SHARED_FOLDER_ID } from "../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";
5
+ import SearchBar from "../../../components/SearchBar/SearchBar.js";
6
+ import Tree from "../../../components/Tree/components/Tree.js";
7
+ function WorkspaceFolders({
8
+ onFolderSelected
9
+ }) {
10
+ const {
11
+ t
12
+ } = useTranslation(), {
13
+ folderTree,
14
+ setSearchQuery
15
+ } = useWorkspaceFolders(), [shouldExpandAllNodes, setShouldExpandAllNodes] = useState(!1), [searchValue, setSearchValue] = useState(""), handleSearchChange = (e) => {
16
+ setSearchValue(e.target.value);
17
+ }, handleSearchSubmit = () => {
18
+ setSearchQuery(searchValue), setShouldExpandAllNodes(searchValue !== "");
19
+ }, handleFolderSelected = (folderId) => {
20
+ const selectedFolderId = folderId === WORKSPACE_OWNER_FOLDER_ID ? "" : folderId, canCopyFileInto = folderId != WORKSPACE_SHARED_FOLDER_ID;
21
+ onFolderSelected(selectedFolderId, canCopyFileInto);
22
+ };
23
+ return /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column gap-12", children: [
24
+ /* @__PURE__ */ jsx("p", { children: t("attachments.add.to.folder.modal.description") }),
25
+ /* @__PURE__ */ jsx(SearchBar, { onChange: handleSearchChange, isVariant: !1, placeholder: t("search"), onClick: handleSearchSubmit }),
26
+ /* @__PURE__ */ jsx("div", { className: "border border-gray-400 rounded", children: /* @__PURE__ */ jsx("div", { className: "p-12", children: /* @__PURE__ */ jsx(Tree, { nodes: folderTree, onTreeItemClick: handleFolderSelected, shouldExpandAllNodes }) }) })
27
+ ] });
28
+ }
29
+ export {
30
+ WorkspaceFolders as default
31
+ };
@@ -0,0 +1 @@
1
+ export { default as WorkspaceFolders } from './WorkspaceFolders';
@@ -7,3 +7,4 @@ export * from './MediaLibrary';
7
7
  export * from './VideoEmbed';
8
8
  export * from './VideoRecorder';
9
9
  export * from './Workspace';
10
+ export * from './WorkspaceFolders';
@@ -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
  };
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { App, IGetConf, IGetSession, IUserDescription, IUserInfo, IWebApp, UserProfile } from '@edifice.io/client';
3
- import { UseQueryResult } from '../../../node_modules/@tanstack/react-query';
3
+ import { UseQueryResult } from '../../node_modules/@tanstack/react-query';
4
4
  export interface EdificeClientParams {
5
5
  alternativeApp?: boolean;
6
6
  app: App;
@@ -1,3 +1,4 @@
1
1
  export { type Size } from './size';
2
2
  export { type Status } from './status';
3
3
  export { type TreeData } from './treedata';
4
+ export { type Color } from './color';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.2.2",
3
+ "version": "2.2.3-develop-b2school.20250415115428",
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.2",
122
- "@edifice.io/tiptap-extensions": "2.2.2",
123
- "@edifice.io/utilities": "2.2.2"
121
+ "@edifice.io/bootstrap": "2.2.3-develop-b2school.20250415115428",
122
+ "@edifice.io/tiptap-extensions": "2.2.3-develop-b2school.20250415115428",
123
+ "@edifice.io/utilities": "2.2.3-develop-b2school.20250415115428"
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.2",
155
- "@edifice.io/config": "2.2.2"
154
+ "@edifice.io/client": "2.2.3-develop-b2school.20250415115428",
155
+ "@edifice.io/config": "2.2.3-develop-b2school.20250415115428"
156
156
  },
157
157
  "peerDependencies": {
158
158
  "@react-spring/web": "^9.7.5",