@edifice.io/react 2.2.2 → 2.2.3

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 (70) 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/Dropdown/Dropdown.d.ts +6 -2
  10. package/dist/components/Dropdown/Dropdown.js +2 -0
  11. package/dist/components/Dropdown/DropdownItem.d.ts +5 -1
  12. package/dist/components/Dropdown/DropdownItem.js +7 -2
  13. package/dist/components/Dropdown/DropdownTrigger.d.ts +31 -2
  14. package/dist/components/Dropdown/DropdownTrigger.js +23 -3
  15. package/dist/components/PreventPropagation/PreventPropagation.d.ts +10 -0
  16. package/dist/components/PreventPropagation/PreventPropagation.js +9 -0
  17. package/dist/components/PreventPropagation/index.d.ts +2 -0
  18. package/dist/components/StackedGroup/StackedGroup.d.ts +23 -0
  19. package/dist/components/StackedGroup/StackedGroup.js +21 -0
  20. package/dist/components/StackedGroup/index.d.ts +1 -0
  21. package/dist/components/Switch/Switch.d.ts +29 -0
  22. package/dist/components/Switch/Switch.js +27 -0
  23. package/dist/components/Switch/index.d.ts +2 -0
  24. package/dist/components/index.d.ts +4 -0
  25. package/dist/editor.js +16 -12
  26. package/dist/hooks/useConf/useConf.d.ts +1 -1
  27. package/dist/hooks/useSession/useSession.d.ts +1 -1
  28. package/dist/icons.js +178 -176
  29. package/dist/index.js +154 -146
  30. package/dist/modules/comments/components/Comment.js +49 -34
  31. package/dist/modules/comments/components/CommentDeleted.d.ts +1 -0
  32. package/dist/modules/comments/components/CommentDeleted.js +11 -0
  33. package/dist/modules/comments/components/CommentForm.d.ts +2 -1
  34. package/dist/modules/comments/components/CommentForm.js +12 -8
  35. package/dist/modules/comments/components/CommentList.js +3 -3
  36. package/dist/modules/comments/components/CommentReplies.d.ts +4 -0
  37. package/dist/modules/comments/components/CommentReplies.js +33 -0
  38. package/dist/modules/comments/constants.d.ts +4 -0
  39. package/dist/modules/comments/constants.js +2 -1
  40. package/dist/modules/comments/context/Context.d.ts +6 -4
  41. package/dist/modules/comments/hooks/useCommentReplies.d.ts +12 -0
  42. package/dist/modules/comments/hooks/useCommentReplies.js +36 -0
  43. package/dist/modules/comments/hooks/useComments.d.ts +7 -7
  44. package/dist/modules/comments/hooks/useComments.js +24 -19
  45. package/dist/modules/comments/hooks/useCommentsContext.d.ts +6 -4
  46. package/dist/modules/comments/provider/CommentProvider.js +16 -13
  47. package/dist/modules/comments/types.d.ts +14 -1
  48. package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.d.ts +6 -0
  49. package/dist/modules/editor/components/BubbleMenuEditInformationPane/BubbleMenuEditInformationPane.js +136 -0
  50. package/dist/modules/editor/components/BubbleMenuEditInformationPane/index.d.ts +1 -0
  51. package/dist/modules/editor/components/Editor/Editor.js +6 -2
  52. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +12 -0
  53. package/dist/modules/editor/components/NodeView/InformationPaneNodeView.d.ts +2 -0
  54. package/dist/modules/editor/components/NodeView/InformationPaneNodeView.js +10 -0
  55. package/dist/modules/editor/components/NodeView/index.d.ts +1 -0
  56. package/dist/modules/editor/components/Renderer/InformationPaneRenderer.d.ts +3 -0
  57. package/dist/modules/editor/components/Renderer/InformationPaneRenderer.js +33 -0
  58. package/dist/modules/editor/components/Renderer/index.d.ts +1 -0
  59. package/dist/modules/editor/hooks/useTipTapEditor.js +3 -1
  60. package/dist/modules/icons/components/IconInfoRectangle.d.ts +7 -0
  61. package/dist/modules/icons/components/IconInfoRectangle.js +13 -0
  62. package/dist/modules/icons/components/index.d.ts +1 -0
  63. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
  64. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
  65. package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -1
  66. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  67. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
  68. package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
  69. package/dist/types/index.d.ts +1 -0
  70. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -4,80 +4,84 @@ import { default as default4 } from "./components/AppHeader/AppHeader.js";
4
4
  import { default as default5 } from "./components/AppIcon/AppIcon.js";
