@bindu-dashing/dam-solution-v2 5.8.26 → 5.8.27

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.
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
11
  import { Button, Dropdown, Grid, Input, Select, Tooltip, Tree } from "antd";
12
- import { useEffect, useMemo, useState, useRef } from "react";
12
+ import { useEffect, useMemo, useState } from "react";
13
13
  import { get, map, isArray, isObject, cloneDeep, first, sortBy, } from "lodash";
14
14
  import { FaAngleLeft, FaAngleRight } from "react-icons/fa";
15
15
  import { deleteFolders, } from "../react-query/services/folder-services";
@@ -149,17 +149,8 @@ function FolderTree({ currentRootId, expandedKeys, selectedKeys, handleExpand, s
149
149
  }
150
150
  });
151
151
  // ✅ Load on mount & when currentRootId changes
152
- // Use ref to track previous currentRootId to prevent unnecessary fetches
153
- const prevCurrentRootIdRef = useRef(null);
154
152
  useEffect(() => {
155
- if (currentRootId && currentRootId !== prevCurrentRootIdRef.current) {
156
- console.log('## FolderTree useEffect - currentRootId changed from', prevCurrentRootIdRef.current, 'to', currentRootId, 'rootFolderId:', rootFolderId);
157
- prevCurrentRootIdRef.current = currentRootId;
158
- fetchFolders(currentRootId);
159
- }
160
- else if (globalSearch !== globalSearchValue && currentRootId === rootFolderId) {
161
- // Only refetch on global search change if we're on root folder
162
- console.log('## FolderTree useEffect - globalSearch changed, refetching root folder');
153
+ if (currentRootId) {
163
154
  fetchFolders(currentRootId);
164
155
  }
165
156
  }, [currentRootId, globalSearch]);
@@ -190,7 +181,6 @@ function FolderTree({ currentRootId, expandedKeys, selectedKeys, handleExpand, s
190
181
  const toggleEditModal = (folder = {}) => setState((prev) => (Object.assign(Object.assign({}, prev), { selectedFolder: folder, showEditModal: !prev.showEditModal })));
191
182
  const toggleDeleteModal = (folder = {}) => setState((prev) => (Object.assign(Object.assign({}, prev), { selectedFolder: folder, showConfirmationModal: !prev.showConfirmationModal })));
192
183
  const getFoldersTree = (folders = []) => {
193
- console.log('## folders', folders);
194
184
  const transform = (tree = []) => map(tree, (folder) => {
195
185
  const key = get(folder, "_id", "");
196
186
  const name = get(folder, "name", "");
@@ -246,7 +236,6 @@ function FolderTree({ currentRootId, expandedKeys, selectedKeys, handleExpand, s
246
236
  if (get(selected, "length") > 0) {
247
237
  const selectedId = selected[get(selected, "length", 0) - 1];
248
238
  // navigate(SUBFOLDERS_SCREEN.replace(":folderId", selectedId));
249
- console.log('## selectedId', selectedId);
250
239
  }
251
240
  };
252
241
  useEffect(() => {
@@ -352,7 +341,6 @@ function FolderTree({ currentRootId, expandedKeys, selectedKeys, handleExpand, s
352
341
  return Object.assign(Object.assign({}, prevState), { tempFolders: cloneDeep(customSorted), sortMode: "custom", enableDrag: false });
353
342
  });
354
343
  };
355
- console.log('## folders in FolderTree', tempFolders, folders);
356
344
  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 &&
357
345
  "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) => {
358
346
  return Object.assign(Object.assign({}, prevState), { globalSearchValue: e.target.value });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.26",
3
+ "version": "5.8.27",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",