@bindu-dashing/dam-solution-v2 5.8.93 → 5.8.95

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.
@@ -23,8 +23,6 @@ function TestImagePickerModal({ imagePicker, open, toggleModal, setSelectedFile,
23
23
  const damConfig = useDamConfig();
24
24
  const { rootFolderId } = damConfig;
25
25
  const pickerFolderId = get(imagePicker, "folderId");
26
- console.log('## TestImagePickerModal - imagePicker:', imagePicker);
27
- console.log('## TestImagePickerModal - pickerFolderId:', pickerFolderId, 'rootFolderId:', rootFolderId);
28
26
  const [state, setState] = useState({
29
27
  parentFolderId: pickerFolderId || rootFolderId || '',
30
28
  fileForConfirmation: {},
@@ -32,7 +30,6 @@ function TestImagePickerModal({ imagePicker, open, toggleModal, setSelectedFile,
32
30
  const [folders, setFolders] = useState([]);
33
31
  const [globalSearch, setGlobalSearch] = useState("");
34
32
  const api = useMemo(() => createApiClient(damConfig), [damConfig]);
35
- // Update parentFolderId when imagePicker or rootFolderId changes
36
33
  useEffect(() => {
37
34
  const newFolderId = pickerFolderId || rootFolderId || '';
38
35
  if (newFolderId && newFolderId !== state.parentFolderId) {
@@ -39,8 +39,6 @@ function ImagePicker({ id, onSelect, url, }) {
39
39
  try {
40
40
  setLoading(true);
41
41
  const response = yield api.get(FETCH_IMAGEPICKER_URL.replace(":id", id));
42
- console.log("## ImagePicker config response:", response);
43
- console.log("## ImagePicker includeSubFolders:", get(response, "data.includeSubFolders"));
44
42
  setPicker(get(response, "data", {}));
45
43
  setLoading(false);
46
44
  }
@@ -73,8 +73,6 @@ function DriveContainer({ parentFolderId, setSelectedFile, setParentFolderId, pi
73
73
  return params;
74
74
  };
75
75
  console.log('## folderId', parentFolderId);
76
- console.log('## imagePicker config:', imagePicker);
77
- console.log('## imagePicker.includeSubFolders:', get(imagePicker, "includeSubFolders"));
78
76
  const folderParams = merge({}, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ page: DEFAULT_PAGE }, (type ? { category: type } : {})), (!!imagePicker
79
77
  ? {
80
78
  includeSubFolders: get(imagePicker, "includeSubFolders", true),
@@ -85,10 +83,7 @@ function DriveContainer({ parentFolderId, setSelectedFile, setParentFolderId, pi
85
83
  : {})), (!!folderSearch ? { name: folderSearch } : {})), (!!globalSearch && ((parentFolderId || folderId || id) === rootFolderId || !(parentFolderId || folderId || id))
86
84
  ? { globalSearch }
87
85
  : {})), { sortBy: sortBy, sortOrder: sortOrder }), Object.assign(Object.assign({}, getDateRangeFromKey(selectedDateKey)), (!!selectedType ? { type: selectedType } : {})));
88
- // Compute the effective folderId with proper fallback
89
86
  const effectiveFolderId = parentFolderId || folderId || id || rootFolderId || '';
90
- console.log('## folderParams being sent to useFolders:', folderParams);
91
- console.log('## effectiveFolderId:', effectiveFolderId, 'parentFolderId:', parentFolderId, 'folderId:', folderId, 'id:', id, 'rootFolderId:', rootFolderId);
92
87
  const { data: foldersPaginatedData, isLoading, hasNextPage, fetchNextPage, refetch, isFetching, error, } = useFolders(api, generateFoldersQueryKey(type), folderParams, effectiveFolderId);
93
88
  useEffect(() => {
94
89
  if (typeof window !== "undefined") {
@@ -10,6 +10,7 @@ import { createApiClient } from "../../hocs/configureAxios";
10
10
  import { useDamConfig } from "../../hocs/DamConfigContext";
11
11
  import useAppParams from "../../utilities/useAppParams";
12
12
  const FileDetails = ({ open, handleClose, file, files, onCloseSelection, }) => {
13
+ console.log("files", files, "file", file);
13
14
  const { id } = useAppParams();
14
15
  const damConfig = useDamConfig();
15
16
  const api = useMemo(() => createApiClient(damConfig), [damConfig]);
@@ -20,6 +21,7 @@ const FileDetails = ({ open, handleClose, file, files, onCloseSelection, }) => {
20
21
  });
21
22
  const { visible, currentIndex, currentFileId } = state;
22
23
  const { data: fileData, isFetching, refetch } = useFile(api, currentFileId);
24
+ console.log("fileData", fileData, "isFetching", isFetching);
23
25
  if (typeof window === "undefined" || typeof document === "undefined") {
24
26
  return null;
25
27
  }
@@ -33,6 +35,7 @@ const FileDetails = ({ open, handleClose, file, files, onCloseSelection, }) => {
33
35
  prevFileId.current = currentFileId;
34
36
  }, [currentFileId]);
35
37
  const currentFile = useMemo(() => {
38
+ console.log("currentFile", currentFile, "file", file, "fileData", fileData, "isFetching", isFetching, "id", id);
36
39
  if (id) {
37
40
  return file;
38
41
  }
@@ -14,12 +14,11 @@ import { getBaseUrl } from "./helpers";
14
14
  import { USER_LOGIN } from "../utilities/constants/apiUrls";
15
15
  import { SUBSCRIPTION_EXPIRED_ERROR_MESSAGE } from "./appConstants";
16
16
  export const createApiClient = ({ accessToken, appType, subdomain, damAccessKey, secretKey, teamIds, setAccessToken, setDamUser, setBrand, setRootFolderId, }) => {
17
- const STATIC_MIXDRIVE_API_URL = "https://yjeregc921.execute-api.ap-south-1.amazonaws.com/staging/v1";
18
17
  const api = axios.create({
19
18
  timeout: 900000,
20
19
  baseURL: appType === "reactJs"
21
- ? process.env.REACT_APP_MIXDRIVE_API_URL || STATIC_MIXDRIVE_API_URL
22
- : process.env.NEXT_PUBLIC_MIXDRIVE_API_URL || STATIC_MIXDRIVE_API_URL,
20
+ ? process.env.REACT_APP_MIXDRIVE_API_URL
21
+ : process.env.NEXT_PUBLIC_MIXDRIVE_API_URL,
23
22
  });
24
23
  api.interceptors.request.use((request) => {
25
24
  request.headers["subdomain"] = subdomain;
@@ -93,14 +93,13 @@ export const getDateRangeFromKey = (key) => {
93
93
  }
94
94
  };
95
95
  export const getBaseUrl = (appType) => {
96
- const STATIC_MIXDRIVE_API_URL = "https://yjeregc921.execute-api.ap-south-1.amazonaws.com/staging/v1";
97
96
  switch (appType) {
98
97
  case "reactJs":
99
- return process.env.REACT_APP_MIXDRIVE_API_URL || STATIC_MIXDRIVE_API_URL;
98
+ return process.env.REACT_APP_MIXDRIVE_API_URL || "";
100
99
  case "nextJs":
101
- return process.env.NEXT_PUBLIC_MIXDRIVE_API_URL || STATIC_MIXDRIVE_API_URL;
100
+ return process.env.NEXT_PUBLIC_MIXDRIVE_API_URL || "";
102
101
  default:
103
- return process.env.REACT_APP_MIXDRIVE_API_URL || STATIC_MIXDRIVE_API_URL;
102
+ return process.env.REACT_APP_MIXDRIVE_API_URL || "";
104
103
  }
105
104
  };
106
105
  export const getRelativeTime = (timestamp) => {
@@ -16,7 +16,6 @@ import { useInfiniteQuery } from "react-query";
16
16
  function fetchFolders(api, params, folderId) {
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
18
  try {
19
- console.log('## fetchFolders params:', params, 'folderId:', folderId);
20
19
  const response = yield api.get(`${get(params, "category") === DriveModes.STARRED
21
20
  ? FETCH_STARRED_FOLDERS_URL
22
21
  : get(params, "category") === DriveModes.RECENTS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.93",
3
+ "version": "5.8.95",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",