5
5
  import { default as default6 } from "./components/Attachment/Attachment.js";
6
6
  import { default as default7 } from "./components/Avatar/Avatar.js";
7
- import { default as default8 } from "./components/Badge/Badge.js";
8
- import { default as default9 } from "./components/Breadcrumb/Breadcrumb.js";
9
- import { default as default10 } from "./components/Button/Button.js";
10
- import { default as default11 } from "./components/Button/IconButton.js";
11
- import { default as default12 } from "./components/Button/SearchButton.js";
12
- import { default as default13 } from "./components/Card/Card.js";
13
- import { default as default14 } from "./components/Checkbox/Checkbox.js";
14
- import { default as default15 } from "./components/ColorPicker/ColorPicker.js";
15
- import { default as default16 } from "./components/ColorPicker/ColorPickerItem.js";
16
- import { default as default17 } from "./components/Combobox/Combobox.js";
17
- import { default as default18 } from "./components/Dropdown/Dropdown.js";
18
- import { default as default19 } from "./components/Dropzone/Dropzone.js";
19
- import { default as default20 } from "./components/EmptyScreen/EmptyScreen.js";
20
- import { default as default21 } from "./components/Form/FormText.js";
21
- import { default as default22 } from "./components/Form/FormControl.js";
22
- import { default as default23 } from "./components/Heading/Heading.js";
23
- import { default as default24 } from "./components/Image/Image.js";
24
- import { default as default25 } from "./components/Input/Input.js";
25
- import { default as default26 } from "./components/Label/Label.js";
26
- import { default as default27 } from "./components/Loading/Loading.js";
27
- import { default as default28 } from "./components/LoadingScreen/LoadingScreen.js";
28
- import { default as default29 } from "./components/Logo/Logo.js";
29
- import { default as default30 } from "./components/Modal/Modal.js";
30
- import { default as default31 } from "./components/Radio/Radio.js";
31
- import { default as default32 } from "./components/SearchBar/SearchBar.js";
32
- import { default as default33 } from "./components/Select/Select.js";
33
- import { default as default34 } from "./components/Table/components/Table.js";
34
- import { default as default35 } from "./components/TextArea/TextArea.js";
35
- import { default as default36 } from "./components/Tooltip/Tooltip.js";
7
+ import { default as default8 } from "./components/AvatarGroup/AvatarGroup.js";
8
+ import { default as default9 } from "./components/Badge/Badge.js";
9
+ import { default as default10 } from "./components/Breadcrumb/Breadcrumb.js";
10
+ import { default as default11 } from "./components/Button/Button.js";
11
+ import { default as default12 } from "./components/Button/IconButton.js";
12
+ import { default as default13 } from "./components/Button/SearchButton.js";
13
+ import { default as default14 } from "./components/Card/Card.js";
14
+ import { default as default15 } from "./components/Checkbox/Checkbox.js";
15
+ import { default as default16 } from "./components/ColorPicker/ColorPicker.js";
16
+ import { default as default17 } from "./components/ColorPicker/ColorPickerItem.js";
17
+ import { default as default18 } from "./components/Combobox/Combobox.js";
18
+ import { default as default19 } from "./components/Dropdown/Dropdown.js";
19
+ import { default as default20 } from "./components/Dropzone/Dropzone.js";
20
+ import { default as default21 } from "./components/EmptyScreen/EmptyScreen.js";
21
+ import { default as default22 } from "./components/Form/FormText.js";
22
+ import { default as default23 } from "./components/Form/FormControl.js";
23
+ import { default as default24 } from "./components/Heading/Heading.js";
24
+ import { default as default25 } from "./components/Image/Image.js";
25
+ import { default as default26 } from "./components/Input/Input.js";
26
+ import { default as default27 } from "./components/Label/Label.js";
27
+ import { default as default28 } from "./components/Loading/Loading.js";
28
+ import { default as default29 } from "./components/LoadingScreen/LoadingScreen.js";
29
+ import { default as default30 } from "./components/Logo/Logo.js";
30
+ import { default as default31 } from "./components/Modal/Modal.js";
31
+ import { default as default32 } from "./components/PreventPropagation/PreventPropagation.js";
32
+ import { default as default33 } from "./components/Radio/Radio.js";
33
+ import { default as default34 } from "./components/SearchBar/SearchBar.js";
34
+ import { default as default35 } from "./components/Select/Select.js";
35
+ import { default as default36 } from "./components/StackedGroup/StackedGroup.js";
36
+ import { default as default37 } from "./components/Switch/Switch.js";
37
+ import { default as default38 } from "./components/Table/components/Table.js";
38
+ import { default as default39 } from "./components/TextArea/TextArea.js";
39
+ import { default as default40 } from "./components/Tooltip/Tooltip.js";
36
40
  import { DndTree } from "./components/Tree/components/DndTree.js";
