@bindu-dashing/dam-solution-v2 5.8.94 → 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.
|
@@ -215,16 +215,9 @@ 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("
|
|
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",
|
|
223
|
-
marginTop: "10px",
|
|
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: {
|
|
224
219
|
borderRadius: "10px",
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
display: "block",
|
|
228
|
-
}, alt: "Selected file preview" }, state === null || state === void 0 ? void 0 : state.selectedFileUrl) }))] })] })] })) })) }));
|
|
220
|
+
marginTop: "10px",
|
|
221
|
+
}, alt: "Selected file preview" }, state === null || state === void 0 ? void 0 : state.selectedFileUrl))] })] })] })) })) }));
|
|
229
222
|
}
|
|
230
223
|
export default ImagePickerFiltersComponent;
|
|
@@ -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
|
}
|