@bindu-dashing/dam-solution-v2 5.8.103 → 5.8.104

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.
@@ -195,7 +195,7 @@ export default function EditAssetTemplate({ assetTemplate, inputTypes, }) {
195
195
  onChange: (val) => setState((prevState) => (Object.assign(Object.assign({}, prevState), { name: val }))),
196
196
  icon: _jsx(FiEdit2Icon, { size: 15, className: "md-lib-ml-2" }),
197
197
  }, children: name })] })),
198
- right: (_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-2 md-lib-ml-auto", children: [imagePickerOutputFormatError && (_jsx("p", { className: "md-lib-text-sm md-lib-text-red-500", children: "Please fix the errors in the Image Picker Output format" })), _jsx(CustomButton, { label: "Cancel", onClick: () => {
198
+ right: (_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-2 md-lib-ml-auto", children: [imagePickerOutputFormatError && (_jsx("p", { className: "md-lib-text-sm md-lib-text-red-500", children: "Please ensure that all required fields (except the last one) have separators configured" })), _jsx(CustomButton, { label: "Cancel", onClick: () => {
199
199
  if (navigate) {
200
200
  navigate(ASSETS_SCREEN);
201
201
  }
@@ -45,7 +45,6 @@ const ActionsBar = ({ fileIds, folderIds, onCloseSelection, selectedFilesData =
45
45
  setState((prevState) => (Object.assign(Object.assign({}, prevState), { showShareModal: !prevState.showShareModal })));
46
46
  };
47
47
  const folders = getFolderData(queryClient, folderId ? folderId : rootFolderId, generateFoldersQueryKey(type));
48
- // Use selectedFilesData if provided, otherwise fall back to cache lookup
49
48
  const selectedFolder = useMemo(() => {
50
49
  if (get(folderIds, "length") === 1) {
51
50
  // First try from selectedFilesData
@@ -151,21 +150,12 @@ const ActionsBar = ({ fileIds, folderIds, onCloseSelection, selectedFilesData =
151
150
  },
152
151
  });
153
152
  const onDownloadFiles = () => {
154
- const downloadUrl = get(effectiveFile, "downloadUrl") || get(effectiveFile, "s3Url") || get(effectiveFile, "thumbnailUrl");
155
- const isSingleFile = get(fileIds, "length") === 1 && get(folderIds, "length") === 0;
156
- // If single file with downloadUrl available, open directly in new tab
157
- if (isSingleFile && downloadUrl) {
158
- window.open(downloadUrl, "_blank");
159
- onCloseSelection();
160
- }
161
- else {
162
- // For multiple files/folders or when downloadUrl is not available, use API
163
- downloadFileMutation.mutate({
164
- fileIds,
165
- folderIds,
166
- api,
167
- });
168
- }
153
+ // Always use API endpoint to ensure download history is tracked
154
+ downloadFileMutation.mutate({
155
+ fileIds,
156
+ folderIds,
157
+ api,
158
+ });
169
159
  };
170
160
  const fileLinks = useMemo(() => {
171
161
  return map(fileIds, (id) => `${appType == "reactJs"
@@ -212,20 +212,12 @@ function FileMenuOptions({ file, folderIds = [], fileIds = [], folder, onCloseSe
212
212
  const fileToUse = effectiveFile;
213
213
  // Build fileIds list - use file._id if file exists, otherwise use fileIds prop
214
214
  const fileIdsList = fileToUse && get(fileToUse, "_id") ? [get(fileToUse, "_id")] : fileIds;
215
- const downloadUrl = get(fileToUse, "downloadUrl") || get(fileToUse, "s3Url") || get(fileToUse, "thumbnailUrl");
216
- const isSingleFile = get(fileIdsList, "length", 0) === 1 && get(folderIds, "length", 0) === 0;
217
- // If single file with downloadUrl available, open directly in new tab
218
- if (isSingleFile && downloadUrl) {
219
- window.open(downloadUrl, "_blank");
220
- }
221
- else {
222
- // For multiple files/folders or when downloadUrl is not available, use API
223
- downloadFileMutation.mutate({
224
- fileIds: fileIdsList,
225
- folderIds: folderIds,
226
- api,
227
- });
228
- }
215
+ // Always use API endpoint to ensure download history is tracked
216
+ downloadFileMutation.mutate({
217
+ fileIds: fileIdsList,
218
+ folderIds: folderIds,
219
+ api,
220
+ });
229
221
  };
230
222
  const onFavSuccess = (message) => {
231
223
  invalidateData(queryClient, generateFoldersQueryKey(type), folderId ? folderId : rootFolderId);
@@ -102,7 +102,6 @@ const FileDetails = ({ open, handleClose, file, files, fileIds, onCloseSelection
102
102
  }, [open]);
103
103
  if (!open && !visible)
104
104
  return null;
105
- console.log("currentFile", currentFile);
106
105
  const modalContent = (_jsxs("div", { className: `md-lib-fixed md-lib-inset-0 md-lib-z-[1000] md-lib-w-screen md-lib-h-screen md-lib-bg-white dark:md-lib-bg-darkPrimary md-lib-text-black dark:md-lib-text-white md-lib-overflow-auto md-lib-transform md-lib-transition-all md-lib-duration-300 md-lib-ease-in-out ${open && visible
107
106
  ? "md-lib-opacity-100 md-lib-translate-y-0"
108
107
  : "md-lib-opacity-0 md-lib-translate-y-4"}`, onTransitionEnd: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.103",
3
+ "version": "5.8.104",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",