37
- import { default as default37 } from "./components/Tree/components/SortableTree.js";
38
- import { default as default38 } from "./components/Tree/components/Tree.js";
39
- import { default as default39 } from "./components/TreeView/TreeView.js";
40
- import { default as default40 } from "./components/VisuallyHidden/VisuallyHidden.js";
41
- import { default as default41 } from "./hooks/useBookmark/useBookmark.js";
42
- import { default as default42 } from "./hooks/useBreakpoint/useBreakpoint.js";
43
- import { default as default43 } from "./hooks/useBrowserInfo/useBrowserInfo.js";
44
- import { default as default44 } from "./hooks/useCantoo/useCantoo.js";
45
- import { default as default45 } from "./hooks/useClickOutside/useClickOutside.js";
46
- import { default as default46 } from "./hooks/useConversation/useConversation.js";
47
- import { default as default47 } from "./hooks/useDate/useDate.js";
48
- import { default as default48 } from "./hooks/useDebounce/useDebounce.js";
49
- import { default as default49 } from "./hooks/useDirectory/useDirectory.js";
50
- import { default as default50 } from "./hooks/useDropdown/useDropdown.js";
51
- import { default as default51 } from "./hooks/useDropzone/useDropzone.js";
52
- import { default as default52 } from "./hooks/useEdificeIcons/useEdificeIcons.js";
53
- import { default as default53 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
54
- import { default as default54 } from "./hooks/useHover/useHover.js";
55
- import { default as default55 } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
56
- import { default as default56 } from "./hooks/useImage/useImage.js";
57
- import { default as default57 } from "./hooks/useIsAdml/useIsAdml.js";
58
- import { default as default58 } from "./hooks/useKeyPress/useKeyPress.js";
59
- import { default as default59 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
60
- import { default as default60 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
61
- import { default as default61 } from "./hooks/useScrollToTop/useScrollToTop.js";
62
- import { default as default62 } from "./hooks/useTitle/useTitle.js";
63
- import { default as default63 } from "./hooks/useToast/useToast.js";
64
- import { default as default64 } from "./hooks/useToggle/useToggle.js";
65
- import { default as default65 } from "./hooks/useTrapFocus/useTrapFocus.js";
66
- import { default as default66 } from "./hooks/useTrashedResource/useTrashedResource.js";
67
- import { default as default67 } from "./hooks/useUpload/useUpload.js";
68
- import { default as default68 } from "./hooks/useUploadFiles/useUploadFiles.js";
69
- import { default as default69 } from "./hooks/useUser/useUser.js";
70
- import { default as default70 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
71
- import { default as default71 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
72
- import { default as default72 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
73
- import { default as default73 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
74
- import { default as default74 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
75
- import { default as default75 } from "./modules/modals/PublishModal/PublishModal.js";
76
- import { default as default76 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
77
- import { default as default77 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
78
- import { default as default78 } from "./modules/modals/ShareModal/ShareModal.js";
79
- import { default as default79 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
80
- import { default as default80 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
41
+ import { default as default41 } from "./components/Tree/components/SortableTree.js";
42
+ import { default as default42 } from "./components/Tree/components/Tree.js";
43
+ import { default as default43 } from "./components/TreeView/TreeView.js";
44
+ import { default as default44 } from "./components/VisuallyHidden/VisuallyHidden.js";
45
+ import { default as default45 } from "./hooks/useBookmark/useBookmark.js";
46
+ import { default as default46 } from "./hooks/useBreakpoint/useBreakpoint.js";
47
+ import { default as default47 } from "./hooks/useBrowserInfo/useBrowserInfo.js";
48
+ import { default as default48 } from "./hooks/useCantoo/useCantoo.js";
49
+ import { default as default49 } from "./hooks/useClickOutside/useClickOutside.js";
50
+ import { default as default50 } from "./hooks/useConversation/useConversation.js";
51
+ import { default as default51 } from "./hooks/useDate/useDate.js";
52
+ import { default as default52 } from "./hooks/useDebounce/useDebounce.js";
53
+ import { default as default53 } from "./hooks/useDirectory/useDirectory.js";
54
+ import { default as default54 } from "./hooks/useDropdown/useDropdown.js";
55
+ import { default as default55 } from "./hooks/useDropzone/useDropzone.js";
56
+ import { default as default56 } from "./hooks/useEdificeIcons/useEdificeIcons.js";
57
+ import { default as default57 } from "./hooks/useHasWorkflow/useHasWorkflow.js";
58
+ import { default as default58 } from "./hooks/useHover/useHover.js";
59
+ import { default as default59 } from "./hooks/useHttpErrorToast/useHttpErrorToast.js";
60
+ import { default as default60 } from "./hooks/useImage/useImage.js";
61
+ import { default as default61 } from "./hooks/useIsAdml/useIsAdml.js";
62
+ import { default as default62 } from "./hooks/useKeyPress/useKeyPress.js";
63
+ import { default as default63 } from "./hooks/useLibraryUrl/useLibraryUrl.js";
64
+ import { default as default64 } from "./hooks/useMediaLibrary/useMediaLibrary.js";
65
+ import { default as default65 } from "./hooks/useScrollToTop/useScrollToTop.js";
66
+ import { default as default66 } from "./hooks/useTitle/useTitle.js";
67
+ import { default as default67 } from "./hooks/useToast/useToast.js";
68
+ import { default as default68 } from "./hooks/useToggle/useToggle.js";
69
+ import { default as default69 } from "./hooks/useTrapFocus/useTrapFocus.js";
70
+ import { default as default70 } from "./hooks/useTrashedResource/useTrashedResource.js";
71
+ import { default as default71 } from "./hooks/useUpload/useUpload.js";
72
+ import { default as default72 } from "./hooks/useUploadFiles/useUploadFiles.js";
73
+ import { default as default73 } from "./hooks/useUser/useUser.js";
74
+ import { default as default74 } from "./hooks/useWorkspaceFile/useWorkspaceFile.js";
75
+ import { default as default75 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
76
+ import { default as default76 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
77
+ import { default as default77 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
78
+ import { default as default78 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
79
+ import { default as default79 } from "./modules/modals/PublishModal/PublishModal.js";
80
+ import { default as default80 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
81
+ import { default as default81 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
82
+ import { default as default82 } from "./modules/modals/ShareModal/ShareModal.js";
83
+ import { default as default83 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
84
+ import { default as default84 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
81
85
  import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
82
86
  import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
83
87
  import { Column, Grid } from "./components/Grid/Grid.js";
@@ -112,66 +116,70 @@ export {
112
116
  default5 as AppIcon,
113
117
  default6 as Attachment,
114
118
  default7 as Avatar,
115
- default8 as Badge,
116
- default76 as BlogPublic,
117
- default9 as Breadcrumb,
118
- default10 as Button,
119
- default13 as Card,
120
- default14 as Checkbox,
121
- default15 as ColorPicker,
122
- default16 as ColorPickerItem,
119
+ default8 as AvatarGroup,
120
+ default9 as Badge,
121
+ default80 as BlogPublic,
122
+ default10 as Breadcrumb,
123
+ default11 as Button,
124
+ default14 as Card,
125
+ default15 as Checkbox,
126
+ default16 as ColorPicker,
127
+ default17 as ColorPickerItem,
123
128
  Column,
124
- default17 as Combobox,
129
+ default18 as Combobox,
125
130
  DefaultPalette,
126
131
  DndTree,
127
- default18 as Dropdown,
128
- default19 as Dropzone,
132
+ default19 as Dropdown,
133
+ default20 as Dropzone,
129
134
  DropzoneContext,
130
135
  EdificeClientContext,
131
136
  EdificeClientProvider,
132
137
  EdificeThemeContext,
133
138
  EdificeThemeProvider,
134
- default20 as EmptyScreen,
135
- default22 as FormControl,
136
- default21 as FormText,
139
+ default21 as EmptyScreen,
140
+ default23 as FormControl,
141
+ default22 as FormText,
137
142
  Grid,
138
- default23 as Heading,
139
- default11 as IconButton,
140
- default24 as Image,
141
- default25 as Input,
142
- default26 as Label,
143
+ default24 as Heading,
144
+ default12 as IconButton,
145
+ default25 as Image,
146
+ default26 as Input,
147
+ default27 as Label,
143
148
  Layout,
144
149
  List,
145
- default27 as Loading,
146
- default28 as LoadingScreen,
147
- default29 as Logo,
150
+ default28 as Loading,
151
+ default29 as LoadingScreen,
152
+ default30 as Logo,
148
153
  Menu,
149
154
  MockedProvider,
150
- default30 as Modal,
151
- default74 as OnboardingModal,
155
+ default31 as Modal,
156
+ default78 as OnboardingModal,
152
157
  Popover,
153
158
  PopoverBody,
154
159
  PopoverFooter,
155
160
  PopoverHeader,
156
- default75 as PublishModal,
157
- default31 as Radio,
161
+ default32 as PreventPropagation,
162
+ default79 as PublishModal,
163
+ default33 as Radio,
158
164
  ResourceModal,
159
- default32 as SearchBar,
160
- default12 as SearchButton,
161
- default33 as Select,
162
- default79 as ShareBlog,
163
- default78 as ShareModal,
164
- default37 as SortableTree,
165
- default34 as Table,
165
+ default34 as SearchBar,
166
+ default13 as SearchButton,
167
+ default35 as Select,
168
+ default83 as ShareBlog,
169
+ default82 as ShareModal,
170
+ default41 as SortableTree,
171
+ default36 as StackedGroup,
172
+ default37 as Switch,
173
+ default38 as Table,
166
174
  Tabs,
167
- default35 as TextArea,
175
+ default39 as TextArea,
168
176
  Toolbar,
169
- default36 as Tooltip,
170
- default38 as Tree,
177
+ default40 as Tooltip,
178
+ default42 as Tree,
171
179
  TreeNode,
172
180
  TreeNodeFolderWrapper,
173
- default39 as TreeView,
174
- default40 as VisuallyHidden,
181
+ default43 as TreeView,
182
+ default44 as VisuallyHidden,
175
183
  addNode,
176
184
  arrayUnique,
177
185
  buildTree,
@@ -199,46 +207,46 @@ export {
199
207
  setRef,
200
208
  updateNode,
201
209
  updateParentIds,
202
- default41 as useBookmark,
203
- default42 as useBreakpoint,
204
- default43 as useBrowserInfo,
205
- default44 as useCantoo,
210
+ default45 as useBookmark,
211
+ default46 as useBreakpoint,
212
+ default47 as useBrowserInfo,
213
+ default48 as useCantoo,
206
214
  useCheckable,
207
- default45 as useClickOutside,
208
- default46 as useConversation,
209
- default47 as useDate,
210
- default48 as useDebounce,
211
- default49 as useDirectory,
212
- default50 as useDropdown,
213
- default51 as useDropzone,
215
+ default49 as useClickOutside,
216
+ default50 as useConversation,
217
+ default51 as useDate,
218
+ default52 as useDebounce,
219
+ default53 as useDirectory,
220
+ default54 as useDropdown,
221
+ default55 as useDropzone,
214
222
  useDropzoneContext,
215
223
  useEdificeClient,
216
- default52 as useEdificeIcons,
224
+ default56 as useEdificeIcons,
217
225
  useEdificeTheme,
218
- default53 as useHasWorkflow,
219
- default54 as useHover,
220
- default55 as useHttpErrorToast,
221
- default56 as useImage,
222
- default57 as useIsAdml,
223
- default58 as useKeyPress,
224
- default59 as useLibraryUrl,
225
- default60 as useMediaLibrary,
226
- default61 as useScrollToTop,
227
- default80 as useShareMutation,
228
- default62 as useTitle,
229
- default63 as useToast,
230
- default64 as useToggle,
231
- default65 as useTrapFocus,
232
- default66 as useTrashedResource,
226
+ default57 as useHasWorkflow,
227
+ default58 as useHover,
228
+ default59 as useHttpErrorToast,
229
+ default60 as useImage,
230
+ default61 as useIsAdml,
231
+ default62 as useKeyPress,
232
+ default63 as useLibraryUrl,
233
+ default64 as useMediaLibrary,
234
+ default65 as useScrollToTop,
235
+ default84 as useShareMutation,
236
+ default66 as useTitle,
237
+ default67 as useToast,
238
+ default68 as useToggle,
239
+ default69 as useTrapFocus,
240
+ default70 as useTrashedResource,
233
241
  useTreeSortable,
234
242
  useTreeView,
235
- default77 as useUpdateMutation,
236
- default67 as useUpload,
237
- default68 as useUploadFiles,
238
- default69 as useUser,
239
- default70 as useWorkspaceFile,
240
- default71 as useWorkspaceSearch,
241
- default72 as useXitiTrackPageLoad,
242
- default73 as useZendeskGuide,
243
+ default81 as useUpdateMutation,
244
+ default71 as useUpload,
245
+ default72 as useUploadFiles,
246
+ default73 as useUser,
247
+ default74 as useWorkspaceFile,
248
+ default75 as useWorkspaceSearch,
249
+ default76 as useXitiTrackPageLoad,
250
+ default77 as useZendeskGuide,
243
251
  wrapTreeNode
244
252
  };
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState, Suspense, lazy } from "react";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import SvgIconSave from "../../icons/components/IconSave.js";
@@ -9,6 +9,8 @@ import { CommentAvatar } from "./CommentAvatar.js";
9
9
  import { CommentDate } from "./CommentDate.js";
10
10
  import { CommentTitle } from "./CommentTitle.js";
11
11
  import { TextCounter } from "./TextCounter.js";
12
+ import { CommentDeleted } from "./CommentDeleted.js";
13
+ import { CommentReplies } from "./CommentReplies.js";
12
14
  import Button from "../../../components/Button/Button.js";
13
15
  import LoadingScreen from "../../../components/LoadingScreen/LoadingScreen.js";
14
16
  const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comment = ({
@@ -22,10 +24,12 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
22
24
  authorName,
23
25
  createdAt,
24
26
  updatedAt,
25
- comment: content
27
+ comment: content,
28
+ replyTo
26
29
  } = comment, [ref, onFocus, resizeTextarea] = useAutosizeTextarea(!0), [isDeleteModalOpen, setIsDeleteModalOpen] = useState(!1), {
27
30
  t
28
31
  } = useTranslation(), {
32
+ defaultComments,
29
33
  editCommentId,
30
34
  options,
31
35
  type,
@@ -33,42 +37,53 @@ const DeleteModal = /* @__PURE__ */ lazy(() => import("./DeleteModal.js")), Comm
33
37
  handleDeleteComment: onDeleteComment,
34
38
  handleModifyComment,
35
39
  handleReset,
36
- handleUpdateComment
37
- } = useCommentsContext(), isEditing = editCommentId === comment.id, handleChangeContent = (event) => {
40
+ handleUpdateComment,
41
+ handleReplyToComment
42
+ } = useCommentsContext(), replies = (defaultComments == null ? void 0 : defaultComments.filter((comm) => comm.replyTo === comment.id)) ?? [], hasReplies = replies.length > 0, hasAllDeletedReplies = replies.every((reply) => reply.deleted), isEditing = editCommentId === comment.id, handleChangeContent = (event) => {
38
43
  resizeTextarea(), setValue(event.target.value);
39
44
  };
40
- return /* @__PURE__ */ jsxs("div", { className: `${isEditing ? "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16" : "border rounded-3 p-12 pb-8 d-flex gap-12 mt-16"}`, children: [
41
- /* @__PURE__ */ jsx(CommentAvatar, { id: authorId }),
42
- /* @__PURE__ */ jsxs("div", { className: "flex flex-fill", children: [
43
- /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center gap-12", children: [
44
- /* @__PURE__ */ jsx(CommentTitle, { children: authorName }),
45
- /* @__PURE__ */ jsx(BadgeProfile, { profile }),
46
- /* @__PURE__ */ jsx(CommentDate, { createdAt, updatedAt })
47
- ] }),
48
- isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
49
- /* @__PURE__ */ jsx("div", { className: "mt-8 mb-4", children: /* @__PURE__ */ jsx("textarea", { id: "update-comment", ref, value, className: "form-control", placeholder: t("comment.placeholder"), maxLength: options.maxCommentLength, onChange: handleChangeContent, rows: 1, style: {
50
- resize: "none",
51
- overflow: "hidden"
52
- }, onFocus }) }),
53
- /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
54
- /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: handleReset, children: t("comment.cancel") }),
55
- /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end align-items-center gap-4", children: [
56
- /* @__PURE__ */ jsx(TextCounter, { content: value, maxLength: options.maxCommentLength }),
57
- /* @__PURE__ */ jsx(Button, { type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSave, {}), disabled: !(content != null && content.length), onClick: () => handleUpdateComment(value), children: t("comment.save") })
45
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
46
+ comment.deleted && hasReplies && !hasAllDeletedReplies && /* @__PURE__ */ jsxs(Fragment, { children: [
47
+ /* @__PURE__ */ jsx(CommentDeleted, {}),
48
+ /* @__PURE__ */ jsx(CommentReplies, { parentComment: comment })
49
+ ] }),
50
+ !comment.deleted && /* @__PURE__ */ jsxs(Fragment, { children: [
51
+ /* @__PURE__ */ jsxs("div", { className: `${isEditing ? "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200 my-16" : "border rounded-3 p-12 pb-8 d-flex gap-12 mt-16"}`, children: [
52
+ /* @__PURE__ */ jsx(CommentAvatar, { id: authorId }),
53
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-fill", children: [
54
+ /* @__PURE__ */ jsxs("div", { className: "d-flex align-items-center gap-12", children: [
55
+ /* @__PURE__ */ jsx(CommentTitle, { children: authorName }),
56
+ /* @__PURE__ */ jsx(BadgeProfile, { profile }),
57
+ /* @__PURE__ */ jsx(CommentDate, { createdAt, updatedAt })
58
+ ] }),
59
+ isEditing ? /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsx("div", { className: "mt-8 mb-4", children: /* @__PURE__ */ jsx("textarea", { id: "update-comment", ref, value, className: "form-control", placeholder: t("comment.placeholder"), maxLength: options.maxCommentLength, onChange: handleChangeContent, rows: 1, style: {
61
+ resize: "none",
62
+ overflow: "hidden"
63
+ }, onFocus }) }),
64
+ /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-between align-items-center", children: [
65
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: handleReset, children: t("comment.cancel") }),
66
+ /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end align-items-center gap-4", children: [
67
+ /* @__PURE__ */ jsx(TextCounter, { content: value, maxLength: options.maxCommentLength }),
68
+ /* @__PURE__ */ jsx(Button, { type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSave, {}), disabled: !(content != null && content.length), onClick: () => handleUpdateComment(value), children: t("comment.save") })
69
+ ] })
70
+ ] })
71
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
72
+ /* @__PURE__ */ jsx("div", { className: "mt-8 mb-4", children: content }),
73
+ type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
74
+ !replyTo && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => handleReplyToComment(comment.id), children: t("comment.reply") }),
75
+ userId === authorId && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
76
+ handleModifyComment(comment.id), setValue(content);
77
+ }, children: t("comment.edit") }),
78
+ (userId === authorId || (userRights == null ? void 0 : userRights.manager)) && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => setIsDeleteModalOpen(!0), children: t("comment.remove") })
79
+ ] })
58
80
  ] })
59
81
  ] })
60
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
61
- /* @__PURE__ */ jsx("div", { className: "mt-8 mb-4", children: content }),
62
- type === "edit" && /* @__PURE__ */ jsxs("div", { className: "ms-n8", children: [
63
- userId === authorId && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => {
64
- handleModifyComment(comment.id), setValue(content);
65
- }, children: t("comment.edit") }),
66
- (userId === authorId || (userRights == null ? void 0 : userRights.manager)) && /* @__PURE__ */ jsx(Button, { variant: "ghost", color: "tertiary", size: "sm", onClick: () => setIsDeleteModalOpen(!0), children: t("comment.remove") })
67
- ] })
68
- ] })
69
- ] }),
70
- /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, { position: !1 }), children: isDeleteModalOpen && /* @__PURE__ */ jsx(DeleteModal, { isOpen: isDeleteModalOpen, onCancel: () => setIsDeleteModalOpen(!1), onSuccess: () => onDeleteComment(id) }) })
71
- ] }, id);
82
+ ] }, id),
83
+ /* @__PURE__ */ jsx(CommentReplies, { parentComment: comment }),
84
+ /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingScreen, { position: !1 }), children: isDeleteModalOpen && /* @__PURE__ */ jsx(DeleteModal, { isOpen: isDeleteModalOpen, onCancel: () => setIsDeleteModalOpen(!1), onSuccess: () => onDeleteComment(id) }) })
85
+ ] })
86
+ ] });
72
87
  };
