@bindu-dashing/dam-solution-v2 5.8.92 → 5.8.94

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
  }
@@ -215,9 +215,16 @@ function ImagePickerFiltersComponent({ id, onSelect, url, value, fileId, }) {
215
215
  var _a;
216
216
  return Object.assign(Object.assign({}, prevState), { selectedFileId: val, selectedFileUrl: (_a = option === null || option === void 0 ? void 0 : option.file) === null || _a === void 0 ? void 0 : _a.thumbnailUrl, selectedFieldName: "" });
217
217
  });
218
- } }, "IMAGE_THUMBNAIL"), (state === null || state === void 0 ? void 0 : state.selectedFileUrl) && (_jsx("img", { src: state === null || state === void 0 ? void 0 : state.selectedFileUrl, width: 200, style: {
219
- borderRadius: "10px",
218
+ } }, "IMAGE_THUMBNAIL"), (state === null || state === void 0 ? void 0 : state.selectedFileUrl) && (_jsx("div", { style: {
219
+ backgroundImage: "linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%)",
220
+ backgroundSize: "16px 16px",
221
+ backgroundPosition: "0 0, 0 8px, 8px -8px, -8px 0px",
222
+ display: "inline-block",
220
223
  marginTop: "10px",
221
- }, alt: "Selected file preview" }, state === null || state === void 0 ? void 0 : state.selectedFileUrl))] })] })] })) })) }));
224
+ borderRadius: "10px",
225
+ }, children: _jsx("img", { src: state === null || state === void 0 ? void 0 : state.selectedFileUrl, width: 200, style: {
226
+ borderRadius: "10px",
227
+ display: "block",
228
+ }, alt: "Selected file preview" }, state === null || state === void 0 ? void 0 : state.selectedFileUrl) }))] })] })] })) })) }));
222
229
  }
223
230
  export default ImagePickerFiltersComponent;
@@ -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") {
@@ -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.92",
3
+ "version": "5.8.94",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",