@anji-dashing/dam-solution-v2 5.8.176 → 5.8.178

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.
@@ -108,13 +108,13 @@ function AssetTemplatesTable({ assetTemplates, totalPages, totalCount, filters =
108
108
  ? getSortOrder(filters.sortOrder)
109
109
  : undefined,
110
110
  width: 200,
111
- render: (date) => (_jsx("span", { className: "md-lib-text-secondaryTextColor dark:md-lib-text-darkSecondaryTextColor md-lib-text-sm md-lib-cursor-default", children: moment.utc(date).tz(LOCAL_TIMEZONE).format(APP_DATE_TIME_FORMAT) })),
111
+ render: (date) => (_jsx("span", { className: "md-lib-text-secondaryTextColor dark:md-lib-text-darkSecondaryTextColor md-lib-text-base md-lib-cursor-default", children: moment.utc(date).tz(LOCAL_TIMEZONE).format(APP_DATE_TIME_FORMAT) })),
112
112
  },
113
113
  {
114
114
  title: "Description",
115
115
  dataIndex: "description",
116
116
  key: "description",
117
- render: (text) => (_jsx("span", { className: "md-lib-text-secondaryTextColor dark:md-lib-text-darkSecondaryTextColor md-lib-max-w-[240px] md-lib-truncate md-lib-inline-block md-lib-text-sm md-lib-cursor-default", title: text, children: text })),
117
+ render: (text) => (_jsx("span", { className: "md-lib-text-secondaryTextColor dark:md-lib-text-darkSecondaryTextColor md-lib-max-w-[240px] md-lib-truncate md-lib-inline-block md-lib-text-base md-lib-cursor-default", title: text, children: text })),
118
118
  },
119
119
  {
120
120
  title: "Active",
@@ -25,7 +25,7 @@ import { IoIosRadioButtonOff } from "react-icons/io";
25
25
  import { IoCheckboxOutline } from "react-icons/io5";
26
26
  import { FaRegUser } from "react-icons/fa";
27
27
  import { showNotification } from "../common/notifications";
28
- import { DELETE_CONFIRMATION_MESSAGE, DELETE_MESSAGE_DESCRIPTION, DELETE_OK_TEXT, DELETE_SUCCESS, INPUT_SETTINGS_VALIDATION_ERROR, INPUT_SETTINGS_VALIDATION_ERROR_AT_SWITCH_INPUT, SOMETHING_WENT_WRONG, } from "../utilities/constants/messages";
28
+ import { DELETE_CONFIRMATION_MESSAGE, DELETE_OK_TEXT, DELETE_SUCCESS, INPUT_SETTINGS_VALIDATION_ERROR, INPUT_SETTINGS_VALIDATION_ERROR_AT_SWITCH_INPUT, SOMETHING_WENT_WRONG, } from "../utilities/constants/messages";
29
29
  import { getInputTypeValidationErrors } from "../utilities/helpers/validators";
30
30
  import { DELETE_ASSET_FIELD_URL } from "../utilities/constants/apiUrls";
31
31
  import { DeleteConfirmationModal } from "../common/CustomElements";
@@ -269,5 +269,5 @@ export default function FieldsSection({ name, inputTypes, transformInputTypePayl
269
269
  else {
270
270
  setCurrentFieldIndex(null);
271
271
  }
272
- } }) }))] }) }), showConfirmModal && (_jsx(DeleteConfirmationModal, { showDeleteModal: showConfirmModal, toggleDeleteModal: toggleConfirmModal, okText: DELETE_OK_TEXT, onOk: onDeleteExistedField, loading: loading, description: DELETE_CONFIRMATION_MESSAGE.replace(":action", "Delete").replace(":entity", `${get(selectedField, "name", "this field")}`), subHeading: DELETE_MESSAGE_DESCRIPTION }))] }));
272
+ } }) }))] }) }), showConfirmModal && (_jsx(DeleteConfirmationModal, { showDeleteModal: showConfirmModal, toggleDeleteModal: toggleConfirmModal, okText: DELETE_OK_TEXT, onOk: onDeleteExistedField, loading: loading, description: DELETE_CONFIRMATION_MESSAGE.replace(":action", "Delete").replace(":entity", `${get(selectedField, "name", "this field")}`) }))] }));
273
273
  }
@@ -324,7 +324,7 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
324
324
  }
325
325
  });
326
326
  const shouldShowExternalFields = damLocationType === "external" || isEditMode;