73
88
  export {
74
89
  Comment
@@ -0,0 +1 @@
1
+ export declare const CommentDeleted: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
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,3 +1,4 @@
1
- export declare const CommentForm: ({ userId }: {
1
+ export declare const CommentForm: ({ userId, replyTo, }: {
2
2
  userId: string;
3
+ replyTo?: string;
3
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -5,19 +5,23 @@ import { useAutosizeTextarea } from "../hooks/useAutosizeTextarea.js";
5
5
  import { useCommentsContext } from "../hooks/useCommentsContext.js";
6
6
  import { CommentAvatar } from "./CommentAvatar.js";
7
7
  import { TextCounter } from "./TextCounter.js";
8
+ import { useState } from "react";
8
9
  import Button from "../../../components/Button/Button.js";
9
10
  const CommentForm = ({
10
- userId
11
+ userId,
12
+ replyTo
11
13
  }) => {
12
- const {
13
- t
14
- } = useTranslation(), {
15
- content,
16
- handleChangeContent,
14
+ const [content, setContent] = useState(""), {
17
15
  handleCreateComment,
18
16
  options,
19
17
  type
20
- } = useCommentsContext(), [ref, onFocus] = useAutosizeTextarea();
18
+ } = useCommentsContext(), [ref, onFocus] = useAutosizeTextarea(), {
19
+ t
20
+ } = useTranslation(), handleChangeContent = (event) => {
21
+ setContent(event.target.value);
22
+ }, handleSubmit = () => {
23
+ handleCreateComment(content, replyTo), setContent("");
24
+ };
21
25
  return /* @__PURE__ */ jsx(Fragment, { children: type === "edit" && /* @__PURE__ */ jsxs("div", { className: "border rounded-3 p-12 pb-8 d-flex gap-12 bg-gray-200", children: [
22
26
  /* @__PURE__ */ jsx(CommentAvatar, { id: userId }),
23
27
  /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column flex-fill gap-4", children: [
@@ -27,7 +31,7 @@ const CommentForm = ({
27
31
  } }),
28
32
  /* @__PURE__ */ jsxs("div", { className: "d-flex justify-content-end align-items-center gap-4", children: [
29
33
  /* @__PURE__ */ jsx(TextCounter, { content, maxLength: options.maxCommentLength }),
30
- /* @__PURE__ */ jsx(Button, { type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSend, {}), disabled: !(content != null && content.length), onClick: () => handleCreateComment(content), children: t("comment.post") })
34
+ /* @__PURE__ */ jsx(Button, { type: "submit", variant: "ghost", size: "sm", leftIcon: /* @__PURE__ */ jsx(SvgIconSend, {}), disabled: !(content != null && content.length), onClick: handleSubmit, children: t("comment.post") })
31
35
  ] })
32
36
  ] })
33
37
  ] }) });
@@ -6,15 +6,15 @@ function CommentList() {
6
6
  const {
7
7
  user
8
8
  } = useEdificeClient(), {
9
- comments,
9
+ displayedComments,
10
10
  profiles
11
11
  } = useCommentsContext();
12
- return comments == null ? void 0 : comments.map((comment) => {
12
+ return displayedComments == null ? void 0 : displayedComments.map((comment) => {
13
13
  var _a;
14
14
  const {
15
15
  authorId
16
16
  } = comment, profile = ((_a = profiles == null ? void 0 : profiles.find((user2) => (user2 == null ? void 0 : user2.userId) === authorId)) == null ? void 0 : _a.profile) ?? "Guest";
17
- return /* @__PURE__ */ jsx(Comment, { comment, profile, userId: user == null ? void 0 : user.userId }, comment.id);
17
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Comment, { comment, profile, userId: user == null ? void 0 : user.userId }) }, comment.id);
18
18
  });
19
19
  }
