@payloadcms/ui 3.41.0-internal.c079756 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/BulkUpload/EditForm/index.d.ts.map +1 -1
- package/dist/elements/BulkUpload/EditForm/index.js +2 -1
- package/dist/elements/BulkUpload/EditForm/index.js.map +1 -1
- package/dist/elements/DocumentControls/index.d.ts.map +1 -1
- package/dist/elements/DocumentControls/index.js +2 -1
- package/dist/elements/DocumentControls/index.js.map +1 -1
- package/dist/elements/DocumentDrawer/DrawerHeader/index.d.ts +1 -0
- package/dist/elements/DocumentDrawer/DrawerHeader/index.d.ts.map +1 -1
- package/dist/elements/DocumentDrawer/DrawerHeader/index.js +30 -19
- package/dist/elements/DocumentDrawer/DrawerHeader/index.js.map +1 -1
- package/dist/elements/DocumentDrawer/DrawerHeader/index.scss +16 -8
- package/dist/elements/DrawerActionHeader/index.d.ts +2 -1
- package/dist/elements/DrawerActionHeader/index.d.ts.map +1 -1
- package/dist/elements/DrawerActionHeader/index.js +41 -30
- package/dist/elements/DrawerActionHeader/index.js.map +1 -1
- package/dist/elements/DrawerActionHeader/index.scss +2 -2
- package/dist/elements/EmailAndUsername/index.d.ts.map +1 -1
- package/dist/elements/EmailAndUsername/index.js +3 -0
- package/dist/elements/EmailAndUsername/index.js.map +1 -1
- package/dist/elements/FolderView/Cell/index.client.d.ts +6 -5
- package/dist/elements/FolderView/Cell/index.client.d.ts.map +1 -1
- package/dist/elements/FolderView/Cell/index.client.js +6 -3
- package/dist/elements/FolderView/Cell/index.client.js.map +1 -1
- package/dist/elements/FolderView/Cell/index.server.d.ts.map +1 -1
- package/dist/elements/FolderView/Cell/index.server.js +4 -0
- package/dist/elements/FolderView/Cell/index.server.js.map +1 -1
- package/dist/elements/FolderView/CollectionTypePill/index.d.ts.map +1 -1
- package/dist/elements/FolderView/CollectionTypePill/index.js +20 -18
- package/dist/elements/FolderView/CollectionTypePill/index.js.map +1 -1
- package/dist/elements/FolderView/CurrentFolderActions/index.d.ts.map +1 -1
- package/dist/elements/FolderView/CurrentFolderActions/index.js +20 -14
- package/dist/elements/FolderView/CurrentFolderActions/index.js.map +1 -1
- package/dist/elements/FolderView/Drawers/EditFolderAction/index.d.ts +9 -0
- package/dist/elements/FolderView/Drawers/EditFolderAction/index.d.ts.map +1 -0
- package/dist/elements/FolderView/Drawers/EditFolderAction/index.js +36 -0
- package/dist/elements/FolderView/Drawers/EditFolderAction/index.js.map +1 -0
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.d.ts +2 -0
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.d.ts.map +1 -1
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.js +120 -101
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.js.map +1 -1
- package/dist/elements/FolderView/Drawers/MoveToFolder/index.scss +1 -1
- package/dist/elements/FolderView/Field/index.server.d.ts.map +1 -1
- package/dist/elements/FolderView/Field/index.server.js +4 -0
- package/dist/elements/FolderView/Field/index.server.js.map +1 -1
- package/dist/elements/FolderView/MoveDocToFolder/index.d.ts +19 -16
- package/dist/elements/FolderView/MoveDocToFolder/index.d.ts.map +1 -1
- package/dist/elements/FolderView/MoveDocToFolder/index.js +52 -41
- package/dist/elements/FolderView/MoveDocToFolder/index.js.map +1 -1
- package/dist/elements/ListFolderPills/index.d.ts +4 -3
- package/dist/elements/ListFolderPills/index.d.ts.map +1 -1
- package/dist/elements/ListFolderPills/index.js +5 -1
- package/dist/elements/ListFolderPills/index.js.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListCreateNewDocInFolderButton.d.ts.map +1 -1
- package/dist/elements/ListHeader/TitleActions/ListCreateNewDocInFolderButton.js +75 -55
- package/dist/elements/ListHeader/TitleActions/ListCreateNewDocInFolderButton.js.map +1 -1
- package/dist/elements/Upload/index.scss +2 -3
- package/dist/elements/WhereBuilder/reduceFields.d.ts.map +1 -1
- package/dist/elements/WhereBuilder/reduceFields.js +1 -28
- package/dist/elements/WhereBuilder/reduceFields.js.map +1 -1
- package/dist/exports/client/{CodeEditor-7N7BMHRP.js → CodeEditor-Z3ZZJH7C.js} +2 -2
- package/dist/exports/client/chunk-CNCOIY3Y.js +26 -0
- package/dist/exports/client/{chunk-QPA2ZA5J.js.map → chunk-CNCOIY3Y.js.map} +3 -3
- package/dist/exports/client/index.d.ts +0 -1
- package/dist/exports/client/index.d.ts.map +1 -1
- package/dist/exports/client/index.js +22 -22
- package/dist/exports/client/index.js.map +4 -4
- package/dist/exports/shared/index.js +2 -2
- package/dist/exports/shared/index.js.map +1 -1
- package/dist/fields/Number/index.d.ts.map +1 -1
- package/dist/fields/Number/index.js +4 -3
- package/dist/fields/Number/index.js.map +1 -1
- package/dist/fields/Text/Input.d.ts.map +1 -1
- package/dist/fields/Text/Input.js +55 -52
- package/dist/fields/Text/Input.js.map +1 -1
- package/dist/fields/Text/index.d.ts.map +1 -1
- package/dist/fields/Text/index.js +4 -0
- package/dist/fields/Text/index.js.map +1 -1
- package/dist/fields/Text/types.d.ts +4 -1
- package/dist/fields/Text/types.d.ts.map +1 -1
- package/dist/fields/Text/types.js.map +1 -1
- package/dist/providers/Config/index.d.ts.map +1 -1
- package/dist/providers/Config/index.js +12 -6
- package/dist/providers/Config/index.js.map +1 -1
- package/dist/providers/Folders/index.d.ts +10 -2
- package/dist/providers/Folders/index.d.ts.map +1 -1
- package/dist/providers/Folders/index.js +7 -5
- package/dist/providers/Folders/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utilities/formatDocTitle/formatDateTitle.d.ts +3 -3
- package/dist/utilities/formatDocTitle/formatDateTitle.d.ts.map +1 -1
- package/dist/utilities/formatDocTitle/formatDateTitle.js.map +1 -1
- package/dist/views/BrowseByFolder/index.d.ts.map +1 -1
- package/dist/views/BrowseByFolder/index.js +4 -3
- package/dist/views/BrowseByFolder/index.js.map +1 -1
- package/dist/views/CollectionFolder/ListSelection/index.d.ts.map +1 -1
- package/dist/views/CollectionFolder/ListSelection/index.js +36 -37
- package/dist/views/CollectionFolder/ListSelection/index.js.map +1 -1
- package/dist/views/CollectionFolder/index.d.ts.map +1 -1
- package/dist/views/CollectionFolder/index.js +7 -4
- package/dist/views/CollectionFolder/index.js.map +1 -1
- package/dist/views/Edit/index.d.ts.map +1 -1
- package/dist/views/Edit/index.js +5 -3
- package/dist/views/Edit/index.js.map +1 -1
- package/dist/views/List/ListHeader/index.d.ts.map +1 -1
- package/dist/views/List/ListHeader/index.js +2 -1
- package/dist/views/List/ListHeader/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/elements/FolderView/Drawers/DrawerHeader/index.d.ts +0 -10
- package/dist/elements/FolderView/Drawers/DrawerHeader/index.d.ts.map +0 -1
- package/dist/elements/FolderView/Drawers/DrawerHeader/index.js +0 -55
- package/dist/elements/FolderView/Drawers/DrawerHeader/index.js.map +0 -1
- package/dist/elements/FolderView/Drawers/DrawerHeader/index.scss +0 -30
- package/dist/elements/FolderView/Drawers/NewFolder/index.d.ts +0 -9
- package/dist/elements/FolderView/Drawers/NewFolder/index.d.ts.map +0 -1
- package/dist/elements/FolderView/Drawers/NewFolder/index.js +0 -157
- package/dist/elements/FolderView/Drawers/NewFolder/index.js.map +0 -1
- package/dist/elements/FolderView/Drawers/RenameFolder/index.d.ts +0 -13
- package/dist/elements/FolderView/Drawers/RenameFolder/index.d.ts.map +0 -1
- package/dist/elements/FolderView/Drawers/RenameFolder/index.js +0 -140
- package/dist/elements/FolderView/Drawers/RenameFolder/index.js.map +0 -1
- package/dist/exports/client/chunk-QPA2ZA5J.js +0 -26
- /package/dist/exports/client/{CodeEditor-7N7BMHRP.js.map → CodeEditor-Z3ZZJH7C.js.map} +0 -0
|
@@ -11,6 +11,7 @@ import { FolderProvider, useFolder } from '../../../../providers/Folders/index.j
|
|
|
11
11
|
import { useTranslation } from '../../../../providers/Translation/index.js';
|
|
12
12
|
import { Button } from '../../../Button/index.js';
|
|
13
13
|
import { ConfirmationModal } from '../../../ConfirmationModal/index.js';
|
|
14
|
+
import { useDocumentDrawer } from '../../../DocumentDrawer/index.js';
|
|
14
15
|
import { Drawer } from '../../../Drawer/index.js';
|
|
15
16
|
import { DrawerActionHeader } from '../../../DrawerActionHeader/index.js';
|
|
16
17
|
import { DrawerContentContainer } from '../../../DrawerContentContainer/index.js';
|
|
@@ -21,12 +22,10 @@ import { Translation } from '../../../Translation/index.js';
|
|
|
21
22
|
import { FolderBreadcrumbs } from '../../Breadcrumbs/index.js';
|
|
22
23
|
import { ColoredFolderIcon } from '../../ColoredFolderIcon/index.js';
|
|
23
24
|
import { ItemCardGrid } from '../../ItemCardGrid/index.js';
|
|
24
|
-
import { NewFolderDrawer } from '../NewFolder/index.js';
|
|
25
25
|
import './index.scss';
|
|
26
26
|
const baseClass = 'move-folder-drawer';
|
|
27
27
|
const baseModalSlug = 'move-folder-drawer';
|
|
28
28
|
const confirmModalSlug = `${baseModalSlug}-confirm-move`;
|
|
29
|
-
const newFolderDrawerSlug = `${baseModalSlug}-new-folder`;
|
|
30
29
|
export function MoveItemsToFolderDrawer(props) {
|
|
31
30
|
return /*#__PURE__*/_jsx(Drawer, {
|
|
32
31
|
gutter: false,
|
|
@@ -40,9 +39,6 @@ export function MoveItemsToFolderDrawer(props) {
|
|
|
40
39
|
function LoadFolderData(props) {
|
|
41
40
|
const {
|
|
42
41
|
config: {
|
|
43
|
-
folders: {
|
|
44
|
-
slug: folderCollectionSlug
|
|
45
|
-
},
|
|
46
42
|
routes,
|
|
47
43
|
serverURL
|
|
48
44
|
}
|
|
@@ -55,7 +51,7 @@ function LoadFolderData(props) {
|
|
|
55
51
|
const onLoad = async () => {
|
|
56
52
|
// call some endpoint to load the data
|
|
57
53
|
try {
|
|
58
|
-
const folderDataReq = await fetch(`${serverURL}${routes.api}/${folderCollectionSlug}/populate-folder-data${props.fromFolderID ? `?folderID=${props.fromFolderID}` : ''}`, {
|
|
54
|
+
const folderDataReq = await fetch(`${serverURL}${routes.api}/${props.folderCollectionSlug}/populate-folder-data${props.fromFolderID ? `?folderID=${props.fromFolderID}` : ''}`, {
|
|
59
55
|
credentials: 'include',
|
|
60
56
|
headers: {
|
|
61
57
|
'content-type': 'application/json'
|
|
@@ -80,7 +76,7 @@ function LoadFolderData(props) {
|
|
|
80
76
|
if (!hasLoaded) {
|
|
81
77
|
void onLoad();
|
|
82
78
|
}
|
|
83
|
-
}, [folderCollectionSlug, routes.api, serverURL, hasLoaded, props.fromFolderID]);
|
|
79
|
+
}, [props.folderCollectionSlug, routes.api, serverURL, hasLoaded, props.fromFolderID]);
|
|
84
80
|
if (!hasLoaded) {
|
|
85
81
|
return /*#__PURE__*/_jsx(LoadingOverlay, {});
|
|
86
82
|
}
|
|
@@ -89,6 +85,7 @@ function LoadFolderData(props) {
|
|
|
89
85
|
breadcrumbs: breadcrumbs,
|
|
90
86
|
documents: documents,
|
|
91
87
|
folderCollectionSlugs: [],
|
|
88
|
+
folderFieldName: props.folderFieldName,
|
|
92
89
|
folderID: props.fromFolderID,
|
|
93
90
|
subfolders: subfolders,
|
|
94
91
|
children: /*#__PURE__*/_jsx(Content, {
|
|
@@ -97,7 +94,7 @@ function LoadFolderData(props) {
|
|
|
97
94
|
});
|
|
98
95
|
}
|
|
99
96
|
function Content(t0) {
|
|
100
|
-
const $ = _c(
|
|
97
|
+
const $ = _c(59);
|
|
101
98
|
let drawerSlug;
|
|
102
99
|
let fromFolderName;
|
|
103
100
|
let itemsToMove;
|
|
@@ -151,16 +148,32 @@ function Content(t0) {
|
|
|
151
148
|
folderCollectionConfig,
|
|
152
149
|
folderCollectionSlug,
|
|
153
150
|
folderFieldName,
|
|
151
|
+
folderID,
|
|
154
152
|
getSelectedItems,
|
|
155
153
|
setFolderID,
|
|
156
154
|
subfolders
|
|
157
155
|
} = useFolder();
|
|
156
|
+
let t2;
|
|
157
|
+
if ($[9] !== folderCollectionSlug) {
|
|
158
|
+
t2 = {
|
|
159
|
+
collectionSlug: folderCollectionSlug
|
|
160
|
+
};
|
|
161
|
+
$[9] = folderCollectionSlug;
|
|
162
|
+
$[10] = t2;
|
|
163
|
+
} else {
|
|
164
|
+
t2 = $[10];
|
|
165
|
+
}
|
|
166
|
+
const [FolderDocumentDrawer,, t3] = useDocumentDrawer(t2);
|
|
167
|
+
const {
|
|
168
|
+
closeDrawer: closeFolderDrawer,
|
|
169
|
+
openDrawer: openFolderDrawer
|
|
170
|
+
} = t3;
|
|
158
171
|
const {
|
|
159
172
|
getEntityConfig
|
|
160
173
|
} = useConfig();
|
|
161
|
-
let
|
|
162
|
-
if ($[
|
|
163
|
-
|
|
174
|
+
let t4;
|
|
175
|
+
if ($[11] !== breadcrumbs || $[12] !== getSelectedItems) {
|
|
176
|
+
t4 = () => {
|
|
164
177
|
const selected = getSelectedItems();
|
|
165
178
|
if (selected.length === 0) {
|
|
166
179
|
const lastCrumb = breadcrumbs?.[breadcrumbs.length - 1];
|
|
@@ -175,20 +188,20 @@ function Content(t0) {
|
|
|
175
188
|
};
|
|
176
189
|
}
|
|
177
190
|
};
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
191
|
+
$[11] = breadcrumbs;
|
|
192
|
+
$[12] = getSelectedItems;
|
|
193
|
+
$[13] = t4;
|
|
181
194
|
} else {
|
|
182
|
-
|
|
195
|
+
t4 = $[13];
|
|
183
196
|
}
|
|
184
|
-
const getSelectedFolder =
|
|
185
|
-
let
|
|
186
|
-
if ($[
|
|
187
|
-
|
|
197
|
+
const getSelectedFolder = t4;
|
|
198
|
+
let t5;
|
|
199
|
+
if ($[14] !== addItems || $[15] !== folderFieldName || $[16] !== getEntityConfig) {
|
|
200
|
+
t5 = t6 => {
|
|
188
201
|
const {
|
|
189
202
|
collectionSlug,
|
|
190
203
|
doc
|
|
191
|
-
} =
|
|
204
|
+
} = t6;
|
|
192
205
|
const collectionConfig = getEntityConfig({
|
|
193
206
|
collectionSlug
|
|
194
207
|
});
|
|
@@ -200,73 +213,73 @@ function Content(t0) {
|
|
|
200
213
|
value: doc
|
|
201
214
|
})]);
|
|
202
215
|
};
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
216
|
+
$[14] = addItems;
|
|
217
|
+
$[15] = folderFieldName;
|
|
218
|
+
$[16] = getEntityConfig;
|
|
219
|
+
$[17] = t5;
|
|
207
220
|
} else {
|
|
208
|
-
|
|
221
|
+
t5 = $[17];
|
|
209
222
|
}
|
|
210
|
-
const onCreateSuccess =
|
|
211
|
-
let
|
|
212
|
-
if ($[
|
|
213
|
-
|
|
223
|
+
const onCreateSuccess = t5;
|
|
224
|
+
let t6;
|
|
225
|
+
if ($[18] !== getSelectedFolder || $[19] !== onConfirm) {
|
|
226
|
+
t6 = () => {
|
|
214
227
|
if (typeof onConfirm === "function") {
|
|
215
228
|
onConfirm(getSelectedFolder());
|
|
216
229
|
}
|
|
217
230
|
};
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
231
|
+
$[18] = getSelectedFolder;
|
|
232
|
+
$[19] = onConfirm;
|
|
233
|
+
$[20] = t6;
|
|
221
234
|
} else {
|
|
222
|
-
|
|
235
|
+
t6 = $[20];
|
|
223
236
|
}
|
|
224
|
-
const onConfirmMove =
|
|
225
|
-
let
|
|
226
|
-
if ($[
|
|
227
|
-
|
|
237
|
+
const onConfirmMove = t6;
|
|
238
|
+
let t7;
|
|
239
|
+
if ($[21] !== closeModal || $[22] !== drawerSlug) {
|
|
240
|
+
t7 = () => {
|
|
228
241
|
closeModal(drawerSlug);
|
|
229
242
|
};
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
243
|
+
$[21] = closeModal;
|
|
244
|
+
$[22] = drawerSlug;
|
|
245
|
+
$[23] = t7;
|
|
233
246
|
} else {
|
|
234
|
-
|
|
247
|
+
t7 = $[23];
|
|
235
248
|
}
|
|
236
|
-
let
|
|
237
|
-
if ($[
|
|
238
|
-
|
|
249
|
+
let t8;
|
|
250
|
+
if ($[24] !== onConfirmMove || $[25] !== openModal || $[26] !== skipConfirmModal) {
|
|
251
|
+
t8 = () => {
|
|
239
252
|
if (skipConfirmModal) {
|
|
240
253
|
onConfirmMove();
|
|
241
254
|
} else {
|
|
242
255
|
openModal(confirmModalSlug);
|
|
243
256
|
}
|
|
244
257
|
};
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
258
|
+
$[24] = onConfirmMove;
|
|
259
|
+
$[25] = openModal;
|
|
260
|
+
$[26] = skipConfirmModal;
|
|
261
|
+
$[27] = t8;
|
|
249
262
|
} else {
|
|
250
|
-
|
|
263
|
+
t8 = $[27];
|
|
251
264
|
}
|
|
252
|
-
let
|
|
253
|
-
if ($[
|
|
254
|
-
let
|
|
255
|
-
if ($[
|
|
256
|
-
|
|
265
|
+
let t9;
|
|
266
|
+
if ($[28] !== FolderDocumentDrawer || $[29] !== breadcrumbs || $[30] !== closeFolderDrawer || $[31] !== count || $[32] !== folderCollectionConfig || $[33] !== folderCollectionSlug || $[34] !== folderFieldName || $[35] !== folderID || $[36] !== fromFolderName || $[37] !== getSelectedFolder || $[38] !== i18n || $[39] !== itemsToMove || $[40] !== onConfirmMove || $[41] !== onCreateSuccess || $[42] !== openFolderDrawer || $[43] !== props.action || $[44] !== props.fromFolderID || $[45] !== props.title || $[46] !== setFolderID || $[47] !== skipConfirmModal || $[48] !== subfolders || $[49] !== t || $[50] !== t7 || $[51] !== t8) {
|
|
267
|
+
let t10;
|
|
268
|
+
if ($[53] !== breadcrumbs.length || $[54] !== setFolderID) {
|
|
269
|
+
t10 = breadcrumbs.length ? () => {
|
|
257
270
|
setFolderID({
|
|
258
271
|
folderID: null
|
|
259
272
|
});
|
|
260
273
|
} : undefined;
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
274
|
+
$[53] = breadcrumbs.length;
|
|
275
|
+
$[54] = setFolderID;
|
|
276
|
+
$[55] = t10;
|
|
264
277
|
} else {
|
|
265
|
-
|
|
278
|
+
t10 = $[55];
|
|
266
279
|
}
|
|
267
|
-
let
|
|
268
|
-
if ($[
|
|
269
|
-
|
|
280
|
+
let t11;
|
|
281
|
+
if ($[56] !== breadcrumbs.length || $[57] !== setFolderID) {
|
|
282
|
+
t11 = (crumb, index) => ({
|
|
270
283
|
id: crumb.id,
|
|
271
284
|
name: crumb.name,
|
|
272
285
|
onClick: index !== breadcrumbs.length - 1 ? () => {
|
|
@@ -275,16 +288,16 @@ function Content(t0) {
|
|
|
275
288
|
});
|
|
276
289
|
} : undefined
|
|
277
290
|
});
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
291
|
+
$[56] = breadcrumbs.length;
|
|
292
|
+
$[57] = setFolderID;
|
|
293
|
+
$[58] = t11;
|
|
281
294
|
} else {
|
|
282
|
-
|
|
295
|
+
t11 = $[58];
|
|
283
296
|
}
|
|
284
|
-
|
|
297
|
+
t9 = _jsxs(_Fragment, {
|
|
285
298
|
children: [_jsx(DrawerActionHeader, {
|
|
286
|
-
onCancel:
|
|
287
|
-
onSave:
|
|
299
|
+
onCancel: t7,
|
|
300
|
+
onSave: t8,
|
|
288
301
|
saveLabel: t("general:select"),
|
|
289
302
|
title: _jsx(DrawerHeading, {
|
|
290
303
|
action: props.action,
|
|
@@ -301,30 +314,33 @@ function Content(t0) {
|
|
|
301
314
|
className: `${baseClass}__folder-breadcrumbs-root`,
|
|
302
315
|
children: [_jsx(ColoredFolderIcon, {}), t("folder:folders")]
|
|
303
316
|
}),
|
|
304
|
-
onClick:
|
|
305
|
-
}, ...breadcrumbs.map(
|
|
317
|
+
onClick: t10
|
|
318
|
+
}, ...breadcrumbs.map(t11)]
|
|
306
319
|
}), subfolders.length > 0 && _jsxs(_Fragment, {
|
|
307
320
|
children: [_jsx(Button, {
|
|
308
321
|
buttonStyle: "pill",
|
|
309
322
|
className: `${baseClass}__add-folder-button`,
|
|
310
323
|
margin: false,
|
|
311
324
|
onClick: () => {
|
|
312
|
-
|
|
325
|
+
openFolderDrawer();
|
|
313
326
|
},
|
|
314
327
|
children: t("fields:addLabel", {
|
|
315
328
|
label: getTranslation(folderCollectionConfig.labels?.singular, i18n)
|
|
316
329
|
})
|
|
317
|
-
}), _jsx(
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
330
|
+
}), _jsx(FolderDocumentDrawer, {
|
|
331
|
+
initialData: {
|
|
332
|
+
[folderFieldName]: folderID
|
|
333
|
+
},
|
|
334
|
+
onSave: result => {
|
|
321
335
|
if (typeof onCreateSuccess === "function") {
|
|
322
336
|
onCreateSuccess({
|
|
323
337
|
collectionSlug: folderCollectionConfig.slug,
|
|
324
|
-
doc:
|
|
338
|
+
doc: result.doc
|
|
325
339
|
});
|
|
326
340
|
}
|
|
327
|
-
|
|
341
|
+
closeFolderDrawer();
|
|
342
|
+
},
|
|
343
|
+
redirectAfterCreate: false
|
|
328
344
|
})]
|
|
329
345
|
})]
|
|
330
346
|
}), _jsx(DrawerContentContainer, {
|
|
@@ -362,32 +378,35 @@ function Content(t0) {
|
|
|
362
378
|
onConfirm: onConfirmMove
|
|
363
379
|
})]
|
|
364
380
|
});
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
381
|
+
$[28] = FolderDocumentDrawer;
|
|
382
|
+
$[29] = breadcrumbs;
|
|
383
|
+
$[30] = closeFolderDrawer;
|
|
384
|
+
$[31] = count;
|
|
385
|
+
$[32] = folderCollectionConfig;
|
|
386
|
+
$[33] = folderCollectionSlug;
|
|
387
|
+
$[34] = folderFieldName;
|
|
388
|
+
$[35] = folderID;
|
|
389
|
+
$[36] = fromFolderName;
|
|
390
|
+
$[37] = getSelectedFolder;
|
|
391
|
+
$[38] = i18n;
|
|
392
|
+
$[39] = itemsToMove;
|
|
393
|
+
$[40] = onConfirmMove;
|
|
394
|
+
$[41] = onCreateSuccess;
|
|
395
|
+
$[42] = openFolderDrawer;
|
|
396
|
+
$[43] = props.action;
|
|
397
|
+
$[44] = props.fromFolderID;
|
|
398
|
+
$[45] = props.title;
|
|
399
|
+
$[46] = setFolderID;
|
|
400
|
+
$[47] = skipConfirmModal;
|
|
401
|
+
$[48] = subfolders;
|
|
402
|
+
$[49] = t;
|
|
403
|
+
$[50] = t7;
|
|
404
|
+
$[51] = t8;
|
|
405
|
+
$[52] = t9;
|
|
387
406
|
} else {
|
|
388
|
-
|
|
407
|
+
t9 = $[52];
|
|
389
408
|
}
|
|
390
|
-
return
|
|
409
|
+
return t9;
|
|
391
410
|
}
|
|
392
411
|
function _temp(t0) {
|
|
393
412
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["c","_c","useModal","getTranslation","formatFolderOrDocumentItem","React","useConfig","FolderProvider","useFolder","useTranslation","Button","ConfirmationModal","Drawer","DrawerActionHeader","DrawerContentContainer","ListCreateNewDocInFolderButton","LoadingOverlay","NoListResults","Translation","FolderBreadcrumbs","ColoredFolderIcon","ItemCardGrid","NewFolderDrawer","baseClass","baseModalSlug","confirmModalSlug","newFolderDrawerSlug","MoveItemsToFolderDrawer","props","_jsx","gutter","Header","slug","drawerSlug","LoadFolderData","config","folders","folderCollectionSlug","routes","serverURL","subfolders","setSubfolders","useState","documents","setDocuments","breadcrumbs","setBreadcrumbs","hasLoaded","setHasLoaded","useEffect","onLoad","folderDataReq","fetch","api","fromFolderID","credentials","headers","status","folderDataRes","json","e","console","error","allowMultiSelection","folderCollectionSlugs","folderID","Content","t0","$","fromFolderName","itemsToMove","onConfirm","skipConfirmModal","closeModal","openModal","t1","length","count","i18n","t","addItems","folderCollectionConfig","folderFieldName","getSelectedItems","setFolderID","getEntityConfig","t2","selected","lastCrumb","id","name","value","_folderOrDocumentTitle","getSelectedFolder","t3","t4","collectionSlug","doc","collectionConfig","isUpload","Boolean","upload","relationTo","useAsTitle","admin","onCreateSuccess","onConfirmMove","t5","t6","t7","action","title","t8","undefined","t9","crumb","index","onClick","_jsxs","_Fragment","children","onCancel","onSave","saveLabel","DrawerHeading","className","map","buttonStyle","margin","label","labels","singular","onNewFolderSuccess","doc_0","disabledItemKeys","Set","_temp","items","selectedItemKeys","type","Actions","buttonLabel","toLowerCase","collectionSlugs","slugPrefix","Message","plural","body","ConfirmationMessage","toFolderName","confirmLabel","heading","modalSlug","itemKey","fromFolder","elements","1","_temp2","2","_temp3","i18nKey","variables","toFolder","_temp4","_temp5","_temp6","_temp7","children_1","children_0","children_4","children_3","children_2"],"sources":["../../../../../src/elements/FolderView/Drawers/MoveToFolder/index.tsx"],"sourcesContent":["'use client'\n\nimport type { CollectionSlug, Document } from 'payload'\nimport type {\n FolderBreadcrumb,\n FolderDocumentItemKey,\n FolderOrDocument,\n GetFolderDataResult,\n} from 'payload/shared'\n\nimport { useModal } from '@faceless-ui/modal'\nimport { getTranslation } from '@payloadcms/translations'\nimport { formatFolderOrDocumentItem } from 'payload/shared'\nimport React from 'react'\n\nimport { useConfig } from '../../../../providers/Config/index.js'\nimport { FolderProvider, useFolder } from '../../../../providers/Folders/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\nimport { Button } from '../../../Button/index.js'\nimport { ConfirmationModal } from '../../../ConfirmationModal/index.js'\nimport { Drawer } from '../../../Drawer/index.js'\nimport { DrawerActionHeader } from '../../../DrawerActionHeader/index.js'\nimport { DrawerContentContainer } from '../../../DrawerContentContainer/index.js'\nimport { ListCreateNewDocInFolderButton } from '../../../ListHeader/TitleActions/ListCreateNewDocInFolderButton.js'\nimport { LoadingOverlay } from '../../../Loading/index.js'\nimport { NoListResults } from '../../../NoListResults/index.js'\nimport { Translation } from '../../../Translation/index.js'\nimport { FolderBreadcrumbs } from '../../Breadcrumbs/index.js'\nimport { ColoredFolderIcon } from '../../ColoredFolderIcon/index.js'\nimport { ItemCardGrid } from '../../ItemCardGrid/index.js'\nimport { NewFolderDrawer } from '../NewFolder/index.js'\nimport './index.scss'\n\nconst baseClass = 'move-folder-drawer'\nconst baseModalSlug = 'move-folder-drawer'\nconst confirmModalSlug = `${baseModalSlug}-confirm-move`\nconst newFolderDrawerSlug = `${baseModalSlug}-new-folder`\n\ntype ActionProps =\n | {\n readonly action: 'moveItemsToFolder'\n }\n | {\n readonly action: 'moveItemToFolder'\n readonly title: string\n }\nexport type MoveToFolderDrawerProps = {\n readonly drawerSlug: string\n readonly fromFolderID?: number | string\n readonly fromFolderName?: string\n readonly itemsToMove: FolderOrDocument[]\n /**\n * Callback function to be called when the user confirms the move\n *\n * @param folderID - The ID of the folder to move the items to\n */\n readonly onConfirm: (args: {\n id: null | number | string\n name: null | string\n }) => Promise<void> | void\n /**\n * Set to `true` to skip the confirmation modal\n * @default false\n */\n readonly skipConfirmModal?: boolean\n} & ActionProps\n\nexport function MoveItemsToFolderDrawer(props: MoveToFolderDrawerProps) {\n return (\n <Drawer gutter={false} Header={null} slug={props.drawerSlug}>\n <LoadFolderData {...props} />\n </Drawer>\n )\n}\n\nfunction LoadFolderData(props: MoveToFolderDrawerProps) {\n const {\n config: {\n folders: { slug: folderCollectionSlug },\n routes,\n serverURL,\n },\n } = useConfig()\n const [subfolders, setSubfolders] = React.useState<FolderOrDocument[]>([])\n const [documents, setDocuments] = React.useState<FolderOrDocument[]>([])\n const [breadcrumbs, setBreadcrumbs] = React.useState<FolderBreadcrumb[]>([])\n const [hasLoaded, setHasLoaded] = React.useState(false)\n\n React.useEffect(() => {\n const onLoad = async () => {\n // call some endpoint to load the data\n\n try {\n const folderDataReq = await fetch(\n `${serverURL}${routes.api}/${folderCollectionSlug}/populate-folder-data${props.fromFolderID ? `?folderID=${props.fromFolderID}` : ''}`,\n {\n credentials: 'include',\n headers: {\n 'content-type': 'application/json',\n },\n },\n )\n\n if (folderDataReq.status === 200) {\n const folderDataRes: GetFolderDataResult = await folderDataReq.json()\n setBreadcrumbs(folderDataRes?.breadcrumbs || [])\n setSubfolders(folderDataRes?.subfolders || [])\n setDocuments(folderDataRes?.documents || [])\n } else {\n setBreadcrumbs([])\n setSubfolders([])\n setDocuments([])\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(e)\n }\n\n setHasLoaded(true)\n }\n\n if (!hasLoaded) {\n void onLoad()\n }\n }, [folderCollectionSlug, routes.api, serverURL, hasLoaded, props.fromFolderID])\n\n if (!hasLoaded) {\n return <LoadingOverlay />\n }\n\n return (\n <FolderProvider\n allowMultiSelection={false}\n breadcrumbs={breadcrumbs}\n documents={documents}\n folderCollectionSlugs={[]}\n folderID={props.fromFolderID}\n subfolders={subfolders}\n >\n <Content {...props} />\n </FolderProvider>\n )\n}\n\nfunction Content({\n drawerSlug,\n fromFolderName,\n itemsToMove,\n onConfirm,\n skipConfirmModal,\n ...props\n}: MoveToFolderDrawerProps) {\n const { closeModal, openModal } = useModal()\n const [count] = React.useState(() => itemsToMove.length)\n const { i18n, t } = useTranslation()\n const {\n addItems,\n breadcrumbs,\n folderCollectionConfig,\n folderCollectionSlug,\n folderFieldName,\n getSelectedItems,\n setFolderID,\n subfolders,\n } = useFolder()\n const { getEntityConfig } = useConfig()\n\n const getSelectedFolder = React.useCallback((): {\n id: null | number | string\n name: null | string\n } => {\n const selected = getSelectedItems()\n\n if (selected.length === 0) {\n const lastCrumb = breadcrumbs?.[breadcrumbs.length - 1]\n // use the breadcrumb\n return {\n id: lastCrumb?.id || null,\n name: lastCrumb?.name || null,\n }\n } else {\n // use the selected item\n return {\n id: selected[0].value.id,\n name: selected[0].value._folderOrDocumentTitle,\n }\n }\n }, [breadcrumbs, getSelectedItems])\n\n const onCreateSuccess = React.useCallback(\n ({ collectionSlug, doc }: { collectionSlug: CollectionSlug; doc: Document }) => {\n const collectionConfig = getEntityConfig({ collectionSlug })\n void addItems([\n formatFolderOrDocumentItem({\n folderFieldName,\n isUpload: Boolean(collectionConfig?.upload),\n relationTo: collectionSlug,\n useAsTitle: collectionConfig.admin.useAsTitle,\n value: doc,\n }),\n ])\n },\n [addItems, folderFieldName, getEntityConfig],\n )\n\n const onConfirmMove = React.useCallback(() => {\n if (typeof onConfirm === 'function') {\n void onConfirm(getSelectedFolder())\n }\n }, [getSelectedFolder, onConfirm])\n\n return (\n <>\n <DrawerActionHeader\n onCancel={() => {\n closeModal(drawerSlug)\n }}\n onSave={() => {\n if (skipConfirmModal) {\n onConfirmMove()\n } else {\n openModal(confirmModalSlug)\n }\n }}\n saveLabel={t('general:select')}\n title={\n <DrawerHeading\n action={props.action}\n count={count}\n fromFolderName={props.fromFolderID ? fromFolderName : undefined}\n title={props.action === 'moveItemToFolder' ? props.title : undefined}\n />\n }\n />\n\n <div className={`${baseClass}__breadcrumbs-section`}>\n <FolderBreadcrumbs\n breadcrumbs={[\n {\n id: null,\n name: (\n <span className={`${baseClass}__folder-breadcrumbs-root`}>\n <ColoredFolderIcon />\n {t('folder:folders')}\n </span>\n ),\n onClick: breadcrumbs.length\n ? () => {\n void setFolderID({ folderID: null })\n }\n : undefined,\n },\n ...breadcrumbs.map((crumb, index) => ({\n id: crumb.id,\n name: crumb.name,\n onClick:\n index !== breadcrumbs.length - 1\n ? () => {\n void setFolderID({ folderID: crumb.id })\n }\n : undefined,\n })),\n ]}\n />\n {subfolders.length > 0 && (\n <>\n <Button\n buttonStyle=\"pill\"\n className={`${baseClass}__add-folder-button`}\n margin={false}\n onClick={() => {\n openModal(newFolderDrawerSlug)\n }}\n >\n {t('fields:addLabel', {\n label: getTranslation(folderCollectionConfig.labels?.singular, i18n),\n })}\n </Button>\n <NewFolderDrawer\n drawerSlug={newFolderDrawerSlug}\n onNewFolderSuccess={(doc) => {\n closeModal(newFolderDrawerSlug)\n if (typeof onCreateSuccess === 'function') {\n void onCreateSuccess({\n collectionSlug: folderCollectionConfig.slug,\n doc,\n })\n }\n }}\n />\n </>\n )}\n </div>\n\n <DrawerContentContainer className={`${baseClass}__body-section`}>\n {subfolders.length > 0 ? (\n <ItemCardGrid\n disabledItemKeys={new Set(itemsToMove.map(({ itemKey }) => itemKey))}\n items={subfolders}\n selectedItemKeys={\n new Set<FolderDocumentItemKey>([`${folderCollectionSlug}-${getSelectedFolder().id}`])\n }\n type=\"folder\"\n />\n ) : (\n <NoListResults\n Actions={[\n <ListCreateNewDocInFolderButton\n buttonLabel={`${t('general:create')} ${getTranslation(folderCollectionConfig.labels?.singular, i18n).toLowerCase()}`}\n collectionSlugs={[folderCollectionSlug]}\n key=\"create-folder\"\n onCreateSuccess={onCreateSuccess}\n slugPrefix=\"create-new-folder-from-drawer--no-results\"\n />,\n ]}\n Message={\n <p>\n {i18n.t('general:noResults', {\n label: `${getTranslation(folderCollectionConfig.labels?.plural, i18n)}`,\n })}\n </p>\n }\n />\n )}\n </DrawerContentContainer>\n\n {!skipConfirmModal && (\n <ConfirmationModal\n body={\n <ConfirmationMessage\n action={props.action}\n count={count}\n fromFolderName={fromFolderName}\n title={props.action === 'moveItemToFolder' ? props.title : undefined}\n toFolderName={getSelectedFolder().name}\n />\n }\n confirmingLabel={t('general:moving')}\n confirmLabel={t('general:move')}\n heading={t('general:confirmMove')}\n modalSlug={confirmModalSlug}\n onConfirm={onConfirmMove}\n />\n )}\n </>\n )\n}\n\nfunction DrawerHeading(\n props: { count?: number } & ActionProps & Pick<MoveToFolderDrawerProps, 'fromFolderName'>,\n): string {\n const { t } = useTranslation()\n\n switch (props.action) {\n case 'moveItemToFolder':\n // moving current folder from list view actions menu\n // or moving item from edit view\n if (props.fromFolderName) {\n // move from folder\n return t('folder:movingFromFolder', {\n fromFolder: props.fromFolderName,\n title: props.title,\n })\n } else {\n // move from root\n return t('folder:selectFolderForItem', {\n title: props.title,\n })\n }\n\n case 'moveItemsToFolder':\n if (props.fromFolderName) {\n // move from folder\n return t('folder:movingFromFolder', {\n fromFolder: props.fromFolderName,\n title: `${props.count} ${props.count > 1 ? t('general:items') : t('general:item')}`,\n })\n } else {\n // move from root\n return t('folder:selectFolderForItem', {\n title: `${props.count} ${props.count > 1 ? t('general:items') : t('general:item')}`,\n })\n }\n }\n}\n\nfunction ConfirmationMessage(\n props: { count?: number; toFolderName?: string } & ActionProps &\n Pick<MoveToFolderDrawerProps, 'fromFolderName'>,\n) {\n const { t } = useTranslation()\n\n switch (props.action) {\n case 'moveItemToFolder':\n // moving current folder from list view actions menu\n // or moving item from edit view\n if (props.toFolderName) {\n // move to destination\n // You are about to move {{title}} to {{toFolder}}. Are you sure?\n return (\n <Translation\n elements={{\n 1: ({ children }) => <strong>{children}</strong>,\n 2: ({ children }) => <strong>{children}</strong>,\n }}\n i18nKey=\"folder:moveItemToFolderConfirmation\"\n t={t}\n variables={{\n title: props.title,\n toFolder: props.toFolderName,\n }}\n />\n )\n } else {\n // move to root\n // You are about to move {{title}} to the root folder. Are you sure?\n return (\n <Translation\n elements={{\n 1: ({ children }) => <strong>{children}</strong>,\n }}\n i18nKey=\"folder:moveItemToRootConfirmation\"\n t={t}\n variables={{\n title: props.title,\n }}\n />\n )\n }\n\n case 'moveItemsToFolder':\n // moving many (documents/folders) from list view\n if (props.toFolderName) {\n // move to destination\n // You are about to move {{count}} {{label}} to {{toFolder}}. Are you sure?\n return (\n <Translation\n elements={{\n 1: ({ children }) => <strong>{children}</strong>,\n 2: ({ children }) => <strong>{children}</strong>,\n }}\n i18nKey=\"folder:moveItemsToFolderConfirmation\"\n t={t}\n variables={{\n count: props.count,\n label: props.count > 1 ? t('general:items') : t('general:item'),\n toFolder: props.toFolderName,\n }}\n />\n )\n } else {\n // move to root\n // You are about to move {{count}} {{label}} to the root folder. Are you sure?\n return (\n <Translation\n elements={{\n 1: ({ children }) => <strong>{children}</strong>,\n }}\n i18nKey=\"folder:moveItemsToRootConfirmation\"\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qD;EAAA,IAAArD,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAA2F;EAAA,C;;AApDpC,SAAA2C,OAAAhG,EAAA;EAiCkB;IAAAqD,QAAA,EAAAiD;EAAA,IAAAtG,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAA2F,QAAA,EAAQA;EAAA,C;;AAjC5C,SAAAuC,OAAA5F,EAAA;EAiBkB;IAAAqD,QAAA,EAAAkD;EAAA,IAAAvG,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAA2F,QAAA,EAAQA;EAAA,C;;AAjB5C,SAAAqC,OAAA1F,EAAA;EAgBkB;IAAAqD,QAAA,EAAAmD;EAAA,IAAAxG,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAA2F,QAAA,EAAQA;EAAA,C","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["c","_c","useModal","getTranslation","formatFolderOrDocumentItem","React","useConfig","FolderProvider","useFolder","useTranslation","Button","ConfirmationModal","useDocumentDrawer","Drawer","DrawerActionHeader","DrawerContentContainer","ListCreateNewDocInFolderButton","LoadingOverlay","NoListResults","Translation","FolderBreadcrumbs","ColoredFolderIcon","ItemCardGrid","baseClass","baseModalSlug","confirmModalSlug","MoveItemsToFolderDrawer","props","_jsx","gutter","Header","slug","drawerSlug","LoadFolderData","config","routes","serverURL","subfolders","setSubfolders","useState","documents","setDocuments","breadcrumbs","setBreadcrumbs","hasLoaded","setHasLoaded","useEffect","onLoad","folderDataReq","fetch","api","folderCollectionSlug","fromFolderID","credentials","headers","status","folderDataRes","json","e","console","error","allowMultiSelection","folderCollectionSlugs","folderFieldName","folderID","Content","t0","$","fromFolderName","itemsToMove","onConfirm","skipConfirmModal","closeModal","openModal","t1","length","count","i18n","t","addItems","folderCollectionConfig","getSelectedItems","setFolderID","t2","collectionSlug","FolderDocumentDrawer","t3","closeDrawer","closeFolderDrawer","openDrawer","openFolderDrawer","getEntityConfig","t4","selected","lastCrumb","id","name","value","_folderOrDocumentTitle","getSelectedFolder","t5","t6","doc","collectionConfig","isUpload","Boolean","upload","relationTo","useAsTitle","admin","onCreateSuccess","onConfirmMove","t7","t8","t9","action","title","t10","undefined","t11","crumb","index","onClick","_jsxs","_Fragment","children","onCancel","onSave","saveLabel","DrawerHeading","className","map","buttonStyle","margin","label","labels","singular","initialData","result","redirectAfterCreate","disabledItemKeys","Set","_temp","items","selectedItemKeys","type","Actions","buttonLabel","toLowerCase","collectionSlugs","slugPrefix","Message","plural","body","ConfirmationMessage","toFolderName","confirmLabel","heading","modalSlug","itemKey","fromFolder","elements","1","_temp2","2","_temp3","i18nKey","variables","toFolder","_temp4","_temp5","_temp6","_temp7","children_1","children_0","children_4","children_3","children_2"],"sources":["../../../../../src/elements/FolderView/Drawers/MoveToFolder/index.tsx"],"sourcesContent":["'use client'\n\nimport type { CollectionSlug, Document } from 'payload'\nimport type {\n FolderBreadcrumb,\n FolderDocumentItemKey,\n FolderOrDocument,\n GetFolderDataResult,\n} from 'payload/shared'\n\nimport { useModal } from '@faceless-ui/modal'\nimport { getTranslation } from '@payloadcms/translations'\nimport { formatFolderOrDocumentItem } from 'payload/shared'\nimport React from 'react'\n\nimport { useConfig } from '../../../../providers/Config/index.js'\nimport { FolderProvider, useFolder } from '../../../../providers/Folders/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\nimport { Button } from '../../../Button/index.js'\nimport { ConfirmationModal } from '../../../ConfirmationModal/index.js'\nimport { useDocumentDrawer } from '../../../DocumentDrawer/index.js'\nimport { Drawer } from '../../../Drawer/index.js'\nimport { DrawerActionHeader } from '../../../DrawerActionHeader/index.js'\nimport { DrawerContentContainer } from '../../../DrawerContentContainer/index.js'\nimport { ListCreateNewDocInFolderButton } from '../../../ListHeader/TitleActions/ListCreateNewDocInFolderButton.js'\nimport { LoadingOverlay } from '../../../Loading/index.js'\nimport { NoListResults } from '../../../NoListResults/index.js'\nimport { Translation } from '../../../Translation/index.js'\nimport { FolderBreadcrumbs } from '../../Breadcrumbs/index.js'\nimport { ColoredFolderIcon } from '../../ColoredFolderIcon/index.js'\nimport { ItemCardGrid } from '../../ItemCardGrid/index.js'\nimport './index.scss'\n\nconst baseClass = 'move-folder-drawer'\nconst baseModalSlug = 'move-folder-drawer'\nconst confirmModalSlug = `${baseModalSlug}-confirm-move`\n\ntype ActionProps =\n | {\n readonly action: 'moveItemsToFolder'\n }\n | {\n readonly action: 'moveItemToFolder'\n readonly title: string\n }\nexport type MoveToFolderDrawerProps = {\n readonly drawerSlug: string\n readonly folderCollectionSlug: string\n readonly folderFieldName: string\n readonly fromFolderID?: number | string\n readonly fromFolderName?: string\n readonly itemsToMove: FolderOrDocument[]\n /**\n * Callback function to be called when the user confirms the move\n *\n * @param folderID - The ID of the folder to move the items to\n */\n readonly onConfirm: (args: {\n id: null | number | string\n name: null | string\n }) => Promise<void> | void\n /**\n * Set to `true` to skip the confirmation modal\n * @default false\n */\n readonly skipConfirmModal?: boolean\n} & ActionProps\n\nexport function MoveItemsToFolderDrawer(props: MoveToFolderDrawerProps) {\n return (\n <Drawer gutter={false} Header={null} slug={props.drawerSlug}>\n <LoadFolderData {...props} />\n </Drawer>\n )\n}\n\nfunction LoadFolderData(props: MoveToFolderDrawerProps) {\n const {\n config: { routes, serverURL },\n } = useConfig()\n const [subfolders, setSubfolders] = React.useState<FolderOrDocument[]>([])\n const [documents, setDocuments] = React.useState<FolderOrDocument[]>([])\n const [breadcrumbs, setBreadcrumbs] = React.useState<FolderBreadcrumb[]>([])\n const [hasLoaded, setHasLoaded] = React.useState(false)\n\n React.useEffect(() => {\n const onLoad = async () => {\n // call some endpoint to load the data\n\n try {\n const folderDataReq = await fetch(\n `${serverURL}${routes.api}/${props.folderCollectionSlug}/populate-folder-data${props.fromFolderID ? `?folderID=${props.fromFolderID}` : ''}`,\n {\n credentials: 'include',\n headers: {\n 'content-type': 'application/json',\n },\n },\n )\n\n if (folderDataReq.status === 200) {\n const folderDataRes: GetFolderDataResult = await folderDataReq.json()\n setBreadcrumbs(folderDataRes?.breadcrumbs || [])\n setSubfolders(folderDataRes?.subfolders || [])\n setDocuments(folderDataRes?.documents || [])\n } else {\n setBreadcrumbs([])\n setSubfolders([])\n setDocuments([])\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(e)\n }\n\n setHasLoaded(true)\n }\n\n if (!hasLoaded) {\n void onLoad()\n }\n }, [props.folderCollectionSlug, routes.api, serverURL, hasLoaded, props.fromFolderID])\n\n if (!hasLoaded) {\n return <LoadingOverlay />\n }\n\n return (\n <FolderProvider\n allowMultiSelection={false}\n breadcrumbs={breadcrumbs}\n documents={documents}\n folderCollectionSlugs={[]}\n folderFieldName={props.folderFieldName}\n folderID={props.fromFolderID}\n subfolders={subfolders}\n >\n <Content {...props} />\n </FolderProvider>\n )\n}\n\nfunction Content({\n drawerSlug,\n fromFolderName,\n itemsToMove,\n onConfirm,\n skipConfirmModal,\n ...props\n}: MoveToFolderDrawerProps) {\n const { closeModal, openModal } = useModal()\n const [count] = React.useState(() => itemsToMove.length)\n const { i18n, t } = useTranslation()\n const {\n addItems,\n breadcrumbs,\n folderCollectionConfig,\n folderCollectionSlug,\n folderFieldName,\n folderID,\n getSelectedItems,\n setFolderID,\n subfolders,\n } = useFolder()\n const [FolderDocumentDrawer, , { closeDrawer: closeFolderDrawer, openDrawer: openFolderDrawer }] =\n useDocumentDrawer({\n collectionSlug: folderCollectionSlug,\n })\n const { getEntityConfig } = useConfig()\n\n const getSelectedFolder = React.useCallback((): {\n id: null | number | string\n name: null | string\n } => {\n const selected = getSelectedItems()\n\n if (selected.length === 0) {\n const lastCrumb = breadcrumbs?.[breadcrumbs.length - 1]\n // use the breadcrumb\n return {\n id: lastCrumb?.id || null,\n name: lastCrumb?.name || null,\n }\n } else {\n // use the selected item\n return {\n id: selected[0].value.id,\n name: selected[0].value._folderOrDocumentTitle,\n }\n }\n }, [breadcrumbs, getSelectedItems])\n\n const onCreateSuccess = React.useCallback(\n ({ collectionSlug, doc }: { collectionSlug: CollectionSlug; doc: Document }) => {\n const collectionConfig = getEntityConfig({ collectionSlug })\n void addItems([\n formatFolderOrDocumentItem({\n folderFieldName,\n isUpload: Boolean(collectionConfig?.upload),\n relationTo: collectionSlug,\n useAsTitle: collectionConfig.admin.useAsTitle,\n value: doc,\n }),\n ])\n },\n [addItems, folderFieldName, getEntityConfig],\n )\n\n const onConfirmMove = React.useCallback(() => {\n if (typeof onConfirm === 'function') {\n void onConfirm(getSelectedFolder())\n }\n }, [getSelectedFolder, onConfirm])\n\n return (\n <>\n <DrawerActionHeader\n onCancel={() => {\n closeModal(drawerSlug)\n }}\n onSave={() => {\n if (skipConfirmModal) {\n onConfirmMove()\n } else {\n openModal(confirmModalSlug)\n }\n }}\n saveLabel={t('general:select')}\n title={\n <DrawerHeading\n action={props.action}\n count={count}\n fromFolderName={props.fromFolderID ? fromFolderName : undefined}\n title={props.action === 'moveItemToFolder' ? props.title : undefined}\n />\n }\n />\n\n <div className={`${baseClass}__breadcrumbs-section`}>\n <FolderBreadcrumbs\n breadcrumbs={[\n {\n id: null,\n name: (\n <span className={`${baseClass}__folder-breadcrumbs-root`}>\n <ColoredFolderIcon />\n {t('folder:folders')}\n </span>\n ),\n onClick: breadcrumbs.length\n ? () => {\n void setFolderID({ folderID: null })\n }\n : undefined,\n },\n ...breadcrumbs.map((crumb, index) => ({\n id: crumb.id,\n name: crumb.name,\n onClick:\n index !== breadcrumbs.length - 1\n ? () => {\n void setFolderID({ folderID: crumb.id })\n }\n : undefined,\n })),\n ]}\n />\n {subfolders.length > 0 && (\n <>\n <Button\n buttonStyle=\"pill\"\n className={`${baseClass}__add-folder-button`}\n margin={false}\n onClick={() => {\n openFolderDrawer()\n }}\n >\n {t('fields:addLabel', {\n label: getTranslation(folderCollectionConfig.labels?.singular, i18n),\n })}\n </Button>\n <FolderDocumentDrawer\n initialData={{\n [folderFieldName]: folderID,\n }}\n onSave={(result) => {\n if (typeof onCreateSuccess === 'function') {\n void onCreateSuccess({\n collectionSlug: folderCollectionConfig.slug,\n doc: result.doc,\n })\n }\n closeFolderDrawer()\n }}\n redirectAfterCreate={false}\n />\n </>\n )}\n </div>\n\n <DrawerContentContainer className={`${baseClass}__body-section`}>\n {subfolders.length > 0 ? (\n <ItemCardGrid\n disabledItemKeys={new Set(itemsToMove.map(({ itemKey }) => itemKey))}\n items={subfolders}\n selectedItemKeys={\n new Set<FolderDocumentItemKey>([`${folderCollectionSlug}-${getSelectedFolder().id}`])\n }\n type=\"folder\"\n />\n ) : (\n <NoListResults\n Actions={[\n <ListCreateNewDocInFolderButton\n buttonLabel={`${t('general:create')} ${getTranslation(folderCollectionConfig.labels?.singular, i18n).toLowerCase()}`}\n collectionSlugs={[folderCollectionSlug]}\n key=\"create-folder\"\n onCreateSuccess={onCreateSuccess}\n slugPrefix=\"create-new-folder-from-drawer--no-results\"\n />,\n ]}\n Message={\n <p>\n {i18n.t('general:noResults', {\n label: `${getTranslation(folderCollectionConfig.labels?.plural, i18n)}`,\n })}\n </p>\n }\n />\n )}\n </DrawerContentContainer>\n\n {!skipConfirmModal && (\n <ConfirmationModal\n body={\n <ConfirmationMessage\n action={props.action}\n count={count}\n fromFolderName={fromFolderName}\n title={props.action === 'moveItemToFolder' ? props.title : undefined}\n toFolderName={getSelectedFolder().name}\n />\n }\n confirmingLabel={t('general:moving')}\n confirmLabel={t('general:move')}\n heading={t('general:confirmMove')}\n modalSlug={confirmModalSlug}\n onConfirm={onConfirmMove}\n />\n )}\n </>\n )\n}\n\nfunction DrawerHeading(\n props: { count?: number } & ActionProps & Pick<MoveToFolderDrawerProps, 'fromFolderName'>,\n): string {\n const { t } = useTranslation()\n\n switch (props.action) {\n case 'moveItemToFolder':\n // moving current folder from list view actions menu\n // or moving item from edit view\n if (props.fromFolderName) {\n // move from folder\n return t('folder:movingFromFolder', {\n fromFolder: props.fromFolderName,\n title: props.title,\n })\n } else {\n // move from root\n return t('folder:selectFolderForItem', {\n title: props.title,\n })\n }\n\n case 'moveItemsToFolder':\n if (props.fromFolderName) {\n // move from folder\n return t('folder:movingFromFolder', {\n fromFolder: props.fromFolderName,\n title: `${props.count} ${props.count > 1 ? t('general:items') : t('general:item')}`,\n })\n } else {\n // move from root\n return t('folder:selectFolderForItem', {\n title: `${props.count} ${props.count > 1 ? t('general:items') : t('general:item')}`,\n })\n }\n }\n}\n\nfunction ConfirmationMessage(\n props: { count?: number; toFolderName?: string } & ActionProps &\n Pick<MoveToFolderDrawerProps, 'fromFolderName'>,\n) {\n const { t } = useTranslation()\n\n switch (props.action) {\n case 'moveItemToFolder':\n // moving current folder from list view actions menu\n // or moving item from edit view\n if (props.toFolderName) {\n // move to destination\n // You are about to move {{title}} to {{toFolder}}. Are you sure?\n return (\n <Translation\n elements={{\n 1: ({ children }) => <strong>{children}</strong>,\n 2: ({ children }) => <strong>{children}</strong>,\n }}\n i18nKey=\"folder:moveItemToFolderConfirmation\"\n t={t}\n variables={{\n title: props.title,\n toFolder: props.toFolderName,\n }}\n />\n )\n } else {\n // move to root\n // You are about to move {{title}} to the root folder. Are you sure?\n return (\n <Translation\n elements={{\n 1: ({ children }) => <strong>{children}</strong>,\n }}\n i18nKey=\"folder:moveItemToRootConfirmation\"\n t={t}\n variables={{\n title: props.title,\n }}\n />\n )\n }\n\n case 'moveItemsToFolder':\n // moving many (documents/folders) from list view\n if (props.toFolderName) {\n // move to destination\n // You are about to move {{count}} {{label}} to {{toFolder}}. Are you sure?\n return (\n <Translation\n elements={{\n 1: ({ children }) => <strong>{children}</strong>,\n 2: ({ children }) => <strong>{children}</strong>,\n }}\n i18nKey=\"folder:moveItemsToFolderConfirmation\"\n t={t}\n variables={{\n count: props.count,\n label: props.count > 1 ? t('general:items') : t('general:item'),\n toFolder: props.toFolderName,\n }}\n />\n )\n } else {\n // move to root\n // You are about to move {{count}} {{label}} to the root folder. Are you sure?\n return (\n <Translation\n elements={{\n 1: ({ children }) => <strong>{children}</strong>,\n }}\n i18nKey=\"folder:moveItemsToRootConfirmation\"\n t={t}\n variables={{\n count: props.count,\n label: props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3G,KAAA,CAAAiD,KAAA,IAAc,GAAIE,CAAA,CAAE,mBAAmBA,CAAA,CAAE;cAAA;YAAA,C;;;;;;;iBARpDZ,E;;;;;AApEV,SAAA0G,OAAA1G,EAAA;EAsEkB;IAAA2D,QAAA,EAAAgD;EAAA,IAAA3G,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAAiG,QAAA,EAAQA;EAAA,C;;AAtE5C,SAAA8C,OAAAzG,EAAA;EAqDkB;IAAA2D,QAAA,EAAAiD;EAAA,IAAA5G,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAAiG,QAAA,EAAQA;EAAA,C;;AArD5C,SAAA6C,OAAAxG,EAAA;EAoDkB;IAAA2D;EAAA,IAAA3D,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAAiG;EAAA,C;;AApDpC,SAAA4C,OAAAvG,EAAA;EAiCkB;IAAA2D,QAAA,EAAAkD;EAAA,IAAA7G,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAAiG,QAAA,EAAQA;EAAA,C;;AAjC5C,SAAAwC,OAAAnG,EAAA;EAiBkB;IAAA2D,QAAA,EAAAmD;EAAA,IAAA9G,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAAiG,QAAA,EAAQA;EAAA,C;;AAjB5C,SAAAsC,OAAAjG,EAAA;EAgBkB;IAAA2D,QAAA,EAAAoD;EAAA,IAAA/G,EAAY;EAAA,OAAKtC,IAAA,CAAC;IAAAiG,QAAA,EAAQA;EAAA,C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../../../src/elements/FolderView/Field/index.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAI3D,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,eAAe,UAAW,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../../../src/elements/FolderView/Field/index.server.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAI3D,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,eAAe,UAAW,4BAA4B,gCAWlE,CAAA"}
|
|
@@ -4,8 +4,12 @@ import { MoveDocToFolder } from '../../../exports/client/index.js';
|
|
|
4
4
|
import './index.scss';
|
|
5
5
|
const baseClass = 'folder-edit-field';
|
|
6
6
|
export const FolderEditField = props => {
|
|
7
|
+
if (props.payload.config.folders === false) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
7
10
|
return /*#__PURE__*/_jsx(MoveDocToFolder, {
|
|
8
11
|
className: baseClass,
|
|
12
|
+
folderCollectionSlug: props.payload.config.folders.slug,
|
|
9
13
|
folderFieldName: props.payload.config.folders.fieldName
|
|
10
14
|
});
|
|
11
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","names":["MoveDocToFolder","baseClass","FolderEditField","props","
|
|
1
|
+
{"version":3,"file":"index.server.js","names":["MoveDocToFolder","baseClass","FolderEditField","props","payload","config","folders","_jsx","className","folderCollectionSlug","slug","folderFieldName","fieldName"],"sources":["../../../../src/elements/FolderView/Field/index.server.tsx"],"sourcesContent":["import type { RelationshipFieldServerProps } from 'payload'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { MoveDocToFolder } from '../../../exports/client/index.js'\nimport './index.scss'\n\nconst baseClass = 'folder-edit-field'\n\nexport const FolderEditField = (props: RelationshipFieldServerProps) => {\n if (props.payload.config.folders === false) {\n return null\n }\n return (\n <MoveDocToFolder\n className={baseClass}\n folderCollectionSlug={props.payload.config.folders.slug}\n folderFieldName={props.payload.config.folders.fieldName}\n />\n )\n}\n"],"mappings":";AAEA;AACA,SAASA,eAAe,QAAQ;AAChC,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,eAAA,GAAmBC,KAAA;EAC9B,IAAIA,KAAA,CAAMC,OAAO,CAACC,MAAM,CAACC,OAAO,KAAK,OAAO;IAC1C,OAAO;EACT;EACA,oBACEC,IAAA,CAACP,eAAA;IACCQ,SAAA,EAAWP,SAAA;IACXQ,oBAAA,EAAsBN,KAAA,CAAMC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACI,IAAI;IACvDC,eAAA,EAAiBR,KAAA,CAAMC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACM;;AAGpD","ignoreList":[]}
|
|
@@ -5,30 +5,33 @@ import './index.scss';
|
|
|
5
5
|
/**
|
|
6
6
|
* This is the button shown on the edit document view. It uses the more generic `MoveDocToFolderButton` component.
|
|
7
7
|
*/
|
|
8
|
-
export declare function MoveDocToFolder({ buttonProps, className, folderFieldName, }: {
|
|
9
|
-
buttonProps?: Partial<ButtonProps>;
|
|
10
|
-
className?: string;
|
|
11
|
-
|
|
8
|
+
export declare function MoveDocToFolder({ buttonProps, className, folderCollectionSlug, folderFieldName, }: {
|
|
9
|
+
readonly buttonProps?: Partial<ButtonProps>;
|
|
10
|
+
readonly className?: string;
|
|
11
|
+
readonly folderCollectionSlug: string;
|
|
12
|
+
readonly folderFieldName: string;
|
|
12
13
|
}): React.JSX.Element;
|
|
13
14
|
type MoveDocToFolderButtonProps = {
|
|
14
|
-
buttonProps?: Partial<ButtonProps>;
|
|
15
|
-
className?: string;
|
|
16
|
-
collectionSlug: string;
|
|
17
|
-
docData: FolderOrDocument['value'];
|
|
18
|
-
docID: number | string;
|
|
19
|
-
docTitle?: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
readonly buttonProps?: Partial<ButtonProps>;
|
|
16
|
+
readonly className?: string;
|
|
17
|
+
readonly collectionSlug: string;
|
|
18
|
+
readonly docData: FolderOrDocument['value'];
|
|
19
|
+
readonly docID: number | string;
|
|
20
|
+
readonly docTitle?: string;
|
|
21
|
+
readonly folderCollectionSlug: string;
|
|
22
|
+
readonly folderFieldName: string;
|
|
23
|
+
readonly fromFolderID?: number | string;
|
|
24
|
+
readonly fromFolderName: string;
|
|
25
|
+
readonly modalSlug: string;
|
|
26
|
+
readonly onConfirm?: (args: {
|
|
24
27
|
id: number | string;
|
|
25
28
|
name: string;
|
|
26
29
|
}) => Promise<void> | void;
|
|
27
|
-
skipConfirmModal?: boolean;
|
|
30
|
+
readonly skipConfirmModal?: boolean;
|
|
28
31
|
};
|
|
29
32
|
/**
|
|
30
33
|
* This is a more generic button that can be used in other contexts, such as table cells and the edit view.
|
|
31
34
|
*/
|
|
32
|
-
export declare const MoveDocToFolderButton: ({ buttonProps, className, collectionSlug, docData, docID, docTitle, fromFolderID, fromFolderName, modalSlug, onConfirm, skipConfirmModal, }: MoveDocToFolderButtonProps) => React.JSX.Element;
|
|
35
|
+
export declare const MoveDocToFolderButton: ({ buttonProps, className, collectionSlug, docData, docID, docTitle, folderCollectionSlug, folderFieldName, fromFolderID, fromFolderName, modalSlug, onConfirm, skipConfirmModal, }: MoveDocToFolderButtonProps) => React.JSX.Element;
|
|
33
36
|
export {};
|
|
34
37
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/FolderView/MoveDocToFolder/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAItD,OAAO,KAAgB,MAAM,OAAO,CAAA;AAGpC,OAAO,KAAK,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAUjE,OAAO,cAAc,CAAA;AAIrB;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,SAAc,EACd,eAAe,GAChB,EAAE;IACD,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/FolderView/MoveDocToFolder/index.ts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