@edifice.io/react 2.1.1-develop-b2school.20250327150728 → 2.1.1-develop-b2school.20250402113004

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.
@@ -29,6 +29,7 @@ export * from './useUpload';
29
29
  export * from './useUploadFiles';
30
30
  export * from './useUser';
31
31
  export * from './useWorkspaceFile';
32
+ export * from './useWorkspaceFolders';
32
33
  export * from './useWorkspaceSearch';
33
34
  export * from './useXitiTrackPageLoad';
34
35
  export * from './useZendeskGuide';
@@ -0,0 +1 @@
1
+ export { default as useWorkspaceFolders } from './useWorkspaceFolders';
@@ -0,0 +1,13 @@
1
+ interface FolderTreeNode {
2
+ id: string;
3
+ name: string;
4
+ children?: FolderTreeNode[];
5
+ }
6
+ declare function useWorkspaceFolders(): {
7
+ folderTree: {
8
+ id: string;
9
+ name: string;
10
+ children: FolderTreeNode[];
11
+ }[];
12
+ };
13
+ export default useWorkspaceFolders;
@@ -0,0 +1,37 @@
1
+ import { odeServices } from "@edifice.io/client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { useMemo } from "react";
4
+ import { useTranslation } from "react-i18next";
5
+ function useWorkspaceFolders() {
6
+ const {
7
+ t
8
+ } = useTranslation(), {
9
+ data: folderData
10
+ } = useQuery({
11
+ queryKey: ["workspace-folders"],
12
+ queryFn: () => odeServices.workspace().listFolder("owner", !0)
13
+ });
14
+ return {
15
+ folderTree: useMemo(() => {
16
+ const buildWorkspaceTree = (data) => [{
17
+ id: "my-documents",
18
+ name: t("workspace.myDocuments"),
19
+ children: data
20
+ }];
21
+ if (!folderData) return buildWorkspaceTree([]);
22
+ const nodes = /* @__PURE__ */ new Map(), tree = [];
23
+ return folderData.forEach((item) => {
24
+ nodes.set(item._id, {
25
+ id: item._id,
26
+ name: item.name,
27
+ children: []
28
+ });
29
+ }), folderData.forEach((item) => {
30
+ item.eParent && nodes.has(item.eParent) ? nodes.get(item.eParent).children.push(nodes.get(item._id)) : tree.push(nodes.get(item._id));
31
+ }), buildWorkspaceTree(tree);
32
+ }, [folderData])
33
+ };
34
+ }
35
+ export {
36
+ useWorkspaceFolders as default
37
+ };
package/dist/icons.js CHANGED
@@ -68,92 +68,93 @@ import { default as default68 } from "./modules/icons/components/IconLink.js";
68
68
  import { default as default69 } from "./modules/icons/components/IconListOrder.js";
69
69
  import { default as default70 } from "./modules/icons/components/IconLoader.js";
70
70
  import { default as default71 } from "./modules/icons/components/IconLock.js";