20
20
  export {
@@ -0,0 +1,4 @@
1
+ import { CommentProps } from '../types';
2
+ export declare const CommentReplies: ({ parentComment, }: {
3
+ parentComment: CommentProps;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
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
+ };
@@ -18,3 +18,7 @@ export declare const DEFAULT_ADD_COMMENTS = 5;
18
18
  * Limit to display replies of a comment
19
19
  */
20
20
  export declare const DEFAULT_MAX_REPLIES = 5;
21
+ /**
22
+ * Number of comments to add when adding more comment in the limited list
23
+ */
24
+ export declare const DEFAULT_ADD_REPLIES = 5;
@@ -1,6 +1,7 @@
1
- const DEFAULT_MAX_COMMENT_LENGTH = 200, DEFAULT_MAX_REPLY_LENGTH = 200, DEFAULT_MAX_COMMENTS = 4, DEFAULT_ADD_COMMENTS = 5, DEFAULT_MAX_REPLIES = 5;
1
+ const DEFAULT_MAX_COMMENT_LENGTH = 200, DEFAULT_MAX_REPLY_LENGTH = 200, DEFAULT_MAX_COMMENTS = 4, DEFAULT_ADD_COMMENTS = 5, DEFAULT_MAX_REPLIES = 5, DEFAULT_ADD_REPLIES = 5;
2
2
  export {
3
3
  DEFAULT_ADD_COMMENTS,
4
+ DEFAULT_ADD_REPLIES,
4
5
  DEFAULT_MAX_COMMENTS,
5
6
  DEFAULT_MAX_COMMENT_LENGTH,
6
7
  DEFAULT_MAX_REPLIES,