@bindu-dashing/dam-solution-v2 5.8.14 → 5.8.15
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.
|
@@ -105,6 +105,7 @@ function FolderTree({ currentRootId, expandedKeys, selectedKeys, handleExpand, s
|
|
|
105
105
|
});
|
|
106
106
|
const response = yield api.get(`${FETCH_FOLDER_URL.replace(":folderId", fid)}?isPagination=false&includeFiles=false&includeSubFoldersCount=true&fetchMainFolders=true&globalSearch=${fid == rootFolderId ? globalSearch : ""}`);
|
|
107
107
|
const newFolders = get(response, "data.folders", []);
|
|
108
|
+
console.log('## newFolders', newFolders);
|
|
108
109
|
if (fid === rootFolderId) {
|
|
109
110
|
setFolders(sortFoldersRecursively(newFolders, "name", sortOrder));
|
|
110
111
|
}
|
|
@@ -159,6 +160,7 @@ function FolderTree({ currentRootId, expandedKeys, selectedKeys, handleExpand, s
|
|
|
159
160
|
const toggleEditModal = (folder = {}) => setState((prev) => (Object.assign(Object.assign({}, prev), { selectedFolder: folder, showEditModal: !prev.showEditModal })));
|
|
160
161
|
const toggleDeleteModal = (folder = {}) => setState((prev) => (Object.assign(Object.assign({}, prev), { selectedFolder: folder, showConfirmationModal: !prev.showConfirmationModal })));
|
|
161
162
|
const getFoldersTree = (folders = []) => {
|
|
163
|
+
console.log('## folders', folders);
|
|
162
164
|
const transform = (tree = []) => map(tree, (folder) => {
|
|
163
165
|
const key = get(folder, "_id", "");
|
|
164
166
|
const name = get(folder, "name", "");
|
|
@@ -319,6 +321,7 @@ function FolderTree({ currentRootId, expandedKeys, selectedKeys, handleExpand, s
|
|
|
319
321
|
return Object.assign(Object.assign({}, prevState), { tempFolders: cloneDeep(customSorted), sortMode: "custom", enableDrag: false });
|
|
320
322
|
});
|
|
321
323
|
};
|
|
324
|
+
console.log('## folders in FolderTree', tempFolders, folders);
|
|
322
325
|
return (_jsxs(_Fragment, { children: [!screens.md && collapse && (_jsxs("div", { className: `md-lib-bg-textColorActive dark:md-lib-bg-darkSecondaryColor md-lib-p-1 md-lib-rounded md-lib-absolute md-lib-top-16 md-lib-left-1`, children: [" ", _jsx(FaAngleRightbtn, { size: 24, className: "md-lib-text-textColor dark:md-lib-text-darkTextColor", onClick: toggleMenu })] })), _jsxs("div", { className: `md-lib-border-r md-lib-inline-table md-lib-border-borderColor dark:md-lib-border-darkBorderColor md-lib-bg-white dark:md-lib-bg-darkPrimaryHoverColor md-lib-px-2 md-lib-pt-1 md-lib-max-h-[calc(100%-76px)] md-lib-overflow-x-auto ${!screens.md &&
|
|
323
326
|
"md-lib-absolute md-lib-left-0 md-lib-z-30 md-lib-h-full"} ${!screens.md && collapse && "!-md-lib-left-full"}`, children: [!screens.md && !collapse && (_jsxs("div", { className: `md-lib-bg-textColorActive dark:md-lib-bg-darkSecondaryColor md-lib-p-1 md-lib-rounded md-lib-absolute md-lib-top-1 md-lib-right-1 md-lib-z-50`, children: [" ", _jsx(FaAngleLeftbtn, { size: 24, className: "md-lib-text-textColor dark:md-lib-text-darkTextColor", onClick: toggleMenu })] })), _jsx("div", { className: "md-lib-mb-2", children: _jsx(Input, { placeholder: "Search files (min. 2 characters required)", onChange: (e) => setState((prevState) => {
|
|
324
327
|
return Object.assign(Object.assign({}, prevState), { globalSearchValue: e.target.value });
|
|
@@ -19,16 +19,6 @@ export default function MyDriveMainContainer({ folders, setFolders }) {
|
|
|
19
19
|
if (params === null || params === void 0 ? void 0 : params.folderId) {
|
|
20
20
|
setSelectedKeys(params.folderId);
|
|
21
21
|
}
|
|
22
|
-
else if (params === null || params === void 0 ? void 0 : params.id) {
|
|
23
|
-
setSelectedKeys(params.id);
|
|
24
|
-
}
|
|
25
|
-
else if (params === null || params === void 0 ? void 0 : params.parentId) {
|
|
26
|
-
setSelectedKeys(params.parentId);
|
|
27
|
-
}
|
|
28
|
-
else if (rootFolderId) {
|
|
29
|
-
// Fallback to rootFolderId from config
|
|
30
|
-
setSelectedKeys(rootFolderId);
|
|
31
|
-
}
|
|
32
22
|
}, [params === null || params === void 0 ? void 0 : params.folderId, params === null || params === void 0 ? void 0 : params.id, params === null || params === void 0 ? void 0 : params.parentId, rootFolderId]);
|
|
33
23
|
const currentRootId = isArray(selectedKeys)
|
|
34
24
|
? selectedKeys.length
|