327
- return (_jsx(Drawer, { open: true, title: isEditMode ? "Edit Client" : "Create Client", onClose: toggleShow, width: 500, maskClosable: false, children: fetchingClientData ? (_jsx("div", { style: { textAlign: "center", padding: "20px" }, children: _jsx(Typography.Text, { children: "Loading client data..." }) })) : (_jsxs(Form, { layout: "vertical", form: form, onFinish: onFinish, children: [_jsx(Form.Item, { label: "Name", name: "name", rules: [
327
+ return (_jsx(Drawer, { open: true, title: isEditMode ? "Edit Client" : "Create Client", onClose: toggleShow, width: 500, maskClosable: false, zIndex: 99999, children: fetchingClientData ? (_jsx("div", { style: { textAlign: "center", padding: "20px" }, children: _jsx(Typography.Text, { children: "Loading client data..." }) })) : (_jsxs(Form, { layout: "vertical", form: form, onFinish: onFinish, children: [_jsx(Form.Item, { label: "Name", name: "name", rules: [
328
328
  {
329
329
  required: true,
330
330
  message: "Name is required",
@@ -11,7 +11,7 @@ import { DeleteConfirmationModal } from "../common/CustomElements";
11
11
  import { DeleteOutlined, RedoOutlined } from "@ant-design/icons";
12
12
  import { generateFoldersQueryKey, invalidateData, } from "../utilities/constants/queryKeys";
13
13
  import { DriveModes, NotificationStatus, } from "../utilities/constants/interface";
14
- import { ARCHIVE_OK_TEXT, DELETE_CONFIRMATION_MESSAGE, DELETE_MESSAGE_DESCRIPTION, DELETE_OK_TEXT, DELETE_SUCCESS, INVALID_URL, RESTORE_SUCCESS, SOMETHING_WENT_WRONG, } from "../utilities/constants/messages";
14
+ import { ARCHIVE_OK_TEXT, DELETE_CONFIRMATION_MESSAGE, DELETE_OK_TEXT, DELETE_SUCCESS, INVALID_URL, RESTORE_SUCCESS, SOMETHING_WENT_WRONG, } from "../utilities/constants/messages";
15
15
  import { showNotification } from "../common/notifications";
16
16
  import FileMenuOptions from "./FileMenuOptions";
17
17
  import { getFolderData } from "../react-query/hooks/folder-hooks";
@@ -185,6 +185,8 @@ const ActionsBar = ({ fileIds, folderIds, onCloseSelection, selectedFilesData =
185
185
  return (_jsxs("div", { className: "md-lib-fixed md-lib-bottom-6 md-lib-left-1/2 md-lib-transform -md-lib-translate-x-1/2 md-lib-w-80 md:md-lib-w-[720px] md-lib-max-w-3xl md-lib-bg-textColorActive md-lib-border dark:md-lib-bg-darkPrimary dark:md-lib-border-darkBorderColor md-lib-border-secondaryHoverColor md-lib-rounded-xl md-lib-shadow-md md-lib-flex md-lib-items-center md-lib-justify-between md-lib-px-4 md-lib-py-2 md-lib-z-50", children: [_jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-gap-5 md-lib-pl-2", children: [_jsx(Button, { type: "text", size: "large", icon: _jsx(FiDownloadIcon, { size: 24, className: "" }), disabled: isTrashPage, onClick: onDownloadFiles, loading: downloadFileMutation.isLoading }), _jsx(Tooltip, { title: "Move", children: _jsx(Button, { type: "text", size: "large", icon: _jsx(FiFolderPlusIcon, { size: 24, className: "" }), disabled: isTrashPage, onClick: toggleShowMoveFolder }) }), isTrashPage ? (_jsx(Tooltip, { title: "Restore", children: _jsx(Button, { type: "text", size: "large", icon: _jsx(RedoOutlined, { className: "" }), onClick: () => onRestoreFiles(), disabled: !isTrashPage }) })) : (_jsx(_Fragment, { children: isAdmin && (_jsx(Tooltip, { title: "Delete", children: _jsx(Button, { type: "text", size: "large", icon: _jsx(FiTrash2Icon, { size: 24, className: "" }), onClick: () => toggleConfirmPopup("delete"), disabled: isTrashPage }) })) })), _jsx(FileMenuOptions, { file: selectedFile || null, fileIds: fileIds, folderIds: folderIds, folder: selectedFolder || null, onCloseSelection: onCloseSelection, readOnly: isTrashPage })] }), _jsx("div", { className: "md-lib-flex md-lib-items-center", children: _jsxs(Tag, { className: "md-lib-bg-[#DEE4ED] dark:md-lib-bg-darkPrimaryHoverColor !md-lib-rounded-lg !md-lib-px-4 h-[38px] md-lib-text-sm md-lib-items-center md-lib-font-medium md-lib-flex md-lib-gap-2 md-lib-text-textColor dark:md-lib-text-darkTextColor", closable: true, closeIcon: _jsx(FiXIcon, { onClick: onCloseSelection, className: "md-lib-cursor-pointer" }), children: [get(fileIds, "length", 0) + get(folderIds, "length", 0), " Selected"] }) }), showMoveFolder && (_jsx(MoveToAnotherFolder, { open: showMoveFolder, handleCancel: () => {
186
186
  toggleShowMoveFolder();
187
187
  onCloseSelection();
188
- }, folderIds: folderIds, fileIds: fileIds, entity: null })), _jsx(DeleteConfirmationModal, { showDeleteModal: showConfirmModal, toggleDeleteModal: toggleConfirmPopup, icon: actionType === "archive" ? (_jsx(IoArchiveOutlineIcon, {})) : (_jsx(DeleteOutlined, {})), okText: actionType === "archive" ? ARCHIVE_OK_TEXT : DELETE_OK_TEXT, description: DELETE_CONFIRMATION_MESSAGE.replace(":action", actionType).replace(" :entity", ""), subHeading: actionType === "archive" ? "" : DELETE_MESSAGE_DESCRIPTION, onOk: actionType === "archive" ? () => { } : onDeleteFile, loading: deleteFileMutation.isLoading })] }));
188
+ }, folderIds: folderIds, fileIds: fileIds, entity: null })), _jsx(DeleteConfirmationModal, { showDeleteModal: showConfirmModal, toggleDeleteModal: toggleConfirmPopup, icon: actionType === "archive" ? (_jsx(IoArchiveOutlineIcon, {})) : (_jsx(DeleteOutlined, {})), okText: actionType === "archive" ? ARCHIVE_OK_TEXT : DELETE_OK_TEXT, description: DELETE_CONFIRMATION_MESSAGE.replace(":action", actionType).replace(" :entity", ""),
189
+ // subHeading={actionType === "archive" ? "" : DELETE_MESSAGE_DESCRIPTION}
190
+ onOk: actionType === "archive" ? () => { } : onDeleteFile, loading: deleteFileMutation.isLoading })] }));
189
191
  };
190
192
  export default ActionsBar;
@@ -316,7 +316,7 @@ function DriveContainer({ parentFolderId, setSelectedFile, setParentFolderId, pi
316
316
  if (setGlobalSearch)
317
317
  setGlobalSearch("");
318
318
  };
319
- return (_jsx(RefetchFoldersProvider, { value: refetch, children: _jsxs("div", { className: "md-lib-h-[inherit]", children: [type !== DriveModes.FILE && (_jsx(_Fragment, { children: _jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-px-4 md-lib-h-20 md-lib-justify-between md-lib-border-b md-lib-border-borderColor dark:md-lib-border-darkBorderColor md-lib-mb-4", children: [imagePicker ? (_jsx(ImagePickerBreadCrumbList, { folder: parentFolder, parentFolderId: parentFolderId, setParentFolderId: setParentFolderId, pickerFolderId: pickerFolderId })) : (_jsx(_Fragment, { children: _jsx(BreadCrumbList, { folder: parentFolder, parentFolderId: parentFolderId, setParentFolderId: setParentFolderId, pickerFolderId: pickerFolderId, globalSearch: globalSearch, setSelectedKeys: setSelectedKeys }) })), isAdmin && _jsx(AddDrive, { parentFolderId: parentFolderId }), get(imagePicker, "allowNewFiles") && (_jsx(Upload, { beforeUpload: (file) => {
319
+ return (_jsx(RefetchFoldersProvider, { value: refetch, children: _jsxs("div", { className: "md-lib-h-[inherit]", children: [type !== DriveModes.FILE && (_jsx(_Fragment, { children: _jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-px-4 md-lib-h-20 md-lib-justify-between md-lib-border-b md-lib-border-borderColor dark:md-lib-border-darkBorderColor md-lib-mb-4", children: [imagePicker ? (_jsx(ImagePickerBreadCrumbList, { folder: parentFolder, parentFolderId: parentFolderId, setParentFolderId: setParentFolderId, pickerFolderId: pickerFolderId, imagePickerModal: true })) : (_jsx(_Fragment, { children: _jsx(BreadCrumbList, { folder: parentFolder, parentFolderId: parentFolderId, setParentFolderId: setParentFolderId, pickerFolderId: pickerFolderId, globalSearch: globalSearch, setSelectedKeys: setSelectedKeys }) })), isAdmin && _jsx(AddDrive, { parentFolderId: parentFolderId }), get(imagePicker, "allowNewFiles") && (_jsx(Upload, { beforeUpload: (file) => {
320
320
  onSelectNewFile(file);
321
321
  }, showUploadList: false, accept: "image/*", children: _jsx(CustomButton, { loading: loadingType === "NEW_FILE_UPLOAD", label: "Select File", icon: _jsx(BsUploadIcon, {}) }) }))] }) })), _jsxs("div", { className: `md-lib-px-4 md-lib-border-borderColor dark:md-lib-border-darkBorderColor md-lib-flex ${!includes([DriveModes.FOLDERS, DriveModes.FILE], type)
322
322
  ? "md-lib-justify-between"
@@ -95,7 +95,7 @@ function FileDownloadHistory({ open, onClose, file, }) {
95
95
  },
96
96
  ];
97
97
  const fileOrFolderName = get(file, "name", "File/Folder");
98
- return (_jsx(Drawer, { title: _jsxs("span", { className: "md-lib-font-semibold md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-truncate md-lib-block md-lib-max-w-[280px]", title: `${fileOrFolderName} - Download history`, children: [fileOrFolderName, " - Download history"] }), onClose: onClose, open: open, footer: null, closable: true, closeIcon: _jsx(CloseOutlined, { className: "md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-text-lg", "aria-label": "Close" }), children: _jsx(Table, { rowKey: "_id", dataSource: logs, columns: columns, loading: { indicator: _jsx(CustomLoader, {}), spinning: loading }, pagination: totalPages > 1
98
+ return (_jsx(Drawer, { title: _jsxs("span", { className: "md-lib-font-semibold md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-truncate md-lib-block md-lib-max-w-[280px]", title: `${fileOrFolderName} - Download history`, children: [fileOrFolderName, " - Download history"] }), onClose: onClose, open: open, footer: null, closable: true, closeIcon: _jsx(CloseOutlined, { className: "md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-text-lg", "aria-label": "Close" }), zIndex: 99999, children: _jsx(Table, { rowKey: "_id", dataSource: logs, columns: columns, loading: { indicator: _jsx(CustomLoader, {}), spinning: loading }, pagination: totalPages > 1
99
99
  ? {
100
100
  current: currentPage,
101
101
  total: totalCount,
@@ -22,7 +22,7 @@ import { DownloadOutlined, } from "@ant-design/icons";
22
22
  import AddFolder from "./AddFolder";
23
23
  import { useMutation, useQueryClient } from "react-query";
24
24
  import { archiveFiles, deleteFiles, downloadFiles, duplicateFiles, restoreFiles, unarchiveFiles, useFile, } from "../react-query/services/file-services";
25
- import { ADDED_TO_FAV_MSG, ARCHIVE_OK_TEXT, ARCHIVE_SUCCESS, CREATE_SUCCESS, DELETE_CONFIRMATION_MESSAGE, DELETE_MESSAGE_DESCRIPTION, DELETE_OK_TEXT, DELETE_SUCCESS, INVALID_URL, REMOVED_FROM_FAV_MSG, RESTORE_SUCCESS, SOMETHING_WENT_WRONG, } from "../utilities/constants/messages";
25
+ import { ADDED_TO_FAV_MSG, ARCHIVE_OK_TEXT, ARCHIVE_SUCCESS, CREATE_SUCCESS, DELETE_CONFIRMATION_MESSAGE, DELETE_OK_TEXT, DELETE_SUCCESS, INVALID_URL, REMOVED_FROM_FAV_MSG, RESTORE_SUCCESS, SOMETHING_WENT_WRONG, } from "../utilities/constants/messages";
26
26
  import { getSelectedFiles, } from "../react-query/hooks/folder-hooks";
27
27
  import { generateFoldersQueryKey, invalidateData, QueryKeys, } from "../utilities/constants/queryKeys";
28
28
  import { useRefetchFolders } from "../utilities/FoldersContext";
@@ -445,6 +445,8 @@ function FileMenuOptions({ file, folderIds = [], fileIds = [], folder, onCloseSe
445
445
  ? "md-lib-cursor-not-allowed md-lib-text-disabledBtnColor dark:md-lib-text-darkBorderColor"
446
446
  : "md-lib-cursor-pointer", onClick: (e) => e.stopPropagation() }) }), displayUpdateName && (!!file || !!folder) && (_jsx(AddFolder, { file: file, open: displayUpdateName, handleCancel: toggleDisplayUpdateName, folder: folder, onCloseSelection: onCloseSelection, fileModal: fileModal })), _jsx(DeleteConfirmationModal, { showDeleteModal: showConfirmModal, toggleDeleteModal: toggleConfirmPopup, icon: actionType === "archive" ? (_jsx(IoArchiveOutlineIcon, {})) : (_jsx(DeleteOutlined, {})), okText: actionType === "archive" ? ARCHIVE_OK_TEXT : DELETE_OK_TEXT, description: isMultiSelection
447
447
  ? DELETE_CONFIRMATION_MESSAGE.replace(":action", actionType).replace(" :entity", "")
448
- : DELETE_CONFIRMATION_MESSAGE.replace(":action", actionType).replace(":entity", get(file, "name", "this file")), onOk: actionType === "archive" ? onArchiveFile : onDeleteFile, subHeading: actionType === "archive" ? "" : DELETE_MESSAGE_DESCRIPTION, loading: deleteFileMutation.isLoading || archiveFileMutation.isLoading }), showPreviewModal && (_jsx(FileDetails, { open: showPreviewModal, handleClose: toggleShowPreviewModal, file: file || undefined, files: getSelectedFiles(queryClient, folderId ? folderId : rootFolderId, generateFoldersQueryKey(type), file ? [get(file, "_id")] : fileIds), fileIds: file ? [get(file, "_id")] : fileIds, onCloseSelection: onCloseSelection })), showMoveFolder && (effectiveFile || file) && (_jsx(MoveToAnotherFolder, { open: showMoveFolder, handleCancel: toggleShowMoveFolder, fileIds: effectiveFile ? [get(effectiveFile, "_id")] : [get(file, "_id")], folderIds: [], entity: effectiveFile || file, onCloseSelection: onCloseSelection })), showShareModal && (_jsx(InviteTeamModal, { open: showShareModal, onClose: toggleShareModal, onFetchInvitations: () => { }, shareModal: true, fileIds: file ? [get(file, "_id")] : fileIds, folderIds: folderIds, inviteType: DriveModes.FILE, file: file })), showFileAccess && (file || folder) && (_jsx(ManageFile, { open: showFileAccess, onClose: toggleFileAccess, file: file ? file : folder })), showLogsModal && (_jsx(FileDownloadHistory, { file: file ? file : folder, open: showLogsModal, onClose: toggleLogsModal }))] }));
448
+ : DELETE_CONFIRMATION_MESSAGE.replace(":action", actionType).replace(":entity", get(file, "name", "this file")), onOk: actionType === "archive" ? onArchiveFile : onDeleteFile,
449
+ // subHeading={actionType === "archive" ? "" : DELETE_MESSAGE_DESCRIPTION}
450
+ loading: deleteFileMutation.isLoading || archiveFileMutation.isLoading }), showPreviewModal && (_jsx(FileDetails, { open: showPreviewModal, handleClose: toggleShowPreviewModal, file: file || undefined, files: getSelectedFiles(queryClient, folderId ? folderId : rootFolderId, generateFoldersQueryKey(type), file ? [get(file, "_id")] : fileIds), fileIds: file ? [get(file, "_id")] : fileIds, onCloseSelection: onCloseSelection })), showMoveFolder && (effectiveFile || file) && (_jsx(MoveToAnotherFolder, { open: showMoveFolder, handleCancel: toggleShowMoveFolder, fileIds: effectiveFile ? [get(effectiveFile, "_id")] : [get(file, "_id")], folderIds: [], entity: effectiveFile || file, onCloseSelection: onCloseSelection })), showShareModal && (_jsx(InviteTeamModal, { open: showShareModal, onClose: toggleShareModal, onFetchInvitations: () => { }, shareModal: true, fileIds: file ? [get(file, "_id")] : fileIds, folderIds: folderIds, inviteType: DriveModes.FILE, file: file })), showFileAccess && (file || folder) && (_jsx(ManageFile, { open: showFileAccess, onClose: toggleFileAccess, file: file ? file : folder })), showLogsModal && (_jsx(FileDownloadHistory, { file: file ? file : folder, open: showLogsModal, onClose: toggleLogsModal }))] }));
449
451
  }
450
452
  export default FileMenuOptions;
@@ -19,7 +19,9 @@ const FilesGridView = ({ files, handleClick, selectedFileIds, isImagePicker, sel
19
19
  type !== DriveModes.FOLDERS &&
20
20
  get(file, "fileUploadStatus") !== ThumbnailStatus.PENDING && (_jsx(FileMenuOptions, { file: file }))] }), _jsx("div", { className: "md-lib-mt-2 md-lib-h-28 md-lib-mx-2.5 md-lib-bg-white dark:md-lib-bg-darkPrimaryHoverColor md-lib-rounded-md md-lib-flex md-lib-justify-center", children: get(file, "fileUploadStatus") === ThumbnailStatus.PENDING ? (
21
21
  // <IconInprogress className="mt-10 text-[40px] text-imagesColor" />
22
- _jsx(Image, { src: UPLOAD_FILE_IN_PROGRESS_WHITE_IMAGE, width: 100, height: 100 })) : (_jsx("img", { src: get(file, "thumbnailUrl", ""), width: 100, height: 100, alt: get(file, "name", "N/A") })) }), _jsx("div", { children: _jsx("p", { className: "md-lib-text-xs md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-px-5 md-lib-pt-2.5 md-lib-truncate md-lib-max-w-40", title: get(file, "name", "N/A"), children: get(file, "assetName", "N/A") }) })] }, get(file, "_id")));
22
+ _jsx(Image, { src: UPLOAD_FILE_IN_PROGRESS_WHITE_IMAGE, width: 100, height: 100 })) : (_jsx("img", { src: get(file, "thumbnailUrl", ""),
23
+ // width={100}
24
+ height: 100, alt: get(file, "name", "N/A"), className: "mb-lib-w-auto" })) }), _jsx("div", { children: _jsx("p", { className: "md-lib-text-xs md-lib-text-textColor dark:md-lib-text-darkTextColor md-lib-px-5 md-lib-pt-2.5 md-lib-truncate md-lib-max-w-40", title: get(file, "name", "N/A"), children: get(file, "assetName", "N/A") }) })] }, get(file, "_id")));
23
25
  }) }));
24
26
  };
25
27
  export default FilesGridView;
@@ -6,7 +6,7 @@ import { IoArchiveOutline, IoDuplicateOutline } from "react-icons/io5";
6
6
  import { useMemo, useState } from "react";
7
7
  import { DriveModes, NotificationStatus, } from "../utilities/constants/interface";
8
8
  import { DeleteConfirmationModal } from "../common/CustomElements";
9
- import { ADDED_TO_FAV_MSG, ARCHIVE_OK_TEXT, ARCHIVE_SUCCESS, DELETE_CONFIRMATION_MESSAGE, DELETE_MESSAGE_DESCRIPTION, DELETE_OK_TEXT, DELETE_SUCCESS, DUPLICATE_SUCCESS, INVALID_URL, REMOVED_FROM_FAV_MSG, RESTORE_SUCCESS, SOMETHING_WENT_WRONG, } from "../utilities/constants/messages";
9
+ import { ADDED_TO_FAV_MSG, ARCHIVE_OK_TEXT, ARCHIVE_SUCCESS, DELETE_CONFIRMATION_MESSAGE, DELETE_OK_TEXT, DELETE_SUCCESS, DUPLICATE_SUCCESS, INVALID_URL, REMOVED_FROM_FAV_MSG, RESTORE_SUCCESS, SOMETHING_WENT_WRONG, } from "../utilities/constants/messages";
10
10
  import { filter, get, includes } from "lodash";
11
11
  import { useMutation, useQueryClient } from "react-query";
12
12
  import { addToFavFolders, archiveFolders, deleteFolders, duplicateFolder, removeFromFavFolders, restoreFolders, unarchiveFolders, } from "../react-query/services/folder-services";
@@ -345,6 +345,8 @@ function FolderMenuOptions({ folder }) {
345
345
  const currentMenuItems = useMemo(() => {
346
346
  return filterActions(items, get(AllowedFolderActions, type));
347
347
  }, [type, items]);
348
- return (_jsxs(_Fragment, { children: [_jsx(Dropdown, { menu: { items: currentMenuItems }, trigger: ["click"], children: _jsx(BsThreeDotsVerticalIcon, { size: 20, className: "md-lib-cursor-pointer", onClick: (e) => e.stopPropagation() }) }), _jsx(DeleteConfirmationModal, { showDeleteModal: showConfirmModal, toggleDeleteModal: toggleConfirmPopup, icon: actionType === "archive" ? (_jsx(IoArchiveOutlineIcon, {})) : (_jsx(DeleteOutlined, {})), okText: actionType === "archive" ? ARCHIVE_OK_TEXT : DELETE_OK_TEXT, description: DELETE_CONFIRMATION_MESSAGE.replace(":action", actionType).replace(":entity", get(folder, "name", "this folder")), subHeading: actionType === "archive" ? "" : DELETE_MESSAGE_DESCRIPTION, onOk: actionType === "archive" ? onArchiveFolder : onDeleteFolder, loading: deleteFolderMutation.isLoading || archiveFolderMutation.isLoading }), _jsx(AddFolder, { open: showUpdateModal, handleCancel: toggleUpdateModal, folder: folder }), showMoveFolder && (_jsx(MoveToAnotherFolder, { open: showMoveFolder, handleCancel: toggleShowMoveFolder, folderIds: [get(folder, "_id")], entity: folder })), showShareModal && (_jsx(InviteTeamModal, { open: showShareModal, onClose: toggleShareModal, onFetchInvitations: () => { }, shareModal: true, fileIds: [], folderIds: [get(folder, "_id")], inviteType: DriveModes.FOLDERS, file: folder })), showFileAccess && folder && (_jsx(ManageFile, { open: showFileAccess, onClose: toggleFileAccess, file: folder })), showLogs && (_jsx(FileDownloadHistory, { file: folder, open: showLogs, onClose: toggleLogsModal }))] }));
348
+ return (_jsxs(_Fragment, { children: [_jsx(Dropdown, { menu: { items: currentMenuItems }, trigger: ["click"], children: _jsx(BsThreeDotsVerticalIcon, { size: 20, className: "md-lib-cursor-pointer", onClick: (e) => e.stopPropagation() }) }), _jsx(DeleteConfirmationModal, { showDeleteModal: showConfirmModal, toggleDeleteModal: toggleConfirmPopup, icon: actionType === "archive" ? (_jsx(IoArchiveOutlineIcon, {})) : (_jsx(DeleteOutlined, {})), okText: actionType === "archive" ? ARCHIVE_OK_TEXT : DELETE_OK_TEXT, description: DELETE_CONFIRMATION_MESSAGE.replace(":action", actionType).replace(":entity", get(folder, "name", "this folder")),
349
+ // subHeading={actionType === "archive" ? "" : DELETE_MESSAGE_DESCRIPTION}
350
+ onOk: actionType === "archive" ? onArchiveFolder : onDeleteFolder, loading: deleteFolderMutation.isLoading || archiveFolderMutation.isLoading }), _jsx(AddFolder, { open: showUpdateModal, handleCancel: toggleUpdateModal, folder: folder }), showMoveFolder && (_jsx(MoveToAnotherFolder, { open: showMoveFolder, handleCancel: toggleShowMoveFolder, folderIds: [get(folder, "_id")], entity: folder })), showShareModal && (_jsx(InviteTeamModal, { open: showShareModal, onClose: toggleShareModal, onFetchInvitations: () => { }, shareModal: true, fileIds: [], folderIds: [get(folder, "_id")], inviteType: DriveModes.FOLDERS, file: folder })), showFileAccess && folder && (_jsx(ManageFile, { open: showFileAccess, onClose: toggleFileAccess, file: folder })), showLogs && (_jsx(FileDownloadHistory, { file: folder, open: showLogs, onClose: toggleLogsModal }))] }));
349
351
  }
350
352
  export default FolderMenuOptions;
@@ -1,8 +1,9 @@
1
1
  import { FolderEntity } from "../utilities/constants/interface";
2
- declare function ImagePickerBreadCrumbList({ folder, parentFolderId, setParentFolderId, pickerFolderId, }: {
2
+ declare function ImagePickerBreadCrumbList({ folder, parentFolderId, setParentFolderId, pickerFolderId, imagePickerModal }: {
3
3
  folder: FolderEntity;
4
4
  parentFolderId?: string;
5
5
  setParentFolderId?: (id: string) => void;
6
6
  pickerFolderId?: string;
7
+ imagePickerModal?: boolean;
7
8
  }): JSX.Element;
8
9
  export default ImagePickerBreadCrumbList;
@@ -5,7 +5,7 @@ import { useMemo } from "react";
5
5
  import { FaChevronRight } from "react-icons/fa";
6
6
  import { useDamConfig } from "../hocs/DamConfigContext";
7
7
  const FaChevronRightIcon = FaChevronRight;
8
- function ImagePickerBreadCrumbList({ folder, parentFolderId, setParentFolderId, pickerFolderId, }) {
8
+ function ImagePickerBreadCrumbList({ folder, parentFolderId, setParentFolderId, pickerFolderId, imagePickerModal }) {
9
9
  const damConfig = useDamConfig();
10
10
  const { rootFolderId } = damConfig;
11
11
  const tree = useMemo(() => {
@@ -29,7 +29,7 @@ function ImagePickerBreadCrumbList({ folder, parentFolderId, setParentFolderId,
29
29
  setParentFolderId(treeId);
30
30
  }
31
31
  };
32
- return (_jsx(Breadcrumb.Item, { onClick: handleClick, className: "md-lib-h-auto md-lib-cursor-pointer", children: _jsx(Tooltip, { title: name, children: _jsx("p", { className: "md-lib-max-w-28 md-lib-truncate md-lib-font-semibold md-lib-text-[22px]", children: name }) }) }, treeId));
32
+ return (_jsx(Breadcrumb.Item, { onClick: handleClick, className: "md-lib-h-auto md-lib-cursor-pointer", children: _jsx(Tooltip, { title: name, children: _jsx("p", { className: `${!imagePickerModal && "md-lib-max-w-28"} md-lib-truncate md-lib-font-semibold md-lib-text-[22px]`, children: name }) }) }, treeId));
33
33
  }) }));
34
34
  }
35
35
  export default ImagePickerBreadCrumbList;
@@ -32,7 +32,7 @@ const getStatusProps = (status) => {
32
32
  }
33
33
  };
34
34
  const UploadStatusModal = ({ open, statusList, onClose }) => {
35
- return (_jsx(Drawer, { title: "Uploading File", open: open, onClose: onClose, placement: "right", width: 400, mask: false, maskClosable: true, closable: true, destroyOnClose: false, children: _jsx("div", { className: "md-lib-space-y-4 md-lib-max-h-[calc(100vh-100px)] md-lib-overflow-y-auto md-lib-pr-2", children: map(statusList, ({ name, status }) => {
35
+ return (_jsx(Drawer, { title: "Uploading File", open: open, onClose: onClose, placement: "right", width: 400, mask: false, maskClosable: true, closable: true, destroyOnClose: false, zIndex: 99999, children: _jsx("div", { className: "md-lib-space-y-4 md-lib-max-h-[calc(100vh-100px)] md-lib-overflow-y-auto md-lib-pr-2", children: map(statusList, ({ name, status }) => {
36
36
  const { percent, status: progressStatus, icon, } = getStatusProps(status);
37
37
  return (_jsxs("div", { className: "md-lib-mb-4 md-lib-p-3 md-lib-border md-lib-border-gray-200 md-lib-rounded", children: [_jsxs("div", { className: "md-lib-flex md-lib-justify-between md-lib-items-center md-lib-mb-2", children: [_jsx("span", { className: "md-lib-truncate md-lib-w-4/5 md-lib-text-sm md-lib-font-medium", children: name }), icon] }), _jsx(Progress, { percent: status === FileUploadStatus.PENDING ? undefined : percent, status: progressStatus, showInfo: true, strokeColor: status === FileUploadStatus.PENDING
38
38
  ? ThemeModes.PENDING
@@ -17,7 +17,7 @@ import CustomButton from "../../common/Button";
17
17
  import { MoreOutlined } from "@ant-design/icons";
18
18
  import { useMemo, useState } from "react";
19
19
  import { DeleteConfirmationModal } from "../../common/CustomElements";
20
- import { DELETE_CONFIRMATION_MESSAGE, DELETE_MESSAGE_DESCRIPTION, DELETE_OK_TEXT, DELETE_SUCCESS, SOMETHING_WENT_WRONG, UPDATE_SUCCESS, } from "../../utilities/constants/messages";
20
+ import { DELETE_CONFIRMATION_MESSAGE, DELETE_OK_TEXT, DELETE_SUCCESS, SOMETHING_WENT_WRONG, UPDATE_SUCCESS, } from "../../utilities/constants/messages";
21
21
  import { FETCH_COMMENT_URL } from "../../utilities/constants/apiUrls";
22
22
  import { showNotification } from "../../common/notifications";
23
23
  import Editor from "./Editor";
@@ -97,6 +97,6 @@ function CommentEntity({ comment, refreshData, parentId, file, }) {
97
97
  likes: includes(likesArray, userId)
98
98
  ? filter(likesArray, (id) => id !== userId)
99
99
  : [...likesArray, userId],
100
- }, "like") })] })] }, get(commentData, "_id"))), showConfimation && (_jsx(DeleteConfirmationModal, { showDeleteModal: showConfimation, toggleDeleteModal: toggleConfirmation, okText: DELETE_OK_TEXT, onOk: onDeleteComment, loading: loadingType === "delete", description: DELETE_CONFIRMATION_MESSAGE.replace(":action", "Delete").replace(" :entity", ""), subHeading: DELETE_MESSAGE_DESCRIPTION })), showReplies && (_jsxs("div", { className: "md-lib-mt-3 md-lib-ml-12 md-lib-flex md-lib-flex-col md-lib-gap-3 md-lib-animate-fade-in md-lib-transition-all md-lib-duration-300 md-lib-ease-in-out", children: [_jsx("p", { className: "md-lib-text-sm md-lib-text-secondaryTextColor dark:md-lib-text-darkSecondaryTextColor md-lib-font-semibold", children: "Replies" }), _jsx(Comments, { parentId: get(comment, "_id"), file: file })] }))] }));
100
+ }, "like") })] })] }, get(commentData, "_id"))), showConfimation && (_jsx(DeleteConfirmationModal, { showDeleteModal: showConfimation, toggleDeleteModal: toggleConfirmation, okText: DELETE_OK_TEXT, onOk: onDeleteComment, loading: loadingType === "delete", description: DELETE_CONFIRMATION_MESSAGE.replace(":action", "Delete").replace(" :entity", "") })), showReplies && (_jsxs("div", { className: "md-lib-mt-3 md-lib-ml-12 md-lib-flex md-lib-flex-col md-lib-gap-3 md-lib-animate-fade-in md-lib-transition-all md-lib-duration-300 md-lib-ease-in-out", children: [_jsx("p", { className: "md-lib-text-sm md-lib-text-secondaryTextColor dark:md-lib-text-darkSecondaryTextColor md-lib-font-semibold", children: "Replies" }), _jsx(Comments, { parentId: get(comment, "_id"), file: file })] }))] }));
101
101
  }
102
102
  export default CommentEntity;
@@ -240,6 +240,6 @@ function MapFile({ open, handleCancel, filesList, fromUpload, parentFolderId, ca
240
240
  }
241
241
  };
242
242
  const getMetadataForm = (_jsxs(Form, { layout: "vertical", form: form, scrollToFirstError: true, onFinish: fromUpload ? handleSubmit : handleUpdate, onKeyDown: preventEnterSubmit, className: "md-lib-m-2", disabled: !canEdit, children: [_jsx(AssetSelectionFormItem, { handleAssetTemplateChange: handleAssetTemplateChange, assetOptions: assetOptions, assetsLoading: assetsLoading }), selectedAssetTemplate && (_jsxs(_Fragment, { children: [_jsx(Form.Item, { name: "teamIds", label: "Teams", children: _jsx(Select, { options: teamOptions, placeholder: "Select teams", mode: "multiple", onChange: (val) => onChangeTeams(val), style: { width: "100%" }, showSearch: true, optionFilterProp: "key" }) }), _jsx(Form.Item, { name: "expiryDate", label: "Expiry Date", children: _jsx(DatePicker, { placeholder: "Expiry Date", style: { width: "100%" } }) }), _jsx(Metadata, { asset: selectedAssetTemplate, form: form, file: (filesList === null || filesList === void 0 ? void 0 : filesList[0]) || null })] })), _jsxs("div", { className: "md-lib-flex md-lib-items-center md-lib-justify-end md-lib-gap-3", children: [_jsx(Button, { onClick: handleCancelWithConfirmation, children: canEdit ? "Cancel" : "Close" }), canEdit && (_jsx(Button, { disabled: !selectedAssetTemplate, type: "primary", loading: loading || updateFileMutation.isLoading, htmlType: "submit", children: "Save" }))] })] }));
243
- return (_jsx(_Fragment, { children: fromUpload ? (_jsx(Drawer, { title: "Metadata", open: open, onClose: handleCancelWithConfirmation, maskClosable: false, children: getMetadataForm })) : (_jsxs("div", { className: "md-lib-p-2 md-lib-overflow-y-scroll md-lib-max-h-[calc(100vh-65px)]", children: [_jsx("p", { className: "md-lib-text-lg md-lib-font-semibold", children: "Metadata" }), getMetadataForm] })) }));
243
+ return (_jsx(_Fragment, { children: fromUpload ? (_jsx(Drawer, { title: "Metadata", open: open, onClose: handleCancelWithConfirmation, maskClosable: false, zIndex: 99999, children: getMetadataForm })) : (_jsxs("div", { className: "md-lib-p-2 md-lib-overflow-y-scroll md-lib-max-h-[calc(100vh-65px)]", children: [_jsx("p", { className: "md-lib-text-lg md-lib-font-semibold", children: "Metadata" }), getMetadataForm] })) }));
244
244
  }
245
245
  export default MapFile;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anji-dashing/dam-solution-v2",
3
- "version": "5.8.176",
3
+ "version": "5.8.178",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",