71
- import { default as default72 } from "./modules/icons/components/IconMail.js";
72
- import { default as default73 } from "./modules/icons/components/IconMergeCells.js";
73
- import { default as default74 } from "./modules/icons/components/IconMessageInfo.js";
74
- import { default as default75 } from "./modules/icons/components/IconMic.js";
75
- import { default as default76 } from "./modules/icons/components/IconMinus.js";
76
- import { default as default77 } from "./modules/icons/components/IconMove.js";
77
- import { default as default78 } from "./modules/icons/components/IconNoColors.js";
78
- import { default as default79 } from "./modules/icons/components/IconOptions.js";
79
- import { default as default80 } from "./modules/icons/components/IconOrderedList.js";
80
- import { default as default81 } from "./modules/icons/components/IconPaperclip.js";
81
- import { default as default82 } from "./modules/icons/components/IconPause.js";
82
- import { default as default83 } from "./modules/icons/components/IconPinOff.js";
83
- import { default as default84 } from "./modules/icons/components/IconPinOn.js";
84
- import { default as default85 } from "./modules/icons/components/IconPlaceholder.js";
85
- import { default as default86 } from "./modules/icons/components/IconPlayFilled.js";
86
- import { default as default87 } from "./modules/icons/components/IconPlay.js";
87
- import { default as default88 } from "./modules/icons/components/IconPlus.js";
88
- import { default as default89 } from "./modules/icons/components/IconPointerDefault.js";
89
- import { default as default90 } from "./modules/icons/components/IconPointerHand.js";
90
- import { default as default91 } from "./modules/icons/components/IconPrint.js";
91
- import { default as default92 } from "./modules/icons/components/IconQuestionMark.js";
92
- import { default as default93 } from "./modules/icons/components/IconQuestion.js";
93
- import { default as default94 } from "./modules/icons/components/IconRafterDown.js";
94
- import { default as default95 } from "./modules/icons/components/IconRafterLeft.js";
95
- import { default as default96 } from "./modules/icons/components/IconRafterRight.js";
96
- import { default as default97 } from "./modules/icons/components/IconRafterUp.js";
97
- import { default as default98 } from "./modules/icons/components/IconReaction.js";
98
- import { default as default99 } from "./modules/icons/components/IconReadMail.js";
99
- import { default as default100 } from "./modules/icons/components/IconRecordPause.js";
100
- import { default as default101 } from "./modules/icons/components/IconRecordStop.js";
101
- import { default as default102 } from "./modules/icons/components/IconRecordVideo.js";
102
- import { default as default103 } from "./modules/icons/components/IconRecord.js";
103
- import { default as default104 } from "./modules/icons/components/IconRedo.js";
104
- import { default as default105 } from "./modules/icons/components/IconRefresh.js";
105
- import { default as default106 } from "./modules/icons/components/IconReset.js";
106
- import { default as default107 } from "./modules/icons/components/IconRestart.js";
107
- import { default as default108 } from "./modules/icons/components/IconRestore.js";
108
- import { default as default109 } from "./modules/icons/components/IconSave.js";
109
- import { default as default110 } from "./modules/icons/components/IconSearch.js";
110
- import { default as default111 } from "./modules/icons/components/IconSee.js";
111
- import { default as default112 } from "./modules/icons/components/IconSend.js";
112
- import { default as default113 } from "./modules/icons/components/IconSetBackground.js";
113
- import { default as default114 } from "./modules/icons/components/IconSettings.js";
114
- import { default as default115 } from "./modules/icons/components/IconShare.js";
115
- import { default as default116 } from "./modules/icons/components/IconSmartphone.js";
116
- import { default as default117 } from "./modules/icons/components/IconSmiley.js";
117
- import { default as default118 } from "./modules/icons/components/IconSortAscendingLetters.js";
118
- import { default as default119 } from "./modules/icons/components/IconSortDescendingLetters.js";
119
- import { default as default120 } from "./modules/icons/components/IconSortDescending.js";
120
- import { default as default121 } from "./modules/icons/components/IconSortTime.js";
121
- import { default as default122 } from "./modules/icons/components/IconSpeechToText.js";
122
- import { default as default123 } from "./modules/icons/components/IconSplitCells.js";
123
- import { default as default124 } from "./modules/icons/components/IconSquareRoot.js";
124
- import { default as default125 } from "./modules/icons/components/IconSubscript.js";
125
- import { default as default126 } from "./modules/icons/components/IconSuccessFill.js";
126
- import { default as default127 } from "./modules/icons/components/IconSuccessOutline.js";
127
- import { default as default128 } from "./modules/icons/components/IconSuperscript.js";
128
- import { default as default129 } from "./modules/icons/components/IconTable.js";
129
- import { default as default130 } from "./modules/icons/components/IconTextBold.js";
130
- import { default as default131 } from "./modules/icons/components/IconTextColor.js";
131
- import { default as default132 } from "./modules/icons/components/IconTextHighlight.js";
132
- import { default as default133 } from "./modules/icons/components/IconTextItalic.js";
133
- import { default as default134 } from "./modules/icons/components/IconTextPage.js";
134
- import { default as default135 } from "./modules/icons/components/IconTextSize.js";
135
- import { default as default136 } from "./modules/icons/components/IconTextToSpeech.js";
136
- import { default as default137 } from "./modules/icons/components/IconTextTypo.js";
137
- import { default as default138 } from "./modules/icons/components/IconTextUnderline.js";
138
- import { default as default139 } from "./modules/icons/components/IconTextVanilla.js";
139
- import { default as default140 } from "./modules/icons/components/IconTool.js";
140
- import { default as default141 } from "./modules/icons/components/IconTrendingUp.js";
141
- import { default as default142 } from "./modules/icons/components/IconUndoAll.js";
142
- import { default as default143 } from "./modules/icons/components/IconUndo.js";
143
- import { default as default144 } from "./modules/icons/components/IconUnlink.js";
144
- import { default as default145 } from "./modules/icons/components/IconUnlock.js";
145
- import { default as default146 } from "./modules/icons/components/IconUnreadMail.js";
146
- import { default as default147 } from "./modules/icons/components/IconUpload.js";
147
- import { default as default148 } from "./modules/icons/components/IconUserSearch.js";
148
- import { default as default149 } from "./modules/icons/components/IconUser.js";
149
- import { default as default150 } from "./modules/icons/components/IconUsers.js";
150
- import { default as default151 } from "./modules/icons/components/IconVideo.js";
151
- import { default as default152 } from "./modules/icons/components/IconViewCalendar.js";
152
- import { default as default153 } from "./modules/icons/components/IconViewList.js";
153
- import { default as default154 } from "./modules/icons/components/IconWand.js";
154
- import { default as default155 } from "./modules/icons/components/IconWrite.js";
155
- import { default as default156 } from "./modules/icons/components/IconZoomIn.js";
156
- import { default as default157 } from "./modules/icons/components/IconZoomOut.js";
71
+ import { default as default72 } from "./modules/icons/components/IconMailRecall.js";
72
+ import { default as default73 } from "./modules/icons/components/IconMail.js";
73
+ import { default as default74 } from "./modules/icons/components/IconMergeCells.js";
74
+ import { default as default75 } from "./modules/icons/components/IconMessageInfo.js";
75
+ import { default as default76 } from "./modules/icons/components/IconMic.js";
76
+ import { default as default77 } from "./modules/icons/components/IconMinus.js";
77
+ import { default as default78 } from "./modules/icons/components/IconMove.js";
78
+ import { default as default79 } from "./modules/icons/components/IconNoColors.js";
79
+ import { default as default80 } from "./modules/icons/components/IconOptions.js";
80
+ import { default as default81 } from "./modules/icons/components/IconOrderedList.js";
81
+ import { default as default82 } from "./modules/icons/components/IconPaperclip.js";
82
+ import { default as default83 } from "./modules/icons/components/IconPause.js";
83
+ import { default as default84 } from "./modules/icons/components/IconPinOff.js";
84
+ import { default as default85 } from "./modules/icons/components/IconPinOn.js";
85
+ import { default as default86 } from "./modules/icons/components/IconPlaceholder.js";
86
+ import { default as default87 } from "./modules/icons/components/IconPlayFilled.js";
87
+ import { default as default88 } from "./modules/icons/components/IconPlay.js";
88
+ import { default as default89 } from "./modules/icons/components/IconPlus.js";
89
+ import { default as default90 } from "./modules/icons/components/IconPointerDefault.js";
90
+ import { default as default91 } from "./modules/icons/components/IconPointerHand.js";
91
+ import { default as default92 } from "./modules/icons/components/IconPrint.js";
92
+ import { default as default93 } from "./modules/icons/components/IconQuestionMark.js";
93
+ import { default as default94 } from "./modules/icons/components/IconQuestion.js";
94
+ import { default as default95 } from "./modules/icons/components/IconRafterDown.js";
95
+ import { default as default96 } from "./modules/icons/components/IconRafterLeft.js";
96
+ import { default as default97 } from "./modules/icons/components/IconRafterRight.js";
97
+ import { default as default98 } from "./modules/icons/components/IconRafterUp.js";
98
+ import { default as default99 } from "./modules/icons/components/IconReaction.js";
99
+ import { default as default100 } from "./modules/icons/components/IconReadMail.js";
100
+ import { default as default101 } from "./modules/icons/components/IconRecordPause.js";
101
+ import { default as default102 } from "./modules/icons/components/IconRecordStop.js";
102
+ import { default as default103 } from "./modules/icons/components/IconRecordVideo.js";
103
+ import { default as default104 } from "./modules/icons/components/IconRecord.js";
104
+ import { default as default105 } from "./modules/icons/components/IconRedo.js";
105
+ import { default as default106 } from "./modules/icons/components/IconRefresh.js";
106
+ import { default as default107 } from "./modules/icons/components/IconReset.js";
107
+ import { default as default108 } from "./modules/icons/components/IconRestart.js";
108
+ import { default as default109 } from "./modules/icons/components/IconRestore.js";
109
+ import { default as default110 } from "./modules/icons/components/IconSave.js";
110
+ import { default as default111 } from "./modules/icons/components/IconSearch.js";
111
+ import { default as default112 } from "./modules/icons/components/IconSee.js";
112
+ import { default as default113 } from "./modules/icons/components/IconSend.js";
113
+ import { default as default114 } from "./modules/icons/components/IconSetBackground.js";
114
+ import { default as default115 } from "./modules/icons/components/IconSettings.js";
115
+ import { default as default116 } from "./modules/icons/components/IconShare.js";
116
+ import { default as default117 } from "./modules/icons/components/IconSmartphone.js";
117
+ import { default as default118 } from "./modules/icons/components/IconSmiley.js";
118
+ import { default as default119 } from "./modules/icons/components/IconSortAscendingLetters.js";
119
+ import { default as default120 } from "./modules/icons/components/IconSortDescendingLetters.js";
120
+ import { default as default121 } from "./modules/icons/components/IconSortDescending.js";
121
+ import { default as default122 } from "./modules/icons/components/IconSortTime.js";
122
+ import { default as default123 } from "./modules/icons/components/IconSpeechToText.js";
123
+ import { default as default124 } from "./modules/icons/components/IconSplitCells.js";
124
+ import { default as default125 } from "./modules/icons/components/IconSquareRoot.js";
125
+ import { default as default126 } from "./modules/icons/components/IconSubscript.js";
126
+ import { default as default127 } from "./modules/icons/components/IconSuccessFill.js";
127
+ import { default as default128 } from "./modules/icons/components/IconSuccessOutline.js";
128
+ import { default as default129 } from "./modules/icons/components/IconSuperscript.js";
129
+ import { default as default130 } from "./modules/icons/components/IconTable.js";
130
+ import { default as default131 } from "./modules/icons/components/IconTextBold.js";
131
+ import { default as default132 } from "./modules/icons/components/IconTextColor.js";
132
+ import { default as default133 } from "./modules/icons/components/IconTextHighlight.js";
133
+ import { default as default134 } from "./modules/icons/components/IconTextItalic.js";
134
+ import { default as default135 } from "./modules/icons/components/IconTextPage.js";
135
+ import { default as default136 } from "./modules/icons/components/IconTextSize.js";
136
+ import { default as default137 } from "./modules/icons/components/IconTextToSpeech.js";
137
+ import { default as default138 } from "./modules/icons/components/IconTextTypo.js";
138
+ import { default as default139 } from "./modules/icons/components/IconTextUnderline.js";
139
+ import { default as default140 } from "./modules/icons/components/IconTextVanilla.js";
140
+ import { default as default141 } from "./modules/icons/components/IconTool.js";
141
+ import { default as default142 } from "./modules/icons/components/IconTrendingUp.js";
142
+ import { default as default143 } from "./modules/icons/components/IconUndoAll.js";
143
+ import { default as default144 } from "./modules/icons/components/IconUndo.js";
144
+ import { default as default145 } from "./modules/icons/components/IconUnlink.js";
145
+ import { default as default146 } from "./modules/icons/components/IconUnlock.js";
146
+ import { default as default147 } from "./modules/icons/components/IconUnreadMail.js";
147
+ import { default as default148 } from "./modules/icons/components/IconUpload.js";
148
+ import { default as default149 } from "./modules/icons/components/IconUserSearch.js";
149
+ import { default as default150 } from "./modules/icons/components/IconUser.js";
150
+ import { default as default151 } from "./modules/icons/components/IconUsers.js";
151
+ import { default as default152 } from "./modules/icons/components/IconVideo.js";
152
+ import { default as default153 } from "./modules/icons/components/IconViewCalendar.js";
153
+ import { default as default154 } from "./modules/icons/components/IconViewList.js";
154
+ import { default as default155 } from "./modules/icons/components/IconWand.js";
155
+ import { default as default156 } from "./modules/icons/components/IconWrite.js";
156
+ import { default as default157 } from "./modules/icons/components/IconZoomIn.js";
157
+ import { default as default158 } from "./modules/icons/components/IconZoomOut.js";
157
158
  export {
158
159
  default3 as IconAdd,
159
160
  default2 as IconAddUser,
@@ -225,90 +226,91 @@ export {
225
226
  default69 as IconListOrder,
226
227
  default70 as IconLoader,
227
228
  default71 as IconLock,
228
- default72 as IconMail,
229
- default73 as IconMergeCells,
230
- default74 as IconMessageInfo,
231
- default75 as IconMic,
232
- default76 as IconMinus,
233
- default77 as IconMove,
234
- default78 as IconNoColors,
235
- default79 as IconOptions,
236
- default80 as IconOrderedList,
237
- default81 as IconPaperclip,
238
- default82 as IconPause,
239
- default83 as IconPinOff,
240
- default84 as IconPinOn,
241
- default85 as IconPlaceholder,
242
- default87 as IconPlay,
243
- default86 as IconPlayFilled,
244
- default88 as IconPlus,
245
- default89 as IconPointerDefault,
246
- default90 as IconPointerHand,
247
- default91 as IconPrint,
248
- default93 as IconQuestion,
249
- default92 as IconQuestionMark,
250
- default94 as IconRafterDown,
251
- default95 as IconRafterLeft,
252
- default96 as IconRafterRight,
253
- default97 as IconRafterUp,
254
- default98 as IconReaction,
255
- default99 as IconReadMail,
256
- default103 as IconRecord,
257
- default100 as IconRecordPause,
258
- default101 as IconRecordStop,
259
- default102 as IconRecordVideo,
260
- default104 as IconRedo,
261
- default105 as IconRefresh,
262
- default106 as IconReset,
263
- default107 as IconRestart,
264
- default108 as IconRestore,
265
- default109 as IconSave,
266
- default110 as IconSearch,
267
- default111 as IconSee,
268
- default112 as IconSend,
269
- default113 as IconSetBackground,
270
- default114 as IconSettings,
271
- default115 as IconShare,
272
- default116 as IconSmartphone,
273
- default117 as IconSmiley,
274
- default118 as IconSortAscendingLetters,
275
- default120 as IconSortDescending,
276
- default119 as IconSortDescendingLetters,
277
- default121 as IconSortTime,
278
- default122 as IconSpeechToText,
279
- default123 as IconSplitCells,
280
- default124 as IconSquareRoot,
281
- default125 as IconSubscript,
282
- default126 as IconSuccessFill,
283
- default127 as IconSuccessOutline,
284
- default128 as IconSuperscript,
285
- default129 as IconTable,
286
- default130 as IconTextBold,
287
- default131 as IconTextColor,
288
- default132 as IconTextHighlight,
289
- default133 as IconTextItalic,
290
- default134 as IconTextPage,
291
- default135 as IconTextSize,
292
- default136 as IconTextToSpeech,
293
- default137 as IconTextTypo,
294
- default138 as IconTextUnderline,
295
- default139 as IconTextVanilla,
296
- default140 as IconTool,
297
- default141 as IconTrendingUp,
298
- default143 as IconUndo,
299
- default142 as IconUndoAll,
300
- default144 as IconUnlink,
301
- default145 as IconUnlock,
302
- default146 as IconUnreadMail,
303
- default147 as IconUpload,
304
- default149 as IconUser,
305
- default148 as IconUserSearch,
306
- default150 as IconUsers,
307
- default151 as IconVideo,
308
- default152 as IconViewCalendar,
309
- default153 as IconViewList,
310
- default154 as IconWand,
311
- default155 as IconWrite,
312
- default156 as IconZoomIn,
313
- default157 as IconZoomOut
229
+ default73 as IconMail,
230
+ default72 as IconMailRecall,
231
+ default74 as IconMergeCells,
232
+ default75 as IconMessageInfo,
233
+ default76 as IconMic,
234
+ default77 as IconMinus,
235
+ default78 as IconMove,
236
+ default79 as IconNoColors,
237
+ default80 as IconOptions,
238
+ default81 as IconOrderedList,
239
+ default82 as IconPaperclip,
240
+ default83 as IconPause,
241
+ default84 as IconPinOff,
242
+ default85 as IconPinOn,
243
+ default86 as IconPlaceholder,
244
+ default88 as IconPlay,
245
+ default87 as IconPlayFilled,
246
+ default89 as IconPlus,
247
+ default90 as IconPointerDefault,
248
+ default91 as IconPointerHand,
249
+ default92 as IconPrint,
250
+ default94 as IconQuestion,
251
+ default93 as IconQuestionMark,
252
+ default95 as IconRafterDown,
253
+ default96 as IconRafterLeft,
254
+ default97 as IconRafterRight,
255
+ default98 as IconRafterUp,
256
+ default99 as IconReaction,
257
+ default100 as IconReadMail,
258
+ default104 as IconRecord,
259
+ default101 as IconRecordPause,
260
+ default102 as IconRecordStop,
261
+ default103 as IconRecordVideo,
262
+ default105 as IconRedo,
263
+ default106 as IconRefresh,
264
+ default107 as IconReset,
265
+ default108 as IconRestart,
266
+ default109 as IconRestore,
267
+ default110 as IconSave,
268
+ default111 as IconSearch,
269
+ default112 as IconSee,
270
+ default113 as IconSend,
271
+ default114 as IconSetBackground,
272
+ default115 as IconSettings,
273
+ default116 as IconShare,
274
+ default117 as IconSmartphone,
275
+ default118 as IconSmiley,
276
+ default119 as IconSortAscendingLetters,
277
+ default121 as IconSortDescending,
278
+ default120 as IconSortDescendingLetters,
279
+ default122 as IconSortTime,
280
+ default123 as IconSpeechToText,
281
+ default124 as IconSplitCells,
282
+ default125 as IconSquareRoot,
283
+ default126 as IconSubscript,
284
+ default127 as IconSuccessFill,
285
+ default128 as IconSuccessOutline,
286
+ default129 as IconSuperscript,
287
+ default130 as IconTable,
288
+ default131 as IconTextBold,
289
+ default132 as IconTextColor,
290
+ default133 as IconTextHighlight,
291
+ default134 as IconTextItalic,
292
+ default135 as IconTextPage,
293
+ default136 as IconTextSize,
294
+ default137 as IconTextToSpeech,
295
+ default138 as IconTextTypo,
296
+ default139 as IconTextUnderline,
297
+ default140 as IconTextVanilla,
298
+ default141 as IconTool,
299
+ default142 as IconTrendingUp,
300
+ default144 as IconUndo,
301
+ default143 as IconUndoAll,
302
+ default145 as IconUnlink,
303
+ default146 as IconUnlock,
304
+ default147 as IconUnreadMail,
305
+ default148 as IconUpload,
306
+ default150 as IconUser,
307
+ default149 as IconUserSearch,
308
+ default151 as IconUsers,
309
+ default152 as IconVideo,
310
+ default153 as IconViewCalendar,
311
+ default154 as IconViewList,
312
+ default155 as IconWand,
313
+ default156 as IconWrite,
314
+ default157 as IconZoomIn,
315
+ default158 as IconZoomOut
314
316
  };
package/dist/index.js CHANGED
@@ -68,17 +68,19 @@ import { default as default67 } from "./hooks/useUpload/useUpload.js";
68
68
  import { default as default68 } from "./hooks/useUploadFiles/useUploadFiles.js";
69
69
  import { default as default69 } from "./hooks/useUser/useUser.js";
70
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/ConfirmModal/ConfirmModal.js";
75
- import { default as default75 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
76
- import { default as default76 } from "./modules/modals/PublishModal/PublishModal.js";
77
- import { default as default77 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
78
- import { default as default78 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
79
- import { default as default79 } from "./modules/modals/ShareModal/ShareModal.js";
80
- import { default as default80 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
81
- import { default as default81 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
71
+ import { default as default71 } from "./hooks/useWorkspaceFolders/useWorkspaceFolders.js";
72
+ import { default as default72 } from "./hooks/useWorkspaceSearch/useWorkspaceSearch.js";
73
+ import { default as default73 } from "./hooks/useXitiTrackPageLoad/useXitiTrackPageLoad.js";
74
+ import { default as default74 } from "./hooks/useZendeskGuide/useZendeskGuide.js";
75
+ import { default as default75 } from "./modules/modals/AddAttachmentToWorkspaceModal/AddAttachmentToWorkspaceModal.js";
76
+ import { default as default76 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
77
+ import { default as default77 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
78
+ import { default as default78 } from "./modules/modals/PublishModal/PublishModal.js";
79
+ import { default as default79 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
80
+ import { default as default80 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
81
+ import { default as default81 } from "./modules/modals/ShareModal/ShareModal.js";
82
+ import { default as default82 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
83
+ import { default as default83 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
82
84
  import { AccessiblePalette, DefaultPalette } from "./components/ColorPicker/ColorPalette.js";
83
85
  import { DropzoneContext, useDropzoneContext } from "./components/Dropzone/DropzoneContext.js";
84
86
  import { Column, Grid } from "./components/Grid/Grid.js";
@@ -108,13 +110,14 @@ import { mergeRefs, setRef } from "./utilities/refs/ref.js";
108
110
  export {
109
111
  AccessiblePalette,
110
112
  default2 as ActionBar,
113
+ default75 as AddAttachmentToWorkspaceModal,
111
114
  default3 as Alert,
112
115
  default4 as AppHeader,
113
116
  default5 as AppIcon,
114
117
  default6 as Attachment,
115
118
  default7 as Avatar,
116
119
  default8 as Badge,
117
- default77 as BlogPublic,
120
+ default79 as BlogPublic,
118
121
  default9 as Breadcrumb,
119
122
  default10 as Button,
120
123
  default13 as Card,
@@ -123,7 +126,7 @@ export {
123
126
  default16 as ColorPickerItem,
124
127
  Column,
125
128
  default17 as Combobox,
126
- default74 as ConfirmModal,
129
+ default76 as ConfirmModal,
127
130
  DefaultPalette,
128
131
  DndTree,
129
132
  default18 as Dropdown,
@@ -150,19 +153,19 @@ export {
150
153
  Menu,
151
154
  MockedProvider,
152
155
  default30 as Modal,
153
- default75 as OnboardingModal,
156
+ default77 as OnboardingModal,
154
157
  Popover,
155
158
  PopoverBody,
156
159
  PopoverFooter,
157
160
  PopoverHeader,
158
- default76 as PublishModal,
161
+ default78 as PublishModal,
159
162
  default31 as Radio,
160
163
  ResourceModal,
161
164
  default32 as SearchBar,
162
165
  default12 as SearchButton,
163
166
  default33 as Select,
164
- default80 as ShareBlog,
165
- default79 as ShareModal,
167
+ default82 as ShareBlog,
168
+ default81 as ShareModal,
166
169
  default37 as SortableTree,
167
170
  default34 as Table,
168
171
  Tabs,
@@ -226,7 +229,7 @@ export {
226
229
  default59 as useLibraryUrl,
227
230
  default60 as useMediaLibrary,
228
231
  default61 as useScrollToTop,
229
- default81 as useShareMutation,
232
+ default83 as useShareMutation,
230
233
  default62 as useTitle,
231
234
  default63 as useToast,
232
235
  default64 as useToggle,
@@ -234,13 +237,14 @@ export {
234
237
  default66 as useTrashedResource,
235
238
  useTreeSortable,
236
239
  useTreeView,
237
- default78 as useUpdateMutation,
240
+ default80 as useUpdateMutation,
238
241
  default67 as useUpload,
239
242
  default68 as useUploadFiles,
240
243
  default69 as useUser,
241
244
  default70 as useWorkspaceFile,
242
- default71 as useWorkspaceSearch,
243
- default72 as useXitiTrackPageLoad,
244
- default73 as useZendeskGuide,
245
+ default71 as useWorkspaceFolders,
246
+ default72 as useWorkspaceSearch,
247
+ default73 as useXitiTrackPageLoad,
248
+ default74 as useZendeskGuide,
245
249
  wrapTreeNode
246
250
  };
package/dist/modals.js CHANGED
@@ -1,20 +1,22 @@
1
- import { default as default2 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
2
- import { default as default3 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
3
- import { default as default4 } from "./modules/modals/PublishModal/PublishModal.js";
4
- import { default as default5 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
5
- import { default as default6 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
6
- import { default as default7 } from "./modules/modals/ShareModal/ShareModal.js";
7
- import { default as default8 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
8
- import { default as default9 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
1
+ import { default as default2 } from "./modules/modals/AddAttachmentToWorkspaceModal/AddAttachmentToWorkspaceModal.js";
2
+ import { default as default3 } from "./modules/modals/ConfirmModal/ConfirmModal.js";
3
+ import { default as default4 } from "./modules/modals/OnboardingModal/OnboardingModal.js";
4
+ import { default as default5 } from "./modules/modals/PublishModal/PublishModal.js";
5
+ import { default as default6 } from "./modules/modals/ResourceModal/apps/BlogPublic.js";
6
+ import { default as default7 } from "./modules/modals/ResourceModal/hooks/useUpdateMutation.js";
7
+ import { default as default8 } from "./modules/modals/ShareModal/ShareModal.js";
8
+ import { default as default9 } from "./modules/modals/ShareModal/apps/ShareBlog.js";
9
+ import { default as default10 } from "./modules/modals/ShareModal/hooks/useShareMutation.js";
9
10
  import { ResourceModal } from "./modules/modals/ResourceModal/ResourceModal.js";
10
11
  export {
11
- default5 as BlogPublic,
12
- default2 as ConfirmModal,
13
- default3 as OnboardingModal,
14
- default4 as PublishModal,
12
+ default2 as AddAttachmentToWorkspaceModal,
13
+ default6 as BlogPublic,
14
+ default3 as ConfirmModal,
15
+ default4 as OnboardingModal,
16
+ default5 as PublishModal,
15
17
  ResourceModal,
16
- default8 as ShareBlog,
17
- default7 as ShareModal,
18
- default9 as useShareMutation,
19
- default6 as useUpdateMutation
18
+ default9 as ShareBlog,
19
+ default8 as ShareModal,
20
+ default10 as useShareMutation,
21
+ default7 as useUpdateMutation
20
22
  };
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ declare const SvgIconMailRecall: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default SvgIconMailRecall;
@@ -0,0 +1,13 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ const SvgIconMailRecall = ({
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", { clipPath: "url(#icon-mail-recall_svg__a)", children: /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M2.253 6.532A1.34 1.34 0 0 1 3.333 6H6.5a1 1 0 0 0 0-2H3.333C1.512 4 0 5.452 0 7.286v11.428C0 20.548 1.512 22 3.333 22h16.334C21.488 22 23 20.548 23 18.714a1 1 0 1 0-2 0c0 .691-.577 1.286-1.333 1.286H3.333C2.577 20 2 19.405 2 18.714V8.666l8.442 5.066a3 3 0 0 0 3.118-.02l1.965-1.21a1 1 0 1 0-1.05-1.703l-1.964 1.211a1 1 0 0 1-1.04.007L2.515 6.643a1 1 0 0 0-.262-.11M15.8 8.6a1 1 0 0 0-.2-1.4L14 6h4a4 4 0 0 1 4 4v.2a3.8 3.8 0 0 1-3.8 3.8 1 1 0 1 0 0 2 5.8 5.8 0 0 0 5.8-5.8V10a6 6 0 0 0-6-6h-4l1.6-1.2a1 1 0 1 0-1.2-1.6l-3.99 2.993a1 1 0 0 0 0 1.614L14.4 8.8a1 1 0 0 0 1.4-.2", clipRule: "evenodd" }) }),
9
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-mail-recall_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
10
+ ] });
11
+ export {
12
+ SvgIconMailRecall as default
13
+ };
@@ -68,6 +68,7 @@ export { default as IconLink } from './IconLink';
68
68
  export { default as IconListOrder } from './IconListOrder';
69
69
  export { default as IconLoader } from './IconLoader';
70
70
  export { default as IconLock } from './IconLock';
71
+ export { default as IconMailRecall } from './IconMailRecall';
71
72
  export { default as IconMail } from './IconMail';
72
73
  export { default as IconMergeCells } from './IconMergeCells';
73
74
  export { default as IconMessageInfo } from './IconMessageInfo';
@@ -0,0 +1,20 @@
1
+ interface AddAttachmentToWorkspaceModalProps {
2
+ /**
3
+ * Modal id (useful when multiple modal on the same page)
4
+ */
5
+ id?: string;
6
+ /**
7
+ * Is Modal Open
8
+ */
9
+ isOpen?: boolean;
10
+ /**
11
+ * Function to call when success button proceed
12
+ */
13
+ onSuccess?: () => void;
14
+ /**
15
+ * Function to call when closing modal
16
+ */
17
+ onCancel?: () => void;
18
+ }
19
+ export default function AddAttachmentToWorkspaceModal({ id, isOpen, onSuccess, onCancel, }: AddAttachmentToWorkspaceModalProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,31 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from "react-i18next";
3
+ import WorkspaceFoldersTree from "./components/WorkspaceFoldersTree.js";
4
+ import { useState, useEffect } from "react";
5
+ import Modal from "../../../components/Modal/Modal.js";
6
+ import Button from "../../../components/Button/Button.js";
7
+ function AddAttachmentToWorkspaceModal({
8
+ id = "add-attachment-to-workspace-modal",
9
+ isOpen = !1,
10
+ onSuccess = () => ({}),
11
+ onCancel = () => ({})
12
+ }) {
13
+ const {
14
+ t
15
+ } = useTranslation(), [selectedFolderId, setSelectedFolderId] = useState(), [disabled, setDisabled] = useState(!1), handleFolderSelected = (folderId) => {
16
+ setSelectedFolderId(folderId);
17
+ };
18
+ return useEffect(() => {
19
+ setDisabled(!selectedFolderId);
20
+ }, [selectedFolderId]), /* @__PURE__ */ jsxs(Modal, { isOpen, onModalClose: onCancel, id, size: "md", children: [
21
+ /* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t("attachments.add.to.folder.modal") }),
22
+ /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(WorkspaceFoldersTree, { onFolderSelected: handleFolderSelected }) }),
23
+ /* @__PURE__ */ jsxs(Modal.Footer, { children: [
24
+ /* @__PURE__ */ jsx(Button, { type: "button", color: "tertiary", variant: "ghost", onClick: onCancel, children: t("cancel") }),
25
+ /* @__PURE__ */ jsx(Button, { type: "submit", color: "primary", variant: "filled", onClick: onSuccess, disabled, children: t("add") })
26
+ ] })
27
+ ] });
28
+ }
29
+ export {
30
+ AddAttachmentToWorkspaceModal as default
31
+ };
@@ -0,0 +1,5 @@
1
+ type Props = {
2
+ onFolderSelected: (folderId: string) => void;
3
+ };
4
+ export default function WorkspaceFoldersTree({ onFolderSelected }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useTranslation } from "react-i18next";
3
+ import useWorkspaceFolders from "../../../../hooks/useWorkspaceFolders/useWorkspaceFolders.js";
4
+ import Tree from "../../../../components/Tree/components/Tree.js";
5
+ function WorkspaceFoldersTree({
6
+ onFolderSelected
7
+ }) {
8
+ const {
9
+ t
10
+ } = useTranslation(), {
11
+ folderTree
12
+ } = useWorkspaceFolders();
13
+ return /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column gap-12", children: [
14
+ /* @__PURE__ */ jsx("p", { children: t("attachments.add.to.folder.modal.description") }),
15
+ /* @__PURE__ */ jsx("div", { className: "border border-gray-400 rounded", children: /* @__PURE__ */ jsx("div", { className: "p-12", children: /* @__PURE__ */ jsx(Tree, { nodes: folderTree, onTreeItemClick: onFolderSelected, shouldExpandAllNodes: !0 }) }) })
16
+ ] });
17
+ }
18
+ export {
19
+ WorkspaceFoldersTree as default
20
+ };
@@ -0,0 +1 @@
1
+ export { default as AddAttachmentToWorkspaceModal } from './AddAttachmentToWorkspaceModal';
@@ -15,7 +15,7 @@ function ConfirmModal({
15
15
  }) {
16
16
  const {
17
17
  t
18
- } = useTranslation("common"), ok = {
18
+ } = useTranslation(), ok = {
19
19
  "yes/no": t("yes"),
20
20
  "ok/cancel": t("ok")
21
21
  }, ko = {
@@ -15,7 +15,7 @@ export interface FormDataProps {
15
15
  keyWords: string;
16
16
  }
17
17
  export default function usePublishModal({ onSuccess, resource }: ModalProps): {
18
- control: import('react-hook-form').Control<FormDataProps, any>;
18
+ control: import('react-hook-form').Control<FormDataProps, any, FormDataProps>;
19
19
  cover: string | File | Blob;
20
20
  formState: {
21
21
  errors: import('react-hook-form').FieldErrors<FormDataProps>;
@@ -25,7 +25,7 @@ export default function usePublishModal({ onSuccess, resource }: ModalProps): {
25
25
  };
26
26
  handleDeleteImage: () => void;
27
27
  handlePublish: SubmitHandler<FormDataProps>;
28
- handleSubmit: import('react-hook-form').UseFormHandleSubmit<FormDataProps, undefined>;
28
+ handleSubmit: import('react-hook-form').UseFormHandleSubmit<FormDataProps, FormDataProps>;
29
29
  handleUploadImage: (file: File | string) => void;
30
30
  register: import('react-hook-form').UseFormRegister<FormDataProps>;
31
31
  selectActivities: (value: string | number) => void;
@@ -1,3 +1,4 @@
1
+ export * from './AddAttachmentToWorkspaceModal';
1
2
  export * from './ConfirmModal';
2
3
  export * from './OnboardingModal';
3
4
  export * from './PublishModal';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.1.1-develop-b2school.20250327150728",
3
+ "version": "2.1.1-develop-b2school.20250402113004",
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.1.1-develop-b2school.20250327150728",
122
- "@edifice.io/tiptap-extensions": "2.1.1-develop-b2school.20250327150728",
123
- "@edifice.io/utilities": "2.1.1-develop-b2school.20250327150728"
121
+ "@edifice.io/bootstrap": "2.1.1-develop-b2school.20250402113004",
122
+ "@edifice.io/tiptap-extensions": "2.1.1-develop-b2school.20250402113004",
123
+ "@edifice.io/utilities": "2.1.1-develop-b2school.20250402113004"
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.1.1-develop-b2school.20250327150728",
155
- "@edifice.io/config": "2.1.1-develop-b2school.20250327150728"
154
+ "@edifice.io/client": "2.1.1-develop-b2school.20250402113004",
155
+ "@edifice.io/config": "2.1.1-develop-b2school.20250402113004"
156
156
  },
157
157
  "peerDependencies": {
158
158
  "@react-spring/web": "^9.7.5",